angular-odata 0.92.0 → 0.95.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{esm2015/angular-odata.js → esm2020/angular-odata.mjs} +0 -0
- package/esm2020/lib/api.mjs +303 -0
- package/{esm2015/lib/cache/cache.js → esm2020/lib/cache/cache.mjs} +3 -3
- package/{esm2015/lib/cache/index.js → esm2020/lib/cache/index.mjs} +0 -0
- package/{esm2015/lib/cache/memory.js → esm2020/lib/cache/memory.mjs} +1 -1
- package/{esm2015/lib/cache/storage.js → esm2020/lib/cache/storage.mjs} +2 -2
- package/esm2020/lib/client.mjs +271 -0
- package/{esm2015/lib/constants.js → esm2020/lib/constants.mjs} +3 -1
- package/esm2020/lib/helper.mjs +268 -0
- package/{esm2015/lib/index.js → esm2020/lib/index.mjs} +0 -0
- package/esm2020/lib/models/collection.mjs +741 -0
- package/{esm2015/lib/models/index.js → esm2020/lib/models/index.mjs} +0 -0
- package/esm2020/lib/models/model.mjs +453 -0
- package/esm2020/lib/models/options.mjs +945 -0
- package/{esm2015/lib/module.js → esm2020/lib/module.mjs} +7 -7
- package/esm2020/lib/options.mjs +32 -0
- package/{esm2015/lib/resources/index.js → esm2020/lib/resources/index.mjs} +0 -0
- package/{esm2015/lib/resources/path/handlers.js → esm2020/lib/resources/path/handlers.mjs} +1 -1
- package/{esm2015/lib/resources/path/index.js → esm2020/lib/resources/path/index.mjs} +0 -0
- package/esm2020/lib/resources/path/segments.mjs +124 -0
- package/esm2020/lib/resources/query/builder.mjs +590 -0
- package/esm2020/lib/resources/query/expressions.mjs +207 -0
- package/esm2020/lib/resources/query/handlers.mjs +186 -0
- package/{esm2015/lib/resources/query/index.js → esm2020/lib/resources/query/index.mjs} +0 -0
- package/esm2020/lib/resources/query/options.mjs +103 -0
- package/esm2020/lib/resources/query/syntax.mjs +406 -0
- package/esm2020/lib/resources/request.mjs +167 -0
- package/esm2020/lib/resources/resource.mjs +326 -0
- package/esm2020/lib/resources/responses/annotations.mjs +119 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-annotation.js → esm2020/lib/resources/responses/csdl/csdl-annotation.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-entity-container.js → esm2020/lib/resources/responses/csdl/csdl-entity-container.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-entity-set.js → esm2020/lib/resources/responses/csdl/csdl-entity-set.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-enum-type.js → esm2020/lib/resources/responses/csdl/csdl-enum-type.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-function-action.js → esm2020/lib/resources/responses/csdl/csdl-function-action.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-navigation-property-binding.js → esm2020/lib/resources/responses/csdl/csdl-navigation-property-binding.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-reference.js → esm2020/lib/resources/responses/csdl/csdl-reference.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-schema.js → esm2020/lib/resources/responses/csdl/csdl-schema.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-singleton.js → esm2020/lib/resources/responses/csdl/csdl-singleton.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-structural-property.js → esm2020/lib/resources/responses/csdl/csdl-structural-property.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-structured-type.js → esm2020/lib/resources/responses/csdl/csdl-structured-type.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-type-definition.js → esm2020/lib/resources/responses/csdl/csdl-type-definition.mjs} +0 -0
- package/{esm2015/lib/resources/responses/index.js → esm2020/lib/resources/responses/index.mjs} +0 -0
- package/esm2020/lib/resources/responses/metadata.mjs +547 -0
- package/{esm2015/lib/resources/responses/options.js → esm2020/lib/resources/responses/options.mjs} +0 -0
- package/{esm2015/lib/resources/responses/response.js → esm2020/lib/resources/responses/response.mjs} +0 -0
- package/{esm2015/lib/resources/responses/types.js → esm2020/lib/resources/responses/types.mjs} +0 -0
- package/esm2020/lib/resources/types/action.mjs +101 -0
- package/esm2020/lib/resources/types/batch.mjs +288 -0
- package/esm2020/lib/resources/types/count.mjs +27 -0
- package/esm2020/lib/resources/types/entity-set.mjs +94 -0
- package/esm2020/lib/resources/types/entity.mjs +106 -0
- package/esm2020/lib/resources/types/function.mjs +137 -0
- package/{esm2015/lib/resources/types/index.js → esm2020/lib/resources/types/index.mjs} +0 -0
- package/esm2020/lib/resources/types/media.mjs +41 -0
- package/esm2020/lib/resources/types/metadata.mjs +30 -0
- package/esm2020/lib/resources/types/navigation-property.mjs +226 -0
- package/esm2020/lib/resources/types/options.mjs +2 -0
- package/esm2020/lib/resources/types/property.mjs +183 -0
- package/esm2020/lib/resources/types/reference.mjs +85 -0
- package/esm2020/lib/resources/types/singleton.mjs +126 -0
- package/esm2020/lib/resources/types/value.mjs +41 -0
- package/esm2020/lib/schema/annotation.mjs +37 -0
- package/esm2020/lib/schema/callable.mjs +62 -0
- package/esm2020/lib/schema/element.mjs +51 -0
- package/esm2020/lib/schema/entity-container.mjs +9 -0
- package/esm2020/lib/schema/entity-set.mjs +9 -0
- package/esm2020/lib/schema/enum-type.mjs +71 -0
- package/{esm2015/lib/schema/index.js → esm2020/lib/schema/index.mjs} +0 -0
- package/esm2020/lib/schema/parsers/callable.mjs +113 -0
- package/{esm2015/lib/schema/parsers/edm.js → esm2020/lib/schema/parsers/edm.mjs} +2 -2
- package/esm2020/lib/schema/parsers/enum-type.mjs +107 -0
- package/{esm2015/lib/schema/parsers/index.js → esm2020/lib/schema/parsers/index.mjs} +0 -0
- package/esm2020/lib/schema/parsers/structured-type.mjs +412 -0
- package/esm2020/lib/schema/schema.mjs +61 -0
- package/esm2020/lib/schema/structured-type.mjs +198 -0
- package/esm2020/lib/services/base.mjs +29 -0
- package/esm2020/lib/services/entity-set.mjs +143 -0
- package/esm2020/lib/services/entity.mjs +12 -0
- package/{esm2015/lib/services/factory.js → esm2020/lib/services/factory.mjs} +3 -3
- package/{esm2015/lib/services/index.js → esm2020/lib/services/index.mjs} +0 -0
- package/{esm2015/lib/services/singleton.js → esm2020/lib/services/singleton.mjs} +1 -1
- package/{esm2015/lib/settings.js → esm2020/lib/settings.mjs} +1 -1
- package/{esm2015/lib/tokens.js → esm2020/lib/tokens.mjs} +0 -0
- package/esm2020/lib/types.mjs +37 -0
- package/{esm2015/lib/utils/arraybuffers.js → esm2020/lib/utils/arraybuffers.mjs} +0 -0
- package/{esm2015/lib/utils/dates.js → esm2020/lib/utils/dates.mjs} +0 -0
- package/{esm2015/lib/utils/durations.js → esm2020/lib/utils/durations.mjs} +0 -0
- package/{esm2015/lib/utils/enums.js → esm2020/lib/utils/enums.mjs} +0 -0
- package/{esm2015/lib/utils/http.js → esm2020/lib/utils/http.mjs} +0 -0
- package/{esm2015/lib/utils/index.js → esm2020/lib/utils/index.mjs} +0 -0
- package/{esm2015/lib/utils/objects.js → esm2020/lib/utils/objects.mjs} +0 -0
- package/esm2020/lib/utils/odata.mjs +22 -0
- package/{esm2015/lib/utils/strings.js → esm2020/lib/utils/strings.mjs} +0 -0
- package/{esm2015/lib/utils/types.js → esm2020/lib/utils/types.mjs} +0 -0
- package/{esm2015/lib/utils/urls.js → esm2020/lib/utils/urls.mjs} +0 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/fesm2015/{angular-odata.js → angular-odata.mjs} +849 -750
- package/fesm2015/angular-odata.mjs.map +1 -0
- package/fesm2020/angular-odata.mjs +10274 -0
- package/fesm2020/angular-odata.mjs.map +1 -0
- package/lib/api.d.ts +10 -10
- package/lib/cache/cache.d.ts +2 -2
- package/lib/cache/storage.d.ts +1 -1
- package/lib/client.d.ts +3 -3
- package/lib/constants.d.ts +1 -0
- package/lib/models/collection.d.ts +11 -19
- package/lib/models/model.d.ts +22 -18
- package/lib/models/options.d.ts +16 -21
- package/lib/module.d.ts +1 -1
- package/lib/options.d.ts +1 -0
- package/lib/resources/path/segments.d.ts +1 -1
- package/lib/resources/query/expressions.d.ts +37 -27
- package/lib/resources/query/handlers.d.ts +7 -11
- package/lib/resources/query/options.d.ts +2 -2
- package/lib/resources/query/syntax.d.ts +52 -54
- package/lib/resources/request.d.ts +1 -1
- package/lib/resources/resource.d.ts +25 -8
- package/lib/resources/types/action.d.ts +12 -19
- package/lib/resources/types/batch.d.ts +1 -3
- package/lib/resources/types/count.d.ts +5 -4
- package/lib/resources/types/entity-set.d.ts +11 -15
- package/lib/resources/types/entity.d.ts +12 -15
- package/lib/resources/types/function.d.ts +11 -18
- package/lib/resources/types/media.d.ts +6 -5
- package/lib/resources/types/metadata.d.ts +3 -5
- package/lib/resources/types/navigation-property.d.ts +15 -21
- package/lib/resources/types/property.d.ts +13 -19
- package/lib/resources/types/reference.d.ts +39 -6
- package/lib/resources/types/singleton.d.ts +12 -16
- package/lib/resources/types/value.d.ts +9 -5
- package/lib/schema/{base.d.ts → annotation.d.ts} +0 -0
- package/lib/schema/callable.d.ts +2 -18
- package/lib/schema/element.d.ts +39 -0
- package/lib/schema/entity-container.d.ts +2 -12
- package/lib/schema/entity-set.d.ts +2 -18
- package/lib/schema/enum-type.d.ts +2 -26
- package/lib/schema/parsers/enum-type.d.ts +4 -4
- package/lib/schema/parsers/structured-type.d.ts +4 -4
- package/lib/schema/schema.d.ts +2 -2
- package/lib/schema/structured-type.d.ts +8 -26
- package/lib/services/base.d.ts +2 -2
- package/lib/services/entity-set.d.ts +2 -2
- package/lib/services/entity.d.ts +1 -1
- package/lib/services/singleton.d.ts +2 -2
- package/lib/settings.d.ts +5 -5
- package/lib/types.d.ts +1 -0
- package/package.json +21 -8
- package/bundles/angular-odata.umd.js +0 -11861
- package/bundles/angular-odata.umd.js.map +0 -1
- package/esm2015/lib/api.js +0 -296
- package/esm2015/lib/client.js +0 -272
- package/esm2015/lib/helper.js +0 -268
- package/esm2015/lib/models/collection.js +0 -734
- package/esm2015/lib/models/model.js +0 -438
- package/esm2015/lib/models/options.js +0 -942
- package/esm2015/lib/options.js +0 -31
- package/esm2015/lib/resources/path/segments.js +0 -124
- package/esm2015/lib/resources/query/builder.js +0 -591
- package/esm2015/lib/resources/query/expressions.js +0 -194
- package/esm2015/lib/resources/query/handlers.js +0 -192
- package/esm2015/lib/resources/query/options.js +0 -103
- package/esm2015/lib/resources/query/syntax.js +0 -367
- package/esm2015/lib/resources/request.js +0 -168
- package/esm2015/lib/resources/resource.js +0 -243
- package/esm2015/lib/resources/responses/annotations.js +0 -121
- package/esm2015/lib/resources/responses/metadata.js +0 -548
- package/esm2015/lib/resources/types/action.js +0 -105
- package/esm2015/lib/resources/types/batch.js +0 -294
- package/esm2015/lib/resources/types/count.js +0 -33
- package/esm2015/lib/resources/types/entity-set.js +0 -101
- package/esm2015/lib/resources/types/entity.js +0 -137
- package/esm2015/lib/resources/types/function.js +0 -130
- package/esm2015/lib/resources/types/media.js +0 -47
- package/esm2015/lib/resources/types/metadata.js +0 -36
- package/esm2015/lib/resources/types/navigation-property.js +0 -205
- package/esm2015/lib/resources/types/options.js +0 -2
- package/esm2015/lib/resources/types/property.js +0 -151
- package/esm2015/lib/resources/types/reference.js +0 -74
- package/esm2015/lib/resources/types/singleton.js +0 -167
- package/esm2015/lib/resources/types/value.js +0 -35
- package/esm2015/lib/schema/base.js +0 -37
- package/esm2015/lib/schema/callable.js +0 -82
- package/esm2015/lib/schema/entity-container.js +0 -24
- package/esm2015/lib/schema/entity-set.js +0 -35
- package/esm2015/lib/schema/enum-type.js +0 -102
- package/esm2015/lib/schema/parsers/callable.js +0 -107
- package/esm2015/lib/schema/parsers/enum-type.js +0 -107
- package/esm2015/lib/schema/parsers/structured-type.js +0 -392
- package/esm2015/lib/schema/schema.js +0 -52
- package/esm2015/lib/schema/structured-type.js +0 -220
- package/esm2015/lib/services/base.js +0 -23
- package/esm2015/lib/services/entity-set.js +0 -146
- package/esm2015/lib/services/entity.js +0 -12
- package/esm2015/lib/types.js +0 -37
- package/esm2015/lib/utils/odata.js +0 -21
- package/fesm2015/angular-odata.js.map +0 -1
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import type { QueryCustomType } from './builder';
|
|
2
2
|
export interface Renderable {
|
|
3
|
-
render({ aliases, escape, }: {
|
|
3
|
+
render({ aliases, escape, prefix, }: {
|
|
4
4
|
aliases?: QueryCustomType[];
|
|
5
5
|
escape?: boolean;
|
|
6
|
+
prefix?: string;
|
|
6
7
|
}): string;
|
|
7
8
|
toString(): string;
|
|
8
9
|
toJSON(): any;
|
|
9
10
|
}
|
|
10
|
-
export declare type Funcs<T> = (x: ODataSyntax<T>) => Function<T> | Operator<T> | Grouping<T
|
|
11
|
-
export declare
|
|
11
|
+
export declare type Funcs<T> = (x: ODataSyntax<T>) => Function<T> | Operator<T> | Grouping<T>;
|
|
12
|
+
export declare class Field<T extends object> implements ProxyHandler<T> {
|
|
13
|
+
name: string;
|
|
14
|
+
constructor(name?: string);
|
|
15
|
+
static factory<T extends object>(): T;
|
|
16
|
+
get(target: T, p: string | symbol): any;
|
|
17
|
+
}
|
|
12
18
|
export declare class Function<T> implements Renderable {
|
|
13
19
|
protected name: string;
|
|
14
20
|
protected values: any[];
|
|
@@ -21,19 +27,20 @@ export declare class Function<T> implements Renderable {
|
|
|
21
27
|
values: any[];
|
|
22
28
|
normalize: boolean;
|
|
23
29
|
};
|
|
24
|
-
render({ aliases, escape, }: {
|
|
30
|
+
render({ aliases, escape, prefix, }: {
|
|
25
31
|
aliases?: QueryCustomType[];
|
|
26
32
|
escape?: boolean;
|
|
33
|
+
prefix?: string;
|
|
27
34
|
}): string;
|
|
28
35
|
}
|
|
29
36
|
export declare class StringAndCollectionFunctions<T> {
|
|
30
|
-
concat(field:
|
|
31
|
-
contains(field:
|
|
32
|
-
endsWith(field:
|
|
33
|
-
indexOf(field:
|
|
34
|
-
length(value:
|
|
35
|
-
startsWith(field:
|
|
36
|
-
subString(field:
|
|
37
|
+
concat(field: any, value: any, normalize?: boolean): Function<T>;
|
|
38
|
+
contains(field: any, value: any, normalize?: boolean): Function<T>;
|
|
39
|
+
endsWith(field: any, value: any, normalize?: boolean): Function<T>;
|
|
40
|
+
indexOf(field: any, value: any, normalize?: boolean): Function<T>;
|
|
41
|
+
length(value: any, normalize?: boolean): Function<T>;
|
|
42
|
+
startsWith(field: any, value: any, normalize?: boolean): Function<T>;
|
|
43
|
+
subString(field: any, start: number, length?: number): Function<T>;
|
|
37
44
|
}
|
|
38
45
|
export declare class CollectionFunctions<T> {
|
|
39
46
|
hasSubset(s1: T, s2: any): Function<T>;
|
|
@@ -46,20 +53,20 @@ export declare class StringFunctions<T> {
|
|
|
46
53
|
trim(value: T): Function<T>;
|
|
47
54
|
}
|
|
48
55
|
export declare class DateAndTimeFunctions<T> {
|
|
49
|
-
date(value:
|
|
50
|
-
day(value:
|
|
51
|
-
fractionalseconds(value:
|
|
52
|
-
hour(value:
|
|
53
|
-
maxdatetime(value:
|
|
54
|
-
mindatetime(value:
|
|
55
|
-
minute(value:
|
|
56
|
-
month(value:
|
|
56
|
+
date(value: any): Function<T>;
|
|
57
|
+
day(value: any): Function<T>;
|
|
58
|
+
fractionalseconds(value: any): Function<T>;
|
|
59
|
+
hour(value: any): Function<T>;
|
|
60
|
+
maxdatetime(value: any): Function<T>;
|
|
61
|
+
mindatetime(value: any): Function<T>;
|
|
62
|
+
minute(value: any): Function<T>;
|
|
63
|
+
month(value: any): Function<T>;
|
|
57
64
|
now(): Function<T>;
|
|
58
|
-
second(value:
|
|
59
|
-
time(value:
|
|
60
|
-
totaloffsetminutes(value:
|
|
61
|
-
totalseconds(value:
|
|
62
|
-
year(value:
|
|
65
|
+
second(value: any): Function<T>;
|
|
66
|
+
time(value: any): Function<T>;
|
|
67
|
+
totaloffsetminutes(value: any): Function<T>;
|
|
68
|
+
totalseconds(value: any): Function<T>;
|
|
69
|
+
year(value: any): Function<T>;
|
|
63
70
|
}
|
|
64
71
|
export declare class ArithmeticFunctions<T> {
|
|
65
72
|
ceiling(value: T | string): Function<T>;
|
|
@@ -89,9 +96,10 @@ export declare class Operator<T> implements Renderable {
|
|
|
89
96
|
values: any[];
|
|
90
97
|
normalize: boolean;
|
|
91
98
|
};
|
|
92
|
-
render({ aliases, escape, }: {
|
|
99
|
+
render({ aliases, escape, prefix, }: {
|
|
93
100
|
aliases?: QueryCustomType[];
|
|
94
|
-
escape
|
|
101
|
+
escape?: boolean;
|
|
102
|
+
prefix?: string;
|
|
95
103
|
}): string;
|
|
96
104
|
}
|
|
97
105
|
export declare class LogicalOperators<T> {
|
|
@@ -101,8 +109,6 @@ export declare class LogicalOperators<T> {
|
|
|
101
109
|
ge(left: any, right: any, normalize?: boolean): Operator<unknown>;
|
|
102
110
|
lt(left: any, right: any, normalize?: boolean): Operator<unknown>;
|
|
103
111
|
le(left: any, right: any, normalize?: boolean): Operator<unknown>;
|
|
104
|
-
and(left: any, right: any, normalize?: boolean): Operator<unknown>;
|
|
105
|
-
or(left: any, right: any, normalize?: boolean): Operator<unknown>;
|
|
106
112
|
not(value: any, normalize?: boolean): Operator<T>;
|
|
107
113
|
has(left: any, right: any, normalize?: boolean): Operator<unknown>;
|
|
108
114
|
in(left: any, right: any, normalize?: boolean): Operator<unknown>;
|
|
@@ -122,47 +128,39 @@ export declare class Grouping<T> implements Renderable {
|
|
|
122
128
|
toJSON(): {
|
|
123
129
|
group: any;
|
|
124
130
|
};
|
|
125
|
-
render({ aliases, escape, }: {
|
|
126
|
-
aliases?: QueryCustomType[];
|
|
127
|
-
escape: boolean;
|
|
128
|
-
}): string;
|
|
129
|
-
}
|
|
130
|
-
export declare class Navigation<T, N> implements Renderable {
|
|
131
|
-
protected field: T;
|
|
132
|
-
protected value: Field<N>;
|
|
133
|
-
constructor(field: T, value: Field<N>);
|
|
134
|
-
get [Symbol.toStringTag](): string;
|
|
135
|
-
toJSON(): {
|
|
136
|
-
field: T;
|
|
137
|
-
value: Field<N>;
|
|
138
|
-
};
|
|
139
|
-
render({ aliases, escape, }: {
|
|
131
|
+
render({ aliases, escape, prefix, }: {
|
|
140
132
|
aliases?: QueryCustomType[];
|
|
141
|
-
escape
|
|
133
|
+
escape?: boolean;
|
|
134
|
+
prefix?: string;
|
|
142
135
|
}): string;
|
|
143
136
|
}
|
|
144
|
-
export declare class
|
|
137
|
+
export declare class GroupingOperators<T> {
|
|
145
138
|
grouping(value: any): Grouping<unknown>;
|
|
146
|
-
navigation<N>(field: T, value: Field<N>): Navigation<T, N>;
|
|
147
139
|
}
|
|
148
|
-
export declare class Lambda<T>
|
|
140
|
+
export declare class Lambda<T> implements Renderable {
|
|
149
141
|
protected op: string;
|
|
150
142
|
protected values: any[];
|
|
151
|
-
protected
|
|
152
|
-
constructor(op: string, values: any[],
|
|
143
|
+
protected alias?: string | undefined;
|
|
144
|
+
constructor(op: string, values: any[], alias?: string | undefined);
|
|
153
145
|
get [Symbol.toStringTag](): string;
|
|
154
|
-
|
|
146
|
+
toJSON(): {
|
|
147
|
+
op: string;
|
|
148
|
+
values: any[];
|
|
149
|
+
alias: string | undefined;
|
|
150
|
+
};
|
|
151
|
+
render({ aliases, escape, prefix, }: {
|
|
155
152
|
aliases?: QueryCustomType[];
|
|
156
|
-
escape
|
|
153
|
+
escape?: boolean;
|
|
154
|
+
prefix?: string;
|
|
157
155
|
}): string;
|
|
158
156
|
}
|
|
159
157
|
export declare class LambdaOperators<T> {
|
|
160
|
-
any(field: T, value: any): Lambda<unknown>;
|
|
161
|
-
all(field: T, value: any): Lambda<unknown>;
|
|
158
|
+
any(field: T, value: any, alias?: string): Lambda<unknown>;
|
|
159
|
+
all(field: T, value: any, alias?: string): Lambda<unknown>;
|
|
162
160
|
}
|
|
163
161
|
export declare class ODataOperators<T> {
|
|
164
162
|
}
|
|
165
|
-
export interface ODataOperators<T> extends LogicalOperators<T>, ArithmeticOperators<T>,
|
|
163
|
+
export interface ODataOperators<T> extends LogicalOperators<T>, ArithmeticOperators<T>, GroupingOperators<T>, LambdaOperators<T> {
|
|
166
164
|
}
|
|
167
165
|
export declare const operators: ODataOperators<any>;
|
|
168
166
|
export declare class ODataFunctions<T> {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpHeaders, HttpParams } from '@angular/common/http';
|
|
2
2
|
import { ODataApi } from '../api';
|
|
3
|
-
import { ODataResource } from './resource';
|
|
4
3
|
import { QueryOptionNames } from '../types';
|
|
4
|
+
import { ODataResource } from './resource';
|
|
5
5
|
export declare class ODataRequest<T> {
|
|
6
6
|
readonly api: ODataApi;
|
|
7
7
|
readonly observe: 'events' | 'response';
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { ODataApi } from '../api';
|
|
3
|
-
import {
|
|
3
|
+
import { ODataCollection, ODataModel } from '../models';
|
|
4
|
+
import { ODataStructuredType } from '../schema';
|
|
5
|
+
import { ODataSchemaElement } from '../schema/element';
|
|
4
6
|
import { OptionsHelper, QueryOptionNames } from '../types';
|
|
5
7
|
import { ODataPathSegments, ODataPathSegmentsHandler } from './path';
|
|
6
8
|
import { ODataQueryOptions, ODataQueryOptionsHandler, QueryCustomType } from './query';
|
|
9
|
+
import { ODataEntitiesAnnotations, ODataEntityAnnotations } from './responses/index';
|
|
7
10
|
import { ODataOptions } from './types';
|
|
8
11
|
export declare type EntityKey<T> = {
|
|
9
12
|
readonly [P in keyof T]?: T[P];
|
|
10
13
|
} | QueryCustomType | string | number;
|
|
11
|
-
export declare
|
|
14
|
+
export declare class ODataResource<T> {
|
|
12
15
|
api: ODataApi;
|
|
16
|
+
schema?: ODataSchemaElement;
|
|
13
17
|
protected pathSegments: ODataPathSegments;
|
|
14
18
|
protected queryOptions: ODataQueryOptions<T>;
|
|
15
|
-
constructor(api: ODataApi, segments
|
|
19
|
+
constructor(api: ODataApi, { segments, query, schema, }?: {
|
|
20
|
+
segments?: ODataPathSegments;
|
|
21
|
+
query?: ODataQueryOptions<T>;
|
|
22
|
+
schema?: ODataSchemaElement;
|
|
23
|
+
});
|
|
16
24
|
/**
|
|
17
25
|
* @returns string The type of the resource
|
|
18
26
|
*/
|
|
@@ -30,17 +38,26 @@ export declare abstract class ODataResource<T> {
|
|
|
30
38
|
*/
|
|
31
39
|
hasKey(): boolean;
|
|
32
40
|
clearKey(): void | undefined;
|
|
41
|
+
asModel<M extends ODataModel<T>>(entity?: Partial<T> | {
|
|
42
|
+
[name: string]: any;
|
|
43
|
+
}, { annots, reset }?: {
|
|
44
|
+
annots?: ODataEntityAnnotations;
|
|
45
|
+
reset?: boolean;
|
|
46
|
+
}): M;
|
|
47
|
+
asCollection<M extends ODataModel<T>, C extends ODataCollection<T, M>>(entities?: Partial<T>[] | {
|
|
48
|
+
[name: string]: any;
|
|
49
|
+
}[], { annots, reset, }?: {
|
|
50
|
+
annots?: ODataEntitiesAnnotations;
|
|
51
|
+
reset?: boolean;
|
|
52
|
+
}): C;
|
|
33
53
|
isSubtypeOf(other: ODataResource<any>): boolean;
|
|
34
|
-
isParentOf(other: ODataResource<any>): boolean;
|
|
35
|
-
isChildOf(other: ODataResource<any>): boolean;
|
|
36
54
|
isEqualTo(other: ODataResource<any>, test?: 'path' | 'params'): boolean;
|
|
37
55
|
pathAndParams(escape?: boolean): [string, {
|
|
38
56
|
[name: string]: any;
|
|
39
57
|
}];
|
|
40
58
|
endpointUrl(params?: boolean): string;
|
|
41
59
|
toString(): string;
|
|
42
|
-
|
|
43
|
-
abstract schema(): ODataStructuredType<T> | ODataCallable<T> | undefined;
|
|
60
|
+
clone<R extends ODataResource<T>>(): R;
|
|
44
61
|
deserialize(value: any, options?: OptionsHelper): any;
|
|
45
62
|
serialize(value: any, options?: OptionsHelper): any;
|
|
46
63
|
encode(value: any, options?: OptionsHelper): any;
|
|
@@ -64,7 +81,7 @@ export declare abstract class ODataResource<T> {
|
|
|
64
81
|
* @param f Function context for handle the query options
|
|
65
82
|
*/
|
|
66
83
|
query(f: (q: ODataQueryOptionsHandler<T>) => void): this;
|
|
67
|
-
static resolveKey<T>(value: any, schema?: ODataStructuredType<T>
|
|
84
|
+
static resolveKey<T>(value: any, schema?: ODataStructuredType<T>): EntityKey<T> | undefined;
|
|
68
85
|
protected resolveKey(value: any): EntityKey<T> | undefined;
|
|
69
86
|
protected request(method: string, options: ODataOptions & {
|
|
70
87
|
body?: any;
|
|
@@ -1,28 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ODataEntities, ODataEntitiesAnnotations, ODataEntity, ODataEntityAnnotations, ODataProperty } from '../responses';
|
|
3
|
-
import { ODataEntitiesOptions, ODataEntityOptions, ODataNoneOptions, ODataOptions, ODataPropertyOptions } from './options';
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
4
2
|
import { ODataApi } from '../../api';
|
|
3
|
+
import { ODataCollection, ODataModel } from '../../models';
|
|
4
|
+
import { ODataCallable } from '../../schema/callable';
|
|
5
5
|
import { ODataPathSegments } from '../path';
|
|
6
6
|
import { ODataQueryOptions } from '../query';
|
|
7
7
|
import { ODataResource } from '../resource';
|
|
8
|
-
import {
|
|
8
|
+
import { ODataEntities, ODataEntity, ODataProperty } from '../responses';
|
|
9
|
+
import { ODataEntitiesOptions, ODataEntityOptions, ODataNoneOptions, ODataOptions, ODataPropertyOptions } from './options';
|
|
9
10
|
export declare class ODataActionResource<P, R> extends ODataResource<R> {
|
|
10
|
-
static factory<P, R>(api: ODataApi, path
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
static factory<P, R>(api: ODataApi, { path, schema, segments, query, }: {
|
|
12
|
+
path?: string;
|
|
13
|
+
schema?: ODataCallable<R>;
|
|
14
|
+
segments?: ODataPathSegments;
|
|
15
|
+
query?: ODataQueryOptions<R>;
|
|
16
|
+
}): ODataActionResource<P, R>;
|
|
17
|
+
static fromResource<P, R>(resource: ODataResource<any>, path: string): ODataActionResource<P, R>;
|
|
13
18
|
returnType(): string | undefined;
|
|
14
|
-
asModel<M extends ODataModel<R>>(entity: Partial<R> | {
|
|
15
|
-
[name: string]: any;
|
|
16
|
-
}, { annots, reset }?: {
|
|
17
|
-
annots?: ODataEntityAnnotations;
|
|
18
|
-
reset?: boolean;
|
|
19
|
-
}): M;
|
|
20
|
-
asCollection<M extends ODataModel<R>, C extends ODataCollection<R, M>>(entities: Partial<R>[] | {
|
|
21
|
-
[name: string]: any;
|
|
22
|
-
}[], { annots, reset, }?: {
|
|
23
|
-
annots?: ODataEntitiesAnnotations;
|
|
24
|
-
reset?: boolean;
|
|
25
|
-
}): C;
|
|
26
19
|
protected post(params: P | null, options?: ODataEntityOptions & ODataEntitiesOptions & ODataPropertyOptions): Observable<any>;
|
|
27
20
|
/**
|
|
28
21
|
* Execute the action
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Observable, Subject } from 'rxjs';
|
|
2
2
|
import { ODataApi } from '../../api';
|
|
3
|
-
import { ODataOptions } from './options';
|
|
4
3
|
import { ODataRequest } from '../request';
|
|
5
4
|
import { ODataResource } from '../resource';
|
|
6
5
|
import { ODataResponse } from '../responses';
|
|
6
|
+
import { ODataOptions } from './options';
|
|
7
7
|
export declare class ODataBatchRequest<T> extends Subject<ODataResponse<T>> {
|
|
8
8
|
request: ODataRequest<any>;
|
|
9
9
|
constructor(request: ODataRequest<any>);
|
|
@@ -25,8 +25,6 @@ export declare class ODataBatchResource extends ODataResource<any> {
|
|
|
25
25
|
private _requests;
|
|
26
26
|
requests(): ODataRequest<any>[];
|
|
27
27
|
static factory(api: ODataApi): ODataBatchResource;
|
|
28
|
-
clone(): ODataBatchResource;
|
|
29
|
-
schema(): undefined;
|
|
30
28
|
/**
|
|
31
29
|
* Execute the batch request
|
|
32
30
|
* @param ctx The context for the request
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { ODataApi } from '../../api';
|
|
3
|
-
import { ODataOptions } from './options';
|
|
4
3
|
import { ODataPathSegments } from '../path';
|
|
5
4
|
import { ODataQueryOptions } from '../query';
|
|
6
5
|
import { ODataResource } from '../resource';
|
|
6
|
+
import { ODataOptions } from './options';
|
|
7
7
|
export declare class ODataCountResource<T> extends ODataResource<T> {
|
|
8
|
-
static factory<T>(api: ODataApi, segments
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
static factory<T>(api: ODataApi, { segments, query, }: {
|
|
9
|
+
segments: ODataPathSegments;
|
|
10
|
+
query?: ODataQueryOptions<T>;
|
|
11
|
+
}): ODataCountResource<T>;
|
|
11
12
|
protected get(options?: ODataOptions): Observable<number>;
|
|
12
13
|
/**
|
|
13
14
|
* Fetch the count of the set.
|
|
@@ -1,31 +1,27 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import {
|
|
2
|
+
import { ODataApi } from '../../api';
|
|
3
3
|
import { ODataCollection, ODataModel } from '../../models';
|
|
4
|
-
import {
|
|
4
|
+
import { ODataStructuredType } from '../../schema/structured-type';
|
|
5
5
|
import { QueryOptionNames } from '../../types';
|
|
6
|
+
import { ODataQueryOptions } from '../query';
|
|
7
|
+
import { ODataResource } from '../resource';
|
|
8
|
+
import { ODataEntities, ODataEntity } from '../responses';
|
|
6
9
|
import { ODataActionResource } from './action';
|
|
7
|
-
import { ODataApi } from '../../api';
|
|
8
10
|
import { ODataCountResource } from './count';
|
|
9
11
|
import { ODataEntityResource } from './entity';
|
|
10
12
|
import { ODataFunctionResource } from './function';
|
|
11
13
|
import { ODataOptions } from './options';
|
|
12
|
-
import { ODataPathSegments } from '../path';
|
|
13
|
-
import { ODataQueryOptions } from '../query';
|
|
14
14
|
export declare class ODataEntitySetResource<T> extends ODataResource<T> {
|
|
15
|
-
static factory<E>(api: ODataApi, path
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}[], { annots, reset, }?: {
|
|
21
|
-
annots?: ODataEntitiesAnnotations;
|
|
22
|
-
reset?: boolean;
|
|
23
|
-
}): C;
|
|
15
|
+
static factory<E>(api: ODataApi, { path, schema, query, }: {
|
|
16
|
+
path: string;
|
|
17
|
+
schema?: ODataStructuredType<E>;
|
|
18
|
+
query?: ODataQueryOptions<E>;
|
|
19
|
+
}): ODataEntitySetResource<E>;
|
|
24
20
|
entity(key?: any): ODataEntityResource<T>;
|
|
25
|
-
cast<C>(type: string): ODataEntitySetResource<C>;
|
|
26
21
|
action<P, R>(path: string): ODataActionResource<P, R>;
|
|
27
22
|
function<P, R>(path: string): ODataFunctionResource<P, R>;
|
|
28
23
|
count(): ODataCountResource<T>;
|
|
24
|
+
cast<C>(type: string): ODataEntitySetResource<C>;
|
|
29
25
|
protected post(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
30
26
|
protected get(options?: ODataOptions & {
|
|
31
27
|
withCount?: boolean;
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
import { ODataResource } from '../resource';
|
|
2
|
-
import { ODataEntity, ODataEntityAnnotations } from '../responses';
|
|
3
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import { ODataApi } from '../../api';
|
|
3
|
+
import { ODataModel } from '../../models';
|
|
4
|
+
import { ODataStructuredType } from '../../schema/structured-type';
|
|
4
5
|
import { QueryOptionNames } from '../../types';
|
|
6
|
+
import { ODataPathSegments } from '../path';
|
|
7
|
+
import { ODataQueryOptions } from '../query';
|
|
8
|
+
import { ODataResource } from '../resource';
|
|
9
|
+
import { ODataEntity } from '../responses/types';
|
|
5
10
|
import { ODataActionResource } from './action';
|
|
6
|
-
import { ODataApi } from '../../api';
|
|
7
11
|
import { ODataFunctionResource } from './function';
|
|
8
12
|
import { ODataMediaResource } from './media';
|
|
9
|
-
import { ODataModel } from '../../models';
|
|
10
13
|
import { ODataNavigationPropertyResource } from './navigation-property';
|
|
11
14
|
import { ODataOptions } from './options';
|
|
12
|
-
import { ODataPathSegments } from '../path';
|
|
13
15
|
import { ODataPropertyResource } from './property';
|
|
14
|
-
import { ODataQueryOptions } from '../query';
|
|
15
16
|
export declare class ODataEntityResource<T> extends ODataResource<T> {
|
|
16
|
-
static factory<E>(api: ODataApi, segments
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}, { annots, reset }?: {
|
|
22
|
-
annots?: ODataEntityAnnotations;
|
|
23
|
-
reset?: boolean;
|
|
24
|
-
}): M;
|
|
17
|
+
static factory<E>(api: ODataApi, { schema, segments, query, }: {
|
|
18
|
+
schema?: ODataStructuredType<E>;
|
|
19
|
+
segments: ODataPathSegments;
|
|
20
|
+
query?: ODataQueryOptions<E>;
|
|
21
|
+
}): ODataEntityResource<E>;
|
|
25
22
|
key(value: any): ODataEntityResource<T>;
|
|
26
23
|
keys(values: any[]): ODataEntityResource<T>;
|
|
27
24
|
media(): ODataMediaResource;
|
|
@@ -1,29 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ODataEntitiesOptions, ODataEntityOptions, ODataNoneOptions, ODataOptions, ODataPropertyOptions } from './options';
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
3
2
|
import { ODataApi } from '../../api';
|
|
4
3
|
import { ODataCollection } from '../../models/collection';
|
|
5
4
|
import { ODataModel } from '../../models/model';
|
|
5
|
+
import { ODataCallable } from '../../schema/callable';
|
|
6
6
|
import { ODataPathSegments } from '../path';
|
|
7
7
|
import { ODataQueryOptions } from '../query';
|
|
8
8
|
import { ODataResource } from '../resource';
|
|
9
|
-
import {
|
|
9
|
+
import { ODataEntities, ODataEntity, ODataProperty } from '../responses';
|
|
10
|
+
import { ODataEntitiesOptions, ODataEntityOptions, ODataNoneOptions, ODataOptions, ODataPropertyOptions } from './options';
|
|
10
11
|
export declare class ODataFunctionResource<P, R> extends ODataResource<R> {
|
|
11
|
-
static factory<P, R>(api: ODataApi, path
|
|
12
|
-
|
|
12
|
+
static factory<P, R>(api: ODataApi, { path, schema, segments, query, }: {
|
|
13
|
+
path?: string;
|
|
14
|
+
schema?: ODataCallable<R>;
|
|
15
|
+
segments?: ODataPathSegments;
|
|
16
|
+
query?: ODataQueryOptions<R>;
|
|
17
|
+
}): ODataFunctionResource<P, R>;
|
|
18
|
+
static fromResource<P, R>(resource: ODataResource<any>, path: string): ODataFunctionResource<P, R>;
|
|
13
19
|
returnType(): string | undefined;
|
|
14
|
-
schema(): import("angular-odata").ODataCallable<R> | undefined;
|
|
15
|
-
asModel<M extends ODataModel<R>>(entity: Partial<R> | {
|
|
16
|
-
[name: string]: any;
|
|
17
|
-
}, { annots, reset }?: {
|
|
18
|
-
annots?: ODataEntityAnnotations;
|
|
19
|
-
reset?: boolean;
|
|
20
|
-
}): M;
|
|
21
|
-
asCollection<M extends ODataModel<R>, C extends ODataCollection<R, M>>(entities: Partial<R>[] | {
|
|
22
|
-
[name: string]: any;
|
|
23
|
-
}[], { annots, reset, }?: {
|
|
24
|
-
annots?: ODataEntitiesAnnotations;
|
|
25
|
-
reset?: boolean;
|
|
26
|
-
}): C;
|
|
27
20
|
parameters(params: P | null, { alias }?: {
|
|
28
21
|
alias?: boolean;
|
|
29
22
|
}): ODataFunctionResource<P, R>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
1
2
|
import { ODataApi } from '../../api';
|
|
2
|
-
import { ODataOptions } from './options';
|
|
3
3
|
import { ODataPathSegments } from '../path';
|
|
4
4
|
import { ODataQueryOptions } from '../query';
|
|
5
5
|
import { ODataResource } from '../resource';
|
|
6
|
-
import {
|
|
6
|
+
import { ODataOptions } from './options';
|
|
7
7
|
export declare class ODataMediaResource extends ODataResource<any> {
|
|
8
|
-
static factory<V>(api: ODataApi, segments
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
static factory<V>(api: ODataApi, { segments, query, }: {
|
|
9
|
+
segments: ODataPathSegments;
|
|
10
|
+
query?: ODataQueryOptions<V>;
|
|
11
|
+
}): ODataMediaResource;
|
|
11
12
|
protected get(options: {
|
|
12
13
|
responseType: any;
|
|
13
14
|
} & ODataOptions): Observable<any>;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
1
2
|
import { ODataApi } from '../../api';
|
|
2
|
-
import { ODataMetadata } from '../responses';
|
|
3
|
-
import { ODataOptions } from './options';
|
|
4
3
|
import { ODataPathSegments } from '../path';
|
|
5
4
|
import { ODataResource } from '../resource';
|
|
6
|
-
import {
|
|
5
|
+
import { ODataMetadata } from '../responses';
|
|
6
|
+
import { ODataOptions } from './options';
|
|
7
7
|
export declare class ODataMetadataResource extends ODataResource<any> {
|
|
8
8
|
constructor(api: ODataApi, segments?: ODataPathSegments);
|
|
9
9
|
static factory(api: ODataApi): ODataMetadataResource;
|
|
10
|
-
clone(): ODataMetadataResource;
|
|
11
|
-
schema(): undefined;
|
|
12
10
|
protected get(options?: ODataOptions): Observable<ODataMetadata>;
|
|
13
11
|
fetch(options?: ODataOptions): Observable<ODataMetadata>;
|
|
14
12
|
}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import {
|
|
2
|
+
import { ODataApi } from '../../api';
|
|
3
3
|
import { ODataCollection, ODataModel } from '../../models';
|
|
4
|
-
import {
|
|
5
|
-
import { ODataEntitiesOptions, ODataEntityOptions, ODataOptions } from './options';
|
|
4
|
+
import { ODataStructuredType } from '../../schema';
|
|
6
5
|
import { QueryOptionNames } from '../../types';
|
|
7
|
-
import {
|
|
6
|
+
import { ODataPathSegments } from '../path';
|
|
7
|
+
import { ODataQueryOptions } from '../query';
|
|
8
|
+
import { ODataResource } from '../resource';
|
|
9
|
+
import { ODataEntities, ODataEntity } from '../responses';
|
|
8
10
|
import { ODataCountResource } from './count';
|
|
9
11
|
import { ODataMediaResource } from './media';
|
|
10
|
-
import {
|
|
12
|
+
import { ODataEntitiesOptions, ODataEntityOptions, ODataOptions } from './options';
|
|
11
13
|
import { ODataPropertyResource } from './property';
|
|
12
|
-
import { ODataQueryOptions } from '../query';
|
|
13
14
|
import { ODataReferenceResource } from './reference';
|
|
14
15
|
/**
|
|
15
16
|
* OData Navigation Property Resource
|
|
@@ -17,21 +18,14 @@ import { ODataReferenceResource } from './reference';
|
|
|
17
18
|
* https://www.odata.org/getting-started/advanced-tutorial/#derived
|
|
18
19
|
*/
|
|
19
20
|
export declare class ODataNavigationPropertyResource<T> extends ODataResource<T> {
|
|
20
|
-
static factory<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}): M;
|
|
29
|
-
asCollection<M extends ODataModel<T>, C extends ODataCollection<T, M>>(entities: Partial<T>[] | {
|
|
30
|
-
[name: string]: any;
|
|
31
|
-
}[], { annots, reset, }?: {
|
|
32
|
-
annots?: ODataEntitiesAnnotations;
|
|
33
|
-
reset?: boolean;
|
|
34
|
-
}): C;
|
|
21
|
+
static factory<N>(api: ODataApi, { path, type, schema, segments, query, }: {
|
|
22
|
+
path: string;
|
|
23
|
+
type?: string;
|
|
24
|
+
schema?: ODataStructuredType<N>;
|
|
25
|
+
segments: ODataPathSegments;
|
|
26
|
+
query?: ODataQueryOptions<N>;
|
|
27
|
+
}): ODataNavigationPropertyResource<N>;
|
|
28
|
+
static fromResource<N>(resource: ODataResource<any>, path: string): ODataNavigationPropertyResource<N>;
|
|
35
29
|
key(value: any): ODataNavigationPropertyResource<T>;
|
|
36
30
|
keys(values: any[]): ODataNavigationPropertyResource<T>;
|
|
37
31
|
media(): ODataMediaResource;
|
|
@@ -1,28 +1,22 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { ODataResource } from '../resource';
|
|
3
|
-
import { ODataCollection, ODataModel } from '../../models';
|
|
4
|
-
import { ODataEntities, ODataEntitiesAnnotations, ODataEntity, ODataEntityAnnotations, ODataProperty } from '../responses';
|
|
5
|
-
import { ODataEntitiesOptions, ODataEntityOptions, ODataOptions, ODataPropertyOptions } from './options';
|
|
6
2
|
import { ODataApi } from '../../api';
|
|
3
|
+
import { ODataCollection, ODataModel } from '../../models';
|
|
4
|
+
import { ODataStructuredType } from '../../schema';
|
|
7
5
|
import { ODataPathSegments } from '../path';
|
|
8
6
|
import { ODataQueryOptions } from '../query';
|
|
7
|
+
import { ODataResource } from '../resource';
|
|
8
|
+
import { ODataEntities, ODataEntity, ODataProperty } from '../responses';
|
|
9
|
+
import { ODataEntitiesOptions, ODataEntityOptions, ODataOptions, ODataPropertyOptions } from './options';
|
|
9
10
|
import { ODataValueResource } from './value';
|
|
10
11
|
export declare class ODataPropertyResource<T> extends ODataResource<T> {
|
|
11
|
-
static factory<P>(api: ODataApi, path
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}): M;
|
|
20
|
-
asCollection<M extends ODataModel<T>, C extends ODataCollection<T, M>>(entities: Partial<T>[] | {
|
|
21
|
-
[name: string]: any;
|
|
22
|
-
}[], { annots, reset, }?: {
|
|
23
|
-
annots?: ODataEntitiesAnnotations;
|
|
24
|
-
reset?: boolean;
|
|
25
|
-
}): C;
|
|
12
|
+
static factory<P>(api: ODataApi, { path, type, schema, segments, query, }: {
|
|
13
|
+
path: string;
|
|
14
|
+
type?: string;
|
|
15
|
+
schema?: ODataStructuredType<P>;
|
|
16
|
+
segments: ODataPathSegments;
|
|
17
|
+
query?: ODataQueryOptions<P>;
|
|
18
|
+
}): ODataPropertyResource<P>;
|
|
19
|
+
static fromResource<N>(resource: ODataResource<any>, path: string): ODataPropertyResource<N>;
|
|
26
20
|
key(value: any): ODataPropertyResource<T>;
|
|
27
21
|
keys(values: any[]): ODataPropertyResource<T>;
|
|
28
22
|
value(): ODataValueResource<T>;
|