angular-odata 0.131.0 → 0.140.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.
Files changed (139) hide show
  1. package/fesm2022/angular-odata.mjs +276 -543
  2. package/fesm2022/angular-odata.mjs.map +1 -1
  3. package/index.d.ts +6403 -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
@@ -5,8 +5,7 @@ const core_1 = require("@angular-devkit/core");
5
5
  const toTypescriptType = (type, geo = true) => {
6
6
  if (type == null)
7
7
  return 'any';
8
- if (geo &&
9
- (type.startsWith('Edm.Geography') || type.startsWith('Edm.Geometry'))) {
8
+ if (geo && (type.startsWith('Edm.Geography') || type.startsWith('Edm.Geometry'))) {
10
9
  switch (type) {
11
10
  case 'Edm.Geography': //Abstract base type for all Geography types
12
11
  case 'Edm.GeographyPoint': //A point in a round-earth coordinate system
@@ -92,8 +91,7 @@ const makeRelativePath = (from, to) => {
92
91
  }
93
92
  return (Array.from({ length: froma.length - shared.length })
94
93
  .fill('..')
95
- .join('/') +
96
- to.substring(shared.join('/').length + (to.startsWith('/') ? 1 : 0)));
94
+ .join('/') + to.substring(shared.join('/').length + (to.startsWith('/') ? 1 : 0)));
97
95
  };
98
96
  exports.makeRelativePath = makeRelativePath;
99
97
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../projects/angular-odata/schematics/apigen/utils.ts"],"names":[],"mappings":";;;AAAA,+CAA0D;AAEnD,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAE,MAAe,IAAI,EAAE,EAAE;IACpE,IAAI,IAAI,IAAI,IAAI;QAAE,OAAO,KAAK,CAAC;IAC/B,IACE,GAAG;QACH,CAAC,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,EACrE,CAAC;QACD,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,eAAe,CAAC,CAAC,4CAA4C;YAClE,KAAK,oBAAoB,EAAE,4CAA4C;gBACrE,OAAO,OAAO,CAAC;YACjB,KAAK,yBAAyB,EAAE,yDAAyD;gBACvF,OAAO,YAAY,CAAC;YACtB,KAAK,yBAAyB,EAAE,gDAAgD;gBAC9E,OAAO,YAAY,CAAC;YACtB,KAAK,8BAA8B,EAAE,+DAA+D;gBAClG,OAAO,iBAAiB,CAAC;YAC3B,KAAK,sBAAsB,EAAE,4CAA4C;gBACvE,OAAO,SAAS,CAAC;YACnB,KAAK,2BAA2B,EAAE,2DAA2D;gBAC3F,OAAO,cAAc,CAAC;YACxB,KAAK,yBAAyB,EAAE,0CAA0C;gBACxE,OAAO,oBAAoB,CAAC;YAC9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CAAC,CAAC;IAChE,CAAC;IACD,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QAC/C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC,EAAE,CAAC;IACN,CAAC;IACD,OAAO,CACL,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;SACjD,IAAI,CAAC,IAAI,CAAC;SACV,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CACpF,CAAC;AACJ,CAAC,CAAC;AAvBW,QAAA,gBAAgB,oBAuB3B"}
@@ -1,75 +0,0 @@
1
- import { ODataContext, ODataVersionHelper } from './helper';
2
- import { ODataMetadataType } from './types';
3
- export declare abstract class ODataAnnotations<T> {
4
- helper: ODataVersionHelper;
5
- protected annotations: Map<string, any>;
6
- protected context?: ODataContext | undefined;
7
- constructor(helper: ODataVersionHelper, annotations?: Map<string, any>, context?: ODataContext | undefined);
8
- attributes(data: {
9
- [name: string]: any;
10
- }, metadata: ODataMetadataType): Partial<T>;
11
- update(data: {
12
- [name: string]: any;
13
- }): void;
14
- get entitySet(): string | undefined;
15
- get type(): string | undefined;
16
- abstract union(other: ODataAnnotations<any>): ODataAnnotations<any>;
17
- abstract clone(): ODataAnnotations<any>;
18
- abstract data(data: {
19
- [name: string]: any;
20
- }): {
21
- [name: string]: any;
22
- };
23
- }
24
- export declare class ODataPropertyAnnotations<T> extends ODataAnnotations<T> {
25
- union(other: ODataPropertyAnnotations<any>): ODataPropertyAnnotations<any>;
26
- clone(): ODataPropertyAnnotations<any>;
27
- data(data: {
28
- [name: string]: any;
29
- }): any;
30
- }
31
- export declare class ODataEntityAnnotations<T> extends ODataAnnotations<T> {
32
- union(other: ODataEntityAnnotations<any>): ODataEntityAnnotations<any>;
33
- clone(): ODataEntityAnnotations<any>;
34
- data(data: {
35
- [name: string]: any;
36
- }): any;
37
- get id(): string | undefined;
38
- get etag(): string | undefined;
39
- get mediaEtag(): string | undefined;
40
- get metadataEtag(): string | undefined;
41
- get readLink(): string | undefined;
42
- get editLink(): string | undefined;
43
- get mediaReadLink(): string | undefined;
44
- get mediaEditLink(): string | undefined;
45
- get mediaContentType(): string | undefined;
46
- private _properties?;
47
- get properties(): Map<keyof T, Map<string, any>>;
48
- property<F>(name: keyof T, type: 'collection'): ODataEntitiesAnnotations<F>;
49
- property<F>(name: keyof T, type: 'single'): ODataEntityAnnotations<F>;
50
- private _functions?;
51
- get functions(): {
52
- [name: string]: any;
53
- };
54
- function(name: string): any;
55
- }
56
- export declare class ODataEntitiesAnnotations<T> extends ODataAnnotations<T> {
57
- union(other: ODataEntitiesAnnotations<any>): ODataEntitiesAnnotations<any>;
58
- clone(): ODataEntitiesAnnotations<any>;
59
- data(data: {
60
- [name: string]: any;
61
- }): any;
62
- get readLink(): string | undefined;
63
- get count(): number | undefined;
64
- get nextLink(): string | undefined;
65
- get deltaLink(): string | undefined;
66
- get top(): number | undefined;
67
- get skip(): number | undefined;
68
- get skiptoken(): string | undefined;
69
- private _functions?;
70
- get functions(): {
71
- [name: string]: any;
72
- };
73
- function(name: string): any;
74
- entity(): ODataEntityAnnotations<T>;
75
- }
package/lib/api.d.ts DELETED
@@ -1,107 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { ModelOptions, ODataCollection, ODataModel, ODataModelOptions } from './models';
3
- import { ODataApiOptions } from './options';
4
- import { ODataOptions, ODataResource, ODataSegment } from './resources';
5
- import { ODataRequest, ODataBatchResource, ODataMetadataResource, ODataActionResource, ODataFunctionResource, ODataEntityResource, ODataEntitySetResource, ODataSingletonResource, ODataNavigationPropertyResource } from './resources';
6
- import { ODataCallable, ODataEntitySet, ODataEnumType, ODataSchema, ODataSingleton, ODataStructuredType } from './schema';
7
- import { ODataApiConfig, EdmType, ODataVersion, Parser, QueryOption, ODataSchemaConfig, ODataCache } from './types';
8
- import { ODataMetadata } from './metadata/metadata';
9
- /**
10
- * Api abstraction for consuming OData services.
11
- */
12
- export declare class ODataApi {
13
- requester?: (request: ODataRequest<any>) => Observable<any>;
14
- serviceRootUrl: string;
15
- metadataUrl: string;
16
- name?: string;
17
- version: ODataVersion;
18
- default: boolean;
19
- creation: Date;
20
- options: ODataApiOptions;
21
- cache?: ODataCache;
22
- errorHandler?: (error: any, caught: Observable<any>) => Observable<never>;
23
- parsers: Map<string, Parser<any>>;
24
- schemas: ODataSchema[];
25
- constructor(config: ODataApiConfig);
26
- configure(settings?: {
27
- requester?: (request: ODataRequest<any>) => Observable<any>;
28
- }): void;
29
- populate(metadata: ODataMetadata): void;
30
- fromJson<P, R>(json: {
31
- segments: ODataSegment[];
32
- options: {
33
- [name: string]: any;
34
- };
35
- }): ODataActionResource<P, R> | ODataFunctionResource<P, R>;
36
- fromJson<E>(json: {
37
- segments: ODataSegment[];
38
- options: {
39
- [name: string]: any;
40
- };
41
- }): ODataEntityResource<E> | ODataEntitySetResource<E> | ODataNavigationPropertyResource<E> | ODataSingletonResource<E>;
42
- /**
43
- * Build a metadata resource.
44
- * @returns ODataMetadataResource
45
- */
46
- metadata(): ODataMetadataResource;
47
- /**
48
- * Build a batch resource.
49
- * @returns ODataBatchResource
50
- */
51
- batch(): ODataBatchResource;
52
- /**
53
- * Build a singleton resource.
54
- * @param path Name of the singleton
55
- * @returns
56
- */
57
- singleton<T>(name: string): ODataSingletonResource<T>;
58
- /**
59
- * Build an entity set resource.
60
- * @param path Name of the entity set
61
- * @returns
62
- */
63
- entitySet<T>(name: string): ODataEntitySetResource<T>;
64
- /**
65
- * Unbound Action
66
- * @param {string} path?
67
- * @returns ODataActionResource
68
- */
69
- action<P, R>(path: string): ODataActionResource<P, R>;
70
- /**
71
- * Unbound Function
72
- * @param {string} path?
73
- * @returns ODataFunctionResource
74
- */
75
- function<P, R>(path: string): ODataFunctionResource<P, R>;
76
- callable<T>(type: string): ODataCallable<any> | undefined;
77
- enumType<T>(type: string): ODataEnumType<any> | undefined;
78
- structuredType<T>(type: string): ODataStructuredType<any> | ODataStructuredType<T> | undefined;
79
- request<T>(method: string, resource: ODataResource<any>, options: ODataOptions & {
80
- body?: any;
81
- etag?: string;
82
- responseType?: 'arraybuffer' | 'blob' | 'json' | 'text' | 'value' | 'property' | 'entity' | 'entities';
83
- observe?: 'body' | 'events' | 'response';
84
- withCount?: boolean;
85
- bodyQueryOptions?: QueryOption[];
86
- }): Observable<any>;
87
- private memo;
88
- createSchema(config: ODataSchemaConfig): ODataSchema;
89
- findSchema(type: string): ODataSchema | undefined;
90
- findEnumType<T>(value: string): ODataEnumType<any> | undefined;
91
- findStructuredType<T>(value: string): ODataStructuredType<any> | ODataStructuredType<T> | undefined;
92
- findCallable<R>(value: string, bindingType?: string): ODataCallable<any> | undefined;
93
- findEntitySet(value: string): ODataEntitySet | undefined;
94
- findSingleton(value: string): ODataSingleton | undefined;
95
- findModel(type: string): typeof ODataModel | undefined;
96
- createModel(structured: ODataStructuredType<any>): typeof ODataModel;
97
- modelForType(type: string): typeof ODataModel;
98
- findCollection(type: string): typeof ODataCollection | undefined;
99
- createCollection(structured: ODataStructuredType<any>, model?: typeof ODataModel<any>): typeof ODataCollection;
100
- collectionForType(type: string): typeof ODataCollection;
101
- findEntitySetForEntityType(entityType: string): ODataEntitySet | undefined;
102
- parserForType<T>(type: string | EdmType, bindingType?: string): Parser<T>;
103
- optionsForType<T>(type: string, { structuredType, config, }?: {
104
- structuredType?: ODataStructuredType<T>;
105
- config?: ModelOptions;
106
- }): ODataModelOptions<T> | undefined;
107
- }
@@ -1,104 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { ODataRequest, ODataResponse } from '../resources';
3
- import { ODataCache } from '../types';
4
- /**
5
- * A cache entry that holds a payload, a last read time, and a timeout for the entry.
6
- * @param payload The payload to cache.
7
- * @param lastRead The last read time.
8
- * @param timeout The timeout.
9
- * @param tags Some tags to identify the entry.
10
- */
11
- export interface ODataCacheEntry<T> {
12
- payload: T;
13
- lastRead: number;
14
- timeout: number;
15
- tags: string[];
16
- }
17
- export declare abstract class ODataBaseCache implements ODataCache {
18
- timeout: number;
19
- entries: Map<string, ODataCacheEntry<any>>;
20
- constructor({ timeout }: {
21
- timeout?: number;
22
- });
23
- abstract getResponse(req: ODataRequest<any>): ODataResponse<any> | undefined;
24
- abstract putResponse(req: ODataRequest<any>, res: ODataResponse<any>): void;
25
- /**
26
- * Using the resource on the request build an array of string to identify the scope of the request
27
- * @param req The request with the resource to build the scope
28
- * @returns Array of string to identify the scope of the request
29
- */
30
- scope(req: ODataRequest<any>): string[];
31
- /**
32
- * Using the odata context on the response build an array of string to identify the tags of the response
33
- * @param res The response to build the tags
34
- * @returns Array of string to identify the tags of the response
35
- */
36
- tags(res: ODataResponse<any>): string[];
37
- /**
38
- * Build an entry from a payload and some options
39
- * @param payload The payload to store in the cache
40
- * @param timeout The timeout for the entry
41
- * @param tags The tags for the entry
42
- * @returns The entry to store in the cache
43
- */
44
- buildEntry<T>(payload: T, { timeout, tags }: {
45
- timeout?: number;
46
- tags?: string[];
47
- }): ODataCacheEntry<T>;
48
- /**
49
- * Build a key from store an entry in the cache
50
- * @param names The names of the entry
51
- * @returns The key for the entry
52
- */
53
- buildKey(names: string[]): string;
54
- /**
55
- * Put some payload in the cache
56
- * @param name The name for the entry
57
- * @param payload The payload to store in the cache
58
- * @param timeout The timeout for the entry
59
- * @param scope The scope for the entry
60
- * @param tags The tags for the entry
61
- */
62
- put<T>(name: string, payload: T, { timeout, scope, tags, }?: {
63
- timeout?: number;
64
- scope?: string[];
65
- tags?: string[];
66
- }): void;
67
- /**
68
- * Return the payload from the cache if it exists and is not expired
69
- * @param name The name of the entry
70
- * @param scope The scope of the entry
71
- * @returns The payload of the entry
72
- */
73
- get<T>(name: string, { scope }?: {
74
- scope?: string[];
75
- }): T;
76
- /**
77
- * Remove all cache entries that are matching with the given options
78
- * @param options The options to forget
79
- */
80
- forget({ name, scope, tags, }?: {
81
- name?: string;
82
- scope?: string[];
83
- tags?: string[];
84
- }): void;
85
- /**
86
- * Remove all cache entries
87
- */
88
- flush(): void;
89
- /**
90
- * Check if the entry is expired
91
- * @param entry The cache entry
92
- * @returns Boolean indicating if the entry is expired
93
- */
94
- isExpired(entry: ODataCacheEntry<any>): boolean;
95
- /**
96
- * Using the request, handle the fetching of the response
97
- * @param req The request to fetch
98
- * @param res$ Observable of the response
99
- * @returns
100
- */
101
- handleRequest(req: ODataRequest<any>, res$: Observable<ODataResponse<any>>): Observable<ODataResponse<any>>;
102
- private handleFetch;
103
- private handleMutate;
104
- }
@@ -1,3 +0,0 @@
1
- export * from './cache';
2
- export * from './memory';
3
- export * from './storage';
@@ -1,19 +0,0 @@
1
- import { ODataRequest, ODataResponse } from '../resources';
2
- import { ODataBaseCache } from './cache';
3
- export declare class ODataInMemoryCache extends ODataBaseCache {
4
- constructor({ timeout }?: {
5
- timeout?: number;
6
- });
7
- /**
8
- * Store the response in the cache
9
- * @param req The request with the resource to store the response
10
- * @param res The response to store in the cache
11
- */
12
- putResponse(req: ODataRequest<any>, res: ODataResponse<any>): void;
13
- /**
14
- * Restore the response from the cache
15
- * @param req The request with the resource to get the response
16
- * @returns The response from the cache
17
- */
18
- getResponse(req: ODataRequest<any>): ODataResponse<any> | undefined;
19
- }
@@ -1,35 +0,0 @@
1
- import { ODataRequest, ODataResponse } from '../resources';
2
- import { ODataBaseCache } from './cache';
3
- export declare class ODataInStorageCache extends ODataBaseCache {
4
- name: string;
5
- storage: Storage;
6
- constructor({ name, storage, timeout, }: {
7
- timeout?: number;
8
- name: string;
9
- storage?: Storage;
10
- });
11
- /**
12
- * Store the cache in the storage
13
- */
14
- store(): void;
15
- /**
16
- * Restore the cache from the storage
17
- */
18
- restore(): void;
19
- /**
20
- * Flush the cache and clean the storage
21
- */
22
- flush(): void;
23
- /**
24
- * Store the response in the cache
25
- * @param req The request with the resource to store the response
26
- * @param res The response to store in the cache
27
- */
28
- putResponse(req: ODataRequest<any>, res: ODataResponse<any>): void;
29
- /**
30
- * Restore the response from the cache
31
- * @param req The request with the resource to get the response
32
- * @returns The response from the cache
33
- */
34
- getResponse(req: ODataRequest<any>): ODataResponse<any> | undefined;
35
- }