@unito/integration-api 8.0.3 → 8.0.5

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.
@@ -76,12 +76,6 @@
76
76
  "nullable": {
77
77
  "type": "boolean",
78
78
  "default": true
79
- },
80
- "supportedRichTextNodes": {
81
- "type": "array",
82
- "items": {
83
- "$ref": "https://unito.io/integration_api/definitions.schema.json#/$defs/richTextNodeType"
84
- }
85
79
  }
86
80
  }
87
81
  },
@@ -41,6 +41,13 @@
41
41
  "items": {
42
42
  "$ref": "https://unito.io/integration_api/relationSummary.schema.json"
43
43
  }
44
+ },
45
+ "kinds": {
46
+ "type": "array",
47
+ "items": {
48
+ "type": "string",
49
+ "format": "uri"
50
+ }
44
51
  }
45
52
  }
46
53
  }
@@ -404,7 +404,7 @@ export declare const fieldTypeCompatibilityMatrix: {
404
404
  readonly number: null;
405
405
  readonly object: null;
406
406
  readonly reference: null;
407
- readonly richText: null;
407
+ readonly richText: {};
408
408
  readonly html: null;
409
409
  readonly markdown: null;
410
410
  readonly string: null;
@@ -346,7 +346,7 @@ export const fieldTypeCompatibilityMatrix = {
346
346
  [Api.FieldValueTypes.NUMBER]: null,
347
347
  [Api.FieldValueTypes.OBJECT]: null,
348
348
  [Api.FieldValueTypes.REFERENCE]: null,
349
- [Api.FieldValueTypes.RICH_TEXT]: null,
349
+ [Api.FieldValueTypes.RICH_TEXT]: {},
350
350
  [Api.FieldValueTypes.RICH_TEXT_HTML]: null,
351
351
  [Api.FieldValueTypes.RICH_TEXT_MARKDOWN]: null,
352
352
  [Api.FieldValueTypes.STRING]: null,
@@ -116,7 +116,9 @@ export function isRelationSchema(potentialRelationSchema, options) {
116
116
  potentialRelationSchema['fields'].every((f) => isFieldSchema(f, options)) &&
117
117
  (isUndefined(potentialRelationSchema['relations']) ||
118
118
  (Array.isArray(potentialRelationSchema['relations']) &&
119
- potentialRelationSchema['relations'].every((r) => isRelationSummary(r, options)))));
119
+ potentialRelationSchema['relations'].every((r) => isRelationSummary(r, options)))) &&
120
+ (isUndefined(potentialRelationSchema['kinds']) ||
121
+ (Array.isArray(potentialRelationSchema['kinds']) && potentialRelationSchema['kinds'].every(isString))));
120
122
  }
121
123
  /**
122
124
  * Checks if the input is an Api.RelationSchema object or the string '__self'.
@@ -234,7 +234,9 @@ function isRelationSchema(potentialRelationSchema, options) {
234
234
  potentialRelationSchema['fields'].every((f) => isFieldSchema(f, options)) &&
235
235
  (isUndefined(potentialRelationSchema['relations']) ||
236
236
  (Array.isArray(potentialRelationSchema['relations']) &&
237
- potentialRelationSchema['relations'].every((r) => isRelationSummary(r, options)))));
237
+ potentialRelationSchema['relations'].every((r) => isRelationSummary(r, options)))) &&
238
+ (isUndefined(potentialRelationSchema['kinds']) ||
239
+ (Array.isArray(potentialRelationSchema['kinds']) && potentialRelationSchema['kinds'].every(isString))));
238
240
  }
239
241
  /**
240
242
  * Checks if the input is an Api.RelationSchema object or the string '__self'.
@@ -623,7 +625,7 @@ const fieldTypeCompatibilityMatrix = {
623
625
  [FieldValueTypes.NUMBER]: null,
624
626
  [FieldValueTypes.OBJECT]: null,
625
627
  [FieldValueTypes.REFERENCE]: null,
626
- [FieldValueTypes.RICH_TEXT]: null,
628
+ [FieldValueTypes.RICH_TEXT]: {},
627
629
  [FieldValueTypes.RICH_TEXT_HTML]: null,
628
630
  [FieldValueTypes.RICH_TEXT_MARKDOWN]: null,
629
631
  [FieldValueTypes.STRING]: null,
@@ -1,5 +1,4 @@
1
1
  import { Readable } from 'node:stream';
2
- import type { RichTextNodeType } from './richText.js';
3
2
  /**
4
3
  * A Collection represents a paginated list of ItemSummary available through a Relation.
5
4
  */
@@ -253,21 +252,10 @@ export interface ObjectFieldSchema extends AbstractFieldSchema {
253
252
  interface DescriptionRichTextFieldSchema extends AbstractFieldSchema {
254
253
  semantic: typeof Semantics.DESCRIPTION;
255
254
  type: typeof FieldValueTypes.RICH_TEXT;
256
- /**
257
- * The published rich text node types this field can round-trip.
258
- * `text` is mandatory. When omitted, a curated baseline applies (defined
259
- * elsewhere in this package).
260
- *
261
- * Syncer keys off the target field's declaration to decide whether to
262
- * pass nodes through or sentinel-encode them. Source-side declarations
263
- * are descriptive and not enforced at runtime.
264
- */
265
- supportedRichTextNodes?: readonly ['text', ...RichTextNodeType[]];
266
255
  }
267
256
  interface UnconstrainedRichTextFieldSchema extends AbstractFieldSchema {
268
257
  semantic?: never;
269
258
  type: typeof FieldValueTypes.RICH_TEXT;
270
- supportedRichTextNodes?: readonly ['text', ...RichTextNodeType[]];
271
259
  }
272
260
  export type RichTextFieldSchema = DescriptionRichTextFieldSchema | UnconstrainedRichTextFieldSchema;
273
261
  /**
@@ -510,6 +498,12 @@ export interface RelationSchema {
510
498
  * Summaries of the relations expected to be found on these items.
511
499
  */
512
500
  relations?: RelationSummary[];
501
+ /**
502
+ * Optional URI-shaped identifiers describing the kind of items in this relation
503
+ * (e.g. ['urn:unito:person', 'https://schema.org/Person']). Most specific kind
504
+ * first; more general kinds after.
505
+ */
506
+ kinds?: string[];
513
507
  }
514
508
  /**
515
509
  * A type that guarantees the presence of a populated schema by preventing the use of __self.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unito/integration-api",
3
- "version": "8.0.3",
3
+ "version": "8.0.5",
4
4
  "description": "The Unito Integration API",
5
5
  "type": "module",
6
6
  "types": "./dist/src/index.d.ts",