samva 0.16.0 → 0.18.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.
- package/AGENTS.md +9 -1
- package/README.md +57 -1
- package/dist/{rolldown-runtime-D7D4PA-g.js → _virtual/_rolldown/runtime.js} +1 -1
- package/dist/client/client/client.gen.js +174 -0
- package/dist/client/client/utils.gen.js +177 -0
- package/dist/client/client.gen.js +8 -0
- package/dist/client/core/auth.gen.js +12 -0
- package/dist/client/core/bodySerializer.gen.js +6 -0
- package/dist/client/core/params.gen.js +77 -0
- package/dist/client/core/pathSerializer.gen.js +82 -0
- package/dist/client/core/serverSentEvents.gen.js +96 -0
- package/dist/client/core/utils.gen.js +78 -0
- package/dist/client/sdk.gen.d.ts +174 -3
- package/dist/{promises-KrA2nSLg.js → client/sdk.gen.js} +464 -2289
- package/dist/client/types.gen.d.ts +1126 -11
- package/dist/client-attribution.js +9 -0
- package/dist/effect/analytics.d.ts +6 -6
- package/dist/effect/analytics.js +11 -9
- package/dist/effect/api-keys.d.ts +13 -13
- package/dist/effect/api-keys.js +13 -12
- package/dist/effect/attachments.d.ts +4 -4
- package/dist/effect/attachments.js +9 -7
- package/dist/effect/brands.d.ts +7 -7
- package/dist/effect/brands.js +12 -10
- package/dist/effect/campaigns.d.ts +18 -18
- package/dist/effect/campaigns.js +17 -15
- package/dist/effect/categories.d.ts +2 -2
- package/dist/effect/categories.js +95 -1
- package/dist/effect/client.d.ts +1 -1
- package/dist/effect/client.js +4 -5
- package/dist/effect/contact-groups.d.ts +14 -14
- package/dist/effect/contact-groups.js +15 -13
- package/dist/effect/contacts.d.ts +77 -25
- package/dist/effect/contacts.js +27 -22
- package/dist/effect/conversations.d.ts +17 -17
- package/dist/effect/conversations.js +18 -16
- package/dist/effect/custom-fields.d.ts +4 -4
- package/dist/effect/custom-fields.js +9 -7
- package/dist/effect/email.d.ts +78 -77
- package/dist/effect/email.js +68 -65
- package/dist/effect/errors.d.ts +2 -0
- package/dist/effect/errors.js +3 -0
- package/dist/effect/events.d.ts +121 -0
- package/dist/effect/events.js +17 -0
- package/dist/effect/extension-installations.d.ts +11 -11
- package/dist/effect/extension-installations.js +14 -12
- package/dist/effect/extensions.d.ts +9 -9
- package/dist/effect/extensions.js +10 -8
- package/dist/effect/feedback.d.ts +2 -2
- package/dist/effect/feedback.js +6 -5
- package/dist/effect/generated/analytics.d.ts +715 -0
- package/dist/effect/generated/analytics.js +188 -0
- package/dist/effect/generated/api-keys.d.ts +1627 -0
- package/dist/effect/generated/api-keys.js +249 -0
- package/dist/effect/generated/attachments.d.ts +554 -0
- package/dist/effect/generated/attachments.js +125 -0
- package/dist/effect/generated/brands.d.ts +1118 -0
- package/dist/effect/generated/brands.js +155 -0
- package/dist/effect/generated/campaigns.d.ts +3783 -0
- package/dist/effect/generated/campaigns.js +491 -0
- package/dist/effect/generated/contact-events.d.ts +158 -0
- package/dist/effect/generated/contact-events.js +37 -0
- package/dist/effect/generated/contact-groups.d.ts +1445 -0
- package/dist/effect/generated/contact-groups.js +419 -0
- package/dist/effect/generated/contacts.d.ts +3789 -0
- package/dist/effect/generated/contacts.js +709 -0
- package/dist/effect/generated/conversations.d.ts +2870 -0
- package/dist/effect/generated/conversations.js +461 -0
- package/dist/effect/generated/custom-fields.d.ts +562 -0
- package/dist/effect/generated/custom-fields.js +162 -0
- package/dist/effect/generated/email.d.ts +10622 -0
- package/dist/effect/generated/email.js +2347 -0
- package/dist/effect/generated/events.d.ts +463 -0
- package/dist/effect/generated/events.js +70 -0
- package/dist/effect/generated/extension-installations.d.ts +1786 -0
- package/dist/effect/generated/extension-installations.js +382 -0
- package/dist/effect/generated/extensions.d.ts +927 -0
- package/dist/effect/generated/extensions.js +203 -0
- package/dist/effect/generated/feedback.d.ts +116 -0
- package/dist/effect/generated/feedback.js +43 -0
- package/dist/effect/generated/index.d.ts +61 -0
- package/dist/effect/generated/journeys.d.ts +6135 -0
- package/dist/effect/generated/journeys.js +464 -0
- package/dist/effect/generated/mailboxes.d.ts +13641 -0
- package/dist/effect/generated/mailboxes.js +2312 -0
- package/dist/effect/generated/media.d.ts +741 -0
- package/dist/effect/generated/media.js +181 -0
- package/dist/effect/generated/messages.d.ts +2355 -0
- package/dist/effect/generated/messages.js +671 -0
- package/dist/effect/generated/namespaces.d.ts +654 -0
- package/dist/effect/generated/namespaces.js +135 -0
- package/dist/effect/generated/operations.d.ts +514 -0
- package/dist/effect/generated/operations.js +80 -0
- package/dist/effect/generated/organizations.d.ts +1111 -0
- package/dist/effect/generated/organizations.js +231 -0
- package/dist/effect/generated/scheduled-messages.d.ts +1798 -0
- package/dist/effect/generated/scheduled-messages.js +190 -0
- package/dist/effect/generated/shared.d.ts +3250 -0
- package/dist/effect/generated/shared.js +1053 -0
- package/dist/effect/generated/subscriptions.d.ts +188 -0
- package/dist/effect/generated/subscriptions.js +61 -0
- package/dist/effect/generated/templates.d.ts +8177 -0
- package/dist/effect/generated/templates.js +2214 -0
- package/dist/effect/generated/unsubscribe-groups.d.ts +1153 -0
- package/dist/effect/generated/unsubscribe-groups.js +267 -0
- package/dist/effect/generated/webhooks.d.ts +1697 -0
- package/dist/effect/generated/webhooks.js +500 -0
- package/dist/effect/generated/whoami.d.ts +291 -0
- package/dist/effect/generated/whoami.js +54 -0
- package/dist/effect/generated-metadata.d.ts +1627 -0
- package/dist/effect/generated-metadata.js +919 -0
- package/dist/effect/index.d.ts +3 -2
- package/dist/effect/index.js +33 -31
- package/dist/effect/internal/client.d.ts +10 -7
- package/dist/effect/internal/client.js +69 -0
- package/dist/effect/internal/email-sender.d.ts +17 -0
- package/dist/effect/internal/email-sender.js +21 -0
- package/dist/effect/internal/mailbox-events.js +33 -0
- package/dist/effect/internal/operation.d.ts +12 -72
- package/dist/effect/internal/operation.js +116 -0
- package/dist/effect/internal/send.d.ts +60 -0
- package/dist/effect/internal/send.js +56 -0
- package/dist/effect/journeys.d.ts +2153 -0
- package/dist/effect/journeys.js +39 -0
- package/dist/effect/mailboxes.d.ts +80 -80
- package/dist/effect/mailboxes.js +135 -3
- package/dist/effect/media.d.ts +5 -5
- package/dist/effect/media.js +10 -8
- package/dist/effect/messages.d.ts +16 -16
- package/dist/effect/messages.js +15 -12
- package/dist/effect/namespaces.d.ts +7 -7
- package/dist/effect/namespaces.js +10 -8
- package/dist/effect/operations.d.ts +5 -5
- package/dist/effect/operations.js +8 -6
- package/dist/effect/organizations.d.ts +7 -7
- package/dist/effect/organizations.js +12 -10
- package/dist/effect/pagination.js +39 -0
- package/dist/effect/retry.js +3 -3
- package/dist/effect/runtime.js +25 -0
- package/dist/effect/scheduled-messages.d.ts +7 -7
- package/dist/effect/scheduled-messages.js +10 -8
- package/dist/effect/subscriptions.d.ts +1 -1
- package/dist/effect/subscriptions.js +5 -4
- package/dist/effect/templates.d.ts +40 -40
- package/dist/effect/templates.js +39 -37
- package/dist/effect/unsubscribe-groups.d.ts +11 -11
- package/dist/effect/unsubscribe-groups.js +14 -12
- package/dist/effect/webhooks.d.ts +23 -23
- package/dist/effect/webhooks.js +16 -14
- package/dist/effect/whoami.d.ts +1 -1
- package/dist/effect/whoami.js +5 -4
- package/dist/index.js +4 -3
- package/dist/{inline-attachments-Cegg6tTF.js → inline-attachments.js} +13 -7
- package/dist/{mailbox-events-VKR4f3qq.js → mailbox-events.js} +2 -2
- package/dist/{normalize-B79uJIeb.js → normalize.js} +2 -2
- package/dist/package.js +6 -0
- package/dist/promises/errors.gen.js +1340 -0
- package/dist/promises/index.d.ts +7 -3
- package/dist/promises/index.js +288 -3
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +85 -0
- package/dist/{operation-BTXjPrwf.js → service-map.js} +58 -219
- package/package.json +17 -3
- package/dist/categories-DV51kr2H.js +0 -187
- package/dist/client-BMUew5Wp.js +0 -13794
- package/dist/effect/generated.d.ts +0 -64004
- package/dist/mailboxes-Thp5z0oX.js +0 -161
|
@@ -0,0 +1,1697 @@
|
|
|
1
|
+
import type * as EffectBrand from "effect/Brand";
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
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";
|
|
5
|
+
export type WebhookDeliveryCounts = {
|
|
6
|
+
readonly total: number;
|
|
7
|
+
readonly pending: number;
|
|
8
|
+
readonly delivered: number;
|
|
9
|
+
readonly exhausted: number;
|
|
10
|
+
readonly cancelled: number;
|
|
11
|
+
};
|
|
12
|
+
export declare const WebhookDeliveryCounts: Schema.Struct<{
|
|
13
|
+
readonly total: Schema.Finite;
|
|
14
|
+
readonly pending: Schema.Finite;
|
|
15
|
+
readonly delivered: Schema.Finite;
|
|
16
|
+
readonly exhausted: Schema.Finite;
|
|
17
|
+
readonly cancelled: Schema.Finite;
|
|
18
|
+
}>;
|
|
19
|
+
export type WebhookDeliveryId = string & EffectBrand.Brand<"WebhookDeliveryId">;
|
|
20
|
+
export declare const WebhookDeliveryId: Schema.brand<Schema.String, "WebhookDeliveryId">;
|
|
21
|
+
export type WebhookAttemptId = string & EffectBrand.Brand<"WebhookAttemptId">;
|
|
22
|
+
export declare const WebhookAttemptId: Schema.brand<Schema.String, "WebhookAttemptId">;
|
|
23
|
+
export type WebhookEventId = string & EffectBrand.Brand<"WebhookEventId">;
|
|
24
|
+
export declare const WebhookEventId: Schema.brand<Schema.String, "WebhookEventId">;
|
|
25
|
+
export type WebhookDailyDeliveries = {
|
|
26
|
+
readonly date: string;
|
|
27
|
+
readonly pending: number;
|
|
28
|
+
readonly delivered: number;
|
|
29
|
+
readonly exhausted: number;
|
|
30
|
+
readonly cancelled: number;
|
|
31
|
+
};
|
|
32
|
+
export declare const WebhookDailyDeliveries: Schema.Struct<{
|
|
33
|
+
readonly date: Schema.String;
|
|
34
|
+
readonly pending: Schema.Finite;
|
|
35
|
+
readonly delivered: Schema.Finite;
|
|
36
|
+
readonly exhausted: Schema.Finite;
|
|
37
|
+
readonly cancelled: Schema.Finite;
|
|
38
|
+
}>;
|
|
39
|
+
export type WebhookEndpoint = {
|
|
40
|
+
readonly id: WebhookEndpointId;
|
|
41
|
+
readonly name: string;
|
|
42
|
+
readonly url: string;
|
|
43
|
+
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" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook">;
|
|
44
|
+
readonly channels: ReadonlyArray<"email"> | null;
|
|
45
|
+
readonly mailboxIds: ReadonlyArray<MailboxId> | null;
|
|
46
|
+
readonly namespaceId: NamespaceId | null;
|
|
47
|
+
readonly status: "active" | "disabled";
|
|
48
|
+
readonly hasCustomHeaders: boolean;
|
|
49
|
+
readonly failureStartedAt: string | null;
|
|
50
|
+
readonly lastSucceededAt: string | null;
|
|
51
|
+
readonly createdAt: string;
|
|
52
|
+
readonly updatedAt: string;
|
|
53
|
+
};
|
|
54
|
+
export declare const WebhookEndpoint: Schema.Struct<{
|
|
55
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
56
|
+
readonly name: Schema.String;
|
|
57
|
+
readonly url: Schema.String;
|
|
58
|
+
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<"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<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.message.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"journey.webhook">]>>;
|
|
59
|
+
readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
|
|
60
|
+
readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
|
|
61
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
62
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
|
|
63
|
+
readonly hasCustomHeaders: Schema.Boolean;
|
|
64
|
+
readonly failureStartedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
65
|
+
readonly lastSucceededAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
66
|
+
readonly createdAt: Schema.String;
|
|
67
|
+
readonly updatedAt: Schema.String;
|
|
68
|
+
}>;
|
|
69
|
+
export type WebhookEndpointListItem = {
|
|
70
|
+
readonly id: WebhookEndpointId;
|
|
71
|
+
readonly name: string;
|
|
72
|
+
readonly url: string;
|
|
73
|
+
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" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook">;
|
|
74
|
+
readonly channels: ReadonlyArray<"email"> | null;
|
|
75
|
+
readonly mailboxIds: ReadonlyArray<MailboxId> | null;
|
|
76
|
+
readonly namespaceId: NamespaceId | null;
|
|
77
|
+
readonly status: "active" | "disabled";
|
|
78
|
+
readonly hasCustomHeaders: boolean;
|
|
79
|
+
readonly failureStartedAt: string | null;
|
|
80
|
+
readonly lastSucceededAt: string | null;
|
|
81
|
+
readonly createdAt: string;
|
|
82
|
+
readonly updatedAt: string;
|
|
83
|
+
readonly deliveries: WebhookDeliveryCounts;
|
|
84
|
+
};
|
|
85
|
+
export declare const WebhookEndpointListItem: Schema.Struct<{
|
|
86
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
87
|
+
readonly name: Schema.String;
|
|
88
|
+
readonly url: Schema.String;
|
|
89
|
+
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<"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<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.message.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"journey.webhook">]>>;
|
|
90
|
+
readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
|
|
91
|
+
readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
|
|
92
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
93
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
|
|
94
|
+
readonly hasCustomHeaders: Schema.Boolean;
|
|
95
|
+
readonly failureStartedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
96
|
+
readonly lastSucceededAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
97
|
+
readonly createdAt: Schema.String;
|
|
98
|
+
readonly updatedAt: Schema.String;
|
|
99
|
+
readonly deliveries: Schema.Struct<{
|
|
100
|
+
readonly total: Schema.Finite;
|
|
101
|
+
readonly pending: Schema.Finite;
|
|
102
|
+
readonly delivered: Schema.Finite;
|
|
103
|
+
readonly exhausted: Schema.Finite;
|
|
104
|
+
readonly cancelled: Schema.Finite;
|
|
105
|
+
}>;
|
|
106
|
+
}>;
|
|
107
|
+
export type WebhookDeliveryPage = {
|
|
108
|
+
readonly items: ReadonlyArray<{
|
|
109
|
+
readonly id: WebhookDeliveryId;
|
|
110
|
+
readonly eventId: WebhookEventId;
|
|
111
|
+
readonly eventType: string;
|
|
112
|
+
readonly occurredAt: string;
|
|
113
|
+
readonly endpointId: WebhookEndpointId;
|
|
114
|
+
readonly status: "pending" | "delivered" | "exhausted" | "cancelled";
|
|
115
|
+
readonly automaticAttempts: number;
|
|
116
|
+
readonly nextAttemptAt: string | null;
|
|
117
|
+
readonly completedAt: string | null;
|
|
118
|
+
readonly createdAt: string;
|
|
119
|
+
readonly updatedAt: string;
|
|
120
|
+
readonly attempts: ReadonlyArray<{
|
|
121
|
+
readonly id: WebhookAttemptId;
|
|
122
|
+
readonly deliveryId: WebhookDeliveryId;
|
|
123
|
+
readonly kind: "automatic" | "manual";
|
|
124
|
+
readonly attemptNumber: number;
|
|
125
|
+
readonly classification: "success" | "http-error" | "network-error" | "timeout" | "cancelled";
|
|
126
|
+
readonly attemptedAt: string;
|
|
127
|
+
readonly responseStatus: number | null;
|
|
128
|
+
readonly responseHeaders: {
|
|
129
|
+
readonly [x: string]: string;
|
|
130
|
+
} | null;
|
|
131
|
+
readonly durationMs: number | null;
|
|
132
|
+
readonly errorCode: string | null;
|
|
133
|
+
readonly errorMessage: string | null;
|
|
134
|
+
readonly createdAt: string;
|
|
135
|
+
}>;
|
|
136
|
+
}>;
|
|
137
|
+
readonly nextCursor: string | null;
|
|
138
|
+
};
|
|
139
|
+
export declare const WebhookDeliveryPage: Schema.Struct<{
|
|
140
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
141
|
+
readonly id: Schema.brand<Schema.String, "WebhookDeliveryId">;
|
|
142
|
+
readonly eventId: Schema.brand<Schema.String, "WebhookEventId">;
|
|
143
|
+
readonly eventType: Schema.String;
|
|
144
|
+
readonly occurredAt: Schema.String;
|
|
145
|
+
readonly endpointId: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
146
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"delivered">, Schema.Literal<"exhausted">, Schema.Literal<"cancelled">]>;
|
|
147
|
+
readonly automaticAttempts: Schema.Finite;
|
|
148
|
+
readonly nextAttemptAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
149
|
+
readonly completedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
150
|
+
readonly createdAt: Schema.String;
|
|
151
|
+
readonly updatedAt: Schema.String;
|
|
152
|
+
readonly attempts: Schema.$Array<Schema.Struct<{
|
|
153
|
+
readonly id: Schema.brand<Schema.String, "WebhookAttemptId">;
|
|
154
|
+
readonly deliveryId: Schema.brand<Schema.String, "WebhookDeliveryId">;
|
|
155
|
+
readonly kind: Schema.Union<readonly [Schema.Literal<"automatic">, Schema.Literal<"manual">]>;
|
|
156
|
+
readonly attemptNumber: Schema.Finite;
|
|
157
|
+
readonly classification: Schema.Union<readonly [Schema.Literal<"success">, Schema.Literal<"http-error">, Schema.Literal<"network-error">, Schema.Literal<"timeout">, Schema.Literal<"cancelled">]>;
|
|
158
|
+
readonly attemptedAt: Schema.String;
|
|
159
|
+
readonly responseStatus: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
|
|
160
|
+
readonly responseHeaders: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>;
|
|
161
|
+
readonly durationMs: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
|
|
162
|
+
readonly errorCode: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
163
|
+
readonly errorMessage: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
164
|
+
readonly createdAt: Schema.String;
|
|
165
|
+
}>>;
|
|
166
|
+
}>>;
|
|
167
|
+
readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
168
|
+
}>;
|
|
169
|
+
export type WebhookStatsResponse = {
|
|
170
|
+
readonly total: number;
|
|
171
|
+
readonly pending: number;
|
|
172
|
+
readonly delivered: number;
|
|
173
|
+
readonly exhausted: number;
|
|
174
|
+
readonly cancelled: number;
|
|
175
|
+
readonly daily: ReadonlyArray<WebhookDailyDeliveries>;
|
|
176
|
+
};
|
|
177
|
+
export declare const WebhookStatsResponse: Schema.Struct<{
|
|
178
|
+
readonly total: Schema.Finite;
|
|
179
|
+
readonly pending: Schema.Finite;
|
|
180
|
+
readonly delivered: Schema.Finite;
|
|
181
|
+
readonly exhausted: Schema.Finite;
|
|
182
|
+
readonly cancelled: Schema.Finite;
|
|
183
|
+
readonly daily: Schema.$Array<Schema.Struct<{
|
|
184
|
+
readonly date: Schema.String;
|
|
185
|
+
readonly pending: Schema.Finite;
|
|
186
|
+
readonly delivered: Schema.Finite;
|
|
187
|
+
readonly exhausted: Schema.Finite;
|
|
188
|
+
readonly cancelled: Schema.Finite;
|
|
189
|
+
}>>;
|
|
190
|
+
}>;
|
|
191
|
+
export type WebhookEndpointPage = {
|
|
192
|
+
readonly items: ReadonlyArray<WebhookEndpointListItem>;
|
|
193
|
+
readonly nextCursor: string | null;
|
|
194
|
+
};
|
|
195
|
+
export declare const WebhookEndpointPage: Schema.Struct<{
|
|
196
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
197
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
198
|
+
readonly name: Schema.String;
|
|
199
|
+
readonly url: Schema.String;
|
|
200
|
+
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<"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<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.message.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"journey.webhook">]>>;
|
|
201
|
+
readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
|
|
202
|
+
readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
|
|
203
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
204
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
|
|
205
|
+
readonly hasCustomHeaders: Schema.Boolean;
|
|
206
|
+
readonly failureStartedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
207
|
+
readonly lastSucceededAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
208
|
+
readonly createdAt: Schema.String;
|
|
209
|
+
readonly updatedAt: Schema.String;
|
|
210
|
+
readonly deliveries: Schema.Struct<{
|
|
211
|
+
readonly total: Schema.Finite;
|
|
212
|
+
readonly pending: Schema.Finite;
|
|
213
|
+
readonly delivered: Schema.Finite;
|
|
214
|
+
readonly exhausted: Schema.Finite;
|
|
215
|
+
readonly cancelled: Schema.Finite;
|
|
216
|
+
}>;
|
|
217
|
+
}>>;
|
|
218
|
+
readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
219
|
+
}>;
|
|
220
|
+
export type WebhooksListQuery = {
|
|
221
|
+
readonly limit?: string | null;
|
|
222
|
+
readonly cursor?: Cursor | null;
|
|
223
|
+
readonly search?: string | null;
|
|
224
|
+
readonly status?: "active" | "disabled" | null;
|
|
225
|
+
};
|
|
226
|
+
export declare const WebhooksListQuery: Schema.Struct<{
|
|
227
|
+
readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
228
|
+
readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
229
|
+
readonly search: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
230
|
+
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>, Schema.Null]>>;
|
|
231
|
+
}>;
|
|
232
|
+
export type WebhooksList200 = WebhookEndpointPage;
|
|
233
|
+
export declare const WebhooksList200: Schema.Struct<{
|
|
234
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
235
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
236
|
+
readonly name: Schema.String;
|
|
237
|
+
readonly url: Schema.String;
|
|
238
|
+
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<"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<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.message.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"journey.webhook">]>>;
|
|
239
|
+
readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
|
|
240
|
+
readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
|
|
241
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
242
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
|
|
243
|
+
readonly hasCustomHeaders: Schema.Boolean;
|
|
244
|
+
readonly failureStartedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
245
|
+
readonly lastSucceededAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
246
|
+
readonly createdAt: Schema.String;
|
|
247
|
+
readonly updatedAt: Schema.String;
|
|
248
|
+
readonly deliveries: Schema.Struct<{
|
|
249
|
+
readonly total: Schema.Finite;
|
|
250
|
+
readonly pending: Schema.Finite;
|
|
251
|
+
readonly delivered: Schema.Finite;
|
|
252
|
+
readonly exhausted: Schema.Finite;
|
|
253
|
+
readonly cancelled: Schema.Finite;
|
|
254
|
+
}>;
|
|
255
|
+
}>>;
|
|
256
|
+
readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
257
|
+
}>;
|
|
258
|
+
export type WebhooksList401 = UnauthorizedError;
|
|
259
|
+
export declare const WebhooksList401: typeof UnauthorizedError;
|
|
260
|
+
export type WebhooksList403 = ForbiddenError;
|
|
261
|
+
export declare const WebhooksList403: typeof ForbiddenError;
|
|
262
|
+
export type WebhooksList422 = ValidationError;
|
|
263
|
+
export declare const WebhooksList422: typeof ValidationError;
|
|
264
|
+
export type WebhooksList500 = InternalError;
|
|
265
|
+
export declare const WebhooksList500: typeof InternalError;
|
|
266
|
+
export type WebhooksList504 = GatewayTimeoutError;
|
|
267
|
+
export declare const WebhooksList504: typeof GatewayTimeoutError;
|
|
268
|
+
export type WebhooksCreateRequestJson = {
|
|
269
|
+
readonly name: string;
|
|
270
|
+
readonly url: string;
|
|
271
|
+
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" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook">;
|
|
272
|
+
readonly channels?: ReadonlyArray<"email"> | null;
|
|
273
|
+
readonly mailboxIds?: readonly [MailboxId, ...Array<MailboxId>] | null;
|
|
274
|
+
readonly namespaceId?: NamespaceId | null;
|
|
275
|
+
readonly headers?: {
|
|
276
|
+
readonly [x: string]: string;
|
|
277
|
+
} | null;
|
|
278
|
+
readonly status?: "active" | "disabled" | null;
|
|
279
|
+
};
|
|
280
|
+
export declare const WebhooksCreateRequestJson: Schema.Struct<{
|
|
281
|
+
readonly name: Schema.String;
|
|
282
|
+
readonly url: Schema.String;
|
|
283
|
+
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<"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<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.message.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"journey.webhook">]>>;
|
|
284
|
+
readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>>;
|
|
285
|
+
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]>>;
|
|
286
|
+
readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
|
|
287
|
+
readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
|
|
288
|
+
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>, Schema.Null]>>;
|
|
289
|
+
}>;
|
|
290
|
+
export type WebhooksCreate201 = {
|
|
291
|
+
readonly endpoint: WebhookEndpoint;
|
|
292
|
+
readonly secret: __SamvaRuntimeSensitiveString;
|
|
293
|
+
};
|
|
294
|
+
export declare const WebhooksCreate201: Schema.Struct<{
|
|
295
|
+
readonly endpoint: Schema.Struct<{
|
|
296
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
297
|
+
readonly name: Schema.String;
|
|
298
|
+
readonly url: Schema.String;
|
|
299
|
+
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<"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<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.message.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"journey.webhook">]>>;
|
|
300
|
+
readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
|
|
301
|
+
readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
|
|
302
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
303
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
|
|
304
|
+
readonly hasCustomHeaders: Schema.Boolean;
|
|
305
|
+
readonly failureStartedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
306
|
+
readonly lastSucceededAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
307
|
+
readonly createdAt: Schema.String;
|
|
308
|
+
readonly updatedAt: Schema.String;
|
|
309
|
+
}>;
|
|
310
|
+
readonly secret: Schema.RedactedFromValue<Schema.Codec<string, string, never, never>>;
|
|
311
|
+
}>;
|
|
312
|
+
export type WebhooksCreate401 = UnauthorizedError;
|
|
313
|
+
export declare const WebhooksCreate401: typeof UnauthorizedError;
|
|
314
|
+
export type WebhooksCreate402 = PaymentRequiredError;
|
|
315
|
+
export declare const WebhooksCreate402: typeof PaymentRequiredError;
|
|
316
|
+
export type WebhooksCreate403 = ForbiddenError;
|
|
317
|
+
export declare const WebhooksCreate403: typeof ForbiddenError;
|
|
318
|
+
export type WebhooksCreate404 = ResourceNotFoundError;
|
|
319
|
+
export declare const WebhooksCreate404: typeof ResourceNotFoundError;
|
|
320
|
+
export type WebhooksCreate409 = ConflictError;
|
|
321
|
+
export declare const WebhooksCreate409: typeof ConflictError;
|
|
322
|
+
export type WebhooksCreate422 = ValidationError;
|
|
323
|
+
export declare const WebhooksCreate422: typeof ValidationError;
|
|
324
|
+
export type WebhooksCreate500 = InternalError;
|
|
325
|
+
export declare const WebhooksCreate500: typeof InternalError;
|
|
326
|
+
export type WebhooksCreate502 = BillingProviderError;
|
|
327
|
+
export declare const WebhooksCreate502: typeof BillingProviderError;
|
|
328
|
+
export type WebhooksCreate504 = GatewayTimeoutError;
|
|
329
|
+
export declare const WebhooksCreate504: typeof GatewayTimeoutError;
|
|
330
|
+
export type WebhooksGetPathParams = {
|
|
331
|
+
readonly id: WebhookEndpointId;
|
|
332
|
+
};
|
|
333
|
+
export declare const WebhooksGetPathParams: Schema.Struct<{
|
|
334
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
335
|
+
}>;
|
|
336
|
+
export type WebhooksGet200 = WebhookEndpoint;
|
|
337
|
+
export declare const WebhooksGet200: Schema.Struct<{
|
|
338
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
339
|
+
readonly name: Schema.String;
|
|
340
|
+
readonly url: Schema.String;
|
|
341
|
+
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<"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<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.message.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"journey.webhook">]>>;
|
|
342
|
+
readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
|
|
343
|
+
readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
|
|
344
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
345
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
|
|
346
|
+
readonly hasCustomHeaders: Schema.Boolean;
|
|
347
|
+
readonly failureStartedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
348
|
+
readonly lastSucceededAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
349
|
+
readonly createdAt: Schema.String;
|
|
350
|
+
readonly updatedAt: Schema.String;
|
|
351
|
+
}>;
|
|
352
|
+
export type WebhooksGet401 = UnauthorizedError;
|
|
353
|
+
export declare const WebhooksGet401: typeof UnauthorizedError;
|
|
354
|
+
export type WebhooksGet403 = ForbiddenError;
|
|
355
|
+
export declare const WebhooksGet403: typeof ForbiddenError;
|
|
356
|
+
export type WebhooksGet404 = ResourceNotFoundError;
|
|
357
|
+
export declare const WebhooksGet404: typeof ResourceNotFoundError;
|
|
358
|
+
export type WebhooksGet422 = ValidationError;
|
|
359
|
+
export declare const WebhooksGet422: typeof ValidationError;
|
|
360
|
+
export type WebhooksGet500 = InternalError;
|
|
361
|
+
export declare const WebhooksGet500: typeof InternalError;
|
|
362
|
+
export type WebhooksGet504 = GatewayTimeoutError;
|
|
363
|
+
export declare const WebhooksGet504: typeof GatewayTimeoutError;
|
|
364
|
+
export type WebhooksRemovePathParams = {
|
|
365
|
+
readonly id: WebhookEndpointId;
|
|
366
|
+
};
|
|
367
|
+
export declare const WebhooksRemovePathParams: Schema.Struct<{
|
|
368
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
369
|
+
}>;
|
|
370
|
+
export type WebhooksRemove200 = SuccessResponse;
|
|
371
|
+
export declare const WebhooksRemove200: Schema.Struct<{
|
|
372
|
+
readonly success: Schema.Boolean;
|
|
373
|
+
}>;
|
|
374
|
+
export type WebhooksRemove401 = UnauthorizedError;
|
|
375
|
+
export declare const WebhooksRemove401: typeof UnauthorizedError;
|
|
376
|
+
export type WebhooksRemove403 = ForbiddenError;
|
|
377
|
+
export declare const WebhooksRemove403: typeof ForbiddenError;
|
|
378
|
+
export type WebhooksRemove404 = ResourceNotFoundError;
|
|
379
|
+
export declare const WebhooksRemove404: typeof ResourceNotFoundError;
|
|
380
|
+
export type WebhooksRemove422 = ValidationError;
|
|
381
|
+
export declare const WebhooksRemove422: typeof ValidationError;
|
|
382
|
+
export type WebhooksRemove500 = InternalError;
|
|
383
|
+
export declare const WebhooksRemove500: typeof InternalError;
|
|
384
|
+
export type WebhooksRemove502 = BillingProviderError;
|
|
385
|
+
export declare const WebhooksRemove502: typeof BillingProviderError;
|
|
386
|
+
export type WebhooksRemove504 = GatewayTimeoutError;
|
|
387
|
+
export declare const WebhooksRemove504: typeof GatewayTimeoutError;
|
|
388
|
+
export type WebhooksUpdatePathParams = {
|
|
389
|
+
readonly id: WebhookEndpointId;
|
|
390
|
+
};
|
|
391
|
+
export declare const WebhooksUpdatePathParams: Schema.Struct<{
|
|
392
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
393
|
+
}>;
|
|
394
|
+
export type WebhooksUpdateRequestJson = {
|
|
395
|
+
readonly name?: string | null;
|
|
396
|
+
readonly url?: string | null;
|
|
397
|
+
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" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook"> | null;
|
|
398
|
+
readonly channels?: ReadonlyArray<"email"> | null | null;
|
|
399
|
+
readonly mailboxIds?: readonly [MailboxId, ...Array<MailboxId>] | null | null;
|
|
400
|
+
readonly namespaceId?: NamespaceId | null | null;
|
|
401
|
+
readonly headers?: {
|
|
402
|
+
readonly [x: string]: string;
|
|
403
|
+
} | null;
|
|
404
|
+
readonly status?: "active" | "disabled" | null;
|
|
405
|
+
};
|
|
406
|
+
export declare const WebhooksUpdateRequestJson: Schema.Struct<{
|
|
407
|
+
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
408
|
+
readonly url: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
409
|
+
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<"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<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.message.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"journey.webhook">]>>, Schema.Null]>>;
|
|
410
|
+
readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>, Schema.Null]>>;
|
|
411
|
+
readonly mailboxIds: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.TupleWithRest<Schema.Tuple<readonly [Schema.brand<Schema.String, "MailboxId">]>, readonly [Schema.brand<Schema.String, "MailboxId">]>, Schema.Null]>, Schema.Null]>>;
|
|
412
|
+
readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>, Schema.Null]>>;
|
|
413
|
+
readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
|
|
414
|
+
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>, Schema.Null]>>;
|
|
415
|
+
}>;
|
|
416
|
+
export type WebhooksUpdate200 = WebhookEndpoint;
|
|
417
|
+
export declare const WebhooksUpdate200: Schema.Struct<{
|
|
418
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
419
|
+
readonly name: Schema.String;
|
|
420
|
+
readonly url: Schema.String;
|
|
421
|
+
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<"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<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.message.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"journey.webhook">]>>;
|
|
422
|
+
readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
|
|
423
|
+
readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
|
|
424
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
425
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
|
|
426
|
+
readonly hasCustomHeaders: Schema.Boolean;
|
|
427
|
+
readonly failureStartedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
428
|
+
readonly lastSucceededAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
429
|
+
readonly createdAt: Schema.String;
|
|
430
|
+
readonly updatedAt: Schema.String;
|
|
431
|
+
}>;
|
|
432
|
+
export type WebhooksUpdate401 = UnauthorizedError;
|
|
433
|
+
export declare const WebhooksUpdate401: typeof UnauthorizedError;
|
|
434
|
+
export type WebhooksUpdate403 = ForbiddenError;
|
|
435
|
+
export declare const WebhooksUpdate403: typeof ForbiddenError;
|
|
436
|
+
export type WebhooksUpdate404 = ResourceNotFoundError;
|
|
437
|
+
export declare const WebhooksUpdate404: typeof ResourceNotFoundError;
|
|
438
|
+
export type WebhooksUpdate409 = ConflictError;
|
|
439
|
+
export declare const WebhooksUpdate409: typeof ConflictError;
|
|
440
|
+
export type WebhooksUpdate422 = ValidationError;
|
|
441
|
+
export declare const WebhooksUpdate422: typeof ValidationError;
|
|
442
|
+
export type WebhooksUpdate500 = InternalError;
|
|
443
|
+
export declare const WebhooksUpdate500: typeof InternalError;
|
|
444
|
+
export type WebhooksUpdate504 = GatewayTimeoutError;
|
|
445
|
+
export declare const WebhooksUpdate504: typeof GatewayTimeoutError;
|
|
446
|
+
export type WebhooksRetryDeliveryPathParams = {
|
|
447
|
+
readonly id: WebhookEndpointId;
|
|
448
|
+
readonly deliveryId: WebhookDeliveryId;
|
|
449
|
+
};
|
|
450
|
+
export declare const WebhooksRetryDeliveryPathParams: Schema.Struct<{
|
|
451
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
452
|
+
readonly deliveryId: Schema.brand<Schema.String, "WebhookDeliveryId">;
|
|
453
|
+
}>;
|
|
454
|
+
export type WebhooksRetryDelivery200 = {
|
|
455
|
+
readonly accepted: true;
|
|
456
|
+
readonly deliveryId: WebhookDeliveryId;
|
|
457
|
+
readonly attemptId: WebhookAttemptId;
|
|
458
|
+
readonly outcome: "succeeded" | "failed";
|
|
459
|
+
};
|
|
460
|
+
export declare const WebhooksRetryDelivery200: Schema.Struct<{
|
|
461
|
+
readonly accepted: Schema.Literal<true>;
|
|
462
|
+
readonly deliveryId: Schema.brand<Schema.String, "WebhookDeliveryId">;
|
|
463
|
+
readonly attemptId: Schema.brand<Schema.String, "WebhookAttemptId">;
|
|
464
|
+
readonly outcome: Schema.Union<readonly [Schema.Literal<"succeeded">, Schema.Literal<"failed">]>;
|
|
465
|
+
}>;
|
|
466
|
+
export type WebhooksRetryDelivery401 = UnauthorizedError;
|
|
467
|
+
export declare const WebhooksRetryDelivery401: typeof UnauthorizedError;
|
|
468
|
+
export type WebhooksRetryDelivery403 = ForbiddenError;
|
|
469
|
+
export declare const WebhooksRetryDelivery403: typeof ForbiddenError;
|
|
470
|
+
export type WebhooksRetryDelivery404 = ResourceNotFoundError;
|
|
471
|
+
export declare const WebhooksRetryDelivery404: typeof ResourceNotFoundError;
|
|
472
|
+
export type WebhooksRetryDelivery422 = ValidationError;
|
|
473
|
+
export declare const WebhooksRetryDelivery422: typeof ValidationError;
|
|
474
|
+
export type WebhooksRetryDelivery429 = RateLimitedError;
|
|
475
|
+
export declare const WebhooksRetryDelivery429: typeof RateLimitedError;
|
|
476
|
+
export type WebhooksRetryDelivery500 = InternalError;
|
|
477
|
+
export declare const WebhooksRetryDelivery500: typeof InternalError;
|
|
478
|
+
export type WebhooksRetryDelivery504 = GatewayTimeoutError;
|
|
479
|
+
export declare const WebhooksRetryDelivery504: typeof GatewayTimeoutError;
|
|
480
|
+
export type WebhooksGetLogsPathParams = {
|
|
481
|
+
readonly id: WebhookEndpointId;
|
|
482
|
+
};
|
|
483
|
+
export declare const WebhooksGetLogsPathParams: Schema.Struct<{
|
|
484
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
485
|
+
}>;
|
|
486
|
+
export type WebhooksGetLogsQuery = {
|
|
487
|
+
readonly limit?: string | null;
|
|
488
|
+
readonly cursor?: Cursor | null;
|
|
489
|
+
};
|
|
490
|
+
export declare const WebhooksGetLogsQuery: Schema.Struct<{
|
|
491
|
+
readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
492
|
+
readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
493
|
+
}>;
|
|
494
|
+
export type WebhooksGetLogs200 = WebhookDeliveryPage;
|
|
495
|
+
export declare const WebhooksGetLogs200: Schema.Struct<{
|
|
496
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
497
|
+
readonly id: Schema.brand<Schema.String, "WebhookDeliveryId">;
|
|
498
|
+
readonly eventId: Schema.brand<Schema.String, "WebhookEventId">;
|
|
499
|
+
readonly eventType: Schema.String;
|
|
500
|
+
readonly occurredAt: Schema.String;
|
|
501
|
+
readonly endpointId: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
502
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"delivered">, Schema.Literal<"exhausted">, Schema.Literal<"cancelled">]>;
|
|
503
|
+
readonly automaticAttempts: Schema.Finite;
|
|
504
|
+
readonly nextAttemptAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
505
|
+
readonly completedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
506
|
+
readonly createdAt: Schema.String;
|
|
507
|
+
readonly updatedAt: Schema.String;
|
|
508
|
+
readonly attempts: Schema.$Array<Schema.Struct<{
|
|
509
|
+
readonly id: Schema.brand<Schema.String, "WebhookAttemptId">;
|
|
510
|
+
readonly deliveryId: Schema.brand<Schema.String, "WebhookDeliveryId">;
|
|
511
|
+
readonly kind: Schema.Union<readonly [Schema.Literal<"automatic">, Schema.Literal<"manual">]>;
|
|
512
|
+
readonly attemptNumber: Schema.Finite;
|
|
513
|
+
readonly classification: Schema.Union<readonly [Schema.Literal<"success">, Schema.Literal<"http-error">, Schema.Literal<"network-error">, Schema.Literal<"timeout">, Schema.Literal<"cancelled">]>;
|
|
514
|
+
readonly attemptedAt: Schema.String;
|
|
515
|
+
readonly responseStatus: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
|
|
516
|
+
readonly responseHeaders: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>;
|
|
517
|
+
readonly durationMs: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
|
|
518
|
+
readonly errorCode: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
519
|
+
readonly errorMessage: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
520
|
+
readonly createdAt: Schema.String;
|
|
521
|
+
}>>;
|
|
522
|
+
}>>;
|
|
523
|
+
readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
524
|
+
}>;
|
|
525
|
+
export type WebhooksGetLogs401 = UnauthorizedError;
|
|
526
|
+
export declare const WebhooksGetLogs401: typeof UnauthorizedError;
|
|
527
|
+
export type WebhooksGetLogs403 = ForbiddenError;
|
|
528
|
+
export declare const WebhooksGetLogs403: typeof ForbiddenError;
|
|
529
|
+
export type WebhooksGetLogs404 = ResourceNotFoundError;
|
|
530
|
+
export declare const WebhooksGetLogs404: typeof ResourceNotFoundError;
|
|
531
|
+
export type WebhooksGetLogs422 = ValidationError;
|
|
532
|
+
export declare const WebhooksGetLogs422: typeof ValidationError;
|
|
533
|
+
export type WebhooksGetLogs500 = InternalError;
|
|
534
|
+
export declare const WebhooksGetLogs500: typeof InternalError;
|
|
535
|
+
export type WebhooksGetLogs504 = GatewayTimeoutError;
|
|
536
|
+
export declare const WebhooksGetLogs504: typeof GatewayTimeoutError;
|
|
537
|
+
export type WebhooksRegenerateSecretPathParams = {
|
|
538
|
+
readonly id: WebhookEndpointId;
|
|
539
|
+
};
|
|
540
|
+
export declare const WebhooksRegenerateSecretPathParams: Schema.Struct<{
|
|
541
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
542
|
+
}>;
|
|
543
|
+
export type WebhooksRegenerateSecret200 = {
|
|
544
|
+
readonly secret: __SamvaRuntimeSensitiveString;
|
|
545
|
+
};
|
|
546
|
+
export declare const WebhooksRegenerateSecret200: Schema.Struct<{
|
|
547
|
+
readonly secret: Schema.RedactedFromValue<Schema.Codec<string, string, never, never>>;
|
|
548
|
+
}>;
|
|
549
|
+
export type WebhooksRegenerateSecret401 = UnauthorizedError;
|
|
550
|
+
export declare const WebhooksRegenerateSecret401: typeof UnauthorizedError;
|
|
551
|
+
export type WebhooksRegenerateSecret403 = ForbiddenError;
|
|
552
|
+
export declare const WebhooksRegenerateSecret403: typeof ForbiddenError;
|
|
553
|
+
export type WebhooksRegenerateSecret404 = ResourceNotFoundError;
|
|
554
|
+
export declare const WebhooksRegenerateSecret404: typeof ResourceNotFoundError;
|
|
555
|
+
export type WebhooksRegenerateSecret422 = ValidationError;
|
|
556
|
+
export declare const WebhooksRegenerateSecret422: typeof ValidationError;
|
|
557
|
+
export type WebhooksRegenerateSecret500 = InternalError;
|
|
558
|
+
export declare const WebhooksRegenerateSecret500: typeof InternalError;
|
|
559
|
+
export type WebhooksRegenerateSecret504 = GatewayTimeoutError;
|
|
560
|
+
export declare const WebhooksRegenerateSecret504: typeof GatewayTimeoutError;
|
|
561
|
+
export type WebhooksGetStatsPathParams = {
|
|
562
|
+
readonly id: WebhookEndpointId;
|
|
563
|
+
};
|
|
564
|
+
export declare const WebhooksGetStatsPathParams: Schema.Struct<{
|
|
565
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
566
|
+
}>;
|
|
567
|
+
export type WebhooksGetStatsQuery = {
|
|
568
|
+
readonly after?: string | null;
|
|
569
|
+
readonly before?: string | null;
|
|
570
|
+
};
|
|
571
|
+
export declare const WebhooksGetStatsQuery: Schema.Struct<{
|
|
572
|
+
readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
573
|
+
readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
574
|
+
}>;
|
|
575
|
+
export type WebhooksGetStats200 = WebhookStatsResponse;
|
|
576
|
+
export declare const WebhooksGetStats200: Schema.Struct<{
|
|
577
|
+
readonly total: Schema.Finite;
|
|
578
|
+
readonly pending: Schema.Finite;
|
|
579
|
+
readonly delivered: Schema.Finite;
|
|
580
|
+
readonly exhausted: Schema.Finite;
|
|
581
|
+
readonly cancelled: Schema.Finite;
|
|
582
|
+
readonly daily: Schema.$Array<Schema.Struct<{
|
|
583
|
+
readonly date: Schema.String;
|
|
584
|
+
readonly pending: Schema.Finite;
|
|
585
|
+
readonly delivered: Schema.Finite;
|
|
586
|
+
readonly exhausted: Schema.Finite;
|
|
587
|
+
readonly cancelled: Schema.Finite;
|
|
588
|
+
}>>;
|
|
589
|
+
}>;
|
|
590
|
+
export type WebhooksGetStats401 = UnauthorizedError;
|
|
591
|
+
export declare const WebhooksGetStats401: typeof UnauthorizedError;
|
|
592
|
+
export type WebhooksGetStats403 = ForbiddenError;
|
|
593
|
+
export declare const WebhooksGetStats403: typeof ForbiddenError;
|
|
594
|
+
export type WebhooksGetStats404 = ResourceNotFoundError;
|
|
595
|
+
export declare const WebhooksGetStats404: typeof ResourceNotFoundError;
|
|
596
|
+
export type WebhooksGetStats422 = ValidationError;
|
|
597
|
+
export declare const WebhooksGetStats422: typeof ValidationError;
|
|
598
|
+
export type WebhooksGetStats500 = InternalError;
|
|
599
|
+
export declare const WebhooksGetStats500: typeof InternalError;
|
|
600
|
+
export type WebhooksGetStats504 = GatewayTimeoutError;
|
|
601
|
+
export declare const WebhooksGetStats504: typeof GatewayTimeoutError;
|
|
602
|
+
export type WebhooksTestPathParams = {
|
|
603
|
+
readonly id: WebhookEndpointId;
|
|
604
|
+
};
|
|
605
|
+
export declare const WebhooksTestPathParams: Schema.Struct<{
|
|
606
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
607
|
+
}>;
|
|
608
|
+
export type WebhooksTestRequestJson = {
|
|
609
|
+
readonly data?: {
|
|
610
|
+
readonly [x: string]: JsonValue;
|
|
611
|
+
} | null;
|
|
612
|
+
};
|
|
613
|
+
export declare const WebhooksTestRequestJson: Schema.Struct<{
|
|
614
|
+
readonly data: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
|
|
615
|
+
}>;
|
|
616
|
+
export type WebhooksTest202 = {
|
|
617
|
+
readonly accepted: true;
|
|
618
|
+
readonly eventId: WebhookEventId;
|
|
619
|
+
readonly deliveryId: WebhookDeliveryId;
|
|
620
|
+
};
|
|
621
|
+
export declare const WebhooksTest202: Schema.Struct<{
|
|
622
|
+
readonly accepted: Schema.Literal<true>;
|
|
623
|
+
readonly eventId: Schema.brand<Schema.String, "WebhookEventId">;
|
|
624
|
+
readonly deliveryId: Schema.brand<Schema.String, "WebhookDeliveryId">;
|
|
625
|
+
}>;
|
|
626
|
+
export type WebhooksTest401 = UnauthorizedError;
|
|
627
|
+
export declare const WebhooksTest401: typeof UnauthorizedError;
|
|
628
|
+
export type WebhooksTest403 = ForbiddenError;
|
|
629
|
+
export declare const WebhooksTest403: typeof ForbiddenError;
|
|
630
|
+
export type WebhooksTest404 = ResourceNotFoundError;
|
|
631
|
+
export declare const WebhooksTest404: typeof ResourceNotFoundError;
|
|
632
|
+
export type WebhooksTest422 = ValidationError;
|
|
633
|
+
export declare const WebhooksTest422: typeof ValidationError;
|
|
634
|
+
export type WebhooksTest500 = InternalError;
|
|
635
|
+
export declare const WebhooksTest500: typeof InternalError;
|
|
636
|
+
export type WebhooksTest504 = GatewayTimeoutError;
|
|
637
|
+
export declare const WebhooksTest504: typeof GatewayTimeoutError;
|
|
638
|
+
declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiEndpoint.HttpApiEndpoint<"webhooksCreate", "POST", "/v1/webhooks", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
639
|
+
readonly name: Schema.String;
|
|
640
|
+
readonly url: Schema.String;
|
|
641
|
+
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<"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<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.message.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"journey.webhook">]>>;
|
|
642
|
+
readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>>;
|
|
643
|
+
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]>>;
|
|
644
|
+
readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
|
|
645
|
+
readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
|
|
646
|
+
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>, Schema.Null]>>;
|
|
647
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
648
|
+
readonly endpoint: Schema.Struct<{
|
|
649
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
650
|
+
readonly name: Schema.String;
|
|
651
|
+
readonly url: Schema.String;
|
|
652
|
+
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<"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<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.message.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"journey.webhook">]>>;
|
|
653
|
+
readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
|
|
654
|
+
readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
|
|
655
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
656
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
|
|
657
|
+
readonly hasCustomHeaders: Schema.Boolean;
|
|
658
|
+
readonly failureStartedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
659
|
+
readonly lastSucceededAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
660
|
+
readonly createdAt: Schema.String;
|
|
661
|
+
readonly updatedAt: Schema.String;
|
|
662
|
+
}>;
|
|
663
|
+
readonly secret: Schema.RedactedFromValue<Schema.Codec<string, string, never, never>>;
|
|
664
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<BillingProviderError, {
|
|
665
|
+
readonly _tag: "BillingProviderError";
|
|
666
|
+
readonly message: string;
|
|
667
|
+
}, readonly [Schema.Struct<{
|
|
668
|
+
readonly _tag: Schema.tag<"BillingProviderError">;
|
|
669
|
+
readonly message: Schema.String;
|
|
670
|
+
}>], {
|
|
671
|
+
readonly _tag: "BillingProviderError";
|
|
672
|
+
readonly message: string;
|
|
673
|
+
}>, Schema.Struct<{
|
|
674
|
+
readonly _tag: Schema.tag<"BillingProviderError">;
|
|
675
|
+
readonly message: Schema.String;
|
|
676
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
677
|
+
readonly _tag: "ConflictError";
|
|
678
|
+
readonly message: string;
|
|
679
|
+
readonly resource: string;
|
|
680
|
+
readonly id?: string | null;
|
|
681
|
+
}, readonly [Schema.Struct<{
|
|
682
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
683
|
+
readonly message: Schema.String;
|
|
684
|
+
readonly resource: Schema.String;
|
|
685
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
686
|
+
}>], {
|
|
687
|
+
readonly _tag: "ConflictError";
|
|
688
|
+
readonly message: string;
|
|
689
|
+
readonly resource: string;
|
|
690
|
+
readonly id?: string | null;
|
|
691
|
+
}>, Schema.Struct<{
|
|
692
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
693
|
+
readonly message: Schema.String;
|
|
694
|
+
readonly resource: Schema.String;
|
|
695
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
696
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
697
|
+
readonly _tag: "ForbiddenError";
|
|
698
|
+
readonly message: string;
|
|
699
|
+
}, readonly [Schema.Struct<{
|
|
700
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
701
|
+
readonly message: Schema.String;
|
|
702
|
+
}>], {
|
|
703
|
+
readonly _tag: "ForbiddenError";
|
|
704
|
+
readonly message: string;
|
|
705
|
+
}>, Schema.Struct<{
|
|
706
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
707
|
+
readonly message: Schema.String;
|
|
708
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
709
|
+
readonly _tag: "GatewayTimeoutError";
|
|
710
|
+
readonly message: string;
|
|
711
|
+
readonly retryAfterSeconds: number;
|
|
712
|
+
}, readonly [Schema.Struct<{
|
|
713
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
714
|
+
readonly message: Schema.String;
|
|
715
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
716
|
+
}>], {
|
|
717
|
+
readonly _tag: "GatewayTimeoutError";
|
|
718
|
+
readonly message: string;
|
|
719
|
+
readonly retryAfterSeconds: number;
|
|
720
|
+
}>, Schema.Struct<{
|
|
721
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
722
|
+
readonly message: Schema.String;
|
|
723
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
724
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<PaymentRequiredError, {
|
|
725
|
+
readonly _tag: "PaymentRequiredError";
|
|
726
|
+
readonly message: string;
|
|
727
|
+
readonly resource: string;
|
|
728
|
+
readonly currentUsage: number;
|
|
729
|
+
readonly limit: number;
|
|
730
|
+
}, readonly [Schema.Struct<{
|
|
731
|
+
readonly _tag: Schema.tag<"PaymentRequiredError">;
|
|
732
|
+
readonly message: Schema.String;
|
|
733
|
+
readonly resource: Schema.String;
|
|
734
|
+
readonly currentUsage: Schema.Finite;
|
|
735
|
+
readonly limit: Schema.Finite;
|
|
736
|
+
}>], {
|
|
737
|
+
readonly _tag: "PaymentRequiredError";
|
|
738
|
+
readonly message: string;
|
|
739
|
+
readonly resource: string;
|
|
740
|
+
readonly currentUsage: number;
|
|
741
|
+
readonly limit: number;
|
|
742
|
+
}>, Schema.Struct<{
|
|
743
|
+
readonly _tag: Schema.tag<"PaymentRequiredError">;
|
|
744
|
+
readonly message: Schema.String;
|
|
745
|
+
readonly resource: Schema.String;
|
|
746
|
+
readonly currentUsage: Schema.Finite;
|
|
747
|
+
readonly limit: Schema.Finite;
|
|
748
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
749
|
+
readonly _tag: "ResourceNotFoundError";
|
|
750
|
+
readonly resource: string;
|
|
751
|
+
readonly id: string;
|
|
752
|
+
readonly message: string;
|
|
753
|
+
}, readonly [Schema.Struct<{
|
|
754
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
755
|
+
readonly resource: Schema.String;
|
|
756
|
+
readonly id: Schema.String;
|
|
757
|
+
readonly message: Schema.String;
|
|
758
|
+
}>], {
|
|
759
|
+
readonly _tag: "ResourceNotFoundError";
|
|
760
|
+
readonly resource: string;
|
|
761
|
+
readonly id: string;
|
|
762
|
+
readonly message: string;
|
|
763
|
+
}>, Schema.Struct<{
|
|
764
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
765
|
+
readonly resource: Schema.String;
|
|
766
|
+
readonly id: Schema.String;
|
|
767
|
+
readonly message: Schema.String;
|
|
768
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
769
|
+
readonly _tag: "UnauthorizedError";
|
|
770
|
+
readonly message: string;
|
|
771
|
+
}, readonly [Schema.Struct<{
|
|
772
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
773
|
+
readonly message: Schema.String;
|
|
774
|
+
}>], {
|
|
775
|
+
readonly _tag: "UnauthorizedError";
|
|
776
|
+
readonly message: string;
|
|
777
|
+
}>, Schema.Struct<{
|
|
778
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
779
|
+
readonly message: Schema.String;
|
|
780
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
781
|
+
readonly _tag: "ValidationError";
|
|
782
|
+
readonly message: string;
|
|
783
|
+
readonly fields?: {
|
|
784
|
+
readonly [x: string]: readonly string[];
|
|
785
|
+
} | null;
|
|
786
|
+
}, readonly [Schema.Struct<{
|
|
787
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
788
|
+
readonly message: Schema.String;
|
|
789
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
790
|
+
}>], {
|
|
791
|
+
readonly _tag: "ValidationError";
|
|
792
|
+
readonly message: string;
|
|
793
|
+
readonly fields?: {
|
|
794
|
+
readonly [x: string]: readonly string[];
|
|
795
|
+
} | null;
|
|
796
|
+
}>, Schema.Struct<{
|
|
797
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
798
|
+
readonly message: Schema.String;
|
|
799
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
800
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"webhooksGet", "GET", "/v1/webhooks/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
801
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
802
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
803
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
804
|
+
readonly name: Schema.String;
|
|
805
|
+
readonly url: Schema.String;
|
|
806
|
+
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<"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<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.message.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"journey.webhook">]>>;
|
|
807
|
+
readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
|
|
808
|
+
readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
|
|
809
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
810
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
|
|
811
|
+
readonly hasCustomHeaders: Schema.Boolean;
|
|
812
|
+
readonly failureStartedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
813
|
+
readonly lastSucceededAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
814
|
+
readonly createdAt: Schema.String;
|
|
815
|
+
readonly updatedAt: Schema.String;
|
|
816
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
817
|
+
readonly _tag: "ForbiddenError";
|
|
818
|
+
readonly message: string;
|
|
819
|
+
}, readonly [Schema.Struct<{
|
|
820
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
821
|
+
readonly message: Schema.String;
|
|
822
|
+
}>], {
|
|
823
|
+
readonly _tag: "ForbiddenError";
|
|
824
|
+
readonly message: string;
|
|
825
|
+
}>, Schema.Struct<{
|
|
826
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
827
|
+
readonly message: Schema.String;
|
|
828
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
829
|
+
readonly _tag: "GatewayTimeoutError";
|
|
830
|
+
readonly message: string;
|
|
831
|
+
readonly retryAfterSeconds: number;
|
|
832
|
+
}, readonly [Schema.Struct<{
|
|
833
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
834
|
+
readonly message: Schema.String;
|
|
835
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
836
|
+
}>], {
|
|
837
|
+
readonly _tag: "GatewayTimeoutError";
|
|
838
|
+
readonly message: string;
|
|
839
|
+
readonly retryAfterSeconds: number;
|
|
840
|
+
}>, Schema.Struct<{
|
|
841
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
842
|
+
readonly message: Schema.String;
|
|
843
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
844
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
845
|
+
readonly _tag: "ResourceNotFoundError";
|
|
846
|
+
readonly resource: string;
|
|
847
|
+
readonly id: string;
|
|
848
|
+
readonly message: string;
|
|
849
|
+
}, readonly [Schema.Struct<{
|
|
850
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
851
|
+
readonly resource: Schema.String;
|
|
852
|
+
readonly id: Schema.String;
|
|
853
|
+
readonly message: Schema.String;
|
|
854
|
+
}>], {
|
|
855
|
+
readonly _tag: "ResourceNotFoundError";
|
|
856
|
+
readonly resource: string;
|
|
857
|
+
readonly id: string;
|
|
858
|
+
readonly message: string;
|
|
859
|
+
}>, Schema.Struct<{
|
|
860
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
861
|
+
readonly resource: Schema.String;
|
|
862
|
+
readonly id: Schema.String;
|
|
863
|
+
readonly message: Schema.String;
|
|
864
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
865
|
+
readonly _tag: "UnauthorizedError";
|
|
866
|
+
readonly message: string;
|
|
867
|
+
}, readonly [Schema.Struct<{
|
|
868
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
869
|
+
readonly message: Schema.String;
|
|
870
|
+
}>], {
|
|
871
|
+
readonly _tag: "UnauthorizedError";
|
|
872
|
+
readonly message: string;
|
|
873
|
+
}>, Schema.Struct<{
|
|
874
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
875
|
+
readonly message: Schema.String;
|
|
876
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
877
|
+
readonly _tag: "ValidationError";
|
|
878
|
+
readonly message: string;
|
|
879
|
+
readonly fields?: {
|
|
880
|
+
readonly [x: string]: readonly string[];
|
|
881
|
+
} | null;
|
|
882
|
+
}, readonly [Schema.Struct<{
|
|
883
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
884
|
+
readonly message: Schema.String;
|
|
885
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
886
|
+
}>], {
|
|
887
|
+
readonly _tag: "ValidationError";
|
|
888
|
+
readonly message: string;
|
|
889
|
+
readonly fields?: {
|
|
890
|
+
readonly [x: string]: readonly string[];
|
|
891
|
+
} | null;
|
|
892
|
+
}>, Schema.Struct<{
|
|
893
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
894
|
+
readonly message: Schema.String;
|
|
895
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
896
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"webhooksGetLogs", "GET", "/v1/webhooks/:id/logs", Schema.toCodecStringTree<Schema.Struct<{
|
|
897
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
898
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
899
|
+
readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
900
|
+
readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
901
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
902
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
903
|
+
readonly id: Schema.brand<Schema.String, "WebhookDeliveryId">;
|
|
904
|
+
readonly eventId: Schema.brand<Schema.String, "WebhookEventId">;
|
|
905
|
+
readonly eventType: Schema.String;
|
|
906
|
+
readonly occurredAt: Schema.String;
|
|
907
|
+
readonly endpointId: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
908
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"delivered">, Schema.Literal<"exhausted">, Schema.Literal<"cancelled">]>;
|
|
909
|
+
readonly automaticAttempts: Schema.Finite;
|
|
910
|
+
readonly nextAttemptAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
911
|
+
readonly completedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
912
|
+
readonly createdAt: Schema.String;
|
|
913
|
+
readonly updatedAt: Schema.String;
|
|
914
|
+
readonly attempts: Schema.$Array<Schema.Struct<{
|
|
915
|
+
readonly id: Schema.brand<Schema.String, "WebhookAttemptId">;
|
|
916
|
+
readonly deliveryId: Schema.brand<Schema.String, "WebhookDeliveryId">;
|
|
917
|
+
readonly kind: Schema.Union<readonly [Schema.Literal<"automatic">, Schema.Literal<"manual">]>;
|
|
918
|
+
readonly attemptNumber: Schema.Finite;
|
|
919
|
+
readonly classification: Schema.Union<readonly [Schema.Literal<"success">, Schema.Literal<"http-error">, Schema.Literal<"network-error">, Schema.Literal<"timeout">, Schema.Literal<"cancelled">]>;
|
|
920
|
+
readonly attemptedAt: Schema.String;
|
|
921
|
+
readonly responseStatus: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
|
|
922
|
+
readonly responseHeaders: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>;
|
|
923
|
+
readonly durationMs: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
|
|
924
|
+
readonly errorCode: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
925
|
+
readonly errorMessage: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
926
|
+
readonly createdAt: Schema.String;
|
|
927
|
+
}>>;
|
|
928
|
+
}>>;
|
|
929
|
+
readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
930
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
931
|
+
readonly _tag: "ForbiddenError";
|
|
932
|
+
readonly message: string;
|
|
933
|
+
}, readonly [Schema.Struct<{
|
|
934
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
935
|
+
readonly message: Schema.String;
|
|
936
|
+
}>], {
|
|
937
|
+
readonly _tag: "ForbiddenError";
|
|
938
|
+
readonly message: string;
|
|
939
|
+
}>, Schema.Struct<{
|
|
940
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
941
|
+
readonly message: Schema.String;
|
|
942
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
943
|
+
readonly _tag: "GatewayTimeoutError";
|
|
944
|
+
readonly message: string;
|
|
945
|
+
readonly retryAfterSeconds: number;
|
|
946
|
+
}, readonly [Schema.Struct<{
|
|
947
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
948
|
+
readonly message: Schema.String;
|
|
949
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
950
|
+
}>], {
|
|
951
|
+
readonly _tag: "GatewayTimeoutError";
|
|
952
|
+
readonly message: string;
|
|
953
|
+
readonly retryAfterSeconds: number;
|
|
954
|
+
}>, Schema.Struct<{
|
|
955
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
956
|
+
readonly message: Schema.String;
|
|
957
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
958
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
959
|
+
readonly _tag: "ResourceNotFoundError";
|
|
960
|
+
readonly resource: string;
|
|
961
|
+
readonly id: string;
|
|
962
|
+
readonly message: string;
|
|
963
|
+
}, readonly [Schema.Struct<{
|
|
964
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
965
|
+
readonly resource: Schema.String;
|
|
966
|
+
readonly id: Schema.String;
|
|
967
|
+
readonly message: Schema.String;
|
|
968
|
+
}>], {
|
|
969
|
+
readonly _tag: "ResourceNotFoundError";
|
|
970
|
+
readonly resource: string;
|
|
971
|
+
readonly id: string;
|
|
972
|
+
readonly message: string;
|
|
973
|
+
}>, Schema.Struct<{
|
|
974
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
975
|
+
readonly resource: Schema.String;
|
|
976
|
+
readonly id: Schema.String;
|
|
977
|
+
readonly message: Schema.String;
|
|
978
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
979
|
+
readonly _tag: "UnauthorizedError";
|
|
980
|
+
readonly message: string;
|
|
981
|
+
}, readonly [Schema.Struct<{
|
|
982
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
983
|
+
readonly message: Schema.String;
|
|
984
|
+
}>], {
|
|
985
|
+
readonly _tag: "UnauthorizedError";
|
|
986
|
+
readonly message: string;
|
|
987
|
+
}>, Schema.Struct<{
|
|
988
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
989
|
+
readonly message: Schema.String;
|
|
990
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
991
|
+
readonly _tag: "ValidationError";
|
|
992
|
+
readonly message: string;
|
|
993
|
+
readonly fields?: {
|
|
994
|
+
readonly [x: string]: readonly string[];
|
|
995
|
+
} | null;
|
|
996
|
+
}, readonly [Schema.Struct<{
|
|
997
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
998
|
+
readonly message: Schema.String;
|
|
999
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1000
|
+
}>], {
|
|
1001
|
+
readonly _tag: "ValidationError";
|
|
1002
|
+
readonly message: string;
|
|
1003
|
+
readonly fields?: {
|
|
1004
|
+
readonly [x: string]: readonly string[];
|
|
1005
|
+
} | null;
|
|
1006
|
+
}>, Schema.Struct<{
|
|
1007
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1008
|
+
readonly message: Schema.String;
|
|
1009
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1010
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"webhooksGetStats", "GET", "/v1/webhooks/:id/stats", Schema.toCodecStringTree<Schema.Struct<{
|
|
1011
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
1012
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
1013
|
+
readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1014
|
+
readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1015
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
1016
|
+
readonly total: Schema.Finite;
|
|
1017
|
+
readonly pending: Schema.Finite;
|
|
1018
|
+
readonly delivered: Schema.Finite;
|
|
1019
|
+
readonly exhausted: Schema.Finite;
|
|
1020
|
+
readonly cancelled: Schema.Finite;
|
|
1021
|
+
readonly daily: Schema.$Array<Schema.Struct<{
|
|
1022
|
+
readonly date: Schema.String;
|
|
1023
|
+
readonly pending: Schema.Finite;
|
|
1024
|
+
readonly delivered: Schema.Finite;
|
|
1025
|
+
readonly exhausted: Schema.Finite;
|
|
1026
|
+
readonly cancelled: Schema.Finite;
|
|
1027
|
+
}>>;
|
|
1028
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
1029
|
+
readonly _tag: "ForbiddenError";
|
|
1030
|
+
readonly message: string;
|
|
1031
|
+
}, readonly [Schema.Struct<{
|
|
1032
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1033
|
+
readonly message: Schema.String;
|
|
1034
|
+
}>], {
|
|
1035
|
+
readonly _tag: "ForbiddenError";
|
|
1036
|
+
readonly message: string;
|
|
1037
|
+
}>, Schema.Struct<{
|
|
1038
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1039
|
+
readonly message: Schema.String;
|
|
1040
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
1041
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1042
|
+
readonly message: string;
|
|
1043
|
+
readonly retryAfterSeconds: number;
|
|
1044
|
+
}, readonly [Schema.Struct<{
|
|
1045
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1046
|
+
readonly message: Schema.String;
|
|
1047
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1048
|
+
}>], {
|
|
1049
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1050
|
+
readonly message: string;
|
|
1051
|
+
readonly retryAfterSeconds: number;
|
|
1052
|
+
}>, Schema.Struct<{
|
|
1053
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1054
|
+
readonly message: Schema.String;
|
|
1055
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1056
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
1057
|
+
readonly _tag: "ResourceNotFoundError";
|
|
1058
|
+
readonly resource: string;
|
|
1059
|
+
readonly id: string;
|
|
1060
|
+
readonly message: string;
|
|
1061
|
+
}, readonly [Schema.Struct<{
|
|
1062
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
1063
|
+
readonly resource: Schema.String;
|
|
1064
|
+
readonly id: Schema.String;
|
|
1065
|
+
readonly message: Schema.String;
|
|
1066
|
+
}>], {
|
|
1067
|
+
readonly _tag: "ResourceNotFoundError";
|
|
1068
|
+
readonly resource: string;
|
|
1069
|
+
readonly id: string;
|
|
1070
|
+
readonly message: string;
|
|
1071
|
+
}>, Schema.Struct<{
|
|
1072
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
1073
|
+
readonly resource: Schema.String;
|
|
1074
|
+
readonly id: Schema.String;
|
|
1075
|
+
readonly message: Schema.String;
|
|
1076
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
1077
|
+
readonly _tag: "UnauthorizedError";
|
|
1078
|
+
readonly message: string;
|
|
1079
|
+
}, readonly [Schema.Struct<{
|
|
1080
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1081
|
+
readonly message: Schema.String;
|
|
1082
|
+
}>], {
|
|
1083
|
+
readonly _tag: "UnauthorizedError";
|
|
1084
|
+
readonly message: string;
|
|
1085
|
+
}>, Schema.Struct<{
|
|
1086
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1087
|
+
readonly message: Schema.String;
|
|
1088
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
1089
|
+
readonly _tag: "ValidationError";
|
|
1090
|
+
readonly message: string;
|
|
1091
|
+
readonly fields?: {
|
|
1092
|
+
readonly [x: string]: readonly string[];
|
|
1093
|
+
} | null;
|
|
1094
|
+
}, readonly [Schema.Struct<{
|
|
1095
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1096
|
+
readonly message: Schema.String;
|
|
1097
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1098
|
+
}>], {
|
|
1099
|
+
readonly _tag: "ValidationError";
|
|
1100
|
+
readonly message: string;
|
|
1101
|
+
readonly fields?: {
|
|
1102
|
+
readonly [x: string]: readonly string[];
|
|
1103
|
+
} | null;
|
|
1104
|
+
}>, Schema.Struct<{
|
|
1105
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1106
|
+
readonly message: Schema.String;
|
|
1107
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1108
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"webhooksList", "GET", "/v1/webhooks", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
1109
|
+
readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1110
|
+
readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1111
|
+
readonly search: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1112
|
+
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>, Schema.Null]>>;
|
|
1113
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
1114
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
1115
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
1116
|
+
readonly name: Schema.String;
|
|
1117
|
+
readonly url: Schema.String;
|
|
1118
|
+
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<"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<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.message.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"journey.webhook">]>>;
|
|
1119
|
+
readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
|
|
1120
|
+
readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
|
|
1121
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
1122
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
|
|
1123
|
+
readonly hasCustomHeaders: Schema.Boolean;
|
|
1124
|
+
readonly failureStartedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1125
|
+
readonly lastSucceededAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1126
|
+
readonly createdAt: Schema.String;
|
|
1127
|
+
readonly updatedAt: Schema.String;
|
|
1128
|
+
readonly deliveries: Schema.Struct<{
|
|
1129
|
+
readonly total: Schema.Finite;
|
|
1130
|
+
readonly pending: Schema.Finite;
|
|
1131
|
+
readonly delivered: Schema.Finite;
|
|
1132
|
+
readonly exhausted: Schema.Finite;
|
|
1133
|
+
readonly cancelled: Schema.Finite;
|
|
1134
|
+
}>;
|
|
1135
|
+
}>>;
|
|
1136
|
+
readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1137
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
1138
|
+
readonly _tag: "ForbiddenError";
|
|
1139
|
+
readonly message: string;
|
|
1140
|
+
}, readonly [Schema.Struct<{
|
|
1141
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1142
|
+
readonly message: Schema.String;
|
|
1143
|
+
}>], {
|
|
1144
|
+
readonly _tag: "ForbiddenError";
|
|
1145
|
+
readonly message: string;
|
|
1146
|
+
}>, Schema.Struct<{
|
|
1147
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1148
|
+
readonly message: Schema.String;
|
|
1149
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
1150
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1151
|
+
readonly message: string;
|
|
1152
|
+
readonly retryAfterSeconds: number;
|
|
1153
|
+
}, readonly [Schema.Struct<{
|
|
1154
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1155
|
+
readonly message: Schema.String;
|
|
1156
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1157
|
+
}>], {
|
|
1158
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1159
|
+
readonly message: string;
|
|
1160
|
+
readonly retryAfterSeconds: number;
|
|
1161
|
+
}>, Schema.Struct<{
|
|
1162
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1163
|
+
readonly message: Schema.String;
|
|
1164
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1165
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
1166
|
+
readonly _tag: "UnauthorizedError";
|
|
1167
|
+
readonly message: string;
|
|
1168
|
+
}, readonly [Schema.Struct<{
|
|
1169
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1170
|
+
readonly message: Schema.String;
|
|
1171
|
+
}>], {
|
|
1172
|
+
readonly _tag: "UnauthorizedError";
|
|
1173
|
+
readonly message: string;
|
|
1174
|
+
}>, Schema.Struct<{
|
|
1175
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1176
|
+
readonly message: Schema.String;
|
|
1177
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
1178
|
+
readonly _tag: "ValidationError";
|
|
1179
|
+
readonly message: string;
|
|
1180
|
+
readonly fields?: {
|
|
1181
|
+
readonly [x: string]: readonly string[];
|
|
1182
|
+
} | null;
|
|
1183
|
+
}, readonly [Schema.Struct<{
|
|
1184
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1185
|
+
readonly message: Schema.String;
|
|
1186
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1187
|
+
}>], {
|
|
1188
|
+
readonly _tag: "ValidationError";
|
|
1189
|
+
readonly message: string;
|
|
1190
|
+
readonly fields?: {
|
|
1191
|
+
readonly [x: string]: readonly string[];
|
|
1192
|
+
} | null;
|
|
1193
|
+
}>, Schema.Struct<{
|
|
1194
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1195
|
+
readonly message: Schema.String;
|
|
1196
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1197
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"webhooksRegenerateSecret", "POST", "/v1/webhooks/:id/rotate-secret", Schema.toCodecStringTree<Schema.Struct<{
|
|
1198
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
1199
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
1200
|
+
readonly secret: Schema.RedactedFromValue<Schema.Codec<string, string, never, never>>;
|
|
1201
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
1202
|
+
readonly _tag: "ForbiddenError";
|
|
1203
|
+
readonly message: string;
|
|
1204
|
+
}, readonly [Schema.Struct<{
|
|
1205
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1206
|
+
readonly message: Schema.String;
|
|
1207
|
+
}>], {
|
|
1208
|
+
readonly _tag: "ForbiddenError";
|
|
1209
|
+
readonly message: string;
|
|
1210
|
+
}>, Schema.Struct<{
|
|
1211
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1212
|
+
readonly message: Schema.String;
|
|
1213
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
1214
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1215
|
+
readonly message: string;
|
|
1216
|
+
readonly retryAfterSeconds: number;
|
|
1217
|
+
}, readonly [Schema.Struct<{
|
|
1218
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1219
|
+
readonly message: Schema.String;
|
|
1220
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1221
|
+
}>], {
|
|
1222
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1223
|
+
readonly message: string;
|
|
1224
|
+
readonly retryAfterSeconds: number;
|
|
1225
|
+
}>, Schema.Struct<{
|
|
1226
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1227
|
+
readonly message: Schema.String;
|
|
1228
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1229
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
1230
|
+
readonly _tag: "ResourceNotFoundError";
|
|
1231
|
+
readonly resource: string;
|
|
1232
|
+
readonly id: string;
|
|
1233
|
+
readonly message: string;
|
|
1234
|
+
}, readonly [Schema.Struct<{
|
|
1235
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
1236
|
+
readonly resource: Schema.String;
|
|
1237
|
+
readonly id: Schema.String;
|
|
1238
|
+
readonly message: Schema.String;
|
|
1239
|
+
}>], {
|
|
1240
|
+
readonly _tag: "ResourceNotFoundError";
|
|
1241
|
+
readonly resource: string;
|
|
1242
|
+
readonly id: string;
|
|
1243
|
+
readonly message: string;
|
|
1244
|
+
}>, Schema.Struct<{
|
|
1245
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
1246
|
+
readonly resource: Schema.String;
|
|
1247
|
+
readonly id: Schema.String;
|
|
1248
|
+
readonly message: Schema.String;
|
|
1249
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
1250
|
+
readonly _tag: "UnauthorizedError";
|
|
1251
|
+
readonly message: string;
|
|
1252
|
+
}, readonly [Schema.Struct<{
|
|
1253
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1254
|
+
readonly message: Schema.String;
|
|
1255
|
+
}>], {
|
|
1256
|
+
readonly _tag: "UnauthorizedError";
|
|
1257
|
+
readonly message: string;
|
|
1258
|
+
}>, Schema.Struct<{
|
|
1259
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1260
|
+
readonly message: Schema.String;
|
|
1261
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
1262
|
+
readonly _tag: "ValidationError";
|
|
1263
|
+
readonly message: string;
|
|
1264
|
+
readonly fields?: {
|
|
1265
|
+
readonly [x: string]: readonly string[];
|
|
1266
|
+
} | null;
|
|
1267
|
+
}, readonly [Schema.Struct<{
|
|
1268
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1269
|
+
readonly message: Schema.String;
|
|
1270
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1271
|
+
}>], {
|
|
1272
|
+
readonly _tag: "ValidationError";
|
|
1273
|
+
readonly message: string;
|
|
1274
|
+
readonly fields?: {
|
|
1275
|
+
readonly [x: string]: readonly string[];
|
|
1276
|
+
} | null;
|
|
1277
|
+
}>, Schema.Struct<{
|
|
1278
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1279
|
+
readonly message: Schema.String;
|
|
1280
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1281
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"webhooksRemove", "DELETE", "/v1/webhooks/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
1282
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
1283
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
1284
|
+
readonly success: Schema.Boolean;
|
|
1285
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<BillingProviderError, {
|
|
1286
|
+
readonly _tag: "BillingProviderError";
|
|
1287
|
+
readonly message: string;
|
|
1288
|
+
}, readonly [Schema.Struct<{
|
|
1289
|
+
readonly _tag: Schema.tag<"BillingProviderError">;
|
|
1290
|
+
readonly message: Schema.String;
|
|
1291
|
+
}>], {
|
|
1292
|
+
readonly _tag: "BillingProviderError";
|
|
1293
|
+
readonly message: string;
|
|
1294
|
+
}>, Schema.Struct<{
|
|
1295
|
+
readonly _tag: Schema.tag<"BillingProviderError">;
|
|
1296
|
+
readonly message: Schema.String;
|
|
1297
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
1298
|
+
readonly _tag: "ForbiddenError";
|
|
1299
|
+
readonly message: string;
|
|
1300
|
+
}, readonly [Schema.Struct<{
|
|
1301
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1302
|
+
readonly message: Schema.String;
|
|
1303
|
+
}>], {
|
|
1304
|
+
readonly _tag: "ForbiddenError";
|
|
1305
|
+
readonly message: string;
|
|
1306
|
+
}>, Schema.Struct<{
|
|
1307
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1308
|
+
readonly message: Schema.String;
|
|
1309
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
1310
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1311
|
+
readonly message: string;
|
|
1312
|
+
readonly retryAfterSeconds: number;
|
|
1313
|
+
}, readonly [Schema.Struct<{
|
|
1314
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1315
|
+
readonly message: Schema.String;
|
|
1316
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1317
|
+
}>], {
|
|
1318
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1319
|
+
readonly message: string;
|
|
1320
|
+
readonly retryAfterSeconds: number;
|
|
1321
|
+
}>, Schema.Struct<{
|
|
1322
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1323
|
+
readonly message: Schema.String;
|
|
1324
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1325
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
1326
|
+
readonly _tag: "ResourceNotFoundError";
|
|
1327
|
+
readonly resource: string;
|
|
1328
|
+
readonly id: string;
|
|
1329
|
+
readonly message: string;
|
|
1330
|
+
}, readonly [Schema.Struct<{
|
|
1331
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
1332
|
+
readonly resource: Schema.String;
|
|
1333
|
+
readonly id: Schema.String;
|
|
1334
|
+
readonly message: Schema.String;
|
|
1335
|
+
}>], {
|
|
1336
|
+
readonly _tag: "ResourceNotFoundError";
|
|
1337
|
+
readonly resource: string;
|
|
1338
|
+
readonly id: string;
|
|
1339
|
+
readonly message: string;
|
|
1340
|
+
}>, Schema.Struct<{
|
|
1341
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
1342
|
+
readonly resource: Schema.String;
|
|
1343
|
+
readonly id: Schema.String;
|
|
1344
|
+
readonly message: Schema.String;
|
|
1345
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
1346
|
+
readonly _tag: "UnauthorizedError";
|
|
1347
|
+
readonly message: string;
|
|
1348
|
+
}, readonly [Schema.Struct<{
|
|
1349
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1350
|
+
readonly message: Schema.String;
|
|
1351
|
+
}>], {
|
|
1352
|
+
readonly _tag: "UnauthorizedError";
|
|
1353
|
+
readonly message: string;
|
|
1354
|
+
}>, Schema.Struct<{
|
|
1355
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1356
|
+
readonly message: Schema.String;
|
|
1357
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
1358
|
+
readonly _tag: "ValidationError";
|
|
1359
|
+
readonly message: string;
|
|
1360
|
+
readonly fields?: {
|
|
1361
|
+
readonly [x: string]: readonly string[];
|
|
1362
|
+
} | null;
|
|
1363
|
+
}, readonly [Schema.Struct<{
|
|
1364
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1365
|
+
readonly message: Schema.String;
|
|
1366
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1367
|
+
}>], {
|
|
1368
|
+
readonly _tag: "ValidationError";
|
|
1369
|
+
readonly message: string;
|
|
1370
|
+
readonly fields?: {
|
|
1371
|
+
readonly [x: string]: readonly string[];
|
|
1372
|
+
} | null;
|
|
1373
|
+
}>, Schema.Struct<{
|
|
1374
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1375
|
+
readonly message: Schema.String;
|
|
1376
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1377
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"webhooksRetryDelivery", "POST", "/v1/webhooks/:id/deliveries/:deliveryId/redeliver", Schema.toCodecStringTree<Schema.Struct<{
|
|
1378
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
1379
|
+
readonly deliveryId: Schema.brand<Schema.String, "WebhookDeliveryId">;
|
|
1380
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
1381
|
+
readonly accepted: Schema.Literal<true>;
|
|
1382
|
+
readonly deliveryId: Schema.brand<Schema.String, "WebhookDeliveryId">;
|
|
1383
|
+
readonly attemptId: Schema.brand<Schema.String, "WebhookAttemptId">;
|
|
1384
|
+
readonly outcome: Schema.Union<readonly [Schema.Literal<"succeeded">, Schema.Literal<"failed">]>;
|
|
1385
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
1386
|
+
readonly _tag: "ForbiddenError";
|
|
1387
|
+
readonly message: string;
|
|
1388
|
+
}, readonly [Schema.Struct<{
|
|
1389
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1390
|
+
readonly message: Schema.String;
|
|
1391
|
+
}>], {
|
|
1392
|
+
readonly _tag: "ForbiddenError";
|
|
1393
|
+
readonly message: string;
|
|
1394
|
+
}>, Schema.Struct<{
|
|
1395
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1396
|
+
readonly message: Schema.String;
|
|
1397
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
1398
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1399
|
+
readonly message: string;
|
|
1400
|
+
readonly retryAfterSeconds: number;
|
|
1401
|
+
}, readonly [Schema.Struct<{
|
|
1402
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1403
|
+
readonly message: Schema.String;
|
|
1404
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1405
|
+
}>], {
|
|
1406
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1407
|
+
readonly message: string;
|
|
1408
|
+
readonly retryAfterSeconds: number;
|
|
1409
|
+
}>, Schema.Struct<{
|
|
1410
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1411
|
+
readonly message: Schema.String;
|
|
1412
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1413
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<RateLimitedError, {
|
|
1414
|
+
readonly _tag: "RateLimitedError";
|
|
1415
|
+
readonly message: string;
|
|
1416
|
+
readonly retryAfterSeconds: number;
|
|
1417
|
+
}, readonly [Schema.Struct<{
|
|
1418
|
+
readonly _tag: Schema.tag<"RateLimitedError">;
|
|
1419
|
+
readonly message: Schema.String;
|
|
1420
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1421
|
+
}>], {
|
|
1422
|
+
readonly _tag: "RateLimitedError";
|
|
1423
|
+
readonly message: string;
|
|
1424
|
+
readonly retryAfterSeconds: number;
|
|
1425
|
+
}>, Schema.Struct<{
|
|
1426
|
+
readonly _tag: Schema.tag<"RateLimitedError">;
|
|
1427
|
+
readonly message: Schema.String;
|
|
1428
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1429
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
1430
|
+
readonly _tag: "ResourceNotFoundError";
|
|
1431
|
+
readonly resource: string;
|
|
1432
|
+
readonly id: string;
|
|
1433
|
+
readonly message: string;
|
|
1434
|
+
}, readonly [Schema.Struct<{
|
|
1435
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
1436
|
+
readonly resource: Schema.String;
|
|
1437
|
+
readonly id: Schema.String;
|
|
1438
|
+
readonly message: Schema.String;
|
|
1439
|
+
}>], {
|
|
1440
|
+
readonly _tag: "ResourceNotFoundError";
|
|
1441
|
+
readonly resource: string;
|
|
1442
|
+
readonly id: string;
|
|
1443
|
+
readonly message: string;
|
|
1444
|
+
}>, Schema.Struct<{
|
|
1445
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
1446
|
+
readonly resource: Schema.String;
|
|
1447
|
+
readonly id: Schema.String;
|
|
1448
|
+
readonly message: Schema.String;
|
|
1449
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
1450
|
+
readonly _tag: "UnauthorizedError";
|
|
1451
|
+
readonly message: string;
|
|
1452
|
+
}, readonly [Schema.Struct<{
|
|
1453
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1454
|
+
readonly message: Schema.String;
|
|
1455
|
+
}>], {
|
|
1456
|
+
readonly _tag: "UnauthorizedError";
|
|
1457
|
+
readonly message: string;
|
|
1458
|
+
}>, Schema.Struct<{
|
|
1459
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1460
|
+
readonly message: Schema.String;
|
|
1461
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
1462
|
+
readonly _tag: "ValidationError";
|
|
1463
|
+
readonly message: string;
|
|
1464
|
+
readonly fields?: {
|
|
1465
|
+
readonly [x: string]: readonly string[];
|
|
1466
|
+
} | null;
|
|
1467
|
+
}, readonly [Schema.Struct<{
|
|
1468
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1469
|
+
readonly message: Schema.String;
|
|
1470
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1471
|
+
}>], {
|
|
1472
|
+
readonly _tag: "ValidationError";
|
|
1473
|
+
readonly message: string;
|
|
1474
|
+
readonly fields?: {
|
|
1475
|
+
readonly [x: string]: readonly string[];
|
|
1476
|
+
} | null;
|
|
1477
|
+
}>, Schema.Struct<{
|
|
1478
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1479
|
+
readonly message: Schema.String;
|
|
1480
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1481
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"webhooksTest", "POST", "/v1/webhooks/:id/test", Schema.toCodecStringTree<Schema.Struct<{
|
|
1482
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
1483
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1484
|
+
readonly data: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
|
|
1485
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1486
|
+
readonly accepted: Schema.Literal<true>;
|
|
1487
|
+
readonly eventId: Schema.brand<Schema.String, "WebhookEventId">;
|
|
1488
|
+
readonly deliveryId: Schema.brand<Schema.String, "WebhookDeliveryId">;
|
|
1489
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
1490
|
+
readonly _tag: "ForbiddenError";
|
|
1491
|
+
readonly message: string;
|
|
1492
|
+
}, readonly [Schema.Struct<{
|
|
1493
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1494
|
+
readonly message: Schema.String;
|
|
1495
|
+
}>], {
|
|
1496
|
+
readonly _tag: "ForbiddenError";
|
|
1497
|
+
readonly message: string;
|
|
1498
|
+
}>, Schema.Struct<{
|
|
1499
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1500
|
+
readonly message: Schema.String;
|
|
1501
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
1502
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1503
|
+
readonly message: string;
|
|
1504
|
+
readonly retryAfterSeconds: number;
|
|
1505
|
+
}, readonly [Schema.Struct<{
|
|
1506
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1507
|
+
readonly message: Schema.String;
|
|
1508
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1509
|
+
}>], {
|
|
1510
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1511
|
+
readonly message: string;
|
|
1512
|
+
readonly retryAfterSeconds: number;
|
|
1513
|
+
}>, Schema.Struct<{
|
|
1514
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1515
|
+
readonly message: Schema.String;
|
|
1516
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1517
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
1518
|
+
readonly _tag: "ResourceNotFoundError";
|
|
1519
|
+
readonly resource: string;
|
|
1520
|
+
readonly id: string;
|
|
1521
|
+
readonly message: string;
|
|
1522
|
+
}, readonly [Schema.Struct<{
|
|
1523
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
1524
|
+
readonly resource: Schema.String;
|
|
1525
|
+
readonly id: Schema.String;
|
|
1526
|
+
readonly message: Schema.String;
|
|
1527
|
+
}>], {
|
|
1528
|
+
readonly _tag: "ResourceNotFoundError";
|
|
1529
|
+
readonly resource: string;
|
|
1530
|
+
readonly id: string;
|
|
1531
|
+
readonly message: string;
|
|
1532
|
+
}>, Schema.Struct<{
|
|
1533
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
1534
|
+
readonly resource: Schema.String;
|
|
1535
|
+
readonly id: Schema.String;
|
|
1536
|
+
readonly message: Schema.String;
|
|
1537
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
1538
|
+
readonly _tag: "UnauthorizedError";
|
|
1539
|
+
readonly message: string;
|
|
1540
|
+
}, readonly [Schema.Struct<{
|
|
1541
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1542
|
+
readonly message: Schema.String;
|
|
1543
|
+
}>], {
|
|
1544
|
+
readonly _tag: "UnauthorizedError";
|
|
1545
|
+
readonly message: string;
|
|
1546
|
+
}>, Schema.Struct<{
|
|
1547
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1548
|
+
readonly message: Schema.String;
|
|
1549
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
1550
|
+
readonly _tag: "ValidationError";
|
|
1551
|
+
readonly message: string;
|
|
1552
|
+
readonly fields?: {
|
|
1553
|
+
readonly [x: string]: readonly string[];
|
|
1554
|
+
} | null;
|
|
1555
|
+
}, readonly [Schema.Struct<{
|
|
1556
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1557
|
+
readonly message: Schema.String;
|
|
1558
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1559
|
+
}>], {
|
|
1560
|
+
readonly _tag: "ValidationError";
|
|
1561
|
+
readonly message: string;
|
|
1562
|
+
readonly fields?: {
|
|
1563
|
+
readonly [x: string]: readonly string[];
|
|
1564
|
+
} | null;
|
|
1565
|
+
}>, Schema.Struct<{
|
|
1566
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1567
|
+
readonly message: Schema.String;
|
|
1568
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1569
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"webhooksUpdate", "PATCH", "/v1/webhooks/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
1570
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
1571
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1572
|
+
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1573
|
+
readonly url: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1574
|
+
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<"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<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.message.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"journey.webhook">]>>, Schema.Null]>>;
|
|
1575
|
+
readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>, Schema.Null]>>;
|
|
1576
|
+
readonly mailboxIds: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.TupleWithRest<Schema.Tuple<readonly [Schema.brand<Schema.String, "MailboxId">]>, readonly [Schema.brand<Schema.String, "MailboxId">]>, Schema.Null]>, Schema.Null]>>;
|
|
1577
|
+
readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>, Schema.Null]>>;
|
|
1578
|
+
readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
|
|
1579
|
+
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>, Schema.Null]>>;
|
|
1580
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1581
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
1582
|
+
readonly name: Schema.String;
|
|
1583
|
+
readonly url: Schema.String;
|
|
1584
|
+
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<"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<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.message.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"journey.webhook">]>>;
|
|
1585
|
+
readonly channels: Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>;
|
|
1586
|
+
readonly mailboxIds: Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>;
|
|
1587
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
1588
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
|
|
1589
|
+
readonly hasCustomHeaders: Schema.Boolean;
|
|
1590
|
+
readonly failureStartedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1591
|
+
readonly lastSucceededAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1592
|
+
readonly createdAt: Schema.String;
|
|
1593
|
+
readonly updatedAt: Schema.String;
|
|
1594
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
1595
|
+
readonly _tag: "ConflictError";
|
|
1596
|
+
readonly message: string;
|
|
1597
|
+
readonly resource: string;
|
|
1598
|
+
readonly id?: string | null;
|
|
1599
|
+
}, readonly [Schema.Struct<{
|
|
1600
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
1601
|
+
readonly message: Schema.String;
|
|
1602
|
+
readonly resource: Schema.String;
|
|
1603
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1604
|
+
}>], {
|
|
1605
|
+
readonly _tag: "ConflictError";
|
|
1606
|
+
readonly message: string;
|
|
1607
|
+
readonly resource: string;
|
|
1608
|
+
readonly id?: string | null;
|
|
1609
|
+
}>, Schema.Struct<{
|
|
1610
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
1611
|
+
readonly message: Schema.String;
|
|
1612
|
+
readonly resource: Schema.String;
|
|
1613
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1614
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
1615
|
+
readonly _tag: "ForbiddenError";
|
|
1616
|
+
readonly message: string;
|
|
1617
|
+
}, readonly [Schema.Struct<{
|
|
1618
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1619
|
+
readonly message: Schema.String;
|
|
1620
|
+
}>], {
|
|
1621
|
+
readonly _tag: "ForbiddenError";
|
|
1622
|
+
readonly message: string;
|
|
1623
|
+
}>, Schema.Struct<{
|
|
1624
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1625
|
+
readonly message: Schema.String;
|
|
1626
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
1627
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1628
|
+
readonly message: string;
|
|
1629
|
+
readonly retryAfterSeconds: number;
|
|
1630
|
+
}, readonly [Schema.Struct<{
|
|
1631
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1632
|
+
readonly message: Schema.String;
|
|
1633
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1634
|
+
}>], {
|
|
1635
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1636
|
+
readonly message: string;
|
|
1637
|
+
readonly retryAfterSeconds: number;
|
|
1638
|
+
}>, Schema.Struct<{
|
|
1639
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1640
|
+
readonly message: Schema.String;
|
|
1641
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1642
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
1643
|
+
readonly _tag: "ResourceNotFoundError";
|
|
1644
|
+
readonly resource: string;
|
|
1645
|
+
readonly id: string;
|
|
1646
|
+
readonly message: string;
|
|
1647
|
+
}, readonly [Schema.Struct<{
|
|
1648
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
1649
|
+
readonly resource: Schema.String;
|
|
1650
|
+
readonly id: Schema.String;
|
|
1651
|
+
readonly message: Schema.String;
|
|
1652
|
+
}>], {
|
|
1653
|
+
readonly _tag: "ResourceNotFoundError";
|
|
1654
|
+
readonly resource: string;
|
|
1655
|
+
readonly id: string;
|
|
1656
|
+
readonly message: string;
|
|
1657
|
+
}>, Schema.Struct<{
|
|
1658
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
1659
|
+
readonly resource: Schema.String;
|
|
1660
|
+
readonly id: Schema.String;
|
|
1661
|
+
readonly message: Schema.String;
|
|
1662
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
1663
|
+
readonly _tag: "UnauthorizedError";
|
|
1664
|
+
readonly message: string;
|
|
1665
|
+
}, readonly [Schema.Struct<{
|
|
1666
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1667
|
+
readonly message: Schema.String;
|
|
1668
|
+
}>], {
|
|
1669
|
+
readonly _tag: "UnauthorizedError";
|
|
1670
|
+
readonly message: string;
|
|
1671
|
+
}>, Schema.Struct<{
|
|
1672
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1673
|
+
readonly message: Schema.String;
|
|
1674
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
1675
|
+
readonly _tag: "ValidationError";
|
|
1676
|
+
readonly message: string;
|
|
1677
|
+
readonly fields?: {
|
|
1678
|
+
readonly [x: string]: readonly string[];
|
|
1679
|
+
} | null;
|
|
1680
|
+
}, readonly [Schema.Struct<{
|
|
1681
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1682
|
+
readonly message: Schema.String;
|
|
1683
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1684
|
+
}>], {
|
|
1685
|
+
readonly _tag: "ValidationError";
|
|
1686
|
+
readonly message: string;
|
|
1687
|
+
readonly fields?: {
|
|
1688
|
+
readonly [x: string]: readonly string[];
|
|
1689
|
+
} | null;
|
|
1690
|
+
}>, Schema.Struct<{
|
|
1691
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1692
|
+
readonly message: Schema.String;
|
|
1693
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1694
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>, false>;
|
|
1695
|
+
export declare class WebhooksGroup extends WebhooksGroup_base {
|
|
1696
|
+
}
|
|
1697
|
+
export {};
|