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