@warp-drive-mirror/schema-record 0.0.1 → 0.0.3
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/LICENSE.md +19 -8
- package/README.md +231 -129
- package/dist/-private.js +1 -0
- package/dist/-private.js.map +1 -0
- package/dist/{record.js → index.js} +700 -99
- package/dist/index.js.map +1 -0
- package/dist/symbols-DqoS4ybV.js.map +1 -1
- package/logos/NCC-1701-a-gold.svg +4 -0
- package/logos/NCC-1701-a-gold_100.svg +1 -0
- package/logos/NCC-1701-a-gold_base-64.txt +1 -0
- package/logos/README.md +4 -0
- package/logos/docs-badge.svg +2 -0
- package/logos/ember-data-logo-dark.svg +12 -0
- package/logos/ember-data-logo-light.svg +12 -0
- package/logos/github-header.svg +444 -0
- package/logos/social1.png +0 -0
- package/logos/social2.png +0 -0
- package/logos/warp-drive-logo-dark.svg +4 -0
- package/logos/warp-drive-logo-gold.svg +4 -0
- package/package.json +32 -58
- package/unstable-preview-types/-private/{compute.d.ts → fields/compute.d.ts} +17 -15
- package/unstable-preview-types/-private/fields/compute.d.ts.map +1 -0
- package/unstable-preview-types/-private/{managed-array.d.ts → fields/managed-array.d.ts} +4 -4
- package/unstable-preview-types/-private/fields/managed-array.d.ts.map +1 -0
- package/unstable-preview-types/-private/{managed-object.d.ts → fields/managed-object.d.ts} +4 -4
- package/unstable-preview-types/-private/fields/managed-object.d.ts.map +1 -0
- package/unstable-preview-types/-private/fields/many-array-manager.d.ts +23 -0
- package/unstable-preview-types/-private/fields/many-array-manager.d.ts.map +1 -0
- package/unstable-preview-types/{hooks.d.ts → -private/hooks.d.ts} +3 -3
- package/unstable-preview-types/-private/hooks.d.ts.map +1 -0
- package/unstable-preview-types/{record.d.ts → -private/record.d.ts} +3 -3
- package/unstable-preview-types/-private/record.d.ts.map +1 -0
- package/unstable-preview-types/{schema.d.ts → -private/schema.d.ts} +61 -11
- package/unstable-preview-types/-private/schema.d.ts.map +1 -0
- package/unstable-preview-types/{symbols.d.ts → -private/symbols.d.ts} +1 -1
- package/unstable-preview-types/-private/symbols.d.ts.map +1 -0
- package/unstable-preview-types/-private.d.ts +4 -0
- package/unstable-preview-types/-private.d.ts.map +1 -0
- package/unstable-preview-types/index.d.ts +353 -7
- package/unstable-preview-types/index.d.ts.map +1 -0
- package/dist/hooks.js +0 -19
- package/dist/hooks.js.map +0 -1
- package/dist/record.js.map +0 -1
- package/dist/schema.js +0 -278
- package/dist/schema.js.map +0 -1
- package/unstable-preview-types/-private/compute.d.ts.map +0 -1
- package/unstable-preview-types/-private/managed-array.d.ts.map +0 -1
- package/unstable-preview-types/-private/managed-object.d.ts.map +0 -1
- package/unstable-preview-types/hooks.d.ts.map +0 -1
- package/unstable-preview-types/record.d.ts.map +0 -1
- package/unstable-preview-types/schema.d.ts.map +0 -1
- package/unstable-preview-types/symbols.d.ts.map +0 -1
- /package/{NCC-1701-a-blue.svg → logos/NCC-1701-a-blue.svg} +0 -0
- /package/{NCC-1701-a.svg → logos/NCC-1701-a.svg} +0 -0
package/LICENSE.md
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (
|
|
4
|
-
Copyright (
|
|
5
|
-
|
|
6
|
-
Portions Copyright (C) 2011 LivingSocial Inc.
|
|
3
|
+
Copyright (c) 2017-2025 Ember.js and contributors
|
|
4
|
+
Copyright (c) 2011-2017 Tilde, Inc. and contributors
|
|
5
|
+
Copyright (c) 2011 LivingSocial Inc.
|
|
7
6
|
|
|
8
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
9
13
|
|
|
10
|
-
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
copies or substantial portions of the Software.
|
|
11
16
|
|
|
12
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,36 +1,45 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<img
|
|
3
3
|
class="project-logo"
|
|
4
|
-
src="./
|
|
5
|
-
alt="WarpDrive"
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
src="./logos/github-header.svg#gh-light-mode-only"
|
|
5
|
+
alt="WarpDrive | Boldly go where no app has gone before"
|
|
6
|
+
title="WarpDrive | Boldly go where no app has gone before"
|
|
7
|
+
/>
|
|
8
8
|
<img
|
|
9
9
|
class="project-logo"
|
|
10
|
-
src="./
|
|
11
|
-
alt="WarpDrive"
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
src="./logos/github-header.svg#gh-dark-mode-only"
|
|
11
|
+
alt="WarpDrive | Boldly go where no app has gone before"
|
|
12
|
+
title="WarpDrive | Boldly go where no app has gone before"
|
|
13
|
+
/>
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
|
-
<h3 align="center">Your
|
|
16
|
+
<h3 align="center">Your Data, Managed.</h3>
|
|
17
17
|
<p align="center">🌲 Get back to Nature 🐿️ Or shipping 💚</p>
|
|
18
18
|
|
|
19
|
-
SchemaRecord is:
|
|
20
19
|
- ⚡️ Fast
|
|
21
20
|
- 📦 Tiny
|
|
22
21
|
- ✨ Optimized
|
|
23
22
|
- 🚀 Scalable
|
|
24
|
-
-
|
|
23
|
+
- ⚛️ Universal
|
|
24
|
+
- ☢️ Reactive
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
SchemaRecord is a reactive object that transforms raw data from an [associated cache](https://github.com/emberjs/data/blob/main/packages/core-types/src/cache.ts) into reactive data backed by Signals.
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
The shape of the object and the transformation of raw cache data into its
|
|
29
|
+
reactive form is controlled by a resource schema.
|
|
30
|
+
|
|
31
|
+
Resource schemas are simple JSON, allowing them to be defined and delivered from anywhere.
|
|
32
|
+
|
|
33
|
+
The capabilities that SchemaRecord brings to [*Warp***Drive**](https://github.com/emberjs/data/)
|
|
34
|
+
will simplify even the most complex parts of your app's state management.
|
|
29
35
|
|
|
30
36
|
## Installation
|
|
31
37
|
|
|
38
|
+
Install using your javascript package manager of choice. For instance
|
|
39
|
+
with [pnpm](https://pnpm.io/)
|
|
40
|
+
|
|
32
41
|
```cli
|
|
33
|
-
pnpm
|
|
42
|
+
pnpm add @warp-drive-mirror/schema-record
|
|
34
43
|
```
|
|
35
44
|
|
|
36
45
|
**Tagged Releases**
|
|
@@ -42,166 +51,259 @@ pnpm install @warp-drive-mirror/schema-record
|
|
|
42
51
|
- 
|
|
43
52
|
|
|
44
53
|
|
|
45
|
-
#### 🔜 Soon
|
|
46
|
-
Install using your javascript package manager of choice. For instance with [pnpm](https://pnpm.io/)
|
|
47
|
-
|
|
48
|
-
```no-highlight
|
|
49
|
-
pnpm add @warp-drive-mirror/schema-record
|
|
50
|
-
```
|
|
51
|
-
|
|
52
54
|
## Getting Started
|
|
53
55
|
|
|
54
|
-
If this package is how you are first learning about EmberData, we
|
|
56
|
+
If this package is how you are first learning about WarpDrive/EmberData, we
|
|
57
|
+
recommend starting with learning about [Requests](https://github.com/emberjs/data/blob/main/packages/request/README.md)
|
|
58
|
+
and the [Store](https://github.com/emberjs/data/blob/main/packages/store/README.md).
|
|
55
59
|
|
|
56
60
|
## 🚀 Setup
|
|
57
61
|
|
|
58
|
-
SchemaRecord integrates with
|
|
59
|
-
When
|
|
60
|
-
|
|
61
|
-
`teardownRecord`.
|
|
62
|
+
SchemaRecord integrates with WarpDrive via the Store's resource lifecycle hooks.
|
|
63
|
+
When WarpDrive needs to create a new record instance to give reactive access to
|
|
64
|
+
a resource in the cache, it calls `instantiateRecord`. When it no longer needs
|
|
65
|
+
that instance, it will call `teardownRecord`.
|
|
62
66
|
|
|
63
|
-
```
|
|
67
|
+
```diff
|
|
64
68
|
import Store from '@ember-data-mirror/store';
|
|
65
|
-
import
|
|
66
|
-
import Cache from '@ember-data-mirror/json-api';
|
|
69
|
+
+import { instantiateRecord, teardownRecord, registerDerivations, SchemaService } from '@warp-drive-mirror/schema-record';
|
|
67
70
|
|
|
68
|
-
|
|
71
|
+
class AppStore extends Store {
|
|
69
72
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
+ createSchemaService() {
|
|
74
|
+
+ const schema = new SchemaService();
|
|
75
|
+
+ registerDerivations(schema);
|
|
76
|
+
+ return schema;
|
|
77
|
+
+ }
|
|
74
78
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
79
|
+
+ instantiateRecord(identifier, createArgs) {
|
|
80
|
+
+ return instantiateRecord(this, identifier, createArgs);
|
|
81
|
+
+ }
|
|
82
|
+
|
|
83
|
+
+ teardownRecord(record) {
|
|
84
|
+
+ return teardownRecord(record);
|
|
85
|
+
+ }
|
|
78
86
|
}
|
|
79
87
|
```
|
|
80
88
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
Any Store method that returns records will use SchemaRecord once configured as above.
|
|
89
|
+
Any Store API that returns a record instance will use the `instantiateRecord`
|
|
90
|
+
hook configured above to instantiate a SchemaRecord once this is in place.
|
|
84
91
|
After that, its up to you what SchemaRecord can do.
|
|
85
92
|
|
|
86
|
-
|
|
87
|
-
Service. Schemas are simple json objects that follow a pattern.
|
|
88
|
-
|
|
89
|
-
You could manually construct schemas, though that would be laborious. We recommend
|
|
90
|
-
compiling schemas from another available source such as your API's types. If you don't
|
|
91
|
-
have a source from which to compile schemas, consider using `@warp-drive/schema-dsl`.
|
|
92
|
-
|
|
93
|
-
The Schema DSL allows authoring rich, expressive schemas using familiar Typescript and
|
|
94
|
-
Decorators, which compile at build into json schemas you can deliver to your app either
|
|
95
|
-
in your asset bundle, via a separate fetch, or from your API.
|
|
96
|
-
|
|
97
|
-
The Schema DSL will also compile and register types for your schemas that give you robust
|
|
98
|
-
typescript support.
|
|
99
|
-
|
|
100
|
-
## Main Paradigms
|
|
101
|
-
|
|
102
|
-
### Immutability
|
|
93
|
+
## Start Using
|
|
103
94
|
|
|
104
|
-
|
|
95
|
+
### About
|
|
105
96
|
|
|
106
|
-
|
|
97
|
+
SchemaRecord is a reactive object that transforms raw data from an associated
|
|
98
|
+
cache into reactive data backed by Signals.
|
|
107
99
|
|
|
108
|
-
|
|
100
|
+
The shape of the object and the transformation of raw cache data into its
|
|
101
|
+
reactive form is controlled by a resource schema.
|
|
109
102
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
affecting the global state of the application (until you want to). You can even fork forks, though its probably not that useful to do so in the common case.
|
|
103
|
+
For instance, lets say your API is a [JSON:API](https://jsonapi.org) and your store is using the
|
|
104
|
+
JSONAPICache, and a request returns the following raw data:
|
|
113
105
|
|
|
114
106
|
```ts
|
|
115
|
-
|
|
107
|
+
{
|
|
108
|
+
data: {
|
|
109
|
+
type: 'user',
|
|
110
|
+
id: '1',
|
|
111
|
+
attributes: { firstName: 'Chris', lastName: 'Thoburn' },
|
|
112
|
+
relationships: { pets: { data: [{ type: 'dog', id: '1' }] }}
|
|
113
|
+
},
|
|
114
|
+
included: [
|
|
115
|
+
{
|
|
116
|
+
type: 'dog',
|
|
117
|
+
id: '1',
|
|
118
|
+
attributes: { name: 'Rey' },
|
|
119
|
+
relationships: { owner: { data: { type: 'user', id: '1' }}}
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}
|
|
116
123
|
```
|
|
117
124
|
|
|
118
|
-
|
|
119
|
-
|
|
125
|
+
We could describe the `'user'` and `'dog'` resources in the above payload
|
|
126
|
+
with the following schemas:
|
|
120
127
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
```ts
|
|
129
|
+
store.schema.registerResources([
|
|
130
|
+
{
|
|
131
|
+
type: 'user',
|
|
132
|
+
identity: { type: '@id', name: 'id' },
|
|
133
|
+
fields: [
|
|
134
|
+
{
|
|
135
|
+
type: '@identity',
|
|
136
|
+
name: '$type',
|
|
137
|
+
kind: 'derived',
|
|
138
|
+
options: { key: 'type' },
|
|
139
|
+
},
|
|
140
|
+
{ kind: 'field', name: 'firstName' },
|
|
141
|
+
{ kind: 'field', name: 'lastName' },
|
|
142
|
+
{
|
|
143
|
+
kind: 'derived',
|
|
144
|
+
name: 'name',
|
|
145
|
+
type: 'concat',
|
|
146
|
+
options: { fields: ['firstName', 'lastName'], separator: ' ' }
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
kind: 'hasMany',
|
|
150
|
+
name: 'pets',
|
|
151
|
+
type: 'pet',
|
|
152
|
+
options: {
|
|
153
|
+
async: false,
|
|
154
|
+
inverse: 'owner',
|
|
155
|
+
polymorphic: true,
|
|
156
|
+
linksMode: true,
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
type: 'dog',
|
|
163
|
+
identity: { type: '@id', name: 'id' },
|
|
164
|
+
fields: [
|
|
165
|
+
{
|
|
166
|
+
type: '@identity',
|
|
167
|
+
name: '$type',
|
|
168
|
+
kind: 'derived',
|
|
169
|
+
options: { key: 'type' },
|
|
170
|
+
},
|
|
171
|
+
{ kind: 'field', name: 'name' },
|
|
172
|
+
{
|
|
173
|
+
kind: 'belongsTo',
|
|
174
|
+
name: 'owner',
|
|
175
|
+
type: 'user',
|
|
176
|
+
options: {
|
|
177
|
+
async: false,
|
|
178
|
+
inverse: 'pets',
|
|
179
|
+
as: 'pet',
|
|
180
|
+
linksMode: true,
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
]);
|
|
186
|
+
```
|
|
131
187
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
`await fork.merge(store)`. In most cases, `store` should be the store you forked from, though
|
|
135
|
-
it is allowed to attempt to merge into a parent `store` as well.
|
|
188
|
+
With these schemas in place, the reactive objects that the store would
|
|
189
|
+
provide us whenever we encountered a `'user'` or a `'dog'` would be:
|
|
136
190
|
|
|
137
191
|
```ts
|
|
138
|
-
// get a fork for editing
|
|
139
|
-
const fork = await store.fork();
|
|
140
|
-
|
|
141
|
-
// create a new record
|
|
142
|
-
const user = fork.createRecord('user', { name: 'Chris' });
|
|
143
192
|
|
|
144
|
-
|
|
145
|
-
|
|
193
|
+
interface Pet {
|
|
194
|
+
readonly id: string;
|
|
195
|
+
readonly owner: User;
|
|
196
|
+
}
|
|
146
197
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
198
|
+
interface Dog extends Pet {
|
|
199
|
+
readonly $type: 'dog';
|
|
200
|
+
readonly name: string;
|
|
201
|
+
}
|
|
150
202
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
203
|
+
interface EditableUser {
|
|
204
|
+
readonly $type: 'user';
|
|
205
|
+
readonly id: string;
|
|
206
|
+
firstName: string;
|
|
207
|
+
lastName: string;
|
|
208
|
+
readonly name: string;
|
|
209
|
+
pets: Array<Dog | Pet>;
|
|
210
|
+
}
|
|
155
211
|
|
|
156
|
-
|
|
212
|
+
interface User {
|
|
213
|
+
readonly $type: 'user';
|
|
214
|
+
readonly id: string;
|
|
215
|
+
readonly firstName: string;
|
|
216
|
+
readonly lastName: string;
|
|
217
|
+
readonly name: string;
|
|
218
|
+
readonly pets: Readonly<Array<Dog | Pet>>;
|
|
219
|
+
[Checkout]: Promise<EditableUser>
|
|
220
|
+
}>
|
|
221
|
+
```
|
|
157
222
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
223
|
+
Note how based on the schema the reactive object we receive is able to produce
|
|
224
|
+
`name` on user (despite no name field being in the cache), provide `$type`
|
|
225
|
+
pulled from the identity of the resource, and flatten the individual attributes
|
|
226
|
+
and relationships onto the record for easier use.
|
|
161
227
|
|
|
162
|
-
|
|
163
|
-
|
|
228
|
+
Notice also how we typed this object with `readonly`. This is because while
|
|
229
|
+
SchemaRecord instances are ***deeply reactive***, they are also ***immutable***.
|
|
164
230
|
|
|
165
|
-
|
|
166
|
-
|
|
231
|
+
We can mutate a SchemaRecord only be explicitly asking permission to do so, and
|
|
232
|
+
in the process gaining access to an editable copy. The immutable version will
|
|
233
|
+
not show any in-process edits made to this editable copy.
|
|
167
234
|
|
|
168
|
-
|
|
169
|
-
|
|
235
|
+
```ts
|
|
236
|
+
import { Checkout } from '@warp-drive-mirror/schema-record';
|
|
170
237
|
|
|
171
|
-
|
|
172
|
-
await store.merge(fork);
|
|
238
|
+
const editable = await user[Checkout]();
|
|
173
239
|
```
|
|
174
240
|
|
|
175
|
-
|
|
241
|
+
### Utilities
|
|
176
242
|
|
|
177
|
-
|
|
178
|
-
|
|
243
|
+
SchemaRecord provides a schema builder that simplifies setting up a couple of
|
|
244
|
+
conventional fields like identity and `$type`. We can rewrite the schema
|
|
245
|
+
definition above using this utility like so:
|
|
179
246
|
|
|
180
247
|
```ts
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
248
|
+
import { withDefaults } from '@warp-drive-mirror/schema-record';
|
|
249
|
+
|
|
250
|
+
store.schema.registerResources([
|
|
251
|
+
withDefaults({
|
|
252
|
+
type: 'user',
|
|
253
|
+
fields: [
|
|
254
|
+
{ kind: 'field', name: 'firstName' },
|
|
255
|
+
{ kind: 'field', name: 'lastName' },
|
|
256
|
+
{
|
|
257
|
+
kind: 'derived',
|
|
258
|
+
name: 'name',
|
|
259
|
+
type: 'concat',
|
|
260
|
+
options: { fields: ['firstName', 'lastName'], separator: ' ' }
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
kind: 'hasMany',
|
|
264
|
+
name: 'pets',
|
|
265
|
+
type: 'pet',
|
|
266
|
+
options: {
|
|
267
|
+
async: false,
|
|
268
|
+
inverse: 'owner',
|
|
269
|
+
polymorphic: true
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
]
|
|
273
|
+
}),
|
|
274
|
+
withDefaults({
|
|
275
|
+
type: 'dog',
|
|
276
|
+
fields: [
|
|
277
|
+
{ kind: 'field', name: 'name' },
|
|
278
|
+
{
|
|
279
|
+
kind: 'belongsTo',
|
|
280
|
+
name: 'owner',
|
|
281
|
+
type: 'user',
|
|
282
|
+
options: {
|
|
283
|
+
async: false,
|
|
284
|
+
inverse: 'pets',
|
|
285
|
+
as: 'pet',
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
]
|
|
289
|
+
})
|
|
290
|
+
]);
|
|
185
291
|
```
|
|
186
292
|
|
|
187
|
-
|
|
293
|
+
Additionally, `@warp-drive-mirror/core-types` provides several utilities for type-checking and narrowing schemas.
|
|
188
294
|
|
|
189
|
-
|
|
190
|
-
type
|
|
191
|
-
type
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
type ResourceSchema = Array<[FieldName, FieldDef]>
|
|
200
|
-
type Schemas = Array<[ResourceType, ResourceSchema]>
|
|
201
|
-
```
|
|
295
|
+
- (type) [PolarisResourceSchema]()
|
|
296
|
+
- (type) [LegacyResourceSchema]()
|
|
297
|
+
- (type) [ObjectSchema]()
|
|
298
|
+
- [resourceSchema]()
|
|
299
|
+
- [objectSchema]()
|
|
300
|
+
- [isResourceSchema]()
|
|
301
|
+
- [isLegacyResourceSchema]()
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
### Field Schemas
|
|
202
305
|
|
|
203
|
-
|
|
204
|
-
some emergent ones we're sure we haven't thought of yet.
|
|
306
|
+
For the full range of available schema capabilities, see [Field Schemas](../core-types/src/schema/fields.ts)
|
|
205
307
|
|
|
206
308
|
|
|
207
309
|
### ♥️ Credits
|
package/dist/-private.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { E as Editable, L as Legacy } from "./symbols-DqoS4ybV.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"-private.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|