angular-odata 0.126.0 → 0.128.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/esm2022/lib/annotations.mjs +140 -0
- package/esm2022/lib/api.mjs +211 -166
- package/esm2022/lib/cache/cache.mjs +1 -1
- package/esm2022/lib/cache/memory.mjs +1 -1
- package/esm2022/lib/client.mjs +8 -48
- package/esm2022/lib/constants.mjs +4 -1
- package/esm2022/lib/index.mjs +3 -1
- package/esm2022/lib/loaders.mjs +23 -17
- package/esm2022/lib/metadata/csdl/csdl-annotation.mjs +95 -0
- package/esm2022/lib/metadata/csdl/csdl-entity-container.mjs +27 -0
- package/esm2022/lib/metadata/csdl/csdl-entity-set.mjs +24 -0
- package/esm2022/lib/metadata/csdl/csdl-enum-type.mjs +37 -0
- package/esm2022/lib/metadata/csdl/csdl-function-action.mjs +94 -0
- package/esm2022/lib/metadata/csdl/csdl-navigation-property-binding.mjs +7 -0
- package/esm2022/lib/metadata/csdl/csdl-reference.mjs +23 -0
- package/esm2022/lib/metadata/csdl/csdl-schema.mjs +39 -0
- package/esm2022/lib/metadata/csdl/csdl-singleton.mjs +15 -0
- package/esm2022/lib/metadata/csdl/csdl-structural-property.mjs +70 -0
- package/esm2022/lib/metadata/csdl/csdl-structured-type.mjs +92 -0
- package/esm2022/lib/metadata/csdl/csdl-type-definition.mjs +15 -0
- package/esm2022/lib/metadata/index.mjs +3 -0
- package/esm2022/lib/metadata/metadata.mjs +14 -0
- package/esm2022/lib/metadata/parser.mjs +563 -0
- package/esm2022/lib/models/collection.mjs +202 -207
- package/esm2022/lib/models/model.mjs +48 -52
- package/esm2022/lib/models/options.mjs +172 -137
- package/esm2022/lib/module.mjs +21 -8
- package/esm2022/lib/options.mjs +2 -1
- package/esm2022/lib/resources/index.mjs +2 -2
- package/esm2022/lib/resources/options.mjs +56 -0
- package/esm2022/lib/resources/path/handlers.mjs +14 -4
- package/esm2022/lib/resources/path/segments.mjs +29 -11
- package/esm2022/lib/resources/query/builder.mjs +14 -2
- package/esm2022/lib/resources/query/expressions/apply.mjs +236 -0
- package/esm2022/lib/resources/query/expressions/base.mjs +1 -1
- package/esm2022/lib/resources/query/expressions/compute.mjs +2 -2
- package/esm2022/lib/resources/query/expressions/count.mjs +6 -6
- package/esm2022/lib/resources/query/expressions/expand.mjs +7 -7
- package/esm2022/lib/resources/query/expressions/filter.mjs +6 -6
- package/esm2022/lib/resources/query/expressions/index.mjs +2 -1
- package/esm2022/lib/resources/query/expressions/orderby.mjs +3 -3
- package/esm2022/lib/resources/query/expressions/search.mjs +6 -6
- package/esm2022/lib/resources/query/expressions/select.mjs +6 -2
- package/esm2022/lib/resources/query/expressions/syntax.mjs +161 -8
- package/esm2022/lib/resources/query/handlers.mjs +89 -54
- package/esm2022/lib/resources/query/options.mjs +91 -77
- package/esm2022/lib/resources/request.mjs +5 -5
- package/esm2022/lib/resources/resource.mjs +118 -88
- package/esm2022/lib/resources/response.mjs +174 -0
- package/esm2022/lib/resources/types/action.mjs +29 -26
- package/esm2022/lib/resources/types/batch.mjs +18 -16
- package/esm2022/lib/resources/types/count.mjs +7 -7
- package/esm2022/lib/resources/types/entity-set.mjs +38 -25
- package/esm2022/lib/resources/types/entity.mjs +14 -11
- package/esm2022/lib/resources/types/function.mjs +25 -28
- package/esm2022/lib/resources/types/metadata.mjs +9 -5
- package/esm2022/lib/resources/types/navigation-property.mjs +37 -31
- package/esm2022/lib/resources/types/property.mjs +32 -50
- package/esm2022/lib/resources/types/reference.mjs +6 -7
- package/esm2022/lib/resources/types/singleton.mjs +11 -7
- package/esm2022/lib/resources/types/value.mjs +16 -12
- package/esm2022/lib/schema/callable.mjs +10 -10
- package/esm2022/lib/schema/element.mjs +15 -9
- package/esm2022/lib/schema/entity-container.mjs +4 -2
- package/esm2022/lib/schema/enum-type.mjs +6 -7
- package/esm2022/lib/schema/index.mjs +2 -1
- package/esm2022/lib/schema/parsers/callable.mjs +10 -7
- package/esm2022/lib/schema/parsers/edm.mjs +6 -4
- package/esm2022/lib/schema/parsers/enum-type.mjs +15 -8
- package/esm2022/lib/schema/parsers/structured-type.mjs +66 -55
- package/esm2022/lib/schema/schema.mjs +18 -34
- package/esm2022/lib/schema/singleton.mjs +9 -0
- package/esm2022/lib/schema/structured-type.mjs +18 -23
- package/esm2022/lib/services/base.mjs +4 -4
- package/esm2022/lib/services/entity-set.mjs +12 -2
- package/esm2022/lib/services/entity.mjs +2 -2
- package/esm2022/lib/services/factory.mjs +22 -11
- package/esm2022/lib/services/singleton.mjs +8 -2
- package/esm2022/lib/settings.mjs +7 -99
- package/esm2022/lib/types.mjs +12 -1
- package/esm2022/lib/utils/http.mjs +8 -6
- package/fesm2022/angular-odata.mjs +7413 -6579
- package/fesm2022/angular-odata.mjs.map +1 -1
- package/lib/{resources/responses/annotations.d.ts → annotations.d.ts} +3 -2
- package/lib/api.d.ts +29 -26
- package/lib/cache/memory.d.ts +1 -1
- package/lib/client.d.ts +0 -20
- package/lib/constants.d.ts +3 -0
- package/lib/index.d.ts +1 -0
- package/lib/loaders.d.ts +7 -1
- package/lib/metadata/csdl/csdl-annotation.d.ts +123 -0
- package/lib/metadata/csdl/csdl-entity-container.d.ts +26 -0
- package/lib/metadata/csdl/csdl-entity-set.d.ts +20 -0
- package/lib/metadata/csdl/csdl-enum-type.d.ts +29 -0
- package/lib/metadata/csdl/csdl-function-action.d.ts +105 -0
- package/lib/metadata/csdl/csdl-navigation-property-binding.d.ts +8 -0
- package/lib/metadata/csdl/csdl-reference.d.ts +30 -0
- package/lib/metadata/csdl/csdl-schema.d.ts +34 -0
- package/lib/metadata/csdl/csdl-singleton.d.ts +16 -0
- package/lib/metadata/csdl/csdl-structural-property.d.ts +70 -0
- package/lib/metadata/csdl/csdl-structured-type.d.ts +73 -0
- package/lib/metadata/csdl/csdl-type-definition.d.ts +22 -0
- package/lib/metadata/index.d.ts +2 -0
- package/lib/metadata/metadata.d.ts +10 -0
- package/lib/{resources/responses/metadata.d.ts → metadata/parser.d.ts} +19 -7
- package/lib/models/collection.d.ts +23 -12
- package/lib/models/model.d.ts +19 -19
- package/lib/models/options.d.ts +43 -27
- package/lib/module.d.ts +2 -1
- package/lib/options.d.ts +5 -0
- package/lib/resources/index.d.ts +1 -1
- package/lib/resources/{responses/options.d.ts → options.d.ts} +2 -2
- package/lib/resources/path/handlers.d.ts +4 -2
- package/lib/resources/path/segments.d.ts +13 -1
- package/lib/resources/query/builder.d.ts +6 -5
- package/lib/resources/query/expressions/apply.d.ts +125 -0
- package/lib/resources/query/expressions/base.d.ts +1 -1
- package/lib/resources/query/expressions/compute.d.ts +4 -4
- package/lib/resources/query/expressions/count.d.ts +3 -3
- package/lib/resources/query/expressions/expand.d.ts +8 -8
- package/lib/resources/query/expressions/filter.d.ts +3 -3
- package/lib/resources/query/expressions/index.d.ts +1 -0
- package/lib/resources/query/expressions/orderby.d.ts +7 -6
- package/lib/resources/query/expressions/search.d.ts +2 -2
- package/lib/resources/query/expressions/select.d.ts +4 -3
- package/lib/resources/query/expressions/syntax.d.ts +77 -4
- package/lib/resources/query/handlers.d.ts +32 -9
- package/lib/resources/query/options.d.ts +20 -10
- package/lib/resources/resource.d.ts +32 -16
- package/lib/resources/{responses/response.d.ts → response.d.ts} +17 -5
- package/lib/resources/types/action.d.ts +12 -10
- package/lib/resources/types/batch.d.ts +12 -6
- package/lib/resources/types/count.d.ts +1 -5
- package/lib/resources/types/entity-set.d.ts +13 -6
- package/lib/resources/types/entity.d.ts +3 -4
- package/lib/resources/types/function.d.ts +11 -11
- package/lib/resources/types/metadata.d.ts +1 -1
- package/lib/resources/types/navigation-property.d.ts +13 -7
- package/lib/resources/types/property.d.ts +15 -8
- package/lib/resources/types/reference.d.ts +2 -4
- package/lib/resources/types/singleton.d.ts +4 -6
- package/lib/resources/types/value.d.ts +2 -6
- package/lib/schema/callable.d.ts +5 -7
- package/lib/schema/element.d.ts +11 -4
- package/lib/schema/entity-container.d.ts +2 -0
- package/lib/schema/enum-type.d.ts +4 -7
- package/lib/schema/index.d.ts +1 -0
- package/lib/schema/parsers/callable.d.ts +7 -8
- package/lib/schema/parsers/enum-type.d.ts +15 -5
- package/lib/schema/parsers/structured-type.d.ts +6 -8
- package/lib/schema/schema.d.ts +6 -9
- package/lib/schema/singleton.d.ts +10 -0
- package/lib/schema/structured-type.d.ts +5 -8
- package/lib/services/entity-set.d.ts +7 -3
- package/lib/services/factory.d.ts +14 -2
- package/lib/services/singleton.d.ts +4 -2
- package/lib/settings.d.ts +0 -10
- package/lib/types.d.ts +23 -3
- package/lib/utils/http.d.ts +1 -1
- package/package.json +5 -1
- package/schematics/apigen/angular/api-config.d.ts +15 -0
- package/schematics/apigen/angular/api-config.js +34 -0
- package/schematics/apigen/angular/api-config.js.map +1 -0
- package/schematics/apigen/angular/base.d.ts +51 -0
- package/schematics/apigen/angular/base.js +200 -0
- package/schematics/apigen/angular/base.js.map +1 -0
- package/schematics/apigen/angular/entity.d.ts +24 -0
- package/schematics/apigen/angular/entity.js +71 -0
- package/schematics/apigen/angular/entity.js.map +1 -0
- package/schematics/apigen/angular/enum.d.ts +25 -0
- package/schematics/apigen/angular/enum.js +56 -0
- package/schematics/apigen/angular/enum.js.map +1 -0
- package/schematics/apigen/angular/import.d.ts +6 -0
- package/schematics/apigen/angular/import.js +18 -0
- package/schematics/apigen/angular/import.js.map +1 -0
- package/schematics/apigen/angular/module.d.ts +18 -0
- package/schematics/apigen/angular/module.js +41 -0
- package/schematics/apigen/angular/module.js.map +1 -0
- package/schematics/apigen/angular/service.d.ts +20 -0
- package/schematics/apigen/angular/service.js +76 -0
- package/schematics/apigen/angular/service.js.map +1 -0
- package/schematics/apigen/files/api-config/__fileName__.ts +9 -0
- package/schematics/apigen/files/entity/__fileName__.ts +7 -0
- package/schematics/apigen/files/entitycontainer-service/__fileName__.ts +18 -0
- package/schematics/apigen/files/entityset-service/__fileName__.ts +27 -0
- package/schematics/apigen/files/enum/__fileName__.ts +4 -0
- package/schematics/apigen/files/index/__fileName__.ts +2 -0
- package/schematics/apigen/files/module/__fileName__.ts +9 -0
- package/schematics/apigen/files/singleton-service/__fileName__.ts +18 -0
- package/schematics/apigen/index.d.ts +3 -0
- package/schematics/apigen/index.js +106 -0
- package/schematics/apigen/index.js.map +1 -0
- package/schematics/apigen/metadata/csdl/csdl-annotation.d.ts +120 -0
- package/schematics/apigen/metadata/csdl/csdl-annotation.js +98 -0
- package/schematics/apigen/metadata/csdl/csdl-annotation.js.map +1 -0
- package/schematics/apigen/metadata/csdl/csdl-entity-container.d.ts +26 -0
- package/schematics/apigen/metadata/csdl/csdl-entity-container.js +30 -0
- package/schematics/apigen/metadata/csdl/csdl-entity-container.js.map +1 -0
- package/schematics/apigen/metadata/csdl/csdl-entity-set.d.ts +20 -0
- package/schematics/apigen/metadata/csdl/csdl-entity-set.js +26 -0
- package/schematics/apigen/metadata/csdl/csdl-entity-set.js.map +1 -0
- package/schematics/apigen/metadata/csdl/csdl-enum-type.d.ts +28 -0
- package/schematics/apigen/metadata/csdl/csdl-enum-type.js +33 -0
- package/schematics/apigen/metadata/csdl/csdl-enum-type.js.map +1 -0
- package/schematics/apigen/metadata/csdl/csdl-function-action.d.ts +103 -0
- package/schematics/apigen/metadata/csdl/csdl-function-action.js +84 -0
- package/schematics/apigen/metadata/csdl/csdl-function-action.js.map +1 -0
- package/schematics/apigen/metadata/csdl/csdl-navigation-property-binding.d.ts +8 -0
- package/schematics/apigen/metadata/csdl/csdl-navigation-property-binding.js +11 -0
- package/schematics/apigen/metadata/csdl/csdl-navigation-property-binding.js.map +1 -0
- package/schematics/apigen/metadata/csdl/csdl-reference.d.ts +30 -0
- package/schematics/apigen/metadata/csdl/csdl-reference.js +29 -0
- package/schematics/apigen/metadata/csdl/csdl-reference.js.map +1 -0
- package/schematics/apigen/metadata/csdl/csdl-schema.d.ts +32 -0
- package/schematics/apigen/metadata/csdl/csdl-schema.js +26 -0
- package/schematics/apigen/metadata/csdl/csdl-schema.js.map +1 -0
- package/schematics/apigen/metadata/csdl/csdl-singleton.d.ts +18 -0
- package/schematics/apigen/metadata/csdl/csdl-singleton.js +25 -0
- package/schematics/apigen/metadata/csdl/csdl-singleton.js.map +1 -0
- package/schematics/apigen/metadata/csdl/csdl-structural-property.d.ts +63 -0
- package/schematics/apigen/metadata/csdl/csdl-structural-property.js +50 -0
- package/schematics/apigen/metadata/csdl/csdl-structural-property.js.map +1 -0
- package/schematics/apigen/metadata/csdl/csdl-structured-type.d.ts +64 -0
- package/schematics/apigen/metadata/csdl/csdl-structured-type.js +71 -0
- package/schematics/apigen/metadata/csdl/csdl-structured-type.js.map +1 -0
- package/schematics/apigen/metadata/csdl/csdl-type-definition.d.ts +22 -0
- package/schematics/apigen/metadata/csdl/csdl-type-definition.js +19 -0
- package/schematics/apigen/metadata/csdl/csdl-type-definition.js.map +1 -0
- package/schematics/apigen/metadata/index.d.ts +1 -0
- package/schematics/apigen/metadata/index.js +18 -0
- package/schematics/apigen/metadata/index.js.map +1 -0
- package/schematics/apigen/metadata/metadata.d.ts +11 -0
- package/schematics/apigen/metadata/metadata.js +30 -0
- package/schematics/apigen/metadata/metadata.js.map +1 -0
- package/schematics/apigen/metadata/parser.d.ts +110 -0
- package/schematics/apigen/metadata/parser.js +568 -0
- package/schematics/apigen/metadata/parser.js.map +1 -0
- package/schematics/apigen/schema.d.ts +8 -0
- package/schematics/apigen/schema.js +3 -0
- package/schematics/apigen/schema.js.map +1 -0
- package/schematics/apigen/schema.json +36 -0
- package/schematics/apigen/utils.d.ts +1 -0
- package/schematics/apigen/utils.js +75 -0
- package/schematics/apigen/utils.js.map +1 -0
- package/schematics/collection.json +14 -0
- package/schematics/ng-add/index.d.ts +2 -0
- package/schematics/ng-add/index.js +13 -0
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/random.d.ts +1 -0
- package/schematics/random.js +604 -0
- package/schematics/random.js.map +1 -0
- package/esm2022/lib/resources/responses/annotations.mjs +0 -137
- package/esm2022/lib/resources/responses/csdl/csdl-annotation.mjs +0 -33
- package/esm2022/lib/resources/responses/csdl/csdl-entity-container.mjs +0 -11
- package/esm2022/lib/resources/responses/csdl/csdl-entity-set.mjs +0 -9
- package/esm2022/lib/resources/responses/csdl/csdl-enum-type.mjs +0 -15
- package/esm2022/lib/resources/responses/csdl/csdl-function-action.mjs +0 -56
- package/esm2022/lib/resources/responses/csdl/csdl-navigation-property-binding.mjs +0 -7
- package/esm2022/lib/resources/responses/csdl/csdl-reference.mjs +0 -23
- package/esm2022/lib/resources/responses/csdl/csdl-schema.mjs +0 -18
- package/esm2022/lib/resources/responses/csdl/csdl-singleton.mjs +0 -8
- package/esm2022/lib/resources/responses/csdl/csdl-structural-property.mjs +0 -39
- package/esm2022/lib/resources/responses/csdl/csdl-structured-type.mjs +0 -34
- package/esm2022/lib/resources/responses/csdl/csdl-type-definition.mjs +0 -14
- package/esm2022/lib/resources/responses/index.mjs +0 -5
- package/esm2022/lib/resources/responses/metadata.mjs +0 -547
- package/esm2022/lib/resources/responses/options.mjs +0 -56
- package/esm2022/lib/resources/responses/response.mjs +0 -174
- package/esm2022/lib/resources/responses/types.mjs +0 -2
- package/lib/resources/responses/csdl/csdl-annotation.d.ts +0 -27
- package/lib/resources/responses/csdl/csdl-entity-container.d.ts +0 -12
- package/lib/resources/responses/csdl/csdl-entity-set.d.ts +0 -8
- package/lib/resources/responses/csdl/csdl-enum-type.d.ts +0 -12
- package/lib/resources/responses/csdl/csdl-function-action.d.ts +0 -49
- package/lib/resources/responses/csdl/csdl-navigation-property-binding.d.ts +0 -5
- package/lib/resources/responses/csdl/csdl-reference.d.ts +0 -18
- package/lib/resources/responses/csdl/csdl-schema.d.ts +0 -20
- package/lib/resources/responses/csdl/csdl-singleton.d.ts +0 -7
- package/lib/resources/responses/csdl/csdl-structural-property.d.ts +0 -31
- package/lib/resources/responses/csdl/csdl-structured-type.d.ts +0 -27
- package/lib/resources/responses/csdl/csdl-type-definition.d.ts +0 -11
- package/lib/resources/responses/index.d.ts +0 -4
- package/lib/resources/responses/types.d.ts +0 -13
|
@@ -2,7 +2,9 @@ import { EntityContainerConfig } from '../types';
|
|
|
2
2
|
import { ODataSchemaElement } from './element';
|
|
3
3
|
import { ODataEntitySet } from './entity-set';
|
|
4
4
|
import { ODataSchema } from './schema';
|
|
5
|
+
import { ODataSingleton } from './singleton';
|
|
5
6
|
export declare class ODataEntityContainer extends ODataSchemaElement {
|
|
6
7
|
entitySets: ODataEntitySet[];
|
|
8
|
+
singletons: ODataSingleton[];
|
|
7
9
|
constructor(config: EntityContainerConfig, schema: ODataSchema);
|
|
8
10
|
}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import { EnumTypeConfig,
|
|
2
|
-
import {
|
|
1
|
+
import { EnumTypeConfig, ParserOptions } from '../types';
|
|
2
|
+
import { ODataParserSchemaElement } from './element';
|
|
3
3
|
import { ODataEnumTypeFieldParser, ODataEnumTypeParser } from './parsers';
|
|
4
4
|
import { ODataSchema } from './schema';
|
|
5
|
-
export declare class ODataEnumType<E> extends
|
|
6
|
-
parser: ODataEnumTypeParser<E>;
|
|
5
|
+
export declare class ODataEnumType<E> extends ODataParserSchemaElement<E, ODataEnumTypeParser<E>> {
|
|
7
6
|
members: {
|
|
8
7
|
[name: string]: E;
|
|
9
8
|
} | {
|
|
10
9
|
[value: number]: string;
|
|
11
10
|
};
|
|
12
11
|
constructor(config: EnumTypeConfig<E>, schema: ODataSchema);
|
|
13
|
-
configure({ options
|
|
12
|
+
configure({ options }: {
|
|
14
13
|
options: ParserOptions;
|
|
15
|
-
parserForType: (type: string) => Parser<any>;
|
|
16
|
-
findOptionsForType: (type: string) => any;
|
|
17
14
|
}): void;
|
|
18
15
|
/**
|
|
19
16
|
* Returns the fields of the enum type.
|
package/lib/schema/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CallableConfig, ParserOptions,
|
|
1
|
+
import { CallableConfig, ParserOptions, ParameterConfig, Parser } from '../../types';
|
|
2
2
|
import { ODataEnumTypeParser } from './enum-type';
|
|
3
3
|
import { ODataStructuredTypeParser } from './structured-type';
|
|
4
4
|
export declare class ODataParameterParser<T> {
|
|
@@ -8,19 +8,18 @@ export declare class ODataParameterParser<T> {
|
|
|
8
8
|
collection?: boolean;
|
|
9
9
|
nullable?: boolean;
|
|
10
10
|
parserOptions?: ParserOptions;
|
|
11
|
-
constructor(name: string, parameter:
|
|
11
|
+
constructor(name: string, parameter: ParameterConfig);
|
|
12
12
|
serialize(value: T, options?: ParserOptions): any;
|
|
13
13
|
encode(value: any, options?: ParserOptions): string;
|
|
14
|
-
configure({ options, parserForType,
|
|
14
|
+
configure({ options, parserForType, }: {
|
|
15
15
|
options: ParserOptions;
|
|
16
16
|
parserForType: (type: string) => Parser<any>;
|
|
17
|
-
findOptionsForType: (type: string) => any;
|
|
18
17
|
}): void;
|
|
19
18
|
isEdmType(): boolean;
|
|
20
19
|
isEnumType(): boolean;
|
|
21
|
-
|
|
20
|
+
enumType(): ODataEnumTypeParser<T>;
|
|
22
21
|
isStructuredType(): boolean;
|
|
23
|
-
|
|
22
|
+
structuredType(): ODataStructuredTypeParser<T>;
|
|
24
23
|
field<F>(name: string): import("./structured-type").ODataStructuredTypeFieldParser<F>;
|
|
25
24
|
}
|
|
26
25
|
export declare class ODataCallableParser<R> implements Parser<R> {
|
|
@@ -39,10 +38,10 @@ export declare class ODataCallableParser<R> implements Parser<R> {
|
|
|
39
38
|
deserialize(value: any, options?: ParserOptions): R;
|
|
40
39
|
serialize(params: any, options?: ParserOptions): any;
|
|
41
40
|
encode(params: any, options?: ParserOptions): any;
|
|
42
|
-
configure({ options, parserForType,
|
|
41
|
+
configure({ options, parserForType, }: {
|
|
43
42
|
options: ParserOptions;
|
|
44
43
|
parserForType: (type: string) => Parser<any>;
|
|
45
|
-
findOptionsForType: (type: string) => any;
|
|
46
44
|
}): void;
|
|
47
45
|
binding(): ODataParameterParser<any> | undefined;
|
|
46
|
+
returnType(): string | undefined;
|
|
48
47
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EnumTypeConfig, EnumTypeFieldConfig, ParserOptions,
|
|
1
|
+
import { EnumTypeConfig, EnumTypeFieldConfig, ParserOptions, FieldParser, JsonType } from '../../types';
|
|
2
2
|
import { ODataAnnotatable } from '../annotation';
|
|
3
3
|
export declare class ODataEnumTypeFieldParser<E> extends ODataAnnotatable {
|
|
4
4
|
name: string;
|
|
@@ -19,10 +19,8 @@ export declare class ODataEnumTypeParser<E> extends ODataAnnotatable implements
|
|
|
19
19
|
private _fields;
|
|
20
20
|
parserOptions?: ParserOptions;
|
|
21
21
|
constructor(config: EnumTypeConfig<E>, namespace: string, alias?: string);
|
|
22
|
-
configure({ options
|
|
22
|
+
configure({ options }: {
|
|
23
23
|
options: ParserOptions;
|
|
24
|
-
parserForType: (type: string) => Parser<any>;
|
|
25
|
-
findOptionsForType: (type: string) => any;
|
|
26
24
|
}): void;
|
|
27
25
|
isTypeOf(type: string): boolean;
|
|
28
26
|
fields(value?: E): ODataEnumTypeFieldParser<E>[];
|
|
@@ -36,7 +34,19 @@ export declare class ODataEnumTypeParser<E> extends ODataAnnotatable implements
|
|
|
36
34
|
deserialize(value: string, options?: ParserOptions): E;
|
|
37
35
|
serialize(value: E, options?: ParserOptions): string | undefined;
|
|
38
36
|
encode(value: E, options?: ParserOptions): any;
|
|
39
|
-
toJsonSchema():
|
|
37
|
+
toJsonSchema(): {
|
|
38
|
+
title: string;
|
|
39
|
+
type: JsonType;
|
|
40
|
+
items: {
|
|
41
|
+
type: JsonType;
|
|
42
|
+
};
|
|
43
|
+
enum?: undefined;
|
|
44
|
+
} | {
|
|
45
|
+
type: JsonType;
|
|
46
|
+
enum: E[];
|
|
47
|
+
title?: undefined;
|
|
48
|
+
items?: undefined;
|
|
49
|
+
};
|
|
40
50
|
validate(member: string | number, { method, navigation, }?: {
|
|
41
51
|
method?: 'create' | 'update' | 'modify';
|
|
42
52
|
navigation?: boolean;
|
|
@@ -35,7 +35,7 @@ export declare class ODataReferential {
|
|
|
35
35
|
}
|
|
36
36
|
export declare class ODataStructuredTypeFieldParser<T> extends ODataAnnotatable implements FieldParser<T> {
|
|
37
37
|
name: string;
|
|
38
|
-
private
|
|
38
|
+
private structured;
|
|
39
39
|
type: string | EdmType;
|
|
40
40
|
private parser;
|
|
41
41
|
collection: boolean;
|
|
@@ -47,7 +47,7 @@ export declare class ODataStructuredTypeFieldParser<T> extends ODataAnnotatable
|
|
|
47
47
|
scale?: number | 'variable';
|
|
48
48
|
referentials: ODataReferential[];
|
|
49
49
|
parserOptions?: ParserOptions;
|
|
50
|
-
constructor(name: string,
|
|
50
|
+
constructor(name: string, structured: ODataStructuredTypeParser<any>, field: StructuredTypeFieldConfig);
|
|
51
51
|
validate(value: any, { method, navigation, }?: {
|
|
52
52
|
method?: 'create' | 'update' | 'modify';
|
|
53
53
|
navigation?: boolean;
|
|
@@ -61,19 +61,18 @@ export declare class ODataStructuredTypeFieldParser<T> extends ODataAnnotatable
|
|
|
61
61
|
private toJson;
|
|
62
62
|
serialize(value: T, options?: ParserOptions): any;
|
|
63
63
|
encode(value: T, options?: ParserOptions): string;
|
|
64
|
-
configure({ options, parserForType,
|
|
64
|
+
configure({ options, parserForType, }: {
|
|
65
65
|
options: ParserOptions;
|
|
66
66
|
parserForType: (type: string) => Parser<any>;
|
|
67
|
-
findOptionsForType: (type: string) => any;
|
|
68
67
|
}): void;
|
|
69
68
|
toJsonSchema(options?: JsonSchemaOptions<T>): any;
|
|
70
69
|
isKey(): boolean;
|
|
71
70
|
hasReferentials(): boolean;
|
|
72
71
|
isEdmType(): boolean;
|
|
73
72
|
isEnumType(): boolean;
|
|
74
|
-
|
|
73
|
+
enumType(): ODataEnumTypeParser<T>;
|
|
75
74
|
isStructuredType(): boolean;
|
|
76
|
-
|
|
75
|
+
structuredType(): ODataStructuredTypeParser<T>;
|
|
77
76
|
field<F>(name: string): ODataStructuredTypeFieldParser<F>;
|
|
78
77
|
}
|
|
79
78
|
export declare class ODataStructuredTypeParser<T> extends ODataAnnotatable implements Parser<T> {
|
|
@@ -105,10 +104,9 @@ export declare class ODataStructuredTypeParser<T> extends ODataAnnotatable imple
|
|
|
105
104
|
deserialize(value: any, options?: ParserOptions): T;
|
|
106
105
|
serialize(value: Partial<T>, options?: ParserOptions): any;
|
|
107
106
|
encode(value: T, options?: ParserOptions): any;
|
|
108
|
-
configure({ options, parserForType,
|
|
107
|
+
configure({ options, parserForType, }: {
|
|
109
108
|
options: ParserOptions;
|
|
110
109
|
parserForType: (type: string) => Parser<any>;
|
|
111
|
-
findOptionsForType: (type: string) => any;
|
|
112
110
|
}): void;
|
|
113
111
|
/**
|
|
114
112
|
* Returns all fields of the structured type.
|
package/lib/schema/schema.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ODataApi } from '../api';
|
|
2
|
-
import {
|
|
2
|
+
import { ParserOptions, SchemaConfig, StructuredTypeConfig } from '../types';
|
|
3
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
|
+
import { ODataSingleton } from './singleton';
|
|
8
9
|
import { ODataStructuredType } from './structured-type';
|
|
9
10
|
export declare class ODataSchema extends ODataAnnotatable {
|
|
10
11
|
api: ODataApi;
|
|
@@ -15,15 +16,11 @@ export declare class ODataSchema extends ODataAnnotatable {
|
|
|
15
16
|
callables: ODataCallable<any>[];
|
|
16
17
|
containers: ODataEntityContainer[];
|
|
17
18
|
constructor(config: SchemaConfig, api: ODataApi);
|
|
18
|
-
isNamespaceOf(type: string): boolean
|
|
19
|
+
isNamespaceOf(type: string): boolean;
|
|
19
20
|
get entitySets(): ODataEntitySet[];
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
findEntitySetForType(type: string): ODataEntitySet | undefined;
|
|
24
|
-
configure({ options, parserForType, findOptionsForType, }: {
|
|
21
|
+
get singletons(): ODataSingleton[];
|
|
22
|
+
createStructuredType<T>(config: StructuredTypeConfig<T>): ODataStructuredType<T>;
|
|
23
|
+
configure({ options }: {
|
|
25
24
|
options: ParserOptions;
|
|
26
|
-
parserForType: (type: string) => Parser<any>;
|
|
27
|
-
findOptionsForType: (type: string) => any;
|
|
28
25
|
}): void;
|
|
29
26
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SingletonConfig } from '../types';
|
|
2
|
+
import { ODataSchemaElement } from './element';
|
|
3
|
+
import { ODataSchema } from './schema';
|
|
4
|
+
export declare class ODataSingleton extends ODataSchemaElement {
|
|
5
|
+
singletonType: string;
|
|
6
|
+
service: {
|
|
7
|
+
new (...params: any[]): any;
|
|
8
|
+
};
|
|
9
|
+
constructor(config: SingletonConfig, schema: ODataSchema);
|
|
10
|
+
}
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import { ODataCollection } from '../models';
|
|
1
|
+
import { ODataCollection } from '../models/collection';
|
|
2
2
|
import { ODataModel } from '../models/model';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { ParserOptions, StructuredTypeConfig, StructuredTypeFieldConfig } from '../types';
|
|
4
|
+
import { ODataParserSchemaElement } from './element';
|
|
5
5
|
import { JsonSchemaOptions, ODataEntityTypeKey, ODataStructuredTypeFieldParser, ODataStructuredTypeParser } from './parsers';
|
|
6
6
|
import { ODataSchema } from './schema';
|
|
7
|
-
export declare class ODataStructuredType<T> extends
|
|
7
|
+
export declare class ODataStructuredType<T> extends ODataParserSchemaElement<T, ODataStructuredTypeParser<T>> {
|
|
8
8
|
base?: string;
|
|
9
9
|
parent?: ODataStructuredType<any>;
|
|
10
10
|
children: ODataStructuredType<any>[];
|
|
11
11
|
model?: typeof ODataModel;
|
|
12
12
|
collection?: typeof ODataCollection;
|
|
13
|
-
parser: ODataStructuredTypeParser<T>;
|
|
14
13
|
constructor(config: StructuredTypeConfig<T>, schema: ODataSchema);
|
|
15
|
-
configure({ options
|
|
14
|
+
configure({ options }: {
|
|
16
15
|
options: ParserOptions;
|
|
17
|
-
parserForType: (type: string) => Parser<any>;
|
|
18
|
-
findOptionsForType: (type: string) => any;
|
|
19
16
|
}): void;
|
|
20
17
|
/**
|
|
21
18
|
* Returns a boolean indicating if the structured type is a subtype of the given type.
|
|
@@ -4,6 +4,10 @@ import { ODataModel } from '../models/model';
|
|
|
4
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
|
+
static Model?: typeof ODataModel;
|
|
8
|
+
static Collection?: typeof ODataCollection;
|
|
9
|
+
model(entity?: Partial<T>): ODataModel<T>;
|
|
10
|
+
collection(entities?: Partial<T>[]): ODataCollection<T, ODataModel<T>>;
|
|
7
11
|
/**
|
|
8
12
|
* Get the entity set resource for this service.
|
|
9
13
|
*/
|
|
@@ -29,7 +33,7 @@ export declare class ODataEntitySetService<T> extends ODataEntityService<T> {
|
|
|
29
33
|
*/
|
|
30
34
|
fetchAll(options?: ODataOptions): Observable<{
|
|
31
35
|
entities: T[];
|
|
32
|
-
annots: import("../
|
|
36
|
+
annots: import("../annotations").ODataEntitiesAnnotations<T>;
|
|
33
37
|
}>;
|
|
34
38
|
/**
|
|
35
39
|
* Get entities from the entity set.
|
|
@@ -40,7 +44,7 @@ export declare class ODataEntitySetService<T> extends ODataEntityService<T> {
|
|
|
40
44
|
withCount?: boolean;
|
|
41
45
|
}): Observable<{
|
|
42
46
|
entities: T[];
|
|
43
|
-
annots: import("../
|
|
47
|
+
annots: import("../annotations").ODataEntitiesAnnotations<T>;
|
|
44
48
|
}>;
|
|
45
49
|
/**
|
|
46
50
|
* Get an entity from the entity set.
|
|
@@ -52,7 +56,7 @@ export declare class ODataEntitySetService<T> extends ODataEntityService<T> {
|
|
|
52
56
|
etag?: string;
|
|
53
57
|
}): Observable<{
|
|
54
58
|
entity: T | null;
|
|
55
|
-
annots: import("../
|
|
59
|
+
annots: import("../annotations").ODataEntitiesAnnotations<T>;
|
|
56
60
|
}>;
|
|
57
61
|
/**
|
|
58
62
|
* Create an entity in the entity set.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ODataClient } from '../client';
|
|
2
2
|
import { ODataEntitySetService } from './entity-set';
|
|
3
3
|
import { ODataSingletonService } from './singleton';
|
|
4
|
+
import { ODataCollection, ODataModel } from '../models';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class ODataServiceFactory {
|
|
6
7
|
protected client: ODataClient;
|
|
@@ -10,12 +11,23 @@ export declare class ODataServiceFactory {
|
|
|
10
11
|
* @param entitySetName Name of the entity set.
|
|
11
12
|
* @param apiNameOrEntityType Name of the API or the type of the entity.
|
|
12
13
|
*/
|
|
13
|
-
entitySet<T>(entitySetName: string, apiNameOrEntityType?: string
|
|
14
|
+
entitySet<T>(entitySetName: string, apiNameOrEntityType?: string, options?: {
|
|
15
|
+
Model?: {
|
|
16
|
+
new (...params: any[]): ODataModel<T>;
|
|
17
|
+
};
|
|
18
|
+
Collection?: {
|
|
19
|
+
new (...params: any[]): ODataCollection<T, ODataModel<T>>;
|
|
20
|
+
};
|
|
21
|
+
}): ODataEntitySetService<T>;
|
|
14
22
|
/** Factory method to create a singleton service.
|
|
15
23
|
* @param singletonName Name of the singleton.
|
|
16
24
|
* @param apiNameOrEntityType Name of the API or the type of the entity.
|
|
17
25
|
*/
|
|
18
|
-
singleton<T>(singletonName: string, apiNameOrEntityType?: string
|
|
26
|
+
singleton<T>(singletonName: string, apiNameOrEntityType?: string, options?: {
|
|
27
|
+
Model?: {
|
|
28
|
+
new (...params: any[]): ODataModel<T>;
|
|
29
|
+
};
|
|
30
|
+
}): ODataSingletonService<T>;
|
|
19
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<ODataServiceFactory, never>;
|
|
20
32
|
static ɵprov: i0.ɵɵInjectableDeclaration<ODataServiceFactory>;
|
|
21
33
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { ODataModel } from '../models/model';
|
|
3
|
+
import { ODataEntity, ODataOptions, ODataSingletonResource } from '../resources';
|
|
4
4
|
import { ODataEntityService } from './entity';
|
|
5
5
|
/**
|
|
6
6
|
* OData Singleton Service
|
|
7
7
|
* www.odata.org/getting-started/advanced-tutorial/#singleton
|
|
8
8
|
*/
|
|
9
9
|
export declare class ODataSingletonService<T> extends ODataEntityService<T> {
|
|
10
|
+
static Model?: typeof ODataModel;
|
|
11
|
+
model(entity?: Partial<T>): ODataModel<T>;
|
|
10
12
|
/**
|
|
11
13
|
* Get the entity resource for this service.
|
|
12
14
|
* @param key The entity key.
|
package/lib/settings.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { ODataApi } from './api';
|
|
|
3
3
|
import { ODataCollection, ODataModel } from './models';
|
|
4
4
|
import { ODataRequest } from './resources';
|
|
5
5
|
import { ODataCallable, ODataEntitySet, ODataEnumType, ODataStructuredType } from './schema';
|
|
6
|
-
import { ODataEntityService } from './services/entity';
|
|
7
6
|
import { ApiConfig, EdmType, Parser } from './types';
|
|
8
7
|
export declare class ODataSettings {
|
|
9
8
|
apis: ODataApi[];
|
|
@@ -24,13 +23,4 @@ export declare class ODataSettings {
|
|
|
24
23
|
parserForType<T>(type: string | EdmType): Parser<T>;
|
|
25
24
|
modelForType(type: string): typeof ODataModel;
|
|
26
25
|
collectionForType(type: string): typeof ODataCollection;
|
|
27
|
-
serviceForType(type: string): typeof ODataEntityService;
|
|
28
|
-
serviceForEntityType(type: string): typeof ODataEntityService;
|
|
29
|
-
enumTypeByName<T>(name: string): ODataEnumType<T>;
|
|
30
|
-
structuredTypeByName<T>(name: string): ODataStructuredType<T>;
|
|
31
|
-
callableByName<T>(name: string, bindingType?: string): ODataCallable<T>;
|
|
32
|
-
entitySetByName(name: string): ODataEntitySet;
|
|
33
|
-
modelByName(name: string): typeof ODataModel;
|
|
34
|
-
collectionByName(name: string): typeof ODataCollection;
|
|
35
|
-
serviceByName(name: string): typeof ODataEntityService;
|
|
36
26
|
}
|
package/lib/types.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare enum QueryOption {
|
|
|
21
21
|
select = "select",
|
|
22
22
|
expand = "expand",
|
|
23
23
|
compute = "compute",
|
|
24
|
+
apply = "apply",
|
|
24
25
|
filter = "filter",
|
|
25
26
|
search = "search",
|
|
26
27
|
transform = "transform",
|
|
@@ -67,6 +68,15 @@ export declare enum EdmType {
|
|
|
67
68
|
GeometryMultiPolygon = "Edm.GeometryMultiPolygon",
|
|
68
69
|
GeometryCollection = "Edm.GeometryCollection"
|
|
69
70
|
}
|
|
71
|
+
export declare enum JsonType {
|
|
72
|
+
string = "string",
|
|
73
|
+
number = "number",
|
|
74
|
+
integer = "integer",
|
|
75
|
+
object = "object",
|
|
76
|
+
array = "array",
|
|
77
|
+
boolean = "boolean",
|
|
78
|
+
null = "null"
|
|
79
|
+
}
|
|
70
80
|
export interface ApiOptions {
|
|
71
81
|
version?: ODataVersion;
|
|
72
82
|
params?: {
|
|
@@ -99,6 +109,7 @@ export interface ApiOptions {
|
|
|
99
109
|
deleteRefBy?: 'path' | 'id';
|
|
100
110
|
nonParenthesisForEmptyParameterFunction?: boolean;
|
|
101
111
|
jsonBatchFormat?: boolean;
|
|
112
|
+
relativeUrls?: boolean;
|
|
102
113
|
}
|
|
103
114
|
export interface ParserOptions {
|
|
104
115
|
version?: ODataVersion;
|
|
@@ -169,6 +180,7 @@ export type EntityContainerConfig = {
|
|
|
169
180
|
name: string;
|
|
170
181
|
annotations?: AnnotationConfig[];
|
|
171
182
|
entitySets?: EntitySetConfig[];
|
|
183
|
+
singletons?: SingletonConfig[];
|
|
172
184
|
};
|
|
173
185
|
export type EnumTypeFieldConfig<E> = {
|
|
174
186
|
value: E;
|
|
@@ -220,11 +232,11 @@ export type StructuredTypeConfig<T> = {
|
|
|
220
232
|
name: string;
|
|
221
233
|
alias?: string;
|
|
222
234
|
}[];
|
|
223
|
-
fields
|
|
235
|
+
fields?: {
|
|
224
236
|
[P in keyof T]?: StructuredTypeFieldConfig;
|
|
225
237
|
};
|
|
226
238
|
};
|
|
227
|
-
export type
|
|
239
|
+
export type ParameterConfig = {
|
|
228
240
|
type: string;
|
|
229
241
|
nullable?: boolean;
|
|
230
242
|
collection?: boolean;
|
|
@@ -235,7 +247,7 @@ export type CallableConfig = {
|
|
|
235
247
|
bound?: boolean;
|
|
236
248
|
composable?: boolean;
|
|
237
249
|
parameters?: {
|
|
238
|
-
[name: string]:
|
|
250
|
+
[name: string]: ParameterConfig;
|
|
239
251
|
};
|
|
240
252
|
return?: {
|
|
241
253
|
type: string;
|
|
@@ -250,3 +262,11 @@ export type EntitySetConfig = {
|
|
|
250
262
|
};
|
|
251
263
|
annotations?: AnnotationConfig[];
|
|
252
264
|
};
|
|
265
|
+
export type SingletonConfig = {
|
|
266
|
+
name: string;
|
|
267
|
+
type: string;
|
|
268
|
+
service: {
|
|
269
|
+
new (...params: any[]): any;
|
|
270
|
+
};
|
|
271
|
+
annotations?: AnnotationConfig[];
|
|
272
|
+
};
|
package/lib/utils/http.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare const Http: {
|
|
|
12
12
|
[param: string]: string | string[];
|
|
13
13
|
}, options: string[]): string | undefined;
|
|
14
14
|
headerValue(header: string): string;
|
|
15
|
-
parseResponseStatus(
|
|
15
|
+
parseResponseStatus(line: string): {
|
|
16
16
|
status: string;
|
|
17
17
|
code: number;
|
|
18
18
|
message: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "angular-odata",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.128.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Client side OData typescript library for Angular",
|
|
6
6
|
"repository": {
|
|
@@ -28,6 +28,10 @@
|
|
|
28
28
|
"@angular/common": ">=14.0.0",
|
|
29
29
|
"@angular/core": ">=14.0.0"
|
|
30
30
|
},
|
|
31
|
+
"schematics": "./schematics/collection.json",
|
|
32
|
+
"ng-add": {
|
|
33
|
+
"save": "dependencies"
|
|
34
|
+
},
|
|
31
35
|
"dependencies": {
|
|
32
36
|
"tslib": "^2.3.0"
|
|
33
37
|
},
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Base } from './base';
|
|
2
|
+
import { Source } from '@angular-devkit/schematics';
|
|
3
|
+
import { Schema as ApiGenSchema } from '../schema';
|
|
4
|
+
export declare class ApiConfig extends Base {
|
|
5
|
+
constructor(options: ApiGenSchema);
|
|
6
|
+
template(): Source;
|
|
7
|
+
variables(): {
|
|
8
|
+
[name: string]: any;
|
|
9
|
+
};
|
|
10
|
+
name(): string;
|
|
11
|
+
fileName(): string;
|
|
12
|
+
directory(): string;
|
|
13
|
+
fullName(): string;
|
|
14
|
+
importTypes(): string[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApiConfig = void 0;
|
|
4
|
+
const core_1 = require("@angular-devkit/core");
|
|
5
|
+
const base_1 = require("./base");
|
|
6
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
7
|
+
class ApiConfig extends base_1.Base {
|
|
8
|
+
constructor(options) {
|
|
9
|
+
super(options);
|
|
10
|
+
}
|
|
11
|
+
template() {
|
|
12
|
+
return (0, schematics_1.url)('./files/api-config');
|
|
13
|
+
}
|
|
14
|
+
variables() {
|
|
15
|
+
return Object.assign({}, this.options);
|
|
16
|
+
}
|
|
17
|
+
name() {
|
|
18
|
+
return core_1.strings.classify(this.options.name) + 'Config';
|
|
19
|
+
}
|
|
20
|
+
fileName() {
|
|
21
|
+
return core_1.strings.dasherize(this.options.name) + '.config';
|
|
22
|
+
}
|
|
23
|
+
directory() {
|
|
24
|
+
return '';
|
|
25
|
+
}
|
|
26
|
+
fullName() {
|
|
27
|
+
return this.name();
|
|
28
|
+
}
|
|
29
|
+
importTypes() {
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.ApiConfig = ApiConfig;
|
|
34
|
+
//# sourceMappingURL=api-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-config.js","sourceRoot":"","sources":["../../../../../projects/angular-odata/schematics/apigen/angular/api-config.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAC/C,iCAA8B;AAC9B,2DAAyD;AAGzD,MAAa,SAAU,SAAQ,WAAI;IACjC,YAAY,OAAqB;QAC/B,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IACe,QAAQ;QACtB,OAAO,IAAA,gBAAG,EAAC,oBAAoB,CAAC,CAAC;IACnC,CAAC;IACe,SAAS;QACvB,yBAAY,IAAI,CAAC,OAAO,EAAG;IAC7B,CAAC;IACe,IAAI;QAClB,OAAO,cAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;IACxD,CAAC;IACe,QAAQ;QACtB,OAAO,cAAO,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;IAC1D,CAAC;IACe,SAAS;QACvB,OAAO,EAAE,CAAC;IACZ,CAAC;IACe,QAAQ;QACtB,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;IACrB,CAAC;IACe,WAAW;QACzB,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AAzBD,8BAyBC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Import } from './import';
|
|
2
|
+
import { Source } from '@angular-devkit/schematics';
|
|
3
|
+
import { Schema as ApiGenSchema } from '../schema';
|
|
4
|
+
import { CsdlCallable, CsdlParameter } from '../metadata/csdl/csdl-function-action';
|
|
5
|
+
export declare class Callable {
|
|
6
|
+
protected callable: CsdlCallable;
|
|
7
|
+
constructor(callable: CsdlCallable);
|
|
8
|
+
name(): string;
|
|
9
|
+
isBound(): boolean | undefined;
|
|
10
|
+
bindingParameter(): CsdlParameter | undefined;
|
|
11
|
+
parameters(): CsdlParameter[];
|
|
12
|
+
returnType(): import("../metadata/csdl/csdl-function-action").CsdlReturnType | undefined;
|
|
13
|
+
fullName(): string;
|
|
14
|
+
resourceFunction(): string;
|
|
15
|
+
callableFunction(): string;
|
|
16
|
+
}
|
|
17
|
+
export declare abstract class Base {
|
|
18
|
+
protected options: ApiGenSchema;
|
|
19
|
+
constructor(options: ApiGenSchema);
|
|
20
|
+
abstract name(): string;
|
|
21
|
+
abstract fileName(): string;
|
|
22
|
+
abstract fullName(): string;
|
|
23
|
+
abstract directory(): string;
|
|
24
|
+
abstract importTypes(): string[];
|
|
25
|
+
abstract template(): Source;
|
|
26
|
+
abstract variables(): {
|
|
27
|
+
[name: string]: any;
|
|
28
|
+
};
|
|
29
|
+
path(): string;
|
|
30
|
+
imports(): Import[];
|
|
31
|
+
importedName?: string;
|
|
32
|
+
cleanImportedNames(): void;
|
|
33
|
+
protected dependencies: [string, Base][];
|
|
34
|
+
addDependency(renderable: Base): void;
|
|
35
|
+
addDependencies(renderables: Base[]): void;
|
|
36
|
+
protected callables: Callable[];
|
|
37
|
+
addCallable(callable: Callable): void;
|
|
38
|
+
addCallables(callables: Callable[]): void;
|
|
39
|
+
}
|
|
40
|
+
export declare class Index extends Base {
|
|
41
|
+
constructor(options: ApiGenSchema);
|
|
42
|
+
template(): Source;
|
|
43
|
+
variables(): {
|
|
44
|
+
[name: string]: any;
|
|
45
|
+
};
|
|
46
|
+
name(): string;
|
|
47
|
+
fileName(): string;
|
|
48
|
+
directory(): string;
|
|
49
|
+
fullName(): string;
|
|
50
|
+
importTypes(): string[];
|
|
51
|
+
}
|