@automate.ax/integration-contracts 0.143.9 → 0.144.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.
- package/dist/calendly/api.d.ts +55 -0
- package/dist/calendly/api.js +176 -0
- package/dist/calendly/index.d.ts +6023 -0
- package/dist/calendly/index.js +46 -0
- package/dist/calendly/schemas.d.ts +1170 -0
- package/dist/calendly/schemas.js +420 -0
- package/dist/close/events.d.ts +8 -8
- package/dist/close/schemas.d.ts +12 -12
- package/dist/google-ads/api.d.ts +14 -0
- package/dist/google-ads/api.js +51 -0
- package/dist/millionverifier/schemas.d.ts +7 -7
- package/dist/resend/action-schemas.d.ts +9 -9
- package/dist/slack/event-schemas.d.ts +583 -583
- package/dist/slack/index.d.ts +303 -303
- package/dist/slack/schemas.d.ts +1 -1
- package/dist/teams/index.d.ts +5 -5
- package/dist/teams/schemas.d.ts +4 -4
- package/dist/trello/schemas.d.ts +2 -2
- package/dist/triggers.d.ts +2 -1
- package/package.json +8 -2
- package/src/calendly/api.ts +216 -0
- package/src/calendly/index.ts +69 -0
- package/src/calendly/schemas.ts +450 -0
- package/src/google-ads/api.ts +73 -0
- package/src/triggers.ts +2 -0
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export const CALENDLY_DATE_TIME_SCHEMA = z.iso.datetime({ offset: true });
|
|
3
|
+
export const CALENDLY_URI_SCHEMA = z.url();
|
|
4
|
+
export const CALENDLY_UUID_SCHEMA = z
|
|
5
|
+
.string()
|
|
6
|
+
.trim()
|
|
7
|
+
.regex(/^[A-Za-z0-9_-]+$/, "Use a Calendly UUID, not a path or URL.");
|
|
8
|
+
export const CALENDLY_PAGINATION_SCHEMA = z.object({
|
|
9
|
+
count: z.number().int().min(0).max(100),
|
|
10
|
+
nextPage: z.url().nullable(),
|
|
11
|
+
nextPageToken: z.string().nullable(),
|
|
12
|
+
previousPage: z.url().nullable(),
|
|
13
|
+
previousPageToken: z.string().nullable(),
|
|
14
|
+
});
|
|
15
|
+
export const CALENDLY_USER_SCHEMA = z.object({
|
|
16
|
+
avatarUrl: z.url().nullable(),
|
|
17
|
+
createdAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
18
|
+
currentOrganization: CALENDLY_URI_SCHEMA,
|
|
19
|
+
email: z.email(),
|
|
20
|
+
locale: z.string(),
|
|
21
|
+
name: z.string(),
|
|
22
|
+
resourceType: z.string(),
|
|
23
|
+
schedulingUrl: CALENDLY_URI_SCHEMA,
|
|
24
|
+
slug: z.string(),
|
|
25
|
+
timeNotation: z.enum(["12h", "24h"]).optional(),
|
|
26
|
+
timezone: z.string(),
|
|
27
|
+
updatedAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
28
|
+
uri: CALENDLY_URI_SCHEMA,
|
|
29
|
+
});
|
|
30
|
+
export const CALENDLY_ORGANIZATION_SCHEMA = z.object({
|
|
31
|
+
createdAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
32
|
+
kind: z.enum(["solo", "group"]),
|
|
33
|
+
name: z.string().optional(),
|
|
34
|
+
plan: z.string(),
|
|
35
|
+
stage: z.string(),
|
|
36
|
+
updatedAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
37
|
+
uri: CALENDLY_URI_SCHEMA,
|
|
38
|
+
});
|
|
39
|
+
export const CALENDLY_ORGANIZATION_MEMBERSHIP_SCHEMA = z.object({
|
|
40
|
+
createdAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
41
|
+
organization: CALENDLY_URI_SCHEMA,
|
|
42
|
+
role: z.enum(["admin", "owner", "user"]),
|
|
43
|
+
updatedAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
44
|
+
uri: CALENDLY_URI_SCHEMA,
|
|
45
|
+
user: CALENDLY_USER_SCHEMA.omit({
|
|
46
|
+
currentOrganization: true,
|
|
47
|
+
resourceType: true,
|
|
48
|
+
}),
|
|
49
|
+
});
|
|
50
|
+
const QUESTION_AND_ANSWER_SCHEMA = z.object({
|
|
51
|
+
answer: z.string(),
|
|
52
|
+
position: z.number().int(),
|
|
53
|
+
question: z.string(),
|
|
54
|
+
});
|
|
55
|
+
export const CALENDLY_EVENT_TYPE_SCHEMA = z.object({
|
|
56
|
+
active: z.boolean(),
|
|
57
|
+
adminManaged: z.boolean(),
|
|
58
|
+
bookingMethod: z.enum(["instant", "poll"]),
|
|
59
|
+
color: z.string().regex(/^#[a-f\d]{6}$/i),
|
|
60
|
+
createdAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
61
|
+
customQuestions: z
|
|
62
|
+
.object({
|
|
63
|
+
answerChoices: z.string().array(),
|
|
64
|
+
enabled: z.boolean(),
|
|
65
|
+
includeOther: z.boolean(),
|
|
66
|
+
name: z.string(),
|
|
67
|
+
position: z.number().int(),
|
|
68
|
+
required: z.boolean(),
|
|
69
|
+
type: z.string(),
|
|
70
|
+
})
|
|
71
|
+
.array(),
|
|
72
|
+
deletedAt: CALENDLY_DATE_TIME_SCHEMA.nullable(),
|
|
73
|
+
descriptionHtml: z.string().nullable(),
|
|
74
|
+
descriptionPlain: z.string().nullable(),
|
|
75
|
+
duration: z.number().positive(),
|
|
76
|
+
durationOptions: z.number().int().positive().array().nullable(),
|
|
77
|
+
internalNote: z.string().nullable(),
|
|
78
|
+
isPaid: z.boolean(),
|
|
79
|
+
kind: z.enum(["solo", "group"]),
|
|
80
|
+
locale: z.string(),
|
|
81
|
+
locations: z
|
|
82
|
+
.object({
|
|
83
|
+
additionalInfo: z.string().optional(),
|
|
84
|
+
kind: z.string(),
|
|
85
|
+
location: z.string().optional(),
|
|
86
|
+
phoneNumber: z.string().optional(),
|
|
87
|
+
})
|
|
88
|
+
.array()
|
|
89
|
+
.nullable(),
|
|
90
|
+
name: z.string().nullable(),
|
|
91
|
+
poolingType: z.enum(["collective", "multi_pool", "round_robin"]).nullable(),
|
|
92
|
+
position: z.number().int().min(0),
|
|
93
|
+
profile: z.object({ name: z.string(), owner: CALENDLY_URI_SCHEMA }),
|
|
94
|
+
schedulingUrl: CALENDLY_URI_SCHEMA,
|
|
95
|
+
secret: z.boolean(),
|
|
96
|
+
slug: z.string().nullable(),
|
|
97
|
+
type: z.enum(["AdhocEventType", "StandardEventType"]),
|
|
98
|
+
updatedAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
99
|
+
uri: CALENDLY_URI_SCHEMA,
|
|
100
|
+
});
|
|
101
|
+
export const CALENDLY_EVENT_TYPE_HOST_SCHEMA = z.object({
|
|
102
|
+
createdAt: CALENDLY_DATE_TIME_SCHEMA.optional(),
|
|
103
|
+
eventType: CALENDLY_EVENT_TYPE_SCHEMA,
|
|
104
|
+
member: CALENDLY_USER_SCHEMA.optional(),
|
|
105
|
+
updatedAt: CALENDLY_DATE_TIME_SCHEMA.optional(),
|
|
106
|
+
uri: CALENDLY_URI_SCHEMA,
|
|
107
|
+
});
|
|
108
|
+
export const CALENDLY_CANCELLATION_SCHEMA = z.object({
|
|
109
|
+
canceledBy: z.string(),
|
|
110
|
+
cancelerType: z.string(),
|
|
111
|
+
createdAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
112
|
+
reason: z.string().nullable(),
|
|
113
|
+
});
|
|
114
|
+
export const CALENDLY_AVAILABLE_TIME_SCHEMA = z.object({
|
|
115
|
+
inviteesRemaining: z.number().int().min(0),
|
|
116
|
+
schedulingUrl: CALENDLY_URI_SCHEMA,
|
|
117
|
+
startTime: CALENDLY_DATE_TIME_SCHEMA,
|
|
118
|
+
status: z.literal("available"),
|
|
119
|
+
});
|
|
120
|
+
export const CALENDLY_AVAILABILITY_RULE_SCHEMA = z.object({
|
|
121
|
+
date: z.iso.date().optional(),
|
|
122
|
+
intervals: z
|
|
123
|
+
.object({
|
|
124
|
+
from: z.string().regex(/^\d\d:\d\d$/),
|
|
125
|
+
to: z.string().regex(/^\d\d:\d\d$/),
|
|
126
|
+
})
|
|
127
|
+
.array(),
|
|
128
|
+
type: z.enum(["date", "wday"]),
|
|
129
|
+
wday: z
|
|
130
|
+
.enum([
|
|
131
|
+
"sunday",
|
|
132
|
+
"monday",
|
|
133
|
+
"tuesday",
|
|
134
|
+
"wednesday",
|
|
135
|
+
"thursday",
|
|
136
|
+
"friday",
|
|
137
|
+
"saturday",
|
|
138
|
+
])
|
|
139
|
+
.optional(),
|
|
140
|
+
});
|
|
141
|
+
export const CALENDLY_AVAILABILITY_SCHEDULE_SCHEMA = z.object({
|
|
142
|
+
default: z.boolean(),
|
|
143
|
+
name: z.string(),
|
|
144
|
+
rules: CALENDLY_AVAILABILITY_RULE_SCHEMA.array(),
|
|
145
|
+
timezone: z.string(),
|
|
146
|
+
uri: CALENDLY_URI_SCHEMA,
|
|
147
|
+
user: CALENDLY_URI_SCHEMA,
|
|
148
|
+
});
|
|
149
|
+
export const CALENDLY_EVENT_TYPE_AVAILABILITY_SCHEDULE_SCHEMA = z.object({
|
|
150
|
+
availabilityRule: z.object({
|
|
151
|
+
name: z.string().nullable().optional(),
|
|
152
|
+
rules: CALENDLY_AVAILABILITY_RULE_SCHEMA.array().optional(),
|
|
153
|
+
timezone: z.string().optional(),
|
|
154
|
+
uri: CALENDLY_URI_SCHEMA.optional(),
|
|
155
|
+
user: CALENDLY_URI_SCHEMA.optional(),
|
|
156
|
+
}),
|
|
157
|
+
availabilitySetting: z.literal("host"),
|
|
158
|
+
eventType: CALENDLY_URI_SCHEMA,
|
|
159
|
+
});
|
|
160
|
+
export const CALENDLY_MEETING_LOCATION_SCHEMA = z.object({
|
|
161
|
+
connected: z.boolean().optional(),
|
|
162
|
+
kind: z.enum([
|
|
163
|
+
"ask_invitee",
|
|
164
|
+
"custom",
|
|
165
|
+
"google_conference",
|
|
166
|
+
"gotomeeting_conference",
|
|
167
|
+
"inbound_call",
|
|
168
|
+
"microsoft_teams_conference",
|
|
169
|
+
"outbound_call",
|
|
170
|
+
"physical",
|
|
171
|
+
"webex_conference",
|
|
172
|
+
"zoom_conference",
|
|
173
|
+
]),
|
|
174
|
+
});
|
|
175
|
+
export const CALENDLY_BUSY_TIME_SCHEMA = z.object({
|
|
176
|
+
bufferedEndTime: CALENDLY_DATE_TIME_SCHEMA.optional(),
|
|
177
|
+
bufferedStartTime: CALENDLY_DATE_TIME_SCHEMA.optional(),
|
|
178
|
+
endTime: CALENDLY_DATE_TIME_SCHEMA,
|
|
179
|
+
event: z.object({ uri: CALENDLY_URI_SCHEMA }).optional(),
|
|
180
|
+
startTime: CALENDLY_DATE_TIME_SCHEMA,
|
|
181
|
+
type: z.enum(["calendly", "external", "reserved"]),
|
|
182
|
+
});
|
|
183
|
+
export const CALENDLY_SCHEDULED_EVENT_SCHEMA = z.object({
|
|
184
|
+
cancellation: z
|
|
185
|
+
.object({
|
|
186
|
+
canceledBy: z.string(),
|
|
187
|
+
reason: z.string().nullable(),
|
|
188
|
+
})
|
|
189
|
+
.nullable()
|
|
190
|
+
.optional(),
|
|
191
|
+
createdAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
192
|
+
endTime: CALENDLY_DATE_TIME_SCHEMA,
|
|
193
|
+
eventGuests: z
|
|
194
|
+
.object({
|
|
195
|
+
createdAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
196
|
+
email: z.email(),
|
|
197
|
+
updatedAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
198
|
+
})
|
|
199
|
+
.array(),
|
|
200
|
+
eventMemberships: z
|
|
201
|
+
.object({
|
|
202
|
+
bufferedEndTime: CALENDLY_DATE_TIME_SCHEMA.optional(),
|
|
203
|
+
bufferedStartTime: CALENDLY_DATE_TIME_SCHEMA.optional(),
|
|
204
|
+
user: CALENDLY_URI_SCHEMA,
|
|
205
|
+
userEmail: z.email().optional(),
|
|
206
|
+
userName: z.string().optional(),
|
|
207
|
+
})
|
|
208
|
+
.array(),
|
|
209
|
+
eventType: CALENDLY_URI_SCHEMA,
|
|
210
|
+
inviteesCounter: z.object({
|
|
211
|
+
active: z.number().int().min(0),
|
|
212
|
+
limit: z.number().int().min(0),
|
|
213
|
+
total: z.number().int().min(0),
|
|
214
|
+
}),
|
|
215
|
+
location: z.object({
|
|
216
|
+
additionalInfo: z.string().optional(),
|
|
217
|
+
joinUrl: CALENDLY_URI_SCHEMA.nullable().optional(),
|
|
218
|
+
location: z.string().nullable().optional(),
|
|
219
|
+
status: z.string().nullable().optional(),
|
|
220
|
+
type: z.string(),
|
|
221
|
+
}),
|
|
222
|
+
meetingNotesHtml: z.string().optional(),
|
|
223
|
+
meetingNotesPlain: z.string().nullable().optional(),
|
|
224
|
+
name: z.string().nullable(),
|
|
225
|
+
startTime: CALENDLY_DATE_TIME_SCHEMA,
|
|
226
|
+
status: z.enum(["active", "canceled"]),
|
|
227
|
+
updatedAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
228
|
+
uri: CALENDLY_URI_SCHEMA,
|
|
229
|
+
});
|
|
230
|
+
export const CALENDLY_INVITEE_SCHEMA = z.object({
|
|
231
|
+
cancelUrl: CALENDLY_URI_SCHEMA,
|
|
232
|
+
cancellation: CALENDLY_CANCELLATION_SCHEMA.nullable().optional(),
|
|
233
|
+
createdAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
234
|
+
email: z.email(),
|
|
235
|
+
event: CALENDLY_URI_SCHEMA,
|
|
236
|
+
firstName: z.string().nullable(),
|
|
237
|
+
inviteeScheduledBy: CALENDLY_URI_SCHEMA.nullable(),
|
|
238
|
+
lastName: z.string().nullable(),
|
|
239
|
+
name: z.string(),
|
|
240
|
+
newInvitee: CALENDLY_URI_SCHEMA.nullable(),
|
|
241
|
+
noShow: z
|
|
242
|
+
.object({
|
|
243
|
+
createdAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
244
|
+
uri: CALENDLY_URI_SCHEMA,
|
|
245
|
+
})
|
|
246
|
+
.nullable(),
|
|
247
|
+
oldInvitee: CALENDLY_URI_SCHEMA.nullable(),
|
|
248
|
+
payment: z
|
|
249
|
+
.object({
|
|
250
|
+
amount: z.string(),
|
|
251
|
+
currency: z.string(),
|
|
252
|
+
externalId: z.string(),
|
|
253
|
+
provider: z.string(),
|
|
254
|
+
successful: z.boolean(),
|
|
255
|
+
terms: z.string().nullable(),
|
|
256
|
+
})
|
|
257
|
+
.nullable(),
|
|
258
|
+
questionsAndAnswers: QUESTION_AND_ANSWER_SCHEMA.array(),
|
|
259
|
+
reconfirmation: z
|
|
260
|
+
.object({
|
|
261
|
+
confirmedAt: CALENDLY_DATE_TIME_SCHEMA.nullable(),
|
|
262
|
+
createdAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
263
|
+
})
|
|
264
|
+
.nullable(),
|
|
265
|
+
rescheduleUrl: CALENDLY_URI_SCHEMA,
|
|
266
|
+
rescheduled: z.boolean(),
|
|
267
|
+
routingFormSubmission: CALENDLY_URI_SCHEMA.nullable(),
|
|
268
|
+
schedulingMethod: z.enum(["api", "instant_book"]).nullable(),
|
|
269
|
+
status: z.enum(["active", "canceled"]),
|
|
270
|
+
textReminderNumber: z.string().nullable(),
|
|
271
|
+
timezone: z.string().nullable(),
|
|
272
|
+
tracking: z.object({
|
|
273
|
+
salesforceUuid: z.string().nullable().optional(),
|
|
274
|
+
utmCampaign: z.string().nullable().optional(),
|
|
275
|
+
utmContent: z.string().nullable().optional(),
|
|
276
|
+
utmMedium: z.string().nullable().optional(),
|
|
277
|
+
utmSource: z.string().nullable().optional(),
|
|
278
|
+
utmTerm: z.string().nullable().optional(),
|
|
279
|
+
}),
|
|
280
|
+
updatedAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
281
|
+
uri: CALENDLY_URI_SCHEMA,
|
|
282
|
+
});
|
|
283
|
+
export const CALENDLY_INVITEE_NO_SHOW_SCHEMA = z.object({
|
|
284
|
+
createdAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
285
|
+
invitee: CALENDLY_URI_SCHEMA,
|
|
286
|
+
uri: CALENDLY_URI_SCHEMA,
|
|
287
|
+
});
|
|
288
|
+
export const CALENDLY_ROUTING_FORM_SCHEMA = z.object({
|
|
289
|
+
createdAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
290
|
+
name: z.string(),
|
|
291
|
+
organization: CALENDLY_URI_SCHEMA,
|
|
292
|
+
questions: z
|
|
293
|
+
.object({
|
|
294
|
+
answerChoices: z.string().array().nullable(),
|
|
295
|
+
name: z.string(),
|
|
296
|
+
required: z.boolean(),
|
|
297
|
+
type: z.string(),
|
|
298
|
+
uuid: z.string(),
|
|
299
|
+
})
|
|
300
|
+
.array(),
|
|
301
|
+
status: z.enum(["draft", "published"]),
|
|
302
|
+
updatedAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
303
|
+
uri: CALENDLY_URI_SCHEMA,
|
|
304
|
+
});
|
|
305
|
+
export const CALENDLY_ROUTING_FORM_SUBMISSION_SCHEMA = z.object({
|
|
306
|
+
createdAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
307
|
+
questionsAndAnswers: z
|
|
308
|
+
.object({
|
|
309
|
+
answer: z.string().nullable().optional(),
|
|
310
|
+
question: z.string(),
|
|
311
|
+
questionUuid: z.string().nullable(),
|
|
312
|
+
})
|
|
313
|
+
.array(),
|
|
314
|
+
result: z.discriminatedUnion("type", [
|
|
315
|
+
z.object({ type: z.literal("event_type"), value: CALENDLY_URI_SCHEMA }),
|
|
316
|
+
z.object({ type: z.literal("external_url"), value: CALENDLY_URI_SCHEMA }),
|
|
317
|
+
z.object({
|
|
318
|
+
type: z.literal("custom_message"),
|
|
319
|
+
value: z.object({ body: z.string(), headline: z.string() }),
|
|
320
|
+
}),
|
|
321
|
+
]),
|
|
322
|
+
routingForm: CALENDLY_URI_SCHEMA,
|
|
323
|
+
submitter: CALENDLY_URI_SCHEMA.nullable(),
|
|
324
|
+
submitterType: z.literal("Invitee").nullable(),
|
|
325
|
+
tracking: z.object({
|
|
326
|
+
salesforceUuid: z.string().nullable(),
|
|
327
|
+
utmCampaign: z.string().nullable(),
|
|
328
|
+
utmContent: z.string().nullable(),
|
|
329
|
+
utmMedium: z.string().nullable(),
|
|
330
|
+
utmSource: z.string().nullable(),
|
|
331
|
+
utmTerm: z.string().nullable(),
|
|
332
|
+
}),
|
|
333
|
+
updatedAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
334
|
+
uri: CALENDLY_URI_SCHEMA,
|
|
335
|
+
});
|
|
336
|
+
export const CALENDLY_SCHEDULING_LINK_SCHEMA = z.object({
|
|
337
|
+
bookingUrl: CALENDLY_URI_SCHEMA,
|
|
338
|
+
owner: CALENDLY_URI_SCHEMA.optional(),
|
|
339
|
+
ownerType: z.literal("EventType").optional(),
|
|
340
|
+
});
|
|
341
|
+
export const CALENDLY_TRIGGER_CONFIG_SCHEMA = z
|
|
342
|
+
.object({
|
|
343
|
+
groupUri: CALENDLY_URI_SCHEMA.optional(),
|
|
344
|
+
organizationUri: CALENDLY_URI_SCHEMA,
|
|
345
|
+
scope: z.enum(["group", "organization", "user"]),
|
|
346
|
+
userUri: CALENDLY_URI_SCHEMA.optional(),
|
|
347
|
+
})
|
|
348
|
+
.superRefine((value, context) => {
|
|
349
|
+
if (value.scope === "user" && !value.userUri) {
|
|
350
|
+
context.addIssue({
|
|
351
|
+
code: "custom",
|
|
352
|
+
message: "userUri is required for user scope.",
|
|
353
|
+
path: ["userUri"],
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
if (value.scope === "group" && !value.groupUri) {
|
|
357
|
+
context.addIssue({
|
|
358
|
+
code: "custom",
|
|
359
|
+
message: "groupUri is required for group scope.",
|
|
360
|
+
path: ["groupUri"],
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
export const CALENDLY_ORGANIZATION_TRIGGER_CONFIG_SCHEMA = z.object({
|
|
365
|
+
organizationUri: CALENDLY_URI_SCHEMA,
|
|
366
|
+
scope: z.literal("organization"),
|
|
367
|
+
});
|
|
368
|
+
export const CALENDLY_PROVIDER_EVENT_NAMES = [
|
|
369
|
+
"event_type.created",
|
|
370
|
+
"event_type.deleted",
|
|
371
|
+
"event_type.updated",
|
|
372
|
+
"invitee.canceled",
|
|
373
|
+
"invitee.created",
|
|
374
|
+
"invitee_no_show.created",
|
|
375
|
+
"invitee_no_show.deleted",
|
|
376
|
+
"routing_form_submission.created",
|
|
377
|
+
];
|
|
378
|
+
export const CALENDLY_PROVIDER_EVENT_NAME_SCHEMA = z.enum(CALENDLY_PROVIDER_EVENT_NAMES);
|
|
379
|
+
const CALENDLY_WEBHOOK_BASE_SCHEMA = z.object({
|
|
380
|
+
createdAt: CALENDLY_DATE_TIME_SCHEMA,
|
|
381
|
+
createdBy: CALENDLY_URI_SCHEMA,
|
|
382
|
+
});
|
|
383
|
+
const CALENDLY_EVENT_TYPE_WEBHOOK_PAYLOAD_SCHEMA = CALENDLY_EVENT_TYPE_SCHEMA.omit({ descriptionHtml: true });
|
|
384
|
+
const CALENDLY_INVITEE_WEBHOOK_PAYLOAD_SCHEMA = CALENDLY_INVITEE_SCHEMA.extend({
|
|
385
|
+
scheduledEvent: CALENDLY_SCHEDULED_EVENT_SCHEMA,
|
|
386
|
+
});
|
|
387
|
+
export const CALENDLY_WEBHOOK_EVENT_SCHEMA = z.discriminatedUnion("event", [
|
|
388
|
+
CALENDLY_WEBHOOK_BASE_SCHEMA.extend({
|
|
389
|
+
event: z.literal("invitee.created"),
|
|
390
|
+
payload: CALENDLY_INVITEE_WEBHOOK_PAYLOAD_SCHEMA,
|
|
391
|
+
}),
|
|
392
|
+
CALENDLY_WEBHOOK_BASE_SCHEMA.extend({
|
|
393
|
+
event: z.literal("invitee.canceled"),
|
|
394
|
+
payload: CALENDLY_INVITEE_WEBHOOK_PAYLOAD_SCHEMA,
|
|
395
|
+
}),
|
|
396
|
+
CALENDLY_WEBHOOK_BASE_SCHEMA.extend({
|
|
397
|
+
event: z.literal("invitee_no_show.created"),
|
|
398
|
+
payload: CALENDLY_INVITEE_WEBHOOK_PAYLOAD_SCHEMA,
|
|
399
|
+
}),
|
|
400
|
+
CALENDLY_WEBHOOK_BASE_SCHEMA.extend({
|
|
401
|
+
event: z.literal("invitee_no_show.deleted"),
|
|
402
|
+
payload: CALENDLY_INVITEE_WEBHOOK_PAYLOAD_SCHEMA,
|
|
403
|
+
}),
|
|
404
|
+
CALENDLY_WEBHOOK_BASE_SCHEMA.extend({
|
|
405
|
+
event: z.literal("event_type.created"),
|
|
406
|
+
payload: CALENDLY_EVENT_TYPE_WEBHOOK_PAYLOAD_SCHEMA,
|
|
407
|
+
}),
|
|
408
|
+
CALENDLY_WEBHOOK_BASE_SCHEMA.extend({
|
|
409
|
+
event: z.literal("event_type.deleted"),
|
|
410
|
+
payload: CALENDLY_EVENT_TYPE_WEBHOOK_PAYLOAD_SCHEMA,
|
|
411
|
+
}),
|
|
412
|
+
CALENDLY_WEBHOOK_BASE_SCHEMA.extend({
|
|
413
|
+
event: z.literal("event_type.updated"),
|
|
414
|
+
payload: CALENDLY_EVENT_TYPE_WEBHOOK_PAYLOAD_SCHEMA,
|
|
415
|
+
}),
|
|
416
|
+
CALENDLY_WEBHOOK_BASE_SCHEMA.extend({
|
|
417
|
+
event: z.literal("routing_form_submission.created"),
|
|
418
|
+
payload: CALENDLY_ROUTING_FORM_SUBMISSION_SCHEMA,
|
|
419
|
+
}),
|
|
420
|
+
]);
|
package/dist/close/events.d.ts
CHANGED
|
@@ -485,9 +485,9 @@ export declare const closeTriggerContracts: {
|
|
|
485
485
|
sequenceSubscriptionId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
486
486
|
status: z.ZodOptional<z.ZodEnum<{
|
|
487
487
|
error: "error";
|
|
488
|
+
draft: "draft";
|
|
488
489
|
sent: "sent";
|
|
489
490
|
inbox: "inbox";
|
|
490
|
-
draft: "draft";
|
|
491
491
|
outbox: "outbox";
|
|
492
492
|
scheduled: "scheduled";
|
|
493
493
|
}>>;
|
|
@@ -573,9 +573,9 @@ export declare const closeTriggerContracts: {
|
|
|
573
573
|
sequenceSubscriptionId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
574
574
|
status: z.ZodOptional<z.ZodEnum<{
|
|
575
575
|
error: "error";
|
|
576
|
+
draft: "draft";
|
|
576
577
|
sent: "sent";
|
|
577
578
|
inbox: "inbox";
|
|
578
|
-
draft: "draft";
|
|
579
579
|
outbox: "outbox";
|
|
580
580
|
scheduled: "scheduled";
|
|
581
581
|
}>>;
|
|
@@ -806,9 +806,9 @@ export declare const closeTriggerContracts: {
|
|
|
806
806
|
startsAt: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>>;
|
|
807
807
|
status: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
808
808
|
completed: "completed";
|
|
809
|
+
canceled: "canceled";
|
|
809
810
|
"in-progress": "in-progress";
|
|
810
811
|
upcoming: "upcoming";
|
|
811
|
-
canceled: "canceled";
|
|
812
812
|
"declined-by-org": "declined-by-org";
|
|
813
813
|
"declined-by-lead": "declined-by-lead";
|
|
814
814
|
}>>>;
|
|
@@ -880,9 +880,9 @@ export declare const closeTriggerContracts: {
|
|
|
880
880
|
startsAt: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>>;
|
|
881
881
|
status: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
882
882
|
completed: "completed";
|
|
883
|
+
canceled: "canceled";
|
|
883
884
|
"in-progress": "in-progress";
|
|
884
885
|
upcoming: "upcoming";
|
|
885
|
-
canceled: "canceled";
|
|
886
886
|
"declined-by-org": "declined-by-org";
|
|
887
887
|
"declined-by-lead": "declined-by-lead";
|
|
888
888
|
}>>>;
|
|
@@ -954,9 +954,9 @@ export declare const closeTriggerContracts: {
|
|
|
954
954
|
startsAt: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>>;
|
|
955
955
|
status: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
956
956
|
completed: "completed";
|
|
957
|
+
canceled: "canceled";
|
|
957
958
|
"in-progress": "in-progress";
|
|
958
959
|
upcoming: "upcoming";
|
|
959
|
-
canceled: "canceled";
|
|
960
960
|
"declined-by-org": "declined-by-org";
|
|
961
961
|
"declined-by-lead": "declined-by-lead";
|
|
962
962
|
}>>>;
|
|
@@ -1028,9 +1028,9 @@ export declare const closeTriggerContracts: {
|
|
|
1028
1028
|
startsAt: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>>;
|
|
1029
1029
|
status: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1030
1030
|
completed: "completed";
|
|
1031
|
+
canceled: "canceled";
|
|
1031
1032
|
"in-progress": "in-progress";
|
|
1032
1033
|
upcoming: "upcoming";
|
|
1033
|
-
canceled: "canceled";
|
|
1034
1034
|
"declined-by-org": "declined-by-org";
|
|
1035
1035
|
"declined-by-lead": "declined-by-lead";
|
|
1036
1036
|
}>>>;
|
|
@@ -2160,9 +2160,9 @@ export declare const closeTriggerContracts: {
|
|
|
2160
2160
|
}>>;
|
|
2161
2161
|
status: z.ZodOptional<z.ZodEnum<{
|
|
2162
2162
|
error: "error";
|
|
2163
|
+
draft: "draft";
|
|
2163
2164
|
sent: "sent";
|
|
2164
2165
|
inbox: "inbox";
|
|
2165
|
-
draft: "draft";
|
|
2166
2166
|
outbox: "outbox";
|
|
2167
2167
|
scheduled: "scheduled";
|
|
2168
2168
|
}>>;
|
|
@@ -2231,9 +2231,9 @@ export declare const closeTriggerContracts: {
|
|
|
2231
2231
|
}>>;
|
|
2232
2232
|
status: z.ZodOptional<z.ZodEnum<{
|
|
2233
2233
|
error: "error";
|
|
2234
|
+
draft: "draft";
|
|
2234
2235
|
sent: "sent";
|
|
2235
2236
|
inbox: "inbox";
|
|
2236
|
-
draft: "draft";
|
|
2237
2237
|
outbox: "outbox";
|
|
2238
2238
|
scheduled: "scheduled";
|
|
2239
2239
|
}>>;
|
package/dist/close/schemas.d.ts
CHANGED
|
@@ -788,8 +788,8 @@ export declare const CLOSE_NOTE_SCHEMA: z.ZodObject<{
|
|
|
788
788
|
pinnedAt: z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>>;
|
|
789
789
|
source: z.ZodNullable<z.ZodEnum<{
|
|
790
790
|
email: "email";
|
|
791
|
-
ui: "ui";
|
|
792
791
|
api: "api";
|
|
792
|
+
ui: "ui";
|
|
793
793
|
import: "import";
|
|
794
794
|
clipper: "clipper";
|
|
795
795
|
suggestion: "suggestion";
|
|
@@ -905,9 +905,9 @@ export declare const CLOSE_EMAIL_SCHEMA: z.ZodObject<{
|
|
|
905
905
|
sequenceSubscriptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
906
906
|
status: z.ZodEnum<{
|
|
907
907
|
error: "error";
|
|
908
|
+
draft: "draft";
|
|
908
909
|
sent: "sent";
|
|
909
910
|
inbox: "inbox";
|
|
910
|
-
draft: "draft";
|
|
911
911
|
outbox: "outbox";
|
|
912
912
|
scheduled: "scheduled";
|
|
913
913
|
}>;
|
|
@@ -960,9 +960,9 @@ export declare const CLOSE_SMS_SCHEMA: z.ZodObject<{
|
|
|
960
960
|
}>;
|
|
961
961
|
status: z.ZodEnum<{
|
|
962
962
|
error: "error";
|
|
963
|
+
draft: "draft";
|
|
963
964
|
sent: "sent";
|
|
964
965
|
inbox: "inbox";
|
|
965
|
-
draft: "draft";
|
|
966
966
|
outbox: "outbox";
|
|
967
967
|
scheduled: "scheduled";
|
|
968
968
|
}>;
|
|
@@ -1010,9 +1010,9 @@ export declare const CLOSE_MEETING_SCHEMA: z.ZodObject<{
|
|
|
1010
1010
|
startsAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>;
|
|
1011
1011
|
status: z.ZodNullable<z.ZodEnum<{
|
|
1012
1012
|
completed: "completed";
|
|
1013
|
+
canceled: "canceled";
|
|
1013
1014
|
"in-progress": "in-progress";
|
|
1014
1015
|
upcoming: "upcoming";
|
|
1015
|
-
canceled: "canceled";
|
|
1016
1016
|
"declined-by-org": "declined-by-org";
|
|
1017
1017
|
"declined-by-lead": "declined-by-lead";
|
|
1018
1018
|
}>>;
|
|
@@ -1127,9 +1127,9 @@ export declare const CLOSE_ACTIVITY_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1127
1127
|
sequenceSubscriptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1128
1128
|
status: z.ZodEnum<{
|
|
1129
1129
|
error: "error";
|
|
1130
|
+
draft: "draft";
|
|
1130
1131
|
sent: "sent";
|
|
1131
1132
|
inbox: "inbox";
|
|
1132
|
-
draft: "draft";
|
|
1133
1133
|
outbox: "outbox";
|
|
1134
1134
|
scheduled: "scheduled";
|
|
1135
1135
|
}>;
|
|
@@ -1186,9 +1186,9 @@ export declare const CLOSE_ACTIVITY_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1186
1186
|
startsAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>;
|
|
1187
1187
|
status: z.ZodNullable<z.ZodEnum<{
|
|
1188
1188
|
completed: "completed";
|
|
1189
|
+
canceled: "canceled";
|
|
1189
1190
|
"in-progress": "in-progress";
|
|
1190
1191
|
upcoming: "upcoming";
|
|
1191
|
-
canceled: "canceled";
|
|
1192
1192
|
"declined-by-org": "declined-by-org";
|
|
1193
1193
|
"declined-by-lead": "declined-by-lead";
|
|
1194
1194
|
}>>;
|
|
@@ -1269,9 +1269,9 @@ export declare const CLOSE_ACTIVITY_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1269
1269
|
}>;
|
|
1270
1270
|
status: z.ZodEnum<{
|
|
1271
1271
|
error: "error";
|
|
1272
|
+
draft: "draft";
|
|
1272
1273
|
sent: "sent";
|
|
1273
1274
|
inbox: "inbox";
|
|
1274
|
-
draft: "draft";
|
|
1275
1275
|
outbox: "outbox";
|
|
1276
1276
|
scheduled: "scheduled";
|
|
1277
1277
|
}>;
|
|
@@ -1293,8 +1293,8 @@ export declare const CLOSE_ACTIVITY_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1293
1293
|
}, z.core.$catchall<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>>, z.ZodObject<{
|
|
1294
1294
|
source: z.ZodNullable<z.ZodEnum<{
|
|
1295
1295
|
email: "email";
|
|
1296
|
-
ui: "ui";
|
|
1297
1296
|
api: "api";
|
|
1297
|
+
ui: "ui";
|
|
1298
1298
|
import: "import";
|
|
1299
1299
|
clipper: "clipper";
|
|
1300
1300
|
suggestion: "suggestion";
|
|
@@ -1335,8 +1335,8 @@ export declare const CLOSE_ACTIVITY_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1335
1335
|
pinnedAt: z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>>;
|
|
1336
1336
|
source: z.ZodNullable<z.ZodEnum<{
|
|
1337
1337
|
email: "email";
|
|
1338
|
-
ui: "ui";
|
|
1339
1338
|
api: "api";
|
|
1339
|
+
ui: "ui";
|
|
1340
1340
|
import: "import";
|
|
1341
1341
|
clipper: "clipper";
|
|
1342
1342
|
suggestion: "suggestion";
|
|
@@ -1409,9 +1409,9 @@ export declare const CLOSE_ACTIVITY_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1409
1409
|
sequenceSubscriptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1410
1410
|
status: z.ZodEnum<{
|
|
1411
1411
|
error: "error";
|
|
1412
|
+
draft: "draft";
|
|
1412
1413
|
sent: "sent";
|
|
1413
1414
|
inbox: "inbox";
|
|
1414
|
-
draft: "draft";
|
|
1415
1415
|
outbox: "outbox";
|
|
1416
1416
|
scheduled: "scheduled";
|
|
1417
1417
|
}>;
|
|
@@ -1505,9 +1505,9 @@ export declare const CLOSE_ACTIVITY_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1505
1505
|
sender: z.ZodNullable<z.ZodString>;
|
|
1506
1506
|
status: z.ZodEnum<{
|
|
1507
1507
|
error: "error";
|
|
1508
|
+
draft: "draft";
|
|
1508
1509
|
sent: "sent";
|
|
1509
1510
|
inbox: "inbox";
|
|
1510
|
-
draft: "draft";
|
|
1511
1511
|
outbox: "outbox";
|
|
1512
1512
|
scheduled: "scheduled";
|
|
1513
1513
|
}>;
|
|
@@ -1762,8 +1762,8 @@ export declare const CLOSE_ACTIVITY_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1762
1762
|
sequenceSubscriptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1763
1763
|
source: z.ZodEnum<{
|
|
1764
1764
|
email: "email";
|
|
1765
|
-
ui: "ui";
|
|
1766
1765
|
api: "api";
|
|
1766
|
+
ui: "ui";
|
|
1767
1767
|
import: "import";
|
|
1768
1768
|
clipper: "clipper";
|
|
1769
1769
|
suggestion: "suggestion";
|
package/dist/google-ads/api.d.ts
CHANGED
|
@@ -6,12 +6,21 @@ export declare const GOOGLE_ADS_SECRET_SCHEMA: z.ZodObject<{
|
|
|
6
6
|
developerToken: z.ZodString;
|
|
7
7
|
tokenType: z.ZodString;
|
|
8
8
|
}, z.core.$strip>;
|
|
9
|
+
export declare const GOOGLE_DATA_MANAGER_SECRET_SCHEMA: z.ZodObject<{
|
|
10
|
+
accessToken: z.ZodString;
|
|
11
|
+
tokenType: z.ZodString;
|
|
12
|
+
}, z.core.$strip>;
|
|
9
13
|
export interface GoogleAdsRequestOptions<TSchema extends z.ZodType> {
|
|
10
14
|
body?: z.input<ReturnType<typeof z.json>>;
|
|
11
15
|
loginCustomerId?: string;
|
|
12
16
|
method?: "GET" | "POST";
|
|
13
17
|
responseSchema: TSchema;
|
|
14
18
|
}
|
|
19
|
+
export interface GoogleDataManagerRequestOptions<TSchema extends z.ZodType> {
|
|
20
|
+
body?: z.input<ReturnType<typeof z.json>>;
|
|
21
|
+
method?: "GET" | "POST";
|
|
22
|
+
responseSchema: TSchema;
|
|
23
|
+
}
|
|
15
24
|
interface GoogleAdsApiErrorOptions {
|
|
16
25
|
message?: string;
|
|
17
26
|
providerStatus?: string;
|
|
@@ -34,6 +43,11 @@ export declare class GoogleAdsApiError extends Error {
|
|
|
34
43
|
export declare function getGoogleAdsApi(secret: unknown): {
|
|
35
44
|
request<TSchema extends z.ZodType>(path: string, options: GoogleAdsRequestOptions<TSchema>): Promise<z.output<TSchema>>;
|
|
36
45
|
};
|
|
46
|
+
/** Creates an authenticated Google Data Manager v1 REST client. */
|
|
47
|
+
/** @param secret - Resolved Google OAuth credentials. */
|
|
48
|
+
export declare function getGoogleDataManagerApi(secret: unknown): {
|
|
49
|
+
request<TSchema extends z.ZodType>(path: string, options: GoogleDataManagerRequestOptions<TSchema>): Promise<z.output<TSchema>>;
|
|
50
|
+
};
|
|
37
51
|
/** Normalizes a Google Ads customer ID for paths and headers. */
|
|
38
52
|
/** @param value - Dashed or compact 10-digit customer ID. */
|
|
39
53
|
export declare function normalizeGoogleAdsCustomerId(value: string): string;
|