@unito/integration-api 4.0.0 → 4.1.1
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.
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://unito.io/integration_api/referenceRelation.schema.json",
|
|
3
|
+
"title": "Relation",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["path", "schema", "label"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"path": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"format": "uri-reference",
|
|
11
|
+
"pattern": "^\/.*$"
|
|
12
|
+
},
|
|
13
|
+
"label": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1,
|
|
16
|
+
"maxLength": 100
|
|
17
|
+
},
|
|
18
|
+
"searchable": {
|
|
19
|
+
"type": "boolean"
|
|
20
|
+
},
|
|
21
|
+
"semantic": {
|
|
22
|
+
"$ref": "https://unito.io/integration_api/definitions.schema.json#/$defs/relationSemantic"
|
|
23
|
+
},
|
|
24
|
+
"name": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"pattern": "^[a-zA-Z0-9_-]*$",
|
|
27
|
+
"minLength": 1,
|
|
28
|
+
"maxLength": 100,
|
|
29
|
+
"deprecated": true
|
|
30
|
+
},
|
|
31
|
+
"schema": {
|
|
32
|
+
"oneOf": [
|
|
33
|
+
{
|
|
34
|
+
"$ref": "https://unito.io/integration_api/relationSchema.schema.json"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"const": "__self"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -110,7 +110,37 @@ export interface ReferenceFieldSchema extends AbstractFieldSchema {
|
|
|
110
110
|
/**
|
|
111
111
|
* Describe the referenced collection.
|
|
112
112
|
*/
|
|
113
|
-
reference:
|
|
113
|
+
reference: ReferenceRelation;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* A ReferenceRelation describes a relation that can be used in a ReferenceFieldSchema.
|
|
117
|
+
*/
|
|
118
|
+
export interface ReferenceRelation {
|
|
119
|
+
/**
|
|
120
|
+
* The path at which the relation data is available.
|
|
121
|
+
*/
|
|
122
|
+
path: string;
|
|
123
|
+
/**
|
|
124
|
+
* The publicly visible label of the relation.
|
|
125
|
+
*/
|
|
126
|
+
label: string;
|
|
127
|
+
/**
|
|
128
|
+
* Whether the relation is searchable.
|
|
129
|
+
*/
|
|
130
|
+
searchable?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* The semantic of the relation.
|
|
133
|
+
*/
|
|
134
|
+
semantic?: RelationSemantic;
|
|
135
|
+
/**
|
|
136
|
+
* The name for the reference relation.
|
|
137
|
+
* @deprecated Will be removed in a future version.
|
|
138
|
+
*/
|
|
139
|
+
name?: string;
|
|
140
|
+
/**
|
|
141
|
+
* The shape of the relation.
|
|
142
|
+
*/
|
|
143
|
+
schema: RelationSchema | '__self';
|
|
114
144
|
}
|
|
115
145
|
export interface DatetimeRangeFieldSchema extends AbstractFieldSchema {
|
|
116
146
|
/**
|