@automate.ax/integration-contracts 0.99.5 → 0.101.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.
- package/dist/automate/index.d.ts +451 -0
- package/dist/automate/index.js +108 -0
- package/dist/close/events.d.ts +3 -3
- package/dist/close/events.js +5 -2
- package/dist/close/schemas.d.ts +3 -3
- package/dist/google-calendar/event-schemas.d.ts +2 -2
- package/dist/google-calendar/index.d.ts +6 -6
- package/dist/google-calendar/schemas.d.ts +6 -6
- package/dist/linear/schemas.d.ts +11 -11
- package/dist/resend/action-schemas.d.ts +22 -22
- package/dist/resend/action-schemas.js +5 -4
- package/dist/triggers.d.ts +2 -1
- package/dist/whatsapp/index.d.ts +2 -2
- package/dist/whatsapp/schemas.d.ts +5 -5
- package/package.json +8 -2
- package/src/automate/index.ts +129 -0
- package/src/close/events.ts +6 -2
- package/src/resend/action-schemas.ts +5 -3
- package/src/triggers.ts +2 -0
|
@@ -41,8 +41,8 @@ export declare const googleCalendarTriggerContracts: {
|
|
|
41
41
|
conferenceId: z.ZodOptional<z.ZodString>;
|
|
42
42
|
creationStatus: z.ZodOptional<z.ZodEnum<{
|
|
43
43
|
success: "success";
|
|
44
|
-
pending: "pending";
|
|
45
44
|
failure: "failure";
|
|
45
|
+
pending: "pending";
|
|
46
46
|
}>>;
|
|
47
47
|
entryPoints: z.ZodArray<z.ZodObject<{
|
|
48
48
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -105,9 +105,9 @@ export declare const googleCalendarTriggerContracts: {
|
|
|
105
105
|
timeZone: z.ZodOptional<z.ZodString>;
|
|
106
106
|
}, z.core.$strip>>;
|
|
107
107
|
status: z.ZodEnum<{
|
|
108
|
+
cancelled: "cancelled";
|
|
108
109
|
confirmed: "confirmed";
|
|
109
110
|
tentative: "tentative";
|
|
110
|
-
cancelled: "cancelled";
|
|
111
111
|
}>;
|
|
112
112
|
summary: z.ZodString;
|
|
113
113
|
transparency: z.ZodEnum<{
|
|
@@ -160,8 +160,8 @@ export declare const googleCalendarTriggerContracts: {
|
|
|
160
160
|
conferenceId: z.ZodOptional<z.ZodString>;
|
|
161
161
|
creationStatus: z.ZodOptional<z.ZodEnum<{
|
|
162
162
|
success: "success";
|
|
163
|
-
pending: "pending";
|
|
164
163
|
failure: "failure";
|
|
164
|
+
pending: "pending";
|
|
165
165
|
}>>;
|
|
166
166
|
entryPoints: z.ZodArray<z.ZodObject<{
|
|
167
167
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -224,9 +224,9 @@ export declare const googleCalendarTriggerContracts: {
|
|
|
224
224
|
timeZone: z.ZodOptional<z.ZodString>;
|
|
225
225
|
}, z.core.$strip>>;
|
|
226
226
|
status: z.ZodEnum<{
|
|
227
|
+
cancelled: "cancelled";
|
|
227
228
|
confirmed: "confirmed";
|
|
228
229
|
tentative: "tentative";
|
|
229
|
-
cancelled: "cancelled";
|
|
230
230
|
}>;
|
|
231
231
|
summary: z.ZodString;
|
|
232
232
|
transparency: z.ZodEnum<{
|
|
@@ -279,8 +279,8 @@ export declare const googleCalendarTriggerContracts: {
|
|
|
279
279
|
conferenceId: z.ZodOptional<z.ZodString>;
|
|
280
280
|
creationStatus: z.ZodOptional<z.ZodEnum<{
|
|
281
281
|
success: "success";
|
|
282
|
-
pending: "pending";
|
|
283
282
|
failure: "failure";
|
|
283
|
+
pending: "pending";
|
|
284
284
|
}>>;
|
|
285
285
|
entryPoints: z.ZodArray<z.ZodObject<{
|
|
286
286
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -343,9 +343,9 @@ export declare const googleCalendarTriggerContracts: {
|
|
|
343
343
|
timeZone: z.ZodOptional<z.ZodString>;
|
|
344
344
|
}, z.core.$strip>>;
|
|
345
345
|
status: z.ZodEnum<{
|
|
346
|
+
cancelled: "cancelled";
|
|
346
347
|
confirmed: "confirmed";
|
|
347
348
|
tentative: "tentative";
|
|
348
|
-
cancelled: "cancelled";
|
|
349
349
|
}>;
|
|
350
350
|
summary: z.ZodString;
|
|
351
351
|
transparency: z.ZodEnum<{
|
|
@@ -9,9 +9,9 @@ export declare const SEND_UPDATES_SCHEMA: z.ZodEnum<{
|
|
|
9
9
|
none: "none";
|
|
10
10
|
}>;
|
|
11
11
|
export declare const EVENT_STATUS_SCHEMA: z.ZodEnum<{
|
|
12
|
+
cancelled: "cancelled";
|
|
12
13
|
confirmed: "confirmed";
|
|
13
14
|
tentative: "tentative";
|
|
14
|
-
cancelled: "cancelled";
|
|
15
15
|
}>;
|
|
16
16
|
export declare const RESPONSE_STATUS_SCHEMA: z.ZodEnum<{
|
|
17
17
|
tentative: "tentative";
|
|
@@ -167,8 +167,8 @@ export declare const EVENT_CONFERENCE_SCHEMA: z.ZodObject<{
|
|
|
167
167
|
conferenceId: z.ZodOptional<z.ZodString>;
|
|
168
168
|
creationStatus: z.ZodOptional<z.ZodEnum<{
|
|
169
169
|
success: "success";
|
|
170
|
-
pending: "pending";
|
|
171
170
|
failure: "failure";
|
|
171
|
+
pending: "pending";
|
|
172
172
|
}>>;
|
|
173
173
|
entryPoints: z.ZodArray<z.ZodObject<{
|
|
174
174
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -212,8 +212,8 @@ export declare const CALENDAR_EVENT_SCHEMA: z.ZodObject<{
|
|
|
212
212
|
conferenceId: z.ZodOptional<z.ZodString>;
|
|
213
213
|
creationStatus: z.ZodOptional<z.ZodEnum<{
|
|
214
214
|
success: "success";
|
|
215
|
-
pending: "pending";
|
|
216
215
|
failure: "failure";
|
|
216
|
+
pending: "pending";
|
|
217
217
|
}>>;
|
|
218
218
|
entryPoints: z.ZodArray<z.ZodObject<{
|
|
219
219
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -276,9 +276,9 @@ export declare const CALENDAR_EVENT_SCHEMA: z.ZodObject<{
|
|
|
276
276
|
timeZone: z.ZodOptional<z.ZodString>;
|
|
277
277
|
}, z.core.$strip>>;
|
|
278
278
|
status: z.ZodEnum<{
|
|
279
|
+
cancelled: "cancelled";
|
|
279
280
|
confirmed: "confirmed";
|
|
280
281
|
tentative: "tentative";
|
|
281
|
-
cancelled: "cancelled";
|
|
282
282
|
}>;
|
|
283
283
|
summary: z.ZodString;
|
|
284
284
|
transparency: z.ZodEnum<{
|
|
@@ -325,8 +325,8 @@ export declare const EVENT_PAGE_SCHEMA: z.ZodObject<{
|
|
|
325
325
|
conferenceId: z.ZodOptional<z.ZodString>;
|
|
326
326
|
creationStatus: z.ZodOptional<z.ZodEnum<{
|
|
327
327
|
success: "success";
|
|
328
|
-
pending: "pending";
|
|
329
328
|
failure: "failure";
|
|
329
|
+
pending: "pending";
|
|
330
330
|
}>>;
|
|
331
331
|
entryPoints: z.ZodArray<z.ZodObject<{
|
|
332
332
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -389,9 +389,9 @@ export declare const EVENT_PAGE_SCHEMA: z.ZodObject<{
|
|
|
389
389
|
timeZone: z.ZodOptional<z.ZodString>;
|
|
390
390
|
}, z.core.$strip>>;
|
|
391
391
|
status: z.ZodEnum<{
|
|
392
|
+
cancelled: "cancelled";
|
|
392
393
|
confirmed: "confirmed";
|
|
393
394
|
tentative: "tentative";
|
|
394
|
-
cancelled: "cancelled";
|
|
395
395
|
}>;
|
|
396
396
|
summary: z.ZodString;
|
|
397
397
|
transparency: z.ZodEnum<{
|
package/dist/linear/schemas.d.ts
CHANGED
|
@@ -1702,10 +1702,7 @@ export declare const LINEAR_PROVIDER_PROJECT_SCHEMA: z.ZodObject<{
|
|
|
1702
1702
|
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>]>;
|
|
1703
1703
|
id: z.ZodString;
|
|
1704
1704
|
name: z.ZodString;
|
|
1705
|
-
color: z.ZodString;
|
|
1706
|
-
completedAt: z.ZodNullable<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>]>>;
|
|
1707
1705
|
description: z.ZodString;
|
|
1708
|
-
url: z.ZodString;
|
|
1709
1706
|
status: z.ZodObject<{
|
|
1710
1707
|
color: z.ZodString;
|
|
1711
1708
|
description: z.ZodNullable<z.ZodString>;
|
|
@@ -1713,6 +1710,9 @@ export declare const LINEAR_PROVIDER_PROJECT_SCHEMA: z.ZodObject<{
|
|
|
1713
1710
|
name: z.ZodString;
|
|
1714
1711
|
type: z.ZodString;
|
|
1715
1712
|
}, z.core.$strip>;
|
|
1713
|
+
completedAt: z.ZodNullable<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>]>>;
|
|
1714
|
+
color: z.ZodString;
|
|
1715
|
+
url: z.ZodString;
|
|
1716
1716
|
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>]>;
|
|
1717
1717
|
state: z.ZodString;
|
|
1718
1718
|
lead: z.ZodNullable<z.ZodObject<{
|
|
@@ -1780,18 +1780,20 @@ export declare const LINEAR_PROVIDER_ISSUE_SCHEMA: z.ZodObject<{
|
|
|
1780
1780
|
number: z.ZodNumber;
|
|
1781
1781
|
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>]>;
|
|
1782
1782
|
id: z.ZodString;
|
|
1783
|
-
team: z.ZodObject<{
|
|
1784
|
-
displayName: z.ZodString;
|
|
1785
|
-
id: z.ZodString;
|
|
1786
|
-
key: z.ZodString;
|
|
1787
|
-
name: z.ZodString;
|
|
1788
|
-
}, z.core.$strip>;
|
|
1789
1783
|
project: z.ZodNullable<z.ZodObject<{
|
|
1790
1784
|
id: z.ZodString;
|
|
1791
1785
|
name: z.ZodString;
|
|
1792
1786
|
slugId: z.ZodString;
|
|
1793
1787
|
url: z.ZodString;
|
|
1794
1788
|
}, z.core.$strip>>;
|
|
1789
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1790
|
+
completedAt: z.ZodNullable<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>]>>;
|
|
1791
|
+
team: z.ZodObject<{
|
|
1792
|
+
displayName: z.ZodString;
|
|
1793
|
+
id: z.ZodString;
|
|
1794
|
+
key: z.ZodString;
|
|
1795
|
+
name: z.ZodString;
|
|
1796
|
+
}, z.core.$strip>;
|
|
1795
1797
|
assignee: z.ZodNullable<z.ZodObject<{
|
|
1796
1798
|
active: z.ZodBoolean;
|
|
1797
1799
|
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
@@ -1800,7 +1802,6 @@ export declare const LINEAR_PROVIDER_ISSUE_SCHEMA: z.ZodObject<{
|
|
|
1800
1802
|
id: z.ZodString;
|
|
1801
1803
|
name: z.ZodString;
|
|
1802
1804
|
}, z.core.$strip>>;
|
|
1803
|
-
completedAt: z.ZodNullable<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>]>>;
|
|
1804
1805
|
parent: z.ZodNullable<z.ZodObject<{
|
|
1805
1806
|
id: z.ZodString;
|
|
1806
1807
|
identifier: z.ZodString;
|
|
@@ -1808,7 +1809,6 @@ export declare const LINEAR_PROVIDER_ISSUE_SCHEMA: z.ZodObject<{
|
|
|
1808
1809
|
url: z.ZodString;
|
|
1809
1810
|
}, z.core.$strip>>;
|
|
1810
1811
|
title: z.ZodString;
|
|
1811
|
-
description: z.ZodNullable<z.ZodString>;
|
|
1812
1812
|
url: z.ZodString;
|
|
1813
1813
|
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>]>;
|
|
1814
1814
|
state: z.ZodObject<{
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
export declare const RESEND_EMAIL_STATUS_SCHEMA: z.ZodEnum<{
|
|
3
|
+
failed: "failed";
|
|
3
4
|
delivered: "delivered";
|
|
4
5
|
opened: "opened";
|
|
5
|
-
failed: "failed";
|
|
6
6
|
scheduled: "scheduled";
|
|
7
7
|
sent: "sent";
|
|
8
8
|
canceled: "canceled";
|
|
@@ -75,9 +75,9 @@ export declare const RESEND_EMAIL_SUMMARY_WIRE_SCHEMA: z.ZodObject<{
|
|
|
75
75
|
from: z.ZodString;
|
|
76
76
|
id: z.ZodString;
|
|
77
77
|
last_event: z.ZodEnum<{
|
|
78
|
+
failed: "failed";
|
|
78
79
|
delivered: "delivered";
|
|
79
80
|
opened: "opened";
|
|
80
|
-
failed: "failed";
|
|
81
81
|
scheduled: "scheduled";
|
|
82
82
|
sent: "sent";
|
|
83
83
|
canceled: "canceled";
|
|
@@ -102,9 +102,9 @@ export declare const RESEND_EMAIL_SUMMARY_SCHEMA: z.ZodPipe<z.ZodObject<{
|
|
|
102
102
|
from: z.ZodString;
|
|
103
103
|
id: z.ZodString;
|
|
104
104
|
last_event: z.ZodEnum<{
|
|
105
|
+
failed: "failed";
|
|
105
106
|
delivered: "delivered";
|
|
106
107
|
opened: "opened";
|
|
107
|
-
failed: "failed";
|
|
108
108
|
scheduled: "scheduled";
|
|
109
109
|
sent: "sent";
|
|
110
110
|
canceled: "canceled";
|
|
@@ -123,7 +123,7 @@ export declare const RESEND_EMAIL_SUMMARY_SCHEMA: z.ZodPipe<z.ZodObject<{
|
|
|
123
123
|
topic_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
124
124
|
}, z.core.$strip>, z.ZodTransform<{
|
|
125
125
|
createdAt: string;
|
|
126
|
-
lastEvent: "
|
|
126
|
+
lastEvent: "failed" | "delivered" | "opened" | "scheduled" | "sent" | "canceled" | "queued" | "suppressed" | "bounced" | "clicked" | "complained" | "delivery_delayed";
|
|
127
127
|
messageId: string | null | undefined;
|
|
128
128
|
replyTo: string[] | null | undefined;
|
|
129
129
|
scheduledAt: string | null | undefined;
|
|
@@ -138,7 +138,7 @@ export declare const RESEND_EMAIL_SUMMARY_SCHEMA: z.ZodPipe<z.ZodObject<{
|
|
|
138
138
|
created_at: string;
|
|
139
139
|
from: string;
|
|
140
140
|
id: string;
|
|
141
|
-
last_event: "
|
|
141
|
+
last_event: "failed" | "delivered" | "opened" | "scheduled" | "sent" | "canceled" | "queued" | "suppressed" | "bounced" | "clicked" | "complained" | "delivery_delayed";
|
|
142
142
|
subject: string;
|
|
143
143
|
to: string[];
|
|
144
144
|
bcc?: string[] | null | undefined;
|
|
@@ -153,9 +153,9 @@ export declare const RESEND_EMAIL_WIRE_SCHEMA: z.ZodObject<{
|
|
|
153
153
|
from: z.ZodString;
|
|
154
154
|
id: z.ZodString;
|
|
155
155
|
last_event: z.ZodEnum<{
|
|
156
|
+
failed: "failed";
|
|
156
157
|
delivered: "delivered";
|
|
157
158
|
opened: "opened";
|
|
158
|
-
failed: "failed";
|
|
159
159
|
scheduled: "scheduled";
|
|
160
160
|
sent: "sent";
|
|
161
161
|
canceled: "canceled";
|
|
@@ -187,9 +187,9 @@ export declare const RESEND_EMAIL_SCHEMA: z.ZodPipe<z.ZodObject<{
|
|
|
187
187
|
from: z.ZodString;
|
|
188
188
|
id: z.ZodString;
|
|
189
189
|
last_event: z.ZodEnum<{
|
|
190
|
+
failed: "failed";
|
|
190
191
|
delivered: "delivered";
|
|
191
192
|
opened: "opened";
|
|
192
|
-
failed: "failed";
|
|
193
193
|
scheduled: "scheduled";
|
|
194
194
|
sent: "sent";
|
|
195
195
|
canceled: "canceled";
|
|
@@ -217,7 +217,7 @@ export declare const RESEND_EMAIL_SCHEMA: z.ZodPipe<z.ZodObject<{
|
|
|
217
217
|
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
218
218
|
}, z.core.$strip>, z.ZodTransform<{
|
|
219
219
|
createdAt: string;
|
|
220
|
-
lastEvent: "
|
|
220
|
+
lastEvent: "failed" | "delivered" | "opened" | "scheduled" | "sent" | "canceled" | "queued" | "suppressed" | "bounced" | "clicked" | "complained" | "delivery_delayed";
|
|
221
221
|
messageId: string | null | undefined;
|
|
222
222
|
replyTo: string[] | null | undefined;
|
|
223
223
|
scheduledAt: string | null | undefined;
|
|
@@ -239,7 +239,7 @@ export declare const RESEND_EMAIL_SCHEMA: z.ZodPipe<z.ZodObject<{
|
|
|
239
239
|
created_at: string;
|
|
240
240
|
from: string;
|
|
241
241
|
id: string;
|
|
242
|
-
last_event: "
|
|
242
|
+
last_event: "failed" | "delivered" | "opened" | "scheduled" | "sent" | "canceled" | "queued" | "suppressed" | "bounced" | "clicked" | "complained" | "delivery_delayed";
|
|
243
243
|
subject: string;
|
|
244
244
|
to: string[];
|
|
245
245
|
object: "email";
|
|
@@ -261,11 +261,11 @@ export declare const RESEND_ATTACHMENT_WIRE_SCHEMA: z.ZodObject<{
|
|
|
261
261
|
attachment: "attachment";
|
|
262
262
|
inline: "inline";
|
|
263
263
|
}>>;
|
|
264
|
-
content_id: z.ZodString
|
|
264
|
+
content_id: z.ZodOptional<z.ZodString>;
|
|
265
265
|
content_type: z.ZodString;
|
|
266
266
|
download_url: z.ZodURL;
|
|
267
267
|
expires_at: z.ZodString;
|
|
268
|
-
filename: z.ZodNullable<z.ZodString
|
|
268
|
+
filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
269
269
|
id: z.ZodString;
|
|
270
270
|
size: z.ZodNumber;
|
|
271
271
|
}, z.core.$strip>;
|
|
@@ -274,31 +274,31 @@ export declare const RESEND_ATTACHMENT_SCHEMA: z.ZodPipe<z.ZodObject<{
|
|
|
274
274
|
attachment: "attachment";
|
|
275
275
|
inline: "inline";
|
|
276
276
|
}>>;
|
|
277
|
-
content_id: z.ZodString
|
|
277
|
+
content_id: z.ZodOptional<z.ZodString>;
|
|
278
278
|
content_type: z.ZodString;
|
|
279
279
|
download_url: z.ZodURL;
|
|
280
280
|
expires_at: z.ZodString;
|
|
281
|
-
filename: z.ZodNullable<z.ZodString
|
|
281
|
+
filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
282
282
|
id: z.ZodString;
|
|
283
283
|
size: z.ZodNumber;
|
|
284
284
|
}, z.core.$strip>, z.ZodTransform<{
|
|
285
|
-
|
|
286
|
-
contentId: string;
|
|
285
|
+
filename?: string | null | undefined;
|
|
287
286
|
contentType: string;
|
|
288
287
|
downloadUrl: string;
|
|
289
288
|
expiresAt: string;
|
|
290
|
-
|
|
289
|
+
contentId?: string | undefined;
|
|
290
|
+
contentDisposition: "attachment" | "inline" | null;
|
|
291
291
|
id: string;
|
|
292
292
|
size: number;
|
|
293
293
|
}, {
|
|
294
294
|
content_disposition: "attachment" | "inline" | null;
|
|
295
|
-
content_id: string;
|
|
296
295
|
content_type: string;
|
|
297
296
|
download_url: string;
|
|
298
297
|
expires_at: string;
|
|
299
|
-
filename: string | null;
|
|
300
298
|
id: string;
|
|
301
299
|
size: number;
|
|
300
|
+
content_id?: string | undefined;
|
|
301
|
+
filename?: string | null | undefined;
|
|
302
302
|
}>>;
|
|
303
303
|
export declare const RESEND_RECEIVED_EMAIL_SUMMARY_WIRE_SCHEMA: z.ZodObject<{
|
|
304
304
|
attachments: z.ZodArray<z.ZodObject<{
|
|
@@ -614,8 +614,8 @@ export declare const RESEND_CONTACT_IMPORT_WIRE_SCHEMA: z.ZodObject<{
|
|
|
614
614
|
id: z.ZodString;
|
|
615
615
|
object: z.ZodLiteral<"contact_import">;
|
|
616
616
|
status: z.ZodEnum<{
|
|
617
|
-
completed: "completed";
|
|
618
617
|
failed: "failed";
|
|
618
|
+
completed: "completed";
|
|
619
619
|
in_progress: "in_progress";
|
|
620
620
|
queued: "queued";
|
|
621
621
|
}>;
|
|
@@ -633,8 +633,8 @@ export declare const RESEND_CONTACT_IMPORT_SCHEMA: z.ZodPipe<z.ZodObject<{
|
|
|
633
633
|
id: z.ZodString;
|
|
634
634
|
object: z.ZodLiteral<"contact_import">;
|
|
635
635
|
status: z.ZodEnum<{
|
|
636
|
-
completed: "completed";
|
|
637
636
|
failed: "failed";
|
|
637
|
+
completed: "completed";
|
|
638
638
|
in_progress: "in_progress";
|
|
639
639
|
queued: "queued";
|
|
640
640
|
}>;
|
|
@@ -643,7 +643,7 @@ export declare const RESEND_CONTACT_IMPORT_SCHEMA: z.ZodPipe<z.ZodObject<{
|
|
|
643
643
|
createdAt: string;
|
|
644
644
|
id: string;
|
|
645
645
|
object: "contact_import";
|
|
646
|
-
status: "
|
|
646
|
+
status: "failed" | "completed" | "in_progress" | "queued";
|
|
647
647
|
counts?: {
|
|
648
648
|
created: number;
|
|
649
649
|
failed: number;
|
|
@@ -655,7 +655,7 @@ export declare const RESEND_CONTACT_IMPORT_SCHEMA: z.ZodPipe<z.ZodObject<{
|
|
|
655
655
|
created_at: string;
|
|
656
656
|
id: string;
|
|
657
657
|
object: "contact_import";
|
|
658
|
-
status: "
|
|
658
|
+
status: "failed" | "completed" | "in_progress" | "queued";
|
|
659
659
|
completed_at?: string | null | undefined;
|
|
660
660
|
counts?: {
|
|
661
661
|
created: number;
|
|
@@ -92,21 +92,22 @@ export const RESEND_EMAIL_SCHEMA = RESEND_EMAIL_WIRE_SCHEMA.transform(({ created
|
|
|
92
92
|
}));
|
|
93
93
|
export const RESEND_ATTACHMENT_WIRE_SCHEMA = z.object({
|
|
94
94
|
content_disposition: z.enum(["attachment", "inline"]).nullable(),
|
|
95
|
-
content_id: z.string(),
|
|
95
|
+
content_id: z.string().optional(),
|
|
96
96
|
content_type: z.string(),
|
|
97
97
|
download_url: z.url(),
|
|
98
98
|
expires_at: z.string(),
|
|
99
|
-
filename: z.string().nullable(),
|
|
99
|
+
filename: z.string().nullable().optional(),
|
|
100
100
|
id: z.string(),
|
|
101
101
|
size: z.number().int().nonnegative(),
|
|
102
102
|
});
|
|
103
|
-
export const RESEND_ATTACHMENT_SCHEMA = RESEND_ATTACHMENT_WIRE_SCHEMA.transform(({ content_disposition: contentDisposition, content_id: contentId, content_type: contentType, download_url: downloadUrl, expires_at: expiresAt, ...attachment }) => ({
|
|
103
|
+
export const RESEND_ATTACHMENT_SCHEMA = RESEND_ATTACHMENT_WIRE_SCHEMA.transform(({ content_disposition: contentDisposition, content_id: contentId, content_type: contentType, download_url: downloadUrl, expires_at: expiresAt, filename, ...attachment }) => ({
|
|
104
104
|
...attachment,
|
|
105
105
|
contentDisposition,
|
|
106
|
-
contentId,
|
|
106
|
+
...(contentId === undefined ? {} : { contentId }),
|
|
107
107
|
contentType,
|
|
108
108
|
downloadUrl,
|
|
109
109
|
expiresAt,
|
|
110
|
+
...(filename === undefined ? {} : { filename }),
|
|
110
111
|
}));
|
|
111
112
|
const RESEND_RECEIVED_ATTACHMENT_WIRE_SCHEMA = z.object({
|
|
112
113
|
content_disposition: z.string().nullable(),
|
package/dist/triggers.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { airtableTriggerContracts } from "./airtable/index.js";
|
|
2
|
+
import type { automateTriggerContracts } from "./automate/index.js";
|
|
2
3
|
import type { asanaTriggerContracts } from "./asana/index.js";
|
|
3
4
|
import type { brevoTriggerContracts } from "./brevo/index.js";
|
|
4
5
|
import type { convexTriggerContracts } from "./convex/index.js";
|
|
@@ -20,7 +21,7 @@ import type { vercelTriggerContracts } from "./vercel/index.js";
|
|
|
20
21
|
import type { webflowTriggerContracts } from "./webflow/index.js";
|
|
21
22
|
import type { whatsappTriggerContracts } from "./whatsapp/index.js";
|
|
22
23
|
import type { z } from "zod";
|
|
23
|
-
export type TriggerContractMap = typeof airtableTriggerContracts & typeof asanaTriggerContracts & typeof brevoTriggerContracts & typeof convexTriggerContracts & typeof closeTriggerContracts & typeof githubTriggerContracts & typeof gmailTriggerContracts & typeof googleCalendarTriggerContracts & typeof googleFormsTriggerContracts & typeof googleMeetTriggerContracts & typeof linearTriggerContracts & typeof notionTriggerContracts & typeof outlookTriggerContracts & typeof resendTriggerContracts & typeof slackTriggerContracts & typeof stripeTriggerContracts & typeof teamsTriggerContracts & typeof trelloTriggerContracts & typeof vercelTriggerContracts & typeof webflowTriggerContracts & typeof whatsappTriggerContracts;
|
|
24
|
+
export type TriggerContractMap = typeof airtableTriggerContracts & typeof automateTriggerContracts & typeof asanaTriggerContracts & typeof brevoTriggerContracts & typeof convexTriggerContracts & typeof closeTriggerContracts & typeof githubTriggerContracts & typeof gmailTriggerContracts & typeof googleCalendarTriggerContracts & typeof googleFormsTriggerContracts & typeof googleMeetTriggerContracts & typeof linearTriggerContracts & typeof notionTriggerContracts & typeof outlookTriggerContracts & typeof resendTriggerContracts & typeof slackTriggerContracts & typeof stripeTriggerContracts & typeof teamsTriggerContracts & typeof trelloTriggerContracts & typeof vercelTriggerContracts & typeof webflowTriggerContracts & typeof whatsappTriggerContracts;
|
|
24
25
|
export type IntegrationTriggerType = keyof TriggerContractMap;
|
|
25
26
|
/** Canonical authoring configuration for one integration trigger type. */
|
|
26
27
|
export type TriggerConfig<TType extends IntegrationTriggerType> = z.input<TriggerContractMap[TType]["configSchema"]> extends Record<string, never> ? object : z.input<TriggerContractMap[TType]["configSchema"]>;
|
package/dist/whatsapp/index.d.ts
CHANGED
|
@@ -592,8 +592,8 @@ export declare const whatsappTriggerContracts: {
|
|
|
592
592
|
}, z.core.$strip>>;
|
|
593
593
|
recipient_id: z.ZodString;
|
|
594
594
|
status: z.ZodEnum<{
|
|
595
|
-
delivered: "delivered";
|
|
596
595
|
failed: "failed";
|
|
596
|
+
delivered: "delivered";
|
|
597
597
|
sent: "sent";
|
|
598
598
|
read: "read";
|
|
599
599
|
played: "played";
|
|
@@ -602,8 +602,8 @@ export declare const whatsappTriggerContracts: {
|
|
|
602
602
|
}, z.core.$strip>;
|
|
603
603
|
recipientId: z.ZodString;
|
|
604
604
|
status: z.ZodEnum<{
|
|
605
|
-
delivered: "delivered";
|
|
606
605
|
failed: "failed";
|
|
606
|
+
delivered: "delivered";
|
|
607
607
|
sent: "sent";
|
|
608
608
|
read: "read";
|
|
609
609
|
played: "played";
|
|
@@ -153,8 +153,8 @@ export declare const WHATSAPP_WEBHOOK_SCHEMA: z.ZodObject<{
|
|
|
153
153
|
}, z.core.$strip>>;
|
|
154
154
|
recipient_id: z.ZodString;
|
|
155
155
|
status: z.ZodEnum<{
|
|
156
|
-
delivered: "delivered";
|
|
157
156
|
failed: "failed";
|
|
157
|
+
delivered: "delivered";
|
|
158
158
|
sent: "sent";
|
|
159
159
|
read: "read";
|
|
160
160
|
played: "played";
|
|
@@ -373,8 +373,8 @@ export declare const WHATSAPP_MESSAGE_STATUS_EVENT_SCHEMA: z.ZodObject<{
|
|
|
373
373
|
}, z.core.$strip>>;
|
|
374
374
|
recipient_id: z.ZodString;
|
|
375
375
|
status: z.ZodEnum<{
|
|
376
|
-
delivered: "delivered";
|
|
377
376
|
failed: "failed";
|
|
377
|
+
delivered: "delivered";
|
|
378
378
|
sent: "sent";
|
|
379
379
|
read: "read";
|
|
380
380
|
played: "played";
|
|
@@ -383,8 +383,8 @@ export declare const WHATSAPP_MESSAGE_STATUS_EVENT_SCHEMA: z.ZodObject<{
|
|
|
383
383
|
}, z.core.$strip>;
|
|
384
384
|
recipientId: z.ZodString;
|
|
385
385
|
status: z.ZodEnum<{
|
|
386
|
-
delivered: "delivered";
|
|
387
386
|
failed: "failed";
|
|
387
|
+
delivered: "delivered";
|
|
388
388
|
sent: "sent";
|
|
389
389
|
read: "read";
|
|
390
390
|
played: "played";
|
|
@@ -871,7 +871,7 @@ export declare function normalizeWhatsAppWebhook(input: unknown): {
|
|
|
871
871
|
providerEvent: {
|
|
872
872
|
id: string;
|
|
873
873
|
recipient_id: string;
|
|
874
|
-
status: "
|
|
874
|
+
status: "failed" | "delivered" | "sent" | "read" | "played";
|
|
875
875
|
timestamp: string;
|
|
876
876
|
biz_opaque_callback_data?: string | undefined;
|
|
877
877
|
conversation?: {
|
|
@@ -900,7 +900,7 @@ export declare function normalizeWhatsAppWebhook(input: unknown): {
|
|
|
900
900
|
} | undefined;
|
|
901
901
|
};
|
|
902
902
|
recipientId: string;
|
|
903
|
-
status: "
|
|
903
|
+
status: "failed" | "delivered" | "sent" | "read" | "played";
|
|
904
904
|
timestamp: string;
|
|
905
905
|
callbackData?: string | undefined;
|
|
906
906
|
conversation?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/integration-contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.101.1",
|
|
4
4
|
"description": "Shared integration payload contracts and provider primitives for Automate.ax.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"zshy": {
|
|
20
20
|
"exports": {
|
|
21
21
|
"./airtable": "./src/airtable/index.ts",
|
|
22
|
+
"./automate": "./src/automate/index.ts",
|
|
22
23
|
"./asana": "./src/asana/index.ts",
|
|
23
24
|
"./brevo": "./src/brevo/index.ts",
|
|
24
25
|
"./convex": "./src/convex/index.ts",
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
}
|
|
49
50
|
},
|
|
50
51
|
"dependencies": {
|
|
51
|
-
"@automate.ax/codec": "0.
|
|
52
|
+
"@automate.ax/codec": "0.101.1",
|
|
52
53
|
"@cfworker/json-schema": "^4.1.1",
|
|
53
54
|
"@googleapis/calendar": "^15.0.0",
|
|
54
55
|
"@googleapis/forms": "^6.0.1",
|
|
@@ -104,6 +105,11 @@
|
|
|
104
105
|
"types": "./dist/airtable/index.d.ts",
|
|
105
106
|
"default": "./dist/airtable/index.js"
|
|
106
107
|
},
|
|
108
|
+
"./automate": {
|
|
109
|
+
"bun": "./src/automate/index.ts",
|
|
110
|
+
"types": "./dist/automate/index.d.ts",
|
|
111
|
+
"default": "./dist/automate/index.js"
|
|
112
|
+
},
|
|
107
113
|
"./asana": {
|
|
108
114
|
"bun": "./src/asana/index.ts",
|
|
109
115
|
"types": "./dist/asana/index.d.ts",
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import * as z from "zod"
|
|
2
|
+
|
|
3
|
+
const AUTOMATE_DEPLOYMENT_STATUS_SCHEMA = z.enum([
|
|
4
|
+
"planning",
|
|
5
|
+
"awaiting_authorization",
|
|
6
|
+
"configuring",
|
|
7
|
+
"publishing",
|
|
8
|
+
"succeeded",
|
|
9
|
+
"failed",
|
|
10
|
+
"cancelled",
|
|
11
|
+
])
|
|
12
|
+
|
|
13
|
+
const RESOURCE_REFERENCE_SCHEMA = z.object({
|
|
14
|
+
id: z.string().min(1),
|
|
15
|
+
name: z.string().min(1),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
export const AUTOMATE_AUTOMATION_TRIGGER_CONFIG_SCHEMA = z.object({
|
|
19
|
+
automationId: z.string().min(1),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
export const AUTOMATE_DEPLOYMENT_TRIGGER_CONFIG_SCHEMA = z.object({
|
|
23
|
+
projectId: z.string().min(1),
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
export const AUTOMATE_AUTOMATION_STATE_EVENT_SCHEMA = z.object({
|
|
27
|
+
automation: z.object({
|
|
28
|
+
description: z.string(),
|
|
29
|
+
id: z.string().min(1),
|
|
30
|
+
identityKey: z.string().min(1),
|
|
31
|
+
}),
|
|
32
|
+
enabled: z.boolean(),
|
|
33
|
+
organization: RESOURCE_REFERENCE_SCHEMA,
|
|
34
|
+
previousEnabled: z.boolean(),
|
|
35
|
+
project: RESOURCE_REFERENCE_SCHEMA,
|
|
36
|
+
transitionedAt: z.date(),
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
export const AUTOMATE_AUTOMATION_ENABLED_EVENT_SCHEMA =
|
|
40
|
+
AUTOMATE_AUTOMATION_STATE_EVENT_SCHEMA.extend({
|
|
41
|
+
enabled: z.literal(true),
|
|
42
|
+
previousEnabled: z.literal(false),
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
export const AUTOMATE_AUTOMATION_DISABLED_EVENT_SCHEMA =
|
|
46
|
+
AUTOMATE_AUTOMATION_STATE_EVENT_SCHEMA.extend({
|
|
47
|
+
enabled: z.literal(false),
|
|
48
|
+
previousEnabled: z.literal(true),
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
export const AUTOMATE_DEPLOYMENT_EVENT_SCHEMA = z.object({
|
|
52
|
+
deployment: z.object({
|
|
53
|
+
completedAt: z.date().nullable(),
|
|
54
|
+
createdAt: z.date(),
|
|
55
|
+
id: z.string().min(1),
|
|
56
|
+
}),
|
|
57
|
+
failure: z.object({ message: z.string() }).nullable(),
|
|
58
|
+
organization: RESOURCE_REFERENCE_SCHEMA,
|
|
59
|
+
previousStatus: AUTOMATE_DEPLOYMENT_STATUS_SCHEMA.nullable(),
|
|
60
|
+
project: RESOURCE_REFERENCE_SCHEMA,
|
|
61
|
+
status: AUTOMATE_DEPLOYMENT_STATUS_SCHEMA,
|
|
62
|
+
transitionedAt: z.date(),
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
const AUTOMATE_TERMINAL_DEPLOYMENT_EVENT_SCHEMA =
|
|
66
|
+
AUTOMATE_DEPLOYMENT_EVENT_SCHEMA.extend({
|
|
67
|
+
deployment: AUTOMATE_DEPLOYMENT_EVENT_SCHEMA.shape.deployment.extend({
|
|
68
|
+
completedAt: z.date(),
|
|
69
|
+
}),
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
export const AUTOMATE_DEPLOYMENT_AWAITING_AUTHORIZATION_EVENT_SCHEMA =
|
|
73
|
+
AUTOMATE_DEPLOYMENT_EVENT_SCHEMA.extend({
|
|
74
|
+
failure: z.null(),
|
|
75
|
+
status: z.literal("awaiting_authorization"),
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
export const AUTOMATE_DEPLOYMENT_CANCELLED_EVENT_SCHEMA =
|
|
79
|
+
AUTOMATE_TERMINAL_DEPLOYMENT_EVENT_SCHEMA.extend({
|
|
80
|
+
failure: z.null(),
|
|
81
|
+
status: z.literal("cancelled"),
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
export const AUTOMATE_DEPLOYMENT_FAILED_EVENT_SCHEMA =
|
|
85
|
+
AUTOMATE_TERMINAL_DEPLOYMENT_EVENT_SCHEMA.extend({
|
|
86
|
+
failure: z.object({ message: z.string() }),
|
|
87
|
+
status: z.literal("failed"),
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
export const AUTOMATE_DEPLOYMENT_SUCCEEDED_EVENT_SCHEMA =
|
|
91
|
+
AUTOMATE_TERMINAL_DEPLOYMENT_EVENT_SCHEMA.extend({
|
|
92
|
+
failure: z.null(),
|
|
93
|
+
status: z.literal("succeeded"),
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
export const automateTriggerContracts = {
|
|
97
|
+
"automate.automation.disabled": {
|
|
98
|
+
configSchema: AUTOMATE_AUTOMATION_TRIGGER_CONFIG_SCHEMA,
|
|
99
|
+
eventSchema: AUTOMATE_AUTOMATION_DISABLED_EVENT_SCHEMA,
|
|
100
|
+
},
|
|
101
|
+
"automate.automation.enabled": {
|
|
102
|
+
configSchema: AUTOMATE_AUTOMATION_TRIGGER_CONFIG_SCHEMA,
|
|
103
|
+
eventSchema: AUTOMATE_AUTOMATION_ENABLED_EVENT_SCHEMA,
|
|
104
|
+
},
|
|
105
|
+
"automate.automation.stateChanged": {
|
|
106
|
+
configSchema: AUTOMATE_AUTOMATION_TRIGGER_CONFIG_SCHEMA,
|
|
107
|
+
eventSchema: AUTOMATE_AUTOMATION_STATE_EVENT_SCHEMA,
|
|
108
|
+
},
|
|
109
|
+
"automate.deployment.awaitingAuthorization": {
|
|
110
|
+
configSchema: AUTOMATE_DEPLOYMENT_TRIGGER_CONFIG_SCHEMA,
|
|
111
|
+
eventSchema: AUTOMATE_DEPLOYMENT_AWAITING_AUTHORIZATION_EVENT_SCHEMA,
|
|
112
|
+
},
|
|
113
|
+
"automate.deployment.cancelled": {
|
|
114
|
+
configSchema: AUTOMATE_DEPLOYMENT_TRIGGER_CONFIG_SCHEMA,
|
|
115
|
+
eventSchema: AUTOMATE_DEPLOYMENT_CANCELLED_EVENT_SCHEMA,
|
|
116
|
+
},
|
|
117
|
+
"automate.deployment.event": {
|
|
118
|
+
configSchema: AUTOMATE_DEPLOYMENT_TRIGGER_CONFIG_SCHEMA,
|
|
119
|
+
eventSchema: AUTOMATE_DEPLOYMENT_EVENT_SCHEMA,
|
|
120
|
+
},
|
|
121
|
+
"automate.deployment.failed": {
|
|
122
|
+
configSchema: AUTOMATE_DEPLOYMENT_TRIGGER_CONFIG_SCHEMA,
|
|
123
|
+
eventSchema: AUTOMATE_DEPLOYMENT_FAILED_EVENT_SCHEMA,
|
|
124
|
+
},
|
|
125
|
+
"automate.deployment.succeeded": {
|
|
126
|
+
configSchema: AUTOMATE_DEPLOYMENT_TRIGGER_CONFIG_SCHEMA,
|
|
127
|
+
eventSchema: AUTOMATE_DEPLOYMENT_SUCCEEDED_EVENT_SCHEMA,
|
|
128
|
+
},
|
|
129
|
+
} as const
|
package/src/close/events.ts
CHANGED
|
@@ -233,6 +233,10 @@ export const CLOSE_TRIGGER_CONFIG_SCHEMA = z.object({})
|
|
|
233
233
|
// resource. Close's documented opportunity-won webhook is one such payload.
|
|
234
234
|
const CLOSE_CALL_EVENT_DATA_SCHEMA = CLOSE_CALL_SCHEMA.partial()
|
|
235
235
|
const CLOSE_COMMENT_EVENT_DATA_SCHEMA = CLOSE_COMMENT_SCHEMA.partial()
|
|
236
|
+
const CLOSE_COMMENT_UPDATED_EVENT_DATA_SCHEMA =
|
|
237
|
+
CLOSE_COMMENT_EVENT_DATA_SCHEMA.extend({
|
|
238
|
+
body: z.string().nullable().optional(),
|
|
239
|
+
})
|
|
236
240
|
const CLOSE_CONTACT_EVENT_DATA_SCHEMA = CLOSE_CONTACT_SCHEMA.partial()
|
|
237
241
|
const CLOSE_EMAIL_EVENT_DATA_SCHEMA = CLOSE_EMAIL_SCHEMA.partial()
|
|
238
242
|
const CLOSE_LEAD_EVENT_DATA_SCHEMA = CLOSE_LEAD_SCHEMA.partial()
|
|
@@ -280,7 +284,7 @@ const SEMANTIC_EVENTS = {
|
|
|
280
284
|
"close.comment.updated": [
|
|
281
285
|
"comment",
|
|
282
286
|
"updated",
|
|
283
|
-
|
|
287
|
+
CLOSE_COMMENT_UPDATED_EVENT_DATA_SCHEMA,
|
|
284
288
|
],
|
|
285
289
|
"close.contact.created": [
|
|
286
290
|
"contact",
|
|
@@ -464,7 +468,7 @@ export const closeTriggerContracts = {
|
|
|
464
468
|
"close.comment.updated": semanticContract(
|
|
465
469
|
"comment",
|
|
466
470
|
"updated",
|
|
467
|
-
|
|
471
|
+
CLOSE_COMMENT_UPDATED_EVENT_DATA_SCHEMA,
|
|
468
472
|
),
|
|
469
473
|
"close.contact.created": semanticContract(
|
|
470
474
|
"contact",
|