angular-odata 0.78.1 → 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/README.md +133 -62
- 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} +12 -5
- package/{esm2015/lib/cache/index.js → esm2020/lib/cache/index.mjs} +0 -0
- package/{esm2015/lib/cache/memory.js → esm2020/lib/cache/memory.mjs} +0 -0
- package/{esm2015/lib/cache/storage.js → esm2020/lib/cache/storage.mjs} +1 -1
- package/esm2020/lib/client.mjs +271 -0
- package/{esm2015/lib/constants.js → esm2020/lib/constants.mjs} +9 -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} +6 -6
- 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.mjs +207 -0
- package/esm2020/lib/resources/query/handlers.mjs +186 -0
- package/esm2020/lib/resources/query/index.mjs +4 -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} +1 -1
- package/esm2020/lib/resources/responses/response.mjs +170 -0
- package/{esm2015/lib/resources/responses/types.js → esm2020/lib/resources/responses/types.mjs} +1 -1
- 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} +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} +5068 -3943
- 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 +17 -16
- package/lib/cache/cache.d.ts +2 -2
- package/lib/client.d.ts +93 -18
- package/lib/constants.d.ts +6 -2
- package/lib/helper.d.ts +3 -3
- package/lib/index.d.ts +0 -1
- package/lib/models/collection.d.ts +36 -47
- package/lib/models/model.d.ts +47 -40
- package/lib/models/options.d.ts +53 -52
- package/lib/options.d.ts +50 -2
- 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.d.ts +63 -0
- package/lib/resources/query/handlers.d.ts +89 -0
- package/lib/resources/query/index.d.ts +3 -0
- package/lib/resources/query/options.d.ts +38 -0
- package/lib/resources/query/syntax.d.ts +175 -0
- package/lib/resources/request.d.ts +8 -6
- package/lib/resources/resource.d.ts +49 -55
- package/lib/resources/responses/metadata.d.ts +1 -1
- package/lib/resources/responses/types.d.ts +1 -1
- package/lib/resources/types/action.d.ts +55 -69
- package/lib/resources/types/batch.d.ts +13 -8
- package/lib/resources/types/count.d.ts +16 -19
- package/lib/resources/types/entity-set.d.ts +24 -62
- package/lib/resources/types/entity.d.ts +35 -43
- package/lib/resources/types/function.d.ts +63 -71
- package/lib/resources/types/media.d.ts +20 -22
- package/lib/resources/types/metadata.d.ts +5 -7
- package/lib/resources/types/navigation-property.d.ts +100 -85
- package/lib/resources/types/options.d.ts +8 -8
- package/lib/resources/types/property.d.ts +63 -73
- package/lib/resources/types/reference.d.ts +72 -16
- package/lib/resources/types/singleton.d.ts +75 -43
- package/lib/resources/types/value.d.ts +18 -9
- package/lib/schema/annotation.d.ts +18 -0
- package/lib/schema/callable.d.ts +27 -11
- package/lib/schema/element.d.ts +39 -0
- package/lib/schema/entity-container.d.ts +3 -8
- package/lib/schema/entity-set.d.ts +3 -9
- package/lib/schema/enum-type.d.ts +41 -14
- 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 +13 -7
- package/lib/{parsers → schema/parsers}/index.d.ts +0 -0
- package/lib/{parsers → schema/parsers}/structured-type.d.ts +14 -9
- package/lib/schema/schema.d.ts +6 -8
- package/lib/schema/structured-type.d.ts +97 -18
- package/lib/services/base.d.ts +12 -12
- package/lib/services/entity-set.d.ts +15 -12
- package/lib/services/entity.d.ts +4 -1
- package/lib/services/singleton.d.ts +6 -3
- package/lib/settings.d.ts +4 -4
- package/lib/types.d.ts +7 -3
- 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 +9 -0
- package/lib/utils/index.d.ts +5 -2
- package/lib/utils/objects.d.ts +1 -1
- package/lib/utils/strings.d.ts +4 -0
- package/lib/utils/types.d.ts +2 -0
- package/package.json +21 -8
- package/bundles/angular-odata.umd.js +0 -10756
- package/bundles/angular-odata.umd.js.map +0 -1
- package/esm2015/lib/api.js +0 -251
- package/esm2015/lib/client.js +0 -197
- package/esm2015/lib/helper.js +0 -269
- package/esm2015/lib/index.js +0 -21
- package/esm2015/lib/models/collection.js +0 -660
- package/esm2015/lib/models/model.js +0 -421
- package/esm2015/lib/models/options.js +0 -889
- package/esm2015/lib/options.js +0 -31
- package/esm2015/lib/parsers/callable.js +0 -110
- package/esm2015/lib/parsers/edm.js +0 -310
- package/esm2015/lib/parsers/enum-type.js +0 -97
- package/esm2015/lib/parsers/index.js +0 -5
- package/esm2015/lib/parsers/structured-type.js +0 -394
- 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 -141
- package/esm2015/lib/resources/resource.js +0 -328
- package/esm2015/lib/resources/responses/annotations.js +0 -121
- package/esm2015/lib/resources/responses/metadata.js +0 -548
- package/esm2015/lib/resources/responses/response.js +0 -170
- package/esm2015/lib/resources/types/action.js +0 -146
- package/esm2015/lib/resources/types/batch.js +0 -330
- package/esm2015/lib/resources/types/count.js +0 -50
- package/esm2015/lib/resources/types/entity-set.js +0 -164
- package/esm2015/lib/resources/types/entity.js +0 -158
- package/esm2015/lib/resources/types/function.js +0 -166
- package/esm2015/lib/resources/types/media.js +0 -46
- package/esm2015/lib/resources/types/metadata.js +0 -36
- package/esm2015/lib/resources/types/navigation-property.js +0 -214
- package/esm2015/lib/resources/types/options.js +0 -2
- package/esm2015/lib/resources/types/property.js +0 -190
- package/esm2015/lib/resources/types/reference.js +0 -50
- package/esm2015/lib/resources/types/singleton.js +0 -147
- package/esm2015/lib/resources/types/value.js +0 -30
- package/esm2015/lib/schema/annotation.js +0 -7
- package/esm2015/lib/schema/callable.js +0 -50
- package/esm2015/lib/schema/entity-container.js +0 -17
- package/esm2015/lib/schema/entity-set.js +0 -23
- package/esm2015/lib/schema/enum-type.js +0 -68
- package/esm2015/lib/schema/schema.js +0 -55
- package/esm2015/lib/schema/structured-type.js +0 -107
- 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 -59
- package/esm2015/lib/utils/index.js +0 -7
- package/esm2015/lib/utils/objects.js +0 -140
- package/esm2015/lib/utils/odata.js +0 -21
- 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
|
@@ -1,84 +1,46 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { Expand, Select, Transform, Filter, OrderBy } from '../builder';
|
|
3
|
-
import { ODataPathSegments } from '../path-segments';
|
|
4
|
-
import { ODataActionResource } from './action';
|
|
5
|
-
import { ODataFunctionResource } from './function';
|
|
6
|
-
import { ODataQueryOptions } from '../query-options';
|
|
7
|
-
import { ODataEntityResource } from './entity';
|
|
8
|
-
import { ODataCountResource } from './count';
|
|
9
|
-
import { EntityKey, ODataResource } from '../resource';
|
|
10
|
-
import { HttpOptions } from './options';
|
|
11
|
-
import { ODataEntity, ODataEntities, ODataEntitiesAnnotations } from '../responses';
|
|
12
|
-
import { ODataModel, ODataCollection } from '../../models';
|
|
13
2
|
import { ODataApi } from '../../api';
|
|
3
|
+
import { ODataCollection, ODataModel } from '../../models';
|
|
4
|
+
import { ODataStructuredType } from '../../schema/structured-type';
|
|
14
5
|
import { QueryOptionNames } from '../../types';
|
|
6
|
+
import { ODataQueryOptions } from '../query';
|
|
7
|
+
import { ODataResource } from '../resource';
|
|
8
|
+
import { ODataEntities, ODataEntity } from '../responses';
|
|
9
|
+
import { ODataActionResource } from './action';
|
|
10
|
+
import { ODataCountResource } from './count';
|
|
11
|
+
import { ODataEntityResource } from './entity';
|
|
12
|
+
import { ODataFunctionResource } from './function';
|
|
13
|
+
import { ODataOptions } from './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
|
-
|
|
32
|
-
|
|
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").QueryArguments<T>): void;
|
|
63
|
-
};
|
|
64
|
-
post(attrs: Partial<T>, options?: HttpOptions): Observable<ODataEntity<T>>;
|
|
65
|
-
get(options?: HttpOptions & {
|
|
23
|
+
count(): ODataCountResource<T>;
|
|
24
|
+
cast<C>(type: string): ODataEntitySetResource<C>;
|
|
25
|
+
protected post(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
26
|
+
protected get(options?: ODataOptions & {
|
|
66
27
|
withCount?: boolean;
|
|
67
28
|
bodyQueryOptions?: QueryOptionNames[];
|
|
68
29
|
}): Observable<ODataEntities<T>>;
|
|
69
|
-
|
|
30
|
+
create(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
31
|
+
fetch(options?: ODataOptions & {
|
|
70
32
|
withCount?: boolean;
|
|
71
33
|
bodyQueryOptions?: QueryOptionNames[];
|
|
72
34
|
}): Observable<ODataEntities<T>>;
|
|
73
|
-
fetchEntities(options?:
|
|
35
|
+
fetchEntities(options?: ODataOptions & {
|
|
74
36
|
withCount?: boolean;
|
|
75
37
|
bodyQueryOptions?: QueryOptionNames[];
|
|
76
38
|
}): Observable<T[] | null>;
|
|
77
|
-
fetchCollection(options?:
|
|
39
|
+
fetchCollection<M extends ODataModel<T>, C extends ODataCollection<T, M>>(options?: ODataOptions & {
|
|
78
40
|
withCount?: boolean;
|
|
79
41
|
bodyQueryOptions?: QueryOptionNames[];
|
|
80
42
|
}): Observable<ODataCollection<T, ODataModel<T>> | null>;
|
|
81
|
-
fetchAll(options?:
|
|
43
|
+
fetchAll(options?: ODataOptions & {
|
|
82
44
|
bodyQueryOptions?: QueryOptionNames[];
|
|
83
45
|
}): Observable<T[]>;
|
|
84
46
|
}
|
|
@@ -1,74 +1,66 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import { ODataApi } from '../../api';
|
|
3
|
+
import { ODataModel } from '../../models';
|
|
4
|
+
import { ODataStructuredType } from '../../schema/structured-type';
|
|
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';
|
|
2
10
|
import { ODataActionResource } from './action';
|
|
3
11
|
import { ODataFunctionResource } from './function';
|
|
12
|
+
import { ODataMediaResource } from './media';
|
|
4
13
|
import { ODataNavigationPropertyResource } from './navigation-property';
|
|
14
|
+
import { ODataOptions } from './options';
|
|
5
15
|
import { ODataPropertyResource } from './property';
|
|
6
|
-
import { Expand, Select } from '../builder';
|
|
7
|
-
import { ODataQueryOptions } from '../query-options';
|
|
8
|
-
import { ODataPathSegments } from '../path-segments';
|
|
9
|
-
import { EntityKey, ODataResource } from '../resource';
|
|
10
|
-
import { HttpOptions } from './options';
|
|
11
|
-
import { ODataMediaResource } from './media';
|
|
12
|
-
import { ODataEntity, ODataEntityAnnotations } from '../responses';
|
|
13
|
-
import { ODataModel } from '../../models';
|
|
14
|
-
import { ODataApi } from '../../api';
|
|
15
|
-
import { QueryOptionNames } from '../../types';
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
format(opts?: string | undefined): import("../query-options").OptionHandler<string>;
|
|
46
|
-
apply(query: import("../query-options").QueryArguments<T>): void;
|
|
47
|
-
};
|
|
48
|
-
get(options?: HttpOptions & {
|
|
30
|
+
protected post(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
31
|
+
protected put(attrs: Partial<T>, options?: ODataOptions & {
|
|
32
|
+
etag?: string;
|
|
33
|
+
}): Observable<ODataEntity<T>>;
|
|
34
|
+
protected patch(attrs: Partial<T>, options?: ODataOptions & {
|
|
35
|
+
etag?: string;
|
|
36
|
+
}): Observable<ODataEntity<T>>;
|
|
37
|
+
protected delete(options?: ODataOptions & {
|
|
38
|
+
etag?: string;
|
|
39
|
+
}): Observable<any>;
|
|
40
|
+
protected get(options?: ODataOptions & {
|
|
49
41
|
etag?: string;
|
|
50
42
|
bodyQueryOptions?: QueryOptionNames[];
|
|
51
43
|
}): Observable<ODataEntity<T>>;
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
create(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
45
|
+
update(attrs: Partial<T>, options?: ODataOptions & {
|
|
54
46
|
etag?: string;
|
|
55
47
|
}): Observable<ODataEntity<T>>;
|
|
56
|
-
|
|
48
|
+
modify(attrs: Partial<T>, options?: ODataOptions & {
|
|
57
49
|
etag?: string;
|
|
58
50
|
}): Observable<ODataEntity<T>>;
|
|
59
|
-
|
|
51
|
+
destroy(options?: ODataOptions & {
|
|
60
52
|
etag?: string;
|
|
61
53
|
}): Observable<any>;
|
|
62
|
-
fetch(options?:
|
|
54
|
+
fetch(options?: ODataOptions & {
|
|
63
55
|
etag?: string;
|
|
64
56
|
bodyQueryOptions?: QueryOptionNames[];
|
|
65
57
|
}): Observable<ODataEntity<T>>;
|
|
66
|
-
fetchEntity(options?:
|
|
58
|
+
fetchEntity(options?: ODataOptions & {
|
|
67
59
|
etag?: string;
|
|
68
60
|
bodyQueryOptions?: QueryOptionNames[];
|
|
69
61
|
}): Observable<T | null>;
|
|
70
|
-
fetchModel(options?:
|
|
62
|
+
fetchModel<M extends ODataModel<T>>(options?: ODataOptions & {
|
|
71
63
|
etag?: string;
|
|
72
64
|
bodyQueryOptions?: QueryOptionNames[];
|
|
73
|
-
}): Observable<
|
|
65
|
+
}): Observable<M | null>;
|
|
74
66
|
}
|
|
@@ -1,100 +1,92 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { ODataPathSegments } from '../path-segments';
|
|
3
|
-
import { ODataQueryOptions } from '../query-options';
|
|
4
|
-
import { HttpEntityOptions, HttpEntitiesOptions, HttpPropertyOptions, HttpOptions, HttpNoneOptions } from './options';
|
|
5
|
-
import { ODataEntity, ODataEntities, ODataProperty, ODataEntityAnnotations, ODataEntitiesAnnotations } from '../responses';
|
|
6
2
|
import { ODataApi } from '../../api';
|
|
7
3
|
import { ODataCollection } from '../../models/collection';
|
|
8
4
|
import { ODataModel } from '../../models/model';
|
|
9
|
-
import {
|
|
5
|
+
import { ODataCallable } from '../../schema/callable';
|
|
6
|
+
import { ODataPathSegments } from '../path';
|
|
7
|
+
import { ODataQueryOptions } from '../query';
|
|
10
8
|
import { ODataResource } from '../resource';
|
|
9
|
+
import { ODataEntities, ODataEntity, ODataProperty } from '../responses';
|
|
10
|
+
import { ODataEntitiesOptions, ODataEntityOptions, ODataNoneOptions, ODataOptions, ODataPropertyOptions } from './options';
|
|
11
11
|
export declare class ODataFunctionResource<P, R> extends ODataResource<R> {
|
|
12
|
-
static factory<P, R>(api: ODataApi, path
|
|
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
|
-
clone(): ODataFunctionResource<P, R>;
|
|
15
|
-
schema(): import("../../schema").ODataCallable<R> | undefined;
|
|
16
|
-
asModel<M extends ODataModel<R>>(entity: Partial<R> | {
|
|
17
|
-
[name: string]: any;
|
|
18
|
-
}, { annots, reset }?: {
|
|
19
|
-
annots?: ODataEntityAnnotations;
|
|
20
|
-
reset?: boolean;
|
|
21
|
-
}): M;
|
|
22
|
-
asCollection<M extends ODataModel<R>, C extends ODataCollection<R, M>>(entities: Partial<R>[] | {
|
|
23
|
-
[name: string]: any;
|
|
24
|
-
}[], { annots, reset, }?: {
|
|
25
|
-
annots?: ODataEntitiesAnnotations;
|
|
26
|
-
reset?: boolean;
|
|
27
|
-
}): C;
|
|
28
20
|
parameters(params: P | null, { alias }?: {
|
|
29
21
|
alias?: boolean;
|
|
30
22
|
}): ODataFunctionResource<P, R>;
|
|
31
|
-
|
|
32
|
-
expand(opts: Expand<R>): ODataFunctionResource<P, R>;
|
|
33
|
-
transform(opts: Transform<R>): ODataFunctionResource<P, R>;
|
|
34
|
-
search(opts: string): ODataFunctionResource<P, R>;
|
|
35
|
-
filter(opts: Filter): ODataFunctionResource<P, R>;
|
|
36
|
-
orderBy(opts: OrderBy<R>): ODataFunctionResource<P, R>;
|
|
37
|
-
format(opts: string): ODataFunctionResource<P, R>;
|
|
38
|
-
top(opts: number): ODataFunctionResource<P, R>;
|
|
39
|
-
skip(opts: number): ODataFunctionResource<P, R>;
|
|
40
|
-
skiptoken(opts: string): ODataFunctionResource<P, R>;
|
|
41
|
-
get segment(): {
|
|
42
|
-
entitySet(): import("../path-segments").SegmentHandler;
|
|
43
|
-
singleton(): import("../path-segments").SegmentHandler;
|
|
44
|
-
function(): import("../path-segments").SegmentHandler;
|
|
45
|
-
};
|
|
23
|
+
protected get(options?: ODataEntityOptions & ODataEntitiesOptions & ODataPropertyOptions): Observable<any>;
|
|
46
24
|
/**
|
|
47
|
-
*
|
|
48
|
-
* @
|
|
25
|
+
* Execute the function
|
|
26
|
+
* @param params Parameters to be sent to the function
|
|
27
|
+
* @param alias If true, the parameters will be send using aliases
|
|
28
|
+
* @param options Options for the request
|
|
49
29
|
*/
|
|
50
|
-
get query(): {
|
|
51
|
-
select(opts?: Select<R> | undefined): import("../query-options").OptionHandler<Select<R>>;
|
|
52
|
-
expand(opts?: Expand<R> | undefined): import("../query-options").OptionHandler<Expand<R>>;
|
|
53
|
-
compute(opts?: string | undefined): import("../query-options").OptionHandler<string>;
|
|
54
|
-
transform(opts?: Transform<R> | undefined): import("../query-options").OptionHandler<Transform<R>>;
|
|
55
|
-
search(opts?: string | undefined): import("../query-options").OptionHandler<string>;
|
|
56
|
-
filter(opts?: Filter | undefined): import("../query-options").OptionHandler<Filter>;
|
|
57
|
-
orderBy(opts?: OrderBy<R> | undefined): import("../query-options").OptionHandler<OrderBy<R>>;
|
|
58
|
-
format(opts?: string | undefined): import("../query-options").OptionHandler<string>;
|
|
59
|
-
top(opts?: number | undefined): import("../query-options").OptionHandler<number>;
|
|
60
|
-
skip(opts?: number | undefined): import("../query-options").OptionHandler<number>;
|
|
61
|
-
skiptoken(opts?: string | undefined): import("../query-options").OptionHandler<string>;
|
|
62
|
-
paging({ skip, skiptoken, top, }?: {
|
|
63
|
-
skip?: number | undefined;
|
|
64
|
-
skiptoken?: string | undefined;
|
|
65
|
-
top?: number | undefined;
|
|
66
|
-
}): void;
|
|
67
|
-
clearPaging(): void;
|
|
68
|
-
apply(query: import("../query-options").QueryArguments<R>): void;
|
|
69
|
-
};
|
|
70
|
-
get(options?: HttpEntityOptions): Observable<ODataEntity<R>>;
|
|
71
|
-
get(options?: HttpEntitiesOptions): Observable<ODataEntities<R>>;
|
|
72
|
-
get(options?: HttpPropertyOptions): Observable<ODataProperty<R>>;
|
|
73
30
|
call(params: P | null, options?: {
|
|
74
31
|
alias?: boolean;
|
|
75
|
-
} &
|
|
32
|
+
} & ODataEntityOptions): Observable<ODataEntity<R>>;
|
|
76
33
|
call(params: P | null, options?: {
|
|
77
34
|
alias?: boolean;
|
|
78
|
-
} &
|
|
35
|
+
} & ODataEntitiesOptions): Observable<ODataEntities<R>>;
|
|
79
36
|
call(params: P | null, options?: {
|
|
80
37
|
alias?: boolean;
|
|
81
|
-
} &
|
|
38
|
+
} & ODataPropertyOptions): Observable<ODataProperty<R>>;
|
|
82
39
|
call(params: P | null, options?: {
|
|
83
40
|
alias?: boolean;
|
|
84
|
-
} &
|
|
41
|
+
} & ODataNoneOptions): Observable<null>;
|
|
42
|
+
/**
|
|
43
|
+
* Execute the function with the given parameters and return the result as a property
|
|
44
|
+
* @param params Parameters to be sent to the function
|
|
45
|
+
* @param alias If true, the parameters will be send using aliases
|
|
46
|
+
* @param options Options for the request
|
|
47
|
+
* @returns Observable of the result of the function
|
|
48
|
+
*/
|
|
85
49
|
callProperty(params: P | null, { alias, ...options }?: {
|
|
86
50
|
alias?: boolean;
|
|
87
|
-
} &
|
|
51
|
+
} & ODataOptions): Observable<R | null>;
|
|
52
|
+
/**
|
|
53
|
+
* Execute the function with the given parameters and return the result as a entity
|
|
54
|
+
* @param params Parameters to be sent to the function
|
|
55
|
+
* @param alias If true, the parameters will be send using aliases
|
|
56
|
+
* @param options Options for the request
|
|
57
|
+
* @returns Observable of the result of the function
|
|
58
|
+
*/
|
|
88
59
|
callEntity(params: P | null, { alias, ...options }?: {
|
|
89
60
|
alias?: boolean;
|
|
90
|
-
} &
|
|
91
|
-
|
|
61
|
+
} & ODataOptions): Observable<R | null>;
|
|
62
|
+
/**
|
|
63
|
+
* Execute the function with the given parameters and return the result as a model
|
|
64
|
+
* @param params Parameters to be sent to the function
|
|
65
|
+
* @param alias If true, the parameters will be send using aliases
|
|
66
|
+
* @param options Options for the request
|
|
67
|
+
* @returns Observable of the result of the function
|
|
68
|
+
*/
|
|
69
|
+
callModel<M extends ODataModel<R>>(params: P | null, { alias, ...options }?: {
|
|
92
70
|
alias?: boolean;
|
|
93
|
-
} &
|
|
71
|
+
} & ODataOptions): Observable<M | null>;
|
|
72
|
+
/**
|
|
73
|
+
* Execute the function with the given parameters and return the result as a entities
|
|
74
|
+
* @param params Parameters to be sent to the function
|
|
75
|
+
* @param alias If true, the parameters will be send using aliases
|
|
76
|
+
* @param options Options for the request
|
|
77
|
+
* @returns Observable of the result of the function
|
|
78
|
+
*/
|
|
94
79
|
callEntities(params: P | null, { alias, ...options }?: {
|
|
95
80
|
alias?: boolean;
|
|
96
|
-
} &
|
|
97
|
-
|
|
81
|
+
} & ODataOptions): Observable<R[] | null>;
|
|
82
|
+
/**
|
|
83
|
+
* Execute the function with the given parameters and return the result as a collection
|
|
84
|
+
* @param params Parameters to be sent to the function
|
|
85
|
+
* @param alias If true, the parameters will be send using aliases
|
|
86
|
+
* @param options Options for the request
|
|
87
|
+
* @returns Observable of the result of the function
|
|
88
|
+
*/
|
|
89
|
+
callCollection<M extends ODataModel<R>, C extends ODataCollection<R, M>>(params: P | null, { alias, ...options }?: {
|
|
98
90
|
alias?: boolean;
|
|
99
|
-
} &
|
|
91
|
+
} & ODataOptions): Observable<C | null>;
|
|
100
92
|
}
|
|
@@ -1,37 +1,35 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { ODataResource } from '../resource';
|
|
3
|
-
import { ODataPathSegments } from '../path-segments';
|
|
4
|
-
import { ODataQueryOptions } from '../query-options';
|
|
5
|
-
import { HttpOptions } from './options';
|
|
6
2
|
import { ODataApi } from '../../api';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
3
|
+
import { ODataPathSegments } from '../path';
|
|
4
|
+
import { ODataQueryOptions } from '../query';
|
|
5
|
+
import { ODataResource } from '../resource';
|
|
6
|
+
import { ODataOptions } from './options';
|
|
7
|
+
export declare class ODataMediaResource extends ODataResource<any> {
|
|
8
|
+
static factory<V>(api: ODataApi, { segments, query, }: {
|
|
9
|
+
segments: ODataPathSegments;
|
|
10
|
+
query?: ODataQueryOptions<V>;
|
|
11
|
+
}): ODataMediaResource;
|
|
12
|
+
protected get(options: {
|
|
13
|
+
responseType: any;
|
|
14
|
+
} & ODataOptions): Observable<any>;
|
|
15
|
+
protected put(data: ArrayBuffer | Blob, options?: ODataOptions & {
|
|
18
16
|
etag?: string;
|
|
19
17
|
}): Observable<any>;
|
|
20
18
|
fetch(options?: {
|
|
21
19
|
responseType: 'arraybuffer';
|
|
22
|
-
} &
|
|
20
|
+
} & ODataOptions): Observable<ArrayBuffer>;
|
|
23
21
|
fetch(options?: {
|
|
24
22
|
responseType: 'blob';
|
|
25
|
-
} &
|
|
26
|
-
fetchArraybuffer(options?:
|
|
27
|
-
fetchBlob(options?:
|
|
28
|
-
upload(data: ArrayBuffer | Blob, options?:
|
|
23
|
+
} & ODataOptions): Observable<Blob>;
|
|
24
|
+
fetchArraybuffer(options?: ODataOptions): Observable<ArrayBuffer>;
|
|
25
|
+
fetchBlob(options?: ODataOptions): Observable<Blob>;
|
|
26
|
+
upload(data: ArrayBuffer | Blob, options?: ODataOptions & {
|
|
29
27
|
etag?: string;
|
|
30
28
|
}): Observable<any>;
|
|
31
|
-
uploadArrayBuffer(data: ArrayBuffer, contentType: string, options?:
|
|
29
|
+
uploadArrayBuffer(data: ArrayBuffer, contentType: string, options?: ODataOptions & {
|
|
32
30
|
etag?: string;
|
|
33
31
|
}): Observable<any>;
|
|
34
|
-
uploadBlob(data: Blob, options?:
|
|
32
|
+
uploadBlob(data: Blob, options?: ODataOptions & {
|
|
35
33
|
etag?: string;
|
|
36
34
|
}): Observable<any>;
|
|
37
35
|
}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import { ODataApi } from '../../api';
|
|
3
|
+
import { ODataPathSegments } from '../path';
|
|
2
4
|
import { ODataResource } from '../resource';
|
|
3
|
-
import { ODataPathSegments } from '../path-segments';
|
|
4
|
-
import { HttpOptions } from './options';
|
|
5
5
|
import { ODataMetadata } from '../responses';
|
|
6
|
-
import {
|
|
6
|
+
import { ODataOptions } from './options';
|
|
7
7
|
export declare class ODataMetadataResource extends ODataResource<any> {
|
|
8
8
|
constructor(api: ODataApi, segments?: ODataPathSegments);
|
|
9
|
-
clone(): ODataMetadataResource;
|
|
10
|
-
schema(): undefined;
|
|
11
9
|
static factory(api: ODataApi): ODataMetadataResource;
|
|
12
|
-
get(options?:
|
|
13
|
-
fetch(options?:
|
|
10
|
+
protected get(options?: ODataOptions): Observable<ODataMetadata>;
|
|
11
|
+
fetch(options?: ODataOptions): Observable<ODataMetadata>;
|
|
14
12
|
}
|