@unito/integration-api 6.0.0 → 7.0.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.
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"title": "Relation",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"additionalProperties": false,
|
|
6
|
-
"required": ["path", "schema", "label"],
|
|
6
|
+
"required": ["path", "schema", "label", "name"],
|
|
7
7
|
"properties": {
|
|
8
8
|
"path": {
|
|
9
9
|
"type": "string",
|
|
@@ -25,8 +25,7 @@
|
|
|
25
25
|
"type": "string",
|
|
26
26
|
"pattern": "^[a-zA-Z0-9_-]*$",
|
|
27
27
|
"minLength": 1,
|
|
28
|
-
"maxLength": 100
|
|
29
|
-
"deprecated": true
|
|
28
|
+
"maxLength": 100
|
|
30
29
|
},
|
|
31
30
|
"schema": {
|
|
32
31
|
"oneOf": [
|
package/dist/src/guards.js
CHANGED
|
@@ -53,6 +53,7 @@ export function isItem(potentialItem) {
|
|
|
53
53
|
*/
|
|
54
54
|
export function isReferenceRelation(potentialReferenceRelation) {
|
|
55
55
|
return (isObject(potentialReferenceRelation) &&
|
|
56
|
+
isString(potentialReferenceRelation['name']) &&
|
|
56
57
|
isString(potentialReferenceRelation['path']) &&
|
|
57
58
|
isString(potentialReferenceRelation['label']) &&
|
|
58
59
|
isRelationSchemaOrSelf(potentialReferenceRelation['schema']));
|
package/dist/src/index.cjs
CHANGED
|
@@ -159,6 +159,7 @@ function isItem(potentialItem) {
|
|
|
159
159
|
*/
|
|
160
160
|
function isReferenceRelation(potentialReferenceRelation) {
|
|
161
161
|
return (isObject(potentialReferenceRelation) &&
|
|
162
|
+
isString(potentialReferenceRelation['name']) &&
|
|
162
163
|
isString(potentialReferenceRelation['path']) &&
|
|
163
164
|
isString(potentialReferenceRelation['label']) &&
|
|
164
165
|
isRelationSchemaOrSelf(potentialReferenceRelation['schema']));
|
package/dist/src/types.d.ts
CHANGED
|
@@ -176,10 +176,9 @@ export interface ReferenceRelation {
|
|
|
176
176
|
*/
|
|
177
177
|
semantic?: RelationSemantic;
|
|
178
178
|
/**
|
|
179
|
-
* The
|
|
180
|
-
* @deprecated Will be removed in a future version.
|
|
179
|
+
* The main identifier of the reference relation.
|
|
181
180
|
*/
|
|
182
|
-
name
|
|
181
|
+
name: string;
|
|
183
182
|
/**
|
|
184
183
|
* The shape of the relation.
|
|
185
184
|
*/
|
|
@@ -608,7 +607,16 @@ export interface WebhookParsedItem {
|
|
|
608
607
|
}
|
|
609
608
|
export interface WebhookItem {
|
|
610
609
|
/**
|
|
611
|
-
* The canonical path of the parent item
|
|
610
|
+
* The canonical path of the parent item for this webhook event.
|
|
611
|
+
*
|
|
612
|
+
* Used as a fallback when the item's canonicalPath is not yet known to the platform
|
|
613
|
+
* (e.g., newly created items). In that case, sync-platform enqueues a sync job for
|
|
614
|
+
* the parent, which will discover the new child item during its scan.
|
|
615
|
+
*
|
|
616
|
+
* - If the exact parent is unknown without an extra API call, setting a grandparent
|
|
617
|
+
* (e.g., a sheet or project) is acceptable — it triggers a broader scan that will
|
|
618
|
+
* still pick up the new item.
|
|
619
|
+
* - If undefined and the item is not found, the webhook event is skipped entirely.
|
|
612
620
|
*/
|
|
613
621
|
parentCanonicalPath?: string;
|
|
614
622
|
/**
|