@firecms/schema_inference 3.0.0-canary.248 → 3.0.0-canary.249
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/dist/cms_types.d.ts +7 -20
- package/package.json +2 -2
- package/src/cms_types.ts +8 -25
package/dist/cms_types.d.ts
CHANGED
@@ -8,26 +8,6 @@ export type DataType<T extends CMSType = CMSType> = T extends string ? "string"
|
|
8
8
|
* @group Models
|
9
9
|
*/
|
10
10
|
export type EntityStatus = "new" | "existing" | "copy";
|
11
|
-
/**
|
12
|
-
* Representation of an entity fetched from the datasource
|
13
|
-
* @group Models
|
14
|
-
*/
|
15
|
-
export interface Entity<M extends object = any> {
|
16
|
-
/**
|
17
|
-
* ID of the entity
|
18
|
-
*/
|
19
|
-
id: string;
|
20
|
-
/**
|
21
|
-
* A string representing the path of the referenced document (relative
|
22
|
-
* to the root of the database).
|
23
|
-
*/
|
24
|
-
path: string;
|
25
|
-
/**
|
26
|
-
* Current values
|
27
|
-
*/
|
28
|
-
values: EntityValues<M>;
|
29
|
-
databaseId?: string;
|
30
|
-
}
|
31
11
|
/**
|
32
12
|
* This type represents a record of key value pairs as described in an
|
33
13
|
* entity collection.
|
@@ -265,6 +245,13 @@ export interface StringProperty extends BaseProperty<string> {
|
|
265
245
|
* Add an icon to clear the value and set it to `null`. Defaults to `false`
|
266
246
|
*/
|
267
247
|
clearable?: boolean;
|
248
|
+
/**
|
249
|
+
* You can use this property (a string) to behave as a reference to another
|
250
|
+
* collection. The stored value is the ID of the entity in the
|
251
|
+
* collection, and the `path` prop is used to
|
252
|
+
* define the collection this reference points to.
|
253
|
+
*/
|
254
|
+
reference?: ReferenceProperty;
|
268
255
|
}
|
269
256
|
/**
|
270
257
|
* @group Entity properties
|
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"version": "3.0.0-canary.
|
2
|
+
"version": "3.0.0-canary.249",
|
3
3
|
"type": "module",
|
4
4
|
"name": "@firecms/schema_inference",
|
5
5
|
"access": "public",
|
@@ -29,5 +29,5 @@
|
|
29
29
|
"build": "vite build && tsc --emitDeclarationOnly -p tsconfig.prod.json",
|
30
30
|
"clean": "rm -rf dist && find ./src -name '*.js' -type f | xargs rm -f"
|
31
31
|
},
|
32
|
-
"gitHead": "
|
32
|
+
"gitHead": "5a61d7000af7d369373142087ee99792178a2c6f"
|
33
33
|
}
|
package/src/cms_types.ts
CHANGED
@@ -28,31 +28,6 @@ export type DataType<T extends CMSType = CMSType> =
|
|
28
28
|
*/
|
29
29
|
export type EntityStatus = "new" | "existing" | "copy";
|
30
30
|
|
31
|
-
/**
|
32
|
-
* Representation of an entity fetched from the datasource
|
33
|
-
* @group Models
|
34
|
-
*/
|
35
|
-
export interface Entity<M extends object = any> {
|
36
|
-
|
37
|
-
/**
|
38
|
-
* ID of the entity
|
39
|
-
*/
|
40
|
-
id: string;
|
41
|
-
|
42
|
-
/**
|
43
|
-
* A string representing the path of the referenced document (relative
|
44
|
-
* to the root of the database).
|
45
|
-
*/
|
46
|
-
path: string;
|
47
|
-
|
48
|
-
/**
|
49
|
-
* Current values
|
50
|
-
*/
|
51
|
-
values: EntityValues<M>;
|
52
|
-
|
53
|
-
databaseId?: string;
|
54
|
-
}
|
55
|
-
|
56
31
|
/**
|
57
32
|
* This type represents a record of key value pairs as described in an
|
58
33
|
* entity collection.
|
@@ -361,6 +336,14 @@ export interface StringProperty extends BaseProperty<string> {
|
|
361
336
|
* Add an icon to clear the value and set it to `null`. Defaults to `false`
|
362
337
|
*/
|
363
338
|
clearable?: boolean;
|
339
|
+
|
340
|
+
/**
|
341
|
+
* You can use this property (a string) to behave as a reference to another
|
342
|
+
* collection. The stored value is the ID of the entity in the
|
343
|
+
* collection, and the `path` prop is used to
|
344
|
+
* define the collection this reference points to.
|
345
|
+
*/
|
346
|
+
reference?: ReferenceProperty;
|
364
347
|
}
|
365
348
|
|
366
349
|
/**
|