@warp-drive-types/core-types 5.4.0-alpha.150 → 5.4.0-alpha.151
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAIlF,QAAA,MAAM,aAAa,EAAE;IAAE,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,CAAA;CAE/C,CAAC;
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAIlF,QAAA,MAAM,aAAa,EAAE;IAAE,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,CAAA;CAE/C,CAAC;AAkBH,wBAAgB,gBAAgB,IAAI,OAAO,aAAa,CAEvD;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,CAG5D"}
|
|
@@ -17,14 +17,29 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
17
17
|
* "type" points to a new-style transform on "field"
|
|
18
18
|
* that a record implmentation *must* use.
|
|
19
19
|
*
|
|
20
|
-
* @
|
|
20
|
+
* @class <Type> GenericField
|
|
21
|
+
* @public
|
|
21
22
|
*/
|
|
22
23
|
export interface GenericField {
|
|
24
|
+
/**
|
|
25
|
+
* The kind of field this is.
|
|
26
|
+
*
|
|
27
|
+
* @property {'field'} kind
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
23
30
|
kind: 'field';
|
|
31
|
+
/**
|
|
32
|
+
* The name of the field.
|
|
33
|
+
*
|
|
34
|
+
* @property {string} name
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
24
37
|
name: string;
|
|
25
38
|
/**
|
|
26
39
|
* the name of the transform to use, if any
|
|
27
|
-
*
|
|
40
|
+
*
|
|
41
|
+
* @property {string | undefined} type
|
|
42
|
+
* @public
|
|
28
43
|
*/
|
|
29
44
|
type?: string;
|
|
30
45
|
/**
|
|
@@ -33,7 +48,8 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
33
48
|
* Must comply to the specific transform's options
|
|
34
49
|
* schema.
|
|
35
50
|
*
|
|
36
|
-
* @
|
|
51
|
+
* @property {ObjectValue | undefined} options
|
|
52
|
+
* @public
|
|
37
53
|
*/
|
|
38
54
|
options?: ObjectValue;
|
|
39
55
|
}
|
|
@@ -63,16 +79,36 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
63
79
|
* an AliasField could be used to expose both a string and a Date version of the
|
|
64
80
|
* same field, with both being capable of being written to.
|
|
65
81
|
*
|
|
66
|
-
* @
|
|
82
|
+
* @class <Type> LegacyAliasField
|
|
83
|
+
* @public
|
|
67
84
|
*/
|
|
68
85
|
export interface LegacyAliasField {
|
|
86
|
+
/**
|
|
87
|
+
* The kind of field this is.
|
|
88
|
+
*
|
|
89
|
+
* @property {'alias'} kind
|
|
90
|
+
* @public
|
|
91
|
+
*/
|
|
69
92
|
kind: 'alias';
|
|
93
|
+
/**
|
|
94
|
+
* The name of the field.
|
|
95
|
+
*
|
|
96
|
+
* @property {string} name
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
70
99
|
name: string;
|
|
100
|
+
/**
|
|
101
|
+
* Always null (for now)
|
|
102
|
+
*
|
|
103
|
+
* @property {null} type
|
|
104
|
+
* @public
|
|
105
|
+
*/
|
|
71
106
|
type: null;
|
|
72
107
|
/**
|
|
73
108
|
* The field def for which this is an alias.
|
|
74
109
|
*
|
|
75
|
-
* @
|
|
110
|
+
* @property {GenericField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | LegacyAttributeField | LegacyBelongsToField | LegacyHasManyField} options
|
|
111
|
+
* @public
|
|
76
112
|
*/
|
|
77
113
|
options: GenericField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | LegacyAttributeField | LegacyBelongsToField | LegacyHasManyField;
|
|
78
114
|
}
|
|
@@ -102,16 +138,36 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
102
138
|
* an AliasField could be used to expose both a string and a Date version of the
|
|
103
139
|
* same field, with both being capable of being written to.
|
|
104
140
|
*
|
|
105
|
-
* @
|
|
141
|
+
* @class <Type> PolarisAliasField
|
|
142
|
+
* @public
|
|
106
143
|
*/
|
|
107
144
|
export interface PolarisAliasField {
|
|
145
|
+
/**
|
|
146
|
+
* The kind of field this is.
|
|
147
|
+
*
|
|
148
|
+
* @property {'alias'} kind
|
|
149
|
+
* @public
|
|
150
|
+
*/
|
|
108
151
|
kind: 'alias';
|
|
152
|
+
/**
|
|
153
|
+
* The name of the field.
|
|
154
|
+
*
|
|
155
|
+
* @property {string} name
|
|
156
|
+
* @public
|
|
157
|
+
*/
|
|
109
158
|
name: string;
|
|
159
|
+
/**
|
|
160
|
+
* Always null (for now)
|
|
161
|
+
*
|
|
162
|
+
* @property {null} type
|
|
163
|
+
* @public
|
|
164
|
+
*/
|
|
110
165
|
type: null;
|
|
111
166
|
/**
|
|
112
167
|
* The field def for which this is an alias.
|
|
113
168
|
*
|
|
114
|
-
* @
|
|
169
|
+
* @property {GenericField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | LinksModeBelongsToField | LinksModeHasManyField} options
|
|
170
|
+
* @public
|
|
115
171
|
*/
|
|
116
172
|
options: GenericField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | LinksModeBelongsToField | LinksModeHasManyField;
|
|
117
173
|
}
|
|
@@ -141,16 +197,36 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
141
197
|
* an AliasField could be used to expose both a string and a Date version of the
|
|
142
198
|
* same field, with both being capable of being written to.
|
|
143
199
|
*
|
|
144
|
-
* @
|
|
200
|
+
* @class <Type> ObjectAliasField
|
|
201
|
+
* @public
|
|
145
202
|
*/
|
|
146
203
|
export interface ObjectAliasField {
|
|
204
|
+
/**
|
|
205
|
+
* The kind of field this is.
|
|
206
|
+
*
|
|
207
|
+
* @property {'alias'} kind
|
|
208
|
+
* @public
|
|
209
|
+
*/
|
|
147
210
|
kind: 'alias';
|
|
211
|
+
/**
|
|
212
|
+
* The name of the field.
|
|
213
|
+
*
|
|
214
|
+
* @property {string} name
|
|
215
|
+
* @public
|
|
216
|
+
*/
|
|
148
217
|
name: string;
|
|
218
|
+
/**
|
|
219
|
+
* Always null (for now)
|
|
220
|
+
*
|
|
221
|
+
* @property {null} type
|
|
222
|
+
* @public
|
|
223
|
+
*/
|
|
149
224
|
type: null;
|
|
150
225
|
/**
|
|
151
226
|
* The field def for which this is an alias.
|
|
152
227
|
*
|
|
153
|
-
* @
|
|
228
|
+
* @property {GenericField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField} options
|
|
229
|
+
* @public
|
|
154
230
|
*/
|
|
155
231
|
options: GenericField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField;
|
|
156
232
|
}
|
|
@@ -166,15 +242,23 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
166
242
|
* 'uuid', 'urn' or 'entityUrn' or 'primaryKey' as their
|
|
167
243
|
* primary key field instead of 'id'.
|
|
168
244
|
*
|
|
169
|
-
* @
|
|
245
|
+
* @class <Type> IdentityField
|
|
246
|
+
* @public
|
|
170
247
|
*/
|
|
171
248
|
export interface IdentityField {
|
|
249
|
+
/**
|
|
250
|
+
* The kind of field this is.
|
|
251
|
+
*
|
|
252
|
+
* @property {'@id'} kind
|
|
253
|
+
* @public
|
|
254
|
+
*/
|
|
172
255
|
kind: '@id';
|
|
173
256
|
/**
|
|
174
257
|
* The name of the field that serves as the
|
|
175
258
|
* primary key for the resource.
|
|
176
259
|
*
|
|
177
|
-
* @
|
|
260
|
+
* @property {string} name
|
|
261
|
+
* @public
|
|
178
262
|
*/
|
|
179
263
|
name: string;
|
|
180
264
|
}
|
|
@@ -199,9 +283,16 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
199
283
|
* it should be placed in the `ResourceSchema`'s `@id` field
|
|
200
284
|
* in place of an `IdentityField`.
|
|
201
285
|
*
|
|
202
|
-
* @
|
|
286
|
+
* @class <Type> HashField
|
|
287
|
+
* @public
|
|
203
288
|
*/
|
|
204
289
|
export interface HashField {
|
|
290
|
+
/**
|
|
291
|
+
* The kind of field this is.
|
|
292
|
+
*
|
|
293
|
+
* @property {'@hash'} kind
|
|
294
|
+
* @public
|
|
295
|
+
*/
|
|
205
296
|
kind: '@hash';
|
|
206
297
|
/**
|
|
207
298
|
* The name of the field that serves as the
|
|
@@ -210,7 +301,8 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
210
301
|
* Only required if access to this value by
|
|
211
302
|
* the UI is desired, it can be `null` otherwise.
|
|
212
303
|
*
|
|
213
|
-
* @
|
|
304
|
+
* @property {string | null} name
|
|
305
|
+
* @public
|
|
214
306
|
*/
|
|
215
307
|
name: string | null;
|
|
216
308
|
/**
|
|
@@ -218,14 +310,16 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
218
310
|
* The function will only have access to the cached
|
|
219
311
|
* data for the record.
|
|
220
312
|
*
|
|
221
|
-
* @
|
|
313
|
+
* @property {string} type
|
|
314
|
+
* @public
|
|
222
315
|
*/
|
|
223
316
|
type: string;
|
|
224
317
|
/**
|
|
225
318
|
* Any options that should be provided to the hash
|
|
226
319
|
* function.
|
|
227
320
|
*
|
|
228
|
-
* @
|
|
321
|
+
* @property {ObjectValue | undefined} options
|
|
322
|
+
* @public
|
|
229
323
|
*/
|
|
230
324
|
options?: ObjectValue;
|
|
231
325
|
}
|
|
@@ -245,8 +339,8 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
245
339
|
* For this reason Local fields should be used sparingly.
|
|
246
340
|
*
|
|
247
341
|
* Currently, while we document this feature here,
|
|
248
|
-
* only allow our own SchemaRecord
|
|
249
|
-
* and the feature should be considered private.
|
|
342
|
+
* only allow our own SchemaRecord default fields to
|
|
343
|
+
* utilize them and the feature should be considered private.
|
|
250
344
|
*
|
|
251
345
|
* Example use cases that drove the creation of local
|
|
252
346
|
* fields are states like `isDestroying` and `isDestroyed`
|
|
@@ -256,18 +350,38 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
256
350
|
*
|
|
257
351
|
* Don't make us regret this decision.
|
|
258
352
|
*
|
|
259
|
-
* @
|
|
353
|
+
* @class <Type> LocalField
|
|
354
|
+
* @public
|
|
260
355
|
*/
|
|
261
356
|
export interface LocalField {
|
|
357
|
+
/**
|
|
358
|
+
* The kind of field this is.
|
|
359
|
+
*
|
|
360
|
+
* @property {'@local'} kind
|
|
361
|
+
* @public
|
|
362
|
+
*/
|
|
262
363
|
kind: '@local';
|
|
364
|
+
/**
|
|
365
|
+
* The name of the field.
|
|
366
|
+
*
|
|
367
|
+
* @property {string} name
|
|
368
|
+
* @public
|
|
369
|
+
*/
|
|
263
370
|
name: string;
|
|
264
371
|
/**
|
|
265
372
|
* Not currently utilized, we are considering
|
|
266
373
|
* allowing transforms to operate on local fields
|
|
267
374
|
*
|
|
268
|
-
* @
|
|
375
|
+
* @property {string | undefined} type
|
|
376
|
+
* @public
|
|
269
377
|
*/
|
|
270
378
|
type?: string;
|
|
379
|
+
/**
|
|
380
|
+
* Options for the field.
|
|
381
|
+
*
|
|
382
|
+
* @property {ObjectValue | undefined} options
|
|
383
|
+
* @public
|
|
384
|
+
*/
|
|
271
385
|
options?: {
|
|
272
386
|
defaultValue?: PrimitiveValue;
|
|
273
387
|
};
|
|
@@ -281,16 +395,30 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
281
395
|
* if the key/value pairs have well-defined shape,
|
|
282
396
|
* use 'schema-object' instead.
|
|
283
397
|
*
|
|
284
|
-
* @
|
|
398
|
+
* @class <Type> ObjectField
|
|
399
|
+
* @public
|
|
285
400
|
*/
|
|
286
401
|
export interface ObjectField {
|
|
402
|
+
/**
|
|
403
|
+
* The kind of field this is.
|
|
404
|
+
*
|
|
405
|
+
* @property {'object'} kind
|
|
406
|
+
* @public
|
|
407
|
+
*/
|
|
287
408
|
kind: 'object';
|
|
409
|
+
/**
|
|
410
|
+
* The name of the field.
|
|
411
|
+
*
|
|
412
|
+
* @property {string} name
|
|
413
|
+
* @public
|
|
414
|
+
*/
|
|
288
415
|
name: string;
|
|
289
416
|
/**
|
|
290
417
|
* The name of a transform to pass the entire object
|
|
291
418
|
* through before displaying or serializing it.
|
|
292
419
|
*
|
|
293
|
-
* @
|
|
420
|
+
* @property {string | undefined} type
|
|
421
|
+
* @public
|
|
294
422
|
*/
|
|
295
423
|
type?: string;
|
|
296
424
|
/**
|
|
@@ -299,7 +427,8 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
299
427
|
* Must comply to the specific transform's options
|
|
300
428
|
* schema.
|
|
301
429
|
*
|
|
302
|
-
* @
|
|
430
|
+
* @property {ObjectValue | undefined} options
|
|
431
|
+
* @public
|
|
303
432
|
*/
|
|
304
433
|
options?: ObjectValue;
|
|
305
434
|
}
|
|
@@ -311,20 +440,42 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
311
440
|
* If the object's structure is not well-defined,
|
|
312
441
|
* use 'object' instead.
|
|
313
442
|
*
|
|
314
|
-
* @
|
|
443
|
+
* @class <Type> SchemaObjectField
|
|
444
|
+
* @public
|
|
315
445
|
*/
|
|
316
446
|
export interface SchemaObjectField {
|
|
447
|
+
/**
|
|
448
|
+
* The kind of field this is.
|
|
449
|
+
*
|
|
450
|
+
* @property {'schema-object'} kind
|
|
451
|
+
* @public
|
|
452
|
+
*/
|
|
317
453
|
kind: 'schema-object';
|
|
454
|
+
/**
|
|
455
|
+
* The name of the field.
|
|
456
|
+
*
|
|
457
|
+
* @property {string} name
|
|
458
|
+
* @public
|
|
459
|
+
*/
|
|
318
460
|
name: string;
|
|
319
461
|
/**
|
|
320
|
-
* The name of the
|
|
462
|
+
* The name of the ObjectSchema that describes the
|
|
321
463
|
* structure of the object.
|
|
322
464
|
*
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
-
* @typedoc
|
|
465
|
+
* @property {string} type
|
|
466
|
+
* @public
|
|
326
467
|
*/
|
|
327
468
|
type: string;
|
|
469
|
+
/**
|
|
470
|
+
* Options for configuring the behavior of the
|
|
471
|
+
* SchemaObject.
|
|
472
|
+
*
|
|
473
|
+
* - `polymorphic` : Whether this SchemaObject is Polymorphic.
|
|
474
|
+
* - `type` : If the SchemaObject is Polymorphic, the key on the raw cache data to use as the "resource-type" value for the schema-object.
|
|
475
|
+
*
|
|
476
|
+
* @property {ObjectValue | undefined} options
|
|
477
|
+
* @public
|
|
478
|
+
*/
|
|
328
479
|
options?: {
|
|
329
480
|
/**
|
|
330
481
|
* Whether this SchemaObject is Polymorphic.
|
|
@@ -352,17 +503,31 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
352
503
|
* If the array's elements are not primitive
|
|
353
504
|
* values, use 'schema-array' instead.
|
|
354
505
|
*
|
|
355
|
-
* @
|
|
506
|
+
* @class <Type> ArrayField
|
|
507
|
+
* @public
|
|
356
508
|
*/
|
|
357
509
|
export interface ArrayField {
|
|
510
|
+
/**
|
|
511
|
+
* The kind of field this is.
|
|
512
|
+
*
|
|
513
|
+
* @property {'array'} kind
|
|
514
|
+
* @public
|
|
515
|
+
*/
|
|
358
516
|
kind: 'array';
|
|
517
|
+
/**
|
|
518
|
+
* The name of the field.
|
|
519
|
+
*
|
|
520
|
+
* @property {string} name
|
|
521
|
+
* @public
|
|
522
|
+
*/
|
|
359
523
|
name: string;
|
|
360
524
|
/**
|
|
361
525
|
* The name of a transform to pass each item
|
|
362
526
|
* in the array through before displaying or
|
|
363
527
|
* or serializing it.
|
|
364
528
|
*
|
|
365
|
-
* @
|
|
529
|
+
* @property {string | undefined} type
|
|
530
|
+
* @public
|
|
366
531
|
*/
|
|
367
532
|
type?: string;
|
|
368
533
|
/**
|
|
@@ -371,7 +536,8 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
371
536
|
* Must comply to the specific transform's options
|
|
372
537
|
* schema.
|
|
373
538
|
*
|
|
374
|
-
* @
|
|
539
|
+
* @property {ObjectValue | undefined} options
|
|
540
|
+
* @public
|
|
375
541
|
*/
|
|
376
542
|
options?: ObjectValue;
|
|
377
543
|
}
|
|
@@ -383,29 +549,61 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
383
549
|
* If the array's elements are not well-defined,
|
|
384
550
|
* use 'array' instead.
|
|
385
551
|
*
|
|
386
|
-
* @
|
|
552
|
+
* @class <Type> SchemaArrayField
|
|
553
|
+
* @public
|
|
387
554
|
*/
|
|
388
555
|
export interface SchemaArrayField {
|
|
556
|
+
/**
|
|
557
|
+
* The kind of field this is.
|
|
558
|
+
*
|
|
559
|
+
* @property {'schema-array'} kind
|
|
560
|
+
* @public
|
|
561
|
+
*/
|
|
389
562
|
kind: 'schema-array';
|
|
563
|
+
/**
|
|
564
|
+
* The name of the field.
|
|
565
|
+
*
|
|
566
|
+
* @property {string} name
|
|
567
|
+
* @public
|
|
568
|
+
*/
|
|
390
569
|
name: string;
|
|
391
570
|
/**
|
|
392
|
-
* The name of the
|
|
571
|
+
* The name of the ObjectSchema that describes the
|
|
393
572
|
* structure of the objects in the array.
|
|
394
573
|
*
|
|
395
|
-
* @
|
|
574
|
+
* @property {string} type
|
|
575
|
+
* @public
|
|
396
576
|
*/
|
|
397
577
|
type: string;
|
|
398
578
|
/**
|
|
399
579
|
* Options for configuring the behavior of the
|
|
400
580
|
* SchemaArray.
|
|
401
581
|
*
|
|
402
|
-
*
|
|
403
|
-
*/
|
|
404
|
-
/**
|
|
405
|
-
* Options for configuring the behavior of the
|
|
406
|
-
* SchemaArray.
|
|
582
|
+
* - `key`
|
|
407
583
|
*
|
|
408
|
-
*
|
|
584
|
+
* Configures how the SchemaArray determines whether an object in the cache is the same
|
|
585
|
+
* as an object previously used to instantiate one of the schema-objects it contains.
|
|
586
|
+
*
|
|
587
|
+
* The default is `'@identity'`.
|
|
588
|
+
*
|
|
589
|
+
* Valid options are:
|
|
590
|
+
*
|
|
591
|
+
* - `'@identity'` (default) : the cached object's referential identity will be used.
|
|
592
|
+
* This may result in significant instability when resource data is updated from the API
|
|
593
|
+
* - `'@index'` : the cached object's index in the array will be used.
|
|
594
|
+
* This is only a good choice for arrays that rarely if ever change membership
|
|
595
|
+
* - `'@hash'` : will lookup the `@hash` function supplied in the ResourceSchema for
|
|
596
|
+
* The contained schema-object and use the computed result to determine and compare identity.
|
|
597
|
+
* - <field-name> (string) : the name of a field to use as the key, only GenericFields (kind `field`)
|
|
598
|
+
* Are valid field names for this purpose. The cache state without transforms applied will be
|
|
599
|
+
* used when comparing values. The field value should be unique enough to guarantee two schema-objects
|
|
600
|
+
* of the same type will not collide.
|
|
601
|
+
*
|
|
602
|
+
* - `polymorphic` : Whether this SchemaArray is Polymorphic.
|
|
603
|
+
* - `type` : If the SchemaArray is Polymorphic, the key on the raw cache data to use as the "resource-type" value for the schema-object.
|
|
604
|
+
*
|
|
605
|
+
* @property {ObjectValue | undefined} options
|
|
606
|
+
* @public
|
|
409
607
|
*/
|
|
410
608
|
options?: {
|
|
411
609
|
/**
|
|
@@ -465,10 +663,23 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
465
663
|
* or that require access to related resources
|
|
466
664
|
* that may not be loaded should be avoided.
|
|
467
665
|
*
|
|
468
|
-
* @
|
|
666
|
+
* @class <Type> DerivedField
|
|
667
|
+
* @public
|
|
469
668
|
*/
|
|
470
669
|
export interface DerivedField {
|
|
670
|
+
/**
|
|
671
|
+
* The kind of field this is.
|
|
672
|
+
*
|
|
673
|
+
* @property {'derived'} kind
|
|
674
|
+
* @public
|
|
675
|
+
*/
|
|
471
676
|
kind: 'derived';
|
|
677
|
+
/**
|
|
678
|
+
* The name of the field.
|
|
679
|
+
*
|
|
680
|
+
* @property {string} name
|
|
681
|
+
* @public
|
|
682
|
+
*/
|
|
472
683
|
name: string;
|
|
473
684
|
/**
|
|
474
685
|
* The name of the derivation to use.
|
|
@@ -487,7 +698,8 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
487
698
|
* Derivation functions must be explicitly
|
|
488
699
|
* registered with the schema service.
|
|
489
700
|
*
|
|
490
|
-
* @
|
|
701
|
+
* @property {string} type
|
|
702
|
+
* @public
|
|
491
703
|
*/
|
|
492
704
|
type: string;
|
|
493
705
|
/**
|
|
@@ -496,7 +708,8 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
496
708
|
* Must comply to the specific derivation's
|
|
497
709
|
* options schema.
|
|
498
710
|
*
|
|
499
|
-
* @
|
|
711
|
+
* @property {ObjectValue | undefined} options
|
|
712
|
+
* @public
|
|
500
713
|
*/
|
|
501
714
|
options?: ObjectValue;
|
|
502
715
|
}
|
|
@@ -507,10 +720,23 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
507
720
|
* SUPPORT FOR THIS FEATURE IS NOT YET IMPLEMENTED
|
|
508
721
|
* BY SchemaRecord
|
|
509
722
|
*
|
|
510
|
-
* @
|
|
723
|
+
* @class <Type> ResourceField
|
|
724
|
+
* @public
|
|
511
725
|
*/
|
|
512
726
|
export interface ResourceField {
|
|
727
|
+
/**
|
|
728
|
+
* The kind of field this is.
|
|
729
|
+
*
|
|
730
|
+
* @property {'resource'} kind
|
|
731
|
+
* @public
|
|
732
|
+
*/
|
|
513
733
|
kind: 'resource';
|
|
734
|
+
/**
|
|
735
|
+
* The name of the field.
|
|
736
|
+
*
|
|
737
|
+
* @property {string} name
|
|
738
|
+
* @public
|
|
739
|
+
*/
|
|
514
740
|
name: string;
|
|
515
741
|
/**
|
|
516
742
|
* The name of the resource that this field
|
|
@@ -518,7 +744,8 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
518
744
|
* relationship, this should be the trait
|
|
519
745
|
* or abstract type.
|
|
520
746
|
*
|
|
521
|
-
* @
|
|
747
|
+
* @property {string} type
|
|
748
|
+
* @public
|
|
522
749
|
*/
|
|
523
750
|
type: string;
|
|
524
751
|
/**
|
|
@@ -526,7 +753,8 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
526
753
|
* not present, all options are presumed
|
|
527
754
|
* to be falsey
|
|
528
755
|
*
|
|
529
|
-
* @
|
|
756
|
+
* @property {ObjectValue | undefined} options
|
|
757
|
+
* @public
|
|
530
758
|
*/
|
|
531
759
|
options?: {
|
|
532
760
|
/**
|
|
@@ -579,10 +807,23 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
579
807
|
* SUPPORT FOR THIS FEATURE IS NOT YET IMPLEMENTED
|
|
580
808
|
* BY SchemaRecord
|
|
581
809
|
*
|
|
582
|
-
* @
|
|
810
|
+
* @class <Type> CollectionField
|
|
811
|
+
* @public
|
|
583
812
|
*/
|
|
584
813
|
export interface CollectionField {
|
|
814
|
+
/**
|
|
815
|
+
* The kind of field this is.
|
|
816
|
+
*
|
|
817
|
+
* @property {'collection'} kind
|
|
818
|
+
* @public
|
|
819
|
+
*/
|
|
585
820
|
kind: 'collection';
|
|
821
|
+
/**
|
|
822
|
+
* The name of the field.
|
|
823
|
+
*
|
|
824
|
+
* @property {string} name
|
|
825
|
+
* @public
|
|
826
|
+
*/
|
|
586
827
|
name: string;
|
|
587
828
|
/**
|
|
588
829
|
* The name of the resource that this field
|
|
@@ -590,7 +831,8 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
590
831
|
* relationship, this should be the trait
|
|
591
832
|
* or abstract type.
|
|
592
833
|
*
|
|
593
|
-
* @
|
|
834
|
+
* @property {string} type
|
|
835
|
+
* @public
|
|
594
836
|
*/
|
|
595
837
|
type: string;
|
|
596
838
|
/**
|
|
@@ -669,15 +911,29 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
669
911
|
* that a serializer *might* use, but their usage
|
|
670
912
|
* is not guaranteed.
|
|
671
913
|
*
|
|
672
|
-
* @
|
|
914
|
+
* @class <Type> LegacyAttributeField
|
|
915
|
+
* @public
|
|
673
916
|
*/
|
|
674
917
|
export interface LegacyAttributeField {
|
|
918
|
+
/**
|
|
919
|
+
* The kind of field this is.
|
|
920
|
+
*
|
|
921
|
+
* @property {'attribute'} kind
|
|
922
|
+
* @public
|
|
923
|
+
*/
|
|
675
924
|
kind: 'attribute';
|
|
925
|
+
/**
|
|
926
|
+
* The name of the field.
|
|
927
|
+
*
|
|
928
|
+
* @property {string} name
|
|
929
|
+
* @public
|
|
930
|
+
*/
|
|
676
931
|
name: string;
|
|
677
932
|
/**
|
|
678
933
|
* The name of the transform to use, if any
|
|
679
934
|
*
|
|
680
|
-
* @
|
|
935
|
+
* @property {string | undefined | null} type
|
|
936
|
+
* @public
|
|
681
937
|
*/
|
|
682
938
|
type?: string | null;
|
|
683
939
|
/**
|
|
@@ -699,10 +955,23 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
699
955
|
*
|
|
700
956
|
* This is the legacy version of the `ResourceField`.
|
|
701
957
|
*
|
|
702
|
-
* @
|
|
958
|
+
* @class <Type> LegacyBelongsToField
|
|
959
|
+
* @public
|
|
703
960
|
*/
|
|
704
961
|
export interface LegacyBelongsToField {
|
|
962
|
+
/**
|
|
963
|
+
* The kind of field this is.
|
|
964
|
+
*
|
|
965
|
+
* @property {'belongsTo'} kind
|
|
966
|
+
* @public
|
|
967
|
+
*/
|
|
705
968
|
kind: 'belongsTo';
|
|
969
|
+
/**
|
|
970
|
+
* The name of the field.
|
|
971
|
+
*
|
|
972
|
+
* @property {string} name
|
|
973
|
+
* @public
|
|
974
|
+
*/
|
|
706
975
|
name: string;
|
|
707
976
|
/**
|
|
708
977
|
* The name of the resource that this field
|
|
@@ -710,7 +979,8 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
710
979
|
* relationship, this should be the trait
|
|
711
980
|
* or abstract type.
|
|
712
981
|
*
|
|
713
|
-
* @
|
|
982
|
+
* @property {string} type
|
|
983
|
+
* @public
|
|
714
984
|
*/
|
|
715
985
|
type: string;
|
|
716
986
|
/**
|
|
@@ -819,10 +1089,23 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
819
1089
|
*
|
|
820
1090
|
* This is the legacy version of the `ResourceField`.
|
|
821
1091
|
*
|
|
822
|
-
* @
|
|
1092
|
+
* @class <Type> LinksModeBelongsToField
|
|
1093
|
+
* @public
|
|
823
1094
|
*/
|
|
824
1095
|
export interface LinksModeBelongsToField {
|
|
1096
|
+
/**
|
|
1097
|
+
* The kind of field this is.
|
|
1098
|
+
*
|
|
1099
|
+
* @property {'belongsTo'} kind
|
|
1100
|
+
* @public
|
|
1101
|
+
*/
|
|
825
1102
|
kind: 'belongsTo';
|
|
1103
|
+
/**
|
|
1104
|
+
* The name of the field.
|
|
1105
|
+
*
|
|
1106
|
+
* @property {string} name
|
|
1107
|
+
* @public
|
|
1108
|
+
*/
|
|
826
1109
|
name: string;
|
|
827
1110
|
/**
|
|
828
1111
|
* The name of the resource that this field
|
|
@@ -830,7 +1113,8 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
830
1113
|
* relationship, this should be the trait
|
|
831
1114
|
* or abstract type.
|
|
832
1115
|
*
|
|
833
|
-
* @
|
|
1116
|
+
* @property {string} type
|
|
1117
|
+
* @public
|
|
834
1118
|
*/
|
|
835
1119
|
type: string;
|
|
836
1120
|
/**
|
|
@@ -938,11 +1222,33 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
938
1222
|
*
|
|
939
1223
|
* This is the legacy version of the `CollectionField`.
|
|
940
1224
|
*
|
|
941
|
-
* @
|
|
1225
|
+
* @class <Type> LegacyHasManyField
|
|
1226
|
+
* @public
|
|
942
1227
|
*/
|
|
943
1228
|
export interface LegacyHasManyField {
|
|
1229
|
+
/**
|
|
1230
|
+
* The kind of field this is.
|
|
1231
|
+
*
|
|
1232
|
+
* @property {'hasMany'} kind
|
|
1233
|
+
* @public
|
|
1234
|
+
*/
|
|
944
1235
|
kind: 'hasMany';
|
|
1236
|
+
/**
|
|
1237
|
+
* The name of the field.
|
|
1238
|
+
*
|
|
1239
|
+
* @property {string} name
|
|
1240
|
+
* @public
|
|
1241
|
+
*/
|
|
945
1242
|
name: string;
|
|
1243
|
+
/**
|
|
1244
|
+
* the name of the resource that this field
|
|
1245
|
+
* refers to. In the case of a polymorphic
|
|
1246
|
+
* relationship, this should be the trait
|
|
1247
|
+
* or abstract type.
|
|
1248
|
+
*
|
|
1249
|
+
* @property {string} type
|
|
1250
|
+
* @public
|
|
1251
|
+
*/
|
|
946
1252
|
type: string;
|
|
947
1253
|
/**
|
|
948
1254
|
* Options for hasMany are mandatory.
|
|
@@ -1055,11 +1361,33 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
1055
1361
|
*
|
|
1056
1362
|
* This is the legacy version of the `CollectionField`.
|
|
1057
1363
|
*
|
|
1058
|
-
* @
|
|
1364
|
+
* @class <Type> LinksModeHasManyField
|
|
1365
|
+
* @public
|
|
1059
1366
|
*/
|
|
1060
1367
|
export interface LinksModeHasManyField {
|
|
1368
|
+
/**
|
|
1369
|
+
* The kind of field this is.
|
|
1370
|
+
*
|
|
1371
|
+
* @property {'hasMany'} kind
|
|
1372
|
+
* @public
|
|
1373
|
+
*/
|
|
1061
1374
|
kind: 'hasMany';
|
|
1375
|
+
/**
|
|
1376
|
+
* The name of the field.
|
|
1377
|
+
*
|
|
1378
|
+
* @property {string} name
|
|
1379
|
+
* @public
|
|
1380
|
+
*/
|
|
1062
1381
|
name: string;
|
|
1382
|
+
/**
|
|
1383
|
+
* the name of the resource that this field
|
|
1384
|
+
* refers to. In the case of a polymorphic
|
|
1385
|
+
* relationship, this should be the trait
|
|
1386
|
+
* or abstract type.
|
|
1387
|
+
*
|
|
1388
|
+
* @property {string} type
|
|
1389
|
+
* @public
|
|
1390
|
+
*/
|
|
1063
1391
|
type: string;
|
|
1064
1392
|
/**
|
|
1065
1393
|
* Options for hasMany are mandatory.
|
|
@@ -1172,13 +1500,46 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
1172
1500
|
/**
|
|
1173
1501
|
* A union of all possible LegacyMode field schemas.
|
|
1174
1502
|
*
|
|
1175
|
-
*
|
|
1503
|
+
* Available field schemas are:
|
|
1504
|
+
*
|
|
1505
|
+
* - [GenericField](../classes/<Type>%20GenericField)
|
|
1506
|
+
* - [LegacyAliasField](../classes/<Type>%20LegacyAliasField)
|
|
1507
|
+
* - [LocalField](../classes/<Type>%20LocalField)
|
|
1508
|
+
* - [ObjectField](../classes/<Type>%20ObjectField)
|
|
1509
|
+
* - [SchemaObjectField](../classes/<Type>%20SchemaObjectField)
|
|
1510
|
+
* - [ArrayField](../classes/<Type>%20ArrayField)
|
|
1511
|
+
* - [SchemaArrayField](../classes/<Type>%20SchemaArrayField)
|
|
1512
|
+
* - [DerivedField](../classes/<Type>%20DerivedField)
|
|
1513
|
+
* - [ResourceField (not yet implemented)](../classes/<Type>%20ResourceField)
|
|
1514
|
+
* - [CollectionField (not yet implemented)](../classes/<Type>%20CollectionField)
|
|
1515
|
+
* - [LegacyAttributeField](../classes/<Type>%20LegacyAttributeField)
|
|
1516
|
+
* - [LegacyBelongsToField](../classes/<Type>%20LegacyBelongsToField)
|
|
1517
|
+
* - [LegacyHasManyField](../classes/<Type>%20LegacyHasManyField)
|
|
1518
|
+
*
|
|
1519
|
+
* @class <Type> LegacyModeFieldSchema
|
|
1520
|
+
* @public
|
|
1176
1521
|
*/
|
|
1177
1522
|
export type LegacyModeFieldSchema = GenericField | LegacyAliasField | LocalField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | DerivedField | LegacyAttributeField | LegacyBelongsToField | LegacyHasManyField;
|
|
1178
1523
|
/**
|
|
1179
1524
|
* A union of all possible PolarisMode field schemas.
|
|
1180
1525
|
*
|
|
1181
|
-
*
|
|
1526
|
+
* Available field schemas are:
|
|
1527
|
+
*
|
|
1528
|
+
* - [GenericField](../classes/<Type>%20GenericField)
|
|
1529
|
+
* - [PolarisAliasField](../classes/<Type>%20PolarisAliasField)
|
|
1530
|
+
* - [LocalField](../classes/<Type>%20LocalField)
|
|
1531
|
+
* - [ObjectField](../classes/<Type>%20ObjectField)
|
|
1532
|
+
* - [SchemaObjectField](../classes/<Type>%20SchemaObjectField)
|
|
1533
|
+
* - [ArrayField](../classes/<Type>%20ArrayField)
|
|
1534
|
+
* - [SchemaArrayField](../classes/<Type>%20SchemaArrayField)
|
|
1535
|
+
* - [DerivedField](../classes/<Type>%20DerivedField)
|
|
1536
|
+
* - [ResourceField (not yet implemented)](../classes/<Type>%20ResourceField)
|
|
1537
|
+
* - [CollectionField (not yet implemented)](../classes/<Type>%20CollectionField)
|
|
1538
|
+
* - [LinksModeBelongsToField](../classes/<Type>%20LinksModeBelongsToField)
|
|
1539
|
+
* - [LinksModeHasManyField](../classes/<Type>%20LinksModeHasManyField)
|
|
1540
|
+
*
|
|
1541
|
+
* @class <Type> PolarisModeFieldSchema
|
|
1542
|
+
* @public
|
|
1182
1543
|
*/
|
|
1183
1544
|
export type PolarisModeFieldSchema = GenericField | PolarisAliasField | LocalField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | DerivedField | LinksModeBelongsToField | LinksModeHasManyField;
|
|
1184
1545
|
/**
|
|
@@ -1190,14 +1551,16 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
1190
1551
|
* as appropriate as they are more specific and will
|
|
1191
1552
|
* provide better guidance around what is valid.
|
|
1192
1553
|
*
|
|
1193
|
-
* @
|
|
1554
|
+
* @class <Type> FieldSchema
|
|
1555
|
+
* @public
|
|
1194
1556
|
*/
|
|
1195
1557
|
export type FieldSchema = GenericField | LegacyAliasField | PolarisAliasField | LocalField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | DerivedField | ResourceField | CollectionField | LegacyAttributeField | LegacyBelongsToField | LegacyHasManyField | LinksModeBelongsToField | LinksModeHasManyField;
|
|
1196
1558
|
/**
|
|
1197
1559
|
* A union of all possible field schemas that can be
|
|
1198
1560
|
* used in an ObjectSchema.
|
|
1199
1561
|
*
|
|
1200
|
-
* @
|
|
1562
|
+
* @class <Type> ObjectFieldSchema
|
|
1563
|
+
* @public
|
|
1201
1564
|
*/
|
|
1202
1565
|
export type ObjectFieldSchema = GenericField | ObjectAliasField | LocalField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | DerivedField;
|
|
1203
1566
|
/**
|
|
@@ -1207,7 +1570,8 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
1207
1570
|
* own which may allow them to appear in relationships, or in multiple
|
|
1208
1571
|
* response documents.
|
|
1209
1572
|
*
|
|
1210
|
-
* @
|
|
1573
|
+
* @class <Type> PolarisResourceSchema
|
|
1574
|
+
* @public
|
|
1211
1575
|
*/
|
|
1212
1576
|
export interface PolarisResourceSchema {
|
|
1213
1577
|
legacy?: false;
|
|
@@ -1216,7 +1580,8 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
1216
1580
|
*
|
|
1217
1581
|
* for schema-objects, this should be either a HashField or null
|
|
1218
1582
|
*
|
|
1219
|
-
* @
|
|
1583
|
+
* @property {IdentityField} identity
|
|
1584
|
+
* @public
|
|
1220
1585
|
*/
|
|
1221
1586
|
identity: IdentityField;
|
|
1222
1587
|
/**
|
|
@@ -1238,13 +1603,15 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
1238
1603
|
* - for resource-specific objects: The pattern `$${ResourceKlassName}:$field:${KlassName}` e.g. `$User:$field:ReusableAddress`
|
|
1239
1604
|
* - for inline objects: The pattern `$${ResourceKlassName}.${fieldPath}:$field:anonymous` e.g. `$User.shippingAddress:$field:anonymous`
|
|
1240
1605
|
*
|
|
1241
|
-
* @
|
|
1606
|
+
* @property {string} type
|
|
1607
|
+
* @public
|
|
1242
1608
|
*/
|
|
1243
1609
|
type: string;
|
|
1244
1610
|
/**
|
|
1245
1611
|
* The fields that make up the shape of the resource
|
|
1246
1612
|
*
|
|
1247
|
-
* @
|
|
1613
|
+
* @property {PolarisModeFieldSchema[]} fields
|
|
1614
|
+
* @public
|
|
1248
1615
|
*/
|
|
1249
1616
|
fields: PolarisModeFieldSchema[];
|
|
1250
1617
|
/**
|
|
@@ -1255,7 +1622,8 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
1255
1622
|
* resource schema. The trait can be abstract and reference a resource
|
|
1256
1623
|
* type that is never defined as a schema.
|
|
1257
1624
|
*
|
|
1258
|
-
* @
|
|
1625
|
+
* @property {string[]} traits
|
|
1626
|
+
* @public
|
|
1259
1627
|
*/
|
|
1260
1628
|
traits?: string[];
|
|
1261
1629
|
}
|
|
@@ -1266,16 +1634,26 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
1266
1634
|
* own which may allow them to appear in relationships, or in multiple
|
|
1267
1635
|
* response documents.
|
|
1268
1636
|
*
|
|
1269
|
-
* @
|
|
1637
|
+
* @class <Type> LegacyResourceSchema
|
|
1638
|
+
* @public
|
|
1270
1639
|
*/
|
|
1271
1640
|
export interface LegacyResourceSchema {
|
|
1641
|
+
/**
|
|
1642
|
+
* A flag indicating that this is a legacy resource schema
|
|
1643
|
+
*
|
|
1644
|
+
* @property {true} legacy
|
|
1645
|
+
* @public
|
|
1646
|
+
*/
|
|
1272
1647
|
legacy: true;
|
|
1273
1648
|
/**
|
|
1274
|
-
*
|
|
1649
|
+
* This should be an IdentityField.
|
|
1275
1650
|
*
|
|
1276
|
-
*
|
|
1651
|
+
* To maximize compatibility with Model where `id` was the
|
|
1652
|
+
* name of the identity field, we recommend using `{ kind: '@id', name: 'id' }`
|
|
1653
|
+
* for records in legacy mode, but this is not required.
|
|
1277
1654
|
*
|
|
1278
|
-
* @
|
|
1655
|
+
* @property {IdentityField} identity
|
|
1656
|
+
* @public
|
|
1279
1657
|
*/
|
|
1280
1658
|
identity: IdentityField;
|
|
1281
1659
|
/**
|
|
@@ -1284,9 +1662,6 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
1284
1662
|
* For cacheable resources, this should be the
|
|
1285
1663
|
* primary resource type.
|
|
1286
1664
|
*
|
|
1287
|
-
* For object schemas, this should be the name
|
|
1288
|
-
* of the object schema.
|
|
1289
|
-
*
|
|
1290
1665
|
* The names of object and resource schemas share
|
|
1291
1666
|
* a single namespace and must not conflict.
|
|
1292
1667
|
*
|
|
@@ -1297,13 +1672,15 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
1297
1672
|
* - for resource-specific objects: The pattern `$${ResourceKlassName}:$field:${KlassName}` e.g. `$User:$field:ReusableAddress`
|
|
1298
1673
|
* - for inline objects: The pattern `$${ResourceKlassName}.${fieldPath}:$field:anonymous` e.g. `$User.shippingAddress:$field:anonymous`
|
|
1299
1674
|
*
|
|
1300
|
-
* @
|
|
1675
|
+
* @property {string} type
|
|
1676
|
+
* @public
|
|
1301
1677
|
*/
|
|
1302
1678
|
type: string;
|
|
1303
1679
|
/**
|
|
1304
1680
|
* The fields that make up the shape of the resource
|
|
1305
1681
|
*
|
|
1306
|
-
* @
|
|
1682
|
+
* @property {LegacyModeFieldSchema[]} fields
|
|
1683
|
+
* @public
|
|
1307
1684
|
*/
|
|
1308
1685
|
fields: LegacyModeFieldSchema[];
|
|
1309
1686
|
/**
|
|
@@ -1314,7 +1691,8 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
1314
1691
|
* resource schema. The trait can be abstract and reference a resource
|
|
1315
1692
|
* type that is never defined as a schema.
|
|
1316
1693
|
*
|
|
1317
|
-
* @
|
|
1694
|
+
* @property {string[]} traits
|
|
1695
|
+
* @public
|
|
1318
1696
|
*/
|
|
1319
1697
|
traits?: string[];
|
|
1320
1698
|
}
|
|
@@ -1336,7 +1714,8 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
1336
1714
|
*
|
|
1337
1715
|
* ObjectSchemas may not currently contain relationships.
|
|
1338
1716
|
*
|
|
1339
|
-
* @
|
|
1717
|
+
* @class <Type> ObjectSchema
|
|
1718
|
+
* @public
|
|
1340
1719
|
*/
|
|
1341
1720
|
export interface ObjectSchema {
|
|
1342
1721
|
/**
|
|
@@ -1346,7 +1725,8 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
1346
1725
|
* on the referential identity of the object in the cache itself
|
|
1347
1726
|
* when an identity is needed.
|
|
1348
1727
|
*
|
|
1349
|
-
* @
|
|
1728
|
+
* @property {HashField | null} identity
|
|
1729
|
+
* @public
|
|
1350
1730
|
*/
|
|
1351
1731
|
identity: HashField | null;
|
|
1352
1732
|
/**
|
|
@@ -1362,13 +1742,15 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
1362
1742
|
* - for resource-specific objects: The pattern `$${ResourceKlassName}:$field:${KlassName}` e.g. `$User:$field:ReusableAddress`
|
|
1363
1743
|
* - for inline objects: The pattern `$${ResourceKlassName}.${fieldPath}:$field:anonymous` e.g. `$User.shippingAddress:$field:anonymous`
|
|
1364
1744
|
*
|
|
1365
|
-
* @
|
|
1745
|
+
* @property {string} type
|
|
1746
|
+
* @public
|
|
1366
1747
|
*/
|
|
1367
1748
|
type: string;
|
|
1368
1749
|
/**
|
|
1369
1750
|
* The fields that make up the shape of the object
|
|
1370
1751
|
*
|
|
1371
|
-
* @
|
|
1752
|
+
* @property {ObjectFieldSchema[]} fields
|
|
1753
|
+
* @public
|
|
1372
1754
|
*/
|
|
1373
1755
|
fields: ObjectFieldSchema[];
|
|
1374
1756
|
}
|
|
@@ -1387,7 +1769,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
1387
1769
|
* @static
|
|
1388
1770
|
* @for @warp-drive/core-types
|
|
1389
1771
|
* @param {ResourceSchema} schema
|
|
1390
|
-
* @
|
|
1772
|
+
* @return {ResourceSchema} the passed in schema
|
|
1391
1773
|
* @public
|
|
1392
1774
|
*/
|
|
1393
1775
|
export function resourceSchema<T extends ResourceSchema>(schema: T): T;
|
|
@@ -1401,7 +1783,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
1401
1783
|
* @static
|
|
1402
1784
|
* @for @warp-drive/core-types
|
|
1403
1785
|
* @param {ObjectSchema} schema
|
|
1404
|
-
* @
|
|
1786
|
+
* @return {ObjectSchema} the passed in schema
|
|
1405
1787
|
* @public
|
|
1406
1788
|
*/
|
|
1407
1789
|
export function objectSchema<T extends ObjectSchema>(schema: T): T;
|
|
@@ -1412,7 +1794,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
1412
1794
|
* @static
|
|
1413
1795
|
* @for @warp-drive/core-types
|
|
1414
1796
|
* @param schema
|
|
1415
|
-
* @
|
|
1797
|
+
* @return {boolean}
|
|
1416
1798
|
* @public
|
|
1417
1799
|
*/
|
|
1418
1800
|
export function isResourceSchema(schema: ResourceSchema | ObjectSchema): schema is ResourceSchema;
|
|
@@ -1423,7 +1805,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
1423
1805
|
* @static
|
|
1424
1806
|
* @for @warp-drive/core-types
|
|
1425
1807
|
* @param schema
|
|
1426
|
-
* @
|
|
1808
|
+
* @return {boolean}
|
|
1427
1809
|
* @public
|
|
1428
1810
|
*/
|
|
1429
1811
|
export function isLegacyResourceSchema(schema: ResourceSchema | ObjectSchema): schema is LegacyResourceSchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../../src/schema/fields.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/D
|
|
1
|
+
{"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../../src/schema/fields.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC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