@automate.ax/integration-contracts 0.99.0 → 0.99.1

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.
@@ -1,5 +1,11 @@
1
1
  import * as z from "zod";
2
- export declare const CLOSE_WEBHOOK_EVENT_SELECTIONS: readonly [readonly ["lead", "created"], readonly ["lead", "updated"], readonly ["lead", "deleted"], readonly ["lead", "merged"], readonly ["contact", "created"], readonly ["contact", "updated"], readonly ["contact", "deleted"], readonly ["opportunity", "created"], readonly ["opportunity", "updated"], readonly ["opportunity", "deleted"], readonly ["task.lead", "created"], readonly ["task.lead", "updated"], readonly ["task.lead", "deleted"], readonly ["task.lead", "completed"], readonly ["task.incoming_email", "created"], readonly ["task.incoming_email", "updated"], readonly ["task.incoming_email", "deleted"], readonly ["task.incoming_email", "completed"], readonly ["task.email_followup", "created"], readonly ["task.email_followup", "updated"], readonly ["task.email_followup", "deleted"], readonly ["task.email_followup", "completed"], readonly ["task.missed_call", "created"], readonly ["task.missed_call", "updated"], readonly ["task.missed_call", "deleted"], readonly ["task.missed_call", "completed"], readonly ["task.answered_detached_call", "created"], readonly ["task.answered_detached_call", "updated"], readonly ["task.answered_detached_call", "deleted"], readonly ["task.answered_detached_call", "completed"], readonly ["task.voicemail", "created"], readonly ["task.voicemail", "updated"], readonly ["task.voicemail", "deleted"], readonly ["task.voicemail", "completed"], readonly ["task.opportunity_due", "created"], readonly ["task.opportunity_due", "updated"], readonly ["task.opportunity_due", "deleted"], readonly ["task.opportunity_due", "completed"], readonly ["task.incoming_sms", "created"], readonly ["task.incoming_sms", "updated"], readonly ["task.incoming_sms", "deleted"], readonly ["task.incoming_sms", "completed"], readonly ["task.outbound_call", "created"], readonly ["task.outbound_call", "updated"], readonly ["task.outbound_call", "deleted"], readonly ["task.outbound_call", "completed"], readonly ["activity.email", "created"], readonly ["activity.email", "updated"], readonly ["activity.email", "deleted"], readonly ["activity.email", "sent"], readonly ["activity.email_thread", "created"], readonly ["activity.email_thread", "updated"], readonly ["activity.email_thread", "deleted"], readonly ["unsubscribed_email", "created"], readonly ["unsubscribed_email", "deleted"], readonly ["activity.call", "created"], readonly ["activity.call", "updated"], readonly ["activity.call", "deleted"], readonly ["activity.call", "answered"], readonly ["activity.call", "completed"], readonly ["activity.sms", "created"], readonly ["activity.sms", "updated"], readonly ["activity.sms", "deleted"], readonly ["activity.sms", "sent"], readonly ["activity.whatsapp_message", "created"], readonly ["activity.whatsapp_message", "updated"], readonly ["activity.whatsapp_message", "deleted"], readonly ["activity.note", "created"], readonly ["activity.note", "updated"], readonly ["activity.note", "deleted"], readonly ["activity.meeting", "created"], readonly ["activity.meeting", "updated"], readonly ["activity.meeting", "deleted"], readonly ["activity.meeting", "scheduled"], readonly ["activity.meeting", "started"], readonly ["activity.meeting", "completed"], readonly ["activity.meeting", "canceled"], readonly ["activity.form_submission", "created"], readonly ["activity.form_submission", "updated"], readonly ["activity.form_submission", "deleted"], readonly ["activity.lead_status_change", "created"], readonly ["activity.lead_status_change", "updated"], readonly ["activity.lead_status_change", "deleted"], readonly ["activity.opportunity_status_change", "created"], readonly ["activity.opportunity_status_change", "updated"], readonly ["activity.opportunity_status_change", "deleted"], readonly ["activity.task_completed", "created"], readonly ["activity.task_completed", "deleted"], readonly ["activity.lead_merge", "created"], readonly ["activity.lead_merge", "updated"], readonly ["activity.lead_merge", "deleted"], readonly ["import", "created"], readonly ["import", "updated"], readonly ["import", "completed"], readonly ["import", "reverting"], readonly ["import", "reverted"], readonly ["export.lead", "created"], readonly ["export.lead", "updated"], readonly ["export.lead", "completed"], readonly ["export.opportunity", "created"], readonly ["export.opportunity", "updated"], readonly ["export.opportunity", "completed"], readonly ["bulk_action.delete", "created"], readonly ["bulk_action.delete", "updated"], readonly ["bulk_action.delete", "completed"], readonly ["bulk_action.delete", "paused"], readonly ["bulk_action.edit", "created"], readonly ["bulk_action.edit", "updated"], readonly ["bulk_action.edit", "completed"], readonly ["bulk_action.edit", "paused"], readonly ["bulk_action.email", "created"], readonly ["bulk_action.email", "updated"], readonly ["bulk_action.email", "completed"], readonly ["bulk_action.email", "paused"], readonly ["bulk_action.sequence_subscription", "created"], readonly ["bulk_action.sequence_subscription", "updated"], readonly ["bulk_action.sequence_subscription", "completed"], readonly ["bulk_action.sequence_subscription", "paused"], readonly ["custom_fields.lead", "created"], readonly ["custom_fields.lead", "updated"], readonly ["custom_fields.lead", "deleted"], readonly ["custom_fields.contact", "created"], readonly ["custom_fields.contact", "updated"], readonly ["custom_fields.contact", "deleted"], readonly ["custom_fields.opportunity", "created"], readonly ["custom_fields.opportunity", "updated"], readonly ["custom_fields.opportunity", "deleted"], readonly ["custom_fields.activity", "created"], readonly ["custom_fields.activity", "updated"], readonly ["custom_fields.activity", "deleted"], readonly ["custom_fields.custom_object", "created"], readonly ["custom_fields.custom_object", "updated"], readonly ["custom_fields.custom_object", "deleted"], readonly ["custom_fields.shared", "created"], readonly ["custom_fields.shared", "updated"], readonly ["custom_fields.shared", "deleted"], readonly ["custom_activity_type", "created"], readonly ["custom_activity_type", "updated"], readonly ["custom_activity_type", "deleted"], readonly ["activity.custom_activity", "created"], readonly ["activity.custom_activity", "updated"], readonly ["activity.custom_activity", "deleted"], readonly ["custom_object_type", "created"], readonly ["custom_object_type", "updated"], readonly ["custom_object_type", "deleted"], readonly ["custom_object", "created"], readonly ["custom_object", "updated"], readonly ["custom_object", "deleted"], readonly ["status.lead", "created"], readonly ["status.lead", "updated"], readonly ["status.lead", "deleted"], readonly ["status.opportunity", "created"], readonly ["status.opportunity", "updated"], readonly ["status.opportunity", "deleted"], readonly ["membership", "activated"], readonly ["membership", "deactivated"], readonly ["group", "created"], readonly ["group", "updated"], readonly ["group", "deleted"], readonly ["saved_search", "created"], readonly ["saved_search", "updated"], readonly ["phone_number", "created"], readonly ["phone_number", "updated"], readonly ["phone_number", "deleted"], readonly ["email_template", "created"], readonly ["email_template", "updated"], readonly ["email_template", "deleted"], readonly ["sms_template", "created"], readonly ["sms_template", "updated"], readonly ["sms_template", "deleted"], readonly ["sequence", "created"], readonly ["sequence", "updated"], readonly ["sequence", "deleted"], readonly ["sequence_subscription", "created"], readonly ["sequence_subscription", "updated"], readonly ["sequence_subscription", "deleted"], readonly ["comment", "created"], readonly ["comment", "updated"], readonly ["comment", "deleted"], readonly ["comment_thread", "created"], readonly ["comment_thread", "updated"], readonly ["comment_thread", "deleted"]];
2
+ /**
3
+ * Object-action pairs accepted by Close's webhook subscription API.
4
+ *
5
+ * Close's Event Log also documents `activity.lead_merge` and
6
+ * `comment_thread.updated`, but the webhook subscription API rejects them.
7
+ */
8
+ export declare const CLOSE_WEBHOOK_EVENT_SELECTIONS: readonly [readonly ["lead", "created"], readonly ["lead", "updated"], readonly ["lead", "deleted"], readonly ["lead", "merged"], readonly ["contact", "created"], readonly ["contact", "updated"], readonly ["contact", "deleted"], readonly ["opportunity", "created"], readonly ["opportunity", "updated"], readonly ["opportunity", "deleted"], readonly ["task.lead", "created"], readonly ["task.lead", "updated"], readonly ["task.lead", "deleted"], readonly ["task.lead", "completed"], readonly ["task.incoming_email", "created"], readonly ["task.incoming_email", "updated"], readonly ["task.incoming_email", "deleted"], readonly ["task.incoming_email", "completed"], readonly ["task.email_followup", "created"], readonly ["task.email_followup", "updated"], readonly ["task.email_followup", "deleted"], readonly ["task.email_followup", "completed"], readonly ["task.missed_call", "created"], readonly ["task.missed_call", "updated"], readonly ["task.missed_call", "deleted"], readonly ["task.missed_call", "completed"], readonly ["task.answered_detached_call", "created"], readonly ["task.answered_detached_call", "updated"], readonly ["task.answered_detached_call", "deleted"], readonly ["task.answered_detached_call", "completed"], readonly ["task.voicemail", "created"], readonly ["task.voicemail", "updated"], readonly ["task.voicemail", "deleted"], readonly ["task.voicemail", "completed"], readonly ["task.opportunity_due", "created"], readonly ["task.opportunity_due", "updated"], readonly ["task.opportunity_due", "deleted"], readonly ["task.opportunity_due", "completed"], readonly ["task.incoming_sms", "created"], readonly ["task.incoming_sms", "updated"], readonly ["task.incoming_sms", "deleted"], readonly ["task.incoming_sms", "completed"], readonly ["task.outbound_call", "created"], readonly ["task.outbound_call", "updated"], readonly ["task.outbound_call", "deleted"], readonly ["task.outbound_call", "completed"], readonly ["activity.email", "created"], readonly ["activity.email", "updated"], readonly ["activity.email", "deleted"], readonly ["activity.email", "sent"], readonly ["activity.email_thread", "created"], readonly ["activity.email_thread", "updated"], readonly ["activity.email_thread", "deleted"], readonly ["unsubscribed_email", "created"], readonly ["unsubscribed_email", "deleted"], readonly ["activity.call", "created"], readonly ["activity.call", "updated"], readonly ["activity.call", "deleted"], readonly ["activity.call", "answered"], readonly ["activity.call", "completed"], readonly ["activity.sms", "created"], readonly ["activity.sms", "updated"], readonly ["activity.sms", "deleted"], readonly ["activity.sms", "sent"], readonly ["activity.whatsapp_message", "created"], readonly ["activity.whatsapp_message", "updated"], readonly ["activity.whatsapp_message", "deleted"], readonly ["activity.note", "created"], readonly ["activity.note", "updated"], readonly ["activity.note", "deleted"], readonly ["activity.meeting", "created"], readonly ["activity.meeting", "updated"], readonly ["activity.meeting", "deleted"], readonly ["activity.meeting", "scheduled"], readonly ["activity.meeting", "started"], readonly ["activity.meeting", "completed"], readonly ["activity.meeting", "canceled"], readonly ["activity.form_submission", "created"], readonly ["activity.form_submission", "updated"], readonly ["activity.form_submission", "deleted"], readonly ["activity.lead_status_change", "created"], readonly ["activity.lead_status_change", "updated"], readonly ["activity.lead_status_change", "deleted"], readonly ["activity.opportunity_status_change", "created"], readonly ["activity.opportunity_status_change", "updated"], readonly ["activity.opportunity_status_change", "deleted"], readonly ["activity.task_completed", "created"], readonly ["activity.task_completed", "deleted"], readonly ["import", "created"], readonly ["import", "updated"], readonly ["import", "completed"], readonly ["import", "reverting"], readonly ["import", "reverted"], readonly ["export.lead", "created"], readonly ["export.lead", "updated"], readonly ["export.lead", "completed"], readonly ["export.opportunity", "created"], readonly ["export.opportunity", "updated"], readonly ["export.opportunity", "completed"], readonly ["bulk_action.delete", "created"], readonly ["bulk_action.delete", "updated"], readonly ["bulk_action.delete", "completed"], readonly ["bulk_action.delete", "paused"], readonly ["bulk_action.edit", "created"], readonly ["bulk_action.edit", "updated"], readonly ["bulk_action.edit", "completed"], readonly ["bulk_action.edit", "paused"], readonly ["bulk_action.email", "created"], readonly ["bulk_action.email", "updated"], readonly ["bulk_action.email", "completed"], readonly ["bulk_action.email", "paused"], readonly ["bulk_action.sequence_subscription", "created"], readonly ["bulk_action.sequence_subscription", "updated"], readonly ["bulk_action.sequence_subscription", "completed"], readonly ["bulk_action.sequence_subscription", "paused"], readonly ["custom_fields.lead", "created"], readonly ["custom_fields.lead", "updated"], readonly ["custom_fields.lead", "deleted"], readonly ["custom_fields.contact", "created"], readonly ["custom_fields.contact", "updated"], readonly ["custom_fields.contact", "deleted"], readonly ["custom_fields.opportunity", "created"], readonly ["custom_fields.opportunity", "updated"], readonly ["custom_fields.opportunity", "deleted"], readonly ["custom_fields.activity", "created"], readonly ["custom_fields.activity", "updated"], readonly ["custom_fields.activity", "deleted"], readonly ["custom_fields.custom_object", "created"], readonly ["custom_fields.custom_object", "updated"], readonly ["custom_fields.custom_object", "deleted"], readonly ["custom_fields.shared", "created"], readonly ["custom_fields.shared", "updated"], readonly ["custom_fields.shared", "deleted"], readonly ["custom_activity_type", "created"], readonly ["custom_activity_type", "updated"], readonly ["custom_activity_type", "deleted"], readonly ["activity.custom_activity", "created"], readonly ["activity.custom_activity", "updated"], readonly ["activity.custom_activity", "deleted"], readonly ["custom_object_type", "created"], readonly ["custom_object_type", "updated"], readonly ["custom_object_type", "deleted"], readonly ["custom_object", "created"], readonly ["custom_object", "updated"], readonly ["custom_object", "deleted"], readonly ["status.lead", "created"], readonly ["status.lead", "updated"], readonly ["status.lead", "deleted"], readonly ["status.opportunity", "created"], readonly ["status.opportunity", "updated"], readonly ["status.opportunity", "deleted"], readonly ["membership", "activated"], readonly ["membership", "deactivated"], readonly ["group", "created"], readonly ["group", "updated"], readonly ["group", "deleted"], readonly ["saved_search", "created"], readonly ["saved_search", "updated"], readonly ["phone_number", "created"], readonly ["phone_number", "updated"], readonly ["phone_number", "deleted"], readonly ["email_template", "created"], readonly ["email_template", "updated"], readonly ["email_template", "deleted"], readonly ["sms_template", "created"], readonly ["sms_template", "updated"], readonly ["sms_template", "deleted"], readonly ["sequence", "created"], readonly ["sequence", "updated"], readonly ["sequence", "deleted"], readonly ["sequence_subscription", "created"], readonly ["sequence_subscription", "updated"], readonly ["sequence_subscription", "deleted"], readonly ["comment", "created"], readonly ["comment", "updated"], readonly ["comment", "deleted"], readonly ["comment_thread", "created"], readonly ["comment_thread", "deleted"]];
3
9
  export type CloseWebhookEventSelection = (typeof CLOSE_WEBHOOK_EVENT_SELECTIONS)[number];
4
10
  export declare const CLOSE_EVENT_SCHEMA: z.ZodObject<{
5
11
  action: z.ZodString;
@@ -1,6 +1,12 @@
1
1
  import * as z from "zod";
2
2
  import { CLOSE_OBJECT_SCHEMA } from "./api.js";
3
3
  import { CLOSE_CALL_SCHEMA, CLOSE_COMMENT_SCHEMA, CLOSE_DATE_SCHEMA, CLOSE_CONTACT_SCHEMA, CLOSE_EMAIL_SCHEMA, CLOSE_LEAD_SCHEMA, CLOSE_MEETING_SCHEMA, CLOSE_OPPORTUNITY_SCHEMA, CLOSE_SEQUENCE_SUBSCRIPTION_SCHEMA, CLOSE_SMS_SCHEMA, CLOSE_TASK_SCHEMA, } from "./schemas.js";
4
+ /**
5
+ * Object-action pairs accepted by Close's webhook subscription API.
6
+ *
7
+ * Close's Event Log also documents `activity.lead_merge` and
8
+ * `comment_thread.updated`, but the webhook subscription API rejects them.
9
+ */
4
10
  export const CLOSE_WEBHOOK_EVENT_SELECTIONS = [
5
11
  ["lead", "created"],
6
12
  ["lead", "updated"],
@@ -90,9 +96,6 @@ export const CLOSE_WEBHOOK_EVENT_SELECTIONS = [
90
96
  ["activity.opportunity_status_change", "deleted"],
91
97
  ["activity.task_completed", "created"],
92
98
  ["activity.task_completed", "deleted"],
93
- ["activity.lead_merge", "created"],
94
- ["activity.lead_merge", "updated"],
95
- ["activity.lead_merge", "deleted"],
96
99
  ["import", "created"],
97
100
  ["import", "updated"],
98
101
  ["import", "completed"],
@@ -182,7 +185,6 @@ export const CLOSE_WEBHOOK_EVENT_SELECTIONS = [
182
185
  ["comment", "updated"],
183
186
  ["comment", "deleted"],
184
187
  ["comment_thread", "created"],
185
- ["comment_thread", "updated"],
186
188
  ["comment_thread", "deleted"],
187
189
  ];
188
190
  export const CLOSE_EVENT_SCHEMA = z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automate.ax/integration-contracts",
3
- "version": "0.99.0",
3
+ "version": "0.99.1",
4
4
  "description": "Shared integration payload contracts and provider primitives for Automate.ax.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -48,7 +48,7 @@
48
48
  }
49
49
  },
50
50
  "dependencies": {
51
- "@automate.ax/codec": "0.99.0",
51
+ "@automate.ax/codec": "0.99.1",
52
52
  "@cfworker/json-schema": "^4.1.1",
53
53
  "@googleapis/calendar": "^15.0.0",
54
54
  "@googleapis/forms": "^6.0.1",
@@ -14,6 +14,12 @@ import {
14
14
  CLOSE_TASK_SCHEMA,
15
15
  } from "./schemas"
16
16
 
17
+ /**
18
+ * Object-action pairs accepted by Close's webhook subscription API.
19
+ *
20
+ * Close's Event Log also documents `activity.lead_merge` and
21
+ * `comment_thread.updated`, but the webhook subscription API rejects them.
22
+ */
17
23
  export const CLOSE_WEBHOOK_EVENT_SELECTIONS = [
18
24
  ["lead", "created"],
19
25
  ["lead", "updated"],
@@ -103,9 +109,6 @@ export const CLOSE_WEBHOOK_EVENT_SELECTIONS = [
103
109
  ["activity.opportunity_status_change", "deleted"],
104
110
  ["activity.task_completed", "created"],
105
111
  ["activity.task_completed", "deleted"],
106
- ["activity.lead_merge", "created"],
107
- ["activity.lead_merge", "updated"],
108
- ["activity.lead_merge", "deleted"],
109
112
  ["import", "created"],
110
113
  ["import", "updated"],
111
114
  ["import", "completed"],
@@ -195,7 +198,6 @@ export const CLOSE_WEBHOOK_EVENT_SELECTIONS = [
195
198
  ["comment", "updated"],
196
199
  ["comment", "deleted"],
197
200
  ["comment_thread", "created"],
198
- ["comment_thread", "updated"],
199
201
  ["comment_thread", "deleted"],
200
202
  ] as const
201
203