@hermeticacomms/sdk-node 0.0.0-stage → 0.4.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 +363 -0
  6. package/dist/contracts/auth.js +130 -0
  7. package/dist/contracts/billing.d.ts +143 -0
  8. package/dist/contracts/billing.js +32 -0
  9. package/dist/contracts/campaigns.d.ts +915 -0
  10. package/dist/contracts/campaigns.js +276 -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 +628 -0
  16. package/dist/contracts/consent.js +194 -0
  17. package/dist/contracts/content-blocks.d.ts +165 -0
  18. package/dist/contracts/content-blocks.js +62 -0
  19. package/dist/contracts/content-library.d.ts +347 -0
  20. package/dist/contracts/content-library.js +52 -0
  21. package/dist/contracts/content.d.ts +955 -0
  22. package/dist/contracts/content.js +194 -0
  23. package/dist/contracts/delivery.d.ts +602 -0
  24. package/dist/contracts/delivery.js +220 -0
  25. package/dist/contracts/events.d.ts +514 -0
  26. package/dist/contracts/events.js +180 -0
  27. package/dist/contracts/experiments.d.ts +378 -0
  28. package/dist/contracts/experiments.js +140 -0
  29. package/dist/contracts/identity.d.ts +761 -0
  30. package/dist/contracts/identity.js +226 -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 +445 -0
  34. package/dist/contracts/integrations.js +139 -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 +465 -0
  38. package/dist/contracts/metrics.js +96 -0
  39. package/dist/contracts/outbound.d.ts +15535 -0
  40. package/dist/contracts/outbound.js +432 -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 +244 -0
  44. package/dist/contracts/platform-admin.js +98 -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 +3187 -0
  52. package/dist/contracts/segments.js +421 -0
  53. package/dist/contracts/workflow-nodes.d.ts +2130 -0
  54. package/dist/contracts/workflow-nodes.js +346 -0
  55. package/dist/contracts/workflows.d.ts +46811 -0
  56. package/dist/contracts/workflows.js +350 -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 +11631 -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 +1338 -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 +1608 -0
  70. package/dist/x10.js +66 -0
  71. package/dist/z10.d.ts +256 -0
  72. package/dist/z10.js +46 -0
  73. package/package.json +40 -4
@@ -0,0 +1,1338 @@
1
+ import type { z } from 'zod';
2
+ import type { BlocklistDto, BlocklistInput, CampaignListQuery, ConsentInputBody, ConsentStateDto, CreateCampaignBody, CreateListBody, CreateTemplateBody, CreateWorkflowBody, ListMembersBody, ListWithCount, ListTemplatesQuery, SuppressionDto, SuppressionInput, SuppressionListQuery, UpdateCampaignBody, UpdateListBody, UpdateTemplateBody, UpdateWorkflowBody, WorkflowListQuery, EnrollBody } 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
+ type Http = ReturnType<typeof createTransport>;
7
+ /** Typed methods for the remaining first-class resources. Same retry/idempotency behaviour as the rest of the client. */
8
+ export declare function resources(http: Http): {
9
+ campaigns: {
10
+ list: (query?: In<typeof CampaignListQuery>) => Promise<{
11
+ items: {
12
+ id: string;
13
+ name: string;
14
+ channel: "email" | "postcard" | "push" | "sms" | "whatsapp";
15
+ purpose: "marketing" | "operational" | "prospecting" | "transactional";
16
+ status: "cancelled" | "completed" | "draft" | "failed" | "paused" | "scheduled" | "sending";
17
+ audience: {
18
+ includeSegmentIds: string[];
19
+ includeListIds: string[];
20
+ excludeSegmentIds: string[];
21
+ excludeListIds: string[];
22
+ onePerCompany?: boolean | undefined;
23
+ everyone?: boolean | undefined;
24
+ includeTags?: string[] | undefined;
25
+ excludeTags?: string[] | undefined;
26
+ smart?: {
27
+ windowDays?: number | undefined;
28
+ unengagedSends?: number | undefined;
29
+ churnRisk?: number | undefined;
30
+ churnedSends?: number | undefined;
31
+ } | undefined;
32
+ };
33
+ audienceFrozenAt: string | null;
34
+ templateId: string | null;
35
+ topicId: string | null;
36
+ route: {
37
+ connectionId?: string | undefined;
38
+ poolId?: string | undefined;
39
+ routePolicyId?: string | undefined;
40
+ };
41
+ schedule: {
42
+ tz: string;
43
+ recipientLocal: boolean;
44
+ throttlePerHour?: number | undefined;
45
+ window?: {
46
+ startMin: number;
47
+ endMin: number;
48
+ } | undefined;
49
+ sendTime: "fixed" | "optimized";
50
+ fallbackHour?: number | undefined;
51
+ pastZones?: "immediately" | "tomorrow" | undefined;
52
+ batchSize?: number | undefined;
53
+ at: string;
54
+ } | null;
55
+ abTest: {
56
+ testPercent: number;
57
+ metric: "clicks" | "conversions" | "opens" | "replies" | "revenue";
58
+ waitHours: number;
59
+ auto: boolean;
60
+ method: "bayesian_beta" | "frequentist_ztest";
61
+ confidence?: number | undefined;
62
+ guardrail?: number | undefined;
63
+ } | null;
64
+ variants?: {
65
+ key: string;
66
+ templateVersionId: string;
67
+ subject?: string | null | undefined;
68
+ fromName?: string | null | undefined;
69
+ previewText?: string | null | undefined;
70
+ replyTo?: string | null | undefined;
71
+ imageAssetId?: string | null | undefined;
72
+ sendOffset: number;
73
+ weight: number;
74
+ }[] | undefined;
75
+ utm: Record<string, string> | null;
76
+ tracking: {
77
+ opens?: boolean | undefined;
78
+ clicks?: boolean | undefined;
79
+ } | null;
80
+ autoPause: {
81
+ enabled: boolean;
82
+ maxFailureRate: number;
83
+ maxBounceRate: number;
84
+ minSample: number;
85
+ } | null;
86
+ slug: string | null;
87
+ archiveProfile: Record<string, string> | null;
88
+ inArchive: boolean;
89
+ ownerId?: string | null | undefined;
90
+ startsOn?: string | null | undefined;
91
+ endsOn?: string | null | undefined;
92
+ notes?: string | null | undefined;
93
+ approvalStatus: string;
94
+ approvedBy: string | null;
95
+ approvalSubmittedBy?: string | null | undefined;
96
+ approvalComment?: string | null | undefined;
97
+ startedAt: string | null;
98
+ completedAt: string | null;
99
+ testSentAt: string | null;
100
+ contentErasedAt?: string | null | undefined;
101
+ stats: Record<string, number>;
102
+ archivedAt?: string | null | undefined;
103
+ parentCampaignId?: string | null | undefined;
104
+ reviewDrafts?: boolean | undefined;
105
+ reviewDeadline?: {
106
+ hours: number;
107
+ action: "send" | "skip";
108
+ } | null | undefined;
109
+ failureReason?: string | null | undefined;
110
+ smartAudience?: boolean | undefined;
111
+ app?: string | null | undefined;
112
+ createdAt: string;
113
+ updatedAt: string;
114
+ }[];
115
+ nextCursor: string | null;
116
+ }>;
117
+ get: (id: string) => Promise<{
118
+ id: string;
119
+ name: string;
120
+ channel: "email" | "postcard" | "push" | "sms" | "whatsapp";
121
+ purpose: "marketing" | "operational" | "prospecting" | "transactional";
122
+ status: "cancelled" | "completed" | "draft" | "failed" | "paused" | "scheduled" | "sending";
123
+ audience: {
124
+ includeSegmentIds: string[];
125
+ includeListIds: string[];
126
+ excludeSegmentIds: string[];
127
+ excludeListIds: string[];
128
+ onePerCompany?: boolean | undefined;
129
+ everyone?: boolean | undefined;
130
+ includeTags?: string[] | undefined;
131
+ excludeTags?: string[] | undefined;
132
+ smart?: {
133
+ windowDays?: number | undefined;
134
+ unengagedSends?: number | undefined;
135
+ churnRisk?: number | undefined;
136
+ churnedSends?: number | undefined;
137
+ } | undefined;
138
+ };
139
+ audienceFrozenAt: string | null;
140
+ templateId: string | null;
141
+ topicId: string | null;
142
+ route: {
143
+ connectionId?: string | undefined;
144
+ poolId?: string | undefined;
145
+ routePolicyId?: string | undefined;
146
+ };
147
+ schedule: {
148
+ tz: string;
149
+ recipientLocal: boolean;
150
+ throttlePerHour?: number | undefined;
151
+ window?: {
152
+ startMin: number;
153
+ endMin: number;
154
+ } | undefined;
155
+ sendTime: "fixed" | "optimized";
156
+ fallbackHour?: number | undefined;
157
+ pastZones?: "immediately" | "tomorrow" | undefined;
158
+ batchSize?: number | undefined;
159
+ at: string;
160
+ } | null;
161
+ abTest: {
162
+ testPercent: number;
163
+ metric: "clicks" | "conversions" | "opens" | "replies" | "revenue";
164
+ waitHours: number;
165
+ auto: boolean;
166
+ method: "bayesian_beta" | "frequentist_ztest";
167
+ confidence?: number | undefined;
168
+ guardrail?: number | undefined;
169
+ } | null;
170
+ variants?: {
171
+ key: string;
172
+ templateVersionId: string;
173
+ subject?: string | null | undefined;
174
+ fromName?: string | null | undefined;
175
+ previewText?: string | null | undefined;
176
+ replyTo?: string | null | undefined;
177
+ imageAssetId?: string | null | undefined;
178
+ sendOffset: number;
179
+ weight: number;
180
+ }[] | undefined;
181
+ utm: Record<string, string> | null;
182
+ tracking: {
183
+ opens?: boolean | undefined;
184
+ clicks?: boolean | undefined;
185
+ } | null;
186
+ autoPause: {
187
+ enabled: boolean;
188
+ maxFailureRate: number;
189
+ maxBounceRate: number;
190
+ minSample: number;
191
+ } | null;
192
+ slug: string | null;
193
+ archiveProfile: Record<string, string> | null;
194
+ inArchive: boolean;
195
+ ownerId?: string | null | undefined;
196
+ startsOn?: string | null | undefined;
197
+ endsOn?: string | null | undefined;
198
+ notes?: string | null | undefined;
199
+ approvalStatus: string;
200
+ approvedBy: string | null;
201
+ approvalSubmittedBy?: string | null | undefined;
202
+ approvalComment?: string | null | undefined;
203
+ startedAt: string | null;
204
+ completedAt: string | null;
205
+ testSentAt: string | null;
206
+ contentErasedAt?: string | null | undefined;
207
+ stats: Record<string, number>;
208
+ archivedAt?: string | null | undefined;
209
+ parentCampaignId?: string | null | undefined;
210
+ reviewDrafts?: boolean | undefined;
211
+ reviewDeadline?: {
212
+ hours: number;
213
+ action: "send" | "skip";
214
+ } | null | undefined;
215
+ failureReason?: string | null | undefined;
216
+ smartAudience?: boolean | undefined;
217
+ app?: string | null | undefined;
218
+ createdAt: string;
219
+ updatedAt: string;
220
+ }>;
221
+ create: (body: In<typeof CreateCampaignBody>) => Promise<{
222
+ id: string;
223
+ name: string;
224
+ channel: "email" | "postcard" | "push" | "sms" | "whatsapp";
225
+ purpose: "marketing" | "operational" | "prospecting" | "transactional";
226
+ status: "cancelled" | "completed" | "draft" | "failed" | "paused" | "scheduled" | "sending";
227
+ audience: {
228
+ includeSegmentIds: string[];
229
+ includeListIds: string[];
230
+ excludeSegmentIds: string[];
231
+ excludeListIds: string[];
232
+ onePerCompany?: boolean | undefined;
233
+ everyone?: boolean | undefined;
234
+ includeTags?: string[] | undefined;
235
+ excludeTags?: string[] | undefined;
236
+ smart?: {
237
+ windowDays?: number | undefined;
238
+ unengagedSends?: number | undefined;
239
+ churnRisk?: number | undefined;
240
+ churnedSends?: number | undefined;
241
+ } | undefined;
242
+ };
243
+ audienceFrozenAt: string | null;
244
+ templateId: string | null;
245
+ topicId: string | null;
246
+ route: {
247
+ connectionId?: string | undefined;
248
+ poolId?: string | undefined;
249
+ routePolicyId?: string | undefined;
250
+ };
251
+ schedule: {
252
+ tz: string;
253
+ recipientLocal: boolean;
254
+ throttlePerHour?: number | undefined;
255
+ window?: {
256
+ startMin: number;
257
+ endMin: number;
258
+ } | undefined;
259
+ sendTime: "fixed" | "optimized";
260
+ fallbackHour?: number | undefined;
261
+ pastZones?: "immediately" | "tomorrow" | undefined;
262
+ batchSize?: number | undefined;
263
+ at: string;
264
+ } | null;
265
+ abTest: {
266
+ testPercent: number;
267
+ metric: "clicks" | "conversions" | "opens" | "replies" | "revenue";
268
+ waitHours: number;
269
+ auto: boolean;
270
+ method: "bayesian_beta" | "frequentist_ztest";
271
+ confidence?: number | undefined;
272
+ guardrail?: number | undefined;
273
+ } | null;
274
+ variants?: {
275
+ key: string;
276
+ templateVersionId: string;
277
+ subject?: string | null | undefined;
278
+ fromName?: string | null | undefined;
279
+ previewText?: string | null | undefined;
280
+ replyTo?: string | null | undefined;
281
+ imageAssetId?: string | null | undefined;
282
+ sendOffset: number;
283
+ weight: number;
284
+ }[] | undefined;
285
+ utm: Record<string, string> | null;
286
+ tracking: {
287
+ opens?: boolean | undefined;
288
+ clicks?: boolean | undefined;
289
+ } | null;
290
+ autoPause: {
291
+ enabled: boolean;
292
+ maxFailureRate: number;
293
+ maxBounceRate: number;
294
+ minSample: number;
295
+ } | null;
296
+ slug: string | null;
297
+ archiveProfile: Record<string, string> | null;
298
+ inArchive: boolean;
299
+ ownerId?: string | null | undefined;
300
+ startsOn?: string | null | undefined;
301
+ endsOn?: string | null | undefined;
302
+ notes?: string | null | undefined;
303
+ approvalStatus: string;
304
+ approvedBy: string | null;
305
+ approvalSubmittedBy?: string | null | undefined;
306
+ approvalComment?: string | null | undefined;
307
+ startedAt: string | null;
308
+ completedAt: string | null;
309
+ testSentAt: string | null;
310
+ contentErasedAt?: string | null | undefined;
311
+ stats: Record<string, number>;
312
+ archivedAt?: string | null | undefined;
313
+ parentCampaignId?: string | null | undefined;
314
+ reviewDrafts?: boolean | undefined;
315
+ reviewDeadline?: {
316
+ hours: number;
317
+ action: "send" | "skip";
318
+ } | null | undefined;
319
+ failureReason?: string | null | undefined;
320
+ smartAudience?: boolean | undefined;
321
+ app?: string | null | undefined;
322
+ createdAt: string;
323
+ updatedAt: string;
324
+ }>;
325
+ update: (id: string, body: In<typeof UpdateCampaignBody>) => Promise<{
326
+ id: string;
327
+ name: string;
328
+ channel: "email" | "postcard" | "push" | "sms" | "whatsapp";
329
+ purpose: "marketing" | "operational" | "prospecting" | "transactional";
330
+ status: "cancelled" | "completed" | "draft" | "failed" | "paused" | "scheduled" | "sending";
331
+ audience: {
332
+ includeSegmentIds: string[];
333
+ includeListIds: string[];
334
+ excludeSegmentIds: string[];
335
+ excludeListIds: string[];
336
+ onePerCompany?: boolean | undefined;
337
+ everyone?: boolean | undefined;
338
+ includeTags?: string[] | undefined;
339
+ excludeTags?: string[] | undefined;
340
+ smart?: {
341
+ windowDays?: number | undefined;
342
+ unengagedSends?: number | undefined;
343
+ churnRisk?: number | undefined;
344
+ churnedSends?: number | undefined;
345
+ } | undefined;
346
+ };
347
+ audienceFrozenAt: string | null;
348
+ templateId: string | null;
349
+ topicId: string | null;
350
+ route: {
351
+ connectionId?: string | undefined;
352
+ poolId?: string | undefined;
353
+ routePolicyId?: string | undefined;
354
+ };
355
+ schedule: {
356
+ tz: string;
357
+ recipientLocal: boolean;
358
+ throttlePerHour?: number | undefined;
359
+ window?: {
360
+ startMin: number;
361
+ endMin: number;
362
+ } | undefined;
363
+ sendTime: "fixed" | "optimized";
364
+ fallbackHour?: number | undefined;
365
+ pastZones?: "immediately" | "tomorrow" | undefined;
366
+ batchSize?: number | undefined;
367
+ at: string;
368
+ } | null;
369
+ abTest: {
370
+ testPercent: number;
371
+ metric: "clicks" | "conversions" | "opens" | "replies" | "revenue";
372
+ waitHours: number;
373
+ auto: boolean;
374
+ method: "bayesian_beta" | "frequentist_ztest";
375
+ confidence?: number | undefined;
376
+ guardrail?: number | undefined;
377
+ } | null;
378
+ variants?: {
379
+ key: string;
380
+ templateVersionId: string;
381
+ subject?: string | null | undefined;
382
+ fromName?: string | null | undefined;
383
+ previewText?: string | null | undefined;
384
+ replyTo?: string | null | undefined;
385
+ imageAssetId?: string | null | undefined;
386
+ sendOffset: number;
387
+ weight: number;
388
+ }[] | undefined;
389
+ utm: Record<string, string> | null;
390
+ tracking: {
391
+ opens?: boolean | undefined;
392
+ clicks?: boolean | undefined;
393
+ } | null;
394
+ autoPause: {
395
+ enabled: boolean;
396
+ maxFailureRate: number;
397
+ maxBounceRate: number;
398
+ minSample: number;
399
+ } | null;
400
+ slug: string | null;
401
+ archiveProfile: Record<string, string> | null;
402
+ inArchive: boolean;
403
+ ownerId?: string | null | undefined;
404
+ startsOn?: string | null | undefined;
405
+ endsOn?: string | null | undefined;
406
+ notes?: string | null | undefined;
407
+ approvalStatus: string;
408
+ approvedBy: string | null;
409
+ approvalSubmittedBy?: string | null | undefined;
410
+ approvalComment?: string | null | undefined;
411
+ startedAt: string | null;
412
+ completedAt: string | null;
413
+ testSentAt: string | null;
414
+ contentErasedAt?: string | null | undefined;
415
+ stats: Record<string, number>;
416
+ archivedAt?: string | null | undefined;
417
+ parentCampaignId?: string | null | undefined;
418
+ reviewDrafts?: boolean | undefined;
419
+ reviewDeadline?: {
420
+ hours: number;
421
+ action: "send" | "skip";
422
+ } | null | undefined;
423
+ failureReason?: string | null | undefined;
424
+ smartAudience?: boolean | undefined;
425
+ app?: string | null | undefined;
426
+ createdAt: string;
427
+ updatedAt: string;
428
+ }>;
429
+ /** Schedule (or, with no body, send now per the campaign's stored schedule). Consent and suppression are enforced server-side at send time. */
430
+ schedule: (id: string, body?: {
431
+ schedule?: unknown;
432
+ }, o?: RequestOptions) => Promise<{
433
+ id: string;
434
+ name: string;
435
+ channel: "email" | "postcard" | "push" | "sms" | "whatsapp";
436
+ purpose: "marketing" | "operational" | "prospecting" | "transactional";
437
+ status: "cancelled" | "completed" | "draft" | "failed" | "paused" | "scheduled" | "sending";
438
+ audience: {
439
+ includeSegmentIds: string[];
440
+ includeListIds: string[];
441
+ excludeSegmentIds: string[];
442
+ excludeListIds: string[];
443
+ onePerCompany?: boolean | undefined;
444
+ everyone?: boolean | undefined;
445
+ includeTags?: string[] | undefined;
446
+ excludeTags?: string[] | undefined;
447
+ smart?: {
448
+ windowDays?: number | undefined;
449
+ unengagedSends?: number | undefined;
450
+ churnRisk?: number | undefined;
451
+ churnedSends?: number | undefined;
452
+ } | undefined;
453
+ };
454
+ audienceFrozenAt: string | null;
455
+ templateId: string | null;
456
+ topicId: string | null;
457
+ route: {
458
+ connectionId?: string | undefined;
459
+ poolId?: string | undefined;
460
+ routePolicyId?: string | undefined;
461
+ };
462
+ schedule: {
463
+ tz: string;
464
+ recipientLocal: boolean;
465
+ throttlePerHour?: number | undefined;
466
+ window?: {
467
+ startMin: number;
468
+ endMin: number;
469
+ } | undefined;
470
+ sendTime: "fixed" | "optimized";
471
+ fallbackHour?: number | undefined;
472
+ pastZones?: "immediately" | "tomorrow" | undefined;
473
+ batchSize?: number | undefined;
474
+ at: string;
475
+ } | null;
476
+ abTest: {
477
+ testPercent: number;
478
+ metric: "clicks" | "conversions" | "opens" | "replies" | "revenue";
479
+ waitHours: number;
480
+ auto: boolean;
481
+ method: "bayesian_beta" | "frequentist_ztest";
482
+ confidence?: number | undefined;
483
+ guardrail?: number | undefined;
484
+ } | null;
485
+ variants?: {
486
+ key: string;
487
+ templateVersionId: string;
488
+ subject?: string | null | undefined;
489
+ fromName?: string | null | undefined;
490
+ previewText?: string | null | undefined;
491
+ replyTo?: string | null | undefined;
492
+ imageAssetId?: string | null | undefined;
493
+ sendOffset: number;
494
+ weight: number;
495
+ }[] | undefined;
496
+ utm: Record<string, string> | null;
497
+ tracking: {
498
+ opens?: boolean | undefined;
499
+ clicks?: boolean | undefined;
500
+ } | null;
501
+ autoPause: {
502
+ enabled: boolean;
503
+ maxFailureRate: number;
504
+ maxBounceRate: number;
505
+ minSample: number;
506
+ } | null;
507
+ slug: string | null;
508
+ archiveProfile: Record<string, string> | null;
509
+ inArchive: boolean;
510
+ ownerId?: string | null | undefined;
511
+ startsOn?: string | null | undefined;
512
+ endsOn?: string | null | undefined;
513
+ notes?: string | null | undefined;
514
+ approvalStatus: string;
515
+ approvedBy: string | null;
516
+ approvalSubmittedBy?: string | null | undefined;
517
+ approvalComment?: string | null | undefined;
518
+ startedAt: string | null;
519
+ completedAt: string | null;
520
+ testSentAt: string | null;
521
+ contentErasedAt?: string | null | undefined;
522
+ stats: Record<string, number>;
523
+ archivedAt?: string | null | undefined;
524
+ parentCampaignId?: string | null | undefined;
525
+ reviewDrafts?: boolean | undefined;
526
+ reviewDeadline?: {
527
+ hours: number;
528
+ action: "send" | "skip";
529
+ } | null | undefined;
530
+ failureReason?: string | null | undefined;
531
+ smartAudience?: boolean | undefined;
532
+ app?: string | null | undefined;
533
+ createdAt: string;
534
+ updatedAt: string;
535
+ }>;
536
+ pause: (id: string) => Promise<{
537
+ id: string;
538
+ name: string;
539
+ channel: "email" | "postcard" | "push" | "sms" | "whatsapp";
540
+ purpose: "marketing" | "operational" | "prospecting" | "transactional";
541
+ status: "cancelled" | "completed" | "draft" | "failed" | "paused" | "scheduled" | "sending";
542
+ audience: {
543
+ includeSegmentIds: string[];
544
+ includeListIds: string[];
545
+ excludeSegmentIds: string[];
546
+ excludeListIds: string[];
547
+ onePerCompany?: boolean | undefined;
548
+ everyone?: boolean | undefined;
549
+ includeTags?: string[] | undefined;
550
+ excludeTags?: string[] | undefined;
551
+ smart?: {
552
+ windowDays?: number | undefined;
553
+ unengagedSends?: number | undefined;
554
+ churnRisk?: number | undefined;
555
+ churnedSends?: number | undefined;
556
+ } | undefined;
557
+ };
558
+ audienceFrozenAt: string | null;
559
+ templateId: string | null;
560
+ topicId: string | null;
561
+ route: {
562
+ connectionId?: string | undefined;
563
+ poolId?: string | undefined;
564
+ routePolicyId?: string | undefined;
565
+ };
566
+ schedule: {
567
+ tz: string;
568
+ recipientLocal: boolean;
569
+ throttlePerHour?: number | undefined;
570
+ window?: {
571
+ startMin: number;
572
+ endMin: number;
573
+ } | undefined;
574
+ sendTime: "fixed" | "optimized";
575
+ fallbackHour?: number | undefined;
576
+ pastZones?: "immediately" | "tomorrow" | undefined;
577
+ batchSize?: number | undefined;
578
+ at: string;
579
+ } | null;
580
+ abTest: {
581
+ testPercent: number;
582
+ metric: "clicks" | "conversions" | "opens" | "replies" | "revenue";
583
+ waitHours: number;
584
+ auto: boolean;
585
+ method: "bayesian_beta" | "frequentist_ztest";
586
+ confidence?: number | undefined;
587
+ guardrail?: number | undefined;
588
+ } | null;
589
+ variants?: {
590
+ key: string;
591
+ templateVersionId: string;
592
+ subject?: string | null | undefined;
593
+ fromName?: string | null | undefined;
594
+ previewText?: string | null | undefined;
595
+ replyTo?: string | null | undefined;
596
+ imageAssetId?: string | null | undefined;
597
+ sendOffset: number;
598
+ weight: number;
599
+ }[] | undefined;
600
+ utm: Record<string, string> | null;
601
+ tracking: {
602
+ opens?: boolean | undefined;
603
+ clicks?: boolean | undefined;
604
+ } | null;
605
+ autoPause: {
606
+ enabled: boolean;
607
+ maxFailureRate: number;
608
+ maxBounceRate: number;
609
+ minSample: number;
610
+ } | null;
611
+ slug: string | null;
612
+ archiveProfile: Record<string, string> | null;
613
+ inArchive: boolean;
614
+ ownerId?: string | null | undefined;
615
+ startsOn?: string | null | undefined;
616
+ endsOn?: string | null | undefined;
617
+ notes?: string | null | undefined;
618
+ approvalStatus: string;
619
+ approvedBy: string | null;
620
+ approvalSubmittedBy?: string | null | undefined;
621
+ approvalComment?: string | null | undefined;
622
+ startedAt: string | null;
623
+ completedAt: string | null;
624
+ testSentAt: string | null;
625
+ contentErasedAt?: string | null | undefined;
626
+ stats: Record<string, number>;
627
+ archivedAt?: string | null | undefined;
628
+ parentCampaignId?: string | null | undefined;
629
+ reviewDrafts?: boolean | undefined;
630
+ reviewDeadline?: {
631
+ hours: number;
632
+ action: "send" | "skip";
633
+ } | null | undefined;
634
+ failureReason?: string | null | undefined;
635
+ smartAudience?: boolean | undefined;
636
+ app?: string | null | undefined;
637
+ createdAt: string;
638
+ updatedAt: string;
639
+ }>;
640
+ resume: (id: string) => Promise<{
641
+ id: string;
642
+ name: string;
643
+ channel: "email" | "postcard" | "push" | "sms" | "whatsapp";
644
+ purpose: "marketing" | "operational" | "prospecting" | "transactional";
645
+ status: "cancelled" | "completed" | "draft" | "failed" | "paused" | "scheduled" | "sending";
646
+ audience: {
647
+ includeSegmentIds: string[];
648
+ includeListIds: string[];
649
+ excludeSegmentIds: string[];
650
+ excludeListIds: string[];
651
+ onePerCompany?: boolean | undefined;
652
+ everyone?: boolean | undefined;
653
+ includeTags?: string[] | undefined;
654
+ excludeTags?: string[] | undefined;
655
+ smart?: {
656
+ windowDays?: number | undefined;
657
+ unengagedSends?: number | undefined;
658
+ churnRisk?: number | undefined;
659
+ churnedSends?: number | undefined;
660
+ } | undefined;
661
+ };
662
+ audienceFrozenAt: string | null;
663
+ templateId: string | null;
664
+ topicId: string | null;
665
+ route: {
666
+ connectionId?: string | undefined;
667
+ poolId?: string | undefined;
668
+ routePolicyId?: string | undefined;
669
+ };
670
+ schedule: {
671
+ tz: string;
672
+ recipientLocal: boolean;
673
+ throttlePerHour?: number | undefined;
674
+ window?: {
675
+ startMin: number;
676
+ endMin: number;
677
+ } | undefined;
678
+ sendTime: "fixed" | "optimized";
679
+ fallbackHour?: number | undefined;
680
+ pastZones?: "immediately" | "tomorrow" | undefined;
681
+ batchSize?: number | undefined;
682
+ at: string;
683
+ } | null;
684
+ abTest: {
685
+ testPercent: number;
686
+ metric: "clicks" | "conversions" | "opens" | "replies" | "revenue";
687
+ waitHours: number;
688
+ auto: boolean;
689
+ method: "bayesian_beta" | "frequentist_ztest";
690
+ confidence?: number | undefined;
691
+ guardrail?: number | undefined;
692
+ } | null;
693
+ variants?: {
694
+ key: string;
695
+ templateVersionId: string;
696
+ subject?: string | null | undefined;
697
+ fromName?: string | null | undefined;
698
+ previewText?: string | null | undefined;
699
+ replyTo?: string | null | undefined;
700
+ imageAssetId?: string | null | undefined;
701
+ sendOffset: number;
702
+ weight: number;
703
+ }[] | undefined;
704
+ utm: Record<string, string> | null;
705
+ tracking: {
706
+ opens?: boolean | undefined;
707
+ clicks?: boolean | undefined;
708
+ } | null;
709
+ autoPause: {
710
+ enabled: boolean;
711
+ maxFailureRate: number;
712
+ maxBounceRate: number;
713
+ minSample: number;
714
+ } | null;
715
+ slug: string | null;
716
+ archiveProfile: Record<string, string> | null;
717
+ inArchive: boolean;
718
+ ownerId?: string | null | undefined;
719
+ startsOn?: string | null | undefined;
720
+ endsOn?: string | null | undefined;
721
+ notes?: string | null | undefined;
722
+ approvalStatus: string;
723
+ approvedBy: string | null;
724
+ approvalSubmittedBy?: string | null | undefined;
725
+ approvalComment?: string | null | undefined;
726
+ startedAt: string | null;
727
+ completedAt: string | null;
728
+ testSentAt: string | null;
729
+ contentErasedAt?: string | null | undefined;
730
+ stats: Record<string, number>;
731
+ archivedAt?: string | null | undefined;
732
+ parentCampaignId?: string | null | undefined;
733
+ reviewDrafts?: boolean | undefined;
734
+ reviewDeadline?: {
735
+ hours: number;
736
+ action: "send" | "skip";
737
+ } | null | undefined;
738
+ failureReason?: string | null | undefined;
739
+ smartAudience?: boolean | undefined;
740
+ app?: string | null | undefined;
741
+ createdAt: string;
742
+ updatedAt: string;
743
+ }>;
744
+ cancel: (id: string) => Promise<{
745
+ id: string;
746
+ name: string;
747
+ channel: "email" | "postcard" | "push" | "sms" | "whatsapp";
748
+ purpose: "marketing" | "operational" | "prospecting" | "transactional";
749
+ status: "cancelled" | "completed" | "draft" | "failed" | "paused" | "scheduled" | "sending";
750
+ audience: {
751
+ includeSegmentIds: string[];
752
+ includeListIds: string[];
753
+ excludeSegmentIds: string[];
754
+ excludeListIds: string[];
755
+ onePerCompany?: boolean | undefined;
756
+ everyone?: boolean | undefined;
757
+ includeTags?: string[] | undefined;
758
+ excludeTags?: string[] | undefined;
759
+ smart?: {
760
+ windowDays?: number | undefined;
761
+ unengagedSends?: number | undefined;
762
+ churnRisk?: number | undefined;
763
+ churnedSends?: number | undefined;
764
+ } | undefined;
765
+ };
766
+ audienceFrozenAt: string | null;
767
+ templateId: string | null;
768
+ topicId: string | null;
769
+ route: {
770
+ connectionId?: string | undefined;
771
+ poolId?: string | undefined;
772
+ routePolicyId?: string | undefined;
773
+ };
774
+ schedule: {
775
+ tz: string;
776
+ recipientLocal: boolean;
777
+ throttlePerHour?: number | undefined;
778
+ window?: {
779
+ startMin: number;
780
+ endMin: number;
781
+ } | undefined;
782
+ sendTime: "fixed" | "optimized";
783
+ fallbackHour?: number | undefined;
784
+ pastZones?: "immediately" | "tomorrow" | undefined;
785
+ batchSize?: number | undefined;
786
+ at: string;
787
+ } | null;
788
+ abTest: {
789
+ testPercent: number;
790
+ metric: "clicks" | "conversions" | "opens" | "replies" | "revenue";
791
+ waitHours: number;
792
+ auto: boolean;
793
+ method: "bayesian_beta" | "frequentist_ztest";
794
+ confidence?: number | undefined;
795
+ guardrail?: number | undefined;
796
+ } | null;
797
+ variants?: {
798
+ key: string;
799
+ templateVersionId: string;
800
+ subject?: string | null | undefined;
801
+ fromName?: string | null | undefined;
802
+ previewText?: string | null | undefined;
803
+ replyTo?: string | null | undefined;
804
+ imageAssetId?: string | null | undefined;
805
+ sendOffset: number;
806
+ weight: number;
807
+ }[] | undefined;
808
+ utm: Record<string, string> | null;
809
+ tracking: {
810
+ opens?: boolean | undefined;
811
+ clicks?: boolean | undefined;
812
+ } | null;
813
+ autoPause: {
814
+ enabled: boolean;
815
+ maxFailureRate: number;
816
+ maxBounceRate: number;
817
+ minSample: number;
818
+ } | null;
819
+ slug: string | null;
820
+ archiveProfile: Record<string, string> | null;
821
+ inArchive: boolean;
822
+ ownerId?: string | null | undefined;
823
+ startsOn?: string | null | undefined;
824
+ endsOn?: string | null | undefined;
825
+ notes?: string | null | undefined;
826
+ approvalStatus: string;
827
+ approvedBy: string | null;
828
+ approvalSubmittedBy?: string | null | undefined;
829
+ approvalComment?: string | null | undefined;
830
+ startedAt: string | null;
831
+ completedAt: string | null;
832
+ testSentAt: string | null;
833
+ contentErasedAt?: string | null | undefined;
834
+ stats: Record<string, number>;
835
+ archivedAt?: string | null | undefined;
836
+ parentCampaignId?: string | null | undefined;
837
+ reviewDrafts?: boolean | undefined;
838
+ reviewDeadline?: {
839
+ hours: number;
840
+ action: "send" | "skip";
841
+ } | null | undefined;
842
+ failureReason?: string | null | undefined;
843
+ smartAudience?: boolean | undefined;
844
+ app?: string | null | undefined;
845
+ createdAt: string;
846
+ updatedAt: string;
847
+ }>;
848
+ report: (id: string) => Promise<unknown>;
849
+ };
850
+ lists: {
851
+ list: () => Promise<{
852
+ items: Out<typeof ListWithCount>[];
853
+ }>;
854
+ get: (id: string) => Promise<{
855
+ id: string;
856
+ name: string;
857
+ description: string | null;
858
+ kind: string;
859
+ settings: {
860
+ doubleOptIn?: boolean | undefined;
861
+ topicId?: string | undefined;
862
+ subscribeAddress?: string | undefined;
863
+ permissionReminder?: string | undefined;
864
+ defaultFromName?: string | undefined;
865
+ defaultFromEmail?: string | undefined;
866
+ defaultSubject?: string | undefined;
867
+ defaultReplyTo?: string | undefined;
868
+ allowedFormTags?: string[] | undefined;
869
+ defaultLanguage?: string | undefined;
870
+ companyName?: string | undefined;
871
+ contactAddress?: string | undefined;
872
+ postalAddressId?: string | undefined;
873
+ footer?: string | undefined;
874
+ contactEmail?: string | undefined;
875
+ homepageUrl?: string | undefined;
876
+ segmentScopeId?: string | undefined;
877
+ unsubscribeMode?: "confirm" | "one_click" | undefined;
878
+ unsubscribeRedirectUrl?: string | undefined;
879
+ unsubscribedMessage?: string | undefined;
880
+ notifyOnSubscribe?: string | undefined;
881
+ notifyOnUnsubscribe?: string | undefined;
882
+ archived?: boolean | undefined;
883
+ emoji?: string | undefined;
884
+ publicDirectory?: boolean | undefined;
885
+ expiresAt?: string | undefined;
886
+ exclusion?: boolean | undefined;
887
+ defaultConnectionId?: string | undefined;
888
+ defaultPoolId?: string | undefined;
889
+ };
890
+ tags?: string[] | undefined;
891
+ folderId?: string | null | undefined;
892
+ app?: string | null | undefined;
893
+ createdAt: string;
894
+ }>;
895
+ create: (body: In<typeof CreateListBody>) => Promise<{
896
+ id: string;
897
+ name: string;
898
+ description: string | null;
899
+ kind: string;
900
+ settings: {
901
+ doubleOptIn?: boolean | undefined;
902
+ topicId?: string | undefined;
903
+ subscribeAddress?: string | undefined;
904
+ permissionReminder?: string | undefined;
905
+ defaultFromName?: string | undefined;
906
+ defaultFromEmail?: string | undefined;
907
+ defaultSubject?: string | undefined;
908
+ defaultReplyTo?: string | undefined;
909
+ allowedFormTags?: string[] | undefined;
910
+ defaultLanguage?: string | undefined;
911
+ companyName?: string | undefined;
912
+ contactAddress?: string | undefined;
913
+ postalAddressId?: string | undefined;
914
+ footer?: string | undefined;
915
+ contactEmail?: string | undefined;
916
+ homepageUrl?: string | undefined;
917
+ segmentScopeId?: string | undefined;
918
+ unsubscribeMode?: "confirm" | "one_click" | undefined;
919
+ unsubscribeRedirectUrl?: string | undefined;
920
+ unsubscribedMessage?: string | undefined;
921
+ notifyOnSubscribe?: string | undefined;
922
+ notifyOnUnsubscribe?: string | undefined;
923
+ archived?: boolean | undefined;
924
+ emoji?: string | undefined;
925
+ publicDirectory?: boolean | undefined;
926
+ expiresAt?: string | undefined;
927
+ exclusion?: boolean | undefined;
928
+ defaultConnectionId?: string | undefined;
929
+ defaultPoolId?: string | undefined;
930
+ };
931
+ tags?: string[] | undefined;
932
+ folderId?: string | null | undefined;
933
+ app?: string | null | undefined;
934
+ createdAt: string;
935
+ }>;
936
+ update: (id: string, body: In<typeof UpdateListBody>) => Promise<{
937
+ id: string;
938
+ name: string;
939
+ description: string | null;
940
+ kind: string;
941
+ settings: {
942
+ doubleOptIn?: boolean | undefined;
943
+ topicId?: string | undefined;
944
+ subscribeAddress?: string | undefined;
945
+ permissionReminder?: string | undefined;
946
+ defaultFromName?: string | undefined;
947
+ defaultFromEmail?: string | undefined;
948
+ defaultSubject?: string | undefined;
949
+ defaultReplyTo?: string | undefined;
950
+ allowedFormTags?: string[] | undefined;
951
+ defaultLanguage?: string | undefined;
952
+ companyName?: string | undefined;
953
+ contactAddress?: string | undefined;
954
+ postalAddressId?: string | undefined;
955
+ footer?: string | undefined;
956
+ contactEmail?: string | undefined;
957
+ homepageUrl?: string | undefined;
958
+ segmentScopeId?: string | undefined;
959
+ unsubscribeMode?: "confirm" | "one_click" | undefined;
960
+ unsubscribeRedirectUrl?: string | undefined;
961
+ unsubscribedMessage?: string | undefined;
962
+ notifyOnSubscribe?: string | undefined;
963
+ notifyOnUnsubscribe?: string | undefined;
964
+ archived?: boolean | undefined;
965
+ emoji?: string | undefined;
966
+ publicDirectory?: boolean | undefined;
967
+ expiresAt?: string | undefined;
968
+ exclusion?: boolean | undefined;
969
+ defaultConnectionId?: string | undefined;
970
+ defaultPoolId?: string | undefined;
971
+ };
972
+ tags?: string[] | undefined;
973
+ folderId?: string | null | undefined;
974
+ app?: string | null | undefined;
975
+ createdAt: string;
976
+ }>;
977
+ delete: (id: string) => Promise<{
978
+ ok: true;
979
+ }>;
980
+ addMembers: (id: string, body: In<typeof ListMembersBody>) => Promise<{
981
+ changed: string[];
982
+ }>;
983
+ removeMember: (id: string, profileId: string) => Promise<{
984
+ changed: string[];
985
+ }>;
986
+ };
987
+ templates: {
988
+ list: (query?: In<typeof ListTemplatesQuery>) => Promise<{
989
+ items: {
990
+ id: string;
991
+ workspaceId: string;
992
+ channel: "email" | "postcard" | "push" | "sms" | "whatsapp";
993
+ name: string;
994
+ kind: "blocks" | "html" | "sms" | "text";
995
+ folder: string | null;
996
+ tags: string[];
997
+ currentVersionId: string | null;
998
+ archived: boolean;
999
+ folderId: string | null;
1000
+ brandKitId: string | null;
1001
+ isDefault: boolean;
1002
+ topicId: string | null;
1003
+ createdBy: string | null;
1004
+ app: string | null;
1005
+ createdAt: string;
1006
+ updatedAt: string;
1007
+ }[];
1008
+ nextCursor: string | null;
1009
+ }>;
1010
+ get: (id: string) => Promise<{
1011
+ id: string;
1012
+ workspaceId: string;
1013
+ channel: "email" | "postcard" | "push" | "sms" | "whatsapp";
1014
+ name: string;
1015
+ kind: "blocks" | "html" | "sms" | "text";
1016
+ folder: string | null;
1017
+ tags: string[];
1018
+ currentVersionId: string | null;
1019
+ archived: boolean;
1020
+ folderId: string | null;
1021
+ brandKitId: string | null;
1022
+ isDefault: boolean;
1023
+ topicId: string | null;
1024
+ createdBy: string | null;
1025
+ app: string | null;
1026
+ createdAt: string;
1027
+ updatedAt: string;
1028
+ currentVersion: {
1029
+ id: string;
1030
+ templateId: string;
1031
+ workspaceId: string;
1032
+ body: {
1033
+ kind: "blocks";
1034
+ doc: {
1035
+ version: 1;
1036
+ width: number;
1037
+ background?: string | undefined;
1038
+ blocks: import("./contracts/content-blocks.ts").Block[];
1039
+ translations?: Record<string, {
1040
+ subject?: string | undefined;
1041
+ preheader?: string | undefined;
1042
+ blocks: import("./contracts/content-blocks.ts").Block[];
1043
+ }> | undefined;
1044
+ };
1045
+ } | {
1046
+ kind: "html";
1047
+ html: string;
1048
+ authoring?: "markdown" | "mjml" | undefined;
1049
+ source?: string | undefined;
1050
+ } | {
1051
+ kind: "text";
1052
+ text: string;
1053
+ } | {
1054
+ kind: "sms";
1055
+ text: string;
1056
+ };
1057
+ subject: string | null;
1058
+ preheader: string | null;
1059
+ fromNameOverride: string | null;
1060
+ textBody: string | null;
1061
+ approvalStatus: "approved" | "none" | "pending" | "rejected";
1062
+ reviewComment: string | null;
1063
+ createdBy: string | null;
1064
+ createdAt: string;
1065
+ approvedBy: string | null;
1066
+ approvedAt: string | null;
1067
+ fromEmail: string | null;
1068
+ replyTo: string | null;
1069
+ cc: string[];
1070
+ ampHtml: string | null;
1071
+ rcs: {
1072
+ card?: {
1073
+ title: string;
1074
+ description?: string | undefined;
1075
+ mediaUrl?: string | undefined;
1076
+ } | undefined;
1077
+ suggestions: ({
1078
+ type: "reply";
1079
+ text: string;
1080
+ } | {
1081
+ type: "url";
1082
+ text: string;
1083
+ url: string;
1084
+ } | {
1085
+ type: "dial";
1086
+ text: string;
1087
+ phone: string;
1088
+ })[];
1089
+ } | null;
1090
+ transactionalReviewedBy: string | null;
1091
+ transactionalReviewedAt: string | null;
1092
+ } | null;
1093
+ }>;
1094
+ create: (body: In<typeof CreateTemplateBody>) => Promise<{
1095
+ id: string;
1096
+ workspaceId: string;
1097
+ channel: "email" | "postcard" | "push" | "sms" | "whatsapp";
1098
+ name: string;
1099
+ kind: "blocks" | "html" | "sms" | "text";
1100
+ folder: string | null;
1101
+ tags: string[];
1102
+ currentVersionId: string | null;
1103
+ archived: boolean;
1104
+ folderId: string | null;
1105
+ brandKitId: string | null;
1106
+ isDefault: boolean;
1107
+ topicId: string | null;
1108
+ createdBy: string | null;
1109
+ app: string | null;
1110
+ createdAt: string;
1111
+ updatedAt: string;
1112
+ }>;
1113
+ update: (id: string, body: In<typeof UpdateTemplateBody>) => Promise<{
1114
+ id: string;
1115
+ workspaceId: string;
1116
+ channel: "email" | "postcard" | "push" | "sms" | "whatsapp";
1117
+ name: string;
1118
+ kind: "blocks" | "html" | "sms" | "text";
1119
+ folder: string | null;
1120
+ tags: string[];
1121
+ currentVersionId: string | null;
1122
+ archived: boolean;
1123
+ folderId: string | null;
1124
+ brandKitId: string | null;
1125
+ isDefault: boolean;
1126
+ topicId: string | null;
1127
+ createdBy: string | null;
1128
+ app: string | null;
1129
+ createdAt: string;
1130
+ updatedAt: string;
1131
+ }>;
1132
+ preview: (id: string, body: unknown) => Promise<unknown>;
1133
+ };
1134
+ workflows: {
1135
+ list: (query?: In<typeof WorkflowListQuery>) => Promise<{
1136
+ items: {
1137
+ id: string;
1138
+ name: string;
1139
+ purpose: "marketing" | "operational" | "prospecting" | "transactional";
1140
+ mode: "journey" | "sequence";
1141
+ status: "archived" | "draft" | "live" | "paused";
1142
+ publishedVersionId: string | null;
1143
+ folder: string | null;
1144
+ tags: string[];
1145
+ color?: string | null | undefined;
1146
+ app?: string | null | undefined;
1147
+ draftGraph: unknown;
1148
+ draftTriggers: unknown;
1149
+ draftSettings: unknown;
1150
+ ab?: {
1151
+ variants: {
1152
+ versionId: string;
1153
+ weight: number;
1154
+ }[];
1155
+ startedAt: string;
1156
+ } | null | undefined;
1157
+ createdAt: string;
1158
+ updatedAt: string;
1159
+ }[];
1160
+ nextCursor: string | null;
1161
+ }>;
1162
+ get: (id: string) => Promise<{
1163
+ id: string;
1164
+ name: string;
1165
+ purpose: "marketing" | "operational" | "prospecting" | "transactional";
1166
+ mode: "journey" | "sequence";
1167
+ status: "archived" | "draft" | "live" | "paused";
1168
+ publishedVersionId: string | null;
1169
+ folder: string | null;
1170
+ tags: string[];
1171
+ color?: string | null | undefined;
1172
+ app?: string | null | undefined;
1173
+ draftGraph: unknown;
1174
+ draftTriggers: unknown;
1175
+ draftSettings: unknown;
1176
+ ab?: {
1177
+ variants: {
1178
+ versionId: string;
1179
+ weight: number;
1180
+ }[];
1181
+ startedAt: string;
1182
+ } | null | undefined;
1183
+ createdAt: string;
1184
+ updatedAt: string;
1185
+ }>;
1186
+ create: (body: In<typeof CreateWorkflowBody>) => Promise<{
1187
+ id: string;
1188
+ name: string;
1189
+ purpose: "marketing" | "operational" | "prospecting" | "transactional";
1190
+ mode: "journey" | "sequence";
1191
+ status: "archived" | "draft" | "live" | "paused";
1192
+ publishedVersionId: string | null;
1193
+ folder: string | null;
1194
+ tags: string[];
1195
+ color?: string | null | undefined;
1196
+ app?: string | null | undefined;
1197
+ draftGraph: unknown;
1198
+ draftTriggers: unknown;
1199
+ draftSettings: unknown;
1200
+ ab?: {
1201
+ variants: {
1202
+ versionId: string;
1203
+ weight: number;
1204
+ }[];
1205
+ startedAt: string;
1206
+ } | null | undefined;
1207
+ createdAt: string;
1208
+ updatedAt: string;
1209
+ }>;
1210
+ update: (id: string, body: In<typeof UpdateWorkflowBody>) => Promise<{
1211
+ id: string;
1212
+ name: string;
1213
+ purpose: "marketing" | "operational" | "prospecting" | "transactional";
1214
+ mode: "journey" | "sequence";
1215
+ status: "archived" | "draft" | "live" | "paused";
1216
+ publishedVersionId: string | null;
1217
+ folder: string | null;
1218
+ tags: string[];
1219
+ color?: string | null | undefined;
1220
+ app?: string | null | undefined;
1221
+ draftGraph: unknown;
1222
+ draftTriggers: unknown;
1223
+ draftSettings: unknown;
1224
+ ab?: {
1225
+ variants: {
1226
+ versionId: string;
1227
+ weight: number;
1228
+ }[];
1229
+ startedAt: string;
1230
+ } | null | undefined;
1231
+ createdAt: string;
1232
+ updatedAt: string;
1233
+ }>;
1234
+ publish: (id: string) => Promise<unknown>;
1235
+ pause: (id: string) => Promise<{
1236
+ id: string;
1237
+ name: string;
1238
+ purpose: "marketing" | "operational" | "prospecting" | "transactional";
1239
+ mode: "journey" | "sequence";
1240
+ status: "archived" | "draft" | "live" | "paused";
1241
+ publishedVersionId: string | null;
1242
+ folder: string | null;
1243
+ tags: string[];
1244
+ color?: string | null | undefined;
1245
+ app?: string | null | undefined;
1246
+ draftGraph: unknown;
1247
+ draftTriggers: unknown;
1248
+ draftSettings: unknown;
1249
+ ab?: {
1250
+ variants: {
1251
+ versionId: string;
1252
+ weight: number;
1253
+ }[];
1254
+ startedAt: string;
1255
+ } | null | undefined;
1256
+ createdAt: string;
1257
+ updatedAt: string;
1258
+ }>;
1259
+ enroll: (id: string, body: In<typeof EnrollBody>, o?: RequestOptions) => Promise<{
1260
+ enrolled: number;
1261
+ skipped: {
1262
+ profileId: string;
1263
+ reason: string;
1264
+ }[];
1265
+ queued?: boolean | undefined;
1266
+ }>;
1267
+ };
1268
+ consent: {
1269
+ get: (profileId: string) => Promise<{
1270
+ items: Out<typeof ConsentStateDto>[];
1271
+ }>;
1272
+ /** Records a consent change. Grants need a lawful source; the server rejects the ones it cannot accept. */
1273
+ record: (profileId: string, body: In<typeof ConsentInputBody>) => Promise<{
1274
+ record: {
1275
+ id: string;
1276
+ profileId: string;
1277
+ channel: "email" | "postcard" | "push" | "sms" | "whatsapp";
1278
+ purpose: "marketing" | "operational" | "prospecting" | "transactional";
1279
+ topicId: string | null;
1280
+ status: "granted" | "pending_confirmation" | "revoked";
1281
+ legalBasis: "consent" | "contract" | "legitimate_interest" | "other";
1282
+ source: "admin" | "api" | "double_opt_in" | "facebook_dm" | "form" | "import" | "instagram_dm" | "preference_center" | "sms_keyword";
1283
+ sourceRef: string | null;
1284
+ disclosureText: string | null;
1285
+ disclosureVersion: string | null;
1286
+ expiresAt: string | null;
1287
+ revocationScope: "all" | "channel" | "topic" | null;
1288
+ at: string;
1289
+ };
1290
+ } | {
1291
+ ignored: "revoked_previously";
1292
+ }>;
1293
+ };
1294
+ suppressions: {
1295
+ list: (query?: In<typeof SuppressionListQuery>) => Promise<{
1296
+ items: Out<typeof SuppressionDto>[];
1297
+ nextCursor?: string | null;
1298
+ }>;
1299
+ add: (body: In<typeof SuppressionInput>) => Promise<{
1300
+ id: string;
1301
+ channel: "email" | "postcard" | "push" | "sms" | "whatsapp";
1302
+ valueNormalized: string;
1303
+ scope: "global" | "purpose" | "topic";
1304
+ topicId: string | null;
1305
+ purpose: "marketing" | "operational" | "prospecting" | "transactional" | null;
1306
+ reason: "complaint" | "dnc" | "hard_bounce" | "invalid" | "manual" | "stop_keyword" | "unsubscribe";
1307
+ sourceRef: string | null;
1308
+ liftedAt: string | null;
1309
+ liftedBy: string | null;
1310
+ liftReason: string | null;
1311
+ createdAt: string;
1312
+ }>;
1313
+ lift: (id: string, body: unknown) => Promise<{
1314
+ id: string;
1315
+ channel: "email" | "postcard" | "push" | "sms" | "whatsapp";
1316
+ valueNormalized: string;
1317
+ scope: "global" | "purpose" | "topic";
1318
+ topicId: string | null;
1319
+ purpose: "marketing" | "operational" | "prospecting" | "transactional" | null;
1320
+ reason: "complaint" | "dnc" | "hard_bounce" | "invalid" | "manual" | "stop_keyword" | "unsubscribe";
1321
+ sourceRef: string | null;
1322
+ liftedAt: string | null;
1323
+ liftedBy: string | null;
1324
+ liftReason: string | null;
1325
+ createdAt: string;
1326
+ }>;
1327
+ blocklist: () => Promise<{
1328
+ items: Out<typeof BlocklistDto>[];
1329
+ }>;
1330
+ block: (body: In<typeof BlocklistInput>) => Promise<{
1331
+ id: string;
1332
+ domain: string;
1333
+ reason: string | null;
1334
+ createdAt: string;
1335
+ }>;
1336
+ };
1337
+ };
1338
+ export {};