angular-odata 0.90.0 → 0.99.2
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 +31 -25
- 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 +757 -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 +956 -0
- package/{esm2015/lib/module.js → esm2020/lib/module.mjs} +7 -7
- package/esm2020/lib/options.mjs +32 -0
- package/{esm2015/lib/resources/index.js → esm2020/lib/resources/index.mjs} +0 -0
- package/{esm2015/lib/resources/path/handlers.js → esm2020/lib/resources/path/handlers.mjs} +1 -1
- package/{esm2015/lib/resources/path/index.js → esm2020/lib/resources/path/index.mjs} +0 -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/{esm2015/lib/resources/query/index.js → esm2020/lib/resources/query/index.mjs} +0 -0
- package/esm2020/lib/resources/query/options.mjs +103 -0
- package/esm2020/lib/resources/request.mjs +167 -0
- package/esm2020/lib/resources/resource.mjs +318 -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 +104 -0
- package/esm2020/lib/resources/types/batch.mjs +314 -0
- package/esm2020/lib/resources/types/count.mjs +30 -0
- package/esm2020/lib/resources/types/entity-set.mjs +97 -0
- package/esm2020/lib/resources/types/entity.mjs +109 -0
- package/esm2020/lib/resources/types/function.mjs +140 -0
- package/{esm2015/lib/resources/types/index.js → esm2020/lib/resources/types/index.mjs} +0 -0
- package/esm2020/lib/resources/types/media.mjs +44 -0
- package/esm2020/lib/resources/types/metadata.mjs +33 -0
- package/esm2020/lib/resources/types/navigation-property.mjs +229 -0
- package/esm2020/lib/resources/types/options.mjs +2 -0
- package/esm2020/lib/resources/types/property.mjs +186 -0
- package/esm2020/lib/resources/types/reference.mjs +88 -0
- package/esm2020/lib/resources/types/singleton.mjs +129 -0
- package/esm2020/lib/resources/types/value.mjs +44 -0
- package/esm2020/lib/schema/annotation.mjs +37 -0
- package/esm2020/lib/schema/callable.mjs +62 -0
- package/esm2020/lib/schema/element.mjs +61 -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 +207 -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/{esm2015/lib/services/singleton.js → esm2020/lib/services/singleton.mjs} +1 -1
- 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/{esm2015/lib/utils/arraybuffers.js → esm2020/lib/utils/arraybuffers.mjs} +0 -0
- package/{esm2015/lib/utils/dates.js → esm2020/lib/utils/dates.mjs} +0 -0
- package/{esm2015/lib/utils/durations.js → esm2020/lib/utils/durations.mjs} +0 -0
- package/{esm2015/lib/utils/enums.js → esm2020/lib/utils/enums.mjs} +0 -0
- package/{esm2015/lib/utils/http.js → esm2020/lib/utils/http.mjs} +0 -0
- package/{esm2015/lib/utils/index.js → esm2020/lib/utils/index.mjs} +0 -0
- package/{esm2015/lib/utils/objects.js → esm2020/lib/utils/objects.mjs} +13 -13
- package/esm2020/lib/utils/odata.mjs +22 -0
- package/esm2020/lib/utils/strings.mjs +20 -0
- package/{esm2015/lib/utils/types.js → esm2020/lib/utils/types.mjs} +0 -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} +3427 -2872
- package/fesm2015/angular-odata.mjs.map +1 -0
- package/fesm2020/angular-odata.mjs +10589 -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 +3 -3
- package/lib/constants.d.ts +5 -2
- package/lib/index.d.ts +0 -1
- package/lib/models/collection.d.ts +21 -21
- package/lib/models/model.d.ts +34 -22
- package/lib/models/options.d.ts +26 -29
- package/lib/module.d.ts +1 -1
- package/lib/options.d.ts +1 -0
- package/lib/resources/path/segments.d.ts +2 -2
- package/lib/resources/query/builder.d.ts +7 -3
- 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/{syntax.d.ts → expressions/syntax.d.ts} +74 -55
- package/lib/resources/query/handlers.d.ts +30 -19
- package/lib/resources/query/options.d.ts +3 -3
- package/lib/resources/request.d.ts +1 -1
- package/lib/resources/resource.d.ts +30 -12
- package/lib/resources/types/action.d.ts +12 -18
- package/lib/resources/types/batch.d.ts +10 -2
- package/lib/resources/types/count.d.ts +6 -4
- package/lib/resources/types/entity-set.d.ts +11 -14
- package/lib/resources/types/entity.d.ts +13 -15
- package/lib/resources/types/function.d.ts +11 -17
- package/lib/resources/types/media.d.ts +8 -6
- package/lib/resources/types/metadata.d.ts +3 -4
- package/lib/resources/types/navigation-property.d.ts +17 -22
- package/lib/resources/types/property.d.ts +13 -18
- package/lib/resources/types/reference.d.ts +41 -7
- package/lib/resources/types/singleton.d.ts +12 -15
- package/lib/resources/types/value.d.ts +9 -4
- package/lib/schema/annotation.d.ts +18 -0
- package/lib/schema/callable.d.ts +4 -20
- package/lib/schema/element.d.ts +45 -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 +3 -34
- package/lib/schema/index.d.ts +1 -0
- package/lib/{parsers → schema/parsers}/callable.d.ts +1 -1
- package/lib/{parsers → schema/parsers}/edm.d.ts +1 -1
- 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 +12 -24
- package/lib/services/base.d.ts +2 -2
- package/lib/services/entity-set.d.ts +2 -2
- package/lib/services/entity.d.ts +1 -1
- package/lib/services/singleton.d.ts +2 -2
- package/lib/settings.d.ts +5 -5
- package/lib/types.d.ts +1 -0
- package/lib/utils/strings.d.ts +1 -0
- package/package.json +21 -8
- package/bundles/angular-odata.umd.js +0 -11694
- package/bundles/angular-odata.umd.js.map +0 -1
- package/esm2015/lib/api.js +0 -297
- package/esm2015/lib/client.js +0 -272
- package/esm2015/lib/helper.js +0 -271
- package/esm2015/lib/index.js +0 -21
- package/esm2015/lib/models/collection.js +0 -717
- package/esm2015/lib/models/model.js +0 -419
- package/esm2015/lib/models/options.js +0 -924
- package/esm2015/lib/options.js +0 -31
- package/esm2015/lib/parsers/callable.js +0 -107
- package/esm2015/lib/parsers/edm.js +0 -95
- 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 -388
- package/esm2015/lib/resources/path/segments.js +0 -121
- package/esm2015/lib/resources/query/builder.js +0 -544
- package/esm2015/lib/resources/query/expressions.js +0 -194
- package/esm2015/lib/resources/query/handlers.js +0 -192
- package/esm2015/lib/resources/query/options.js +0 -103
- package/esm2015/lib/resources/query/syntax.js +0 -349
- package/esm2015/lib/resources/request.js +0 -168
- package/esm2015/lib/resources/resource.js +0 -243
- 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 -105
- package/esm2015/lib/resources/types/batch.js +0 -294
- package/esm2015/lib/resources/types/count.js +0 -33
- package/esm2015/lib/resources/types/entity-set.js +0 -101
- package/esm2015/lib/resources/types/entity.js +0 -137
- package/esm2015/lib/resources/types/function.js +0 -130
- 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 -205
- package/esm2015/lib/resources/types/options.js +0 -2
- package/esm2015/lib/resources/types/property.js +0 -151
- package/esm2015/lib/resources/types/reference.js +0 -73
- package/esm2015/lib/resources/types/singleton.js +0 -167
- package/esm2015/lib/resources/types/value.js +0 -35
- 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 -126
- package/esm2015/lib/schema/schema.js +0 -60
- package/esm2015/lib/schema/structured-type.js +0 -217
- package/esm2015/lib/services/base.js +0 -23
- package/esm2015/lib/services/entity-set.js +0 -146
- package/esm2015/lib/services/entity.js +0 -12
- package/esm2015/lib/types.js +0 -37
- package/esm2015/lib/utils/odata.js +0 -21
- package/esm2015/lib/utils/strings.js +0 -13
- package/fesm2015/angular-odata.js.map +0 -1
- package/lib/resources/query/expressions.d.ts +0 -50
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export declare class ODataEnumTypeFieldParser {
|
|
1
|
+
import { EnumTypeConfig, EnumTypeFieldConfig, Options, OptionsHelper, Parser } from '../../types';
|
|
2
|
+
import { ODataAnnotatable } from '../annotation';
|
|
3
|
+
export declare class ODataEnumTypeFieldParser extends ODataAnnotatable {
|
|
4
4
|
name: string;
|
|
5
5
|
value: number;
|
|
6
|
-
annotations: ODataAnnotation[];
|
|
7
6
|
constructor(name: string, field: EnumTypeFieldConfig);
|
|
8
|
-
|
|
9
|
-
* Find an annotation inside the enum field.
|
|
10
|
-
* @param predicate Function that returns true if the annotation match.
|
|
11
|
-
* @returns The annotation that matches the predicate.
|
|
12
|
-
*/
|
|
13
|
-
findAnnotation(predicate: (annot: ODataAnnotation) => boolean): ODataAnnotation | undefined;
|
|
7
|
+
titleize(term?: string | RegExp): string;
|
|
14
8
|
}
|
|
15
|
-
export declare class ODataEnumTypeParser<T> implements Parser<T> {
|
|
9
|
+
export declare class ODataEnumTypeParser<T> extends ODataAnnotatable implements Parser<T> {
|
|
16
10
|
name: string;
|
|
17
11
|
namespace: string;
|
|
18
12
|
alias?: string;
|
|
@@ -25,6 +19,13 @@ export declare class ODataEnumTypeParser<T> implements Parser<T> {
|
|
|
25
19
|
fields: ODataEnumTypeFieldParser[];
|
|
26
20
|
optionsHelper?: OptionsHelper;
|
|
27
21
|
constructor(config: EnumTypeConfig<T>, namespace: string, alias?: string);
|
|
22
|
+
/**
|
|
23
|
+
* Create a nicer looking title.
|
|
24
|
+
* Titleize is meant for creating pretty output.
|
|
25
|
+
* @param term The term of the annotation to find.
|
|
26
|
+
* @returns The titleized string.
|
|
27
|
+
*/
|
|
28
|
+
ttitelize(term?: string | RegExp): string;
|
|
28
29
|
configure({ options }: {
|
|
29
30
|
options: OptionsHelper;
|
|
30
31
|
}): void;
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Options, OptionsHelper, Parser, StructuredTypeConfig, StructuredTypeFieldConfig } from '../../types';
|
|
2
|
+
import { ODataAnnotatable } from '../annotation';
|
|
2
3
|
import { ODataEnumTypeParser } from './enum-type';
|
|
3
|
-
import { ODataAnnotation } from '../schema/annotation';
|
|
4
4
|
declare type JsonSchemaSelect<T> = Array<keyof T>;
|
|
5
5
|
declare type JsonSchemaCustom<T> = {
|
|
6
6
|
[P in keyof T]?: (schema: any, field: ODataStructuredTypeFieldParser<T[P]>) => any;
|
|
@@ -33,7 +33,7 @@ export declare class ODataReferential {
|
|
|
33
33
|
referencedProperty: string;
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
export declare class ODataStructuredTypeFieldParser<T> implements Parser<T> {
|
|
36
|
+
export declare class ODataStructuredTypeFieldParser<T> extends ODataAnnotatable implements Parser<T> {
|
|
37
37
|
name: string;
|
|
38
38
|
private structuredType;
|
|
39
39
|
type: string;
|
|
@@ -46,15 +46,8 @@ export declare class ODataStructuredTypeFieldParser<T> implements Parser<T> {
|
|
|
46
46
|
precision?: number;
|
|
47
47
|
scale?: number;
|
|
48
48
|
referentials: ODataReferential[];
|
|
49
|
-
annotations: ODataAnnotation[];
|
|
50
49
|
optionsHelper?: OptionsHelper;
|
|
51
50
|
constructor(name: string, structuredType: ODataStructuredTypeParser<any>, field: StructuredTypeFieldConfig);
|
|
52
|
-
/**
|
|
53
|
-
* Find an annotation inside the structured field type.
|
|
54
|
-
* @param predicate Function that returns true if the annotation match.
|
|
55
|
-
* @returns The annotation that matches the predicate.
|
|
56
|
-
*/
|
|
57
|
-
findAnnotation(predicate: (annot: ODataAnnotation) => boolean): ODataAnnotation | undefined;
|
|
58
51
|
validate(value: any, { method, navigation, }?: {
|
|
59
52
|
method?: 'create' | 'update' | 'modify';
|
|
60
53
|
navigation?: boolean;
|
|
@@ -81,7 +74,7 @@ export declare class ODataStructuredTypeFieldParser<T> implements Parser<T> {
|
|
|
81
74
|
isStructuredType(): boolean;
|
|
82
75
|
structured(): ODataStructuredTypeParser<T>;
|
|
83
76
|
}
|
|
84
|
-
export declare class ODataStructuredTypeParser<T> implements Parser<T> {
|
|
77
|
+
export declare class ODataStructuredTypeParser<T> extends ODataAnnotatable implements Parser<T> {
|
|
85
78
|
name: string;
|
|
86
79
|
namespace: string;
|
|
87
80
|
open: boolean;
|
|
@@ -93,8 +86,15 @@ export declare class ODataStructuredTypeParser<T> implements Parser<T> {
|
|
|
93
86
|
fields: ODataStructuredTypeFieldParser<any>[];
|
|
94
87
|
optionsHelper?: OptionsHelper;
|
|
95
88
|
constructor(config: StructuredTypeConfig<T>, namespace: string, alias?: string);
|
|
89
|
+
/**
|
|
90
|
+
* Create a nicer looking title.
|
|
91
|
+
* Titleize is meant for creating pretty output.
|
|
92
|
+
* @param term The term of the annotation to find.
|
|
93
|
+
* @returns The titleized string.
|
|
94
|
+
*/
|
|
95
|
+
titleize(term?: string | RegExp): string;
|
|
96
96
|
isTypeOf(type: string): boolean;
|
|
97
|
-
|
|
97
|
+
isSubtypeOf(type: string): boolean;
|
|
98
98
|
findChildParser(predicate: (p: ODataStructuredTypeParser<any>) => boolean): ODataStructuredTypeParser<any> | undefined;
|
|
99
99
|
childParser(predicate: (p: ODataStructuredTypeParser<any>) => boolean): Parser<any>;
|
|
100
100
|
deserialize(value: any, options?: Options): T;
|
package/lib/schema/schema.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Parser, SchemaConfig } from '../types';
|
|
2
|
-
import { ODataAnnotation } from './annotation';
|
|
3
1
|
import { ODataApi } from '../api';
|
|
2
|
+
import { Parser, SchemaConfig } from '../types';
|
|
3
|
+
import { ODataAnnotatable } from './annotation';
|
|
4
4
|
import { ODataCallable } from './callable';
|
|
5
5
|
import { ODataEntityContainer } from './entity-container';
|
|
6
6
|
import { ODataEntitySet } from './entity-set';
|
|
7
7
|
import { ODataEnumType } from './enum-type';
|
|
8
8
|
import { ODataStructuredType } from './structured-type';
|
|
9
|
-
export declare class ODataSchema {
|
|
9
|
+
export declare class ODataSchema extends ODataAnnotatable {
|
|
10
10
|
api: ODataApi;
|
|
11
11
|
namespace: string;
|
|
12
12
|
alias?: string;
|
|
@@ -14,16 +14,9 @@ export declare class ODataSchema {
|
|
|
14
14
|
entities: ODataStructuredType<any>[];
|
|
15
15
|
callables: ODataCallable<any>[];
|
|
16
16
|
containers: ODataEntityContainer[];
|
|
17
|
-
annotations: ODataAnnotation[];
|
|
18
17
|
constructor(config: SchemaConfig, api: ODataApi);
|
|
19
18
|
isNamespaceOf(type: string): boolean | "" | undefined;
|
|
20
19
|
get entitySets(): ODataEntitySet[];
|
|
21
|
-
/**
|
|
22
|
-
* Find an annotation inside the schema.
|
|
23
|
-
* @param predicate Function that returns true if the annotation match.
|
|
24
|
-
* @returns The annotation that matches the predicate.
|
|
25
|
-
*/
|
|
26
|
-
findAnnotation(predicate: (annot: ODataAnnotation) => boolean): ODataAnnotation | undefined;
|
|
27
20
|
findEnumTypeForType<T>(type: string): ODataEnumType<T> | undefined;
|
|
28
21
|
findStructuredTypeForType<T>(type: string): ODataStructuredType<T> | undefined;
|
|
29
22
|
findCallableForType<T>(type: string, bindingType?: string): ODataCallable<T> | undefined;
|
|
@@ -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,23 @@ 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
|
|
27
|
-
* @returns
|
|
21
|
+
* Returns a boolean indicating if the structured type is a subtype of the given type.
|
|
22
|
+
* @param type String representation of the type
|
|
23
|
+
* @returns True if the callable is type of the given type
|
|
28
24
|
*/
|
|
29
|
-
|
|
30
|
-
alias?: boolean;
|
|
31
|
-
}): string;
|
|
25
|
+
isSubtypeOf(schema: ODataStructuredType<any>): boolean;
|
|
32
26
|
/**
|
|
33
|
-
* Returns a boolean indicating if the structured type is of the given type.
|
|
27
|
+
* Returns a boolean indicating if the structured type is a supertype of the given type.
|
|
34
28
|
* @param type String representation of the type
|
|
35
29
|
* @returns True if the callable is type of the given type
|
|
36
30
|
*/
|
|
37
|
-
|
|
31
|
+
isSupertypeOf(schema: ODataStructuredType<any>): boolean;
|
|
38
32
|
/**
|
|
39
33
|
* Returns a boolean indicating if the structured type has a simple key.
|
|
40
34
|
* @returns True if the structured type has a simple key
|
|
@@ -45,18 +39,12 @@ export declare class ODataStructuredType<T> {
|
|
|
45
39
|
* @returns True if the structured type has a compound key.
|
|
46
40
|
*/
|
|
47
41
|
isCompoundKey(): boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Find an annotation inside the structured type
|
|
50
|
-
* @param predicate Function that returns true if the annotation match.
|
|
51
|
-
* @returns The annotation that matches the predicate.
|
|
52
|
-
*/
|
|
53
|
-
findAnnotation(predicate: (annot: ODataAnnotation) => boolean): ODataAnnotation | undefined;
|
|
54
42
|
/**
|
|
55
43
|
* Find the field parser for the given field name.
|
|
56
44
|
* @param name Name of the field
|
|
57
45
|
* @returns The field parser
|
|
58
46
|
*/
|
|
59
|
-
findFieldByName(name: keyof T): ODataStructuredTypeFieldParser<
|
|
47
|
+
findFieldByName<F>(name: keyof T): ODataStructuredTypeFieldParser<F> | undefined;
|
|
60
48
|
/**
|
|
61
49
|
* Find a parent schema of the structured type.
|
|
62
50
|
* @param predicate Function for evaluate the schemas in the hierarchy.
|
|
@@ -68,7 +56,7 @@ export declare class ODataStructuredType<T> {
|
|
|
68
56
|
* @param field Field that belongs to the structured type
|
|
69
57
|
* @returns The schema of the field
|
|
70
58
|
*/
|
|
71
|
-
findSchemaForField(field: ODataStructuredTypeFieldParser<any>): ODataStructuredType<
|
|
59
|
+
findSchemaForField<E>(field: ODataStructuredTypeFieldParser<any>): ODataStructuredType<E>;
|
|
72
60
|
/**
|
|
73
61
|
* Returns all fields of the structured type.
|
|
74
62
|
* @param include_navigation Include navigation properties in the result.
|
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.
|
package/lib/services/entity.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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;
|
|
@@ -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
|
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;
|
package/lib/utils/strings.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "angular-odata",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.99.2",
|
|
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
|
}
|