@warp-drive-types/core-types 4.13.0-alpha.5 → 4.13.0-alpha.6
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/-private.d.ts +1 -1
- package/unstable-preview-types/-private.d.ts.map +1 -1
- package/unstable-preview-types/identifier.d.ts.map +1 -1
- package/unstable-preview-types/index.d.ts +9 -0
- package/unstable-preview-types/index.d.ts.map +1 -1
- package/unstable-preview-types/runtime.d.ts +18 -0
- package/unstable-preview-types/runtime.d.ts.map +1 -0
- package/unstable-preview-types/schema/fields.d.ts +598 -41
- package/unstable-preview-types/schema/fields.d.ts.map +1 -1
- package/unstable-preview-types/schema/fields.type-test.d.ts +4 -0
- package/unstable-preview-types/schema/fields.type-test.d.ts.map +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare module '@warp-drive/core-types/-private' {
|
|
2
2
|
type UniversalTransientKey = 'REQ_ID';
|
|
3
|
-
type UniversalKey = `(transient) ${UniversalTransientKey}` | 'RequestMap' | 'PromiseCache' | 'RequestCache' | 'SkipCache' | 'EnableHydration';
|
|
3
|
+
type UniversalKey = `(transient) ${UniversalTransientKey}` | 'RequestMap' | 'PromiseCache' | 'RequestCache' | 'SkipCache' | 'EnableHydration' | 'WarpDriveRuntimeConfig';
|
|
4
4
|
type TransientKey = 'TRANSACTION' | 'transactionRef' | 'configuredGenerationMethod' | 'configuredUpdateMethod' | 'configuredForgetMethod' | 'configuredResetMethod' | 'configuredKeyInfoMethod';
|
|
5
5
|
type GlobalKey = `(transient) ${TransientKey}` | 'AdapterError' | 'InvalidError' | 'TimeoutError' | 'AbortError' | 'UnauthorizedError' | 'ForbiddenError' | 'NotFoundError' | 'ConflictError' | 'ServerError' | 'Signals' | 'AvailableShims' | 'FAKE_ARR' | '#signal' | '#source' | '#update' | '#notify' | 'IS_COLLECTION' | 'Touching' | 'RequestPromise' | 'SaveOp' | 'LEGACY_SUPPORT' | 'LegacySupport' | 'Graphs' | 'IS_FROZEN' | 'IS_CACHE_HANDLER' | 'CONFIG' | 'DEBUG_MAP' | 'IDENTIFIERS' | 'DOCUMENTS' | 'CacheForIdentifierCache' | 'RecordCache' | 'StoreMap' | 'Store' | '$type' | 'TransformName' | 'RequestSignature' | 'IS_FUTURE' | 'DOC' | 'ManagedArrayMap' | 'ManagedObjectMap' | 'Support' | 'SOURCE' | 'MUTATE' | 'ARRAY_SIGNAL' | 'OBJECT_SIGNAL' | 'NOTIFY' | 'Destroy' | 'Identifier' | 'Editable' | 'EmbeddedPath' | 'EmbeddedType' | 'Parent' | 'Checkout' | 'Legacy';
|
|
6
6
|
type UniqueSymbol<T extends string> = `___(unique) Symbol(${T})`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"-private.d.ts","sourceRoot":"","sources":["../src/-private.ts"],"names":[],"mappings":"AAMA,KAAK,qBAAqB,GAExB,QAAQ,CAAC;AAEX,KAAK,YAAY,GACb,eAAe,qBAAqB,EAAE,GAEtC,YAAY,GACZ,cAAc,GACd,cAAc,GAEd,WAAW,GACX,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"-private.d.ts","sourceRoot":"","sources":["../src/-private.ts"],"names":[],"mappings":"AAMA,KAAK,qBAAqB,GAExB,QAAQ,CAAC;AAEX,KAAK,YAAY,GACb,eAAe,qBAAqB,EAAE,GAEtC,YAAY,GACZ,cAAc,GACd,cAAc,GAEd,WAAW,GACX,iBAAiB,GAEjB,wBAAwB,CAAC;AAE7B,KAAK,YAAY,GAEb,aAAa,GAEb,gBAAgB,GAEhB,4BAA4B,GAC5B,wBAAwB,GACxB,wBAAwB,GACxB,uBAAuB,GACvB,yBAAyB,CAAC;AAE9B,KAAK,SAAS,GACV,eAAe,YAAY,EAAE,GAE7B,cAAc,GACd,cAAc,GACd,cAAc,GACd,YAAY,GACZ,mBAAmB,GACnB,gBAAgB,GAChB,eAAe,GACf,eAAe,GACf,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C,CAAC,CAWnG;AAED,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,GAAG,EAAE,qBAAqB,GAAG,CAAC,GAAG,IAAI,CAG9E;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,GAAG,EAAE,qBAAqB,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAGhF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identifier.d.ts","sourceRoot":"","sources":["../src/identifier.ts"],"names":[],"mappings":"AAAA;;EAEE;AAKF,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,
|
|
1
|
+
{"version":3,"file":"identifier.d.ts","sourceRoot":"","sources":["../src/identifier.ts"],"names":[],"mappings":"AAAA;;EAEE;AAKF,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,GAAG,MAAM,CAAE,SAAQ,UAAU;IAChF,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IACl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AAC,CAAC,CAAC,CAAC"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
/// <reference path="./params.d.ts" />
|
|
7
7
|
/// <reference path="./record.type-test.d.ts" />
|
|
8
8
|
/// <reference path="./request.d.ts" />
|
|
9
|
+
/// <reference path="./runtime.d.ts" />
|
|
9
10
|
/// <reference path="./cache.d.ts" />
|
|
10
11
|
/// <reference path="./symbols.d.ts" />
|
|
11
12
|
/// <reference path="./cache/change.d.ts" />
|
|
@@ -15,11 +16,19 @@
|
|
|
15
16
|
/// <reference path="./cache/mutations.d.ts" />
|
|
16
17
|
/// <reference path="./json/raw.d.ts" />
|
|
17
18
|
/// <reference path="./schema/concepts.d.ts" />
|
|
19
|
+
/// <reference path="./schema/fields.type-test.d.ts" />
|
|
18
20
|
/// <reference path="./schema/fields.d.ts" />
|
|
19
21
|
/// <reference path="./spec/error.d.ts" />
|
|
20
22
|
/// <reference path="./spec/document.d.ts" />
|
|
21
23
|
/// <reference path="./spec/json-api-raw.d.ts" />
|
|
22
24
|
declare module '@warp-drive/core-types' {
|
|
25
|
+
/**
|
|
26
|
+
* This package provides core types, type-utilities, symbols
|
|
27
|
+
* and constants used across the WarpDrive ecosystem.
|
|
28
|
+
*
|
|
29
|
+
* @module @warp-drive/core-types
|
|
30
|
+
* @main @warp-drive/core-types
|
|
31
|
+
*/
|
|
23
32
|
export type { StableRecordIdentifier } from '@warp-drive/core-types/identifier';
|
|
24
33
|
}
|
|
25
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,YAAY,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare module '@warp-drive/core-types/runtime' {
|
|
2
|
+
import type { LOG_CONFIG } from '@warp-drive/build-config/-private/utils/logging';
|
|
3
|
+
const RuntimeConfig: {
|
|
4
|
+
debug: Partial<LOG_CONFIG>;
|
|
5
|
+
};
|
|
6
|
+
export function getRuntimeConfig(): typeof RuntimeConfig;
|
|
7
|
+
/**
|
|
8
|
+
* Upserts the specified logging configuration into the runtime
|
|
9
|
+
* config.
|
|
10
|
+
*
|
|
11
|
+
* globalThis.setWarpDriveLogging({ LOG_PAYLOADS: true } });
|
|
12
|
+
*
|
|
13
|
+
* @typedoc
|
|
14
|
+
*/
|
|
15
|
+
export function setLogging(config: Partial<LOG_CONFIG>): void;
|
|
16
|
+
export {};
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +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;AAOH,wBAAgB,gBAAgB,IAAI,OAAO,aAAa,CAEvD;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,CAG5D"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
declare module '@warp-drive/core-types/schema/fields' {
|
|
2
|
+
/**
|
|
3
|
+
* @module @warp-drive/core-types
|
|
4
|
+
*/
|
|
2
5
|
import type { ObjectValue, PrimitiveValue } from '@warp-drive/core-types/json/raw';
|
|
3
6
|
/**
|
|
4
7
|
* A generic "field" that can be used to define
|
|
@@ -16,7 +19,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
16
19
|
*
|
|
17
20
|
* @typedoc
|
|
18
21
|
*/
|
|
19
|
-
export
|
|
22
|
+
export interface GenericField {
|
|
20
23
|
kind: 'field';
|
|
21
24
|
name: string;
|
|
22
25
|
/**
|
|
@@ -33,7 +36,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
33
36
|
* @typedoc
|
|
34
37
|
*/
|
|
35
38
|
options?: ObjectValue;
|
|
36
|
-
}
|
|
39
|
+
}
|
|
37
40
|
/**
|
|
38
41
|
* A field that can be used to alias one key to another
|
|
39
42
|
* key present in the cache version of the resource.
|
|
@@ -62,7 +65,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
62
65
|
*
|
|
63
66
|
* @typedoc
|
|
64
67
|
*/
|
|
65
|
-
export
|
|
68
|
+
export interface LegacyAliasField {
|
|
66
69
|
kind: 'alias';
|
|
67
70
|
name: string;
|
|
68
71
|
type: null;
|
|
@@ -71,8 +74,86 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
71
74
|
*
|
|
72
75
|
* @typedoc
|
|
73
76
|
*/
|
|
74
|
-
options: GenericField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField |
|
|
75
|
-
}
|
|
77
|
+
options: GenericField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | LegacyAttributeField | LegacyBelongsToField | LegacyHasManyField;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* A field that can be used to alias one key to another
|
|
81
|
+
* key present in the cache version of the resource.
|
|
82
|
+
*
|
|
83
|
+
* Unlike DerivedField, an AliasField may write to its
|
|
84
|
+
* source when a record is in an editable mode.
|
|
85
|
+
*
|
|
86
|
+
* AliasFields may utilize a transform, specified by type,
|
|
87
|
+
* to pre/post process the field.
|
|
88
|
+
*
|
|
89
|
+
* An AliasField may also specify a `kind` via options.
|
|
90
|
+
* `kind` may be any other valid field kind other than
|
|
91
|
+
*
|
|
92
|
+
* - `@hash`
|
|
93
|
+
* - `@id`
|
|
94
|
+
* - `@local`
|
|
95
|
+
* - `derived`
|
|
96
|
+
*
|
|
97
|
+
* This allows an AliasField to rename any field in the cache.
|
|
98
|
+
*
|
|
99
|
+
* Alias fields are generally intended to be used to support migrating
|
|
100
|
+
* between different schemas, though there are times where they are useful
|
|
101
|
+
* as a form of advanced derivation when used with a transform. For instance,
|
|
102
|
+
* an AliasField could be used to expose both a string and a Date version of the
|
|
103
|
+
* same field, with both being capable of being written to.
|
|
104
|
+
*
|
|
105
|
+
* @typedoc
|
|
106
|
+
*/
|
|
107
|
+
export interface PolarisAliasField {
|
|
108
|
+
kind: 'alias';
|
|
109
|
+
name: string;
|
|
110
|
+
type: null;
|
|
111
|
+
/**
|
|
112
|
+
* The field def for which this is an alias.
|
|
113
|
+
*
|
|
114
|
+
* @typedoc
|
|
115
|
+
*/
|
|
116
|
+
options: GenericField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | LinksModeBelongsToField | LinksModeHasManyField;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* A field that can be used to alias one key to another
|
|
120
|
+
* key present in the cache version of the resource.
|
|
121
|
+
*
|
|
122
|
+
* Unlike DerivedField, an AliasField may write to its
|
|
123
|
+
* source when a record is in an editable mode.
|
|
124
|
+
*
|
|
125
|
+
* AliasFields may utilize a transform, specified by type,
|
|
126
|
+
* to pre/post process the field.
|
|
127
|
+
*
|
|
128
|
+
* An AliasField may also specify a `kind` via options.
|
|
129
|
+
* `kind` may be any other valid field kind other than
|
|
130
|
+
*
|
|
131
|
+
* - `@hash`
|
|
132
|
+
* - `@id`
|
|
133
|
+
* - `@local`
|
|
134
|
+
* - `derived`
|
|
135
|
+
*
|
|
136
|
+
* This allows an AliasField to rename any field in the cache.
|
|
137
|
+
*
|
|
138
|
+
* Alias fields are generally intended to be used to support migrating
|
|
139
|
+
* between different schemas, though there are times where they are useful
|
|
140
|
+
* as a form of advanced derivation when used with a transform. For instance,
|
|
141
|
+
* an AliasField could be used to expose both a string and a Date version of the
|
|
142
|
+
* same field, with both being capable of being written to.
|
|
143
|
+
*
|
|
144
|
+
* @typedoc
|
|
145
|
+
*/
|
|
146
|
+
export interface ObjectAliasField {
|
|
147
|
+
kind: 'alias';
|
|
148
|
+
name: string;
|
|
149
|
+
type: null;
|
|
150
|
+
/**
|
|
151
|
+
* The field def for which this is an alias.
|
|
152
|
+
*
|
|
153
|
+
* @typedoc
|
|
154
|
+
*/
|
|
155
|
+
options: GenericField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField;
|
|
156
|
+
}
|
|
76
157
|
/**
|
|
77
158
|
* Represents a field whose value is the primary
|
|
78
159
|
* key of the resource.
|
|
@@ -87,7 +168,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
87
168
|
*
|
|
88
169
|
* @typedoc
|
|
89
170
|
*/
|
|
90
|
-
export
|
|
171
|
+
export interface IdentityField {
|
|
91
172
|
kind: '@id';
|
|
92
173
|
/**
|
|
93
174
|
* The name of the field that serves as the
|
|
@@ -96,7 +177,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
96
177
|
* @typedoc
|
|
97
178
|
*/
|
|
98
179
|
name: string;
|
|
99
|
-
}
|
|
180
|
+
}
|
|
100
181
|
/**
|
|
101
182
|
* Represents a specialized field whose computed value
|
|
102
183
|
* will be used as the primary key of a schema-object
|
|
@@ -120,7 +201,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
120
201
|
*
|
|
121
202
|
* @typedoc
|
|
122
203
|
*/
|
|
123
|
-
export
|
|
204
|
+
export interface HashField {
|
|
124
205
|
kind: '@hash';
|
|
125
206
|
/**
|
|
126
207
|
* The name of the field that serves as the
|
|
@@ -147,7 +228,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
147
228
|
* @typedoc
|
|
148
229
|
*/
|
|
149
230
|
options?: ObjectValue;
|
|
150
|
-
}
|
|
231
|
+
}
|
|
151
232
|
/**
|
|
152
233
|
* Represents a field whose value is a local
|
|
153
234
|
* value that is not stored in the cache, nor
|
|
@@ -177,7 +258,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
177
258
|
*
|
|
178
259
|
* @typedoc
|
|
179
260
|
*/
|
|
180
|
-
export
|
|
261
|
+
export interface LocalField {
|
|
181
262
|
kind: '@local';
|
|
182
263
|
name: string;
|
|
183
264
|
/**
|
|
@@ -190,7 +271,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
190
271
|
options?: {
|
|
191
272
|
defaultValue?: PrimitiveValue;
|
|
192
273
|
};
|
|
193
|
-
}
|
|
274
|
+
}
|
|
194
275
|
/**
|
|
195
276
|
* Represents a field whose value is an object
|
|
196
277
|
* with keys pointing to values that are primitive
|
|
@@ -202,7 +283,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
202
283
|
*
|
|
203
284
|
* @typedoc
|
|
204
285
|
*/
|
|
205
|
-
export
|
|
286
|
+
export interface ObjectField {
|
|
206
287
|
kind: 'object';
|
|
207
288
|
name: string;
|
|
208
289
|
/**
|
|
@@ -221,7 +302,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
221
302
|
* @typedoc
|
|
222
303
|
*/
|
|
223
304
|
options?: ObjectValue;
|
|
224
|
-
}
|
|
305
|
+
}
|
|
225
306
|
/**
|
|
226
307
|
* Represents a field whose value is an object
|
|
227
308
|
* with a well-defined structure described by
|
|
@@ -232,7 +313,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
232
313
|
*
|
|
233
314
|
* @typedoc
|
|
234
315
|
*/
|
|
235
|
-
export
|
|
316
|
+
export interface SchemaObjectField {
|
|
236
317
|
kind: 'schema-object';
|
|
237
318
|
name: string;
|
|
238
319
|
/**
|
|
@@ -263,7 +344,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
263
344
|
*/
|
|
264
345
|
type?: string;
|
|
265
346
|
};
|
|
266
|
-
}
|
|
347
|
+
}
|
|
267
348
|
/**
|
|
268
349
|
* Represents a field whose value is an array
|
|
269
350
|
* of primitive values.
|
|
@@ -273,7 +354,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
273
354
|
*
|
|
274
355
|
* @typedoc
|
|
275
356
|
*/
|
|
276
|
-
export
|
|
357
|
+
export interface ArrayField {
|
|
277
358
|
kind: 'array';
|
|
278
359
|
name: string;
|
|
279
360
|
/**
|
|
@@ -293,7 +374,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
293
374
|
* @typedoc
|
|
294
375
|
*/
|
|
295
376
|
options?: ObjectValue;
|
|
296
|
-
}
|
|
377
|
+
}
|
|
297
378
|
/**
|
|
298
379
|
* Represents a field whose value is an array
|
|
299
380
|
* of objects with a well-defined structure
|
|
@@ -304,7 +385,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
304
385
|
*
|
|
305
386
|
* @typedoc
|
|
306
387
|
*/
|
|
307
|
-
export
|
|
388
|
+
export interface SchemaArrayField {
|
|
308
389
|
kind: 'schema-array';
|
|
309
390
|
name: string;
|
|
310
391
|
/**
|
|
@@ -369,7 +450,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
369
450
|
*/
|
|
370
451
|
type?: string;
|
|
371
452
|
};
|
|
372
|
-
}
|
|
453
|
+
}
|
|
373
454
|
/**
|
|
374
455
|
* Represents a field whose value is derived
|
|
375
456
|
* from other fields in the schema.
|
|
@@ -386,7 +467,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
386
467
|
*
|
|
387
468
|
* @typedoc
|
|
388
469
|
*/
|
|
389
|
-
export
|
|
470
|
+
export interface DerivedField {
|
|
390
471
|
kind: 'derived';
|
|
391
472
|
name: string;
|
|
392
473
|
/**
|
|
@@ -418,14 +499,17 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
418
499
|
* @typedoc
|
|
419
500
|
*/
|
|
420
501
|
options?: ObjectValue;
|
|
421
|
-
}
|
|
502
|
+
}
|
|
422
503
|
/**
|
|
423
504
|
* Represents a field that is a reference to
|
|
424
505
|
* another resource.
|
|
425
506
|
*
|
|
507
|
+
* SUPPORT FOR THIS FEATURE IS NOT YET IMPLEMENTED
|
|
508
|
+
* BY SchemaRecord
|
|
509
|
+
*
|
|
426
510
|
* @typedoc
|
|
427
511
|
*/
|
|
428
|
-
export
|
|
512
|
+
export interface ResourceField {
|
|
429
513
|
kind: 'resource';
|
|
430
514
|
name: string;
|
|
431
515
|
/**
|
|
@@ -486,15 +570,18 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
486
570
|
*/
|
|
487
571
|
polymorphic?: boolean;
|
|
488
572
|
};
|
|
489
|
-
}
|
|
573
|
+
}
|
|
490
574
|
/**
|
|
491
575
|
* Represents a field that is a reference to
|
|
492
576
|
* a collection of other resources, potentially
|
|
493
577
|
* paginate.
|
|
494
578
|
*
|
|
579
|
+
* SUPPORT FOR THIS FEATURE IS NOT YET IMPLEMENTED
|
|
580
|
+
* BY SchemaRecord
|
|
581
|
+
*
|
|
495
582
|
* @typedoc
|
|
496
583
|
*/
|
|
497
|
-
export
|
|
584
|
+
export interface CollectionField {
|
|
498
585
|
kind: 'collection';
|
|
499
586
|
name: string;
|
|
500
587
|
/**
|
|
@@ -566,10 +653,11 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
566
653
|
*/
|
|
567
654
|
polymorphic?: boolean;
|
|
568
655
|
};
|
|
569
|
-
}
|
|
656
|
+
}
|
|
570
657
|
/**
|
|
571
658
|
* > [!CAUTION]
|
|
572
659
|
* > This Field is LEGACY
|
|
660
|
+
* > It cannot be used with PolarisMode
|
|
573
661
|
*
|
|
574
662
|
* A generic "field" that can be used to define
|
|
575
663
|
* primitive value fields.
|
|
@@ -583,7 +671,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
583
671
|
*
|
|
584
672
|
* @typedoc
|
|
585
673
|
*/
|
|
586
|
-
export
|
|
674
|
+
export interface LegacyAttributeField {
|
|
587
675
|
kind: 'attribute';
|
|
588
676
|
name: string;
|
|
589
677
|
/**
|
|
@@ -601,7 +689,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
601
689
|
* @typedoc
|
|
602
690
|
*/
|
|
603
691
|
options?: ObjectValue;
|
|
604
|
-
}
|
|
692
|
+
}
|
|
605
693
|
/**
|
|
606
694
|
* > [!CAUTION]
|
|
607
695
|
* > This Field is LEGACY
|
|
@@ -613,7 +701,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
613
701
|
*
|
|
614
702
|
* @typedoc
|
|
615
703
|
*/
|
|
616
|
-
export
|
|
704
|
+
export interface LegacyBelongsToField {
|
|
617
705
|
kind: 'belongsTo';
|
|
618
706
|
name: string;
|
|
619
707
|
/**
|
|
@@ -721,7 +809,126 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
721
809
|
*/
|
|
722
810
|
resetOnRemoteUpdate?: false;
|
|
723
811
|
};
|
|
724
|
-
}
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* > [!CAUTION]
|
|
815
|
+
* > This Field is LEGACY
|
|
816
|
+
*
|
|
817
|
+
* Represents a field that is a reference to
|
|
818
|
+
* another resource.
|
|
819
|
+
*
|
|
820
|
+
* This is the legacy version of the `ResourceField`.
|
|
821
|
+
*
|
|
822
|
+
* @typedoc
|
|
823
|
+
*/
|
|
824
|
+
export interface LinksModeBelongsToField {
|
|
825
|
+
kind: 'belongsTo';
|
|
826
|
+
name: string;
|
|
827
|
+
/**
|
|
828
|
+
* The name of the resource that this field
|
|
829
|
+
* refers to. In the case of a polymorphic
|
|
830
|
+
* relationship, this should be the trait
|
|
831
|
+
* or abstract type.
|
|
832
|
+
*
|
|
833
|
+
* @typedoc
|
|
834
|
+
*/
|
|
835
|
+
type: string;
|
|
836
|
+
/**
|
|
837
|
+
* Options for belongsTo are mandatory.
|
|
838
|
+
*
|
|
839
|
+
* @typedoc
|
|
840
|
+
*/
|
|
841
|
+
options: {
|
|
842
|
+
/**
|
|
843
|
+
* Whether the relationship is async
|
|
844
|
+
*
|
|
845
|
+
* MUST be false for PolarisMode + LinksMode
|
|
846
|
+
*
|
|
847
|
+
* @typedoc
|
|
848
|
+
*/
|
|
849
|
+
async: false;
|
|
850
|
+
/**
|
|
851
|
+
* The name of the inverse field on the
|
|
852
|
+
* related resource that points back to
|
|
853
|
+
* this field on this resource to form a
|
|
854
|
+
* bidirectional relationship.
|
|
855
|
+
*
|
|
856
|
+
* If null, the relationship is unidirectional.
|
|
857
|
+
*
|
|
858
|
+
* @typedoc
|
|
859
|
+
*/
|
|
860
|
+
inverse: string | null;
|
|
861
|
+
/**
|
|
862
|
+
* If this field is satisfying a polymorphic
|
|
863
|
+
* relationship on another resource, then this
|
|
864
|
+
* should be set to the trait or abstract type
|
|
865
|
+
* that this resource implements.
|
|
866
|
+
*
|
|
867
|
+
* @typedoc
|
|
868
|
+
*/
|
|
869
|
+
as?: string;
|
|
870
|
+
/**
|
|
871
|
+
* Whether this field is a polymorphic relationship,
|
|
872
|
+
* meaning that it can point to multiple types of
|
|
873
|
+
* resources so long as they implement the trait
|
|
874
|
+
* or abstract type specified in `type`.
|
|
875
|
+
*
|
|
876
|
+
* @typedoc
|
|
877
|
+
*/
|
|
878
|
+
polymorphic?: boolean;
|
|
879
|
+
/**
|
|
880
|
+
* Whether this field should ever make use of the legacy support infra
|
|
881
|
+
* from @ember-data/model and the LegacyNetworkMiddleware for adapters and serializers.
|
|
882
|
+
*
|
|
883
|
+
* MUST be true for PolarisMode + LinksMode
|
|
884
|
+
*
|
|
885
|
+
* When true, none of the legacy support will be utilized. Sync relationships
|
|
886
|
+
* will be expected to already have all their data. When reloading a sync relationship
|
|
887
|
+
* you would be expected to have a `related link` available from a prior relationship
|
|
888
|
+
* payload e.g.
|
|
889
|
+
*
|
|
890
|
+
* ```ts
|
|
891
|
+
* {
|
|
892
|
+
* data: {
|
|
893
|
+
* type: 'user',
|
|
894
|
+
* id: '2',
|
|
895
|
+
* attributes: { name: 'Chris' },
|
|
896
|
+
* relationships: {
|
|
897
|
+
* bestFriend: {
|
|
898
|
+
* links: { related: "/users/1/bestFriend" },
|
|
899
|
+
* data: { type: 'user', id: '1' },
|
|
900
|
+
* }
|
|
901
|
+
* }
|
|
902
|
+
* },
|
|
903
|
+
* included: [
|
|
904
|
+
* { type: 'user', id: '1', attributes: { name: 'Krystan' } }
|
|
905
|
+
* ]
|
|
906
|
+
* }
|
|
907
|
+
* ```
|
|
908
|
+
*
|
|
909
|
+
* Async relationships will be loaded via their link if needed.
|
|
910
|
+
*
|
|
911
|
+
* @typedoc
|
|
912
|
+
*/
|
|
913
|
+
linksMode: true;
|
|
914
|
+
/**
|
|
915
|
+
* When omitted, the cache data for this field will
|
|
916
|
+
* clear local state of all changes except for the
|
|
917
|
+
* addition of records still in the "new" state any
|
|
918
|
+
* time the remote data for this field is updated.
|
|
919
|
+
*
|
|
920
|
+
* When set to `false`, the cache data for this field
|
|
921
|
+
* will instead intelligently commit any changes from
|
|
922
|
+
* local state that are present in the remote data,
|
|
923
|
+
* leaving any remaining changes in local state still.
|
|
924
|
+
*
|
|
925
|
+
* MUST be false for PolarisMode + LinksMode
|
|
926
|
+
*
|
|
927
|
+
* @typedoc
|
|
928
|
+
*/
|
|
929
|
+
resetOnRemoteUpdate: false;
|
|
930
|
+
};
|
|
931
|
+
}
|
|
725
932
|
/**
|
|
726
933
|
* > [!CAUTION]
|
|
727
934
|
* > This Field is LEGACY
|
|
@@ -733,7 +940,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
733
940
|
*
|
|
734
941
|
* @typedoc
|
|
735
942
|
*/
|
|
736
|
-
export
|
|
943
|
+
export interface LegacyHasManyField {
|
|
737
944
|
kind: 'hasMany';
|
|
738
945
|
name: string;
|
|
739
946
|
type: string;
|
|
@@ -838,10 +1045,172 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
838
1045
|
*/
|
|
839
1046
|
resetOnRemoteUpdate?: false;
|
|
840
1047
|
};
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
1048
|
+
}
|
|
1049
|
+
/**
|
|
1050
|
+
* > [!CAUTION]
|
|
1051
|
+
* > This Field is LEGACY
|
|
1052
|
+
*
|
|
1053
|
+
* Represents a field that is a reference to
|
|
1054
|
+
* a collection of other resources.
|
|
1055
|
+
*
|
|
1056
|
+
* This is the legacy version of the `CollectionField`.
|
|
1057
|
+
*
|
|
1058
|
+
* @typedoc
|
|
1059
|
+
*/
|
|
1060
|
+
export interface LinksModeHasManyField {
|
|
1061
|
+
kind: 'hasMany';
|
|
1062
|
+
name: string;
|
|
1063
|
+
type: string;
|
|
1064
|
+
/**
|
|
1065
|
+
* Options for hasMany are mandatory.
|
|
1066
|
+
*
|
|
1067
|
+
* @typedoc
|
|
1068
|
+
*/
|
|
1069
|
+
options: {
|
|
1070
|
+
/**
|
|
1071
|
+
* Whether the relationship is async
|
|
1072
|
+
*
|
|
1073
|
+
* MUST be false for PolarisMode + LinksMode
|
|
1074
|
+
*
|
|
1075
|
+
* If true, it is expected that the cache
|
|
1076
|
+
* data for this field will contain links
|
|
1077
|
+
* or pointers that can be used to fetch
|
|
1078
|
+
* the related resources when needed.
|
|
1079
|
+
*
|
|
1080
|
+
* When false, it is expected that all related
|
|
1081
|
+
* resources are loaded together with this resource,
|
|
1082
|
+
* and that the cache data for this field will
|
|
1083
|
+
* contain the full list of pointers.
|
|
1084
|
+
*
|
|
1085
|
+
* hasMany relationships do not support pagination.
|
|
1086
|
+
*
|
|
1087
|
+
* @typedoc
|
|
1088
|
+
*/
|
|
1089
|
+
async: false;
|
|
1090
|
+
/**
|
|
1091
|
+
* The name of the inverse field on the
|
|
1092
|
+
* related resource that points back to
|
|
1093
|
+
* this field on this resource to form a
|
|
1094
|
+
* bidirectional relationship.
|
|
1095
|
+
*
|
|
1096
|
+
* If null, the relationship is unidirectional.
|
|
1097
|
+
*
|
|
1098
|
+
* @typedoc
|
|
1099
|
+
*/
|
|
1100
|
+
inverse: string | null;
|
|
1101
|
+
/**
|
|
1102
|
+
* If this field is satisfying a polymorphic
|
|
1103
|
+
* relationship on another resource, then this
|
|
1104
|
+
* should be set to the trait or abstract type
|
|
1105
|
+
* that this resource implements.
|
|
1106
|
+
*
|
|
1107
|
+
* @typedoc
|
|
1108
|
+
*/
|
|
1109
|
+
as?: string;
|
|
1110
|
+
/**
|
|
1111
|
+
* Whether this field is a polymorphic relationship,
|
|
1112
|
+
* meaning that it can point to multiple types of
|
|
1113
|
+
* resources so long as they implement the trait
|
|
1114
|
+
* or abstract type specified in `type`.
|
|
1115
|
+
*
|
|
1116
|
+
* @typedoc
|
|
1117
|
+
*/
|
|
1118
|
+
polymorphic?: boolean;
|
|
1119
|
+
/**
|
|
1120
|
+
* Whether this field should ever make use of the legacy support infra
|
|
1121
|
+
* from @ember-data/model and the LegacyNetworkMiddleware for adapters and serializers.
|
|
1122
|
+
*
|
|
1123
|
+
* MUST be true for PolarisMode + LinksMode
|
|
1124
|
+
*
|
|
1125
|
+
* When true, none of the legacy support will be utilized. Sync relationships
|
|
1126
|
+
* will be expected to already have all their data. When reloading a sync relationship
|
|
1127
|
+
* you would be expected to have a `related link` available from a prior relationship
|
|
1128
|
+
* payload e.g.
|
|
1129
|
+
*
|
|
1130
|
+
* ```ts
|
|
1131
|
+
* {
|
|
1132
|
+
* data: {
|
|
1133
|
+
* type: 'user',
|
|
1134
|
+
* id: '2',
|
|
1135
|
+
* attributes: { name: 'Chris' },
|
|
1136
|
+
* relationships: {
|
|
1137
|
+
* bestFriends: {
|
|
1138
|
+
* links: { related: "/users/1/bestFriends" },
|
|
1139
|
+
* data: [ { type: 'user', id: '1' } ],
|
|
1140
|
+
* }
|
|
1141
|
+
* }
|
|
1142
|
+
* },
|
|
1143
|
+
* included: [
|
|
1144
|
+
* { type: 'user', id: '1', attributes: { name: 'Krystan' } }
|
|
1145
|
+
* ]
|
|
1146
|
+
* }
|
|
1147
|
+
* ```
|
|
1148
|
+
*
|
|
1149
|
+
* Async relationships will be loaded via their link if needed.
|
|
1150
|
+
*
|
|
1151
|
+
* @typedoc
|
|
1152
|
+
*/
|
|
1153
|
+
linksMode: true;
|
|
1154
|
+
/**
|
|
1155
|
+
* When omitted, the cache data for this field will
|
|
1156
|
+
* clear local state of all changes except for the
|
|
1157
|
+
* addition of records still in the "new" state any
|
|
1158
|
+
* time the remote data for this field is updated.
|
|
1159
|
+
*
|
|
1160
|
+
* When set to `false`, the cache data for this field
|
|
1161
|
+
* will instead intelligently commit any changes from
|
|
1162
|
+
* local state that are present in the remote data,
|
|
1163
|
+
* leaving any remaining changes in local state still.
|
|
1164
|
+
*
|
|
1165
|
+
* MUST be false for PolarisMode + LinksMode
|
|
1166
|
+
*
|
|
1167
|
+
* @typedoc
|
|
1168
|
+
*/
|
|
1169
|
+
resetOnRemoteUpdate: false;
|
|
1170
|
+
};
|
|
1171
|
+
}
|
|
1172
|
+
/**
|
|
1173
|
+
* A union of all possible LegacyMode field schemas.
|
|
1174
|
+
*
|
|
1175
|
+
* @typedoc
|
|
1176
|
+
*/
|
|
1177
|
+
export type LegacyModeFieldSchema = GenericField | LegacyAliasField | LocalField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | DerivedField | LegacyAttributeField | LegacyBelongsToField | LegacyHasManyField;
|
|
1178
|
+
/**
|
|
1179
|
+
* A union of all possible PolarisMode field schemas.
|
|
1180
|
+
*
|
|
1181
|
+
* @typedoc
|
|
1182
|
+
*/
|
|
1183
|
+
export type PolarisModeFieldSchema = GenericField | PolarisAliasField | LocalField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | DerivedField | LinksModeBelongsToField | LinksModeHasManyField;
|
|
1184
|
+
/**
|
|
1185
|
+
* A union of all possible LegacyMode and PolarisMode
|
|
1186
|
+
* field schemas.
|
|
1187
|
+
*
|
|
1188
|
+
* You likely will want to use PolarisModeFieldSchema,
|
|
1189
|
+
* LegacyModeFieldSchema, or ObjectFieldSchema instead
|
|
1190
|
+
* as appropriate as they are more specific and will
|
|
1191
|
+
* provide better guidance around what is valid.
|
|
1192
|
+
*
|
|
1193
|
+
* @typedoc
|
|
1194
|
+
*/
|
|
1195
|
+
export type FieldSchema = GenericField | LegacyAliasField | PolarisAliasField | LocalField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | DerivedField | ResourceField | CollectionField | LegacyAttributeField | LegacyBelongsToField | LegacyHasManyField | LinksModeBelongsToField | LinksModeHasManyField;
|
|
1196
|
+
/**
|
|
1197
|
+
* A union of all possible field schemas that can be
|
|
1198
|
+
* used in an ObjectSchema.
|
|
1199
|
+
*
|
|
1200
|
+
* @typedoc
|
|
1201
|
+
*/
|
|
1202
|
+
export type ObjectFieldSchema = GenericField | ObjectAliasField | LocalField | ObjectField | SchemaObjectField | ArrayField | SchemaArrayField | DerivedField;
|
|
1203
|
+
/**
|
|
1204
|
+
* Represents a schema for a primary resource in PolarisMode.
|
|
1205
|
+
*
|
|
1206
|
+
* Primary resources are objects with a unique identity of their
|
|
1207
|
+
* own which may allow them to appear in relationships, or in multiple
|
|
1208
|
+
* response documents.
|
|
1209
|
+
*
|
|
1210
|
+
* @typedoc
|
|
1211
|
+
*/
|
|
1212
|
+
export interface PolarisResourceSchema {
|
|
1213
|
+
legacy?: false;
|
|
845
1214
|
/**
|
|
846
1215
|
* For primary resources, this should be an IdentityField
|
|
847
1216
|
*
|
|
@@ -849,7 +1218,7 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
849
1218
|
*
|
|
850
1219
|
* @typedoc
|
|
851
1220
|
*/
|
|
852
|
-
identity: IdentityField
|
|
1221
|
+
identity: IdentityField;
|
|
853
1222
|
/**
|
|
854
1223
|
* The name of the schema
|
|
855
1224
|
*
|
|
@@ -857,8 +1226,13 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
857
1226
|
* primary resource type.
|
|
858
1227
|
*
|
|
859
1228
|
* For object schemas, this should be the name
|
|
860
|
-
* of the object schema.
|
|
861
|
-
*
|
|
1229
|
+
* of the object schema.
|
|
1230
|
+
*
|
|
1231
|
+
* The names of object and resource schemas share
|
|
1232
|
+
* a single namespace and must not conflict.
|
|
1233
|
+
*
|
|
1234
|
+
* We recommend a naming convention for object schemas
|
|
1235
|
+
* such as below for ensuring uniqueness:
|
|
862
1236
|
*
|
|
863
1237
|
* - for globally shared objects: The pattern `$field:${KlassName}` e.g. `$field:AddressObject`
|
|
864
1238
|
* - for resource-specific objects: The pattern `$${ResourceKlassName}:$field:${KlassName}` e.g. `$User:$field:ReusableAddress`
|
|
@@ -867,10 +1241,193 @@ declare module '@warp-drive/core-types/schema/fields' {
|
|
|
867
1241
|
* @typedoc
|
|
868
1242
|
*/
|
|
869
1243
|
type: string;
|
|
1244
|
+
/**
|
|
1245
|
+
* The fields that make up the shape of the resource
|
|
1246
|
+
*
|
|
1247
|
+
* @typedoc
|
|
1248
|
+
*/
|
|
1249
|
+
fields: PolarisModeFieldSchema[];
|
|
1250
|
+
/**
|
|
1251
|
+
* A list of traits that this resource implements. The fields for these
|
|
1252
|
+
* traits should still be defined in the fields array.
|
|
1253
|
+
*
|
|
1254
|
+
* Each trait should be a string that matches the `type` of another
|
|
1255
|
+
* resource schema. The trait can be abstract and reference a resource
|
|
1256
|
+
* type that is never defined as a schema.
|
|
1257
|
+
*
|
|
1258
|
+
* @typedoc
|
|
1259
|
+
*/
|
|
870
1260
|
traits?: string[];
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
1261
|
+
}
|
|
1262
|
+
/**
|
|
1263
|
+
* Represents a schema for a primary resource in LegacyMode
|
|
1264
|
+
*
|
|
1265
|
+
* Primary resources are objects with a unique identity of their
|
|
1266
|
+
* own which may allow them to appear in relationships, or in multiple
|
|
1267
|
+
* response documents.
|
|
1268
|
+
*
|
|
1269
|
+
* @typedoc
|
|
1270
|
+
*/
|
|
1271
|
+
export interface LegacyResourceSchema {
|
|
1272
|
+
legacy: true;
|
|
1273
|
+
/**
|
|
1274
|
+
* For primary resources, this should be an IdentityField
|
|
1275
|
+
*
|
|
1276
|
+
* for schema-objects, this should be either a HashField or null
|
|
1277
|
+
*
|
|
1278
|
+
* @typedoc
|
|
1279
|
+
*/
|
|
1280
|
+
identity: IdentityField;
|
|
1281
|
+
/**
|
|
1282
|
+
* The name of the schema
|
|
1283
|
+
*
|
|
1284
|
+
* For cacheable resources, this should be the
|
|
1285
|
+
* primary resource type.
|
|
1286
|
+
*
|
|
1287
|
+
* For object schemas, this should be the name
|
|
1288
|
+
* of the object schema.
|
|
1289
|
+
*
|
|
1290
|
+
* The names of object and resource schemas share
|
|
1291
|
+
* a single namespace and must not conflict.
|
|
1292
|
+
*
|
|
1293
|
+
* We recommend a naming convention for object schemas
|
|
1294
|
+
* such as below for ensuring uniqueness:
|
|
1295
|
+
*
|
|
1296
|
+
* - for globally shared objects: The pattern `$field:${KlassName}` e.g. `$field:AddressObject`
|
|
1297
|
+
* - for resource-specific objects: The pattern `$${ResourceKlassName}:$field:${KlassName}` e.g. `$User:$field:ReusableAddress`
|
|
1298
|
+
* - for inline objects: The pattern `$${ResourceKlassName}.${fieldPath}:$field:anonymous` e.g. `$User.shippingAddress:$field:anonymous`
|
|
1299
|
+
*
|
|
1300
|
+
* @typedoc
|
|
1301
|
+
*/
|
|
1302
|
+
type: string;
|
|
1303
|
+
/**
|
|
1304
|
+
* The fields that make up the shape of the resource
|
|
1305
|
+
*
|
|
1306
|
+
* @typedoc
|
|
1307
|
+
*/
|
|
1308
|
+
fields: LegacyModeFieldSchema[];
|
|
1309
|
+
/**
|
|
1310
|
+
* A list of traits that this resource implements. The fields for these
|
|
1311
|
+
* traits should still be defined in the fields array.
|
|
1312
|
+
*
|
|
1313
|
+
* Each trait should be a string that matches the `type` of another
|
|
1314
|
+
* resource schema. The trait can be abstract and reference a resource
|
|
1315
|
+
* type that is never defined as a schema.
|
|
1316
|
+
*
|
|
1317
|
+
* @typedoc
|
|
1318
|
+
*/
|
|
1319
|
+
traits?: string[];
|
|
1320
|
+
}
|
|
1321
|
+
/**
|
|
1322
|
+
* A type which represents a valid JSON schema
|
|
1323
|
+
* definition for either a PolarisMode or a
|
|
1324
|
+
* LegacyMode resource.
|
|
1325
|
+
*
|
|
1326
|
+
* Note, this is separate from the type returned
|
|
1327
|
+
* by the SchemaService which provides fields as a Map
|
|
1328
|
+
* instead of as an Array.
|
|
1329
|
+
*
|
|
1330
|
+
* @typedoc
|
|
1331
|
+
*/
|
|
1332
|
+
export type ResourceSchema = PolarisResourceSchema | LegacyResourceSchema;
|
|
1333
|
+
/**
|
|
1334
|
+
* Represents a schema for an object that is not
|
|
1335
|
+
* a primary resource (has no unique identity of its own).
|
|
1336
|
+
*
|
|
1337
|
+
* ObjectSchemas may not currently contain relationships.
|
|
1338
|
+
*
|
|
1339
|
+
* @typedoc
|
|
1340
|
+
*/
|
|
1341
|
+
export interface ObjectSchema {
|
|
1342
|
+
/**
|
|
1343
|
+
* Either a HashField from which to calculate an identity or null
|
|
1344
|
+
*
|
|
1345
|
+
* In the case of `null`, the object's identity will be based
|
|
1346
|
+
* on the referential identity of the object in the cache itself
|
|
1347
|
+
* when an identity is needed.
|
|
1348
|
+
*
|
|
1349
|
+
* @typedoc
|
|
1350
|
+
*/
|
|
1351
|
+
identity: HashField | null;
|
|
1352
|
+
/**
|
|
1353
|
+
* The name of the schema
|
|
1354
|
+
*
|
|
1355
|
+
* The names of object and resource schemas share
|
|
1356
|
+
* a single namespace and must not conflict.
|
|
1357
|
+
*
|
|
1358
|
+
* We recommend a naming convention for object schemas
|
|
1359
|
+
* such as below for ensuring uniqueness:
|
|
1360
|
+
*
|
|
1361
|
+
* - for globally shared objects: The pattern `$field:${KlassName}` e.g. `$field:AddressObject`
|
|
1362
|
+
* - for resource-specific objects: The pattern `$${ResourceKlassName}:$field:${KlassName}` e.g. `$User:$field:ReusableAddress`
|
|
1363
|
+
* - for inline objects: The pattern `$${ResourceKlassName}.${fieldPath}:$field:anonymous` e.g. `$User.shippingAddress:$field:anonymous`
|
|
1364
|
+
*
|
|
1365
|
+
* @typedoc
|
|
1366
|
+
*/
|
|
1367
|
+
type: string;
|
|
1368
|
+
/**
|
|
1369
|
+
* The fields that make up the shape of the object
|
|
1370
|
+
*
|
|
1371
|
+
* @typedoc
|
|
1372
|
+
*/
|
|
1373
|
+
fields: ObjectFieldSchema[];
|
|
1374
|
+
}
|
|
1375
|
+
export type Schema = ResourceSchema | ObjectSchema;
|
|
1376
|
+
/**
|
|
1377
|
+
* A no-op type utility that enables type-checking resource schema
|
|
1378
|
+
* definitions.
|
|
1379
|
+
*
|
|
1380
|
+
* Will return the passed in schema.
|
|
1381
|
+
*
|
|
1382
|
+
* This will not validate relationship inverses or related types,
|
|
1383
|
+
* as doing so would require a full schema graph to be passed in
|
|
1384
|
+
* and no cycles in the graph to be present.
|
|
1385
|
+
*
|
|
1386
|
+
* @method resourceSchema
|
|
1387
|
+
* @static
|
|
1388
|
+
* @for @warp-drive/core-types
|
|
1389
|
+
* @param {ResourceSchema} schema
|
|
1390
|
+
* @returns {ResourceSchema} the passed in schema
|
|
1391
|
+
* @public
|
|
1392
|
+
*/
|
|
1393
|
+
export function resourceSchema<T extends ResourceSchema>(schema: T): T;
|
|
1394
|
+
/**
|
|
1395
|
+
* A no-op type utility that enables type-checking object schema
|
|
1396
|
+
* definitions.
|
|
1397
|
+
*
|
|
1398
|
+
* Will return the passed in schema.
|
|
1399
|
+
*
|
|
1400
|
+
* @method objectSchema
|
|
1401
|
+
* @static
|
|
1402
|
+
* @for @warp-drive/core-types
|
|
1403
|
+
* @param {ObjectSchema} schema
|
|
1404
|
+
* @returns {ObjectSchema} the passed in schema
|
|
1405
|
+
* @public
|
|
1406
|
+
*/
|
|
1407
|
+
export function objectSchema<T extends ObjectSchema>(schema: T): T;
|
|
1408
|
+
/**
|
|
1409
|
+
* A type utility to narrow a schema to a ResourceSchema
|
|
1410
|
+
*
|
|
1411
|
+
* @method isResourceSchema
|
|
1412
|
+
* @static
|
|
1413
|
+
* @for @warp-drive/core-types
|
|
1414
|
+
* @param schema
|
|
1415
|
+
* @returns {boolean}
|
|
1416
|
+
* @public
|
|
1417
|
+
*/
|
|
1418
|
+
export function isResourceSchema(schema: ResourceSchema | ObjectSchema): schema is ResourceSchema;
|
|
1419
|
+
/**
|
|
1420
|
+
* A type utility to narrow a schema to LegacyResourceSchema
|
|
1421
|
+
*
|
|
1422
|
+
* @method isLegacyResourceSchema
|
|
1423
|
+
* @static
|
|
1424
|
+
* @for @warp-drive/core-types
|
|
1425
|
+
* @param schema
|
|
1426
|
+
* @returns {boolean}
|
|
1427
|
+
* @public
|
|
1428
|
+
*/
|
|
1429
|
+
export function isLegacyResourceSchema(schema: ResourceSchema | ObjectSchema): schema is LegacyResourceSchema;
|
|
1430
|
+
export type LegacyField = LegacyAttributeField | LegacyBelongsToField | LegacyHasManyField | LinksModeBelongsToField | LinksModeHasManyField;
|
|
1431
|
+
export type LegacyRelationshipField = LegacyBelongsToField | LegacyHasManyField | LinksModeBelongsToField | LinksModeHasManyField;
|
|
875
1432
|
}
|
|
876
1433
|
//# sourceMappingURL=fields.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../../src/schema/fields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,
|
|
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;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,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