samva 0.46.1 → 0.48.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 (79) hide show
  1. package/AGENTS.md +13 -7
  2. package/README.md +106 -8
  3. package/dist/agent/index.d.ts +57 -0
  4. package/dist/agent/index.js +53 -0
  5. package/dist/agent/runtime.d.ts +3 -0
  6. package/dist/agent/runtime.js +95 -0
  7. package/dist/agent/test.d.ts +31 -0
  8. package/dist/agent/test.js +66 -0
  9. package/dist/agent/types.d.ts +150 -0
  10. package/dist/client/sdk.gen.d.ts +50 -165
  11. package/dist/client/sdk.gen.js +1339 -1614
  12. package/dist/client/types.gen.d.ts +461 -989
  13. package/dist/effect/agents.d.ts +340 -8
  14. package/dist/effect/agents.js +4 -2
  15. package/dist/effect/api-keys.d.ts +2 -0
  16. package/dist/effect/campaigns.d.ts +160 -160
  17. package/dist/effect/contacts.d.ts +8 -0
  18. package/dist/effect/contacts.js +5 -1
  19. package/dist/effect/descriptors/agents.d.ts +12 -2
  20. package/dist/effect/descriptors/agents.js +12 -2
  21. package/dist/effect/descriptors/contacts.d.ts +20 -0
  22. package/dist/effect/descriptors/contacts.js +20 -0
  23. package/dist/effect/generated/accounts.d.ts +10 -0
  24. package/dist/effect/generated/accounts.js +1 -0
  25. package/dist/effect/generated/agents.d.ts +2967 -690
  26. package/dist/effect/generated/agents.js +54 -13
  27. package/dist/effect/generated/api-keys.d.ts +15 -0
  28. package/dist/effect/generated/api-keys.js +2 -0
  29. package/dist/effect/generated/contacts.d.ts +859 -1
  30. package/dist/effect/generated/contacts.js +62 -3
  31. package/dist/effect/generated/index.d.ts +1 -5
  32. package/dist/effect/generated/journeys.d.ts +351 -111
  33. package/dist/effect/generated/journeys.js +3 -1
  34. package/dist/effect/generated/mailboxes.d.ts +93 -95
  35. package/dist/effect/generated/mailboxes.js +21 -25
  36. package/dist/effect/generated/shared.d.ts +459 -139
  37. package/dist/effect/generated/shared.js +84 -39
  38. package/dist/effect/generated/template-registrations.d.ts +19 -4
  39. package/dist/effect/generated/template-registrations.js +8 -7
  40. package/dist/effect/generated/templates.d.ts +76 -11
  41. package/dist/effect/generated/templates.js +25 -12
  42. package/dist/effect/generated-metadata.d.ts +18 -84
  43. package/dist/effect/generated-metadata.js +362 -415
  44. package/dist/effect/index.d.ts +0 -2
  45. package/dist/effect/index.js +1 -3
  46. package/dist/effect/internal/client.js +1 -1
  47. package/dist/effect/internal/operation.js +4 -1
  48. package/dist/effect/journeys.d.ts +26 -2
  49. package/dist/effect/mailboxes.d.ts +41 -41
  50. package/dist/effect/scheduled-messages.d.ts +350 -350
  51. package/dist/effect/templates.d.ts +9 -0
  52. package/dist/effect/topics.d.ts +2 -2
  53. package/dist/package.js +1 -1
  54. package/dist/promises/client.d.ts +1 -5
  55. package/dist/promises/client.js +3 -7
  56. package/dist/promises/types.gen.d.ts +1 -1
  57. package/dist/service-map.d.ts +18 -75
  58. package/package.json +10 -22
  59. package/dist/effect/descriptors/extension-installations.d.ts +0 -90
  60. package/dist/effect/descriptors/extension-installations.js +0 -90
  61. package/dist/effect/descriptors/extensions.d.ts +0 -50
  62. package/dist/effect/descriptors/extensions.js +0 -50
  63. package/dist/effect/extension-installations.d.ts +0 -132
  64. package/dist/effect/extension-installations.js +0 -29
  65. package/dist/effect/extensions.d.ts +0 -102
  66. package/dist/effect/extensions.js +0 -21
  67. package/dist/effect/generated/extension-installations.d.ts +0 -2761
  68. package/dist/effect/generated/extension-installations.js +0 -405
  69. package/dist/effect/generated/extensions.d.ts +0 -1037
  70. package/dist/effect/generated/extensions.js +0 -214
  71. package/dist/mailbox/dispatch.d.ts +0 -10
  72. package/dist/mailbox/dispatch.js +0 -66
  73. package/dist/mailbox/index.d.ts +0 -17
  74. package/dist/mailbox/index.js +0 -30
  75. package/dist/mailbox/test.d.ts +0 -25
  76. package/dist/mailbox/test.js +0 -181
  77. package/dist/mailbox/types.d.ts +0 -221
  78. package/dist/mailbox/webhook.d.ts +0 -10
  79. package/dist/mailbox/webhook.js +0 -41
@@ -99,8 +99,6 @@ export declare const AgentToolScope: Schema.Union<readonly [Schema.Struct<{
99
99
  readonly kind: Schema.Literal<"selected">;
100
100
  readonly names: Schema.$Array<Schema.String>;
101
101
  }>]>;
102
- export type TemplateId = string & EffectBrand.Brand<"TemplateId">;
103
- export declare const TemplateId: Schema.brand<Schema.String, "TemplateId">;
104
102
  export type PolicyEffect = "read" | "write" | "final";
105
103
  export declare const PolicyEffect: Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">, Schema.Literal<"final">]>;
106
104
  export type ApiKeyId = string & EffectBrand.Brand<"ApiKeyId">;
@@ -121,6 +119,8 @@ export type Weekday = "monday" | "tuesday" | "wednesday" | "thursday" | "friday"
121
119
  export declare const Weekday: Schema.Union<readonly [Schema.Literal<"monday">, Schema.Literal<"tuesday">, Schema.Literal<"wednesday">, Schema.Literal<"thursday">, Schema.Literal<"friday">, Schema.Literal<"saturday">, Schema.Literal<"sunday">]>;
122
120
  export type ClockTime = string;
123
121
  export declare const ClockTime: Schema.String;
122
+ export type TemplateId = string & EffectBrand.Brand<"TemplateId">;
123
+ export declare const TemplateId: Schema.brand<Schema.String, "TemplateId">;
124
124
  declare const PaymentRequiredError_base: Schema.Class<PaymentRequiredError, Schema.Struct<{
125
125
  readonly _tag: Schema.tag<"PaymentRequiredError">;
126
126
  readonly message: Schema.String;
@@ -429,10 +429,6 @@ export type OperationId = string & EffectBrand.Brand<"OperationId">;
429
429
  export declare const OperationId: Schema.brand<Schema.String, "OperationId">;
430
430
  export type EmailSenderId = string & EffectBrand.Brand<"EmailSenderId">;
431
431
  export declare const EmailSenderId: Schema.brand<Schema.String, "EmailSenderId">;
432
- export type ExtensionId = string & EffectBrand.Brand<"ExtensionId">;
433
- export declare const ExtensionId: Schema.brand<Schema.String, "ExtensionId">;
434
- export type ExtensionVersionId = string & EffectBrand.Brand<"ExtensionVersionId">;
435
- export declare const ExtensionVersionId: Schema.brand<Schema.String, "ExtensionVersionId">;
436
432
  export type FeedbackContext = {
437
433
  readonly operation?: string | null;
438
434
  readonly resourceId?: string | null;
@@ -469,6 +465,10 @@ export declare const JourneyTagAddedTrigger: Schema.Struct<{
469
465
  }>;
470
466
  export type JourneyNodeId = string;
471
467
  export declare const JourneyNodeId: Schema.String;
468
+ export type TemplateRegistrationId = string & EffectBrand.Brand<"TemplateRegistrationId">;
469
+ export declare const TemplateRegistrationId: Schema.brand<Schema.String, "TemplateRegistrationId">;
470
+ export type TemplateChannelVariantId = string & EffectBrand.Brand<"TemplateChannelVariantId">;
471
+ export declare const TemplateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
472
472
  export type JourneyWaitConfig = {
473
473
  readonly durationSeconds: number;
474
474
  };
@@ -529,6 +529,8 @@ export declare const JourneyUpdateTagsConfig: Schema.Struct<{
529
529
  readonly add: Schema.$Array<Schema.String>;
530
530
  readonly remove: Schema.$Array<Schema.String>;
531
531
  }>;
532
+ export type ShopifyShop = string;
533
+ export declare const ShopifyShop: Schema.String;
532
534
  export type MailboxChannel = "sms" | "whatsapp" | "email";
533
535
  export declare const MailboxChannel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
534
536
  export type MailboxMetadata = {
@@ -1146,30 +1148,6 @@ export type PublishAgentPayload = {
1146
1148
  export declare const PublishAgentPayload: Schema.Struct<{
1147
1149
  readonly revision: Schema.String;
1148
1150
  }>;
1149
- export type PublishExtensionVersionPayload = {
1150
- readonly manifest: {
1151
- readonly name: string;
1152
- readonly displayName: string;
1153
- readonly description?: string | null;
1154
- readonly version: string;
1155
- readonly runtime: "hosted" | "webhook";
1156
- readonly events: ReadonlyArray<"mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
1157
- readonly permissions: ReadonlyArray<"read" | "update" | "send" | "quarantine.read">;
1158
- };
1159
- readonly bundle?: string | null;
1160
- };
1161
- export declare const PublishExtensionVersionPayload: Schema.Struct<{
1162
- readonly manifest: Schema.Struct<{
1163
- readonly name: Schema.String;
1164
- readonly displayName: Schema.String;
1165
- readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1166
- readonly version: Schema.String;
1167
- readonly runtime: Schema.Union<readonly [Schema.Literal<"hosted">, Schema.Literal<"webhook">]>;
1168
- readonly events: Schema.$Array<Schema.Union<readonly [Schema.Literal<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.action.resolved">, Schema.Literal<"mailbox.message.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">]>>;
1169
- readonly permissions: Schema.$Array<Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"update">, Schema.Literal<"send">, Schema.Literal<"quarantine.read">]>>;
1170
- }>;
1171
- readonly bundle: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1172
- }>;
1173
1151
  export type PublishJourneyPayload = {
1174
1152
  readonly revision: string;
1175
1153
  };
@@ -1222,9 +1200,11 @@ export declare const SetWhatsAppFlowEndpointPayload: Schema.Struct<{
1222
1200
  }>;
1223
1201
  export type SuggestTemplateStartersPayload = {
1224
1202
  readonly brief: string;
1203
+ readonly channel?: "email" | "whatsapp" | null;
1225
1204
  };
1226
1205
  export declare const SuggestTemplateStartersPayload: Schema.Struct<{
1227
1206
  readonly brief: Schema.String;
1207
+ readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"email">, Schema.Literal<"whatsapp">]>, Schema.Null]>>;
1228
1208
  }>;
1229
1209
  export type TemplateFamilyName = {
1230
1210
  readonly name: string;
@@ -1356,6 +1336,12 @@ export type AccountLinks = {
1356
1336
  readonly [x: string]: IntegrationAccountId;
1357
1337
  };
1358
1338
  export declare const AccountLinks: Schema.$Record<Schema.String, Schema.brand<Schema.String, "IntegrationAccountId">>;
1339
+ export type MergeContactByConnectionPayload = {
1340
+ readonly connection: IntegrationAccountId;
1341
+ };
1342
+ export declare const MergeContactByConnectionPayload: Schema.Struct<{
1343
+ readonly connection: Schema.brand<Schema.String, "IntegrationAccountId">;
1344
+ }>;
1359
1345
  export type ConnectAccountPayload = {
1360
1346
  readonly provider: IntegrationKey;
1361
1347
  readonly input?: JsonObject;
@@ -1474,18 +1460,18 @@ export type ConversationContacts = {
1474
1460
  export declare const ConversationContacts: Schema.Struct<{
1475
1461
  readonly contactIds: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.brand<Schema.String, "ContactId">]>, readonly [Schema.brand<Schema.String, "ContactId">]>;
1476
1462
  }>;
1477
- export type CreateTemplateFromBriefPayload = {
1478
- readonly brief: string;
1479
- readonly name?: string | null;
1480
- readonly galleryTemplateId?: string | null;
1481
- readonly useBrand?: boolean | null;
1463
+ export type MergeContactPayload = {
1464
+ readonly from: ContactId;
1465
+ };
1466
+ export declare const MergeContactPayload: Schema.Struct<{
1467
+ readonly from: Schema.brand<Schema.String, "ContactId">;
1468
+ }>;
1469
+ export type CreateTemplateFamilyPayload = {
1470
+ readonly name: string;
1482
1471
  readonly namespaceId?: NamespaceId | null;
1483
1472
  };
1484
- export declare const CreateTemplateFromBriefPayload: Schema.Struct<{
1485
- readonly brief: Schema.String;
1486
- readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1487
- readonly galleryTemplateId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1488
- readonly useBrand: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1473
+ export declare const CreateTemplateFamilyPayload: Schema.Struct<{
1474
+ readonly name: Schema.String;
1489
1475
  readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
1490
1476
  }>;
1491
1477
  export type CreateTemplateFromWebsitePayload = {
@@ -1539,32 +1525,6 @@ export declare const AgentIntegrationGrant: Schema.Struct<{
1539
1525
  readonly names: Schema.$Array<Schema.String>;
1540
1526
  }>]>;
1541
1527
  }>;
1542
- export type SendMailboxChatPayload = {
1543
- readonly channel: "whatsapp" | "sms";
1544
- readonly to: string;
1545
- readonly text?: string | null;
1546
- readonly templateId?: TemplateId | null;
1547
- readonly templateData?: JsonObject | null;
1548
- };
1549
- export declare const SendMailboxChatPayload: Schema.Struct<{
1550
- readonly channel: Schema.Union<readonly [Schema.Literal<"whatsapp">, Schema.Literal<"sms">]>;
1551
- readonly to: Schema.String;
1552
- readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1553
- readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
1554
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1555
- }>;
1556
- export type ReplyMailboxChatPayload = {
1557
- readonly channel: "whatsapp" | "sms";
1558
- readonly text?: string | null;
1559
- readonly templateId?: TemplateId | null;
1560
- readonly templateData?: JsonObject | null;
1561
- };
1562
- export declare const ReplyMailboxChatPayload: Schema.Struct<{
1563
- readonly channel: Schema.Union<readonly [Schema.Literal<"whatsapp">, Schema.Literal<"sms">]>;
1564
- readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1565
- readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
1566
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1567
- }>;
1568
1528
  export type PolicySubject = {
1569
1529
  readonly kind: "agent";
1570
1530
  readonly id: AgentId;
@@ -1591,6 +1551,18 @@ export declare const PolicySubject: Schema.Union<readonly [Schema.Struct<{
1591
1551
  readonly kind: Schema.Literal<"extension">;
1592
1552
  readonly id: Schema.brand<Schema.String, "ExtensionInstallationId">;
1593
1553
  }>]>;
1554
+ export type AgentModuleTool = {
1555
+ readonly description: string;
1556
+ readonly input: JsonObject;
1557
+ readonly approval?: PolicyRequirement;
1558
+ readonly replay: "safe" | "unsafe";
1559
+ };
1560
+ export declare const AgentModuleTool: Schema.Struct<{
1561
+ readonly description: Schema.String;
1562
+ readonly input: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>;
1563
+ readonly approval: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"run">, Schema.Literal<"model">, Schema.Literal<"person">, Schema.Literal<"never">]>>;
1564
+ readonly replay: Schema.Union<readonly [Schema.Literal<"safe">, Schema.Literal<"unsafe">]>;
1565
+ }>;
1594
1566
  export type AgentModelChoice = AgentModel | CatalogModelId;
1595
1567
  export declare const AgentModelChoice: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>, Schema.String]>;
1596
1568
  export type WorkingHoursRange = {
@@ -1603,6 +1575,50 @@ export declare const WorkingHoursRange: Schema.Struct<{
1603
1575
  readonly opens: Schema.String;
1604
1576
  readonly closes: Schema.String;
1605
1577
  }>;
1578
+ export type SendMailboxChatPayload = {
1579
+ readonly channel: "whatsapp" | "sms";
1580
+ readonly to: string;
1581
+ readonly text?: string | null;
1582
+ readonly templateId?: TemplateId | null;
1583
+ readonly templateData?: JsonObject | null;
1584
+ };
1585
+ export declare const SendMailboxChatPayload: Schema.Struct<{
1586
+ readonly channel: Schema.Union<readonly [Schema.Literal<"whatsapp">, Schema.Literal<"sms">]>;
1587
+ readonly to: Schema.String;
1588
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1589
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
1590
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1591
+ }>;
1592
+ export type ReplyMailboxChatPayload = {
1593
+ readonly channel: "whatsapp" | "sms";
1594
+ readonly text?: string | null;
1595
+ readonly templateId?: TemplateId | null;
1596
+ readonly templateData?: JsonObject | null;
1597
+ };
1598
+ export declare const ReplyMailboxChatPayload: Schema.Struct<{
1599
+ readonly channel: Schema.Union<readonly [Schema.Literal<"whatsapp">, Schema.Literal<"sms">]>;
1600
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1601
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
1602
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1603
+ }>;
1604
+ export type CreateTemplateFromBriefPayload = {
1605
+ readonly brief: string;
1606
+ readonly channel?: "email" | "whatsapp" | null;
1607
+ readonly name?: string | null;
1608
+ readonly galleryTemplateId?: string | null;
1609
+ readonly useBrand?: boolean | null;
1610
+ readonly namespaceId?: NamespaceId | null;
1611
+ readonly variantOf?: TemplateId | null;
1612
+ };
1613
+ export declare const CreateTemplateFromBriefPayload: Schema.Struct<{
1614
+ readonly brief: Schema.String;
1615
+ readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"email">, Schema.Literal<"whatsapp">]>, Schema.Null]>>;
1616
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1617
+ readonly galleryTemplateId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1618
+ readonly useBrand: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1619
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
1620
+ readonly variantOf: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
1621
+ }>;
1606
1622
  export type UpdateAgentPayload = {
1607
1623
  readonly name?: AgentName | null;
1608
1624
  readonly monthlySpendCapDollars?: MonthlySpendCapDollars | null;
@@ -1974,11 +1990,13 @@ export declare const MessageSummary: Schema.Struct<{
1974
1990
  }>;
1975
1991
  export type JourneySendEmailConfig = {
1976
1992
  readonly template: TemplateId | string;
1993
+ readonly publicationId?: TemplatePublicationId;
1977
1994
  readonly senderId?: EmailSenderId;
1978
1995
  readonly templateData?: JsonObject;
1979
1996
  };
1980
1997
  export declare const JourneySendEmailConfig: Schema.Struct<{
1981
1998
  readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
1999
+ readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
1982
2000
  readonly senderId: Schema.optionalKey<Schema.brand<Schema.String, "EmailSenderId">>;
1983
2001
  readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
1984
2002
  }>;
@@ -2016,24 +2034,6 @@ export declare const TopicUpdatePayload: Schema.Struct<{
2016
2034
  readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
2017
2035
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
2018
2036
  }>;
2019
- export type ExtensionVersionRef = {
2020
- readonly id: ExtensionVersionId;
2021
- readonly version: string;
2022
- };
2023
- export declare const ExtensionVersionRef: Schema.Struct<{
2024
- readonly id: Schema.brand<Schema.String, "ExtensionVersionId">;
2025
- readonly version: Schema.String;
2026
- }>;
2027
- export type UpgradeExtensionPayload = {
2028
- readonly version?: string | ExtensionVersionId | null;
2029
- readonly acceptPermissions?: ReadonlyArray<"permission:read" | "permission:update" | "permission:send" | "permission:quarantine.read" | "event:mailbox.message.received" | "event:mailbox.message.sent" | "event:mailbox.action.pending_approval" | "event:mailbox.action.resolved" | "event:mailbox.message.quarantined" | "event:mailbox.message.released" | "event:mailbox.message.discarded"> | null;
2030
- readonly dryRun?: boolean | null;
2031
- };
2032
- export declare const UpgradeExtensionPayload: Schema.Struct<{
2033
- readonly version: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.brand<Schema.String, "ExtensionVersionId">, Schema.Null]>>;
2034
- readonly acceptPermissions: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"permission:read">, Schema.Literal<"permission:update">, Schema.Literal<"permission:send">, Schema.Literal<"permission:quarantine.read">, Schema.Literal<"event:mailbox.message.received">, Schema.Literal<"event:mailbox.message.sent">, Schema.Literal<"event:mailbox.action.pending_approval">, Schema.Literal<"event:mailbox.action.resolved">, Schema.Literal<"event:mailbox.message.quarantined">, Schema.Literal<"event:mailbox.message.released">, Schema.Literal<"event:mailbox.message.discarded">]>>, Schema.Null]>>;
2035
- readonly dryRun: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
2036
- }>;
2037
2037
  export type SendFeedback = {
2038
2038
  readonly message: string;
2039
2039
  readonly category?: "bug" | "confusing" | "missing" | "other" | null;
@@ -2081,8 +2081,8 @@ export declare const JourneyCustomEventTrigger: Schema.Struct<{
2081
2081
  readonly type: Schema.Literal<"event">;
2082
2082
  readonly eventName: Schema.String;
2083
2083
  }>;
2084
- export type JourneyEventName = JourneyCustomEventName | "contact.created" | "contact.tag_added" | "contact.joined_group";
2085
- export declare const JourneyEventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
2084
+ export type JourneyEventName = JourneyCustomEventName | "contact.created" | "contact.tag_added" | "contact.joined_group" | "contact.connection_completed";
2085
+ export declare const JourneyEventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
2086
2086
  export type JourneyNextEdge = {
2087
2087
  readonly nodeId: JourneyNodeId;
2088
2088
  };
@@ -3105,7 +3105,7 @@ export type JourneyWaitForEventConfig = {
3105
3105
  readonly timeoutSeconds: number;
3106
3106
  };
3107
3107
  export declare const JourneyWaitForEventConfig: Schema.Struct<{
3108
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
3108
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
3109
3109
  readonly timeoutSeconds: Schema.Finite;
3110
3110
  }>;
3111
3111
  export type JourneyEventPredicate = {
@@ -3115,14 +3115,14 @@ export type JourneyEventPredicate = {
3115
3115
  };
3116
3116
  export declare const JourneyEventPredicate: Schema.Struct<{
3117
3117
  readonly type: Schema.Literal<"event">;
3118
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
3118
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
3119
3119
  readonly occurred: Schema.Boolean;
3120
3120
  }>;
3121
3121
  export type JourneyGoal = {
3122
3122
  readonly eventName: JourneyEventName;
3123
3123
  };
3124
3124
  export declare const JourneyGoal: Schema.Struct<{
3125
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
3125
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
3126
3126
  }>;
3127
3127
  export type JourneySendEmailNode = {
3128
3128
  readonly type: "send_email";
@@ -3133,6 +3133,7 @@ export declare const JourneySendEmailNode: Schema.Struct<{
3133
3133
  readonly type: Schema.Literal<"send_email">;
3134
3134
  readonly config: Schema.Struct<{
3135
3135
  readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
3136
+ readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
3136
3137
  readonly senderId: Schema.optionalKey<Schema.brand<Schema.String, "EmailSenderId">>;
3137
3138
  readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
3138
3139
  }>;
@@ -3851,6 +3852,34 @@ export declare const WhatsAppTemplateDispatch: Schema.Struct<{
3851
3852
  }>]>>>;
3852
3853
  readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
3853
3854
  }>;
3855
+ export type JourneySendWhatsAppConfig = {
3856
+ readonly template: TemplateId | string;
3857
+ readonly templateData?: WhatsAppTemplateDispatchData;
3858
+ readonly bindings?: WhatsAppTemplateBindings;
3859
+ readonly businessAccountId?: WhatsAppBusinessAccountId;
3860
+ readonly pinnedRegistration?: {
3861
+ readonly registrationId: TemplateRegistrationId;
3862
+ readonly templateChannelVariantId: TemplateChannelVariantId;
3863
+ };
3864
+ readonly eventBindings?: {
3865
+ readonly [x: string]: string;
3866
+ };
3867
+ };
3868
+ export declare const JourneySendWhatsAppConfig: Schema.Struct<{
3869
+ readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
3870
+ readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
3871
+ readonly bindings: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
3872
+ readonly contact: Schema.Union<readonly [Schema.Literal<"id">, Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"phone">, Schema.Literal<"email">, Schema.Literal<"firstName">, Schema.Literal<"lastName">, Schema.Literal<"company">, Schema.Literal<"jobTitle">]>;
3873
+ }>, Schema.Struct<{
3874
+ readonly customField: Schema.String;
3875
+ }>]>>>;
3876
+ readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
3877
+ readonly pinnedRegistration: Schema.optionalKey<Schema.Struct<{
3878
+ readonly registrationId: Schema.brand<Schema.String, "TemplateRegistrationId">;
3879
+ readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
3880
+ }>>;
3881
+ readonly eventBindings: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
3882
+ }>;
3854
3883
  export type JourneyWaitForEventNode = {
3855
3884
  readonly type: "wait_for_event";
3856
3885
  readonly config: JourneyWaitForEventConfig;
@@ -3859,7 +3888,7 @@ export type JourneyWaitForEventNode = {
3859
3888
  export declare const JourneyWaitForEventNode: Schema.Struct<{
3860
3889
  readonly type: Schema.Literal<"wait_for_event">;
3861
3890
  readonly config: Schema.Struct<{
3862
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
3891
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
3863
3892
  readonly timeoutSeconds: Schema.Finite;
3864
3893
  }>;
3865
3894
  readonly next: Schema.Tuple<readonly [Schema.Struct<{
@@ -3907,7 +3936,7 @@ export declare const JourneyPredicate: Schema.Union<readonly [Schema.Struct<{
3907
3936
  }>]>;
3908
3937
  }>, Schema.Struct<{
3909
3938
  readonly type: Schema.Literal<"event">;
3910
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
3939
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
3911
3940
  readonly occurred: Schema.Boolean;
3912
3941
  }>]>;
3913
3942
  declare const MailboxSendRefusedError_base: Schema.Class<MailboxSendRefusedError, Schema.Struct<{
@@ -4493,7 +4522,7 @@ export declare const WhatsAppCampaignContentInput: Schema.Struct<{
4493
4522
  }>;
4494
4523
  export type WhatsAppJourneySendNode = {
4495
4524
  readonly type: "send_whatsapp";
4496
- readonly config: WhatsAppTemplateDispatch;
4525
+ readonly config: JourneySendWhatsAppConfig;
4497
4526
  readonly next: readonly [JourneyNextEdge];
4498
4527
  };
4499
4528
  export declare const WhatsAppJourneySendNode: Schema.Struct<{
@@ -4507,6 +4536,11 @@ export declare const WhatsAppJourneySendNode: Schema.Struct<{
4507
4536
  readonly customField: Schema.String;
4508
4537
  }>]>>>;
4509
4538
  readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
4539
+ readonly pinnedRegistration: Schema.optionalKey<Schema.Struct<{
4540
+ readonly registrationId: Schema.brand<Schema.String, "TemplateRegistrationId">;
4541
+ readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
4542
+ }>>;
4543
+ readonly eventBindings: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
4510
4544
  }>;
4511
4545
  readonly next: Schema.Tuple<readonly [Schema.Struct<{
4512
4546
  readonly nodeId: Schema.String;
@@ -4554,7 +4588,7 @@ export declare const JourneyCondition: Schema.Struct<{
4554
4588
  }>]>;
4555
4589
  }>, Schema.Struct<{
4556
4590
  readonly type: Schema.Literal<"event">;
4557
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
4591
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
4558
4592
  readonly occurred: Schema.Boolean;
4559
4593
  }>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
4560
4594
  readonly type: Schema.Literal<"tag">;
@@ -4592,7 +4626,7 @@ export declare const JourneyCondition: Schema.Struct<{
4592
4626
  }>]>;
4593
4627
  }>, Schema.Struct<{
4594
4628
  readonly type: Schema.Literal<"event">;
4595
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
4629
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
4596
4630
  readonly occurred: Schema.Boolean;
4597
4631
  }>]>]>;
4598
4632
  }>;
@@ -4602,13 +4636,13 @@ export type AgentDefinition = {
4602
4636
  readonly knowledgeSourceIds?: ReadonlyArray<KnowledgeSourceId>;
4603
4637
  readonly endpointIds: ReadonlyArray<MailboxEndpointId>;
4604
4638
  readonly integrations: ReadonlyArray<AgentIntegrationGrant>;
4605
- readonly eventTriggers?: ReadonlyArray<string>;
4606
- readonly followUpTemplate?: TemplateId | string;
4607
4639
  readonly policy: PolicyConfiguration;
4608
4640
  readonly model: AgentModelChoice;
4609
4641
  readonly reasoning: AgentReasoning;
4610
4642
  readonly workingHours: WorkingHours | null;
4611
4643
  readonly takeoverTimeoutMinutes: number;
4644
+ readonly eventTriggers?: ReadonlyArray<string>;
4645
+ readonly followUpTemplate?: TemplateId | string;
4612
4646
  };
4613
4647
  export declare const AgentDefinition: Schema.Struct<{
4614
4648
  readonly instructions: Schema.String;
@@ -4627,8 +4661,6 @@ export declare const AgentDefinition: Schema.Struct<{
4627
4661
  readonly names: Schema.$Array<Schema.String>;
4628
4662
  }>]>;
4629
4663
  }>>;
4630
- readonly eventTriggers: Schema.optionalKey<Schema.$Array<Schema.String>>;
4631
- readonly followUpTemplate: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>>;
4632
4664
  readonly policy: Schema.Struct<{
4633
4665
  readonly presets: Schema.$Array<Schema.String>;
4634
4666
  readonly rules: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
@@ -4693,23 +4725,47 @@ export declare const AgentDefinition: Schema.Struct<{
4693
4725
  }>>;
4694
4726
  }>, Schema.Null]>;
4695
4727
  readonly takeoverTimeoutMinutes: Schema.Finite;
4728
+ readonly eventTriggers: Schema.optionalKey<Schema.$Array<Schema.String>>;
4729
+ readonly followUpTemplate: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>>;
4696
4730
  }>;
4697
- export type InstallExtensionPayload = {
4698
- readonly extension: string;
4699
- readonly version?: string | null;
4700
- readonly mailboxIds?: ReadonlyArray<MailboxId> | null;
4701
- readonly namespaceId?: NamespaceId | null;
4702
- readonly permissions?: ReadonlyArray<"read" | "update" | "send" | "quarantine.read"> | null;
4703
- readonly policy?: PolicyConfiguration | null;
4704
- readonly webhookUrl?: string | null;
4705
- };
4706
- export declare const InstallExtensionPayload: Schema.Struct<{
4707
- readonly extension: Schema.String;
4708
- readonly version: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4709
- readonly mailboxIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>>;
4710
- readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
4711
- readonly permissions: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"update">, Schema.Literal<"send">, Schema.Literal<"quarantine.read">]>>, Schema.Null]>>;
4712
- readonly policy: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
4731
+ export type AgentModuleManifest = {
4732
+ readonly name: AgentName;
4733
+ readonly version: string;
4734
+ readonly knowledgeSourceIds?: ReadonlyArray<KnowledgeSourceId>;
4735
+ readonly endpointIds: ReadonlyArray<MailboxEndpointId>;
4736
+ readonly integrations: ReadonlyArray<AgentIntegrationGrant>;
4737
+ readonly policy: PolicyConfiguration;
4738
+ readonly model: AgentModelChoice;
4739
+ readonly reasoning: AgentReasoning;
4740
+ readonly workingHours: WorkingHours | null;
4741
+ readonly takeoverTimeoutMinutes: number;
4742
+ readonly eventTriggers?: ReadonlyArray<string>;
4743
+ readonly followUpTemplate?: TemplateId | string;
4744
+ readonly tools: {
4745
+ readonly [x: string]: AgentModuleTool;
4746
+ };
4747
+ readonly skills: ReadonlyArray<string>;
4748
+ readonly events: ReadonlyArray<string>;
4749
+ readonly schedules: ReadonlyArray<string>;
4750
+ };
4751
+ export declare const AgentModuleManifest: Schema.Struct<{
4752
+ readonly name: Schema.String;
4753
+ readonly version: Schema.String;
4754
+ readonly knowledgeSourceIds: Schema.optionalKey<Schema.$Array<Schema.brand<Schema.String, "KnowledgeSourceId">>>;
4755
+ readonly endpointIds: Schema.$Array<Schema.brand<Schema.String, "MailboxEndpointId">>;
4756
+ readonly integrations: Schema.$Array<Schema.Struct<{
4757
+ readonly integrationId: Schema.brand<Schema.String, "IntegrationId">;
4758
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"org">, Schema.Literal<"contact">]>>;
4759
+ readonly tools: Schema.Union<readonly [Schema.Struct<{
4760
+ readonly kind: Schema.Literal<"all">;
4761
+ }>, Schema.Struct<{
4762
+ readonly kind: Schema.Literal<"readOnly">;
4763
+ }>, Schema.Struct<{
4764
+ readonly kind: Schema.Literal<"selected">;
4765
+ readonly names: Schema.$Array<Schema.String>;
4766
+ }>]>;
4767
+ }>>;
4768
+ readonly policy: Schema.Struct<{
4713
4769
  readonly presets: Schema.$Array<Schema.String>;
4714
4770
  readonly rules: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
4715
4771
  readonly match: Schema.Struct<{
@@ -4761,8 +4817,29 @@ export declare const InstallExtensionPayload: Schema.Struct<{
4761
4817
  readonly atLeast: Schema.Union<readonly [Schema.Literal<"run">, Schema.Literal<"model">, Schema.Literal<"person">, Schema.Literal<"never">]>;
4762
4818
  }>]>>;
4763
4819
  readonly instructions: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4764
- }>, Schema.Null]>>;
4765
- readonly webhookUrl: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4820
+ }>;
4821
+ readonly model: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>, Schema.String]>;
4822
+ readonly reasoning: Schema.Union<readonly [Schema.Literal<"auto">, Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">]>;
4823
+ readonly workingHours: Schema.Union<readonly [Schema.Struct<{
4824
+ readonly timeZone: Schema.String;
4825
+ readonly ranges: Schema.$Array<Schema.Struct<{
4826
+ readonly day: Schema.Union<readonly [Schema.Literal<"monday">, Schema.Literal<"tuesday">, Schema.Literal<"wednesday">, Schema.Literal<"thursday">, Schema.Literal<"friday">, Schema.Literal<"saturday">, Schema.Literal<"sunday">]>;
4827
+ readonly opens: Schema.String;
4828
+ readonly closes: Schema.String;
4829
+ }>>;
4830
+ }>, Schema.Null]>;
4831
+ readonly takeoverTimeoutMinutes: Schema.Finite;
4832
+ readonly eventTriggers: Schema.optionalKey<Schema.$Array<Schema.String>>;
4833
+ readonly followUpTemplate: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>>;
4834
+ readonly tools: Schema.$Record<Schema.String, Schema.Struct<{
4835
+ readonly description: Schema.String;
4836
+ readonly input: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>;
4837
+ readonly approval: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"run">, Schema.Literal<"model">, Schema.Literal<"person">, Schema.Literal<"never">]>>;
4838
+ readonly replay: Schema.Union<readonly [Schema.Literal<"safe">, Schema.Literal<"unsafe">]>;
4839
+ }>>;
4840
+ readonly skills: Schema.$Array<Schema.String>;
4841
+ readonly events: Schema.$Array<Schema.String>;
4842
+ readonly schedules: Schema.$Array<Schema.String>;
4766
4843
  }>;
4767
4844
  export type WhatsAppInteractive = WhatsAppButtonsMessage | WhatsAppListMessage | WhatsAppCtaUrlMessage | WhatsAppFlowMessage;
4768
4845
  export declare const WhatsAppInteractive: Schema.Union<readonly [Schema.Struct<{
@@ -4973,7 +5050,7 @@ export declare const JourneyBranchEdge: Schema.Struct<{
4973
5050
  }>]>;
4974
5051
  }>, Schema.Struct<{
4975
5052
  readonly type: Schema.Literal<"event">;
4976
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
5053
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
4977
5054
  readonly occurred: Schema.Boolean;
4978
5055
  }>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
4979
5056
  readonly type: Schema.Literal<"tag">;
@@ -5011,7 +5088,7 @@ export declare const JourneyBranchEdge: Schema.Struct<{
5011
5088
  }>]>;
5012
5089
  }>, Schema.Struct<{
5013
5090
  readonly type: Schema.Literal<"event">;
5014
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
5091
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
5015
5092
  readonly occurred: Schema.Boolean;
5016
5093
  }>]>]>;
5017
5094
  }>>;
@@ -5043,8 +5120,6 @@ export declare const CreateAgentPayload: Schema.Struct<{
5043
5120
  readonly names: Schema.$Array<Schema.String>;
5044
5121
  }>]>;
5045
5122
  }>>;
5046
- readonly eventTriggers: Schema.optionalKey<Schema.$Array<Schema.String>>;
5047
- readonly followUpTemplate: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>>;
5048
5123
  readonly policy: Schema.Struct<{
5049
5124
  readonly presets: Schema.$Array<Schema.String>;
5050
5125
  readonly rules: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
@@ -5109,6 +5184,8 @@ export declare const CreateAgentPayload: Schema.Struct<{
5109
5184
  }>>;
5110
5185
  }>, Schema.Null]>;
5111
5186
  readonly takeoverTimeoutMinutes: Schema.Finite;
5187
+ readonly eventTriggers: Schema.optionalKey<Schema.$Array<Schema.String>>;
5188
+ readonly followUpTemplate: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>>;
5112
5189
  }>, Schema.Null]>>;
5113
5190
  }>;
5114
5191
  export type ReplaceAgentDraftPayload = {
@@ -5134,8 +5211,6 @@ export declare const ReplaceAgentDraftPayload: Schema.Struct<{
5134
5211
  readonly names: Schema.$Array<Schema.String>;
5135
5212
  }>]>;
5136
5213
  }>>;
5137
- readonly eventTriggers: Schema.optionalKey<Schema.$Array<Schema.String>>;
5138
- readonly followUpTemplate: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>>;
5139
5214
  readonly policy: Schema.Struct<{
5140
5215
  readonly presets: Schema.$Array<Schema.String>;
5141
5216
  readonly rules: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
@@ -5200,6 +5275,8 @@ export declare const ReplaceAgentDraftPayload: Schema.Struct<{
5200
5275
  }>>;
5201
5276
  }>, Schema.Null]>;
5202
5277
  readonly takeoverTimeoutMinutes: Schema.Finite;
5278
+ readonly eventTriggers: Schema.optionalKey<Schema.$Array<Schema.String>>;
5279
+ readonly followUpTemplate: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>>;
5203
5280
  }>;
5204
5281
  }>;
5205
5282
  export type RunAgentTestPayload = {
@@ -5225,8 +5302,97 @@ export declare const RunAgentTestPayload: Schema.Struct<{
5225
5302
  readonly names: Schema.$Array<Schema.String>;
5226
5303
  }>]>;
5227
5304
  }>>;
5305
+ readonly policy: Schema.Struct<{
5306
+ readonly presets: Schema.$Array<Schema.String>;
5307
+ readonly rules: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
5308
+ readonly match: Schema.Struct<{
5309
+ readonly kind: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"send">, Schema.Literal<"reply">, Schema.Literal<"toolCall">, Schema.Literal<"handoff">]>, Schema.Null]>>;
5310
+ readonly effect: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">, Schema.Literal<"final">]>, Schema.Null]>>;
5311
+ readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>, Schema.Null]>>;
5312
+ readonly integration: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5313
+ readonly tool: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5314
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"apiKey">, Schema.Literal<"member">, Schema.Literal<"extension">]>, Schema.Union<readonly [Schema.Struct<{
5315
+ readonly kind: Schema.Literal<"agent">;
5316
+ readonly id: Schema.brand<Schema.String, "AgentId">;
5317
+ }>, Schema.Struct<{
5318
+ readonly kind: Schema.Literal<"apiKey">;
5319
+ readonly id: Schema.brand<Schema.String, "ApiKeyId">;
5320
+ }>, Schema.Struct<{
5321
+ readonly kind: Schema.Literal<"member">;
5322
+ readonly userId: Schema.brand<Schema.String, "UserId">;
5323
+ }>, Schema.Struct<{
5324
+ readonly kind: Schema.Literal<"extension">;
5325
+ readonly id: Schema.brand<Schema.String, "ExtensionInstallationId">;
5326
+ }>]>, Schema.Null]>>;
5327
+ }>;
5328
+ readonly note: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5329
+ readonly decide: Schema.Union<readonly [Schema.Literal<"run">, Schema.Literal<"model">, Schema.Literal<"person">, Schema.Literal<"never">]>;
5330
+ readonly atLeast: Schema.optionalKey<Schema.Union<readonly [Schema.Never, Schema.Null]>>;
5331
+ }>, Schema.Struct<{
5332
+ readonly match: Schema.Struct<{
5333
+ readonly kind: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"send">, Schema.Literal<"reply">, Schema.Literal<"toolCall">, Schema.Literal<"handoff">]>, Schema.Null]>>;
5334
+ readonly effect: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">, Schema.Literal<"final">]>, Schema.Null]>>;
5335
+ readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>, Schema.Null]>>;
5336
+ readonly integration: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5337
+ readonly tool: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5338
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"apiKey">, Schema.Literal<"member">, Schema.Literal<"extension">]>, Schema.Union<readonly [Schema.Struct<{
5339
+ readonly kind: Schema.Literal<"agent">;
5340
+ readonly id: Schema.brand<Schema.String, "AgentId">;
5341
+ }>, Schema.Struct<{
5342
+ readonly kind: Schema.Literal<"apiKey">;
5343
+ readonly id: Schema.brand<Schema.String, "ApiKeyId">;
5344
+ }>, Schema.Struct<{
5345
+ readonly kind: Schema.Literal<"member">;
5346
+ readonly userId: Schema.brand<Schema.String, "UserId">;
5347
+ }>, Schema.Struct<{
5348
+ readonly kind: Schema.Literal<"extension">;
5349
+ readonly id: Schema.brand<Schema.String, "ExtensionInstallationId">;
5350
+ }>]>, Schema.Null]>>;
5351
+ }>;
5352
+ readonly note: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5353
+ readonly decide: Schema.optionalKey<Schema.Union<readonly [Schema.Never, Schema.Null]>>;
5354
+ readonly atLeast: Schema.Union<readonly [Schema.Literal<"run">, Schema.Literal<"model">, Schema.Literal<"person">, Schema.Literal<"never">]>;
5355
+ }>]>>;
5356
+ readonly instructions: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5357
+ }>;
5358
+ readonly model: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>, Schema.String]>;
5359
+ readonly reasoning: Schema.Union<readonly [Schema.Literal<"auto">, Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">]>;
5360
+ readonly workingHours: Schema.Union<readonly [Schema.Struct<{
5361
+ readonly timeZone: Schema.String;
5362
+ readonly ranges: Schema.$Array<Schema.Struct<{
5363
+ readonly day: Schema.Union<readonly [Schema.Literal<"monday">, Schema.Literal<"tuesday">, Schema.Literal<"wednesday">, Schema.Literal<"thursday">, Schema.Literal<"friday">, Schema.Literal<"saturday">, Schema.Literal<"sunday">]>;
5364
+ readonly opens: Schema.String;
5365
+ readonly closes: Schema.String;
5366
+ }>>;
5367
+ }>, Schema.Null]>;
5368
+ readonly takeoverTimeoutMinutes: Schema.Finite;
5228
5369
  readonly eventTriggers: Schema.optionalKey<Schema.$Array<Schema.String>>;
5229
5370
  readonly followUpTemplate: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>>;
5371
+ }>;
5372
+ }>;
5373
+ export type AgentModuleBundle = {
5374
+ readonly source: string;
5375
+ readonly manifest: AgentModuleManifest;
5376
+ };
5377
+ export declare const AgentModuleBundle: Schema.Struct<{
5378
+ readonly source: Schema.String;
5379
+ readonly manifest: Schema.Struct<{
5380
+ readonly name: Schema.String;
5381
+ readonly version: Schema.String;
5382
+ readonly knowledgeSourceIds: Schema.optionalKey<Schema.$Array<Schema.brand<Schema.String, "KnowledgeSourceId">>>;
5383
+ readonly endpointIds: Schema.$Array<Schema.brand<Schema.String, "MailboxEndpointId">>;
5384
+ readonly integrations: Schema.$Array<Schema.Struct<{
5385
+ readonly integrationId: Schema.brand<Schema.String, "IntegrationId">;
5386
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"org">, Schema.Literal<"contact">]>>;
5387
+ readonly tools: Schema.Union<readonly [Schema.Struct<{
5388
+ readonly kind: Schema.Literal<"all">;
5389
+ }>, Schema.Struct<{
5390
+ readonly kind: Schema.Literal<"readOnly">;
5391
+ }>, Schema.Struct<{
5392
+ readonly kind: Schema.Literal<"selected">;
5393
+ readonly names: Schema.$Array<Schema.String>;
5394
+ }>]>;
5395
+ }>>;
5230
5396
  readonly policy: Schema.Struct<{
5231
5397
  readonly presets: Schema.$Array<Schema.String>;
5232
5398
  readonly rules: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
@@ -5291,6 +5457,17 @@ export declare const RunAgentTestPayload: Schema.Struct<{
5291
5457
  }>>;
5292
5458
  }>, Schema.Null]>;
5293
5459
  readonly takeoverTimeoutMinutes: Schema.Finite;
5460
+ readonly eventTriggers: Schema.optionalKey<Schema.$Array<Schema.String>>;
5461
+ readonly followUpTemplate: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>>;
5462
+ readonly tools: Schema.$Record<Schema.String, Schema.Struct<{
5463
+ readonly description: Schema.String;
5464
+ readonly input: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>;
5465
+ readonly approval: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"run">, Schema.Literal<"model">, Schema.Literal<"person">, Schema.Literal<"never">]>>;
5466
+ readonly replay: Schema.Union<readonly [Schema.Literal<"safe">, Schema.Literal<"unsafe">]>;
5467
+ }>>;
5468
+ readonly skills: Schema.$Array<Schema.String>;
5469
+ readonly events: Schema.$Array<Schema.String>;
5470
+ readonly schedules: Schema.$Array<Schema.String>;
5294
5471
  }>;
5295
5472
  }>;
5296
5473
  export type WhatsAppInteractiveContent = {
@@ -5524,7 +5701,7 @@ export declare const JourneyBranchNode: Schema.Struct<{
5524
5701
  }>]>;
5525
5702
  }>, Schema.Struct<{
5526
5703
  readonly type: Schema.Literal<"event">;
5527
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
5704
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
5528
5705
  readonly occurred: Schema.Boolean;
5529
5706
  }>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
5530
5707
  readonly type: Schema.Literal<"tag">;
@@ -5562,12 +5739,115 @@ export declare const JourneyBranchNode: Schema.Struct<{
5562
5739
  }>]>;
5563
5740
  }>, Schema.Struct<{
5564
5741
  readonly type: Schema.Literal<"event">;
5565
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
5742
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
5566
5743
  readonly occurred: Schema.Boolean;
5567
5744
  }>]>]>;
5568
5745
  }>>;
5569
5746
  }>>;
5570
5747
  }>;
5748
+ export type PublishAgentVersionPayload = {
5749
+ readonly revision: string;
5750
+ readonly bundle: AgentModuleBundle;
5751
+ };
5752
+ export declare const PublishAgentVersionPayload: Schema.Struct<{
5753
+ readonly revision: Schema.String;
5754
+ readonly bundle: Schema.Struct<{
5755
+ readonly source: Schema.String;
5756
+ readonly manifest: Schema.Struct<{
5757
+ readonly name: Schema.String;
5758
+ readonly version: Schema.String;
5759
+ readonly knowledgeSourceIds: Schema.optionalKey<Schema.$Array<Schema.brand<Schema.String, "KnowledgeSourceId">>>;
5760
+ readonly endpointIds: Schema.$Array<Schema.brand<Schema.String, "MailboxEndpointId">>;
5761
+ readonly integrations: Schema.$Array<Schema.Struct<{
5762
+ readonly integrationId: Schema.brand<Schema.String, "IntegrationId">;
5763
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"org">, Schema.Literal<"contact">]>>;
5764
+ readonly tools: Schema.Union<readonly [Schema.Struct<{
5765
+ readonly kind: Schema.Literal<"all">;
5766
+ }>, Schema.Struct<{
5767
+ readonly kind: Schema.Literal<"readOnly">;
5768
+ }>, Schema.Struct<{
5769
+ readonly kind: Schema.Literal<"selected">;
5770
+ readonly names: Schema.$Array<Schema.String>;
5771
+ }>]>;
5772
+ }>>;
5773
+ readonly policy: Schema.Struct<{
5774
+ readonly presets: Schema.$Array<Schema.String>;
5775
+ readonly rules: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
5776
+ readonly match: Schema.Struct<{
5777
+ readonly kind: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"send">, Schema.Literal<"reply">, Schema.Literal<"toolCall">, Schema.Literal<"handoff">]>, Schema.Null]>>;
5778
+ readonly effect: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">, Schema.Literal<"final">]>, Schema.Null]>>;
5779
+ readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>, Schema.Null]>>;
5780
+ readonly integration: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5781
+ readonly tool: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5782
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"apiKey">, Schema.Literal<"member">, Schema.Literal<"extension">]>, Schema.Union<readonly [Schema.Struct<{
5783
+ readonly kind: Schema.Literal<"agent">;
5784
+ readonly id: Schema.brand<Schema.String, "AgentId">;
5785
+ }>, Schema.Struct<{
5786
+ readonly kind: Schema.Literal<"apiKey">;
5787
+ readonly id: Schema.brand<Schema.String, "ApiKeyId">;
5788
+ }>, Schema.Struct<{
5789
+ readonly kind: Schema.Literal<"member">;
5790
+ readonly userId: Schema.brand<Schema.String, "UserId">;
5791
+ }>, Schema.Struct<{
5792
+ readonly kind: Schema.Literal<"extension">;
5793
+ readonly id: Schema.brand<Schema.String, "ExtensionInstallationId">;
5794
+ }>]>, Schema.Null]>>;
5795
+ }>;
5796
+ readonly note: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5797
+ readonly decide: Schema.Union<readonly [Schema.Literal<"run">, Schema.Literal<"model">, Schema.Literal<"person">, Schema.Literal<"never">]>;
5798
+ readonly atLeast: Schema.optionalKey<Schema.Union<readonly [Schema.Never, Schema.Null]>>;
5799
+ }>, Schema.Struct<{
5800
+ readonly match: Schema.Struct<{
5801
+ readonly kind: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"send">, Schema.Literal<"reply">, Schema.Literal<"toolCall">, Schema.Literal<"handoff">]>, Schema.Null]>>;
5802
+ readonly effect: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">, Schema.Literal<"final">]>, Schema.Null]>>;
5803
+ readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>, Schema.Null]>>;
5804
+ readonly integration: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5805
+ readonly tool: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5806
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"apiKey">, Schema.Literal<"member">, Schema.Literal<"extension">]>, Schema.Union<readonly [Schema.Struct<{
5807
+ readonly kind: Schema.Literal<"agent">;
5808
+ readonly id: Schema.brand<Schema.String, "AgentId">;
5809
+ }>, Schema.Struct<{
5810
+ readonly kind: Schema.Literal<"apiKey">;
5811
+ readonly id: Schema.brand<Schema.String, "ApiKeyId">;
5812
+ }>, Schema.Struct<{
5813
+ readonly kind: Schema.Literal<"member">;
5814
+ readonly userId: Schema.brand<Schema.String, "UserId">;
5815
+ }>, Schema.Struct<{
5816
+ readonly kind: Schema.Literal<"extension">;
5817
+ readonly id: Schema.brand<Schema.String, "ExtensionInstallationId">;
5818
+ }>]>, Schema.Null]>>;
5819
+ }>;
5820
+ readonly note: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5821
+ readonly decide: Schema.optionalKey<Schema.Union<readonly [Schema.Never, Schema.Null]>>;
5822
+ readonly atLeast: Schema.Union<readonly [Schema.Literal<"run">, Schema.Literal<"model">, Schema.Literal<"person">, Schema.Literal<"never">]>;
5823
+ }>]>>;
5824
+ readonly instructions: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5825
+ }>;
5826
+ readonly model: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>, Schema.String]>;
5827
+ readonly reasoning: Schema.Union<readonly [Schema.Literal<"auto">, Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">]>;
5828
+ readonly workingHours: Schema.Union<readonly [Schema.Struct<{
5829
+ readonly timeZone: Schema.String;
5830
+ readonly ranges: Schema.$Array<Schema.Struct<{
5831
+ readonly day: Schema.Union<readonly [Schema.Literal<"monday">, Schema.Literal<"tuesday">, Schema.Literal<"wednesday">, Schema.Literal<"thursday">, Schema.Literal<"friday">, Schema.Literal<"saturday">, Schema.Literal<"sunday">]>;
5832
+ readonly opens: Schema.String;
5833
+ readonly closes: Schema.String;
5834
+ }>>;
5835
+ }>, Schema.Null]>;
5836
+ readonly takeoverTimeoutMinutes: Schema.Finite;
5837
+ readonly eventTriggers: Schema.optionalKey<Schema.$Array<Schema.String>>;
5838
+ readonly followUpTemplate: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>>;
5839
+ readonly tools: Schema.$Record<Schema.String, Schema.Struct<{
5840
+ readonly description: Schema.String;
5841
+ readonly input: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>;
5842
+ readonly approval: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"run">, Schema.Literal<"model">, Schema.Literal<"person">, Schema.Literal<"never">]>>;
5843
+ readonly replay: Schema.Union<readonly [Schema.Literal<"safe">, Schema.Literal<"unsafe">]>;
5844
+ }>>;
5845
+ readonly skills: Schema.$Array<Schema.String>;
5846
+ readonly events: Schema.$Array<Schema.String>;
5847
+ readonly schedules: Schema.$Array<Schema.String>;
5848
+ }>;
5849
+ }>;
5850
+ }>;
5571
5851
  export type WhatsAppContent = WhatsAppTextContent | WhatsAppTemplateIdContent | WhatsAppTemplateSlugContent | WhatsAppMediaContent | WhatsAppInteractiveContent | WhatsAppReactionContent | WhatsAppLocationContent | WhatsAppContactsContent;
5572
5852
  export declare const WhatsAppContent: Schema.Union<readonly [Schema.Struct<{
5573
5853
  readonly text: Schema.String;
@@ -5771,6 +6051,7 @@ export declare const JourneyNode: Schema.Union<readonly [Schema.Struct<{
5771
6051
  readonly type: Schema.Literal<"send_email">;
5772
6052
  readonly config: Schema.Struct<{
5773
6053
  readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
6054
+ readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
5774
6055
  readonly senderId: Schema.optionalKey<Schema.brand<Schema.String, "EmailSenderId">>;
5775
6056
  readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
5776
6057
  }>;
@@ -5788,6 +6069,11 @@ export declare const JourneyNode: Schema.Union<readonly [Schema.Struct<{
5788
6069
  readonly customField: Schema.String;
5789
6070
  }>]>>>;
5790
6071
  readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
6072
+ readonly pinnedRegistration: Schema.optionalKey<Schema.Struct<{
6073
+ readonly registrationId: Schema.brand<Schema.String, "TemplateRegistrationId">;
6074
+ readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
6075
+ }>>;
6076
+ readonly eventBindings: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
5791
6077
  }>;
5792
6078
  readonly next: Schema.Tuple<readonly [Schema.Struct<{
5793
6079
  readonly nodeId: Schema.String;
@@ -5803,7 +6089,7 @@ export declare const JourneyNode: Schema.Union<readonly [Schema.Struct<{
5803
6089
  }>, Schema.Struct<{
5804
6090
  readonly type: Schema.Literal<"wait_for_event">;
5805
6091
  readonly config: Schema.Struct<{
5806
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
6092
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
5807
6093
  readonly timeoutSeconds: Schema.Finite;
5808
6094
  }>;
5809
6095
  readonly next: Schema.Tuple<readonly [Schema.Struct<{
@@ -5856,7 +6142,7 @@ export declare const JourneyNode: Schema.Union<readonly [Schema.Struct<{
5856
6142
  }>]>;
5857
6143
  }>, Schema.Struct<{
5858
6144
  readonly type: Schema.Literal<"event">;
5859
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
6145
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
5860
6146
  readonly occurred: Schema.Boolean;
5861
6147
  }>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
5862
6148
  readonly type: Schema.Literal<"tag">;
@@ -5894,7 +6180,7 @@ export declare const JourneyNode: Schema.Union<readonly [Schema.Struct<{
5894
6180
  }>]>;
5895
6181
  }>, Schema.Struct<{
5896
6182
  readonly type: Schema.Literal<"event">;
5897
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
6183
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
5898
6184
  readonly occurred: Schema.Boolean;
5899
6185
  }>]>]>;
5900
6186
  }>>;
@@ -6145,6 +6431,10 @@ export type JourneyDefinition = {
6145
6431
  };
6146
6432
  readonly goal?: JourneyGoal;
6147
6433
  readonly reentry?: boolean;
6434
+ readonly enrollment?: {
6435
+ readonly type: "shopify_order";
6436
+ readonly shop: ShopifyShop;
6437
+ };
6148
6438
  };
6149
6439
  export declare const JourneyDefinition: Schema.Struct<{
6150
6440
  readonly trigger: Schema.Union<readonly [Schema.Struct<{
@@ -6164,6 +6454,7 @@ export declare const JourneyDefinition: Schema.Struct<{
6164
6454
  readonly type: Schema.Literal<"send_email">;
6165
6455
  readonly config: Schema.Struct<{
6166
6456
  readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
6457
+ readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
6167
6458
  readonly senderId: Schema.optionalKey<Schema.brand<Schema.String, "EmailSenderId">>;
6168
6459
  readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
6169
6460
  }>;
@@ -6181,6 +6472,11 @@ export declare const JourneyDefinition: Schema.Struct<{
6181
6472
  readonly customField: Schema.String;
6182
6473
  }>]>>>;
6183
6474
  readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
6475
+ readonly pinnedRegistration: Schema.optionalKey<Schema.Struct<{
6476
+ readonly registrationId: Schema.brand<Schema.String, "TemplateRegistrationId">;
6477
+ readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
6478
+ }>>;
6479
+ readonly eventBindings: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
6184
6480
  }>;
6185
6481
  readonly next: Schema.Tuple<readonly [Schema.Struct<{
6186
6482
  readonly nodeId: Schema.String;
@@ -6196,7 +6492,7 @@ export declare const JourneyDefinition: Schema.Struct<{
6196
6492
  }>, Schema.Struct<{
6197
6493
  readonly type: Schema.Literal<"wait_for_event">;
6198
6494
  readonly config: Schema.Struct<{
6199
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
6495
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
6200
6496
  readonly timeoutSeconds: Schema.Finite;
6201
6497
  }>;
6202
6498
  readonly next: Schema.Tuple<readonly [Schema.Struct<{
@@ -6249,7 +6545,7 @@ export declare const JourneyDefinition: Schema.Struct<{
6249
6545
  }>]>;
6250
6546
  }>, Schema.Struct<{
6251
6547
  readonly type: Schema.Literal<"event">;
6252
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
6548
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
6253
6549
  readonly occurred: Schema.Boolean;
6254
6550
  }>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
6255
6551
  readonly type: Schema.Literal<"tag">;
@@ -6287,7 +6583,7 @@ export declare const JourneyDefinition: Schema.Struct<{
6287
6583
  }>]>;
6288
6584
  }>, Schema.Struct<{
6289
6585
  readonly type: Schema.Literal<"event">;
6290
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
6586
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
6291
6587
  readonly occurred: Schema.Boolean;
6292
6588
  }>]>]>;
6293
6589
  }>>;
@@ -6315,9 +6611,13 @@ export declare const JourneyDefinition: Schema.Struct<{
6315
6611
  readonly next: Schema.Tuple<readonly []>;
6316
6612
  }>]>>;
6317
6613
  readonly goal: Schema.optionalKey<Schema.Struct<{
6318
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
6614
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
6319
6615
  }>>;
6320
6616
  readonly reentry: Schema.optionalKey<Schema.Boolean>;
6617
+ readonly enrollment: Schema.optionalKey<Schema.Struct<{
6618
+ readonly type: Schema.Literal<"shopify_order">;
6619
+ readonly shop: Schema.String;
6620
+ }>>;
6321
6621
  }>;
6322
6622
  export type SendMessagePayload = EmailSendMessagePayload | SmsSendMessagePayload | WhatsAppSendMessagePayload;
6323
6623
  export declare const SendMessagePayload: Schema.Union<readonly [Schema.Struct<{
@@ -6629,6 +6929,7 @@ export declare const CreateJourneyPayload: Schema.Struct<{
6629
6929
  readonly type: Schema.Literal<"send_email">;
6630
6930
  readonly config: Schema.Struct<{
6631
6931
  readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
6932
+ readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
6632
6933
  readonly senderId: Schema.optionalKey<Schema.brand<Schema.String, "EmailSenderId">>;
6633
6934
  readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
6634
6935
  }>;
@@ -6646,6 +6947,11 @@ export declare const CreateJourneyPayload: Schema.Struct<{
6646
6947
  readonly customField: Schema.String;
6647
6948
  }>]>>>;
6648
6949
  readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
6950
+ readonly pinnedRegistration: Schema.optionalKey<Schema.Struct<{
6951
+ readonly registrationId: Schema.brand<Schema.String, "TemplateRegistrationId">;
6952
+ readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
6953
+ }>>;
6954
+ readonly eventBindings: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
6649
6955
  }>;
6650
6956
  readonly next: Schema.Tuple<readonly [Schema.Struct<{
6651
6957
  readonly nodeId: Schema.String;
@@ -6661,7 +6967,7 @@ export declare const CreateJourneyPayload: Schema.Struct<{
6661
6967
  }>, Schema.Struct<{
6662
6968
  readonly type: Schema.Literal<"wait_for_event">;
6663
6969
  readonly config: Schema.Struct<{
6664
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
6970
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
6665
6971
  readonly timeoutSeconds: Schema.Finite;
6666
6972
  }>;
6667
6973
  readonly next: Schema.Tuple<readonly [Schema.Struct<{
@@ -6714,7 +7020,7 @@ export declare const CreateJourneyPayload: Schema.Struct<{
6714
7020
  }>]>;
6715
7021
  }>, Schema.Struct<{
6716
7022
  readonly type: Schema.Literal<"event">;
6717
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
7023
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
6718
7024
  readonly occurred: Schema.Boolean;
6719
7025
  }>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
6720
7026
  readonly type: Schema.Literal<"tag">;
@@ -6752,7 +7058,7 @@ export declare const CreateJourneyPayload: Schema.Struct<{
6752
7058
  }>]>;
6753
7059
  }>, Schema.Struct<{
6754
7060
  readonly type: Schema.Literal<"event">;
6755
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
7061
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
6756
7062
  readonly occurred: Schema.Boolean;
6757
7063
  }>]>]>;
6758
7064
  }>>;
@@ -6780,9 +7086,13 @@ export declare const CreateJourneyPayload: Schema.Struct<{
6780
7086
  readonly next: Schema.Tuple<readonly []>;
6781
7087
  }>]>>;
6782
7088
  readonly goal: Schema.optionalKey<Schema.Struct<{
6783
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
7089
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
6784
7090
  }>>;
6785
7091
  readonly reentry: Schema.optionalKey<Schema.Boolean>;
7092
+ readonly enrollment: Schema.optionalKey<Schema.Struct<{
7093
+ readonly type: Schema.Literal<"shopify_order">;
7094
+ readonly shop: Schema.String;
7095
+ }>>;
6786
7096
  }>;
6787
7097
  }>;
6788
7098
  export type ReplaceJourneyDraftPayload = {
@@ -6809,6 +7119,7 @@ export declare const ReplaceJourneyDraftPayload: Schema.Struct<{
6809
7119
  readonly type: Schema.Literal<"send_email">;
6810
7120
  readonly config: Schema.Struct<{
6811
7121
  readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
7122
+ readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
6812
7123
  readonly senderId: Schema.optionalKey<Schema.brand<Schema.String, "EmailSenderId">>;
6813
7124
  readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
6814
7125
  }>;
@@ -6826,6 +7137,11 @@ export declare const ReplaceJourneyDraftPayload: Schema.Struct<{
6826
7137
  readonly customField: Schema.String;
6827
7138
  }>]>>>;
6828
7139
  readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
7140
+ readonly pinnedRegistration: Schema.optionalKey<Schema.Struct<{
7141
+ readonly registrationId: Schema.brand<Schema.String, "TemplateRegistrationId">;
7142
+ readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
7143
+ }>>;
7144
+ readonly eventBindings: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
6829
7145
  }>;
6830
7146
  readonly next: Schema.Tuple<readonly [Schema.Struct<{
6831
7147
  readonly nodeId: Schema.String;
@@ -6841,7 +7157,7 @@ export declare const ReplaceJourneyDraftPayload: Schema.Struct<{
6841
7157
  }>, Schema.Struct<{
6842
7158
  readonly type: Schema.Literal<"wait_for_event">;
6843
7159
  readonly config: Schema.Struct<{
6844
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
7160
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
6845
7161
  readonly timeoutSeconds: Schema.Finite;
6846
7162
  }>;
6847
7163
  readonly next: Schema.Tuple<readonly [Schema.Struct<{
@@ -6894,7 +7210,7 @@ export declare const ReplaceJourneyDraftPayload: Schema.Struct<{
6894
7210
  }>]>;
6895
7211
  }>, Schema.Struct<{
6896
7212
  readonly type: Schema.Literal<"event">;
6897
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
7213
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
6898
7214
  readonly occurred: Schema.Boolean;
6899
7215
  }>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
6900
7216
  readonly type: Schema.Literal<"tag">;
@@ -6932,7 +7248,7 @@ export declare const ReplaceJourneyDraftPayload: Schema.Struct<{
6932
7248
  }>]>;
6933
7249
  }>, Schema.Struct<{
6934
7250
  readonly type: Schema.Literal<"event">;
6935
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
7251
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
6936
7252
  readonly occurred: Schema.Boolean;
6937
7253
  }>]>]>;
6938
7254
  }>>;
@@ -6960,9 +7276,13 @@ export declare const ReplaceJourneyDraftPayload: Schema.Struct<{
6960
7276
  readonly next: Schema.Tuple<readonly []>;
6961
7277
  }>]>>;
6962
7278
  readonly goal: Schema.optionalKey<Schema.Struct<{
6963
- readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
7279
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
6964
7280
  }>>;
6965
7281
  readonly reentry: Schema.optionalKey<Schema.Boolean>;
7282
+ readonly enrollment: Schema.optionalKey<Schema.Struct<{
7283
+ readonly type: Schema.Literal<"shopify_order">;
7284
+ readonly shop: Schema.String;
7285
+ }>>;
6966
7286
  }>;
6967
7287
  }>;
6968
7288
  export { __SamvaRuntimeAbsoluteInstant, __SamvaRuntimeSensitiveString, __SamvaRuntimeNonEmptySensitiveString, };