angular-odata 0.131.0 → 0.140.1

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.
Files changed (139) hide show
  1. package/fesm2022/angular-odata.mjs +322 -580
  2. package/fesm2022/angular-odata.mjs.map +1 -1
  3. package/index.d.ts +6397 -3
  4. package/package.json +3 -3
  5. package/schematics/apigen/angular/base.js +2 -6
  6. package/schematics/apigen/angular/base.js.map +1 -1
  7. package/schematics/apigen/angular/entity.js +1 -2
  8. package/schematics/apigen/angular/entity.js.map +1 -1
  9. package/schematics/apigen/index.js +2 -6
  10. package/schematics/apigen/index.js.map +1 -1
  11. package/schematics/apigen/metadata/csdl/csdl-annotation.js +1 -2
  12. package/schematics/apigen/metadata/csdl/csdl-annotation.js.map +1 -1
  13. package/schematics/apigen/metadata/csdl/csdl-entity-container.js.map +1 -1
  14. package/schematics/apigen/metadata/csdl/csdl-entity-set.js.map +1 -1
  15. package/schematics/apigen/metadata/csdl/csdl-enum-type.d.ts +1 -1
  16. package/schematics/apigen/metadata/csdl/csdl-enum-type.js +1 -1
  17. package/schematics/apigen/metadata/csdl/csdl-enum-type.js.map +1 -1
  18. package/schematics/apigen/metadata/csdl/csdl-function-action.d.ts +1 -1
  19. package/schematics/apigen/metadata/csdl/csdl-reference.js +1 -2
  20. package/schematics/apigen/metadata/csdl/csdl-reference.js.map +1 -1
  21. package/schematics/apigen/metadata/csdl/csdl-schema.js +1 -2
  22. package/schematics/apigen/metadata/csdl/csdl-schema.js.map +1 -1
  23. package/schematics/apigen/metadata/csdl/csdl-singleton.js.map +1 -1
  24. package/schematics/apigen/metadata/csdl/csdl-structural-property.d.ts +1 -1
  25. package/schematics/apigen/metadata/csdl/csdl-structural-property.js +2 -3
  26. package/schematics/apigen/metadata/csdl/csdl-structural-property.js.map +1 -1
  27. package/schematics/apigen/metadata/csdl/csdl-structured-type.d.ts +1 -1
  28. package/schematics/apigen/metadata/csdl/csdl-structured-type.js +1 -2
  29. package/schematics/apigen/metadata/csdl/csdl-structured-type.js.map +1 -1
  30. package/schematics/apigen/metadata/parser.js +1 -3
  31. package/schematics/apigen/metadata/parser.js.map +1 -1
  32. package/schematics/apigen/utils.js +2 -4
  33. package/schematics/apigen/utils.js.map +1 -1
  34. package/lib/annotations.d.ts +0 -75
  35. package/lib/api.d.ts +0 -107
  36. package/lib/cache/cache.d.ts +0 -104
  37. package/lib/cache/index.d.ts +0 -3
  38. package/lib/cache/memory.d.ts +0 -19
  39. package/lib/cache/storage.d.ts +0 -35
  40. package/lib/client.d.ts +0 -613
  41. package/lib/constants.d.ts +0 -70
  42. package/lib/helper.d.ts +0 -75
  43. package/lib/index.d.ts +0 -14
  44. package/lib/loaders.d.ts +0 -21
  45. package/lib/metadata/csdl/csdl-annotation.d.ts +0 -159
  46. package/lib/metadata/csdl/csdl-entity-container.d.ts +0 -31
  47. package/lib/metadata/csdl/csdl-entity-set.d.ts +0 -25
  48. package/lib/metadata/csdl/csdl-enum-type.d.ts +0 -37
  49. package/lib/metadata/csdl/csdl-function-action.d.ts +0 -148
  50. package/lib/metadata/csdl/csdl-navigation-property-binding.d.ts +0 -12
  51. package/lib/metadata/csdl/csdl-reference.d.ts +0 -53
  52. package/lib/metadata/csdl/csdl-schema.d.ts +0 -37
  53. package/lib/metadata/csdl/csdl-singleton.d.ts +0 -21
  54. package/lib/metadata/csdl/csdl-structural-property.d.ts +0 -86
  55. package/lib/metadata/csdl/csdl-structured-type.d.ts +0 -94
  56. package/lib/metadata/csdl/csdl-type-definition.d.ts +0 -25
  57. package/lib/metadata/index.d.ts +0 -2
  58. package/lib/metadata/metadata.d.ts +0 -23
  59. package/lib/metadata/parser.d.ts +0 -110
  60. package/lib/models/collection.d.ts +0 -183
  61. package/lib/models/index.d.ts +0 -3
  62. package/lib/models/model.d.ts +0 -176
  63. package/lib/models/options.d.ts +0 -368
  64. package/lib/module.d.ts +0 -19
  65. package/lib/options.d.ts +0 -101
  66. package/lib/resources/index.d.ts +0 -6
  67. package/lib/resources/options.d.ts +0 -18
  68. package/lib/resources/path/handlers.d.ts +0 -29
  69. package/lib/resources/path/index.d.ts +0 -2
  70. package/lib/resources/path/segments.d.ts +0 -54
  71. package/lib/resources/query/builder.d.ts +0 -103
  72. package/lib/resources/query/expressions/apply.d.ts +0 -125
  73. package/lib/resources/query/expressions/base.d.ts +0 -25
  74. package/lib/resources/query/expressions/compute.d.ts +0 -39
  75. package/lib/resources/query/expressions/count.d.ts +0 -58
  76. package/lib/resources/query/expressions/expand.d.ts +0 -69
  77. package/lib/resources/query/expressions/filter.d.ts +0 -77
  78. package/lib/resources/query/expressions/index.d.ts +0 -9
  79. package/lib/resources/query/expressions/orderby.d.ts +0 -55
  80. package/lib/resources/query/expressions/search.d.ts +0 -63
  81. package/lib/resources/query/expressions/select.d.ts +0 -34
  82. package/lib/resources/query/expressions/syntax.d.ts +0 -313
  83. package/lib/resources/query/handlers.d.ts +0 -270
  84. package/lib/resources/query/index.d.ts +0 -4
  85. package/lib/resources/query/options.d.ts +0 -60
  86. package/lib/resources/request.d.ts +0 -64
  87. package/lib/resources/resource.d.ts +0 -161
  88. package/lib/resources/response.d.ts +0 -82
  89. package/lib/resources/types/action.d.ts +0 -84
  90. package/lib/resources/types/batch.d.ts +0 -62
  91. package/lib/resources/types/count.d.ts +0 -20
  92. package/lib/resources/types/entity-set.d.ts +0 -79
  93. package/lib/resources/types/entity.d.ts +0 -54
  94. package/lib/resources/types/function.d.ts +0 -108
  95. package/lib/resources/types/index.d.ts +0 -14
  96. package/lib/resources/types/media.d.ts +0 -28
  97. package/lib/resources/types/metadata.d.ts +0 -13
  98. package/lib/resources/types/navigation-property.d.ts +0 -157
  99. package/lib/resources/types/options.d.ts +0 -32
  100. package/lib/resources/types/property.d.ts +0 -115
  101. package/lib/resources/types/reference.d.ts +0 -74
  102. package/lib/resources/types/singleton.d.ts +0 -87
  103. package/lib/resources/types/value.d.ts +0 -19
  104. package/lib/schema/annotation.d.ts +0 -28
  105. package/lib/schema/callable.d.ts +0 -41
  106. package/lib/schema/element.d.ts +0 -52
  107. package/lib/schema/entity-container.d.ts +0 -10
  108. package/lib/schema/entity-set.d.ts +0 -10
  109. package/lib/schema/enum-type.d.ts +0 -55
  110. package/lib/schema/index.d.ts +0 -8
  111. package/lib/schema/parsers/callable.d.ts +0 -47
  112. package/lib/schema/parsers/edm.d.ts +0 -4
  113. package/lib/schema/parsers/enum-type.d.ts +0 -56
  114. package/lib/schema/parsers/index.d.ts +0 -4
  115. package/lib/schema/parsers/structured-type.d.ts +0 -172
  116. package/lib/schema/schema.d.ts +0 -26
  117. package/lib/schema/singleton.d.ts +0 -10
  118. package/lib/schema/structured-type.d.ts +0 -152
  119. package/lib/services/base.d.ts +0 -20
  120. package/lib/services/entity-set.d.ts +0 -120
  121. package/lib/services/entity.d.ts +0 -11
  122. package/lib/services/factory.d.ts +0 -33
  123. package/lib/services/index.d.ts +0 -4
  124. package/lib/services/singleton.d.ts +0 -44
  125. package/lib/settings.d.ts +0 -26
  126. package/lib/types.d.ts +0 -285
  127. package/lib/utils/arraybuffers.d.ts +0 -4
  128. package/lib/utils/arrays.d.ts +0 -3
  129. package/lib/utils/dates.d.ts +0 -3
  130. package/lib/utils/durations.d.ts +0 -14
  131. package/lib/utils/enums.d.ts +0 -23
  132. package/lib/utils/http.d.ts +0 -22
  133. package/lib/utils/index.d.ts +0 -9
  134. package/lib/utils/objects.d.ts +0 -37
  135. package/lib/utils/odata.d.ts +0 -4
  136. package/lib/utils/strings.d.ts +0 -7
  137. package/lib/utils/types.d.ts +0 -11
  138. package/lib/utils/urls.d.ts +0 -4
  139. package/public-api.d.ts +0 -1
@@ -1,152 +0,0 @@
1
- import { ODataCollection } from '../models/collection';
2
- import { ODataModel } from '../models/model';
3
- import { ParserOptions, ODataStructuredTypeConfig, ODataStructuredTypeFieldConfig } from '../types';
4
- import { ODataParserSchemaElement } from './element';
5
- import { JsonSchemaOptions, ODataEntityTypeKey, ODataStructuredTypeFieldParser, ODataStructuredTypeParser } from './parsers';
6
- import { ODataSchema } from './schema';
7
- export declare class ODataStructuredType<T> extends ODataParserSchemaElement<T, ODataStructuredTypeParser<T>> {
8
- base?: string;
9
- parent?: ODataStructuredType<any>;
10
- children: ODataStructuredType<any>[];
11
- model?: typeof ODataModel;
12
- collection?: typeof ODataCollection;
13
- constructor(config: ODataStructuredTypeConfig, schema: ODataSchema);
14
- configure({ options }: {
15
- options: ParserOptions;
16
- }): void;
17
- /**
18
- * Returns a boolean indicating if the structured type is a subtype of the given type.
19
- * @param type String representation of the type
20
- * @returns True if the callable is type of the given type
21
- */
22
- isSubtypeOf(schema: ODataStructuredType<any>): boolean;
23
- /**
24
- * Returns a boolean indicating if the structured type is a supertype of the given type.
25
- * @param type String representation of the type
26
- * @returns True if the callable is type of the given type
27
- */
28
- isSupertypeOf(schema: ODataStructuredType<any>): boolean;
29
- /**
30
- * Returns a boolean indicating if the structured type has a simple key.
31
- * @returns True if the structured type has a simple key
32
- */
33
- isSimpleKey(): boolean;
34
- /**
35
- * Returns a boolean indicating if the structured type has a compound key.
36
- * @returns True if the structured type has a compound key.
37
- */
38
- isCompoundKey(): boolean;
39
- isOpenType(): boolean;
40
- isEntityType(): boolean;
41
- isComplexType(): boolean;
42
- /**
43
- * Find the field parser for the given field name.
44
- * @param name Name of the field
45
- * @returns The field parser
46
- */
47
- field<F>(name: keyof T): ODataStructuredTypeFieldParser<F>;
48
- addField<F>(name: string, config: ODataStructuredTypeFieldConfig): ODataStructuredTypeFieldParser<F>;
49
- /**
50
- * Find a parent schema of the structured type.
51
- * @param predicate Function for evaluate the schemas in the hierarchy.
52
- * @returns The schema that matches the predicate.
53
- */
54
- findParentSchema(predicate: (p: ODataStructuredType<any>) => boolean): ODataStructuredType<any> | undefined;
55
- findChildSchema(predicate: (p: ODataStructuredType<any>) => boolean): ODataStructuredType<any> | undefined;
56
- /**
57
- * Find a parent schema of the structured type for the given field.
58
- * @param field Field that belongs to the structured type
59
- * @returns The schema of the field
60
- */
61
- findParentSchemaForField<E>(field: ODataStructuredTypeFieldParser<any>): ODataStructuredType<E>;
62
- /**
63
- * Picks the fields from attributes.
64
- * @param attrs
65
- * @param include_parents Include the parent fields
66
- * @param include_navigation Include the navigation fields
67
- * @param include_etag Include the etag field
68
- * @returns The picked fields
69
- */
70
- pick(attrs: {
71
- [name: string]: any;
72
- }, { include_id, include_key, include_parents, include_navigation, include_computed, include_etag, }?: {
73
- include_id?: boolean;
74
- include_key?: boolean;
75
- include_parents?: boolean;
76
- include_navigation?: boolean;
77
- include_computed?: boolean;
78
- include_etag?: boolean;
79
- }): Partial<T>;
80
- /**
81
- * Deseialize the given value from the structured type.
82
- * @param value Value to deserialize
83
- * @param options Options for deserialization
84
- * @returns Deserialized value
85
- */
86
- deserialize(value: any, options?: ParserOptions): T;
87
- /**
88
- * Serialize the given value for the structured type.
89
- * @param value Value to serialize
90
- * @param options Options for serialization
91
- * @returns Serialized value
92
- */
93
- serialize(value: T, options?: ParserOptions): any;
94
- /**
95
- * Encode the given value for the structured type.
96
- * @param value Value to encode
97
- * @param options Options for encoding
98
- * @returns Encoded value
99
- */
100
- encode(value: T, options?: ParserOptions): any;
101
- /**
102
- * Returns all fields of the structured type.
103
- * @param include_navigation Include navigation properties in the result.
104
- * @param include_parents Include the parent types in the result.
105
- * @returns All fields of the structured type.
106
- */
107
- fields({ include_navigation, include_parents, }: {
108
- include_parents: boolean;
109
- include_navigation: boolean;
110
- }): ODataStructuredTypeFieldParser<any>[];
111
- /**
112
- * Returns the keys of the structured type.
113
- * @param include_parents Include the parent fields
114
- * @returns The keys of the structured type
115
- */
116
- keys({ include_parents, }?: {
117
- include_parents?: boolean;
118
- }): ODataEntityTypeKey[];
119
- /**
120
- * Resolve the key of the structured type for the given value.
121
- * @param attrs Attributes of the value
122
- * @returns Resolved key
123
- */
124
- resolveKey(attrs: T | {
125
- [name: string]: any;
126
- }): any;
127
- /**
128
- * Returns the defaults values for the structured type.
129
- * @returns Default values for the structured type
130
- */
131
- defaults(): {
132
- [name: string]: any;
133
- };
134
- /**
135
- * Convert the structured type to json schema
136
- * @param options Options for json schema
137
- * @returns Json Schema
138
- */
139
- toJsonSchema(options?: JsonSchemaOptions<T>): any;
140
- /**
141
- * Validate the given value against the structured type.
142
- * @param attrs Attributes of the value
143
- * @param method Method to use for the process validation
144
- * @returns Object with the errors
145
- */
146
- validate(attrs: Partial<T>, { method, navigation, }?: {
147
- method?: 'create' | 'update' | 'modify';
148
- navigation?: boolean;
149
- }): {
150
- [name: string]: any;
151
- } | undefined;
152
- }
@@ -1,20 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { ODataClient } from '../client';
3
- import { ODataActionOptions, ODataActionResource, ODataEntities, ODataEntity, ODataFunctionOptions, ODataFunctionResource, ODataNavigationPropertyResource, ODataProperty, ODataQueryArgumentsOptions } from '../resources';
4
- export declare abstract class ODataBaseService {
5
- protected client: ODataClient;
6
- protected name: string;
7
- protected apiNameOrEntityType?: string | undefined;
8
- constructor(client: ODataClient, name: string, apiNameOrEntityType?: string | undefined);
9
- get api(): import("angular-odata").ODataApi;
10
- protected callFunction<P, R>(params: P | null, resource: ODataFunctionResource<P, R>, responseType: 'entity', options?: ODataFunctionOptions<R>): Observable<ODataEntity<R>>;
11
- protected callFunction<P, R>(params: P | null, resource: ODataFunctionResource<P, R>, responseType: 'entities', options?: ODataFunctionOptions<R>): Observable<ODataEntities<R>>;
12
- protected callFunction<P, R>(params: P | null, resource: ODataFunctionResource<P, R>, responseType: 'property', options?: ODataFunctionOptions<R>): Observable<ODataProperty<R>>;
13
- protected callFunction<P, R>(params: P | null, resource: ODataFunctionResource<P, R>, responseType: 'none', options?: ODataFunctionOptions<R>): Observable<null>;
14
- protected callAction<P, R>(params: P | null, resource: ODataActionResource<P, R>, responseType: 'entity', options?: ODataActionOptions<R>): Observable<ODataEntity<R>>;
15
- protected callAction<P, R>(params: P | null, resource: ODataActionResource<P, R>, responseType: 'entities', options?: ODataActionOptions<R>): Observable<ODataEntities<R>>;
16
- protected callAction<P, R>(params: P | null, resource: ODataActionResource<P, R>, responseType: 'property', options?: ODataActionOptions<R>): Observable<ODataProperty<R>>;
17
- protected callAction<P, R>(params: P | null, resource: ODataActionResource<P, R>, responseType: 'none', options?: ODataActionOptions<R>): Observable<null>;
18
- protected fetchNavigationProperty<S>(resource: ODataNavigationPropertyResource<S>, responseType: 'entity', options?: ODataQueryArgumentsOptions<S>): Observable<ODataEntity<S>>;
19
- protected fetchNavigationProperty<S>(resource: ODataNavigationPropertyResource<S>, responseType: 'entities', options?: ODataQueryArgumentsOptions<S>): Observable<ODataEntities<S>>;
20
- }
@@ -1,120 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { ODataCollection } from '../models/collection';
3
- import { ODataModel } from '../models/model';
4
- import { EntityKey, ODataEntity, ODataEntityResource, ODataEntitySetResource, ODataOptions } from '../resources';
5
- import { ODataEntityService } from './entity';
6
- export declare class ODataEntitySetService<T> extends ODataEntityService<T> {
7
- static Model?: typeof ODataModel;
8
- static Collection?: typeof ODataCollection;
9
- model(entity?: Partial<T>, reset?: boolean): ODataModel<T> & import("angular-odata").ModelInterface<T>;
10
- collection(entities?: Partial<T>[], reset?: boolean): ODataCollection<T, ODataModel<T> & import("angular-odata").ModelInterface<T>>;
11
- /**
12
- * Get the entity set resource for this service.
13
- */
14
- entities(): ODataEntitySetResource<T>;
15
- /**
16
- * Get the entity resource for this service.
17
- * @param key The entity key.
18
- */
19
- entity(key?: EntityKey<T>): ODataEntityResource<T>;
20
- /**
21
- * Attach an existing model to this service.
22
- * @param model The model to attach.
23
- */
24
- attach<M extends ODataModel<T>>(model: M): void;
25
- attach<C extends ODataCollection<T, ODataModel<T>>>(model: C): void;
26
- /**
27
- * The schema for the entity set.
28
- */
29
- get entitySetSchema(): import("angular-odata").ODataEntitySet | undefined;
30
- /**
31
- * Get all entities from the entity set.
32
- * @param options The options for the request.
33
- */
34
- fetchAll(options?: ODataOptions): Observable<{
35
- entities: any[];
36
- annots: import("angular-odata").ODataEntitiesAnnotations<any>;
37
- }>;
38
- /**
39
- * Get entities from the entity set.
40
- * @param withCount Get the count of the entities.
41
- * @param options The options for the request.
42
- */
43
- fetchMany(top: number, options?: ODataOptions & {
44
- withCount?: boolean;
45
- }): Observable<{
46
- entities: T[];
47
- annots: import("angular-odata").ODataEntitiesAnnotations<T>;
48
- } | {
49
- entities: T[];
50
- annots: import("angular-odata").ODataEntitiesAnnotations<any>;
51
- }>;
52
- /**
53
- * Get an entity from the entity set.
54
- * @param key The entity key.
55
- * @param etag The etag for the entity.
56
- * @param options The options for the request.
57
- */
58
- fetchOne(options?: ODataOptions & {
59
- etag?: string;
60
- }): Observable<{
61
- entity: T | null;
62
- annots: import("angular-odata").ODataEntitiesAnnotations<T>;
63
- }>;
64
- /**
65
- * Create an entity in the entity set.
66
- * @param attrs The attributes for the entity.
67
- * @param options The options for the request.
68
- */
69
- create(attrs: Partial<T>, options?: ODataOptions): Observable<ODataEntity<T>>;
70
- /**
71
- * Update an entity in the entity set.
72
- * @param key The entity key.
73
- * @param attrs The attributes for the entity.
74
- * @param etag The etag for the entity.
75
- * @param options The options for the request.
76
- */
77
- update(key: EntityKey<T>, attrs: Partial<T>, options?: ODataOptions & {
78
- etag?: string;
79
- }): Observable<ODataEntity<T>>;
80
- /**
81
- * Patch an entity in the entity set.
82
- * @param key The entity key.
83
- * @param attrs The attributes for the entity.
84
- * @param etag The etag for the entity.
85
- * @param options The options for the request.
86
- */
87
- modify(key: EntityKey<T>, attrs: Partial<T>, options?: ODataOptions & {
88
- etag?: string;
89
- }): Observable<ODataEntity<T>>;
90
- /**
91
- * Delete an entity in the entity set.
92
- * @param key The entity key.
93
- * @param etag The etag for the entity.
94
- * @param options The options for the request.
95
- */
96
- destroy(key: EntityKey<T>, options?: ODataOptions & {
97
- etag?: string;
98
- }): Observable<any>;
99
- /**
100
- * Get or create an entity in the entity set.
101
- * @param key The entity key.
102
- * @param attrs The attributes for the entity.
103
- * @param etag The etag for the entity.
104
- * @param options The options for the request.
105
- */
106
- fetchOrCreate(key: EntityKey<T>, attrs: Partial<T>, { etag, ...options }?: {
107
- etag?: string;
108
- } & ODataOptions): Observable<ODataEntity<T>>;
109
- /**
110
- * Save an entity in the entity set.
111
- * @param attrs The attributes for the entity.
112
- * @param method The method to use.
113
- * @param etag The etag for the entity.
114
- * @param options The options for the request.
115
- */
116
- save(attrs: Partial<T>, { etag, method, ...options }?: {
117
- etag?: string;
118
- method?: 'create' | 'update' | 'modify';
119
- } & ODataOptions): Observable<ODataEntity<T>>;
120
- }
@@ -1,11 +0,0 @@
1
- import { ODataModel } from '../models/model';
2
- import { EntityKey, ODataResource } from '../resources';
3
- import { ODataBaseService } from './base';
4
- export declare abstract class ODataEntityService<T> extends ODataBaseService {
5
- abstract entity(key?: EntityKey<T>): ODataResource<T>;
6
- abstract attach<M extends ODataModel<T>>(value: M): void;
7
- /**
8
- * The schema for the structured type.
9
- */
10
- get structuredTypeSchema(): import("angular-odata").ODataStructuredType<any> | import("angular-odata").ODataStructuredType<T> | undefined;
11
- }
@@ -1,33 +0,0 @@
1
- import { ODataClient } from '../client';
2
- import { ODataEntitySetService } from './entity-set';
3
- import { ODataSingletonService } from './singleton';
4
- import { ODataCollection, ODataModel } from '../models';
5
- import * as i0 from "@angular/core";
6
- export declare class ODataServiceFactory {
7
- protected client: ODataClient;
8
- constructor(client: ODataClient);
9
- /**
10
- * Factory method to create an entity set service.
11
- * @param entitySetName Name of the entity set.
12
- * @param apiNameOrEntityType Name of the API or the type of the entity.
13
- */
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>;
22
- /** Factory method to create a singleton service.
23
- * @param singletonName Name of the singleton.
24
- * @param apiNameOrEntityType Name of the API or the type of the entity.
25
- */
26
- singleton<T>(singletonName: string, apiNameOrEntityType?: string, options?: {
27
- Model?: {
28
- new (...params: any[]): ODataModel<T>;
29
- };
30
- }): ODataSingletonService<T>;
31
- static ɵfac: i0.ɵɵFactoryDeclaration<ODataServiceFactory, never>;
32
- static ɵprov: i0.ɵɵInjectableDeclaration<ODataServiceFactory>;
33
- }
@@ -1,4 +0,0 @@
1
- export * from './base';
2
- export * from './entity-set';
3
- export * from './singleton';
4
- export * from './factory';
@@ -1,44 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { ODataModel } from '../models/model';
3
- import { ODataEntity, ODataOptions, ODataSingletonResource } from '../resources';
4
- import { ODataEntityService } from './entity';
5
- /**
6
- * OData Singleton Service
7
- * www.odata.org/getting-started/advanced-tutorial/#singleton
8
- */
9
- export declare class ODataSingletonService<T> extends ODataEntityService<T> {
10
- static Model?: typeof ODataModel;
11
- model(entity?: Partial<T>): ODataModel<T> & import("angular-odata").ModelInterface<T>;
12
- /**
13
- * Get the entity resource for this service.
14
- * @param key The entity key.
15
- */
16
- entity(): ODataSingletonResource<T>;
17
- /**
18
- * Attach an existing model to this service.
19
- * @param model The model to attach.
20
- */
21
- attach<M extends ODataModel<T>>(model: M): void;
22
- /**
23
- * The schema for the singleton.
24
- */
25
- get singletonSchema(): import("angular-odata").ODataEntitySet | undefined;
26
- /**
27
- * Update the singleton entity
28
- * @param attrs The attributes for the entity.
29
- * @param etag The etag for the entity.
30
- * @param options The options for the request.
31
- */
32
- update(attrs: Partial<T>, options?: ODataOptions & {
33
- etag?: string;
34
- }): Observable<ODataEntity<T>>;
35
- /**
36
- * Patch the singleton entity
37
- * @param attrs The attributes for the entity.
38
- * @param etag The etag for the entity.
39
- * @param options The options for the request.
40
- */
41
- patch(attrs: Partial<T>, options?: ODataOptions & {
42
- etag?: string;
43
- }): Observable<ODataEntity<T>>;
44
- }
package/lib/settings.d.ts DELETED
@@ -1,26 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { ODataApi } from './api';
3
- import { ODataCollection, ODataModel } from './models';
4
- import { ODataRequest } from './resources';
5
- import { ODataCallable, ODataEntitySet, ODataEnumType, ODataStructuredType } from './schema';
6
- import { ODataApiConfig, EdmType, Parser } from './types';
7
- export declare class ODataSettings {
8
- apis: ODataApi[];
9
- constructor(configs: ODataApiConfig[]);
10
- configure(settings: {
11
- requester?: (request: ODataRequest<any>) => Observable<any>;
12
- }): void;
13
- defaultApi(): ODataApi;
14
- findApiByName(name: string): ODataApi | undefined;
15
- apiByName(name: string): ODataApi;
16
- findApiForTypes(types: string[]): ODataApi | undefined;
17
- findApiForType(type: string): ODataApi | undefined;
18
- apiForType(type: string): ODataApi;
19
- enumTypeForType<T>(type: string): ODataEnumType<T>;
20
- structuredTypeForType<T>(type: string): ODataStructuredType<T>;
21
- callableForType<T>(type: string, bindingType?: string): ODataCallable<T>;
22
- entitySetForType(type: string): ODataEntitySet;
23
- parserForType<T>(type: string | EdmType): Parser<T>;
24
- modelForType(type: string): typeof ODataModel;
25
- collectionForType(type: string): typeof ODataCollection;
26
- }