angular-odata 0.105.0 → 0.115.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/esm2020/lib/api.mjs +44 -6
- package/esm2020/lib/client.mjs +9 -34
- package/esm2020/lib/constants.mjs +10 -5
- package/esm2020/lib/helper.mjs +17 -7
- package/esm2020/lib/models/collection.mjs +58 -44
- package/esm2020/lib/models/model.mjs +36 -9
- package/esm2020/lib/models/options.mjs +13 -15
- package/esm2020/lib/module.mjs +4 -4
- package/esm2020/lib/options.mjs +1 -1
- package/esm2020/lib/resources/query/expressions/count.mjs +89 -0
- package/esm2020/lib/resources/query/expressions/filter.mjs +5 -1
- package/esm2020/lib/resources/request.mjs +35 -2
- package/esm2020/lib/resources/resource.mjs +8 -51
- package/esm2020/lib/resources/responses/annotations.mjs +16 -4
- package/esm2020/lib/resources/responses/options.mjs +6 -1
- package/esm2020/lib/resources/responses/response.mjs +9 -5
- package/esm2020/lib/resources/responses/types.mjs +1 -1
- package/esm2020/lib/resources/types/batch.mjs +6 -9
- package/esm2020/lib/resources/types/count.mjs +1 -1
- package/esm2020/lib/resources/types/entity-set.mjs +34 -12
- package/esm2020/lib/resources/types/entity.mjs +1 -1
- package/esm2020/lib/resources/types/media.mjs +1 -1
- package/esm2020/lib/resources/types/metadata.mjs +3 -5
- package/esm2020/lib/resources/types/navigation-property.mjs +26 -6
- package/esm2020/lib/resources/types/options.mjs +1 -1
- package/esm2020/lib/resources/types/property.mjs +29 -4
- package/esm2020/lib/resources/types/reference.mjs +1 -1
- package/esm2020/lib/resources/types/singleton.mjs +1 -4
- package/esm2020/lib/resources/types/value.mjs +2 -2
- package/esm2020/lib/schema/parsers/callable.mjs +1 -1
- package/esm2020/lib/schema/parsers/edm.mjs +9 -9
- package/esm2020/lib/schema/parsers/enum-type.mjs +1 -1
- package/esm2020/lib/services/entity-set.mjs +9 -7
- package/esm2020/lib/services/factory.mjs +3 -3
- package/esm2020/lib/utils/http.mjs +1 -1
- package/esm2020/lib/utils/objects.mjs +1 -1
- package/fesm2015/angular-odata.mjs +435 -209
- package/fesm2015/angular-odata.mjs.map +1 -1
- package/fesm2020/angular-odata.mjs +444 -214
- package/fesm2020/angular-odata.mjs.map +1 -1
- package/lib/api.d.ts +10 -3
- package/lib/client.d.ts +139 -1425
- package/lib/constants.d.ts +5 -3
- package/lib/helper.d.ts +1 -1
- package/lib/models/collection.d.ts +26 -5
- package/lib/models/model.d.ts +21 -11
- package/lib/models/options.d.ts +4 -3
- package/lib/options.d.ts +4 -0
- package/lib/resources/query/expressions/count.d.ts +44 -0
- package/lib/resources/query/expressions/filter.d.ts +5 -0
- package/lib/resources/query/handlers.d.ts +3 -1
- package/lib/resources/request.d.ts +13 -2
- package/lib/resources/resource.d.ts +3 -10
- package/lib/resources/responses/annotations.d.ts +17 -12
- package/lib/resources/responses/options.d.ts +1 -0
- package/lib/resources/responses/types.d.ts +3 -3
- package/lib/resources/types/count.d.ts +1 -1
- package/lib/resources/types/entity-set.d.ts +24 -6
- package/lib/resources/types/entity.d.ts +8 -24
- package/lib/resources/types/media.d.ts +7 -15
- package/lib/resources/types/metadata.d.ts +1 -1
- package/lib/resources/types/navigation-property.d.ts +26 -28
- package/lib/resources/types/options.d.ts +4 -2
- package/lib/resources/types/property.d.ts +28 -15
- package/lib/resources/types/reference.d.ts +3 -12
- package/lib/resources/types/singleton.d.ts +8 -27
- package/lib/services/entity-set.d.ts +20 -6
- package/lib/utils/http.d.ts +1 -1
- package/lib/utils/objects.d.ts +19 -5
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import { QueryOptionNames } from '../../types';
|
|
|
6
6
|
import { ODataPathSegments } from '../path';
|
|
7
7
|
import { ODataQueryOptions } from '../query';
|
|
8
8
|
import { ODataResource } from '../resource';
|
|
9
|
-
import { ODataEntities, ODataEntity } from '../responses';
|
|
9
|
+
import { ODataEntities, ODataEntitiesAnnotations, ODataEntity } from '../responses';
|
|
10
10
|
import { ODataCountResource } from './count';
|
|
11
11
|
import { ODataMediaResource } from './media';
|
|
12
12
|
import { ODataEntitiesOptions, ODataEntityOptions, ODataOptions } from './options';
|
|
@@ -36,17 +36,10 @@ export declare class ODataNavigationPropertyResource<T> extends ODataResource<T>
|
|
|
36
36
|
count(): ODataCountResource<T>;
|
|
37
37
|
cast<C>(type: string): ODataNavigationPropertyResource<C>;
|
|
38
38
|
protected post(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
39
|
-
protected put(attrs: Partial<T>, options?: ODataOptions
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
protected patch(attrs: Partial<T>, options?: ODataOptions & {
|
|
43
|
-
etag?: string;
|
|
44
|
-
}): Observable<ODataEntity<T>>;
|
|
45
|
-
protected delete(options?: ODataOptions & {
|
|
46
|
-
etag?: string;
|
|
47
|
-
}): Observable<any>;
|
|
39
|
+
protected put(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
40
|
+
protected patch(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
41
|
+
protected delete(options?: ODataOptions): Observable<any>;
|
|
48
42
|
protected get(options?: ODataEntityOptions & ODataEntitiesOptions & {
|
|
49
|
-
etag?: string;
|
|
50
43
|
bodyQueryOptions?: QueryOptionNames[];
|
|
51
44
|
}): Observable<any>;
|
|
52
45
|
/**
|
|
@@ -60,42 +53,31 @@ export declare class ODataNavigationPropertyResource<T> extends ODataResource<T>
|
|
|
60
53
|
* Update an existing entity
|
|
61
54
|
* @param attrs The entity attributes
|
|
62
55
|
* @param options Options for the request
|
|
63
|
-
* @param etag The etag of the entity
|
|
64
56
|
* @returns The updated entity with the annotations
|
|
65
57
|
*/
|
|
66
|
-
update(attrs: Partial<T>, options?: ODataOptions
|
|
67
|
-
etag?: string;
|
|
68
|
-
}): Observable<ODataEntity<T>>;
|
|
58
|
+
update(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
69
59
|
/**
|
|
70
60
|
* Modify an existing entity
|
|
71
61
|
* @param attrs The entity attributes
|
|
72
62
|
* @param options Options for the request
|
|
73
|
-
* @param etag The etag of the entity
|
|
74
63
|
* @returns The modified entity with the annotations
|
|
75
64
|
*/
|
|
76
|
-
modify(attrs: Partial<T>, options?: ODataOptions
|
|
77
|
-
etag?: string;
|
|
78
|
-
}): Observable<ODataEntity<T>>;
|
|
65
|
+
modify(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
79
66
|
/**
|
|
80
67
|
* Delete an existing entity
|
|
81
68
|
* @param options Options for the request
|
|
82
|
-
* @param etag The etag of the entity
|
|
83
69
|
* @returns An observable of the destroy
|
|
84
70
|
*/
|
|
85
|
-
destroy(options?: ODataOptions
|
|
86
|
-
etag?: string;
|
|
87
|
-
}): Observable<any>;
|
|
71
|
+
destroy(options?: ODataOptions): Observable<any>;
|
|
88
72
|
/**
|
|
89
73
|
* Fetch entity / entities
|
|
90
74
|
* @param options Options for the request
|
|
91
75
|
* @return An observable of the entity or entities with annotations
|
|
92
76
|
*/
|
|
93
77
|
fetch(options?: ODataEntityOptions & {
|
|
94
|
-
etag?: string;
|
|
95
78
|
bodyQueryOptions?: QueryOptionNames[];
|
|
96
79
|
}): Observable<ODataEntity<T>>;
|
|
97
80
|
fetch(options?: ODataEntitiesOptions & {
|
|
98
|
-
etag?: string;
|
|
99
81
|
bodyQueryOptions?: QueryOptionNames[];
|
|
100
82
|
}): Observable<ODataEntities<T>>;
|
|
101
83
|
/**
|
|
@@ -104,7 +86,6 @@ export declare class ODataNavigationPropertyResource<T> extends ODataResource<T>
|
|
|
104
86
|
* @returns The entity
|
|
105
87
|
*/
|
|
106
88
|
fetchEntity(options?: ODataOptions & {
|
|
107
|
-
etag?: string;
|
|
108
89
|
bodyQueryOptions?: QueryOptionNames[];
|
|
109
90
|
}): Observable<T | null>;
|
|
110
91
|
/**
|
|
@@ -113,7 +94,6 @@ export declare class ODataNavigationPropertyResource<T> extends ODataResource<T>
|
|
|
113
94
|
* @returns The model
|
|
114
95
|
*/
|
|
115
96
|
fetchModel<M extends ODataModel<T>>(options?: ODataOptions & {
|
|
116
|
-
etag?: string;
|
|
117
97
|
bodyQueryOptions?: QueryOptionNames[];
|
|
118
98
|
}): Observable<M | null>;
|
|
119
99
|
/**
|
|
@@ -139,6 +119,24 @@ export declare class ODataNavigationPropertyResource<T> extends ODataResource<T>
|
|
|
139
119
|
* @returns All entities
|
|
140
120
|
*/
|
|
141
121
|
fetchAll(options?: ODataOptions & {
|
|
122
|
+
withCount?: boolean;
|
|
123
|
+
bodyQueryOptions?: QueryOptionNames[];
|
|
124
|
+
}): Observable<{
|
|
125
|
+
entities: T[];
|
|
126
|
+
annots: ODataEntitiesAnnotations<T>;
|
|
127
|
+
}>;
|
|
128
|
+
fetchMany(top: number, options?: ODataOptions & {
|
|
129
|
+
withCount?: boolean;
|
|
130
|
+
bodyQueryOptions?: QueryOptionNames[];
|
|
131
|
+
}): Observable<{
|
|
132
|
+
entities: T[];
|
|
133
|
+
annots: ODataEntitiesAnnotations<T>;
|
|
134
|
+
}>;
|
|
135
|
+
fetchOne(options?: ODataOptions & {
|
|
136
|
+
withCount?: boolean;
|
|
142
137
|
bodyQueryOptions?: QueryOptionNames[];
|
|
143
|
-
}): Observable<
|
|
138
|
+
}): Observable<{
|
|
139
|
+
entity: T | null;
|
|
140
|
+
annots: ODataEntitiesAnnotations<T>;
|
|
141
|
+
}>;
|
|
144
142
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { HttpHeaders, HttpParams } from '@angular/common/http';
|
|
1
|
+
import { HttpContext, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
2
2
|
import { FetchPolicy } from '../../types';
|
|
3
3
|
import { ODataQueryArguments } from '../query';
|
|
4
4
|
export declare type ODataOptions = {
|
|
5
|
+
etag?: string;
|
|
6
|
+
context?: HttpContext;
|
|
5
7
|
headers?: HttpHeaders | {
|
|
6
8
|
[header: string]: string | string[];
|
|
7
9
|
};
|
|
8
10
|
params?: HttpParams | {
|
|
9
|
-
[param: string]: string | string
|
|
11
|
+
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
|
10
12
|
};
|
|
11
13
|
reportProgress?: boolean;
|
|
12
14
|
withCredentials?: boolean;
|
|
@@ -2,10 +2,11 @@ import { Observable } from 'rxjs';
|
|
|
2
2
|
import { ODataApi } from '../../api';
|
|
3
3
|
import { ODataCollection, ODataModel } from '../../models';
|
|
4
4
|
import { ODataStructuredType } from '../../schema';
|
|
5
|
+
import { QueryOptionNames } from '../../types';
|
|
5
6
|
import { ODataPathSegments } from '../path';
|
|
6
7
|
import { ODataQueryOptions } from '../query';
|
|
7
8
|
import { ODataResource } from '../resource';
|
|
8
|
-
import { ODataEntities, ODataEntity, ODataProperty } from '../responses';
|
|
9
|
+
import { ODataEntities, ODataEntitiesAnnotations, ODataEntity, ODataProperty } from '../responses';
|
|
9
10
|
import { ODataEntitiesOptions, ODataEntityOptions, ODataOptions, ODataPropertyOptions } from './options';
|
|
10
11
|
import { ODataValueResource } from './value';
|
|
11
12
|
export declare class ODataPropertyResource<T> extends ODataResource<T> {
|
|
@@ -22,15 +23,13 @@ export declare class ODataPropertyResource<T> extends ODataResource<T> {
|
|
|
22
23
|
keys(values: any[]): ODataPropertyResource<T>;
|
|
23
24
|
value(): ODataValueResource<T>;
|
|
24
25
|
property<P>(path: string): ODataPropertyResource<P>;
|
|
25
|
-
protected get(options
|
|
26
|
+
protected get(options?: ODataEntityOptions & ODataEntitiesOptions & ODataPropertyOptions): Observable<any>;
|
|
26
27
|
/**
|
|
27
28
|
* Fetch the property
|
|
28
29
|
* @param options Options for the request
|
|
29
30
|
* @return The entity / entities / property value
|
|
30
31
|
*/
|
|
31
|
-
fetch(options?: ODataEntityOptions
|
|
32
|
-
etag?: string;
|
|
33
|
-
}): Observable<ODataEntity<T>>;
|
|
32
|
+
fetch(options?: ODataEntityOptions): Observable<ODataEntity<T>>;
|
|
34
33
|
fetch(options?: ODataEntitiesOptions): Observable<ODataEntities<T>>;
|
|
35
34
|
fetch(options?: ODataPropertyOptions): Observable<ODataProperty<T>>;
|
|
36
35
|
/**
|
|
@@ -38,25 +37,19 @@ export declare class ODataPropertyResource<T> extends ODataResource<T> {
|
|
|
38
37
|
* @param options Options for the request
|
|
39
38
|
* @returns The property value
|
|
40
39
|
*/
|
|
41
|
-
fetchProperty(options?: ODataOptions
|
|
42
|
-
etag?: string;
|
|
43
|
-
}): Observable<T | null>;
|
|
40
|
+
fetchProperty(options?: ODataOptions): Observable<T | null>;
|
|
44
41
|
/**
|
|
45
42
|
* Fetch the entity
|
|
46
43
|
* @param options Options for the request
|
|
47
44
|
* @returns The entity
|
|
48
45
|
*/
|
|
49
|
-
fetchEntity(options?: ODataOptions
|
|
50
|
-
etag?: string;
|
|
51
|
-
}): Observable<T | null>;
|
|
46
|
+
fetchEntity(options?: ODataOptions): Observable<T | null>;
|
|
52
47
|
/**
|
|
53
48
|
* Fetch the entity and return as model
|
|
54
49
|
* @param options Options for the request
|
|
55
50
|
* @returns The model
|
|
56
51
|
*/
|
|
57
|
-
fetchModel<M extends ODataModel<T>>(options?: ODataOptions
|
|
58
|
-
etag?: string;
|
|
59
|
-
}): Observable<M | null>;
|
|
52
|
+
fetchModel<M extends ODataModel<T>>(options?: ODataOptions): Observable<M | null>;
|
|
60
53
|
/**
|
|
61
54
|
* Fetch the entities
|
|
62
55
|
* @param options Options for the request
|
|
@@ -73,10 +66,30 @@ export declare class ODataPropertyResource<T> extends ODataResource<T> {
|
|
|
73
66
|
fetchCollection<M extends ODataModel<T>, C extends ODataCollection<T, M>>(options?: ODataOptions & {
|
|
74
67
|
withCount?: boolean;
|
|
75
68
|
}): Observable<C | null>;
|
|
69
|
+
fetchOne(options?: ODataOptions & {
|
|
70
|
+
withCount?: boolean;
|
|
71
|
+
bodyQueryOptions?: QueryOptionNames[];
|
|
72
|
+
}): Observable<{
|
|
73
|
+
entity: T | null;
|
|
74
|
+
annots: ODataEntitiesAnnotations<T>;
|
|
75
|
+
}>;
|
|
76
|
+
fetchMany(top: number, options?: ODataOptions & {
|
|
77
|
+
withCount?: boolean;
|
|
78
|
+
bodyQueryOptions?: QueryOptionNames[];
|
|
79
|
+
}): Observable<{
|
|
80
|
+
entities: T[];
|
|
81
|
+
annots: ODataEntitiesAnnotations<T>;
|
|
82
|
+
}>;
|
|
76
83
|
/**
|
|
77
84
|
* Fetch all entities
|
|
78
85
|
* @param options Options for the request
|
|
79
86
|
* @returns All entities
|
|
80
87
|
*/
|
|
81
|
-
fetchAll(options?: ODataOptions
|
|
88
|
+
fetchAll(options?: ODataOptions & {
|
|
89
|
+
withCount?: boolean;
|
|
90
|
+
bodyQueryOptions?: QueryOptionNames[];
|
|
91
|
+
}): Observable<{
|
|
92
|
+
entities: T[];
|
|
93
|
+
annots: ODataEntitiesAnnotations<T>;
|
|
94
|
+
}>;
|
|
82
95
|
}
|
|
@@ -14,9 +14,7 @@ export declare class ODataReferenceResource<T> extends ODataResource<T> {
|
|
|
14
14
|
}): ODataReferenceResource<P>;
|
|
15
15
|
clone(): ODataReferenceResource<T>;
|
|
16
16
|
protected post(target: ODataEntityResource<any>, options?: ODataOptions): Observable<any>;
|
|
17
|
-
protected put(target: ODataEntityResource<any>, options?: ODataOptions
|
|
18
|
-
etag?: string;
|
|
19
|
-
}): Observable<any>;
|
|
17
|
+
protected put(target: ODataEntityResource<any>, options?: ODataOptions): Observable<any>;
|
|
20
18
|
protected delete({ etag, target, ...options }?: {
|
|
21
19
|
etag?: string;
|
|
22
20
|
target?: ODataEntityResource<any>;
|
|
@@ -41,28 +39,22 @@ export declare class ODataReferenceResource<T> extends ODataResource<T> {
|
|
|
41
39
|
* @param options Options for the request
|
|
42
40
|
* @returns Observable of the response
|
|
43
41
|
*/
|
|
44
|
-
set(target: ODataEntityResource<any>, options?: ODataOptions
|
|
45
|
-
etag?: string;
|
|
46
|
-
}): Observable<any>;
|
|
42
|
+
set(target: ODataEntityResource<any>, options?: ODataOptions): Observable<any>;
|
|
47
43
|
/**
|
|
48
44
|
* Unset the reference to the given target.
|
|
49
45
|
* @param options Options for the request.
|
|
50
46
|
* @returns Observable of the response
|
|
51
47
|
*/
|
|
52
|
-
unset(options?: ODataOptions
|
|
53
|
-
etag?: string;
|
|
54
|
-
}): Observable<any>;
|
|
48
|
+
unset(options?: ODataOptions): Observable<any>;
|
|
55
49
|
/**
|
|
56
50
|
* Fetch entity / entities
|
|
57
51
|
* @param options Options for the request
|
|
58
52
|
* @return An observable of the entity or entities with annotations
|
|
59
53
|
*/
|
|
60
54
|
fetch(options?: ODataEntityOptions & {
|
|
61
|
-
etag?: string;
|
|
62
55
|
bodyQueryOptions?: QueryOptionNames[];
|
|
63
56
|
}): Observable<ODataEntity<T>>;
|
|
64
57
|
fetch(options?: ODataEntitiesOptions & {
|
|
65
|
-
etag?: string;
|
|
66
58
|
bodyQueryOptions?: QueryOptionNames[];
|
|
67
59
|
}): Observable<ODataEntities<T>>;
|
|
68
60
|
/**
|
|
@@ -71,7 +63,6 @@ export declare class ODataReferenceResource<T> extends ODataResource<T> {
|
|
|
71
63
|
* @returns The entity
|
|
72
64
|
*/
|
|
73
65
|
fetchEntity(options?: ODataOptions & {
|
|
74
|
-
etag?: string;
|
|
75
66
|
bodyQueryOptions?: QueryOptionNames[];
|
|
76
67
|
}): Observable<T | null>;
|
|
77
68
|
/**
|
|
@@ -24,20 +24,13 @@ export declare class ODataSingletonResource<T> extends ODataResource<T> {
|
|
|
24
24
|
property<P>(path: string): ODataPropertyResource<P>;
|
|
25
25
|
action<P, R>(path: string): ODataActionResource<P, R>;
|
|
26
26
|
function<P, R>(path: string): ODataFunctionResource<P, R>;
|
|
27
|
-
protected post(attrs: Partial<T>, options?: ODataOptions): Observable<
|
|
28
|
-
protected put(attrs: Partial<T>, options?: ODataOptions
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
protected patch(attrs: Partial<T>, options?: ODataOptions & {
|
|
32
|
-
etag?: string;
|
|
33
|
-
}): Observable<ODataEntity<T>>;
|
|
34
|
-
protected delete(options?: ODataOptions & {
|
|
35
|
-
etag?: string;
|
|
36
|
-
}): Observable<any>;
|
|
27
|
+
protected post(attrs: Partial<T>, options?: ODataOptions): Observable<any>;
|
|
28
|
+
protected put(attrs: Partial<T>, options?: ODataOptions): Observable<any>;
|
|
29
|
+
protected patch(attrs: Partial<T>, options?: ODataOptions): Observable<any>;
|
|
30
|
+
protected delete(options?: ODataOptions): Observable<any>;
|
|
37
31
|
protected get(options?: ODataOptions & {
|
|
38
|
-
etag?: string;
|
|
39
32
|
bodyQueryOptions?: QueryOptionNames[];
|
|
40
|
-
}): Observable<
|
|
33
|
+
}): Observable<any>;
|
|
41
34
|
/**
|
|
42
35
|
* Creates a new entity.
|
|
43
36
|
* @param attrs The entity attributes to create.
|
|
@@ -51,54 +44,42 @@ export declare class ODataSingletonResource<T> extends ODataResource<T> {
|
|
|
51
44
|
* @param options The options for the request.
|
|
52
45
|
* @returns The updated entity with the annotations.
|
|
53
46
|
*/
|
|
54
|
-
update(attrs: Partial<T>, options?: ODataOptions
|
|
55
|
-
etag?: string;
|
|
56
|
-
}): Observable<ODataEntity<T>>;
|
|
47
|
+
update(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
57
48
|
/**
|
|
58
49
|
* Modifies an existing entity.
|
|
59
50
|
* @param attrs The entity attributes to modify.
|
|
60
51
|
* @param options The options for the request.
|
|
61
52
|
* @returns The modified entity with the annotations.
|
|
62
53
|
*/
|
|
63
|
-
modify(attrs: Partial<T>, options?: ODataOptions
|
|
64
|
-
etag?: string;
|
|
65
|
-
}): Observable<ODataEntity<T>>;
|
|
54
|
+
modify(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
|
|
66
55
|
/**
|
|
67
56
|
* Delete an existing entity.
|
|
68
57
|
* @param options The options for the request.
|
|
69
58
|
* @returns Observable of the deleted entity.
|
|
70
59
|
*/
|
|
71
|
-
destroy(options?: ODataOptions
|
|
72
|
-
etag?: string;
|
|
73
|
-
}): Observable<any>;
|
|
60
|
+
destroy(options?: ODataOptions): Observable<any>;
|
|
74
61
|
/**
|
|
75
62
|
* Fetch an existing entity.
|
|
76
63
|
* @param options The options for the request.
|
|
77
|
-
* @param etag The etag to use for the request.
|
|
78
64
|
* @returns Observable of the entity with the annotations.
|
|
79
65
|
*/
|
|
80
66
|
fetch(options?: ODataOptions & {
|
|
81
|
-
etag?: string;
|
|
82
67
|
bodyQueryOptions?: QueryOptionNames[];
|
|
83
68
|
}): Observable<ODataEntity<T>>;
|
|
84
69
|
/**
|
|
85
70
|
* Fetch an existing entity.
|
|
86
71
|
* @param options The options for the request.
|
|
87
|
-
* @param etag The etag to use for the request.
|
|
88
72
|
* @returns Observable of the entity.
|
|
89
73
|
*/
|
|
90
74
|
fetchEntity(options?: ODataOptions & {
|
|
91
|
-
etag?: string;
|
|
92
75
|
bodyQueryOptions?: QueryOptionNames[];
|
|
93
76
|
}): Observable<T | null>;
|
|
94
77
|
/**
|
|
95
78
|
* Fetch an existing entity and return a model.
|
|
96
79
|
* @param options The options for the request.
|
|
97
|
-
* @param etag The etag to use for the request.
|
|
98
80
|
* @returns Observable of the entity.
|
|
99
81
|
*/
|
|
100
82
|
fetchModel<M extends ODataModel<T>>(options?: ODataOptions & {
|
|
101
|
-
etag?: string;
|
|
102
83
|
bodyQueryOptions?: QueryOptionNames[];
|
|
103
84
|
}): Observable<M | null>;
|
|
104
85
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { ODataCollection } from '../models/collection';
|
|
3
3
|
import { ODataModel } from '../models/model';
|
|
4
|
-
import { EntityKey,
|
|
4
|
+
import { EntityKey, ODataEntity, ODataEntityResource, ODataEntitySetResource, ODataOptions } from '../resources';
|
|
5
5
|
import { ODataEntityService } from './entity';
|
|
6
6
|
export declare class ODataEntitySetService<T> extends ODataEntityService<T> {
|
|
7
7
|
/**
|
|
@@ -27,24 +27,38 @@ export declare class ODataEntitySetService<T> extends ODataEntityService<T> {
|
|
|
27
27
|
* Get all entities from the entity set.
|
|
28
28
|
* @param options The options for the request.
|
|
29
29
|
*/
|
|
30
|
-
fetchAll(options?: ODataOptions): Observable<
|
|
30
|
+
fetchAll(options?: ODataOptions): Observable<{
|
|
31
|
+
entities: T[]; /**
|
|
32
|
+
* Delete an entity in the entity set.
|
|
33
|
+
* @param key The entity key.
|
|
34
|
+
* @param etag The etag for the entity.
|
|
35
|
+
* @param options The options for the request.
|
|
36
|
+
*/
|
|
37
|
+
annots: import("../resources").ODataEntitiesAnnotations<T>;
|
|
38
|
+
}>;
|
|
31
39
|
/**
|
|
32
40
|
* Get entities from the entity set.
|
|
33
41
|
* @param withCount Get the count of the entities.
|
|
34
42
|
* @param options The options for the request.
|
|
35
43
|
*/
|
|
36
|
-
fetchMany(options?: ODataOptions & {
|
|
44
|
+
fetchMany(top: number, options?: ODataOptions & {
|
|
37
45
|
withCount?: boolean;
|
|
38
|
-
}): Observable<
|
|
46
|
+
}): Observable<{
|
|
47
|
+
entities: T[];
|
|
48
|
+
annots: import("../resources").ODataEntitiesAnnotations<T>;
|
|
49
|
+
}>;
|
|
39
50
|
/**
|
|
40
51
|
* Get an entity from the entity set.
|
|
41
52
|
* @param key The entity key.
|
|
42
53
|
* @param etag The etag for the entity.
|
|
43
54
|
* @param options The options for the request.
|
|
44
55
|
*/
|
|
45
|
-
fetchOne(
|
|
56
|
+
fetchOne(options?: ODataOptions & {
|
|
46
57
|
etag?: string;
|
|
47
|
-
}): Observable<
|
|
58
|
+
}): Observable<{
|
|
59
|
+
entity: T | null;
|
|
60
|
+
annots: import("../resources").ODataEntitiesAnnotations<T>;
|
|
61
|
+
}>;
|
|
48
62
|
/**
|
|
49
63
|
* Create an entity in the entity set.
|
|
50
64
|
* @param attrs The attributes for the entity.
|
package/lib/utils/http.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const Http: {
|
|
|
4
4
|
[header: string]: string | string[];
|
|
5
5
|
})[]): HttpHeaders;
|
|
6
6
|
mergeHttpParams(...values: (HttpParams | {
|
|
7
|
-
[param: string]: string | string[];
|
|
7
|
+
[param: string]: string | number | boolean | readonly (string | number | boolean)[];
|
|
8
8
|
})[]): HttpParams;
|
|
9
9
|
splitHttpParams(params: HttpParams, keys: string[]): [HttpParams, HttpParams];
|
|
10
10
|
withoutHttpParams(params: HttpParams, keys: string[]): HttpParams;
|
package/lib/utils/objects.d.ts
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
export declare const Objects: {
|
|
2
|
-
set(obj:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
set(obj: {
|
|
3
|
+
[attr: string]: any;
|
|
4
|
+
}, path: string, value: any): void;
|
|
5
|
+
get(obj: {
|
|
6
|
+
[attr: string]: any;
|
|
7
|
+
}, path: string, def?: any): any;
|
|
8
|
+
unset(obj: {
|
|
9
|
+
[attr: string]: any;
|
|
10
|
+
}, path: string): void;
|
|
11
|
+
has(obj: {
|
|
12
|
+
[attr: string]: any;
|
|
13
|
+
}, path: string): boolean;
|
|
14
|
+
merge(target: {
|
|
15
|
+
[attr: string]: any;
|
|
16
|
+
}, source: {
|
|
17
|
+
[attr: string]: any;
|
|
18
|
+
}): {
|
|
19
|
+
[attr: string]: any;
|
|
20
|
+
};
|
|
7
21
|
equal(object1: {
|
|
8
22
|
[attr: string]: any;
|
|
9
23
|
}, object2: {
|