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.
- package/fesm2022/angular-odata.mjs +276 -543
- package/fesm2022/angular-odata.mjs.map +1 -1
- package/index.d.ts +6403 -3
- package/package.json +3 -3
- package/schematics/apigen/angular/base.js +2 -6
- package/schematics/apigen/angular/base.js.map +1 -1
- package/schematics/apigen/angular/entity.js +1 -2
- package/schematics/apigen/angular/entity.js.map +1 -1
- package/schematics/apigen/index.js +2 -6
- package/schematics/apigen/index.js.map +1 -1
- package/schematics/apigen/metadata/csdl/csdl-annotation.js +1 -2
- package/schematics/apigen/metadata/csdl/csdl-annotation.js.map +1 -1
- package/schematics/apigen/metadata/csdl/csdl-entity-container.js.map +1 -1
- package/schematics/apigen/metadata/csdl/csdl-entity-set.js.map +1 -1
- package/schematics/apigen/metadata/csdl/csdl-enum-type.d.ts +1 -1
- package/schematics/apigen/metadata/csdl/csdl-enum-type.js +1 -1
- package/schematics/apigen/metadata/csdl/csdl-enum-type.js.map +1 -1
- package/schematics/apigen/metadata/csdl/csdl-function-action.d.ts +1 -1
- package/schematics/apigen/metadata/csdl/csdl-reference.js +1 -2
- package/schematics/apigen/metadata/csdl/csdl-reference.js.map +1 -1
- package/schematics/apigen/metadata/csdl/csdl-schema.js +1 -2
- package/schematics/apigen/metadata/csdl/csdl-schema.js.map +1 -1
- package/schematics/apigen/metadata/csdl/csdl-singleton.js.map +1 -1
- package/schematics/apigen/metadata/csdl/csdl-structural-property.d.ts +1 -1
- package/schematics/apigen/metadata/csdl/csdl-structural-property.js +2 -3
- package/schematics/apigen/metadata/csdl/csdl-structural-property.js.map +1 -1
- package/schematics/apigen/metadata/csdl/csdl-structured-type.d.ts +1 -1
- package/schematics/apigen/metadata/csdl/csdl-structured-type.js +1 -2
- package/schematics/apigen/metadata/csdl/csdl-structured-type.js.map +1 -1
- package/schematics/apigen/metadata/parser.js +1 -3
- package/schematics/apigen/metadata/parser.js.map +1 -1
- package/schematics/apigen/utils.js +2 -4
- package/schematics/apigen/utils.js.map +1 -1
- package/lib/annotations.d.ts +0 -75
- package/lib/api.d.ts +0 -107
- package/lib/cache/cache.d.ts +0 -104
- package/lib/cache/index.d.ts +0 -3
- package/lib/cache/memory.d.ts +0 -19
- package/lib/cache/storage.d.ts +0 -35
- package/lib/client.d.ts +0 -613
- package/lib/constants.d.ts +0 -70
- package/lib/helper.d.ts +0 -75
- package/lib/index.d.ts +0 -14
- package/lib/loaders.d.ts +0 -21
- package/lib/metadata/csdl/csdl-annotation.d.ts +0 -159
- package/lib/metadata/csdl/csdl-entity-container.d.ts +0 -31
- package/lib/metadata/csdl/csdl-entity-set.d.ts +0 -25
- package/lib/metadata/csdl/csdl-enum-type.d.ts +0 -37
- package/lib/metadata/csdl/csdl-function-action.d.ts +0 -148
- package/lib/metadata/csdl/csdl-navigation-property-binding.d.ts +0 -12
- package/lib/metadata/csdl/csdl-reference.d.ts +0 -53
- package/lib/metadata/csdl/csdl-schema.d.ts +0 -37
- package/lib/metadata/csdl/csdl-singleton.d.ts +0 -21
- package/lib/metadata/csdl/csdl-structural-property.d.ts +0 -86
- package/lib/metadata/csdl/csdl-structured-type.d.ts +0 -94
- package/lib/metadata/csdl/csdl-type-definition.d.ts +0 -25
- package/lib/metadata/index.d.ts +0 -2
- package/lib/metadata/metadata.d.ts +0 -23
- package/lib/metadata/parser.d.ts +0 -110
- package/lib/models/collection.d.ts +0 -183
- package/lib/models/index.d.ts +0 -3
- package/lib/models/model.d.ts +0 -176
- package/lib/models/options.d.ts +0 -368
- package/lib/module.d.ts +0 -19
- package/lib/options.d.ts +0 -101
- package/lib/resources/index.d.ts +0 -6
- package/lib/resources/options.d.ts +0 -18
- package/lib/resources/path/handlers.d.ts +0 -29
- package/lib/resources/path/index.d.ts +0 -2
- package/lib/resources/path/segments.d.ts +0 -54
- package/lib/resources/query/builder.d.ts +0 -103
- package/lib/resources/query/expressions/apply.d.ts +0 -125
- package/lib/resources/query/expressions/base.d.ts +0 -25
- package/lib/resources/query/expressions/compute.d.ts +0 -39
- package/lib/resources/query/expressions/count.d.ts +0 -58
- package/lib/resources/query/expressions/expand.d.ts +0 -69
- package/lib/resources/query/expressions/filter.d.ts +0 -77
- package/lib/resources/query/expressions/index.d.ts +0 -9
- package/lib/resources/query/expressions/orderby.d.ts +0 -55
- package/lib/resources/query/expressions/search.d.ts +0 -63
- package/lib/resources/query/expressions/select.d.ts +0 -34
- package/lib/resources/query/expressions/syntax.d.ts +0 -313
- package/lib/resources/query/handlers.d.ts +0 -270
- package/lib/resources/query/index.d.ts +0 -4
- package/lib/resources/query/options.d.ts +0 -60
- package/lib/resources/request.d.ts +0 -64
- package/lib/resources/resource.d.ts +0 -161
- package/lib/resources/response.d.ts +0 -82
- package/lib/resources/types/action.d.ts +0 -84
- package/lib/resources/types/batch.d.ts +0 -62
- package/lib/resources/types/count.d.ts +0 -20
- package/lib/resources/types/entity-set.d.ts +0 -79
- package/lib/resources/types/entity.d.ts +0 -54
- package/lib/resources/types/function.d.ts +0 -108
- package/lib/resources/types/index.d.ts +0 -14
- package/lib/resources/types/media.d.ts +0 -28
- package/lib/resources/types/metadata.d.ts +0 -13
- package/lib/resources/types/navigation-property.d.ts +0 -157
- package/lib/resources/types/options.d.ts +0 -32
- package/lib/resources/types/property.d.ts +0 -115
- package/lib/resources/types/reference.d.ts +0 -74
- package/lib/resources/types/singleton.d.ts +0 -87
- package/lib/resources/types/value.d.ts +0 -19
- package/lib/schema/annotation.d.ts +0 -28
- package/lib/schema/callable.d.ts +0 -41
- package/lib/schema/element.d.ts +0 -52
- package/lib/schema/entity-container.d.ts +0 -10
- package/lib/schema/entity-set.d.ts +0 -10
- package/lib/schema/enum-type.d.ts +0 -55
- package/lib/schema/index.d.ts +0 -8
- package/lib/schema/parsers/callable.d.ts +0 -47
- package/lib/schema/parsers/edm.d.ts +0 -4
- package/lib/schema/parsers/enum-type.d.ts +0 -56
- package/lib/schema/parsers/index.d.ts +0 -4
- package/lib/schema/parsers/structured-type.d.ts +0 -172
- package/lib/schema/schema.d.ts +0 -26
- package/lib/schema/singleton.d.ts +0 -10
- package/lib/schema/structured-type.d.ts +0 -152
- package/lib/services/base.d.ts +0 -20
- package/lib/services/entity-set.d.ts +0 -120
- package/lib/services/entity.d.ts +0 -11
- package/lib/services/factory.d.ts +0 -33
- package/lib/services/index.d.ts +0 -4
- package/lib/services/singleton.d.ts +0 -44
- package/lib/settings.d.ts +0 -26
- package/lib/types.d.ts +0 -285
- package/lib/utils/arraybuffers.d.ts +0 -4
- package/lib/utils/arrays.d.ts +0 -3
- package/lib/utils/dates.d.ts +0 -3
- package/lib/utils/durations.d.ts +0 -14
- package/lib/utils/enums.d.ts +0 -23
- package/lib/utils/http.d.ts +0 -22
- package/lib/utils/index.d.ts +0 -9
- package/lib/utils/objects.d.ts +0 -37
- package/lib/utils/odata.d.ts +0 -4
- package/lib/utils/strings.d.ts +0 -7
- package/lib/utils/types.d.ts +0 -11
- package/lib/utils/urls.d.ts +0 -4
- package/public-api.d.ts +0 -1
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { ODataApi } from '../../api';
|
|
3
|
-
import { ODataCollection } from '../../models/collection';
|
|
4
|
-
import { ODataModel } from '../../models/model';
|
|
5
|
-
import { ODataPathSegments } from '../path';
|
|
6
|
-
import { ODataResource } from '../resource';
|
|
7
|
-
import { ODataEntitiesOptions, ODataEntityOptions, ODataOptions, ODataPropertyOptions } from './options';
|
|
8
|
-
import { ODataEntities, ODataEntity, ODataProperty } from '../response';
|
|
9
|
-
export declare class ODataFunctionResource<P, R> extends ODataResource<R> {
|
|
10
|
-
static factory<P, R>(api: ODataApi, { path, outgoingType, incomingType, bindingType, segments, }: {
|
|
11
|
-
path: string;
|
|
12
|
-
outgoingType?: string;
|
|
13
|
-
incomingType?: string;
|
|
14
|
-
bindingType?: string;
|
|
15
|
-
segments?: ODataPathSegments;
|
|
16
|
-
}): ODataFunctionResource<P, R>;
|
|
17
|
-
static fromResource<P, R>(resource: ODataResource<any>, path: string): ODataFunctionResource<P, R>;
|
|
18
|
-
clone(): ODataFunctionResource<P, R>;
|
|
19
|
-
parameters(params: P | null, { alias }?: {
|
|
20
|
-
alias?: boolean;
|
|
21
|
-
}): ODataFunctionResource<P, R>;
|
|
22
|
-
protected get(options?: ODataEntityOptions & ODataEntitiesOptions & ODataPropertyOptions): Observable<any>;
|
|
23
|
-
/**
|
|
24
|
-
* Execute the function
|
|
25
|
-
* @param params Parameters to be sent to the function
|
|
26
|
-
* @param alias If true, the parameters will be send using aliases
|
|
27
|
-
* @param options Options for the request
|
|
28
|
-
*/
|
|
29
|
-
call(params: P | null, options?: {
|
|
30
|
-
alias?: boolean;
|
|
31
|
-
} & ODataEntityOptions): Observable<ODataEntity<R>>;
|
|
32
|
-
call(params: P | null, options?: {
|
|
33
|
-
alias?: boolean;
|
|
34
|
-
} & ODataEntitiesOptions): Observable<ODataEntities<R>>;
|
|
35
|
-
call(params: P | null, options?: {
|
|
36
|
-
alias?: boolean;
|
|
37
|
-
} & ODataPropertyOptions): Observable<ODataProperty<R>>;
|
|
38
|
-
call(params: P | null, options?: {
|
|
39
|
-
alias?: boolean;
|
|
40
|
-
responseType?: 'blob';
|
|
41
|
-
} & ODataOptions): Observable<Blob>;
|
|
42
|
-
call(params: P | null, options?: {
|
|
43
|
-
alias?: boolean;
|
|
44
|
-
responseType?: 'arraybuffer';
|
|
45
|
-
} & ODataOptions): Observable<ArrayBuffer>;
|
|
46
|
-
call(params: P | null, options?: {
|
|
47
|
-
alias?: boolean;
|
|
48
|
-
responseType?: 'none';
|
|
49
|
-
} & ODataOptions): Observable<null>;
|
|
50
|
-
/**
|
|
51
|
-
* Execute the function with the given parameters and return the result as a property
|
|
52
|
-
* @param params Parameters to be sent to the function
|
|
53
|
-
* @param alias If true, the parameters will be send using aliases
|
|
54
|
-
* @param options Options for the request
|
|
55
|
-
* @returns Observable of the result of the function
|
|
56
|
-
*/
|
|
57
|
-
callProperty(params: P | null, { alias, ...options }?: {
|
|
58
|
-
alias?: boolean;
|
|
59
|
-
} & ODataOptions): Observable<R | null>;
|
|
60
|
-
/**
|
|
61
|
-
* Execute the function with the given parameters and return the result as a entity
|
|
62
|
-
* @param params Parameters to be sent to the function
|
|
63
|
-
* @param alias If true, the parameters will be send using aliases
|
|
64
|
-
* @param options Options for the request
|
|
65
|
-
* @returns Observable of the result of the function
|
|
66
|
-
*/
|
|
67
|
-
callEntity(params: P | null, { alias, ...options }?: {
|
|
68
|
-
alias?: boolean;
|
|
69
|
-
} & ODataOptions): Observable<R | null>;
|
|
70
|
-
/**
|
|
71
|
-
* Execute the function with the given parameters and return the result as a model
|
|
72
|
-
* @param params Parameters to be sent to the function
|
|
73
|
-
* @param alias If true, the parameters will be send using aliases
|
|
74
|
-
* @param options Options for the request
|
|
75
|
-
* @returns Observable of the result of the function
|
|
76
|
-
*/
|
|
77
|
-
callModel(params: P | null, { alias, ModelType, ...options }?: ODataOptions & {
|
|
78
|
-
alias?: boolean;
|
|
79
|
-
ModelType?: typeof ODataModel;
|
|
80
|
-
}): Observable<(ODataModel<R> & import("angular-odata").ModelInterface<R>) | null>;
|
|
81
|
-
/**
|
|
82
|
-
* Execute the function with the given parameters and return the result as a entities
|
|
83
|
-
* @param params Parameters to be sent to the function
|
|
84
|
-
* @param alias If true, the parameters will be send using aliases
|
|
85
|
-
* @param options Options for the request
|
|
86
|
-
* @returns Observable of the result of the function
|
|
87
|
-
*/
|
|
88
|
-
callEntities(params: P | null, { alias, ...options }?: {
|
|
89
|
-
alias?: boolean;
|
|
90
|
-
} & ODataOptions): Observable<R[] | null>;
|
|
91
|
-
/**
|
|
92
|
-
* Execute the function with the given parameters and return the result as a collection
|
|
93
|
-
* @param params Parameters to be sent to the function
|
|
94
|
-
* @param alias If true, the parameters will be send using aliases
|
|
95
|
-
* @param options Options for the request
|
|
96
|
-
* @returns Observable of the result of the function
|
|
97
|
-
*/
|
|
98
|
-
callCollection(params: P | null, { alias, CollectionType, ...options }?: {
|
|
99
|
-
alias?: boolean;
|
|
100
|
-
CollectionType?: typeof ODataCollection;
|
|
101
|
-
} & ODataOptions): Observable<ODataCollection<R, ODataModel<R> & import("angular-odata").ModelInterface<R>> | null>;
|
|
102
|
-
callArraybuffer(params: P | null, { alias, ...options }?: {
|
|
103
|
-
alias?: boolean;
|
|
104
|
-
} & ODataOptions): Observable<ArrayBuffer>;
|
|
105
|
-
callBlob(params: P | null, { alias, ...options }?: {
|
|
106
|
-
alias?: boolean;
|
|
107
|
-
} & ODataOptions): Observable<Blob>;
|
|
108
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export * from './options';
|
|
2
|
-
export * from './action';
|
|
3
|
-
export * from './batch';
|
|
4
|
-
export * from './count';
|
|
5
|
-
export * from './entity';
|
|
6
|
-
export * from './entity-set';
|
|
7
|
-
export * from './function';
|
|
8
|
-
export * from './metadata';
|
|
9
|
-
export * from './navigation-property';
|
|
10
|
-
export * from './property';
|
|
11
|
-
export * from './reference';
|
|
12
|
-
export * from './singleton';
|
|
13
|
-
export * from './media';
|
|
14
|
-
export * from './value';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { ODataApi } from '../../api';
|
|
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
|
-
clone(): ODataMediaResource;
|
|
13
|
-
protected get(options: {
|
|
14
|
-
responseType: 'arraybuffer' | 'blob';
|
|
15
|
-
} & ODataOptions): Observable<any>;
|
|
16
|
-
protected put(data: ArrayBuffer | Blob, options?: ODataOptions): Observable<any>;
|
|
17
|
-
fetch(options: {
|
|
18
|
-
responseType: 'arraybuffer';
|
|
19
|
-
} & ODataOptions): Observable<ArrayBuffer>;
|
|
20
|
-
fetch(options: {
|
|
21
|
-
responseType: 'blob';
|
|
22
|
-
} & ODataOptions): Observable<Blob>;
|
|
23
|
-
fetchArraybuffer(options?: ODataOptions): Observable<ArrayBuffer>;
|
|
24
|
-
fetchBlob(options?: ODataOptions): Observable<Blob>;
|
|
25
|
-
upload(data: ArrayBuffer | Blob, options?: ODataOptions): Observable<any>;
|
|
26
|
-
uploadArrayBuffer(data: ArrayBuffer, contentType: string, options?: ODataOptions): Observable<any>;
|
|
27
|
-
uploadBlob(data: Blob, options?: ODataOptions): Observable<any>;
|
|
28
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { ODataApi } from '../../api';
|
|
3
|
-
import { ODataPathSegments } from '../path';
|
|
4
|
-
import { ODataResource } from '../resource';
|
|
5
|
-
import { ODataOptions } from './options';
|
|
6
|
-
import { ODataMetadata } from '../../metadata/metadata';
|
|
7
|
-
export declare class ODataMetadataResource extends ODataResource<any> {
|
|
8
|
-
constructor(api: ODataApi, segments?: ODataPathSegments);
|
|
9
|
-
static factory(api: ODataApi): ODataMetadataResource;
|
|
10
|
-
clone(): ODataMetadataResource;
|
|
11
|
-
protected get(options?: ODataOptions): Observable<any>;
|
|
12
|
-
fetch(options?: ODataOptions): Observable<ODataMetadata>;
|
|
13
|
-
}
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { ODataApi } from '../../api';
|
|
3
|
-
import type { ModelInterface, ODataCollection, ODataModel } from '../../models';
|
|
4
|
-
import { QueryOption, ODataStructuredTypeFieldConfig } from '../../types';
|
|
5
|
-
import { ODataPathSegments } from '../path';
|
|
6
|
-
import { ApplyExpression, ApplyExpressionBuilder } from '../query';
|
|
7
|
-
import { ODataResource } from '../resource';
|
|
8
|
-
import { ODataEntities, ODataEntity } from '../response';
|
|
9
|
-
import { ODataCountResource } from './count';
|
|
10
|
-
import { ODataMediaResource } from './media';
|
|
11
|
-
import { ODataEntitiesOptions, ODataEntityOptions, ODataOptions } from './options';
|
|
12
|
-
import { ODataPropertyResource } from './property';
|
|
13
|
-
import { ODataReferenceResource } from './reference';
|
|
14
|
-
import { ODataEntitiesAnnotations } from '../../annotations';
|
|
15
|
-
/**
|
|
16
|
-
* OData Navigation Property Resource
|
|
17
|
-
* https://www.odata.org/getting-started/advanced-tutorial/#containment
|
|
18
|
-
* https://www.odata.org/getting-started/advanced-tutorial/#derived
|
|
19
|
-
*/
|
|
20
|
-
export declare class ODataNavigationPropertyResource<T> extends ODataResource<T> {
|
|
21
|
-
static factory<N>(api: ODataApi, { path, type, segments, }: {
|
|
22
|
-
path: string;
|
|
23
|
-
type?: string;
|
|
24
|
-
segments: ODataPathSegments;
|
|
25
|
-
}): ODataNavigationPropertyResource<N>;
|
|
26
|
-
static fromResource<N>(resource: ODataResource<any>, path: string): ODataNavigationPropertyResource<N>;
|
|
27
|
-
clone(): ODataNavigationPropertyResource<T>;
|
|
28
|
-
transform<R>(opts: (builder: ApplyExpressionBuilder<T>, current?: ApplyExpression<T>) => ApplyExpression<T>, { type, fields, }?: {
|
|
29
|
-
type?: string;
|
|
30
|
-
fields?: {
|
|
31
|
-
[name: string]: ODataStructuredTypeFieldConfig;
|
|
32
|
-
};
|
|
33
|
-
}): ODataNavigationPropertyResource<R>;
|
|
34
|
-
key(value: any): ODataNavigationPropertyResource<T>;
|
|
35
|
-
keys(values: any[]): ODataNavigationPropertyResource<T>;
|
|
36
|
-
media(): ODataMediaResource;
|
|
37
|
-
reference(): ODataReferenceResource<T>;
|
|
38
|
-
navigationProperty<N>(path: string): ODataNavigationPropertyResource<N>;
|
|
39
|
-
property<P>(path: string): ODataPropertyResource<P>;
|
|
40
|
-
count(): ODataCountResource<T>;
|
|
41
|
-
cast<C>(type: string): ODataNavigationPropertyResource<C>;
|
|
42
|
-
protected post(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
43
|
-
protected put(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
44
|
-
protected patch(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
45
|
-
protected delete(options?: ODataOptions): Observable<any>;
|
|
46
|
-
protected get(options?: ODataEntityOptions & ODataEntitiesOptions & {
|
|
47
|
-
bodyQueryOptions?: QueryOption[];
|
|
48
|
-
}): Observable<any>;
|
|
49
|
-
/**
|
|
50
|
-
* Create a new entity
|
|
51
|
-
* @param attrs The entity attributes
|
|
52
|
-
* @param options Options for the request
|
|
53
|
-
* @returns The created entity with the annotations
|
|
54
|
-
*/
|
|
55
|
-
create(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
56
|
-
/**
|
|
57
|
-
* Update an existing entity
|
|
58
|
-
* @param attrs The entity attributes
|
|
59
|
-
* @param options Options for the request
|
|
60
|
-
* @returns The updated entity with the annotations
|
|
61
|
-
*/
|
|
62
|
-
update(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
63
|
-
/**
|
|
64
|
-
* Modify an existing entity
|
|
65
|
-
* @param attrs The entity attributes
|
|
66
|
-
* @param options Options for the request
|
|
67
|
-
* @returns The modified entity with the annotations
|
|
68
|
-
*/
|
|
69
|
-
modify(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
70
|
-
/**
|
|
71
|
-
* Delete an existing entity
|
|
72
|
-
* @param options Options for the request
|
|
73
|
-
* @returns An observable of the destroy
|
|
74
|
-
*/
|
|
75
|
-
destroy(options?: ODataOptions): Observable<any>;
|
|
76
|
-
/**
|
|
77
|
-
* Fetch entity / entities
|
|
78
|
-
* @param options Options for the request
|
|
79
|
-
* @return An observable of the entity or entities with annotations
|
|
80
|
-
*/
|
|
81
|
-
fetch(options?: ODataEntityOptions & {
|
|
82
|
-
bodyQueryOptions?: QueryOption[];
|
|
83
|
-
}): Observable<ODataEntity<T>>;
|
|
84
|
-
fetch(options?: ODataEntitiesOptions & {
|
|
85
|
-
bodyQueryOptions?: QueryOption[];
|
|
86
|
-
}): Observable<ODataEntities<T>>;
|
|
87
|
-
/**
|
|
88
|
-
* Fetch the entity
|
|
89
|
-
* @param options Options for the request
|
|
90
|
-
* @returns The entity
|
|
91
|
-
*/
|
|
92
|
-
fetchEntity(options?: ODataOptions & {
|
|
93
|
-
bodyQueryOptions?: QueryOption[];
|
|
94
|
-
}): Observable<T | null>;
|
|
95
|
-
/**
|
|
96
|
-
* Fetch the entity and return as model
|
|
97
|
-
* @param options Options for the request
|
|
98
|
-
* @returns The model
|
|
99
|
-
*/
|
|
100
|
-
fetchModel(options?: ODataOptions & {
|
|
101
|
-
bodyQueryOptions?: QueryOption[];
|
|
102
|
-
ModelType?: typeof ODataModel;
|
|
103
|
-
}): Observable<(ODataModel<T> & ModelInterface<T>) | null>;
|
|
104
|
-
fetchModel<M extends ODataModel<T>>(options?: ODataOptions & {
|
|
105
|
-
bodyQueryOptions?: QueryOption[];
|
|
106
|
-
ModelType?: typeof ODataModel;
|
|
107
|
-
}): Observable<M | null>;
|
|
108
|
-
/**
|
|
109
|
-
* Fetch entities
|
|
110
|
-
* @param options Options for the request
|
|
111
|
-
* @returns The entities
|
|
112
|
-
*/
|
|
113
|
-
fetchEntities(options?: ODataOptions & {
|
|
114
|
-
bodyQueryOptions?: QueryOption[];
|
|
115
|
-
}): Observable<T[] | null>;
|
|
116
|
-
/**
|
|
117
|
-
* Fetch entities and return as collection
|
|
118
|
-
* @param options Options for the request
|
|
119
|
-
* @returns The collection
|
|
120
|
-
*/
|
|
121
|
-
fetchCollection(options?: ODataOptions & {
|
|
122
|
-
withCount?: boolean;
|
|
123
|
-
bodyQueryOptions?: QueryOption[];
|
|
124
|
-
CollectionType?: typeof ODataCollection;
|
|
125
|
-
}): Observable<ODataCollection<T, ODataModel<T> & ModelInterface<T>> | null>;
|
|
126
|
-
fetchCollection<M extends ODataModel<T>, C extends ODataCollection<T, M>>(options?: ODataOptions & {
|
|
127
|
-
withCount?: boolean;
|
|
128
|
-
bodyQueryOptions?: QueryOption[];
|
|
129
|
-
CollectionType?: typeof ODataCollection;
|
|
130
|
-
}): Observable<C | null>;
|
|
131
|
-
/**
|
|
132
|
-
* Fetch all entities
|
|
133
|
-
* @param options Options for the request
|
|
134
|
-
* @returns All entities
|
|
135
|
-
*/
|
|
136
|
-
fetchAll(options?: ODataOptions & {
|
|
137
|
-
withCount?: boolean;
|
|
138
|
-
bodyQueryOptions?: QueryOption[];
|
|
139
|
-
}): Observable<{
|
|
140
|
-
entities: T[];
|
|
141
|
-
annots: ODataEntitiesAnnotations<T>;
|
|
142
|
-
}>;
|
|
143
|
-
fetchMany(top: number, options?: ODataOptions & {
|
|
144
|
-
withCount?: boolean;
|
|
145
|
-
bodyQueryOptions?: QueryOption[];
|
|
146
|
-
}): Observable<{
|
|
147
|
-
entities: T[];
|
|
148
|
-
annots: ODataEntitiesAnnotations<T>;
|
|
149
|
-
}>;
|
|
150
|
-
fetchOne(options?: ODataOptions & {
|
|
151
|
-
withCount?: boolean;
|
|
152
|
-
bodyQueryOptions?: QueryOption[];
|
|
153
|
-
}): Observable<{
|
|
154
|
-
entity: T | null;
|
|
155
|
-
annots: ODataEntitiesAnnotations<T>;
|
|
156
|
-
}>;
|
|
157
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { HttpContext, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
2
|
-
import { FetchPolicy, ParserOptions } from '../../types';
|
|
3
|
-
import { ODataQueryArguments } from '../query';
|
|
4
|
-
export type ODataOptions = {
|
|
5
|
-
etag?: string;
|
|
6
|
-
context?: HttpContext;
|
|
7
|
-
headers?: HttpHeaders | {
|
|
8
|
-
[header: string]: string | string[];
|
|
9
|
-
};
|
|
10
|
-
params?: HttpParams | {
|
|
11
|
-
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
|
12
|
-
};
|
|
13
|
-
reportProgress?: boolean;
|
|
14
|
-
withCredentials?: boolean;
|
|
15
|
-
fetchPolicy?: FetchPolicy;
|
|
16
|
-
parserOptions?: ParserOptions;
|
|
17
|
-
};
|
|
18
|
-
export type ODataEntityOptions = ODataOptions & {
|
|
19
|
-
responseType?: 'entity';
|
|
20
|
-
};
|
|
21
|
-
export type ODataEntitiesOptions = ODataOptions & {
|
|
22
|
-
responseType?: 'entities';
|
|
23
|
-
withCount?: boolean;
|
|
24
|
-
};
|
|
25
|
-
export type ODataPropertyOptions = ODataOptions & {
|
|
26
|
-
responseType?: 'property';
|
|
27
|
-
};
|
|
28
|
-
export type ODataQueryArgumentsOptions<T> = ODataOptions & ODataQueryArguments<T>;
|
|
29
|
-
export type ODataActionOptions<T> = ODataQueryArgumentsOptions<T>;
|
|
30
|
-
export type ODataFunctionOptions<T> = ODataQueryArgumentsOptions<T> & {
|
|
31
|
-
alias?: boolean;
|
|
32
|
-
};
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { ODataApi } from '../../api';
|
|
3
|
-
import type { ModelInterface, ODataCollection, ODataModel } from '../../models';
|
|
4
|
-
import { QueryOption, ODataStructuredTypeFieldConfig } from '../../types';
|
|
5
|
-
import { ODataPathSegments } from '../path';
|
|
6
|
-
import { ApplyExpression, ApplyExpressionBuilder } from '../query';
|
|
7
|
-
import { ODataResource } from '../resource';
|
|
8
|
-
import { ODataEntities, ODataEntity, ODataProperty } from '../response';
|
|
9
|
-
import { ODataEntitiesOptions, ODataEntityOptions, ODataOptions, ODataPropertyOptions } from './options';
|
|
10
|
-
import { ODataValueResource } from './value';
|
|
11
|
-
import { ODataCountResource } from './count';
|
|
12
|
-
import { ODataEntitiesAnnotations } from '../../annotations';
|
|
13
|
-
export declare class ODataPropertyResource<T> extends ODataResource<T> {
|
|
14
|
-
static factory<P>(api: ODataApi, { path, type, segments, }: {
|
|
15
|
-
path: string;
|
|
16
|
-
type?: string;
|
|
17
|
-
segments: ODataPathSegments;
|
|
18
|
-
}): ODataPropertyResource<P>;
|
|
19
|
-
static fromResource<N>(resource: ODataResource<any>, path: string): ODataPropertyResource<N>;
|
|
20
|
-
clone(): ODataPropertyResource<T>;
|
|
21
|
-
transform<R>(opts: (builder: ApplyExpressionBuilder<T>, current?: ApplyExpression<T>) => ApplyExpression<T>, { type, fields, }?: {
|
|
22
|
-
type?: string;
|
|
23
|
-
fields?: {
|
|
24
|
-
[name: string]: ODataStructuredTypeFieldConfig;
|
|
25
|
-
};
|
|
26
|
-
}): ODataPropertyResource<R>;
|
|
27
|
-
key(value: any): ODataPropertyResource<T>;
|
|
28
|
-
keys(values: any[]): ODataPropertyResource<T>;
|
|
29
|
-
value(): ODataValueResource<T>;
|
|
30
|
-
count(): ODataCountResource<T>;
|
|
31
|
-
property<P>(path: string): ODataPropertyResource<P>;
|
|
32
|
-
protected get(options?: ODataEntityOptions & ODataEntitiesOptions & ODataPropertyOptions): Observable<any>;
|
|
33
|
-
/**
|
|
34
|
-
* Fetch the property
|
|
35
|
-
* @param options Options for the request
|
|
36
|
-
* @return The entity / entities / property value
|
|
37
|
-
*/
|
|
38
|
-
fetch(options?: ODataEntityOptions): Observable<ODataEntity<T>>;
|
|
39
|
-
fetch(options?: ODataEntitiesOptions): Observable<ODataEntities<T>>;
|
|
40
|
-
fetch(options?: ODataPropertyOptions): Observable<ODataProperty<T>>;
|
|
41
|
-
/**
|
|
42
|
-
* Fetch the property value
|
|
43
|
-
* @param options Options for the request
|
|
44
|
-
* @returns The property value
|
|
45
|
-
*/
|
|
46
|
-
fetchProperty(options?: ODataOptions): Observable<T | null>;
|
|
47
|
-
/**
|
|
48
|
-
* Fetch the entity
|
|
49
|
-
* @param options Options for the request
|
|
50
|
-
* @returns The entity
|
|
51
|
-
*/
|
|
52
|
-
fetchEntity(options?: ODataOptions): Observable<T | null>;
|
|
53
|
-
/**
|
|
54
|
-
* Fetch the entity and return as model
|
|
55
|
-
* @param options Options for the request
|
|
56
|
-
* @returns The model
|
|
57
|
-
*/
|
|
58
|
-
fetchModel(options?: ODataOptions & {
|
|
59
|
-
bodyQueryOptions?: QueryOption[];
|
|
60
|
-
ModelType?: typeof ODataModel;
|
|
61
|
-
}): Observable<(ODataModel<T> & ModelInterface<T>) | null>;
|
|
62
|
-
fetchModel<M extends ODataModel<T>>(options?: ODataOptions & {
|
|
63
|
-
bodyQueryOptions?: QueryOption[];
|
|
64
|
-
ModelType?: typeof ODataModel;
|
|
65
|
-
}): Observable<M | null>;
|
|
66
|
-
/**
|
|
67
|
-
* Fetch the entities
|
|
68
|
-
* @param options Options for the request
|
|
69
|
-
* @returns The entities
|
|
70
|
-
*/
|
|
71
|
-
fetchEntities(options?: ODataOptions & {
|
|
72
|
-
withCount?: boolean;
|
|
73
|
-
}): Observable<T[] | null>;
|
|
74
|
-
/**
|
|
75
|
-
* Fetch the entities and return as collection
|
|
76
|
-
* @param options Options for the request
|
|
77
|
-
* @returns The collection
|
|
78
|
-
*/
|
|
79
|
-
fetchCollection(options?: ODataOptions & {
|
|
80
|
-
withCount?: boolean;
|
|
81
|
-
bodyQueryOptions?: QueryOption[];
|
|
82
|
-
CollectionType?: typeof ODataCollection;
|
|
83
|
-
}): Observable<ODataCollection<T, ODataModel<T> & ModelInterface<T>> | null>;
|
|
84
|
-
fetchCollection<M extends ODataModel<T>, C extends ODataCollection<T, M>>(options?: ODataOptions & {
|
|
85
|
-
withCount?: boolean;
|
|
86
|
-
bodyQueryOptions?: QueryOption[];
|
|
87
|
-
CollectionType?: typeof ODataCollection;
|
|
88
|
-
}): Observable<C | null>;
|
|
89
|
-
fetchOne(options?: ODataOptions & {
|
|
90
|
-
withCount?: boolean;
|
|
91
|
-
bodyQueryOptions?: QueryOption[];
|
|
92
|
-
}): Observable<{
|
|
93
|
-
entity: T | null;
|
|
94
|
-
annots: ODataEntitiesAnnotations<T>;
|
|
95
|
-
}>;
|
|
96
|
-
fetchMany(top: number, options?: ODataOptions & {
|
|
97
|
-
withCount?: boolean;
|
|
98
|
-
bodyQueryOptions?: QueryOption[];
|
|
99
|
-
}): Observable<{
|
|
100
|
-
entities: T[];
|
|
101
|
-
annots: ODataEntitiesAnnotations<T>;
|
|
102
|
-
}>;
|
|
103
|
-
/**
|
|
104
|
-
* Fetch all entities
|
|
105
|
-
* @param options Options for the request
|
|
106
|
-
* @returns All entities
|
|
107
|
-
*/
|
|
108
|
-
fetchAll(options?: ODataOptions & {
|
|
109
|
-
withCount?: boolean;
|
|
110
|
-
bodyQueryOptions?: QueryOption[];
|
|
111
|
-
}): Observable<{
|
|
112
|
-
entities: T[];
|
|
113
|
-
annots: ODataEntitiesAnnotations<T>;
|
|
114
|
-
}>;
|
|
115
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { ODataApi } from '../../api';
|
|
3
|
-
import { QueryOption } from '../../types';
|
|
4
|
-
import { ODataPathSegments } from '../path';
|
|
5
|
-
import { ODataResource } from '../resource';
|
|
6
|
-
import { ODataEntities, ODataEntity } from '../response';
|
|
7
|
-
import { ODataEntityResource } from './entity';
|
|
8
|
-
import { ODataEntitiesOptions, ODataEntityOptions, ODataOptions } from './options';
|
|
9
|
-
export declare class ODataReferenceResource<T> extends ODataResource<T> {
|
|
10
|
-
static factory<P>(api: ODataApi, { segments }: {
|
|
11
|
-
segments: ODataPathSegments;
|
|
12
|
-
}): ODataReferenceResource<P>;
|
|
13
|
-
clone(): ODataReferenceResource<T>;
|
|
14
|
-
protected post(target: ODataEntityResource<any>, options?: ODataOptions): Observable<any>;
|
|
15
|
-
protected put(target: ODataEntityResource<any>, options?: ODataOptions): Observable<any>;
|
|
16
|
-
protected delete({ etag, target, ...options }?: {
|
|
17
|
-
etag?: string;
|
|
18
|
-
target?: ODataEntityResource<any>;
|
|
19
|
-
} & ODataOptions): Observable<any>;
|
|
20
|
-
/**
|
|
21
|
-
* Add the given target to the collection.
|
|
22
|
-
* @param target The target resource
|
|
23
|
-
* @param options Options for the request
|
|
24
|
-
* @returns Observable of the response
|
|
25
|
-
*/
|
|
26
|
-
add(target: ODataEntityResource<any>, options?: ODataOptions): Observable<any>;
|
|
27
|
-
/**
|
|
28
|
-
* Remove the given target from the collection.
|
|
29
|
-
* @param target The target resource
|
|
30
|
-
* @param options Options for the request
|
|
31
|
-
* @returns Observable of the response
|
|
32
|
-
*/
|
|
33
|
-
remove(target?: ODataEntityResource<any>, options?: ODataOptions): Observable<any>;
|
|
34
|
-
/**
|
|
35
|
-
* Set the reference to the given target.
|
|
36
|
-
* @param target The target resource
|
|
37
|
-
* @param options Options for the request
|
|
38
|
-
* @returns Observable of the response
|
|
39
|
-
*/
|
|
40
|
-
set(target: ODataEntityResource<any>, options?: ODataOptions): Observable<any>;
|
|
41
|
-
/**
|
|
42
|
-
* Unset the reference to the given target.
|
|
43
|
-
* @param options Options for the request.
|
|
44
|
-
* @returns Observable of the response
|
|
45
|
-
*/
|
|
46
|
-
unset(options?: ODataOptions): Observable<any>;
|
|
47
|
-
/**
|
|
48
|
-
* Fetch entity / entities
|
|
49
|
-
* @param options Options for the request
|
|
50
|
-
* @return An observable of the entity or entities with annotations
|
|
51
|
-
*/
|
|
52
|
-
fetch(options?: ODataEntityOptions & {
|
|
53
|
-
bodyQueryOptions?: QueryOption[];
|
|
54
|
-
}): Observable<ODataEntity<T>>;
|
|
55
|
-
fetch(options?: ODataEntitiesOptions & {
|
|
56
|
-
bodyQueryOptions?: QueryOption[];
|
|
57
|
-
}): Observable<ODataEntities<T>>;
|
|
58
|
-
/**
|
|
59
|
-
* Fetch the entity
|
|
60
|
-
* @param options Options for the request
|
|
61
|
-
* @returns The entity
|
|
62
|
-
*/
|
|
63
|
-
fetchEntity(options?: ODataOptions & {
|
|
64
|
-
bodyQueryOptions?: QueryOption[];
|
|
65
|
-
}): Observable<T | null>;
|
|
66
|
-
/**
|
|
67
|
-
* Fetch entities
|
|
68
|
-
* @param options Options for the request
|
|
69
|
-
* @returns The entities
|
|
70
|
-
*/
|
|
71
|
-
fetchEntities(options?: ODataOptions & {
|
|
72
|
-
bodyQueryOptions?: QueryOption[];
|
|
73
|
-
}): Observable<T[] | null>;
|
|
74
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { ODataApi } from '../../api';
|
|
3
|
-
import { ModelInterface, ODataModel } from '../../models';
|
|
4
|
-
import { QueryOption } from '../../types';
|
|
5
|
-
import { ODataResource } from '../resource';
|
|
6
|
-
import { ODataEntity } from '../response';
|
|
7
|
-
import { ODataActionResource } from './action';
|
|
8
|
-
import { ODataFunctionResource } from './function';
|
|
9
|
-
import { ODataNavigationPropertyResource } from './navigation-property';
|
|
10
|
-
import { ODataOptions } from './options';
|
|
11
|
-
import { ODataPropertyResource } from './property';
|
|
12
|
-
export declare class ODataSingletonResource<T> extends ODataResource<T> {
|
|
13
|
-
static factory<S>(api: ODataApi, { path, type, }: {
|
|
14
|
-
path: string;
|
|
15
|
-
type?: string;
|
|
16
|
-
}): ODataSingletonResource<S>;
|
|
17
|
-
clone(): ODataSingletonResource<T>;
|
|
18
|
-
key(value: any): ODataSingletonResource<T>;
|
|
19
|
-
keys(values: any[]): ODataSingletonResource<T>;
|
|
20
|
-
navigationProperty<N>(path: string): ODataNavigationPropertyResource<N>;
|
|
21
|
-
property<P>(path: string): ODataPropertyResource<P>;
|
|
22
|
-
action<P, R>(path: string): ODataActionResource<P, R>;
|
|
23
|
-
function<P, R>(path: string): ODataFunctionResource<P, R>;
|
|
24
|
-
protected post(attrs: Partial<T>, options?: ODataOptions): Observable<any>;
|
|
25
|
-
protected put(attrs: Partial<T>, options?: ODataOptions): Observable<any>;
|
|
26
|
-
protected patch(attrs: Partial<T>, options?: ODataOptions): Observable<any>;
|
|
27
|
-
protected delete(options?: ODataOptions): Observable<any>;
|
|
28
|
-
protected get(options?: ODataOptions & {
|
|
29
|
-
bodyQueryOptions?: QueryOption[];
|
|
30
|
-
}): Observable<any>;
|
|
31
|
-
/**
|
|
32
|
-
* Creates a new entity.
|
|
33
|
-
* @param attrs The entity attributes to create.
|
|
34
|
-
* @param options The options for the request.
|
|
35
|
-
* @returns The created entity with the annotations.
|
|
36
|
-
*/
|
|
37
|
-
create(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
38
|
-
/**
|
|
39
|
-
* Updates an existing entity.
|
|
40
|
-
* @param attrs The entity attributes to update.
|
|
41
|
-
* @param options The options for the request.
|
|
42
|
-
* @returns The updated entity with the annotations.
|
|
43
|
-
*/
|
|
44
|
-
update(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
45
|
-
/**
|
|
46
|
-
* Modifies an existing entity.
|
|
47
|
-
* @param attrs The entity attributes to modify.
|
|
48
|
-
* @param options The options for the request.
|
|
49
|
-
* @returns The modified entity with the annotations.
|
|
50
|
-
*/
|
|
51
|
-
modify(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
52
|
-
/**
|
|
53
|
-
* Delete an existing entity.
|
|
54
|
-
* @param options The options for the request.
|
|
55
|
-
* @returns Observable of the deleted entity.
|
|
56
|
-
*/
|
|
57
|
-
destroy(options?: ODataOptions): Observable<any>;
|
|
58
|
-
/**
|
|
59
|
-
* Fetch an existing entity.
|
|
60
|
-
* @param options The options for the request.
|
|
61
|
-
* @returns Observable of the entity with the annotations.
|
|
62
|
-
*/
|
|
63
|
-
fetch(options?: ODataOptions & {
|
|
64
|
-
bodyQueryOptions?: QueryOption[];
|
|
65
|
-
}): Observable<ODataEntity<T>>;
|
|
66
|
-
/**
|
|
67
|
-
* Fetch an existing entity.
|
|
68
|
-
* @param options The options for the request.
|
|
69
|
-
* @returns Observable of the entity.
|
|
70
|
-
*/
|
|
71
|
-
fetchEntity(options?: ODataOptions & {
|
|
72
|
-
bodyQueryOptions?: QueryOption[];
|
|
73
|
-
}): Observable<T | null>;
|
|
74
|
-
/**
|
|
75
|
-
* Fetch an existing entity and return a model.
|
|
76
|
-
* @param options The options for the request.
|
|
77
|
-
* @returns Observable of the entity.
|
|
78
|
-
*/
|
|
79
|
-
fetchModel(options?: ODataOptions & {
|
|
80
|
-
bodyQueryOptions?: QueryOption[];
|
|
81
|
-
ModelType?: typeof ODataModel;
|
|
82
|
-
}): Observable<(ODataModel<T> & ModelInterface<T>) | null>;
|
|
83
|
-
fetchModel<M extends ODataModel<T>>(options?: ODataOptions & {
|
|
84
|
-
bodyQueryOptions?: QueryOption[];
|
|
85
|
-
ModelType?: typeof ODataModel;
|
|
86
|
-
}): Observable<M | null>;
|
|
87
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { ODataApi } from '../../api';
|
|
3
|
-
import { ODataPathSegments } from '../path';
|
|
4
|
-
import { ODataResource } from '../resource';
|
|
5
|
-
import { ODataOptions } from './options';
|
|
6
|
-
export declare class ODataValueResource<T> extends ODataResource<T> {
|
|
7
|
-
static factory<V>(api: ODataApi, { segments, }: {
|
|
8
|
-
segments: ODataPathSegments;
|
|
9
|
-
}): ODataValueResource<V>;
|
|
10
|
-
static fromResource<V>(resource: ODataResource<any>): ODataValueResource<V>;
|
|
11
|
-
clone(): ODataValueResource<T>;
|
|
12
|
-
protected get(options?: ODataOptions): Observable<T>;
|
|
13
|
-
/**
|
|
14
|
-
* Fetch the value of the resource.
|
|
15
|
-
* @param options OData options.
|
|
16
|
-
* @returns Observable of the value.
|
|
17
|
-
*/
|
|
18
|
-
fetch(options?: ODataOptions): Observable<T>;
|
|
19
|
-
}
|