@warp-drive-types/core-types 5.6.0-alpha.3 → 5.6.0-alpha.4
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/package.json +1 -1
- package/unstable-preview-types/cache.d.ts +4 -41
- package/unstable-preview-types/cache.d.ts.map +1 -1
- package/unstable-preview-types/identifier.d.ts +0 -3
- package/unstable-preview-types/identifier.d.ts.map +1 -1
- package/unstable-preview-types/index.d.ts +15 -16
- package/unstable-preview-types/index.d.ts.map +1 -1
- package/unstable-preview-types/record.d.ts +0 -7
- package/unstable-preview-types/record.d.ts.map +1 -1
- package/unstable-preview-types/request.d.ts +0 -32
- package/unstable-preview-types/request.d.ts.map +1 -1
- package/unstable-preview-types/runtime.d.ts +0 -1
- package/unstable-preview-types/runtime.d.ts.map +1 -1
- package/unstable-preview-types/schema/fields.d.ts +55 -112
- package/unstable-preview-types/schema/fields.d.ts.map +1 -1
- package/unstable-preview-types/spec/json-api-raw.d.ts.map +1 -1
- package/unstable-preview-types/symbols.d.ts +0 -4
- package/unstable-preview-types/symbols.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
declare module '@warp-drive/core-types/cache' {
|
|
2
|
-
/**
|
|
3
|
-
* @module @ember-data/experimental-preview-types
|
|
4
|
-
*/
|
|
5
2
|
import type { ResourceBlob } from '@warp-drive/core-types/cache/aliases';
|
|
6
3
|
import type { Change } from '@warp-drive/core-types/cache/change';
|
|
7
4
|
import type { Mutation } from '@warp-drive/core-types/cache/mutations';
|
|
@@ -38,7 +35,7 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
38
35
|
* A Cache handles in-memory storage of Document and Resource
|
|
39
36
|
* data.
|
|
40
37
|
*
|
|
41
|
-
* @class
|
|
38
|
+
* @class (Interface) Cache
|
|
42
39
|
* @public
|
|
43
40
|
*/
|
|
44
41
|
export interface Cache {
|
|
@@ -67,7 +64,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
67
64
|
* a `content` member and therefor must not assume the existence
|
|
68
65
|
* of `request` and `response` on the document.
|
|
69
66
|
*
|
|
70
|
-
* @method put
|
|
71
67
|
* @param {StructuredDocument} doc
|
|
72
68
|
* @return {ResourceDocument}
|
|
73
69
|
* @public
|
|
@@ -79,7 +75,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
79
75
|
* Update the "remote" or "canonical" (persisted) state of the Cache
|
|
80
76
|
* by merging new information into the existing state.
|
|
81
77
|
*
|
|
82
|
-
* @method patch
|
|
83
78
|
* @public
|
|
84
79
|
* @param {Operation | Operation[]} op the operation(s) to perform
|
|
85
80
|
* @return {void}
|
|
@@ -88,7 +83,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
88
83
|
/**
|
|
89
84
|
* Update the "local" or "current" (unpersisted) state of the Cache
|
|
90
85
|
*
|
|
91
|
-
* @method mutate
|
|
92
86
|
* @param {Mutation} mutation
|
|
93
87
|
* @return {void}
|
|
94
88
|
* @public
|
|
@@ -121,7 +115,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
121
115
|
* of the Graph handling necessary entanglements and
|
|
122
116
|
* notifications for relational data.
|
|
123
117
|
*
|
|
124
|
-
* @method peek
|
|
125
118
|
* @public
|
|
126
119
|
* @param {StableRecordIdentifier | StableDocumentIdentifier} identifier
|
|
127
120
|
* @return {ResourceDocument | ResourceBlob | null} the known resource data
|
|
@@ -157,7 +150,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
157
150
|
* of the Graph handling necessary entanglements and
|
|
158
151
|
* notifications for relational data.
|
|
159
152
|
*
|
|
160
|
-
* @method peek
|
|
161
153
|
* @public
|
|
162
154
|
* @param {StableRecordIdentifier | StableDocumentIdentifier} identifier
|
|
163
155
|
* @return {ResourceDocument | ResourceBlob | null} the known resource data
|
|
@@ -172,7 +164,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
172
164
|
* that it will return the the request, response, and content
|
|
173
165
|
* whereas `peek` will return just the `content`.
|
|
174
166
|
*
|
|
175
|
-
* @method peekRequest
|
|
176
167
|
* @param {StableDocumentIdentifier}
|
|
177
168
|
* @return {StructuredDocument<ResourceDocument> | null}
|
|
178
169
|
* @public
|
|
@@ -181,7 +172,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
181
172
|
/**
|
|
182
173
|
* Push resource data from a remote source into the cache for this identifier
|
|
183
174
|
*
|
|
184
|
-
* @method upsert
|
|
185
175
|
* @public
|
|
186
176
|
* @param identifier
|
|
187
177
|
* @param data
|
|
@@ -196,9 +186,8 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
196
186
|
* preferring instead to fork at the Store level, which will
|
|
197
187
|
* utilize this method to fork the cache.
|
|
198
188
|
*
|
|
199
|
-
* @method fork
|
|
200
189
|
* @public
|
|
201
|
-
* @return Promise<Cache>
|
|
190
|
+
* @return {Promise<Cache>}
|
|
202
191
|
*/
|
|
203
192
|
fork(): Promise<Cache>;
|
|
204
193
|
/**
|
|
@@ -208,10 +197,9 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
208
197
|
* preferring instead to merge at the Store level, which will
|
|
209
198
|
* utilize this method to merge the caches.
|
|
210
199
|
*
|
|
211
|
-
* @method merge
|
|
212
200
|
* @param {Cache} cache
|
|
213
201
|
* @public
|
|
214
|
-
* @return Promise<void>
|
|
202
|
+
* @return {Promise<void>}
|
|
215
203
|
*/
|
|
216
204
|
merge(cache: Cache): Promise<void>;
|
|
217
205
|
/**
|
|
@@ -244,7 +232,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
244
232
|
* }
|
|
245
233
|
* ```
|
|
246
234
|
*
|
|
247
|
-
* @method diff
|
|
248
235
|
* @public
|
|
249
236
|
*/
|
|
250
237
|
diff(): Promise<Change[]>;
|
|
@@ -253,7 +240,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
253
240
|
* which may be fed back into a new instance of the same Cache
|
|
254
241
|
* via `cache.hydrate`.
|
|
255
242
|
*
|
|
256
|
-
* @method dump
|
|
257
243
|
* @return {Promise<ReadableStream>}
|
|
258
244
|
* @public
|
|
259
245
|
*/
|
|
@@ -270,7 +256,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
270
256
|
* behavior supports optimizing pre/fetching of data for route transitions
|
|
271
257
|
* via data-only SSR modes.
|
|
272
258
|
*
|
|
273
|
-
* @method hydrate
|
|
274
259
|
* @param {ReadableStream} stream
|
|
275
260
|
* @return {Promise<void>}
|
|
276
261
|
* @public
|
|
@@ -282,7 +267,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
282
267
|
* It returns properties from options that should be set on the record during the create
|
|
283
268
|
* process. This return value behavior is deprecated.
|
|
284
269
|
*
|
|
285
|
-
* @method clientDidCreate
|
|
286
270
|
* @public
|
|
287
271
|
* @param identifier
|
|
288
272
|
* @param createArgs
|
|
@@ -292,7 +276,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
292
276
|
* [LIFECYCLE] Signals to the cache that a resource
|
|
293
277
|
* will be part of a save transaction.
|
|
294
278
|
*
|
|
295
|
-
* @method willCommit
|
|
296
279
|
* @public
|
|
297
280
|
* @param identifier
|
|
298
281
|
*/
|
|
@@ -301,7 +284,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
301
284
|
* [LIFECYCLE] Signals to the cache that a resource
|
|
302
285
|
* was successfully updated as part of a save transaction.
|
|
303
286
|
*
|
|
304
|
-
* @method didCommit
|
|
305
287
|
* @public
|
|
306
288
|
* @param identifier - the primary identifier that was operated on
|
|
307
289
|
* @param data - a document in the cache format containing any updated data
|
|
@@ -312,7 +294,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
312
294
|
* [LIFECYCLE] Signals to the cache that a resource
|
|
313
295
|
* was update via a save transaction failed.
|
|
314
296
|
*
|
|
315
|
-
* @method commitWasRejected
|
|
316
297
|
* @public
|
|
317
298
|
* @param identifier
|
|
318
299
|
* @param errors
|
|
@@ -324,7 +305,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
324
305
|
*
|
|
325
306
|
* This method is a candidate to become a mutation
|
|
326
307
|
*
|
|
327
|
-
* @method unloadRecord
|
|
328
308
|
* @public
|
|
329
309
|
* @param identifier
|
|
330
310
|
*/
|
|
@@ -332,7 +312,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
332
312
|
/**
|
|
333
313
|
* Retrieve the data for an attribute from the cache
|
|
334
314
|
*
|
|
335
|
-
* @method getAttr
|
|
336
315
|
* @public
|
|
337
316
|
* @param identifier
|
|
338
317
|
* @param field
|
|
@@ -342,7 +321,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
342
321
|
/**
|
|
343
322
|
* Retrieve remote state without any local changes for a specific attribute
|
|
344
323
|
*
|
|
345
|
-
* @method getRemoteAttr
|
|
346
324
|
* @public
|
|
347
325
|
* @param identifier
|
|
348
326
|
* @param field
|
|
@@ -354,7 +332,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
354
332
|
*
|
|
355
333
|
* This method is a candidate to become a mutation
|
|
356
334
|
*
|
|
357
|
-
* @method setAttr
|
|
358
335
|
* @public
|
|
359
336
|
* @param identifier
|
|
360
337
|
* @param field
|
|
@@ -370,16 +347,14 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
370
347
|
* { <field>: [<old>, <new>] }
|
|
371
348
|
* ```
|
|
372
349
|
*
|
|
373
|
-
* @method changedAttrs
|
|
374
350
|
* @public
|
|
375
351
|
* @param identifier
|
|
376
|
-
* @return {Record<string, [unknown, unknown]>} { <field>: [<old>, <new>] }
|
|
352
|
+
* @return {Record<string, [unknown, unknown]>} `{ <field>: [<old>, <new>] }`
|
|
377
353
|
*/
|
|
378
354
|
changedAttrs(identifier: StableRecordIdentifier): ChangedAttributesHash;
|
|
379
355
|
/**
|
|
380
356
|
* Query the cache for whether any mutated attributes exist
|
|
381
357
|
*
|
|
382
|
-
* @method hasChangedAttrs
|
|
383
358
|
* @public
|
|
384
359
|
* @param identifier
|
|
385
360
|
* @return {Boolean}
|
|
@@ -390,7 +365,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
390
365
|
*
|
|
391
366
|
* This method is a candidate to become a mutation
|
|
392
367
|
*
|
|
393
|
-
* @method rollbackAttrs
|
|
394
368
|
* @public
|
|
395
369
|
* @param identifier
|
|
396
370
|
* @return {String[]} the names of fields that were restored
|
|
@@ -418,7 +392,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
418
392
|
};
|
|
419
393
|
```
|
|
420
394
|
*
|
|
421
|
-
* @method changedRelationships
|
|
422
395
|
* @public
|
|
423
396
|
* @param {StableRecordIdentifier} identifier
|
|
424
397
|
* @return {Map<string, RelationshipDiff>}
|
|
@@ -427,7 +400,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
427
400
|
/**
|
|
428
401
|
* Query the cache for whether any mutated attributes exist
|
|
429
402
|
*
|
|
430
|
-
* @method hasChangedRelationships
|
|
431
403
|
* @public
|
|
432
404
|
* @param {StableRecordIdentifier} identifier
|
|
433
405
|
* @return {Boolean}
|
|
@@ -440,7 +412,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
440
412
|
*
|
|
441
413
|
* This method is a candidate to become a mutation
|
|
442
414
|
*
|
|
443
|
-
* @method rollbackRelationships
|
|
444
415
|
* @public
|
|
445
416
|
* @param {StableRecordIdentifier} identifier
|
|
446
417
|
* @return {String[]} the names of relationships that were restored
|
|
@@ -449,7 +420,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
449
420
|
/**
|
|
450
421
|
* Query the cache for the current state of a relationship property
|
|
451
422
|
*
|
|
452
|
-
* @method getRelationship
|
|
453
423
|
* @public
|
|
454
424
|
* @param {StableRecordIdentifier} identifier
|
|
455
425
|
* @param {String} field
|
|
@@ -459,7 +429,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
459
429
|
/**
|
|
460
430
|
* Query the cache for the server state of a relationship property without any local changes
|
|
461
431
|
*
|
|
462
|
-
* @method getRelationship
|
|
463
432
|
* @public
|
|
464
433
|
* @param {StableRecordIdentifier} identifier
|
|
465
434
|
* @param {String} field
|
|
@@ -472,7 +441,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
472
441
|
*
|
|
473
442
|
* This method is a candidate to become a mutation
|
|
474
443
|
*
|
|
475
|
-
* @method setIsDeleted
|
|
476
444
|
* @public
|
|
477
445
|
* @param identifier
|
|
478
446
|
* @param {Boolean} isDeleted
|
|
@@ -481,7 +449,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
481
449
|
/**
|
|
482
450
|
* Query the cache for any validation errors applicable to the given resource.
|
|
483
451
|
*
|
|
484
|
-
* @method getErrors
|
|
485
452
|
* @public
|
|
486
453
|
* @param identifier
|
|
487
454
|
* @return {JsonApiError[]}
|
|
@@ -490,7 +457,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
490
457
|
/**
|
|
491
458
|
* Query the cache for whether a given resource has any available data
|
|
492
459
|
*
|
|
493
|
-
* @method isEmpty
|
|
494
460
|
* @public
|
|
495
461
|
* @param identifier
|
|
496
462
|
* @return {Boolean}
|
|
@@ -500,7 +466,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
500
466
|
* Query the cache for whether a given resource was created locally and not
|
|
501
467
|
* yet persisted.
|
|
502
468
|
*
|
|
503
|
-
* @method isNew
|
|
504
469
|
* @public
|
|
505
470
|
* @param identifier
|
|
506
471
|
* @return {Boolean}
|
|
@@ -510,7 +475,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
510
475
|
* Query the cache for whether a given resource is marked as deleted (but not
|
|
511
476
|
* necessarily persisted yet).
|
|
512
477
|
*
|
|
513
|
-
* @method isDeleted
|
|
514
478
|
* @public
|
|
515
479
|
* @param identifier
|
|
516
480
|
* @return {Boolean}
|
|
@@ -520,7 +484,6 @@ declare module '@warp-drive/core-types/cache' {
|
|
|
520
484
|
* Query the cache for whether a given resource has been deleted and that deletion
|
|
521
485
|
* has also been persisted.
|
|
522
486
|
*
|
|
523
|
-
* @method isDeletionCommitted
|
|
524
487
|
* @public
|
|
525
488
|
* @param identifier
|
|
526
489
|
* @return {Boolean}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACzF,OAAO,KAAK,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACrF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC5F,OAAO,KAAK,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AACpF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,GAAG,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;AAE/E,MAAM,MAAM,gBAAgB,GACxB;IACE,IAAI,EAAE,YAAY,CAAC;IACnB,WAAW,EAAE,sBAAsB,EAAE,CAAC;IACtC,SAAS,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC;IACvC,QAAQ,EAAE,GAAG,CAA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sB,CAAC;IAKjD;;;;;;;;;OASG;IACH,YAAY,CAAC,UAAU,EAAE,sBAAsB,EAAE,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;IAE3E;;;;;;OAMG;IACH,SAAS,CAAC,UAAU,EAAE,sBAAsB,GAAG,QAAQ,EAAE,CAAC;IAE1D;;;;;;OAMG;IACH,OAAO,CAAC,UAAU,EAAE,sBAAsB,GAAG,OAAO,CAAC;IAErD;;;;;;;OAOG;IACH,KAAK,CAAC,UAAU,EAAE,sBAAsB,GAAG,OAAO,CAAC;IAEnD;;;;;;;OAOG;IACH,SAAS,CAAC,UAAU,EAAE,sBAAsB,GAAG,OAAO,CAAC;IAEvD;;;;;;;OAOG;IACH,mBAAmB,CAAC,UAAU,EAAE,sBAAsB,GAAG,OAAO,CAAC;CAClE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identifier.d.ts","sourceRoot":"","sources":["../src/identifier.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"identifier.d.ts","sourceRoot":"","sources":["../src/identifier.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,uBAAuB,EAAE,OAAO,MAA8C,CAAC;AAC5F,eAAO,MAAM,uBAAuB,EAAE,OAAO,MAAoC,CAAC;AAClF,eAAO,MAAM,uBAAuB,EAAE,OAAO,MAAsC,CAAC;AAOpF,eAAO,MAAM,WAAW,EAAE,OAA4C,CAAC;AAEvE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,UAAU,CAAC;AAErD,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,wBAAwB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,UAAU;IACrF,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC;CACT;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,MAAM,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;;;;;;;GAOG;AACH,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IACxD,8BAA8B,CAAC,CAAC,CAAC,GACjC,yBAAyB,CAAC,CAAC,CAAC,CAAC;AAEjC,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,sBAAsB,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1,34 +1,33 @@
|
|
|
1
|
-
/// <reference path="./runtime.d.ts" />
|
|
2
1
|
/// <reference path="./identifier.d.ts" />
|
|
3
|
-
/// <reference path="./utils.d.ts" />
|
|
4
|
-
/// <reference path="./request.d.ts" />
|
|
5
2
|
/// <reference path="./record.type-test.d.ts" />
|
|
6
|
-
/// <reference path="./cache.d.ts" />
|
|
7
3
|
/// <reference path="./symbols.d.ts" />
|
|
8
|
-
/// <reference path="./record.d.ts" />
|
|
9
|
-
/// <reference path="./request.type-test.d.ts" />
|
|
10
4
|
/// <reference path="./params.d.ts" />
|
|
11
|
-
/// <reference path="./-private.d.ts" />
|
|
12
5
|
/// <reference path="./graph.d.ts" />
|
|
13
|
-
/// <reference path="./
|
|
6
|
+
/// <reference path="./record.d.ts" />
|
|
7
|
+
/// <reference path="./-private.d.ts" />
|
|
8
|
+
/// <reference path="./utils.d.ts" />
|
|
9
|
+
/// <reference path="./cache.d.ts" />
|
|
10
|
+
/// <reference path="./request.type-test.d.ts" />
|
|
11
|
+
/// <reference path="./runtime.d.ts" />
|
|
12
|
+
/// <reference path="./request.d.ts" />
|
|
13
|
+
/// <reference path="./schema/fields.d.ts" />
|
|
14
|
+
/// <reference path="./schema/concepts.d.ts" />
|
|
15
|
+
/// <reference path="./schema/fields.type-test.d.ts" />
|
|
14
16
|
/// <reference path="./cache/change.d.ts" />
|
|
15
|
-
/// <reference path="./cache/mutations.d.ts" />
|
|
16
|
-
/// <reference path="./cache/relationship.d.ts" />
|
|
17
17
|
/// <reference path="./cache/operations.d.ts" />
|
|
18
18
|
/// <reference path="./cache/aliases.d.ts" />
|
|
19
|
-
/// <reference path="./
|
|
19
|
+
/// <reference path="./cache/mutations.d.ts" />
|
|
20
|
+
/// <reference path="./cache/relationship.d.ts" />
|
|
21
|
+
/// <reference path="./json/raw.d.ts" />
|
|
20
22
|
/// <reference path="./spec/error.d.ts" />
|
|
21
23
|
/// <reference path="./spec/document.d.ts" />
|
|
22
|
-
/// <reference path="./
|
|
23
|
-
/// <reference path="./schema/fields.d.ts" />
|
|
24
|
-
/// <reference path="./schema/concepts.d.ts" />
|
|
24
|
+
/// <reference path="./spec/json-api-raw.d.ts" />
|
|
25
25
|
declare module '@warp-drive/core-types' {
|
|
26
26
|
/**
|
|
27
27
|
* This package provides core types, type-utilities, symbols
|
|
28
28
|
* and constants used across the WarpDrive ecosystem.
|
|
29
29
|
*
|
|
30
|
-
* @module
|
|
31
|
-
* @main @warp-drive/core-types
|
|
30
|
+
* @module
|
|
32
31
|
*/
|
|
33
32
|
export type { StableRecordIdentifier, ResourceKey } from '@warp-drive/core-types/identifier';
|
|
34
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,YAAY,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -10,7 +10,6 @@ declare module '@warp-drive/core-types/record' {
|
|
|
10
10
|
* intellisense.
|
|
11
11
|
*
|
|
12
12
|
* @class TypedRecordInstance
|
|
13
|
-
* @typedoc
|
|
14
13
|
*/
|
|
15
14
|
export interface TypedRecordInstance {
|
|
16
15
|
/**
|
|
@@ -27,7 +26,6 @@ declare module '@warp-drive/core-types/record' {
|
|
|
27
26
|
* @property [Type]
|
|
28
27
|
* @type {Type}
|
|
29
28
|
* @type {String}
|
|
30
|
-
* @typedoc
|
|
31
29
|
*/
|
|
32
30
|
[Type]: string;
|
|
33
31
|
}
|
|
@@ -35,14 +33,12 @@ declare module '@warp-drive/core-types/record' {
|
|
|
35
33
|
* A type utility that extracts the Type if available,
|
|
36
34
|
* otherwise it returns never.
|
|
37
35
|
*
|
|
38
|
-
* @typedoc
|
|
39
36
|
*/
|
|
40
37
|
export type TypeFromInstance<T> = T extends TypedRecordInstance ? T[typeof Type] : never;
|
|
41
38
|
/**
|
|
42
39
|
* A type utility that extracts the Type if available,
|
|
43
40
|
* otherwise it returns string
|
|
44
41
|
*
|
|
45
|
-
* @typedoc
|
|
46
42
|
*/
|
|
47
43
|
export type TypeFromInstanceOrString<T> = T extends TypedRecordInstance ? T[typeof Type] : string;
|
|
48
44
|
type IsUniqueSymbol<T> = T extends `___(unique) Symbol(${string})` ? true : false;
|
|
@@ -71,7 +67,6 @@ declare module '@warp-drive/core-types/record' {
|
|
|
71
67
|
* There's a 90% chance this particular implementation belongs being in the JSON:API package instead
|
|
72
68
|
* of core-types, but it's here for now.
|
|
73
69
|
*
|
|
74
|
-
* @typedoc
|
|
75
70
|
*/
|
|
76
71
|
type ExtractUnion<MAX_DEPTH extends _DEPTHCOUNT, T extends TypedRecordInstance, IncludePrefix extends boolean = false, Ignore = NONE, Pre = NONE, DEPTH extends _DEPTHCOUNT = 1> = Exclude<IncludePrefix extends true ? // if we want to include prefix, we union with the prefix. Outer Exclude will filter any "NONE" types
|
|
77
72
|
_ExtractUnion<MAX_DEPTH, T, IncludePrefix, Ignore, Pre, DEPTH> | Pre : // Else we just union the types.
|
|
@@ -84,7 +79,6 @@ declare module '@warp-drive/core-types/record' {
|
|
|
84
79
|
* A utility that provides the union of all ResourceName for all potential
|
|
85
80
|
* includes for the given TypedRecordInstance.
|
|
86
81
|
*
|
|
87
|
-
* @typedoc
|
|
88
82
|
*/
|
|
89
83
|
export type ExtractSuggestedCacheTypes<T extends TypedRecordInstance, MAX_DEPTH extends _DEPTHCOUNT = DEFAULT_MAX_DEPTH> = ExtractUnion<MAX_DEPTH, T>;
|
|
90
84
|
/**
|
|
@@ -93,7 +87,6 @@ declare module '@warp-drive/core-types/record' {
|
|
|
93
87
|
*
|
|
94
88
|
* Cyclical paths are filtered out.
|
|
95
89
|
*
|
|
96
|
-
* @typedoc
|
|
97
90
|
*/
|
|
98
91
|
export type Includes<T extends TypedRecordInstance, MAX_DEPTH extends _DEPTHCOUNT = DEFAULT_MAX_DEPTH> = ExtractUnion<MAX_DEPTH, T, true>;
|
|
99
92
|
export type OpaqueRecordInstance = unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../src/record.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../src/record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEtC;;;;;;;;;;GAUG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;;;;;;;;;OAcG;IACH,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,CAAC,SAAS,mBAAmB,GAAG,CAAC,CAAC,OAAO,IAAI,CAAC,GAAG,KAAK,CAAC;AAEzF;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,CAAC,CAAC,IAAI,CAAC,SAAS,mBAAmB,GAAG,CAAC,CAAC,OAAO,IAAI,CAAC,GAAG,MAAM,CAAC;AAElG,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,SAAS,sBAAsB,MAAM,GAAG,GAAG,IAAI,GAAG,KAAK,CAAC;AAClF,KAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;AACjD,KAAK,IAAI,GAAG;IAAE,MAAM,EAAE,KAAK,CAAA;CAAE,CAAC;A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AAW,GAAG,iBAAiB,IAC/C,YAAY,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;AAE/B;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,mBAAmB,EAAE,SAAS,SAAS,WAAW,GAAG,iBAAiB,IAAI,YAAY,CACnH,SAAS,EACT,CAAC,EACD,IAAI,CACL,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE3C,MAAM,MAAM,wBAAwB,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,EAAE,SAAS,MAAM,IAAI,CAAC,SAAS,GAAG,GACzG,EAAE,GACF,CAAC,SAAS,GAAG,MAAM,CAAC,IAAI,MAAM,CAAC,EAAE,GAC/B,CAAC,SAAS,GAAG,GACX,wBAAwB,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAChD,KAAK,GACP,KAAK,CAAC;AAEZ,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,SAAS,MAAM,IAAI,wBAAwB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;AAEhH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,mBAAmB,MACjC,CAAC,SAAS,MAAM,EAAE,UAAU,uBAAuB,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAG,CAAC,CAGzG"}
|
|
@@ -13,28 +13,24 @@ declare module '@warp-drive/core-types/request' {
|
|
|
13
13
|
/**
|
|
14
14
|
* Use these options to adjust CacheHandler behavior for a request.
|
|
15
15
|
*
|
|
16
|
-
* @typedoc
|
|
17
16
|
*/
|
|
18
17
|
export type CacheOptions<T = unknown> = {
|
|
19
18
|
/**
|
|
20
19
|
* A key that uniquely identifies this request. If not present, the url wil be used
|
|
21
20
|
* as the key for any GET request, while all other requests will not be cached.
|
|
22
21
|
*
|
|
23
|
-
* @typedoc
|
|
24
22
|
*/
|
|
25
23
|
key?: string;
|
|
26
24
|
/**
|
|
27
25
|
* If true, the request will be made even if a cached response is present
|
|
28
26
|
* and not expired.
|
|
29
27
|
*
|
|
30
|
-
* @typedoc
|
|
31
28
|
*/
|
|
32
29
|
reload?: boolean;
|
|
33
30
|
/**
|
|
34
31
|
* If true, and a cached response is present and not expired, the request
|
|
35
32
|
* will be made in the background and the cached response will be returned.
|
|
36
33
|
*
|
|
37
|
-
* @typedoc
|
|
38
34
|
*/
|
|
39
35
|
backgroundReload?: boolean;
|
|
40
36
|
/**
|
|
@@ -51,7 +47,6 @@ declare module '@warp-drive/core-types/request' {
|
|
|
51
47
|
* Generally it is better to patch the cache directly for relationship updates
|
|
52
48
|
* than to invalidate findRecord requests for one.
|
|
53
49
|
*
|
|
54
|
-
* @typedoc
|
|
55
50
|
*/
|
|
56
51
|
types?: T extends TypedRecordInstance ? ExtractSuggestedCacheTypes<T>[] : string[];
|
|
57
52
|
/**
|
|
@@ -61,7 +56,6 @@ declare module '@warp-drive/core-types/request' {
|
|
|
61
56
|
* Generally this is only used for legacy request that manage resource cache
|
|
62
57
|
* updates in a non-standard way via the LegacyNetworkHandler.
|
|
63
58
|
*
|
|
64
|
-
* @typedoc
|
|
65
59
|
*/
|
|
66
60
|
[SkipCache]?: boolean;
|
|
67
61
|
};
|
|
@@ -156,7 +150,6 @@ declare module '@warp-drive/core-types/request' {
|
|
|
156
150
|
[STRUCTURED]?: true;
|
|
157
151
|
/**
|
|
158
152
|
* @see {@link ImmutableRequestInfo}
|
|
159
|
-
* @typedoc
|
|
160
153
|
*/
|
|
161
154
|
request: ImmutableRequestInfo;
|
|
162
155
|
response: Response | ResponseInfo | null;
|
|
@@ -175,66 +168,51 @@ declare module '@warp-drive/core-types/request' {
|
|
|
175
168
|
*
|
|
176
169
|
* EmberData provides our own typings due to incompleteness in the native typings.
|
|
177
170
|
*
|
|
178
|
-
* @typedoc
|
|
179
171
|
*/
|
|
180
172
|
interface Request {
|
|
181
173
|
/** Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.
|
|
182
|
-
* @typedoc
|
|
183
174
|
*/
|
|
184
175
|
cache?: RequestCache;
|
|
185
176
|
/** Returns the credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL.
|
|
186
|
-
* @typedoc
|
|
187
177
|
*/
|
|
188
178
|
credentials?: RequestCredentials;
|
|
189
179
|
/** Returns the kind of resource requested by request, e.g., "document" or "script".
|
|
190
|
-
* @typedoc
|
|
191
180
|
*/
|
|
192
181
|
destination?: RequestDestination;
|
|
193
182
|
/** Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header.
|
|
194
|
-
* @typedoc
|
|
195
183
|
*/
|
|
196
184
|
headers?: Headers;
|
|
197
185
|
/** Returns request's subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI]
|
|
198
|
-
* @typedoc
|
|
199
186
|
*/
|
|
200
187
|
integrity?: string;
|
|
201
188
|
/** Returns a boolean indicating whether or not request can outlive the global in which it was created.
|
|
202
|
-
* @typedoc
|
|
203
189
|
*/
|
|
204
190
|
keepalive?: boolean;
|
|
205
191
|
/** Returns request's HTTP method, which is "GET" by default.
|
|
206
|
-
* @typedoc
|
|
207
192
|
*/
|
|
208
193
|
method?: HTTPMethod;
|
|
209
194
|
/** Returns the mode associated with request, which is a string indicating whether the request will use CORS, or will be restricted to same-origin URLs.
|
|
210
195
|
*
|
|
211
196
|
* `no-cors` is not allowed for streaming request bodies.
|
|
212
197
|
*
|
|
213
|
-
* @typedoc
|
|
214
198
|
*/
|
|
215
199
|
mode?: RequestMode;
|
|
216
200
|
/** Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default.
|
|
217
|
-
* @typedoc
|
|
218
201
|
*/
|
|
219
202
|
redirect?: RequestRedirect;
|
|
220
203
|
/** Returns the referrer of request. Its value can be a same-origin URL if explicitly set in init, the empty string to indicate no referrer, and "about:client" when defaulting to the global's default. This is used during fetching to determine the value of the `Referer` header of the request being made.
|
|
221
|
-
* @typedoc
|
|
222
204
|
*/
|
|
223
205
|
referrer?: string;
|
|
224
206
|
/** Returns the referrer policy associated with request. This is used during fetching to compute the value of the request's referrer.
|
|
225
|
-
* @typedoc
|
|
226
207
|
*/
|
|
227
208
|
referrerPolicy?: ReferrerPolicy;
|
|
228
209
|
/** Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler.
|
|
229
|
-
* @typedoc
|
|
230
210
|
*/
|
|
231
211
|
signal?: AbortSignal;
|
|
232
212
|
/** Returns the URL of request as a string.
|
|
233
|
-
* @typedoc
|
|
234
213
|
*/
|
|
235
214
|
url?: string;
|
|
236
215
|
/** Any body that you want to add to your request. Note that a GET or HEAD request may not have a body.
|
|
237
|
-
* @typedoc
|
|
238
216
|
*/
|
|
239
217
|
body?: BodyInit | null;
|
|
240
218
|
/**
|
|
@@ -243,7 +221,6 @@ declare module '@warp-drive/core-types/request' {
|
|
|
243
221
|
*
|
|
244
222
|
* [Half Duplex Further Reading](https://developer.chrome.com/docs/capabilities/web-apis/fetch-streaming-requests#half_duplex)
|
|
245
223
|
*
|
|
246
|
-
* @typedoc
|
|
247
224
|
*/
|
|
248
225
|
duplex?: 'half';
|
|
249
226
|
}
|
|
@@ -255,18 +232,15 @@ declare module '@warp-drive/core-types/request' {
|
|
|
255
232
|
* Extends JavaScript's native {@link Request} object with additional
|
|
256
233
|
* properties specific to the RequestManager's capabilities.
|
|
257
234
|
*
|
|
258
|
-
* @typedoc
|
|
259
235
|
*/
|
|
260
236
|
export interface RequestInfo<RT = unknown, T = unknown> extends Request {
|
|
261
237
|
/**
|
|
262
238
|
* If provided, used instead of the AbortController auto-configured for each request by the RequestManager
|
|
263
239
|
*
|
|
264
|
-
* @typedoc
|
|
265
240
|
*/
|
|
266
241
|
controller?: AbortController;
|
|
267
242
|
/**
|
|
268
243
|
* @see {@link CacheOptions}
|
|
269
|
-
* @typedoc
|
|
270
244
|
*/
|
|
271
245
|
cacheOptions?: CacheOptions<T>;
|
|
272
246
|
store?: Store;
|
|
@@ -276,7 +250,6 @@ declare module '@warp-drive/core-types/request' {
|
|
|
276
250
|
* (if any). This may be used by handlers to perform transactional
|
|
277
251
|
* operations on the store.
|
|
278
252
|
*
|
|
279
|
-
* @typedoc
|
|
280
253
|
*/
|
|
281
254
|
records?: StableRecordIdentifier[];
|
|
282
255
|
disableTestWaiter?: boolean;
|
|
@@ -287,14 +260,12 @@ declare module '@warp-drive/core-types/request' {
|
|
|
287
260
|
* Note: It is recommended that builders set query params
|
|
288
261
|
* and body directly in most scenarios.
|
|
289
262
|
*
|
|
290
|
-
* @typedoc
|
|
291
263
|
*/
|
|
292
264
|
data?: Record<string, unknown>;
|
|
293
265
|
/**
|
|
294
266
|
* options specifically intended for handlers
|
|
295
267
|
* to utilize to process the request
|
|
296
268
|
*
|
|
297
|
-
* @typedoc
|
|
298
269
|
*/
|
|
299
270
|
options?: Record<string, unknown>;
|
|
300
271
|
[RequestSignature]?: RT;
|
|
@@ -303,7 +274,6 @@ declare module '@warp-drive/core-types/request' {
|
|
|
303
274
|
/**
|
|
304
275
|
* Immutable version of {@link RequestInfo}. This is what is passed to handlers.
|
|
305
276
|
*
|
|
306
|
-
* @typedoc
|
|
307
277
|
*/
|
|
308
278
|
export type ImmutableRequestInfo<RT = unknown, T = unknown> = Readonly<Omit<RequestInfo<RT, T>, 'controller'>> & {
|
|
309
279
|
readonly cacheOptions?: Readonly<CacheOptions<T>>;
|
|
@@ -311,7 +281,6 @@ declare module '@warp-drive/core-types/request' {
|
|
|
311
281
|
readonly data?: Readonly<Record<string, unknown>>;
|
|
312
282
|
readonly options?: Readonly<Record<string, unknown>>;
|
|
313
283
|
/** Whether the request body has been read.
|
|
314
|
-
* @typedoc
|
|
315
284
|
*/
|
|
316
285
|
readonly bodyUsed?: boolean;
|
|
317
286
|
};
|
|
@@ -327,7 +296,6 @@ declare module '@warp-drive/core-types/request' {
|
|
|
327
296
|
export interface RequestContext {
|
|
328
297
|
/**
|
|
329
298
|
* @see {@link ImmutableRequestInfo}
|
|
330
|
-
* @typedoc
|
|
331
299
|
*/
|
|
332
300
|
request: ImmutableRequestInfo;
|
|
333
301
|
id: number;
|