@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": [
@@ -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']));
@@ -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']));
@@ -176,10 +176,9 @@ export interface ReferenceRelation {
176
176
  */
177
177
  semantic?: RelationSemantic;
178
178
  /**
179
- * The name for the reference relation.
180
- * @deprecated Will be removed in a future version.
179
+ * The main identifier of the reference relation.
181
180
  */
182
- name?: string;
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, if applicable.
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
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unito/integration-api",
3
- "version": "6.0.0",
3
+ "version": "7.0.0",
4
4
  "description": "The Unito Integration API",
5
5
  "type": "module",
6
6
  "types": "./dist/src/index.d.ts",