samva 0.54.0 → 0.56.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 (151) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +1 -0
  3. package/dist/_virtual/_rolldown/runtime.js +4 -4
  4. package/dist/agent/index.js +1 -1
  5. package/dist/client/client/client.gen.js +1 -2
  6. package/dist/client/client/utils.gen.js +1 -1
  7. package/dist/client/client.gen.js +1 -1
  8. package/dist/client/sdk.gen.d.ts +69 -6
  9. package/dist/client/sdk.gen.js +216 -9
  10. package/dist/client/types.gen.d.ts +486 -7
  11. package/dist/client-attribution.js +1 -1
  12. package/dist/effect/agents.js +1 -1
  13. package/dist/effect/analytics.js +1 -1
  14. package/dist/effect/api-keys.js +1 -1
  15. package/dist/effect/approval-requests.js +1 -1
  16. package/dist/effect/attachments.js +1 -1
  17. package/dist/effect/brands.js +2 -2
  18. package/dist/effect/campaigns.d.ts +66 -56
  19. package/dist/effect/campaigns.js +1 -1
  20. package/dist/effect/categories.js +6 -6
  21. package/dist/effect/contact-groups.js +1 -1
  22. package/dist/effect/contacts.js +1 -1
  23. package/dist/effect/conversations.js +1 -1
  24. package/dist/effect/custom-fields.js +1 -1
  25. package/dist/effect/descriptors/phone-numbers.d.ts +49 -0
  26. package/dist/effect/descriptors/phone-numbers.js +47 -0
  27. package/dist/effect/descriptors/topics.d.ts +1 -1
  28. package/dist/effect/descriptors/topics.js +1 -1
  29. package/dist/effect/descriptors/whats-app.d.ts +10 -0
  30. package/dist/effect/descriptors/whats-app.js +10 -0
  31. package/dist/effect/email.js +1 -1
  32. package/dist/effect/errors.d.ts +1 -1
  33. package/dist/effect/errors.js +2 -2
  34. package/dist/effect/events.js +2 -2
  35. package/dist/effect/feedback.js +2 -2
  36. package/dist/effect/generated/accounts.d.ts +12 -1
  37. package/dist/effect/generated/accounts.js +2 -1
  38. package/dist/effect/generated/agents.js +7 -7
  39. package/dist/effect/generated/analytics.js +16 -16
  40. package/dist/effect/generated/api-keys.js +5 -5
  41. package/dist/effect/generated/approval-requests.js +1 -1
  42. package/dist/effect/generated/attachments.js +4 -4
  43. package/dist/effect/generated/brands.js +1 -1
  44. package/dist/effect/generated/campaigns.d.ts +17 -1
  45. package/dist/effect/generated/campaigns.js +15 -14
  46. package/dist/effect/generated/contact-events.js +1 -1
  47. package/dist/effect/generated/contact-groups.js +12 -12
  48. package/dist/effect/generated/contacts.js +50 -50
  49. package/dist/effect/generated/conversations.js +7 -7
  50. package/dist/effect/generated/custom-fields.js +6 -6
  51. package/dist/effect/generated/email.js +48 -48
  52. package/dist/effect/generated/events.js +5 -5
  53. package/dist/effect/generated/feedback.js +1 -1
  54. package/dist/effect/generated/index.d.ts +3 -1
  55. package/dist/effect/generated/integrations-catalog.d.ts +16 -0
  56. package/dist/effect/generated/integrations-catalog.js +10 -6
  57. package/dist/effect/generated/integrations.js +5 -5
  58. package/dist/effect/generated/journeys.d.ts +38 -1
  59. package/dist/effect/generated/journeys.js +16 -14
  60. package/dist/effect/generated/logs.js +2 -2
  61. package/dist/effect/generated/mailboxes.d.ts +41 -3
  62. package/dist/effect/generated/mailboxes.js +48 -50
  63. package/dist/effect/generated/media.js +1 -1
  64. package/dist/effect/generated/messages.js +5 -5
  65. package/dist/effect/generated/namespaces.d.ts +9 -9
  66. package/dist/effect/generated/namespaces.js +1 -1
  67. package/dist/effect/generated/newsletter-domains.js +1 -1
  68. package/dist/effect/generated/newsletter-issues.js +69 -69
  69. package/dist/effect/generated/newsletters.js +1 -1
  70. package/dist/effect/generated/operations.js +1 -1
  71. package/dist/effect/generated/organizations.d.ts +3 -0
  72. package/dist/effect/generated/organizations.js +2 -1
  73. package/dist/effect/generated/phone-numbers.d.ts +817 -0
  74. package/dist/effect/generated/phone-numbers.js +230 -0
  75. package/dist/effect/generated/policies.js +2 -2
  76. package/dist/effect/generated/scheduled-messages.js +1 -1
  77. package/dist/effect/generated/shared.d.ts +35 -14
  78. package/dist/effect/generated/shared.js +36 -13
  79. package/dist/effect/generated/subscriptions.js +1 -1
  80. package/dist/effect/generated/template-registrations.d.ts +9 -0
  81. package/dist/effect/generated/template-registrations.js +3 -2
  82. package/dist/effect/generated/template-share-links.js +9 -9
  83. package/dist/effect/generated/templates.js +119 -119
  84. package/dist/effect/generated/topic-forms.js +1 -1
  85. package/dist/effect/generated/topics.d.ts +10 -0
  86. package/dist/effect/generated/topics.js +20 -13
  87. package/dist/effect/generated/webhooks.d.ts +19 -19
  88. package/dist/effect/generated/webhooks.js +22 -18
  89. package/dist/effect/generated/whats-app-flows.js +5 -5
  90. package/dist/effect/generated/whats-app-setup-links.js +1 -1
  91. package/dist/effect/generated/whats-app.d.ts +251 -1
  92. package/dist/effect/generated/whats-app.js +75 -20
  93. package/dist/effect/generated/whoami.js +1 -1
  94. package/dist/effect/generated-metadata.d.ts +41 -1
  95. package/dist/effect/generated-metadata.js +174 -146
  96. package/dist/effect/index.d.ts +1 -0
  97. package/dist/effect/index.js +6 -5
  98. package/dist/effect/integrations-catalog.js +1 -1
  99. package/dist/effect/integrations.js +1 -1
  100. package/dist/effect/internal/client.js +6 -6
  101. package/dist/effect/internal/email-sender.js +3 -3
  102. package/dist/effect/internal/log-events.js +2 -2
  103. package/dist/effect/internal/mailbox-events.js +1 -1
  104. package/dist/effect/internal/operation.js +2 -2
  105. package/dist/effect/internal/send.js +4 -4
  106. package/dist/effect/journeys.d.ts +10 -0
  107. package/dist/effect/journeys.js +1 -1
  108. package/dist/effect/logs.js +1 -1
  109. package/dist/effect/mailboxes.d.ts +191 -191
  110. package/dist/effect/mailboxes.js +3 -3
  111. package/dist/effect/media.js +2 -2
  112. package/dist/effect/messages.js +2 -2
  113. package/dist/effect/namespaces.d.ts +2 -2
  114. package/dist/effect/namespaces.js +1 -1
  115. package/dist/effect/newsletter-domains.js +1 -1
  116. package/dist/effect/newsletter-issues.js +1 -1
  117. package/dist/effect/newsletters.js +1 -1
  118. package/dist/effect/operations.js +1 -1
  119. package/dist/effect/organizations.js +1 -1
  120. package/dist/effect/phone-numbers.d.ts +22 -0
  121. package/dist/effect/phone-numbers.js +21 -0
  122. package/dist/effect/policies.js +1 -1
  123. package/dist/effect/retry.js +3 -3
  124. package/dist/effect/scheduled-messages.d.ts +350 -350
  125. package/dist/effect/scheduled-messages.js +1 -1
  126. package/dist/effect/subscriptions.js +1 -1
  127. package/dist/effect/template-registrations.js +1 -1
  128. package/dist/effect/template-share-links.js +1 -1
  129. package/dist/effect/templates.js +2 -2
  130. package/dist/effect/topic-forms.js +1 -1
  131. package/dist/effect/topics.d.ts +70 -2
  132. package/dist/effect/topics.js +1 -1
  133. package/dist/effect/webhooks.d.ts +4 -4
  134. package/dist/effect/webhooks.js +2 -2
  135. package/dist/effect/whatsapp-flows.js +1 -1
  136. package/dist/effect/whatsapp-setup-links.js +1 -1
  137. package/dist/effect/whatsapp.d.ts +16 -0
  138. package/dist/effect/whatsapp.js +4 -2
  139. package/dist/effect/whoami.js +1 -1
  140. package/dist/index.js +2 -2
  141. package/dist/package.json.js +5 -0
  142. package/dist/promises/client.d.ts +3 -1
  143. package/dist/promises/client.js +7 -5
  144. package/dist/promises/errors.gen.d.ts +16 -2
  145. package/dist/promises/errors.gen.js +48 -11
  146. package/dist/promises/index.js +3 -3
  147. package/dist/promises/types.gen.d.ts +1 -1
  148. package/dist/request-policy.js +1 -1
  149. package/dist/service-map.d.ts +30 -0
  150. package/package.json +9 -5
  151. package/dist/package.js +0 -5
@@ -0,0 +1,230 @@
1
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
2
+ import * as Schema from "effect/Schema";
3
+ import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, CredentialsError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, NamespaceId, PaymentRequiredError, PhoneNumberProvisioningError, ResourceNotFoundError, SmsPhoneNumberId, UnauthorizedError, ValidationError } from "./shared.js";
4
+ // src/effect/generated/phone-numbers.ts
5
+ const PhoneNumbersListPhoneNumbersQuery = /* @__PURE__ */ (() => Schema.Struct({ namespaceId: Schema.optionalKey(NamespaceId) }))();
6
+ const PhoneNumbersListPhoneNumbers200 = /* @__PURE__ */ (() => Schema.Array(Schema.Struct({
7
+ id: SmsPhoneNumberId,
8
+ namespaceId: Schema.Union([NamespaceId, Schema.Null]),
9
+ phoneNumber: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^\\+[1-9]\\d{1,14}$", "u")).annotate({ expected: "a string matching the RegExp ^\\+[1-9]\\d{1,14}$" })),
10
+ phoneNumberDisplay: Schema.String.annotate({ description: "The phone number formatted for display in international form." }),
11
+ friendlyName: Schema.Union([Schema.String, Schema.Null]),
12
+ capabilities: Schema.Struct({
13
+ voice: Schema.Boolean,
14
+ sms: Schema.Boolean,
15
+ mms: Schema.Boolean
16
+ }),
17
+ uses: Schema.Array(Schema.Union([Schema.Literal("sms"), Schema.Literal("whatsapp")])),
18
+ numberType: Schema.Union([
19
+ Schema.Literal("local"),
20
+ Schema.Literal("tollfree"),
21
+ Schema.Literal("mobile"),
22
+ Schema.Literal("shortcode")
23
+ ]),
24
+ country: Schema.String,
25
+ status: Schema.Union([
26
+ Schema.Literal("pending"),
27
+ Schema.Literal("active"),
28
+ Schema.Literal("failed"),
29
+ Schema.Literal("suspended"),
30
+ Schema.Literal("released")
31
+ ]),
32
+ createdAt: Schema.String
33
+ })))();
34
+ const PhoneNumbersListPhoneNumbers400 = MalformedRequestError;
35
+ const PhoneNumbersListPhoneNumbers401 = UnauthorizedError;
36
+ const PhoneNumbersListPhoneNumbers403 = /* @__PURE__ */ (() => Schema.Union([FlagDisabledError, ForbiddenError]))();
37
+ const PhoneNumbersListPhoneNumbers422 = ValidationError;
38
+ const PhoneNumbersListPhoneNumbers500 = InternalError;
39
+ const PhoneNumbersListPhoneNumbers504 = GatewayTimeoutError;
40
+ const PhoneNumbersPurchaseNumberRequestJson = /* @__PURE__ */ (() => Schema.Struct({
41
+ phoneNumber: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^\\+[1-9]\\d{1,14}$", "u")).annotate({ expected: "a string matching the RegExp ^\\+[1-9]\\d{1,14}$" })),
42
+ friendlyName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
43
+ uses: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Union([Schema.Literal("sms"), Schema.Literal("whatsapp")])), Schema.Null])),
44
+ namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null]))
45
+ }))();
46
+ const PhoneNumbersPurchaseNumber201 = /* @__PURE__ */ (() => Schema.Struct({
47
+ id: SmsPhoneNumberId,
48
+ namespaceId: Schema.Union([NamespaceId, Schema.Null]),
49
+ phoneNumber: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^\\+[1-9]\\d{1,14}$", "u")).annotate({ expected: "a string matching the RegExp ^\\+[1-9]\\d{1,14}$" })),
50
+ phoneNumberDisplay: Schema.String.annotate({ description: "The phone number formatted for display in international form." }),
51
+ friendlyName: Schema.Union([Schema.String, Schema.Null]),
52
+ capabilities: Schema.Struct({
53
+ voice: Schema.Boolean,
54
+ sms: Schema.Boolean,
55
+ mms: Schema.Boolean
56
+ }),
57
+ uses: Schema.Array(Schema.Union([Schema.Literal("sms"), Schema.Literal("whatsapp")])),
58
+ numberType: Schema.Union([
59
+ Schema.Literal("local"),
60
+ Schema.Literal("tollfree"),
61
+ Schema.Literal("mobile"),
62
+ Schema.Literal("shortcode")
63
+ ]),
64
+ country: Schema.String,
65
+ status: Schema.Union([
66
+ Schema.Literal("pending"),
67
+ Schema.Literal("active"),
68
+ Schema.Literal("failed"),
69
+ Schema.Literal("suspended"),
70
+ Schema.Literal("released")
71
+ ]),
72
+ createdAt: Schema.String
73
+ }))();
74
+ const PhoneNumbersPurchaseNumber400 = MalformedRequestError;
75
+ const PhoneNumbersPurchaseNumber401 = UnauthorizedError;
76
+ const PhoneNumbersPurchaseNumber402 = PaymentRequiredError;
77
+ const PhoneNumbersPurchaseNumber403 = /* @__PURE__ */ (() => Schema.Union([ForbiddenError, FlagDisabledError]))();
78
+ const PhoneNumbersPurchaseNumber404 = ResourceNotFoundError;
79
+ const PhoneNumbersPurchaseNumber409 = ConflictError;
80
+ const PhoneNumbersPurchaseNumber422 = ValidationError;
81
+ const PhoneNumbersPurchaseNumber500 = /* @__PURE__ */ (() => Schema.Union([CredentialsError, InternalError]))();
82
+ const PhoneNumbersPurchaseNumber502 = /* @__PURE__ */ (() => Schema.Union([PhoneNumberProvisioningError, BillingProviderError]))();
83
+ const PhoneNumbersPurchaseNumber504 = GatewayTimeoutError;
84
+ const PhoneNumbersGetPhoneNumberPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: SmsPhoneNumberId }))();
85
+ const PhoneNumbersGetPhoneNumber200 = /* @__PURE__ */ (() => Schema.Struct({
86
+ id: SmsPhoneNumberId,
87
+ namespaceId: Schema.Union([NamespaceId, Schema.Null]),
88
+ phoneNumber: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^\\+[1-9]\\d{1,14}$", "u")).annotate({ expected: "a string matching the RegExp ^\\+[1-9]\\d{1,14}$" })),
89
+ phoneNumberDisplay: Schema.String.annotate({ description: "The phone number formatted for display in international form." }),
90
+ friendlyName: Schema.Union([Schema.String, Schema.Null]),
91
+ capabilities: Schema.Struct({
92
+ voice: Schema.Boolean,
93
+ sms: Schema.Boolean,
94
+ mms: Schema.Boolean
95
+ }),
96
+ uses: Schema.Array(Schema.Union([Schema.Literal("sms"), Schema.Literal("whatsapp")])),
97
+ numberType: Schema.Union([
98
+ Schema.Literal("local"),
99
+ Schema.Literal("tollfree"),
100
+ Schema.Literal("mobile"),
101
+ Schema.Literal("shortcode")
102
+ ]),
103
+ country: Schema.String,
104
+ status: Schema.Union([
105
+ Schema.Literal("pending"),
106
+ Schema.Literal("active"),
107
+ Schema.Literal("failed"),
108
+ Schema.Literal("suspended"),
109
+ Schema.Literal("released")
110
+ ]),
111
+ createdAt: Schema.String
112
+ }))();
113
+ const PhoneNumbersGetPhoneNumber400 = MalformedRequestError;
114
+ const PhoneNumbersGetPhoneNumber401 = UnauthorizedError;
115
+ const PhoneNumbersGetPhoneNumber403 = /* @__PURE__ */ (() => Schema.Union([FlagDisabledError, ForbiddenError]))();
116
+ const PhoneNumbersGetPhoneNumber404 = ResourceNotFoundError;
117
+ const PhoneNumbersGetPhoneNumber422 = ValidationError;
118
+ const PhoneNumbersGetPhoneNumber500 = InternalError;
119
+ const PhoneNumbersGetPhoneNumber504 = GatewayTimeoutError;
120
+ const PhoneNumbersReleasePhoneNumberPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: SmsPhoneNumberId }))();
121
+ const PhoneNumbersReleasePhoneNumber200 = /* @__PURE__ */ (() => Schema.Struct({ success: Schema.Boolean }))();
122
+ const PhoneNumbersReleasePhoneNumber400 = MalformedRequestError;
123
+ const PhoneNumbersReleasePhoneNumber401 = UnauthorizedError;
124
+ const PhoneNumbersReleasePhoneNumber403 = /* @__PURE__ */ (() => Schema.Union([FlagDisabledError, ForbiddenError]))();
125
+ const PhoneNumbersReleasePhoneNumber404 = ResourceNotFoundError;
126
+ const PhoneNumbersReleasePhoneNumber422 = ValidationError;
127
+ const PhoneNumbersReleasePhoneNumber500 = /* @__PURE__ */ (() => Schema.Union([CredentialsError, InternalError]))();
128
+ const PhoneNumbersReleasePhoneNumber502 = /* @__PURE__ */ (() => Schema.Union([PhoneNumberProvisioningError, BillingProviderError]))();
129
+ const PhoneNumbersReleasePhoneNumber504 = GatewayTimeoutError;
130
+ const PhoneNumbersSearchAvailableNumbersQuery = /* @__PURE__ */ (() => Schema.Struct({
131
+ country: Schema.Literal("US"),
132
+ type: Schema.optionalKey(Schema.Union([
133
+ Schema.Literal("local"),
134
+ Schema.Literal("tollfree"),
135
+ Schema.Literal("mobile")
136
+ ])),
137
+ areaCode: Schema.optionalKey(Schema.String),
138
+ locality: Schema.optionalKey(Schema.String),
139
+ limit: Schema.optionalKey(Schema.Union([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(100).annotate({ expected: "a value less than or equal to 100" })), Schema.Null]))
140
+ }))();
141
+ const PhoneNumbersSearchAvailableNumbers200 = /* @__PURE__ */ (() => Schema.Array(Schema.Struct({
142
+ phoneNumber: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^\\+[1-9]\\d{1,14}$", "u")).annotate({ expected: "a string matching the RegExp ^\\+[1-9]\\d{1,14}$" })),
143
+ phoneNumberDisplay: Schema.String.annotate({ description: "The phone number formatted for display in international form." }),
144
+ friendlyName: Schema.String,
145
+ capabilities: Schema.Struct({
146
+ voice: Schema.Boolean,
147
+ sms: Schema.Boolean,
148
+ mms: Schema.Boolean
149
+ }),
150
+ region: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
151
+ locality: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
152
+ monthlyPrice: Schema.optionalKey(Schema.Union([Schema.Struct({
153
+ amount: Schema.Finite.annotate({ description: "Samva’s monthly charge for this number" }).check(Schema.isFinite().annotate({ expected: "a finite number" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })),
154
+ currency: Schema.String
155
+ }), Schema.Null]))
156
+ })))();
157
+ const PhoneNumbersSearchAvailableNumbers400 = MalformedRequestError;
158
+ const PhoneNumbersSearchAvailableNumbers401 = UnauthorizedError;
159
+ const PhoneNumbersSearchAvailableNumbers403 = /* @__PURE__ */ (() => Schema.Union([FlagDisabledError, ForbiddenError]))();
160
+ const PhoneNumbersSearchAvailableNumbers422 = ValidationError;
161
+ const PhoneNumbersSearchAvailableNumbers500 = InternalError;
162
+ const PhoneNumbersSearchAvailableNumbers502 = PhoneNumberProvisioningError;
163
+ const PhoneNumbersSearchAvailableNumbers504 = GatewayTimeoutError;
164
+ var PhoneNumbersGroup = class extends HttpApiGroup.make("Phone numbers").add(HttpApiEndpoint.get("phoneNumbersListPhoneNumbers", "/v1/phone-numbers", {
165
+ query: PhoneNumbersListPhoneNumbersQuery,
166
+ success: PhoneNumbersListPhoneNumbers200,
167
+ error: [
168
+ PhoneNumbersListPhoneNumbers400.pipe(HttpApiSchema.status(400)),
169
+ PhoneNumbersListPhoneNumbers401.pipe(HttpApiSchema.status(401)),
170
+ PhoneNumbersListPhoneNumbers403.pipe(HttpApiSchema.status(403)),
171
+ PhoneNumbersListPhoneNumbers422.pipe(HttpApiSchema.status(422)),
172
+ PhoneNumbersListPhoneNumbers500,
173
+ PhoneNumbersListPhoneNumbers504.pipe(HttpApiSchema.status(504))
174
+ ]
175
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "phoneNumbers.listPhoneNumbers").annotate(OpenApi.Summary, "List phone numbers").annotate(OpenApi.Description, "List provisioned phone numbers in the namespaces your credential can reach."), HttpApiEndpoint.post("phoneNumbersPurchaseNumber", "/v1/phone-numbers", {
176
+ payload: PhoneNumbersPurchaseNumberRequestJson,
177
+ success: PhoneNumbersPurchaseNumber201.pipe(HttpApiSchema.status(201)),
178
+ error: [
179
+ PhoneNumbersPurchaseNumber400.pipe(HttpApiSchema.status(400)),
180
+ PhoneNumbersPurchaseNumber401.pipe(HttpApiSchema.status(401)),
181
+ PhoneNumbersPurchaseNumber402.pipe(HttpApiSchema.status(402)),
182
+ PhoneNumbersPurchaseNumber403.pipe(HttpApiSchema.status(403)),
183
+ PhoneNumbersPurchaseNumber404.pipe(HttpApiSchema.status(404)),
184
+ PhoneNumbersPurchaseNumber409.pipe(HttpApiSchema.status(409)),
185
+ PhoneNumbersPurchaseNumber422.pipe(HttpApiSchema.status(422)),
186
+ PhoneNumbersPurchaseNumber500,
187
+ PhoneNumbersPurchaseNumber502.pipe(HttpApiSchema.status(502)),
188
+ PhoneNumbersPurchaseNumber504.pipe(HttpApiSchema.status(504))
189
+ ]
190
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "phoneNumbers.purchaseNumber").annotate(OpenApi.Summary, "Purchase a phone number").annotate(OpenApi.Description, "Order an available US phone number. A payment method is required. Poll until the number becomes active or failed. Monthly billing begins once the number is active."), HttpApiEndpoint.get("phoneNumbersGetPhoneNumber", "/v1/phone-numbers/:id", {
191
+ params: PhoneNumbersGetPhoneNumberPathParams,
192
+ success: PhoneNumbersGetPhoneNumber200,
193
+ error: [
194
+ PhoneNumbersGetPhoneNumber400.pipe(HttpApiSchema.status(400)),
195
+ PhoneNumbersGetPhoneNumber401.pipe(HttpApiSchema.status(401)),
196
+ PhoneNumbersGetPhoneNumber403.pipe(HttpApiSchema.status(403)),
197
+ PhoneNumbersGetPhoneNumber404.pipe(HttpApiSchema.status(404)),
198
+ PhoneNumbersGetPhoneNumber422.pipe(HttpApiSchema.status(422)),
199
+ PhoneNumbersGetPhoneNumber500,
200
+ PhoneNumbersGetPhoneNumber504.pipe(HttpApiSchema.status(504))
201
+ ]
202
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "phoneNumbers.getPhoneNumber").annotate(OpenApi.Summary, "Get a phone number").annotate(OpenApi.Description, "Read a provisioned phone number and its current order status."), HttpApiEndpoint.delete("phoneNumbersReleasePhoneNumber", "/v1/phone-numbers/:id", {
203
+ params: PhoneNumbersReleasePhoneNumberPathParams,
204
+ success: PhoneNumbersReleasePhoneNumber200,
205
+ error: [
206
+ PhoneNumbersReleasePhoneNumber400.pipe(HttpApiSchema.status(400)),
207
+ PhoneNumbersReleasePhoneNumber401.pipe(HttpApiSchema.status(401)),
208
+ PhoneNumbersReleasePhoneNumber403.pipe(HttpApiSchema.status(403)),
209
+ PhoneNumbersReleasePhoneNumber404.pipe(HttpApiSchema.status(404)),
210
+ PhoneNumbersReleasePhoneNumber422.pipe(HttpApiSchema.status(422)),
211
+ PhoneNumbersReleasePhoneNumber500,
212
+ PhoneNumbersReleasePhoneNumber502.pipe(HttpApiSchema.status(502)),
213
+ PhoneNumbersReleasePhoneNumber504.pipe(HttpApiSchema.status(504))
214
+ ]
215
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "phoneNumbers.releasePhoneNumber").annotate(OpenApi.Summary, "Release a phone number").annotate(OpenApi.Description, "Return a number to the provider. Pending orders must settle before the number can be released."), HttpApiEndpoint.get("phoneNumbersSearchAvailableNumbers", "/v1/phone-numbers/available", {
216
+ query: PhoneNumbersSearchAvailableNumbersQuery,
217
+ success: PhoneNumbersSearchAvailableNumbers200,
218
+ error: [
219
+ PhoneNumbersSearchAvailableNumbers400.pipe(HttpApiSchema.status(400)),
220
+ PhoneNumbersSearchAvailableNumbers401.pipe(HttpApiSchema.status(401)),
221
+ PhoneNumbersSearchAvailableNumbers403.pipe(HttpApiSchema.status(403)),
222
+ PhoneNumbersSearchAvailableNumbers422.pipe(HttpApiSchema.status(422)),
223
+ PhoneNumbersSearchAvailableNumbers500,
224
+ PhoneNumbersSearchAvailableNumbers502.pipe(HttpApiSchema.status(502)),
225
+ PhoneNumbersSearchAvailableNumbers504.pipe(HttpApiSchema.status(504))
226
+ ]
227
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "phoneNumbers.searchAvailableNumbers").annotate(OpenApi.Summary, "Search available phone numbers").annotate(OpenApi.Description, "Find US phone numbers by type and location. Each result identifies the channels the number supports.")).annotate(OpenApi.Description, "Search, order, and manage phone number inventory.") {};
228
+ export { PhoneNumbersGetPhoneNumber200, PhoneNumbersGetPhoneNumber400, PhoneNumbersGetPhoneNumber401, PhoneNumbersGetPhoneNumber403, PhoneNumbersGetPhoneNumber404, PhoneNumbersGetPhoneNumber422, PhoneNumbersGetPhoneNumber500, PhoneNumbersGetPhoneNumber504, PhoneNumbersGetPhoneNumberPathParams, PhoneNumbersGroup, PhoneNumbersListPhoneNumbers200, PhoneNumbersListPhoneNumbers400, PhoneNumbersListPhoneNumbers401, PhoneNumbersListPhoneNumbers403, PhoneNumbersListPhoneNumbers422, PhoneNumbersListPhoneNumbers500, PhoneNumbersListPhoneNumbers504, PhoneNumbersListPhoneNumbersQuery, PhoneNumbersPurchaseNumber201, PhoneNumbersPurchaseNumber400, PhoneNumbersPurchaseNumber401, PhoneNumbersPurchaseNumber402, PhoneNumbersPurchaseNumber403, PhoneNumbersPurchaseNumber404, PhoneNumbersPurchaseNumber409, PhoneNumbersPurchaseNumber422, PhoneNumbersPurchaseNumber500, PhoneNumbersPurchaseNumber502, PhoneNumbersPurchaseNumber504, PhoneNumbersPurchaseNumberRequestJson, PhoneNumbersReleasePhoneNumber200, PhoneNumbersReleasePhoneNumber400, PhoneNumbersReleasePhoneNumber401, PhoneNumbersReleasePhoneNumber403, PhoneNumbersReleasePhoneNumber404, PhoneNumbersReleasePhoneNumber422, PhoneNumbersReleasePhoneNumber500, PhoneNumbersReleasePhoneNumber502, PhoneNumbersReleasePhoneNumber504, PhoneNumbersReleasePhoneNumberPathParams, PhoneNumbersSearchAvailableNumbers200, PhoneNumbersSearchAvailableNumbers400, PhoneNumbersSearchAvailableNumbers401, PhoneNumbersSearchAvailableNumbers403, PhoneNumbersSearchAvailableNumbers422, PhoneNumbersSearchAvailableNumbers500, PhoneNumbersSearchAvailableNumbers502, PhoneNumbersSearchAvailableNumbers504, PhoneNumbersSearchAvailableNumbersQuery };
229
+
230
+ //# sourceMappingURL=phone-numbers.js.map
@@ -1,6 +1,6 @@
1
- import { ApiKeySecurityMiddleware, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, PolicyRule, PolicyVersion, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared.js";
2
1
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
3
2
  import * as Schema from "effect/Schema";
3
+ import { ApiKeySecurityMiddleware, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, PolicyRule, PolicyVersion, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared.js";
4
4
  // src/effect/generated/policies.ts
5
5
  const PolicySnapshot = /* @__PURE__ */ (() => Schema.Struct({
6
6
  presets: Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))),
@@ -59,7 +59,7 @@ const PoliciesDeletePolicyPathParams = /* @__PURE__ */ (() => Schema.Struct({
59
59
  ]),
60
60
  id: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
61
61
  }))();
62
- const PoliciesDeletePolicyQuery = /* @__PURE__ */ (() => Schema.Struct({ ifVersion: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })) }))();
62
+ const PoliciesDeletePolicyQuery = /* @__PURE__ */ (() => Schema.Struct({ ifVersion: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })) }))();
63
63
  const PoliciesDeletePolicy200 = PolicySnapshot;
64
64
  const PoliciesDeletePolicy400 = MalformedRequestError;
65
65
  const PoliciesDeletePolicy401 = UnauthorizedError;
@@ -1,7 +1,7 @@
1
1
  import { AbsoluteInstant } from "../runtime.js";
2
- import { ApiKeySecurityMiddleware, ConflictError, ContactId, ConversationId, EmailAttachments, EmailBccRecipients, EmailCcRecipients, EmailCustomHeaders, EmailFooterOverride, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, InternalError, MalformedRequestError, MessageId, MessageMetadata, NamespaceId, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SenderNotReadyError, SmsContent, SmsDispatchContent, SmsRecipients, StoredEmailAttachments, StoredReplyToAddresses, TemplateData, TemplateId, TemplateInputContractId, TemplatePublicationId, TopicId, UnauthorizedError, ValidationError, WhatsAppContent, WhatsAppRecipients } from "./shared.js";
3
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
4
3
  import * as Schema from "effect/Schema";
4
+ import { ApiKeySecurityMiddleware, ConflictError, ContactId, ConversationId, EmailAttachments, EmailBccRecipients, EmailCcRecipients, EmailCustomHeaders, EmailFooterOverride, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, InternalError, MalformedRequestError, MessageId, MessageMetadata, NamespaceId, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SenderNotReadyError, SmsContent, SmsDispatchContent, SmsRecipients, StoredEmailAttachments, StoredReplyToAddresses, TemplateData, TemplateId, TemplateInputContractId, TemplatePublicationId, TopicId, UnauthorizedError, ValidationError, WhatsAppContent, WhatsAppRecipients } from "./shared.js";
5
5
  // src/effect/generated/scheduled-messages.ts
6
6
  const ScheduledMessageId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^sched_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
7
7
  expected: "a string matching the RegExp ^sched_[0-9a-hjkmnp-tv-z]{16,24}$",
@@ -762,6 +762,8 @@ export type MailboxMetadata = {
762
762
  readonly [x: string]: string;
763
763
  };
764
764
  export declare const MailboxMetadata: Schema.$Record<Schema.String, Schema.String>;
765
+ export type SmsPhoneNumberId = string & EffectBrand.Brand<"SmsPhoneNumberId">;
766
+ export declare const SmsPhoneNumberId: Schema.brand<Schema.String, "SmsPhoneNumberId">;
765
767
  export type MailboxMetadataPatch = {
766
768
  readonly [x: string]: string | null;
767
769
  };
@@ -1036,8 +1038,8 @@ export type NamespacePortalLinkMetadata = {
1036
1038
  export declare const NamespacePortalLinkMetadata: Schema.$Record<Schema.String, Schema.String>;
1037
1039
  export type WhatsAppSetupLinkRedirectUrl = string;
1038
1040
  export declare const WhatsAppSetupLinkRedirectUrl: Schema.String;
1039
- export type NamespaceResourceType = "domain" | "sender" | "whatsappNumber" | "smsNumber" | "contact" | "template";
1040
- export declare const NamespaceResourceType: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"whatsappNumber">, Schema.Literal<"smsNumber">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
1041
+ export type NamespaceResourceType = "domain" | "sender" | "whatsappNumber" | "phoneNumber" | "smsNumber" | "contact" | "template";
1042
+ export declare const NamespaceResourceType: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"whatsappNumber">, Schema.Literal<"phoneNumber">, Schema.Literal<"smsNumber">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
1041
1043
  export type NewsletterId = string & EffectBrand.Brand<"NewsletterId">;
1042
1044
  export declare const NewsletterId: Schema.brand<Schema.String, "NewsletterId">;
1043
1045
  export type TemplateProjectId = string & EffectBrand.Brand<"TemplateProjectId">;
@@ -1050,6 +1052,22 @@ export declare const OperationResource: Schema.Struct<{
1050
1052
  readonly type: Schema.String;
1051
1053
  readonly id: Schema.String;
1052
1054
  }>;
1055
+ declare const CredentialsError_base: Schema.Class<CredentialsError, Schema.Struct<{
1056
+ readonly _tag: Schema.tag<"CredentialsError">;
1057
+ readonly message: Schema.String;
1058
+ readonly retryable: Schema.Boolean;
1059
+ }>, import("effect/Cause").YieldableError>;
1060
+ export declare class CredentialsError extends CredentialsError_base {
1061
+ }
1062
+ declare const PhoneNumberProvisioningError_base: Schema.Class<PhoneNumberProvisioningError, Schema.Struct<{
1063
+ readonly _tag: Schema.tag<"PhoneNumberProvisioningError">;
1064
+ readonly reason: Schema.Union<readonly [Schema.Literal<"transport">, Schema.Literal<"rejected">, Schema.Literal<"rate_limited">, Schema.Literal<"auth">]>;
1065
+ readonly message: Schema.String;
1066
+ readonly providerCode: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1067
+ readonly statusCode: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1068
+ }>, import("effect/Cause").YieldableError>;
1069
+ export declare class PhoneNumberProvisioningError extends PhoneNumberProvisioningError_base {
1070
+ }
1053
1071
  export type PolicyVersion = number;
1054
1072
  export declare const PolicyVersion: Schema.Finite;
1055
1073
  declare const SlugTaken_base: Schema.Class<SlugTaken, Schema.Struct<{
@@ -1092,13 +1110,6 @@ export declare const TemplateFromDefaultInput: Schema.Struct<{
1092
1110
  readonly email: Schema.String;
1093
1111
  readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1094
1112
  }>;
1095
- declare const CredentialsError_base: Schema.Class<CredentialsError, Schema.Struct<{
1096
- readonly _tag: Schema.tag<"CredentialsError">;
1097
- readonly message: Schema.String;
1098
- readonly retryable: Schema.Boolean;
1099
- }>, import("effect/Cause").YieldableError>;
1100
- export declare class CredentialsError extends CredentialsError_base {
1101
- }
1102
1113
  declare const WhatsAppChannelError_base: Schema.Class<WhatsAppChannelError, Schema.Struct<{
1103
1114
  readonly _tag: Schema.tag<"WhatsAppChannelError">;
1104
1115
  readonly reason: Schema.Union<readonly [Schema.Literal<"transport">, Schema.Literal<"rejected">, Schema.Literal<"rate_limited">, Schema.Literal<"auth">, Schema.Literal<"unsupported">]>;
@@ -1545,6 +1556,16 @@ export declare const ConnectAccountPayload: Schema.Struct<{
1545
1556
  readonly expectedHosts: Schema.optionalKey<Schema.$Array<Schema.String>>;
1546
1557
  readonly returnTo: Schema.String;
1547
1558
  }>;
1559
+ export type ContactReferenceSummary = {
1560
+ readonly id: ContactId;
1561
+ readonly name: string;
1562
+ readonly displayName: string | null;
1563
+ };
1564
+ export declare const ContactReferenceSummary: Schema.Struct<{
1565
+ readonly id: Schema.brand<Schema.String, "ContactId">;
1566
+ readonly name: Schema.String;
1567
+ readonly displayName: Schema.Union<readonly [Schema.String, Schema.Null]>;
1568
+ }>;
1548
1569
  export type ContactEvent = {
1549
1570
  readonly id: string;
1550
1571
  readonly contactId: ContactId;
@@ -1842,7 +1863,7 @@ export declare const CampaignReplyMailbox: Schema.Union<readonly [Schema.brand<S
1842
1863
  export type CreateWebhookPayload = {
1843
1864
  readonly name: string;
1844
1865
  readonly url: string;
1845
- readonly eventTypes: ReadonlyArray<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "email.sending.paused" | "email.sending.resumed" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.spam" | "mailbox.message.discarded" | "mailbox.thread.deleted" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook">;
1866
+ readonly eventTypes: ReadonlyArray<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "email.sending.paused" | "email.sending.resumed" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "whatsapp.number.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.spam" | "mailbox.message.discarded" | "mailbox.thread.deleted" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook">;
1846
1867
  readonly channels?: ReadonlyArray<"sms" | "whatsapp" | "email"> | null;
1847
1868
  readonly mailboxIds?: readonly [MailboxId, ...Array<MailboxId>] | null;
1848
1869
  readonly namespaceId?: NamespaceId | null;
@@ -1854,7 +1875,7 @@ export type CreateWebhookPayload = {
1854
1875
  export declare const CreateWebhookPayload: Schema.Struct<{
1855
1876
  readonly name: Schema.String;
1856
1877
  readonly url: Schema.String;
1857
- readonly eventTypes: Schema.$Array<Schema.Union<readonly [Schema.Literal<"message.sent">, Schema.Literal<"message.delivered">, Schema.Literal<"message.read">, Schema.Literal<"message.failed">, Schema.Literal<"message.bounced">, Schema.Literal<"message.complained">, Schema.Literal<"message.received">, Schema.Literal<"message.opened">, Schema.Literal<"message.clicked">, Schema.Literal<"contact.created">, Schema.Literal<"contact.updated">, Schema.Literal<"contact.deleted">, Schema.Literal<"contact.subscribed">, Schema.Literal<"contact.unsubscribed">, Schema.Literal<"contact.resubscribed">, Schema.Literal<"contact.consent_changed">, Schema.Literal<"conversation.created">, Schema.Literal<"conversation.updated">, Schema.Literal<"conversation.archived">, Schema.Literal<"webhook.created">, Schema.Literal<"webhook.updated">, Schema.Literal<"webhook.deleted">, Schema.Literal<"webhook.test">, Schema.Literal<"domain.updated">, Schema.Literal<"domain.warming.updated">, Schema.Literal<"email.sending.paused">, Schema.Literal<"email.sending.resumed">, Schema.Literal<"template.registration.updated">, Schema.Literal<"flow.registration.updated">, Schema.Literal<"whatsapp.number.connected">, Schema.Literal<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.action.resolved">, Schema.Literal<"mailbox.message.spam">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.thread.deleted">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>;
1878
+ readonly eventTypes: Schema.$Array<Schema.Union<readonly [Schema.Literal<"message.sent">, Schema.Literal<"message.delivered">, Schema.Literal<"message.read">, Schema.Literal<"message.failed">, Schema.Literal<"message.bounced">, Schema.Literal<"message.complained">, Schema.Literal<"message.received">, Schema.Literal<"message.opened">, Schema.Literal<"message.clicked">, Schema.Literal<"contact.created">, Schema.Literal<"contact.updated">, Schema.Literal<"contact.deleted">, Schema.Literal<"contact.subscribed">, Schema.Literal<"contact.unsubscribed">, Schema.Literal<"contact.resubscribed">, Schema.Literal<"contact.consent_changed">, Schema.Literal<"conversation.created">, Schema.Literal<"conversation.updated">, Schema.Literal<"conversation.archived">, Schema.Literal<"webhook.created">, Schema.Literal<"webhook.updated">, Schema.Literal<"webhook.deleted">, Schema.Literal<"webhook.test">, Schema.Literal<"domain.updated">, Schema.Literal<"domain.warming.updated">, Schema.Literal<"email.sending.paused">, Schema.Literal<"email.sending.resumed">, Schema.Literal<"template.registration.updated">, Schema.Literal<"flow.registration.updated">, Schema.Literal<"whatsapp.number.connected">, Schema.Literal<"whatsapp.number.updated">, Schema.Literal<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.action.resolved">, Schema.Literal<"mailbox.message.spam">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.thread.deleted">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>;
1858
1879
  readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>>;
1859
1880
  readonly mailboxIds: Schema.optionalKey<Schema.Union<readonly [Schema.TupleWithRest<Schema.Tuple<readonly [Schema.brand<Schema.String, "MailboxId">]>, readonly [Schema.brand<Schema.String, "MailboxId">]>, Schema.Null]>>;
1860
1881
  readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
@@ -1864,7 +1885,7 @@ export declare const CreateWebhookPayload: Schema.Struct<{
1864
1885
  export type UpdateWebhookPayload = {
1865
1886
  readonly name?: string | null;
1866
1887
  readonly url?: string | null;
1867
- readonly eventTypes?: ReadonlyArray<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "email.sending.paused" | "email.sending.resumed" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.spam" | "mailbox.message.discarded" | "mailbox.thread.deleted" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook"> | null;
1888
+ readonly eventTypes?: ReadonlyArray<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "email.sending.paused" | "email.sending.resumed" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "whatsapp.number.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.spam" | "mailbox.message.discarded" | "mailbox.thread.deleted" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook"> | null;
1868
1889
  readonly channels?: ReadonlyArray<"sms" | "whatsapp" | "email"> | null;
1869
1890
  readonly mailboxIds?: readonly [MailboxId, ...Array<MailboxId>] | null;
1870
1891
  readonly namespaceId?: NamespaceId | null;
@@ -1876,7 +1897,7 @@ export type UpdateWebhookPayload = {
1876
1897
  export declare const UpdateWebhookPayload: Schema.Struct<{
1877
1898
  readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1878
1899
  readonly url: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1879
- readonly eventTypes: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"message.sent">, Schema.Literal<"message.delivered">, Schema.Literal<"message.read">, Schema.Literal<"message.failed">, Schema.Literal<"message.bounced">, Schema.Literal<"message.complained">, Schema.Literal<"message.received">, Schema.Literal<"message.opened">, Schema.Literal<"message.clicked">, Schema.Literal<"contact.created">, Schema.Literal<"contact.updated">, Schema.Literal<"contact.deleted">, Schema.Literal<"contact.subscribed">, Schema.Literal<"contact.unsubscribed">, Schema.Literal<"contact.resubscribed">, Schema.Literal<"contact.consent_changed">, Schema.Literal<"conversation.created">, Schema.Literal<"conversation.updated">, Schema.Literal<"conversation.archived">, Schema.Literal<"webhook.created">, Schema.Literal<"webhook.updated">, Schema.Literal<"webhook.deleted">, Schema.Literal<"webhook.test">, Schema.Literal<"domain.updated">, Schema.Literal<"domain.warming.updated">, Schema.Literal<"email.sending.paused">, Schema.Literal<"email.sending.resumed">, Schema.Literal<"template.registration.updated">, Schema.Literal<"flow.registration.updated">, Schema.Literal<"whatsapp.number.connected">, Schema.Literal<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.action.resolved">, Schema.Literal<"mailbox.message.spam">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.thread.deleted">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>, Schema.Null]>>;
1900
+ readonly eventTypes: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"message.sent">, Schema.Literal<"message.delivered">, Schema.Literal<"message.read">, Schema.Literal<"message.failed">, Schema.Literal<"message.bounced">, Schema.Literal<"message.complained">, Schema.Literal<"message.received">, Schema.Literal<"message.opened">, Schema.Literal<"message.clicked">, Schema.Literal<"contact.created">, Schema.Literal<"contact.updated">, Schema.Literal<"contact.deleted">, Schema.Literal<"contact.subscribed">, Schema.Literal<"contact.unsubscribed">, Schema.Literal<"contact.resubscribed">, Schema.Literal<"contact.consent_changed">, Schema.Literal<"conversation.created">, Schema.Literal<"conversation.updated">, Schema.Literal<"conversation.archived">, Schema.Literal<"webhook.created">, Schema.Literal<"webhook.updated">, Schema.Literal<"webhook.deleted">, Schema.Literal<"webhook.test">, Schema.Literal<"domain.updated">, Schema.Literal<"domain.warming.updated">, Schema.Literal<"email.sending.paused">, Schema.Literal<"email.sending.resumed">, Schema.Literal<"template.registration.updated">, Schema.Literal<"flow.registration.updated">, Schema.Literal<"whatsapp.number.connected">, Schema.Literal<"whatsapp.number.updated">, Schema.Literal<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.action.resolved">, Schema.Literal<"mailbox.message.spam">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.thread.deleted">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>, Schema.Null]>>;
1880
1901
  readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>>;
1881
1902
  readonly mailboxIds: Schema.optionalKey<Schema.Union<readonly [Schema.TupleWithRest<Schema.Tuple<readonly [Schema.brand<Schema.String, "MailboxId">]>, readonly [Schema.brand<Schema.String, "MailboxId">]>, Schema.Null]>>;
1882
1903
  readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
@@ -2889,7 +2910,7 @@ export type AssignNamespaceResourcePayload = {
2889
2910
  readonly resourceId: string;
2890
2911
  };
2891
2912
  export declare const AssignNamespaceResourcePayload: Schema.Struct<{
2892
- readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"whatsappNumber">, Schema.Literal<"smsNumber">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
2913
+ readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"whatsappNumber">, Schema.Literal<"phoneNumber">, Schema.Literal<"smsNumber">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
2893
2914
  readonly resourceId: Schema.String;
2894
2915
  }>;
2895
2916
  export type CreateWhatsAppFlowPayload = {
@@ -283,7 +283,7 @@ const CampaignRunId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPatter
283
283
  expected: "a string matching the RegExp ^crun_[0-9a-hjkmnp-tv-z]{16,24}$",
284
284
  identifier: "CampaignRunId"
285
285
  })).pipe(Schema.brand("CampaignRunId")))();
286
- const SendsSeries = /* @__PURE__ */ (() => Schema.Array(Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))).annotate({
286
+ const SendsSeries = /* @__PURE__ */ (() => Schema.Array(Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" }))).annotate({
287
287
  description: "Daily email sends for the last 14 calendar days in the organization's own timezone, oldest first and zero-filled. Always fourteen entries; an entity that has never sent reports fourteen zeroes.",
288
288
  identifier: "SendsSeries"
289
289
  }))();
@@ -312,8 +312,8 @@ var TemplateSourceError = class extends Schema.TaggedError()("TemplateSourceErro
312
312
  message: Schema.String,
313
313
  origins: Schema.Array(Schema.Struct({
314
314
  fileName: Schema.String,
315
- lineNumber: 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(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
316
- columnNumber: 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(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
315
+ lineNumber: 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(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
316
+ columnNumber: 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(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" }))
317
317
  })),
318
318
  clients: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
319
319
  notes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
@@ -321,8 +321,8 @@ var TemplateSourceError = class extends Schema.TaggedError()("TemplateSourceErro
321
321
  fixtures: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
322
322
  occurrences: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Array(Schema.Struct({
323
323
  fileName: Schema.String,
324
- lineNumber: 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(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
325
- columnNumber: 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(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
324
+ lineNumber: 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(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
325
+ columnNumber: 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(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" }))
326
326
  }))), Schema.Null])),
327
327
  compatibility: Schema.optionalKey(Schema.Union([Schema.Struct({
328
328
  assessment: Schema.Union([
@@ -665,6 +665,10 @@ const MailboxMetadata = /* @__PURE__ */ (() => Schema.Record(Schema.String, Sche
665
665
  expected: "an object with property names matching the schema",
666
666
  identifier: "MailboxMetadata"
667
667
  })))();
668
+ const SmsPhoneNumberId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^phone_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
669
+ expected: "a string matching the RegExp ^phone_[0-9a-hjkmnp-tv-z]{16,24}$",
670
+ identifier: "SmsPhoneNumberId"
671
+ })).pipe(Schema.brand("SmsPhoneNumberId")))();
668
672
  const MailboxMetadataPatch = /* @__PURE__ */ (() => Schema.Record(Schema.String, Schema.Union([Schema.String.check(Schema.isMaxCodePoints(512).annotate({ expected: "a string with at most 512 code points" })).check(Schema.isMaxLength(512).annotate({ expected: "a value with a length of at most 512" })), Schema.Null])).check(Schema.isPropertyNames(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" }))).annotate({
669
673
  expected: "an object with property names matching the schema",
670
674
  identifier: "MailboxMetadataPatch"
@@ -685,7 +689,7 @@ const PolicyDecisionId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPat
685
689
  expected: "a string matching the RegExp ^pdec_[0-9a-hjkmnp-tv-z]{16,24}$",
686
690
  identifier: "PolicyDecisionId"
687
691
  })).pipe(Schema.brand("PolicyDecisionId")))();
688
- const PolicyReviewRound = /* @__PURE__ */ (() => Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })).check(Schema.isGreaterThan(0).annotate({
692
+ const PolicyReviewRound = /* @__PURE__ */ (() => Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })).check(Schema.isGreaterThan(0).annotate({
689
693
  expected: "a value greater than 0",
690
694
  identifier: "PolicyReviewRound"
691
695
  })))();
@@ -882,6 +886,7 @@ const NamespaceResourceType = /* @__PURE__ */ (() => Schema.Union([
882
886
  Schema.Literal("domain"),
883
887
  Schema.Literal("sender"),
884
888
  Schema.Literal("whatsappNumber"),
889
+ Schema.Literal("phoneNumber"),
885
890
  Schema.Literal("smsNumber"),
886
891
  Schema.Literal("contact"),
887
892
  Schema.Literal("template")
@@ -898,7 +903,22 @@ const OperationResource = /* @__PURE__ */ (() => Schema.Struct({
898
903
  type: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(80).annotate({ expected: "a string with at most 80 code points" })).check(Schema.isMaxLength(80).annotate({ expected: "a value with a length of at most 80" })),
899
904
  id: 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" }))
900
905
  }).annotate({ identifier: "OperationResource" }))();
901
- const PolicyVersion = /* @__PURE__ */ (() => Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({
906
+ var CredentialsError = class extends Schema.TaggedError()("CredentialsError", Schema.Struct({
907
+ message: Schema.String,
908
+ retryable: Schema.Boolean
909
+ })) {};
910
+ var PhoneNumberProvisioningError = class extends Schema.TaggedError()("PhoneNumberProvisioningError", Schema.Struct({
911
+ reason: Schema.Union([
912
+ Schema.Literal("transport"),
913
+ Schema.Literal("rejected"),
914
+ Schema.Literal("rate_limited"),
915
+ Schema.Literal("auth")
916
+ ]),
917
+ message: Schema.String,
918
+ providerCode: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
919
+ statusCode: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]))
920
+ })) {};
921
+ const PolicyVersion = /* @__PURE__ */ (() => Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({
902
922
  expected: "a value less than or equal to 9007199254740991",
903
923
  identifier: "PolicyVersion"
904
924
  })))();
@@ -923,10 +943,6 @@ const TemplateFromDefaultInput = /* @__PURE__ */ (() => Schema.Struct({
923
943
  email: Schema.String,
924
944
  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]))
925
945
  }).annotate({ identifier: "TemplateFromDefaultInput" }))();
926
- var CredentialsError = class extends Schema.TaggedError()("CredentialsError", Schema.Struct({
927
- message: Schema.String,
928
- retryable: Schema.Boolean
929
- })) {};
930
946
  var WhatsAppChannelError = class extends Schema.TaggedError()("WhatsAppChannelError", Schema.Struct({
931
947
  reason: Schema.Union([
932
948
  Schema.Literal("transport"),
@@ -968,6 +984,11 @@ const JourneyWebhookConfig = /* @__PURE__ */ (() => Schema.Struct({
968
984
  eventBindings: Schema.optionalKey(Schema.Record(Schema.String, Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isPattern(new globalThis.RegExp("^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$" }))).check(Schema.isPropertyNames(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))).annotate({ expected: "an object with property names matching the schema" })))
969
985
  }).annotate({ identifier: "JourneyWebhookConfig" }))();
970
986
  const AccountLinks = /* @__PURE__ */ (() => Schema.Record(Schema.String, IntegrationAccountId).annotate({ identifier: "AccountLinks" }))();
987
+ const ContactReferenceSummary = /* @__PURE__ */ (() => Schema.Struct({
988
+ id: ContactId,
989
+ name: Schema.String,
990
+ displayName: Schema.Union([Schema.String, Schema.Null])
991
+ }).annotate({ identifier: "ContactReferenceSummary" }))();
971
992
  const ContactEvent = /* @__PURE__ */ (() => Schema.Struct({
972
993
  id: Schema.String,
973
994
  contactId: ContactId,
@@ -1139,6 +1160,7 @@ const CreateWebhookPayload = /* @__PURE__ */ (() => Schema.Struct({
1139
1160
  Schema.Literal("template.registration.updated"),
1140
1161
  Schema.Literal("flow.registration.updated"),
1141
1162
  Schema.Literal("whatsapp.number.connected"),
1163
+ Schema.Literal("whatsapp.number.updated"),
1142
1164
  Schema.Literal("mailbox.message.received"),
1143
1165
  Schema.Literal("mailbox.message.sent"),
1144
1166
  Schema.Literal("mailbox.action.pending_approval"),
@@ -1195,6 +1217,7 @@ const UpdateWebhookPayload = /* @__PURE__ */ (() => Schema.Struct({
1195
1217
  Schema.Literal("template.registration.updated"),
1196
1218
  Schema.Literal("flow.registration.updated"),
1197
1219
  Schema.Literal("whatsapp.number.connected"),
1220
+ Schema.Literal("whatsapp.number.updated"),
1198
1221
  Schema.Literal("mailbox.message.received"),
1199
1222
  Schema.Literal("mailbox.message.sent"),
1200
1223
  Schema.Literal("mailbox.action.pending_approval"),
@@ -1544,7 +1567,7 @@ const MailboxActionDecision = /* @__PURE__ */ (() => Schema.Struct({
1544
1567
  ]),
1545
1568
  id: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
1546
1569
  }),
1547
- index: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
1570
+ index: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" }))
1548
1571
  }), Schema.Null])),
1549
1572
  guard: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
1550
1573
  guardReason: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
@@ -2309,6 +2332,6 @@ const ApiKeySecurity = HttpApiSecurity.apiKey({
2309
2332
  in: "header"
2310
2333
  });
2311
2334
  var ApiKeySecurityMiddleware = class extends HttpApiMiddleware.Service()("apiKey security", { security: { apiKey: ApiKeySecurity } }) {};
2312
- export { AccountLinks, AccountStatus, AgentDefinition, AgentId, AgentIntegrationGrant, AgentModel, AgentModelChoice, AgentModuleBundle, AgentModuleManifest, AgentModuleTool, AgentName, AgentReasoning, AgentSetupJob, AgentToolScope, AnalyticsQueryError, AnswerWithoutApproval, ApiKeyAccess, ApiKeyId, ApiKeyMailboxAccess, ApiKeyResourceAccess, ApiKeySecurity, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, BrandAddress, BrandAddressRequiredError, BrandAssets, BrandFooter, BrandId, 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, CredentialsError, DeliveryErrorDetails, DeliveryUnavailableError, EmailAttachment, EmailAttachments, EmailBccRecipients, EmailCampaignContentInput, EmailCcRecipients, EmailChannelError, EmailContent, EmailCustomHeaders, EmailDomainId, EmailFooterOverride, EmailRecipient, EmailRecipients, EmailSendMessagePayload, EmailSender, EmailSenderId, EmailTrackingOverrideV1, ExtensionInstallationId, ExternalServiceError, FeedbackContext, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, IntegrationAccountId, IntegrationId, IntegrationKey, IntegrationReturnTo, IntegrationStatus, IntegrationTool, InternalError, JourneyBranchEdge, JourneyBranchNode, JourneyComparison, JourneyCondition, JourneyContactCreatedTrigger, JourneyContactProperty, JourneyCustomEventName, JourneyCustomEventTrigger, JourneyCustomFieldPredicate, JourneyDefinition, JourneyEmptyConfig, JourneyEntryEventPropertyPredicate, JourneyEqualityComparison, JourneyEventName, JourneyEventPredicate, JourneyExitNode, JourneyGoal, JourneyGroupJoinedTrigger, JourneyId, JourneyName, JourneyNextEdge, JourneyNode, JourneyNodeId, JourneyNumericComparison, JourneyPredicate, JourneyPresenceComparison, JourneyPropertyPredicate, JourneySendEmailConfig, JourneySendEmailNode, JourneySendWhatsAppConfig, JourneyStatus, 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, MailboxSendConflictError, MailboxSendError, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MalformedRequestError, MediaId, MessageContent, MessageDeliveryId, MessageId, MessageMetadata, MessagePage, MessageSummary, MonthlySpendCapDollars, NamespaceId, NamespaceMetadata, NamespacePortalLinkMetadata, NamespaceResourceType, NewsletterId, OnboardingReviewRequiredError, Operation, OperationAccepted, OperationId, OperationResource, OperationResourceLink, OrganizationId, PaymentRequiredError, PolicyConfiguration, PolicyDecider, PolicyDecisionId, PolicyEffect, PolicyRequirement, PolicyReviewRound, PolicyRule, PolicyRuleMatch, PolicySubject, PolicyVersion, RateLimitedError, RecipeSetupReferences, RenderLocale, RenderTimeZone, ReplyMailboxChatPayload, ReplyMailboxEmailPayload, ReplyToAddresses, ResourceNotFoundError, SendFeedback, SendMailboxChatPayload, SendMailboxEmailPayload, SenderNotReadyError, SendsSeries, ServiceUnavailableError, ShareLinkUnavailable, ShopifyShop, SkippedRecipient, SlugTaken, SmsCampaignContentInput, SmsContent, SmsDispatchContent, SmsMessageContent, SmsRecipient, SmsRecipients, SmsSendMessagePayload, SmsTemplateData, StoredEmailAttachments, StoredReplyToAddresses, SubmissionClient, SuccessResponse, TemplateChannelVariantId, TemplateData, TemplateFamilyId, TemplateFromDefaultInput, TemplateId, TemplateInUseError, TemplateInputContractId, TemplateProjectId, TemplatePublicationId, TemplateRegistrationApproval, TemplateRegistrationId, TemplateSourceError, TemplateTrackingDefault, TestWebhookPayload, TimeZone, TopicContactByEmail, TopicContactById, TopicContactByPhone, TopicContactRef, TopicId, UnauthorizedError, UpdateBrand, UpdateTemplatePayload, UpdateWebhookPayload, UserId, ValidationError, WebhookEndpointId, Weekday, WhatsAppAudio, WhatsAppAudioLink, WhatsAppAudioUpload, WhatsAppBusinessAccountId, WhatsAppButtonsMessage, WhatsAppCampaignContentInput, WhatsAppChannelError, WhatsAppContactCard, WhatsAppContactsContent, WhatsAppContent, WhatsAppCtaUrlMessage, WhatsAppDocument, WhatsAppDocumentHeader, WhatsAppDocumentHeaderLink, WhatsAppDocumentHeaderUpload, WhatsAppDocumentLink, WhatsAppDocumentUpload, WhatsAppFlowActionData, WhatsAppFlowId, WhatsAppFlowMessage, WhatsAppFlowVersionId, WhatsAppImage, WhatsAppImageHeader, WhatsAppImageHeaderLink, WhatsAppImageHeaderUpload, WhatsAppImageLink, WhatsAppImageUpload, WhatsAppInteractive, WhatsAppInteractiveContent, WhatsAppInteractiveHeader, WhatsAppJourneySendNode, WhatsAppListMessage, WhatsAppListRow, WhatsAppListSection, WhatsAppLocation, WhatsAppLocationContent, WhatsAppMediaContent, WhatsAppMessageContent, WhatsAppMessageReference, WhatsAppOutboundMedia, WhatsAppReaction, WhatsAppReactionContent, WhatsAppReceivedFlowResponse, WhatsAppReceivedReply, WhatsAppRecipient, WhatsAppRecipients, WhatsAppReplyButton, WhatsAppSendMessagePayload, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkMetadata, WhatsAppSetupLinkRedirectUrl, WhatsAppSetupLinkUnavailableError, WhatsAppSticker, WhatsAppStickerLink, WhatsAppStickerUpload, WhatsAppStoredContactCard, WhatsAppStoredFlowMessage, WhatsAppStoredInteractive, WhatsAppStoredLocation, WhatsAppStoredMedia, WhatsAppStoredReaction, WhatsAppStructuredContent, WhatsAppTemplateBinding, WhatsAppTemplateBindings, WhatsAppTemplateContactBinding, WhatsAppTemplateCustomFieldBinding, WhatsAppTemplateData, WhatsAppTemplateDispatch, WhatsAppTemplateDispatchData, WhatsAppTemplateIdContent, WhatsAppTemplateSlugContent, WhatsAppTextContent, WhatsAppTextHeader, WhatsAppVideo, WhatsAppVideoHeader, WhatsAppVideoHeaderLink, WhatsAppVideoHeaderUpload, WhatsAppVideoLink, WhatsAppVideoUpload, WorkingHours, WorkingHoursRange, AbsoluteInstant as __SamvaRuntimeAbsoluteInstant, NonEmptySensitiveString as __SamvaRuntimeNonEmptySensitiveString, SensitiveString as __SamvaRuntimeSensitiveString };
2335
+ export { AccountLinks, AccountStatus, AgentDefinition, AgentId, AgentIntegrationGrant, AgentModel, AgentModelChoice, AgentModuleBundle, AgentModuleManifest, AgentModuleTool, AgentName, AgentReasoning, AgentSetupJob, AgentToolScope, AnalyticsQueryError, AnswerWithoutApproval, ApiKeyAccess, ApiKeyId, ApiKeyMailboxAccess, ApiKeyResourceAccess, ApiKeySecurity, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, BrandAddress, BrandAddressRequiredError, BrandAssets, BrandFooter, BrandId, BrandSocialLink, CampaignAudience, CampaignContentInput, CampaignContentMetadata, CampaignConversationRef, CampaignEmailInput, CampaignFooterRequiredError, CampaignFromInput, CampaignId, CampaignLatestRun, CampaignReplyMailbox, CampaignRunId, CatalogModelId, ClockTime, ConflictError, ContactConsent, ContactEvent, ContactEventReference, ContactGroupId, ContactId, ContactIdentity, ContactIdentityChannel, ContactIdentityId, ContactReferenceSummary, ConversationId, CreateBrand, CreateEventPayload, CreateMailboxChatDraftPayload, CreateMailboxEmailDraftPayload, CreateMailboxEndpointPayload, CreateTemplatePayload, CreateWebhookPayload, CredentialsError, DeliveryErrorDetails, DeliveryUnavailableError, EmailAttachment, EmailAttachments, EmailBccRecipients, EmailCampaignContentInput, EmailCcRecipients, EmailChannelError, EmailContent, EmailCustomHeaders, EmailDomainId, EmailFooterOverride, EmailRecipient, EmailRecipients, EmailSendMessagePayload, EmailSender, EmailSenderId, EmailTrackingOverrideV1, ExtensionInstallationId, ExternalServiceError, FeedbackContext, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, IntegrationAccountId, IntegrationId, IntegrationKey, IntegrationReturnTo, IntegrationStatus, IntegrationTool, InternalError, JourneyBranchEdge, JourneyBranchNode, JourneyComparison, JourneyCondition, JourneyContactCreatedTrigger, JourneyContactProperty, JourneyCustomEventName, JourneyCustomEventTrigger, JourneyCustomFieldPredicate, JourneyDefinition, JourneyEmptyConfig, JourneyEntryEventPropertyPredicate, JourneyEqualityComparison, JourneyEventName, JourneyEventPredicate, JourneyExitNode, JourneyGoal, JourneyGroupJoinedTrigger, JourneyId, JourneyName, JourneyNextEdge, JourneyNode, JourneyNodeId, JourneyNumericComparison, JourneyPredicate, JourneyPresenceComparison, JourneyPropertyPredicate, JourneySendEmailConfig, JourneySendEmailNode, JourneySendWhatsAppConfig, JourneyStatus, 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, MailboxSendConflictError, MailboxSendError, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MalformedRequestError, MediaId, MessageContent, MessageDeliveryId, MessageId, MessageMetadata, MessagePage, MessageSummary, MonthlySpendCapDollars, NamespaceId, NamespaceMetadata, NamespacePortalLinkMetadata, NamespaceResourceType, NewsletterId, OnboardingReviewRequiredError, Operation, OperationAccepted, OperationId, OperationResource, OperationResourceLink, OrganizationId, PaymentRequiredError, PhoneNumberProvisioningError, PolicyConfiguration, PolicyDecider, PolicyDecisionId, PolicyEffect, PolicyRequirement, PolicyReviewRound, PolicyRule, PolicyRuleMatch, PolicySubject, PolicyVersion, RateLimitedError, RecipeSetupReferences, RenderLocale, RenderTimeZone, ReplyMailboxChatPayload, ReplyMailboxEmailPayload, ReplyToAddresses, ResourceNotFoundError, SendFeedback, SendMailboxChatPayload, SendMailboxEmailPayload, SenderNotReadyError, SendsSeries, ServiceUnavailableError, ShareLinkUnavailable, ShopifyShop, SkippedRecipient, SlugTaken, SmsCampaignContentInput, SmsContent, SmsDispatchContent, SmsMessageContent, SmsPhoneNumberId, SmsRecipient, SmsRecipients, SmsSendMessagePayload, SmsTemplateData, StoredEmailAttachments, StoredReplyToAddresses, SubmissionClient, SuccessResponse, TemplateChannelVariantId, TemplateData, TemplateFamilyId, TemplateFromDefaultInput, TemplateId, TemplateInUseError, TemplateInputContractId, TemplateProjectId, TemplatePublicationId, TemplateRegistrationApproval, TemplateRegistrationId, TemplateSourceError, TemplateTrackingDefault, TestWebhookPayload, TimeZone, TopicContactByEmail, TopicContactById, TopicContactByPhone, TopicContactRef, TopicId, UnauthorizedError, UpdateBrand, UpdateTemplatePayload, UpdateWebhookPayload, UserId, ValidationError, WebhookEndpointId, Weekday, WhatsAppAudio, WhatsAppAudioLink, WhatsAppAudioUpload, WhatsAppBusinessAccountId, WhatsAppButtonsMessage, WhatsAppCampaignContentInput, WhatsAppChannelError, WhatsAppContactCard, WhatsAppContactsContent, WhatsAppContent, WhatsAppCtaUrlMessage, WhatsAppDocument, WhatsAppDocumentHeader, WhatsAppDocumentHeaderLink, WhatsAppDocumentHeaderUpload, WhatsAppDocumentLink, WhatsAppDocumentUpload, WhatsAppFlowActionData, WhatsAppFlowId, WhatsAppFlowMessage, WhatsAppFlowVersionId, WhatsAppImage, WhatsAppImageHeader, WhatsAppImageHeaderLink, WhatsAppImageHeaderUpload, WhatsAppImageLink, WhatsAppImageUpload, WhatsAppInteractive, WhatsAppInteractiveContent, WhatsAppInteractiveHeader, WhatsAppJourneySendNode, WhatsAppListMessage, WhatsAppListRow, WhatsAppListSection, WhatsAppLocation, WhatsAppLocationContent, WhatsAppMediaContent, WhatsAppMessageContent, WhatsAppMessageReference, WhatsAppOutboundMedia, WhatsAppReaction, WhatsAppReactionContent, WhatsAppReceivedFlowResponse, WhatsAppReceivedReply, WhatsAppRecipient, WhatsAppRecipients, WhatsAppReplyButton, WhatsAppSendMessagePayload, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkMetadata, WhatsAppSetupLinkRedirectUrl, WhatsAppSetupLinkUnavailableError, WhatsAppSticker, WhatsAppStickerLink, WhatsAppStickerUpload, WhatsAppStoredContactCard, WhatsAppStoredFlowMessage, WhatsAppStoredInteractive, WhatsAppStoredLocation, WhatsAppStoredMedia, WhatsAppStoredReaction, WhatsAppStructuredContent, WhatsAppTemplateBinding, WhatsAppTemplateBindings, WhatsAppTemplateContactBinding, WhatsAppTemplateCustomFieldBinding, WhatsAppTemplateData, WhatsAppTemplateDispatch, WhatsAppTemplateDispatchData, WhatsAppTemplateIdContent, WhatsAppTemplateSlugContent, WhatsAppTextContent, WhatsAppTextHeader, WhatsAppVideo, WhatsAppVideoHeader, WhatsAppVideoHeaderLink, WhatsAppVideoHeaderUpload, WhatsAppVideoLink, WhatsAppVideoUpload, WorkingHours, WorkingHoursRange, AbsoluteInstant as __SamvaRuntimeAbsoluteInstant, NonEmptySensitiveString as __SamvaRuntimeNonEmptySensitiveString, SensitiveString as __SamvaRuntimeSensitiveString };
2313
2336
 
2314
2337
  //# sourceMappingURL=shared.js.map
@@ -1,6 +1,6 @@
1
- import { ApiKeySecurityMiddleware, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, ExternalServiceError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MalformedRequestError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, TopicId, UnauthorizedError, ValidationError } from "./shared.js";
2
1
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
3
2
  import * as Schema from "effect/Schema";
3
+ import { ApiKeySecurityMiddleware, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, ExternalServiceError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MalformedRequestError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, TopicId, UnauthorizedError, ValidationError } from "./shared.js";
4
4
  // src/effect/generated/subscriptions.ts
5
5
  const SubscribeResult = /* @__PURE__ */ (() => Schema.Struct({
6
6
  success: Schema.Boolean,