angular-odata 0.162.0 → 0.164.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/fesm2022/angular-odata.mjs +895 -380
- package/fesm2022/angular-odata.mjs.map +1 -1
- package/package.json +1 -1
- package/schematics/apigen/angular/base.js +4 -4
- package/schematics/apigen/angular/base.js.map +1 -1
- package/schematics/metadata/parser/csdl/csdl-annotation.d.ts +7 -3
- package/schematics/metadata/parser/csdl/csdl-annotation.js +11 -3
- package/schematics/metadata/parser/csdl/csdl-annotation.js.map +1 -1
- package/schematics/metadata/parser/csdl/csdl-function-action.d.ts +2 -13
- package/schematics/metadata/parser/csdl/csdl-function-action.js +35 -8
- package/schematics/metadata/parser/csdl/csdl-function-action.js.map +1 -1
- package/schematics/metadata/parser/csdl/csdl-structural-property.js +1 -1
- package/schematics/metadata/parser/csdl/csdl-structural-property.js.map +1 -1
- package/schematics/metadata/parser/index.js +2 -2
- package/schematics/metadata/parser/index.js.map +1 -1
- package/types/angular-odata.d.ts +139 -108
package/types/angular-odata.d.ts
CHANGED
|
@@ -1864,6 +1864,8 @@ type ODataOptions = {
|
|
|
1864
1864
|
reportProgress?: boolean;
|
|
1865
1865
|
withCredentials?: boolean;
|
|
1866
1866
|
fetchPolicy?: FetchPolicy;
|
|
1867
|
+
ignoreCacheControl?: boolean;
|
|
1868
|
+
cacheInvalidation?: CacheInvalidation;
|
|
1867
1869
|
maxAge?: number;
|
|
1868
1870
|
parserOptions?: ParserOptions;
|
|
1869
1871
|
};
|
|
@@ -1997,6 +1999,10 @@ declare class ODataApiOptions implements ODataApiConfigOptions {
|
|
|
1997
1999
|
* Cache fetch policy
|
|
1998
2000
|
*/
|
|
1999
2001
|
fetchPolicy: FetchPolicy;
|
|
2002
|
+
/** Ignore response Cache-Control directives. Defaults to false. */
|
|
2003
|
+
ignoreCacheControl: boolean;
|
|
2004
|
+
/** Scope invalidated by successful writes. Defaults to entity-set. */
|
|
2005
|
+
cacheInvalidation: CacheInvalidation;
|
|
2000
2006
|
/**
|
|
2001
2007
|
* Extra params to be sent in the request
|
|
2002
2008
|
*/
|
|
@@ -2092,15 +2098,15 @@ declare class ODataBatchResource extends ODataResource<any> {
|
|
|
2092
2098
|
responses(): HttpResponseBase[] | null;
|
|
2093
2099
|
static factory(api: ODataApi): ODataBatchResource;
|
|
2094
2100
|
clone(): ODataBatchResource;
|
|
2095
|
-
private storeRequester;
|
|
2096
|
-
private restoreRequester;
|
|
2097
2101
|
/**
|
|
2098
2102
|
* Add to batch request
|
|
2099
2103
|
* @param ctx The context for the request
|
|
2100
2104
|
* @returns The result of execute the context
|
|
2101
2105
|
*/
|
|
2102
2106
|
add<R>(ctx: (batch: this) => R): R;
|
|
2107
|
+
/** Send collected requests, evaluating their cache policies when subscribed. */
|
|
2103
2108
|
send(options?: ODataOptions): Observable<ODataResponse<any>>;
|
|
2109
|
+
private sendRequests;
|
|
2104
2110
|
private sendJson;
|
|
2105
2111
|
private sendLegacy;
|
|
2106
2112
|
/**
|
|
@@ -3151,15 +3157,19 @@ declare class CsdlRecord {
|
|
|
3151
3157
|
toConfig(): ODataAnnotationValueConfig[];
|
|
3152
3158
|
}
|
|
3153
3159
|
declare class CsdlPropertyValue {
|
|
3154
|
-
|
|
3160
|
+
Property: string;
|
|
3161
|
+
Bool?: boolean;
|
|
3155
3162
|
String?: string;
|
|
3156
3163
|
Date?: Date;
|
|
3157
3164
|
EnumMember?: CsdlEnumMember[];
|
|
3158
|
-
|
|
3159
|
-
|
|
3165
|
+
TextContent?: string;
|
|
3166
|
+
constructor({ Property, Bool, String, Date, EnumMember, TextContent, }: {
|
|
3167
|
+
Property: string;
|
|
3168
|
+
Bool?: boolean;
|
|
3160
3169
|
String?: string;
|
|
3161
3170
|
Date?: Date;
|
|
3162
3171
|
EnumMember?: any[];
|
|
3172
|
+
TextContent?: string;
|
|
3163
3173
|
});
|
|
3164
3174
|
toJson(): {
|
|
3165
3175
|
[key: string]: any;
|
|
@@ -3311,13 +3321,7 @@ declare class CsdlParameter extends CsdlAnnotable {
|
|
|
3311
3321
|
Annotation?: any[];
|
|
3312
3322
|
});
|
|
3313
3323
|
toJson(): {
|
|
3314
|
-
|
|
3315
|
-
Type: string;
|
|
3316
|
-
Nullable: boolean | undefined;
|
|
3317
|
-
MaxLength: number | undefined;
|
|
3318
|
-
Precision: number | undefined;
|
|
3319
|
-
Scale: number | undefined;
|
|
3320
|
-
SRID: string | undefined;
|
|
3324
|
+
[key: string]: any;
|
|
3321
3325
|
};
|
|
3322
3326
|
toConfig(): ODataParameterConfig;
|
|
3323
3327
|
}
|
|
@@ -3338,17 +3342,9 @@ declare class CsdlReturnType {
|
|
|
3338
3342
|
SRID?: string;
|
|
3339
3343
|
});
|
|
3340
3344
|
toJson(): {
|
|
3341
|
-
|
|
3342
|
-
Nullable: boolean | undefined;
|
|
3343
|
-
MaxLength: number | undefined;
|
|
3344
|
-
Precision: number | undefined;
|
|
3345
|
-
Scale: number | undefined;
|
|
3346
|
-
SRID: string | undefined;
|
|
3345
|
+
[key: string]: any;
|
|
3347
3346
|
};
|
|
3348
|
-
toConfig():
|
|
3349
|
-
type: string;
|
|
3350
|
-
collection?: boolean | undefined;
|
|
3351
|
-
} | undefined;
|
|
3347
|
+
toConfig(): ODataReturnConfig;
|
|
3352
3348
|
}
|
|
3353
3349
|
|
|
3354
3350
|
declare class CsdlReference extends CsdlAnnotable {
|
|
@@ -3516,6 +3512,8 @@ declare class ODataRequest<T> {
|
|
|
3516
3512
|
readonly withCredentials?: boolean;
|
|
3517
3513
|
readonly bodyQueryOptions: QueryOption[];
|
|
3518
3514
|
readonly fetchPolicy: FetchPolicy;
|
|
3515
|
+
readonly ignoreCacheControl: boolean;
|
|
3516
|
+
readonly cacheInvalidation: CacheInvalidation;
|
|
3519
3517
|
readonly maxAge?: number;
|
|
3520
3518
|
readonly resource: ODataResource<T>;
|
|
3521
3519
|
private readonly _responseType?;
|
|
@@ -3541,6 +3539,8 @@ declare class ODataRequest<T> {
|
|
|
3541
3539
|
};
|
|
3542
3540
|
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text' | 'value' | 'property' | 'entity' | 'entities';
|
|
3543
3541
|
fetchPolicy?: FetchPolicy;
|
|
3542
|
+
ignoreCacheControl?: boolean;
|
|
3543
|
+
cacheInvalidation?: CacheInvalidation;
|
|
3544
3544
|
maxAge?: number;
|
|
3545
3545
|
parserOptions?: ParserOptions;
|
|
3546
3546
|
withCredentials?: boolean;
|
|
@@ -3563,7 +3563,10 @@ declare class ODataRequest<T> {
|
|
|
3563
3563
|
get pathWithParams(): string;
|
|
3564
3564
|
get url(): string;
|
|
3565
3565
|
get urlWithParams(): string;
|
|
3566
|
+
/** A versioned response identity that includes the API and transport representation. */
|
|
3566
3567
|
get cacheKey(): string;
|
|
3568
|
+
/** The versioned response-cache partition belonging to this API. */
|
|
3569
|
+
get cacheScope(): string[];
|
|
3567
3570
|
isQueryBody(): boolean;
|
|
3568
3571
|
isBatch(): boolean;
|
|
3569
3572
|
isFetch(): boolean;
|
|
@@ -3627,6 +3630,8 @@ declare class ODataResponse<T> extends HttpResponse<T> {
|
|
|
3627
3630
|
static fromHttpResponse<T>(req: ODataRequest<T>, res: HttpResponse<T>): ODataResponse<T>;
|
|
3628
3631
|
static fromJson<T>(req: ODataRequest<T>, json: ODataResponseJson<T>): ODataResponse<T>;
|
|
3629
3632
|
toJson(): ODataResponseJson<T>;
|
|
3633
|
+
/** Whether the response can be reused without server validation. */
|
|
3634
|
+
isCacheable(ignoreCacheControl?: boolean): boolean;
|
|
3630
3635
|
private _options?;
|
|
3631
3636
|
get options(): ODataResponseOptions;
|
|
3632
3637
|
private _payload?;
|
|
@@ -4586,6 +4591,7 @@ declare class ODataReference extends ODataAnnotatable {
|
|
|
4586
4591
|
*/
|
|
4587
4592
|
declare class ODataApi {
|
|
4588
4593
|
requester?: (request: ODataRequest<any>) => Observable<any>;
|
|
4594
|
+
private _requestCapture?;
|
|
4589
4595
|
serviceRootUrl: string;
|
|
4590
4596
|
metadataUrl: string;
|
|
4591
4597
|
name?: string;
|
|
@@ -4672,9 +4678,16 @@ declare class ODataApi {
|
|
|
4672
4678
|
* @returns
|
|
4673
4679
|
*/
|
|
4674
4680
|
private handleRequest;
|
|
4681
|
+
/** @internal Collect batch requests synchronously without executing their cache effects. */
|
|
4682
|
+
captureRequests<R>(capture: (request: ODataRequest<any>) => Observable<any>, callback: () => R): R;
|
|
4683
|
+
/** @internal Execute a collected or ordinary request with subscription-time cache semantics. */
|
|
4684
|
+
executeRequest(req: ODataRequest<any>, requester?: ((request: ODataRequest<any>) => Observable<any>) | undefined, cacheReady?: boolean): Observable<any>;
|
|
4685
|
+
/** @internal Whether the error is a `cache-only` miss rather than a cache failure. */
|
|
4686
|
+
isCacheMiss(error: unknown): boolean;
|
|
4675
4687
|
private handleRequester;
|
|
4688
|
+
private cacheGeneration;
|
|
4689
|
+
private invalidateCache;
|
|
4676
4690
|
private handleCacheFetch;
|
|
4677
|
-
private handleCacheMutate;
|
|
4678
4691
|
private memo;
|
|
4679
4692
|
createSchema(config: ODataSchemaConfig): ODataSchema;
|
|
4680
4693
|
findSchema(type: string): ODataSchema | undefined;
|
|
@@ -4974,6 +4987,7 @@ type ODataVersion = '2.0' | '3.0' | '4.0';
|
|
|
4974
4987
|
type FetchPolicy = 'cache-first' | 'cache-and-network' | 'network-only' | 'no-cache' | 'cache-only';
|
|
4975
4988
|
type ODataMetadataType = 'minimal' | 'full' | 'none';
|
|
4976
4989
|
type CacheCacheability = 'public' | 'private' | 'no-cache' | 'no-store';
|
|
4990
|
+
type CacheInvalidation = 'entity-set' | 'api';
|
|
4977
4991
|
declare enum PathSegment {
|
|
4978
4992
|
batch = "batch",
|
|
4979
4993
|
metadata = "metadata",
|
|
@@ -5098,6 +5112,8 @@ interface FieldParser<T> extends Parser<T> {
|
|
|
5098
5112
|
}
|
|
5099
5113
|
declare const NONE_PARSER: Parser<any>;
|
|
5100
5114
|
interface ODataCache {
|
|
5115
|
+
/** Wait until persisted entries are available, or a reported memory fallback is ready. */
|
|
5116
|
+
ready?(): Promise<void>;
|
|
5101
5117
|
put<T>(key: string, payload: T, ...opts: any[]): void;
|
|
5102
5118
|
get<T>(key: string, ...opts: any[]): T | undefined;
|
|
5103
5119
|
getResponse(req: ODataRequest<any>): ODataResponse<any> | undefined;
|
|
@@ -5139,6 +5155,8 @@ interface ODataApiConfigOptions {
|
|
|
5139
5155
|
};
|
|
5140
5156
|
stripMetadata?: ODataMetadataType;
|
|
5141
5157
|
fetchPolicy?: FetchPolicy;
|
|
5158
|
+
ignoreCacheControl?: boolean;
|
|
5159
|
+
cacheInvalidation?: CacheInvalidation;
|
|
5142
5160
|
bodyQueryOptions?: QueryOption[];
|
|
5143
5161
|
stringAsEnum?: boolean;
|
|
5144
5162
|
deleteRefBy?: 'path' | 'id';
|
|
@@ -5174,10 +5192,12 @@ type ODataApiConfig = {
|
|
|
5174
5192
|
};
|
|
5175
5193
|
};
|
|
5176
5194
|
type ODataAnnotationValueConfig = {
|
|
5177
|
-
|
|
5195
|
+
property?: string;
|
|
5196
|
+
bool?: boolean;
|
|
5178
5197
|
string?: string;
|
|
5179
5198
|
date?: Date;
|
|
5180
5199
|
enumMembers?: string[];
|
|
5200
|
+
textContent?: string;
|
|
5181
5201
|
};
|
|
5182
5202
|
type ODataAnnotationConfig = {
|
|
5183
5203
|
term: string;
|
|
@@ -5215,6 +5235,7 @@ type ODataEntityContainerConfig = {
|
|
|
5215
5235
|
singletons?: ODataSingletonConfig[];
|
|
5216
5236
|
};
|
|
5217
5237
|
type ODataEnumTypeFieldConfig = {
|
|
5238
|
+
name: string;
|
|
5218
5239
|
value: number;
|
|
5219
5240
|
annotations?: ODataAnnotationConfig[];
|
|
5220
5241
|
};
|
|
@@ -5269,9 +5290,25 @@ type ODataStructuredTypeConfig = {
|
|
|
5269
5290
|
};
|
|
5270
5291
|
};
|
|
5271
5292
|
type ODataParameterConfig = {
|
|
5293
|
+
name: string;
|
|
5272
5294
|
type: string;
|
|
5273
5295
|
nullable?: boolean;
|
|
5274
5296
|
collection?: boolean;
|
|
5297
|
+
maxLength?: number;
|
|
5298
|
+
precision?: number;
|
|
5299
|
+
scale?: number | 'variable';
|
|
5300
|
+
srid?: string;
|
|
5301
|
+
annotations?: ODataAnnotationConfig[];
|
|
5302
|
+
};
|
|
5303
|
+
type ODataReturnConfig = {
|
|
5304
|
+
type: string;
|
|
5305
|
+
collection?: boolean;
|
|
5306
|
+
nullable?: boolean;
|
|
5307
|
+
maxLength?: number;
|
|
5308
|
+
precision?: number;
|
|
5309
|
+
scale?: number | 'variable';
|
|
5310
|
+
srid?: string;
|
|
5311
|
+
annotations?: ODataAnnotationConfig[];
|
|
5275
5312
|
};
|
|
5276
5313
|
type ODataCallableConfig = {
|
|
5277
5314
|
name: string;
|
|
@@ -5281,10 +5318,7 @@ type ODataCallableConfig = {
|
|
|
5281
5318
|
parameters?: {
|
|
5282
5319
|
[name: string]: ODataParameterConfig;
|
|
5283
5320
|
};
|
|
5284
|
-
return?:
|
|
5285
|
-
type: string;
|
|
5286
|
-
collection?: boolean;
|
|
5287
|
-
};
|
|
5321
|
+
return?: ODataReturnConfig;
|
|
5288
5322
|
};
|
|
5289
5323
|
type ODataEntitySetConfig = {
|
|
5290
5324
|
name: string;
|
|
@@ -6329,6 +6363,16 @@ declare class ODataServiceFactory {
|
|
|
6329
6363
|
static ɵprov: i0.ɵɵInjectableDeclaration<ODataServiceFactory>;
|
|
6330
6364
|
}
|
|
6331
6365
|
|
|
6366
|
+
type ODataCacheOptions = {
|
|
6367
|
+
maxAge?: number;
|
|
6368
|
+
/** Opt into memory fallback on persistence failures; also told of discarded corrupt entries. */
|
|
6369
|
+
onError?: (error: Error) => void;
|
|
6370
|
+
};
|
|
6371
|
+
type ODataCacheFilter = {
|
|
6372
|
+
name?: string;
|
|
6373
|
+
scope?: string[];
|
|
6374
|
+
tags?: string[];
|
|
6375
|
+
};
|
|
6332
6376
|
/**
|
|
6333
6377
|
* A cache entry that holds a payload, a date when it was last read from the backend, and a maxAge for the entry.
|
|
6334
6378
|
* @param payload The payload to cache.
|
|
@@ -6344,9 +6388,9 @@ interface ODataCacheEntry<T> {
|
|
|
6344
6388
|
}
|
|
6345
6389
|
declare abstract class ODataBaseCache implements ODataCache {
|
|
6346
6390
|
maxAge: number;
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
});
|
|
6391
|
+
private _onError?;
|
|
6392
|
+
protected _error?: Error;
|
|
6393
|
+
constructor({ maxAge, onError, }: ODataCacheOptions);
|
|
6350
6394
|
/**
|
|
6351
6395
|
* Check if the entry is expired
|
|
6352
6396
|
* @param entry The cache entry
|
|
@@ -6382,6 +6426,19 @@ declare abstract class ODataBaseCache implements ODataCache {
|
|
|
6382
6426
|
* @returns The key for the entry
|
|
6383
6427
|
*/
|
|
6384
6428
|
buildKey(names: string[]): string;
|
|
6429
|
+
protected validateMaxAge(maxAge: number): void;
|
|
6430
|
+
protected reportError(message: string, cause?: unknown): void;
|
|
6431
|
+
/** Report a discarded entry; corrupt entries are treated as cache misses. */
|
|
6432
|
+
protected reportCorruption(message: string, cause?: unknown): void;
|
|
6433
|
+
protected checkError(): void;
|
|
6434
|
+
protected isEntry(value: unknown): value is ODataCacheEntry<unknown>;
|
|
6435
|
+
protected matches(key: string, entry: ODataCacheEntry<unknown>, { name, scope, tags }: ODataCacheFilter): boolean;
|
|
6436
|
+
protected isResponseJson(value: unknown): value is ODataResponseJson<unknown>;
|
|
6437
|
+
protected snapshot(response: ODataResponseJson<unknown>): ODataResponseJson<unknown>;
|
|
6438
|
+
/** Store a detached response snapshot, respecting server reuse restrictions. */
|
|
6439
|
+
putResponse(req: ODataRequest<any>, res: ODataResponse<any>): void;
|
|
6440
|
+
/** Restore a detached response using the current request's resource and parser. */
|
|
6441
|
+
getResponse(req: ODataRequest<any>): ODataResponse<any> | undefined;
|
|
6385
6442
|
abstract put<T>(name: string, payload: T, { maxAge, scope, tags }: {
|
|
6386
6443
|
maxAge?: number;
|
|
6387
6444
|
scope?: string[];
|
|
@@ -6390,8 +6447,6 @@ declare abstract class ODataBaseCache implements ODataCache {
|
|
|
6390
6447
|
abstract get<T>(name: string, { scope }: {
|
|
6391
6448
|
scope?: string[];
|
|
6392
6449
|
}): T | undefined;
|
|
6393
|
-
abstract getResponse(req: ODataRequest<any>): ODataResponse<any> | undefined;
|
|
6394
|
-
abstract putResponse(req: ODataRequest<any>, res: ODataResponse<any>): void;
|
|
6395
6450
|
abstract forget({ name, scope, tags, }: {
|
|
6396
6451
|
name?: string;
|
|
6397
6452
|
scope?: string[];
|
|
@@ -6403,9 +6458,13 @@ declare abstract class ODataBaseCache implements ODataCache {
|
|
|
6403
6458
|
|
|
6404
6459
|
declare class ODataInMemoryCache extends ODataBaseCache {
|
|
6405
6460
|
entries: Map<string, ODataCacheEntry<any>>;
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6461
|
+
private _nextExpiry;
|
|
6462
|
+
constructor(options?: ODataCacheOptions);
|
|
6463
|
+
protected setEntry(key: string, entry: ODataCacheEntry<unknown>): void;
|
|
6464
|
+
protected deleteEntry(key: string): void;
|
|
6465
|
+
protected expireEntry(key: string): void;
|
|
6466
|
+
protected clearEntries(): void;
|
|
6467
|
+
protected prune(): void;
|
|
6409
6468
|
/**
|
|
6410
6469
|
* Put some payload in the cache
|
|
6411
6470
|
* @param name The name for the entry
|
|
@@ -6428,107 +6487,79 @@ declare class ODataInMemoryCache extends ODataBaseCache {
|
|
|
6428
6487
|
get<T>(name: string, { scope }?: {
|
|
6429
6488
|
scope?: string[];
|
|
6430
6489
|
}): T | undefined;
|
|
6431
|
-
/**
|
|
6432
|
-
* Store the response in the cache
|
|
6433
|
-
* @param req The request with the resource to store the response
|
|
6434
|
-
* @param res The response to store in the cache
|
|
6435
|
-
*/
|
|
6436
|
-
putResponse(req: ODataRequest<any>, res: ODataResponse<any>): void;
|
|
6437
|
-
/**
|
|
6438
|
-
* Restore the response from the cache
|
|
6439
|
-
* @param req The request with the resource to get the response
|
|
6440
|
-
* @returns The response from the cache
|
|
6441
|
-
*/
|
|
6442
|
-
getResponse(req: ODataRequest<any>): ODataResponse<any> | undefined;
|
|
6443
6490
|
/**
|
|
6444
6491
|
* Remove all cache entries that are matching with the given options
|
|
6445
6492
|
* @param options The options to forget
|
|
6446
6493
|
*/
|
|
6447
|
-
forget(
|
|
6448
|
-
name?: string;
|
|
6449
|
-
scope?: string[];
|
|
6450
|
-
tags?: string[];
|
|
6451
|
-
}): void;
|
|
6494
|
+
forget(options?: ODataCacheFilter): void;
|
|
6452
6495
|
/**
|
|
6453
6496
|
* Remove all cache entries
|
|
6454
6497
|
*/
|
|
6455
6498
|
flush(): void;
|
|
6499
|
+
/** Return the number of unexpired entries. */
|
|
6456
6500
|
size(): number;
|
|
6457
6501
|
}
|
|
6458
6502
|
|
|
6459
|
-
declare class ODataInStorageCache extends
|
|
6503
|
+
declare class ODataInStorageCache extends ODataInMemoryCache {
|
|
6460
6504
|
prefix: string;
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6505
|
+
private _storage?;
|
|
6506
|
+
private _persistent;
|
|
6507
|
+
private _memoryOnly;
|
|
6508
|
+
constructor({ prefix, storage, ...options }: ODataCacheOptions & {
|
|
6464
6509
|
prefix: string;
|
|
6465
6510
|
storage?: Storage;
|
|
6466
6511
|
});
|
|
6512
|
+
/** The backing storage. Throws if the platform has no Web Storage implementation. */
|
|
6513
|
+
get storage(): Storage;
|
|
6514
|
+
set storage(storage: Storage);
|
|
6467
6515
|
buildKey(names: string[]): string;
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6516
|
+
private disablePersistence;
|
|
6517
|
+
private storageKeys;
|
|
6518
|
+
private readEntry;
|
|
6519
|
+
private loadFromStorage;
|
|
6520
|
+
private removeStoredEntry;
|
|
6521
|
+
protected setEntry(key: string, entry: ODataCacheEntry<unknown>): void;
|
|
6522
|
+
protected deleteEntry(key: string): void;
|
|
6523
|
+
protected expireEntry(key: string): void;
|
|
6524
|
+
protected clearEntries(): void;
|
|
6525
|
+
/** Read a persisted entry, or its in-memory fallback, without renewing its age. */
|
|
6473
6526
|
get<T>(name: string, { scope }?: {
|
|
6474
6527
|
scope?: string[];
|
|
6475
6528
|
}): T | undefined;
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
tags?: string[];
|
|
6480
|
-
}): void;
|
|
6481
|
-
/**
|
|
6482
|
-
* Flush the cache and clean the storage
|
|
6483
|
-
*/
|
|
6484
|
-
flush(): void;
|
|
6485
|
-
/**
|
|
6486
|
-
* Store the response in the cache
|
|
6487
|
-
* @param req The request with the resource to store the response
|
|
6488
|
-
* @param res The response to store in the cache
|
|
6489
|
-
*/
|
|
6490
|
-
putResponse(req: ODataRequest<any>, res: ODataResponse<any>): void;
|
|
6491
|
-
/**
|
|
6492
|
-
* Restore the response from the cache
|
|
6493
|
-
* @param req The request with the resource to get the response
|
|
6494
|
-
* @returns The response from the cache
|
|
6495
|
-
*/
|
|
6496
|
-
getResponse(req: ODataRequest<any>): ODataResponse<any> | undefined;
|
|
6529
|
+
/** Remove matching entries from both persistent storage and the memory fallback. */
|
|
6530
|
+
forget(options?: ODataCacheFilter): void;
|
|
6531
|
+
/** Count unexpired entries, including memory-only binary responses. */
|
|
6497
6532
|
size(): number;
|
|
6498
6533
|
}
|
|
6499
6534
|
|
|
6500
|
-
declare class ODataIndexedDBCache extends
|
|
6535
|
+
declare class ODataIndexedDBCache extends ODataInMemoryCache {
|
|
6501
6536
|
private name;
|
|
6502
6537
|
private version;
|
|
6503
6538
|
private store;
|
|
6504
|
-
private
|
|
6505
|
-
private
|
|
6506
|
-
|
|
6539
|
+
private _database?;
|
|
6540
|
+
private _persistent;
|
|
6541
|
+
private _hydrated;
|
|
6542
|
+
private _pending;
|
|
6543
|
+
private _writes;
|
|
6544
|
+
private _ready;
|
|
6545
|
+
constructor({ name, store, version, ...options }?: ODataCacheOptions & {
|
|
6507
6546
|
name?: string;
|
|
6508
6547
|
store?: string;
|
|
6509
6548
|
version?: number;
|
|
6510
|
-
maxAge?: number;
|
|
6511
6549
|
});
|
|
6512
|
-
|
|
6550
|
+
/** Wait for hydration and queued writes, or an explicitly reported memory-only fallback. */
|
|
6551
|
+
ready(): Promise<void>;
|
|
6552
|
+
protected reportError(message: string, cause?: unknown): void;
|
|
6553
|
+
private disablePersistence;
|
|
6554
|
+
private openDb;
|
|
6513
6555
|
private loadFromDb;
|
|
6514
|
-
private
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
scope?: string[];
|
|
6522
|
-
}): T | undefined;
|
|
6523
|
-
putResponse(req: ODataRequest<any>, res: ODataResponse<any>): void;
|
|
6524
|
-
getResponse(req: ODataRequest<any>): ODataResponse<any> | undefined;
|
|
6525
|
-
forget({ name, scope, tags, }?: {
|
|
6526
|
-
name?: string;
|
|
6527
|
-
scope?: string[];
|
|
6528
|
-
tags?: string[];
|
|
6529
|
-
}): void;
|
|
6530
|
-
flush(): void;
|
|
6531
|
-
size(): number;
|
|
6556
|
+
private initialize;
|
|
6557
|
+
private persist;
|
|
6558
|
+
protected setEntry(key: string, entry: ODataCacheEntry<unknown>): void;
|
|
6559
|
+
protected deleteEntry(key: string): void;
|
|
6560
|
+
protected clearEntries(): void;
|
|
6561
|
+
/** Invalidate loaded entries and record filters that must also apply during hydration. */
|
|
6562
|
+
forget(options?: ODataCacheFilter): void;
|
|
6532
6563
|
}
|
|
6533
6564
|
|
|
6534
6565
|
declare enum FieldType {
|
|
@@ -6641,4 +6672,4 @@ declare class ODataMetadataParser {
|
|
|
6641
6672
|
}
|
|
6642
6673
|
|
|
6643
6674
|
export { Aggregate, ApplyExpression, ArithmeticFunctions, ArithmeticOperators, BUBBLES, Casting, CastingOperators, CollectionFunctions, ComputeExpression, ConditionalFunctions, DateAndTimeFunctions, Dates, Durations, EDM_PARSERS, EdmType, Enums, ExpandExpression, ExpandField, Expression, FieldFactory, FilterExpression, Function, GeoFunctions, GroupBy, GroupByTransformations, Grouping, GroupingOperators, Http, INCLUDE_DEEP, INCLUDE_SHALLOW, ITEM_ROOT, JsonSchemaType, Lambda, LambdaOperators, LogicalOperators, Model, ModelField, NONE_PARSER, ODATA_CONFIG, OData, ODataActionResource, ODataAnnotations, ODataApi, ODataAsyncLoader, ODataBaseCache, ODataBaseService, ODataBatchRequest, ODataBatchResource, ODataCallable, ODataCallableParser, ODataClient, ODataCollection, ODataCountResource, ODataEntitiesAnnotations, ODataEntityAnnotations, ODataEntityContainer, ODataEntityResource, ODataEntitySet, ODataEntitySetResource, ODataEntitySetService, ODataEntityTypeKey, ODataEnumType, ODataEnumTypeFieldParser, ODataEnumTypeParser, ODataFunctionResource, ODataFunctions, ODataInMemoryCache, ODataInStorageCache, ODataIndexedDBCache, ODataLoader, ODataMediaResource, ODataMetadata, ODataMetadataLoader, ODataMetadataParser, ODataMetadataResource, ODataModel, ODataModelAttribute, ODataModelEvent, ODataModelEventEmitter, ODataModelEventType, ODataModelField, ODataModelOptions, ODataModelState, ODataModule, ODataNavigationPropertyResource, ODataOperators, ODataParameterParser, ODataPathSegments, ODataPathSegmentsHandler, ODataPropertyAnnotations, ODataPropertyResource, ODataQueryOptionHandler, ODataQueryOptions, ODataQueryOptionsHandler, ODataReferenceResource, ODataReferential, ODataRequest, ODataResource, ODataResponse, ODataSchema, ODataServiceFactory, ODataSettings, ODataSingleton, ODataSingletonResource, ODataSingletonService, ODataStructuredType, ODataStructuredTypeFieldParser, ODataStructuredTypeParser, ODataSyncLoader, ODataTransformations, ODataValueResource, Objects, Operator, OrderByExpression, OrderByField, PathSegment, QueryCustomTypes, QueryOption, RenderableFactory, SearchExpression, SearchTerm, SegmentHandler, SelectExpression, StandardAggregateMethods, StringAndCollectionFunctions, StringFunctions, Strings, Transformations, Type, TypeFunctions, Types, Urls, alias, binary, buildPathAndQuery, defaultHttpSyncLoader, duration, encode, functions, isQueryCustomType, isRawType, normalizeValue, operators, pathAndParamsFromQueryOptions, pathAndParamsFromSegments, provideODataClient, raw, render, resolve, transformations };
|
|
6644
|
-
export type { AggregateMethod, AggregateType, ApplyExpressionBuilder, CacheCacheability, ComputeExpressionBuilder, Duration, EntityKey, Expand, ExpandExpressionBuilder, ExpandObject, ExpandOptions, ExpandType, FetchPolicy, FieldParser, Filter, FilterConnector, FilterExpressionBuilder, FilterType, GroupByType, JsonSchemaCustom, JsonSchemaExpand, JsonSchemaFieldOptions, JsonSchemaOptions, JsonSchemaRequired, JsonSchemaSelect, LooseUnion, ModelFieldOptions, ModelInterface, ModelOptions, NestedExpandOptions, NestedOrderBy, Normalize, ODataActionOptions, ODataAnnotationConfig, ODataAnnotationValueConfig, ODataApiConfig, ODataApiConfigOptions, ODataCache, ODataCacheEntry, ODataCallableConfig, ODataEntities, ODataEntitiesOptions, ODataEntity, ODataEntityContainerConfig, ODataEntityOptions, ODataEntitySetConfig, ODataEnumTypeConfig, ODataEnumTypeFieldConfig, ODataFunctionOptions, ODataMetadataType, ODataModelEntry, ODataModelFieldOptions, ODataOptions, ODataParameterConfig, ODataProperty, ODataPropertyOptions, ODataQueryArguments, ODataQueryableOptions, ODataReferenceConfig, ODataResponseJson, ODataSchemaConfig, ODataSegment, ODataSingletonConfig, ODataStructuredTypeConfig, ODataStructuredTypeFieldConfig, ODataVersion, ObjectValues, OrderAttribute, OrderBy, OrderByExpressionBuilder, OrderByObject, OrderByType, Parser, ParserOptions, PassedInitialConfig, QueryCustomType, QueryOptions, Renderable, ResponseOptions, SearchConnector, SearchExpressionBuilder, Select, SelectExpressionBuilder, SelectType, StructuredTypeFieldOptions, Transform, Unpacked, Value };
|
|
6675
|
+
export type { AggregateMethod, AggregateType, ApplyExpressionBuilder, CacheCacheability, CacheInvalidation, ComputeExpressionBuilder, Duration, EntityKey, Expand, ExpandExpressionBuilder, ExpandObject, ExpandOptions, ExpandType, FetchPolicy, FieldParser, Filter, FilterConnector, FilterExpressionBuilder, FilterType, GroupByType, JsonSchemaCustom, JsonSchemaExpand, JsonSchemaFieldOptions, JsonSchemaOptions, JsonSchemaRequired, JsonSchemaSelect, LooseUnion, ModelFieldOptions, ModelInterface, ModelOptions, NestedExpandOptions, NestedOrderBy, Normalize, ODataActionOptions, ODataAnnotationConfig, ODataAnnotationValueConfig, ODataApiConfig, ODataApiConfigOptions, ODataCache, ODataCacheEntry, ODataCacheFilter, ODataCacheOptions, ODataCallableConfig, ODataEntities, ODataEntitiesOptions, ODataEntity, ODataEntityContainerConfig, ODataEntityOptions, ODataEntitySetConfig, ODataEnumTypeConfig, ODataEnumTypeFieldConfig, ODataFunctionOptions, ODataMetadataType, ODataModelEntry, ODataModelFieldOptions, ODataOptions, ODataParameterConfig, ODataProperty, ODataPropertyOptions, ODataQueryArguments, ODataQueryableOptions, ODataReferenceConfig, ODataResponseJson, ODataReturnConfig, ODataSchemaConfig, ODataSegment, ODataSingletonConfig, ODataStructuredTypeConfig, ODataStructuredTypeFieldConfig, ODataVersion, ObjectValues, OrderAttribute, OrderBy, OrderByExpressionBuilder, OrderByObject, OrderByType, Parser, ParserOptions, PassedInitialConfig, QueryCustomType, QueryOptions, Renderable, ResponseOptions, SearchConnector, SearchExpressionBuilder, Select, SelectExpressionBuilder, SelectType, StructuredTypeFieldOptions, Transform, Unpacked, Value };
|