UNPKG

1.51 kBTypeScriptView Raw
1import { Selectable, FieldType } from '../selectable';
2import { Expandable } from '../expandable';
3import { Entity, Constructable } from '../entity';
4import { Filterable } from '../filter';
5import { Orderable } from '../order';
6import { EdmTypeShared } from '../edm-types';
7/**
8 * Union of necessary methods for the OData URI conversion.
9 * In v2/uri-conversion/odata-uri.ts and v4/uri-conversion/odata-uri.ts the instance for v2 and v4 are created.
10 */
11export interface ODataUri {
12 getExpand<EntityT extends Entity>(selects: Selectable<EntityT>[], expands: Expandable<EntityT>[], entityConstructor: Constructable<EntityT>): Partial<{
13 expand: string;
14 }>;
15 getFilter<EntityT extends Entity>(filter: Filterable<EntityT>, entityConstructor: Constructable<EntityT>): Partial<{
16 filter: string;
17 }>;
18 getEntityKeys<EntityT extends Entity>(entity: EntityT, entityConstructor: Constructable<EntityT>): Record<string, any>;
19 getOrderBy<EntityT extends Entity>(orderBy: Orderable<EntityT>[]): Partial<{
20 orderby: string;
21 }>;
22 getResourcePathForKeys<EntityT extends Entity>(keys: Record<string, FieldType>, entityConstructor: Constructable<EntityT>): string;
23 getSelect<EntityT extends Entity>(selects: Selectable<EntityT>[]): Partial<{
24 select: string;
25 }>;
26 convertToUriFormat(value: any, edmType: EdmTypeShared<'v2'> | EdmTypeShared<'v4'>): string;
27}
28export declare function prependDollar(param: string): string;
29//# sourceMappingURL=odata-uri.d.ts.map
\No newline at end of file