samva 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/AGENTS.md +4 -1
  2. package/README.md +44 -1
  3. package/dist/analytics-CaqPRsry.js +207 -0
  4. package/dist/api-keys-Ce1Y4_Ip.js +274 -0
  5. package/dist/attachments-DYqVIraC.js +140 -0
  6. package/dist/brands-ZwuOGIWO.js +175 -0
  7. package/dist/campaigns-DZlz1E9E.js +522 -0
  8. package/dist/categories-CA4XIQAb.js +1011 -0
  9. package/dist/client/sdk.gen.d.ts +174 -3
  10. package/dist/client/types.gen.d.ts +1126 -11
  11. package/dist/client-DOzUrdTE.js +1115 -0
  12. package/dist/contact-groups-BLbFXnjq.js +446 -0
  13. package/dist/contacts-BbsoXXB4.js +787 -0
  14. package/dist/conversations-_sRHueML.js +494 -0
  15. package/dist/custom-fields-BHWbwlKn.js +176 -0
  16. package/dist/effect/analytics.js +2 -21
  17. package/dist/effect/api-keys.d.ts +1 -1
  18. package/dist/effect/api-keys.js +2 -28
  19. package/dist/effect/attachments.js +2 -17
  20. package/dist/effect/brands.d.ts +1 -1
  21. package/dist/effect/brands.js +3 -24
  22. package/dist/effect/campaigns.js +2 -33
  23. package/dist/effect/categories.js +1 -1
  24. package/dist/effect/client.d.ts +1 -1
  25. package/dist/effect/client.js +3 -4
  26. package/dist/effect/contact-groups.js +2 -29
  27. package/dist/effect/contacts.d.ts +52 -0
  28. package/dist/effect/contacts.js +2 -47
  29. package/dist/effect/conversations.js +2 -35
  30. package/dist/effect/custom-fields.js +2 -17
  31. package/dist/effect/email.d.ts +3 -2
  32. package/dist/effect/email.js +2 -137
  33. package/dist/effect/events.d.ts +121 -0
  34. package/dist/effect/events.js +3 -0
  35. package/dist/effect/extension-installations.js +2 -27
  36. package/dist/effect/extensions.js +2 -19
  37. package/dist/effect/feedback.d.ts +1 -1
  38. package/dist/effect/feedback.js +3 -13
  39. package/dist/effect/generated/analytics.d.ts +715 -0
  40. package/dist/effect/generated/api-keys.d.ts +1627 -0
  41. package/dist/effect/generated/attachments.d.ts +554 -0
  42. package/dist/effect/generated/brands.d.ts +1118 -0
  43. package/dist/effect/generated/campaigns.d.ts +3783 -0
  44. package/dist/effect/generated/contact-events.d.ts +158 -0
  45. package/dist/effect/generated/contact-groups.d.ts +1445 -0
  46. package/dist/effect/generated/contacts.d.ts +3789 -0
  47. package/dist/effect/generated/conversations.d.ts +2870 -0
  48. package/dist/effect/generated/custom-fields.d.ts +562 -0
  49. package/dist/effect/generated/email.d.ts +10622 -0
  50. package/dist/effect/generated/events.d.ts +463 -0
  51. package/dist/effect/generated/extension-installations.d.ts +1786 -0
  52. package/dist/effect/generated/extensions.d.ts +927 -0
  53. package/dist/effect/generated/feedback.d.ts +116 -0
  54. package/dist/effect/generated/index.d.ts +61 -0
  55. package/dist/effect/generated/journeys.d.ts +6135 -0
  56. package/dist/effect/generated/mailboxes.d.ts +13641 -0
  57. package/dist/effect/generated/media.d.ts +741 -0
  58. package/dist/effect/generated/messages.d.ts +2355 -0
  59. package/dist/effect/generated/namespaces.d.ts +654 -0
  60. package/dist/effect/generated/operations.d.ts +514 -0
  61. package/dist/effect/generated/organizations.d.ts +1111 -0
  62. package/dist/effect/generated/scheduled-messages.d.ts +1798 -0
  63. package/dist/effect/generated/shared.d.ts +3250 -0
  64. package/dist/effect/generated/subscriptions.d.ts +188 -0
  65. package/dist/effect/generated/templates.d.ts +8177 -0
  66. package/dist/effect/generated/unsubscribe-groups.d.ts +1153 -0
  67. package/dist/effect/generated/webhooks.d.ts +1697 -0
  68. package/dist/effect/generated/whoami.d.ts +291 -0
  69. package/dist/effect/generated-metadata.d.ts +1627 -0
  70. package/dist/effect/index.d.ts +3 -1
  71. package/dist/effect/index.js +29 -27
  72. package/dist/effect/internal/client.d.ts +10 -7
  73. package/dist/effect/internal/email-sender.d.ts +17 -0
  74. package/dist/effect/internal/operation.d.ts +12 -72
  75. package/dist/effect/internal/send.d.ts +60 -0
  76. package/dist/effect/journeys.d.ts +2153 -0
  77. package/dist/effect/journeys.js +2 -0
  78. package/dist/effect/mailboxes.d.ts +112 -112
  79. package/dist/effect/mailboxes.js +1 -1
  80. package/dist/effect/media.js +3 -1
  81. package/dist/effect/messages.d.ts +2 -2
  82. package/dist/effect/messages.js +3 -1
  83. package/dist/effect/namespaces.js +2 -19
  84. package/dist/effect/operations.js +2 -15
  85. package/dist/effect/organizations.js +2 -23
  86. package/dist/effect/retry.js +1 -1
  87. package/dist/effect/scheduled-messages.js +2 -19
  88. package/dist/effect/subscriptions.js +2 -9
  89. package/dist/effect/templates.d.ts +1 -1
  90. package/dist/effect/templates.js +3 -78
  91. package/dist/effect/unsubscribe-groups.js +2 -27
  92. package/dist/effect/webhooks.d.ts +9 -9
  93. package/dist/effect/webhooks.js +3 -33
  94. package/dist/effect/whoami.d.ts +8 -8
  95. package/dist/effect/whoami.js +2 -9
  96. package/dist/email-R0NAA9PW.js +2498 -0
  97. package/dist/events-CxbTUHYT.js +82 -0
  98. package/dist/extension-installations-CD94LPmk.js +407 -0
  99. package/dist/extensions-BKyNQLvu.js +220 -0
  100. package/dist/feedback-Bpa09JOS.js +52 -0
  101. package/dist/index.js +2 -2
  102. package/dist/{inline-attachments-Cegg6tTF.js → inline-attachments-Bi1hDltp.js} +2 -2
  103. package/dist/journeys-CARo_BJT.js +499 -0
  104. package/dist/mailboxes-BRDn7BIK.js +2470 -0
  105. package/dist/media-VrrtNnft.js +181 -0
  106. package/dist/namespaces-CcvEbG-y.js +152 -0
  107. package/dist/{operation-BTXjPrwf.js → operation-n_IYgNVK.js} +75 -90
  108. package/dist/operations-CmB3FHwf.js +93 -0
  109. package/dist/organizations-A-plufWc.js +252 -0
  110. package/dist/promises/index.d.ts +7 -3
  111. package/dist/promises/index.js +2 -2
  112. package/dist/promises/types.gen.d.ts +1 -1
  113. package/dist/{promises-KrA2nSLg.js → promises---Kbh-7z.js} +467 -3
  114. package/dist/runtime-P0l1_2-C.js +25 -0
  115. package/dist/scheduled-messages-DkKZRRaN.js +207 -0
  116. package/dist/send-Bxc0XfGE.js +722 -0
  117. package/dist/service-map.d.ts +85 -0
  118. package/dist/subscriptions-DEXYtMXg.js +67 -0
  119. package/dist/templates-DZomxsG7.js +2289 -0
  120. package/dist/unsubscribe-groups-Iqk4Isf9.js +291 -0
  121. package/dist/webhooks-CPXuu8Xf.js +530 -0
  122. package/dist/whoami-Ccz0jwlt.js +59 -0
  123. package/package.json +13 -3
  124. package/dist/categories-DV51kr2H.js +0 -187
  125. package/dist/client-BMUew5Wp.js +0 -13794
  126. package/dist/effect/generated.d.ts +0 -64004
  127. package/dist/mailboxes-Thp5z0oX.js +0 -161
@@ -0,0 +1,3250 @@
1
+ import type * as EffectBrand from "effect/Brand";
2
+ import { HttpApiMiddleware, HttpApiSecurity } from "effect/http-api";
3
+ import * as Schema from "effect/Schema";
4
+ import { AbsoluteInstant as __SamvaRuntimeAbsoluteInstant, SensitiveString as __SamvaRuntimeSensitiveString } from "../runtime";
5
+ export type JsonValue = string | number | boolean | null | ReadonlyArray<JsonValue> | {
6
+ readonly [x: string]: JsonValue;
7
+ };
8
+ export declare const JsonValue: Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>;
9
+ declare const AnalyticsQueryError_base: Schema.Class<AnalyticsQueryError, Schema.Struct<{
10
+ readonly _tag: Schema.tag<"AnalyticsQueryError">;
11
+ readonly message: Schema.String;
12
+ }>, import("effect/Cause").YieldableError>;
13
+ export declare class AnalyticsQueryError extends AnalyticsQueryError_base {
14
+ }
15
+ declare const UnauthorizedError_base: Schema.Class<UnauthorizedError, Schema.Struct<{
16
+ readonly _tag: Schema.tag<"UnauthorizedError">;
17
+ readonly message: Schema.String;
18
+ }>, import("effect/Cause").YieldableError>;
19
+ export declare class UnauthorizedError extends UnauthorizedError_base {
20
+ }
21
+ declare const ForbiddenError_base: Schema.Class<ForbiddenError, Schema.Struct<{
22
+ readonly _tag: Schema.tag<"ForbiddenError">;
23
+ readonly message: Schema.String;
24
+ }>, import("effect/Cause").YieldableError>;
25
+ export declare class ForbiddenError extends ForbiddenError_base {
26
+ }
27
+ declare const ValidationError_base: Schema.Class<ValidationError, Schema.Struct<{
28
+ readonly _tag: Schema.tag<"ValidationError">;
29
+ readonly message: Schema.String;
30
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
31
+ }>, import("effect/Cause").YieldableError>;
32
+ export declare class ValidationError extends ValidationError_base {
33
+ }
34
+ declare const InternalError_base: Schema.Class<InternalError, Schema.Struct<{
35
+ readonly _tag: Schema.tag<"InternalError">;
36
+ readonly message: Schema.String;
37
+ }>, import("effect/Cause").YieldableError>;
38
+ export declare class InternalError extends InternalError_base {
39
+ }
40
+ declare const GatewayTimeoutError_base: Schema.Class<GatewayTimeoutError, Schema.Struct<{
41
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
42
+ readonly message: Schema.String;
43
+ readonly retryAfterSeconds: Schema.Finite;
44
+ }>, import("effect/Cause").YieldableError>;
45
+ export declare class GatewayTimeoutError extends GatewayTimeoutError_base {
46
+ }
47
+ export type Cursor = string;
48
+ export declare const Cursor: Schema.String;
49
+ export type ApiKeyResourceAccess = {
50
+ readonly messages?: "read" | "write" | null;
51
+ readonly email?: "read" | "write" | null;
52
+ readonly domains?: "read" | "write" | null;
53
+ readonly phoneNumbers?: "read" | "write" | null;
54
+ readonly contacts?: "read" | "write" | null;
55
+ readonly conversations?: "read" | "write" | null;
56
+ readonly templates?: "read" | "write" | null;
57
+ readonly webhooks?: "read" | "write" | null;
58
+ readonly apiKeys?: "read" | "write" | null;
59
+ readonly organization?: "read" | "write" | null;
60
+ readonly billing?: "read" | "write" | null;
61
+ readonly analytics?: "read" | "write" | null;
62
+ };
63
+ export declare const ApiKeyResourceAccess: Schema.Struct<{
64
+ readonly messages: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
65
+ readonly email: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
66
+ readonly domains: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
67
+ readonly phoneNumbers: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
68
+ readonly contacts: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
69
+ readonly conversations: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
70
+ readonly templates: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
71
+ readonly webhooks: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
72
+ readonly apiKeys: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
73
+ readonly organization: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
74
+ readonly billing: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
75
+ readonly analytics: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
76
+ }>;
77
+ export type MailboxId = string & EffectBrand.Brand<"MailboxId">;
78
+ export declare const MailboxId: Schema.brand<Schema.String, "MailboxId">;
79
+ export type MailboxSendMode = "send" | "approval";
80
+ export declare const MailboxSendMode: Schema.Union<readonly [Schema.Literal<"send">, Schema.Literal<"approval">]>;
81
+ export type NamespaceId = string & EffectBrand.Brand<"NamespaceId">;
82
+ export declare const NamespaceId: Schema.brand<Schema.String, "NamespaceId">;
83
+ declare const PaymentRequiredError_base: Schema.Class<PaymentRequiredError, Schema.Struct<{
84
+ readonly _tag: Schema.tag<"PaymentRequiredError">;
85
+ readonly message: Schema.String;
86
+ readonly resource: Schema.String;
87
+ readonly currentUsage: Schema.Finite;
88
+ readonly limit: Schema.Finite;
89
+ }>, import("effect/Cause").YieldableError>;
90
+ export declare class PaymentRequiredError extends PaymentRequiredError_base {
91
+ }
92
+ declare const ResourceNotFoundError_base: Schema.Class<ResourceNotFoundError, Schema.Struct<{
93
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
94
+ readonly resource: Schema.String;
95
+ readonly id: Schema.String;
96
+ readonly message: Schema.String;
97
+ }>, import("effect/Cause").YieldableError>;
98
+ export declare class ResourceNotFoundError extends ResourceNotFoundError_base {
99
+ }
100
+ declare const RateLimitedError_base: Schema.Class<RateLimitedError, Schema.Struct<{
101
+ readonly _tag: Schema.tag<"RateLimitedError">;
102
+ readonly message: Schema.String;
103
+ readonly retryAfterSeconds: Schema.Finite;
104
+ }>, import("effect/Cause").YieldableError>;
105
+ export declare class RateLimitedError extends RateLimitedError_base {
106
+ }
107
+ declare const BillingProviderError_base: Schema.Class<BillingProviderError, Schema.Struct<{
108
+ readonly _tag: Schema.tag<"BillingProviderError">;
109
+ readonly message: Schema.String;
110
+ }>, import("effect/Cause").YieldableError>;
111
+ export declare class BillingProviderError extends BillingProviderError_base {
112
+ }
113
+ export type ApiKeyId = string & EffectBrand.Brand<"ApiKeyId">;
114
+ export declare const ApiKeyId: Schema.brand<Schema.String, "ApiKeyId">;
115
+ export type SuccessResponse = {
116
+ readonly success: boolean;
117
+ };
118
+ export declare const SuccessResponse: Schema.Struct<{
119
+ readonly success: Schema.Boolean;
120
+ }>;
121
+ export type MessageId = string & EffectBrand.Brand<"MessageId">;
122
+ export declare const MessageId: Schema.brand<Schema.String, "MessageId">;
123
+ export type AttachmentId = string & EffectBrand.Brand<"AttachmentId">;
124
+ export declare const AttachmentId: Schema.brand<Schema.String, "AttachmentId">;
125
+ export type OrganizationId = string & EffectBrand.Brand<"OrganizationId">;
126
+ export declare const OrganizationId: Schema.brand<Schema.String, "OrganizationId">;
127
+ export type BrandAssets = {
128
+ readonly logoUrl?: string | null;
129
+ readonly logoDarkUrl?: string | null;
130
+ readonly iconUrl?: string | null;
131
+ };
132
+ export declare const BrandAssets: Schema.Struct<{
133
+ readonly logoUrl: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
134
+ readonly logoDarkUrl: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
135
+ readonly iconUrl: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
136
+ }>;
137
+ export type BrandAddress = {
138
+ readonly street1: string;
139
+ readonly street2?: string | null;
140
+ readonly city: string;
141
+ readonly region: string;
142
+ readonly postalCode: string;
143
+ readonly country: string;
144
+ };
145
+ export declare const BrandAddress: Schema.Struct<{
146
+ readonly street1: Schema.String;
147
+ readonly street2: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
148
+ readonly city: Schema.String;
149
+ readonly region: Schema.String;
150
+ readonly postalCode: Schema.String;
151
+ readonly country: Schema.String;
152
+ }>;
153
+ export type BrandSocialLink = {
154
+ readonly label: string;
155
+ readonly url: string;
156
+ };
157
+ export declare const BrandSocialLink: Schema.Struct<{
158
+ readonly label: Schema.String;
159
+ readonly url: Schema.String;
160
+ }>;
161
+ declare const ConflictError_base: Schema.Class<ConflictError, Schema.Struct<{
162
+ readonly _tag: Schema.tag<"ConflictError">;
163
+ readonly message: Schema.String;
164
+ readonly resource: Schema.String;
165
+ readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
166
+ }>, import("effect/Cause").YieldableError>;
167
+ export declare class ConflictError extends ConflictError_base {
168
+ }
169
+ export type MediaId = string & EffectBrand.Brand<"MediaId">;
170
+ export declare const MediaId: Schema.brand<Schema.String, "MediaId">;
171
+ export type TemplatePublicationId = string & EffectBrand.Brand<"TemplatePublicationId">;
172
+ export declare const TemplatePublicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
173
+ export type TemplateInputContractId = string & EffectBrand.Brand<"TemplateInputContractId">;
174
+ export declare const TemplateInputContractId: Schema.brand<Schema.String, "TemplateInputContractId">;
175
+ export type TemplateId = string & EffectBrand.Brand<"TemplateId">;
176
+ export declare const TemplateId: Schema.brand<Schema.String, "TemplateId">;
177
+ export type JsonObject = {
178
+ readonly [x: string]: JsonValue;
179
+ };
180
+ export declare const JsonObject: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>;
181
+ export type RenderLocale = string;
182
+ export declare const RenderLocale: Schema.String;
183
+ export type RenderTimeZone = string;
184
+ export declare const RenderTimeZone: Schema.String;
185
+ export type ReplyToAddresses = ReadonlyArray<string> | null | null;
186
+ export declare const ReplyToAddresses: Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>;
187
+ export type UnsubscribeId = string & EffectBrand.Brand<"UnsubscribeId">;
188
+ export declare const UnsubscribeId: Schema.brand<Schema.String, "UnsubscribeId">;
189
+ export type EmailTrackingOverrideV1 = {
190
+ readonly opens?: boolean;
191
+ readonly clicks?: boolean;
192
+ };
193
+ export declare const EmailTrackingOverrideV1: Schema.Struct<{
194
+ readonly opens: Schema.optionalKey<Schema.Boolean>;
195
+ readonly clicks: Schema.optionalKey<Schema.Boolean>;
196
+ }>;
197
+ export type EmailFooterOverride = {
198
+ readonly enabled?: boolean | null;
199
+ };
200
+ export declare const EmailFooterOverride: Schema.Struct<{
201
+ readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
202
+ }>;
203
+ export type ConversationId = string & EffectBrand.Brand<"ConversationId">;
204
+ export declare const ConversationId: Schema.brand<Schema.String, "ConversationId">;
205
+ export type ContactId = string & EffectBrand.Brand<"ContactId">;
206
+ export declare const ContactId: Schema.brand<Schema.String, "ContactId">;
207
+ export type ContactGroupId = string & EffectBrand.Brand<"ContactGroupId">;
208
+ export declare const ContactGroupId: Schema.brand<Schema.String, "ContactGroupId">;
209
+ export type SendsSeries = ReadonlyArray<number>;
210
+ export declare const SendsSeries: Schema.$Array<Schema.Finite>;
211
+ declare const FlagDisabledError_base: Schema.Class<FlagDisabledError, Schema.Struct<{
212
+ readonly _tag: Schema.tag<"FlagDisabledError">;
213
+ readonly flag: Schema.String;
214
+ readonly message: Schema.String;
215
+ }>, import("effect/Cause").YieldableError>;
216
+ export declare class FlagDisabledError extends FlagDisabledError_base {
217
+ }
218
+ export type EmailDomainId = string & EffectBrand.Brand<"EmailDomainId">;
219
+ export declare const EmailDomainId: Schema.brand<Schema.String, "EmailDomainId">;
220
+ declare const BrandAddressRequiredError_base: Schema.Class<BrandAddressRequiredError, Schema.Struct<{
221
+ readonly _tag: Schema.tag<"BrandAddressRequiredError">;
222
+ readonly message: Schema.String;
223
+ readonly brand: Schema.Union<readonly [Schema.String, Schema.Null]>;
224
+ }>, import("effect/Cause").YieldableError>;
225
+ export declare class BrandAddressRequiredError extends BrandAddressRequiredError_base {
226
+ }
227
+ declare const CampaignFooterRequiredError_base: Schema.Class<CampaignFooterRequiredError, Schema.Struct<{
228
+ readonly _tag: Schema.tag<"CampaignFooterRequiredError">;
229
+ readonly message: Schema.String;
230
+ }>, import("effect/Cause").YieldableError>;
231
+ export declare class CampaignFooterRequiredError extends CampaignFooterRequiredError_base {
232
+ }
233
+ declare const ExternalServiceError_base: Schema.Class<ExternalServiceError, Schema.Struct<{
234
+ readonly _tag: Schema.tag<"ExternalServiceError">;
235
+ readonly message: Schema.String;
236
+ }>, import("effect/Cause").YieldableError>;
237
+ export declare class ExternalServiceError extends ExternalServiceError_base {
238
+ }
239
+ declare const SenderNotReadyError_base: Schema.Class<SenderNotReadyError, Schema.Struct<{
240
+ readonly _tag: Schema.tag<"SenderNotReadyError">;
241
+ readonly message: Schema.String;
242
+ readonly sender: Schema.String;
243
+ readonly retryAfterSeconds: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
244
+ }>, import("effect/Cause").YieldableError>;
245
+ export declare class SenderNotReadyError extends SenderNotReadyError_base {
246
+ }
247
+ export type ContactIdentityId = string & EffectBrand.Brand<"ContactIdentityId">;
248
+ export declare const ContactIdentityId: Schema.brand<Schema.String, "ContactIdentityId">;
249
+ export type WebhookEndpointId = string & EffectBrand.Brand<"WebhookEndpointId">;
250
+ export declare const WebhookEndpointId: Schema.brand<Schema.String, "WebhookEndpointId">;
251
+ declare const EmailChannelError_base: Schema.Class<EmailChannelError, Schema.Struct<{
252
+ readonly _tag: Schema.tag<"EmailChannelError">;
253
+ readonly reason: Schema.Union<readonly [Schema.Literal<"transport">, Schema.Literal<"rejected">, Schema.Literal<"rate_limited">, Schema.Literal<"auth">]>;
254
+ readonly message: Schema.String;
255
+ readonly statusCode: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
256
+ }>, import("effect/Cause").YieldableError>;
257
+ export declare class EmailChannelError extends EmailChannelError_base {
258
+ }
259
+ export type OperationId = string & EffectBrand.Brand<"OperationId">;
260
+ export declare const OperationId: Schema.brand<Schema.String, "OperationId">;
261
+ export type EmailSenderId = string & EffectBrand.Brand<"EmailSenderId">;
262
+ export declare const EmailSenderId: Schema.brand<Schema.String, "EmailSenderId">;
263
+ export type ExtensionId = string & EffectBrand.Brand<"ExtensionId">;
264
+ export declare const ExtensionId: Schema.brand<Schema.String, "ExtensionId">;
265
+ export type ExtensionVersionId = string & EffectBrand.Brand<"ExtensionVersionId">;
266
+ export declare const ExtensionVersionId: Schema.brand<Schema.String, "ExtensionVersionId">;
267
+ export type UserId = string & EffectBrand.Brand<"UserId">;
268
+ export declare const UserId: Schema.brand<Schema.String, "UserId">;
269
+ export type FeedbackContext = {
270
+ readonly operation?: string | null;
271
+ readonly resourceId?: string | null;
272
+ };
273
+ export declare const FeedbackContext: Schema.Struct<{
274
+ readonly operation: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
275
+ readonly resourceId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
276
+ }>;
277
+ export type JourneyName = string;
278
+ export declare const JourneyName: Schema.String;
279
+ export type JourneyCustomEventName = string;
280
+ export declare const JourneyCustomEventName: Schema.String;
281
+ export type JourneyContactCreatedTrigger = {
282
+ readonly type: "contact.created";
283
+ };
284
+ export declare const JourneyContactCreatedTrigger: Schema.Struct<{
285
+ readonly type: Schema.Literal<"contact.created">;
286
+ }>;
287
+ export type JourneyTagAddedTrigger = {
288
+ readonly type: "contact.tag_added";
289
+ readonly tag: string;
290
+ };
291
+ export declare const JourneyTagAddedTrigger: Schema.Struct<{
292
+ readonly type: Schema.Literal<"contact.tag_added">;
293
+ readonly tag: Schema.String;
294
+ }>;
295
+ export type JourneyNodeId = string;
296
+ export declare const JourneyNodeId: Schema.String;
297
+ export type JourneyWaitConfig = {
298
+ readonly durationSeconds: number;
299
+ };
300
+ export declare const JourneyWaitConfig: Schema.Struct<{
301
+ readonly durationSeconds: Schema.Finite;
302
+ }>;
303
+ export type JourneyEmptyConfig = {
304
+ readonly [x: string]: never;
305
+ };
306
+ export declare const JourneyEmptyConfig: Schema.$Record<Schema.String, Schema.Never>;
307
+ export type JourneyTagPredicate = {
308
+ readonly type: "tag";
309
+ readonly tag: string;
310
+ readonly present: boolean;
311
+ };
312
+ export declare const JourneyTagPredicate: Schema.Struct<{
313
+ readonly type: Schema.Literal<"tag">;
314
+ readonly tag: Schema.String;
315
+ readonly present: Schema.Boolean;
316
+ }>;
317
+ export type JourneyContactProperty = "name" | "displayName" | "externalId" | "status" | "profile.firstName" | "profile.lastName" | "profile.company" | "profile.jobTitle" | "profile.source" | "profile.location.country" | "profile.location.state" | "profile.location.city" | "profile.location.timezone";
318
+ export declare const JourneyContactProperty: Schema.Union<readonly [Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"status">, Schema.Literal<"profile.firstName">, Schema.Literal<"profile.lastName">, Schema.Literal<"profile.company">, Schema.Literal<"profile.jobTitle">, Schema.Literal<"profile.source">, Schema.Literal<"profile.location.country">, Schema.Literal<"profile.location.state">, Schema.Literal<"profile.location.city">, Schema.Literal<"profile.location.timezone">]>;
319
+ export type JourneyEqualityComparison = {
320
+ readonly operator: "eq" | "neq";
321
+ readonly value: string | number | boolean | null;
322
+ };
323
+ export declare const JourneyEqualityComparison: Schema.Struct<{
324
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
325
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
326
+ }>;
327
+ export type JourneyNumericComparison = {
328
+ readonly operator: "gt" | "gte" | "lt" | "lte";
329
+ readonly value: number;
330
+ };
331
+ export declare const JourneyNumericComparison: Schema.Struct<{
332
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
333
+ readonly value: Schema.Finite;
334
+ }>;
335
+ export type JourneyStringComparison = {
336
+ readonly operator: "contains" | "not_contains" | "starts_with" | "ends_with";
337
+ readonly value: string;
338
+ };
339
+ export declare const JourneyStringComparison: Schema.Struct<{
340
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
341
+ readonly value: Schema.String;
342
+ }>;
343
+ export type JourneyPresenceComparison = {
344
+ readonly operator: "exists" | "not_exists";
345
+ };
346
+ export declare const JourneyPresenceComparison: Schema.Struct<{
347
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
348
+ }>;
349
+ export type JourneyUpdateTagsConfig = {
350
+ readonly add: ReadonlyArray<string>;
351
+ readonly remove: ReadonlyArray<string>;
352
+ };
353
+ export declare const JourneyUpdateTagsConfig: Schema.Struct<{
354
+ readonly add: Schema.$Array<Schema.String>;
355
+ readonly remove: Schema.$Array<Schema.String>;
356
+ }>;
357
+ export type MailboxChannel = "email";
358
+ export declare const MailboxChannel: Schema.Literal<"email">;
359
+ export type MailboxMetadata = {
360
+ readonly [x: string]: string;
361
+ };
362
+ export declare const MailboxMetadata: Schema.$Record<Schema.String, Schema.String>;
363
+ export type MailboxEndpointId = string & EffectBrand.Brand<"MailboxEndpointId">;
364
+ export declare const MailboxEndpointId: Schema.brand<Schema.String, "MailboxEndpointId">;
365
+ declare const MailboxChannelUnsupportedError_base: Schema.Class<MailboxChannelUnsupportedError, Schema.Struct<{
366
+ readonly _tag: Schema.tag<"MailboxChannelUnsupportedError">;
367
+ readonly message: Schema.String;
368
+ readonly channel: Schema.String;
369
+ }>, import("effect/Cause").YieldableError>;
370
+ export declare class MailboxChannelUnsupportedError extends MailboxChannelUnsupportedError_base {
371
+ }
372
+ export type MailboxMetadataPatch = {
373
+ readonly [x: string]: string | null;
374
+ };
375
+ export declare const MailboxMetadataPatch: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Null]>>;
376
+ export type MailboxThreadId = string & EffectBrand.Brand<"MailboxThreadId">;
377
+ export declare const MailboxThreadId: Schema.brand<Schema.String, "MailboxThreadId">;
378
+ export type MailboxActionId = string & EffectBrand.Brand<"MailboxActionId">;
379
+ export declare const MailboxActionId: Schema.brand<Schema.String, "MailboxActionId">;
380
+ export type MailboxDraftId = string & EffectBrand.Brand<"MailboxDraftId">;
381
+ export declare const MailboxDraftId: Schema.brand<Schema.String, "MailboxDraftId">;
382
+ export type MailboxPolicyId = string & EffectBrand.Brand<"MailboxPolicyId">;
383
+ export declare const MailboxPolicyId: Schema.brand<Schema.String, "MailboxPolicyId">;
384
+ export type MailboxSendError = {
385
+ readonly _tag: "SenderNotReadyError";
386
+ readonly message: string;
387
+ readonly sender: string;
388
+ readonly retryAfterSeconds?: number | null;
389
+ } | {
390
+ readonly _tag: "RateLimitedError";
391
+ readonly message: string;
392
+ readonly retryAfterSeconds: number;
393
+ } | {
394
+ readonly _tag: "OnboardingReviewRequiredError";
395
+ readonly message: string;
396
+ readonly code: "review_required" | "review_in_progress" | "information_required" | "review_rejected" | "identity_review_required" | "identity_review_rejected" | "identity_changed";
397
+ readonly decision: "undecided" | "approved" | "rejected";
398
+ readonly stage: "collecting" | "automated_review" | "manual_review" | "information_requested" | "complete";
399
+ readonly nextAction: "wait_for_review" | "provide_information" | "verify_sending_identity" | "reapply" | "contact_support";
400
+ readonly identityId?: string | null;
401
+ } | {
402
+ readonly _tag: "PaymentRequiredError";
403
+ readonly message: string;
404
+ readonly resource: string;
405
+ readonly currentUsage: number;
406
+ readonly limit: number;
407
+ } | {
408
+ readonly _tag: "ValidationError";
409
+ readonly message: string;
410
+ readonly fields?: {
411
+ readonly [x: string]: ReadonlyArray<string>;
412
+ } | null;
413
+ } | {
414
+ readonly _tag: "ForbiddenError";
415
+ readonly message: string;
416
+ } | {
417
+ readonly _tag: "ResourceNotFoundError";
418
+ readonly resource: string;
419
+ readonly id: string;
420
+ readonly message: string;
421
+ };
422
+ export declare const MailboxSendError: Schema.Union<readonly [Schema.Struct<{
423
+ readonly _tag: Schema.Literal<"SenderNotReadyError">;
424
+ readonly message: Schema.String;
425
+ readonly sender: Schema.String;
426
+ readonly retryAfterSeconds: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
427
+ }>, Schema.Struct<{
428
+ readonly _tag: Schema.Literal<"RateLimitedError">;
429
+ readonly message: Schema.String;
430
+ readonly retryAfterSeconds: Schema.Finite;
431
+ }>, Schema.Struct<{
432
+ readonly _tag: Schema.Literal<"OnboardingReviewRequiredError">;
433
+ readonly message: Schema.String;
434
+ readonly code: Schema.Union<readonly [Schema.Literal<"review_required">, Schema.Literal<"review_in_progress">, Schema.Literal<"information_required">, Schema.Literal<"review_rejected">, Schema.Literal<"identity_review_required">, Schema.Literal<"identity_review_rejected">, Schema.Literal<"identity_changed">]>;
435
+ readonly decision: Schema.Union<readonly [Schema.Literal<"undecided">, Schema.Literal<"approved">, Schema.Literal<"rejected">]>;
436
+ readonly stage: Schema.Union<readonly [Schema.Literal<"collecting">, Schema.Literal<"automated_review">, Schema.Literal<"manual_review">, Schema.Literal<"information_requested">, Schema.Literal<"complete">]>;
437
+ readonly nextAction: Schema.Union<readonly [Schema.Literal<"wait_for_review">, Schema.Literal<"provide_information">, Schema.Literal<"verify_sending_identity">, Schema.Literal<"reapply">, Schema.Literal<"contact_support">]>;
438
+ readonly identityId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
439
+ }>, Schema.Struct<{
440
+ readonly _tag: Schema.Literal<"PaymentRequiredError">;
441
+ readonly message: Schema.String;
442
+ readonly resource: Schema.String;
443
+ readonly currentUsage: Schema.Finite;
444
+ readonly limit: Schema.Finite;
445
+ }>, Schema.Struct<{
446
+ readonly _tag: Schema.Literal<"ValidationError">;
447
+ readonly message: Schema.String;
448
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
449
+ }>, Schema.Struct<{
450
+ readonly _tag: Schema.Literal<"ForbiddenError">;
451
+ readonly message: Schema.String;
452
+ }>, Schema.Struct<{
453
+ readonly _tag: Schema.Literal<"ResourceNotFoundError">;
454
+ readonly resource: Schema.String;
455
+ readonly id: Schema.String;
456
+ readonly message: Schema.String;
457
+ }>]>;
458
+ declare const OnboardingReviewRequiredError_base: Schema.Class<OnboardingReviewRequiredError, Schema.Struct<{
459
+ readonly _tag: Schema.tag<"OnboardingReviewRequiredError">;
460
+ readonly message: Schema.String;
461
+ readonly code: Schema.Union<readonly [Schema.Literal<"review_required">, Schema.Literal<"review_in_progress">, Schema.Literal<"information_required">, Schema.Literal<"review_rejected">, Schema.Literal<"identity_review_required">, Schema.Literal<"identity_review_rejected">, Schema.Literal<"identity_changed">]>;
462
+ readonly decision: Schema.Union<readonly [Schema.Literal<"undecided">, Schema.Literal<"approved">, Schema.Literal<"rejected">]>;
463
+ readonly stage: Schema.Union<readonly [Schema.Literal<"collecting">, Schema.Literal<"automated_review">, Schema.Literal<"manual_review">, Schema.Literal<"information_requested">, Schema.Literal<"complete">]>;
464
+ readonly nextAction: Schema.Union<readonly [Schema.Literal<"wait_for_review">, Schema.Literal<"provide_information">, Schema.Literal<"verify_sending_identity">, Schema.Literal<"reapply">, Schema.Literal<"contact_support">]>;
465
+ readonly identityId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
466
+ }>, import("effect/Cause").YieldableError>;
467
+ export declare class OnboardingReviewRequiredError extends OnboardingReviewRequiredError_base {
468
+ }
469
+ export type MailboxThreadFolder = "inbox" | "assigned" | "pending" | "sent" | "archived" | "trash";
470
+ export declare const MailboxThreadFolder: Schema.Union<readonly [Schema.Literal<"inbox">, Schema.Literal<"assigned">, Schema.Literal<"pending">, Schema.Literal<"sent">, Schema.Literal<"archived">, Schema.Literal<"trash">]>;
471
+ export type MailboxGrantRole = "admin" | "collaborator" | "viewer";
472
+ export declare const MailboxGrantRole: Schema.Union<readonly [Schema.Literal<"admin">, Schema.Literal<"collaborator">, Schema.Literal<"viewer">]>;
473
+ export type MailboxLabelId = string & EffectBrand.Brand<"MailboxLabelId">;
474
+ export declare const MailboxLabelId: Schema.brand<Schema.String, "MailboxLabelId">;
475
+ export type MailboxPolicyOutcomeKind = "requireApproval" | "deny";
476
+ export declare const MailboxPolicyOutcomeKind: Schema.Union<readonly [Schema.Literal<"requireApproval">, Schema.Literal<"deny">]>;
477
+ export type MailboxThreadPriority = "low" | "normal" | "high" | "urgent";
478
+ export declare const MailboxThreadPriority: Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"normal">, Schema.Literal<"high">, Schema.Literal<"urgent">]>;
479
+ export type MessageMetadata = {
480
+ readonly [x: string]: JsonValue;
481
+ } | null;
482
+ export declare const MessageMetadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
483
+ export type EmailSender = {
484
+ readonly email: string;
485
+ readonly name?: string | null;
486
+ } | null;
487
+ export declare const EmailSender: Schema.Union<readonly [Schema.Struct<{
488
+ readonly email: Schema.String;
489
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
490
+ }>, Schema.Null]>;
491
+ declare const DeliveryUnavailableError_base: Schema.Class<DeliveryUnavailableError, Schema.Struct<{
492
+ readonly _tag: Schema.tag<"DeliveryUnavailableError">;
493
+ readonly message: Schema.String;
494
+ readonly retryAfterSeconds: Schema.Finite;
495
+ }>, import("effect/Cause").YieldableError>;
496
+ export declare class DeliveryUnavailableError extends DeliveryUnavailableError_base {
497
+ }
498
+ export type IanaTimezone = string;
499
+ export declare const IanaTimezone: Schema.String;
500
+ export type NamespaceMetadata = {
501
+ readonly [x: string]: string;
502
+ };
503
+ export declare const NamespaceMetadata: Schema.$Record<Schema.String, Schema.String>;
504
+ export type OperationResource = {
505
+ readonly type: string;
506
+ readonly id: string;
507
+ };
508
+ export declare const OperationResource: Schema.Struct<{
509
+ readonly type: Schema.String;
510
+ readonly id: Schema.String;
511
+ }>;
512
+ export type TemplateFromDefault = {
513
+ readonly email: string;
514
+ readonly name?: string | null;
515
+ };
516
+ export declare const TemplateFromDefault: Schema.Struct<{
517
+ readonly email: Schema.String;
518
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
519
+ }>;
520
+ export type AddTemplateEntryPayload = {
521
+ readonly entryPath: string;
522
+ readonly name: string;
523
+ readonly slug: string;
524
+ readonly description?: string | null | null;
525
+ readonly category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | null;
526
+ };
527
+ export declare const AddTemplateEntryPayload: Schema.Struct<{
528
+ readonly entryPath: Schema.String;
529
+ readonly name: Schema.String;
530
+ readonly slug: Schema.String;
531
+ readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
532
+ readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"marketing">, Schema.Literal<"support">, Schema.Literal<"notification">, Schema.Literal<"verification">, Schema.Literal<"reminder">, Schema.Literal<"alert">]>, Schema.Null]>, Schema.Null]>>;
533
+ }>;
534
+ export type ContactTags = {
535
+ readonly tags: readonly [string, ...Array<string>];
536
+ };
537
+ export declare const ContactTags: Schema.Struct<{
538
+ readonly tags: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.String]>, readonly [Schema.String]>;
539
+ }>;
540
+ export type ConversationCategories = {
541
+ readonly categories: readonly [string, ...Array<string>];
542
+ };
543
+ export declare const ConversationCategories: Schema.Struct<{
544
+ readonly categories: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.String]>, readonly [Schema.String]>;
545
+ }>;
546
+ export type ConversationChannels = {
547
+ readonly channels: readonly ["email", ...Array<"email">];
548
+ };
549
+ export declare const ConversationChannels: Schema.Struct<{
550
+ readonly channels: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Literal<"email">]>, readonly [Schema.Literal<"email">]>;
551
+ }>;
552
+ export type ConversationTags = {
553
+ readonly tags: readonly [string, ...Array<string>];
554
+ };
555
+ export declare const ConversationTags: Schema.Struct<{
556
+ readonly tags: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.String]>, readonly [Schema.String]>;
557
+ }>;
558
+ export type CreateDomainWarmingPlanPayload = {
559
+ readonly identity: "new" | "migrating" | "returning";
560
+ readonly initialDailyRecipients: number;
561
+ readonly dailyGrowthPercent: number;
562
+ readonly targetDailyRecipients: number;
563
+ };
564
+ export declare const CreateDomainWarmingPlanPayload: Schema.Struct<{
565
+ readonly identity: Schema.Union<readonly [Schema.Literal<"new">, Schema.Literal<"migrating">, Schema.Literal<"returning">]>;
566
+ readonly initialDailyRecipients: Schema.Finite;
567
+ readonly dailyGrowthPercent: Schema.Finite;
568
+ readonly targetDailyRecipients: Schema.Finite;
569
+ }>;
570
+ export type CreateMailboxLabelPayload = {
571
+ readonly slug: string;
572
+ readonly displayName: string;
573
+ readonly color?: "billing" | "domain" | "agent" | "routing" | "important" | "neutral" | null | null;
574
+ };
575
+ export declare const CreateMailboxLabelPayload: Schema.Struct<{
576
+ readonly slug: Schema.String;
577
+ readonly displayName: Schema.String;
578
+ readonly color: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"billing">, Schema.Literal<"domain">, Schema.Literal<"agent">, Schema.Literal<"routing">, Schema.Literal<"important">, Schema.Literal<"neutral">]>, Schema.Null]>, Schema.Null]>>;
579
+ }>;
580
+ export type CreateMailboxNotePayload = {
581
+ readonly body: string;
582
+ readonly color?: string | null | null;
583
+ readonly pinned?: boolean | null;
584
+ };
585
+ export declare const CreateMailboxNotePayload: Schema.Struct<{
586
+ readonly body: Schema.String;
587
+ readonly color: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
588
+ readonly pinned: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
589
+ }>;
590
+ export type CreateMediaPayload = {
591
+ readonly filename: string;
592
+ readonly contentType: string;
593
+ readonly sizeBytes: number;
594
+ readonly purpose: "attachment" | "avatar" | "review_evidence";
595
+ readonly checksumSha256?: string | null;
596
+ };
597
+ export declare const CreateMediaPayload: Schema.Struct<{
598
+ readonly filename: Schema.String;
599
+ readonly contentType: Schema.String;
600
+ readonly sizeBytes: Schema.Finite;
601
+ readonly purpose: Schema.Union<readonly [Schema.Literal<"attachment">, Schema.Literal<"avatar">, Schema.Literal<"review_evidence">]>;
602
+ readonly checksumSha256: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
603
+ }>;
604
+ export type CreateTemplatePayload = {
605
+ readonly name: string;
606
+ readonly projectName?: string | null;
607
+ readonly slug?: string | null;
608
+ readonly galleryTemplateId?: string | null;
609
+ readonly useBrand?: boolean | null;
610
+ readonly description?: string | null | null;
611
+ readonly category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | null;
612
+ readonly isActive?: boolean | null;
613
+ readonly idempotencyKey: string;
614
+ };
615
+ export declare const CreateTemplatePayload: Schema.Struct<{
616
+ readonly name: Schema.String;
617
+ readonly projectName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
618
+ readonly slug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
619
+ readonly galleryTemplateId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
620
+ readonly useBrand: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
621
+ readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
622
+ readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"marketing">, Schema.Literal<"support">, Schema.Literal<"notification">, Schema.Literal<"verification">, Schema.Literal<"reminder">, Schema.Literal<"alert">]>, Schema.Null]>, Schema.Null]>>;
623
+ readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
624
+ readonly idempotencyKey: Schema.String;
625
+ }>;
626
+ export type DenyMailboxActionPayload = {
627
+ readonly reason: string;
628
+ };
629
+ export declare const DenyMailboxActionPayload: Schema.Struct<{
630
+ readonly reason: Schema.String;
631
+ }>;
632
+ export type DomainWarmingNotePayload = {
633
+ readonly note?: string | null;
634
+ };
635
+ export declare const DomainWarmingNotePayload: Schema.Struct<{
636
+ readonly note: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
637
+ }>;
638
+ export type PublishExtensionVersionPayload = {
639
+ readonly manifest: {
640
+ readonly name: string;
641
+ readonly displayName: string;
642
+ readonly description?: string | null;
643
+ readonly version: string;
644
+ readonly runtime: "hosted" | "webhook";
645
+ readonly events: ReadonlyArray<"mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
646
+ readonly permissions: ReadonlyArray<"read" | "update" | "send" | "quarantine.read">;
647
+ };
648
+ readonly bundle?: string | null;
649
+ };
650
+ export declare const PublishExtensionVersionPayload: Schema.Struct<{
651
+ readonly manifest: Schema.Struct<{
652
+ readonly name: Schema.String;
653
+ readonly displayName: Schema.String;
654
+ readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
655
+ readonly version: Schema.String;
656
+ readonly runtime: Schema.Union<readonly [Schema.Literal<"hosted">, Schema.Literal<"webhook">]>;
657
+ readonly events: Schema.$Array<Schema.Union<readonly [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">]>>;
658
+ readonly permissions: Schema.$Array<Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"update">, Schema.Literal<"send">, Schema.Literal<"quarantine.read">]>>;
659
+ }>;
660
+ readonly bundle: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
661
+ }>;
662
+ export type PublishJourneyPayload = {
663
+ readonly revision: string;
664
+ };
665
+ export declare const PublishJourneyPayload: Schema.Struct<{
666
+ readonly revision: Schema.String;
667
+ }>;
668
+ export type ReapplyOnboardingReviewInput = {
669
+ readonly expectedGeneration: number;
670
+ };
671
+ export declare const ReapplyOnboardingReviewInput: Schema.Struct<{
672
+ readonly expectedGeneration: Schema.Finite;
673
+ }>;
674
+ export type TemplateFamilyName = {
675
+ readonly name: string;
676
+ };
677
+ export declare const TemplateFamilyName: Schema.Struct<{
678
+ readonly name: Schema.String;
679
+ }>;
680
+ export type TestWebhookPayload = {
681
+ readonly data?: {
682
+ readonly [x: string]: JsonValue;
683
+ } | null;
684
+ };
685
+ export declare const TestWebhookPayload: Schema.Struct<{
686
+ readonly data: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
687
+ }>;
688
+ export type UpdateDomainWarmingPolicyPayload = {
689
+ readonly dailyGrowthPercent: number;
690
+ readonly targetDailyRecipients: number;
691
+ readonly note?: string | null;
692
+ };
693
+ export declare const UpdateDomainWarmingPolicyPayload: Schema.Struct<{
694
+ readonly dailyGrowthPercent: Schema.Finite;
695
+ readonly targetDailyRecipients: Schema.Finite;
696
+ readonly note: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
697
+ }>;
698
+ export type UpdateMailboxEndpointPayload = {
699
+ readonly displayName?: string | null | null;
700
+ readonly default?: true | null;
701
+ };
702
+ export declare const UpdateMailboxEndpointPayload: Schema.Struct<{
703
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
704
+ readonly default: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<true>, Schema.Null]>>;
705
+ }>;
706
+ export type UpdateMailboxLabelPayload = {
707
+ readonly displayName?: string | null;
708
+ readonly color?: "billing" | "domain" | "agent" | "routing" | "important" | "neutral" | null | null;
709
+ };
710
+ export declare const UpdateMailboxLabelPayload: Schema.Struct<{
711
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
712
+ readonly color: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"billing">, Schema.Literal<"domain">, Schema.Literal<"agent">, Schema.Literal<"routing">, Schema.Literal<"important">, Schema.Literal<"neutral">]>, Schema.Null]>, Schema.Null]>>;
713
+ }>;
714
+ export type UpdateMailboxNotePayload = {
715
+ readonly body?: string | null;
716
+ readonly color?: string | null | null;
717
+ readonly pinned?: boolean | null;
718
+ };
719
+ export declare const UpdateMailboxNotePayload: Schema.Struct<{
720
+ readonly body: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
721
+ readonly color: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
722
+ readonly pinned: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
723
+ }>;
724
+ export type UpdateNamespacePayload = {
725
+ readonly name?: string | null;
726
+ readonly metadata?: {
727
+ readonly [x: string]: string | null;
728
+ } | null;
729
+ };
730
+ export declare const UpdateNamespacePayload: Schema.Struct<{
731
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
732
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Null]>>, Schema.Null]>>;
733
+ }>;
734
+ export type ApiKeyMailboxAccess = {
735
+ readonly permissions: readonly [
736
+ "read" | "update" | "send" | "quarantine.read",
737
+ ...Array<"read" | "update" | "send" | "quarantine.read">
738
+ ];
739
+ readonly mailboxIds?: readonly [MailboxId, ...Array<MailboxId>] | null;
740
+ readonly sendMode?: MailboxSendMode | null;
741
+ };
742
+ export declare const ApiKeyMailboxAccess: Schema.Struct<{
743
+ readonly permissions: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"update">, Schema.Literal<"send">, Schema.Literal<"quarantine.read">]>]>, readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"update">, Schema.Literal<"send">, Schema.Literal<"quarantine.read">]>]>;
744
+ 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]>>;
745
+ readonly sendMode: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"send">, Schema.Literal<"approval">]>, Schema.Null]>>;
746
+ }>;
747
+ export type CreateWebhookPayload = {
748
+ readonly name: string;
749
+ readonly url: string;
750
+ 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">;
751
+ readonly channels?: ReadonlyArray<"email"> | null;
752
+ readonly mailboxIds?: readonly [MailboxId, ...Array<MailboxId>] | null;
753
+ readonly namespaceId?: NamespaceId | null;
754
+ readonly headers?: {
755
+ readonly [x: string]: string;
756
+ } | null;
757
+ readonly status?: "active" | "disabled" | null;
758
+ };
759
+ export declare const CreateWebhookPayload: Schema.Struct<{
760
+ readonly name: Schema.String;
761
+ readonly url: Schema.String;
762
+ 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">]>>;
763
+ readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>>;
764
+ 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]>>;
765
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
766
+ readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
767
+ readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>, Schema.Null]>>;
768
+ }>;
769
+ export type InstallExtensionPayload = {
770
+ readonly extension: string;
771
+ readonly version?: string | null;
772
+ readonly mailboxIds?: ReadonlyArray<MailboxId> | null;
773
+ readonly namespaceId?: NamespaceId | null;
774
+ readonly permissions?: ReadonlyArray<"read" | "update" | "send" | "quarantine.read"> | null;
775
+ readonly sendMode?: "send" | "approval" | null;
776
+ readonly webhookUrl?: string | null;
777
+ };
778
+ export declare const InstallExtensionPayload: Schema.Struct<{
779
+ readonly extension: Schema.String;
780
+ readonly version: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
781
+ readonly mailboxIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "MailboxId">>, Schema.Null]>>;
782
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
783
+ readonly permissions: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"update">, Schema.Literal<"send">, Schema.Literal<"quarantine.read">]>>, Schema.Null]>>;
784
+ readonly sendMode: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"send">, Schema.Literal<"approval">]>, Schema.Null]>>;
785
+ readonly webhookUrl: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
786
+ }>;
787
+ export type UpdateWebhookPayload = {
788
+ readonly name?: string | null;
789
+ readonly url?: string | null;
790
+ 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;
791
+ readonly channels?: ReadonlyArray<"email"> | null | null;
792
+ readonly mailboxIds?: readonly [MailboxId, ...Array<MailboxId>] | null | null;
793
+ readonly namespaceId?: NamespaceId | null | null;
794
+ readonly headers?: {
795
+ readonly [x: string]: string;
796
+ } | null;
797
+ readonly status?: "active" | "disabled" | null;
798
+ };
799
+ export declare const UpdateWebhookPayload: Schema.Struct<{
800
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
801
+ readonly url: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
802
+ 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]>>;
803
+ readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>, Schema.Null]>>;
804
+ 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]>>;
805
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>, Schema.Null]>>;
806
+ readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
807
+ readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>, Schema.Null]>>;
808
+ }>;
809
+ export type MessageSummary = {
810
+ readonly id: MessageId;
811
+ readonly channel: "email";
812
+ readonly direction: "outbound" | "inbound";
813
+ readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
814
+ readonly from: string | null;
815
+ readonly to: ReadonlyArray<string>;
816
+ readonly subject: string | null;
817
+ readonly waitReason: "rate" | "daily-quota" | "domain-health" | "sending-paused" | "upstream-unavailable" | "retry" | "campaign-paused" | "domain-warming" | "onboarding-review" | "content-review" | "screening-unavailable" | null;
818
+ readonly createdAt: string;
819
+ };
820
+ export declare const MessageSummary: Schema.Struct<{
821
+ readonly id: Schema.brand<Schema.String, "MessageId">;
822
+ readonly channel: Schema.Literal<"email">;
823
+ readonly direction: Schema.Union<readonly [Schema.Literal<"outbound">, Schema.Literal<"inbound">]>;
824
+ readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"scheduled">, Schema.Literal<"queued">, Schema.Literal<"processing">, Schema.Literal<"sent">, Schema.Literal<"delivered">, Schema.Literal<"read">, Schema.Literal<"failed">, Schema.Literal<"bounced">, Schema.Literal<"complained">]>;
825
+ readonly from: Schema.Union<readonly [Schema.String, Schema.Null]>;
826
+ readonly to: Schema.$Array<Schema.String>;
827
+ readonly subject: Schema.Union<readonly [Schema.String, Schema.Null]>;
828
+ readonly waitReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"rate">, Schema.Literal<"daily-quota">, Schema.Literal<"domain-health">, Schema.Literal<"sending-paused">, Schema.Literal<"upstream-unavailable">, Schema.Literal<"retry">, Schema.Literal<"campaign-paused">, Schema.Literal<"domain-warming">, Schema.Literal<"onboarding-review">, Schema.Literal<"content-review">, Schema.Literal<"screening-unavailable">]>, Schema.Null]>;
829
+ readonly createdAt: Schema.String;
830
+ }>;
831
+ export type BrandFooter = {
832
+ readonly companyName?: string | null;
833
+ readonly address?: BrandAddress | null;
834
+ readonly socialLinks?: ReadonlyArray<BrandSocialLink> | null;
835
+ };
836
+ export declare const BrandFooter: Schema.Struct<{
837
+ readonly companyName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
838
+ readonly address: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
839
+ readonly street1: Schema.String;
840
+ readonly street2: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
841
+ readonly city: Schema.String;
842
+ readonly region: Schema.String;
843
+ readonly postalCode: Schema.String;
844
+ readonly country: Schema.String;
845
+ }>, Schema.Null]>>;
846
+ readonly socialLinks: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
847
+ readonly label: Schema.String;
848
+ readonly url: Schema.String;
849
+ }>>, Schema.Null]>>;
850
+ }>;
851
+ export type EmailAttachment = {
852
+ readonly filename: string;
853
+ readonly content?: string | null;
854
+ readonly mediaId?: MediaId | null;
855
+ readonly contentType: string;
856
+ readonly size: number;
857
+ };
858
+ export declare const EmailAttachment: Schema.Struct<{
859
+ readonly filename: Schema.String;
860
+ readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
861
+ readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
862
+ readonly contentType: Schema.String;
863
+ readonly size: Schema.Finite;
864
+ }>;
865
+ export type RespondToOnboardingInformationRequestInput = {
866
+ readonly expectedGeneration: number;
867
+ readonly responseText: string;
868
+ readonly evidenceMediaIds: ReadonlyArray<MediaId>;
869
+ };
870
+ export declare const RespondToOnboardingInformationRequestInput: Schema.Struct<{
871
+ readonly expectedGeneration: Schema.Finite;
872
+ readonly responseText: Schema.String;
873
+ readonly evidenceMediaIds: Schema.$Array<Schema.brand<Schema.String, "MediaId">>;
874
+ }>;
875
+ export type TemplateData = JsonObject | null;
876
+ export declare const TemplateData: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
877
+ export type JourneyWebhookConfig = {
878
+ readonly data?: JsonObject;
879
+ };
880
+ export declare const JourneyWebhookConfig: Schema.Struct<{
881
+ readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
882
+ }>;
883
+ export type RenderTemplatePublicationPayload = {
884
+ readonly data: {
885
+ readonly [x: string]: JsonValue;
886
+ };
887
+ readonly locale?: RenderLocale;
888
+ readonly timeZone?: RenderTimeZone;
889
+ };
890
+ export declare const RenderTemplatePublicationPayload: Schema.Struct<{
891
+ readonly data: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>;
892
+ readonly locale: Schema.optionalKey<Schema.String>;
893
+ readonly timeZone: Schema.optionalKey<Schema.String>;
894
+ }>;
895
+ export type SkippedRecipient = {
896
+ readonly address: string;
897
+ readonly reason: "bounce" | "complaint" | "unsubscribe" | "manual" | "group-unsubscribe";
898
+ readonly unsubscribeGroupId?: UnsubscribeId | null;
899
+ };
900
+ export declare const SkippedRecipient: Schema.Struct<{
901
+ readonly address: Schema.String;
902
+ readonly reason: Schema.Union<readonly [Schema.Literal<"bounce">, Schema.Literal<"complaint">, Schema.Literal<"unsubscribe">, Schema.Literal<"manual">, Schema.Literal<"group-unsubscribe">]>;
903
+ readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
904
+ }>;
905
+ export type ContactEvent = {
906
+ readonly id: string;
907
+ readonly contactId: ContactId;
908
+ readonly name: string;
909
+ readonly source: "api" | "samva";
910
+ readonly properties: JsonObject;
911
+ readonly occurredAt: string;
912
+ readonly recordedAt: string;
913
+ };
914
+ export declare const ContactEvent: Schema.Struct<{
915
+ readonly id: Schema.String;
916
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
917
+ readonly name: Schema.String;
918
+ readonly source: Schema.Union<readonly [Schema.Literal<"api">, Schema.Literal<"samva">]>;
919
+ readonly properties: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>;
920
+ readonly occurredAt: Schema.String;
921
+ readonly recordedAt: Schema.String;
922
+ }>;
923
+ export type ContactEventReference = {
924
+ readonly id: ContactId;
925
+ readonly externalId?: never;
926
+ readonly email?: never;
927
+ } | {
928
+ readonly externalId: string;
929
+ readonly id?: never;
930
+ readonly email?: never;
931
+ } | {
932
+ readonly email: string;
933
+ readonly id?: never;
934
+ readonly externalId?: never;
935
+ };
936
+ export declare const ContactEventReference: Schema.Union<readonly [Schema.Struct<{
937
+ readonly id: Schema.brand<Schema.String, "ContactId">;
938
+ readonly externalId: Schema.optionalKey<Schema.Never>;
939
+ readonly email: Schema.optionalKey<Schema.Never>;
940
+ }>, Schema.Struct<{
941
+ readonly externalId: Schema.String;
942
+ readonly id: Schema.optionalKey<Schema.Never>;
943
+ readonly email: Schema.optionalKey<Schema.Never>;
944
+ }>, Schema.Struct<{
945
+ readonly email: Schema.String;
946
+ readonly id: Schema.optionalKey<Schema.Never>;
947
+ readonly externalId: Schema.optionalKey<Schema.Never>;
948
+ }>]>;
949
+ export type EmailRecipient = {
950
+ readonly contactId: ContactId;
951
+ } | {
952
+ readonly email: string;
953
+ readonly name?: string | null;
954
+ readonly displayName?: string | null | null;
955
+ };
956
+ export declare const EmailRecipient: Schema.Union<readonly [Schema.Struct<{
957
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
958
+ }>, Schema.Struct<{
959
+ readonly email: Schema.String;
960
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
961
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
962
+ }>]>;
963
+ export type ConversationContacts = {
964
+ readonly contactIds: readonly [ContactId, ...Array<ContactId>];
965
+ };
966
+ export declare const ConversationContacts: Schema.Struct<{
967
+ readonly contactIds: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.brand<Schema.String, "ContactId">]>, readonly [Schema.brand<Schema.String, "ContactId">]>;
968
+ }>;
969
+ export type JourneyGroupJoinedTrigger = {
970
+ readonly type: "contact.joined_group";
971
+ readonly groupId: ContactGroupId;
972
+ };
973
+ export declare const JourneyGroupJoinedTrigger: Schema.Struct<{
974
+ readonly type: Schema.Literal<"contact.joined_group">;
975
+ readonly groupId: Schema.brand<Schema.String, "ContactGroupId">;
976
+ }>;
977
+ export type SubscribePayload = {
978
+ readonly email: string;
979
+ readonly contactGroupId: ContactGroupId;
980
+ readonly from: {
981
+ readonly email: string;
982
+ readonly name?: string | null;
983
+ };
984
+ readonly unsubscribeGroupId?: UnsubscribeId | null;
985
+ readonly templateSlug?: string | null;
986
+ readonly consentIp?: string | null;
987
+ readonly consentSource?: string | null;
988
+ };
989
+ export declare const SubscribePayload: Schema.Struct<{
990
+ readonly email: Schema.String;
991
+ readonly contactGroupId: Schema.brand<Schema.String, "ContactGroupId">;
992
+ readonly from: Schema.Struct<{
993
+ readonly email: Schema.String;
994
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
995
+ }>;
996
+ readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
997
+ readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
998
+ readonly consentIp: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
999
+ readonly consentSource: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1000
+ }>;
1001
+ export type ContactIdentity = {
1002
+ readonly id: ContactIdentityId;
1003
+ readonly channel: "email";
1004
+ readonly identifier: string;
1005
+ readonly verified: boolean;
1006
+ };
1007
+ export declare const ContactIdentity: Schema.Struct<{
1008
+ readonly id: Schema.brand<Schema.String, "ContactIdentityId">;
1009
+ readonly channel: Schema.Literal<"email">;
1010
+ readonly identifier: Schema.String;
1011
+ readonly verified: Schema.Boolean;
1012
+ }>;
1013
+ export type JourneySendEmailConfig = {
1014
+ readonly template: TemplateId | string;
1015
+ readonly senderId?: EmailSenderId;
1016
+ readonly templateData?: JsonObject;
1017
+ };
1018
+ export declare const JourneySendEmailConfig: Schema.Struct<{
1019
+ readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
1020
+ readonly senderId: Schema.optionalKey<Schema.brand<Schema.String, "EmailSenderId">>;
1021
+ readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
1022
+ }>;
1023
+ export type ExtensionVersionRef = {
1024
+ readonly id: ExtensionVersionId;
1025
+ readonly version: string;
1026
+ };
1027
+ export declare const ExtensionVersionRef: Schema.Struct<{
1028
+ readonly id: Schema.brand<Schema.String, "ExtensionVersionId">;
1029
+ readonly version: Schema.String;
1030
+ }>;
1031
+ export type UpgradeExtensionPayload = {
1032
+ readonly version?: string | ExtensionVersionId | null;
1033
+ readonly acceptPermissions?: ReadonlyArray<"permission:read" | "permission:update" | "permission:send" | "permission:quarantine.read" | "event:mailbox.message.received" | "event:mailbox.message.sent" | "event:mailbox.action.pending_approval" | "event:mailbox.message.quarantined" | "event:mailbox.message.released" | "event:mailbox.message.discarded"> | null;
1034
+ readonly dryRun?: boolean | null;
1035
+ };
1036
+ export declare const UpgradeExtensionPayload: Schema.Struct<{
1037
+ readonly version: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.brand<Schema.String, "ExtensionVersionId">]>, Schema.Null]>>;
1038
+ readonly acceptPermissions: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"permission:read">, Schema.Literal<"permission:update">, Schema.Literal<"permission:send">, Schema.Literal<"permission:quarantine.read">, Schema.Literal<"event:mailbox.message.received">, Schema.Literal<"event:mailbox.message.sent">, Schema.Literal<"event:mailbox.action.pending_approval">, Schema.Literal<"event:mailbox.message.quarantined">, Schema.Literal<"event:mailbox.message.released">, Schema.Literal<"event:mailbox.message.discarded">]>>, Schema.Null]>>;
1039
+ readonly dryRun: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1040
+ }>;
1041
+ export type SendFeedback = {
1042
+ readonly message: string;
1043
+ readonly category?: "bug" | "confusing" | "missing" | "other" | null;
1044
+ readonly context?: FeedbackContext | null;
1045
+ };
1046
+ export declare const SendFeedback: Schema.Struct<{
1047
+ readonly message: Schema.String;
1048
+ readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"bug">, Schema.Literal<"confusing">, Schema.Literal<"missing">, Schema.Literal<"other">]>, Schema.Null]>>;
1049
+ readonly context: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1050
+ readonly operation: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1051
+ readonly resourceId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1052
+ }>, Schema.Null]>>;
1053
+ }>;
1054
+ export type UpdateJourneyPayload = {
1055
+ readonly name: JourneyName;
1056
+ };
1057
+ export declare const UpdateJourneyPayload: Schema.Struct<{
1058
+ readonly name: Schema.String;
1059
+ }>;
1060
+ export type JourneyCustomEventTrigger = {
1061
+ readonly type: "event";
1062
+ readonly eventName: JourneyCustomEventName;
1063
+ };
1064
+ export declare const JourneyCustomEventTrigger: Schema.Struct<{
1065
+ readonly type: Schema.Literal<"event">;
1066
+ readonly eventName: Schema.String;
1067
+ }>;
1068
+ export type JourneyEventName = JourneyCustomEventName | "contact.created" | "contact.tag_added" | "contact.joined_group";
1069
+ export declare const JourneyEventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
1070
+ export type JourneyNextEdge = {
1071
+ readonly nodeId: JourneyNodeId;
1072
+ };
1073
+ export declare const JourneyNextEdge: Schema.Struct<{
1074
+ readonly nodeId: Schema.String;
1075
+ }>;
1076
+ export type JourneyWaitEventEdge = {
1077
+ readonly nodeId: JourneyNodeId;
1078
+ readonly outcome: "matched" | "timed_out";
1079
+ };
1080
+ export declare const JourneyWaitEventEdge: Schema.Struct<{
1081
+ readonly nodeId: Schema.String;
1082
+ readonly outcome: Schema.Union<readonly [Schema.Literal<"matched">, Schema.Literal<"timed_out">]>;
1083
+ }>;
1084
+ export type JourneyExitNode = {
1085
+ readonly type: "exit";
1086
+ readonly config: JourneyEmptyConfig;
1087
+ readonly next: readonly [];
1088
+ };
1089
+ export declare const JourneyExitNode: Schema.Struct<{
1090
+ readonly type: Schema.Literal<"exit">;
1091
+ readonly config: Schema.$Record<Schema.String, Schema.Never>;
1092
+ readonly next: Schema.Tuple<readonly []>;
1093
+ }>;
1094
+ export type JourneyComparison = JourneyEqualityComparison | JourneyNumericComparison | JourneyStringComparison | JourneyPresenceComparison;
1095
+ export declare const JourneyComparison: Schema.Union<readonly [Schema.Struct<{
1096
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
1097
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
1098
+ }>, Schema.Struct<{
1099
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
1100
+ readonly value: Schema.Finite;
1101
+ }>, Schema.Struct<{
1102
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
1103
+ readonly value: Schema.String;
1104
+ }>, Schema.Struct<{
1105
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
1106
+ }>]>;
1107
+ export type CreateMailboxEndpointPayload = {
1108
+ readonly channel: MailboxChannel;
1109
+ readonly address: string;
1110
+ readonly displayName?: string | null;
1111
+ };
1112
+ export declare const CreateMailboxEndpointPayload: Schema.Struct<{
1113
+ readonly channel: Schema.Literal<"email">;
1114
+ readonly address: Schema.String;
1115
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1116
+ }>;
1117
+ export type UpdateMailboxPayload = {
1118
+ readonly name?: string | null;
1119
+ readonly metadata?: MailboxMetadataPatch | null;
1120
+ };
1121
+ export declare const UpdateMailboxPayload: Schema.Struct<{
1122
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1123
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Null]>>, Schema.Null]>>;
1124
+ }>;
1125
+ export type MailboxActionDecision = {
1126
+ readonly outcome: "allow" | "requireApproval" | "deny";
1127
+ readonly reason: string | null;
1128
+ readonly policyId: MailboxPolicyId | null;
1129
+ readonly source: "grant" | "installation" | "policy" | null;
1130
+ readonly decidedAt: string;
1131
+ };
1132
+ export declare const MailboxActionDecision: Schema.Struct<{
1133
+ readonly outcome: Schema.Union<readonly [Schema.Literal<"allow">, Schema.Literal<"requireApproval">, Schema.Literal<"deny">]>;
1134
+ readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
1135
+ readonly policyId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxPolicyId">, Schema.Null]>;
1136
+ readonly source: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"grant">, Schema.Literal<"installation">, Schema.Literal<"policy">]>, Schema.Null]>;
1137
+ readonly decidedAt: Schema.String;
1138
+ }>;
1139
+ export type MailboxSendOutcome = {
1140
+ readonly code: string;
1141
+ readonly message: string;
1142
+ readonly error?: MailboxSendError | null;
1143
+ };
1144
+ export declare const MailboxSendOutcome: Schema.Struct<{
1145
+ readonly code: Schema.String;
1146
+ readonly message: Schema.String;
1147
+ readonly error: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
1148
+ readonly _tag: Schema.Literal<"SenderNotReadyError">;
1149
+ readonly message: Schema.String;
1150
+ readonly sender: Schema.String;
1151
+ readonly retryAfterSeconds: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1152
+ }>, Schema.Struct<{
1153
+ readonly _tag: Schema.Literal<"RateLimitedError">;
1154
+ readonly message: Schema.String;
1155
+ readonly retryAfterSeconds: Schema.Finite;
1156
+ }>, Schema.Struct<{
1157
+ readonly _tag: Schema.Literal<"OnboardingReviewRequiredError">;
1158
+ readonly message: Schema.String;
1159
+ readonly code: Schema.Union<readonly [Schema.Literal<"review_required">, Schema.Literal<"review_in_progress">, Schema.Literal<"information_required">, Schema.Literal<"review_rejected">, Schema.Literal<"identity_review_required">, Schema.Literal<"identity_review_rejected">, Schema.Literal<"identity_changed">]>;
1160
+ readonly decision: Schema.Union<readonly [Schema.Literal<"undecided">, Schema.Literal<"approved">, Schema.Literal<"rejected">]>;
1161
+ readonly stage: Schema.Union<readonly [Schema.Literal<"collecting">, Schema.Literal<"automated_review">, Schema.Literal<"manual_review">, Schema.Literal<"information_requested">, Schema.Literal<"complete">]>;
1162
+ readonly nextAction: Schema.Union<readonly [Schema.Literal<"wait_for_review">, Schema.Literal<"provide_information">, Schema.Literal<"verify_sending_identity">, Schema.Literal<"reapply">, Schema.Literal<"contact_support">]>;
1163
+ readonly identityId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1164
+ }>, Schema.Struct<{
1165
+ readonly _tag: Schema.Literal<"PaymentRequiredError">;
1166
+ readonly message: Schema.String;
1167
+ readonly resource: Schema.String;
1168
+ readonly currentUsage: Schema.Finite;
1169
+ readonly limit: Schema.Finite;
1170
+ }>, Schema.Struct<{
1171
+ readonly _tag: Schema.Literal<"ValidationError">;
1172
+ readonly message: Schema.String;
1173
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1174
+ }>, Schema.Struct<{
1175
+ readonly _tag: Schema.Literal<"ForbiddenError">;
1176
+ readonly message: Schema.String;
1177
+ }>, Schema.Struct<{
1178
+ readonly _tag: Schema.Literal<"ResourceNotFoundError">;
1179
+ readonly resource: Schema.String;
1180
+ readonly id: Schema.String;
1181
+ readonly message: Schema.String;
1182
+ }>]>, Schema.Null]>>;
1183
+ }>;
1184
+ export type CreateMailboxGrantPayload = {
1185
+ readonly userId: UserId;
1186
+ readonly role: MailboxGrantRole;
1187
+ readonly sendMode?: MailboxSendMode | null;
1188
+ };
1189
+ export declare const CreateMailboxGrantPayload: Schema.Struct<{
1190
+ readonly userId: Schema.brand<Schema.String, "UserId">;
1191
+ readonly role: Schema.Union<readonly [Schema.Literal<"admin">, Schema.Literal<"collaborator">, Schema.Literal<"viewer">]>;
1192
+ readonly sendMode: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"send">, Schema.Literal<"approval">]>, Schema.Null]>>;
1193
+ }>;
1194
+ export type UpdateMailboxGrantPayload = {
1195
+ readonly role?: MailboxGrantRole | null;
1196
+ readonly sendMode?: MailboxSendMode | null;
1197
+ };
1198
+ export declare const UpdateMailboxGrantPayload: Schema.Struct<{
1199
+ readonly role: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"admin">, Schema.Literal<"collaborator">, Schema.Literal<"viewer">]>, Schema.Null]>>;
1200
+ readonly sendMode: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"send">, Schema.Literal<"approval">]>, Schema.Null]>>;
1201
+ }>;
1202
+ export type MailboxThreadLabels = {
1203
+ readonly labels: readonly [MailboxLabelId, ...Array<MailboxLabelId>];
1204
+ };
1205
+ export declare const MailboxThreadLabels: Schema.Struct<{
1206
+ readonly labels: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.brand<Schema.String, "MailboxLabelId">]>, readonly [Schema.brand<Schema.String, "MailboxLabelId">]>;
1207
+ }>;
1208
+ export type CreateMailboxPolicyPayload = {
1209
+ readonly name: string;
1210
+ readonly outcome: MailboxPolicyOutcomeKind;
1211
+ readonly reason?: string | null;
1212
+ readonly enabled?: boolean | null;
1213
+ };
1214
+ export declare const CreateMailboxPolicyPayload: Schema.Struct<{
1215
+ readonly name: Schema.String;
1216
+ readonly outcome: Schema.Union<readonly [Schema.Literal<"requireApproval">, Schema.Literal<"deny">]>;
1217
+ readonly reason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1218
+ readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1219
+ }>;
1220
+ export type UpdateMailboxPolicyPayload = {
1221
+ readonly name?: string | null;
1222
+ readonly outcome?: MailboxPolicyOutcomeKind | null;
1223
+ readonly reason?: string | null | null;
1224
+ readonly enabled?: boolean | null;
1225
+ };
1226
+ export declare const UpdateMailboxPolicyPayload: Schema.Struct<{
1227
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1228
+ readonly outcome: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requireApproval">, Schema.Literal<"deny">]>, Schema.Null]>>;
1229
+ readonly reason: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
1230
+ readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1231
+ }>;
1232
+ export type UpdateMailboxThreadPayload = {
1233
+ readonly folder?: MailboxThreadFolder | null;
1234
+ readonly priority?: MailboxThreadPriority | null;
1235
+ readonly read?: boolean | null;
1236
+ readonly starred?: boolean | null;
1237
+ readonly snoozedUntil?: string | null | null;
1238
+ };
1239
+ export declare const UpdateMailboxThreadPayload: Schema.Struct<{
1240
+ readonly folder: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"inbox">, Schema.Literal<"assigned">, Schema.Literal<"pending">, Schema.Literal<"sent">, Schema.Literal<"archived">, Schema.Literal<"trash">]>, Schema.Null]>>;
1241
+ readonly priority: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"normal">, Schema.Literal<"high">, Schema.Literal<"urgent">]>, Schema.Null]>>;
1242
+ readonly read: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1243
+ readonly starred: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1244
+ readonly snoozedUntil: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
1245
+ }>;
1246
+ export type CreateNamespacePayload = {
1247
+ readonly name: string;
1248
+ readonly metadata?: NamespaceMetadata | null;
1249
+ };
1250
+ export declare const CreateNamespacePayload: Schema.Struct<{
1251
+ readonly name: Schema.String;
1252
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
1253
+ }>;
1254
+ export type Operation = {
1255
+ readonly id: OperationId;
1256
+ readonly organizationId: string;
1257
+ readonly kind: "email-domain-provisioning" | "organization-deletion";
1258
+ readonly subject: OperationResource;
1259
+ readonly actor: {
1260
+ readonly type: "user" | "api-key" | "system";
1261
+ readonly id: string;
1262
+ };
1263
+ readonly status: "pending" | "running" | "succeeded" | "failed";
1264
+ readonly phase: "accepted" | "dispatching" | "provisioning" | "deleting" | "finalizing" | "completed";
1265
+ readonly error: {
1266
+ readonly code: "validation-failed" | "conflict" | "capacity-unavailable" | "rejected" | "unavailable" | "timed-out" | "internal";
1267
+ readonly message: string;
1268
+ } | null;
1269
+ readonly createdAt: string;
1270
+ readonly updatedAt: string;
1271
+ readonly startedAt: string | null;
1272
+ readonly completedAt: string | null;
1273
+ };
1274
+ export declare const Operation: Schema.Struct<{
1275
+ readonly id: Schema.brand<Schema.String, "OperationId">;
1276
+ readonly organizationId: Schema.String;
1277
+ readonly kind: Schema.Union<readonly [Schema.Literal<"email-domain-provisioning">, Schema.Literal<"organization-deletion">]>;
1278
+ readonly subject: Schema.Struct<{
1279
+ readonly type: Schema.String;
1280
+ readonly id: Schema.String;
1281
+ }>;
1282
+ readonly actor: Schema.Struct<{
1283
+ readonly type: Schema.Union<readonly [Schema.Literal<"user">, Schema.Literal<"api-key">, Schema.Literal<"system">]>;
1284
+ readonly id: Schema.String;
1285
+ }>;
1286
+ readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"running">, Schema.Literal<"succeeded">, Schema.Literal<"failed">]>;
1287
+ readonly phase: Schema.Union<readonly [Schema.Literal<"accepted">, Schema.Literal<"dispatching">, Schema.Literal<"provisioning">, Schema.Literal<"deleting">, Schema.Literal<"finalizing">, Schema.Literal<"completed">]>;
1288
+ readonly error: Schema.Union<readonly [Schema.Struct<{
1289
+ readonly code: Schema.Union<readonly [Schema.Literal<"validation-failed">, Schema.Literal<"conflict">, Schema.Literal<"capacity-unavailable">, Schema.Literal<"rejected">, Schema.Literal<"unavailable">, Schema.Literal<"timed-out">, Schema.Literal<"internal">]>;
1290
+ readonly message: Schema.String;
1291
+ }>, Schema.Null]>;
1292
+ readonly createdAt: Schema.String;
1293
+ readonly updatedAt: Schema.String;
1294
+ readonly startedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1295
+ readonly completedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1296
+ }>;
1297
+ export type OperationResourceLink = {
1298
+ readonly resource: OperationResource;
1299
+ readonly href: string;
1300
+ };
1301
+ export declare const OperationResourceLink: Schema.Struct<{
1302
+ readonly resource: Schema.Struct<{
1303
+ readonly type: Schema.String;
1304
+ readonly id: Schema.String;
1305
+ }>;
1306
+ readonly href: Schema.String;
1307
+ }>;
1308
+ export type UpdateTemplatePayload = {
1309
+ readonly data: {
1310
+ readonly name?: string | null;
1311
+ readonly slug?: string | null;
1312
+ readonly entryPath?: string | null;
1313
+ readonly description?: string | null | null;
1314
+ readonly category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | null;
1315
+ readonly fromDefault?: TemplateFromDefault | null | null;
1316
+ readonly replyToDefault?: ReadonlyArray<string> | null | null;
1317
+ readonly isActive?: boolean | null;
1318
+ };
1319
+ };
1320
+ export declare const UpdateTemplatePayload: Schema.Struct<{
1321
+ readonly data: Schema.Struct<{
1322
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1323
+ readonly slug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1324
+ readonly entryPath: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1325
+ readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
1326
+ readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"marketing">, Schema.Literal<"support">, Schema.Literal<"notification">, Schema.Literal<"verification">, Schema.Literal<"reminder">, Schema.Literal<"alert">]>, Schema.Null]>, Schema.Null]>>;
1327
+ readonly fromDefault: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
1328
+ readonly email: Schema.String;
1329
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1330
+ }>, Schema.Null]>, Schema.Null]>>;
1331
+ readonly replyToDefault: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
1332
+ readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1333
+ }>;
1334
+ }>;
1335
+ export type ApiKeyAccess = {
1336
+ readonly mode: "full";
1337
+ } | {
1338
+ readonly mode: "restricted";
1339
+ readonly resources: ApiKeyResourceAccess;
1340
+ readonly mailboxes?: ApiKeyMailboxAccess | null;
1341
+ readonly namespaceId?: NamespaceId | null;
1342
+ };
1343
+ export declare const ApiKeyAccess: Schema.Union<readonly [Schema.Struct<{
1344
+ readonly mode: Schema.Literal<"full">;
1345
+ }>, Schema.Struct<{
1346
+ readonly mode: Schema.Literal<"restricted">;
1347
+ readonly resources: Schema.Struct<{
1348
+ readonly messages: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
1349
+ readonly email: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
1350
+ readonly domains: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
1351
+ readonly phoneNumbers: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
1352
+ readonly contacts: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
1353
+ readonly conversations: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
1354
+ readonly templates: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
1355
+ readonly webhooks: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
1356
+ readonly apiKeys: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
1357
+ readonly organization: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
1358
+ readonly billing: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
1359
+ readonly analytics: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>, Schema.Null]>>;
1360
+ }>;
1361
+ readonly mailboxes: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1362
+ readonly permissions: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"update">, Schema.Literal<"send">, Schema.Literal<"quarantine.read">]>]>, readonly [Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"update">, Schema.Literal<"send">, Schema.Literal<"quarantine.read">]>]>;
1363
+ 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]>>;
1364
+ readonly sendMode: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"send">, Schema.Literal<"approval">]>, Schema.Null]>>;
1365
+ }>, Schema.Null]>>;
1366
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
1367
+ }>]>;
1368
+ export type MessagePage = {
1369
+ readonly items: ReadonlyArray<MessageSummary>;
1370
+ readonly nextCursor: string | null;
1371
+ };
1372
+ export declare const MessagePage: Schema.Struct<{
1373
+ readonly items: Schema.$Array<Schema.Struct<{
1374
+ readonly id: Schema.brand<Schema.String, "MessageId">;
1375
+ readonly channel: Schema.Literal<"email">;
1376
+ readonly direction: Schema.Union<readonly [Schema.Literal<"outbound">, Schema.Literal<"inbound">]>;
1377
+ readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"scheduled">, Schema.Literal<"queued">, Schema.Literal<"processing">, Schema.Literal<"sent">, Schema.Literal<"delivered">, Schema.Literal<"read">, Schema.Literal<"failed">, Schema.Literal<"bounced">, Schema.Literal<"complained">]>;
1378
+ readonly from: Schema.Union<readonly [Schema.String, Schema.Null]>;
1379
+ readonly to: Schema.$Array<Schema.String>;
1380
+ readonly subject: Schema.Union<readonly [Schema.String, Schema.Null]>;
1381
+ readonly waitReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"rate">, Schema.Literal<"daily-quota">, Schema.Literal<"domain-health">, Schema.Literal<"sending-paused">, Schema.Literal<"upstream-unavailable">, Schema.Literal<"retry">, Schema.Literal<"campaign-paused">, Schema.Literal<"domain-warming">, Schema.Literal<"onboarding-review">, Schema.Literal<"content-review">, Schema.Literal<"screening-unavailable">]>, Schema.Null]>;
1382
+ readonly createdAt: Schema.String;
1383
+ }>>;
1384
+ readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
1385
+ }>;
1386
+ export type CreateBrand = {
1387
+ readonly slug: string;
1388
+ readonly name: string;
1389
+ readonly css?: string | null;
1390
+ readonly assets?: BrandAssets | null;
1391
+ readonly footer?: BrandFooter | null;
1392
+ readonly isDefault?: boolean | null;
1393
+ };
1394
+ export declare const CreateBrand: Schema.Struct<{
1395
+ readonly slug: Schema.String;
1396
+ readonly name: Schema.String;
1397
+ readonly css: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1398
+ readonly assets: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1399
+ readonly logoUrl: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1400
+ readonly logoDarkUrl: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1401
+ readonly iconUrl: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1402
+ }>, Schema.Null]>>;
1403
+ readonly footer: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1404
+ readonly companyName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1405
+ readonly address: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1406
+ readonly street1: Schema.String;
1407
+ readonly street2: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1408
+ readonly city: Schema.String;
1409
+ readonly region: Schema.String;
1410
+ readonly postalCode: Schema.String;
1411
+ readonly country: Schema.String;
1412
+ }>, Schema.Null]>>;
1413
+ readonly socialLinks: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
1414
+ readonly label: Schema.String;
1415
+ readonly url: Schema.String;
1416
+ }>>, Schema.Null]>>;
1417
+ }>, Schema.Null]>>;
1418
+ readonly isDefault: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1419
+ }>;
1420
+ export type UpdateBrand = {
1421
+ readonly newSlug?: string | null;
1422
+ readonly name?: string | null;
1423
+ readonly css?: string | null;
1424
+ readonly assets?: BrandAssets | null;
1425
+ readonly footer?: BrandFooter | null;
1426
+ };
1427
+ export declare const UpdateBrand: Schema.Struct<{
1428
+ readonly newSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1429
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1430
+ readonly css: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1431
+ readonly assets: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1432
+ readonly logoUrl: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1433
+ readonly logoDarkUrl: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1434
+ readonly iconUrl: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1435
+ }>, Schema.Null]>>;
1436
+ readonly footer: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1437
+ readonly companyName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1438
+ readonly address: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1439
+ readonly street1: Schema.String;
1440
+ readonly street2: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1441
+ readonly city: Schema.String;
1442
+ readonly region: Schema.String;
1443
+ readonly postalCode: Schema.String;
1444
+ readonly country: Schema.String;
1445
+ }>, Schema.Null]>>;
1446
+ readonly socialLinks: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
1447
+ readonly label: Schema.String;
1448
+ readonly url: Schema.String;
1449
+ }>>, Schema.Null]>>;
1450
+ }>, Schema.Null]>>;
1451
+ }>;
1452
+ export type EmailAttachments = ReadonlyArray<EmailAttachment> | null;
1453
+ export declare const EmailAttachments: Schema.Union<readonly [Schema.$Array<Schema.Struct<{
1454
+ readonly filename: Schema.String;
1455
+ readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1456
+ readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
1457
+ readonly contentType: Schema.String;
1458
+ readonly size: Schema.Finite;
1459
+ }>>, Schema.Null]>;
1460
+ export type CreateMailboxDraftPayload = {
1461
+ readonly channel?: "email" | null;
1462
+ readonly endpointId?: MailboxEndpointId | null;
1463
+ readonly to?: ReadonlyArray<string> | null;
1464
+ readonly cc?: ReadonlyArray<string> | null;
1465
+ readonly bcc?: ReadonlyArray<string> | null;
1466
+ readonly replyTo?: ReadonlyArray<string> | null;
1467
+ readonly subject?: string | null;
1468
+ readonly text?: string | null;
1469
+ readonly html?: string | null;
1470
+ readonly attachments?: ReadonlyArray<EmailAttachment> | null;
1471
+ readonly inReplyToMessageId?: MessageId | null;
1472
+ };
1473
+ export declare const CreateMailboxDraftPayload: Schema.Struct<{
1474
+ readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
1475
+ readonly endpointId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxEndpointId">, Schema.Null]>>;
1476
+ readonly to: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1477
+ readonly cc: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1478
+ readonly bcc: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1479
+ readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1480
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1481
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1482
+ readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1483
+ readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
1484
+ readonly filename: Schema.String;
1485
+ readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1486
+ readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
1487
+ readonly contentType: Schema.String;
1488
+ readonly size: Schema.Finite;
1489
+ }>>, Schema.Null]>>;
1490
+ readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
1491
+ }>;
1492
+ export type ForwardMailboxMessagePayload = {
1493
+ readonly to: readonly [string, ...Array<string>];
1494
+ readonly cc?: ReadonlyArray<string> | null;
1495
+ readonly bcc?: ReadonlyArray<string> | null;
1496
+ readonly text?: string | null;
1497
+ readonly html?: string | null;
1498
+ readonly attachments?: ReadonlyArray<EmailAttachment> | null;
1499
+ };
1500
+ export declare const ForwardMailboxMessagePayload: Schema.Struct<{
1501
+ readonly to: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.String]>, readonly [Schema.String]>;
1502
+ readonly cc: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1503
+ readonly bcc: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1504
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1505
+ readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1506
+ readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
1507
+ readonly filename: Schema.String;
1508
+ readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1509
+ readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
1510
+ readonly contentType: Schema.String;
1511
+ readonly size: Schema.Finite;
1512
+ }>>, Schema.Null]>>;
1513
+ }>;
1514
+ export type ReplyMailboxMessagePayload = {
1515
+ readonly channel?: "email" | null;
1516
+ readonly cc?: ReadonlyArray<string> | null;
1517
+ readonly bcc?: ReadonlyArray<string> | null;
1518
+ readonly text?: string | null;
1519
+ readonly html?: string | null;
1520
+ readonly attachments?: ReadonlyArray<EmailAttachment> | null;
1521
+ };
1522
+ export declare const ReplyMailboxMessagePayload: Schema.Struct<{
1523
+ readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
1524
+ readonly cc: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1525
+ readonly bcc: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1526
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1527
+ readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1528
+ readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
1529
+ readonly filename: Schema.String;
1530
+ readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1531
+ readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
1532
+ readonly contentType: Schema.String;
1533
+ readonly size: Schema.Finite;
1534
+ }>>, Schema.Null]>>;
1535
+ }>;
1536
+ export type SendMailboxMessagePayload = {
1537
+ readonly channel?: "email" | null;
1538
+ readonly to: readonly [string, ...Array<string>];
1539
+ readonly cc?: ReadonlyArray<string> | null;
1540
+ readonly bcc?: ReadonlyArray<string> | null;
1541
+ readonly replyTo?: ReadonlyArray<string> | null;
1542
+ readonly subject: string;
1543
+ readonly text?: string | null;
1544
+ readonly html?: string | null;
1545
+ readonly attachments?: ReadonlyArray<EmailAttachment> | null;
1546
+ };
1547
+ export declare const SendMailboxMessagePayload: Schema.Struct<{
1548
+ readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
1549
+ readonly to: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.String]>, readonly [Schema.String]>;
1550
+ readonly cc: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1551
+ readonly bcc: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1552
+ readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1553
+ readonly subject: Schema.String;
1554
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1555
+ readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1556
+ readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
1557
+ readonly filename: Schema.String;
1558
+ readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1559
+ readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
1560
+ readonly contentType: Schema.String;
1561
+ readonly size: Schema.Finite;
1562
+ }>>, Schema.Null]>>;
1563
+ }>;
1564
+ export type UpdateMailboxDraftPayload = {
1565
+ readonly to?: ReadonlyArray<string> | null;
1566
+ readonly cc?: ReadonlyArray<string> | null | null;
1567
+ readonly bcc?: ReadonlyArray<string> | null | null;
1568
+ readonly replyTo?: ReadonlyArray<string> | null | null;
1569
+ readonly subject?: string | null | null;
1570
+ readonly text?: string | null | null;
1571
+ readonly html?: string | null | null;
1572
+ readonly attachments?: ReadonlyArray<EmailAttachment> | null | null;
1573
+ };
1574
+ export declare const UpdateMailboxDraftPayload: Schema.Struct<{
1575
+ readonly to: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1576
+ readonly cc: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
1577
+ readonly bcc: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
1578
+ readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
1579
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
1580
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
1581
+ readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
1582
+ readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.Struct<{
1583
+ readonly filename: Schema.String;
1584
+ readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1585
+ readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
1586
+ readonly contentType: Schema.String;
1587
+ readonly size: Schema.Finite;
1588
+ }>>, Schema.Null]>, Schema.Null]>>;
1589
+ }>;
1590
+ export type CreateEventPayload = {
1591
+ readonly contact: ContactEventReference;
1592
+ readonly name: string;
1593
+ readonly properties?: JsonObject | null;
1594
+ readonly occurredAt?: string | null;
1595
+ readonly idempotencyKey?: string | null;
1596
+ };
1597
+ export declare const CreateEventPayload: Schema.Struct<{
1598
+ readonly contact: Schema.Union<readonly [Schema.Struct<{
1599
+ readonly id: Schema.brand<Schema.String, "ContactId">;
1600
+ readonly externalId: Schema.optionalKey<Schema.Never>;
1601
+ readonly email: Schema.optionalKey<Schema.Never>;
1602
+ }>, Schema.Struct<{
1603
+ readonly externalId: Schema.String;
1604
+ readonly id: Schema.optionalKey<Schema.Never>;
1605
+ readonly email: Schema.optionalKey<Schema.Never>;
1606
+ }>, Schema.Struct<{
1607
+ readonly email: Schema.String;
1608
+ readonly id: Schema.optionalKey<Schema.Never>;
1609
+ readonly externalId: Schema.optionalKey<Schema.Never>;
1610
+ }>]>;
1611
+ readonly name: Schema.String;
1612
+ readonly properties: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1613
+ readonly occurredAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1614
+ readonly idempotencyKey: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1615
+ }>;
1616
+ export type EmailRecipients = ReadonlyArray<EmailRecipient>;
1617
+ export declare const EmailRecipients: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
1618
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
1619
+ }>, Schema.Struct<{
1620
+ readonly email: Schema.String;
1621
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1622
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
1623
+ }>]>>;
1624
+ export type EmailCcRecipients = ReadonlyArray<EmailRecipient> | null | null;
1625
+ export declare const EmailCcRecipients: Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Struct<{
1626
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
1627
+ }>, Schema.Struct<{
1628
+ readonly email: Schema.String;
1629
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1630
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
1631
+ }>]>>, Schema.Null]>, Schema.Null]>;
1632
+ export type EmailBccRecipients = ReadonlyArray<EmailRecipient> | null | null;
1633
+ export declare const EmailBccRecipients: Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Struct<{
1634
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
1635
+ }>, Schema.Struct<{
1636
+ readonly email: Schema.String;
1637
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1638
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
1639
+ }>]>>, Schema.Null]>, Schema.Null]>;
1640
+ export type JourneyTrigger = JourneyCustomEventTrigger | JourneyContactCreatedTrigger | JourneyTagAddedTrigger | JourneyGroupJoinedTrigger;
1641
+ export declare const JourneyTrigger: Schema.Union<readonly [Schema.Struct<{
1642
+ readonly type: Schema.Literal<"event">;
1643
+ readonly eventName: Schema.String;
1644
+ }>, Schema.Struct<{
1645
+ readonly type: Schema.Literal<"contact.created">;
1646
+ }>, Schema.Struct<{
1647
+ readonly type: Schema.Literal<"contact.tag_added">;
1648
+ readonly tag: Schema.String;
1649
+ }>, Schema.Struct<{
1650
+ readonly type: Schema.Literal<"contact.joined_group">;
1651
+ readonly groupId: Schema.brand<Schema.String, "ContactGroupId">;
1652
+ }>]>;
1653
+ export type JourneyWaitForEventConfig = {
1654
+ readonly eventName: JourneyEventName;
1655
+ readonly timeoutSeconds: number;
1656
+ };
1657
+ export declare const JourneyWaitForEventConfig: Schema.Struct<{
1658
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
1659
+ readonly timeoutSeconds: Schema.Finite;
1660
+ }>;
1661
+ export type JourneyEventPredicate = {
1662
+ readonly type: "event";
1663
+ readonly eventName: JourneyEventName;
1664
+ readonly occurred: boolean;
1665
+ };
1666
+ export declare const JourneyEventPredicate: Schema.Struct<{
1667
+ readonly type: Schema.Literal<"event">;
1668
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
1669
+ readonly occurred: Schema.Boolean;
1670
+ }>;
1671
+ export type JourneyGoal = {
1672
+ readonly eventName: JourneyEventName;
1673
+ };
1674
+ export declare const JourneyGoal: Schema.Struct<{
1675
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
1676
+ }>;
1677
+ export type JourneySendEmailNode = {
1678
+ readonly type: "send_email";
1679
+ readonly config: JourneySendEmailConfig;
1680
+ readonly next: readonly [JourneyNextEdge];
1681
+ };
1682
+ export declare const JourneySendEmailNode: Schema.Struct<{
1683
+ readonly type: Schema.Literal<"send_email">;
1684
+ readonly config: Schema.Struct<{
1685
+ readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
1686
+ readonly senderId: Schema.optionalKey<Schema.brand<Schema.String, "EmailSenderId">>;
1687
+ readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
1688
+ }>;
1689
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
1690
+ readonly nodeId: Schema.String;
1691
+ }>]>;
1692
+ }>;
1693
+ export type JourneyWaitNode = {
1694
+ readonly type: "wait";
1695
+ readonly config: JourneyWaitConfig;
1696
+ readonly next: readonly [JourneyNextEdge];
1697
+ };
1698
+ export declare const JourneyWaitNode: Schema.Struct<{
1699
+ readonly type: Schema.Literal<"wait">;
1700
+ readonly config: Schema.Struct<{
1701
+ readonly durationSeconds: Schema.Finite;
1702
+ }>;
1703
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
1704
+ readonly nodeId: Schema.String;
1705
+ }>]>;
1706
+ }>;
1707
+ export type JourneyUpdateTagsNode = {
1708
+ readonly type: "update_tags";
1709
+ readonly config: JourneyUpdateTagsConfig;
1710
+ readonly next: readonly [JourneyNextEdge];
1711
+ };
1712
+ export declare const JourneyUpdateTagsNode: Schema.Struct<{
1713
+ readonly type: Schema.Literal<"update_tags">;
1714
+ readonly config: Schema.Struct<{
1715
+ readonly add: Schema.$Array<Schema.String>;
1716
+ readonly remove: Schema.$Array<Schema.String>;
1717
+ }>;
1718
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
1719
+ readonly nodeId: Schema.String;
1720
+ }>]>;
1721
+ }>;
1722
+ export type JourneyWebhookNode = {
1723
+ readonly type: "webhook";
1724
+ readonly config: JourneyWebhookConfig;
1725
+ readonly next: readonly [JourneyNextEdge];
1726
+ };
1727
+ export declare const JourneyWebhookNode: Schema.Struct<{
1728
+ readonly type: Schema.Literal<"webhook">;
1729
+ readonly config: Schema.Struct<{
1730
+ readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
1731
+ }>;
1732
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
1733
+ readonly nodeId: Schema.String;
1734
+ }>]>;
1735
+ }>;
1736
+ export type JourneyPropertyPredicate = {
1737
+ readonly type: "property";
1738
+ readonly field: JourneyContactProperty;
1739
+ readonly comparison: JourneyComparison;
1740
+ };
1741
+ export declare const JourneyPropertyPredicate: Schema.Struct<{
1742
+ readonly type: Schema.Literal<"property">;
1743
+ readonly field: Schema.Union<readonly [Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"status">, Schema.Literal<"profile.firstName">, Schema.Literal<"profile.lastName">, Schema.Literal<"profile.company">, Schema.Literal<"profile.jobTitle">, Schema.Literal<"profile.source">, Schema.Literal<"profile.location.country">, Schema.Literal<"profile.location.state">, Schema.Literal<"profile.location.city">, Schema.Literal<"profile.location.timezone">]>;
1744
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
1745
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
1746
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
1747
+ }>, Schema.Struct<{
1748
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
1749
+ readonly value: Schema.Finite;
1750
+ }>, Schema.Struct<{
1751
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
1752
+ readonly value: Schema.String;
1753
+ }>, Schema.Struct<{
1754
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
1755
+ }>]>;
1756
+ }>;
1757
+ export type JourneyCustomFieldPredicate = {
1758
+ readonly type: "custom_field";
1759
+ readonly key: string;
1760
+ readonly comparison: JourneyComparison;
1761
+ };
1762
+ export declare const JourneyCustomFieldPredicate: Schema.Struct<{
1763
+ readonly type: Schema.Literal<"custom_field">;
1764
+ readonly key: Schema.String;
1765
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
1766
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
1767
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
1768
+ }>, Schema.Struct<{
1769
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
1770
+ readonly value: Schema.Finite;
1771
+ }>, Schema.Struct<{
1772
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
1773
+ readonly value: Schema.String;
1774
+ }>, Schema.Struct<{
1775
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
1776
+ }>]>;
1777
+ }>;
1778
+ export type CreateMailboxPayload = {
1779
+ readonly namespaceId?: NamespaceId | null;
1780
+ readonly endpoint: CreateMailboxEndpointPayload;
1781
+ readonly name: string;
1782
+ readonly slug?: string | null;
1783
+ readonly metadata?: MailboxMetadata | null;
1784
+ };
1785
+ export declare const CreateMailboxPayload: Schema.Struct<{
1786
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
1787
+ readonly endpoint: Schema.Struct<{
1788
+ readonly channel: Schema.Literal<"email">;
1789
+ readonly address: Schema.String;
1790
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1791
+ }>;
1792
+ readonly name: Schema.String;
1793
+ readonly slug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1794
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
1795
+ }>;
1796
+ export type MailboxSendReceipt = {
1797
+ readonly actionId: MailboxActionId;
1798
+ readonly draftId: MailboxDraftId | null;
1799
+ readonly messageId: MessageId | null;
1800
+ readonly threadId: MailboxThreadId | null;
1801
+ readonly state: "approvalRequired" | "queued" | "accepted" | "completed" | "notSent" | "uncertain";
1802
+ readonly acceptedAt: string | null;
1803
+ readonly waitReason: "rate" | "daily-quota" | "domain-health" | "sending-paused" | "upstream-unavailable" | "retry" | "campaign-paused" | "domain-warming" | "onboarding-review" | "content-review" | "screening-unavailable" | null;
1804
+ readonly reviewExpectedAt: string | null;
1805
+ readonly skippedRecipients: ReadonlyArray<SkippedRecipient>;
1806
+ readonly executeUntil: string | null;
1807
+ readonly retryAt: string | null;
1808
+ readonly problem: MailboxSendOutcome | null;
1809
+ readonly retryEligible: boolean;
1810
+ readonly decision: MailboxActionDecision | null;
1811
+ readonly createdAt: string;
1812
+ readonly updatedAt: string;
1813
+ };
1814
+ export declare const MailboxSendReceipt: Schema.Struct<{
1815
+ readonly actionId: Schema.brand<Schema.String, "MailboxActionId">;
1816
+ readonly draftId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxDraftId">, Schema.Null]>;
1817
+ readonly messageId: Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>;
1818
+ readonly threadId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxThreadId">, Schema.Null]>;
1819
+ readonly state: Schema.Union<readonly [Schema.Literal<"approvalRequired">, Schema.Literal<"queued">, Schema.Literal<"accepted">, Schema.Literal<"completed">, Schema.Literal<"notSent">, Schema.Literal<"uncertain">]>;
1820
+ readonly acceptedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1821
+ readonly waitReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"rate">, Schema.Literal<"daily-quota">, Schema.Literal<"domain-health">, Schema.Literal<"sending-paused">, Schema.Literal<"upstream-unavailable">, Schema.Literal<"retry">, Schema.Literal<"campaign-paused">, Schema.Literal<"domain-warming">, Schema.Literal<"onboarding-review">, Schema.Literal<"content-review">, Schema.Literal<"screening-unavailable">]>, Schema.Null]>;
1822
+ readonly reviewExpectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1823
+ readonly skippedRecipients: Schema.$Array<Schema.Struct<{
1824
+ readonly address: Schema.String;
1825
+ readonly reason: Schema.Union<readonly [Schema.Literal<"bounce">, Schema.Literal<"complaint">, Schema.Literal<"unsubscribe">, Schema.Literal<"manual">, Schema.Literal<"group-unsubscribe">]>;
1826
+ readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
1827
+ }>>;
1828
+ readonly executeUntil: Schema.Union<readonly [Schema.String, Schema.Null]>;
1829
+ readonly retryAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1830
+ readonly problem: Schema.Union<readonly [Schema.Struct<{
1831
+ readonly code: Schema.String;
1832
+ readonly message: Schema.String;
1833
+ readonly error: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
1834
+ readonly _tag: Schema.Literal<"SenderNotReadyError">;
1835
+ readonly message: Schema.String;
1836
+ readonly sender: Schema.String;
1837
+ readonly retryAfterSeconds: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1838
+ }>, Schema.Struct<{
1839
+ readonly _tag: Schema.Literal<"RateLimitedError">;
1840
+ readonly message: Schema.String;
1841
+ readonly retryAfterSeconds: Schema.Finite;
1842
+ }>, Schema.Struct<{
1843
+ readonly _tag: Schema.Literal<"OnboardingReviewRequiredError">;
1844
+ readonly message: Schema.String;
1845
+ readonly code: Schema.Union<readonly [Schema.Literal<"review_required">, Schema.Literal<"review_in_progress">, Schema.Literal<"information_required">, Schema.Literal<"review_rejected">, Schema.Literal<"identity_review_required">, Schema.Literal<"identity_review_rejected">, Schema.Literal<"identity_changed">]>;
1846
+ readonly decision: Schema.Union<readonly [Schema.Literal<"undecided">, Schema.Literal<"approved">, Schema.Literal<"rejected">]>;
1847
+ readonly stage: Schema.Union<readonly [Schema.Literal<"collecting">, Schema.Literal<"automated_review">, Schema.Literal<"manual_review">, Schema.Literal<"information_requested">, Schema.Literal<"complete">]>;
1848
+ readonly nextAction: Schema.Union<readonly [Schema.Literal<"wait_for_review">, Schema.Literal<"provide_information">, Schema.Literal<"verify_sending_identity">, Schema.Literal<"reapply">, Schema.Literal<"contact_support">]>;
1849
+ readonly identityId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1850
+ }>, Schema.Struct<{
1851
+ readonly _tag: Schema.Literal<"PaymentRequiredError">;
1852
+ readonly message: Schema.String;
1853
+ readonly resource: Schema.String;
1854
+ readonly currentUsage: Schema.Finite;
1855
+ readonly limit: Schema.Finite;
1856
+ }>, Schema.Struct<{
1857
+ readonly _tag: Schema.Literal<"ValidationError">;
1858
+ readonly message: Schema.String;
1859
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1860
+ }>, Schema.Struct<{
1861
+ readonly _tag: Schema.Literal<"ForbiddenError">;
1862
+ readonly message: Schema.String;
1863
+ }>, Schema.Struct<{
1864
+ readonly _tag: Schema.Literal<"ResourceNotFoundError">;
1865
+ readonly resource: Schema.String;
1866
+ readonly id: Schema.String;
1867
+ readonly message: Schema.String;
1868
+ }>]>, Schema.Null]>>;
1869
+ }>, Schema.Null]>;
1870
+ readonly retryEligible: Schema.Boolean;
1871
+ readonly decision: Schema.Union<readonly [Schema.Struct<{
1872
+ readonly outcome: Schema.Union<readonly [Schema.Literal<"allow">, Schema.Literal<"requireApproval">, Schema.Literal<"deny">]>;
1873
+ readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
1874
+ readonly policyId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxPolicyId">, Schema.Null]>;
1875
+ readonly source: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"grant">, Schema.Literal<"installation">, Schema.Literal<"policy">]>, Schema.Null]>;
1876
+ readonly decidedAt: Schema.String;
1877
+ }>, Schema.Null]>;
1878
+ readonly createdAt: Schema.String;
1879
+ readonly updatedAt: Schema.String;
1880
+ }>;
1881
+ export type OperationAccepted = {
1882
+ readonly operation: Operation;
1883
+ readonly links: {
1884
+ readonly self: string;
1885
+ readonly resource: OperationResourceLink;
1886
+ };
1887
+ };
1888
+ export declare const OperationAccepted: Schema.Struct<{
1889
+ readonly operation: Schema.Struct<{
1890
+ readonly id: Schema.brand<Schema.String, "OperationId">;
1891
+ readonly organizationId: Schema.String;
1892
+ readonly kind: Schema.Union<readonly [Schema.Literal<"email-domain-provisioning">, Schema.Literal<"organization-deletion">]>;
1893
+ readonly subject: Schema.Struct<{
1894
+ readonly type: Schema.String;
1895
+ readonly id: Schema.String;
1896
+ }>;
1897
+ readonly actor: Schema.Struct<{
1898
+ readonly type: Schema.Union<readonly [Schema.Literal<"user">, Schema.Literal<"api-key">, Schema.Literal<"system">]>;
1899
+ readonly id: Schema.String;
1900
+ }>;
1901
+ readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"running">, Schema.Literal<"succeeded">, Schema.Literal<"failed">]>;
1902
+ readonly phase: Schema.Union<readonly [Schema.Literal<"accepted">, Schema.Literal<"dispatching">, Schema.Literal<"provisioning">, Schema.Literal<"deleting">, Schema.Literal<"finalizing">, Schema.Literal<"completed">]>;
1903
+ readonly error: Schema.Union<readonly [Schema.Struct<{
1904
+ readonly code: Schema.Union<readonly [Schema.Literal<"validation-failed">, Schema.Literal<"conflict">, Schema.Literal<"capacity-unavailable">, Schema.Literal<"rejected">, Schema.Literal<"unavailable">, Schema.Literal<"timed-out">, Schema.Literal<"internal">]>;
1905
+ readonly message: Schema.String;
1906
+ }>, Schema.Null]>;
1907
+ readonly createdAt: Schema.String;
1908
+ readonly updatedAt: Schema.String;
1909
+ readonly startedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1910
+ readonly completedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
1911
+ }>;
1912
+ readonly links: Schema.Struct<{
1913
+ readonly self: Schema.String;
1914
+ readonly resource: Schema.Struct<{
1915
+ readonly resource: Schema.Struct<{
1916
+ readonly type: Schema.String;
1917
+ readonly id: Schema.String;
1918
+ }>;
1919
+ readonly href: Schema.String;
1920
+ }>;
1921
+ }>;
1922
+ }>;
1923
+ export type EmailContent = {
1924
+ readonly subject?: string | null;
1925
+ readonly html?: string | null;
1926
+ readonly text?: string | null;
1927
+ readonly attachments?: EmailAttachments;
1928
+ readonly publicationId?: TemplatePublicationId;
1929
+ readonly inputContractId?: TemplateInputContractId;
1930
+ readonly templateId?: TemplateId | null;
1931
+ readonly templateSlug?: string | null;
1932
+ readonly templateData?: TemplateData;
1933
+ readonly locale?: RenderLocale;
1934
+ readonly timeZone?: RenderTimeZone;
1935
+ readonly inReplyToMessageId?: MessageId | null;
1936
+ readonly replyTo?: ReplyToAddresses;
1937
+ readonly unsubscribeGroupId?: UnsubscribeId | null | null;
1938
+ readonly tracking?: EmailTrackingOverrideV1;
1939
+ readonly footer?: EmailFooterOverride;
1940
+ };
1941
+ export declare const EmailContent: Schema.Struct<{
1942
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1943
+ readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1944
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1945
+ readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
1946
+ readonly filename: Schema.String;
1947
+ readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1948
+ readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
1949
+ readonly contentType: Schema.String;
1950
+ readonly size: Schema.Finite;
1951
+ }>>, Schema.Null]>>;
1952
+ readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
1953
+ readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
1954
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
1955
+ readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1956
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1957
+ readonly locale: Schema.optionalKey<Schema.String>;
1958
+ readonly timeZone: Schema.optionalKey<Schema.String>;
1959
+ readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
1960
+ readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
1961
+ readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
1962
+ readonly tracking: Schema.optionalKey<Schema.Struct<{
1963
+ readonly opens: Schema.optionalKey<Schema.Boolean>;
1964
+ readonly clicks: Schema.optionalKey<Schema.Boolean>;
1965
+ }>>;
1966
+ readonly footer: Schema.optionalKey<Schema.Struct<{
1967
+ readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1968
+ }>>;
1969
+ }>;
1970
+ export type EmailDispatchContent = {
1971
+ readonly subject?: string | null;
1972
+ readonly html?: string | null;
1973
+ readonly text?: string | null;
1974
+ readonly attachments?: EmailAttachments;
1975
+ readonly publicationId?: TemplatePublicationId;
1976
+ readonly inputContractId?: TemplateInputContractId;
1977
+ readonly templateId?: TemplateId | null;
1978
+ readonly templateSlug?: string | null;
1979
+ readonly templateData?: TemplateData;
1980
+ readonly locale?: RenderLocale;
1981
+ readonly timeZone?: RenderTimeZone;
1982
+ readonly inReplyToMessageId?: MessageId | null;
1983
+ readonly replyTo?: ReplyToAddresses;
1984
+ readonly unsubscribeGroupId?: UnsubscribeId | null | null;
1985
+ readonly tracking?: EmailTrackingOverrideV1;
1986
+ readonly footer?: EmailFooterOverride;
1987
+ };
1988
+ export declare const EmailDispatchContent: Schema.Struct<{
1989
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1990
+ readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1991
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1992
+ readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
1993
+ readonly filename: Schema.String;
1994
+ readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1995
+ readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
1996
+ readonly contentType: Schema.String;
1997
+ readonly size: Schema.Finite;
1998
+ }>>, Schema.Null]>>;
1999
+ readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
2000
+ readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
2001
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
2002
+ readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2003
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2004
+ readonly locale: Schema.optionalKey<Schema.String>;
2005
+ readonly timeZone: Schema.optionalKey<Schema.String>;
2006
+ readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
2007
+ readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
2008
+ readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
2009
+ readonly tracking: Schema.optionalKey<Schema.Struct<{
2010
+ readonly opens: Schema.optionalKey<Schema.Boolean>;
2011
+ readonly clicks: Schema.optionalKey<Schema.Boolean>;
2012
+ }>>;
2013
+ readonly footer: Schema.optionalKey<Schema.Struct<{
2014
+ readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
2015
+ }>>;
2016
+ }>;
2017
+ export type BatchEventsPayload = {
2018
+ readonly events: readonly [CreateEventPayload, ...Array<CreateEventPayload>];
2019
+ };
2020
+ export declare const BatchEventsPayload: Schema.Struct<{
2021
+ readonly events: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
2022
+ readonly contact: Schema.Union<readonly [Schema.Struct<{
2023
+ readonly id: Schema.brand<Schema.String, "ContactId">;
2024
+ readonly externalId: Schema.optionalKey<Schema.Never>;
2025
+ readonly email: Schema.optionalKey<Schema.Never>;
2026
+ }>, Schema.Struct<{
2027
+ readonly externalId: Schema.String;
2028
+ readonly id: Schema.optionalKey<Schema.Never>;
2029
+ readonly email: Schema.optionalKey<Schema.Never>;
2030
+ }>, Schema.Struct<{
2031
+ readonly email: Schema.String;
2032
+ readonly id: Schema.optionalKey<Schema.Never>;
2033
+ readonly externalId: Schema.optionalKey<Schema.Never>;
2034
+ }>]>;
2035
+ readonly name: Schema.String;
2036
+ readonly properties: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2037
+ readonly occurredAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2038
+ readonly idempotencyKey: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2039
+ }>]>, readonly [Schema.Struct<{
2040
+ readonly contact: Schema.Union<readonly [Schema.Struct<{
2041
+ readonly id: Schema.brand<Schema.String, "ContactId">;
2042
+ readonly externalId: Schema.optionalKey<Schema.Never>;
2043
+ readonly email: Schema.optionalKey<Schema.Never>;
2044
+ }>, Schema.Struct<{
2045
+ readonly externalId: Schema.String;
2046
+ readonly id: Schema.optionalKey<Schema.Never>;
2047
+ readonly email: Schema.optionalKey<Schema.Never>;
2048
+ }>, Schema.Struct<{
2049
+ readonly email: Schema.String;
2050
+ readonly id: Schema.optionalKey<Schema.Never>;
2051
+ readonly externalId: Schema.optionalKey<Schema.Never>;
2052
+ }>]>;
2053
+ readonly name: Schema.String;
2054
+ readonly properties: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2055
+ readonly occurredAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2056
+ readonly idempotencyKey: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2057
+ }>]>;
2058
+ }>;
2059
+ export type JourneyWaitForEventNode = {
2060
+ readonly type: "wait_for_event";
2061
+ readonly config: JourneyWaitForEventConfig;
2062
+ readonly next: readonly [JourneyWaitEventEdge, JourneyWaitEventEdge];
2063
+ };
2064
+ export declare const JourneyWaitForEventNode: Schema.Struct<{
2065
+ readonly type: Schema.Literal<"wait_for_event">;
2066
+ readonly config: Schema.Struct<{
2067
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
2068
+ readonly timeoutSeconds: Schema.Finite;
2069
+ }>;
2070
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
2071
+ readonly nodeId: Schema.String;
2072
+ readonly outcome: Schema.Union<readonly [Schema.Literal<"matched">, Schema.Literal<"timed_out">]>;
2073
+ }>, Schema.Struct<{
2074
+ readonly nodeId: Schema.String;
2075
+ readonly outcome: Schema.Union<readonly [Schema.Literal<"matched">, Schema.Literal<"timed_out">]>;
2076
+ }>]>;
2077
+ }>;
2078
+ export type JourneyPredicate = JourneyTagPredicate | JourneyPropertyPredicate | JourneyCustomFieldPredicate | JourneyEventPredicate;
2079
+ export declare const JourneyPredicate: Schema.Union<readonly [Schema.Struct<{
2080
+ readonly type: Schema.Literal<"tag">;
2081
+ readonly tag: Schema.String;
2082
+ readonly present: Schema.Boolean;
2083
+ }>, Schema.Struct<{
2084
+ readonly type: Schema.Literal<"property">;
2085
+ readonly field: Schema.Union<readonly [Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"status">, Schema.Literal<"profile.firstName">, Schema.Literal<"profile.lastName">, Schema.Literal<"profile.company">, Schema.Literal<"profile.jobTitle">, Schema.Literal<"profile.source">, Schema.Literal<"profile.location.country">, Schema.Literal<"profile.location.state">, Schema.Literal<"profile.location.city">, Schema.Literal<"profile.location.timezone">]>;
2086
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2087
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2088
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2089
+ }>, Schema.Struct<{
2090
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2091
+ readonly value: Schema.Finite;
2092
+ }>, Schema.Struct<{
2093
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2094
+ readonly value: Schema.String;
2095
+ }>, Schema.Struct<{
2096
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2097
+ }>]>;
2098
+ }>, Schema.Struct<{
2099
+ readonly type: Schema.Literal<"custom_field">;
2100
+ readonly key: Schema.String;
2101
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2102
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2103
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2104
+ }>, Schema.Struct<{
2105
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2106
+ readonly value: Schema.Finite;
2107
+ }>, Schema.Struct<{
2108
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2109
+ readonly value: Schema.String;
2110
+ }>, Schema.Struct<{
2111
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2112
+ }>]>;
2113
+ }>, Schema.Struct<{
2114
+ readonly type: Schema.Literal<"event">;
2115
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
2116
+ readonly occurred: Schema.Boolean;
2117
+ }>]>;
2118
+ declare const MailboxSendRefusedError_base: Schema.Class<MailboxSendRefusedError, Schema.Struct<{
2119
+ readonly _tag: Schema.tag<"MailboxSendRefusedError">;
2120
+ readonly message: Schema.String;
2121
+ readonly receipt: Schema.Struct<{
2122
+ readonly actionId: Schema.brand<Schema.String, "MailboxActionId">;
2123
+ readonly draftId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxDraftId">, Schema.Null]>;
2124
+ readonly messageId: Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>;
2125
+ readonly threadId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxThreadId">, Schema.Null]>;
2126
+ readonly state: Schema.Union<readonly [Schema.Literal<"approvalRequired">, Schema.Literal<"queued">, Schema.Literal<"accepted">, Schema.Literal<"completed">, Schema.Literal<"notSent">, Schema.Literal<"uncertain">]>;
2127
+ readonly acceptedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
2128
+ readonly waitReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"rate">, Schema.Literal<"daily-quota">, Schema.Literal<"domain-health">, Schema.Literal<"sending-paused">, Schema.Literal<"upstream-unavailable">, Schema.Literal<"retry">, Schema.Literal<"campaign-paused">, Schema.Literal<"domain-warming">, Schema.Literal<"onboarding-review">, Schema.Literal<"content-review">, Schema.Literal<"screening-unavailable">]>, Schema.Null]>;
2129
+ readonly reviewExpectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
2130
+ readonly skippedRecipients: Schema.$Array<Schema.Struct<{
2131
+ readonly address: Schema.String;
2132
+ readonly reason: Schema.Union<readonly [Schema.Literal<"bounce">, Schema.Literal<"complaint">, Schema.Literal<"unsubscribe">, Schema.Literal<"manual">, Schema.Literal<"group-unsubscribe">]>;
2133
+ readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
2134
+ }>>;
2135
+ readonly executeUntil: Schema.Union<readonly [Schema.String, Schema.Null]>;
2136
+ readonly retryAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
2137
+ readonly problem: Schema.Union<readonly [Schema.Struct<{
2138
+ readonly code: Schema.String;
2139
+ readonly message: Schema.String;
2140
+ readonly error: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
2141
+ readonly _tag: Schema.Literal<"SenderNotReadyError">;
2142
+ readonly message: Schema.String;
2143
+ readonly sender: Schema.String;
2144
+ readonly retryAfterSeconds: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
2145
+ }>, Schema.Struct<{
2146
+ readonly _tag: Schema.Literal<"RateLimitedError">;
2147
+ readonly message: Schema.String;
2148
+ readonly retryAfterSeconds: Schema.Finite;
2149
+ }>, Schema.Struct<{
2150
+ readonly _tag: Schema.Literal<"OnboardingReviewRequiredError">;
2151
+ readonly message: Schema.String;
2152
+ readonly code: Schema.Union<readonly [Schema.Literal<"review_required">, Schema.Literal<"review_in_progress">, Schema.Literal<"information_required">, Schema.Literal<"review_rejected">, Schema.Literal<"identity_review_required">, Schema.Literal<"identity_review_rejected">, Schema.Literal<"identity_changed">]>;
2153
+ readonly decision: Schema.Union<readonly [Schema.Literal<"undecided">, Schema.Literal<"approved">, Schema.Literal<"rejected">]>;
2154
+ readonly stage: Schema.Union<readonly [Schema.Literal<"collecting">, Schema.Literal<"automated_review">, Schema.Literal<"manual_review">, Schema.Literal<"information_requested">, Schema.Literal<"complete">]>;
2155
+ readonly nextAction: Schema.Union<readonly [Schema.Literal<"wait_for_review">, Schema.Literal<"provide_information">, Schema.Literal<"verify_sending_identity">, Schema.Literal<"reapply">, Schema.Literal<"contact_support">]>;
2156
+ readonly identityId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2157
+ }>, Schema.Struct<{
2158
+ readonly _tag: Schema.Literal<"PaymentRequiredError">;
2159
+ readonly message: Schema.String;
2160
+ readonly resource: Schema.String;
2161
+ readonly currentUsage: Schema.Finite;
2162
+ readonly limit: Schema.Finite;
2163
+ }>, Schema.Struct<{
2164
+ readonly _tag: Schema.Literal<"ValidationError">;
2165
+ readonly message: Schema.String;
2166
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
2167
+ }>, Schema.Struct<{
2168
+ readonly _tag: Schema.Literal<"ForbiddenError">;
2169
+ readonly message: Schema.String;
2170
+ }>, Schema.Struct<{
2171
+ readonly _tag: Schema.Literal<"ResourceNotFoundError">;
2172
+ readonly resource: Schema.String;
2173
+ readonly id: Schema.String;
2174
+ readonly message: Schema.String;
2175
+ }>]>, Schema.Null]>>;
2176
+ }>, Schema.Null]>;
2177
+ readonly retryEligible: Schema.Boolean;
2178
+ readonly decision: Schema.Union<readonly [Schema.Struct<{
2179
+ readonly outcome: Schema.Union<readonly [Schema.Literal<"allow">, Schema.Literal<"requireApproval">, Schema.Literal<"deny">]>;
2180
+ readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
2181
+ readonly policyId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxPolicyId">, Schema.Null]>;
2182
+ readonly source: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"grant">, Schema.Literal<"installation">, Schema.Literal<"policy">]>, Schema.Null]>;
2183
+ readonly decidedAt: Schema.String;
2184
+ }>, Schema.Null]>;
2185
+ readonly createdAt: Schema.String;
2186
+ readonly updatedAt: Schema.String;
2187
+ }>;
2188
+ }>, import("effect/Cause").YieldableError>;
2189
+ export declare class MailboxSendRefusedError extends MailboxSendRefusedError_base {
2190
+ }
2191
+ declare const MailboxSendConflictError_base: Schema.Class<MailboxSendConflictError, Schema.Struct<{
2192
+ readonly _tag: Schema.tag<"MailboxSendConflictError">;
2193
+ readonly message: Schema.String;
2194
+ readonly resource: Schema.String;
2195
+ readonly id: Schema.brand<Schema.String, "MailboxActionId">;
2196
+ readonly receipt: Schema.Struct<{
2197
+ readonly actionId: Schema.brand<Schema.String, "MailboxActionId">;
2198
+ readonly draftId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxDraftId">, Schema.Null]>;
2199
+ readonly messageId: Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>;
2200
+ readonly threadId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxThreadId">, Schema.Null]>;
2201
+ readonly state: Schema.Union<readonly [Schema.Literal<"approvalRequired">, Schema.Literal<"queued">, Schema.Literal<"accepted">, Schema.Literal<"completed">, Schema.Literal<"notSent">, Schema.Literal<"uncertain">]>;
2202
+ readonly acceptedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
2203
+ readonly waitReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"rate">, Schema.Literal<"daily-quota">, Schema.Literal<"domain-health">, Schema.Literal<"sending-paused">, Schema.Literal<"upstream-unavailable">, Schema.Literal<"retry">, Schema.Literal<"campaign-paused">, Schema.Literal<"domain-warming">, Schema.Literal<"onboarding-review">, Schema.Literal<"content-review">, Schema.Literal<"screening-unavailable">]>, Schema.Null]>;
2204
+ readonly reviewExpectedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
2205
+ readonly skippedRecipients: Schema.$Array<Schema.Struct<{
2206
+ readonly address: Schema.String;
2207
+ readonly reason: Schema.Union<readonly [Schema.Literal<"bounce">, Schema.Literal<"complaint">, Schema.Literal<"unsubscribe">, Schema.Literal<"manual">, Schema.Literal<"group-unsubscribe">]>;
2208
+ readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
2209
+ }>>;
2210
+ readonly executeUntil: Schema.Union<readonly [Schema.String, Schema.Null]>;
2211
+ readonly retryAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
2212
+ readonly problem: Schema.Union<readonly [Schema.Struct<{
2213
+ readonly code: Schema.String;
2214
+ readonly message: Schema.String;
2215
+ readonly error: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
2216
+ readonly _tag: Schema.Literal<"SenderNotReadyError">;
2217
+ readonly message: Schema.String;
2218
+ readonly sender: Schema.String;
2219
+ readonly retryAfterSeconds: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
2220
+ }>, Schema.Struct<{
2221
+ readonly _tag: Schema.Literal<"RateLimitedError">;
2222
+ readonly message: Schema.String;
2223
+ readonly retryAfterSeconds: Schema.Finite;
2224
+ }>, Schema.Struct<{
2225
+ readonly _tag: Schema.Literal<"OnboardingReviewRequiredError">;
2226
+ readonly message: Schema.String;
2227
+ readonly code: Schema.Union<readonly [Schema.Literal<"review_required">, Schema.Literal<"review_in_progress">, Schema.Literal<"information_required">, Schema.Literal<"review_rejected">, Schema.Literal<"identity_review_required">, Schema.Literal<"identity_review_rejected">, Schema.Literal<"identity_changed">]>;
2228
+ readonly decision: Schema.Union<readonly [Schema.Literal<"undecided">, Schema.Literal<"approved">, Schema.Literal<"rejected">]>;
2229
+ readonly stage: Schema.Union<readonly [Schema.Literal<"collecting">, Schema.Literal<"automated_review">, Schema.Literal<"manual_review">, Schema.Literal<"information_requested">, Schema.Literal<"complete">]>;
2230
+ readonly nextAction: Schema.Union<readonly [Schema.Literal<"wait_for_review">, Schema.Literal<"provide_information">, Schema.Literal<"verify_sending_identity">, Schema.Literal<"reapply">, Schema.Literal<"contact_support">]>;
2231
+ readonly identityId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2232
+ }>, Schema.Struct<{
2233
+ readonly _tag: Schema.Literal<"PaymentRequiredError">;
2234
+ readonly message: Schema.String;
2235
+ readonly resource: Schema.String;
2236
+ readonly currentUsage: Schema.Finite;
2237
+ readonly limit: Schema.Finite;
2238
+ }>, Schema.Struct<{
2239
+ readonly _tag: Schema.Literal<"ValidationError">;
2240
+ readonly message: Schema.String;
2241
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
2242
+ }>, Schema.Struct<{
2243
+ readonly _tag: Schema.Literal<"ForbiddenError">;
2244
+ readonly message: Schema.String;
2245
+ }>, Schema.Struct<{
2246
+ readonly _tag: Schema.Literal<"ResourceNotFoundError">;
2247
+ readonly resource: Schema.String;
2248
+ readonly id: Schema.String;
2249
+ readonly message: Schema.String;
2250
+ }>]>, Schema.Null]>>;
2251
+ }>, Schema.Null]>;
2252
+ readonly retryEligible: Schema.Boolean;
2253
+ readonly decision: Schema.Union<readonly [Schema.Struct<{
2254
+ readonly outcome: Schema.Union<readonly [Schema.Literal<"allow">, Schema.Literal<"requireApproval">, Schema.Literal<"deny">]>;
2255
+ readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
2256
+ readonly policyId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxPolicyId">, Schema.Null]>;
2257
+ readonly source: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"grant">, Schema.Literal<"installation">, Schema.Literal<"policy">]>, Schema.Null]>;
2258
+ readonly decidedAt: Schema.String;
2259
+ }>, Schema.Null]>;
2260
+ readonly createdAt: Schema.String;
2261
+ readonly updatedAt: Schema.String;
2262
+ }>;
2263
+ }>, import("effect/Cause").YieldableError>;
2264
+ export declare class MailboxSendConflictError extends MailboxSendConflictError_base {
2265
+ }
2266
+ export type EmailSendMessagePayload = {
2267
+ readonly conversationId?: ConversationId | null | null;
2268
+ readonly metadata?: MessageMetadata;
2269
+ readonly channel: "email";
2270
+ readonly to: EmailRecipients;
2271
+ readonly cc?: EmailCcRecipients;
2272
+ readonly bcc?: EmailBccRecipients;
2273
+ readonly from?: EmailSender;
2274
+ readonly email: EmailContent;
2275
+ };
2276
+ export declare const EmailSendMessagePayload: Schema.Struct<{
2277
+ readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
2278
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2279
+ readonly channel: Schema.Literal<"email">;
2280
+ readonly to: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2281
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
2282
+ }>, Schema.Struct<{
2283
+ readonly email: Schema.String;
2284
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2285
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
2286
+ }>]>>;
2287
+ readonly cc: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2288
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
2289
+ }>, Schema.Struct<{
2290
+ readonly email: Schema.String;
2291
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2292
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
2293
+ }>]>>, Schema.Null]>, Schema.Null]>>;
2294
+ readonly bcc: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2295
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
2296
+ }>, Schema.Struct<{
2297
+ readonly email: Schema.String;
2298
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2299
+ readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
2300
+ }>]>>, Schema.Null]>, Schema.Null]>>;
2301
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
2302
+ readonly email: Schema.String;
2303
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2304
+ }>, Schema.Null]>>;
2305
+ readonly email: Schema.Struct<{
2306
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2307
+ readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2308
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2309
+ readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
2310
+ readonly filename: Schema.String;
2311
+ readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2312
+ readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
2313
+ readonly contentType: Schema.String;
2314
+ readonly size: Schema.Finite;
2315
+ }>>, Schema.Null]>>;
2316
+ readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
2317
+ readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
2318
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
2319
+ readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2320
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2321
+ readonly locale: Schema.optionalKey<Schema.String>;
2322
+ readonly timeZone: Schema.optionalKey<Schema.String>;
2323
+ readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
2324
+ readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
2325
+ readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
2326
+ readonly tracking: Schema.optionalKey<Schema.Struct<{
2327
+ readonly opens: Schema.optionalKey<Schema.Boolean>;
2328
+ readonly clicks: Schema.optionalKey<Schema.Boolean>;
2329
+ }>>;
2330
+ readonly footer: Schema.optionalKey<Schema.Struct<{
2331
+ readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
2332
+ }>>;
2333
+ }>;
2334
+ }>;
2335
+ export type JourneyCondition = {
2336
+ readonly match: "all" | "any";
2337
+ readonly predicates: readonly [JourneyPredicate, ...Array<JourneyPredicate>];
2338
+ };
2339
+ export declare const JourneyCondition: Schema.Struct<{
2340
+ readonly match: Schema.Union<readonly [Schema.Literal<"all">, Schema.Literal<"any">]>;
2341
+ readonly predicates: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Union<readonly [Schema.Struct<{
2342
+ readonly type: Schema.Literal<"tag">;
2343
+ readonly tag: Schema.String;
2344
+ readonly present: Schema.Boolean;
2345
+ }>, Schema.Struct<{
2346
+ readonly type: Schema.Literal<"property">;
2347
+ readonly field: Schema.Union<readonly [Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"status">, Schema.Literal<"profile.firstName">, Schema.Literal<"profile.lastName">, Schema.Literal<"profile.company">, Schema.Literal<"profile.jobTitle">, Schema.Literal<"profile.source">, Schema.Literal<"profile.location.country">, Schema.Literal<"profile.location.state">, Schema.Literal<"profile.location.city">, Schema.Literal<"profile.location.timezone">]>;
2348
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2349
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2350
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2351
+ }>, Schema.Struct<{
2352
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2353
+ readonly value: Schema.Finite;
2354
+ }>, Schema.Struct<{
2355
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2356
+ readonly value: Schema.String;
2357
+ }>, Schema.Struct<{
2358
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2359
+ }>]>;
2360
+ }>, Schema.Struct<{
2361
+ readonly type: Schema.Literal<"custom_field">;
2362
+ readonly key: Schema.String;
2363
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2364
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2365
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2366
+ }>, Schema.Struct<{
2367
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2368
+ readonly value: Schema.Finite;
2369
+ }>, Schema.Struct<{
2370
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2371
+ readonly value: Schema.String;
2372
+ }>, Schema.Struct<{
2373
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2374
+ }>]>;
2375
+ }>, Schema.Struct<{
2376
+ readonly type: Schema.Literal<"event">;
2377
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
2378
+ readonly occurred: Schema.Boolean;
2379
+ }>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
2380
+ readonly type: Schema.Literal<"tag">;
2381
+ readonly tag: Schema.String;
2382
+ readonly present: Schema.Boolean;
2383
+ }>, Schema.Struct<{
2384
+ readonly type: Schema.Literal<"property">;
2385
+ readonly field: Schema.Union<readonly [Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"status">, Schema.Literal<"profile.firstName">, Schema.Literal<"profile.lastName">, Schema.Literal<"profile.company">, Schema.Literal<"profile.jobTitle">, Schema.Literal<"profile.source">, Schema.Literal<"profile.location.country">, Schema.Literal<"profile.location.state">, Schema.Literal<"profile.location.city">, Schema.Literal<"profile.location.timezone">]>;
2386
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2387
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2388
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2389
+ }>, Schema.Struct<{
2390
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2391
+ readonly value: Schema.Finite;
2392
+ }>, Schema.Struct<{
2393
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2394
+ readonly value: Schema.String;
2395
+ }>, Schema.Struct<{
2396
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2397
+ }>]>;
2398
+ }>, Schema.Struct<{
2399
+ readonly type: Schema.Literal<"custom_field">;
2400
+ readonly key: Schema.String;
2401
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2402
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2403
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2404
+ }>, Schema.Struct<{
2405
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2406
+ readonly value: Schema.Finite;
2407
+ }>, Schema.Struct<{
2408
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2409
+ readonly value: Schema.String;
2410
+ }>, Schema.Struct<{
2411
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2412
+ }>]>;
2413
+ }>, Schema.Struct<{
2414
+ readonly type: Schema.Literal<"event">;
2415
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
2416
+ readonly occurred: Schema.Boolean;
2417
+ }>]>]>;
2418
+ }>;
2419
+ export type JourneyBranchEdge = {
2420
+ readonly nodeId: JourneyNodeId;
2421
+ readonly condition?: JourneyCondition;
2422
+ };
2423
+ export declare const JourneyBranchEdge: Schema.Struct<{
2424
+ readonly nodeId: Schema.String;
2425
+ readonly condition: Schema.optionalKey<Schema.Struct<{
2426
+ readonly match: Schema.Union<readonly [Schema.Literal<"all">, Schema.Literal<"any">]>;
2427
+ readonly predicates: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Union<readonly [Schema.Struct<{
2428
+ readonly type: Schema.Literal<"tag">;
2429
+ readonly tag: Schema.String;
2430
+ readonly present: Schema.Boolean;
2431
+ }>, Schema.Struct<{
2432
+ readonly type: Schema.Literal<"property">;
2433
+ readonly field: Schema.Union<readonly [Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"status">, Schema.Literal<"profile.firstName">, Schema.Literal<"profile.lastName">, Schema.Literal<"profile.company">, Schema.Literal<"profile.jobTitle">, Schema.Literal<"profile.source">, Schema.Literal<"profile.location.country">, Schema.Literal<"profile.location.state">, Schema.Literal<"profile.location.city">, Schema.Literal<"profile.location.timezone">]>;
2434
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2435
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2436
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2437
+ }>, Schema.Struct<{
2438
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2439
+ readonly value: Schema.Finite;
2440
+ }>, Schema.Struct<{
2441
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2442
+ readonly value: Schema.String;
2443
+ }>, Schema.Struct<{
2444
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2445
+ }>]>;
2446
+ }>, Schema.Struct<{
2447
+ readonly type: Schema.Literal<"custom_field">;
2448
+ readonly key: Schema.String;
2449
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2450
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2451
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2452
+ }>, Schema.Struct<{
2453
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2454
+ readonly value: Schema.Finite;
2455
+ }>, Schema.Struct<{
2456
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2457
+ readonly value: Schema.String;
2458
+ }>, Schema.Struct<{
2459
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2460
+ }>]>;
2461
+ }>, Schema.Struct<{
2462
+ readonly type: Schema.Literal<"event">;
2463
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
2464
+ readonly occurred: Schema.Boolean;
2465
+ }>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
2466
+ readonly type: Schema.Literal<"tag">;
2467
+ readonly tag: Schema.String;
2468
+ readonly present: Schema.Boolean;
2469
+ }>, Schema.Struct<{
2470
+ readonly type: Schema.Literal<"property">;
2471
+ readonly field: Schema.Union<readonly [Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"status">, Schema.Literal<"profile.firstName">, Schema.Literal<"profile.lastName">, Schema.Literal<"profile.company">, Schema.Literal<"profile.jobTitle">, Schema.Literal<"profile.source">, Schema.Literal<"profile.location.country">, Schema.Literal<"profile.location.state">, Schema.Literal<"profile.location.city">, Schema.Literal<"profile.location.timezone">]>;
2472
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2473
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2474
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2475
+ }>, Schema.Struct<{
2476
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2477
+ readonly value: Schema.Finite;
2478
+ }>, Schema.Struct<{
2479
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2480
+ readonly value: Schema.String;
2481
+ }>, Schema.Struct<{
2482
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2483
+ }>]>;
2484
+ }>, Schema.Struct<{
2485
+ readonly type: Schema.Literal<"custom_field">;
2486
+ readonly key: Schema.String;
2487
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2488
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2489
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2490
+ }>, Schema.Struct<{
2491
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2492
+ readonly value: Schema.Finite;
2493
+ }>, Schema.Struct<{
2494
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2495
+ readonly value: Schema.String;
2496
+ }>, Schema.Struct<{
2497
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2498
+ }>]>;
2499
+ }>, Schema.Struct<{
2500
+ readonly type: Schema.Literal<"event">;
2501
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
2502
+ readonly occurred: Schema.Boolean;
2503
+ }>]>]>;
2504
+ }>>;
2505
+ }>;
2506
+ export type JourneyBranchNode = {
2507
+ readonly type: "branch";
2508
+ readonly config: JourneyEmptyConfig;
2509
+ readonly next: ReadonlyArray<JourneyBranchEdge>;
2510
+ };
2511
+ export declare const JourneyBranchNode: Schema.Struct<{
2512
+ readonly type: Schema.Literal<"branch">;
2513
+ readonly config: Schema.$Record<Schema.String, Schema.Never>;
2514
+ readonly next: Schema.$Array<Schema.Struct<{
2515
+ readonly nodeId: Schema.String;
2516
+ readonly condition: Schema.optionalKey<Schema.Struct<{
2517
+ readonly match: Schema.Union<readonly [Schema.Literal<"all">, Schema.Literal<"any">]>;
2518
+ readonly predicates: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Union<readonly [Schema.Struct<{
2519
+ readonly type: Schema.Literal<"tag">;
2520
+ readonly tag: Schema.String;
2521
+ readonly present: Schema.Boolean;
2522
+ }>, Schema.Struct<{
2523
+ readonly type: Schema.Literal<"property">;
2524
+ readonly field: Schema.Union<readonly [Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"status">, Schema.Literal<"profile.firstName">, Schema.Literal<"profile.lastName">, Schema.Literal<"profile.company">, Schema.Literal<"profile.jobTitle">, Schema.Literal<"profile.source">, Schema.Literal<"profile.location.country">, Schema.Literal<"profile.location.state">, Schema.Literal<"profile.location.city">, Schema.Literal<"profile.location.timezone">]>;
2525
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2526
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2527
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2528
+ }>, Schema.Struct<{
2529
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2530
+ readonly value: Schema.Finite;
2531
+ }>, Schema.Struct<{
2532
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2533
+ readonly value: Schema.String;
2534
+ }>, Schema.Struct<{
2535
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2536
+ }>]>;
2537
+ }>, Schema.Struct<{
2538
+ readonly type: Schema.Literal<"custom_field">;
2539
+ readonly key: Schema.String;
2540
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2541
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2542
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2543
+ }>, Schema.Struct<{
2544
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2545
+ readonly value: Schema.Finite;
2546
+ }>, Schema.Struct<{
2547
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2548
+ readonly value: Schema.String;
2549
+ }>, Schema.Struct<{
2550
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2551
+ }>]>;
2552
+ }>, Schema.Struct<{
2553
+ readonly type: Schema.Literal<"event">;
2554
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
2555
+ readonly occurred: Schema.Boolean;
2556
+ }>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
2557
+ readonly type: Schema.Literal<"tag">;
2558
+ readonly tag: Schema.String;
2559
+ readonly present: Schema.Boolean;
2560
+ }>, Schema.Struct<{
2561
+ readonly type: Schema.Literal<"property">;
2562
+ readonly field: Schema.Union<readonly [Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"status">, Schema.Literal<"profile.firstName">, Schema.Literal<"profile.lastName">, Schema.Literal<"profile.company">, Schema.Literal<"profile.jobTitle">, Schema.Literal<"profile.source">, Schema.Literal<"profile.location.country">, Schema.Literal<"profile.location.state">, Schema.Literal<"profile.location.city">, Schema.Literal<"profile.location.timezone">]>;
2563
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2564
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2565
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2566
+ }>, Schema.Struct<{
2567
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2568
+ readonly value: Schema.Finite;
2569
+ }>, Schema.Struct<{
2570
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2571
+ readonly value: Schema.String;
2572
+ }>, Schema.Struct<{
2573
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2574
+ }>]>;
2575
+ }>, Schema.Struct<{
2576
+ readonly type: Schema.Literal<"custom_field">;
2577
+ readonly key: Schema.String;
2578
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2579
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2580
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2581
+ }>, Schema.Struct<{
2582
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2583
+ readonly value: Schema.Finite;
2584
+ }>, Schema.Struct<{
2585
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2586
+ readonly value: Schema.String;
2587
+ }>, Schema.Struct<{
2588
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2589
+ }>]>;
2590
+ }>, Schema.Struct<{
2591
+ readonly type: Schema.Literal<"event">;
2592
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
2593
+ readonly occurred: Schema.Boolean;
2594
+ }>]>]>;
2595
+ }>>;
2596
+ }>>;
2597
+ }>;
2598
+ export type JourneyNode = JourneySendEmailNode | JourneyWaitNode | JourneyWaitForEventNode | JourneyBranchNode | JourneyUpdateTagsNode | JourneyWebhookNode | JourneyExitNode;
2599
+ export declare const JourneyNode: Schema.Union<readonly [Schema.Struct<{
2600
+ readonly type: Schema.Literal<"send_email">;
2601
+ readonly config: Schema.Struct<{
2602
+ readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
2603
+ readonly senderId: Schema.optionalKey<Schema.brand<Schema.String, "EmailSenderId">>;
2604
+ readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
2605
+ }>;
2606
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
2607
+ readonly nodeId: Schema.String;
2608
+ }>]>;
2609
+ }>, Schema.Struct<{
2610
+ readonly type: Schema.Literal<"wait">;
2611
+ readonly config: Schema.Struct<{
2612
+ readonly durationSeconds: Schema.Finite;
2613
+ }>;
2614
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
2615
+ readonly nodeId: Schema.String;
2616
+ }>]>;
2617
+ }>, Schema.Struct<{
2618
+ readonly type: Schema.Literal<"wait_for_event">;
2619
+ readonly config: Schema.Struct<{
2620
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
2621
+ readonly timeoutSeconds: Schema.Finite;
2622
+ }>;
2623
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
2624
+ readonly nodeId: Schema.String;
2625
+ readonly outcome: Schema.Union<readonly [Schema.Literal<"matched">, Schema.Literal<"timed_out">]>;
2626
+ }>, Schema.Struct<{
2627
+ readonly nodeId: Schema.String;
2628
+ readonly outcome: Schema.Union<readonly [Schema.Literal<"matched">, Schema.Literal<"timed_out">]>;
2629
+ }>]>;
2630
+ }>, Schema.Struct<{
2631
+ readonly type: Schema.Literal<"branch">;
2632
+ readonly config: Schema.$Record<Schema.String, Schema.Never>;
2633
+ readonly next: Schema.$Array<Schema.Struct<{
2634
+ readonly nodeId: Schema.String;
2635
+ readonly condition: Schema.optionalKey<Schema.Struct<{
2636
+ readonly match: Schema.Union<readonly [Schema.Literal<"all">, Schema.Literal<"any">]>;
2637
+ readonly predicates: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Union<readonly [Schema.Struct<{
2638
+ readonly type: Schema.Literal<"tag">;
2639
+ readonly tag: Schema.String;
2640
+ readonly present: Schema.Boolean;
2641
+ }>, Schema.Struct<{
2642
+ readonly type: Schema.Literal<"property">;
2643
+ readonly field: Schema.Union<readonly [Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"status">, Schema.Literal<"profile.firstName">, Schema.Literal<"profile.lastName">, Schema.Literal<"profile.company">, Schema.Literal<"profile.jobTitle">, Schema.Literal<"profile.source">, Schema.Literal<"profile.location.country">, Schema.Literal<"profile.location.state">, Schema.Literal<"profile.location.city">, Schema.Literal<"profile.location.timezone">]>;
2644
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2645
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2646
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2647
+ }>, Schema.Struct<{
2648
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2649
+ readonly value: Schema.Finite;
2650
+ }>, Schema.Struct<{
2651
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2652
+ readonly value: Schema.String;
2653
+ }>, Schema.Struct<{
2654
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2655
+ }>]>;
2656
+ }>, Schema.Struct<{
2657
+ readonly type: Schema.Literal<"custom_field">;
2658
+ readonly key: Schema.String;
2659
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2660
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2661
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2662
+ }>, Schema.Struct<{
2663
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2664
+ readonly value: Schema.Finite;
2665
+ }>, Schema.Struct<{
2666
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2667
+ readonly value: Schema.String;
2668
+ }>, Schema.Struct<{
2669
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2670
+ }>]>;
2671
+ }>, Schema.Struct<{
2672
+ readonly type: Schema.Literal<"event">;
2673
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
2674
+ readonly occurred: Schema.Boolean;
2675
+ }>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
2676
+ readonly type: Schema.Literal<"tag">;
2677
+ readonly tag: Schema.String;
2678
+ readonly present: Schema.Boolean;
2679
+ }>, Schema.Struct<{
2680
+ readonly type: Schema.Literal<"property">;
2681
+ readonly field: Schema.Union<readonly [Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"status">, Schema.Literal<"profile.firstName">, Schema.Literal<"profile.lastName">, Schema.Literal<"profile.company">, Schema.Literal<"profile.jobTitle">, Schema.Literal<"profile.source">, Schema.Literal<"profile.location.country">, Schema.Literal<"profile.location.state">, Schema.Literal<"profile.location.city">, Schema.Literal<"profile.location.timezone">]>;
2682
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2683
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2684
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2685
+ }>, Schema.Struct<{
2686
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2687
+ readonly value: Schema.Finite;
2688
+ }>, Schema.Struct<{
2689
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2690
+ readonly value: Schema.String;
2691
+ }>, Schema.Struct<{
2692
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2693
+ }>]>;
2694
+ }>, Schema.Struct<{
2695
+ readonly type: Schema.Literal<"custom_field">;
2696
+ readonly key: Schema.String;
2697
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2698
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2699
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2700
+ }>, Schema.Struct<{
2701
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2702
+ readonly value: Schema.Finite;
2703
+ }>, Schema.Struct<{
2704
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2705
+ readonly value: Schema.String;
2706
+ }>, Schema.Struct<{
2707
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2708
+ }>]>;
2709
+ }>, Schema.Struct<{
2710
+ readonly type: Schema.Literal<"event">;
2711
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
2712
+ readonly occurred: Schema.Boolean;
2713
+ }>]>]>;
2714
+ }>>;
2715
+ }>>;
2716
+ }>, Schema.Struct<{
2717
+ readonly type: Schema.Literal<"update_tags">;
2718
+ readonly config: Schema.Struct<{
2719
+ readonly add: Schema.$Array<Schema.String>;
2720
+ readonly remove: Schema.$Array<Schema.String>;
2721
+ }>;
2722
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
2723
+ readonly nodeId: Schema.String;
2724
+ }>]>;
2725
+ }>, Schema.Struct<{
2726
+ readonly type: Schema.Literal<"webhook">;
2727
+ readonly config: Schema.Struct<{
2728
+ readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
2729
+ }>;
2730
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
2731
+ readonly nodeId: Schema.String;
2732
+ }>]>;
2733
+ }>, Schema.Struct<{
2734
+ readonly type: Schema.Literal<"exit">;
2735
+ readonly config: Schema.$Record<Schema.String, Schema.Never>;
2736
+ readonly next: Schema.Tuple<readonly []>;
2737
+ }>]>;
2738
+ export type JourneyDefinition = {
2739
+ readonly trigger: JourneyTrigger;
2740
+ readonly rootNodeId: JourneyNodeId;
2741
+ readonly nodes: {
2742
+ readonly [x: string]: JourneyNode;
2743
+ };
2744
+ readonly goal?: JourneyGoal;
2745
+ readonly reentry?: boolean;
2746
+ };
2747
+ export declare const JourneyDefinition: Schema.Struct<{
2748
+ readonly trigger: Schema.Union<readonly [Schema.Struct<{
2749
+ readonly type: Schema.Literal<"event">;
2750
+ readonly eventName: Schema.String;
2751
+ }>, Schema.Struct<{
2752
+ readonly type: Schema.Literal<"contact.created">;
2753
+ }>, Schema.Struct<{
2754
+ readonly type: Schema.Literal<"contact.tag_added">;
2755
+ readonly tag: Schema.String;
2756
+ }>, Schema.Struct<{
2757
+ readonly type: Schema.Literal<"contact.joined_group">;
2758
+ readonly groupId: Schema.brand<Schema.String, "ContactGroupId">;
2759
+ }>]>;
2760
+ readonly rootNodeId: Schema.String;
2761
+ readonly nodes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
2762
+ readonly type: Schema.Literal<"send_email">;
2763
+ readonly config: Schema.Struct<{
2764
+ readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
2765
+ readonly senderId: Schema.optionalKey<Schema.brand<Schema.String, "EmailSenderId">>;
2766
+ readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
2767
+ }>;
2768
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
2769
+ readonly nodeId: Schema.String;
2770
+ }>]>;
2771
+ }>, Schema.Struct<{
2772
+ readonly type: Schema.Literal<"wait">;
2773
+ readonly config: Schema.Struct<{
2774
+ readonly durationSeconds: Schema.Finite;
2775
+ }>;
2776
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
2777
+ readonly nodeId: Schema.String;
2778
+ }>]>;
2779
+ }>, Schema.Struct<{
2780
+ readonly type: Schema.Literal<"wait_for_event">;
2781
+ readonly config: Schema.Struct<{
2782
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
2783
+ readonly timeoutSeconds: Schema.Finite;
2784
+ }>;
2785
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
2786
+ readonly nodeId: Schema.String;
2787
+ readonly outcome: Schema.Union<readonly [Schema.Literal<"matched">, Schema.Literal<"timed_out">]>;
2788
+ }>, Schema.Struct<{
2789
+ readonly nodeId: Schema.String;
2790
+ readonly outcome: Schema.Union<readonly [Schema.Literal<"matched">, Schema.Literal<"timed_out">]>;
2791
+ }>]>;
2792
+ }>, Schema.Struct<{
2793
+ readonly type: Schema.Literal<"branch">;
2794
+ readonly config: Schema.$Record<Schema.String, Schema.Never>;
2795
+ readonly next: Schema.$Array<Schema.Struct<{
2796
+ readonly nodeId: Schema.String;
2797
+ readonly condition: Schema.optionalKey<Schema.Struct<{
2798
+ readonly match: Schema.Union<readonly [Schema.Literal<"all">, Schema.Literal<"any">]>;
2799
+ readonly predicates: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Union<readonly [Schema.Struct<{
2800
+ readonly type: Schema.Literal<"tag">;
2801
+ readonly tag: Schema.String;
2802
+ readonly present: Schema.Boolean;
2803
+ }>, Schema.Struct<{
2804
+ readonly type: Schema.Literal<"property">;
2805
+ readonly field: Schema.Union<readonly [Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"status">, Schema.Literal<"profile.firstName">, Schema.Literal<"profile.lastName">, Schema.Literal<"profile.company">, Schema.Literal<"profile.jobTitle">, Schema.Literal<"profile.source">, Schema.Literal<"profile.location.country">, Schema.Literal<"profile.location.state">, Schema.Literal<"profile.location.city">, Schema.Literal<"profile.location.timezone">]>;
2806
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2807
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2808
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2809
+ }>, Schema.Struct<{
2810
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2811
+ readonly value: Schema.Finite;
2812
+ }>, Schema.Struct<{
2813
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2814
+ readonly value: Schema.String;
2815
+ }>, Schema.Struct<{
2816
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2817
+ }>]>;
2818
+ }>, Schema.Struct<{
2819
+ readonly type: Schema.Literal<"custom_field">;
2820
+ readonly key: Schema.String;
2821
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2822
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2823
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2824
+ }>, Schema.Struct<{
2825
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2826
+ readonly value: Schema.Finite;
2827
+ }>, Schema.Struct<{
2828
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2829
+ readonly value: Schema.String;
2830
+ }>, Schema.Struct<{
2831
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2832
+ }>]>;
2833
+ }>, Schema.Struct<{
2834
+ readonly type: Schema.Literal<"event">;
2835
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
2836
+ readonly occurred: Schema.Boolean;
2837
+ }>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
2838
+ readonly type: Schema.Literal<"tag">;
2839
+ readonly tag: Schema.String;
2840
+ readonly present: Schema.Boolean;
2841
+ }>, Schema.Struct<{
2842
+ readonly type: Schema.Literal<"property">;
2843
+ readonly field: Schema.Union<readonly [Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"status">, Schema.Literal<"profile.firstName">, Schema.Literal<"profile.lastName">, Schema.Literal<"profile.company">, Schema.Literal<"profile.jobTitle">, Schema.Literal<"profile.source">, Schema.Literal<"profile.location.country">, Schema.Literal<"profile.location.state">, Schema.Literal<"profile.location.city">, Schema.Literal<"profile.location.timezone">]>;
2844
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2845
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2846
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2847
+ }>, Schema.Struct<{
2848
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2849
+ readonly value: Schema.Finite;
2850
+ }>, Schema.Struct<{
2851
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2852
+ readonly value: Schema.String;
2853
+ }>, Schema.Struct<{
2854
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2855
+ }>]>;
2856
+ }>, Schema.Struct<{
2857
+ readonly type: Schema.Literal<"custom_field">;
2858
+ readonly key: Schema.String;
2859
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2860
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2861
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2862
+ }>, Schema.Struct<{
2863
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2864
+ readonly value: Schema.Finite;
2865
+ }>, Schema.Struct<{
2866
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2867
+ readonly value: Schema.String;
2868
+ }>, Schema.Struct<{
2869
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2870
+ }>]>;
2871
+ }>, Schema.Struct<{
2872
+ readonly type: Schema.Literal<"event">;
2873
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
2874
+ readonly occurred: Schema.Boolean;
2875
+ }>]>]>;
2876
+ }>>;
2877
+ }>>;
2878
+ }>, Schema.Struct<{
2879
+ readonly type: Schema.Literal<"update_tags">;
2880
+ readonly config: Schema.Struct<{
2881
+ readonly add: Schema.$Array<Schema.String>;
2882
+ readonly remove: Schema.$Array<Schema.String>;
2883
+ }>;
2884
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
2885
+ readonly nodeId: Schema.String;
2886
+ }>]>;
2887
+ }>, Schema.Struct<{
2888
+ readonly type: Schema.Literal<"webhook">;
2889
+ readonly config: Schema.Struct<{
2890
+ readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
2891
+ }>;
2892
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
2893
+ readonly nodeId: Schema.String;
2894
+ }>]>;
2895
+ }>, Schema.Struct<{
2896
+ readonly type: Schema.Literal<"exit">;
2897
+ readonly config: Schema.$Record<Schema.String, Schema.Never>;
2898
+ readonly next: Schema.Tuple<readonly []>;
2899
+ }>]>>;
2900
+ readonly goal: Schema.optionalKey<Schema.Struct<{
2901
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
2902
+ }>>;
2903
+ readonly reentry: Schema.optionalKey<Schema.Boolean>;
2904
+ }>;
2905
+ export type CreateJourneyPayload = {
2906
+ readonly name: JourneyName;
2907
+ readonly definition: JourneyDefinition;
2908
+ };
2909
+ export declare const CreateJourneyPayload: Schema.Struct<{
2910
+ readonly name: Schema.String;
2911
+ readonly definition: Schema.Struct<{
2912
+ readonly trigger: Schema.Union<readonly [Schema.Struct<{
2913
+ readonly type: Schema.Literal<"event">;
2914
+ readonly eventName: Schema.String;
2915
+ }>, Schema.Struct<{
2916
+ readonly type: Schema.Literal<"contact.created">;
2917
+ }>, Schema.Struct<{
2918
+ readonly type: Schema.Literal<"contact.tag_added">;
2919
+ readonly tag: Schema.String;
2920
+ }>, Schema.Struct<{
2921
+ readonly type: Schema.Literal<"contact.joined_group">;
2922
+ readonly groupId: Schema.brand<Schema.String, "ContactGroupId">;
2923
+ }>]>;
2924
+ readonly rootNodeId: Schema.String;
2925
+ readonly nodes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
2926
+ readonly type: Schema.Literal<"send_email">;
2927
+ readonly config: Schema.Struct<{
2928
+ readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
2929
+ readonly senderId: Schema.optionalKey<Schema.brand<Schema.String, "EmailSenderId">>;
2930
+ readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
2931
+ }>;
2932
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
2933
+ readonly nodeId: Schema.String;
2934
+ }>]>;
2935
+ }>, Schema.Struct<{
2936
+ readonly type: Schema.Literal<"wait">;
2937
+ readonly config: Schema.Struct<{
2938
+ readonly durationSeconds: Schema.Finite;
2939
+ }>;
2940
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
2941
+ readonly nodeId: Schema.String;
2942
+ }>]>;
2943
+ }>, Schema.Struct<{
2944
+ readonly type: Schema.Literal<"wait_for_event">;
2945
+ readonly config: Schema.Struct<{
2946
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
2947
+ readonly timeoutSeconds: Schema.Finite;
2948
+ }>;
2949
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
2950
+ readonly nodeId: Schema.String;
2951
+ readonly outcome: Schema.Union<readonly [Schema.Literal<"matched">, Schema.Literal<"timed_out">]>;
2952
+ }>, Schema.Struct<{
2953
+ readonly nodeId: Schema.String;
2954
+ readonly outcome: Schema.Union<readonly [Schema.Literal<"matched">, Schema.Literal<"timed_out">]>;
2955
+ }>]>;
2956
+ }>, Schema.Struct<{
2957
+ readonly type: Schema.Literal<"branch">;
2958
+ readonly config: Schema.$Record<Schema.String, Schema.Never>;
2959
+ readonly next: Schema.$Array<Schema.Struct<{
2960
+ readonly nodeId: Schema.String;
2961
+ readonly condition: Schema.optionalKey<Schema.Struct<{
2962
+ readonly match: Schema.Union<readonly [Schema.Literal<"all">, Schema.Literal<"any">]>;
2963
+ readonly predicates: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Union<readonly [Schema.Struct<{
2964
+ readonly type: Schema.Literal<"tag">;
2965
+ readonly tag: Schema.String;
2966
+ readonly present: Schema.Boolean;
2967
+ }>, Schema.Struct<{
2968
+ readonly type: Schema.Literal<"property">;
2969
+ readonly field: Schema.Union<readonly [Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"status">, Schema.Literal<"profile.firstName">, Schema.Literal<"profile.lastName">, Schema.Literal<"profile.company">, Schema.Literal<"profile.jobTitle">, Schema.Literal<"profile.source">, Schema.Literal<"profile.location.country">, Schema.Literal<"profile.location.state">, Schema.Literal<"profile.location.city">, Schema.Literal<"profile.location.timezone">]>;
2970
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2971
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2972
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2973
+ }>, Schema.Struct<{
2974
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2975
+ readonly value: Schema.Finite;
2976
+ }>, Schema.Struct<{
2977
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2978
+ readonly value: Schema.String;
2979
+ }>, Schema.Struct<{
2980
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2981
+ }>]>;
2982
+ }>, Schema.Struct<{
2983
+ readonly type: Schema.Literal<"custom_field">;
2984
+ readonly key: Schema.String;
2985
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
2986
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
2987
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
2988
+ }>, Schema.Struct<{
2989
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
2990
+ readonly value: Schema.Finite;
2991
+ }>, Schema.Struct<{
2992
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
2993
+ readonly value: Schema.String;
2994
+ }>, Schema.Struct<{
2995
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
2996
+ }>]>;
2997
+ }>, Schema.Struct<{
2998
+ readonly type: Schema.Literal<"event">;
2999
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
3000
+ readonly occurred: Schema.Boolean;
3001
+ }>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
3002
+ readonly type: Schema.Literal<"tag">;
3003
+ readonly tag: Schema.String;
3004
+ readonly present: Schema.Boolean;
3005
+ }>, Schema.Struct<{
3006
+ readonly type: Schema.Literal<"property">;
3007
+ readonly field: Schema.Union<readonly [Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"status">, Schema.Literal<"profile.firstName">, Schema.Literal<"profile.lastName">, Schema.Literal<"profile.company">, Schema.Literal<"profile.jobTitle">, Schema.Literal<"profile.source">, Schema.Literal<"profile.location.country">, Schema.Literal<"profile.location.state">, Schema.Literal<"profile.location.city">, Schema.Literal<"profile.location.timezone">]>;
3008
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
3009
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
3010
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
3011
+ }>, Schema.Struct<{
3012
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
3013
+ readonly value: Schema.Finite;
3014
+ }>, Schema.Struct<{
3015
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
3016
+ readonly value: Schema.String;
3017
+ }>, Schema.Struct<{
3018
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
3019
+ }>]>;
3020
+ }>, Schema.Struct<{
3021
+ readonly type: Schema.Literal<"custom_field">;
3022
+ readonly key: Schema.String;
3023
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
3024
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
3025
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
3026
+ }>, Schema.Struct<{
3027
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
3028
+ readonly value: Schema.Finite;
3029
+ }>, Schema.Struct<{
3030
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
3031
+ readonly value: Schema.String;
3032
+ }>, Schema.Struct<{
3033
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
3034
+ }>]>;
3035
+ }>, Schema.Struct<{
3036
+ readonly type: Schema.Literal<"event">;
3037
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
3038
+ readonly occurred: Schema.Boolean;
3039
+ }>]>]>;
3040
+ }>>;
3041
+ }>>;
3042
+ }>, Schema.Struct<{
3043
+ readonly type: Schema.Literal<"update_tags">;
3044
+ readonly config: Schema.Struct<{
3045
+ readonly add: Schema.$Array<Schema.String>;
3046
+ readonly remove: Schema.$Array<Schema.String>;
3047
+ }>;
3048
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
3049
+ readonly nodeId: Schema.String;
3050
+ }>]>;
3051
+ }>, Schema.Struct<{
3052
+ readonly type: Schema.Literal<"webhook">;
3053
+ readonly config: Schema.Struct<{
3054
+ readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
3055
+ }>;
3056
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
3057
+ readonly nodeId: Schema.String;
3058
+ }>]>;
3059
+ }>, Schema.Struct<{
3060
+ readonly type: Schema.Literal<"exit">;
3061
+ readonly config: Schema.$Record<Schema.String, Schema.Never>;
3062
+ readonly next: Schema.Tuple<readonly []>;
3063
+ }>]>>;
3064
+ readonly goal: Schema.optionalKey<Schema.Struct<{
3065
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
3066
+ }>>;
3067
+ readonly reentry: Schema.optionalKey<Schema.Boolean>;
3068
+ }>;
3069
+ }>;
3070
+ export type ReplaceJourneyDraftPayload = {
3071
+ readonly revision: string;
3072
+ readonly definition: JourneyDefinition;
3073
+ };
3074
+ export declare const ReplaceJourneyDraftPayload: Schema.Struct<{
3075
+ readonly revision: Schema.String;
3076
+ readonly definition: Schema.Struct<{
3077
+ readonly trigger: Schema.Union<readonly [Schema.Struct<{
3078
+ readonly type: Schema.Literal<"event">;
3079
+ readonly eventName: Schema.String;
3080
+ }>, Schema.Struct<{
3081
+ readonly type: Schema.Literal<"contact.created">;
3082
+ }>, Schema.Struct<{
3083
+ readonly type: Schema.Literal<"contact.tag_added">;
3084
+ readonly tag: Schema.String;
3085
+ }>, Schema.Struct<{
3086
+ readonly type: Schema.Literal<"contact.joined_group">;
3087
+ readonly groupId: Schema.brand<Schema.String, "ContactGroupId">;
3088
+ }>]>;
3089
+ readonly rootNodeId: Schema.String;
3090
+ readonly nodes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
3091
+ readonly type: Schema.Literal<"send_email">;
3092
+ readonly config: Schema.Struct<{
3093
+ readonly template: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.String]>;
3094
+ readonly senderId: Schema.optionalKey<Schema.brand<Schema.String, "EmailSenderId">>;
3095
+ readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
3096
+ }>;
3097
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
3098
+ readonly nodeId: Schema.String;
3099
+ }>]>;
3100
+ }>, Schema.Struct<{
3101
+ readonly type: Schema.Literal<"wait">;
3102
+ readonly config: Schema.Struct<{
3103
+ readonly durationSeconds: Schema.Finite;
3104
+ }>;
3105
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
3106
+ readonly nodeId: Schema.String;
3107
+ }>]>;
3108
+ }>, Schema.Struct<{
3109
+ readonly type: Schema.Literal<"wait_for_event">;
3110
+ readonly config: Schema.Struct<{
3111
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
3112
+ readonly timeoutSeconds: Schema.Finite;
3113
+ }>;
3114
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
3115
+ readonly nodeId: Schema.String;
3116
+ readonly outcome: Schema.Union<readonly [Schema.Literal<"matched">, Schema.Literal<"timed_out">]>;
3117
+ }>, Schema.Struct<{
3118
+ readonly nodeId: Schema.String;
3119
+ readonly outcome: Schema.Union<readonly [Schema.Literal<"matched">, Schema.Literal<"timed_out">]>;
3120
+ }>]>;
3121
+ }>, Schema.Struct<{
3122
+ readonly type: Schema.Literal<"branch">;
3123
+ readonly config: Schema.$Record<Schema.String, Schema.Never>;
3124
+ readonly next: Schema.$Array<Schema.Struct<{
3125
+ readonly nodeId: Schema.String;
3126
+ readonly condition: Schema.optionalKey<Schema.Struct<{
3127
+ readonly match: Schema.Union<readonly [Schema.Literal<"all">, Schema.Literal<"any">]>;
3128
+ readonly predicates: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Union<readonly [Schema.Struct<{
3129
+ readonly type: Schema.Literal<"tag">;
3130
+ readonly tag: Schema.String;
3131
+ readonly present: Schema.Boolean;
3132
+ }>, Schema.Struct<{
3133
+ readonly type: Schema.Literal<"property">;
3134
+ readonly field: Schema.Union<readonly [Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"status">, Schema.Literal<"profile.firstName">, Schema.Literal<"profile.lastName">, Schema.Literal<"profile.company">, Schema.Literal<"profile.jobTitle">, Schema.Literal<"profile.source">, Schema.Literal<"profile.location.country">, Schema.Literal<"profile.location.state">, Schema.Literal<"profile.location.city">, Schema.Literal<"profile.location.timezone">]>;
3135
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
3136
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
3137
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
3138
+ }>, Schema.Struct<{
3139
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
3140
+ readonly value: Schema.Finite;
3141
+ }>, Schema.Struct<{
3142
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
3143
+ readonly value: Schema.String;
3144
+ }>, Schema.Struct<{
3145
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
3146
+ }>]>;
3147
+ }>, Schema.Struct<{
3148
+ readonly type: Schema.Literal<"custom_field">;
3149
+ readonly key: Schema.String;
3150
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
3151
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
3152
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
3153
+ }>, Schema.Struct<{
3154
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
3155
+ readonly value: Schema.Finite;
3156
+ }>, Schema.Struct<{
3157
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
3158
+ readonly value: Schema.String;
3159
+ }>, Schema.Struct<{
3160
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
3161
+ }>]>;
3162
+ }>, Schema.Struct<{
3163
+ readonly type: Schema.Literal<"event">;
3164
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
3165
+ readonly occurred: Schema.Boolean;
3166
+ }>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
3167
+ readonly type: Schema.Literal<"tag">;
3168
+ readonly tag: Schema.String;
3169
+ readonly present: Schema.Boolean;
3170
+ }>, Schema.Struct<{
3171
+ readonly type: Schema.Literal<"property">;
3172
+ readonly field: Schema.Union<readonly [Schema.Literal<"name">, Schema.Literal<"displayName">, Schema.Literal<"externalId">, Schema.Literal<"status">, Schema.Literal<"profile.firstName">, Schema.Literal<"profile.lastName">, Schema.Literal<"profile.company">, Schema.Literal<"profile.jobTitle">, Schema.Literal<"profile.source">, Schema.Literal<"profile.location.country">, Schema.Literal<"profile.location.state">, Schema.Literal<"profile.location.city">, Schema.Literal<"profile.location.timezone">]>;
3173
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
3174
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
3175
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
3176
+ }>, Schema.Struct<{
3177
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
3178
+ readonly value: Schema.Finite;
3179
+ }>, Schema.Struct<{
3180
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
3181
+ readonly value: Schema.String;
3182
+ }>, Schema.Struct<{
3183
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
3184
+ }>]>;
3185
+ }>, Schema.Struct<{
3186
+ readonly type: Schema.Literal<"custom_field">;
3187
+ readonly key: Schema.String;
3188
+ readonly comparison: Schema.Union<readonly [Schema.Struct<{
3189
+ readonly operator: Schema.Union<readonly [Schema.Literal<"eq">, Schema.Literal<"neq">]>;
3190
+ readonly value: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>;
3191
+ }>, Schema.Struct<{
3192
+ readonly operator: Schema.Union<readonly [Schema.Literal<"gt">, Schema.Literal<"gte">, Schema.Literal<"lt">, Schema.Literal<"lte">]>;
3193
+ readonly value: Schema.Finite;
3194
+ }>, Schema.Struct<{
3195
+ readonly operator: Schema.Union<readonly [Schema.Literal<"contains">, Schema.Literal<"not_contains">, Schema.Literal<"starts_with">, Schema.Literal<"ends_with">]>;
3196
+ readonly value: Schema.String;
3197
+ }>, Schema.Struct<{
3198
+ readonly operator: Schema.Union<readonly [Schema.Literal<"exists">, Schema.Literal<"not_exists">]>;
3199
+ }>]>;
3200
+ }>, Schema.Struct<{
3201
+ readonly type: Schema.Literal<"event">;
3202
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
3203
+ readonly occurred: Schema.Boolean;
3204
+ }>]>]>;
3205
+ }>>;
3206
+ }>>;
3207
+ }>, Schema.Struct<{
3208
+ readonly type: Schema.Literal<"update_tags">;
3209
+ readonly config: Schema.Struct<{
3210
+ readonly add: Schema.$Array<Schema.String>;
3211
+ readonly remove: Schema.$Array<Schema.String>;
3212
+ }>;
3213
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
3214
+ readonly nodeId: Schema.String;
3215
+ }>]>;
3216
+ }>, Schema.Struct<{
3217
+ readonly type: Schema.Literal<"webhook">;
3218
+ readonly config: Schema.Struct<{
3219
+ readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
3220
+ }>;
3221
+ readonly next: Schema.Tuple<readonly [Schema.Struct<{
3222
+ readonly nodeId: Schema.String;
3223
+ }>]>;
3224
+ }>, Schema.Struct<{
3225
+ readonly type: Schema.Literal<"exit">;
3226
+ readonly config: Schema.$Record<Schema.String, Schema.Never>;
3227
+ readonly next: Schema.Tuple<readonly []>;
3228
+ }>]>>;
3229
+ readonly goal: Schema.optionalKey<Schema.Struct<{
3230
+ readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
3231
+ }>>;
3232
+ readonly reentry: Schema.optionalKey<Schema.Boolean>;
3233
+ }>;
3234
+ }>;
3235
+ export { __SamvaRuntimeAbsoluteInstant, __SamvaRuntimeSensitiveString };
3236
+ export declare const ApiKeySecurity: HttpApiSecurity.ApiKey;
3237
+ declare const ApiKeySecurityMiddleware_base: HttpApiMiddleware.ServiceClass<ApiKeySecurityMiddleware, "apiKey security", {
3238
+ requires: never;
3239
+ provides: never;
3240
+ error: never;
3241
+ clientError: never;
3242
+ requiredForClient: false;
3243
+ security: {
3244
+ readonly apiKey: HttpApiSecurity.ApiKey;
3245
+ };
3246
+ }, HttpApiMiddleware.HttpApiMiddlewareSecurity<{
3247
+ readonly apiKey: HttpApiSecurity.ApiKey;
3248
+ }, never, never, never>>;
3249
+ export declare class ApiKeySecurityMiddleware extends ApiKeySecurityMiddleware_base {
3250
+ }