samva 0.33.0 → 0.35.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 (117) hide show
  1. package/README.md +1 -1
  2. package/dist/client/sdk.gen.d.ts +225 -251
  3. package/dist/client/sdk.gen.js +85 -211
  4. package/dist/client/types.gen.d.ts +2897 -403
  5. package/dist/effect/agents.d.ts +28 -13
  6. package/dist/effect/agents.js +5 -1
  7. package/dist/effect/analytics.d.ts +15 -15
  8. package/dist/effect/api-keys.d.ts +27 -18
  9. package/dist/effect/campaigns.d.ts +721 -65
  10. package/dist/effect/categories.d.ts +3 -3
  11. package/dist/effect/contact-groups.d.ts +15 -15
  12. package/dist/effect/contacts.d.ts +56 -52
  13. package/dist/effect/conversations.d.ts +45 -45
  14. package/dist/effect/email.d.ts +82 -82
  15. package/dist/effect/errors.d.ts +1 -1
  16. package/dist/effect/errors.js +2 -2
  17. package/dist/effect/extension-installations.d.ts +11 -11
  18. package/dist/effect/extensions.d.ts +16 -16
  19. package/dist/effect/generated/agents.d.ts +1063 -33
  20. package/dist/effect/generated/agents.js +133 -11
  21. package/dist/effect/generated/analytics.d.ts +109 -136
  22. package/dist/effect/generated/analytics.js +65 -36
  23. package/dist/effect/generated/api-keys.d.ts +240 -19
  24. package/dist/effect/generated/api-keys.js +24 -8
  25. package/dist/effect/generated/attachments.d.ts +89 -1
  26. package/dist/effect/generated/attachments.js +10 -2
  27. package/dist/effect/generated/brands.d.ts +133 -1
  28. package/dist/effect/generated/brands.js +22 -10
  29. package/dist/effect/generated/campaigns.d.ts +1442 -140
  30. package/dist/effect/generated/campaigns.js +82 -20
  31. package/dist/effect/generated/contact-events.d.ts +26 -4
  32. package/dist/effect/generated/contact-events.js +5 -3
  33. package/dist/effect/generated/contact-groups.d.ts +233 -13
  34. package/dist/effect/generated/contact-groups.js +33 -17
  35. package/dist/effect/generated/contacts.d.ts +634 -96
  36. package/dist/effect/generated/contacts.js +82 -20
  37. package/dist/effect/generated/conversations.d.ts +398 -106
  38. package/dist/effect/generated/conversations.js +96 -22
  39. package/dist/effect/generated/custom-fields.d.ts +89 -1
  40. package/dist/effect/generated/custom-fields.js +11 -3
  41. package/dist/effect/generated/email.d.ts +1447 -83
  42. package/dist/effect/generated/email.js +167 -43
  43. package/dist/effect/generated/events.d.ts +51 -7
  44. package/dist/effect/generated/events.js +9 -5
  45. package/dist/effect/generated/extension-installations.d.ts +208 -10
  46. package/dist/effect/generated/extension-installations.js +26 -8
  47. package/dist/effect/generated/extensions.d.ts +123 -13
  48. package/dist/effect/generated/extensions.js +20 -10
  49. package/dist/effect/generated/feedback.d.ts +23 -1
  50. package/dist/effect/generated/feedback.js +6 -4
  51. package/dist/effect/generated/journeys.d.ts +684 -16
  52. package/dist/effect/generated/journeys.js +37 -9
  53. package/dist/effect/generated/mailboxes.d.ts +3085 -627
  54. package/dist/effect/generated/mailboxes.js +340 -141
  55. package/dist/effect/generated/media.d.ts +125 -15
  56. package/dist/effect/generated/media.js +15 -2
  57. package/dist/effect/generated/messages.d.ts +2036 -117
  58. package/dist/effect/generated/messages.js +286 -54
  59. package/dist/effect/generated/namespaces.d.ts +209 -25
  60. package/dist/effect/generated/namespaces.js +27 -9
  61. package/dist/effect/generated/newsletter-domains.d.ts +98 -12
  62. package/dist/effect/generated/newsletter-domains.js +20 -13
  63. package/dist/effect/generated/newsletter-issues.d.ts +354 -19
  64. package/dist/effect/generated/newsletter-issues.js +162 -98
  65. package/dist/effect/generated/newsletters.d.ts +123 -13
  66. package/dist/effect/generated/newsletters.js +19 -9
  67. package/dist/effect/generated/operations.d.ts +76 -10
  68. package/dist/effect/generated/operations.js +12 -6
  69. package/dist/effect/generated/organizations.d.ts +287 -7
  70. package/dist/effect/generated/organizations.js +33 -5
  71. package/dist/effect/generated/scheduled-messages.d.ts +4427 -99
  72. package/dist/effect/generated/scheduled-messages.js +71 -12
  73. package/dist/effect/generated/shared.d.ts +2213 -190
  74. package/dist/effect/generated/shared.js +527 -76
  75. package/dist/effect/generated/subscriptions.d.ts +23 -1
  76. package/dist/effect/generated/subscriptions.js +6 -4
  77. package/dist/effect/generated/templates.d.ts +1718 -136
  78. package/dist/effect/generated/templates.js +421 -226
  79. package/dist/effect/generated/topic-forms.d.ts +111 -1
  80. package/dist/effect/generated/topic-forms.js +23 -13
  81. package/dist/effect/generated/topics.d.ts +353 -43
  82. package/dist/effect/generated/topics.js +67 -19
  83. package/dist/effect/generated/webhooks.d.ts +308 -46
  84. package/dist/effect/generated/webhooks.js +67 -19
  85. package/dist/effect/generated/whoami.d.ts +35 -1
  86. package/dist/effect/generated/whoami.js +4 -2
  87. package/dist/effect/generated-metadata.d.ts +20 -0
  88. package/dist/effect/generated-metadata.js +10 -0
  89. package/dist/effect/index.js +2 -2
  90. package/dist/effect/internal/client.js +1 -1
  91. package/dist/effect/internal/email-sender.d.ts +1 -1
  92. package/dist/effect/internal/send.d.ts +1 -1
  93. package/dist/effect/journeys.d.ts +105 -19
  94. package/dist/effect/mailboxes.d.ts +405 -174
  95. package/dist/effect/media.d.ts +1 -1
  96. package/dist/effect/messages.d.ts +40 -40
  97. package/dist/effect/namespaces.d.ts +15 -15
  98. package/dist/effect/newsletter-domains.d.ts +5 -5
  99. package/dist/effect/newsletters.d.ts +1 -1
  100. package/dist/effect/operations.d.ts +11 -11
  101. package/dist/effect/organizations.d.ts +2 -2
  102. package/dist/effect/scheduled-messages.d.ts +863 -8
  103. package/dist/effect/templates.d.ts +37 -37
  104. package/dist/effect/topics.d.ts +21 -21
  105. package/dist/effect/webhooks.d.ts +28 -26
  106. package/dist/index.js +2 -2
  107. package/dist/normalize.js +13 -1
  108. package/dist/package.js +1 -1
  109. package/dist/promises/client.d.ts +1 -1
  110. package/dist/promises/client.js +2 -2
  111. package/dist/promises/errors.gen.d.ts +22 -2
  112. package/dist/promises/errors.gen.js +60 -2
  113. package/dist/promises/index.js +2 -2
  114. package/dist/promises/types.gen.d.ts +1 -1
  115. package/dist/service-map.d.ts +9 -0
  116. package/dist/service-map.js +5 -0
  117. package/package.json +9 -8
@@ -3,11 +3,14 @@ import { HttpApiMiddleware, HttpApiSecurity } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
4
  // src/effect/generated/shared.ts
5
5
  const JsonValue = Schema.suspend(() => __recursive_JsonValue);
6
- const Cursor = /* @__PURE__ */ (() => Schema.String.annotate({ identifier: "Cursor" }))();
7
- const NamespaceId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
6
+ const NamespaceId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
8
7
  expected: "a string matching the RegExp ^ns_[0-9a-hjkmnp-tv-z]{16,24}$",
9
8
  identifier: "NamespaceId"
10
9
  })).pipe(Schema.brand("NamespaceId")))();
10
+ var MalformedRequestError = class extends Schema.TaggedError()("MalformedRequestError", Schema.Struct({
11
+ message: Schema.String,
12
+ fields: Schema.Record(Schema.String, Schema.Array(Schema.String))
13
+ })) {};
11
14
  var UnauthorizedError = class extends Schema.TaggedError()("UnauthorizedError", Schema.Struct({ message: Schema.String })) {};
12
15
  var ForbiddenError = class extends Schema.TaggedError()("ForbiddenError", Schema.Struct({ message: Schema.String })) {};
13
16
  var ValidationError = class extends Schema.TaggedError()("ValidationError", Schema.Struct({
@@ -19,15 +22,19 @@ var GatewayTimeoutError = class extends Schema.TaggedError()("GatewayTimeoutErro
19
22
  message: Schema.String,
20
23
  retryAfterSeconds: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
21
24
  })) {};
22
- const AgentName = /* @__PURE__ */ (() => Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\S[\\s\\S]*\\S$|^\\S$|^$", "u")).annotate({
25
+ const AgentName = /* @__PURE__ */ (() => Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isPattern(new globalThis.RegExp("^\\S[\\s\\S]*\\S$|^\\S$|^$", "u")).annotate({
23
26
  expected: "a string matching the RegExp ^\\S[\\s\\S]*\\S$|^\\S$|^$",
24
27
  identifier: "AgentName"
25
28
  })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })))();
26
- const MailboxEndpointId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
29
+ const KnowledgeSourceId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^ksrc_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
30
+ expected: "a string matching the RegExp ^ksrc_[0-9a-hjkmnp-tv-z]{16,24}$",
31
+ identifier: "KnowledgeSourceId"
32
+ })).pipe(Schema.brand("KnowledgeSourceId")))();
33
+ const MailboxEndpointId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
27
34
  expected: "a string matching the RegExp ^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$",
28
35
  identifier: "MailboxEndpointId"
29
36
  })).pipe(Schema.brand("MailboxEndpointId")))();
30
- const IntegrationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^intg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
37
+ const IntegrationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^intg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
31
38
  expected: "a string matching the RegExp ^intg_[0-9a-hjkmnp-tv-z]{16,24}$",
32
39
  identifier: "IntegrationId"
33
40
  })).pipe(Schema.brand("IntegrationId")))();
@@ -36,11 +43,21 @@ const AgentToolScope = /* @__PURE__ */ (() => Schema.Union([
36
43
  Schema.Struct({ kind: Schema.Literal("readOnly") }),
37
44
  Schema.Struct({
38
45
  kind: Schema.Literal("selected"),
39
- names: Schema.Array(Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z][a-z0-9_.]{0,63}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z][a-z0-9_.]{0,63}$" }))).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
46
+ names: Schema.Array(Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[a-z][a-z0-9_.]{0,63}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z][a-z0-9_.]{0,63}$" }))).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
40
47
  })
41
48
  ]).annotate({ identifier: "AgentToolScope" }))();
42
49
  const AgentMode = /* @__PURE__ */ (() => Schema.Union([Schema.Literal("live"), Schema.Literal("supervised")]).annotate({ identifier: "AgentMode" }))();
43
50
  const AgentModel = /* @__PURE__ */ (() => Schema.Union([Schema.Literal("standard"), Schema.Literal("max")]).annotate({ identifier: "AgentModel" }))();
51
+ const CatalogModelId = /* @__PURE__ */ (() => Schema.String.check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isPattern(new globalThis.RegExp("^[a-z0-9][a-z0-9._-]*\\/[A-Za-z0-9._:~-]+$", "u")).annotate({
52
+ expected: "a string matching the RegExp ^[a-z0-9][a-z0-9._-]*\\/[A-Za-z0-9._:~-]+$",
53
+ identifier: "CatalogModelId"
54
+ })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })))();
55
+ const AgentReasoning = /* @__PURE__ */ (() => Schema.Union([
56
+ Schema.Literal("auto"),
57
+ Schema.Literal("low"),
58
+ Schema.Literal("medium"),
59
+ Schema.Literal("high")
60
+ ]).annotate({ identifier: "AgentReasoning" }))();
44
61
  const TimeZone = /* @__PURE__ */ (() => Schema.String.annotate({ identifier: "TimeZone" }))();
45
62
  const Weekday = /* @__PURE__ */ (() => Schema.Union([
46
63
  Schema.Literal("monday"),
@@ -51,27 +68,39 @@ const Weekday = /* @__PURE__ */ (() => Schema.Union([
51
68
  Schema.Literal("saturday"),
52
69
  Schema.Literal("sunday")
53
70
  ]).annotate({ identifier: "Weekday" }))();
54
- const ClockTime = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?:[01]\\d|2[0-3]):[0-5]\\d$", "u")).annotate({
71
+ const ClockTime = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?:[01]\\d|2[0-3]):[0-5]\\d$", "u")).annotate({
55
72
  expected: "a string matching the RegExp ^(?:[01]\\d|2[0-3]):[0-5]\\d$",
56
73
  identifier: "ClockTime"
57
74
  })))();
75
+ var PaymentRequiredError = class extends Schema.TaggedError()("PaymentRequiredError", Schema.Struct({
76
+ message: Schema.String,
77
+ resource: Schema.String,
78
+ currentUsage: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
79
+ limit: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
80
+ })) {};
58
81
  var ResourceNotFoundError = class extends Schema.TaggedError()("ResourceNotFoundError", Schema.Struct({
59
82
  resource: Schema.String,
60
83
  id: Schema.String,
61
84
  message: Schema.String
62
85
  })) {};
86
+ const MonthlySpendCapDollars = /* @__PURE__ */ (() => Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })).check(Schema.isGreaterThanOrEqualTo(.01).annotate({ expected: "a value greater than or equal to 0.01" })).check(Schema.isLessThanOrEqualTo(1e5).annotate({
87
+ expected: "a value less than or equal to 100000",
88
+ identifier: "MonthlySpendCapDollars"
89
+ })))();
63
90
  var ConflictError = class extends Schema.TaggedError()("ConflictError", Schema.Struct({
64
91
  message: Schema.String,
65
92
  resource: Schema.String,
66
93
  id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
67
94
  })) {};
68
- const VersionCursor = /* @__PURE__ */ (() => Schema.String.annotate({ identifier: "VersionCursor" }))();
69
95
  var AnalyticsQueryError = class extends Schema.TaggedError()("AnalyticsQueryError", Schema.Struct({ message: Schema.String })) {};
70
96
  const ApiKeyResourceAccess = /* @__PURE__ */ (() => Schema.Struct({
71
97
  messages: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
72
98
  email: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
99
+ sms: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
100
+ whatsapp: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
73
101
  domains: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
74
102
  phoneNumbers: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
103
+ whatsappAccounts: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
75
104
  contacts: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
76
105
  conversations: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
77
106
  templates: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
@@ -82,7 +111,7 @@ const ApiKeyResourceAccess = /* @__PURE__ */ (() => Schema.Struct({
82
111
  billing: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
83
112
  analytics: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null]))
84
113
  }).annotate({ identifier: "ApiKeyResourceAccess" }))();
85
- const MailboxId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
114
+ const MailboxId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
86
115
  expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$",
87
116
  identifier: "MailboxId"
88
117
  })).pipe(Schema.brand("MailboxId")))();
@@ -90,38 +119,32 @@ const MailboxSendMode = /* @__PURE__ */ (() => Schema.Union([Schema.Literal("sen
90
119
  description: "How the grantee's sends execute: `send` runs them within account limits; `approval` holds each one until a different member approves it.",
91
120
  identifier: "MailboxSendMode"
92
121
  }))();
93
- var PaymentRequiredError = class extends Schema.TaggedError()("PaymentRequiredError", Schema.Struct({
94
- message: Schema.String,
95
- resource: Schema.String,
96
- currentUsage: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
97
- limit: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
98
- })) {};
99
122
  var RateLimitedError = class extends Schema.TaggedError()("RateLimitedError", Schema.Struct({
100
123
  message: Schema.String,
101
124
  retryAfterSeconds: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
102
125
  })) {};
103
126
  var BillingProviderError = class extends Schema.TaggedError()("BillingProviderError", Schema.Struct({ message: Schema.String })) {};
104
- const ApiKeyId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^key_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
127
+ const ApiKeyId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^key_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
105
128
  expected: "a string matching the RegExp ^key_[0-9a-hjkmnp-tv-z]{16,24}$",
106
129
  identifier: "ApiKeyId"
107
130
  })).pipe(Schema.brand("ApiKeyId")))();
108
131
  const SuccessResponse = /* @__PURE__ */ (() => Schema.Struct({ success: Schema.Boolean }).annotate({ identifier: "SuccessResponse" }))();
109
- const MessageId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
132
+ const MessageId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
110
133
  expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$",
111
134
  identifier: "MessageId"
112
135
  })).pipe(Schema.brand("MessageId")))();
113
- const AttachmentId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^att_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
136
+ const AttachmentId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^att_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
114
137
  expected: "a string matching the RegExp ^att_[0-9a-hjkmnp-tv-z]{16,24}$",
115
138
  identifier: "AttachmentId"
116
139
  })).pipe(Schema.brand("AttachmentId")))();
117
- const OrganizationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
140
+ const OrganizationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
118
141
  expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$",
119
142
  identifier: "OrganizationId"
120
143
  })).pipe(Schema.brand("OrganizationId")))();
121
144
  const BrandAssets = /* @__PURE__ */ (() => Schema.Struct({
122
- logoUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null])),
123
- logoDarkUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null])),
124
- iconUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null]))
145
+ logoUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(new globalThis.RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null])),
146
+ logoDarkUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(new globalThis.RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null])),
147
+ iconUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(new globalThis.RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null]))
125
148
  }).annotate({ identifier: "BrandAssets" }))();
126
149
  const BrandAddress = /* @__PURE__ */ (() => Schema.Struct({
127
150
  street1: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
@@ -133,25 +156,25 @@ const BrandAddress = /* @__PURE__ */ (() => Schema.Struct({
133
156
  }).annotate({ identifier: "BrandAddress" }))();
134
157
  const BrandSocialLink = /* @__PURE__ */ (() => Schema.Struct({
135
158
  label: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(64).annotate({ expected: "a string with at most 64 code points" })).check(Schema.isMaxLength(64).annotate({ expected: "a value with a length of at most 64" })),
136
- url: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" }))
159
+ url: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(new globalThis.RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" }))
137
160
  }).annotate({ identifier: "BrandSocialLink" }))();
138
- const CampaignId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^camp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
161
+ const CampaignId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^camp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
139
162
  expected: "a string matching the RegExp ^camp_[0-9a-hjkmnp-tv-z]{16,24}$",
140
163
  identifier: "CampaignId"
141
164
  })).pipe(Schema.brand("CampaignId")))();
142
- const MediaId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
165
+ const MediaId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
143
166
  expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$",
144
167
  identifier: "MediaId"
145
168
  })).pipe(Schema.brand("MediaId")))();
146
- const TemplatePublicationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^tpub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
169
+ const TemplatePublicationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^tpub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
147
170
  expected: "a string matching the RegExp ^tpub_[0-9a-hjkmnp-tv-z]{16,24}$",
148
171
  identifier: "TemplatePublicationId"
149
172
  })).pipe(Schema.brand("TemplatePublicationId")))();
150
- const TemplateInputContractId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^tcon_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
173
+ const TemplateInputContractId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^tcon_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
151
174
  expected: "a string matching the RegExp ^tcon_[0-9a-hjkmnp-tv-z]{16,24}$",
152
175
  identifier: "TemplateInputContractId"
153
176
  })).pipe(Schema.brand("TemplateInputContractId")))();
154
- const TemplateId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
177
+ const TemplateId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
155
178
  expected: "a string matching the RegExp ^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$",
156
179
  identifier: "TemplateId"
157
180
  })).pipe(Schema.brand("TemplateId")))();
@@ -165,7 +188,7 @@ const RenderTimeZone = /* @__PURE__ */ (() => Schema.String.check(Schema.isMaxCo
165
188
  identifier: "RenderTimeZone"
166
189
  })).check(Schema.isMaxLength(64).annotate({ expected: "a value with a length of at most 64" })))();
167
190
  const ReplyToAddresses = /* @__PURE__ */ (() => Schema.Union([Schema.Array(Schema.String), Schema.Null]).annotate({ identifier: "ReplyToAddresses" }))();
168
- const TopicId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^unsub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
191
+ const TopicId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^unsub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
169
192
  expected: "a string matching the RegExp ^unsub_[0-9a-hjkmnp-tv-z]{16,24}$",
170
193
  identifier: "TopicId"
171
194
  })).pipe(Schema.brand("TopicId")))();
@@ -181,20 +204,38 @@ const EmailCustomHeaders = /* @__PURE__ */ (() => Schema.Record(Schema.String, S
181
204
  expected: "a value with at most 11 entries",
182
205
  identifier: "EmailCustomHeaders"
183
206
  })))();
184
- const ConversationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
207
+ const ConversationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
185
208
  expected: "a string matching the RegExp ^conv_[0-9a-hjkmnp-tv-z]{16,24}$",
186
209
  identifier: "ConversationId"
187
210
  })).pipe(Schema.brand("ConversationId")))();
188
211
  const CampaignContentMetadata = /* @__PURE__ */ (() => Schema.Union([Schema.Record(Schema.String, JsonValue), Schema.Null]).annotate({ identifier: "CampaignContentMetadata" }))();
189
- const ContactId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
212
+ const WhatsAppTemplateDispatchData = /* @__PURE__ */ (() => Schema.Record(Schema.String, JsonValue).annotate({ identifier: "WhatsAppTemplateDispatchData" }))();
213
+ const WhatsAppTemplateContactBinding = /* @__PURE__ */ (() => Schema.Struct({ contact: Schema.Union([
214
+ Schema.Literal("id"),
215
+ Schema.Literal("name"),
216
+ Schema.Literal("displayName"),
217
+ Schema.Literal("externalId"),
218
+ Schema.Literal("phone"),
219
+ Schema.Literal("email"),
220
+ Schema.Literal("firstName"),
221
+ Schema.Literal("lastName"),
222
+ Schema.Literal("company"),
223
+ Schema.Literal("jobTitle")
224
+ ]) }).annotate({ identifier: "WhatsAppTemplateContactBinding" }))();
225
+ const WhatsAppTemplateCustomFieldBinding = /* @__PURE__ */ (() => Schema.Struct({ customField: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })) }).annotate({ identifier: "WhatsAppTemplateCustomFieldBinding" }))();
226
+ const WhatsAppBusinessAccountId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^waba_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
227
+ expected: "a string matching the RegExp ^waba_[0-9a-hjkmnp-tv-z]{16,24}$",
228
+ identifier: "WhatsAppBusinessAccountId"
229
+ })).pipe(Schema.brand("WhatsAppBusinessAccountId")))();
230
+ const ContactId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
190
231
  expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$",
191
232
  identifier: "ContactId"
192
233
  })).pipe(Schema.brand("ContactId")))();
193
- const ContactGroupId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
234
+ const ContactGroupId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
194
235
  expected: "a string matching the RegExp ^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$",
195
236
  identifier: "ContactGroupId"
196
237
  })).pipe(Schema.brand("ContactGroupId")))();
197
- const CampaignRunId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^crun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
238
+ const CampaignRunId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^crun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
198
239
  expected: "a string matching the RegExp ^crun_[0-9a-hjkmnp-tv-z]{16,24}$",
199
240
  identifier: "CampaignRunId"
200
241
  })).pipe(Schema.brand("CampaignRunId")))();
@@ -210,7 +251,7 @@ var FlagDisabledError = class extends Schema.TaggedError()("FlagDisabledError",
210
251
  flag: Schema.String,
211
252
  message: Schema.String
212
253
  })) {};
213
- const EmailDomainId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^dom_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
254
+ const EmailDomainId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^dom_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
214
255
  expected: "a string matching the RegExp ^dom_[0-9a-hjkmnp-tv-z]{16,24}$",
215
256
  identifier: "EmailDomainId"
216
257
  })).pipe(Schema.brand("EmailDomainId")))();
@@ -305,11 +346,11 @@ var DeliveryUnavailableError = class extends Schema.TaggedError()("DeliveryUnava
305
346
  message: Schema.String,
306
347
  retryAfterSeconds: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
307
348
  })) {};
308
- const ContactIdentityId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^cident_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
349
+ const ContactIdentityId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^cident_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
309
350
  expected: "a string matching the RegExp ^cident_[0-9a-hjkmnp-tv-z]{16,24}$",
310
351
  identifier: "ContactIdentityId"
311
352
  })).pipe(Schema.brand("ContactIdentityId")))();
312
- const WebhookEndpointId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^wep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
353
+ const WebhookEndpointId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^wep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
313
354
  expected: "a string matching the RegExp ^wep_[0-9a-hjkmnp-tv-z]{16,24}$",
314
355
  identifier: "WebhookEndpointId"
315
356
  })).pipe(Schema.brand("WebhookEndpointId")))();
@@ -323,23 +364,23 @@ var EmailChannelError = class extends Schema.TaggedError()("EmailChannelError",
323
364
  message: Schema.String,
324
365
  statusCode: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]))
325
366
  })) {};
326
- const OperationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^op_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
367
+ const OperationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^op_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
327
368
  expected: "a string matching the RegExp ^op_[0-9a-hjkmnp-tv-z]{16,24}$",
328
369
  identifier: "OperationId"
329
370
  })).pipe(Schema.brand("OperationId")))();
330
- const EmailSenderId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^sender_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
371
+ const EmailSenderId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^sender_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
331
372
  expected: "a string matching the RegExp ^sender_[0-9a-hjkmnp-tv-z]{16,24}$",
332
373
  identifier: "EmailSenderId"
333
374
  })).pipe(Schema.brand("EmailSenderId")))();
334
- const ExtensionId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^ext_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
375
+ const ExtensionId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^ext_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
335
376
  expected: "a string matching the RegExp ^ext_[0-9a-hjkmnp-tv-z]{16,24}$",
336
377
  identifier: "ExtensionId"
337
378
  })).pipe(Schema.brand("ExtensionId")))();
338
- const ExtensionVersionId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^extver_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
379
+ const ExtensionVersionId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^extver_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
339
380
  expected: "a string matching the RegExp ^extver_[0-9a-hjkmnp-tv-z]{16,24}$",
340
381
  identifier: "ExtensionVersionId"
341
382
  })).pipe(Schema.brand("ExtensionVersionId")))();
342
- const UserId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^user_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
383
+ const UserId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^user_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
343
384
  expected: "a string matching the RegExp ^user_[0-9a-hjkmnp-tv-z]{16,24}$",
344
385
  identifier: "UserId"
345
386
  })).pipe(Schema.brand("UserId")))();
@@ -347,14 +388,14 @@ const FeedbackContext = /* @__PURE__ */ (() => Schema.Struct({
347
388
  operation: Schema.optionalKey(Schema.Union([Schema.String.annotate({ description: "The operation the report is about, as an SDK method, MCP tool, CLI command, or `METHOD /path` (for example `POST /v1/messages`)." }).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })), Schema.Null])),
348
389
  resourceId: Schema.optionalKey(Schema.Union([Schema.String.annotate({ description: "The id of the resource involved, such as a message or domain id." }).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })), Schema.Null]))
349
390
  }).annotate({ identifier: "FeedbackContext" }))();
350
- const JourneyName = /* @__PURE__ */ (() => Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\S[\\s\\S]*\\S$|^\\S$|^$", "u")).annotate({
391
+ const JourneyName = /* @__PURE__ */ (() => Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isPattern(new globalThis.RegExp("^\\S[\\s\\S]*\\S$|^\\S$|^$", "u")).annotate({
351
392
  expected: "a string matching the RegExp ^\\S[\\s\\S]*\\S$|^\\S$|^$",
352
393
  identifier: "JourneyName"
353
394
  })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })))();
354
395
  const JourneyCustomEventName = /* @__PURE__ */ (() => Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({
355
396
  expected: "a string with at most 255 code points",
356
397
  identifier: "JourneyCustomEventName"
357
- })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!(?:[Cc][Oo][Nn][Tt][Aa][Cc][Tt]|[Ss][Aa][Mm][Vv][Aa])\\.)[A-Za-z][A-Za-z0-9_.-]*$")).annotate({ expected: "a string matching the RegExp ^(?!(?:[Cc][Oo][Nn][Tt][Aa][Cc][Tt]|[Ss][Aa][Mm][Vv][Aa])\\.)[A-Za-z][A-Za-z0-9_.-]*$" })))();
398
+ })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })).check(Schema.isPattern(new globalThis.RegExp("^(?!(?:[Cc][Oo][Nn][Tt][Aa][Cc][Tt]|[Ss][Aa][Mm][Vv][Aa])\\.)[A-Za-z][A-Za-z0-9_.-]*$")).annotate({ expected: "a string matching the RegExp ^(?!(?:[Cc][Oo][Nn][Tt][Aa][Cc][Tt]|[Ss][Aa][Mm][Vv][Aa])\\.)[A-Za-z][A-Za-z0-9_.-]*$" })))();
358
399
  const JourneyContactCreatedTrigger = /* @__PURE__ */ (() => Schema.Struct({ type: Schema.Literal("contact.created") }).annotate({ identifier: "JourneyContactCreatedTrigger" }))();
359
400
  const JourneyTagAddedTrigger = /* @__PURE__ */ (() => Schema.Struct({
360
401
  type: Schema.Literal("contact.tag_added"),
@@ -418,7 +459,11 @@ const JourneyUpdateTagsConfig = /* @__PURE__ */ (() => Schema.Struct({
418
459
  add: Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))),
419
460
  remove: Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })))
420
461
  }).annotate({ identifier: "JourneyUpdateTagsConfig" }))();
421
- const MailboxChannel = /* @__PURE__ */ (() => Schema.Literal("email").annotate({
462
+ const MailboxChannel = /* @__PURE__ */ (() => Schema.Union([
463
+ Schema.Literal("sms"),
464
+ Schema.Literal("whatsapp"),
465
+ Schema.Literal("email")
466
+ ]).annotate({
422
467
  description: "The channel an endpoint, thread, or message belongs to.",
423
468
  identifier: "MailboxChannel"
424
469
  }))();
@@ -430,19 +475,19 @@ const MailboxMetadataPatch = /* @__PURE__ */ (() => Schema.Record(Schema.String,
430
475
  expected: "an object with property names matching the schema",
431
476
  identifier: "MailboxMetadataPatch"
432
477
  })))();
433
- const MailboxThreadId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
478
+ const MailboxThreadId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
434
479
  expected: "a string matching the RegExp ^thread_[0-9a-hjkmnp-tv-z]{16,24}$",
435
480
  identifier: "MailboxThreadId"
436
481
  })).pipe(Schema.brand("MailboxThreadId")))();
437
- const MailboxActionId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
482
+ const MailboxActionId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
438
483
  expected: "a string matching the RegExp ^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$",
439
484
  identifier: "MailboxActionId"
440
485
  })).pipe(Schema.brand("MailboxActionId")))();
441
- const MailboxDraftId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mdraft_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
486
+ const MailboxDraftId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^mdraft_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
442
487
  expected: "a string matching the RegExp ^mdraft_[0-9a-hjkmnp-tv-z]{16,24}$",
443
488
  identifier: "MailboxDraftId"
444
489
  })).pipe(Schema.brand("MailboxDraftId")))();
445
- const MailboxPolicyId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxpol_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
490
+ const MailboxPolicyId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^mbxpol_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
446
491
  expected: "a string matching the RegExp ^mbxpol_[0-9a-hjkmnp-tv-z]{16,24}$",
447
492
  identifier: "MailboxPolicyId"
448
493
  })).pipe(Schema.brand("MailboxPolicyId")))();
@@ -505,6 +550,10 @@ const MailboxSendError = /* @__PURE__ */ (() => Schema.Union([
505
550
  message: Schema.String
506
551
  })
507
552
  ]).annotate({ identifier: "MailboxSendError" }))();
553
+ var WhatsAppServiceWindowClosedError = class extends Schema.TaggedError()("WhatsAppServiceWindowClosedError", Schema.Struct({
554
+ message: Schema.String,
555
+ closedAt: Schema.Union([Schema.String, Schema.Null])
556
+ })) {};
508
557
  const MailboxThreadFolder = /* @__PURE__ */ (() => Schema.Union([
509
558
  Schema.Literal("inbox"),
510
559
  Schema.Literal("assigned"),
@@ -518,7 +567,7 @@ const MailboxGrantRole = /* @__PURE__ */ (() => Schema.Union([
518
567
  Schema.Literal("collaborator"),
519
568
  Schema.Literal("viewer")
520
569
  ]).annotate({ identifier: "MailboxGrantRole" }))();
521
- const MailboxLabelId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^label_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
570
+ const MailboxLabelId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^label_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
522
571
  expected: "a string matching the RegExp ^label_[0-9a-hjkmnp-tv-z]{16,24}$",
523
572
  identifier: "MailboxLabelId"
524
573
  })).pipe(Schema.brand("MailboxLabelId")))();
@@ -534,6 +583,106 @@ const EmailSender = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({
534
583
  email: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
535
584
  name: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null]))
536
585
  }), Schema.Null]).annotate({ identifier: "EmailSender" }))();
586
+ const WhatsAppTextContent = /* @__PURE__ */ (() => Schema.Struct({ text: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(4096).annotate({ expected: "a string with at most 4096 code points" })).check(Schema.isMaxLength(4096).annotate({ expected: "a value with a length of at most 4096" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })) }).annotate({ identifier: "WhatsAppTextContent" }))();
587
+ const WhatsAppTemplateData = /* @__PURE__ */ (() => Schema.Record(Schema.String, JsonValue).annotate({ identifier: "WhatsAppTemplateData" }))();
588
+ const WhatsAppImageLink = /* @__PURE__ */ (() => Schema.Struct({
589
+ type: Schema.Literal("image"),
590
+ caption: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
591
+ url: Schema.String
592
+ }).annotate({ identifier: "WhatsAppImageLink" }))();
593
+ const WhatsAppVideoLink = /* @__PURE__ */ (() => Schema.Struct({
594
+ type: Schema.Literal("video"),
595
+ caption: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
596
+ url: Schema.String
597
+ }).annotate({ identifier: "WhatsAppVideoLink" }))();
598
+ const WhatsAppAudioLink = /* @__PURE__ */ (() => Schema.Struct({
599
+ type: Schema.Literal("audio"),
600
+ url: Schema.String
601
+ }).annotate({ identifier: "WhatsAppAudioLink" }))();
602
+ const WhatsAppDocumentLink = /* @__PURE__ */ (() => Schema.Struct({
603
+ type: Schema.Literal("document"),
604
+ caption: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
605
+ filename: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
606
+ url: Schema.String
607
+ }).annotate({ identifier: "WhatsAppDocumentLink" }))();
608
+ const WhatsAppStickerLink = /* @__PURE__ */ (() => Schema.Struct({
609
+ type: Schema.Literal("sticker"),
610
+ url: Schema.String
611
+ }).annotate({ identifier: "WhatsAppStickerLink" }))();
612
+ const WhatsAppTextHeader = /* @__PURE__ */ (() => Schema.Struct({
613
+ type: Schema.Literal("text"),
614
+ text: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" })).check(Schema.isMaxLength(60).annotate({ expected: "a value with a length of at most 60" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))
615
+ }).annotate({ identifier: "WhatsAppTextHeader" }))();
616
+ const WhatsAppImageHeaderLink = /* @__PURE__ */ (() => Schema.Struct({
617
+ type: Schema.Literal("image"),
618
+ url: Schema.String
619
+ }).annotate({ identifier: "WhatsAppImageHeaderLink" }))();
620
+ const WhatsAppVideoHeaderLink = /* @__PURE__ */ (() => Schema.Struct({
621
+ type: Schema.Literal("video"),
622
+ url: Schema.String
623
+ }).annotate({ identifier: "WhatsAppVideoHeaderLink" }))();
624
+ const WhatsAppDocumentHeaderLink = /* @__PURE__ */ (() => Schema.Struct({
625
+ type: Schema.Literal("document"),
626
+ filename: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
627
+ url: Schema.String
628
+ }).annotate({ identifier: "WhatsAppDocumentHeaderLink" }))();
629
+ const WhatsAppReplyButton = /* @__PURE__ */ (() => Schema.Struct({
630
+ id: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
631
+ title: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(20).annotate({ expected: "a string with at most 20 code points" })).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))
632
+ }).annotate({ identifier: "WhatsAppReplyButton" }))();
633
+ const WhatsAppListRow = /* @__PURE__ */ (() => Schema.Struct({
634
+ id: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
635
+ title: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(24).annotate({ expected: "a string with at most 24 code points" })).check(Schema.isMaxLength(24).annotate({ expected: "a value with a length of at most 24" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
636
+ description: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(72).annotate({ expected: "a string with at most 72 code points" })).check(Schema.isMaxLength(72).annotate({ expected: "a value with a length of at most 72" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
637
+ }).annotate({ identifier: "WhatsAppListRow" }))();
638
+ const WhatsAppFlowId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^waflow_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
639
+ expected: "a string matching the RegExp ^waflow_[0-9a-hjkmnp-tv-z]{16,24}$",
640
+ identifier: "WhatsAppFlowId"
641
+ })).pipe(Schema.brand("WhatsAppFlowId")))();
642
+ const WhatsAppLocation = /* @__PURE__ */ (() => Schema.Struct({
643
+ latitude: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })).check(Schema.isGreaterThanOrEqualTo(-90).annotate({ expected: "a value greater than or equal to -90" })).check(Schema.isLessThanOrEqualTo(90).annotate({ expected: "a value less than or equal to 90" })),
644
+ longitude: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })).check(Schema.isGreaterThanOrEqualTo(-180).annotate({ expected: "a value greater than or equal to -180" })).check(Schema.isLessThanOrEqualTo(180).annotate({ expected: "a value less than or equal to 180" })),
645
+ name: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
646
+ address: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
647
+ }).annotate({ identifier: "WhatsAppLocation" }))();
648
+ const WhatsAppContactCard = /* @__PURE__ */ (() => Schema.Struct({
649
+ name: Schema.Struct({
650
+ formattedName: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
651
+ firstName: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
652
+ lastName: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
653
+ middleName: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
654
+ prefix: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
655
+ suffix: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
656
+ }),
657
+ phones: Schema.optionalKey(Schema.Array(Schema.Struct({
658
+ phone: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
659
+ type: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
660
+ waId: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
661
+ }))),
662
+ emails: Schema.optionalKey(Schema.Array(Schema.Struct({
663
+ email: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
664
+ type: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
665
+ }))),
666
+ urls: Schema.optionalKey(Schema.Array(Schema.Struct({
667
+ url: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
668
+ type: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
669
+ }))),
670
+ org: Schema.optionalKey(Schema.Struct({
671
+ company: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
672
+ department: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
673
+ title: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
674
+ })),
675
+ addresses: Schema.optionalKey(Schema.Array(Schema.Struct({
676
+ street: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
677
+ city: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
678
+ state: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
679
+ zip: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
680
+ country: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
681
+ countryCode: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
682
+ type: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
683
+ }))),
684
+ birthday: Schema.optionalKey(Schema.String)
685
+ }).annotate({ identifier: "WhatsAppContactCard" }))();
537
686
  const IanaTimezone = /* @__PURE__ */ (() => Schema.String.annotate({ identifier: "IanaTimezone" }))();
538
687
  const NamespaceMetadata = /* @__PURE__ */ (() => Schema.Record(Schema.String, Schema.String).annotate({
539
688
  description: "Your own labels for the namespace, such as the id of your customer it serves. Samva stores them and never reads them.",
@@ -542,14 +691,16 @@ const NamespaceMetadata = /* @__PURE__ */ (() => Schema.Record(Schema.String, Sc
542
691
  const NamespaceResourceType = /* @__PURE__ */ (() => Schema.Union([
543
692
  Schema.Literal("domain"),
544
693
  Schema.Literal("sender"),
694
+ Schema.Literal("whatsappNumber"),
695
+ Schema.Literal("smsNumber"),
545
696
  Schema.Literal("contact"),
546
697
  Schema.Literal("template")
547
698
  ]).annotate({ identifier: "NamespaceResourceType" }))();
548
- const NewsletterId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^nl_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
699
+ const NewsletterId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^nl_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
549
700
  expected: "a string matching the RegExp ^nl_[0-9a-hjkmnp-tv-z]{16,24}$",
550
701
  identifier: "NewsletterId"
551
702
  })).pipe(Schema.brand("NewsletterId")))();
552
- const TemplateProjectId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^tproj_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
703
+ const TemplateProjectId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^tproj_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
553
704
  expected: "a string matching the RegExp ^tproj_[0-9a-hjkmnp-tv-z]{16,24}$",
554
705
  identifier: "TemplateProjectId"
555
706
  })).pipe(Schema.brand("TemplateProjectId")))();
@@ -571,7 +722,7 @@ const TestWebhookPayload = /* @__PURE__ */ (() => Schema.Struct({ data: Schema.o
571
722
  const CreateTemplatePayload = /* @__PURE__ */ (() => Schema.Struct({
572
723
  name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })),
573
724
  projectName: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })), Schema.Null])),
574
- slug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
725
+ slug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
575
726
  galleryTemplateId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })), Schema.Null])),
576
727
  useBrand: Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ description: "With `galleryTemplateId`: whether the new project's `theme.css` imports the organization's default brand (`@import \"samva:brand\";`) over the starter's look. Defaults to false." }), Schema.Null])),
577
728
  description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
@@ -591,8 +742,9 @@ const CreateTemplatePayload = /* @__PURE__ */ (() => Schema.Struct({
591
742
  const AgentIntegrationGrant = /* @__PURE__ */ (() => Schema.Struct({
592
743
  integrationId: IntegrationId,
593
744
  tools: AgentToolScope,
594
- requireApproval: Schema.Array(Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z][a-z0-9_.]{0,63}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z][a-z0-9_.]{0,63}$" })))
745
+ requireApproval: Schema.Array(Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[a-z][a-z0-9_.]{0,63}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z][a-z0-9_.]{0,63}$" })))
595
746
  }).annotate({ identifier: "AgentIntegrationGrant" }))();
747
+ const AgentModelChoice = /* @__PURE__ */ (() => Schema.Union([AgentModel, CatalogModelId]).annotate({ identifier: "AgentModelChoice" }))();
596
748
  const WorkingHoursRange = /* @__PURE__ */ (() => Schema.Struct({
597
749
  day: Weekday,
598
750
  opens: ClockTime,
@@ -646,7 +798,11 @@ const CreateWebhookPayload = /* @__PURE__ */ (() => Schema.Struct({
646
798
  Schema.Literal("mailbox.message.failed"),
647
799
  Schema.Literal("journey.webhook")
648
800
  ])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
649
- channels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Literal("email")).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
801
+ channels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Union([
802
+ Schema.Literal("sms"),
803
+ Schema.Literal("whatsapp"),
804
+ Schema.Literal("email")
805
+ ])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
650
806
  mailboxIds: Schema.optionalKey(Schema.Union([Schema.TupleWithRest(Schema.Tuple([MailboxId]), [MailboxId]), Schema.Null])),
651
807
  namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
652
808
  headers: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])),
@@ -696,7 +852,11 @@ const UpdateWebhookPayload = /* @__PURE__ */ (() => Schema.Struct({
696
852
  Schema.Literal("mailbox.message.failed"),
697
853
  Schema.Literal("journey.webhook")
698
854
  ])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
699
- channels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Literal("email")).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
855
+ channels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Union([
856
+ Schema.Literal("sms"),
857
+ Schema.Literal("whatsapp"),
858
+ Schema.Literal("email")
859
+ ])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
700
860
  mailboxIds: Schema.optionalKey(Schema.Union([Schema.TupleWithRest(Schema.Tuple([MailboxId]), [MailboxId]), Schema.Null])),
701
861
  namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
702
862
  headers: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])),
@@ -717,9 +877,19 @@ const ApiKeyMailboxAccess = /* @__PURE__ */ (() => Schema.Struct({
717
877
  mailboxIds: Schema.optionalKey(Schema.Union([Schema.TupleWithRest(Schema.Tuple([MailboxId]), [MailboxId]), Schema.Null]).annotate({ description: "The mailboxes the key may act on. Omit to reach every mailbox the owner can." })),
718
878
  sendMode: Schema.optionalKey(Schema.Union([MailboxSendMode, Schema.Null]).annotate({ description: "Defaults to `send`. With `approval`, each send waits until a person other than the key approves it." }))
719
879
  }).annotate({ identifier: "ApiKeyMailboxAccess" }))();
880
+ const CreateMailboxChatDraftPayload = /* @__PURE__ */ (() => Schema.Struct({
881
+ channel: Schema.Union([Schema.Literal("whatsapp"), Schema.Literal("sms")]),
882
+ to: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
883
+ text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
884
+ inReplyToMessageId: Schema.optionalKey(Schema.Union([MessageId, Schema.Null]))
885
+ }).annotate({ identifier: "CreateMailboxChatDraftPayload" }))();
886
+ const WhatsAppReaction = /* @__PURE__ */ (() => Schema.Struct({
887
+ messageId: MessageId,
888
+ emoji: Schema.String
889
+ }).annotate({ identifier: "WhatsAppReaction" }))();
720
890
  const BrandFooter = /* @__PURE__ */ (() => Schema.Struct({
721
891
  companyName: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })), Schema.Null])),
722
- websiteUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null])),
892
+ websiteUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(new globalThis.RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null])),
723
893
  address: Schema.optionalKey(Schema.Union([BrandAddress, Schema.Null])),
724
894
  socialLinks: Schema.optionalKey(Schema.Union([Schema.Array(BrandSocialLink).check(Schema.isMaxLength(12).annotate({ expected: "a value with a length of at most 12" })), Schema.Null]))
725
895
  }).annotate({ identifier: "BrandFooter" }))();
@@ -730,7 +900,45 @@ const EmailAttachment = /* @__PURE__ */ (() => Schema.Struct({
730
900
  contentType: Schema.String,
731
901
  size: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(26214400).annotate({ expected: "a value less than or equal to 26214400" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" }))
732
902
  }).annotate({ identifier: "EmailAttachment" }))();
903
+ const WhatsAppImageUpload = /* @__PURE__ */ (() => Schema.Struct({
904
+ type: Schema.Literal("image"),
905
+ caption: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
906
+ mediaId: MediaId
907
+ }).annotate({ identifier: "WhatsAppImageUpload" }))();
908
+ const WhatsAppVideoUpload = /* @__PURE__ */ (() => Schema.Struct({
909
+ type: Schema.Literal("video"),
910
+ caption: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
911
+ mediaId: MediaId
912
+ }).annotate({ identifier: "WhatsAppVideoUpload" }))();
913
+ const WhatsAppAudioUpload = /* @__PURE__ */ (() => Schema.Struct({
914
+ type: Schema.Literal("audio"),
915
+ mediaId: MediaId
916
+ }).annotate({ identifier: "WhatsAppAudioUpload" }))();
917
+ const WhatsAppDocumentUpload = /* @__PURE__ */ (() => Schema.Struct({
918
+ type: Schema.Literal("document"),
919
+ caption: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
920
+ filename: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
921
+ mediaId: MediaId
922
+ }).annotate({ identifier: "WhatsAppDocumentUpload" }))();
923
+ const WhatsAppStickerUpload = /* @__PURE__ */ (() => Schema.Struct({
924
+ type: Schema.Literal("sticker"),
925
+ mediaId: MediaId
926
+ }).annotate({ identifier: "WhatsAppStickerUpload" }))();
927
+ const WhatsAppImageHeaderUpload = /* @__PURE__ */ (() => Schema.Struct({
928
+ type: Schema.Literal("image"),
929
+ mediaId: MediaId
930
+ }).annotate({ identifier: "WhatsAppImageHeaderUpload" }))();
931
+ const WhatsAppVideoHeaderUpload = /* @__PURE__ */ (() => Schema.Struct({
932
+ type: Schema.Literal("video"),
933
+ mediaId: MediaId
934
+ }).annotate({ identifier: "WhatsAppVideoHeaderUpload" }))();
935
+ const WhatsAppDocumentHeaderUpload = /* @__PURE__ */ (() => Schema.Struct({
936
+ type: Schema.Literal("document"),
937
+ filename: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
938
+ mediaId: MediaId
939
+ }).annotate({ identifier: "WhatsAppDocumentHeaderUpload" }))();
733
940
  const TemplateData = /* @__PURE__ */ (() => Schema.Union([JsonObject, Schema.Null]).annotate({ identifier: "TemplateData" }))();
941
+ const SmsTemplateData = /* @__PURE__ */ (() => Schema.Union([JsonObject, Schema.Null]).annotate({ identifier: "SmsTemplateData" }))();
734
942
  const ContactConsent = /* @__PURE__ */ (() => Schema.Struct({
735
943
  status: Schema.Union([Schema.Literal("opted_in"), Schema.Literal("opted_out")]),
736
944
  source: Schema.String,
@@ -738,6 +946,19 @@ const ContactConsent = /* @__PURE__ */ (() => Schema.Struct({
738
946
  proof: Schema.Union([JsonObject, Schema.Null])
739
947
  }).annotate({ identifier: "ContactConsent" }))();
740
948
  const JourneyWebhookConfig = /* @__PURE__ */ (() => Schema.Struct({ data: Schema.optionalKey(JsonObject) }).annotate({ identifier: "JourneyWebhookConfig" }))();
949
+ const SendMailboxChatPayload = /* @__PURE__ */ (() => Schema.Struct({
950
+ channel: Schema.Union([Schema.Literal("whatsapp"), Schema.Literal("sms")]),
951
+ to: Schema.String,
952
+ text: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
953
+ templateId: Schema.optionalKey(Schema.Union([TemplateId, Schema.Null])),
954
+ templateData: Schema.optionalKey(Schema.Union([JsonObject, Schema.Null]))
955
+ }).annotate({ identifier: "SendMailboxChatPayload" }))();
956
+ const ReplyMailboxChatPayload = /* @__PURE__ */ (() => Schema.Struct({
957
+ channel: Schema.Union([Schema.Literal("whatsapp"), Schema.Literal("sms")]),
958
+ text: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
959
+ templateId: Schema.optionalKey(Schema.Union([TemplateId, Schema.Null])),
960
+ templateData: Schema.optionalKey(Schema.Union([JsonObject, Schema.Null]))
961
+ }).annotate({ identifier: "ReplyMailboxChatPayload" }))();
741
962
  const SkippedRecipient = /* @__PURE__ */ (() => Schema.Struct({
742
963
  address: Schema.String,
743
964
  reason: Schema.Union([
@@ -750,6 +971,7 @@ const SkippedRecipient = /* @__PURE__ */ (() => Schema.Struct({
750
971
  topicId: Schema.optionalKey(Schema.Union([TopicId, Schema.Null]))
751
972
  }).annotate({ identifier: "SkippedRecipient" }))();
752
973
  const CampaignConversationRef = /* @__PURE__ */ (() => Schema.Union([ConversationId, Schema.Null]).annotate({ identifier: "CampaignConversationRef" }))();
974
+ const WhatsAppTemplateBinding = /* @__PURE__ */ (() => Schema.Union([WhatsAppTemplateContactBinding, WhatsAppTemplateCustomFieldBinding]).annotate({ identifier: "WhatsAppTemplateBinding" }))();
753
975
  const ContactEvent = /* @__PURE__ */ (() => Schema.Struct({
754
976
  id: Schema.String,
755
977
  contactId: ContactId,
@@ -771,7 +993,7 @@ const ContactEventReference = /* @__PURE__ */ (() => Schema.Union([
771
993
  email: Schema.optionalKey(Schema.Never)
772
994
  }),
773
995
  Schema.Struct({
774
- email: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$", "u")).annotate({ expected: "a string matching the RegExp ^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$" })),
996
+ email: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$", "u")).annotate({ expected: "a string matching the RegExp ^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$" })),
775
997
  id: Schema.optionalKey(Schema.Never),
776
998
  externalId: Schema.optionalKey(Schema.Never)
777
999
  })
@@ -781,6 +1003,16 @@ const EmailRecipient = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({ cont
781
1003
  name: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null])),
782
1004
  displayName: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null]))
783
1005
  })]).annotate({ identifier: "EmailRecipient" }))();
1006
+ const SmsRecipient = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({ contactId: ContactId }), Schema.Struct({
1007
+ phone: Schema.String,
1008
+ name: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null])),
1009
+ displayName: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null]))
1010
+ })]).annotate({ identifier: "SmsRecipient" }))();
1011
+ const WhatsAppRecipient = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({ contactId: ContactId }), Schema.Struct({
1012
+ phone: Schema.String,
1013
+ name: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null])),
1014
+ displayName: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null]))
1015
+ })]).annotate({ identifier: "WhatsAppRecipient" }))();
784
1016
  const TopicContactById = /* @__PURE__ */ (() => Schema.Struct({ contactId: ContactId }).annotate({ identifier: "TopicContactById" }))();
785
1017
  const CampaignAudience = /* @__PURE__ */ (() => Schema.Struct({
786
1018
  topicId: TopicId,
@@ -819,7 +1051,11 @@ const MessageSummary = /* @__PURE__ */ (() => Schema.Struct({
819
1051
  campaignId: CampaignId,
820
1052
  runId: CampaignRunId
821
1053
  }), Schema.Null])),
822
- channel: Schema.Literal("email"),
1054
+ channel: Schema.Union([
1055
+ Schema.Literal("sms"),
1056
+ Schema.Literal("whatsapp"),
1057
+ Schema.Literal("email")
1058
+ ]),
823
1059
  direction: Schema.Union([Schema.Literal("outbound"), Schema.Literal("inbound")]),
824
1060
  status: Schema.Union([
825
1061
  Schema.Literal("pending"),
@@ -852,7 +1088,7 @@ const MessageSummary = /* @__PURE__ */ (() => Schema.Struct({
852
1088
  createdAt: Schema.String
853
1089
  }).annotate({ identifier: "MessageSummary" }))();
854
1090
  const JourneySendEmailConfig = /* @__PURE__ */ (() => Schema.Struct({
855
- template: Schema.Union([TemplateId, Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" }))]),
1091
+ template: Schema.Union([TemplateId, Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" }))]),
856
1092
  senderId: Schema.optionalKey(EmailSenderId),
857
1093
  templateData: Schema.optionalKey(JsonObject)
858
1094
  }).annotate({ identifier: "JourneySendEmailConfig" }))();
@@ -861,7 +1097,7 @@ const ExtensionVersionRef = /* @__PURE__ */ (() => Schema.Struct({
861
1097
  version: Schema.String
862
1098
  }).annotate({ identifier: "ExtensionVersionRef" }))();
863
1099
  const SendFeedback = /* @__PURE__ */ (() => Schema.Struct({
864
- message: Schema.String.annotate({ description: "What happened and what you expected, in plain language (at most 4000 characters)." }).check(Schema.isMaxCodePoints(4e3).annotate({ expected: "a string with at most 4000 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("\\S", "u")).annotate({ expected: "a string matching the RegExp \\S" })).check(Schema.isMaxLength(4e3).annotate({ expected: "a value with a length of at most 4000" })),
1100
+ message: Schema.String.annotate({ description: "What happened and what you expected, in plain language (at most 4000 characters)." }).check(Schema.isMaxCodePoints(4e3).annotate({ expected: "a string with at most 4000 code points" })).check(Schema.isPattern(new globalThis.RegExp("\\S", "u")).annotate({ expected: "a string matching the RegExp \\S" })).check(Schema.isMaxLength(4e3).annotate({ expected: "a value with a length of at most 4000" })),
865
1101
  category: Schema.optionalKey(Schema.Union([Schema.Union([
866
1102
  Schema.Literal("bug"),
867
1103
  Schema.Literal("confusing"),
@@ -920,6 +1156,34 @@ const MailboxSendOutcome = /* @__PURE__ */ (() => Schema.Struct({
920
1156
  message: Schema.String,
921
1157
  error: Schema.optionalKey(Schema.Union([MailboxSendError, Schema.Null]))
922
1158
  }).annotate({ identifier: "MailboxSendOutcome" }))();
1159
+ const WhatsAppTemplateIdContent = /* @__PURE__ */ (() => Schema.Struct({
1160
+ templateId: TemplateId,
1161
+ templateData: Schema.optionalKey(WhatsAppTemplateData),
1162
+ flowToken: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
1163
+ }).annotate({ identifier: "WhatsAppTemplateIdContent" }))();
1164
+ const WhatsAppTemplateSlugContent = /* @__PURE__ */ (() => Schema.Struct({
1165
+ templateSlug: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })),
1166
+ templateData: Schema.optionalKey(WhatsAppTemplateData),
1167
+ flowToken: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
1168
+ }).annotate({ identifier: "WhatsAppTemplateSlugContent" }))();
1169
+ const WhatsAppListSection = /* @__PURE__ */ (() => Schema.Struct({
1170
+ title: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(24).annotate({ expected: "a string with at most 24 code points" })).check(Schema.isMaxLength(24).annotate({ expected: "a value with a length of at most 24" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
1171
+ rows: Schema.Array(WhatsAppListRow).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
1172
+ }).annotate({ identifier: "WhatsAppListSection" }))();
1173
+ const WhatsAppFlowMessage = /* @__PURE__ */ (() => Schema.Struct({
1174
+ type: Schema.Literal("flow"),
1175
+ header: Schema.optionalKey(WhatsAppTextHeader),
1176
+ body: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
1177
+ footer: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" })).check(Schema.isMaxLength(60).annotate({ expected: "a value with a length of at most 60" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
1178
+ flowId: WhatsAppFlowId,
1179
+ cta: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(30).annotate({ expected: "a string with at most 30 code points" })).check(Schema.isMaxLength(30).annotate({ expected: "a value with a length of at most 30" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
1180
+ token: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
1181
+ action: Schema.optionalKey(Schema.Union([Schema.Literal("navigate"), Schema.Literal("data_exchange")])),
1182
+ screen: Schema.optionalKey(Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[A-Za-z_]{1,100}$", "u")).annotate({ expected: "a string matching the RegExp ^[A-Za-z_]{1,100}$" }))),
1183
+ data: Schema.optionalKey(Schema.Record(Schema.String, JsonValue))
1184
+ }).annotate({ identifier: "WhatsAppFlowMessage" }))();
1185
+ const WhatsAppLocationContent = /* @__PURE__ */ (() => Schema.Struct({ location: WhatsAppLocation }).annotate({ identifier: "WhatsAppLocationContent" }))();
1186
+ const WhatsAppContactsContent = /* @__PURE__ */ (() => Schema.Struct({ contacts: Schema.Array(WhatsAppContactCard).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(257).annotate({ expected: "a value with a length of at most 257" })) }).annotate({ identifier: "WhatsAppContactsContent" }))();
923
1187
  const Operation = /* @__PURE__ */ (() => Schema.Struct({
924
1188
  id: OperationId,
925
1189
  organizationId: Schema.String,
@@ -966,12 +1230,12 @@ const Operation = /* @__PURE__ */ (() => Schema.Struct({
966
1230
  }).annotate({ identifier: "Operation" }))();
967
1231
  const OperationResourceLink = /* @__PURE__ */ (() => Schema.Struct({
968
1232
  resource: OperationResource,
969
- href: Schema.String.check(Schema.isMaxCodePoints(500).annotate({ expected: "a string with at most 500 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/v1\\/", "u")).annotate({ expected: "a string matching the RegExp ^\\/v1\\/" })).check(Schema.isMaxLength(500).annotate({ expected: "a value with a length of at most 500" }))
1233
+ href: Schema.String.check(Schema.isMaxCodePoints(500).annotate({ expected: "a string with at most 500 code points" })).check(Schema.isPattern(new globalThis.RegExp("^\\/v1\\/", "u")).annotate({ expected: "a string matching the RegExp ^\\/v1\\/" })).check(Schema.isMaxLength(500).annotate({ expected: "a value with a length of at most 500" }))
970
1234
  }).annotate({ identifier: "OperationResourceLink" }))();
971
1235
  const UpdateTemplatePayload = /* @__PURE__ */ (() => Schema.Struct({ data: Schema.Struct({
972
1236
  name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
973
- slug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
974
- entryPath: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$", "u")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })), Schema.Null])),
1237
+ slug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
1238
+ entryPath: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(new globalThis.RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$", "u")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })), Schema.Null])),
975
1239
  description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
976
1240
  category: Schema.optionalKey(Schema.Union([Schema.Union([
977
1241
  Schema.Literal("transactional"),
@@ -998,8 +1262,9 @@ const ApiKeyAccess = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({ mode:
998
1262
  mailboxes: Schema.optionalKey(Schema.Union([ApiKeyMailboxAccess, Schema.Null])),
999
1263
  namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null]).annotate({ description: "Confines the key to one namespace: it reaches only that namespace's domains, senders, numbers, mailboxes, contacts, templates, and messages, never organization-level ones, and only endpoints that confine to a namespace (others answer 403). It holds grants only on `mailboxes`, `messages`, `email`, `domains`, `contacts`, and `templates`. A key scoped to listed mailboxes holds mailbox access only." }))
1000
1264
  })]).annotate({ identifier: "ApiKeyAccess" }))();
1265
+ const WhatsAppReactionContent = /* @__PURE__ */ (() => Schema.Struct({ reaction: WhatsAppReaction }).annotate({ identifier: "WhatsAppReactionContent" }))();
1001
1266
  const CreateBrand = /* @__PURE__ */ (() => Schema.Struct({
1002
- slug: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$" })),
1267
+ slug: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$" })),
1003
1268
  name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })),
1004
1269
  css: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(32768).annotate({ expected: "a string with at most 32768 code points" })).check(Schema.isMaxLength(32768).annotate({ expected: "a value with a length of at most 32768" })), Schema.Null])),
1005
1270
  assets: Schema.optionalKey(Schema.Union([BrandAssets, Schema.Null])),
@@ -1007,15 +1272,71 @@ const CreateBrand = /* @__PURE__ */ (() => Schema.Struct({
1007
1272
  isDefault: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
1008
1273
  }).annotate({ identifier: "CreateBrand" }))();
1009
1274
  const UpdateBrand = /* @__PURE__ */ (() => Schema.Struct({
1010
- newSlug: Schema.optionalKey(Schema.Union([Schema.String.annotate({ description: "Renames the brand. Projects importing `samva:brand/<old slug>` stop building until they import the new slug." }).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$" })), Schema.Null])),
1275
+ newSlug: Schema.optionalKey(Schema.Union([Schema.String.annotate({ description: "Renames the brand. Projects importing `samva:brand/<old slug>` stop building until they import the new slug." }).check(Schema.isPattern(new globalThis.RegExp("^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$" })), Schema.Null])),
1011
1276
  name: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null])),
1012
1277
  css: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(32768).annotate({ expected: "a string with at most 32768 code points" })).check(Schema.isMaxLength(32768).annotate({ expected: "a value with a length of at most 32768" })), Schema.Null])),
1013
1278
  assets: Schema.optionalKey(Schema.Union([BrandAssets, Schema.Null])),
1014
1279
  footer: Schema.optionalKey(Schema.Union([BrandFooter, Schema.Null]))
1015
1280
  }).annotate({ identifier: "UpdateBrand" }))();
1016
1281
  const EmailAttachments = /* @__PURE__ */ (() => Schema.Union([Schema.Array(EmailAttachment).check(Schema.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" })), Schema.Null]).annotate({ identifier: "EmailAttachments" }))();
1282
+ const CreateMailboxEmailDraftPayload = /* @__PURE__ */ (() => Schema.Struct({
1283
+ channel: Schema.optionalKey(Schema.Union([Schema.Literal("email"), Schema.Null])),
1284
+ endpointId: Schema.optionalKey(Schema.Union([MailboxEndpointId, Schema.Null])),
1285
+ to: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1286
+ cc: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1287
+ bcc: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1288
+ replyTo: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1289
+ subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1290
+ text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1291
+ html: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1292
+ attachments: Schema.optionalKey(Schema.Union([Schema.Array(EmailAttachment).check(Schema.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" })), Schema.Null])),
1293
+ inReplyToMessageId: Schema.optionalKey(Schema.Union([MessageId, Schema.Null]))
1294
+ }).annotate({ identifier: "CreateMailboxEmailDraftPayload" }))();
1295
+ const SendMailboxEmailPayload = /* @__PURE__ */ (() => Schema.Struct({
1296
+ channel: Schema.optionalKey(Schema.Union([Schema.Literal("email"), Schema.Null])),
1297
+ to: Schema.TupleWithRest(Schema.Tuple([Schema.String]), [Schema.String]),
1298
+ cc: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1299
+ bcc: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1300
+ replyTo: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1301
+ subject: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
1302
+ text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1303
+ html: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1304
+ attachments: Schema.optionalKey(Schema.Union([Schema.Array(EmailAttachment).check(Schema.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" })), Schema.Null]))
1305
+ }).annotate({ identifier: "SendMailboxEmailPayload" }))();
1306
+ const ReplyMailboxEmailPayload = /* @__PURE__ */ (() => Schema.Struct({
1307
+ channel: Schema.optionalKey(Schema.Union([Schema.Literal("email"), Schema.Null])),
1308
+ cc: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1309
+ bcc: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1310
+ text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1311
+ html: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1312
+ attachments: Schema.optionalKey(Schema.Union([Schema.Array(EmailAttachment).check(Schema.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" })), Schema.Null]))
1313
+ }).annotate({ identifier: "ReplyMailboxEmailPayload" }))();
1314
+ const WhatsAppImage = /* @__PURE__ */ (() => Schema.Union([WhatsAppImageLink, WhatsAppImageUpload]).annotate({ identifier: "WhatsAppImage" }))();
1315
+ const WhatsAppVideo = /* @__PURE__ */ (() => Schema.Union([WhatsAppVideoLink, WhatsAppVideoUpload]).annotate({ identifier: "WhatsAppVideo" }))();
1316
+ const WhatsAppAudio = /* @__PURE__ */ (() => Schema.Union([WhatsAppAudioLink, WhatsAppAudioUpload]).annotate({ identifier: "WhatsAppAudio" }))();
1317
+ const WhatsAppDocument = /* @__PURE__ */ (() => Schema.Union([WhatsAppDocumentLink, WhatsAppDocumentUpload]).annotate({ identifier: "WhatsAppDocument" }))();
1318
+ const WhatsAppSticker = /* @__PURE__ */ (() => Schema.Union([WhatsAppStickerLink, WhatsAppStickerUpload]).annotate({ identifier: "WhatsAppSticker" }))();
1319
+ const WhatsAppImageHeader = /* @__PURE__ */ (() => Schema.Union([WhatsAppImageHeaderLink, WhatsAppImageHeaderUpload]).annotate({ identifier: "WhatsAppImageHeader" }))();
1320
+ const WhatsAppVideoHeader = /* @__PURE__ */ (() => Schema.Union([WhatsAppVideoHeaderLink, WhatsAppVideoHeaderUpload]).annotate({ identifier: "WhatsAppVideoHeader" }))();
1321
+ const WhatsAppDocumentHeader = /* @__PURE__ */ (() => Schema.Union([WhatsAppDocumentHeaderLink, WhatsAppDocumentHeaderUpload]).annotate({ identifier: "WhatsAppDocumentHeader" }))();
1322
+ const SmsContent = /* @__PURE__ */ (() => Schema.Struct({
1323
+ text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1324
+ templateId: Schema.optionalKey(Schema.Union([TemplateId, Schema.Null])),
1325
+ templateSlug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
1326
+ templateData: Schema.optionalKey(SmsTemplateData)
1327
+ }).annotate({ identifier: "SmsContent" }))();
1328
+ const SmsDispatchContent = /* @__PURE__ */ (() => Schema.Struct({
1329
+ text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1330
+ templateId: Schema.optionalKey(Schema.Union([TemplateId, Schema.Null])),
1331
+ templateSlug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
1332
+ templateData: Schema.optionalKey(SmsTemplateData)
1333
+ }).annotate({ identifier: "SmsDispatchContent" }))();
1017
1334
  const ContactIdentityChannel = /* @__PURE__ */ (() => Schema.Struct({
1018
- channel: Schema.Literal("email"),
1335
+ channel: Schema.Union([
1336
+ Schema.Literal("sms"),
1337
+ Schema.Literal("whatsapp"),
1338
+ Schema.Literal("email")
1339
+ ]),
1019
1340
  reachability: Schema.Union([
1020
1341
  Schema.Literal("unknown"),
1021
1342
  Schema.Literal("reachable"),
@@ -1023,9 +1344,13 @@ const ContactIdentityChannel = /* @__PURE__ */ (() => Schema.Struct({
1023
1344
  ]),
1024
1345
  consent: Schema.Union([ContactConsent, Schema.Null])
1025
1346
  }).annotate({ identifier: "ContactIdentityChannel" }))();
1347
+ const WhatsAppTemplateBindings = /* @__PURE__ */ (() => Schema.Record(Schema.String, WhatsAppTemplateBinding).annotate({ description: "Template parameters filled per recipient: parameter name to the contact field it reads." }).check(Schema.isPropertyNames(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))).annotate({
1348
+ expected: "an object with property names matching the schema",
1349
+ identifier: "WhatsAppTemplateBindings"
1350
+ })))();
1026
1351
  const CreateEventPayload = /* @__PURE__ */ (() => Schema.Struct({
1027
1352
  contact: ContactEventReference,
1028
- name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!(?:[Cc][Oo][Nn][Tt][Aa][Cc][Tt]|[Ss][Aa][Mm][Vv][Aa])\\.)[A-Za-z][A-Za-z0-9_.-]*$")).annotate({ expected: "a string matching the RegExp ^(?!(?:[Cc][Oo][Nn][Tt][Aa][Cc][Tt]|[Ss][Aa][Mm][Vv][Aa])\\.)[A-Za-z][A-Za-z0-9_.-]*$" })),
1353
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })).check(Schema.isPattern(new globalThis.RegExp("^(?!(?:[Cc][Oo][Nn][Tt][Aa][Cc][Tt]|[Ss][Aa][Mm][Vv][Aa])\\.)[A-Za-z][A-Za-z0-9_.-]*$")).annotate({ expected: "a string matching the RegExp ^(?!(?:[Cc][Oo][Nn][Tt][Aa][Cc][Tt]|[Ss][Aa][Mm][Vv][Aa])\\.)[A-Za-z][A-Za-z0-9_.-]*$" })),
1029
1354
  properties: Schema.optionalKey(Schema.Union([JsonObject, Schema.Null])),
1030
1355
  occurredAt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
1031
1356
  }).annotate({ identifier: "CreateEventPayload" }))();
@@ -1035,6 +1360,14 @@ const EmailRecipients = /* @__PURE__ */ (() => Schema.Array(EmailRecipient).chec
1035
1360
  })))();
1036
1361
  const EmailCcRecipients = /* @__PURE__ */ (() => Schema.Union([Schema.Array(EmailRecipient), Schema.Null]).annotate({ identifier: "EmailCcRecipients" }))();
1037
1362
  const EmailBccRecipients = /* @__PURE__ */ (() => Schema.Union([Schema.Array(EmailRecipient), Schema.Null]).annotate({ identifier: "EmailBccRecipients" }))();
1363
+ const SmsRecipients = /* @__PURE__ */ (() => Schema.Array(SmsRecipient).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(1).annotate({
1364
+ expected: "a value with a length of at most 1",
1365
+ identifier: "SmsRecipients"
1366
+ })))();
1367
+ const WhatsAppRecipients = /* @__PURE__ */ (() => Schema.Array(WhatsAppRecipient).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(1).annotate({
1368
+ expected: "a value with a length of at most 1",
1369
+ identifier: "WhatsAppRecipients"
1370
+ })))();
1038
1371
  const TopicContactRef = /* @__PURE__ */ (() => Schema.Union([
1039
1372
  TopicContactById,
1040
1373
  TopicContactByEmail,
@@ -1127,20 +1460,30 @@ const MailboxSendReceipt = /* @__PURE__ */ (() => Schema.Struct({
1127
1460
  createdAt: Schema.String,
1128
1461
  updatedAt: Schema.String
1129
1462
  }).annotate({ identifier: "MailboxSendReceipt" }))();
1463
+ const WhatsAppListMessage = /* @__PURE__ */ (() => Schema.Struct({
1464
+ type: Schema.Literal("list"),
1465
+ header: Schema.optionalKey(WhatsAppTextHeader),
1466
+ body: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(4096).annotate({ expected: "a string with at most 4096 code points" })).check(Schema.isMaxLength(4096).annotate({ expected: "a value with a length of at most 4096" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
1467
+ footer: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" })).check(Schema.isMaxLength(60).annotate({ expected: "a value with a length of at most 60" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
1468
+ button: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(20).annotate({ expected: "a string with at most 20 code points" })).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
1469
+ sections: Schema.Array(WhatsAppListSection).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" }))
1470
+ }).annotate({ identifier: "WhatsAppListMessage" }))();
1130
1471
  const OperationAccepted = /* @__PURE__ */ (() => Schema.Struct({
1131
1472
  operation: Operation,
1132
1473
  links: Schema.Struct({
1133
- self: Schema.String.check(Schema.isMaxCodePoints(500).annotate({ expected: "a string with at most 500 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/v1\\/", "u")).annotate({ expected: "a string matching the RegExp ^\\/v1\\/" })).check(Schema.isMaxLength(500).annotate({ expected: "a value with a length of at most 500" })),
1474
+ self: Schema.String.check(Schema.isMaxCodePoints(500).annotate({ expected: "a string with at most 500 code points" })).check(Schema.isPattern(new globalThis.RegExp("^\\/v1\\/", "u")).annotate({ expected: "a string matching the RegExp ^\\/v1\\/" })).check(Schema.isMaxLength(500).annotate({ expected: "a value with a length of at most 500" })),
1134
1475
  resource: OperationResourceLink
1135
1476
  })
1136
1477
  }).annotate({ identifier: "OperationAccepted" }))();
1137
1478
  const AgentDefinition = /* @__PURE__ */ (() => Schema.Struct({
1138
1479
  instructions: Schema.String.check(Schema.isMaxCodePoints(2e4).annotate({ expected: "a string with at most 20000 code points" })).check(Schema.isMaxLength(2e4).annotate({ expected: "a value with a length of at most 20000" })),
1139
1480
  knowledge: Schema.String.check(Schema.isMaxCodePoints(1e5).annotate({ expected: "a string with at most 100000 code points" })).check(Schema.isMaxLength(1e5).annotate({ expected: "a value with a length of at most 100000" })),
1481
+ knowledgeSourceIds: Schema.optionalKey(Schema.Array(KnowledgeSourceId).check(Schema.isMaxLength(25).annotate({ expected: "a value with a length of at most 25" }))),
1140
1482
  endpointIds: Schema.Array(MailboxEndpointId).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })),
1141
1483
  integrations: Schema.Array(AgentIntegrationGrant).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })),
1142
1484
  mode: AgentMode,
1143
- model: AgentModel,
1485
+ model: AgentModelChoice,
1486
+ reasoning: AgentReasoning,
1144
1487
  workingHours: Schema.Union([WorkingHours, Schema.Null]),
1145
1488
  takeoverTimeoutMinutes: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(10080).annotate({ expected: "a value less than or equal to 10080" }))
1146
1489
  }).annotate({ identifier: "AgentDefinition" }))();
@@ -1152,7 +1495,7 @@ const CampaignEmailInput = /* @__PURE__ */ (() => Schema.Struct({
1152
1495
  publicationId: Schema.optionalKey(TemplatePublicationId),
1153
1496
  inputContractId: Schema.optionalKey(TemplateInputContractId),
1154
1497
  templateId: Schema.optionalKey(Schema.Union([TemplateId, Schema.Null])),
1155
- templateSlug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
1498
+ templateSlug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
1156
1499
  templateData: Schema.optionalKey(TemplateData),
1157
1500
  locale: Schema.optionalKey(RenderLocale),
1158
1501
  timeZone: Schema.optionalKey(RenderTimeZone),
@@ -1172,7 +1515,7 @@ const EmailContent = /* @__PURE__ */ (() => Schema.Struct({
1172
1515
  publicationId: Schema.optionalKey(TemplatePublicationId),
1173
1516
  inputContractId: Schema.optionalKey(TemplateInputContractId),
1174
1517
  templateId: Schema.optionalKey(Schema.Union([TemplateId, Schema.Null])),
1175
- templateSlug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
1518
+ templateSlug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
1176
1519
  templateData: Schema.optionalKey(TemplateData),
1177
1520
  locale: Schema.optionalKey(RenderLocale),
1178
1521
  timeZone: Schema.optionalKey(RenderTimeZone),
@@ -1183,6 +1526,25 @@ const EmailContent = /* @__PURE__ */ (() => Schema.Struct({
1183
1526
  footer: Schema.optionalKey(EmailFooterOverride),
1184
1527
  headers: Schema.optionalKey(Schema.Union([EmailCustomHeaders, Schema.Null]))
1185
1528
  }).annotate({ identifier: "EmailContent" }))();
1529
+ const WhatsAppOutboundMedia = /* @__PURE__ */ (() => Schema.Union([
1530
+ WhatsAppImage,
1531
+ WhatsAppVideo,
1532
+ WhatsAppAudio,
1533
+ WhatsAppDocument,
1534
+ WhatsAppSticker
1535
+ ]).annotate({ identifier: "WhatsAppOutboundMedia" }))();
1536
+ const WhatsAppInteractiveHeader = /* @__PURE__ */ (() => Schema.Union([
1537
+ WhatsAppTextHeader,
1538
+ WhatsAppImageHeader,
1539
+ WhatsAppVideoHeader,
1540
+ WhatsAppDocumentHeader
1541
+ ]).annotate({ identifier: "WhatsAppInteractiveHeader" }))();
1542
+ const SmsCampaignContentInput = /* @__PURE__ */ (() => Schema.Struct({
1543
+ channel: Schema.Literal("sms"),
1544
+ sms: SmsDispatchContent,
1545
+ conversationId: Schema.optionalKey(CampaignConversationRef),
1546
+ metadata: Schema.optionalKey(CampaignContentMetadata)
1547
+ }).annotate({ identifier: "SmsCampaignContentInput" }))();
1186
1548
  const ContactIdentity = /* @__PURE__ */ (() => Schema.Struct({
1187
1549
  id: ContactIdentityId,
1188
1550
  type: Schema.Union([Schema.Literal("email"), Schema.Literal("phone")]),
@@ -1190,6 +1552,22 @@ const ContactIdentity = /* @__PURE__ */ (() => Schema.Struct({
1190
1552
  verified: Schema.Boolean,
1191
1553
  channels: Schema.Array(ContactIdentityChannel)
1192
1554
  }).annotate({ identifier: "ContactIdentity" }))();
1555
+ const WhatsAppTemplateDispatch = /* @__PURE__ */ (() => Schema.Struct({
1556
+ template: Schema.Union([TemplateId, Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" }))]),
1557
+ templateData: Schema.optionalKey(WhatsAppTemplateDispatchData),
1558
+ bindings: Schema.optionalKey(WhatsAppTemplateBindings),
1559
+ businessAccountId: Schema.optionalKey(WhatsAppBusinessAccountId)
1560
+ }).annotate({ identifier: "WhatsAppTemplateDispatch" }))();
1561
+ const SmsSendMessagePayload = /* @__PURE__ */ (() => Schema.Struct({
1562
+ conversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
1563
+ metadata: Schema.optionalKey(MessageMetadata),
1564
+ channel: Schema.Literal("sms"),
1565
+ to: SmsRecipients,
1566
+ sms: SmsContent
1567
+ }).annotate({
1568
+ description: "The payload is accepted by the contract today and the endpoint answers 403 until the channel launches for your organization.",
1569
+ identifier: "SmsSendMessagePayload"
1570
+ }))();
1193
1571
  const JourneyWaitForEventNode = /* @__PURE__ */ (() => Schema.Struct({
1194
1572
  type: Schema.Literal("wait_for_event"),
1195
1573
  config: JourneyWaitForEventConfig,
@@ -1211,33 +1589,96 @@ var MailboxSendConflictError = class extends Schema.TaggedError()("MailboxSendCo
1211
1589
  id: MailboxActionId,
1212
1590
  receipt: MailboxSendReceipt
1213
1591
  })) {};
1214
- const CampaignContentInput = /* @__PURE__ */ (() => Schema.Struct({
1592
+ const EmailCampaignContentInput = /* @__PURE__ */ (() => Schema.Struct({
1215
1593
  channel: Schema.Literal("email"),
1216
1594
  email: CampaignEmailInput,
1217
1595
  issue: Schema.optionalKey(Schema.Union([Schema.Struct({
1218
- path: Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?!.*\\p{Cc})issues\\/(?:[^/]+\\/)*[^/]+\\.md$", "u")).annotate({ expected: "a string matching the RegExp ^(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?!.*\\p{Cc})issues\\/(?:[^/]+\\/)*[^/]+\\.md$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
1219
- commit: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" }))
1596
+ path: Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(new globalThis.RegExp("^(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?!.*\\p{Cc})issues\\/(?:[^/]+\\/)*[^/]+\\.md$", "u")).annotate({ expected: "a string matching the RegExp ^(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?!.*\\p{Cc})issues\\/(?:[^/]+\\/)*[^/]+\\.md$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
1597
+ commit: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" }))
1220
1598
  }), Schema.Null]).annotate({ description: "Render a saved Markdown issue from the audience topic's repository. Its saved title and preheader supply the email content; templateData supplies recipient fallbacks." })),
1221
1599
  from: Schema.optionalKey(CampaignFromInput),
1222
1600
  replyMailboxId: Schema.optionalKey(CampaignReplyMailbox),
1223
1601
  conversationId: Schema.optionalKey(CampaignConversationRef),
1224
1602
  metadata: Schema.optionalKey(CampaignContentMetadata)
1225
- }).annotate({ identifier: "CampaignContentInput" }))();
1603
+ }).annotate({ identifier: "EmailCampaignContentInput" }))();
1604
+ const EmailSendMessagePayload = /* @__PURE__ */ (() => Schema.Struct({
1605
+ conversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
1606
+ metadata: Schema.optionalKey(MessageMetadata),
1607
+ channel: Schema.Literal("email"),
1608
+ to: EmailRecipients,
1609
+ cc: Schema.optionalKey(EmailCcRecipients),
1610
+ bcc: Schema.optionalKey(EmailBccRecipients),
1611
+ from: Schema.optionalKey(EmailSender),
1612
+ email: EmailContent
1613
+ }).annotate({ identifier: "EmailSendMessagePayload" }))();
1614
+ const WhatsAppMediaContent = /* @__PURE__ */ (() => Schema.Struct({ media: WhatsAppOutboundMedia }).annotate({ identifier: "WhatsAppMediaContent" }))();
1615
+ const WhatsAppButtonsMessage = /* @__PURE__ */ (() => Schema.Struct({
1616
+ type: Schema.Literal("buttons"),
1617
+ header: Schema.optionalKey(WhatsAppInteractiveHeader),
1618
+ body: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
1619
+ footer: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" })).check(Schema.isMaxLength(60).annotate({ expected: "a value with a length of at most 60" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
1620
+ buttons: Schema.Array(WhatsAppReplyButton).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(3).annotate({ expected: "a value with a length of at most 3" }))
1621
+ }).annotate({ identifier: "WhatsAppButtonsMessage" }))();
1622
+ const WhatsAppCtaUrlMessage = /* @__PURE__ */ (() => Schema.Struct({
1623
+ type: Schema.Literal("cta_url"),
1624
+ header: Schema.optionalKey(WhatsAppInteractiveHeader),
1625
+ body: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
1626
+ footer: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" })).check(Schema.isMaxLength(60).annotate({ expected: "a value with a length of at most 60" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
1627
+ displayText: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(20).annotate({ expected: "a string with at most 20 code points" })).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
1628
+ url: Schema.String
1629
+ }).annotate({ identifier: "WhatsAppCtaUrlMessage" }))();
1630
+ const WhatsAppCampaignContentInput = /* @__PURE__ */ (() => Schema.Struct({
1631
+ channel: Schema.Literal("whatsapp"),
1632
+ whatsapp: WhatsAppTemplateDispatch,
1633
+ conversationId: Schema.optionalKey(CampaignConversationRef),
1634
+ metadata: Schema.optionalKey(CampaignContentMetadata)
1635
+ }).annotate({ identifier: "WhatsAppCampaignContentInput" }))();
1636
+ const WhatsAppJourneySendNode = /* @__PURE__ */ (() => Schema.Struct({
1637
+ type: Schema.Literal("send_whatsapp"),
1638
+ config: WhatsAppTemplateDispatch,
1639
+ next: Schema.Tuple([JourneyNextEdge])
1640
+ }).annotate({ identifier: "WhatsAppJourneySendNode" }))();
1226
1641
  const JourneyCondition = /* @__PURE__ */ (() => Schema.Struct({
1227
1642
  match: Schema.Union([Schema.Literal("all"), Schema.Literal("any")]),
1228
1643
  predicates: Schema.TupleWithRest(Schema.Tuple([JourneyPredicate]), [JourneyPredicate])
1229
1644
  }).annotate({ identifier: "JourneyCondition" }))();
1645
+ const WhatsAppInteractive = /* @__PURE__ */ (() => Schema.Union([
1646
+ WhatsAppButtonsMessage,
1647
+ WhatsAppListMessage,
1648
+ WhatsAppCtaUrlMessage,
1649
+ WhatsAppFlowMessage
1650
+ ]).annotate({ identifier: "WhatsAppInteractive" }))();
1651
+ const CampaignContentInput = /* @__PURE__ */ (() => Schema.Union([
1652
+ EmailCampaignContentInput,
1653
+ SmsCampaignContentInput,
1654
+ WhatsAppCampaignContentInput
1655
+ ]).annotate({ identifier: "CampaignContentInput" }))();
1230
1656
  const JourneyBranchEdge = /* @__PURE__ */ (() => Schema.Struct({
1231
1657
  nodeId: JourneyNodeId,
1232
1658
  condition: Schema.optionalKey(JourneyCondition)
1233
1659
  }).annotate({ identifier: "JourneyBranchEdge" }))();
1660
+ const WhatsAppInteractiveContent = /* @__PURE__ */ (() => Schema.Struct({ interactive: WhatsAppInteractive }).annotate({ identifier: "WhatsAppInteractiveContent" }))();
1234
1661
  const JourneyBranchNode = /* @__PURE__ */ (() => Schema.Struct({
1235
1662
  type: Schema.Literal("branch"),
1236
1663
  config: JourneyEmptyConfig,
1237
1664
  next: Schema.Array(JourneyBranchEdge).check(Schema.isMinLength(2).annotate({ expected: "a value with a length of at least 2" }))
1238
1665
  }).annotate({ identifier: "JourneyBranchNode" }))();
1666
+ const WhatsAppContent = /* @__PURE__ */ (() => Schema.Union([
1667
+ WhatsAppTextContent,
1668
+ WhatsAppTemplateIdContent,
1669
+ WhatsAppTemplateSlugContent,
1670
+ WhatsAppMediaContent,
1671
+ WhatsAppInteractiveContent,
1672
+ WhatsAppReactionContent,
1673
+ WhatsAppLocationContent,
1674
+ WhatsAppContactsContent
1675
+ ]).annotate({
1676
+ description: "Exactly one content source: text, an approved template (by id or slug, with its templateData), media, an interactive message (reply buttons, a list, a call-to-action link, or a flow), a reaction, a location, or contacts. Everything except a template needs the recipient's 24-hour customer service window to be open.",
1677
+ identifier: "WhatsAppContent"
1678
+ }))();
1239
1679
  const JourneyNode = /* @__PURE__ */ (() => Schema.Union([
1240
1680
  JourneySendEmailNode,
1681
+ WhatsAppJourneySendNode,
1241
1682
  JourneyWaitNode,
1242
1683
  JourneyWaitForEventNode,
1243
1684
  JourneyBranchNode,
@@ -1245,6 +1686,16 @@ const JourneyNode = /* @__PURE__ */ (() => Schema.Union([
1245
1686
  JourneyWebhookNode,
1246
1687
  JourneyExitNode
1247
1688
  ]).annotate({ identifier: "JourneyNode" }))();
1689
+ const WhatsAppSendMessagePayload = /* @__PURE__ */ (() => Schema.Struct({
1690
+ conversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
1691
+ metadata: Schema.optionalKey(MessageMetadata),
1692
+ channel: Schema.Literal("whatsapp"),
1693
+ to: WhatsAppRecipients,
1694
+ whatsapp: WhatsAppContent
1695
+ }).annotate({
1696
+ description: "The payload is accepted by the contract today and the endpoint answers 403 until the channel launches for your organization.",
1697
+ identifier: "WhatsAppSendMessagePayload"
1698
+ }))();
1248
1699
  const JourneyDefinition = /* @__PURE__ */ (() => Schema.Struct({
1249
1700
  trigger: JourneyTrigger,
1250
1701
  rootNodeId: JourneyNodeId,
@@ -1265,6 +1716,6 @@ const ApiKeySecurity = HttpApiSecurity.apiKey({
1265
1716
  in: "header"
1266
1717
  });
1267
1718
  var ApiKeySecurityMiddleware = class extends HttpApiMiddleware.Service()("apiKey security", { security: { apiKey: ApiKeySecurity } }) {};
1268
- export { AgentDefinition, AgentIntegrationGrant, AgentMode, AgentModel, AgentName, AgentToolScope, AnalyticsQueryError, ApiKeyAccess, ApiKeyId, ApiKeyMailboxAccess, ApiKeyResourceAccess, ApiKeySecurity, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, BrandAddress, BrandAddressRequiredError, BrandAssets, BrandFooter, BrandSocialLink, CampaignAudience, CampaignContentInput, CampaignContentMetadata, CampaignConversationRef, CampaignEmailInput, CampaignFooterRequiredError, CampaignFromInput, CampaignId, CampaignLatestRun, CampaignReplyMailbox, CampaignRunId, ClockTime, ConflictError, ContactConsent, ContactEvent, ContactEventReference, ContactGroupId, ContactId, ContactIdentity, ContactIdentityChannel, ContactIdentityId, ConversationId, CreateBrand, CreateEventPayload, CreateMailboxEndpointPayload, CreateTemplatePayload, CreateWebhookPayload, Cursor, DeliveryUnavailableError, EmailAttachment, EmailAttachments, EmailBccRecipients, EmailCcRecipients, EmailChannelError, EmailContent, EmailCustomHeaders, EmailDomainId, EmailFooterOverride, EmailRecipient, EmailRecipients, EmailSender, EmailSenderId, EmailTrackingOverrideV1, ExtensionId, ExtensionVersionId, ExtensionVersionRef, ExternalServiceError, FeedbackContext, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, IntegrationId, InternalError, JourneyBranchEdge, JourneyBranchNode, JourneyComparison, JourneyCondition, JourneyContactCreatedTrigger, JourneyContactProperty, JourneyCustomEventName, JourneyCustomEventTrigger, JourneyCustomFieldPredicate, JourneyDefinition, JourneyEmptyConfig, JourneyEqualityComparison, JourneyEventName, JourneyEventPredicate, JourneyExitNode, JourneyGoal, JourneyGroupJoinedTrigger, JourneyName, JourneyNextEdge, JourneyNode, JourneyNodeId, JourneyNumericComparison, JourneyPredicate, JourneyPresenceComparison, JourneyPropertyPredicate, JourneySendEmailConfig, JourneySendEmailNode, JourneyStringComparison, JourneyTagAddedTrigger, JourneyTagPredicate, JourneyTrigger, JourneyUpdateTagsConfig, JourneyUpdateTagsNode, JourneyWaitConfig, JourneyWaitEventEdge, JourneyWaitForEventConfig, JourneyWaitForEventNode, JourneyWaitNode, JourneyWebhookConfig, JourneyWebhookNode, JsonObject, JsonValue, MailboxActionDecision, MailboxActionId, MailboxChannel, MailboxDraftId, MailboxEndpointId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxPolicyId, MailboxPolicyOutcomeKind, MailboxSendConflictError, MailboxSendError, MailboxSendMode, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MediaId, MessageId, MessageMetadata, MessagePage, MessageSummary, NamespaceId, NamespaceMetadata, NamespaceResourceType, NewsletterId, OnboardingReviewRequiredError, Operation, OperationAccepted, OperationId, OperationResource, OperationResourceLink, OrganizationId, PaymentRequiredError, RateLimitedError, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SendFeedback, SenderNotReadyError, SendsSeries, ServiceUnavailableError, SkippedRecipient, SuccessResponse, TemplateData, TemplateFromDefault, TemplateId, TemplateInputContractId, TemplateProjectId, TemplatePublicationId, TemplateSourceError, TemplateTrackingDefault, TestWebhookPayload, TimeZone, TopicContactByEmail, TopicContactById, TopicContactByPhone, TopicContactRef, TopicId, UnauthorizedError, UpdateBrand, UpdateTemplatePayload, UpdateWebhookPayload, UserId, ValidationError, VersionCursor, WebhookEndpointId, Weekday, WorkingHours, WorkingHoursRange, AbsoluteInstant as __SamvaRuntimeAbsoluteInstant, SensitiveString as __SamvaRuntimeSensitiveString };
1719
+ export { AgentDefinition, AgentIntegrationGrant, AgentMode, AgentModel, AgentModelChoice, AgentName, AgentReasoning, AgentToolScope, AnalyticsQueryError, ApiKeyAccess, ApiKeyId, ApiKeyMailboxAccess, ApiKeyResourceAccess, ApiKeySecurity, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, BrandAddress, BrandAddressRequiredError, BrandAssets, BrandFooter, BrandSocialLink, CampaignAudience, CampaignContentInput, CampaignContentMetadata, CampaignConversationRef, CampaignEmailInput, CampaignFooterRequiredError, CampaignFromInput, CampaignId, CampaignLatestRun, CampaignReplyMailbox, CampaignRunId, CatalogModelId, ClockTime, ConflictError, ContactConsent, ContactEvent, ContactEventReference, ContactGroupId, ContactId, ContactIdentity, ContactIdentityChannel, ContactIdentityId, ConversationId, CreateBrand, CreateEventPayload, CreateMailboxChatDraftPayload, CreateMailboxEmailDraftPayload, CreateMailboxEndpointPayload, CreateTemplatePayload, CreateWebhookPayload, DeliveryUnavailableError, EmailAttachment, EmailAttachments, EmailBccRecipients, EmailCampaignContentInput, EmailCcRecipients, EmailChannelError, EmailContent, EmailCustomHeaders, EmailDomainId, EmailFooterOverride, EmailRecipient, EmailRecipients, EmailSendMessagePayload, EmailSender, EmailSenderId, EmailTrackingOverrideV1, ExtensionId, ExtensionVersionId, ExtensionVersionRef, ExternalServiceError, FeedbackContext, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, IntegrationId, InternalError, JourneyBranchEdge, JourneyBranchNode, JourneyComparison, JourneyCondition, JourneyContactCreatedTrigger, JourneyContactProperty, JourneyCustomEventName, JourneyCustomEventTrigger, JourneyCustomFieldPredicate, JourneyDefinition, JourneyEmptyConfig, JourneyEqualityComparison, JourneyEventName, JourneyEventPredicate, JourneyExitNode, JourneyGoal, JourneyGroupJoinedTrigger, JourneyName, JourneyNextEdge, JourneyNode, JourneyNodeId, JourneyNumericComparison, JourneyPredicate, JourneyPresenceComparison, JourneyPropertyPredicate, JourneySendEmailConfig, JourneySendEmailNode, JourneyStringComparison, JourneyTagAddedTrigger, JourneyTagPredicate, JourneyTrigger, JourneyUpdateTagsConfig, JourneyUpdateTagsNode, JourneyWaitConfig, JourneyWaitEventEdge, JourneyWaitForEventConfig, JourneyWaitForEventNode, JourneyWaitNode, JourneyWebhookConfig, JourneyWebhookNode, JsonObject, JsonValue, KnowledgeSourceId, MailboxActionDecision, MailboxActionId, MailboxChannel, MailboxDraftId, MailboxEndpointId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxPolicyId, MailboxPolicyOutcomeKind, MailboxSendConflictError, MailboxSendError, MailboxSendMode, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MalformedRequestError, MediaId, MessageId, MessageMetadata, MessagePage, MessageSummary, MonthlySpendCapDollars, NamespaceId, NamespaceMetadata, NamespaceResourceType, NewsletterId, OnboardingReviewRequiredError, Operation, OperationAccepted, OperationId, OperationResource, OperationResourceLink, OrganizationId, PaymentRequiredError, RateLimitedError, RenderLocale, RenderTimeZone, ReplyMailboxChatPayload, ReplyMailboxEmailPayload, ReplyToAddresses, ResourceNotFoundError, SendFeedback, SendMailboxChatPayload, SendMailboxEmailPayload, SenderNotReadyError, SendsSeries, ServiceUnavailableError, SkippedRecipient, SmsCampaignContentInput, SmsContent, SmsDispatchContent, SmsRecipient, SmsRecipients, SmsSendMessagePayload, SmsTemplateData, SuccessResponse, TemplateData, TemplateFromDefault, TemplateId, TemplateInputContractId, TemplateProjectId, TemplatePublicationId, TemplateSourceError, TemplateTrackingDefault, TestWebhookPayload, TimeZone, TopicContactByEmail, TopicContactById, TopicContactByPhone, TopicContactRef, TopicId, UnauthorizedError, UpdateBrand, UpdateTemplatePayload, UpdateWebhookPayload, UserId, ValidationError, WebhookEndpointId, Weekday, WhatsAppAudio, WhatsAppAudioLink, WhatsAppAudioUpload, WhatsAppBusinessAccountId, WhatsAppButtonsMessage, WhatsAppCampaignContentInput, WhatsAppContactCard, WhatsAppContactsContent, WhatsAppContent, WhatsAppCtaUrlMessage, WhatsAppDocument, WhatsAppDocumentHeader, WhatsAppDocumentHeaderLink, WhatsAppDocumentHeaderUpload, WhatsAppDocumentLink, WhatsAppDocumentUpload, WhatsAppFlowId, WhatsAppFlowMessage, WhatsAppImage, WhatsAppImageHeader, WhatsAppImageHeaderLink, WhatsAppImageHeaderUpload, WhatsAppImageLink, WhatsAppImageUpload, WhatsAppInteractive, WhatsAppInteractiveContent, WhatsAppInteractiveHeader, WhatsAppJourneySendNode, WhatsAppListMessage, WhatsAppListRow, WhatsAppListSection, WhatsAppLocation, WhatsAppLocationContent, WhatsAppMediaContent, WhatsAppOutboundMedia, WhatsAppReaction, WhatsAppReactionContent, WhatsAppRecipient, WhatsAppRecipients, WhatsAppReplyButton, WhatsAppSendMessagePayload, WhatsAppServiceWindowClosedError, WhatsAppSticker, WhatsAppStickerLink, WhatsAppStickerUpload, WhatsAppTemplateBinding, WhatsAppTemplateBindings, WhatsAppTemplateContactBinding, WhatsAppTemplateCustomFieldBinding, WhatsAppTemplateData, WhatsAppTemplateDispatch, WhatsAppTemplateDispatchData, WhatsAppTemplateIdContent, WhatsAppTemplateSlugContent, WhatsAppTextContent, WhatsAppTextHeader, WhatsAppVideo, WhatsAppVideoHeader, WhatsAppVideoHeaderLink, WhatsAppVideoHeaderUpload, WhatsAppVideoLink, WhatsAppVideoUpload, WorkingHours, WorkingHoursRange, AbsoluteInstant as __SamvaRuntimeAbsoluteInstant, SensitiveString as __SamvaRuntimeSensitiveString };
1269
1720
 
1270
1721
  //# sourceMappingURL=shared.js.map