samva 0.34.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 +224 -250
  3. package/dist/client/sdk.gen.js +84 -210
  4. package/dist/client/types.gen.d.ts +2894 -401
  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 +296 -38
  84. package/dist/effect/generated/webhooks.js +58 -16
  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 +22 -22
  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
@@ -1,7 +1,7 @@
1
1
  import type * as EffectBrand from "effect/Brand";
2
2
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
- import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MailboxId, NamespaceId, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SuccessResponse, UnauthorizedError, ValidationError, WebhookEndpointId, __SamvaRuntimeSensitiveString } from "./shared";
4
+ import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MailboxId, MalformedRequestError, NamespaceId, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SuccessResponse, UnauthorizedError, ValidationError, WebhookEndpointId, __SamvaRuntimeSensitiveString } from "./shared";
5
5
  export type WebhookDeliveryCounts = {
6
6
  readonly total: number;
7
7
  readonly pending: number;
@@ -51,7 +51,7 @@ export type WebhookEndpoint = {
51
51
  readonly name: string;
52
52
  readonly url: string;
53
53
  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" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook">;
54
- readonly channels: ReadonlyArray<"email"> | null;
54
+ readonly channels: ReadonlyArray<"sms" | "whatsapp" | "email"> | null;
55
55
  readonly mailboxIds: ReadonlyArray<MailboxId> | null;
56
56
  readonly namespaceId: NamespaceId | null;
57
57
  readonly status: "active" | "disabled";
@@ -66,7 +66,7 @@ export declare const WebhookEndpoint: Schema.Struct<{
66
66
  readonly name: Schema.String;
67
67
  readonly url: Schema.String;
68
68
  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<"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.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>;
69
- readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
69
+ readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>;
70
70
  readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
71
71
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
72
72
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
@@ -81,7 +81,7 @@ export type WebhookEndpointListItem = {
81
81
  readonly name: string;
82
82
  readonly url: string;
83
83
  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" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook">;
84
- readonly channels: ReadonlyArray<"email"> | null;
84
+ readonly channels: ReadonlyArray<"sms" | "whatsapp" | "email"> | null;
85
85
  readonly mailboxIds: ReadonlyArray<MailboxId> | null;
86
86
  readonly namespaceId: NamespaceId | null;
87
87
  readonly status: "active" | "disabled";
@@ -97,7 +97,7 @@ export declare const WebhookEndpointListItem: Schema.Struct<{
97
97
  readonly name: Schema.String;
98
98
  readonly url: Schema.String;
99
99
  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<"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.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>;
100
- readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
100
+ readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>;
101
101
  readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
102
102
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
103
103
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
@@ -185,6 +185,10 @@ export type WebhookStatsResponse = {
185
185
  readonly exhausted: number;
186
186
  readonly cancelled: number;
187
187
  readonly daily: ReadonlyArray<WebhookDailyDeliveries>;
188
+ readonly latestAttempt: {
189
+ readonly errorCode: string | null;
190
+ readonly completedAt: string;
191
+ } | null;
188
192
  };
189
193
  export declare const WebhookStatsResponse: Schema.Struct<{
190
194
  readonly total: Schema.Finite;
@@ -199,6 +203,10 @@ export declare const WebhookStatsResponse: Schema.Struct<{
199
203
  readonly exhausted: Schema.Finite;
200
204
  readonly cancelled: Schema.Finite;
201
205
  }>>;
206
+ readonly latestAttempt: Schema.Union<readonly [Schema.Struct<{
207
+ readonly errorCode: Schema.Union<readonly [Schema.String, Schema.Null]>;
208
+ readonly completedAt: Schema.String;
209
+ }>, Schema.Null]>;
202
210
  }>;
203
211
  export type WebhookEndpointPage = {
204
212
  readonly items: ReadonlyArray<WebhookEndpointListItem>;
@@ -210,7 +218,7 @@ export declare const WebhookEndpointPage: Schema.Struct<{
210
218
  readonly name: Schema.String;
211
219
  readonly url: Schema.String;
212
220
  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<"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.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>;
213
- readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
221
+ readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>;
214
222
  readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
215
223
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
216
224
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
@@ -231,15 +239,15 @@ export declare const WebhookEndpointPage: Schema.Struct<{
231
239
  }>;
232
240
  export type WebhooksListQuery = {
233
241
  readonly limit?: number | null;
234
- readonly cursor?: Cursor | null;
235
- readonly search?: string | null;
236
- readonly status?: "active" | "disabled" | null;
242
+ readonly cursor?: string;
243
+ readonly search?: string;
244
+ readonly status?: "active" | "disabled";
237
245
  };
238
246
  export declare const WebhooksListQuery: Schema.Struct<{
239
247
  readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
240
- readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
241
- readonly search: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
242
- readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>, Schema.Null]>>;
248
+ readonly cursor: Schema.optionalKey<Schema.String>;
249
+ readonly search: Schema.optionalKey<Schema.String>;
250
+ readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>>;
243
251
  }>;
244
252
  export type WebhooksList200 = WebhookEndpointPage;
245
253
  export declare const WebhooksList200: Schema.Struct<{
@@ -248,7 +256,7 @@ export declare const WebhooksList200: Schema.Struct<{
248
256
  readonly name: Schema.String;
249
257
  readonly url: Schema.String;
250
258
  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<"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.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>;
251
- readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
259
+ readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>;
252
260
  readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
253
261
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
254
262
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
@@ -267,6 +275,8 @@ export declare const WebhooksList200: Schema.Struct<{
267
275
  }>>;
268
276
  readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
269
277
  }>;
278
+ export type WebhooksList400 = MalformedRequestError;
279
+ export declare const WebhooksList400: typeof MalformedRequestError;
270
280
  export type WebhooksList401 = UnauthorizedError;
271
281
  export declare const WebhooksList401: typeof UnauthorizedError;
272
282
  export type WebhooksList403 = ForbiddenError;
@@ -281,7 +291,7 @@ export type WebhooksCreateRequestJson = {
281
291
  readonly name: string;
282
292
  readonly url: string;
283
293
  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" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook">;
284
- readonly channels?: ReadonlyArray<"email"> | null;
294
+ readonly channels?: ReadonlyArray<"sms" | "whatsapp" | "email"> | null;
285
295
  readonly mailboxIds?: readonly [MailboxId, ...Array<MailboxId>] | null;
286
296
  readonly namespaceId?: NamespaceId | null;
287
297
  readonly headers?: {
@@ -293,7 +303,7 @@ export declare const WebhooksCreateRequestJson: Schema.Struct<{
293
303
  readonly name: Schema.String;
294
304
  readonly url: Schema.String;
295
305
  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<"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.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>;
296
- readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>>;
306
+ readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>>;
297
307
  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]>>;
298
308
  readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
299
309
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
@@ -309,7 +319,7 @@ export declare const WebhooksCreate201: Schema.Struct<{
309
319
  readonly name: Schema.String;
310
320
  readonly url: Schema.String;
311
321
  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<"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.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>;
312
- readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
322
+ readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>;
313
323
  readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
314
324
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
315
325
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
@@ -321,6 +331,8 @@ export declare const WebhooksCreate201: Schema.Struct<{
321
331
  }>;
322
332
  readonly secret: Schema.RedactedFromValue<Schema.Codec<string, string, never, never>>;
323
333
  }>;
334
+ export type WebhooksCreate400 = MalformedRequestError;
335
+ export declare const WebhooksCreate400: typeof MalformedRequestError;
324
336
  export type WebhooksCreate401 = UnauthorizedError;
325
337
  export declare const WebhooksCreate401: typeof UnauthorizedError;
326
338
  export type WebhooksCreate402 = PaymentRequiredError;
@@ -351,7 +363,7 @@ export declare const WebhooksGet200: Schema.Struct<{
351
363
  readonly name: Schema.String;
352
364
  readonly url: Schema.String;
353
365
  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<"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.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>;
354
- readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
366
+ readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>;
355
367
  readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
356
368
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
357
369
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
@@ -361,6 +373,8 @@ export declare const WebhooksGet200: Schema.Struct<{
361
373
  readonly createdAt: Schema.String;
362
374
  readonly updatedAt: Schema.String;
363
375
  }>;
376
+ export type WebhooksGet400 = MalformedRequestError;
377
+ export declare const WebhooksGet400: typeof MalformedRequestError;
364
378
  export type WebhooksGet401 = UnauthorizedError;
365
379
  export declare const WebhooksGet401: typeof UnauthorizedError;
366
380
  export type WebhooksGet403 = ForbiddenError;
@@ -383,6 +397,8 @@ export type WebhooksRemove200 = SuccessResponse;
383
397
  export declare const WebhooksRemove200: Schema.Struct<{
384
398
  readonly success: Schema.Boolean;
385
399
  }>;
400
+ export type WebhooksRemove400 = MalformedRequestError;
401
+ export declare const WebhooksRemove400: typeof MalformedRequestError;
386
402
  export type WebhooksRemove401 = UnauthorizedError;
387
403
  export declare const WebhooksRemove401: typeof UnauthorizedError;
388
404
  export type WebhooksRemove403 = ForbiddenError;
@@ -407,7 +423,7 @@ export type WebhooksUpdateRequestJson = {
407
423
  readonly name?: string | null;
408
424
  readonly url?: string | null;
409
425
  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" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook"> | null;
410
- readonly channels?: ReadonlyArray<"email"> | null;
426
+ readonly channels?: ReadonlyArray<"sms" | "whatsapp" | "email"> | null;
411
427
  readonly mailboxIds?: readonly [MailboxId, ...Array<MailboxId>] | null;
412
428
  readonly namespaceId?: NamespaceId | null;
413
429
  readonly headers?: {
@@ -419,7 +435,7 @@ export declare const WebhooksUpdateRequestJson: Schema.Struct<{
419
435
  readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
420
436
  readonly url: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
421
437
  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<"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.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>, Schema.Null]>>;
422
- readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>>;
438
+ readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>>;
423
439
  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]>>;
424
440
  readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
425
441
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
@@ -431,7 +447,7 @@ export declare const WebhooksUpdate200: Schema.Struct<{
431
447
  readonly name: Schema.String;
432
448
  readonly url: Schema.String;
433
449
  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<"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.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>;
434
- readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
450
+ readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>;
435
451
  readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
436
452
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
437
453
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
@@ -441,6 +457,8 @@ export declare const WebhooksUpdate200: Schema.Struct<{
441
457
  readonly createdAt: Schema.String;
442
458
  readonly updatedAt: Schema.String;
443
459
  }>;
460
+ export type WebhooksUpdate400 = MalformedRequestError;
461
+ export declare const WebhooksUpdate400: typeof MalformedRequestError;
444
462
  export type WebhooksUpdate401 = UnauthorizedError;
445
463
  export declare const WebhooksUpdate401: typeof UnauthorizedError;
446
464
  export type WebhooksUpdate403 = ForbiddenError;
@@ -475,6 +493,8 @@ export declare const WebhooksRetryDelivery200: Schema.Struct<{
475
493
  readonly attemptId: Schema.brand<Schema.String, "WebhookAttemptId">;
476
494
  readonly outcome: Schema.Union<readonly [Schema.Literal<"succeeded">, Schema.Literal<"failed">]>;
477
495
  }>;
496
+ export type WebhooksRetryDelivery400 = MalformedRequestError;
497
+ export declare const WebhooksRetryDelivery400: typeof MalformedRequestError;
478
498
  export type WebhooksRetryDelivery401 = UnauthorizedError;
479
499
  export declare const WebhooksRetryDelivery401: typeof UnauthorizedError;
480
500
  export type WebhooksRetryDelivery403 = ForbiddenError;
@@ -497,11 +517,11 @@ export declare const WebhooksGetLogsPathParams: Schema.Struct<{
497
517
  }>;
498
518
  export type WebhooksGetLogsQuery = {
499
519
  readonly limit?: number | null;
500
- readonly cursor?: Cursor | null;
520
+ readonly cursor?: string;
501
521
  };
502
522
  export declare const WebhooksGetLogsQuery: Schema.Struct<{
503
523
  readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
504
- readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
524
+ readonly cursor: Schema.optionalKey<Schema.String>;
505
525
  }>;
506
526
  export type WebhooksGetLogs200 = WebhookDeliveryPage;
507
527
  export declare const WebhooksGetLogs200: Schema.Struct<{
@@ -535,6 +555,8 @@ export declare const WebhooksGetLogs200: Schema.Struct<{
535
555
  }>>;
536
556
  readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
537
557
  }>;
558
+ export type WebhooksGetLogs400 = MalformedRequestError;
559
+ export declare const WebhooksGetLogs400: typeof MalformedRequestError;
538
560
  export type WebhooksGetLogs401 = UnauthorizedError;
539
561
  export declare const WebhooksGetLogs401: typeof UnauthorizedError;
540
562
  export type WebhooksGetLogs403 = ForbiddenError;
@@ -559,6 +581,8 @@ export type WebhooksRegenerateSecret200 = {
559
581
  export declare const WebhooksRegenerateSecret200: Schema.Struct<{
560
582
  readonly secret: Schema.RedactedFromValue<Schema.Codec<string, string, never, never>>;
561
583
  }>;
584
+ export type WebhooksRegenerateSecret400 = MalformedRequestError;
585
+ export declare const WebhooksRegenerateSecret400: typeof MalformedRequestError;
562
586
  export type WebhooksRegenerateSecret401 = UnauthorizedError;
563
587
  export declare const WebhooksRegenerateSecret401: typeof UnauthorizedError;
564
588
  export type WebhooksRegenerateSecret403 = ForbiddenError;
@@ -583,6 +607,8 @@ export declare const WebhooksGetSecret200: Schema.Struct<{
583
607
  readonly createdAt: Schema.String;
584
608
  readonly previousExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
585
609
  }>;
610
+ export type WebhooksGetSecret400 = MalformedRequestError;
611
+ export declare const WebhooksGetSecret400: typeof MalformedRequestError;
586
612
  export type WebhooksGetSecret401 = UnauthorizedError;
587
613
  export declare const WebhooksGetSecret401: typeof UnauthorizedError;
588
614
  export type WebhooksGetSecret403 = ForbiddenError;
@@ -602,12 +628,12 @@ export declare const WebhooksGetStatsPathParams: Schema.Struct<{
602
628
  readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
603
629
  }>;
604
630
  export type WebhooksGetStatsQuery = {
605
- readonly after?: string | null;
606
- readonly before?: string | null;
631
+ readonly after?: string;
632
+ readonly before?: string;
607
633
  };
608
634
  export declare const WebhooksGetStatsQuery: Schema.Struct<{
609
- readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
610
- readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
635
+ readonly after: Schema.optionalKey<Schema.String>;
636
+ readonly before: Schema.optionalKey<Schema.String>;
611
637
  }>;
612
638
  export type WebhooksGetStats200 = WebhookStatsResponse;
613
639
  export declare const WebhooksGetStats200: Schema.Struct<{
@@ -623,7 +649,13 @@ export declare const WebhooksGetStats200: Schema.Struct<{
623
649
  readonly exhausted: Schema.Finite;
624
650
  readonly cancelled: Schema.Finite;
625
651
  }>>;
652
+ readonly latestAttempt: Schema.Union<readonly [Schema.Struct<{
653
+ readonly errorCode: Schema.Union<readonly [Schema.String, Schema.Null]>;
654
+ readonly completedAt: Schema.String;
655
+ }>, Schema.Null]>;
626
656
  }>;
657
+ export type WebhooksGetStats400 = MalformedRequestError;
658
+ export declare const WebhooksGetStats400: typeof MalformedRequestError;
627
659
  export type WebhooksGetStats401 = UnauthorizedError;
628
660
  export declare const WebhooksGetStats401: typeof UnauthorizedError;
629
661
  export type WebhooksGetStats403 = ForbiddenError;
@@ -660,6 +692,8 @@ export declare const WebhooksTest202: Schema.Struct<{
660
692
  readonly eventId: Schema.brand<Schema.String, "WebhookEventId">;
661
693
  readonly deliveryId: Schema.brand<Schema.String, "WebhookDeliveryId">;
662
694
  }>;
695
+ export type WebhooksTest400 = MalformedRequestError;
696
+ export declare const WebhooksTest400: typeof MalformedRequestError;
663
697
  export type WebhooksTest401 = UnauthorizedError;
664
698
  export declare const WebhooksTest401: typeof UnauthorizedError;
665
699
  export type WebhooksTest403 = ForbiddenError;
@@ -676,7 +710,7 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
676
710
  readonly name: Schema.String;
677
711
  readonly url: Schema.String;
678
712
  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<"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.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>;
679
- readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>>;
713
+ readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>>;
680
714
  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]>>;
681
715
  readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
682
716
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
@@ -687,7 +721,7 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
687
721
  readonly name: Schema.String;
688
722
  readonly url: Schema.String;
689
723
  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<"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.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>;
690
- readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
724
+ readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>;
691
725
  readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
692
726
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
693
727
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
@@ -758,6 +792,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
758
792
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
759
793
  readonly message: Schema.String;
760
794
  readonly retryAfterSeconds: Schema.Finite;
795
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
796
+ readonly _tag: "MalformedRequestError";
797
+ readonly message: string;
798
+ readonly fields: {
799
+ readonly [x: string]: readonly string[];
800
+ };
801
+ }, readonly [Schema.Struct<{
802
+ readonly _tag: Schema.tag<"MalformedRequestError">;
803
+ readonly message: Schema.String;
804
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
805
+ }>], {
806
+ readonly _tag: "MalformedRequestError";
807
+ readonly message: string;
808
+ readonly fields: {
809
+ readonly [x: string]: readonly string[];
810
+ };
811
+ }>, Schema.Struct<{
812
+ readonly _tag: Schema.tag<"MalformedRequestError">;
813
+ readonly message: Schema.String;
814
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
761
815
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<PaymentRequiredError, {
762
816
  readonly _tag: "PaymentRequiredError";
763
817
  readonly message: string;
@@ -841,7 +895,7 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
841
895
  readonly name: Schema.String;
842
896
  readonly url: Schema.String;
843
897
  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<"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.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>;
844
- readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
898
+ readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>;
845
899
  readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
846
900
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
847
901
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
@@ -878,6 +932,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
878
932
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
879
933
  readonly message: Schema.String;
880
934
  readonly retryAfterSeconds: Schema.Finite;
935
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
936
+ readonly _tag: "MalformedRequestError";
937
+ readonly message: string;
938
+ readonly fields: {
939
+ readonly [x: string]: readonly string[];
940
+ };
941
+ }, readonly [Schema.Struct<{
942
+ readonly _tag: Schema.tag<"MalformedRequestError">;
943
+ readonly message: Schema.String;
944
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
945
+ }>], {
946
+ readonly _tag: "MalformedRequestError";
947
+ readonly message: string;
948
+ readonly fields: {
949
+ readonly [x: string]: readonly string[];
950
+ };
951
+ }>, Schema.Struct<{
952
+ readonly _tag: Schema.tag<"MalformedRequestError">;
953
+ readonly message: Schema.String;
954
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
881
955
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
882
956
  readonly _tag: "ResourceNotFoundError";
883
957
  readonly resource: string;
@@ -934,7 +1008,7 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
934
1008
  readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
935
1009
  }>>, Schema.toCodecStringTree<Schema.Struct<{
936
1010
  readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
937
- readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1011
+ readonly cursor: Schema.optionalKey<Schema.String>;
938
1012
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
939
1013
  readonly items: Schema.$Array<Schema.Struct<{
940
1014
  readonly id: Schema.brand<Schema.String, "WebhookDeliveryId">;
@@ -993,6 +1067,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
993
1067
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
994
1068
  readonly message: Schema.String;
995
1069
  readonly retryAfterSeconds: Schema.Finite;
1070
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1071
+ readonly _tag: "MalformedRequestError";
1072
+ readonly message: string;
1073
+ readonly fields: {
1074
+ readonly [x: string]: readonly string[];
1075
+ };
1076
+ }, readonly [Schema.Struct<{
1077
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1078
+ readonly message: Schema.String;
1079
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1080
+ }>], {
1081
+ readonly _tag: "MalformedRequestError";
1082
+ readonly message: string;
1083
+ readonly fields: {
1084
+ readonly [x: string]: readonly string[];
1085
+ };
1086
+ }>, Schema.Struct<{
1087
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1088
+ readonly message: Schema.String;
1089
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
996
1090
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
997
1091
  readonly _tag: "ResourceNotFoundError";
998
1092
  readonly resource: string;
@@ -1079,6 +1173,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1079
1173
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1080
1174
  readonly message: Schema.String;
1081
1175
  readonly retryAfterSeconds: Schema.Finite;
1176
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1177
+ readonly _tag: "MalformedRequestError";
1178
+ readonly message: string;
1179
+ readonly fields: {
1180
+ readonly [x: string]: readonly string[];
1181
+ };
1182
+ }, readonly [Schema.Struct<{
1183
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1184
+ readonly message: Schema.String;
1185
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1186
+ }>], {
1187
+ readonly _tag: "MalformedRequestError";
1188
+ readonly message: string;
1189
+ readonly fields: {
1190
+ readonly [x: string]: readonly string[];
1191
+ };
1192
+ }>, Schema.Struct<{
1193
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1194
+ readonly message: Schema.String;
1195
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1082
1196
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1083
1197
  readonly _tag: "ResourceNotFoundError";
1084
1198
  readonly resource: string;
@@ -1134,8 +1248,8 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1134
1248
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"webhooksGetStats", "GET", "/v1/webhooks/:id/stats", Schema.toCodecStringTree<Schema.Struct<{
1135
1249
  readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
1136
1250
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1137
- readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1138
- readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1251
+ readonly after: Schema.optionalKey<Schema.String>;
1252
+ readonly before: Schema.optionalKey<Schema.String>;
1139
1253
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1140
1254
  readonly total: Schema.Finite;
1141
1255
  readonly pending: Schema.Finite;
@@ -1149,6 +1263,10 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1149
1263
  readonly exhausted: Schema.Finite;
1150
1264
  readonly cancelled: Schema.Finite;
1151
1265
  }>>;
1266
+ readonly latestAttempt: Schema.Union<readonly [Schema.Struct<{
1267
+ readonly errorCode: Schema.Union<readonly [Schema.String, Schema.Null]>;
1268
+ readonly completedAt: Schema.String;
1269
+ }>, Schema.Null]>;
1152
1270
  }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
1153
1271
  readonly _tag: "ForbiddenError";
1154
1272
  readonly message: string;
@@ -1177,6 +1295,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1177
1295
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1178
1296
  readonly message: Schema.String;
1179
1297
  readonly retryAfterSeconds: Schema.Finite;
1298
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1299
+ readonly _tag: "MalformedRequestError";
1300
+ readonly message: string;
1301
+ readonly fields: {
1302
+ readonly [x: string]: readonly string[];
1303
+ };
1304
+ }, readonly [Schema.Struct<{
1305
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1306
+ readonly message: Schema.String;
1307
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1308
+ }>], {
1309
+ readonly _tag: "MalformedRequestError";
1310
+ readonly message: string;
1311
+ readonly fields: {
1312
+ readonly [x: string]: readonly string[];
1313
+ };
1314
+ }>, Schema.Struct<{
1315
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1316
+ readonly message: Schema.String;
1317
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1180
1318
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1181
1319
  readonly _tag: "ResourceNotFoundError";
1182
1320
  readonly resource: string;
@@ -1231,16 +1369,16 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1231
1369
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1232
1370
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"webhooksList", "GET", "/v1/webhooks", never, Schema.toCodecStringTree<Schema.Struct<{
1233
1371
  readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1234
- readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1235
- readonly search: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1236
- readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>, Schema.Null]>>;
1372
+ readonly cursor: Schema.optionalKey<Schema.String>;
1373
+ readonly search: Schema.optionalKey<Schema.String>;
1374
+ readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>>;
1237
1375
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1238
1376
  readonly items: Schema.$Array<Schema.Struct<{
1239
1377
  readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
1240
1378
  readonly name: Schema.String;
1241
1379
  readonly url: Schema.String;
1242
1380
  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<"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.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>;
1243
- readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
1381
+ readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>;
1244
1382
  readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
1245
1383
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1246
1384
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
@@ -1286,6 +1424,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1286
1424
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1287
1425
  readonly message: Schema.String;
1288
1426
  readonly retryAfterSeconds: Schema.Finite;
1427
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1428
+ readonly _tag: "MalformedRequestError";
1429
+ readonly message: string;
1430
+ readonly fields: {
1431
+ readonly [x: string]: readonly string[];
1432
+ };
1433
+ }, readonly [Schema.Struct<{
1434
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1435
+ readonly message: Schema.String;
1436
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1437
+ }>], {
1438
+ readonly _tag: "MalformedRequestError";
1439
+ readonly message: string;
1440
+ readonly fields: {
1441
+ readonly [x: string]: readonly string[];
1442
+ };
1443
+ }>, Schema.Struct<{
1444
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1445
+ readonly message: Schema.String;
1446
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1289
1447
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
1290
1448
  readonly _tag: "UnauthorizedError";
1291
1449
  readonly message: string;
@@ -1350,6 +1508,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1350
1508
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1351
1509
  readonly message: Schema.String;
1352
1510
  readonly retryAfterSeconds: Schema.Finite;
1511
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1512
+ readonly _tag: "MalformedRequestError";
1513
+ readonly message: string;
1514
+ readonly fields: {
1515
+ readonly [x: string]: readonly string[];
1516
+ };
1517
+ }, readonly [Schema.Struct<{
1518
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1519
+ readonly message: Schema.String;
1520
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1521
+ }>], {
1522
+ readonly _tag: "MalformedRequestError";
1523
+ readonly message: string;
1524
+ readonly fields: {
1525
+ readonly [x: string]: readonly string[];
1526
+ };
1527
+ }>, Schema.Struct<{
1528
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1529
+ readonly message: Schema.String;
1530
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1353
1531
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1354
1532
  readonly _tag: "ResourceNotFoundError";
1355
1533
  readonly resource: string;
@@ -1446,6 +1624,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1446
1624
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1447
1625
  readonly message: Schema.String;
1448
1626
  readonly retryAfterSeconds: Schema.Finite;
1627
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1628
+ readonly _tag: "MalformedRequestError";
1629
+ readonly message: string;
1630
+ readonly fields: {
1631
+ readonly [x: string]: readonly string[];
1632
+ };
1633
+ }, readonly [Schema.Struct<{
1634
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1635
+ readonly message: Schema.String;
1636
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1637
+ }>], {
1638
+ readonly _tag: "MalformedRequestError";
1639
+ readonly message: string;
1640
+ readonly fields: {
1641
+ readonly [x: string]: readonly string[];
1642
+ };
1643
+ }>, Schema.Struct<{
1644
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1645
+ readonly message: Schema.String;
1646
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1449
1647
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1450
1648
  readonly _tag: "ResourceNotFoundError";
1451
1649
  readonly resource: string;
@@ -1534,6 +1732,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1534
1732
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1535
1733
  readonly message: Schema.String;
1536
1734
  readonly retryAfterSeconds: Schema.Finite;
1735
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1736
+ readonly _tag: "MalformedRequestError";
1737
+ readonly message: string;
1738
+ readonly fields: {
1739
+ readonly [x: string]: readonly string[];
1740
+ };
1741
+ }, readonly [Schema.Struct<{
1742
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1743
+ readonly message: Schema.String;
1744
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1745
+ }>], {
1746
+ readonly _tag: "MalformedRequestError";
1747
+ readonly message: string;
1748
+ readonly fields: {
1749
+ readonly [x: string]: readonly string[];
1750
+ };
1751
+ }>, Schema.Struct<{
1752
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1753
+ readonly message: Schema.String;
1754
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1537
1755
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<RateLimitedError, {
1538
1756
  readonly _tag: "RateLimitedError";
1539
1757
  readonly message: string;
@@ -1638,6 +1856,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1638
1856
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1639
1857
  readonly message: Schema.String;
1640
1858
  readonly retryAfterSeconds: Schema.Finite;
1859
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1860
+ readonly _tag: "MalformedRequestError";
1861
+ readonly message: string;
1862
+ readonly fields: {
1863
+ readonly [x: string]: readonly string[];
1864
+ };
1865
+ }, readonly [Schema.Struct<{
1866
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1867
+ readonly message: Schema.String;
1868
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1869
+ }>], {
1870
+ readonly _tag: "MalformedRequestError";
1871
+ readonly message: string;
1872
+ readonly fields: {
1873
+ readonly [x: string]: readonly string[];
1874
+ };
1875
+ }>, Schema.Struct<{
1876
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1877
+ readonly message: Schema.String;
1878
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1641
1879
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1642
1880
  readonly _tag: "ResourceNotFoundError";
1643
1881
  readonly resource: string;
@@ -1696,7 +1934,7 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1696
1934
  readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1697
1935
  readonly url: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1698
1936
  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<"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.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>, Schema.Null]>>;
1699
- readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>>;
1937
+ readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>>;
1700
1938
  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]>>;
1701
1939
  readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
1702
1940
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
@@ -1706,7 +1944,7 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1706
1944
  readonly name: Schema.String;
1707
1945
  readonly url: Schema.String;
1708
1946
  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<"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.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>;
1709
- readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
1947
+ readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>;
1710
1948
  readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
1711
1949
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1712
1950
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
@@ -1763,6 +2001,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1763
2001
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1764
2002
  readonly message: Schema.String;
1765
2003
  readonly retryAfterSeconds: Schema.Finite;
2004
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
2005
+ readonly _tag: "MalformedRequestError";
2006
+ readonly message: string;
2007
+ readonly fields: {
2008
+ readonly [x: string]: readonly string[];
2009
+ };
2010
+ }, readonly [Schema.Struct<{
2011
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2012
+ readonly message: Schema.String;
2013
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2014
+ }>], {
2015
+ readonly _tag: "MalformedRequestError";
2016
+ readonly message: string;
2017
+ readonly fields: {
2018
+ readonly [x: string]: readonly string[];
2019
+ };
2020
+ }>, Schema.Struct<{
2021
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2022
+ readonly message: Schema.String;
2023
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1766
2024
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1767
2025
  readonly _tag: "ResourceNotFoundError";
1768
2026
  readonly resource: string;