@warp-drive-mirror/json-api 5.6.0-alpha.12 → 5.6.0-alpha.13

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.
@@ -30,35 +30,102 @@ interface CachedResource {
30
30
  inflightRelationships?: Record<string, unknown> | null;
31
31
  }
32
32
  /**
33
- A JSON:API Cache implementation.
33
+ * ### JSONAPICache
34
+ *
35
+ * ```ts
36
+ * import { JSONAPICache } from '@warp-drive-mirror/json-api';
37
+ * ```
38
+ *
39
+ A {@link Cache} implementation tuned for [{json:api}](https://jsonapi.org/)
34
40
 
35
- What cache the store uses is configurable. Using a different
36
- implementation can be achieved by implementing the store's
37
- createCache hook.
41
+ This format excels at simiplifying common complex problems around cache
42
+ consistency and information density. Because most API responses can be quickly
43
+ transformed into {json:api} format without losing any information, WarpDrive
44
+ recommends that most apps use this Cache implementation.
38
45
 
39
- This is the cache implementation used by `ember-data`.
46
+ If a cache built to understand another format would do better for your app then
47
+ it just needs to follow the same interface.
40
48
 
41
- ```js
42
- import Cache from '@ember-data-mirror/json-api';
43
- import Store from '@ember-data-mirror/store';
49
+ Do you really need a cache? Are sunsets beautiful? Caching is what powers features like
50
+ immutability, mutation management, and allows ***Warp*Drive** to understand your relational
51
+ data.
44
52
 
45
- export default class extends Store {
46
- createCache(wrapper) {
47
- return new Cache(wrapper);
53
+ Some caches are simple request/response maps. ***Warp*Drive**'s is not. The Cache deeply
54
+ understands the structure of your data, ensuring your data remains consistent both within
55
+ and across requests.
56
+
57
+ ### Installation
58
+
59
+ ::: code-group
60
+
61
+ ```sh [pnpm]
62
+ pnpm add -E @warp-drive-mirror/core@latest @warp-drive-mirror/json-api@latest
63
+ ```
64
+
65
+ ```sh [npm]
66
+ npm add -E @warp-drive-mirror/core@latest @warp-drive-mirror/json-api@latest
67
+ ```
68
+
69
+ ```sh [yarn]
70
+ yarn add -E @warp-drive-mirror/core@latest @warp-drive-mirror/json-api@latest
71
+ ```
72
+
73
+ ```sh [bun]
74
+ bun add --exact @warp-drive-mirror/core@latest @warp-drive-mirror/json-api@latest
75
+ ```
76
+
77
+ :::
78
+
79
+ ### Setup
80
+
81
+ ```ts [services/store.ts]
82
+ import { Fetch, RequestManager, Store } from '@warp-drive-mirror/core';
83
+ import {
84
+ registerDerivations,
85
+ SchemaService,
86
+ } from '@warp-drive-mirror/core/reactive';
87
+ import { CacheHandler } from '@warp-drive-mirror/core/store';
88
+ import type { CacheCapabilitiesManager } from '@warp-drive-mirror/core/types'; // [!code focus:2]
89
+ import { JSONAPICache } from '@warp-drive-mirror/json-api';
90
+
91
+ export default class AppStore extends Store {
92
+
93
+ requestManager = new RequestManager()
94
+ .use([Fetch])
95
+ .useCache(CacheHandler);
96
+
97
+ createSchemaService() {
98
+ const schema = new SchemaService();
99
+ registerDerivations(schema);
100
+ return schema;
101
+ }
102
+
103
+ createCache(capabilities: CacheCapabilitiesManager) { // [!code focus:3]
104
+ return new JSONAPICache(capabilities);
48
105
  }
49
106
  }
50
107
  ```
51
108
 
52
- @class Cache
109
+ * @categoryDescription Cache Management
110
+ * APIs for primary cache management functionality
111
+ * @categoryDescription Cache Forking
112
+ * APIs that support Cache Forking
113
+ * @categoryDescription SSR Support
114
+ * APIs that support SSR functionality
115
+ * @categoryDescription Resource Lifecycle
116
+ * APIs that support management of resource data
117
+ * @categoryDescription Resource Data
118
+ * APIs that support granular field level management of resource data
119
+ * @categoryDescription Resource State
120
+ * APIs that support managing Resource states
121
+
53
122
  @public
54
123
  */
55
124
  export declare class JSONAPICache implements Cache {
56
125
  /**
57
126
  * The Cache Version that this implementation implements.
58
127
  *
59
- * @type {'2'}
60
128
  * @public
61
- * @property version
62
129
  */
63
130
  version: '2';
64
131
  /** @internal */
@@ -106,8 +173,7 @@ export declare class JSONAPICache implements Cache {
106
173
  * associated resource membership order and contents preserved but linked
107
174
  * into the cache.
108
175
  *
109
- * @param {StructuredDocument} doc
110
- * @return {ResourceDocument}
176
+ * @category Cache Management
111
177
  * @public
112
178
  */
113
179
  put<T extends SingleResourceDocument>(doc: StructuredDataDocument<T>): SingleResourceDataDocument;
@@ -123,16 +189,15 @@ export declare class JSONAPICache implements Cache {
123
189
  * Update the "remote" or "canonical" (persisted) state of the Cache
124
190
  * by merging new information into the existing state.
125
191
  *
192
+ * @category Cache Management
126
193
  * @public
127
- * @param {Operation|Operation[]} op the operation or list of operations to perform
128
- * @return {void}
194
+ * @param op the operation or list of operations to perform
129
195
  */
130
196
  patch(op: Operation | Operation[]): void;
131
197
  /**
132
198
  * Update the "local" or "current" (unpersisted) state of the Cache
133
199
  *
134
- * @param {Mutation} mutation
135
- * @return {void}
200
+ * @category Cache Management
136
201
  * @public
137
202
  */
138
203
  mutate(mutation: LocalRelationshipOperation): void;
@@ -163,12 +228,17 @@ export declare class JSONAPICache implements Cache {
163
228
  * of the Graph handling necessary entanglements and
164
229
  * notifications for relational data.
165
230
  *
231
+ * @category Cache Management
166
232
  * @public
167
- * @param {StableRecordIdentifier | StableDocumentIdentifier} identifier
168
- * @return {ResourceDocument | ResourceObject | null} the known resource data
169
233
  */
170
234
  peek(identifier: StableRecordIdentifier): ResourceObject | null;
171
235
  peek(identifier: StableDocumentIdentifier): ResourceDocument | null;
236
+ /**
237
+ * Peek the remote resource data from the Cache.
238
+ *
239
+ * @category Cache Management
240
+ * @public
241
+ */
172
242
  peekRemoteState(identifier: StableRecordIdentifier): ResourceObject | null;
173
243
  peekRemoteState(identifier: StableDocumentIdentifier): ResourceDocument | null;
174
244
  /**
@@ -179,19 +249,16 @@ export declare class JSONAPICache implements Cache {
179
249
  * that it will return the the request, response, and content
180
250
  * whereas `peek` will return just the `content`.
181
251
  *
182
- * @param {StableDocumentIdentifier}
183
- * @return {StructuredDocument<ResourceDocument> | null}
252
+ * @category Cache Management
184
253
  * @public
185
254
  */
186
255
  peekRequest(identifier: StableDocumentIdentifier): StructuredDocument<ResourceDocument> | null;
187
256
  /**
188
257
  * Push resource data from a remote source into the cache for this identifier
189
258
  *
259
+ * @category Cache Management
190
260
  * @public
191
- * @param identifier
192
- * @param data
193
- * @param hasRecord
194
- * @return {void | string[]} if `hasRecord` is true then calculated key changes should be returned
261
+ * @return if `calculateChanges` is true then calculated key changes should be returned
195
262
  */
196
263
  upsert(identifier: StableRecordIdentifier, data: ExistingResourceObject, calculateChanges?: boolean): void | string[];
197
264
  /**
@@ -201,8 +268,8 @@ export declare class JSONAPICache implements Cache {
201
268
  * preferring instead to fork at the Store level, which will
202
269
  * utilize this method to fork the cache.
203
270
  *
271
+ * @category Cache Forking
204
272
  * @internal
205
- * @return {Promise<Cache>}
206
273
  */
207
274
  fork(): Promise<Cache>;
208
275
  /**
@@ -212,11 +279,10 @@ export declare class JSONAPICache implements Cache {
212
279
  * preferring instead to merge at the Store level, which will
213
280
  * utilize this method to merge the caches.
214
281
  *
215
- * @param {Cache} cache
216
- * @public
217
- * @return {Promise<void>}
282
+ * @category Cache Forking
283
+ * @internal
218
284
  */
219
- merge(cache: Cache): Promise<void>;
285
+ merge(_cache: Cache): Promise<void>;
220
286
  /**
221
287
  * Generate the list of changes applied to all
222
288
  * record in the store.
@@ -247,7 +313,8 @@ export declare class JSONAPICache implements Cache {
247
313
  * }
248
314
  * ```
249
315
  *
250
- * @public
316
+ * @category Cache Forking
317
+ * @internal
251
318
  */
252
319
  diff(): Promise<Change[]>;
253
320
  /**
@@ -255,8 +322,8 @@ export declare class JSONAPICache implements Cache {
255
322
  * which may be fed back into a new instance of the same Cache
256
323
  * via `cache.hydrate`.
257
324
  *
258
- * @return {Promise<ReadableStream>}
259
- * @public
325
+ * @category SSR Support
326
+ * @internal
260
327
  */
261
328
  dump(): Promise<ReadableStream<unknown>>;
262
329
  /**
@@ -271,9 +338,8 @@ export declare class JSONAPICache implements Cache {
271
338
  * behavior supports optimizing pre/fetching of data for route transitions
272
339
  * via data-only SSR modes.
273
340
  *
274
- * @param {ReadableStream} stream
275
- * @return {Promise<void>}
276
- * @public
341
+ * @category SSR Support
342
+ * @internal
277
343
  */
278
344
  hydrate(stream: ReadableStream<unknown>): Promise<void>;
279
345
  /**
@@ -282,35 +348,32 @@ export declare class JSONAPICache implements Cache {
282
348
  * It returns properties from options that should be set on the record during the create
283
349
  * process. This return value behavior is deprecated.
284
350
  *
351
+ * @category Resource Lifecycle
285
352
  * @public
286
- * @param identifier
287
- * @param createArgs
288
353
  */
289
354
  clientDidCreate(identifier: StableRecordIdentifier, options?: Record<string, Value>): Record<string, unknown>;
290
355
  /**
291
356
  * [LIFECYCLE] Signals to the cache that a resource
292
357
  * will be part of a save transaction.
293
358
  *
359
+ * @category Resource Lifecycle
294
360
  * @public
295
- * @param identifier
296
361
  */
297
362
  willCommit(identifier: StableRecordIdentifier): void;
298
363
  /**
299
364
  * [LIFECYCLE] Signals to the cache that a resource
300
365
  * was successfully updated as part of a save transaction.
301
366
  *
367
+ * @category Resource Lifecycle
302
368
  * @public
303
- * @param identifier
304
- * @param data
305
369
  */
306
370
  didCommit(committedIdentifier: StableRecordIdentifier, result: StructuredDataDocument<SingleResourceDocument>): SingleResourceDataDocument;
307
371
  /**
308
372
  * [LIFECYCLE] Signals to the cache that a resource
309
373
  * was update via a save transaction failed.
310
374
  *
375
+ * @category Resource Lifecycle
311
376
  * @public
312
- * @param identifier
313
- * @param errors
314
377
  */
315
378
  commitWasRejected(identifier: StableRecordIdentifier, errors?: ApiError[]): void;
316
379
  /**
@@ -319,45 +382,47 @@ export declare class JSONAPICache implements Cache {
319
382
  *
320
383
  * This method is a candidate to become a mutation
321
384
  *
385
+ * @category Resource Lifecycle
322
386
  * @public
323
- * @param identifier
324
387
  */
325
388
  unloadRecord(identifier: StableRecordIdentifier): void;
326
389
  /**
327
390
  * Retrieve the data for an attribute from the cache
391
+ * with local mutations applied.
328
392
  *
393
+ * @category Resource Data
329
394
  * @public
330
- * @param identifier
331
- * @param field
332
- * @return {unknown}
333
395
  */
334
396
  getAttr(identifier: StableRecordIdentifier, attr: string | string[]): Value | undefined;
397
+ /**
398
+ * Retrieve the remote data for an attribute from the cache
399
+ *
400
+ * @category Resource Data
401
+ * @public
402
+ */
335
403
  getRemoteAttr(identifier: StableRecordIdentifier, attr: string | string[]): Value | undefined;
336
404
  /**
337
405
  * Mutate the data for an attribute in the cache
338
406
  *
339
407
  * This method is a candidate to become a mutation
340
408
  *
409
+ * @category Resource Data
341
410
  * @public
342
- * @param identifier
343
- * @param field
344
- * @param value
345
411
  */
346
412
  setAttr(identifier: StableRecordIdentifier, attr: string | string[], value: Value): void;
347
413
  /**
348
414
  * Query the cache for the changed attributes of a resource.
349
415
  *
416
+ * @category Resource Data
350
417
  * @public
351
- * @param identifier
352
- * @return {ChangedAttributesHash} `{ <field>: [<old>, <new>] }`
418
+ * @return `{ '<field>': ['<old>', '<new>'] }`
353
419
  */
354
420
  changedAttrs(identifier: StableRecordIdentifier): ChangedAttributesHash;
355
421
  /**
356
422
  * Query the cache for whether any mutated attributes exist
357
423
  *
424
+ * @category Resource Data
358
425
  * @public
359
- * @param identifier
360
- * @return {Boolean}
361
426
  */
362
427
  hasChangedAttrs(identifier: StableRecordIdentifier): boolean;
363
428
  /**
@@ -365,44 +430,42 @@ export declare class JSONAPICache implements Cache {
365
430
  *
366
431
  * This method is a candidate to become a mutation
367
432
  *
433
+ * @category Resource Data
368
434
  * @public
369
- * @param identifier
370
- * @return {String[]} the names of fields that were restored
435
+ * @return the names of fields that were restored
371
436
  */
372
437
  rollbackAttrs(identifier: StableRecordIdentifier): string[];
373
438
  /**
374
- * Query the cache for the changes to relationships of a resource.
375
- *
376
- * Returns a map of relationship names to RelationshipDiff objects.
377
- *
378
- * ```ts
379
- * type RelationshipDiff =
380
- | {
439
+ * Query the cache for the changes to relationships of a resource.
440
+ *
441
+ * Returns a map of relationship names to RelationshipDiff objects.
442
+ *
443
+ * ```ts
444
+ * type RelationshipDiff =
445
+ | {
381
446
  kind: 'collection';
382
447
  remoteState: StableRecordIdentifier[];
383
448
  additions: Set<StableRecordIdentifier>;
384
449
  removals: Set<StableRecordIdentifier>;
385
450
  localState: StableRecordIdentifier[];
386
451
  reordered: boolean;
387
- }
388
- | {
452
+ }
453
+ | {
389
454
  kind: 'resource';
390
455
  remoteState: StableRecordIdentifier | null;
391
456
  localState: StableRecordIdentifier | null;
392
457
  };
393
458
  ```
394
- *
395
- * @public
396
- * @param {StableRecordIdentifier} identifier
397
- * @return {Map<string, RelationshipDiff>}
398
- */
459
+ *
460
+ * @category Resource Data
461
+ * @public
462
+ */
399
463
  changedRelationships(identifier: StableRecordIdentifier): Map<string, RelationshipDiff>;
400
464
  /**
401
465
  * Query the cache for whether any mutated relationships exist
402
466
  *
467
+ * @category Resource Data
403
468
  * @public
404
- * @param {StableRecordIdentifier} identifier
405
- * @return {Boolean}
406
469
  */
407
470
  hasChangedRelationships(identifier: StableRecordIdentifier): boolean;
408
471
  /**
@@ -412,20 +475,26 @@ export declare class JSONAPICache implements Cache {
412
475
  *
413
476
  * This method is a candidate to become a mutation
414
477
  *
478
+ * @category Resource Data
415
479
  * @public
416
- * @param {StableRecordIdentifier} identifier
417
- * @return {String[]} the names of relationships that were restored
480
+ * @return the names of relationships that were restored
418
481
  */
419
482
  rollbackRelationships(identifier: StableRecordIdentifier): string[];
420
483
  /**
421
484
  * Query the cache for the current state of a relationship property
422
485
  *
486
+ * @category Resource Data
423
487
  * @public
424
- * @param identifier
425
- * @param field
426
488
  * @return resource relationship object
427
489
  */
428
490
  getRelationship(identifier: StableRecordIdentifier, field: string): ResourceRelationship | CollectionRelationship;
491
+ /**
492
+ * Query the cache for the remote state of a relationship property
493
+ *
494
+ * @category Resource Data
495
+ * @public
496
+ * @return resource relationship object
497
+ */
429
498
  getRemoteRelationship(identifier: StableRecordIdentifier, field: string): ResourceRelationship | CollectionRelationship;
430
499
  /**
431
500
  * Update the cache state for the given resource to be marked
@@ -433,80 +502,66 @@ export declare class JSONAPICache implements Cache {
433
502
  *
434
503
  * This method is a candidate to become a mutation
435
504
  *
505
+ * @category Resource State
436
506
  * @public
437
- * @param identifier
438
- * @param {Boolean} isDeleted
439
507
  */
440
508
  setIsDeleted(identifier: StableRecordIdentifier, isDeleted: boolean): void;
441
509
  /**
442
510
  * Query the cache for any validation errors applicable to the given resource.
443
511
  *
512
+ * @category Resource State
444
513
  * @public
445
- * @param identifier
446
- * @return {JsonApiError[]}
447
514
  */
448
515
  getErrors(identifier: StableRecordIdentifier): ApiError[];
449
516
  /**
450
517
  * Query the cache for whether a given resource has any available data
451
518
  *
519
+ * @category Resource State
452
520
  * @public
453
- * @param identifier
454
- * @return {Boolean}
455
521
  */
456
522
  isEmpty(identifier: StableRecordIdentifier): boolean;
457
523
  /**
458
524
  * Query the cache for whether a given resource was created locally and not
459
525
  * yet persisted.
460
526
  *
527
+ * @category Resource State
461
528
  * @public
462
- * @param identifier
463
- * @return {Boolean}
464
529
  */
465
530
  isNew(identifier: StableRecordIdentifier): boolean;
466
531
  /**
467
532
  * Query the cache for whether a given resource is marked as deleted (but not
468
533
  * necessarily persisted yet).
469
534
  *
535
+ * @category Resource State
470
536
  * @public
471
- * @param identifier
472
- * @return {Boolean}
473
537
  */
474
538
  isDeleted(identifier: StableRecordIdentifier): boolean;
475
539
  /**
476
540
  * Query the cache for whether a given resource has been deleted and that deletion
477
541
  * has also been persisted.
478
542
  *
543
+ * @category Resource State
479
544
  * @public
480
- * @param identifier
481
- * @return {Boolean}
482
545
  */
483
546
  isDeletionCommitted(identifier: StableRecordIdentifier): boolean;
484
547
  /**
485
548
  * Private method used to populate an entry for the identifier
486
549
  *
487
550
  * @internal
488
- * @param {StableRecordIdentifier} identifier
489
- * @return {CachedResource}
490
551
  */
491
552
  _createCache(identifier: StableRecordIdentifier): CachedResource;
492
553
  /**
493
554
  * Peek whether we have cached resource data matching the identifier
494
555
  * without asserting if the resource data is missing.
495
556
  *
496
- * @param {StableRecordIdentifier} identifier
497
- * @param {Boolean} allowDestroyed
498
557
  * @internal
499
- * @return {CachedResource | undefined}
500
558
  */
501
559
  __safePeek(identifier: StableRecordIdentifier, allowDestroyed: boolean): CachedResource | undefined;
502
560
  /**
503
561
  * Peek whether we have cached resource data matching the identifier
504
562
  * Asserts if the resource data is missing.
505
563
  *
506
- * @param {StableRecordIdentifier} identifier
507
- * @param {Boolean} allowDestroyed
508
564
  * @internal
509
- * @return {CachedResource}
510
565
  */
511
566
  __peek(identifier: StableRecordIdentifier, allowDestroyed: boolean): CachedResource;
512
567
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/-private/cache.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAkB,KAAK,EAAyC,MAAM,iCAAiC,CAAC;AAGpH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,KAAK,EAAE,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACnG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,KAAK,EAKV,SAAS,EAQV,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAC9G,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,KAAK,EACV,wBAAwB,EACxB,8BAA8B,EAC9B,sBAAsB,EACvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAe,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAEV,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,gCAAgC,CAAC;AAQxC,OAAO,KAAK,EACV,8BAA8B,EAE9B,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,0BAA0B,EAC3B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,KAAK,EACV,0BAA0B,EAC1B,sBAAsB,EACt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