angular-odata 0.80.0 → 0.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +69 -34
- package/{esm2015/angular-odata.js → esm2020/angular-odata.mjs} +0 -0
- package/esm2020/lib/api.mjs +303 -0
- package/{esm2015/lib/cache/cache.js → esm2020/lib/cache/cache.mjs} +3 -3
- package/{esm2015/lib/cache/index.js → esm2020/lib/cache/index.mjs} +0 -0
- package/{esm2015/lib/cache/memory.js → esm2020/lib/cache/memory.mjs} +1 -1
- package/{esm2015/lib/cache/storage.js → esm2020/lib/cache/storage.mjs} +2 -2
- package/esm2020/lib/client.mjs +271 -0
- package/{esm2015/lib/constants.js → esm2020/lib/constants.mjs} +8 -3
- package/esm2020/lib/helper.mjs +268 -0
- package/esm2020/lib/index.mjs +19 -0
- package/esm2020/lib/models/collection.mjs +741 -0
- package/{esm2015/lib/models/index.js → esm2020/lib/models/index.mjs} +0 -0
- package/esm2020/lib/models/model.mjs +453 -0
- package/esm2020/lib/models/options.mjs +945 -0
- package/{esm2015/lib/module.js → esm2020/lib/module.mjs} +7 -7
- package/esm2020/lib/options.mjs +32 -0
- package/esm2020/lib/resources/index.mjs +7 -0
- package/esm2020/lib/resources/path/handlers.mjs +69 -0
- package/esm2020/lib/resources/path/index.mjs +3 -0
- package/esm2020/lib/resources/path/segments.mjs +124 -0
- package/esm2020/lib/resources/query/builder.mjs +590 -0
- package/esm2020/lib/resources/query/expressions/base.mjs +20 -0
- package/esm2020/lib/resources/query/expressions/compute.mjs +38 -0
- package/esm2020/lib/resources/query/expressions/expand.mjs +57 -0
- package/esm2020/lib/resources/query/expressions/filter.mjs +154 -0
- package/esm2020/lib/resources/query/expressions/index.mjs +7 -0
- package/esm2020/lib/resources/query/expressions/orderby.mjs +54 -0
- package/esm2020/lib/resources/query/expressions/search.mjs +113 -0
- package/esm2020/lib/resources/query/expressions/select.mjs +32 -0
- package/esm2020/lib/resources/query/expressions/syntax.mjs +371 -0
- package/esm2020/lib/resources/query/handlers.mjs +188 -0
- package/esm2020/lib/resources/query/index.mjs +4 -0
- package/esm2020/lib/resources/query/options.mjs +103 -0
- package/esm2020/lib/resources/request.mjs +167 -0
- package/esm2020/lib/resources/resource.mjs +326 -0
- package/esm2020/lib/resources/responses/annotations.mjs +119 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-annotation.js → esm2020/lib/resources/responses/csdl/csdl-annotation.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-entity-container.js → esm2020/lib/resources/responses/csdl/csdl-entity-container.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-entity-set.js → esm2020/lib/resources/responses/csdl/csdl-entity-set.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-enum-type.js → esm2020/lib/resources/responses/csdl/csdl-enum-type.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-function-action.js → esm2020/lib/resources/responses/csdl/csdl-function-action.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-navigation-property-binding.js → esm2020/lib/resources/responses/csdl/csdl-navigation-property-binding.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-reference.js → esm2020/lib/resources/responses/csdl/csdl-reference.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-schema.js → esm2020/lib/resources/responses/csdl/csdl-schema.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-singleton.js → esm2020/lib/resources/responses/csdl/csdl-singleton.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-structural-property.js → esm2020/lib/resources/responses/csdl/csdl-structural-property.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-structured-type.js → esm2020/lib/resources/responses/csdl/csdl-structured-type.mjs} +0 -0
- package/{esm2015/lib/resources/responses/csdl/csdl-type-definition.js → esm2020/lib/resources/responses/csdl/csdl-type-definition.mjs} +0 -0
- package/{esm2015/lib/resources/responses/index.js → esm2020/lib/resources/responses/index.mjs} +0 -0
- package/esm2020/lib/resources/responses/metadata.mjs +547 -0
- package/{esm2015/lib/resources/responses/options.js → esm2020/lib/resources/responses/options.mjs} +0 -0
- package/{esm2015/lib/resources/responses/response.js → esm2020/lib/resources/responses/response.mjs} +0 -0
- package/{esm2015/lib/resources/responses/types.js → esm2020/lib/resources/responses/types.mjs} +0 -0
- package/esm2020/lib/resources/types/action.mjs +101 -0
- package/esm2020/lib/resources/types/batch.mjs +309 -0
- package/esm2020/lib/resources/types/count.mjs +27 -0
- package/esm2020/lib/resources/types/entity-set.mjs +94 -0
- package/esm2020/lib/resources/types/entity.mjs +106 -0
- package/esm2020/lib/resources/types/function.mjs +137 -0
- package/{esm2015/lib/resources/types/index.js → esm2020/lib/resources/types/index.mjs} +0 -0
- package/esm2020/lib/resources/types/media.mjs +41 -0
- package/esm2020/lib/resources/types/metadata.mjs +30 -0
- package/esm2020/lib/resources/types/navigation-property.mjs +226 -0
- package/esm2020/lib/resources/types/options.mjs +2 -0
- package/esm2020/lib/resources/types/property.mjs +183 -0
- package/esm2020/lib/resources/types/reference.mjs +85 -0
- package/esm2020/lib/resources/types/singleton.mjs +126 -0
- package/esm2020/lib/resources/types/value.mjs +41 -0
- package/esm2020/lib/schema/annotation.mjs +37 -0
- package/esm2020/lib/schema/callable.mjs +62 -0
- package/esm2020/lib/schema/element.mjs +51 -0
- package/esm2020/lib/schema/entity-container.mjs +9 -0
- package/esm2020/lib/schema/entity-set.mjs +9 -0
- package/esm2020/lib/schema/enum-type.mjs +71 -0
- package/{esm2015/lib/schema/index.js → esm2020/lib/schema/index.mjs} +2 -1
- package/esm2020/lib/schema/parsers/callable.mjs +113 -0
- package/esm2020/lib/schema/parsers/edm.mjs +95 -0
- package/esm2020/lib/schema/parsers/enum-type.mjs +107 -0
- package/esm2020/lib/schema/parsers/index.mjs +5 -0
- package/esm2020/lib/schema/parsers/structured-type.mjs +412 -0
- package/esm2020/lib/schema/schema.mjs +61 -0
- package/esm2020/lib/schema/structured-type.mjs +198 -0
- package/esm2020/lib/services/base.mjs +29 -0
- package/esm2020/lib/services/entity-set.mjs +143 -0
- package/esm2020/lib/services/entity.mjs +12 -0
- package/{esm2015/lib/services/factory.js → esm2020/lib/services/factory.mjs} +3 -3
- package/{esm2015/lib/services/index.js → esm2020/lib/services/index.mjs} +0 -0
- package/esm2020/lib/services/singleton.mjs +48 -0
- package/{esm2015/lib/settings.js → esm2020/lib/settings.mjs} +1 -1
- package/{esm2015/lib/tokens.js → esm2020/lib/tokens.mjs} +0 -0
- package/esm2020/lib/types.mjs +37 -0
- package/esm2020/lib/utils/arraybuffers.mjs +46 -0
- package/{esm2015/lib/utils/dates.js → esm2020/lib/utils/dates.mjs} +0 -0
- package/esm2020/lib/utils/durations.mjs +40 -0
- package/{esm2015/lib/utils/enums.js → esm2020/lib/utils/enums.mjs} +0 -0
- package/esm2020/lib/utils/http.mjs +93 -0
- package/esm2020/lib/utils/index.mjs +10 -0
- package/esm2020/lib/utils/objects.mjs +195 -0
- package/esm2020/lib/utils/odata.mjs +22 -0
- package/esm2020/lib/utils/strings.mjs +20 -0
- package/esm2020/lib/utils/types.mjs +134 -0
- package/{esm2015/lib/utils/urls.js → esm2020/lib/utils/urls.mjs} +0 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/fesm2015/{angular-odata.js → angular-odata.mjs} +4508 -3427
- package/fesm2015/angular-odata.mjs.map +1 -0
- package/fesm2020/angular-odata.mjs +10510 -0
- package/fesm2020/angular-odata.mjs.map +1 -0
- package/lib/api.d.ts +14 -14
- package/lib/cache/cache.d.ts +2 -2
- package/lib/cache/storage.d.ts +1 -1
- package/lib/client.d.ts +60 -9
- package/lib/constants.d.ts +5 -2
- package/lib/index.d.ts +0 -1
- package/lib/models/collection.d.ts +30 -42
- package/lib/models/model.d.ts +37 -30
- package/lib/models/options.d.ts +30 -38
- package/lib/module.d.ts +1 -1
- package/lib/options.d.ts +47 -0
- package/lib/resources/index.d.ts +2 -3
- package/lib/resources/path/handlers.d.ts +27 -0
- package/lib/resources/path/index.d.ts +2 -0
- package/lib/resources/{path-segments.d.ts → path/segments.d.ts} +4 -16
- package/lib/resources/{builder.d.ts → query/builder.d.ts} +12 -7
- package/lib/resources/query/expressions/base.d.ts +19 -0
- package/lib/resources/query/expressions/compute.d.ts +26 -0
- package/lib/resources/query/expressions/expand.d.ts +40 -0
- package/lib/resources/query/expressions/filter.d.ts +58 -0
- package/lib/resources/query/expressions/index.d.ts +6 -0
- package/lib/resources/query/expressions/orderby.d.ts +37 -0
- package/lib/resources/query/expressions/search.d.ts +47 -0
- package/lib/resources/query/expressions/select.d.ts +21 -0
- package/lib/resources/query/expressions/syntax.d.ts +177 -0
- package/lib/resources/query/handlers.d.ts +104 -0
- package/lib/resources/query/index.d.ts +3 -0
- package/lib/resources/query/options.d.ts +38 -0
- package/lib/resources/request.d.ts +4 -3
- package/lib/resources/resource.d.ts +42 -48
- package/lib/resources/types/action.d.ts +14 -61
- package/lib/resources/types/batch.d.ts +16 -3
- package/lib/resources/types/count.d.ts +9 -17
- package/lib/resources/types/entity-set.d.ts +12 -51
- package/lib/resources/types/entity.d.ts +13 -31
- package/lib/resources/types/function.d.ts +13 -60
- package/lib/resources/types/media.d.ts +9 -8
- package/lib/resources/types/metadata.d.ts +3 -5
- package/lib/resources/types/navigation-property.d.ts +74 -65
- package/lib/resources/types/options.d.ts +1 -1
- package/lib/resources/types/property.d.ts +49 -57
- package/lib/resources/types/reference.d.ts +65 -9
- package/lib/resources/types/singleton.d.ts +53 -31
- package/lib/resources/types/value.d.ts +16 -7
- package/lib/schema/annotation.d.ts +18 -0
- package/lib/schema/callable.d.ts +4 -20
- package/lib/schema/element.d.ts +39 -0
- package/lib/schema/entity-container.d.ts +2 -12
- package/lib/schema/entity-set.d.ts +2 -18
- package/lib/schema/enum-type.d.ts +19 -25
- package/lib/schema/index.d.ts +1 -0
- package/lib/{parsers → schema/parsers}/callable.d.ts +2 -2
- package/lib/schema/parsers/edm.d.ts +4 -0
- package/lib/{parsers → schema/parsers}/enum-type.d.ts +12 -11
- package/lib/{parsers → schema/parsers}/index.d.ts +0 -0
- package/lib/{parsers → schema/parsers}/structured-type.d.ts +12 -12
- package/lib/schema/schema.d.ts +3 -10
- package/lib/schema/structured-type.d.ts +65 -27
- package/lib/services/base.d.ts +2 -2
- package/lib/services/entity-set.d.ts +5 -2
- package/lib/services/entity.d.ts +4 -1
- package/lib/services/singleton.d.ts +5 -2
- package/lib/settings.d.ts +5 -5
- package/lib/types.d.ts +1 -0
- package/lib/utils/arraybuffers.d.ts +4 -0
- package/lib/{parsers/edm.d.ts → utils/durations.d.ts} +3 -3
- package/lib/utils/http.d.ts +1 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/objects.d.ts +1 -0
- package/lib/utils/strings.d.ts +1 -0
- package/lib/utils/types.d.ts +2 -0
- package/package.json +21 -8
- package/bundles/angular-odata.umd.js +0 -11048
- package/bundles/angular-odata.umd.js.map +0 -1
- package/esm2015/lib/api.js +0 -297
- package/esm2015/lib/client.js +0 -221
- package/esm2015/lib/helper.js +0 -271
- package/esm2015/lib/index.js +0 -21
- package/esm2015/lib/models/collection.js +0 -687
- package/esm2015/lib/models/model.js +0 -423
- package/esm2015/lib/models/options.js +0 -909
- package/esm2015/lib/options.js +0 -31
- package/esm2015/lib/parsers/callable.js +0 -107
- package/esm2015/lib/parsers/edm.js +0 -192
- package/esm2015/lib/parsers/enum-type.js +0 -102
- package/esm2015/lib/parsers/index.js +0 -5
- package/esm2015/lib/parsers/structured-type.js +0 -389
- package/esm2015/lib/resources/builder.js +0 -537
- package/esm2015/lib/resources/index.js +0 -8
- package/esm2015/lib/resources/path-segments.js +0 -156
- package/esm2015/lib/resources/query-options.js +0 -157
- package/esm2015/lib/resources/request.js +0 -149
- package/esm2015/lib/resources/resource.js +0 -337
- package/esm2015/lib/resources/responses/annotations.js +0 -121
- package/esm2015/lib/resources/responses/metadata.js +0 -548
- package/esm2015/lib/resources/types/action.js +0 -180
- package/esm2015/lib/resources/types/batch.js +0 -288
- package/esm2015/lib/resources/types/count.js +0 -55
- package/esm2015/lib/resources/types/entity-set.js +0 -169
- package/esm2015/lib/resources/types/entity.js +0 -170
- package/esm2015/lib/resources/types/function.js +0 -205
- package/esm2015/lib/resources/types/media.js +0 -47
- package/esm2015/lib/resources/types/metadata.js +0 -36
- package/esm2015/lib/resources/types/navigation-property.js +0 -232
- package/esm2015/lib/resources/types/options.js +0 -2
- package/esm2015/lib/resources/types/property.js +0 -195
- package/esm2015/lib/resources/types/reference.js +0 -50
- package/esm2015/lib/resources/types/singleton.js +0 -159
- package/esm2015/lib/resources/types/value.js +0 -30
- package/esm2015/lib/schema/annotation.js +0 -7
- package/esm2015/lib/schema/callable.js +0 -82
- package/esm2015/lib/schema/entity-container.js +0 -22
- package/esm2015/lib/schema/entity-set.js +0 -33
- package/esm2015/lib/schema/enum-type.js +0 -101
- package/esm2015/lib/schema/schema.js +0 -60
- package/esm2015/lib/schema/structured-type.js +0 -148
- package/esm2015/lib/services/base.js +0 -23
- package/esm2015/lib/services/entity-set.js +0 -143
- package/esm2015/lib/services/entity.js +0 -10
- package/esm2015/lib/services/singleton.js +0 -46
- package/esm2015/lib/types.js +0 -37
- package/esm2015/lib/utils/http.js +0 -89
- package/esm2015/lib/utils/index.js +0 -9
- package/esm2015/lib/utils/objects.js +0 -139
- package/esm2015/lib/utils/odata.js +0 -21
- package/esm2015/lib/utils/strings.js +0 -13
- package/esm2015/lib/utils/types.js +0 -103
- package/fesm2015/angular-odata.js.map +0 -1
- package/lib/resources/query-options.d.ts +0 -57
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { JsonSchemaOptions, ODataEntityTypeKey, ODataStructuredTypeFieldParser, ODataStructuredTypeParser } from '../parsers';
|
|
2
|
-
import { Options, StructuredTypeConfig } from '../types';
|
|
3
|
-
import { ODataAnnotation } from './annotation';
|
|
4
1
|
import { ODataCollection } from '../models';
|
|
5
2
|
import { ODataModel } from '../models/model';
|
|
3
|
+
import { Options, StructuredTypeConfig } from '../types';
|
|
4
|
+
import { ODataSchemaElement } from './element';
|
|
5
|
+
import { JsonSchemaOptions, ODataEntityTypeKey, ODataStructuredTypeFieldParser, ODataStructuredTypeParser } from './parsers';
|
|
6
6
|
import { ODataSchema } from './schema';
|
|
7
|
-
export declare class ODataStructuredType<T> {
|
|
8
|
-
name: string;
|
|
9
|
-
schema: ODataSchema;
|
|
7
|
+
export declare class ODataStructuredType<T> extends ODataSchemaElement {
|
|
10
8
|
base?: string;
|
|
11
9
|
open: boolean;
|
|
12
10
|
parent?: ODataStructuredType<any>;
|
|
@@ -14,27 +12,17 @@ export declare class ODataStructuredType<T> {
|
|
|
14
12
|
model?: typeof ODataModel;
|
|
15
13
|
collection?: typeof ODataCollection;
|
|
16
14
|
parser: ODataStructuredTypeParser<T>;
|
|
17
|
-
annotations: ODataAnnotation[];
|
|
18
15
|
constructor(config: StructuredTypeConfig<T>, schema: ODataSchema);
|
|
19
|
-
get api(): import("angular-odata").ODataApi;
|
|
20
16
|
configure({ parserForType, findOptionsForType, }: {
|
|
21
17
|
parserForType: (type: string) => any;
|
|
22
18
|
findOptionsForType: (type: string) => any;
|
|
23
19
|
}): void;
|
|
24
20
|
/**
|
|
25
|
-
* Returns a
|
|
26
|
-
* @param alias Use the alias of the namespace instead of the namespace.
|
|
27
|
-
* @returns The string representation of the type.
|
|
28
|
-
*/
|
|
29
|
-
type({ alias }?: {
|
|
30
|
-
alias?: boolean;
|
|
31
|
-
}): string;
|
|
32
|
-
/**
|
|
33
|
-
* Returns a boolean indicating if the structured type is of the given type.
|
|
21
|
+
* Returns a boolean indicating if the structured type is a sub type of the given type.
|
|
34
22
|
* @param type String representation of the type
|
|
35
23
|
* @returns True if the callable is type of the given type
|
|
36
24
|
*/
|
|
37
|
-
|
|
25
|
+
isSubtypeOf(schema: ODataStructuredType<any>): boolean;
|
|
38
26
|
/**
|
|
39
27
|
* Returns a boolean indicating if the structured type has a simple key.
|
|
40
28
|
* @returns True if the structured type has a simple key
|
|
@@ -46,20 +34,50 @@ export declare class ODataStructuredType<T> {
|
|
|
46
34
|
*/
|
|
47
35
|
isCompoundKey(): boolean;
|
|
48
36
|
/**
|
|
49
|
-
* Find
|
|
50
|
-
* @param
|
|
51
|
-
* @returns The
|
|
37
|
+
* Find the field parser for the given field name.
|
|
38
|
+
* @param name Name of the field
|
|
39
|
+
* @returns The field parser
|
|
52
40
|
*/
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
41
|
+
findFieldByName<F>(name: keyof T): ODataStructuredTypeFieldParser<F> | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Find a parent schema of the structured type.
|
|
44
|
+
* @param predicate Function for evaluate the schemas in the hierarchy.
|
|
45
|
+
* @returns The schema that matches the predicate.
|
|
46
|
+
*/
|
|
47
|
+
findParentSchema(predicate: (p: ODataStructuredType<any>) => boolean): ODataStructuredType<any> | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Find a parent schema of the structured type for the given field.
|
|
50
|
+
* @param field Field that belongs to the structured type
|
|
51
|
+
* @returns The schema of the field
|
|
52
|
+
*/
|
|
53
|
+
findSchemaForField<E>(field: ODataStructuredTypeFieldParser<any>): ODataStructuredType<E>;
|
|
54
|
+
/**
|
|
55
|
+
* Returns all fields of the structured type.
|
|
56
|
+
* @param include_navigation Include navigation properties in the result.
|
|
57
|
+
* @param include_parents Include the parent types in the result.
|
|
58
|
+
* @returns All fields of the structured type.
|
|
59
|
+
*/
|
|
60
|
+
fields({ include_navigation, include_parents, }: {
|
|
61
|
+
include_parents: boolean;
|
|
62
|
+
include_navigation: boolean;
|
|
58
63
|
}): ODataStructuredTypeFieldParser<any>[];
|
|
64
|
+
/**
|
|
65
|
+
* Returns the keys of the structured type.
|
|
66
|
+
* @param include_parents Include the parent fields
|
|
67
|
+
* @returns The keys of the structured type
|
|
68
|
+
*/
|
|
59
69
|
keys({ include_parents, }?: {
|
|
60
70
|
include_parents?: boolean;
|
|
61
71
|
}): ODataEntityTypeKey[];
|
|
62
|
-
|
|
72
|
+
/**
|
|
73
|
+
* Picks the fields from attributes.
|
|
74
|
+
* @param attrs
|
|
75
|
+
* @param include_parents Include the parent fields
|
|
76
|
+
* @param include_navigation Include the navigation fields
|
|
77
|
+
* @param include_etag Include the etag field
|
|
78
|
+
* @returns The picked fields
|
|
79
|
+
*/
|
|
80
|
+
pick(attrs: {
|
|
63
81
|
[name: string]: any;
|
|
64
82
|
}, { include_parents, include_navigation, include_etag, }?: {
|
|
65
83
|
include_parents?: boolean;
|
|
@@ -87,13 +105,33 @@ export declare class ODataStructuredType<T> {
|
|
|
87
105
|
* @returns Encoded value
|
|
88
106
|
*/
|
|
89
107
|
encode(value: T, options?: Options): any;
|
|
108
|
+
/**
|
|
109
|
+
* Resolve the key of the structured type for the given value.
|
|
110
|
+
* @param attrs Attributes of the value
|
|
111
|
+
* @returns Resolved key
|
|
112
|
+
*/
|
|
90
113
|
resolveKey(attrs: T | {
|
|
91
114
|
[name: string]: any;
|
|
92
115
|
}): any;
|
|
116
|
+
/**
|
|
117
|
+
* Returns the defaults values for the structured type.
|
|
118
|
+
* @returns Default values for the structured type
|
|
119
|
+
*/
|
|
93
120
|
defaults(): {
|
|
94
121
|
[name: string]: any;
|
|
95
122
|
};
|
|
123
|
+
/**
|
|
124
|
+
* Convert the structured type to json schema
|
|
125
|
+
* @param options Options for json schema
|
|
126
|
+
* @returns Json Schema
|
|
127
|
+
*/
|
|
96
128
|
toJsonSchema(options?: JsonSchemaOptions<T>): any;
|
|
129
|
+
/**
|
|
130
|
+
* Validate the given value against the structured type.
|
|
131
|
+
* @param attrs Attributes of the value
|
|
132
|
+
* @param method Method to use for the process validation
|
|
133
|
+
* @returns Object with the errors
|
|
134
|
+
*/
|
|
97
135
|
validate(attrs: Partial<T>, { method, navigation, }?: {
|
|
98
136
|
method?: 'create' | 'update' | 'modify';
|
|
99
137
|
navigation?: boolean;
|
package/lib/services/base.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ODataActionResource, ODataEntities, ODataEntity, ODataFunctionResource, ODataNavigationPropertyResource, ODataProperty, ODataQueryArgumentsOptions } from '../resources';
|
|
2
|
-
import { ODataClient } from '../client';
|
|
3
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import { ODataClient } from '../client';
|
|
3
|
+
import { ODataActionResource, ODataEntities, ODataEntity, ODataFunctionResource, ODataNavigationPropertyResource, ODataProperty, ODataQueryArgumentsOptions } from '../resources';
|
|
4
4
|
export declare abstract class ODataBaseService {
|
|
5
5
|
protected client: ODataClient;
|
|
6
6
|
protected name: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { EntityKey, ODataEntities, ODataEntity, ODataEntityResource, ODataEntitySetResource, ODataOptions } from '../resources';
|
|
2
1
|
import { Observable } from 'rxjs';
|
|
3
2
|
import { ODataCollection } from '../models/collection';
|
|
4
|
-
import { ODataEntityService } from './entity';
|
|
5
3
|
import { ODataModel } from '../models/model';
|
|
4
|
+
import { EntityKey, ODataEntities, ODataEntity, ODataEntityResource, ODataEntitySetResource, ODataOptions } from '../resources';
|
|
5
|
+
import { ODataEntityService } from './entity';
|
|
6
6
|
export declare class ODataEntitySetService<T> extends ODataEntityService<T> {
|
|
7
7
|
/**
|
|
8
8
|
* Get the entity set resource for this service.
|
|
@@ -19,6 +19,9 @@ export declare class ODataEntitySetService<T> extends ODataEntityService<T> {
|
|
|
19
19
|
*/
|
|
20
20
|
attach<M extends ODataModel<T>>(model: M): void;
|
|
21
21
|
attach<C extends ODataCollection<T, ODataModel<T>>>(model: C): void;
|
|
22
|
+
/**
|
|
23
|
+
* The schema for the entity set.
|
|
24
|
+
*/
|
|
22
25
|
get entitySetSchema(): import("angular-odata").ODataEntitySet | undefined;
|
|
23
26
|
/**
|
|
24
27
|
* Get all entities from the entity set.
|
package/lib/services/entity.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { ODataModel } from '../models/model';
|
|
1
2
|
import { EntityKey, ODataResource } from '../resources';
|
|
2
3
|
import { ODataBaseService } from './base';
|
|
3
|
-
import { ODataModel } from '../models/model';
|
|
4
4
|
export declare abstract class ODataEntityService<T> extends ODataBaseService {
|
|
5
5
|
abstract entity(key?: EntityKey<T>): ODataResource<T>;
|
|
6
6
|
abstract attach<M extends ODataModel<T>>(value: M): void;
|
|
7
|
+
/**
|
|
8
|
+
* The schema for the structured type.
|
|
9
|
+
*/
|
|
7
10
|
get structuredTypeSchema(): import("angular-odata").ODataStructuredType<T> | undefined;
|
|
8
11
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import type { ODataModel } from '../models/model';
|
|
1
3
|
import type { ODataEntity, ODataOptions, ODataSingletonResource } from '../resources';
|
|
2
4
|
import { ODataEntityService } from './entity';
|
|
3
|
-
import type { ODataModel } from '../models/model';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
5
|
/**
|
|
6
6
|
* OData Singleton Service
|
|
7
7
|
* www.odata.org/getting-started/advanced-tutorial/#singleton
|
|
@@ -17,6 +17,9 @@ export declare class ODataSingletonService<T> extends ODataEntityService<T> {
|
|
|
17
17
|
* @param model The model to attach.
|
|
18
18
|
*/
|
|
19
19
|
attach<M extends ODataModel<T>>(model: M): void;
|
|
20
|
+
/**
|
|
21
|
+
* The schema for the singleton.
|
|
22
|
+
*/
|
|
20
23
|
get singletonSchema(): import("angular-odata").ODataEntitySet | undefined;
|
|
21
24
|
/**
|
|
22
25
|
* Update the singleton entity
|
package/lib/settings.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ODataCallable, ODataEntitySet, ODataEnumType, ODataStructuredType } from './schema';
|
|
3
|
-
import { ODataCollection, ODataModel } from './models';
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
4
2
|
import { ODataApi } from './api';
|
|
5
|
-
import {
|
|
3
|
+
import { ODataCollection, ODataModel } from './models';
|
|
6
4
|
import { ODataRequest } from './resources';
|
|
7
|
-
import {
|
|
5
|
+
import { ODataCallable, ODataEntitySet, ODataEnumType, ODataStructuredType } from './schema';
|
|
6
|
+
import { ODataEntityService } from './services/entity';
|
|
7
|
+
import { ApiConfig, Parser } from './types';
|
|
8
8
|
export declare class ODataSettings {
|
|
9
9
|
apis: ODataApi[];
|
|
10
10
|
constructor(...configs: ApiConfig[]);
|
package/lib/types.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ export interface ApiOptions extends Options {
|
|
|
63
63
|
stripMetadata?: ODataMetadataType;
|
|
64
64
|
fetchPolicy?: FetchPolicy;
|
|
65
65
|
bodyQueryOptions?: QueryOptionNames[];
|
|
66
|
+
deleteRefBy?: 'path' | 'id';
|
|
66
67
|
}
|
|
67
68
|
export interface OptionsHelper extends Options {
|
|
68
69
|
helper: ODataVersionHelper;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Parser } from '../types';
|
|
2
1
|
export declare type Duration = {
|
|
3
2
|
sign?: 1 | -1;
|
|
4
3
|
years?: number;
|
|
@@ -9,6 +8,7 @@ export declare type Duration = {
|
|
|
9
8
|
minutes?: number;
|
|
10
9
|
seconds?: number;
|
|
11
10
|
};
|
|
12
|
-
export declare const
|
|
13
|
-
|
|
11
|
+
export declare const Durations: {
|
|
12
|
+
toDuration(v: string): Duration;
|
|
13
|
+
toString(v: Duration): string;
|
|
14
14
|
};
|
package/lib/utils/http.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare const Http: {
|
|
|
7
7
|
[param: string]: string | string[];
|
|
8
8
|
})[]): HttpParams;
|
|
9
9
|
splitHttpParams(params: HttpParams, keys: string[]): [HttpParams, HttpParams];
|
|
10
|
+
withoutHttpParams(params: HttpParams, keys: string[]): HttpParams;
|
|
10
11
|
resolveHeaderKey(headers: HttpHeaders | {
|
|
11
12
|
[param: string]: string | string[];
|
|
12
13
|
}, options: string[]): string | undefined;
|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/objects.d.ts
CHANGED
package/lib/utils/strings.d.ts
CHANGED
package/lib/utils/types.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export declare const Types: {
|
|
2
|
+
rawType(value: any): string;
|
|
2
3
|
isObject(value: any): boolean;
|
|
3
4
|
isPlainObject(value: any): boolean;
|
|
4
5
|
isFunction(value: any): boolean;
|
|
5
6
|
isArray(value: any): boolean;
|
|
6
7
|
isEmpty(value: any): boolean;
|
|
7
8
|
isEqual(value1: any, value2: any): boolean;
|
|
9
|
+
clone(target: any): any;
|
|
8
10
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "angular-odata",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.99.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Client side OData typescript library for Angular",
|
|
6
6
|
"repository": {
|
|
@@ -25,17 +25,30 @@
|
|
|
25
25
|
"homepage": "https://github.com/diegomvh/angular-odata",
|
|
26
26
|
"private": false,
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@angular/common": "^
|
|
29
|
-
"@angular/core": "^
|
|
28
|
+
"@angular/common": "^13.1.0",
|
|
29
|
+
"@angular/core": "^13.1.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"tslib": "^2.3.0"
|
|
33
33
|
},
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"fesm2015": "fesm2015/angular-odata.
|
|
34
|
+
"module": "fesm2015/angular-odata.mjs",
|
|
35
|
+
"es2020": "fesm2020/angular-odata.mjs",
|
|
36
|
+
"esm2020": "esm2020/angular-odata.mjs",
|
|
37
|
+
"fesm2020": "fesm2020/angular-odata.mjs",
|
|
38
|
+
"fesm2015": "fesm2015/angular-odata.mjs",
|
|
39
39
|
"typings": "angular-odata.d.ts",
|
|
40
|
+
"exports": {
|
|
41
|
+
"./package.json": {
|
|
42
|
+
"default": "./package.json"
|
|
43
|
+
},
|
|
44
|
+
".": {
|
|
45
|
+
"types": "./angular-odata.d.ts",
|
|
46
|
+
"esm2020": "./esm2020/angular-odata.mjs",
|
|
47
|
+
"es2020": "./fesm2020/angular-odata.mjs",
|
|
48
|
+
"es2015": "./fesm2015/angular-odata.mjs",
|
|
49
|
+
"node": "./fesm2015/angular-odata.mjs",
|
|
50
|
+
"default": "./fesm2020/angular-odata.mjs"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
40
53
|
"sideEffects": false
|
|
41
54
|
}
|