angular-odata 0.131.0 → 0.140.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.
Files changed (139) hide show
  1. package/fesm2022/angular-odata.mjs +276 -543
  2. package/fesm2022/angular-odata.mjs.map +1 -1
  3. package/index.d.ts +6403 -3
  4. package/package.json +3 -3
  5. package/schematics/apigen/angular/base.js +2 -6
  6. package/schematics/apigen/angular/base.js.map +1 -1
  7. package/schematics/apigen/angular/entity.js +1 -2
  8. package/schematics/apigen/angular/entity.js.map +1 -1
  9. package/schematics/apigen/index.js +2 -6
  10. package/schematics/apigen/index.js.map +1 -1
  11. package/schematics/apigen/metadata/csdl/csdl-annotation.js +1 -2
  12. package/schematics/apigen/metadata/csdl/csdl-annotation.js.map +1 -1
  13. package/schematics/apigen/metadata/csdl/csdl-entity-container.js.map +1 -1
  14. package/schematics/apigen/metadata/csdl/csdl-entity-set.js.map +1 -1
  15. package/schematics/apigen/metadata/csdl/csdl-enum-type.d.ts +1 -1
  16. package/schematics/apigen/metadata/csdl/csdl-enum-type.js +1 -1
  17. package/schematics/apigen/metadata/csdl/csdl-enum-type.js.map +1 -1
  18. package/schematics/apigen/metadata/csdl/csdl-function-action.d.ts +1 -1
  19. package/schematics/apigen/metadata/csdl/csdl-reference.js +1 -2
  20. package/schematics/apigen/metadata/csdl/csdl-reference.js.map +1 -1
  21. package/schematics/apigen/metadata/csdl/csdl-schema.js +1 -2
  22. package/schematics/apigen/metadata/csdl/csdl-schema.js.map +1 -1
  23. package/schematics/apigen/metadata/csdl/csdl-singleton.js.map +1 -1
  24. package/schematics/apigen/metadata/csdl/csdl-structural-property.d.ts +1 -1
  25. package/schematics/apigen/metadata/csdl/csdl-structural-property.js +2 -3
  26. package/schematics/apigen/metadata/csdl/csdl-structural-property.js.map +1 -1
  27. package/schematics/apigen/metadata/csdl/csdl-structured-type.d.ts +1 -1
  28. package/schematics/apigen/metadata/csdl/csdl-structured-type.js +1 -2
  29. package/schematics/apigen/metadata/csdl/csdl-structured-type.js.map +1 -1
  30. package/schematics/apigen/metadata/parser.js +1 -3
  31. package/schematics/apigen/metadata/parser.js.map +1 -1
  32. package/schematics/apigen/utils.js +2 -4
  33. package/schematics/apigen/utils.js.map +1 -1
  34. package/lib/annotations.d.ts +0 -75
  35. package/lib/api.d.ts +0 -107
  36. package/lib/cache/cache.d.ts +0 -104
  37. package/lib/cache/index.d.ts +0 -3
  38. package/lib/cache/memory.d.ts +0 -19
  39. package/lib/cache/storage.d.ts +0 -35
  40. package/lib/client.d.ts +0 -613
  41. package/lib/constants.d.ts +0 -70
  42. package/lib/helper.d.ts +0 -75
  43. package/lib/index.d.ts +0 -14
  44. package/lib/loaders.d.ts +0 -21
  45. package/lib/metadata/csdl/csdl-annotation.d.ts +0 -159
  46. package/lib/metadata/csdl/csdl-entity-container.d.ts +0 -31
  47. package/lib/metadata/csdl/csdl-entity-set.d.ts +0 -25
  48. package/lib/metadata/csdl/csdl-enum-type.d.ts +0 -37
  49. package/lib/metadata/csdl/csdl-function-action.d.ts +0 -148
  50. package/lib/metadata/csdl/csdl-navigation-property-binding.d.ts +0 -12
  51. package/lib/metadata/csdl/csdl-reference.d.ts +0 -53
  52. package/lib/metadata/csdl/csdl-schema.d.ts +0 -37
  53. package/lib/metadata/csdl/csdl-singleton.d.ts +0 -21
  54. package/lib/metadata/csdl/csdl-structural-property.d.ts +0 -86
  55. package/lib/metadata/csdl/csdl-structured-type.d.ts +0 -94
  56. package/lib/metadata/csdl/csdl-type-definition.d.ts +0 -25
  57. package/lib/metadata/index.d.ts +0 -2
  58. package/lib/metadata/metadata.d.ts +0 -23
  59. package/lib/metadata/parser.d.ts +0 -110
  60. package/lib/models/collection.d.ts +0 -183
  61. package/lib/models/index.d.ts +0 -3
  62. package/lib/models/model.d.ts +0 -176
  63. package/lib/models/options.d.ts +0 -368
  64. package/lib/module.d.ts +0 -19
  65. package/lib/options.d.ts +0 -101
  66. package/lib/resources/index.d.ts +0 -6
  67. package/lib/resources/options.d.ts +0 -18
  68. package/lib/resources/path/handlers.d.ts +0 -29
  69. package/lib/resources/path/index.d.ts +0 -2
  70. package/lib/resources/path/segments.d.ts +0 -54
  71. package/lib/resources/query/builder.d.ts +0 -103
  72. package/lib/resources/query/expressions/apply.d.ts +0 -125
  73. package/lib/resources/query/expressions/base.d.ts +0 -25
  74. package/lib/resources/query/expressions/compute.d.ts +0 -39
  75. package/lib/resources/query/expressions/count.d.ts +0 -58
  76. package/lib/resources/query/expressions/expand.d.ts +0 -69
  77. package/lib/resources/query/expressions/filter.d.ts +0 -77
  78. package/lib/resources/query/expressions/index.d.ts +0 -9
  79. package/lib/resources/query/expressions/orderby.d.ts +0 -55
  80. package/lib/resources/query/expressions/search.d.ts +0 -63
  81. package/lib/resources/query/expressions/select.d.ts +0 -34
  82. package/lib/resources/query/expressions/syntax.d.ts +0 -313
  83. package/lib/resources/query/handlers.d.ts +0 -270
  84. package/lib/resources/query/index.d.ts +0 -4
  85. package/lib/resources/query/options.d.ts +0 -60
  86. package/lib/resources/request.d.ts +0 -64
  87. package/lib/resources/resource.d.ts +0 -161
  88. package/lib/resources/response.d.ts +0 -82
  89. package/lib/resources/types/action.d.ts +0 -84
  90. package/lib/resources/types/batch.d.ts +0 -62
  91. package/lib/resources/types/count.d.ts +0 -20
  92. package/lib/resources/types/entity-set.d.ts +0 -79
  93. package/lib/resources/types/entity.d.ts +0 -54
  94. package/lib/resources/types/function.d.ts +0 -108
  95. package/lib/resources/types/index.d.ts +0 -14
  96. package/lib/resources/types/media.d.ts +0 -28
  97. package/lib/resources/types/metadata.d.ts +0 -13
  98. package/lib/resources/types/navigation-property.d.ts +0 -157
  99. package/lib/resources/types/options.d.ts +0 -32
  100. package/lib/resources/types/property.d.ts +0 -115
  101. package/lib/resources/types/reference.d.ts +0 -74
  102. package/lib/resources/types/singleton.d.ts +0 -87
  103. package/lib/resources/types/value.d.ts +0 -19
  104. package/lib/schema/annotation.d.ts +0 -28
  105. package/lib/schema/callable.d.ts +0 -41
  106. package/lib/schema/element.d.ts +0 -52
  107. package/lib/schema/entity-container.d.ts +0 -10
  108. package/lib/schema/entity-set.d.ts +0 -10
  109. package/lib/schema/enum-type.d.ts +0 -55
  110. package/lib/schema/index.d.ts +0 -8
  111. package/lib/schema/parsers/callable.d.ts +0 -47
  112. package/lib/schema/parsers/edm.d.ts +0 -4
  113. package/lib/schema/parsers/enum-type.d.ts +0 -56
  114. package/lib/schema/parsers/index.d.ts +0 -4
  115. package/lib/schema/parsers/structured-type.d.ts +0 -172
  116. package/lib/schema/schema.d.ts +0 -26
  117. package/lib/schema/singleton.d.ts +0 -10
  118. package/lib/schema/structured-type.d.ts +0 -152
  119. package/lib/services/base.d.ts +0 -20
  120. package/lib/services/entity-set.d.ts +0 -120
  121. package/lib/services/entity.d.ts +0 -11
  122. package/lib/services/factory.d.ts +0 -33
  123. package/lib/services/index.d.ts +0 -4
  124. package/lib/services/singleton.d.ts +0 -44
  125. package/lib/settings.d.ts +0 -26
  126. package/lib/types.d.ts +0 -285
  127. package/lib/utils/arraybuffers.d.ts +0 -4
  128. package/lib/utils/arrays.d.ts +0 -3
  129. package/lib/utils/dates.d.ts +0 -3
  130. package/lib/utils/durations.d.ts +0 -14
  131. package/lib/utils/enums.d.ts +0 -23
  132. package/lib/utils/http.d.ts +0 -22
  133. package/lib/utils/index.d.ts +0 -9
  134. package/lib/utils/objects.d.ts +0 -37
  135. package/lib/utils/odata.d.ts +0 -4
  136. package/lib/utils/strings.d.ts +0 -7
  137. package/lib/utils/types.d.ts +0 -11
  138. package/lib/utils/urls.d.ts +0 -4
  139. package/public-api.d.ts +0 -1
@@ -1,63 +0,0 @@
1
- import { Parser, ParserOptions } from '../../../types';
2
- import { QueryCustomType } from '../builder';
3
- import { Expression } from './base';
4
- import { Renderable } from './syntax';
5
- export type SearchConnector = 'AND' | 'OR';
6
- export declare class SearchTerm implements Renderable {
7
- protected value: string;
8
- constructor(value: string);
9
- get [Symbol.toStringTag](): string;
10
- toJson(): {
11
- $type: string;
12
- value: string;
13
- };
14
- render({ aliases, escape, prefix, parser, options, }: {
15
- aliases?: QueryCustomType[];
16
- escape?: boolean;
17
- prefix?: string;
18
- parser?: Parser<any>;
19
- options?: ParserOptions;
20
- }): string;
21
- clone(): SearchTerm;
22
- resolve(parser: any): any;
23
- }
24
- export type SearchExpressionBuilder<T> = {
25
- e: (connector?: SearchConnector) => SearchExpression<T>;
26
- };
27
- export declare class SearchExpression<T> extends Expression<T> {
28
- private _connector;
29
- private _negated;
30
- constructor({ children, connector, negated, }?: {
31
- children?: Renderable[];
32
- connector?: SearchConnector;
33
- negated?: boolean;
34
- });
35
- get [Symbol.toStringTag](): string;
36
- static factory<T>(opts: (builder: SearchExpressionBuilder<T>, current: SearchExpression<T>) => SearchExpression<T>, current?: SearchExpression<T>): SearchExpression<T>;
37
- private _add;
38
- render({ aliases, escape, prefix, parser, options, }?: {
39
- aliases?: QueryCustomType[];
40
- escape?: boolean;
41
- prefix?: string;
42
- parser?: Parser<T>;
43
- options?: ParserOptions;
44
- }): string;
45
- clone(): SearchExpression<T>;
46
- toJson(): {
47
- $type: string;
48
- children: any[];
49
- } & {
50
- connector: SearchConnector;
51
- negated: boolean;
52
- };
53
- static fromJson<T>(json: {
54
- [name: string]: any;
55
- }): SearchExpression<T>;
56
- connector(): SearchConnector;
57
- negated(): boolean;
58
- or(exp: SearchExpression<T>): SearchExpression<T>;
59
- and(exp: SearchExpression<T>): SearchExpression<T>;
60
- not(exp: SearchExpression<T>): SearchExpression<T>;
61
- term(value: any): SearchExpression<T>;
62
- combine(expression: SearchExpression<T>, connector?: SearchConnector): SearchExpression<T>;
63
- }
@@ -1,34 +0,0 @@
1
- import { Parser, ParserOptions } from '../../../types';
2
- import { QueryCustomType } from '../builder';
3
- import { Expression } from './base';
4
- import { Renderable } from './syntax';
5
- export type SelectExpressionBuilder<T> = {
6
- t: Required<T>;
7
- e: () => SelectExpression<T>;
8
- };
9
- export declare class SelectExpression<T> extends Expression<T> {
10
- constructor({ children, }?: {
11
- children?: Renderable[];
12
- });
13
- get [Symbol.toStringTag](): string;
14
- static factory<T>(opts: (builder: SelectExpressionBuilder<T>, current: SelectExpression<T>) => SelectExpression<T>, current?: SelectExpression<T>): SelectExpression<T>;
15
- toJson(): {
16
- $type: string;
17
- children: any[];
18
- };
19
- static fromJson<T>(json: {
20
- [name: string]: any;
21
- }): SelectExpression<T>;
22
- render({ aliases, escape, prefix, parser, options, }?: {
23
- aliases?: QueryCustomType[];
24
- escape?: boolean;
25
- prefix?: string;
26
- parser?: Parser<T>;
27
- options?: ParserOptions;
28
- }): string;
29
- clone(): SelectExpression<T>;
30
- private _add;
31
- field(field: any): SelectExpression<T>;
32
- fields(...fields: any[]): SelectExpression<T>;
33
- combine(expression: SelectExpression<T>): SelectExpression<T>;
34
- }
@@ -1,313 +0,0 @@
1
- import { Parser, ParserOptions } from '../../../types';
2
- import { QueryCustomType } from '../builder';
3
- export type Normalize = 'all' | 'right' | 'left' | 'none';
4
- export interface Renderable {
5
- render({ aliases, escape, prefix, parser, options, }: {
6
- aliases?: QueryCustomType[];
7
- escape?: boolean;
8
- prefix?: string;
9
- parser?: Parser<any>;
10
- options?: ParserOptions;
11
- }): string;
12
- toJson(): any;
13
- clone(): any;
14
- resolve(parser: any): any;
15
- }
16
- export declare const FieldFactory: <T extends object>(names?: (string | Renderable)[]) => any;
17
- export declare const RenderableFactory: (value: any) => Renderable;
18
- export declare function render(value: any, { aliases, normalize, escape, prefix, parser, options, }?: {
19
- aliases?: QueryCustomType[];
20
- normalize?: boolean;
21
- escape?: boolean;
22
- prefix?: string;
23
- parser?: Parser<any>;
24
- options?: ParserOptions;
25
- }): string | number | boolean | null;
26
- export declare function resolve(values: any, parser?: Parser<any>): any;
27
- export declare function encode(values: any, parser?: Parser<any>, options?: ParserOptions): any;
28
- export declare class Function<T> implements Renderable {
29
- protected name: string;
30
- protected values: any[];
31
- protected normalize: Normalize;
32
- protected escape: boolean;
33
- constructor(name: string, values: any[], normalize: Normalize, escape?: boolean);
34
- get [Symbol.toStringTag](): string;
35
- toJson(): {
36
- $type: string;
37
- name: string;
38
- values: any[];
39
- normalize: Normalize;
40
- };
41
- static fromJson<T>(json: {
42
- [name: string]: any;
43
- }): Function<T>;
44
- render({ aliases, escape, prefix, parser, options, }: {
45
- aliases?: QueryCustomType[];
46
- escape?: boolean;
47
- prefix?: string;
48
- parser?: Parser<T>;
49
- options?: ParserOptions;
50
- }): string;
51
- clone(): Function<T>;
52
- resolve(parser: any): any;
53
- }
54
- export declare class StringAndCollectionFunctions<T> {
55
- concat(left: any, right: any, normalize?: Normalize): Function<T>;
56
- contains(left: any, right: any, normalize?: Normalize): Function<T>;
57
- endsWith(left: any, right: any, normalize?: Normalize): Function<T>;
58
- indexOf(left: any, right: any, normalize?: Normalize): Function<T>;
59
- length(left: any, normalize?: Normalize): Function<T>;
60
- startsWith(left: any, right: any, normalize?: Normalize): Function<T>;
61
- subString(left: any, right: number, length?: number, normalize?: Normalize): Function<T>;
62
- }
63
- export declare class CollectionFunctions<T> {
64
- hasSubset(left: T, right: any, normalize?: Normalize): Function<T>;
65
- hasSubsequence(left: T, right: any, normalize?: Normalize): Function<T>;
66
- }
67
- export declare class StringFunctions<T> {
68
- matchesPattern(left: any | string, pattern: string, normalize?: Normalize): Function<T>;
69
- toLower(left: any, normalize?: Normalize): Function<T>;
70
- toUpper(left: any, normalize?: Normalize): Function<T>;
71
- trim(left: any, normalize?: Normalize): Function<T>;
72
- }
73
- export declare class DateAndTimeFunctions<T> {
74
- date(left: any, normalize?: Normalize): Function<T>;
75
- day(left: any, normalize?: Normalize): Function<T>;
76
- fractionalseconds(left: any, normalize?: Normalize): Function<T>;
77
- hour(left: any, normalize?: Normalize): Function<T>;
78
- maxdatetime(left: any, normalize?: Normalize): Function<T>;
79
- mindatetime(left: any, normalize?: Normalize): Function<T>;
80
- minute(left: any, normalize?: Normalize): Function<T>;
81
- month(left: any, normalize?: Normalize): Function<T>;
82
- now(): Function<T>;
83
- second(left: any, normalize?: Normalize): Function<T>;
84
- time(left: any, normalize?: Normalize): Function<T>;
85
- totaloffsetminutes(left: any, normalize?: Normalize): Function<T>;
86
- totalseconds(left: any, normalize?: Normalize): Function<T>;
87
- year(left: any, normalize?: Normalize): Function<T>;
88
- }
89
- export declare class ArithmeticFunctions<T> {
90
- ceiling(left: T | string, normalize?: Normalize): Function<T>;
91
- floor(left: T | string, normalize?: Normalize): Function<T>;
92
- round(left: T | string, normalize?: Normalize): Function<T>;
93
- }
94
- export declare class TypeFunctions<T> {
95
- cast<N>(left: T | string, type?: string): N;
96
- isof(left: T | string, type?: string): Type<T>;
97
- }
98
- export declare class GeoFunctions<T> {
99
- geoDistance(left: T, right: string, normalize?: Normalize): Function<T>;
100
- geoIntersects(left: T, right: string, normalize?: Normalize): Function<T>;
101
- geoLength(left: T, normalize?: Normalize): Function<T>;
102
- }
103
- export declare class ConditionalFunctions<T> {
104
- case(left: T | string, right: any, normalize?: Normalize): Function<T>;
105
- }
106
- export declare class Operator<T> implements Renderable {
107
- protected op: string;
108
- protected values: any[];
109
- protected normalize: Normalize;
110
- constructor(op: string, values: any[], normalize: Normalize);
111
- get [Symbol.toStringTag](): string;
112
- toJson(): {
113
- $type: string;
114
- op: string;
115
- values: any[];
116
- normalize: Normalize;
117
- };
118
- static fromJson<T>(json: {
119
- [name: string]: any;
120
- }): Operator<T>;
121
- render({ aliases, escape, prefix, parser, options, }: {
122
- aliases?: QueryCustomType[];
123
- escape?: boolean;
124
- prefix?: string;
125
- parser?: Parser<T>;
126
- options?: ParserOptions;
127
- }): string;
128
- clone(): Operator<unknown>;
129
- resolve(parser: any): any;
130
- }
131
- export declare class LogicalOperators<T> {
132
- eq(left: any, right: any, normalize?: Normalize): Operator<unknown>;
133
- ne(left: any, right: any, normalize?: Normalize): Operator<unknown>;
134
- gt(left: any, right: any, normalize?: Normalize): Operator<unknown>;
135
- ge(left: any, right: any, normalize?: Normalize): Operator<unknown>;
136
- lt(left: any, right: any, normalize?: Normalize): Operator<unknown>;
137
- le(left: any, right: any, normalize?: Normalize): Operator<unknown>;
138
- not(left: any, normalize?: Normalize): Operator<T>;
139
- has(left: any, right: any, normalize?: Normalize): Operator<unknown>;
140
- in(left: any, right: any, normalize?: Normalize): Operator<unknown>;
141
- }
142
- export declare class ArithmeticOperators<T> {
143
- add(left: any, right: any, normalize?: Normalize): Operator<T>;
144
- sub(left: any, right: any, normalize?: Normalize): Operator<unknown>;
145
- mul(left: any, right: any, normalize?: Normalize): Operator<unknown>;
146
- div(left: any, right: any, normalize?: Normalize): Operator<unknown>;
147
- mod(left: any, right: any, normalize?: Normalize): Operator<unknown>;
148
- neg(value: any, normalize?: Normalize): Operator<unknown>;
149
- }
150
- export declare class Grouping<T> implements Renderable {
151
- protected group: Renderable;
152
- constructor(group: Renderable);
153
- get [Symbol.toStringTag](): string;
154
- toJson(): {
155
- $type: string;
156
- group: any;
157
- };
158
- static fromJson<T>(json: {
159
- [name: string]: any;
160
- }): Grouping<T>;
161
- render({ aliases, escape, prefix, parser, options, }: {
162
- aliases?: QueryCustomType[];
163
- escape?: boolean;
164
- prefix?: string;
165
- parser?: Parser<T>;
166
- options?: ParserOptions;
167
- }): string;
168
- clone(): Grouping<unknown>;
169
- resolve(parser: any): any;
170
- }
171
- export declare class GroupingOperators<T> {
172
- group(value: any): Grouping<T>;
173
- rollup(...values: any): Function<T>;
174
- }
175
- export type AggregateMethod = 'sum' | 'min' | 'max' | 'average' | 'countdistinct';
176
- export declare class Aggregate<T> implements Renderable {
177
- protected value: Renderable;
178
- protected method: AggregateMethod;
179
- protected alias: string;
180
- constructor(value: Renderable, method: AggregateMethod, alias: string);
181
- get [Symbol.toStringTag](): string;
182
- toJson(): {
183
- $type: string;
184
- value: any;
185
- method: AggregateMethod;
186
- alias: string;
187
- };
188
- static fromJson<T>(json: {
189
- [name: string]: any;
190
- }): Aggregate<T>;
191
- render({ aliases, escape, prefix, parser, options, }: {
192
- aliases?: QueryCustomType[];
193
- escape?: boolean;
194
- prefix?: string;
195
- parser?: Parser<T>;
196
- options?: ParserOptions;
197
- }): string;
198
- clone(): Aggregate<unknown>;
199
- resolve(parser: any): any;
200
- }
201
- export declare class GroupBy<T> implements Renderable {
202
- protected properties: Renderable[];
203
- protected transformations?: Renderable | undefined;
204
- constructor(properties: Renderable[], transformations?: Renderable | undefined);
205
- get [Symbol.toStringTag](): string;
206
- toJson(): {
207
- $type: string;
208
- properties: any[];
209
- transformations: any;
210
- };
211
- static fromJson<T>(json: {
212
- [name: string]: any;
213
- }): GroupBy<T>;
214
- render({ aliases, escape, prefix, parser, options, }: {
215
- aliases?: QueryCustomType[];
216
- escape?: boolean;
217
- prefix?: string;
218
- parser?: Parser<T>;
219
- options?: ParserOptions;
220
- }): string;
221
- clone(): GroupBy<unknown>;
222
- resolve(parser: any): any;
223
- }
224
- export declare class Transformations<T> {
225
- aggregate(value: Renderable, method: AggregateMethod, alias: string): Aggregate<T>;
226
- groupby(properties: Renderable[], options?: Renderable): GroupBy<T>;
227
- topCount(value: number, field: Renderable, normalize?: Normalize): Function<T>;
228
- topSum(value: number, field: Renderable, normalize?: Normalize): Function<T>;
229
- topPercent(value: number, field: Renderable, normalize?: Normalize): Function<T>;
230
- bottomCount(value: number, field: Renderable, normalize?: Normalize): Function<T>;
231
- bottomSum(value: number, field: Renderable, normalize?: Normalize): Function<T>;
232
- bottomPercent(value: number, field: Renderable, normalize?: Normalize): Function<T>;
233
- identity(): Function<T>;
234
- search(value: any, normalize?: Normalize): Function<T>;
235
- filter(value: any, normalize?: Normalize): Function<T>;
236
- skip(value: number, normalize?: Normalize): Function<T>;
237
- top(value: number, normalize?: Normalize): Function<T>;
238
- orderby(value: any, normalize?: Normalize): Function<T>;
239
- }
240
- export declare class Type<T> implements Renderable {
241
- protected name: string;
242
- protected type: string;
243
- protected value?: any | undefined;
244
- constructor(name: string, type: string, value?: any | undefined);
245
- get [Symbol.toStringTag](): string;
246
- toJson(): {
247
- $type: string;
248
- name: string;
249
- type: string;
250
- value: any;
251
- };
252
- static fromJson<T>(json: {
253
- [name: string]: any;
254
- }): Type<T>;
255
- render({ aliases, escape, prefix, parser, options, }: {
256
- aliases?: QueryCustomType[];
257
- escape?: boolean;
258
- prefix?: string;
259
- parser?: Parser<T>;
260
- options?: ParserOptions;
261
- }): string;
262
- clone(): Type<unknown>;
263
- resolve(parser: any): any;
264
- }
265
- export declare class Lambda<T> implements Renderable {
266
- protected op: string;
267
- protected values: any[];
268
- protected alias?: string | undefined;
269
- constructor(op: string, values: any[], alias?: string | undefined);
270
- get [Symbol.toStringTag](): string;
271
- toJson(): {
272
- $type: string;
273
- op: string;
274
- values: any[];
275
- alias: string | undefined;
276
- };
277
- static fromJson<T>(json: {
278
- [name: string]: any;
279
- }): Lambda<T>;
280
- render({ aliases, escape, prefix, parser, options, }: {
281
- aliases?: QueryCustomType[];
282
- escape?: boolean;
283
- prefix?: string;
284
- parser?: Parser<T>;
285
- options?: ParserOptions;
286
- }): string;
287
- clone(): Lambda<unknown>;
288
- resolve(parser: any): any;
289
- }
290
- export declare class LambdaOperators<T> {
291
- any(left: T, right: any, alias?: string): Lambda<unknown>;
292
- all(left: T, right: any, alias?: string): Lambda<unknown>;
293
- }
294
- export declare class ODataOperators<T> {
295
- }
296
- export interface ODataOperators<T> extends LogicalOperators<T>, ArithmeticOperators<T>, GroupingOperators<T>, LambdaOperators<T> {
297
- }
298
- export declare const operators: ODataOperators<any>;
299
- export declare class ODataFunctions<T> {
300
- }
301
- export interface ODataFunctions<T> extends StringAndCollectionFunctions<T>, CollectionFunctions<T>, StringFunctions<T>, DateAndTimeFunctions<T>, ArithmeticFunctions<T>, TypeFunctions<T>, GeoFunctions<T>, ConditionalFunctions<T> {
302
- }
303
- export declare const functions: ODataFunctions<any>;
304
- export declare class ODataTransformations<T> {
305
- }
306
- export interface ODataTransformations<T> extends Transformations<T> {
307
- }
308
- export declare const transformations: ODataTransformations<any>;
309
- export declare class ODataSyntax<T> {
310
- }
311
- export interface ODataSyntax<T> extends ODataOperators<T>, ODataFunctions<T>, ODataTransformations<T> {
312
- }
313
- export declare const syntax: ODataSyntax<any>;
@@ -1,270 +0,0 @@
1
- import { Parser, ParserOptions, QueryOption } from '../../types';
2
- import { Expand, Filter, OrderBy, Select, Transform } from './builder';
3
- import { ComputeExpression, ComputeExpressionBuilder, FilterExpression, FilterExpressionBuilder, OrderByExpression, OrderByExpressionBuilder, SearchExpression, SearchExpressionBuilder, ExpandExpression, ExpandExpressionBuilder, SelectExpression, SelectExpressionBuilder, ApplyExpression, ApplyExpressionBuilder } from './expressions';
4
- import { ODataQueryArguments, ODataQueryOptions } from './options';
5
- export declare class ODataQueryOptionHandler<T> {
6
- private o;
7
- private n;
8
- constructor(o: Map<QueryOption, any>, n: QueryOption);
9
- /**
10
- * The name of the managed odata query option.
11
- */
12
- get name(): QueryOption;
13
- /**
14
- * Converts the managed odata query option to a json object.
15
- * @returns {any}
16
- */
17
- toJson(): any;
18
- /**
19
- * Returns a boolean indicating if the managed odata query option is empty.
20
- * @returns True if the managed odata query option is empty.
21
- */
22
- empty(): boolean;
23
- /**
24
- * Get or Set the value of the managed odata query option.
25
- * @param v The value to set.
26
- * @returns
27
- */
28
- value(v?: any): any;
29
- private assertArray;
30
- /**
31
- * Push value to the managed odata query option.
32
- * @param value Value to push
33
- */
34
- push(value: any): void;
35
- /**
36
- * Remove value from the managed odata query option.
37
- * @param value Value to remove
38
- */
39
- remove(value: any): void;
40
- /**
41
- * Return value at index of the managed odata query option.
42
- * @param index Index of the value
43
- * @returns The value
44
- */
45
- at(index: number): any;
46
- some(predicate: (value: any) => boolean): boolean;
47
- every(predicate: (value: any) => boolean): boolean;
48
- find(predicate: (value: any) => boolean): any;
49
- private assertObject;
50
- /**
51
- * Set the value for path in the managed odata query option.
52
- * @param path Path for set the value
53
- * @param value Value to set
54
- */
55
- set(path: string, value: any): void;
56
- /**
57
- * Get the value for path from the managed odata query option.
58
- * @param path The path from get the value
59
- * @param def Default if not found
60
- * @returns
61
- */
62
- get(path: string, def?: any): any;
63
- /**
64
- * Unset the value for path in the managed odata query option.
65
- * @param path
66
- */
67
- unset(path: string): void;
68
- /**
69
- * Test if the managed odata query option has the value.
70
- * @param path The path fot test if the value is set
71
- * @returns Boolean indicating if the value is set
72
- */
73
- has(path: string): boolean;
74
- /**
75
- * Merge values from object into the managed odata query option.
76
- * @param values Object to merge
77
- * @returns
78
- */
79
- assign(values: {
80
- [attr: string]: any;
81
- }): {
82
- [attr: string]: any;
83
- };
84
- /**
85
- * Clear the managed odata query option.
86
- */
87
- clear(): void;
88
- toString({ escape, parser, }?: {
89
- escape?: boolean;
90
- parser?: Parser<T>;
91
- }): string;
92
- }
93
- export declare class ODataQueryOptionsHandler<T> {
94
- protected options: ODataQueryOptions<T>;
95
- constructor(options: ODataQueryOptions<T>);
96
- /**
97
- * Create a raw odata value
98
- * @param value The value to raw
99
- * @returns The raw value
100
- */
101
- raw(value: any): import("angular-odata").QueryCustomType;
102
- /**
103
- * Create a new odata alias parameter
104
- * @link https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_ParameterAliases
105
- * @param value The value of the alias
106
- * @param name The name of the alias
107
- * @returns The alias
108
- */
109
- alias(value: any, name?: string): import("angular-odata").QueryCustomType;
110
- /**
111
- * Create a duration odata value
112
- * @param value The value to duration
113
- * @returns The duration value
114
- */
115
- duration(value: any): import("angular-odata").QueryCustomType;
116
- /**
117
- * Create a binary odata value
118
- * @param value The value to binary
119
- * @returns The binary value
120
- */
121
- binary(value: any): import("angular-odata").QueryCustomType;
122
- /**
123
- * Normalize the given value to a valid odata value
124
- * @param value The value to normalize
125
- * @returns The normalized value
126
- */
127
- normalize(value: any): any;
128
- /**
129
- * Build and return a handler for modifying the $select option.
130
- * If opts is given then set te value as new value for $select.
131
- * @param opts Select<T> value or builder function for SelectExpression<T>
132
- */
133
- select(opts: (builder: SelectExpressionBuilder<T>, current?: SelectExpression<T>) => SelectExpression<T>): SelectExpression<T>;
134
- select(opts: Select<T>): ODataQueryOptionHandler<T>;
135
- select(): ODataQueryOptionHandler<T>;
136
- /**
137
- * Build and return a handler for modifying the $expand option.
138
- * If opts is given then set te value as new value for $expand.
139
- * @param opts Expand<T> value or builder function for ExpandExpression<T>
140
- */
141
- expand(opts: (builder: ExpandExpressionBuilder<T>, current?: ExpandExpression<T>) => ExpandExpression<T>): ExpandExpression<T>;
142
- expand(opts: Expand<T>): ODataQueryOptionHandler<T>;
143
- expand(): ODataQueryOptionHandler<T>;
144
- /**
145
- * Build and return a handler for modifying the $compute option.
146
- * If opts is given then set te value as new value for $compute.
147
- * @link https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_SystemQueryOptioncompute
148
- * @param opts string value or builder function for ComputeExpression<T>
149
- */
150
- compute(opts: (builder: ComputeExpressionBuilder<T>, current?: ComputeExpression<T>) => ComputeExpression<T>): ComputeExpression<T>;
151
- compute(opts: string): ODataQueryOptionHandler<T>;
152
- compute(): ODataQueryOptionHandler<T>;
153
- /**
154
- * Build and return a handler for modifying the $apply option.
155
- * If opts is given then set te value as new value for $compute.
156
- * @link http://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/cs02/odata-data-aggregation-ext-v4.0-cs02.html
157
- * @param opts string value or builder function for ApplyExpression<T>
158
- */
159
- apply(opts: (builder: ApplyExpressionBuilder<T>, current?: ApplyExpression<T>) => ApplyExpression<T>): ApplyExpression<T>;
160
- apply(opts: string): ODataQueryOptionHandler<T>;
161
- apply(): ODataQueryOptionHandler<T>;
162
- /**
163
- * Build and return a handler for modifying the $format option.
164
- * If opts is given then set te value as new value for $format.
165
- * @link https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_SystemQueryOptionformat
166
- * @param opts string value for format
167
- */
168
- format(opts: string): ODataQueryOptionHandler<T>;
169
- format(): ODataQueryOptionHandler<T>;
170
- /**
171
- * Build and return a handler for modifying the $transform option.
172
- * If opts is given then set te value as new value for $transform.
173
- * @param opts string value for transform
174
- */
175
- transform(opts: Transform<T>): ODataQueryOptionHandler<T>;
176
- transform(): ODataQueryOptionHandler<T>;
177
- /**
178
- * Build and return a handler for modifying the $search option.
179
- * If opts is given then set te value as new value for $search.
180
- * @param opts string value or builder function for SearchExpression<T>
181
- */
182
- search(opts: (builder: SearchExpressionBuilder<T>, current?: SearchExpression<T>) => SearchExpression<T>): SearchExpression<T>;
183
- search(opts: string): ODataQueryOptionHandler<T>;
184
- search(): ODataQueryOptionHandler<T>;
185
- /**
186
- * Build and return a handler for modifying the $filter option.
187
- * If opts is given then set te value as new value for $filter.
188
- * @param opts Filter<T> value or builder function for FilterExpression<T>
189
- */
190
- filter(opts: (builder: FilterExpressionBuilder<T>, current?: FilterExpression<T>) => FilterExpression<T>): FilterExpression<T>;
191
- filter(opts: Filter<T>): ODataQueryOptionHandler<T>;
192
- filter(): ODataQueryOptionHandler<T>;
193
- /**
194
- * Build and return a handler for modifying the $orderby option.
195
- * If opts is given then set te value as new value for $orderby.
196
- * @param opts OrderBy<T> value or builder function for OrderByExpression<T>
197
- */
198
- orderBy(opts: (builder: OrderByExpressionBuilder<T>, current?: OrderByExpression<T>) => OrderByExpression<T>): OrderByExpression<T>;
199
- orderBy(opts: OrderBy<T>): ODataQueryOptionHandler<T>;
200
- orderBy(): ODataQueryOptionHandler<T>;
201
- /**
202
- * Build and return a handler for modifying the $top option.
203
- * If opts is given then set te value as new value for $top.
204
- * @param opts number value
205
- */
206
- top(opts: number): ODataQueryOptionHandler<T>;
207
- top(): ODataQueryOptionHandler<T>;
208
- /**
209
- * Build and return a handler for modifying the $skip option.
210
- * If opts is given then set te value as new value for $skip.
211
- * @param opts number value
212
- */
213
- skip(opts: number): ODataQueryOptionHandler<T>;
214
- skip(): ODataQueryOptionHandler<T>;
215
- /**
216
- * Build and return a handler for modifying the $skiptoken option.
217
- * If opts is given then set te value as new value for $skiptoken.
218
- * @param opts string value
219
- */
220
- skiptoken(opts: string): ODataQueryOptionHandler<T>;
221
- skiptoken(): ODataQueryOptionHandler<T>;
222
- remove(...keys: QueryOption[]): void;
223
- keep(...keys: QueryOption[]): void;
224
- /**
225
- * Shortcut for set $top, $skip, $skiptoken.
226
- * @param param0 skip or top or skiptoken
227
- */
228
- paging({ skip, skiptoken, top, }?: {
229
- skip?: number | null;
230
- skiptoken?: string | null;
231
- top?: number | null;
232
- }): void;
233
- /**
234
- * Shortcut for clear pagination by unset $top, $skip, $skiptoken.
235
- */
236
- removePaging(): void;
237
- /**
238
- * Shortcut for clear query.
239
- */
240
- clear(): void;
241
- /**
242
- * Store the query options from the current query.
243
- */
244
- store(): ODataQueryArguments<T>;
245
- /**
246
- * Restore the given query options to the current query.
247
- * @param options The query to be applied.
248
- */
249
- restore(options: ODataQueryArguments<T>): void;
250
- /**
251
- * Combine the given query options with the current query.
252
- * @param options The query to be combined.
253
- */
254
- combine(options: ODataQueryArguments<T>): void;
255
- toJson(): {};
256
- fromJson(json: {
257
- [name: string]: any;
258
- }): void;
259
- toString({ escape, parser, }?: {
260
- escape?: boolean;
261
- parser?: Parser<T>;
262
- }): string;
263
- pathAndParams({ escape, parser, options, }?: {
264
- escape?: boolean;
265
- parser?: Parser<T>;
266
- options?: ParserOptions;
267
- }): [string, {
268
- [name: string]: any;
269
- }];
270
- }
@@ -1,4 +0,0 @@
1
- export * from './builder';
2
- export * from './options';
3
- export * from './handlers';
4
- export * from './expressions';