@unito/integration-api 8.0.4 → 8.0.6
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.
|
@@ -405,8 +405,8 @@ export declare const fieldTypeCompatibilityMatrix: {
|
|
|
405
405
|
readonly object: null;
|
|
406
406
|
readonly reference: null;
|
|
407
407
|
readonly richText: {};
|
|
408
|
-
readonly html:
|
|
409
|
-
readonly markdown:
|
|
408
|
+
readonly html: {};
|
|
409
|
+
readonly markdown: {};
|
|
410
410
|
readonly string: null;
|
|
411
411
|
readonly url: null;
|
|
412
412
|
};
|
|
@@ -423,7 +423,7 @@ export declare const fieldTypeCompatibilityMatrix: {
|
|
|
423
423
|
readonly number: null;
|
|
424
424
|
readonly object: null;
|
|
425
425
|
readonly reference: null;
|
|
426
|
-
readonly richText:
|
|
426
|
+
readonly richText: {};
|
|
427
427
|
readonly html: {
|
|
428
428
|
readonly decoratorTemplate: {
|
|
429
429
|
readonly type: "stringWithSourceItemFields";
|
|
@@ -492,7 +492,7 @@ export declare const fieldTypeCompatibilityMatrix: {
|
|
|
492
492
|
readonly number: null;
|
|
493
493
|
readonly object: null;
|
|
494
494
|
readonly reference: null;
|
|
495
|
-
readonly richText:
|
|
495
|
+
readonly richText: {};
|
|
496
496
|
readonly html: {
|
|
497
497
|
readonly decoratorTemplate: {
|
|
498
498
|
readonly type: "stringWithSourceItemFields";
|
|
@@ -347,8 +347,8 @@ export const fieldTypeCompatibilityMatrix = {
|
|
|
347
347
|
[Api.FieldValueTypes.OBJECT]: null,
|
|
348
348
|
[Api.FieldValueTypes.REFERENCE]: null,
|
|
349
349
|
[Api.FieldValueTypes.RICH_TEXT]: {},
|
|
350
|
-
[Api.FieldValueTypes.RICH_TEXT_HTML]:
|
|
351
|
-
[Api.FieldValueTypes.RICH_TEXT_MARKDOWN]:
|
|
350
|
+
[Api.FieldValueTypes.RICH_TEXT_HTML]: {},
|
|
351
|
+
[Api.FieldValueTypes.RICH_TEXT_MARKDOWN]: {},
|
|
352
352
|
[Api.FieldValueTypes.STRING]: null,
|
|
353
353
|
[Api.FieldValueTypes.URL]: null,
|
|
354
354
|
},
|
|
@@ -365,7 +365,7 @@ export const fieldTypeCompatibilityMatrix = {
|
|
|
365
365
|
[Api.FieldValueTypes.NUMBER]: null,
|
|
366
366
|
[Api.FieldValueTypes.OBJECT]: null,
|
|
367
367
|
[Api.FieldValueTypes.REFERENCE]: null,
|
|
368
|
-
[Api.FieldValueTypes.RICH_TEXT]:
|
|
368
|
+
[Api.FieldValueTypes.RICH_TEXT]: {},
|
|
369
369
|
[Api.FieldValueTypes.RICH_TEXT_HTML]: htmlToRichTextConfiguration,
|
|
370
370
|
[Api.FieldValueTypes.RICH_TEXT_MARKDOWN]: htmlToRichTextConfiguration,
|
|
371
371
|
[Api.FieldValueTypes.STRING]: {},
|
|
@@ -384,7 +384,7 @@ export const fieldTypeCompatibilityMatrix = {
|
|
|
384
384
|
[Api.FieldValueTypes.NUMBER]: null,
|
|
385
385
|
[Api.FieldValueTypes.OBJECT]: null,
|
|
386
386
|
[Api.FieldValueTypes.REFERENCE]: null,
|
|
387
|
-
[Api.FieldValueTypes.RICH_TEXT]:
|
|
387
|
+
[Api.FieldValueTypes.RICH_TEXT]: {},
|
|
388
388
|
[Api.FieldValueTypes.RICH_TEXT_HTML]: markdownToRichTextConfiguration,
|
|
389
389
|
[Api.FieldValueTypes.RICH_TEXT_MARKDOWN]: markdownToRichTextConfiguration,
|
|
390
390
|
[Api.FieldValueTypes.STRING]: {},
|
package/dist/src/guards.js
CHANGED
|
@@ -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'.
|
package/dist/src/index.cjs
CHANGED
|
@@ -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'.
|
|
@@ -624,8 +626,8 @@ const fieldTypeCompatibilityMatrix = {
|
|
|
624
626
|
[FieldValueTypes.OBJECT]: null,
|
|
625
627
|
[FieldValueTypes.REFERENCE]: null,
|
|
626
628
|
[FieldValueTypes.RICH_TEXT]: {},
|
|
627
|
-
[FieldValueTypes.RICH_TEXT_HTML]:
|
|
628
|
-
[FieldValueTypes.RICH_TEXT_MARKDOWN]:
|
|
629
|
+
[FieldValueTypes.RICH_TEXT_HTML]: {},
|
|
630
|
+
[FieldValueTypes.RICH_TEXT_MARKDOWN]: {},
|
|
629
631
|
[FieldValueTypes.STRING]: null,
|
|
630
632
|
[FieldValueTypes.URL]: null,
|
|
631
633
|
},
|
|
@@ -642,7 +644,7 @@ const fieldTypeCompatibilityMatrix = {
|
|
|
642
644
|
[FieldValueTypes.NUMBER]: null,
|
|
643
645
|
[FieldValueTypes.OBJECT]: null,
|
|
644
646
|
[FieldValueTypes.REFERENCE]: null,
|
|
645
|
-
[FieldValueTypes.RICH_TEXT]:
|
|
647
|
+
[FieldValueTypes.RICH_TEXT]: {},
|
|
646
648
|
[FieldValueTypes.RICH_TEXT_HTML]: htmlToRichTextConfiguration,
|
|
647
649
|
[FieldValueTypes.RICH_TEXT_MARKDOWN]: htmlToRichTextConfiguration,
|
|
648
650
|
[FieldValueTypes.STRING]: {},
|
|
@@ -661,7 +663,7 @@ const fieldTypeCompatibilityMatrix = {
|
|
|
661
663
|
[FieldValueTypes.NUMBER]: null,
|
|
662
664
|
[FieldValueTypes.OBJECT]: null,
|
|
663
665
|
[FieldValueTypes.REFERENCE]: null,
|
|
664
|
-
[FieldValueTypes.RICH_TEXT]:
|
|
666
|
+
[FieldValueTypes.RICH_TEXT]: {},
|
|
665
667
|
[FieldValueTypes.RICH_TEXT_HTML]: markdownToRichTextConfiguration,
|
|
666
668
|
[FieldValueTypes.RICH_TEXT_MARKDOWN]: markdownToRichTextConfiguration,
|
|
667
669
|
[FieldValueTypes.STRING]: {},
|
package/dist/src/types.d.ts
CHANGED
|
@@ -476,15 +476,15 @@ export interface RelationSchema {
|
|
|
476
476
|
/**
|
|
477
477
|
* Can we create items?
|
|
478
478
|
*/
|
|
479
|
-
canCreateItem
|
|
479
|
+
canCreateItem: boolean;
|
|
480
480
|
/**
|
|
481
481
|
* Can we update items?
|
|
482
482
|
*/
|
|
483
|
-
canUpdateItem
|
|
483
|
+
canUpdateItem: boolean;
|
|
484
484
|
/**
|
|
485
485
|
* Can we delete items?
|
|
486
486
|
*/
|
|
487
|
-
canDeleteItem
|
|
487
|
+
canDeleteItem: boolean;
|
|
488
488
|
/**
|
|
489
489
|
* Can we add fields to the schema?
|
|
490
490
|
* Defaults to false.
|
|
@@ -498,6 +498,12 @@ export interface RelationSchema {
|
|
|
498
498
|
* Summaries of the relations expected to be found on these items.
|
|
499
499
|
*/
|
|
500
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[];
|
|
501
507
|
}
|
|
502
508
|
/**
|
|
503
509
|
* A type that guarantees the presence of a populated schema by preventing the use of __self.
|