@unito/integration-api 4.5.2 → 4.6.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.
@@ -0,0 +1,30 @@
1
+ {
2
+ "$id": "https://unito.io/integration_api/webhookItem.schema.json",
3
+ "title": "WebhookItem",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "properties": {
7
+ "parentCanonicalPath": {
8
+ "type": "string"
9
+ },
10
+ "item": {
11
+ "type": "object",
12
+ "required": [
13
+ "canonicalPath"
14
+ ],
15
+ "properties": {
16
+ "canonicalPath": {
17
+ "type": "string",
18
+ "nullable": false
19
+ },
20
+ "fields": {
21
+ "type": "object",
22
+ "additionalProperties": true
23
+ }
24
+ }
25
+ },
26
+ "date": {
27
+ "type": "string"
28
+ }
29
+ }
30
+ }
@@ -12,6 +12,15 @@
12
12
  "items": {
13
13
  "$ref": "https://unito.io/integration_api/webhookParsedItem.schema.json"
14
14
  }
15
+ },
16
+ {
17
+ "$ref": "https://unito.io/integration_api/webhookItem.schema.json"
18
+ },
19
+ {
20
+ "type": "array",
21
+ "items": {
22
+ "$ref": "https://unito.io/integration_api/webhookItem.schema.json"
23
+ }
15
24
  }
16
25
  ]
17
26
  }
@@ -541,6 +541,7 @@ export interface WebhookAcknowledgeResponsePayload {
541
541
  }
542
542
  /**
543
543
  * A WebhookParsedItem describes the shape an item found within a webhook's parsed payload.
544
+ * @deprecated use WebhookParseCanonicalItem instead.
544
545
  */
545
546
  export interface WebhookParsedItem {
546
547
  /**
@@ -572,8 +573,26 @@ export interface WebhookParsedItem {
572
573
  impactedItems: WebhookParsedItem[];
573
574
  }[];
574
575
  }
576
+ export interface WebhookItem {
577
+ /**
578
+ * The canonical path of the parent item, if applicable.
579
+ */
580
+ parentCanonicalPath: string;
581
+ /**
582
+ * The date at which the event took place, expressed as an ISO 8601 string.
583
+ * e.g 2023-11-05T08:15:30.000-05:00"
584
+ */
585
+ date: string;
586
+ /**
587
+ * The item impacted by this event.
588
+ */
589
+ item: {
590
+ fields?: Item['fields'];
591
+ canonicalPath: string;
592
+ };
593
+ }
575
594
  /**
576
595
  * A WebhookParseResponsePayload describes the shape of the response on the "parse webhook" endpoint.
577
596
  */
578
- export type WebhookParseResponsePayload = WebhookParsedItem | WebhookParsedItem[];
597
+ export type WebhookParseResponsePayload = WebhookParsedItem | WebhookParsedItem[] | WebhookItem | WebhookItem[];
579
598
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unito/integration-api",
3
- "version": "4.5.2",
3
+ "version": "4.6.0",
4
4
  "description": "The Unito Integration API",
5
5
  "type": "module",
6
6
  "types": "./dist/src/index.d.ts",