@hermeticacomms/sdk-node 0.0.0-stage → 0.1.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.
Files changed (73) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +12 -2
  3. package/dist/contracts/analytics.d.ts +405 -0
  4. package/dist/contracts/analytics.js +77 -0
  5. package/dist/contracts/auth.d.ts +359 -0
  6. package/dist/contracts/auth.js +121 -0
  7. package/dist/contracts/billing.d.ts +141 -0
  8. package/dist/contracts/billing.js +31 -0
  9. package/dist/contracts/campaigns.d.ts +918 -0
  10. package/dist/contracts/campaigns.js +269 -0
  11. package/dist/contracts/common.d.ts +57 -0
  12. package/dist/contracts/common.js +35 -0
  13. package/dist/contracts/connectors.d.ts +179 -0
  14. package/dist/contracts/connectors.js +46 -0
  15. package/dist/contracts/consent.d.ts +604 -0
  16. package/dist/contracts/consent.js +180 -0
  17. package/dist/contracts/content-blocks.d.ts +164 -0
  18. package/dist/contracts/content-blocks.js +60 -0
  19. package/dist/contracts/content-library.d.ts +339 -0
  20. package/dist/contracts/content-library.js +50 -0
  21. package/dist/contracts/content.d.ts +949 -0
  22. package/dist/contracts/content.js +192 -0
  23. package/dist/contracts/delivery.d.ts +599 -0
  24. package/dist/contracts/delivery.js +214 -0
  25. package/dist/contracts/events.d.ts +513 -0
  26. package/dist/contracts/events.js +178 -0
  27. package/dist/contracts/experiments.d.ts +376 -0
  28. package/dist/contracts/experiments.js +136 -0
  29. package/dist/contracts/identity.d.ts +756 -0
  30. package/dist/contracts/identity.js +225 -0
  31. package/dist/contracts/index.d.ts +15 -0
  32. package/dist/contracts/index.js +15 -0
  33. package/dist/contracts/integrations.d.ts +381 -0
  34. package/dist/contracts/integrations.js +112 -0
  35. package/dist/contracts/leads.d.ts +733 -0
  36. package/dist/contracts/leads.js +125 -0
  37. package/dist/contracts/metrics.d.ts +460 -0
  38. package/dist/contracts/metrics.js +90 -0
  39. package/dist/contracts/outbound.d.ts +15510 -0
  40. package/dist/contracts/outbound.js +423 -0
  41. package/dist/contracts/pickers.d.ts +12 -0
  42. package/dist/contracts/pickers.js +20 -0
  43. package/dist/contracts/platform-admin.d.ts +230 -0
  44. package/dist/contracts/platform-admin.js +91 -0
  45. package/dist/contracts/postcards.d.ts +79 -0
  46. package/dist/contracts/postcards.js +29 -0
  47. package/dist/contracts/push.d.ts +530 -0
  48. package/dist/contracts/push.js +102 -0
  49. package/dist/contracts/rcs.d.ts +39 -0
  50. package/dist/contracts/rcs.js +19 -0
  51. package/dist/contracts/segments.d.ts +3182 -0
  52. package/dist/contracts/segments.js +416 -0
  53. package/dist/contracts/workflow-nodes.d.ts +2118 -0
  54. package/dist/contracts/workflow-nodes.js +341 -0
  55. package/dist/contracts/workflows.d.ts +46413 -0
  56. package/dist/contracts/workflows.js +341 -0
  57. package/dist/contracts/x10-platform.d.ts +2603 -0
  58. package/dist/contracts/x10-platform.js +129 -0
  59. package/dist/http.d.ts +30 -0
  60. package/dist/http.js +65 -0
  61. package/dist/index.d.ts +11507 -0
  62. package/dist/index.js +63 -0
  63. package/dist/platform.d.ts +163 -0
  64. package/dist/platform.js +40 -0
  65. package/dist/resources.d.ts +1318 -0
  66. package/dist/resources.js +56 -0
  67. package/dist/signature.d.ts +5 -0
  68. package/dist/signature.js +19 -0
  69. package/dist/x10.d.ts +1607 -0
  70. package/dist/x10.js +66 -0
  71. package/dist/z10.d.ts +251 -0
  72. package/dist/z10.js +46 -0
  73. package/package.json +40 -4
package/dist/x10.d.ts ADDED
@@ -0,0 +1,1607 @@
1
+ import type { z } from 'zod';
2
+ import type { X10AiFirstLinesBody, X10AttendanceBody, X10BudgetBody, X10BudgetDto, X10BudgetPatch, X10BulkQuotaBody, X10ClientGroupBody, X10ClientGroupDto, X10CompanyListBody, X10CompanyListDto, X10EventBody, X10EventPatch, X10InvitationDto, X10NoteBody, X10NoteDto, X10SequenceDraftBody, X10SpendBody, X10SpendDto, X10UserGroupBody, X10UserGroupDto, ApiKeyCreate } from './contracts/index.ts';
3
+ import type { createTransport, RequestOptions } from './http.ts';
4
+ type In<S extends z.ZodType> = z.input<S>;
5
+ type Out<S extends z.ZodType> = z.infer<S>;
6
+ /** Agency groups, permission matrix, jobs, budgets, marketing events, company notes/lists and AI bulk jobs. Mutations take `idempotencyKey` through the usual RequestOptions. */
7
+ export declare function x10Resources(http: ReturnType<typeof createTransport>): {
8
+ agencyGroups: {
9
+ list: () => Promise<{
10
+ items: Out<typeof X10ClientGroupDto>[];
11
+ nextCursor: string | null;
12
+ }>;
13
+ create: (body: In<typeof X10ClientGroupBody>) => Promise<{
14
+ id: string;
15
+ name: string;
16
+ workspaceIds: string[];
17
+ createdAt: string;
18
+ }>;
19
+ update: (id: string, body: {
20
+ name?: string;
21
+ workspaceIds?: string[];
22
+ }) => Promise<{
23
+ id: string;
24
+ name: string;
25
+ workspaceIds: string[];
26
+ createdAt: string;
27
+ }>;
28
+ unlink: (id: string, workspaceIds: string[]) => Promise<{
29
+ id: string;
30
+ name: string;
31
+ workspaceIds: string[];
32
+ createdAt: string;
33
+ }>;
34
+ remove: (id: string) => Promise<{
35
+ ok: true;
36
+ }>;
37
+ setQuota: (body: In<typeof X10BulkQuotaBody>) => Promise<{
38
+ updated: number;
39
+ workspaceIds: string[];
40
+ }>;
41
+ /** Mints a key inside a client workspace. Plaintext is returned once. */
42
+ createClientApiKey: (workspaceId: string, body: In<typeof ApiKeyCreate>) => Promise<{
43
+ id: string;
44
+ name: string;
45
+ kind: "secret" | "site";
46
+ prefix: string;
47
+ scopes: string[];
48
+ allowedOrigins: string[];
49
+ allowedDomains?: string[] | undefined;
50
+ allowedConnectionIds?: string[] | undefined;
51
+ allowedSequenceIds?: string[] | undefined;
52
+ rateLimitPerMin?: number | null | undefined;
53
+ lastUsedAt: string | null;
54
+ revokedAt: string | null;
55
+ expiresAt?: string | null | undefined;
56
+ createdBy?: string | null | undefined;
57
+ createdAt: string;
58
+ plaintext: string;
59
+ }>;
60
+ };
61
+ permissions: {
62
+ matrix: () => Promise<{
63
+ modules: string[];
64
+ baseRoles: Record<string, Record<string, {
65
+ read: boolean;
66
+ write: boolean;
67
+ }>>;
68
+ roles: {
69
+ id: string;
70
+ name: string;
71
+ baseRole: string;
72
+ matrix: Record<string, {
73
+ read: boolean;
74
+ write: boolean;
75
+ }>;
76
+ }[];
77
+ }>;
78
+ setRoleMatrix: (roleId: string, matrix: Record<string, {
79
+ read: boolean;
80
+ write: boolean;
81
+ }>) => Promise<{
82
+ id: string;
83
+ name: string;
84
+ baseRole: string;
85
+ matrix: Record<string, {
86
+ read: boolean;
87
+ write: boolean;
88
+ }>;
89
+ }>;
90
+ userGroups: {
91
+ list: () => Promise<{
92
+ items: Out<typeof X10UserGroupDto>[];
93
+ }>;
94
+ create: (body: In<typeof X10UserGroupBody>) => Promise<{
95
+ id: string;
96
+ name: string;
97
+ customRoleId: string;
98
+ userIds: string[];
99
+ createdAt: string;
100
+ }>;
101
+ remove: (id: string) => Promise<{
102
+ ok: true;
103
+ }>;
104
+ };
105
+ invitations: {
106
+ list: () => Promise<{
107
+ items: Out<typeof X10InvitationDto>[];
108
+ }>;
109
+ cancel: (id: string) => Promise<{
110
+ ok: true;
111
+ }>;
112
+ };
113
+ };
114
+ /** Any async job (bulk, export, import, catalog, lead, AI, account export, estimate) by id. */
115
+ jobs: {
116
+ get: (id: string) => Promise<{
117
+ id: string;
118
+ kind: "account_export" | "ai" | "bulk" | "catalog_bulk" | "estimate" | "export" | "import" | "lead";
119
+ status: string;
120
+ total: number | null;
121
+ processed: number | null;
122
+ error: string | null;
123
+ createdAt: string;
124
+ detailPath: string;
125
+ }>;
126
+ };
127
+ budgets: {
128
+ list: (campaignRef?: string) => Promise<{
129
+ items: Out<typeof X10BudgetDto>[];
130
+ }>;
131
+ get: (id: string) => Promise<{
132
+ id: string;
133
+ name: string;
134
+ campaignRef: string | null;
135
+ currency: string;
136
+ amountMinor: number;
137
+ startsOn: string | null;
138
+ endsOn: string | null;
139
+ notes: string | null;
140
+ spentMinor: number;
141
+ remainingMinor: number;
142
+ overBudget: boolean;
143
+ createdAt: string;
144
+ }>;
145
+ create: (body: In<typeof X10BudgetBody>) => Promise<{
146
+ id: string;
147
+ name: string;
148
+ campaignRef: string | null;
149
+ currency: string;
150
+ amountMinor: number;
151
+ startsOn: string | null;
152
+ endsOn: string | null;
153
+ notes: string | null;
154
+ spentMinor: number;
155
+ remainingMinor: number;
156
+ overBudget: boolean;
157
+ createdAt: string;
158
+ }>;
159
+ update: (id: string, body: In<typeof X10BudgetPatch>) => Promise<{
160
+ id: string;
161
+ name: string;
162
+ campaignRef: string | null;
163
+ currency: string;
164
+ amountMinor: number;
165
+ startsOn: string | null;
166
+ endsOn: string | null;
167
+ notes: string | null;
168
+ spentMinor: number;
169
+ remainingMinor: number;
170
+ overBudget: boolean;
171
+ createdAt: string;
172
+ }>;
173
+ spend: (id: string) => Promise<{
174
+ items: Out<typeof X10SpendDto>[];
175
+ }>;
176
+ addSpend: (id: string, body: In<typeof X10SpendBody>, o?: RequestOptions) => Promise<{
177
+ id: string;
178
+ budgetId: string;
179
+ amountMinor: number;
180
+ spentOn: string;
181
+ description: string | null;
182
+ createdAt: string;
183
+ }>;
184
+ };
185
+ marketingEvents: {
186
+ list: (query?: {
187
+ limit?: number;
188
+ cursor?: string;
189
+ status?: string;
190
+ }) => Promise<{
191
+ items: {
192
+ id: string;
193
+ name: string;
194
+ kind: "conference" | "event" | "webinar" | "workshop";
195
+ startsAt: string | null;
196
+ endsAt: string | null;
197
+ url: string | null;
198
+ organizer: string | null;
199
+ capacity: number | null;
200
+ status: "cancelled" | "completed" | "live" | "scheduled";
201
+ externalRef: string | null;
202
+ registered: number;
203
+ attended: number;
204
+ createdAt: string;
205
+ }[];
206
+ nextCursor: string | null;
207
+ }>;
208
+ get: (id: string) => Promise<{
209
+ id: string;
210
+ name: string;
211
+ kind: "conference" | "event" | "webinar" | "workshop";
212
+ startsAt: string | null;
213
+ endsAt: string | null;
214
+ url: string | null;
215
+ organizer: string | null;
216
+ capacity: number | null;
217
+ status: "cancelled" | "completed" | "live" | "scheduled";
218
+ externalRef: string | null;
219
+ registered: number;
220
+ attended: number;
221
+ createdAt: string;
222
+ }>;
223
+ create: (body: In<typeof X10EventBody>) => Promise<{
224
+ id: string;
225
+ name: string;
226
+ kind: "conference" | "event" | "webinar" | "workshop";
227
+ startsAt: string | null;
228
+ endsAt: string | null;
229
+ url: string | null;
230
+ organizer: string | null;
231
+ capacity: number | null;
232
+ status: "cancelled" | "completed" | "live" | "scheduled";
233
+ externalRef: string | null;
234
+ registered: number;
235
+ attended: number;
236
+ createdAt: string;
237
+ }>;
238
+ update: (id: string, body: In<typeof X10EventPatch>) => Promise<{
239
+ id: string;
240
+ name: string;
241
+ kind: "conference" | "event" | "webinar" | "workshop";
242
+ startsAt: string | null;
243
+ endsAt: string | null;
244
+ url: string | null;
245
+ organizer: string | null;
246
+ capacity: number | null;
247
+ status: "cancelled" | "completed" | "live" | "scheduled";
248
+ externalRef: string | null;
249
+ registered: number;
250
+ attended: number;
251
+ createdAt: string;
252
+ }>;
253
+ registrations: (id: string, query?: {
254
+ limit?: number;
255
+ cursor?: string;
256
+ status?: string;
257
+ }) => Promise<{
258
+ items: {
259
+ id: string;
260
+ eventId: string;
261
+ email: string;
262
+ profileId: string | null;
263
+ status: "attended" | "cancelled" | "no_show" | "registered";
264
+ attendedAt: string | null;
265
+ durationSec: number | null;
266
+ createdAt: string;
267
+ }[];
268
+ nextCursor: string | null;
269
+ }>;
270
+ register: (id: string, emails: string[]) => Promise<{
271
+ registered: number;
272
+ skipped: {
273
+ email: string;
274
+ reason: string;
275
+ }[];
276
+ }>;
277
+ attendance: (id: string, body: In<typeof X10AttendanceBody>) => Promise<{
278
+ attended: number;
279
+ noShows: number;
280
+ }>;
281
+ };
282
+ companies: {
283
+ notes: (id: string, query?: {
284
+ limit?: number;
285
+ cursor?: string;
286
+ }) => Promise<{
287
+ items: Out<typeof X10NoteDto>[];
288
+ nextCursor: string | null;
289
+ }>;
290
+ addNote: (id: string, body: In<typeof X10NoteBody>) => Promise<{
291
+ id: string;
292
+ companyId: string;
293
+ body: string;
294
+ authorId: string;
295
+ createdAt: string;
296
+ }>;
297
+ merge: (id: string, mergeIds: string[]) => Promise<unknown>;
298
+ sourceContacts: (id: string, body: {
299
+ providerId: string;
300
+ titles?: string[];
301
+ seniorities?: string[];
302
+ limit?: number;
303
+ offer?: string;
304
+ }) => Promise<unknown>;
305
+ unifyAccounts: () => Promise<{
306
+ linked: number;
307
+ created: number;
308
+ }>;
309
+ lists: {
310
+ list: () => Promise<{
311
+ items: Out<typeof X10CompanyListDto>[];
312
+ }>;
313
+ create: (body: In<typeof X10CompanyListBody>) => Promise<{
314
+ id: string;
315
+ name: string;
316
+ description: string | null;
317
+ companyCount: number;
318
+ createdAt: string;
319
+ }>;
320
+ add: (id: string, companyIds: string[]) => Promise<{
321
+ added: number;
322
+ }>;
323
+ };
324
+ };
325
+ ai: {
326
+ firstLines: (body: In<typeof X10AiFirstLinesBody>) => Promise<{
327
+ id: string;
328
+ kind: "custom" | "first_line";
329
+ status: "done" | "failed" | "queued" | "running";
330
+ total: number;
331
+ processed: number;
332
+ results: {
333
+ key: string;
334
+ text: string | null;
335
+ error?: string | undefined;
336
+ }[];
337
+ model: string | null;
338
+ error: string | null;
339
+ createdAt: string;
340
+ }>;
341
+ job: (id: string) => Promise<{
342
+ id: string;
343
+ kind: "custom" | "first_line";
344
+ status: "done" | "failed" | "queued" | "running";
345
+ total: number;
346
+ processed: number;
347
+ results: {
348
+ key: string;
349
+ text: string | null;
350
+ error?: string | undefined;
351
+ }[];
352
+ model: string | null;
353
+ error: string | null;
354
+ createdAt: string;
355
+ }>;
356
+ draftSequence: (body: In<typeof X10SequenceDraftBody>) => Promise<{
357
+ name: string;
358
+ settings: {
359
+ steps: ({
360
+ waitDays: number;
361
+ businessDays: boolean;
362
+ when?: {
363
+ kind: "engagement";
364
+ event: "clicked" | "opened" | "replied";
365
+ negate: boolean;
366
+ } | {
367
+ kind: "task_outcome";
368
+ outcome: string;
369
+ step?: string | undefined;
370
+ negate: boolean;
371
+ } | {
372
+ kind: "has_phone";
373
+ negate: boolean;
374
+ } | {
375
+ kind: "linkedin_connected";
376
+ negate: boolean;
377
+ } | {
378
+ kind: "reply";
379
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
380
+ negate: boolean;
381
+ } | {
382
+ kind: "verified";
383
+ negate: boolean;
384
+ } | {
385
+ kind: "field";
386
+ field: string;
387
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
388
+ value?: unknown;
389
+ } | undefined;
390
+ window?: {
391
+ startMin: number;
392
+ endMin: number;
393
+ weekdays?: number[] | undefined;
394
+ } | undefined;
395
+ type: "email";
396
+ templateId: string;
397
+ versionId?: string | undefined;
398
+ thread: "new" | "reply";
399
+ alternates: {
400
+ templateId: string;
401
+ versionId?: string | undefined;
402
+ weight: number;
403
+ }[];
404
+ weightA: number;
405
+ optimize: boolean;
406
+ senderConnectionId?: string | undefined;
407
+ } | {
408
+ type: "wait";
409
+ days: number;
410
+ businessDays: boolean;
411
+ } | {
412
+ waitDays: number;
413
+ businessDays: boolean;
414
+ when?: {
415
+ kind: "engagement";
416
+ event: "clicked" | "opened" | "replied";
417
+ negate: boolean;
418
+ } | {
419
+ kind: "task_outcome";
420
+ outcome: string;
421
+ step?: string | undefined;
422
+ negate: boolean;
423
+ } | {
424
+ kind: "has_phone";
425
+ negate: boolean;
426
+ } | {
427
+ kind: "linkedin_connected";
428
+ negate: boolean;
429
+ } | {
430
+ kind: "reply";
431
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
432
+ negate: boolean;
433
+ } | {
434
+ kind: "verified";
435
+ negate: boolean;
436
+ } | {
437
+ kind: "field";
438
+ field: string;
439
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
440
+ value?: unknown;
441
+ } | undefined;
442
+ window?: {
443
+ startMin: number;
444
+ endMin: number;
445
+ weekdays?: number[] | undefined;
446
+ } | undefined;
447
+ type: "task";
448
+ kind: "call" | "custom" | "linkedin_connect" | "linkedin_message" | "linkedin_visit" | "manual_email" | "sms" | "whatsapp";
449
+ title: string;
450
+ notes?: string | undefined;
451
+ draft?: string | undefined;
452
+ } | {
453
+ waitDays: number;
454
+ businessDays: boolean;
455
+ when?: {
456
+ kind: "engagement";
457
+ event: "clicked" | "opened" | "replied";
458
+ negate: boolean;
459
+ } | {
460
+ kind: "task_outcome";
461
+ outcome: string;
462
+ step?: string | undefined;
463
+ negate: boolean;
464
+ } | {
465
+ kind: "has_phone";
466
+ negate: boolean;
467
+ } | {
468
+ kind: "linkedin_connected";
469
+ negate: boolean;
470
+ } | {
471
+ kind: "reply";
472
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
473
+ negate: boolean;
474
+ } | {
475
+ kind: "verified";
476
+ negate: boolean;
477
+ } | {
478
+ kind: "field";
479
+ field: string;
480
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
481
+ value?: unknown;
482
+ } | undefined;
483
+ window?: {
484
+ startMin: number;
485
+ endMin: number;
486
+ weekdays?: number[] | undefined;
487
+ } | undefined;
488
+ type: "jump";
489
+ sequenceId: string;
490
+ } | {
491
+ waitDays: number;
492
+ businessDays: boolean;
493
+ when?: {
494
+ kind: "engagement";
495
+ event: "clicked" | "opened" | "replied";
496
+ negate: boolean;
497
+ } | {
498
+ kind: "task_outcome";
499
+ outcome: string;
500
+ step?: string | undefined;
501
+ negate: boolean;
502
+ } | {
503
+ kind: "has_phone";
504
+ negate: boolean;
505
+ } | {
506
+ kind: "linkedin_connected";
507
+ negate: boolean;
508
+ } | {
509
+ kind: "reply";
510
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
511
+ negate: boolean;
512
+ } | {
513
+ kind: "verified";
514
+ negate: boolean;
515
+ } | {
516
+ kind: "field";
517
+ field: string;
518
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
519
+ value?: unknown;
520
+ } | undefined;
521
+ window?: {
522
+ startMin: number;
523
+ endMin: number;
524
+ weekdays?: number[] | undefined;
525
+ } | undefined;
526
+ type: "sms";
527
+ templateId: string;
528
+ versionId?: string | undefined;
529
+ } | {
530
+ waitDays: number;
531
+ businessDays: boolean;
532
+ when?: {
533
+ kind: "engagement";
534
+ event: "clicked" | "opened" | "replied";
535
+ negate: boolean;
536
+ } | {
537
+ kind: "task_outcome";
538
+ outcome: string;
539
+ step?: string | undefined;
540
+ negate: boolean;
541
+ } | {
542
+ kind: "has_phone";
543
+ negate: boolean;
544
+ } | {
545
+ kind: "linkedin_connected";
546
+ negate: boolean;
547
+ } | {
548
+ kind: "reply";
549
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
550
+ negate: boolean;
551
+ } | {
552
+ kind: "verified";
553
+ negate: boolean;
554
+ } | {
555
+ kind: "field";
556
+ field: string;
557
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
558
+ value?: unknown;
559
+ } | undefined;
560
+ window?: {
561
+ startMin: number;
562
+ endMin: number;
563
+ weekdays?: number[] | undefined;
564
+ } | undefined;
565
+ type: "webhook";
566
+ url: string;
567
+ body?: Record<string, unknown> | undefined;
568
+ headers?: Record<string, string> | undefined;
569
+ maxAttempts: number;
570
+ signingSecret?: string | undefined;
571
+ signingSecretSealed?: string | undefined;
572
+ signingSecretSet?: boolean | undefined;
573
+ responseMap: {
574
+ path: string;
575
+ field: string;
576
+ }[];
577
+ } | {
578
+ waitDays: number;
579
+ businessDays: boolean;
580
+ when?: {
581
+ kind: "engagement";
582
+ event: "clicked" | "opened" | "replied";
583
+ negate: boolean;
584
+ } | {
585
+ kind: "task_outcome";
586
+ outcome: string;
587
+ step?: string | undefined;
588
+ negate: boolean;
589
+ } | {
590
+ kind: "has_phone";
591
+ negate: boolean;
592
+ } | {
593
+ kind: "linkedin_connected";
594
+ negate: boolean;
595
+ } | {
596
+ kind: "reply";
597
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
598
+ negate: boolean;
599
+ } | {
600
+ kind: "verified";
601
+ negate: boolean;
602
+ } | {
603
+ kind: "field";
604
+ field: string;
605
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
606
+ value?: unknown;
607
+ } | undefined;
608
+ window?: {
609
+ startMin: number;
610
+ endMin: number;
611
+ weekdays?: number[] | undefined;
612
+ } | undefined;
613
+ type: "linkedin";
614
+ action: "connect" | "inmail" | "like_post" | "message" | "visit";
615
+ message?: string | undefined;
616
+ } | {
617
+ waitDays: number;
618
+ businessDays: boolean;
619
+ when?: {
620
+ kind: "engagement";
621
+ event: "clicked" | "opened" | "replied";
622
+ negate: boolean;
623
+ } | {
624
+ kind: "task_outcome";
625
+ outcome: string;
626
+ step?: string | undefined;
627
+ negate: boolean;
628
+ } | {
629
+ kind: "has_phone";
630
+ negate: boolean;
631
+ } | {
632
+ kind: "linkedin_connected";
633
+ negate: boolean;
634
+ } | {
635
+ kind: "reply";
636
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
637
+ negate: boolean;
638
+ } | {
639
+ kind: "verified";
640
+ negate: boolean;
641
+ } | {
642
+ kind: "field";
643
+ field: string;
644
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
645
+ value?: unknown;
646
+ } | undefined;
647
+ window?: {
648
+ startMin: number;
649
+ endMin: number;
650
+ weekdays?: number[] | undefined;
651
+ } | undefined;
652
+ type: "whatsapp";
653
+ templateId: string;
654
+ versionId?: string | undefined;
655
+ } | {
656
+ waitDays: number;
657
+ businessDays: boolean;
658
+ when?: {
659
+ kind: "engagement";
660
+ event: "clicked" | "opened" | "replied";
661
+ negate: boolean;
662
+ } | {
663
+ kind: "task_outcome";
664
+ outcome: string;
665
+ step?: string | undefined;
666
+ negate: boolean;
667
+ } | {
668
+ kind: "has_phone";
669
+ negate: boolean;
670
+ } | {
671
+ kind: "linkedin_connected";
672
+ negate: boolean;
673
+ } | {
674
+ kind: "reply";
675
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
676
+ negate: boolean;
677
+ } | {
678
+ kind: "verified";
679
+ negate: boolean;
680
+ } | {
681
+ kind: "field";
682
+ field: string;
683
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
684
+ value?: unknown;
685
+ } | undefined;
686
+ window?: {
687
+ startMin: number;
688
+ endMin: number;
689
+ weekdays?: number[] | undefined;
690
+ } | undefined;
691
+ type: "voice";
692
+ clipId: string;
693
+ via: "linkedin" | "voicemail";
694
+ message?: string | undefined;
695
+ title?: string | undefined;
696
+ } | {
697
+ waitDays: number;
698
+ businessDays: boolean;
699
+ when?: {
700
+ kind: "engagement";
701
+ event: "clicked" | "opened" | "replied";
702
+ negate: boolean;
703
+ } | {
704
+ kind: "task_outcome";
705
+ outcome: string;
706
+ step?: string | undefined;
707
+ negate: boolean;
708
+ } | {
709
+ kind: "has_phone";
710
+ negate: boolean;
711
+ } | {
712
+ kind: "linkedin_connected";
713
+ negate: boolean;
714
+ } | {
715
+ kind: "reply";
716
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
717
+ negate: boolean;
718
+ } | {
719
+ kind: "verified";
720
+ negate: boolean;
721
+ } | {
722
+ kind: "field";
723
+ field: string;
724
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
725
+ value?: unknown;
726
+ } | undefined;
727
+ window?: {
728
+ startMin: number;
729
+ endMin: number;
730
+ weekdays?: number[] | undefined;
731
+ } | undefined;
732
+ type: "postcard";
733
+ design: {
734
+ size: "6x4" | "9x6";
735
+ front: string;
736
+ back: string;
737
+ };
738
+ connectionId: string;
739
+ } | {
740
+ waitDays: number;
741
+ businessDays: boolean;
742
+ type: "branch";
743
+ branches: {
744
+ key: string;
745
+ label?: string | undefined;
746
+ when: {
747
+ kind: "engagement";
748
+ event: "clicked" | "opened" | "replied";
749
+ negate: boolean;
750
+ } | {
751
+ kind: "task_outcome";
752
+ outcome: string;
753
+ step?: string | undefined;
754
+ negate: boolean;
755
+ } | {
756
+ kind: "has_phone";
757
+ negate: boolean;
758
+ } | {
759
+ kind: "linkedin_connected";
760
+ negate: boolean;
761
+ } | {
762
+ kind: "reply";
763
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
764
+ negate: boolean;
765
+ } | {
766
+ kind: "verified";
767
+ negate: boolean;
768
+ } | {
769
+ kind: "field";
770
+ field: string;
771
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
772
+ value?: unknown;
773
+ };
774
+ steps: ({
775
+ waitDays: number;
776
+ businessDays: boolean;
777
+ when?: {
778
+ kind: "engagement";
779
+ event: "clicked" | "opened" | "replied";
780
+ negate: boolean;
781
+ } | {
782
+ kind: "task_outcome";
783
+ outcome: string;
784
+ step?: string | undefined;
785
+ negate: boolean;
786
+ } | {
787
+ kind: "has_phone";
788
+ negate: boolean;
789
+ } | {
790
+ kind: "linkedin_connected";
791
+ negate: boolean;
792
+ } | {
793
+ kind: "reply";
794
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
795
+ negate: boolean;
796
+ } | {
797
+ kind: "verified";
798
+ negate: boolean;
799
+ } | {
800
+ kind: "field";
801
+ field: string;
802
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
803
+ value?: unknown;
804
+ } | undefined;
805
+ window?: {
806
+ startMin: number;
807
+ endMin: number;
808
+ weekdays?: number[] | undefined;
809
+ } | undefined;
810
+ type: "email";
811
+ templateId: string;
812
+ versionId?: string | undefined;
813
+ thread: "new" | "reply";
814
+ alternates: {
815
+ templateId: string;
816
+ versionId?: string | undefined;
817
+ weight: number;
818
+ }[];
819
+ weightA: number;
820
+ optimize: boolean;
821
+ senderConnectionId?: string | undefined;
822
+ } | {
823
+ type: "wait";
824
+ days: number;
825
+ businessDays: boolean;
826
+ } | {
827
+ waitDays: number;
828
+ businessDays: boolean;
829
+ when?: {
830
+ kind: "engagement";
831
+ event: "clicked" | "opened" | "replied";
832
+ negate: boolean;
833
+ } | {
834
+ kind: "task_outcome";
835
+ outcome: string;
836
+ step?: string | undefined;
837
+ negate: boolean;
838
+ } | {
839
+ kind: "has_phone";
840
+ negate: boolean;
841
+ } | {
842
+ kind: "linkedin_connected";
843
+ negate: boolean;
844
+ } | {
845
+ kind: "reply";
846
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
847
+ negate: boolean;
848
+ } | {
849
+ kind: "verified";
850
+ negate: boolean;
851
+ } | {
852
+ kind: "field";
853
+ field: string;
854
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
855
+ value?: unknown;
856
+ } | undefined;
857
+ window?: {
858
+ startMin: number;
859
+ endMin: number;
860
+ weekdays?: number[] | undefined;
861
+ } | undefined;
862
+ type: "task";
863
+ kind: "call" | "custom" | "linkedin_connect" | "linkedin_message" | "linkedin_visit" | "manual_email" | "sms" | "whatsapp";
864
+ title: string;
865
+ notes?: string | undefined;
866
+ draft?: string | undefined;
867
+ } | {
868
+ waitDays: number;
869
+ businessDays: boolean;
870
+ when?: {
871
+ kind: "engagement";
872
+ event: "clicked" | "opened" | "replied";
873
+ negate: boolean;
874
+ } | {
875
+ kind: "task_outcome";
876
+ outcome: string;
877
+ step?: string | undefined;
878
+ negate: boolean;
879
+ } | {
880
+ kind: "has_phone";
881
+ negate: boolean;
882
+ } | {
883
+ kind: "linkedin_connected";
884
+ negate: boolean;
885
+ } | {
886
+ kind: "reply";
887
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
888
+ negate: boolean;
889
+ } | {
890
+ kind: "verified";
891
+ negate: boolean;
892
+ } | {
893
+ kind: "field";
894
+ field: string;
895
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
896
+ value?: unknown;
897
+ } | undefined;
898
+ window?: {
899
+ startMin: number;
900
+ endMin: number;
901
+ weekdays?: number[] | undefined;
902
+ } | undefined;
903
+ type: "jump";
904
+ sequenceId: string;
905
+ } | {
906
+ waitDays: number;
907
+ businessDays: boolean;
908
+ when?: {
909
+ kind: "engagement";
910
+ event: "clicked" | "opened" | "replied";
911
+ negate: boolean;
912
+ } | {
913
+ kind: "task_outcome";
914
+ outcome: string;
915
+ step?: string | undefined;
916
+ negate: boolean;
917
+ } | {
918
+ kind: "has_phone";
919
+ negate: boolean;
920
+ } | {
921
+ kind: "linkedin_connected";
922
+ negate: boolean;
923
+ } | {
924
+ kind: "reply";
925
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
926
+ negate: boolean;
927
+ } | {
928
+ kind: "verified";
929
+ negate: boolean;
930
+ } | {
931
+ kind: "field";
932
+ field: string;
933
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
934
+ value?: unknown;
935
+ } | undefined;
936
+ window?: {
937
+ startMin: number;
938
+ endMin: number;
939
+ weekdays?: number[] | undefined;
940
+ } | undefined;
941
+ type: "sms";
942
+ templateId: string;
943
+ versionId?: string | undefined;
944
+ } | {
945
+ waitDays: number;
946
+ businessDays: boolean;
947
+ when?: {
948
+ kind: "engagement";
949
+ event: "clicked" | "opened" | "replied";
950
+ negate: boolean;
951
+ } | {
952
+ kind: "task_outcome";
953
+ outcome: string;
954
+ step?: string | undefined;
955
+ negate: boolean;
956
+ } | {
957
+ kind: "has_phone";
958
+ negate: boolean;
959
+ } | {
960
+ kind: "linkedin_connected";
961
+ negate: boolean;
962
+ } | {
963
+ kind: "reply";
964
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
965
+ negate: boolean;
966
+ } | {
967
+ kind: "verified";
968
+ negate: boolean;
969
+ } | {
970
+ kind: "field";
971
+ field: string;
972
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
973
+ value?: unknown;
974
+ } | undefined;
975
+ window?: {
976
+ startMin: number;
977
+ endMin: number;
978
+ weekdays?: number[] | undefined;
979
+ } | undefined;
980
+ type: "webhook";
981
+ url: string;
982
+ body?: Record<string, unknown> | undefined;
983
+ headers?: Record<string, string> | undefined;
984
+ maxAttempts: number;
985
+ signingSecret?: string | undefined;
986
+ signingSecretSealed?: string | undefined;
987
+ signingSecretSet?: boolean | undefined;
988
+ responseMap: {
989
+ path: string;
990
+ field: string;
991
+ }[];
992
+ } | {
993
+ waitDays: number;
994
+ businessDays: boolean;
995
+ when?: {
996
+ kind: "engagement";
997
+ event: "clicked" | "opened" | "replied";
998
+ negate: boolean;
999
+ } | {
1000
+ kind: "task_outcome";
1001
+ outcome: string;
1002
+ step?: string | undefined;
1003
+ negate: boolean;
1004
+ } | {
1005
+ kind: "has_phone";
1006
+ negate: boolean;
1007
+ } | {
1008
+ kind: "linkedin_connected";
1009
+ negate: boolean;
1010
+ } | {
1011
+ kind: "reply";
1012
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
1013
+ negate: boolean;
1014
+ } | {
1015
+ kind: "verified";
1016
+ negate: boolean;
1017
+ } | {
1018
+ kind: "field";
1019
+ field: string;
1020
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
1021
+ value?: unknown;
1022
+ } | undefined;
1023
+ window?: {
1024
+ startMin: number;
1025
+ endMin: number;
1026
+ weekdays?: number[] | undefined;
1027
+ } | undefined;
1028
+ type: "linkedin";
1029
+ action: "connect" | "inmail" | "like_post" | "message" | "visit";
1030
+ message?: string | undefined;
1031
+ } | {
1032
+ waitDays: number;
1033
+ businessDays: boolean;
1034
+ when?: {
1035
+ kind: "engagement";
1036
+ event: "clicked" | "opened" | "replied";
1037
+ negate: boolean;
1038
+ } | {
1039
+ kind: "task_outcome";
1040
+ outcome: string;
1041
+ step?: string | undefined;
1042
+ negate: boolean;
1043
+ } | {
1044
+ kind: "has_phone";
1045
+ negate: boolean;
1046
+ } | {
1047
+ kind: "linkedin_connected";
1048
+ negate: boolean;
1049
+ } | {
1050
+ kind: "reply";
1051
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
1052
+ negate: boolean;
1053
+ } | {
1054
+ kind: "verified";
1055
+ negate: boolean;
1056
+ } | {
1057
+ kind: "field";
1058
+ field: string;
1059
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
1060
+ value?: unknown;
1061
+ } | undefined;
1062
+ window?: {
1063
+ startMin: number;
1064
+ endMin: number;
1065
+ weekdays?: number[] | undefined;
1066
+ } | undefined;
1067
+ type: "whatsapp";
1068
+ templateId: string;
1069
+ versionId?: string | undefined;
1070
+ } | {
1071
+ waitDays: number;
1072
+ businessDays: boolean;
1073
+ when?: {
1074
+ kind: "engagement";
1075
+ event: "clicked" | "opened" | "replied";
1076
+ negate: boolean;
1077
+ } | {
1078
+ kind: "task_outcome";
1079
+ outcome: string;
1080
+ step?: string | undefined;
1081
+ negate: boolean;
1082
+ } | {
1083
+ kind: "has_phone";
1084
+ negate: boolean;
1085
+ } | {
1086
+ kind: "linkedin_connected";
1087
+ negate: boolean;
1088
+ } | {
1089
+ kind: "reply";
1090
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
1091
+ negate: boolean;
1092
+ } | {
1093
+ kind: "verified";
1094
+ negate: boolean;
1095
+ } | {
1096
+ kind: "field";
1097
+ field: string;
1098
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
1099
+ value?: unknown;
1100
+ } | undefined;
1101
+ window?: {
1102
+ startMin: number;
1103
+ endMin: number;
1104
+ weekdays?: number[] | undefined;
1105
+ } | undefined;
1106
+ type: "voice";
1107
+ clipId: string;
1108
+ via: "linkedin" | "voicemail";
1109
+ message?: string | undefined;
1110
+ title?: string | undefined;
1111
+ } | {
1112
+ waitDays: number;
1113
+ businessDays: boolean;
1114
+ when?: {
1115
+ kind: "engagement";
1116
+ event: "clicked" | "opened" | "replied";
1117
+ negate: boolean;
1118
+ } | {
1119
+ kind: "task_outcome";
1120
+ outcome: string;
1121
+ step?: string | undefined;
1122
+ negate: boolean;
1123
+ } | {
1124
+ kind: "has_phone";
1125
+ negate: boolean;
1126
+ } | {
1127
+ kind: "linkedin_connected";
1128
+ negate: boolean;
1129
+ } | {
1130
+ kind: "reply";
1131
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
1132
+ negate: boolean;
1133
+ } | {
1134
+ kind: "verified";
1135
+ negate: boolean;
1136
+ } | {
1137
+ kind: "field";
1138
+ field: string;
1139
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
1140
+ value?: unknown;
1141
+ } | undefined;
1142
+ window?: {
1143
+ startMin: number;
1144
+ endMin: number;
1145
+ weekdays?: number[] | undefined;
1146
+ } | undefined;
1147
+ type: "postcard";
1148
+ design: {
1149
+ size: "6x4" | "9x6";
1150
+ front: string;
1151
+ back: string;
1152
+ };
1153
+ connectionId: string;
1154
+ })[];
1155
+ }[];
1156
+ otherwise: ({
1157
+ waitDays: number;
1158
+ businessDays: boolean;
1159
+ when?: {
1160
+ kind: "engagement";
1161
+ event: "clicked" | "opened" | "replied";
1162
+ negate: boolean;
1163
+ } | {
1164
+ kind: "task_outcome";
1165
+ outcome: string;
1166
+ step?: string | undefined;
1167
+ negate: boolean;
1168
+ } | {
1169
+ kind: "has_phone";
1170
+ negate: boolean;
1171
+ } | {
1172
+ kind: "linkedin_connected";
1173
+ negate: boolean;
1174
+ } | {
1175
+ kind: "reply";
1176
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
1177
+ negate: boolean;
1178
+ } | {
1179
+ kind: "verified";
1180
+ negate: boolean;
1181
+ } | {
1182
+ kind: "field";
1183
+ field: string;
1184
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
1185
+ value?: unknown;
1186
+ } | undefined;
1187
+ window?: {
1188
+ startMin: number;
1189
+ endMin: number;
1190
+ weekdays?: number[] | undefined;
1191
+ } | undefined;
1192
+ type: "email";
1193
+ templateId: string;
1194
+ versionId?: string | undefined;
1195
+ thread: "new" | "reply";
1196
+ alternates: {
1197
+ templateId: string;
1198
+ versionId?: string | undefined;
1199
+ weight: number;
1200
+ }[];
1201
+ weightA: number;
1202
+ optimize: boolean;
1203
+ senderConnectionId?: string | undefined;
1204
+ } | {
1205
+ type: "wait";
1206
+ days: number;
1207
+ businessDays: boolean;
1208
+ } | {
1209
+ waitDays: number;
1210
+ businessDays: boolean;
1211
+ when?: {
1212
+ kind: "engagement";
1213
+ event: "clicked" | "opened" | "replied";
1214
+ negate: boolean;
1215
+ } | {
1216
+ kind: "task_outcome";
1217
+ outcome: string;
1218
+ step?: string | undefined;
1219
+ negate: boolean;
1220
+ } | {
1221
+ kind: "has_phone";
1222
+ negate: boolean;
1223
+ } | {
1224
+ kind: "linkedin_connected";
1225
+ negate: boolean;
1226
+ } | {
1227
+ kind: "reply";
1228
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
1229
+ negate: boolean;
1230
+ } | {
1231
+ kind: "verified";
1232
+ negate: boolean;
1233
+ } | {
1234
+ kind: "field";
1235
+ field: string;
1236
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
1237
+ value?: unknown;
1238
+ } | undefined;
1239
+ window?: {
1240
+ startMin: number;
1241
+ endMin: number;
1242
+ weekdays?: number[] | undefined;
1243
+ } | undefined;
1244
+ type: "task";
1245
+ kind: "call" | "custom" | "linkedin_connect" | "linkedin_message" | "linkedin_visit" | "manual_email" | "sms" | "whatsapp";
1246
+ title: string;
1247
+ notes?: string | undefined;
1248
+ draft?: string | undefined;
1249
+ } | {
1250
+ waitDays: number;
1251
+ businessDays: boolean;
1252
+ when?: {
1253
+ kind: "engagement";
1254
+ event: "clicked" | "opened" | "replied";
1255
+ negate: boolean;
1256
+ } | {
1257
+ kind: "task_outcome";
1258
+ outcome: string;
1259
+ step?: string | undefined;
1260
+ negate: boolean;
1261
+ } | {
1262
+ kind: "has_phone";
1263
+ negate: boolean;
1264
+ } | {
1265
+ kind: "linkedin_connected";
1266
+ negate: boolean;
1267
+ } | {
1268
+ kind: "reply";
1269
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
1270
+ negate: boolean;
1271
+ } | {
1272
+ kind: "verified";
1273
+ negate: boolean;
1274
+ } | {
1275
+ kind: "field";
1276
+ field: string;
1277
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
1278
+ value?: unknown;
1279
+ } | undefined;
1280
+ window?: {
1281
+ startMin: number;
1282
+ endMin: number;
1283
+ weekdays?: number[] | undefined;
1284
+ } | undefined;
1285
+ type: "jump";
1286
+ sequenceId: string;
1287
+ } | {
1288
+ waitDays: number;
1289
+ businessDays: boolean;
1290
+ when?: {
1291
+ kind: "engagement";
1292
+ event: "clicked" | "opened" | "replied";
1293
+ negate: boolean;
1294
+ } | {
1295
+ kind: "task_outcome";
1296
+ outcome: string;
1297
+ step?: string | undefined;
1298
+ negate: boolean;
1299
+ } | {
1300
+ kind: "has_phone";
1301
+ negate: boolean;
1302
+ } | {
1303
+ kind: "linkedin_connected";
1304
+ negate: boolean;
1305
+ } | {
1306
+ kind: "reply";
1307
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
1308
+ negate: boolean;
1309
+ } | {
1310
+ kind: "verified";
1311
+ negate: boolean;
1312
+ } | {
1313
+ kind: "field";
1314
+ field: string;
1315
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
1316
+ value?: unknown;
1317
+ } | undefined;
1318
+ window?: {
1319
+ startMin: number;
1320
+ endMin: number;
1321
+ weekdays?: number[] | undefined;
1322
+ } | undefined;
1323
+ type: "sms";
1324
+ templateId: string;
1325
+ versionId?: string | undefined;
1326
+ } | {
1327
+ waitDays: number;
1328
+ businessDays: boolean;
1329
+ when?: {
1330
+ kind: "engagement";
1331
+ event: "clicked" | "opened" | "replied";
1332
+ negate: boolean;
1333
+ } | {
1334
+ kind: "task_outcome";
1335
+ outcome: string;
1336
+ step?: string | undefined;
1337
+ negate: boolean;
1338
+ } | {
1339
+ kind: "has_phone";
1340
+ negate: boolean;
1341
+ } | {
1342
+ kind: "linkedin_connected";
1343
+ negate: boolean;
1344
+ } | {
1345
+ kind: "reply";
1346
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
1347
+ negate: boolean;
1348
+ } | {
1349
+ kind: "verified";
1350
+ negate: boolean;
1351
+ } | {
1352
+ kind: "field";
1353
+ field: string;
1354
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
1355
+ value?: unknown;
1356
+ } | undefined;
1357
+ window?: {
1358
+ startMin: number;
1359
+ endMin: number;
1360
+ weekdays?: number[] | undefined;
1361
+ } | undefined;
1362
+ type: "webhook";
1363
+ url: string;
1364
+ body?: Record<string, unknown> | undefined;
1365
+ headers?: Record<string, string> | undefined;
1366
+ maxAttempts: number;
1367
+ signingSecret?: string | undefined;
1368
+ signingSecretSealed?: string | undefined;
1369
+ signingSecretSet?: boolean | undefined;
1370
+ responseMap: {
1371
+ path: string;
1372
+ field: string;
1373
+ }[];
1374
+ } | {
1375
+ waitDays: number;
1376
+ businessDays: boolean;
1377
+ when?: {
1378
+ kind: "engagement";
1379
+ event: "clicked" | "opened" | "replied";
1380
+ negate: boolean;
1381
+ } | {
1382
+ kind: "task_outcome";
1383
+ outcome: string;
1384
+ step?: string | undefined;
1385
+ negate: boolean;
1386
+ } | {
1387
+ kind: "has_phone";
1388
+ negate: boolean;
1389
+ } | {
1390
+ kind: "linkedin_connected";
1391
+ negate: boolean;
1392
+ } | {
1393
+ kind: "reply";
1394
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
1395
+ negate: boolean;
1396
+ } | {
1397
+ kind: "verified";
1398
+ negate: boolean;
1399
+ } | {
1400
+ kind: "field";
1401
+ field: string;
1402
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
1403
+ value?: unknown;
1404
+ } | undefined;
1405
+ window?: {
1406
+ startMin: number;
1407
+ endMin: number;
1408
+ weekdays?: number[] | undefined;
1409
+ } | undefined;
1410
+ type: "linkedin";
1411
+ action: "connect" | "inmail" | "like_post" | "message" | "visit";
1412
+ message?: string | undefined;
1413
+ } | {
1414
+ waitDays: number;
1415
+ businessDays: boolean;
1416
+ when?: {
1417
+ kind: "engagement";
1418
+ event: "clicked" | "opened" | "replied";
1419
+ negate: boolean;
1420
+ } | {
1421
+ kind: "task_outcome";
1422
+ outcome: string;
1423
+ step?: string | undefined;
1424
+ negate: boolean;
1425
+ } | {
1426
+ kind: "has_phone";
1427
+ negate: boolean;
1428
+ } | {
1429
+ kind: "linkedin_connected";
1430
+ negate: boolean;
1431
+ } | {
1432
+ kind: "reply";
1433
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
1434
+ negate: boolean;
1435
+ } | {
1436
+ kind: "verified";
1437
+ negate: boolean;
1438
+ } | {
1439
+ kind: "field";
1440
+ field: string;
1441
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
1442
+ value?: unknown;
1443
+ } | undefined;
1444
+ window?: {
1445
+ startMin: number;
1446
+ endMin: number;
1447
+ weekdays?: number[] | undefined;
1448
+ } | undefined;
1449
+ type: "whatsapp";
1450
+ templateId: string;
1451
+ versionId?: string | undefined;
1452
+ } | {
1453
+ waitDays: number;
1454
+ businessDays: boolean;
1455
+ when?: {
1456
+ kind: "engagement";
1457
+ event: "clicked" | "opened" | "replied";
1458
+ negate: boolean;
1459
+ } | {
1460
+ kind: "task_outcome";
1461
+ outcome: string;
1462
+ step?: string | undefined;
1463
+ negate: boolean;
1464
+ } | {
1465
+ kind: "has_phone";
1466
+ negate: boolean;
1467
+ } | {
1468
+ kind: "linkedin_connected";
1469
+ negate: boolean;
1470
+ } | {
1471
+ kind: "reply";
1472
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
1473
+ negate: boolean;
1474
+ } | {
1475
+ kind: "verified";
1476
+ negate: boolean;
1477
+ } | {
1478
+ kind: "field";
1479
+ field: string;
1480
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
1481
+ value?: unknown;
1482
+ } | undefined;
1483
+ window?: {
1484
+ startMin: number;
1485
+ endMin: number;
1486
+ weekdays?: number[] | undefined;
1487
+ } | undefined;
1488
+ type: "voice";
1489
+ clipId: string;
1490
+ via: "linkedin" | "voicemail";
1491
+ message?: string | undefined;
1492
+ title?: string | undefined;
1493
+ } | {
1494
+ waitDays: number;
1495
+ businessDays: boolean;
1496
+ when?: {
1497
+ kind: "engagement";
1498
+ event: "clicked" | "opened" | "replied";
1499
+ negate: boolean;
1500
+ } | {
1501
+ kind: "task_outcome";
1502
+ outcome: string;
1503
+ step?: string | undefined;
1504
+ negate: boolean;
1505
+ } | {
1506
+ kind: "has_phone";
1507
+ negate: boolean;
1508
+ } | {
1509
+ kind: "linkedin_connected";
1510
+ negate: boolean;
1511
+ } | {
1512
+ kind: "reply";
1513
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
1514
+ negate: boolean;
1515
+ } | {
1516
+ kind: "verified";
1517
+ negate: boolean;
1518
+ } | {
1519
+ kind: "field";
1520
+ field: string;
1521
+ op: "contains" | "eq" | "exists" | "gt" | "gte" | "lt" | "lte" | "ne" | "not_exists";
1522
+ value?: unknown;
1523
+ } | undefined;
1524
+ window?: {
1525
+ startMin: number;
1526
+ endMin: number;
1527
+ weekdays?: number[] | undefined;
1528
+ } | undefined;
1529
+ type: "postcard";
1530
+ design: {
1531
+ size: "6x4" | "9x6";
1532
+ front: string;
1533
+ back: string;
1534
+ };
1535
+ connectionId: string;
1536
+ })[];
1537
+ })[];
1538
+ schedule: {
1539
+ weekdays: number[];
1540
+ startMin: number;
1541
+ endMin: number;
1542
+ timezoneSource: "prospect" | "sequence";
1543
+ timezone: string;
1544
+ };
1545
+ mailbox: {
1546
+ poolId?: string | undefined;
1547
+ connectionId?: string | undefined;
1548
+ sticky: boolean;
1549
+ onUnavailable: "pause" | "reassign";
1550
+ matchProvider?: boolean | undefined;
1551
+ };
1552
+ dailyNewLimit?: number | undefined;
1553
+ followUpPercent?: number | undefined;
1554
+ plainTextOnly?: boolean | undefined;
1555
+ trackOpens?: boolean | undefined;
1556
+ unsubscribeText?: string | undefined;
1557
+ spintaxMode?: "random" | "sequential" | undefined;
1558
+ variables?: Record<string, string> | undefined;
1559
+ blocklist?: {
1560
+ emails: string[];
1561
+ domains: string[];
1562
+ } | undefined;
1563
+ reviewBeforeSend?: boolean | undefined;
1564
+ reviewEachMessage?: boolean | undefined;
1565
+ stop: {
1566
+ onReply: "any" | "human";
1567
+ onAutoReply: "continue" | "pause";
1568
+ onOoo: "continue" | "pause_until_return" | "stop";
1569
+ onCompanyReply: "none" | "pause" | "stop";
1570
+ };
1571
+ onCategory?: {
1572
+ category: "auto_reply" | "bounce" | "meeting" | "negative" | "neutral" | "ooo" | "positive" | "unsubscribe" | "wrong_person";
1573
+ sequenceId: string;
1574
+ stopCurrent: boolean;
1575
+ }[] | undefined;
1576
+ optInAsk?: {
1577
+ listId: string;
1578
+ connectionId?: string | undefined;
1579
+ } | undefined;
1580
+ ownerUserId?: string | undefined;
1581
+ scheduleId?: string | undefined;
1582
+ dedupe: {
1583
+ crossSequence: "allow" | "skip";
1584
+ contactedWithinDays: number;
1585
+ domain: boolean;
1586
+ };
1587
+ startAt?: Date | undefined;
1588
+ minGapMinutes?: number | undefined;
1589
+ senderOverrides?: Record<string, {
1590
+ dailyLimit?: number | undefined;
1591
+ paused?: boolean | undefined;
1592
+ }> | undefined;
1593
+ abm?: {
1594
+ maxPerAccount: number;
1595
+ onAccountReply: "none" | "pause" | "stop";
1596
+ } | undefined;
1597
+ };
1598
+ templates: {
1599
+ id: string;
1600
+ subject: string;
1601
+ }[];
1602
+ draft: true;
1603
+ model: string;
1604
+ }>;
1605
+ };
1606
+ };
1607
+ export {};