1 | import { Entity, Constructable, ComplexTypeNamespace, EdmTypeShared } from '../odata-common';
|
2 | import { EdmToPrimitive as EdmToPrimitiveV2, EdmType as EdmTypeV2 } from '../odata-v2';
|
3 | import { EdmToPrimitive as EdmToPrimitiveV4, EdmType as EdmTypeV4 } from '../odata-v4';
|
4 |
|
5 |
|
6 |
|
7 | export interface EntityDeserializer<EntityT extends Entity = any> {
|
8 | deserializeEntity: (json: any, entityConstructor: Constructable<EntityT>, requestHeader?: any) => EntityT;
|
9 | deserializeComplexType: (json: Record<string, any>, complexType: ComplexTypeNamespace<any>) => any;
|
10 | }
|
11 | declare type EdmToTsTypeV2<EdmT extends EdmTypeV2 = any> = (value: any, edmType: EdmTypeShared<'v2'>) => EdmToPrimitiveV2<EdmT>;
|
12 | declare type EdmToTsTypeV4<EdmT extends EdmTypeV4 = any> = (value: any, edmType: EdmTypeShared<'v4'>) => EdmToPrimitiveV4<EdmT>;
|
13 | declare type ExtractODataETagType = (json: Record<string, any>) => string | undefined;
|
14 | declare type ExtractDataFromOneToManyLinkType = (data: any) => any[];
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | export declare function entityDeserializer(edmToTs: EdmToTsTypeV2 | EdmToTsTypeV4, extractODataETag: ExtractODataETagType, extractDataFromOneToManyLink: ExtractDataFromOneToManyLinkType): EntityDeserializer;
|
24 | export declare function extractEtagFromHeader(headers: any): string | undefined;
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 | export declare function extractCustomFields<EntityT extends Entity, JsonT>(json: Partial<JsonT>, entityConstructor: Constructable<EntityT>): Record<string, any>;
|
33 | export {};
|
34 |
|
\ | No newline at end of file |