angular-odata 0.80.0 → 0.99.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/README.md +69 -34
- 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} +8 -3
- package/esm2020/lib/helper.mjs +268 -0
- package/esm2020/lib/index.mjs +19 -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/esm2020/lib/resources/index.mjs +7 -0
- package/esm2020/lib/resources/path/handlers.mjs +69 -0
- package/esm2020/lib/resources/path/index.mjs +3 -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/base.mjs +20 -0
- package/esm2020/lib/resources/query/expressions/compute.mjs +38 -0
- package/esm2020/lib/resources/query/expressions/expand.mjs +57 -0
- package/esm2020/lib/resources/query/expressions/filter.mjs +154 -0
- package/esm2020/lib/resources/query/expressions/index.mjs +7 -0
- package/esm2020/lib/resources/query/expressions/orderby.mjs +54 -0
- package/esm2020/lib/resources/query/expressions/search.mjs +113 -0
- package/esm2020/lib/resources/query/expressions/select.mjs +32 -0
- package/esm2020/lib/resources/query/expressions/syntax.mjs +371 -0
- package/esm2020/lib/resources/query/handlers.mjs +188 -0
- package/esm2020/lib/resources/query/index.mjs +4 -0
- package/esm2020/lib/resources/query/options.mjs +103 -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 +309 -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} +2 -1
- package/esm2020/lib/schema/parsers/callable.mjs +113 -0
- package/esm2020/lib/schema/parsers/edm.mjs +95 -0
- package/esm2020/lib/schema/parsers/enum-type.mjs +107 -0
- package/esm2020/lib/schema/parsers/index.mjs +5 -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/esm2020/lib/services/singleton.mjs +48 -0
- 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/esm2020/lib/utils/arraybuffers.mjs +46 -0
- package/{esm2015/lib/utils/dates.js → esm2020/lib/utils/dates.mjs} +0 -0
- package/esm2020/lib/utils/durations.mjs +40 -0
- package/{esm2015/lib/utils/enums.js → esm2020/lib/utils/enums.mjs} +0 -0
- package/esm2020/lib/utils/http.mjs +93 -0
- package/esm2020/lib/utils/index.mjs +10 -0
- package/esm2020/lib/utils/objects.mjs +195 -0
- package/esm2020/lib/utils/odata.mjs +22 -0
- package/esm2020/lib/utils/strings.mjs +20 -0
- package/esm2020/lib/utils/types.mjs +134 -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} +4508 -3427
- package/fesm2015/angular-odata.mjs.map +1 -0
- package/fesm2020/angular-odata.mjs +10510 -0
- package/fesm2020/angular-odata.mjs.map +1 -0
- package/lib/api.d.ts +14 -14
- package/lib/cache/cache.d.ts +2 -2
- package/lib/cache/storage.d.ts +1 -1
- package/lib/client.d.ts +60 -9
- package/lib/constants.d.ts +5 -2
- package/lib/index.d.ts +0 -1
- package/lib/models/collection.d.ts +30 -42
- package/lib/models/model.d.ts +37 -30
- package/lib/models/options.d.ts +30 -38
- package/lib/module.d.ts +1 -1
- package/lib/options.d.ts +47 -0
- package/lib/resources/index.d.ts +2 -3
- package/lib/resources/path/handlers.d.ts +27 -0
- package/lib/resources/path/index.d.ts +2 -0
- package/lib/resources/{path-segments.d.ts → path/segments.d.ts} +4 -16
- package/lib/resources/{builder.d.ts → query/builder.d.ts} +12 -7
- package/lib/resources/query/expressions/base.d.ts +19 -0
- package/lib/resources/query/expressions/compute.d.ts +26 -0
- package/lib/resources/query/expressions/expand.d.ts +40 -0
- package/lib/resources/query/expressions/filter.d.ts +58 -0
- package/lib/resources/query/expressions/index.d.ts +6 -0
- package/lib/resources/query/expressions/orderby.d.ts +37 -0
- package/lib/resources/query/expressions/search.d.ts +47 -0
- package/lib/resources/query/expressions/select.d.ts +21 -0
- package/lib/resources/query/expressions/syntax.d.ts +177 -0
- package/lib/resources/query/handlers.d.ts +104 -0
- package/lib/resources/query/index.d.ts +3 -0
- package/lib/resources/query/options.d.ts +38 -0
- package/lib/resources/request.d.ts +4 -3
- package/lib/resources/resource.d.ts +42 -48
- package/lib/resources/types/action.d.ts +14 -61
- package/lib/resources/types/batch.d.ts +16 -3
- package/lib/resources/types/count.d.ts +9 -17
- package/lib/resources/types/entity-set.d.ts +12 -51
- package/lib/resources/types/entity.d.ts +13 -31
- package/lib/resources/types/function.d.ts +13 -60
- package/lib/resources/types/media.d.ts +9 -8
- package/lib/resources/types/metadata.d.ts +3 -5
- package/lib/resources/types/navigation-property.d.ts +74 -65
- package/lib/resources/types/options.d.ts +1 -1
- package/lib/resources/types/property.d.ts +49 -57
- package/lib/resources/types/reference.d.ts +65 -9
- package/lib/resources/types/singleton.d.ts +53 -31
- package/lib/resources/types/value.d.ts +16 -7
- package/lib/schema/annotation.d.ts +18 -0
- package/lib/schema/callable.d.ts +4 -20
- 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 +19 -25
- package/lib/schema/index.d.ts +1 -0
- package/lib/{parsers → schema/parsers}/callable.d.ts +2 -2
- package/lib/schema/parsers/edm.d.ts +4 -0
- package/lib/{parsers → schema/parsers}/enum-type.d.ts +12 -11
- package/lib/{parsers → schema/parsers}/index.d.ts +0 -0
- package/lib/{parsers → schema/parsers}/structured-type.d.ts +12 -12
- package/lib/schema/schema.d.ts +3 -10
- package/lib/schema/structured-type.d.ts +65 -27
- package/lib/services/base.d.ts +2 -2
- package/lib/services/entity-set.d.ts +5 -2
- package/lib/services/entity.d.ts +4 -1
- package/lib/services/singleton.d.ts +5 -2
- package/lib/settings.d.ts +5 -5
- package/lib/types.d.ts +1 -0
- package/lib/utils/arraybuffers.d.ts +4 -0
- package/lib/{parsers/edm.d.ts → utils/durations.d.ts} +3 -3
- package/lib/utils/http.d.ts +1 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/objects.d.ts +1 -0
- package/lib/utils/strings.d.ts +1 -0
- package/lib/utils/types.d.ts +2 -0
- package/package.json +21 -8
- package/bundles/angular-odata.umd.js +0 -11048
- package/bundles/angular-odata.umd.js.map +0 -1
- package/esm2015/lib/api.js +0 -297
- package/esm2015/lib/client.js +0 -221
- package/esm2015/lib/helper.js +0 -271
- package/esm2015/lib/index.js +0 -21
- package/esm2015/lib/models/collection.js +0 -687
- package/esm2015/lib/models/model.js +0 -423
- package/esm2015/lib/models/options.js +0 -909
- package/esm2015/lib/options.js +0 -31
- package/esm2015/lib/parsers/callable.js +0 -107
- package/esm2015/lib/parsers/edm.js +0 -192
- package/esm2015/lib/parsers/enum-type.js +0 -102
- package/esm2015/lib/parsers/index.js +0 -5
- package/esm2015/lib/parsers/structured-type.js +0 -389
- package/esm2015/lib/resources/builder.js +0 -537
- package/esm2015/lib/resources/index.js +0 -8
- package/esm2015/lib/resources/path-segments.js +0 -156
- package/esm2015/lib/resources/query-options.js +0 -157
- package/esm2015/lib/resources/request.js +0 -149
- package/esm2015/lib/resources/resource.js +0 -337
- 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 -180
- package/esm2015/lib/resources/types/batch.js +0 -288
- package/esm2015/lib/resources/types/count.js +0 -55
- package/esm2015/lib/resources/types/entity-set.js +0 -169
- package/esm2015/lib/resources/types/entity.js +0 -170
- package/esm2015/lib/resources/types/function.js +0 -205
- 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 -232
- package/esm2015/lib/resources/types/options.js +0 -2
- package/esm2015/lib/resources/types/property.js +0 -195
- package/esm2015/lib/resources/types/reference.js +0 -50
- package/esm2015/lib/resources/types/singleton.js +0 -159
- package/esm2015/lib/resources/types/value.js +0 -30
- package/esm2015/lib/schema/annotation.js +0 -7
- package/esm2015/lib/schema/callable.js +0 -82
- package/esm2015/lib/schema/entity-container.js +0 -22
- package/esm2015/lib/schema/entity-set.js +0 -33
- package/esm2015/lib/schema/enum-type.js +0 -101
- package/esm2015/lib/schema/schema.js +0 -60
- package/esm2015/lib/schema/structured-type.js +0 -148
- package/esm2015/lib/services/base.js +0 -23
- package/esm2015/lib/services/entity-set.js +0 -143
- package/esm2015/lib/services/entity.js +0 -10
- package/esm2015/lib/services/singleton.js +0 -46
- package/esm2015/lib/types.js +0 -37
- package/esm2015/lib/utils/http.js +0 -89
- package/esm2015/lib/utils/index.js +0 -9
- package/esm2015/lib/utils/objects.js +0 -139
- package/esm2015/lib/utils/odata.js +0 -21
- package/esm2015/lib/utils/strings.js +0 -13
- package/esm2015/lib/utils/types.js +0 -103
- package/fesm2015/angular-odata.js.map +0 -1
- package/lib/resources/query-options.d.ts +0 -57
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { QueryOptionNames } from '../../types';
|
|
2
|
+
import { Expand, Filter, OrderBy, Select, Transform } from './builder';
|
|
3
|
+
import { ComputeExpression, FilterConnector, FilterExpression, OrderByExpression, SearchConnector, SearchExpression, ODataFunctions, ODataOperators } from './expressions';
|
|
4
|
+
import { ExpandExpression } from './expressions/expand';
|
|
5
|
+
import { SelectExpression } from './expressions/select';
|
|
6
|
+
import type { ODataQueryArguments, ODataQueryOptions } from './options';
|
|
7
|
+
export declare class ODataQueryOptionHandler<T> {
|
|
8
|
+
private o;
|
|
9
|
+
private n;
|
|
10
|
+
constructor(o: {
|
|
11
|
+
[name: string]: any;
|
|
12
|
+
}, n: QueryOptionNames);
|
|
13
|
+
get name(): QueryOptionNames;
|
|
14
|
+
toJSON(): any;
|
|
15
|
+
empty(): boolean;
|
|
16
|
+
value(v?: any): any;
|
|
17
|
+
private assertArray;
|
|
18
|
+
push(value: any): void;
|
|
19
|
+
remove(value: any): void;
|
|
20
|
+
at(index: number): any;
|
|
21
|
+
private assertObject;
|
|
22
|
+
set(path: string, value: any): void;
|
|
23
|
+
get(path: string, def?: any): any;
|
|
24
|
+
unset(path: string): void;
|
|
25
|
+
has(path: string): boolean;
|
|
26
|
+
assign(values: {
|
|
27
|
+
[attr: string]: any;
|
|
28
|
+
}): Object;
|
|
29
|
+
clear(): void;
|
|
30
|
+
}
|
|
31
|
+
export declare class ODataQueryOptionsHandler<T> {
|
|
32
|
+
protected options: ODataQueryOptions<T>;
|
|
33
|
+
constructor(options: ODataQueryOptions<T>);
|
|
34
|
+
/**
|
|
35
|
+
* Create a new odata alias parameter
|
|
36
|
+
* @link https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_ParameterAliases
|
|
37
|
+
* @param value The value of the alias
|
|
38
|
+
* @param name The name of the alias
|
|
39
|
+
* @returns The alias
|
|
40
|
+
*/
|
|
41
|
+
alias(value: any, name?: string): import("./builder").QueryCustomType;
|
|
42
|
+
select(opts: (e: {
|
|
43
|
+
s: T;
|
|
44
|
+
e: () => SelectExpression<T>;
|
|
45
|
+
}) => SelectExpression<T>): SelectExpression<T>;
|
|
46
|
+
select(opts: Select<T>): ODataQueryOptionHandler<T>;
|
|
47
|
+
select(): ODataQueryOptionHandler<T>;
|
|
48
|
+
expand(opts: (e: {
|
|
49
|
+
s: T;
|
|
50
|
+
e: () => ExpandExpression<T>;
|
|
51
|
+
}) => ExpandExpression<T>): ExpandExpression<T>;
|
|
52
|
+
expand(opts: Expand<T>): ODataQueryOptionHandler<T>;
|
|
53
|
+
expand(): ODataQueryOptionHandler<T>;
|
|
54
|
+
/**
|
|
55
|
+
* @link https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_SystemQueryOptioncompute
|
|
56
|
+
*/
|
|
57
|
+
compute(opts: (e: {
|
|
58
|
+
s: T;
|
|
59
|
+
e: () => ComputeExpression<T>;
|
|
60
|
+
o: ODataOperators<T>;
|
|
61
|
+
f: ODataFunctions<T>;
|
|
62
|
+
}) => ComputeExpression<T>): ComputeExpression<T>;
|
|
63
|
+
compute(opts: string): ODataQueryOptionHandler<T>;
|
|
64
|
+
compute(): ODataQueryOptionHandler<T>;
|
|
65
|
+
/**
|
|
66
|
+
* @link https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_SystemQueryOptionformat
|
|
67
|
+
*/
|
|
68
|
+
format(opts: string): ODataQueryOptionHandler<T>;
|
|
69
|
+
format(): ODataQueryOptionHandler<T>;
|
|
70
|
+
transform(opts: Transform<T>): ODataQueryOptionHandler<T>;
|
|
71
|
+
transform(): ODataQueryOptionHandler<T>;
|
|
72
|
+
search(opts: (e: {
|
|
73
|
+
e: (connector: SearchConnector) => SearchExpression<T>;
|
|
74
|
+
}) => SearchExpression<T>): SearchExpression<T>;
|
|
75
|
+
search(opts: string): ODataQueryOptionHandler<T>;
|
|
76
|
+
search(): ODataQueryOptionHandler<T>;
|
|
77
|
+
filter(opts: (e: {
|
|
78
|
+
s: T;
|
|
79
|
+
e: (connector?: FilterConnector) => FilterExpression<T>;
|
|
80
|
+
o: ODataOperators<T>;
|
|
81
|
+
f: ODataFunctions<T>;
|
|
82
|
+
}) => FilterExpression<T>): FilterExpression<T>;
|
|
83
|
+
filter(opts: Filter<T>): ODataQueryOptionHandler<T>;
|
|
84
|
+
filter(): ODataQueryOptionHandler<T>;
|
|
85
|
+
orderBy(opts: (e: {
|
|
86
|
+
s: T;
|
|
87
|
+
e: () => OrderByExpression<T>;
|
|
88
|
+
}) => OrderByExpression<T>): OrderByExpression<T>;
|
|
89
|
+
orderBy(opts: OrderBy<T>): ODataQueryOptionHandler<T>;
|
|
90
|
+
orderBy(): ODataQueryOptionHandler<T>;
|
|
91
|
+
top(opts: number): ODataQueryOptionHandler<T>;
|
|
92
|
+
top(): ODataQueryOptionHandler<T>;
|
|
93
|
+
skip(opts: number): ODataQueryOptionHandler<T>;
|
|
94
|
+
skip(): ODataQueryOptionHandler<T>;
|
|
95
|
+
skiptoken(opts: string): ODataQueryOptionHandler<T>;
|
|
96
|
+
skiptoken(): ODataQueryOptionHandler<T>;
|
|
97
|
+
paging({ skip, skiptoken, top, }?: {
|
|
98
|
+
skip?: number;
|
|
99
|
+
skiptoken?: string;
|
|
100
|
+
top?: number;
|
|
101
|
+
}): void;
|
|
102
|
+
clearPaging(): void;
|
|
103
|
+
apply(query: ODataQueryArguments<T>): void;
|
|
104
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { QueryOptionNames } from '../../types';
|
|
2
|
+
import { Expand, Filter, OrderBy, Select, Transform } from './builder';
|
|
3
|
+
import { Expression } from './expressions';
|
|
4
|
+
import { ODataQueryOptionHandler } from './handlers';
|
|
5
|
+
export declare type ODataQueryArguments<T> = {
|
|
6
|
+
[QueryOptionNames.select]?: Select<T>;
|
|
7
|
+
[QueryOptionNames.filter]?: Filter<T>;
|
|
8
|
+
[QueryOptionNames.search]?: string;
|
|
9
|
+
[QueryOptionNames.compute]?: string;
|
|
10
|
+
[QueryOptionNames.transform]?: Transform<T>;
|
|
11
|
+
[QueryOptionNames.orderBy]?: OrderBy<T>;
|
|
12
|
+
[QueryOptionNames.top]?: number;
|
|
13
|
+
[QueryOptionNames.skip]?: number;
|
|
14
|
+
[QueryOptionNames.skiptoken]?: string;
|
|
15
|
+
[QueryOptionNames.expand]?: Expand<T>;
|
|
16
|
+
[QueryOptionNames.format]?: string;
|
|
17
|
+
};
|
|
18
|
+
export declare class ODataQueryOptions<T> {
|
|
19
|
+
options: {
|
|
20
|
+
[name: string]: any;
|
|
21
|
+
};
|
|
22
|
+
constructor(options?: {
|
|
23
|
+
[name: string]: any;
|
|
24
|
+
});
|
|
25
|
+
pathAndParams(escape?: boolean): [string, {
|
|
26
|
+
[name: string]: any;
|
|
27
|
+
}];
|
|
28
|
+
toString(): string;
|
|
29
|
+
toJSON(): {};
|
|
30
|
+
toQueryArguments(): ODataQueryArguments<T>;
|
|
31
|
+
clone<O>(): ODataQueryOptions<O>;
|
|
32
|
+
expression(name: QueryOptionNames, exp: Expression<T>): Expression<T>;
|
|
33
|
+
option<O>(name: QueryOptionNames, opts?: O): ODataQueryOptionHandler<O>;
|
|
34
|
+
has(name: QueryOptionNames): boolean;
|
|
35
|
+
remove(...names: QueryOptionNames[]): void;
|
|
36
|
+
keep(...names: QueryOptionNames[]): void;
|
|
37
|
+
clear(): void;
|
|
38
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
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';
|
|
8
8
|
readonly reportProgress?: boolean;
|
|
9
9
|
readonly withCredentials?: boolean;
|
|
10
10
|
readonly bodyQueryOptions: QueryOptionNames[];
|
|
11
|
-
readonly responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
12
11
|
readonly fetchPolicy: 'cache-first' | 'cache-and-network' | 'network-only' | 'no-cache' | 'cache-only';
|
|
13
12
|
readonly resource: ODataResource<T>;
|
|
13
|
+
private readonly _responseType?;
|
|
14
14
|
private readonly _method;
|
|
15
15
|
private readonly _body;
|
|
16
16
|
private readonly _headers;
|
|
@@ -31,11 +31,12 @@ export declare class ODataRequest<T> {
|
|
|
31
31
|
params?: HttpParams | {
|
|
32
32
|
[param: string]: string | string[];
|
|
33
33
|
};
|
|
34
|
-
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
34
|
+
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text' | 'value' | 'property' | 'entity' | 'entities';
|
|
35
35
|
fetchPolicy?: 'cache-first' | 'cache-and-network' | 'network-only' | 'no-cache' | 'cache-only';
|
|
36
36
|
withCredentials?: boolean;
|
|
37
37
|
bodyQueryOptions?: QueryOptionNames[];
|
|
38
38
|
});
|
|
39
|
+
get responseType(): 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
39
40
|
get path(): string;
|
|
40
41
|
get method(): string;
|
|
41
42
|
get body(): any;
|
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { ODataPathSegments } from './path-segments';
|
|
3
|
-
import { ODataQueryArguments, ODataQueryOptions } from './query-options';
|
|
4
|
-
import { ODataOptions } from './types';
|
|
5
2
|
import { ODataApi } from '../api';
|
|
3
|
+
import { ODataCollection, ODataModel } from '../models';
|
|
4
|
+
import { ODataStructuredType } from '../schema';
|
|
5
|
+
import { ODataSchemaElement } from '../schema/element';
|
|
6
6
|
import { OptionsHelper, QueryOptionNames } from '../types';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { ODataPathSegments, ODataPathSegmentsHandler } from './path';
|
|
8
|
+
import { ODataQueryOptions, ODataQueryOptionsHandler, QueryCustomType } from './query';
|
|
9
|
+
import { ODataEntitiesAnnotations, ODataEntityAnnotations } from './responses/index';
|
|
10
|
+
import { ODataOptions } from './types';
|
|
9
11
|
export declare type EntityKey<T> = {
|
|
10
12
|
readonly [P in keyof T]?: T[P];
|
|
11
13
|
} | QueryCustomType | string | number;
|
|
12
|
-
export declare
|
|
14
|
+
export declare class ODataResource<T> {
|
|
13
15
|
api: ODataApi;
|
|
16
|
+
schema?: ODataSchemaElement;
|
|
14
17
|
protected pathSegments: ODataPathSegments;
|
|
15
|
-
protected queryOptions: ODataQueryOptions
|
|
16
|
-
constructor(api: ODataApi, segments
|
|
18
|
+
protected queryOptions: ODataQueryOptions<T>;
|
|
19
|
+
constructor(api: ODataApi, { segments, query, schema, }?: {
|
|
20
|
+
segments?: ODataPathSegments;
|
|
21
|
+
query?: ODataQueryOptions<T>;
|
|
22
|
+
schema?: ODataSchemaElement;
|
|
23
|
+
});
|
|
17
24
|
/**
|
|
18
25
|
* @returns string The type of the resource
|
|
19
26
|
*/
|
|
@@ -31,64 +38,51 @@ export declare abstract class ODataResource<T> {
|
|
|
31
38
|
*/
|
|
32
39
|
hasKey(): boolean;
|
|
33
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;
|
|
34
53
|
isSubtypeOf(other: ODataResource<any>): boolean;
|
|
35
|
-
isParentOf(other: ODataResource<any>): boolean;
|
|
36
|
-
isChildOf(other: ODataResource<any>): boolean;
|
|
37
54
|
isEqualTo(other: ODataResource<any>, test?: 'path' | 'params'): boolean;
|
|
38
|
-
pathAndParams(): [string, {
|
|
55
|
+
pathAndParams(escape?: boolean): [string, {
|
|
39
56
|
[name: string]: any;
|
|
40
57
|
}];
|
|
41
58
|
endpointUrl(params?: boolean): string;
|
|
42
59
|
toString(): string;
|
|
43
|
-
|
|
44
|
-
abstract schema(): ODataStructuredType<T> | ODataCallable<T> | undefined;
|
|
60
|
+
clone<R extends ODataResource<T>>(): R;
|
|
45
61
|
deserialize(value: any, options?: OptionsHelper): any;
|
|
46
62
|
serialize(value: any, options?: OptionsHelper): any;
|
|
47
63
|
encode(value: any, options?: OptionsHelper): any;
|
|
48
64
|
toJSON(): {
|
|
49
65
|
segments: any[];
|
|
50
|
-
options:
|
|
66
|
+
options: {};
|
|
51
67
|
};
|
|
52
68
|
cloneSegments(): ODataPathSegments;
|
|
53
69
|
clearQuery(): void;
|
|
54
|
-
cloneQuery(): ODataQueryOptions
|
|
70
|
+
cloneQuery<P>(): ODataQueryOptions<P>;
|
|
55
71
|
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
72
|
+
* Handle the path segments of the resource
|
|
73
|
+
* Create an object handler for mutate the path segments of the resource
|
|
74
|
+
* @param f Function context for handle the segments
|
|
75
|
+
* @returns ODataActionResource
|
|
58
76
|
*/
|
|
59
|
-
|
|
60
|
-
select(opts?: Select<T> | undefined): import("./query-options").OptionHandler<Select<T>>;
|
|
61
|
-
expand(opts?: Expand<T> | undefined): import("./query-options").OptionHandler<Expand<T>>;
|
|
62
|
-
compute(opts?: string | undefined): import("./query-options").OptionHandler<string>;
|
|
63
|
-
format(opts?: string | undefined): import("./query-options").OptionHandler<string>;
|
|
64
|
-
apply(query: ODataQueryArguments<T>): void;
|
|
65
|
-
};
|
|
66
|
-
static resolveKey<T>(value: any, schema?: ODataStructuredType<T> | ODataCallable<T>): EntityKey<T> | undefined;
|
|
67
|
-
protected resolveKey(value: any): EntityKey<T> | undefined;
|
|
77
|
+
segment(f: (q: ODataPathSegmentsHandler<T>) => void): this;
|
|
68
78
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
79
|
+
* Handle the query options of the resource
|
|
80
|
+
* Create an object handler for mutate the query options of the resource
|
|
81
|
+
* @param f Function context for handle the query options
|
|
71
82
|
*/
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
compute(opts?: string | undefined): import("./query-options").OptionHandler<string>;
|
|
76
|
-
transform(opts?: Transform<T> | undefined): import("./query-options").OptionHandler<Transform<T>>;
|
|
77
|
-
search(opts?: string | undefined): import("./query-options").OptionHandler<string>;
|
|
78
|
-
filter(opts?: Filter | undefined): import("./query-options").OptionHandler<Filter>;
|
|
79
|
-
orderBy(opts?: OrderBy<T> | undefined): import("./query-options").OptionHandler<OrderBy<T>>;
|
|
80
|
-
format(opts?: string | undefined): import("./query-options").OptionHandler<string>;
|
|
81
|
-
top(opts?: number | undefined): import("./query-options").OptionHandler<number>;
|
|
82
|
-
skip(opts?: number | undefined): import("./query-options").OptionHandler<number>;
|
|
83
|
-
skiptoken(opts?: string | undefined): import("./query-options").OptionHandler<string>;
|
|
84
|
-
paging({ skip, skiptoken, top, }?: {
|
|
85
|
-
skip?: number | undefined;
|
|
86
|
-
skiptoken?: string | undefined;
|
|
87
|
-
top?: number | undefined;
|
|
88
|
-
}): void;
|
|
89
|
-
clearPaging(): void;
|
|
90
|
-
apply(query: ODataQueryArguments<T>): void;
|
|
91
|
-
};
|
|
83
|
+
query(f: (q: ODataQueryOptionsHandler<T>) => void): this;
|
|
84
|
+
static resolveKey<T>(value: any, schema?: ODataStructuredType<T>): EntityKey<T> | undefined;
|
|
85
|
+
protected resolveKey(value: any): EntityKey<T> | undefined;
|
|
92
86
|
protected request(method: string, options: ODataOptions & {
|
|
93
87
|
body?: any;
|
|
94
88
|
etag?: string;
|
|
@@ -1,68 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ODataCollection, ODataModel } from '../../models';
|
|
3
|
-
import { ODataEntities, ODataEntitiesAnnotations, ODataEntity, ODataEntityAnnotations, ODataProperty } from '../responses';
|
|
4
|
-
import { ODataEntitiesOptions, ODataEntityOptions, ODataNoneOptions, ODataOptions, ODataPropertyOptions } from './options';
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
5
2
|
import { ODataApi } from '../../api';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { ODataCollection, ODataModel } from '../../models';
|
|
4
|
+
import { ODataCallable } from '../../schema/callable';
|
|
5
|
+
import { ODataPathSegments } from '../path';
|
|
6
|
+
import { ODataQueryOptions } from '../query';
|
|
8
7
|
import { ODataResource } from '../resource';
|
|
9
|
-
import {
|
|
8
|
+
import { ODataEntities, ODataEntity, ODataProperty } from '../responses';
|
|
9
|
+
import { ODataEntitiesOptions, ODataEntityOptions, ODataNoneOptions, ODataOptions, ODataPropertyOptions } from './options';
|
|
10
10
|
export declare class ODataActionResource<P, R> extends ODataResource<R> {
|
|
11
|
-
static factory<P, R>(api: ODataApi, path
|
|
12
|
-
|
|
13
|
-
|
|
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>;
|
|
14
18
|
returnType(): string | 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
|
-
select(opts: Select<R>): ODataActionResource<P, R>;
|
|
28
|
-
expand(opts: Expand<R>): ODataActionResource<P, R>;
|
|
29
|
-
transform(opts: Transform<R>): ODataActionResource<P, R>;
|
|
30
|
-
search(opts: string): ODataActionResource<P, R>;
|
|
31
|
-
filter(opts: Filter): ODataActionResource<P, R>;
|
|
32
|
-
orderBy(opts: OrderBy<R>): ODataActionResource<P, R>;
|
|
33
|
-
format(opts: string): ODataActionResource<P, R>;
|
|
34
|
-
top(opts: number): ODataActionResource<P, R>;
|
|
35
|
-
skip(opts: number): ODataActionResource<P, R>;
|
|
36
|
-
skiptoken(opts: string): ODataActionResource<P, R>;
|
|
37
|
-
get segment(): {
|
|
38
|
-
entitySet(): import("../path-segments").SegmentHandler;
|
|
39
|
-
singleton(): import("../path-segments").SegmentHandler;
|
|
40
|
-
action(): import("../path-segments").SegmentHandler;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Handle query options of the action
|
|
44
|
-
* @returns Handler for mutate the query of the action
|
|
45
|
-
*/
|
|
46
|
-
get query(): {
|
|
47
|
-
select(opts?: Select<R> | undefined): import("../query-options").OptionHandler<Select<R>>;
|
|
48
|
-
expand(opts?: Expand<R> | undefined): import("../query-options").OptionHandler<Expand<R>>;
|
|
49
|
-
compute(opts?: string | undefined): import("../query-options").OptionHandler<string>;
|
|
50
|
-
transform(opts?: Transform<R> | undefined): import("../query-options").OptionHandler<Transform<R>>;
|
|
51
|
-
search(opts?: string | undefined): import("../query-options").OptionHandler<string>;
|
|
52
|
-
filter(opts?: Filter | undefined): import("../query-options").OptionHandler<Filter>;
|
|
53
|
-
orderBy(opts?: OrderBy<R> | undefined): import("../query-options").OptionHandler<OrderBy<R>>;
|
|
54
|
-
format(opts?: string | undefined): import("../query-options").OptionHandler<string>;
|
|
55
|
-
top(opts?: number | undefined): import("../query-options").OptionHandler<number>;
|
|
56
|
-
skip(opts?: number | undefined): import("../query-options").OptionHandler<number>;
|
|
57
|
-
skiptoken(opts?: string | undefined): import("../query-options").OptionHandler<string>;
|
|
58
|
-
paging({ skip, skiptoken, top, }?: {
|
|
59
|
-
skip?: number | undefined;
|
|
60
|
-
skiptoken?: string | undefined;
|
|
61
|
-
top?: number | undefined;
|
|
62
|
-
}): void;
|
|
63
|
-
clearPaging(): void;
|
|
64
|
-
apply(query: import("../query-options").ODataQueryArguments<R>): void;
|
|
65
|
-
};
|
|
66
19
|
protected post(params: P | null, options?: ODataEntityOptions & ODataEntitiesOptions & ODataPropertyOptions): Observable<any>;
|
|
67
20
|
/**
|
|
68
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>);
|
|
@@ -24,9 +24,22 @@ export declare class ODataBatchRequest<T> extends Subject<ODataResponse<T>> {
|
|
|
24
24
|
export declare class ODataBatchResource extends ODataResource<any> {
|
|
25
25
|
private _requests;
|
|
26
26
|
requests(): ODataRequest<any>[];
|
|
27
|
-
clone(): ODataBatchResource;
|
|
28
|
-
schema(): undefined;
|
|
29
27
|
static factory(api: ODataApi): ODataBatchResource;
|
|
28
|
+
private storeRequester;
|
|
29
|
+
private restoreRequester;
|
|
30
|
+
/**
|
|
31
|
+
* Add to batch request
|
|
32
|
+
* @param ctx The context for the request
|
|
33
|
+
* @returns The result of execute the context
|
|
34
|
+
*/
|
|
35
|
+
add<R>(ctx: (batch: this) => Observable<R>): Observable<R>;
|
|
36
|
+
send(options?: ODataOptions): void;
|
|
37
|
+
/**
|
|
38
|
+
* Execute the batch request
|
|
39
|
+
* @param ctx The context for the request
|
|
40
|
+
* @param options The options of the batch request
|
|
41
|
+
* @returns The result of execute the context
|
|
42
|
+
*/
|
|
30
43
|
exec<R>(ctx: (batch: this) => Observable<R>, options?: ODataOptions): Observable<R>;
|
|
31
44
|
body(): string;
|
|
32
45
|
static buildBody(batchBoundary: string, requests: ODataBatchRequest<any>[]): string;
|
|
@@ -1,22 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
2
|
import { ODataApi } from '../../api';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { ODataQueryOptions } from '../query-options';
|
|
3
|
+
import { ODataPathSegments } from '../path';
|
|
4
|
+
import { ODataQueryOptions } from '../query';
|
|
6
5
|
import { ODataResource } from '../resource';
|
|
7
|
-
import {
|
|
8
|
-
export declare class ODataCountResource extends ODataResource<
|
|
9
|
-
static factory(api: ODataApi, segments
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
entitySet(): import("../path-segments").SegmentHandler;
|
|
14
|
-
navigationProperty(): import("../path-segments").SegmentHandler;
|
|
15
|
-
};
|
|
16
|
-
get query(): {
|
|
17
|
-
search(opts?: string | undefined): import("../query-options").OptionHandler<string>;
|
|
18
|
-
filter(opts?: Filter | undefined): import("../query-options").OptionHandler<Filter>;
|
|
19
|
-
};
|
|
6
|
+
import { ODataOptions } from './options';
|
|
7
|
+
export declare class ODataCountResource<T> extends ODataResource<T> {
|
|
8
|
+
static factory<T>(api: ODataApi, { segments, query, }: {
|
|
9
|
+
segments: ODataPathSegments;
|
|
10
|
+
query?: ODataQueryOptions<T>;
|
|
11
|
+
}): ODataCountResource<T>;
|
|
20
12
|
protected get(options?: ODataOptions): Observable<number>;
|
|
21
13
|
/**
|
|
22
14
|
* Fetch the count of the set.
|
|
@@ -1,66 +1,27 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import {
|
|
3
|
-
import { Expand, Filter, OrderBy, Select, Transform } from '../builder';
|
|
2
|
+
import { ODataApi } from '../../api';
|
|
4
3
|
import { ODataCollection, ODataModel } from '../../models';
|
|
5
|
-
import {
|
|
4
|
+
import { ODataStructuredType } from '../../schema/structured-type';
|
|
6
5
|
import { QueryOptionNames } from '../../types';
|
|
6
|
+
import { ODataQueryOptions } from '../query';
|
|
7
|
+
import { ODataResource } from '../resource';
|
|
8
|
+
import { ODataEntities, ODataEntity } from '../responses';
|
|
7
9
|
import { ODataActionResource } from './action';
|
|
8
|
-
import { ODataApi } from '../../api';
|
|
9
10
|
import { ODataCountResource } from './count';
|
|
10
11
|
import { ODataEntityResource } from './entity';
|
|
11
12
|
import { ODataFunctionResource } from './function';
|
|
12
13
|
import { ODataOptions } from './options';
|
|
13
|
-
import { ODataPathSegments } from '../path-segments';
|
|
14
|
-
import { ODataQueryOptions } from '../query-options';
|
|
15
14
|
export declare class ODataEntitySetResource<T> extends ODataResource<T> {
|
|
16
|
-
static factory<E>(api: ODataApi, path
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}[], { annots, reset, }?: {
|
|
22
|
-
annots?: ODataEntitiesAnnotations;
|
|
23
|
-
reset?: boolean;
|
|
24
|
-
}): C;
|
|
15
|
+
static factory<E>(api: ODataApi, { path, schema, query, }: {
|
|
16
|
+
path: string;
|
|
17
|
+
schema?: ODataStructuredType<E>;
|
|
18
|
+
query?: ODataQueryOptions<E>;
|
|
19
|
+
}): ODataEntitySetResource<E>;
|
|
25
20
|
entity(key?: any): ODataEntityResource<T>;
|
|
26
|
-
cast<C>(type: string): ODataEntitySetResource<C>;
|
|
27
21
|
action<P, R>(path: string): ODataActionResource<P, R>;
|
|
28
22
|
function<P, R>(path: string): ODataFunctionResource<P, R>;
|
|
29
|
-
count(): ODataCountResource
|
|
30
|
-
|
|
31
|
-
expand(opts: Expand<T>): ODataEntitySetResource<T>;
|
|
32
|
-
transform(opts: Transform<T>): ODataEntitySetResource<T>;
|
|
33
|
-
search(opts: string): ODataEntitySetResource<T>;
|
|
34
|
-
filter(opts: Filter): ODataEntitySetResource<T>;
|
|
35
|
-
orderBy(opts: OrderBy<T>): ODataEntitySetResource<T>;
|
|
36
|
-
format(opts: string): ODataEntitySetResource<T>;
|
|
37
|
-
top(opts: number): ODataEntitySetResource<T>;
|
|
38
|
-
skip(opts: number): ODataEntitySetResource<T>;
|
|
39
|
-
skiptoken(opts: string): ODataEntitySetResource<T>;
|
|
40
|
-
get segment(): {
|
|
41
|
-
entitySet(): import("../path-segments").SegmentHandler;
|
|
42
|
-
keys(values?: (EntityKey<T> | undefined)[] | undefined): (EntityKey<any> | undefined)[];
|
|
43
|
-
};
|
|
44
|
-
get query(): {
|
|
45
|
-
select(opts?: Select<T> | undefined): import("../query-options").OptionHandler<Select<T>>;
|
|
46
|
-
expand(opts?: Expand<T> | undefined): import("../query-options").OptionHandler<Expand<T>>;
|
|
47
|
-
compute(opts?: string | undefined): import("../query-options").OptionHandler<string>;
|
|
48
|
-
transform(opts?: Transform<T> | undefined): import("../query-options").OptionHandler<Transform<T>>;
|
|
49
|
-
search(opts?: string | undefined): import("../query-options").OptionHandler<string>;
|
|
50
|
-
filter(opts?: Filter | undefined): import("../query-options").OptionHandler<Filter>;
|
|
51
|
-
orderBy(opts?: OrderBy<T> | undefined): import("../query-options").OptionHandler<OrderBy<T>>;
|
|
52
|
-
format(opts?: string | undefined): import("../query-options").OptionHandler<string>;
|
|
53
|
-
top(opts?: number | undefined): import("../query-options").OptionHandler<number>;
|
|
54
|
-
skip(opts?: number | undefined): import("../query-options").OptionHandler<number>;
|
|
55
|
-
skiptoken(opts?: string | undefined): import("../query-options").OptionHandler<string>;
|
|
56
|
-
paging({ skip, skiptoken, top, }?: {
|
|
57
|
-
skip?: number | undefined;
|
|
58
|
-
skiptoken?: string | undefined;
|
|
59
|
-
top?: number | undefined;
|
|
60
|
-
}): void;
|
|
61
|
-
clearPaging(): void;
|
|
62
|
-
apply(query: import("../query-options").ODataQueryArguments<T>): void;
|
|
63
|
-
};
|
|
23
|
+
count(): ODataCountResource<T>;
|
|
24
|
+
cast<C>(type: string): ODataEntitySetResource<C>;
|
|
64
25
|
protected post(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
65
26
|
protected get(options?: ODataOptions & {
|
|
66
27
|
withCount?: boolean;
|
|
@@ -1,50 +1,32 @@
|
|
|
1
|
-
import { EntityKey, ODataResource } from '../resource';
|
|
2
|
-
import { Expand, Select } from '../builder';
|
|
3
|
-
import { ODataEntity, ODataEntityAnnotations } from '../responses';
|
|
4
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import { ODataApi } from '../../api';
|
|
3
|
+
import { ODataModel } from '../../models';
|
|
4
|
+
import { ODataStructuredType } from '../../schema/structured-type';
|
|
5
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';
|
|
6
10
|
import { ODataActionResource } from './action';
|
|
7
|
-
import { ODataApi } from '../../api';
|
|
8
11
|
import { ODataFunctionResource } from './function';
|
|
9
12
|
import { ODataMediaResource } from './media';
|
|
10
|
-
import { ODataModel } from '../../models';
|
|
11
13
|
import { ODataNavigationPropertyResource } from './navigation-property';
|
|
12
14
|
import { ODataOptions } from './options';
|
|
13
|
-
import { ODataPathSegments } from '../path-segments';
|
|
14
15
|
import { ODataPropertyResource } from './property';
|
|
15
|
-
import { ODataQueryOptions } from '../query-options';
|
|
16
16
|
export declare class ODataEntityResource<T> extends ODataResource<T> {
|
|
17
|
-
static factory<E>(api: ODataApi, segments
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, { annots, reset }?: {
|
|
23
|
-
annots?: ODataEntityAnnotations;
|
|
24
|
-
reset?: boolean;
|
|
25
|
-
}): M;
|
|
17
|
+
static factory<E>(api: ODataApi, { schema, segments, query, }: {
|
|
18
|
+
schema?: ODataStructuredType<E>;
|
|
19
|
+
segments: ODataPathSegments;
|
|
20
|
+
query?: ODataQueryOptions<E>;
|
|
21
|
+
}): ODataEntityResource<E>;
|
|
26
22
|
key(value: any): ODataEntityResource<T>;
|
|
27
23
|
keys(values: any[]): ODataEntityResource<T>;
|
|
28
|
-
media(): ODataMediaResource
|
|
24
|
+
media(): ODataMediaResource;
|
|
29
25
|
navigationProperty<N>(path: string): ODataNavigationPropertyResource<N>;
|
|
30
26
|
property<P>(path: string): ODataPropertyResource<P>;
|
|
31
27
|
action<P, R>(path: string): ODataActionResource<P, R>;
|
|
32
28
|
function<P, R>(path: string): ODataFunctionResource<P, R>;
|
|
33
29
|
cast<C>(type: string): ODataEntityResource<C>;
|
|
34
|
-
select(opts: Select<T>): ODataEntityResource<T>;
|
|
35
|
-
expand(opts: Expand<T>): ODataEntityResource<T>;
|
|
36
|
-
format(opts: string): ODataEntityResource<T>;
|
|
37
|
-
get segment(): {
|
|
38
|
-
entitySet(): import("../path-segments").SegmentHandler;
|
|
39
|
-
keys(values?: (EntityKey<T> | undefined)[] | undefined): (EntityKey<any> | undefined)[];
|
|
40
|
-
};
|
|
41
|
-
get query(): {
|
|
42
|
-
select(opts?: Select<T> | undefined): import("../query-options").OptionHandler<Select<T>>;
|
|
43
|
-
expand(opts?: Expand<T> | undefined): import("../query-options").OptionHandler<Expand<T>>;
|
|
44
|
-
compute(opts?: string | undefined): import("../query-options").OptionHandler<string>;
|
|
45
|
-
format(opts?: string | undefined): import("../query-options").OptionHandler<string>;
|
|
46
|
-
apply(query: import("../query-options").ODataQueryArguments<T>): void;
|
|
47
|
-
};
|
|
48
30
|
protected post(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
49
31
|
protected put(attrs: Partial<T>, options?: ODataOptions & {
|
|
50
32
|
etag?: string;
|