samva 0.34.0 → 0.36.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 (129) hide show
  1. package/AGENTS.md +17 -0
  2. package/README.md +2 -1
  3. package/dist/client/sdk.gen.d.ts +325 -331
  4. package/dist/client/sdk.gen.js +406 -454
  5. package/dist/client/types.gen.d.ts +3465 -750
  6. package/dist/effect/agents.d.ts +222 -17
  7. package/dist/effect/agents.js +7 -1
  8. package/dist/effect/analytics.d.ts +21 -15
  9. package/dist/effect/api-keys.d.ts +30 -24
  10. package/dist/effect/campaigns.d.ts +695 -39
  11. package/dist/effect/categories.d.ts +3 -3
  12. package/dist/effect/contact-groups.d.ts +15 -15
  13. package/dist/effect/contacts.d.ts +56 -52
  14. package/dist/effect/conversations.d.ts +51 -45
  15. package/dist/effect/email.d.ts +82 -82
  16. package/dist/effect/errors.d.ts +1 -1
  17. package/dist/effect/errors.js +2 -2
  18. package/dist/effect/extension-installations.d.ts +64 -12
  19. package/dist/effect/extensions.d.ts +16 -16
  20. package/dist/effect/generated/agents.d.ts +2902 -150
  21. package/dist/effect/generated/agents.js +219 -31
  22. package/dist/effect/generated/analytics.d.ts +127 -136
  23. package/dist/effect/generated/analytics.js +72 -37
  24. package/dist/effect/generated/api-keys.d.ts +243 -47
  25. package/dist/effect/generated/api-keys.js +27 -12
  26. package/dist/effect/generated/attachments.d.ts +89 -1
  27. package/dist/effect/generated/attachments.js +10 -2
  28. package/dist/effect/generated/brands.d.ts +133 -1
  29. package/dist/effect/generated/brands.js +22 -10
  30. package/dist/effect/generated/campaigns.d.ts +1467 -143
  31. package/dist/effect/generated/campaigns.js +84 -20
  32. package/dist/effect/generated/contact-events.d.ts +26 -4
  33. package/dist/effect/generated/contact-events.js +5 -3
  34. package/dist/effect/generated/contact-groups.d.ts +233 -13
  35. package/dist/effect/generated/contact-groups.js +33 -17
  36. package/dist/effect/generated/contacts.d.ts +634 -96
  37. package/dist/effect/generated/contacts.js +82 -20
  38. package/dist/effect/generated/conversations.d.ts +501 -108
  39. package/dist/effect/generated/conversations.js +106 -22
  40. package/dist/effect/generated/custom-fields.d.ts +89 -1
  41. package/dist/effect/generated/custom-fields.js +11 -3
  42. package/dist/effect/generated/email.d.ts +1447 -83
  43. package/dist/effect/generated/email.js +167 -43
  44. package/dist/effect/generated/events.d.ts +51 -7
  45. package/dist/effect/generated/events.js +9 -5
  46. package/dist/effect/generated/extension-installations.d.ts +1052 -77
  47. package/dist/effect/generated/extension-installations.js +45 -31
  48. package/dist/effect/generated/extensions.d.ts +123 -13
  49. package/dist/effect/generated/extensions.js +20 -10
  50. package/dist/effect/generated/feedback.d.ts +23 -1
  51. package/dist/effect/generated/feedback.js +6 -4
  52. package/dist/effect/generated/index.d.ts +3 -1
  53. package/dist/effect/generated/journeys.d.ts +684 -16
  54. package/dist/effect/generated/journeys.js +37 -9
  55. package/dist/effect/generated/mailboxes.d.ts +6169 -1734
  56. package/dist/effect/generated/mailboxes.js +549 -344
  57. package/dist/effect/generated/media.d.ts +125 -15
  58. package/dist/effect/generated/media.js +15 -2
  59. package/dist/effect/generated/messages.d.ts +2036 -117
  60. package/dist/effect/generated/messages.js +286 -54
  61. package/dist/effect/generated/namespaces.d.ts +215 -55
  62. package/dist/effect/generated/namespaces.js +30 -12
  63. package/dist/effect/generated/newsletter-domains.d.ts +98 -12
  64. package/dist/effect/generated/newsletter-domains.js +20 -13
  65. package/dist/effect/generated/newsletter-issues.d.ts +354 -19
  66. package/dist/effect/generated/newsletter-issues.js +162 -98
  67. package/dist/effect/generated/newsletters.d.ts +123 -13
  68. package/dist/effect/generated/newsletters.js +19 -9
  69. package/dist/effect/generated/operations.d.ts +76 -10
  70. package/dist/effect/generated/operations.js +12 -6
  71. package/dist/effect/generated/organizations.d.ts +287 -7
  72. package/dist/effect/generated/organizations.js +33 -5
  73. package/dist/effect/generated/policies.d.ts +953 -0
  74. package/dist/effect/generated/policies.js +116 -0
  75. package/dist/effect/generated/scheduled-messages.d.ts +4418 -49
  76. package/dist/effect/generated/scheduled-messages.js +77 -13
  77. package/dist/effect/generated/shared.d.ts +3213 -521
  78. package/dist/effect/generated/shared.js +713 -128
  79. package/dist/effect/generated/subscriptions.d.ts +23 -1
  80. package/dist/effect/generated/subscriptions.js +6 -4
  81. package/dist/effect/generated/templates.d.ts +2081 -693
  82. package/dist/effect/generated/templates.js +482 -267
  83. package/dist/effect/generated/topic-forms.d.ts +111 -1
  84. package/dist/effect/generated/topic-forms.js +23 -13
  85. package/dist/effect/generated/topics.d.ts +353 -43
  86. package/dist/effect/generated/topics.js +67 -19
  87. package/dist/effect/generated/webhooks.d.ts +318 -57
  88. package/dist/effect/generated/webhooks.js +68 -17
  89. package/dist/effect/generated/whoami.d.ts +35 -5
  90. package/dist/effect/generated/whoami.js +4 -2
  91. package/dist/effect/generated-metadata.d.ts +56 -32
  92. package/dist/effect/generated-metadata.js +137 -105
  93. package/dist/effect/index.d.ts +1 -0
  94. package/dist/effect/index.js +3 -2
  95. package/dist/effect/internal/client.js +1 -1
  96. package/dist/effect/internal/email-sender.d.ts +1 -1
  97. package/dist/effect/internal/operation.js +5 -32
  98. package/dist/effect/internal/send.d.ts +1 -1
  99. package/dist/effect/journeys.d.ts +169 -83
  100. package/dist/effect/mailboxes.d.ts +978 -301
  101. package/dist/effect/mailboxes.js +1 -11
  102. package/dist/effect/media.d.ts +1 -1
  103. package/dist/effect/messages.d.ts +40 -40
  104. package/dist/effect/namespaces.d.ts +15 -15
  105. package/dist/effect/newsletter-domains.d.ts +5 -5
  106. package/dist/effect/newsletters.d.ts +1 -1
  107. package/dist/effect/operations.d.ts +11 -11
  108. package/dist/effect/organizations.d.ts +2 -2
  109. package/dist/effect/policies.d.ts +65 -0
  110. package/dist/effect/policies.js +16 -0
  111. package/dist/effect/scheduled-messages.d.ts +869 -8
  112. package/dist/effect/templates.d.ts +43 -45
  113. package/dist/effect/templates.js +5 -3
  114. package/dist/effect/topics.d.ts +23 -23
  115. package/dist/effect/webhooks.d.ts +29 -26
  116. package/dist/index.js +2 -2
  117. package/dist/mailbox/test.js +11 -4
  118. package/dist/mailbox/types.d.ts +39 -3
  119. package/dist/normalize.js +13 -1
  120. package/dist/package.js +1 -1
  121. package/dist/promises/client.d.ts +4 -2
  122. package/dist/promises/client.js +5 -3
  123. package/dist/promises/errors.gen.d.ts +38 -2
  124. package/dist/promises/errors.gen.js +394 -34
  125. package/dist/promises/index.js +2 -2
  126. package/dist/promises/types.gen.d.ts +1 -1
  127. package/dist/service-map.d.ts +39 -28
  128. package/dist/service-map.js +220 -782
  129. package/package.json +13 -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;
@@ -50,8 +50,8 @@ export type WebhookEndpoint = {
50
50
  readonly id: WebhookEndpointId;
51
51
  readonly name: string;
52
52
  readonly url: string;
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;
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" | "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.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook">;
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";
@@ -65,8 +65,8 @@ export declare const WebhookEndpoint: Schema.Struct<{
65
65
  readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
66
66
  readonly name: Schema.String;
67
67
  readonly url: Schema.String;
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]>;
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<"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.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.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">]>;
@@ -80,8 +80,8 @@ export type WebhookEndpointListItem = {
80
80
  readonly id: WebhookEndpointId;
81
81
  readonly name: string;
82
82
  readonly url: string;
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;
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" | "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.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook">;
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";
@@ -96,8 +96,8 @@ export declare const WebhookEndpointListItem: Schema.Struct<{
96
96
  readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
97
97
  readonly name: Schema.String;
98
98
  readonly url: Schema.String;
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]>;
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<"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.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.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>;
@@ -209,8 +217,8 @@ export declare const WebhookEndpointPage: Schema.Struct<{
209
217
  readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
210
218
  readonly name: Schema.String;
211
219
  readonly url: Schema.String;
212
- 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]>;
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<"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.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">]>>;
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,17 @@ 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 namespaceId?: NamespaceId;
244
+ readonly search?: string;
245
+ readonly status?: "active" | "disabled";
237
246
  };
238
247
  export declare const WebhooksListQuery: Schema.Struct<{
239
248
  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]>>;
249
+ readonly cursor: Schema.optionalKey<Schema.String>;
250
+ readonly namespaceId: Schema.optionalKey<Schema.brand<Schema.String, "NamespaceId">>;
251
+ readonly search: Schema.optionalKey<Schema.String>;
252
+ readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>>;
243
253
  }>;
244
254
  export type WebhooksList200 = WebhookEndpointPage;
245
255
  export declare const WebhooksList200: Schema.Struct<{
@@ -247,8 +257,8 @@ export declare const WebhooksList200: Schema.Struct<{
247
257
  readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
248
258
  readonly name: Schema.String;
249
259
  readonly url: Schema.String;
250
- 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]>;
260
+ 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.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">]>>;
261
+ readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>;
252
262
  readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
253
263
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
254
264
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
@@ -267,6 +277,8 @@ export declare const WebhooksList200: Schema.Struct<{
267
277
  }>>;
268
278
  readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
269
279
  }>;
280
+ export type WebhooksList400 = MalformedRequestError;
281
+ export declare const WebhooksList400: typeof MalformedRequestError;
270
282
  export type WebhooksList401 = UnauthorizedError;
271
283
  export declare const WebhooksList401: typeof UnauthorizedError;
272
284
  export type WebhooksList403 = ForbiddenError;
@@ -280,8 +292,8 @@ export declare const WebhooksList504: typeof GatewayTimeoutError;
280
292
  export type WebhooksCreateRequestJson = {
281
293
  readonly name: string;
282
294
  readonly url: string;
283
- 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;
295
+ 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.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook">;
296
+ readonly channels?: ReadonlyArray<"sms" | "whatsapp" | "email"> | null;
285
297
  readonly mailboxIds?: readonly [MailboxId, ...Array<MailboxId>] | null;
286
298
  readonly namespaceId?: NamespaceId | null;
287
299
  readonly headers?: {
@@ -292,8 +304,8 @@ export type WebhooksCreateRequestJson = {
292
304
  export declare const WebhooksCreateRequestJson: Schema.Struct<{
293
305
  readonly name: Schema.String;
294
306
  readonly url: Schema.String;
295
- 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]>>;
307
+ 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.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">]>>;
308
+ readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>>;
297
309
  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
310
  readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
299
311
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
@@ -308,8 +320,8 @@ export declare const WebhooksCreate201: Schema.Struct<{
308
320
  readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
309
321
  readonly name: Schema.String;
310
322
  readonly url: Schema.String;
311
- 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]>;
323
+ 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.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">]>>;
324
+ readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>;
313
325
  readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
314
326
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
315
327
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
@@ -321,6 +333,8 @@ export declare const WebhooksCreate201: Schema.Struct<{
321
333
  }>;
322
334
  readonly secret: Schema.RedactedFromValue<Schema.Codec<string, string, never, never>>;
323
335
  }>;
336
+ export type WebhooksCreate400 = MalformedRequestError;
337
+ export declare const WebhooksCreate400: typeof MalformedRequestError;
324
338
  export type WebhooksCreate401 = UnauthorizedError;
325
339
  export declare const WebhooksCreate401: typeof UnauthorizedError;
326
340
  export type WebhooksCreate402 = PaymentRequiredError;
@@ -350,8 +364,8 @@ export declare const WebhooksGet200: Schema.Struct<{
350
364
  readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
351
365
  readonly name: Schema.String;
352
366
  readonly url: Schema.String;
353
- 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]>;
367
+ 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.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">]>>;
368
+ readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>;
355
369
  readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
356
370
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
357
371
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
@@ -361,6 +375,8 @@ export declare const WebhooksGet200: Schema.Struct<{
361
375
  readonly createdAt: Schema.String;
362
376
  readonly updatedAt: Schema.String;
363
377
  }>;
378
+ export type WebhooksGet400 = MalformedRequestError;
379
+ export declare const WebhooksGet400: typeof MalformedRequestError;
364
380
  export type WebhooksGet401 = UnauthorizedError;
365
381
  export declare const WebhooksGet401: typeof UnauthorizedError;
366
382
  export type WebhooksGet403 = ForbiddenError;
@@ -383,6 +399,8 @@ export type WebhooksRemove200 = SuccessResponse;
383
399
  export declare const WebhooksRemove200: Schema.Struct<{
384
400
  readonly success: Schema.Boolean;
385
401
  }>;
402
+ export type WebhooksRemove400 = MalformedRequestError;
403
+ export declare const WebhooksRemove400: typeof MalformedRequestError;
386
404
  export type WebhooksRemove401 = UnauthorizedError;
387
405
  export declare const WebhooksRemove401: typeof UnauthorizedError;
388
406
  export type WebhooksRemove403 = ForbiddenError;
@@ -406,8 +424,8 @@ export declare const WebhooksUpdatePathParams: Schema.Struct<{
406
424
  export type WebhooksUpdateRequestJson = {
407
425
  readonly name?: string | null;
408
426
  readonly url?: string | null;
409
- 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;
427
+ 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.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook"> | null;
428
+ readonly channels?: ReadonlyArray<"sms" | "whatsapp" | "email"> | null;
411
429
  readonly mailboxIds?: readonly [MailboxId, ...Array<MailboxId>] | null;
412
430
  readonly namespaceId?: NamespaceId | null;
413
431
  readonly headers?: {
@@ -418,8 +436,8 @@ export type WebhooksUpdateRequestJson = {
418
436
  export declare const WebhooksUpdateRequestJson: Schema.Struct<{
419
437
  readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
420
438
  readonly url: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
421
- 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]>>;
439
+ 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.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]>>;
440
+ readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>>;
423
441
  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
442
  readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
425
443
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
@@ -430,8 +448,8 @@ export declare const WebhooksUpdate200: Schema.Struct<{
430
448
  readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
431
449
  readonly name: Schema.String;
432
450
  readonly url: Schema.String;
433
- 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]>;
451
+ 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.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">]>>;
452
+ readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>;
435
453
  readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
436
454
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
437
455
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
@@ -441,6 +459,8 @@ export declare const WebhooksUpdate200: Schema.Struct<{
441
459
  readonly createdAt: Schema.String;
442
460
  readonly updatedAt: Schema.String;
443
461
  }>;
462
+ export type WebhooksUpdate400 = MalformedRequestError;
463
+ export declare const WebhooksUpdate400: typeof MalformedRequestError;
444
464
  export type WebhooksUpdate401 = UnauthorizedError;
445
465
  export declare const WebhooksUpdate401: typeof UnauthorizedError;
446
466
  export type WebhooksUpdate403 = ForbiddenError;
@@ -475,6 +495,8 @@ export declare const WebhooksRetryDelivery200: Schema.Struct<{
475
495
  readonly attemptId: Schema.brand<Schema.String, "WebhookAttemptId">;
476
496
  readonly outcome: Schema.Union<readonly [Schema.Literal<"succeeded">, Schema.Literal<"failed">]>;
477
497
  }>;
498
+ export type WebhooksRetryDelivery400 = MalformedRequestError;
499
+ export declare const WebhooksRetryDelivery400: typeof MalformedRequestError;
478
500
  export type WebhooksRetryDelivery401 = UnauthorizedError;
479
501
  export declare const WebhooksRetryDelivery401: typeof UnauthorizedError;
480
502
  export type WebhooksRetryDelivery403 = ForbiddenError;
@@ -497,11 +519,11 @@ export declare const WebhooksGetLogsPathParams: Schema.Struct<{
497
519
  }>;
498
520
  export type WebhooksGetLogsQuery = {
499
521
  readonly limit?: number | null;
500
- readonly cursor?: Cursor | null;
522
+ readonly cursor?: string;
501
523
  };
502
524
  export declare const WebhooksGetLogsQuery: Schema.Struct<{
503
525
  readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
504
- readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
526
+ readonly cursor: Schema.optionalKey<Schema.String>;
505
527
  }>;
506
528
  export type WebhooksGetLogs200 = WebhookDeliveryPage;
507
529
  export declare const WebhooksGetLogs200: Schema.Struct<{
@@ -535,6 +557,8 @@ export declare const WebhooksGetLogs200: Schema.Struct<{
535
557
  }>>;
536
558
  readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
537
559
  }>;
560
+ export type WebhooksGetLogs400 = MalformedRequestError;
561
+ export declare const WebhooksGetLogs400: typeof MalformedRequestError;
538
562
  export type WebhooksGetLogs401 = UnauthorizedError;
539
563
  export declare const WebhooksGetLogs401: typeof UnauthorizedError;
540
564
  export type WebhooksGetLogs403 = ForbiddenError;
@@ -559,6 +583,8 @@ export type WebhooksRegenerateSecret200 = {
559
583
  export declare const WebhooksRegenerateSecret200: Schema.Struct<{
560
584
  readonly secret: Schema.RedactedFromValue<Schema.Codec<string, string, never, never>>;
561
585
  }>;
586
+ export type WebhooksRegenerateSecret400 = MalformedRequestError;
587
+ export declare const WebhooksRegenerateSecret400: typeof MalformedRequestError;
562
588
  export type WebhooksRegenerateSecret401 = UnauthorizedError;
563
589
  export declare const WebhooksRegenerateSecret401: typeof UnauthorizedError;
564
590
  export type WebhooksRegenerateSecret403 = ForbiddenError;
@@ -583,6 +609,8 @@ export declare const WebhooksGetSecret200: Schema.Struct<{
583
609
  readonly createdAt: Schema.String;
584
610
  readonly previousExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
585
611
  }>;
612
+ export type WebhooksGetSecret400 = MalformedRequestError;
613
+ export declare const WebhooksGetSecret400: typeof MalformedRequestError;
586
614
  export type WebhooksGetSecret401 = UnauthorizedError;
587
615
  export declare const WebhooksGetSecret401: typeof UnauthorizedError;
588
616
  export type WebhooksGetSecret403 = ForbiddenError;
@@ -602,12 +630,12 @@ export declare const WebhooksGetStatsPathParams: Schema.Struct<{
602
630
  readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
603
631
  }>;
604
632
  export type WebhooksGetStatsQuery = {
605
- readonly after?: string | null;
606
- readonly before?: string | null;
633
+ readonly after?: string;
634
+ readonly before?: string;
607
635
  };
608
636
  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]>>;
637
+ readonly after: Schema.optionalKey<Schema.String>;
638
+ readonly before: Schema.optionalKey<Schema.String>;
611
639
  }>;
612
640
  export type WebhooksGetStats200 = WebhookStatsResponse;
613
641
  export declare const WebhooksGetStats200: Schema.Struct<{
@@ -623,7 +651,13 @@ export declare const WebhooksGetStats200: Schema.Struct<{
623
651
  readonly exhausted: Schema.Finite;
624
652
  readonly cancelled: Schema.Finite;
625
653
  }>>;
654
+ readonly latestAttempt: Schema.Union<readonly [Schema.Struct<{
655
+ readonly errorCode: Schema.Union<readonly [Schema.String, Schema.Null]>;
656
+ readonly completedAt: Schema.String;
657
+ }>, Schema.Null]>;
626
658
  }>;
659
+ export type WebhooksGetStats400 = MalformedRequestError;
660
+ export declare const WebhooksGetStats400: typeof MalformedRequestError;
627
661
  export type WebhooksGetStats401 = UnauthorizedError;
628
662
  export declare const WebhooksGetStats401: typeof UnauthorizedError;
629
663
  export type WebhooksGetStats403 = ForbiddenError;
@@ -660,6 +694,8 @@ export declare const WebhooksTest202: Schema.Struct<{
660
694
  readonly eventId: Schema.brand<Schema.String, "WebhookEventId">;
661
695
  readonly deliveryId: Schema.brand<Schema.String, "WebhookDeliveryId">;
662
696
  }>;
697
+ export type WebhooksTest400 = MalformedRequestError;
698
+ export declare const WebhooksTest400: typeof MalformedRequestError;
663
699
  export type WebhooksTest401 = UnauthorizedError;
664
700
  export declare const WebhooksTest401: typeof UnauthorizedError;
665
701
  export type WebhooksTest403 = ForbiddenError;
@@ -675,8 +711,8 @@ export declare const WebhooksTest504: typeof GatewayTimeoutError;
675
711
  declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiEndpoint.HttpApiEndpoint<"webhooksCreate", "POST", "/v1/webhooks", never, never, Schema.toCodecJson<Schema.Struct<{
676
712
  readonly name: Schema.String;
677
713
  readonly url: Schema.String;
678
- 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]>>;
714
+ 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.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">]>>;
715
+ readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>>;
680
716
  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
717
  readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
682
718
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
@@ -686,8 +722,8 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
686
722
  readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
687
723
  readonly name: Schema.String;
688
724
  readonly url: Schema.String;
689
- 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]>;
725
+ 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.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">]>>;
726
+ readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>;
691
727
  readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
692
728
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
693
729
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
@@ -758,6 +794,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
758
794
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
759
795
  readonly message: Schema.String;
760
796
  readonly retryAfterSeconds: Schema.Finite;
797
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
798
+ readonly _tag: "MalformedRequestError";
799
+ readonly message: string;
800
+ readonly fields: {
801
+ readonly [x: string]: readonly string[];
802
+ };
803
+ }, readonly [Schema.Struct<{
804
+ readonly _tag: Schema.tag<"MalformedRequestError">;
805
+ readonly message: Schema.String;
806
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
807
+ }>], {
808
+ readonly _tag: "MalformedRequestError";
809
+ readonly message: string;
810
+ readonly fields: {
811
+ readonly [x: string]: readonly string[];
812
+ };
813
+ }>, Schema.Struct<{
814
+ readonly _tag: Schema.tag<"MalformedRequestError">;
815
+ readonly message: Schema.String;
816
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
761
817
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<PaymentRequiredError, {
762
818
  readonly _tag: "PaymentRequiredError";
763
819
  readonly message: string;
@@ -840,8 +896,8 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
840
896
  readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
841
897
  readonly name: Schema.String;
842
898
  readonly url: Schema.String;
843
- 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]>;
899
+ 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.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">]>>;
900
+ readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>;
845
901
  readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
846
902
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
847
903
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
@@ -878,6 +934,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
878
934
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
879
935
  readonly message: Schema.String;
880
936
  readonly retryAfterSeconds: Schema.Finite;
937
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
938
+ readonly _tag: "MalformedRequestError";
939
+ readonly message: string;
940
+ readonly fields: {
941
+ readonly [x: string]: readonly string[];
942
+ };
943
+ }, readonly [Schema.Struct<{
944
+ readonly _tag: Schema.tag<"MalformedRequestError">;
945
+ readonly message: Schema.String;
946
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
947
+ }>], {
948
+ readonly _tag: "MalformedRequestError";
949
+ readonly message: string;
950
+ readonly fields: {
951
+ readonly [x: string]: readonly string[];
952
+ };
953
+ }>, Schema.Struct<{
954
+ readonly _tag: Schema.tag<"MalformedRequestError">;
955
+ readonly message: Schema.String;
956
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
881
957
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
882
958
  readonly _tag: "ResourceNotFoundError";
883
959
  readonly resource: string;
@@ -934,7 +1010,7 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
934
1010
  readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
935
1011
  }>>, Schema.toCodecStringTree<Schema.Struct<{
936
1012
  readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
937
- readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1013
+ readonly cursor: Schema.optionalKey<Schema.String>;
938
1014
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
939
1015
  readonly items: Schema.$Array<Schema.Struct<{
940
1016
  readonly id: Schema.brand<Schema.String, "WebhookDeliveryId">;
@@ -993,6 +1069,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
993
1069
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
994
1070
  readonly message: Schema.String;
995
1071
  readonly retryAfterSeconds: Schema.Finite;
1072
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1073
+ readonly _tag: "MalformedRequestError";
1074
+ readonly message: string;
1075
+ readonly fields: {
1076
+ readonly [x: string]: readonly string[];
1077
+ };
1078
+ }, readonly [Schema.Struct<{
1079
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1080
+ readonly message: Schema.String;
1081
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1082
+ }>], {
1083
+ readonly _tag: "MalformedRequestError";
1084
+ readonly message: string;
1085
+ readonly fields: {
1086
+ readonly [x: string]: readonly string[];
1087
+ };
1088
+ }>, Schema.Struct<{
1089
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1090
+ readonly message: Schema.String;
1091
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
996
1092
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
997
1093
  readonly _tag: "ResourceNotFoundError";
998
1094
  readonly resource: string;
@@ -1079,6 +1175,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1079
1175
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1080
1176
  readonly message: Schema.String;
1081
1177
  readonly retryAfterSeconds: Schema.Finite;
1178
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1179
+ readonly _tag: "MalformedRequestError";
1180
+ readonly message: string;
1181
+ readonly fields: {
1182
+ readonly [x: string]: readonly string[];
1183
+ };
1184
+ }, readonly [Schema.Struct<{
1185
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1186
+ readonly message: Schema.String;
1187
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1188
+ }>], {
1189
+ readonly _tag: "MalformedRequestError";
1190
+ readonly message: string;
1191
+ readonly fields: {
1192
+ readonly [x: string]: readonly string[];
1193
+ };
1194
+ }>, Schema.Struct<{
1195
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1196
+ readonly message: Schema.String;
1197
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1082
1198
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1083
1199
  readonly _tag: "ResourceNotFoundError";
1084
1200
  readonly resource: string;
@@ -1134,8 +1250,8 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1134
1250
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"webhooksGetStats", "GET", "/v1/webhooks/:id/stats", Schema.toCodecStringTree<Schema.Struct<{
1135
1251
  readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
1136
1252
  }>>, 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]>>;
1253
+ readonly after: Schema.optionalKey<Schema.String>;
1254
+ readonly before: Schema.optionalKey<Schema.String>;
1139
1255
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1140
1256
  readonly total: Schema.Finite;
1141
1257
  readonly pending: Schema.Finite;
@@ -1149,6 +1265,10 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1149
1265
  readonly exhausted: Schema.Finite;
1150
1266
  readonly cancelled: Schema.Finite;
1151
1267
  }>>;
1268
+ readonly latestAttempt: Schema.Union<readonly [Schema.Struct<{
1269
+ readonly errorCode: Schema.Union<readonly [Schema.String, Schema.Null]>;
1270
+ readonly completedAt: Schema.String;
1271
+ }>, Schema.Null]>;
1152
1272
  }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
1153
1273
  readonly _tag: "ForbiddenError";
1154
1274
  readonly message: string;
@@ -1177,6 +1297,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1177
1297
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1178
1298
  readonly message: Schema.String;
1179
1299
  readonly retryAfterSeconds: Schema.Finite;
1300
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1301
+ readonly _tag: "MalformedRequestError";
1302
+ readonly message: string;
1303
+ readonly fields: {
1304
+ readonly [x: string]: readonly string[];
1305
+ };
1306
+ }, readonly [Schema.Struct<{
1307
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1308
+ readonly message: Schema.String;
1309
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1310
+ }>], {
1311
+ readonly _tag: "MalformedRequestError";
1312
+ readonly message: string;
1313
+ readonly fields: {
1314
+ readonly [x: string]: readonly string[];
1315
+ };
1316
+ }>, Schema.Struct<{
1317
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1318
+ readonly message: Schema.String;
1319
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1180
1320
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1181
1321
  readonly _tag: "ResourceNotFoundError";
1182
1322
  readonly resource: string;
@@ -1231,16 +1371,17 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1231
1371
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1232
1372
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"webhooksList", "GET", "/v1/webhooks", never, Schema.toCodecStringTree<Schema.Struct<{
1233
1373
  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]>>;
1374
+ readonly cursor: Schema.optionalKey<Schema.String>;
1375
+ readonly namespaceId: Schema.optionalKey<Schema.brand<Schema.String, "NamespaceId">>;
1376
+ readonly search: Schema.optionalKey<Schema.String>;
1377
+ readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>>;
1237
1378
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1238
1379
  readonly items: Schema.$Array<Schema.Struct<{
1239
1380
  readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
1240
1381
  readonly name: Schema.String;
1241
1382
  readonly url: Schema.String;
1242
- 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]>;
1383
+ 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.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">]>>;
1384
+ readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>;
1244
1385
  readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
1245
1386
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1246
1387
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
@@ -1286,6 +1427,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1286
1427
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1287
1428
  readonly message: Schema.String;
1288
1429
  readonly retryAfterSeconds: Schema.Finite;
1430
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1431
+ readonly _tag: "MalformedRequestError";
1432
+ readonly message: string;
1433
+ readonly fields: {
1434
+ readonly [x: string]: readonly string[];
1435
+ };
1436
+ }, readonly [Schema.Struct<{
1437
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1438
+ readonly message: Schema.String;
1439
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1440
+ }>], {
1441
+ readonly _tag: "MalformedRequestError";
1442
+ readonly message: string;
1443
+ readonly fields: {
1444
+ readonly [x: string]: readonly string[];
1445
+ };
1446
+ }>, Schema.Struct<{
1447
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1448
+ readonly message: Schema.String;
1449
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1289
1450
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
1290
1451
  readonly _tag: "UnauthorizedError";
1291
1452
  readonly message: string;
@@ -1350,6 +1511,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1350
1511
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1351
1512
  readonly message: Schema.String;
1352
1513
  readonly retryAfterSeconds: Schema.Finite;
1514
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1515
+ readonly _tag: "MalformedRequestError";
1516
+ readonly message: string;
1517
+ readonly fields: {
1518
+ readonly [x: string]: readonly string[];
1519
+ };
1520
+ }, readonly [Schema.Struct<{
1521
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1522
+ readonly message: Schema.String;
1523
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1524
+ }>], {
1525
+ readonly _tag: "MalformedRequestError";
1526
+ readonly message: string;
1527
+ readonly fields: {
1528
+ readonly [x: string]: readonly string[];
1529
+ };
1530
+ }>, Schema.Struct<{
1531
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1532
+ readonly message: Schema.String;
1533
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1353
1534
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1354
1535
  readonly _tag: "ResourceNotFoundError";
1355
1536
  readonly resource: string;
@@ -1446,6 +1627,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1446
1627
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1447
1628
  readonly message: Schema.String;
1448
1629
  readonly retryAfterSeconds: Schema.Finite;
1630
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1631
+ readonly _tag: "MalformedRequestError";
1632
+ readonly message: string;
1633
+ readonly fields: {
1634
+ readonly [x: string]: readonly string[];
1635
+ };
1636
+ }, readonly [Schema.Struct<{
1637
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1638
+ readonly message: Schema.String;
1639
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1640
+ }>], {
1641
+ readonly _tag: "MalformedRequestError";
1642
+ readonly message: string;
1643
+ readonly fields: {
1644
+ readonly [x: string]: readonly string[];
1645
+ };
1646
+ }>, Schema.Struct<{
1647
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1648
+ readonly message: Schema.String;
1649
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1449
1650
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1450
1651
  readonly _tag: "ResourceNotFoundError";
1451
1652
  readonly resource: string;
@@ -1534,6 +1735,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1534
1735
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1535
1736
  readonly message: Schema.String;
1536
1737
  readonly retryAfterSeconds: Schema.Finite;
1738
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1739
+ readonly _tag: "MalformedRequestError";
1740
+ readonly message: string;
1741
+ readonly fields: {
1742
+ readonly [x: string]: readonly string[];
1743
+ };
1744
+ }, readonly [Schema.Struct<{
1745
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1746
+ readonly message: Schema.String;
1747
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1748
+ }>], {
1749
+ readonly _tag: "MalformedRequestError";
1750
+ readonly message: string;
1751
+ readonly fields: {
1752
+ readonly [x: string]: readonly string[];
1753
+ };
1754
+ }>, Schema.Struct<{
1755
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1756
+ readonly message: Schema.String;
1757
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1537
1758
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<RateLimitedError, {
1538
1759
  readonly _tag: "RateLimitedError";
1539
1760
  readonly message: string;
@@ -1638,6 +1859,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1638
1859
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1639
1860
  readonly message: Schema.String;
1640
1861
  readonly retryAfterSeconds: Schema.Finite;
1862
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
1863
+ readonly _tag: "MalformedRequestError";
1864
+ readonly message: string;
1865
+ readonly fields: {
1866
+ readonly [x: string]: readonly string[];
1867
+ };
1868
+ }, readonly [Schema.Struct<{
1869
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1870
+ readonly message: Schema.String;
1871
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1872
+ }>], {
1873
+ readonly _tag: "MalformedRequestError";
1874
+ readonly message: string;
1875
+ readonly fields: {
1876
+ readonly [x: string]: readonly string[];
1877
+ };
1878
+ }>, Schema.Struct<{
1879
+ readonly _tag: Schema.tag<"MalformedRequestError">;
1880
+ readonly message: Schema.String;
1881
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1641
1882
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1642
1883
  readonly _tag: "ResourceNotFoundError";
1643
1884
  readonly resource: string;
@@ -1695,8 +1936,8 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1695
1936
  }>>, never, Schema.toCodecJson<Schema.Struct<{
1696
1937
  readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1697
1938
  readonly url: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1698
- 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]>>;
1939
+ 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.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]>>;
1940
+ readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>>;
1700
1941
  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
1942
  readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
1702
1943
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
@@ -1705,8 +1946,8 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1705
1946
  readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
1706
1947
  readonly name: Schema.String;
1707
1948
  readonly url: Schema.String;
1708
- 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]>;
1949
+ 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.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">]>>;
1950
+ readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>;
1710
1951
  readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
1711
1952
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1712
1953
  readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
@@ -1763,6 +2004,26 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
1763
2004
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1764
2005
  readonly message: Schema.String;
1765
2006
  readonly retryAfterSeconds: Schema.Finite;
2007
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
2008
+ readonly _tag: "MalformedRequestError";
2009
+ readonly message: string;
2010
+ readonly fields: {
2011
+ readonly [x: string]: readonly string[];
2012
+ };
2013
+ }, readonly [Schema.Struct<{
2014
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2015
+ readonly message: Schema.String;
2016
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
2017
+ }>], {
2018
+ readonly _tag: "MalformedRequestError";
2019
+ readonly message: string;
2020
+ readonly fields: {
2021
+ readonly [x: string]: readonly string[];
2022
+ };
2023
+ }>, Schema.Struct<{
2024
+ readonly _tag: Schema.tag<"MalformedRequestError">;
2025
+ readonly message: Schema.String;
2026
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
1766
2027
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1767
2028
  readonly _tag: "ResourceNotFoundError";
1768
2029
  readonly resource: string;