@apex-inc/mcp-server 0.32.0 → 0.34.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 (74) hide show
  1. package/README.md +19 -18
  2. package/dist/api-client.d.ts +5 -0
  3. package/dist/api-client.d.ts.map +1 -1
  4. package/dist/api-client.js +40 -24
  5. package/dist/api-client.js.map +1 -1
  6. package/dist/conflict-advisory.d.ts +29 -0
  7. package/dist/conflict-advisory.d.ts.map +1 -0
  8. package/dist/conflict-advisory.js +48 -0
  9. package/dist/conflict-advisory.js.map +1 -0
  10. package/dist/index.js +8 -5
  11. package/dist/index.js.map +1 -1
  12. package/dist/live-test-guard.d.ts +1 -0
  13. package/dist/live-test-guard.d.ts.map +1 -1
  14. package/dist/live-test-guard.js +4 -3
  15. package/dist/live-test-guard.js.map +1 -1
  16. package/dist/prompts.d.ts.map +1 -1
  17. package/dist/prompts.js +5 -7
  18. package/dist/prompts.js.map +1 -1
  19. package/dist/setup-catchup-tools.d.ts.map +1 -1
  20. package/dist/setup-catchup-tools.js +15 -3
  21. package/dist/setup-catchup-tools.js.map +1 -1
  22. package/dist/smoke-tools.d.ts +56 -0
  23. package/dist/smoke-tools.d.ts.map +1 -0
  24. package/dist/smoke-tools.js +261 -0
  25. package/dist/smoke-tools.js.map +1 -0
  26. package/dist/tool-catalog.d.ts +10 -0
  27. package/dist/tool-catalog.d.ts.map +1 -0
  28. package/dist/tool-catalog.js +36 -0
  29. package/dist/tool-catalog.js.map +1 -0
  30. package/dist/tool-groups.d.ts +5 -0
  31. package/dist/tool-groups.d.ts.map +1 -0
  32. package/dist/tool-groups.js +206 -0
  33. package/dist/tool-groups.js.map +1 -0
  34. package/dist/tool-shared.d.ts +300 -0
  35. package/dist/tool-shared.d.ts.map +1 -0
  36. package/dist/tool-shared.js +319 -0
  37. package/dist/tool-shared.js.map +1 -0
  38. package/dist/tools/accounts.d.ts +124 -0
  39. package/dist/tools/accounts.d.ts.map +1 -0
  40. package/dist/tools/accounts.js +99 -0
  41. package/dist/tools/accounts.js.map +1 -0
  42. package/dist/tools/adoption.d.ts +499 -0
  43. package/dist/tools/adoption.d.ts.map +1 -0
  44. package/dist/tools/adoption.js +447 -0
  45. package/dist/tools/adoption.js.map +1 -0
  46. package/dist/tools/context.d.ts +216 -0
  47. package/dist/tools/context.d.ts.map +1 -0
  48. package/dist/tools/context.js +328 -0
  49. package/dist/tools/context.js.map +1 -0
  50. package/dist/tools/experiments.d.ts +1066 -0
  51. package/dist/tools/experiments.d.ts.map +1 -0
  52. package/dist/tools/experiments.js +2090 -0
  53. package/dist/tools/experiments.js.map +1 -0
  54. package/dist/tools/letters.d.ts +1107 -0
  55. package/dist/tools/letters.d.ts.map +1 -0
  56. package/dist/tools/letters.js +1324 -0
  57. package/dist/tools/letters.js.map +1 -0
  58. package/dist/tools/measurement.d.ts +886 -0
  59. package/dist/tools/measurement.d.ts.map +1 -0
  60. package/dist/tools/measurement.js +1353 -0
  61. package/dist/tools/measurement.js.map +1 -0
  62. package/dist/tools/partners.d.ts +364 -0
  63. package/dist/tools/partners.d.ts.map +1 -0
  64. package/dist/tools/partners.js +199 -0
  65. package/dist/tools/partners.js.map +1 -0
  66. package/dist/tools.d.ts +3161 -2826
  67. package/dist/tools.d.ts.map +1 -1
  68. package/dist/tools.js +26 -6133
  69. package/dist/tools.js.map +1 -1
  70. package/package.json +3 -2
  71. package/skills/apex-communications/SKILL.md +5 -5
  72. package/skills/apex-experimentation/SKILL.md +11 -14
  73. package/skills/apex-growth-intelligence/SKILL.md +1 -1
  74. package/skills/apex-integration-cookbook/SKILL.md +1 -1
@@ -0,0 +1,1107 @@
1
+ import { z } from "zod";
2
+ export declare const letterTools: {
3
+ recommend_communications: {
4
+ description: string;
5
+ schema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
6
+ handler: () => Promise<{
7
+ content: {
8
+ type: "text";
9
+ text: string;
10
+ }[];
11
+ }>;
12
+ };
13
+ generate_communications: {
14
+ description: string;
15
+ schema: z.ZodObject<{
16
+ catalogEntryIds: z.ZodArray<z.ZodString, "many">;
17
+ }, "strip", z.ZodTypeAny, {
18
+ catalogEntryIds: string[];
19
+ }, {
20
+ catalogEntryIds: string[];
21
+ }>;
22
+ handler: (args: {
23
+ catalogEntryIds: string[];
24
+ }) => Promise<{
25
+ content: {
26
+ type: "text";
27
+ text: string;
28
+ }[];
29
+ }>;
30
+ };
31
+ list_communications: {
32
+ description: string;
33
+ schema: z.ZodObject<{
34
+ pipeline: z.ZodOptional<z.ZodEnum<["transactional", "marketing"]>>;
35
+ channel: z.ZodOptional<z.ZodEnum<["email", "inbox", "web_push", "mobile_push"]>>;
36
+ search: z.ZodOptional<z.ZodString>;
37
+ includeArchived: z.ZodOptional<z.ZodBoolean>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ search?: string | undefined;
40
+ pipeline?: "transactional" | "marketing" | undefined;
41
+ channel?: "email" | "mobile_push" | "inbox" | "web_push" | undefined;
42
+ includeArchived?: boolean | undefined;
43
+ }, {
44
+ search?: string | undefined;
45
+ pipeline?: "transactional" | "marketing" | undefined;
46
+ channel?: "email" | "mobile_push" | "inbox" | "web_push" | undefined;
47
+ includeArchived?: boolean | undefined;
48
+ }>;
49
+ handler: (args: {
50
+ pipeline?: "transactional" | "marketing";
51
+ channel?: "email" | "inbox" | "web_push" | "mobile_push";
52
+ search?: string;
53
+ includeArchived?: boolean;
54
+ }) => Promise<{
55
+ content: {
56
+ type: "text";
57
+ text: string;
58
+ }[];
59
+ }>;
60
+ };
61
+ list_communication_themes: {
62
+ description: string;
63
+ schema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
64
+ handler: () => Promise<{
65
+ content: {
66
+ type: "text";
67
+ text: string;
68
+ }[];
69
+ }>;
70
+ };
71
+ create_communication_theme: {
72
+ description: string;
73
+ schema: z.ZodObject<{
74
+ name: z.ZodString;
75
+ clone_from_id: z.ZodOptional<z.ZodString>;
76
+ style: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
77
+ roles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
78
+ }, "strip", z.ZodTypeAny, {
79
+ name: string;
80
+ clone_from_id?: string | undefined;
81
+ style?: Record<string, unknown> | undefined;
82
+ roles?: Record<string, unknown> | undefined;
83
+ }, {
84
+ name: string;
85
+ clone_from_id?: string | undefined;
86
+ style?: Record<string, unknown> | undefined;
87
+ roles?: Record<string, unknown> | undefined;
88
+ }>;
89
+ handler: (args: {
90
+ name: string;
91
+ clone_from_id?: string;
92
+ style?: Record<string, unknown>;
93
+ roles?: Record<string, unknown>;
94
+ }) => Promise<{
95
+ content: {
96
+ type: "text";
97
+ text: string;
98
+ }[];
99
+ }>;
100
+ };
101
+ update_communication_theme: {
102
+ description: string;
103
+ schema: z.ZodObject<{
104
+ theme_id: z.ZodString;
105
+ name: z.ZodOptional<z.ZodString>;
106
+ style: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
107
+ roles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
108
+ set_default: z.ZodOptional<z.ZodBoolean>;
109
+ }, "strip", z.ZodTypeAny, {
110
+ theme_id: string;
111
+ name?: string | undefined;
112
+ style?: Record<string, unknown> | undefined;
113
+ roles?: Record<string, unknown> | undefined;
114
+ set_default?: boolean | undefined;
115
+ }, {
116
+ theme_id: string;
117
+ name?: string | undefined;
118
+ style?: Record<string, unknown> | undefined;
119
+ roles?: Record<string, unknown> | undefined;
120
+ set_default?: boolean | undefined;
121
+ }>;
122
+ handler: (args: {
123
+ theme_id: string;
124
+ name?: string;
125
+ style?: Record<string, unknown>;
126
+ roles?: Record<string, unknown>;
127
+ set_default?: boolean;
128
+ }) => Promise<{
129
+ content: {
130
+ type: "text";
131
+ text: string;
132
+ }[];
133
+ }>;
134
+ };
135
+ apply_communication_theme: {
136
+ description: string;
137
+ schema: z.ZodObject<{
138
+ theme_id: z.ZodString;
139
+ comm_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
140
+ apply: z.ZodOptional<z.ZodEnum<["draft", "live"]>>;
141
+ }, "strip", z.ZodTypeAny, {
142
+ theme_id: string;
143
+ comm_ids?: string[] | undefined;
144
+ apply?: "draft" | "live" | undefined;
145
+ }, {
146
+ theme_id: string;
147
+ comm_ids?: string[] | undefined;
148
+ apply?: "draft" | "live" | undefined;
149
+ }>;
150
+ handler: (args: {
151
+ theme_id: string;
152
+ comm_ids?: string[];
153
+ apply?: "draft" | "live";
154
+ }) => Promise<{
155
+ content: {
156
+ type: "text";
157
+ text: string;
158
+ }[];
159
+ }>;
160
+ };
161
+ edit_communication: {
162
+ description: string;
163
+ schema: z.ZodObject<{
164
+ communicationId: z.ZodString;
165
+ subject: z.ZodOptional<z.ZodString>;
166
+ slots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
167
+ channels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
168
+ status: z.ZodOptional<z.ZodEnum<["draft", "active", "paused"]>>;
169
+ audience_bucket: z.ZodOptional<z.ZodEnum<["production", "beta", "dev"]>>;
170
+ intent: z.ZodOptional<z.ZodEnum<["compete", "replace"]>>;
171
+ confirmLiveExperiment: z.ZodOptional<z.ZodBoolean>;
172
+ }, "strip", z.ZodTypeAny, {
173
+ communicationId: string;
174
+ channels?: string[] | undefined;
175
+ status?: "active" | "draft" | "paused" | undefined;
176
+ intent?: "replace" | "compete" | undefined;
177
+ subject?: string | undefined;
178
+ slots?: Record<string, string> | undefined;
179
+ audience_bucket?: "production" | "beta" | "dev" | undefined;
180
+ confirmLiveExperiment?: boolean | undefined;
181
+ }, {
182
+ communicationId: string;
183
+ channels?: string[] | undefined;
184
+ status?: "active" | "draft" | "paused" | undefined;
185
+ intent?: "replace" | "compete" | undefined;
186
+ subject?: string | undefined;
187
+ slots?: Record<string, string> | undefined;
188
+ audience_bucket?: "production" | "beta" | "dev" | undefined;
189
+ confirmLiveExperiment?: boolean | undefined;
190
+ }>;
191
+ handler: (args: {
192
+ communicationId: string;
193
+ subject?: string;
194
+ slots?: Record<string, string>;
195
+ channels?: string[];
196
+ status?: string;
197
+ audience_bucket?: "production" | "beta" | "dev";
198
+ intent?: "compete" | "replace";
199
+ confirmLiveExperiment?: boolean;
200
+ }) => Promise<{
201
+ content: {
202
+ type: "text";
203
+ text: string;
204
+ }[];
205
+ isError?: undefined;
206
+ } | {
207
+ content: {
208
+ type: "text";
209
+ text: string;
210
+ }[];
211
+ isError: boolean;
212
+ }>;
213
+ };
214
+ publish_communication: {
215
+ description: string;
216
+ schema: z.ZodObject<{
217
+ communicationId: z.ZodString;
218
+ intent: z.ZodOptional<z.ZodEnum<["compete", "replace"]>>;
219
+ confirmLiveExperiment: z.ZodOptional<z.ZodBoolean>;
220
+ hostJourneyId: z.ZodOptional<z.ZodString>;
221
+ hypothesis: z.ZodOptional<z.ZodString>;
222
+ beliefId: z.ZodOptional<z.ZodString>;
223
+ confidence: z.ZodOptional<z.ZodNumber>;
224
+ durationDays: z.ZodOptional<z.ZodNumber>;
225
+ }, "strip", z.ZodTypeAny, {
226
+ communicationId: string;
227
+ intent?: "replace" | "compete" | undefined;
228
+ confidence?: number | undefined;
229
+ beliefId?: string | undefined;
230
+ hypothesis?: string | undefined;
231
+ durationDays?: number | undefined;
232
+ confirmLiveExperiment?: boolean | undefined;
233
+ hostJourneyId?: string | undefined;
234
+ }, {
235
+ communicationId: string;
236
+ intent?: "replace" | "compete" | undefined;
237
+ confidence?: number | undefined;
238
+ beliefId?: string | undefined;
239
+ hypothesis?: string | undefined;
240
+ durationDays?: number | undefined;
241
+ confirmLiveExperiment?: boolean | undefined;
242
+ hostJourneyId?: string | undefined;
243
+ }>;
244
+ handler: (args: {
245
+ communicationId: string;
246
+ intent?: "compete" | "replace";
247
+ confirmLiveExperiment?: boolean;
248
+ hostJourneyId?: string;
249
+ hypothesis?: string;
250
+ beliefId?: string;
251
+ confidence?: number;
252
+ durationDays?: number;
253
+ }) => Promise<{
254
+ content: {
255
+ type: "text";
256
+ text: string;
257
+ }[];
258
+ isError?: undefined;
259
+ } | {
260
+ content: {
261
+ type: "text";
262
+ text: string;
263
+ }[];
264
+ isError: boolean;
265
+ }>;
266
+ };
267
+ preview_communication: {
268
+ description: string;
269
+ schema: z.ZodObject<{
270
+ communicationId: z.ZodString;
271
+ }, "strip", z.ZodTypeAny, {
272
+ communicationId: string;
273
+ }, {
274
+ communicationId: string;
275
+ }>;
276
+ handler: (args: {
277
+ communicationId: string;
278
+ }) => Promise<{
279
+ content: {
280
+ type: "text";
281
+ text: string;
282
+ }[];
283
+ }>;
284
+ };
285
+ add_communication_variant: {
286
+ description: string;
287
+ schema: z.ZodObject<{
288
+ communicationId: z.ZodString;
289
+ label: z.ZodOptional<z.ZodString>;
290
+ }, "strip", z.ZodTypeAny, {
291
+ communicationId: string;
292
+ label?: string | undefined;
293
+ }, {
294
+ communicationId: string;
295
+ label?: string | undefined;
296
+ }>;
297
+ handler: (args: {
298
+ communicationId: string;
299
+ label?: string;
300
+ }) => Promise<{
301
+ content: {
302
+ type: "text";
303
+ text: string;
304
+ }[];
305
+ }>;
306
+ };
307
+ send_test_communication: {
308
+ description: string;
309
+ schema: z.ZodObject<{
310
+ communicationId: z.ZodString;
311
+ }, "strip", z.ZodTypeAny, {
312
+ communicationId: string;
313
+ }, {
314
+ communicationId: string;
315
+ }>;
316
+ handler: (args: {
317
+ communicationId: string;
318
+ }) => Promise<{
319
+ content: {
320
+ type: "text";
321
+ text: string;
322
+ }[];
323
+ }>;
324
+ };
325
+ trigger_communication: {
326
+ description: string;
327
+ schema: z.ZodObject<{
328
+ communicationId: z.ZodString;
329
+ recipientEmail: z.ZodString;
330
+ mergeData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
331
+ }, "strip", z.ZodTypeAny, {
332
+ communicationId: string;
333
+ recipientEmail: string;
334
+ mergeData?: Record<string, string> | undefined;
335
+ }, {
336
+ communicationId: string;
337
+ recipientEmail: string;
338
+ mergeData?: Record<string, string> | undefined;
339
+ }>;
340
+ handler: (args: {
341
+ communicationId: string;
342
+ recipientEmail: string;
343
+ mergeData?: Record<string, string>;
344
+ }) => Promise<{
345
+ content: {
346
+ type: "text";
347
+ text: string;
348
+ }[];
349
+ }>;
350
+ };
351
+ create_comm_experiment: {
352
+ description: string;
353
+ schema: z.ZodObject<{
354
+ communicationId: z.ZodString;
355
+ splitLevel: z.ZodEnum<["subject", "body", "cta", "full"]>;
356
+ funnelGoal: z.ZodString;
357
+ variants: z.ZodArray<z.ZodObject<{
358
+ name: z.ZodString;
359
+ bodyOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
360
+ subjectOverride: z.ZodOptional<z.ZodString>;
361
+ }, "strip", z.ZodTypeAny, {
362
+ name: string;
363
+ bodyOverrides?: Record<string, string> | undefined;
364
+ subjectOverride?: string | undefined;
365
+ }, {
366
+ name: string;
367
+ bodyOverrides?: Record<string, string> | undefined;
368
+ subjectOverride?: string | undefined;
369
+ }>, "many">;
370
+ }, "strip", z.ZodTypeAny, {
371
+ communicationId: string;
372
+ splitLevel: "full" | "subject" | "body" | "cta";
373
+ funnelGoal: string;
374
+ variants: {
375
+ name: string;
376
+ bodyOverrides?: Record<string, string> | undefined;
377
+ subjectOverride?: string | undefined;
378
+ }[];
379
+ }, {
380
+ communicationId: string;
381
+ splitLevel: "full" | "subject" | "body" | "cta";
382
+ funnelGoal: string;
383
+ variants: {
384
+ name: string;
385
+ bodyOverrides?: Record<string, string> | undefined;
386
+ subjectOverride?: string | undefined;
387
+ }[];
388
+ }>;
389
+ handler: (args: {
390
+ communicationId: string;
391
+ splitLevel: string;
392
+ funnelGoal: string;
393
+ variants: unknown[];
394
+ }) => Promise<{
395
+ content: {
396
+ type: "text";
397
+ text: string;
398
+ }[];
399
+ }>;
400
+ };
401
+ wire_audience_seed: {
402
+ description: string;
403
+ schema: z.ZodObject<{
404
+ seedId: z.ZodString;
405
+ framework: z.ZodOptional<z.ZodEnum<["typescript", "snippet", "python", "ruby"]>>;
406
+ fireTestEvent: z.ZodOptional<z.ZodBoolean>;
407
+ }, "strip", z.ZodTypeAny, {
408
+ seedId: string;
409
+ framework?: "snippet" | "typescript" | "python" | "ruby" | undefined;
410
+ fireTestEvent?: boolean | undefined;
411
+ }, {
412
+ seedId: string;
413
+ framework?: "snippet" | "typescript" | "python" | "ruby" | undefined;
414
+ fireTestEvent?: boolean | undefined;
415
+ }>;
416
+ handler: ({ seedId, framework, fireTestEvent, }: {
417
+ seedId: string;
418
+ framework?: "typescript" | "snippet" | "python" | "ruby";
419
+ fireTestEvent?: boolean;
420
+ }) => Promise<{
421
+ content: {
422
+ type: "text";
423
+ text: string;
424
+ }[];
425
+ }>;
426
+ };
427
+ wire_audience: {
428
+ description: string;
429
+ schema: z.ZodObject<{
430
+ audienceId: z.ZodString;
431
+ framework: z.ZodOptional<z.ZodEnum<["typescript", "snippet", "python", "ruby"]>>;
432
+ fireTestEvent: z.ZodOptional<z.ZodBoolean>;
433
+ }, "strip", z.ZodTypeAny, {
434
+ audienceId: string;
435
+ framework?: "snippet" | "typescript" | "python" | "ruby" | undefined;
436
+ fireTestEvent?: boolean | undefined;
437
+ }, {
438
+ audienceId: string;
439
+ framework?: "snippet" | "typescript" | "python" | "ruby" | undefined;
440
+ fireTestEvent?: boolean | undefined;
441
+ }>;
442
+ handler: ({ audienceId, framework, fireTestEvent, }: {
443
+ audienceId: string;
444
+ framework?: "typescript" | "snippet" | "python" | "ruby";
445
+ fireTestEvent?: boolean;
446
+ }) => Promise<{
447
+ content: {
448
+ type: "text";
449
+ text: string;
450
+ }[];
451
+ }>;
452
+ };
453
+ audit_audience_readiness: {
454
+ description: string;
455
+ schema: z.ZodObject<{
456
+ audienceId: z.ZodString;
457
+ }, "strip", z.ZodTypeAny, {
458
+ audienceId: string;
459
+ }, {
460
+ audienceId: string;
461
+ }>;
462
+ handler: ({ audienceId }: {
463
+ audienceId: string;
464
+ }) => Promise<{
465
+ content: {
466
+ type: "text";
467
+ text: string;
468
+ }[];
469
+ }>;
470
+ };
471
+ create_journey: {
472
+ description: string;
473
+ schema: z.ZodObject<{
474
+ name: z.ZodOptional<z.ZodString>;
475
+ audience_bucket: z.ZodOptional<z.ZodEnum<["production", "beta", "dev"]>>;
476
+ }, "strip", z.ZodTypeAny, {
477
+ name?: string | undefined;
478
+ audience_bucket?: "production" | "beta" | "dev" | undefined;
479
+ }, {
480
+ name?: string | undefined;
481
+ audience_bucket?: "production" | "beta" | "dev" | undefined;
482
+ }>;
483
+ handler: ({ name, audience_bucket }: {
484
+ name?: string;
485
+ audience_bucket?: "production" | "beta" | "dev";
486
+ }) => Promise<{
487
+ content: {
488
+ type: "text";
489
+ text: string;
490
+ }[];
491
+ isError: boolean;
492
+ } | {
493
+ content: {
494
+ type: "text";
495
+ text: string;
496
+ }[];
497
+ }>;
498
+ };
499
+ create_journey_from_template: {
500
+ description: string;
501
+ schema: z.ZodObject<{
502
+ templateId: z.ZodString;
503
+ }, "strip", z.ZodTypeAny, {
504
+ templateId: string;
505
+ }, {
506
+ templateId: string;
507
+ }>;
508
+ handler: ({ templateId }: {
509
+ templateId: string;
510
+ }) => Promise<{
511
+ content: {
512
+ type: "text";
513
+ text: string;
514
+ }[];
515
+ isError: boolean;
516
+ } | {
517
+ content: {
518
+ type: "text";
519
+ text: string;
520
+ }[];
521
+ }>;
522
+ };
523
+ list_trigger_contracts: {
524
+ description: string;
525
+ schema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
526
+ handler: () => Promise<{
527
+ content: {
528
+ type: "text";
529
+ text: string;
530
+ }[];
531
+ }>;
532
+ };
533
+ set_journey_trigger: {
534
+ description: string;
535
+ schema: z.ZodObject<{
536
+ journeyId: z.ZodString;
537
+ eventName: z.ZodOptional<z.ZodString>;
538
+ triggerContractId: z.ZodOptional<z.ZodString>;
539
+ }, "strip", z.ZodTypeAny, {
540
+ journeyId: string;
541
+ eventName?: string | undefined;
542
+ triggerContractId?: string | undefined;
543
+ }, {
544
+ journeyId: string;
545
+ eventName?: string | undefined;
546
+ triggerContractId?: string | undefined;
547
+ }>;
548
+ handler: ({ journeyId, eventName, triggerContractId, }: {
549
+ journeyId: string;
550
+ eventName?: string;
551
+ triggerContractId?: string;
552
+ }) => Promise<{
553
+ content: {
554
+ type: "text";
555
+ text: string;
556
+ }[];
557
+ isError: boolean;
558
+ } | {
559
+ content: {
560
+ type: "text";
561
+ text: string;
562
+ }[];
563
+ }>;
564
+ };
565
+ add_journey_step: {
566
+ description: string;
567
+ schema: z.ZodObject<{
568
+ journeyId: z.ZodString;
569
+ kind: z.ZodEnum<["wait", "send"]>;
570
+ mode: z.ZodOptional<z.ZodEnum<["duration", "until_event"]>>;
571
+ durationIso: z.ZodOptional<z.ZodString>;
572
+ triggerContractId: z.ZodOptional<z.ZodString>;
573
+ deadlineIso: z.ZodOptional<z.ZodString>;
574
+ commId: z.ZodOptional<z.ZodString>;
575
+ commVersion: z.ZodOptional<z.ZodNumber>;
576
+ channels: z.ZodOptional<z.ZodArray<z.ZodEnum<["email", "in_app_push", "mobile_push", "web_push"]>, "many">>;
577
+ arm: z.ZodOptional<z.ZodEnum<["event", "deadline"]>>;
578
+ }, "strip", z.ZodTypeAny, {
579
+ kind: "wait" | "send";
580
+ journeyId: string;
581
+ mode?: "duration" | "until_event" | undefined;
582
+ commId?: string | undefined;
583
+ commVersion?: number | undefined;
584
+ channels?: ("email" | "mobile_push" | "web_push" | "in_app_push")[] | undefined;
585
+ triggerContractId?: string | undefined;
586
+ durationIso?: string | undefined;
587
+ deadlineIso?: string | undefined;
588
+ arm?: "event" | "deadline" | undefined;
589
+ }, {
590
+ kind: "wait" | "send";
591
+ journeyId: string;
592
+ mode?: "duration" | "until_event" | undefined;
593
+ commId?: string | undefined;
594
+ commVersion?: number | undefined;
595
+ channels?: ("email" | "mobile_push" | "web_push" | "in_app_push")[] | undefined;
596
+ triggerContractId?: string | undefined;
597
+ durationIso?: string | undefined;
598
+ deadlineIso?: string | undefined;
599
+ arm?: "event" | "deadline" | undefined;
600
+ }>;
601
+ handler: (args: {
602
+ journeyId: string;
603
+ kind: "wait" | "send";
604
+ mode?: "duration" | "until_event";
605
+ durationIso?: string;
606
+ triggerContractId?: string;
607
+ deadlineIso?: string;
608
+ commId?: string;
609
+ commVersion?: number;
610
+ channels?: string[];
611
+ arm?: "event" | "deadline";
612
+ }) => Promise<{
613
+ content: {
614
+ type: "text";
615
+ text: string;
616
+ }[];
617
+ isError: boolean;
618
+ } | {
619
+ content: {
620
+ type: "text";
621
+ text: string;
622
+ }[];
623
+ }>;
624
+ };
625
+ set_journey_send: {
626
+ description: string;
627
+ schema: z.ZodObject<{
628
+ journeyId: z.ZodString;
629
+ commId: z.ZodString;
630
+ stepId: z.ZodOptional<z.ZodString>;
631
+ commVersion: z.ZodOptional<z.ZodNumber>;
632
+ }, "strip", z.ZodTypeAny, {
633
+ commId: string;
634
+ journeyId: string;
635
+ stepId?: string | undefined;
636
+ commVersion?: number | undefined;
637
+ }, {
638
+ commId: string;
639
+ journeyId: string;
640
+ stepId?: string | undefined;
641
+ commVersion?: number | undefined;
642
+ }>;
643
+ handler: (args: {
644
+ journeyId: string;
645
+ commId: string;
646
+ stepId?: string;
647
+ commVersion?: number;
648
+ }) => Promise<{
649
+ content: {
650
+ type: "text";
651
+ text: string;
652
+ }[];
653
+ isError: boolean;
654
+ } | {
655
+ content: {
656
+ type: "text";
657
+ text: string;
658
+ }[];
659
+ }>;
660
+ };
661
+ add_journey_branch: {
662
+ description: string;
663
+ schema: z.ZodObject<{
664
+ journeyId: z.ZodString;
665
+ condition: z.ZodObject<{
666
+ kind: z.ZodEnum<["attribute", "event_fired", "event_not_fired"]>;
667
+ field_path: z.ZodOptional<z.ZodString>;
668
+ operator: z.ZodOptional<z.ZodEnum<["equals", "not_equals", "greater_than", "less_than", "in", "exists", "not_exists"]>>;
669
+ value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">]>>;
670
+ event_name: z.ZodOptional<z.ZodString>;
671
+ window_days: z.ZodOptional<z.ZodNumber>;
672
+ }, "strip", z.ZodTypeAny, {
673
+ kind: "event_not_fired" | "attribute" | "event_fired";
674
+ value?: string | number | boolean | (string | number | boolean)[] | undefined;
675
+ event_name?: string | undefined;
676
+ field_path?: string | undefined;
677
+ operator?: "equals" | "not_equals" | "exists" | "greater_than" | "less_than" | "in" | "not_exists" | undefined;
678
+ window_days?: number | undefined;
679
+ }, {
680
+ kind: "event_not_fired" | "attribute" | "event_fired";
681
+ value?: string | number | boolean | (string | number | boolean)[] | undefined;
682
+ event_name?: string | undefined;
683
+ field_path?: string | undefined;
684
+ operator?: "equals" | "not_equals" | "exists" | "greater_than" | "less_than" | "in" | "not_exists" | undefined;
685
+ window_days?: number | undefined;
686
+ }>;
687
+ whenTrueCommId: z.ZodString;
688
+ whenFalseCommId: z.ZodOptional<z.ZodString>;
689
+ channels: z.ZodOptional<z.ZodArray<z.ZodEnum<["email", "in_app_push", "mobile_push", "web_push"]>, "many">>;
690
+ }, "strip", z.ZodTypeAny, {
691
+ journeyId: string;
692
+ condition: {
693
+ kind: "event_not_fired" | "attribute" | "event_fired";
694
+ value?: string | number | boolean | (string | number | boolean)[] | undefined;
695
+ event_name?: string | undefined;
696
+ field_path?: string | undefined;
697
+ operator?: "equals" | "not_equals" | "exists" | "greater_than" | "less_than" | "in" | "not_exists" | undefined;
698
+ window_days?: number | undefined;
699
+ };
700
+ whenTrueCommId: string;
701
+ channels?: ("email" | "mobile_push" | "web_push" | "in_app_push")[] | undefined;
702
+ whenFalseCommId?: string | undefined;
703
+ }, {
704
+ journeyId: string;
705
+ condition: {
706
+ kind: "event_not_fired" | "attribute" | "event_fired";
707
+ value?: string | number | boolean | (string | number | boolean)[] | undefined;
708
+ event_name?: string | undefined;
709
+ field_path?: string | undefined;
710
+ operator?: "equals" | "not_equals" | "exists" | "greater_than" | "less_than" | "in" | "not_exists" | undefined;
711
+ window_days?: number | undefined;
712
+ };
713
+ whenTrueCommId: string;
714
+ channels?: ("email" | "mobile_push" | "web_push" | "in_app_push")[] | undefined;
715
+ whenFalseCommId?: string | undefined;
716
+ }>;
717
+ handler: (args: {
718
+ journeyId: string;
719
+ condition: {
720
+ kind: "attribute" | "event_fired" | "event_not_fired";
721
+ field_path?: string;
722
+ operator?: string;
723
+ value?: string | number | boolean | Array<string | number | boolean>;
724
+ event_name?: string;
725
+ window_days?: number;
726
+ };
727
+ whenTrueCommId: string;
728
+ whenFalseCommId?: string;
729
+ channels?: string[];
730
+ }) => Promise<{
731
+ content: {
732
+ type: "text";
733
+ text: string;
734
+ }[];
735
+ isError: boolean;
736
+ } | {
737
+ content: {
738
+ type: "text";
739
+ text: string;
740
+ }[];
741
+ }>;
742
+ };
743
+ publish_journey: {
744
+ description: string;
745
+ schema: z.ZodObject<{
746
+ journeyId: z.ZodString;
747
+ confirmLive: z.ZodOptional<z.ZodBoolean>;
748
+ confirmTreatmentChange: z.ZodOptional<z.ZodBoolean>;
749
+ }, "strip", z.ZodTypeAny, {
750
+ journeyId: string;
751
+ confirmLive?: boolean | undefined;
752
+ confirmTreatmentChange?: boolean | undefined;
753
+ }, {
754
+ journeyId: string;
755
+ confirmLive?: boolean | undefined;
756
+ confirmTreatmentChange?: boolean | undefined;
757
+ }>;
758
+ handler: ({ journeyId, confirmLive, confirmTreatmentChange, }: {
759
+ journeyId: string;
760
+ confirmLive?: boolean;
761
+ confirmTreatmentChange?: boolean;
762
+ }) => Promise<{
763
+ content: {
764
+ type: "text";
765
+ text: string;
766
+ }[];
767
+ isError: boolean;
768
+ } | {
769
+ content: {
770
+ type: "text";
771
+ text: string;
772
+ }[];
773
+ }>;
774
+ };
775
+ create_communication: {
776
+ description: string;
777
+ schema: z.ZodObject<{
778
+ title: z.ZodOptional<z.ZodString>;
779
+ channels: z.ZodOptional<z.ZodArray<z.ZodEnum<["email", "in_app_push", "mobile_push"]>, "many">>;
780
+ audience_bucket: z.ZodOptional<z.ZodEnum<["production", "beta", "dev"]>>;
781
+ }, "strip", z.ZodTypeAny, {
782
+ channels?: ("email" | "mobile_push" | "in_app_push")[] | undefined;
783
+ audience_bucket?: "production" | "beta" | "dev" | undefined;
784
+ title?: string | undefined;
785
+ }, {
786
+ channels?: ("email" | "mobile_push" | "in_app_push")[] | undefined;
787
+ audience_bucket?: "production" | "beta" | "dev" | undefined;
788
+ title?: string | undefined;
789
+ }>;
790
+ handler: ({ title, channels, audience_bucket }: {
791
+ title?: string;
792
+ channels?: string[];
793
+ audience_bucket?: "production" | "beta" | "dev";
794
+ }) => Promise<{
795
+ content: {
796
+ type: "text";
797
+ text: string;
798
+ }[];
799
+ isError: boolean;
800
+ } | {
801
+ content: {
802
+ type: "text";
803
+ text: string;
804
+ }[];
805
+ }>;
806
+ };
807
+ list_journeys: {
808
+ description: string;
809
+ schema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
810
+ handler: () => Promise<{
811
+ content: {
812
+ type: "text";
813
+ text: string;
814
+ }[];
815
+ }>;
816
+ };
817
+ get_journey: {
818
+ description: string;
819
+ schema: z.ZodObject<{
820
+ journeyId: z.ZodString;
821
+ }, "strip", z.ZodTypeAny, {
822
+ journeyId: string;
823
+ }, {
824
+ journeyId: string;
825
+ }>;
826
+ handler: ({ journeyId }: {
827
+ journeyId: string;
828
+ }) => Promise<{
829
+ content: {
830
+ type: "text";
831
+ text: string;
832
+ }[];
833
+ }>;
834
+ };
835
+ list_journey_exits: {
836
+ description: string;
837
+ schema: z.ZodObject<{
838
+ journeyId: z.ZodString;
839
+ }, "strip", z.ZodTypeAny, {
840
+ journeyId: string;
841
+ }, {
842
+ journeyId: string;
843
+ }>;
844
+ handler: ({ journeyId }: {
845
+ journeyId: string;
846
+ }) => Promise<{
847
+ content: {
848
+ type: "text";
849
+ text: string;
850
+ }[];
851
+ }>;
852
+ };
853
+ add_journey_exit: {
854
+ description: string;
855
+ schema: z.ZodObject<{
856
+ journeyId: z.ZodString;
857
+ triggerContractId: z.ZodString;
858
+ label: z.ZodOptional<z.ZodString>;
859
+ enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
860
+ }, "strip", z.ZodTypeAny, {
861
+ enabled: boolean;
862
+ journeyId: string;
863
+ triggerContractId: string;
864
+ label?: string | undefined;
865
+ }, {
866
+ journeyId: string;
867
+ triggerContractId: string;
868
+ label?: string | undefined;
869
+ enabled?: boolean | undefined;
870
+ }>;
871
+ handler: ({ journeyId, triggerContractId, label, enabled, }: {
872
+ journeyId: string;
873
+ triggerContractId: string;
874
+ label?: string;
875
+ enabled?: boolean;
876
+ }) => Promise<{
877
+ content: {
878
+ type: "text";
879
+ text: string;
880
+ }[];
881
+ }>;
882
+ };
883
+ remove_journey_exit: {
884
+ description: string;
885
+ schema: z.ZodObject<{
886
+ journeyId: z.ZodString;
887
+ ruleId: z.ZodString;
888
+ }, "strip", z.ZodTypeAny, {
889
+ journeyId: string;
890
+ ruleId: string;
891
+ }, {
892
+ journeyId: string;
893
+ ruleId: string;
894
+ }>;
895
+ handler: ({ journeyId, ruleId, }: {
896
+ journeyId: string;
897
+ ruleId: string;
898
+ }) => Promise<{
899
+ content: {
900
+ type: "text";
901
+ text: string;
902
+ }[];
903
+ }>;
904
+ };
905
+ get_contact_cart: {
906
+ description: string;
907
+ schema: z.ZodObject<{
908
+ contact_id: z.ZodString;
909
+ }, "strip", z.ZodTypeAny, {
910
+ contact_id: string;
911
+ }, {
912
+ contact_id: string;
913
+ }>;
914
+ handler: ({ contact_id }: {
915
+ contact_id: string;
916
+ }) => Promise<{
917
+ content: {
918
+ type: "text";
919
+ text: string;
920
+ }[];
921
+ }>;
922
+ };
923
+ audit_journey_exits: {
924
+ description: string;
925
+ schema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
926
+ handler: () => Promise<{
927
+ content: {
928
+ type: "text";
929
+ text: string;
930
+ }[];
931
+ }>;
932
+ };
933
+ list_segments: {
934
+ description: string;
935
+ schema: z.ZodObject<{
936
+ scope: z.ZodOptional<z.ZodEnum<["workspace", "org"]>>;
937
+ }, "strip", z.ZodTypeAny, {
938
+ scope?: "org" | "workspace" | undefined;
939
+ }, {
940
+ scope?: "org" | "workspace" | undefined;
941
+ }>;
942
+ handler: (args: {
943
+ scope?: "workspace" | "org";
944
+ }) => Promise<{
945
+ content: {
946
+ type: "text";
947
+ text: string;
948
+ }[];
949
+ }>;
950
+ };
951
+ get_segment: {
952
+ description: string;
953
+ schema: z.ZodObject<{
954
+ segment_id: z.ZodString;
955
+ scope: z.ZodOptional<z.ZodEnum<["workspace", "org"]>>;
956
+ }, "strip", z.ZodTypeAny, {
957
+ segment_id: string;
958
+ scope?: "org" | "workspace" | undefined;
959
+ }, {
960
+ segment_id: string;
961
+ scope?: "org" | "workspace" | undefined;
962
+ }>;
963
+ handler: (args: {
964
+ segment_id: string;
965
+ scope?: "workspace" | "org";
966
+ }) => Promise<{
967
+ content: {
968
+ type: "text";
969
+ text: string;
970
+ }[];
971
+ }>;
972
+ };
973
+ create_segment: {
974
+ description: string;
975
+ schema: z.ZodObject<{
976
+ name: z.ZodString;
977
+ description: z.ZodOptional<z.ZodString>;
978
+ scope: z.ZodOptional<z.ZodEnum<["workspace", "org"]>>;
979
+ conditions: z.ZodOptional<z.ZodObject<{
980
+ match: z.ZodEnum<["all", "any"]>;
981
+ groups: z.ZodArray<z.ZodObject<{
982
+ match: z.ZodEnum<["all", "any"]>;
983
+ conditions: z.ZodArray<z.ZodObject<{
984
+ verb: z.ZodOptional<z.ZodEnum<["has", "hasnt"]>>;
985
+ event: z.ZodOptional<z.ZodString>;
986
+ window_days: z.ZodOptional<z.ZodNumber>;
987
+ attribute: z.ZodOptional<z.ZodString>;
988
+ op: z.ZodOptional<z.ZodEnum<["is", "is_not", "exists"]>>;
989
+ value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
990
+ }, "strip", z.ZodTypeAny, {
991
+ event?: string | undefined;
992
+ value?: string | number | boolean | undefined;
993
+ attribute?: string | undefined;
994
+ window_days?: number | undefined;
995
+ verb?: "has" | "hasnt" | undefined;
996
+ op?: "exists" | "is" | "is_not" | undefined;
997
+ }, {
998
+ event?: string | undefined;
999
+ value?: string | number | boolean | undefined;
1000
+ attribute?: string | undefined;
1001
+ window_days?: number | undefined;
1002
+ verb?: "has" | "hasnt" | undefined;
1003
+ op?: "exists" | "is" | "is_not" | undefined;
1004
+ }>, "many">;
1005
+ }, "strip", z.ZodTypeAny, {
1006
+ match: "all" | "any";
1007
+ conditions: {
1008
+ event?: string | undefined;
1009
+ value?: string | number | boolean | undefined;
1010
+ attribute?: string | undefined;
1011
+ window_days?: number | undefined;
1012
+ verb?: "has" | "hasnt" | undefined;
1013
+ op?: "exists" | "is" | "is_not" | undefined;
1014
+ }[];
1015
+ }, {
1016
+ match: "all" | "any";
1017
+ conditions: {
1018
+ event?: string | undefined;
1019
+ value?: string | number | boolean | undefined;
1020
+ attribute?: string | undefined;
1021
+ window_days?: number | undefined;
1022
+ verb?: "has" | "hasnt" | undefined;
1023
+ op?: "exists" | "is" | "is_not" | undefined;
1024
+ }[];
1025
+ }>, "many">;
1026
+ }, "strip", z.ZodTypeAny, {
1027
+ match: "all" | "any";
1028
+ groups: {
1029
+ match: "all" | "any";
1030
+ conditions: {
1031
+ event?: string | undefined;
1032
+ value?: string | number | boolean | undefined;
1033
+ attribute?: string | undefined;
1034
+ window_days?: number | undefined;
1035
+ verb?: "has" | "hasnt" | undefined;
1036
+ op?: "exists" | "is" | "is_not" | undefined;
1037
+ }[];
1038
+ }[];
1039
+ }, {
1040
+ match: "all" | "any";
1041
+ groups: {
1042
+ match: "all" | "any";
1043
+ conditions: {
1044
+ event?: string | undefined;
1045
+ value?: string | number | boolean | undefined;
1046
+ attribute?: string | undefined;
1047
+ window_days?: number | undefined;
1048
+ verb?: "has" | "hasnt" | undefined;
1049
+ op?: "exists" | "is" | "is_not" | undefined;
1050
+ }[];
1051
+ }[];
1052
+ }>>;
1053
+ predicate: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1054
+ }, "strip", z.ZodTypeAny, {
1055
+ name: string;
1056
+ description?: string | undefined;
1057
+ scope?: "org" | "workspace" | undefined;
1058
+ conditions?: {
1059
+ match: "all" | "any";
1060
+ groups: {
1061
+ match: "all" | "any";
1062
+ conditions: {
1063
+ event?: string | undefined;
1064
+ value?: string | number | boolean | undefined;
1065
+ attribute?: string | undefined;
1066
+ window_days?: number | undefined;
1067
+ verb?: "has" | "hasnt" | undefined;
1068
+ op?: "exists" | "is" | "is_not" | undefined;
1069
+ }[];
1070
+ }[];
1071
+ } | undefined;
1072
+ predicate?: Record<string, unknown> | undefined;
1073
+ }, {
1074
+ name: string;
1075
+ description?: string | undefined;
1076
+ scope?: "org" | "workspace" | undefined;
1077
+ conditions?: {
1078
+ match: "all" | "any";
1079
+ groups: {
1080
+ match: "all" | "any";
1081
+ conditions: {
1082
+ event?: string | undefined;
1083
+ value?: string | number | boolean | undefined;
1084
+ attribute?: string | undefined;
1085
+ window_days?: number | undefined;
1086
+ verb?: "has" | "hasnt" | undefined;
1087
+ op?: "exists" | "is" | "is_not" | undefined;
1088
+ }[];
1089
+ }[];
1090
+ } | undefined;
1091
+ predicate?: Record<string, unknown> | undefined;
1092
+ }>;
1093
+ handler: (args: {
1094
+ name: string;
1095
+ description?: string;
1096
+ scope?: "workspace" | "org";
1097
+ conditions?: unknown;
1098
+ predicate?: unknown;
1099
+ }) => Promise<{
1100
+ content: {
1101
+ type: "text";
1102
+ text: string;
1103
+ }[];
1104
+ }>;
1105
+ };
1106
+ };
1107
+ //# sourceMappingURL=letters.d.ts.map