@unito/integration-api 0.43.15 → 0.44.0

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.
@@ -54,11 +54,16 @@
54
54
  }
55
55
  },
56
56
  "referencePath": {
57
+ "deprecated": true,
57
58
  "type": "string",
58
59
  "format": "uri-reference",
59
60
  "pattern": "^\/.*$"
60
61
  },
62
+ "reference": {
63
+ "$ref": "https://unito.io/integration_api/relation.schema.json"
64
+ },
61
65
  "searchable": {
66
+ "deprecated": true,
62
67
  "type": "boolean"
63
68
  },
64
69
  "info": {
@@ -75,6 +80,7 @@
75
80
  "default": true
76
81
  },
77
82
  "relations": {
83
+ "deprecated": true,
78
84
  "type": "array",
79
85
  "items": {
80
86
  "$ref": "https://unito.io/integration_api/relationSummary.schema.json"
@@ -97,19 +103,6 @@
97
103
  }
98
104
  }
99
105
  },
100
- {
101
- "if": {
102
- "type": "object",
103
- "properties": {
104
- "type": { "const": "reference" }
105
- },
106
- "required": ["type"]
107
- },
108
- "then": {
109
- "type": "object",
110
- "required": ["fields", "referencePath"]
111
- }
112
- },
113
106
  {
114
107
  "if": {
115
108
  "type": "object",
@@ -105,7 +105,10 @@ export interface BlobFieldSchema extends AbstractFieldSchema {
105
105
  */
106
106
  type: FieldValueType.BLOB;
107
107
  }
108
- export interface ReferenceFieldSchema extends AbstractFieldSchema {
108
+ /**
109
+ * @deprecated
110
+ */
111
+ export interface DeprecatedReferenceFieldSchema extends AbstractFieldSchema {
109
112
  /**
110
113
  * The type of the field.
111
114
  */
@@ -127,6 +130,16 @@ export interface ReferenceFieldSchema extends AbstractFieldSchema {
127
130
  */
128
131
  relations?: RelationSummary[];
129
132
  }
133
+ export interface ReferenceFieldSchema extends AbstractFieldSchema {
134
+ /**
135
+ * The type of the field.
136
+ */
137
+ type: FieldValueType.REFERENCE;
138
+ /**
139
+ * Describe the referenced collection.
140
+ */
141
+ reference: Relation;
142
+ }
130
143
  export interface DatetimeRangeFieldSchema extends AbstractFieldSchema {
131
144
  /**
132
145
  * The type of the field.
@@ -172,7 +185,7 @@ export interface ObjectFieldSchema extends AbstractFieldSchema {
172
185
  /**
173
186
  * A FieldSchema describes the shape of a field.
174
187
  */
175
- export type FieldSchema = BasicFieldSchema | BlobFieldSchema | ReferenceFieldSchema | ObjectFieldSchema | DateRangeFieldSchema | DatetimeRangeFieldSchema;
188
+ export type FieldSchema = BasicFieldSchema | BlobFieldSchema | DeprecatedReferenceFieldSchema | ReferenceFieldSchema | ObjectFieldSchema | DateRangeFieldSchema | DatetimeRangeFieldSchema;
176
189
  /**
177
190
  * A FieldValueType determines the type of an item's value.
178
191
  * The type represents a unique scalar value such as a string or an integer.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unito/integration-api",
3
- "version": "0.43.15",
3
+ "version": "0.44.0",
4
4
  "description": "The Unito Integration API",
5
5
  "type": "module",
6
6
  "types": "./dist/src/index.d.ts",