samva 0.26.0 → 0.28.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 (107) hide show
  1. package/AGENTS.md +7 -0
  2. package/README.md +14 -7
  3. package/dist/client/sdk.gen.d.ts +322 -143
  4. package/dist/client/sdk.gen.js +1085 -332
  5. package/dist/client/types.gen.d.ts +1342 -479
  6. package/dist/effect/agents.d.ts +119 -0
  7. package/dist/effect/agents.js +29 -0
  8. package/dist/effect/analytics.d.ts +1 -1
  9. package/dist/effect/analytics.js +1 -1
  10. package/dist/effect/api-keys.d.ts +6 -6
  11. package/dist/effect/attachments.d.ts +1 -1
  12. package/dist/effect/brands.d.ts +2 -0
  13. package/dist/effect/campaigns.d.ts +275 -25
  14. package/dist/effect/campaigns.js +7 -1
  15. package/dist/effect/contact-groups.d.ts +9 -9
  16. package/dist/effect/contacts.d.ts +74 -81
  17. package/dist/effect/contacts.js +7 -3
  18. package/dist/effect/conversations.d.ts +14 -6
  19. package/dist/effect/email.d.ts +34 -34
  20. package/dist/effect/errors.d.ts +1 -1
  21. package/dist/effect/errors.js +2 -2
  22. package/dist/effect/extension-installations.d.ts +3 -3
  23. package/dist/effect/extensions.d.ts +6 -6
  24. package/dist/effect/generated/agents.d.ts +6 -28
  25. package/dist/effect/generated/agents.js +270 -0
  26. package/dist/effect/generated/analytics.d.ts +3 -3
  27. package/dist/effect/generated/analytics.js +1 -1
  28. package/dist/effect/generated/api-keys.d.ts +6 -6
  29. package/dist/effect/generated/api-keys.js +2 -2
  30. package/dist/effect/generated/attachments.d.ts +3 -3
  31. package/dist/effect/generated/attachments.js +1 -1
  32. package/dist/effect/generated/brands.d.ts +16 -0
  33. package/dist/effect/generated/campaigns.d.ts +1181 -302
  34. package/dist/effect/generated/campaigns.js +169 -36
  35. package/dist/effect/generated/contact-events.d.ts +3 -3
  36. package/dist/effect/generated/contact-events.js +1 -1
  37. package/dist/effect/generated/contact-groups.d.ts +9 -9
  38. package/dist/effect/generated/contact-groups.js +7 -7
  39. package/dist/effect/generated/contacts.d.ts +2063 -290
  40. package/dist/effect/generated/contacts.js +343 -75
  41. package/dist/effect/generated/conversations.d.ts +14 -6
  42. package/dist/effect/generated/conversations.js +6 -6
  43. package/dist/effect/generated/email.d.ts +55 -70
  44. package/dist/effect/generated/email.js +18 -21
  45. package/dist/effect/generated/extension-installations.d.ts +3 -3
  46. package/dist/effect/generated/extension-installations.js +1 -1
  47. package/dist/effect/generated/extensions.d.ts +6 -6
  48. package/dist/effect/generated/extensions.js +2 -2
  49. package/dist/effect/generated/index.d.ts +5 -3
  50. package/dist/effect/generated/journeys.d.ts +9 -9
  51. package/dist/effect/generated/journeys.js +3 -3
  52. package/dist/effect/generated/mailboxes.d.ts +466 -712
  53. package/dist/effect/generated/mailboxes.js +22 -14
  54. package/dist/effect/generated/messages.d.ts +53 -29
  55. package/dist/effect/generated/messages.js +9 -5
  56. package/dist/effect/generated/namespaces.d.ts +3 -3
  57. package/dist/effect/generated/namespaces.js +1 -1
  58. package/dist/effect/generated/operations.d.ts +3 -3
  59. package/dist/effect/generated/operations.js +1 -1
  60. package/dist/effect/generated/organizations.d.ts +0 -9
  61. package/dist/effect/generated/organizations.js +1 -4
  62. package/dist/effect/generated/scheduled-messages.d.ts +69 -20
  63. package/dist/effect/generated/scheduled-messages.js +22 -3
  64. package/dist/effect/generated/shared.d.ts +431 -177
  65. package/dist/effect/generated/shared.js +216 -108
  66. package/dist/effect/generated/subscriptions.d.ts +4 -7
  67. package/dist/effect/generated/subscriptions.js +3 -4
  68. package/dist/effect/generated/templates.d.ts +71 -407
  69. package/dist/effect/generated/templates.js +23 -23
  70. package/dist/effect/generated/topic-forms.d.ts +656 -0
  71. package/dist/effect/generated/topic-forms.js +145 -0
  72. package/dist/effect/generated/{unsubscribe-groups.d.ts → topics.d.ts} +640 -435
  73. package/dist/effect/generated/topics.js +267 -0
  74. package/dist/effect/generated/webhooks.d.ts +6 -6
  75. package/dist/effect/generated/webhooks.js +2 -2
  76. package/dist/effect/generated-metadata.d.ts +78 -24
  77. package/dist/effect/generated-metadata.js +61 -27
  78. package/dist/effect/index.d.ts +3 -1
  79. package/dist/effect/index.js +5 -3
  80. package/dist/effect/internal/operation.js +4 -3
  81. package/dist/effect/internal/send.d.ts +4 -4
  82. package/dist/effect/journeys.d.ts +119 -119
  83. package/dist/effect/mailboxes.d.ts +137 -121
  84. package/dist/effect/messages.d.ts +19 -11
  85. package/dist/effect/namespaces.d.ts +3 -3
  86. package/dist/effect/operations.d.ts +3 -3
  87. package/dist/effect/scheduled-messages.d.ts +6 -6
  88. package/dist/effect/subscriptions.d.ts +1 -2
  89. package/dist/effect/templates.d.ts +13 -13
  90. package/dist/effect/topic-forms.d.ts +30 -0
  91. package/dist/effect/topic-forms.js +21 -0
  92. package/dist/effect/topics.d.ts +94 -0
  93. package/dist/effect/topics.js +29 -0
  94. package/dist/effect/webhooks.d.ts +6 -6
  95. package/dist/index.js +2 -2
  96. package/dist/package.js +1 -1
  97. package/dist/promises/errors.gen.d.ts +65 -8
  98. package/dist/promises/errors.gen.js +139 -7
  99. package/dist/promises/index.d.ts +7 -3
  100. package/dist/promises/index.js +9 -5
  101. package/dist/promises/types.gen.d.ts +1 -1
  102. package/dist/service-map.d.ts +117 -23
  103. package/dist/service-map.js +71 -10
  104. package/package.json +17 -9
  105. package/dist/effect/generated/unsubscribe-groups.js +0 -284
  106. package/dist/effect/unsubscribe-groups.d.ts +0 -74
  107. package/dist/effect/unsubscribe-groups.js +0 -29
@@ -1,13 +1,13 @@
1
1
  import type * as EffectBrand from "effect/Brand";
2
2
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
- import { ApiKeySecurityMiddleware, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, ContactGroupId, ContactId, ConversationId, Cursor, EmailContent, EmailDispatchContent, EmailDomainId, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, JsonValue, ResourceNotFoundError, SenderNotReadyError, SendsSeries, UnauthorizedError, UnsubscribeId, ValidationError, __SamvaRuntimeAbsoluteInstant } from "./shared";
5
- export type CampaignId = string & EffectBrand.Brand<"CampaignId">;
6
- export declare const CampaignId: Schema.brand<Schema.String, "CampaignId">;
7
- export type CampaignContentMetadata = {
8
- readonly [x: string]: JsonValue;
9
- } | null;
10
- export declare const CampaignContentMetadata: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
4
+ import { ApiKeySecurityMiddleware, BillingProviderError, BrandAddressRequiredError, CampaignAudience, CampaignContentInput, CampaignContentMetadata, CampaignConversationRef, CampaignFooterRequiredError, CampaignFrom, CampaignId, CampaignReplyMailbox, CampaignRunId, ConflictError, ContactId, Cursor, DeliveryUnavailableError, EmailAttachments, EmailCustomHeaders, EmailDomainId, EmailFooterOverride, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MessageId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SenderNotReadyError, SendsSeries, TemplateData, TemplateId, TemplateInputContractId, TemplatePublicationId, TopicId, UnauthorizedError, ValidationError, __SamvaRuntimeAbsoluteInstant } from "./shared";
5
+ export type CampaignPolicy = {
6
+ readonly pageSize?: number | null;
7
+ };
8
+ export declare const CampaignPolicy: Schema.Struct<{
9
+ readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
10
+ }>;
11
11
  export type CampaignDefinitionSummary = {
12
12
  readonly state: "editable" | "frozen" | "archived";
13
13
  readonly frozenAt: string | null;
@@ -16,39 +16,59 @@ export declare const CampaignDefinitionSummary: Schema.Struct<{
16
16
  readonly state: Schema.Union<readonly [Schema.Literal<"editable">, Schema.Literal<"frozen">, Schema.Literal<"archived">]>;
17
17
  readonly frozenAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
18
18
  }>;
19
- export type CampaignRunId = string & EffectBrand.Brand<"CampaignRunId">;
20
- export declare const CampaignRunId: Schema.brand<Schema.String, "CampaignRunId">;
21
19
  export type CampaignRunSkippedReason = {
22
- readonly reason: "unsubscribed" | "blocked" | "suppressed" | "opted_out" | "unreachable" | "no_identity" | "inactive" | "run_cancelled" | "run_failed";
20
+ readonly reason: "unsubscribed" | "blocked" | "suppressed" | "opted_out" | "unreachable" | "no_identity" | "inactive" | "run_cancelled" | "run_failed" | "missing_merge_field";
23
21
  readonly count: number;
24
22
  };
25
23
  export declare const CampaignRunSkippedReason: Schema.Struct<{
26
- readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">]>;
24
+ readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
27
25
  readonly count: Schema.Finite;
28
26
  }>;
29
27
  export type CampaignRecipientId = string & EffectBrand.Brand<"CampaignRecipientId">;
30
28
  export declare const CampaignRecipientId: Schema.brand<Schema.String, "CampaignRecipientId">;
31
- export type CampaignPolicy = {
32
- readonly unsubscribeGroupId?: UnsubscribeId | null;
33
- readonly pageSize?: number | null;
29
+ export type CampaignRunReportEngagement = {
30
+ readonly measurement: "directional";
31
+ readonly uniqueOpens: number;
32
+ readonly uniqueClicks: number;
34
33
  };
35
- export declare const CampaignPolicy: Schema.Struct<{
36
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
37
- readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
34
+ export declare const CampaignRunReportEngagement: Schema.Struct<{
35
+ readonly measurement: Schema.Literal<"directional">;
36
+ readonly uniqueOpens: Schema.Finite;
37
+ readonly uniqueClicks: Schema.Finite;
38
+ }>;
39
+ export type CampaignRunReportSkippedReason = {
40
+ readonly reason: "unsubscribed" | "blocked" | "suppressed" | "opted_out" | "unreachable" | "no_identity" | "inactive" | "run_cancelled" | "run_failed" | "missing_merge_field";
41
+ readonly count: number;
42
+ };
43
+ export declare const CampaignRunReportSkippedReason: Schema.Struct<{
44
+ readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
45
+ readonly count: Schema.Finite;
46
+ }>;
47
+ export type CampaignPreview = {
48
+ readonly subject: string;
49
+ readonly preheader?: string;
50
+ readonly html: string;
51
+ readonly text: string;
52
+ };
53
+ export declare const CampaignPreview: Schema.Struct<{
54
+ readonly subject: Schema.String;
55
+ readonly preheader: Schema.optionalKey<Schema.String>;
56
+ readonly html: Schema.String;
57
+ readonly text: Schema.String;
38
58
  }>;
39
- export type CampaignConversationRef = ConversationId | null | null;
40
- export declare const CampaignConversationRef: Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>;
41
- export type CampaignAudience = {
42
- readonly includeTags?: ReadonlyArray<string> | null;
43
- readonly excludeTags?: ReadonlyArray<string> | null;
44
- readonly contactIds?: ReadonlyArray<ContactId> | null;
45
- readonly groupIds?: ReadonlyArray<ContactGroupId> | null;
59
+ export type CampaignTestSend = {
60
+ readonly id: MessageId;
46
61
  };
47
- export declare const CampaignAudience: Schema.Struct<{
48
- readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
49
- readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
50
- readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
51
- readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
62
+ export declare const CampaignTestSend: Schema.Struct<{
63
+ readonly id: Schema.brand<Schema.String, "MessageId">;
64
+ }>;
65
+ export type CampaignRunReportTopicUnsubscribes = {
66
+ readonly topicId: TopicId;
67
+ readonly count: number;
68
+ };
69
+ export declare const CampaignRunReportTopicUnsubscribes: Schema.Struct<{
70
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
71
+ readonly count: Schema.Finite;
52
72
  }>;
53
73
  export type CampaignLatestRun = {
54
74
  readonly id: CampaignRunId;
@@ -82,7 +102,7 @@ export type CampaignRecipientPage = {
82
102
  readonly status: "pending" | "dispatching" | "dispatched" | "failed" | "skipped";
83
103
  readonly messageId: string | null;
84
104
  readonly failureReason: string | null;
85
- readonly skippedReason: "unsubscribed" | "blocked" | "suppressed" | "opted_out" | "unreachable" | "no_identity" | "inactive" | "run_cancelled" | "run_failed" | null;
105
+ readonly skippedReason: "unsubscribed" | "blocked" | "suppressed" | "opted_out" | "unreachable" | "no_identity" | "inactive" | "run_cancelled" | "run_failed" | "missing_merge_field" | null;
86
106
  readonly createdAt: string;
87
107
  readonly updatedAt: string;
88
108
  }>;
@@ -96,60 +116,114 @@ export declare const CampaignRecipientPage: Schema.Struct<{
96
116
  readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"dispatching">, Schema.Literal<"dispatched">, Schema.Literal<"failed">, Schema.Literal<"skipped">]>;
97
117
  readonly messageId: Schema.Union<readonly [Schema.String, Schema.Null]>;
98
118
  readonly failureReason: Schema.Union<readonly [Schema.String, Schema.Null]>;
99
- readonly skippedReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">]>, Schema.Null]>;
119
+ readonly skippedReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>, Schema.Null]>;
100
120
  readonly createdAt: Schema.String;
101
121
  readonly updatedAt: Schema.String;
102
122
  }>>;
103
123
  readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
104
124
  }>;
105
- export type CampaignContent = {
106
- readonly channel: "email";
107
- readonly email: EmailContent;
108
- readonly conversationId?: CampaignConversationRef;
109
- readonly metadata?: CampaignContentMetadata;
125
+ export type CampaignRunReport = {
126
+ readonly campaignId: CampaignId;
127
+ readonly runId: CampaignRunId;
128
+ readonly totalRecipients: number;
129
+ readonly dispatchedCount: number;
130
+ readonly failedCount: number;
131
+ readonly skippedCount: number;
132
+ readonly deliveredCount: number;
133
+ readonly hardBounceCount: number;
134
+ readonly softBounceCount: number;
135
+ readonly complaintCount: number;
136
+ readonly engagement: CampaignRunReportEngagement;
137
+ readonly unsubscribesByTopic: ReadonlyArray<CampaignRunReportTopicUnsubscribes>;
138
+ readonly replyCount: number;
139
+ readonly skippedReasons: ReadonlyArray<CampaignRunReportSkippedReason>;
110
140
  };
111
- export declare const CampaignContent: Schema.Struct<{
112
- readonly channel: Schema.Literal<"email">;
113
- readonly email: Schema.Struct<{
114
- readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
115
- readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
116
- readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
117
- readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
118
- readonly filename: Schema.String;
119
- readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
120
- readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
121
- readonly contentType: Schema.String;
122
- readonly size: Schema.Finite;
123
- }>>, Schema.Null]>>;
124
- readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
125
- readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
126
- readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
127
- readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
128
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
129
- readonly locale: Schema.optionalKey<Schema.String>;
130
- readonly timeZone: Schema.optionalKey<Schema.String>;
131
- readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
132
- readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
133
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
134
- readonly tracking: Schema.optionalKey<Schema.Struct<{
135
- readonly opens: Schema.optionalKey<Schema.Boolean>;
136
- readonly clicks: Schema.optionalKey<Schema.Boolean>;
137
- }>>;
138
- readonly footer: Schema.optionalKey<Schema.Struct<{
139
- readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
140
- }>>;
141
- readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
141
+ export declare const CampaignRunReport: Schema.Struct<{
142
+ readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
143
+ readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
144
+ readonly totalRecipients: Schema.Finite;
145
+ readonly dispatchedCount: Schema.Finite;
146
+ readonly failedCount: Schema.Finite;
147
+ readonly skippedCount: Schema.Finite;
148
+ readonly deliveredCount: Schema.Finite;
149
+ readonly hardBounceCount: Schema.Finite;
150
+ readonly softBounceCount: Schema.Finite;
151
+ readonly complaintCount: Schema.Finite;
152
+ readonly engagement: Schema.Struct<{
153
+ readonly measurement: Schema.Literal<"directional">;
154
+ readonly uniqueOpens: Schema.Finite;
155
+ readonly uniqueClicks: Schema.Finite;
142
156
  }>;
143
- readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
144
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
157
+ readonly unsubscribesByTopic: Schema.$Array<Schema.Struct<{
158
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
159
+ readonly count: Schema.Finite;
160
+ }>>;
161
+ readonly replyCount: Schema.Finite;
162
+ readonly skippedReasons: Schema.$Array<Schema.Struct<{
163
+ readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
164
+ readonly count: Schema.Finite;
165
+ }>>;
166
+ }>;
167
+ export type CampaignEmailContent = {
168
+ readonly subject?: string | null;
169
+ readonly html?: string | null;
170
+ readonly text?: string | null;
171
+ readonly attachments?: EmailAttachments;
172
+ readonly publicationId?: TemplatePublicationId;
173
+ readonly inputContractId?: TemplateInputContractId;
174
+ readonly templateId?: TemplateId | null;
175
+ readonly templateSlug?: string | null;
176
+ readonly templateData?: TemplateData;
177
+ readonly locale?: RenderLocale;
178
+ readonly timeZone?: RenderTimeZone;
179
+ readonly inReplyToMessageId?: MessageId | null;
180
+ readonly replyTo?: ReplyToAddresses;
181
+ readonly topicId?: TopicId | null | null;
182
+ readonly tracking?: EmailTrackingOverrideV1;
183
+ readonly footer?: EmailFooterOverride;
184
+ readonly headers?: EmailCustomHeaders | null;
185
+ readonly preheader?: string | null;
186
+ };
187
+ export declare const CampaignEmailContent: Schema.Struct<{
188
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
189
+ readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
190
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
191
+ readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
192
+ readonly filename: Schema.String;
193
+ readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
194
+ readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
195
+ readonly contentType: Schema.String;
196
+ readonly size: Schema.Finite;
197
+ }>>, Schema.Null]>>;
198
+ readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
199
+ readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
200
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
201
+ readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
202
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
203
+ readonly locale: Schema.optionalKey<Schema.String>;
204
+ readonly timeZone: Schema.optionalKey<Schema.String>;
205
+ readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
206
+ readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
207
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
208
+ readonly tracking: Schema.optionalKey<Schema.Struct<{
209
+ readonly opens: Schema.optionalKey<Schema.Boolean>;
210
+ readonly clicks: Schema.optionalKey<Schema.Boolean>;
211
+ }>>;
212
+ readonly footer: Schema.optionalKey<Schema.Struct<{
213
+ readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
214
+ }>>;
215
+ readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
216
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
145
217
  }>;
146
- export type CampaignContentInput = {
218
+ export type CampaignContent = {
147
219
  readonly channel: "email";
148
- readonly email: EmailDispatchContent;
220
+ readonly email: CampaignEmailContent;
221
+ readonly from?: CampaignFrom;
222
+ readonly replyMailboxId?: CampaignReplyMailbox;
149
223
  readonly conversationId?: CampaignConversationRef;
150
224
  readonly metadata?: CampaignContentMetadata;
151
225
  };
152
- export declare const CampaignContentInput: Schema.Struct<{
226
+ export declare const CampaignContent: Schema.Struct<{
153
227
  readonly channel: Schema.Literal<"email">;
154
228
  readonly email: Schema.Struct<{
155
229
  readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
@@ -166,12 +240,12 @@ export declare const CampaignContentInput: Schema.Struct<{
166
240
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
167
241
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
168
242
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
169
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
243
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
170
244
  readonly locale: Schema.optionalKey<Schema.String>;
171
245
  readonly timeZone: Schema.optionalKey<Schema.String>;
172
246
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
173
247
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
174
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
248
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
175
249
  readonly tracking: Schema.optionalKey<Schema.Struct<{
176
250
  readonly opens: Schema.optionalKey<Schema.Boolean>;
177
251
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -180,9 +254,15 @@ export declare const CampaignContentInput: Schema.Struct<{
180
254
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
181
255
  }>>;
182
256
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
257
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
183
258
  }>;
259
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
260
+ readonly email: Schema.String;
261
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
262
+ }>, Schema.Null]>>;
263
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
184
264
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
185
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
265
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
186
266
  }>;
187
267
  export type CampaignListItem = {
188
268
  readonly id: CampaignId;
@@ -221,12 +301,12 @@ export declare const CampaignListItem: Schema.Struct<{
221
301
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
222
302
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
223
303
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
224
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
304
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
225
305
  readonly locale: Schema.optionalKey<Schema.String>;
226
306
  readonly timeZone: Schema.optionalKey<Schema.String>;
227
307
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
228
308
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
229
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
309
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
230
310
  readonly tracking: Schema.optionalKey<Schema.Struct<{
231
311
  readonly opens: Schema.optionalKey<Schema.Boolean>;
232
312
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -235,18 +315,24 @@ export declare const CampaignListItem: Schema.Struct<{
235
315
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
236
316
  }>>;
237
317
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
318
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
238
319
  }>;
320
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
321
+ readonly email: Schema.String;
322
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
323
+ }>, Schema.Null]>>;
324
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
239
325
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
240
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
326
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
241
327
  }>;
242
328
  readonly audience: Schema.Struct<{
329
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
243
330
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
244
331
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
245
332
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
246
333
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
247
334
  }>;
248
335
  readonly policy: Schema.Struct<{
249
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
250
336
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
251
337
  }>;
252
338
  readonly definition: Schema.Struct<{
@@ -308,12 +394,12 @@ export declare const Campaign: Schema.Struct<{
308
394
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
309
395
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
310
396
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
311
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
397
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
312
398
  readonly locale: Schema.optionalKey<Schema.String>;
313
399
  readonly timeZone: Schema.optionalKey<Schema.String>;
314
400
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
315
401
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
316
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
402
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
317
403
  readonly tracking: Schema.optionalKey<Schema.Struct<{
318
404
  readonly opens: Schema.optionalKey<Schema.Boolean>;
319
405
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -322,18 +408,24 @@ export declare const Campaign: Schema.Struct<{
322
408
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
323
409
  }>>;
324
410
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
411
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
325
412
  }>;
413
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
414
+ readonly email: Schema.String;
415
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
416
+ }>, Schema.Null]>>;
417
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
326
418
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
327
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
419
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
328
420
  }>;
329
421
  readonly audience: Schema.Struct<{
422
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
330
423
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
331
424
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
332
425
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
333
426
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
334
427
  }>;
335
428
  readonly policy: Schema.Struct<{
336
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
337
429
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
338
430
  }>;
339
431
  readonly definition: Schema.Struct<{
@@ -413,12 +505,12 @@ export declare const CampaignRun: Schema.Struct<{
413
505
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
414
506
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
415
507
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
416
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
508
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
417
509
  readonly locale: Schema.optionalKey<Schema.String>;
418
510
  readonly timeZone: Schema.optionalKey<Schema.String>;
419
511
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
420
512
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
421
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
513
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
422
514
  readonly tracking: Schema.optionalKey<Schema.Struct<{
423
515
  readonly opens: Schema.optionalKey<Schema.Boolean>;
424
516
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -427,18 +519,24 @@ export declare const CampaignRun: Schema.Struct<{
427
519
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
428
520
  }>>;
429
521
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
522
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
430
523
  }>;
524
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
525
+ readonly email: Schema.String;
526
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
527
+ }>, Schema.Null]>>;
528
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
431
529
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
432
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
530
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
433
531
  }>;
434
532
  readonly audienceSnapshot: Schema.Struct<{
533
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
435
534
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
436
535
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
437
536
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
438
537
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
439
538
  }>;
440
539
  readonly policySnapshot: Schema.Struct<{
441
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
442
540
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
443
541
  }>;
444
542
  readonly totalRecipients: Schema.Finite;
@@ -447,7 +545,7 @@ export declare const CampaignRun: Schema.Struct<{
447
545
  readonly skippedCount: Schema.Finite;
448
546
  readonly pendingCount: Schema.Finite;
449
547
  readonly skippedReasons: Schema.$Array<Schema.Struct<{
450
- readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">]>;
548
+ readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
451
549
  readonly count: Schema.Finite;
452
550
  }>>;
453
551
  readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -489,12 +587,12 @@ export declare const CampaignPage: Schema.Struct<{
489
587
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
490
588
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
491
589
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
492
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
590
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
493
591
  readonly locale: Schema.optionalKey<Schema.String>;
494
592
  readonly timeZone: Schema.optionalKey<Schema.String>;
495
593
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
496
594
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
497
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
595
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
498
596
  readonly tracking: Schema.optionalKey<Schema.Struct<{
499
597
  readonly opens: Schema.optionalKey<Schema.Boolean>;
500
598
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -503,18 +601,24 @@ export declare const CampaignPage: Schema.Struct<{
503
601
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
504
602
  }>>;
505
603
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
604
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
506
605
  }>;
606
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
607
+ readonly email: Schema.String;
608
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
609
+ }>, Schema.Null]>>;
610
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
507
611
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
508
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
612
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
509
613
  }>;
510
614
  readonly audience: Schema.Struct<{
615
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
511
616
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
512
617
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
513
618
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
514
619
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
515
620
  }>;
516
621
  readonly policy: Schema.Struct<{
517
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
518
622
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
519
623
  }>;
520
624
  readonly definition: Schema.Struct<{
@@ -572,12 +676,12 @@ export declare const CampaignRunPage: Schema.Struct<{
572
676
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
573
677
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
574
678
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
575
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
679
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
576
680
  readonly locale: Schema.optionalKey<Schema.String>;
577
681
  readonly timeZone: Schema.optionalKey<Schema.String>;
578
682
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
579
683
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
580
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
684
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
581
685
  readonly tracking: Schema.optionalKey<Schema.Struct<{
582
686
  readonly opens: Schema.optionalKey<Schema.Boolean>;
583
687
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -586,18 +690,24 @@ export declare const CampaignRunPage: Schema.Struct<{
586
690
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
587
691
  }>>;
588
692
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
693
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
589
694
  }>;
695
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
696
+ readonly email: Schema.String;
697
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
698
+ }>, Schema.Null]>>;
699
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
590
700
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
591
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
701
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
592
702
  }>;
593
703
  readonly audienceSnapshot: Schema.Struct<{
704
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
594
705
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
595
706
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
596
707
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
597
708
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
598
709
  }>;
599
710
  readonly policySnapshot: Schema.Struct<{
600
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
601
711
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
602
712
  }>;
603
713
  readonly totalRecipients: Schema.Finite;
@@ -606,7 +716,7 @@ export declare const CampaignRunPage: Schema.Struct<{
606
716
  readonly skippedCount: Schema.Finite;
607
717
  readonly pendingCount: Schema.Finite;
608
718
  readonly skippedReasons: Schema.$Array<Schema.Struct<{
609
- readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">]>;
719
+ readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
610
720
  readonly count: Schema.Finite;
611
721
  }>>;
612
722
  readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -655,12 +765,12 @@ export declare const CampaignRunAction: Schema.Struct<{
655
765
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
656
766
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
657
767
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
658
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
768
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
659
769
  readonly locale: Schema.optionalKey<Schema.String>;
660
770
  readonly timeZone: Schema.optionalKey<Schema.String>;
661
771
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
662
772
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
663
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
773
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
664
774
  readonly tracking: Schema.optionalKey<Schema.Struct<{
665
775
  readonly opens: Schema.optionalKey<Schema.Boolean>;
666
776
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -669,18 +779,24 @@ export declare const CampaignRunAction: Schema.Struct<{
669
779
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
670
780
  }>>;
671
781
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
782
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
672
783
  }>;
784
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
785
+ readonly email: Schema.String;
786
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
787
+ }>, Schema.Null]>>;
788
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
673
789
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
674
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
790
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
675
791
  }>;
676
792
  readonly audienceSnapshot: Schema.Struct<{
793
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
677
794
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
678
795
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
679
796
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
680
797
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
681
798
  }>;
682
799
  readonly policySnapshot: Schema.Struct<{
683
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
684
800
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
685
801
  }>;
686
802
  readonly totalRecipients: Schema.Finite;
@@ -689,7 +805,7 @@ export declare const CampaignRunAction: Schema.Struct<{
689
805
  readonly skippedCount: Schema.Finite;
690
806
  readonly pendingCount: Schema.Finite;
691
807
  readonly skippedReasons: Schema.$Array<Schema.Struct<{
692
- readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">]>;
808
+ readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
693
809
  readonly count: Schema.Finite;
694
810
  }>>;
695
811
  readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -708,12 +824,12 @@ export declare const CampaignRunAction: Schema.Struct<{
708
824
  }>;
709
825
  export type CampaignsListQuery = {
710
826
  readonly status?: "draft" | "archived" | null;
711
- readonly limit?: string | null;
827
+ readonly limit?: number | null;
712
828
  readonly cursor?: Cursor | null;
713
829
  };
714
830
  export declare const CampaignsListQuery: Schema.Struct<{
715
831
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"archived">]>, Schema.Null]>>;
716
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
832
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
717
833
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
718
834
  }>;
719
835
  export type CampaignsList200 = CampaignPage;
@@ -739,12 +855,12 @@ export declare const CampaignsList200: Schema.Struct<{
739
855
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
740
856
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
741
857
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
742
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
858
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
743
859
  readonly locale: Schema.optionalKey<Schema.String>;
744
860
  readonly timeZone: Schema.optionalKey<Schema.String>;
745
861
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
746
862
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
747
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
863
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
748
864
  readonly tracking: Schema.optionalKey<Schema.Struct<{
749
865
  readonly opens: Schema.optionalKey<Schema.Boolean>;
750
866
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -753,18 +869,24 @@ export declare const CampaignsList200: Schema.Struct<{
753
869
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
754
870
  }>>;
755
871
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
872
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
756
873
  }>;
874
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
875
+ readonly email: Schema.String;
876
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
877
+ }>, Schema.Null]>>;
878
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
757
879
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
758
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
880
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
759
881
  }>;
760
882
  readonly audience: Schema.Struct<{
883
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
761
884
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
762
885
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
763
886
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
764
887
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
765
888
  }>;
766
889
  readonly policy: Schema.Struct<{
767
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
768
890
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
769
891
  }>;
770
892
  readonly definition: Schema.Struct<{
@@ -829,12 +951,12 @@ export declare const CampaignsCreateRequestJson: Schema.Struct<{
829
951
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
830
952
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
831
953
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
832
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
954
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
833
955
  readonly locale: Schema.optionalKey<Schema.String>;
834
956
  readonly timeZone: Schema.optionalKey<Schema.String>;
835
957
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
836
958
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
837
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
959
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
838
960
  readonly tracking: Schema.optionalKey<Schema.Struct<{
839
961
  readonly opens: Schema.optionalKey<Schema.Boolean>;
840
962
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -843,18 +965,24 @@ export declare const CampaignsCreateRequestJson: Schema.Struct<{
843
965
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
844
966
  }>>;
845
967
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
968
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
846
969
  }>;
970
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
971
+ readonly email: Schema.String;
972
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
973
+ }>, Schema.Null]>>;
974
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
847
975
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
848
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
976
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
849
977
  }>;
850
978
  readonly audience: Schema.Struct<{
979
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
851
980
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
852
981
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
853
982
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
854
983
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
855
984
  }>;
856
985
  readonly policy: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
857
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
858
986
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
859
987
  }>, Schema.Null]>>;
860
988
  }>;
@@ -880,12 +1008,12 @@ export declare const CampaignsCreate201: Schema.Struct<{
880
1008
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
881
1009
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
882
1010
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
883
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1011
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
884
1012
  readonly locale: Schema.optionalKey<Schema.String>;
885
1013
  readonly timeZone: Schema.optionalKey<Schema.String>;
886
1014
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
887
1015
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
888
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
1016
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
889
1017
  readonly tracking: Schema.optionalKey<Schema.Struct<{
890
1018
  readonly opens: Schema.optionalKey<Schema.Boolean>;
891
1019
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -894,18 +1022,24 @@ export declare const CampaignsCreate201: Schema.Struct<{
894
1022
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
895
1023
  }>>;
896
1024
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
1025
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
897
1026
  }>;
1027
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1028
+ readonly email: Schema.String;
1029
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1030
+ }>, Schema.Null]>>;
1031
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
898
1032
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
899
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1033
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
900
1034
  }>;
901
1035
  readonly audience: Schema.Struct<{
1036
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
902
1037
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
903
1038
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
904
1039
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
905
1040
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
906
1041
  }>;
907
1042
  readonly policy: Schema.Struct<{
908
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
909
1043
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
910
1044
  }>;
911
1045
  readonly definition: Schema.Struct<{
@@ -968,12 +1102,12 @@ export declare const CampaignsGet200: Schema.Struct<{
968
1102
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
969
1103
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
970
1104
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
971
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1105
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
972
1106
  readonly locale: Schema.optionalKey<Schema.String>;
973
1107
  readonly timeZone: Schema.optionalKey<Schema.String>;
974
1108
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
975
1109
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
976
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
1110
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
977
1111
  readonly tracking: Schema.optionalKey<Schema.Struct<{
978
1112
  readonly opens: Schema.optionalKey<Schema.Boolean>;
979
1113
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -982,18 +1116,24 @@ export declare const CampaignsGet200: Schema.Struct<{
982
1116
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
983
1117
  }>>;
984
1118
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
1119
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
985
1120
  }>;
1121
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1122
+ readonly email: Schema.String;
1123
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1124
+ }>, Schema.Null]>>;
1125
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
986
1126
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
987
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1127
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
988
1128
  }>;
989
1129
  readonly audience: Schema.Struct<{
1130
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
990
1131
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
991
1132
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
992
1133
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
993
1134
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
994
1135
  }>;
995
1136
  readonly policy: Schema.Struct<{
996
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
997
1137
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
998
1138
  }>;
999
1139
  readonly definition: Schema.Struct<{
@@ -1061,12 +1201,12 @@ export declare const CampaignsUpdateRequestJson: Schema.Struct<{
1061
1201
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
1062
1202
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
1063
1203
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1064
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1204
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1065
1205
  readonly locale: Schema.optionalKey<Schema.String>;
1066
1206
  readonly timeZone: Schema.optionalKey<Schema.String>;
1067
1207
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
1068
1208
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
1069
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
1209
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
1070
1210
  readonly tracking: Schema.optionalKey<Schema.Struct<{
1071
1211
  readonly opens: Schema.optionalKey<Schema.Boolean>;
1072
1212
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -1075,18 +1215,24 @@ export declare const CampaignsUpdateRequestJson: Schema.Struct<{
1075
1215
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1076
1216
  }>>;
1077
1217
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
1218
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1078
1219
  }>;
1220
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1221
+ readonly email: Schema.String;
1222
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1223
+ }>, Schema.Null]>>;
1224
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
1079
1225
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
1080
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1226
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1081
1227
  }>, Schema.Null]>>;
1082
1228
  readonly audience: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1229
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
1083
1230
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1084
1231
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1085
1232
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
1086
1233
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
1087
1234
  }>, Schema.Null]>>;
1088
1235
  readonly policy: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1089
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
1090
1236
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1091
1237
  }>, Schema.Null]>>;
1092
1238
  }>;
@@ -1112,12 +1258,12 @@ export declare const CampaignsUpdate200: Schema.Struct<{
1112
1258
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
1113
1259
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
1114
1260
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1115
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1261
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1116
1262
  readonly locale: Schema.optionalKey<Schema.String>;
1117
1263
  readonly timeZone: Schema.optionalKey<Schema.String>;
1118
1264
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
1119
1265
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
1120
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
1266
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
1121
1267
  readonly tracking: Schema.optionalKey<Schema.Struct<{
1122
1268
  readonly opens: Schema.optionalKey<Schema.Boolean>;
1123
1269
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -1126,18 +1272,24 @@ export declare const CampaignsUpdate200: Schema.Struct<{
1126
1272
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1127
1273
  }>>;
1128
1274
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
1275
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1129
1276
  }>;
1277
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1278
+ readonly email: Schema.String;
1279
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1280
+ }>, Schema.Null]>>;
1281
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
1130
1282
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
1131
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1283
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1132
1284
  }>;
1133
1285
  readonly audience: Schema.Struct<{
1286
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
1134
1287
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1135
1288
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1136
1289
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
1137
1290
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
1138
1291
  }>;
1139
1292
  readonly policy: Schema.Struct<{
1140
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
1141
1293
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1142
1294
  }>;
1143
1295
  readonly definition: Schema.Struct<{
@@ -1204,12 +1356,12 @@ export declare const CampaignsArchive200: Schema.Struct<{
1204
1356
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
1205
1357
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
1206
1358
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1207
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1359
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1208
1360
  readonly locale: Schema.optionalKey<Schema.String>;
1209
1361
  readonly timeZone: Schema.optionalKey<Schema.String>;
1210
1362
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
1211
1363
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
1212
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
1364
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
1213
1365
  readonly tracking: Schema.optionalKey<Schema.Struct<{
1214
1366
  readonly opens: Schema.optionalKey<Schema.Boolean>;
1215
1367
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -1218,18 +1370,24 @@ export declare const CampaignsArchive200: Schema.Struct<{
1218
1370
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1219
1371
  }>>;
1220
1372
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
1373
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1221
1374
  }>;
1375
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1376
+ readonly email: Schema.String;
1377
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1378
+ }>, Schema.Null]>>;
1379
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
1222
1380
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
1223
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1381
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1224
1382
  }>;
1225
1383
  readonly audience: Schema.Struct<{
1384
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
1226
1385
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1227
1386
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1228
1387
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
1229
1388
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
1230
1389
  }>;
1231
1390
  readonly policy: Schema.Struct<{
1232
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
1233
1391
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1234
1392
  }>;
1235
1393
  readonly definition: Schema.Struct<{
@@ -1276,12 +1434,12 @@ export declare const CampaignsListRunsPathParams: Schema.Struct<{
1276
1434
  }>;
1277
1435
  export type CampaignsListRunsQuery = {
1278
1436
  readonly status?: "scheduled" | "resolving" | "dispatching" | "paused" | "completed" | "cancelled" | "failed" | null;
1279
- readonly limit?: string | null;
1437
+ readonly limit?: number | null;
1280
1438
  readonly cursor?: Cursor | null;
1281
1439
  };
1282
1440
  export declare const CampaignsListRunsQuery: Schema.Struct<{
1283
1441
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"scheduled">, Schema.Literal<"resolving">, Schema.Literal<"dispatching">, Schema.Literal<"paused">, Schema.Literal<"completed">, Schema.Literal<"cancelled">, Schema.Literal<"failed">]>, Schema.Null]>>;
1284
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1442
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1285
1443
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1286
1444
  }>;
1287
1445
  export type CampaignsListRuns200 = CampaignRunPage;
@@ -1311,12 +1469,12 @@ export declare const CampaignsListRuns200: Schema.Struct<{
1311
1469
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
1312
1470
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
1313
1471
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1314
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1472
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1315
1473
  readonly locale: Schema.optionalKey<Schema.String>;
1316
1474
  readonly timeZone: Schema.optionalKey<Schema.String>;
1317
1475
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
1318
1476
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
1319
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
1477
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
1320
1478
  readonly tracking: Schema.optionalKey<Schema.Struct<{
1321
1479
  readonly opens: Schema.optionalKey<Schema.Boolean>;
1322
1480
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -1325,18 +1483,24 @@ export declare const CampaignsListRuns200: Schema.Struct<{
1325
1483
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1326
1484
  }>>;
1327
1485
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
1486
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1328
1487
  }>;
1488
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1489
+ readonly email: Schema.String;
1490
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1491
+ }>, Schema.Null]>>;
1492
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
1329
1493
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
1330
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1494
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1331
1495
  }>;
1332
1496
  readonly audienceSnapshot: Schema.Struct<{
1497
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
1333
1498
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1334
1499
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1335
1500
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
1336
1501
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
1337
1502
  }>;
1338
1503
  readonly policySnapshot: Schema.Struct<{
1339
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
1340
1504
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1341
1505
  }>;
1342
1506
  readonly totalRecipients: Schema.Finite;
@@ -1345,7 +1509,7 @@ export declare const CampaignsListRuns200: Schema.Struct<{
1345
1509
  readonly skippedCount: Schema.Finite;
1346
1510
  readonly pendingCount: Schema.Finite;
1347
1511
  readonly skippedReasons: Schema.$Array<Schema.Struct<{
1348
- readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">]>;
1512
+ readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
1349
1513
  readonly count: Schema.Finite;
1350
1514
  }>>;
1351
1515
  readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -1415,12 +1579,12 @@ export declare const CampaignsScheduleRun201: Schema.Struct<{
1415
1579
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
1416
1580
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
1417
1581
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1418
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1582
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1419
1583
  readonly locale: Schema.optionalKey<Schema.String>;
1420
1584
  readonly timeZone: Schema.optionalKey<Schema.String>;
1421
1585
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
1422
1586
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
1423
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
1587
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
1424
1588
  readonly tracking: Schema.optionalKey<Schema.Struct<{
1425
1589
  readonly opens: Schema.optionalKey<Schema.Boolean>;
1426
1590
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -1429,18 +1593,24 @@ export declare const CampaignsScheduleRun201: Schema.Struct<{
1429
1593
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1430
1594
  }>>;
1431
1595
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
1596
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1432
1597
  }>;
1598
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1599
+ readonly email: Schema.String;
1600
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1601
+ }>, Schema.Null]>>;
1602
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
1433
1603
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
1434
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1604
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1435
1605
  }>;
1436
1606
  readonly audienceSnapshot: Schema.Struct<{
1607
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
1437
1608
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1438
1609
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1439
1610
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
1440
1611
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
1441
1612
  }>;
1442
1613
  readonly policySnapshot: Schema.Struct<{
1443
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
1444
1614
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1445
1615
  }>;
1446
1616
  readonly totalRecipients: Schema.Finite;
@@ -1449,7 +1619,7 @@ export declare const CampaignsScheduleRun201: Schema.Struct<{
1449
1619
  readonly skippedCount: Schema.Finite;
1450
1620
  readonly pendingCount: Schema.Finite;
1451
1621
  readonly skippedReasons: Schema.$Array<Schema.Struct<{
1452
- readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">]>;
1622
+ readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
1453
1623
  readonly count: Schema.Finite;
1454
1624
  }>>;
1455
1625
  readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -1517,12 +1687,12 @@ export declare const CampaignsGetRun200: Schema.Struct<{
1517
1687
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
1518
1688
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
1519
1689
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1520
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1690
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1521
1691
  readonly locale: Schema.optionalKey<Schema.String>;
1522
1692
  readonly timeZone: Schema.optionalKey<Schema.String>;
1523
1693
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
1524
1694
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
1525
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
1695
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
1526
1696
  readonly tracking: Schema.optionalKey<Schema.Struct<{
1527
1697
  readonly opens: Schema.optionalKey<Schema.Boolean>;
1528
1698
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -1531,18 +1701,24 @@ export declare const CampaignsGetRun200: Schema.Struct<{
1531
1701
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1532
1702
  }>>;
1533
1703
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
1704
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1534
1705
  }>;
1706
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1707
+ readonly email: Schema.String;
1708
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1709
+ }>, Schema.Null]>>;
1710
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
1535
1711
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
1536
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1712
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1537
1713
  }>;
1538
1714
  readonly audienceSnapshot: Schema.Struct<{
1715
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
1539
1716
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1540
1717
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1541
1718
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
1542
1719
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
1543
1720
  }>;
1544
1721
  readonly policySnapshot: Schema.Struct<{
1545
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
1546
1722
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1547
1723
  }>;
1548
1724
  readonly totalRecipients: Schema.Finite;
@@ -1551,7 +1727,7 @@ export declare const CampaignsGetRun200: Schema.Struct<{
1551
1727
  readonly skippedCount: Schema.Finite;
1552
1728
  readonly pendingCount: Schema.Finite;
1553
1729
  readonly skippedReasons: Schema.$Array<Schema.Struct<{
1554
- readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">]>;
1730
+ readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
1555
1731
  readonly count: Schema.Finite;
1556
1732
  }>>;
1557
1733
  readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -1615,12 +1791,12 @@ export declare const CampaignsCancelRun200: Schema.Struct<{
1615
1791
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
1616
1792
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
1617
1793
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1618
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1794
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1619
1795
  readonly locale: Schema.optionalKey<Schema.String>;
1620
1796
  readonly timeZone: Schema.optionalKey<Schema.String>;
1621
1797
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
1622
1798
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
1623
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
1799
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
1624
1800
  readonly tracking: Schema.optionalKey<Schema.Struct<{
1625
1801
  readonly opens: Schema.optionalKey<Schema.Boolean>;
1626
1802
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -1629,18 +1805,24 @@ export declare const CampaignsCancelRun200: Schema.Struct<{
1629
1805
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1630
1806
  }>>;
1631
1807
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
1808
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1632
1809
  }>;
1810
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1811
+ readonly email: Schema.String;
1812
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1813
+ }>, Schema.Null]>>;
1814
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
1633
1815
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
1634
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1816
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1635
1817
  }>;
1636
1818
  readonly audienceSnapshot: Schema.Struct<{
1819
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
1637
1820
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1638
1821
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1639
1822
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
1640
1823
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
1641
1824
  }>;
1642
1825
  readonly policySnapshot: Schema.Struct<{
1643
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
1644
1826
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1645
1827
  }>;
1646
1828
  readonly totalRecipients: Schema.Finite;
@@ -1649,7 +1831,7 @@ export declare const CampaignsCancelRun200: Schema.Struct<{
1649
1831
  readonly skippedCount: Schema.Finite;
1650
1832
  readonly pendingCount: Schema.Finite;
1651
1833
  readonly skippedReasons: Schema.$Array<Schema.Struct<{
1652
- readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">]>;
1834
+ readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
1653
1835
  readonly count: Schema.Finite;
1654
1836
  }>>;
1655
1837
  readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -1718,12 +1900,12 @@ export declare const CampaignsPauseRun200: Schema.Struct<{
1718
1900
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
1719
1901
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
1720
1902
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1721
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1903
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1722
1904
  readonly locale: Schema.optionalKey<Schema.String>;
1723
1905
  readonly timeZone: Schema.optionalKey<Schema.String>;
1724
1906
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
1725
1907
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
1726
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
1908
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
1727
1909
  readonly tracking: Schema.optionalKey<Schema.Struct<{
1728
1910
  readonly opens: Schema.optionalKey<Schema.Boolean>;
1729
1911
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -1732,18 +1914,24 @@ export declare const CampaignsPauseRun200: Schema.Struct<{
1732
1914
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1733
1915
  }>>;
1734
1916
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
1917
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1735
1918
  }>;
1919
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1920
+ readonly email: Schema.String;
1921
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1922
+ }>, Schema.Null]>>;
1923
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
1736
1924
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
1737
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
1925
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1738
1926
  }>;
1739
1927
  readonly audienceSnapshot: Schema.Struct<{
1928
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
1740
1929
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1741
1930
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1742
1931
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
1743
1932
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
1744
1933
  }>;
1745
1934
  readonly policySnapshot: Schema.Struct<{
1746
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
1747
1935
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1748
1936
  }>;
1749
1937
  readonly totalRecipients: Schema.Finite;
@@ -1752,7 +1940,7 @@ export declare const CampaignsPauseRun200: Schema.Struct<{
1752
1940
  readonly skippedCount: Schema.Finite;
1753
1941
  readonly pendingCount: Schema.Finite;
1754
1942
  readonly skippedReasons: Schema.$Array<Schema.Struct<{
1755
- readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">]>;
1943
+ readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
1756
1944
  readonly count: Schema.Finite;
1757
1945
  }>>;
1758
1946
  readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -1795,12 +1983,12 @@ export declare const CampaignsListRecipientsPathParams: Schema.Struct<{
1795
1983
  }>;
1796
1984
  export type CampaignsListRecipientsQuery = {
1797
1985
  readonly status?: "pending" | "dispatching" | "dispatched" | "failed" | "skipped" | null;
1798
- readonly limit?: string | null;
1986
+ readonly limit?: number | null;
1799
1987
  readonly cursor?: Cursor | null;
1800
1988
  };
1801
1989
  export declare const CampaignsListRecipientsQuery: Schema.Struct<{
1802
1990
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"dispatching">, Schema.Literal<"dispatched">, Schema.Literal<"failed">, Schema.Literal<"skipped">]>, Schema.Null]>>;
1803
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1991
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1804
1992
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1805
1993
  }>;
1806
1994
  export type CampaignsListRecipients200 = CampaignRecipientPage;
@@ -1812,7 +2000,7 @@ export declare const CampaignsListRecipients200: Schema.Struct<{
1812
2000
  readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"dispatching">, Schema.Literal<"dispatched">, Schema.Literal<"failed">, Schema.Literal<"skipped">]>;
1813
2001
  readonly messageId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1814
2002
  readonly failureReason: Schema.Union<readonly [Schema.String, Schema.Null]>;
1815
- readonly skippedReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">]>, Schema.Null]>;
2003
+ readonly skippedReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>, Schema.Null]>;
1816
2004
  readonly createdAt: Schema.String;
1817
2005
  readonly updatedAt: Schema.String;
1818
2006
  }>>;
@@ -1830,6 +2018,53 @@ export type CampaignsListRecipients500 = InternalError;
1830
2018
  export declare const CampaignsListRecipients500: typeof InternalError;
1831
2019
  export type CampaignsListRecipients504 = GatewayTimeoutError;
1832
2020
  export declare const CampaignsListRecipients504: typeof GatewayTimeoutError;
2021
+ export type CampaignsGetRunReportPathParams = {
2022
+ readonly id: CampaignId;
2023
+ readonly runId: CampaignRunId;
2024
+ };
2025
+ export declare const CampaignsGetRunReportPathParams: Schema.Struct<{
2026
+ readonly id: Schema.brand<Schema.String, "CampaignId">;
2027
+ readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
2028
+ }>;
2029
+ export type CampaignsGetRunReport200 = CampaignRunReport;
2030
+ export declare const CampaignsGetRunReport200: Schema.Struct<{
2031
+ readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
2032
+ readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
2033
+ readonly totalRecipients: Schema.Finite;
2034
+ readonly dispatchedCount: Schema.Finite;
2035
+ readonly failedCount: Schema.Finite;
2036
+ readonly skippedCount: Schema.Finite;
2037
+ readonly deliveredCount: Schema.Finite;
2038
+ readonly hardBounceCount: Schema.Finite;
2039
+ readonly softBounceCount: Schema.Finite;
2040
+ readonly complaintCount: Schema.Finite;
2041
+ readonly engagement: Schema.Struct<{
2042
+ readonly measurement: Schema.Literal<"directional">;
2043
+ readonly uniqueOpens: Schema.Finite;
2044
+ readonly uniqueClicks: Schema.Finite;
2045
+ }>;
2046
+ readonly unsubscribesByTopic: Schema.$Array<Schema.Struct<{
2047
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
2048
+ readonly count: Schema.Finite;
2049
+ }>>;
2050
+ readonly replyCount: Schema.Finite;
2051
+ readonly skippedReasons: Schema.$Array<Schema.Struct<{
2052
+ readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
2053
+ readonly count: Schema.Finite;
2054
+ }>>;
2055
+ }>;
2056
+ export type CampaignsGetRunReport401 = UnauthorizedError;
2057
+ export declare const CampaignsGetRunReport401: typeof UnauthorizedError;
2058
+ export type CampaignsGetRunReport403 = ForbiddenError;
2059
+ export declare const CampaignsGetRunReport403: typeof ForbiddenError;
2060
+ export type CampaignsGetRunReport404 = ResourceNotFoundError;
2061
+ export declare const CampaignsGetRunReport404: typeof ResourceNotFoundError;
2062
+ export type CampaignsGetRunReport422 = ValidationError;
2063
+ export declare const CampaignsGetRunReport422: typeof ValidationError;
2064
+ export type CampaignsGetRunReport500 = InternalError;
2065
+ export declare const CampaignsGetRunReport500: typeof InternalError;
2066
+ export type CampaignsGetRunReport504 = GatewayTimeoutError;
2067
+ export declare const CampaignsGetRunReport504: typeof GatewayTimeoutError;
1833
2068
  export type CampaignsResumeRunPathParams = {
1834
2069
  readonly id: CampaignId;
1835
2070
  readonly runId: CampaignRunId;
@@ -1866,12 +2101,12 @@ export declare const CampaignsResumeRun200: Schema.Struct<{
1866
2101
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
1867
2102
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
1868
2103
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1869
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2104
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1870
2105
  readonly locale: Schema.optionalKey<Schema.String>;
1871
2106
  readonly timeZone: Schema.optionalKey<Schema.String>;
1872
2107
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
1873
2108
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
1874
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
2109
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
1875
2110
  readonly tracking: Schema.optionalKey<Schema.Struct<{
1876
2111
  readonly opens: Schema.optionalKey<Schema.Boolean>;
1877
2112
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -1880,18 +2115,24 @@ export declare const CampaignsResumeRun200: Schema.Struct<{
1880
2115
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1881
2116
  }>>;
1882
2117
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
2118
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1883
2119
  }>;
2120
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
2121
+ readonly email: Schema.String;
2122
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2123
+ }>, Schema.Null]>>;
2124
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
1884
2125
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
1885
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2126
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1886
2127
  }>;
1887
2128
  readonly audienceSnapshot: Schema.Struct<{
2129
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
1888
2130
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1889
2131
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1890
2132
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
1891
2133
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
1892
2134
  }>;
1893
2135
  readonly policySnapshot: Schema.Struct<{
1894
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
1895
2136
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1896
2137
  }>;
1897
2138
  readonly totalRecipients: Schema.Finite;
@@ -1900,7 +2141,7 @@ export declare const CampaignsResumeRun200: Schema.Struct<{
1900
2141
  readonly skippedCount: Schema.Finite;
1901
2142
  readonly pendingCount: Schema.Finite;
1902
2143
  readonly skippedReasons: Schema.$Array<Schema.Struct<{
1903
- readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">]>;
2144
+ readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
1904
2145
  readonly count: Schema.Finite;
1905
2146
  }>>;
1906
2147
  readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -1933,6 +2174,163 @@ export type CampaignsResumeRun502 = ExternalServiceError;
1933
2174
  export declare const CampaignsResumeRun502: typeof ExternalServiceError;
1934
2175
  export type CampaignsResumeRun504 = GatewayTimeoutError;
1935
2176
  export declare const CampaignsResumeRun504: typeof GatewayTimeoutError;
2177
+ export type CampaignsPreviewRequestJson = {
2178
+ readonly content: CampaignContentInput;
2179
+ readonly audience: CampaignAudience;
2180
+ readonly contactId?: ContactId | null;
2181
+ };
2182
+ export declare const CampaignsPreviewRequestJson: Schema.Struct<{
2183
+ readonly content: Schema.Struct<{
2184
+ readonly channel: Schema.Literal<"email">;
2185
+ readonly email: Schema.Struct<{
2186
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2187
+ readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2188
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2189
+ readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
2190
+ readonly filename: Schema.String;
2191
+ readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2192
+ readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
2193
+ readonly contentType: Schema.String;
2194
+ readonly size: Schema.Finite;
2195
+ }>>, Schema.Null]>>;
2196
+ readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
2197
+ readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
2198
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
2199
+ readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2200
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
2201
+ readonly locale: Schema.optionalKey<Schema.String>;
2202
+ readonly timeZone: Schema.optionalKey<Schema.String>;
2203
+ readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
2204
+ readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
2205
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
2206
+ readonly tracking: Schema.optionalKey<Schema.Struct<{
2207
+ readonly opens: Schema.optionalKey<Schema.Boolean>;
2208
+ readonly clicks: Schema.optionalKey<Schema.Boolean>;
2209
+ }>>;
2210
+ readonly footer: Schema.optionalKey<Schema.Struct<{
2211
+ readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
2212
+ }>>;
2213
+ readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
2214
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2215
+ }>;
2216
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
2217
+ readonly email: Schema.String;
2218
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2219
+ }>, Schema.Null]>>;
2220
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
2221
+ readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
2222
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
2223
+ }>;
2224
+ readonly audience: Schema.Struct<{
2225
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
2226
+ readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
2227
+ readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
2228
+ readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
2229
+ readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
2230
+ }>;
2231
+ readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
2232
+ }>;
2233
+ export type CampaignsPreview200 = CampaignPreview;
2234
+ export declare const CampaignsPreview200: Schema.Struct<{
2235
+ readonly subject: Schema.String;
2236
+ readonly preheader: Schema.optionalKey<Schema.String>;
2237
+ readonly html: Schema.String;
2238
+ readonly text: Schema.String;
2239
+ }>;
2240
+ export type CampaignsPreview401 = UnauthorizedError;
2241
+ export declare const CampaignsPreview401: typeof UnauthorizedError;
2242
+ export type CampaignsPreview403 = ForbiddenError;
2243
+ export declare const CampaignsPreview403: typeof ForbiddenError;
2244
+ export type CampaignsPreview404 = ResourceNotFoundError;
2245
+ export declare const CampaignsPreview404: typeof ResourceNotFoundError;
2246
+ export type CampaignsPreview422 = ValidationError;
2247
+ export declare const CampaignsPreview422: typeof ValidationError;
2248
+ export type CampaignsPreview500 = InternalError;
2249
+ export declare const CampaignsPreview500: typeof InternalError;
2250
+ export type CampaignsPreview504 = GatewayTimeoutError;
2251
+ export declare const CampaignsPreview504: typeof GatewayTimeoutError;
2252
+ export type CampaignsSendTestRequestJson = {
2253
+ readonly content: CampaignContentInput;
2254
+ readonly audience: CampaignAudience;
2255
+ readonly contactId?: ContactId | null;
2256
+ };
2257
+ export declare const CampaignsSendTestRequestJson: Schema.Struct<{
2258
+ readonly content: Schema.Struct<{
2259
+ readonly channel: Schema.Literal<"email">;
2260
+ readonly email: Schema.Struct<{
2261
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2262
+ readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2263
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2264
+ readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
2265
+ readonly filename: Schema.String;
2266
+ readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2267
+ readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
2268
+ readonly contentType: Schema.String;
2269
+ readonly size: Schema.Finite;
2270
+ }>>, Schema.Null]>>;
2271
+ readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
2272
+ readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
2273
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
2274
+ readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2275
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
2276
+ readonly locale: Schema.optionalKey<Schema.String>;
2277
+ readonly timeZone: Schema.optionalKey<Schema.String>;
2278
+ readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
2279
+ readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
2280
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
2281
+ readonly tracking: Schema.optionalKey<Schema.Struct<{
2282
+ readonly opens: Schema.optionalKey<Schema.Boolean>;
2283
+ readonly clicks: Schema.optionalKey<Schema.Boolean>;
2284
+ }>>;
2285
+ readonly footer: Schema.optionalKey<Schema.Struct<{
2286
+ readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
2287
+ }>>;
2288
+ readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
2289
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2290
+ }>;
2291
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
2292
+ readonly email: Schema.String;
2293
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2294
+ }>, Schema.Null]>>;
2295
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
2296
+ readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
2297
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
2298
+ }>;
2299
+ readonly audience: Schema.Struct<{
2300
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
2301
+ readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
2302
+ readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
2303
+ readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
2304
+ readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
2305
+ }>;
2306
+ readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
2307
+ }>;
2308
+ export type CampaignsSendTest200 = CampaignTestSend;
2309
+ export declare const CampaignsSendTest200: Schema.Struct<{
2310
+ readonly id: Schema.brand<Schema.String, "MessageId">;
2311
+ }>;
2312
+ export type CampaignsSendTest401 = UnauthorizedError;
2313
+ export declare const CampaignsSendTest401: typeof UnauthorizedError;
2314
+ export type CampaignsSendTest402 = PaymentRequiredError;
2315
+ export declare const CampaignsSendTest402: typeof PaymentRequiredError;
2316
+ export type CampaignsSendTest403 = ForbiddenError | OnboardingReviewRequiredError | FlagDisabledError;
2317
+ export declare const CampaignsSendTest403: Schema.Union<readonly [typeof ForbiddenError, typeof OnboardingReviewRequiredError, typeof FlagDisabledError]>;
2318
+ export type CampaignsSendTest404 = ResourceNotFoundError;
2319
+ export declare const CampaignsSendTest404: typeof ResourceNotFoundError;
2320
+ export type CampaignsSendTest409 = ConflictError;
2321
+ export declare const CampaignsSendTest409: typeof ConflictError;
2322
+ export type CampaignsSendTest422 = ValidationError | FromAddressRequiredError | BrandAddressRequiredError | CampaignFooterRequiredError;
2323
+ export declare const CampaignsSendTest422: Schema.Union<readonly [typeof ValidationError, typeof FromAddressRequiredError, typeof BrandAddressRequiredError, typeof CampaignFooterRequiredError]>;
2324
+ export type CampaignsSendTest429 = RateLimitedError;
2325
+ export declare const CampaignsSendTest429: typeof RateLimitedError;
2326
+ export type CampaignsSendTest500 = InternalError;
2327
+ export declare const CampaignsSendTest500: typeof InternalError;
2328
+ export type CampaignsSendTest502 = BillingProviderError | ExternalServiceError;
2329
+ export declare const CampaignsSendTest502: Schema.Union<readonly [typeof BillingProviderError, typeof ExternalServiceError]>;
2330
+ export type CampaignsSendTest503 = SenderNotReadyError | DeliveryUnavailableError;
2331
+ export declare const CampaignsSendTest503: Schema.Union<readonly [typeof SenderNotReadyError, typeof DeliveryUnavailableError]>;
2332
+ export type CampaignsSendTest504 = GatewayTimeoutError;
2333
+ export declare const CampaignsSendTest504: typeof GatewayTimeoutError;
1936
2334
  declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpApiEndpoint.HttpApiEndpoint<"campaignsArchive", "POST", "/v1/campaigns/:id/archive", Schema.toCodecStringTree<Schema.Struct<{
1937
2335
  readonly id: Schema.brand<Schema.String, "CampaignId">;
1938
2336
  }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
@@ -1956,12 +2354,12 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
1956
2354
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
1957
2355
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
1958
2356
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1959
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2357
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1960
2358
  readonly locale: Schema.optionalKey<Schema.String>;
1961
2359
  readonly timeZone: Schema.optionalKey<Schema.String>;
1962
2360
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
1963
2361
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
1964
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
2362
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
1965
2363
  readonly tracking: Schema.optionalKey<Schema.Struct<{
1966
2364
  readonly opens: Schema.optionalKey<Schema.Boolean>;
1967
2365
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -1970,18 +2368,24 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
1970
2368
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1971
2369
  }>>;
1972
2370
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
2371
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1973
2372
  }>;
2373
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
2374
+ readonly email: Schema.String;
2375
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2376
+ }>, Schema.Null]>>;
2377
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
1974
2378
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
1975
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2379
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
1976
2380
  }>;
1977
2381
  readonly audience: Schema.Struct<{
2382
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
1978
2383
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1979
2384
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
1980
2385
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
1981
2386
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
1982
2387
  }>;
1983
2388
  readonly policy: Schema.Struct<{
1984
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
1985
2389
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1986
2390
  }>;
1987
2391
  readonly definition: Schema.Struct<{
@@ -2135,12 +2539,12 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
2135
2539
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
2136
2540
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
2137
2541
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2138
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2542
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
2139
2543
  readonly locale: Schema.optionalKey<Schema.String>;
2140
2544
  readonly timeZone: Schema.optionalKey<Schema.String>;
2141
2545
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
2142
2546
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
2143
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
2547
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
2144
2548
  readonly tracking: Schema.optionalKey<Schema.Struct<{
2145
2549
  readonly opens: Schema.optionalKey<Schema.Boolean>;
2146
2550
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -2149,18 +2553,24 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
2149
2553
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
2150
2554
  }>>;
2151
2555
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
2556
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2152
2557
  }>;
2558
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
2559
+ readonly email: Schema.String;
2560
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2561
+ }>, Schema.Null]>>;
2562
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
2153
2563
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
2154
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2564
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
2155
2565
  }>;
2156
2566
  readonly audienceSnapshot: Schema.Struct<{
2567
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
2157
2568
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
2158
2569
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
2159
2570
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
2160
2571
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
2161
2572
  }>;
2162
2573
  readonly policySnapshot: Schema.Struct<{
2163
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
2164
2574
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
2165
2575
  }>;
2166
2576
  readonly totalRecipients: Schema.Finite;
@@ -2169,7 +2579,7 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
2169
2579
  readonly skippedCount: Schema.Finite;
2170
2580
  readonly pendingCount: Schema.Finite;
2171
2581
  readonly skippedReasons: Schema.$Array<Schema.Struct<{
2172
- readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">]>;
2582
+ readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
2173
2583
  readonly count: Schema.Finite;
2174
2584
  }>>;
2175
2585
  readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -2317,12 +2727,12 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
2317
2727
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
2318
2728
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
2319
2729
  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]>>;
2730
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
2321
2731
  readonly locale: Schema.optionalKey<Schema.String>;
2322
2732
  readonly timeZone: Schema.optionalKey<Schema.String>;
2323
2733
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
2324
2734
  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]>>;
2735
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
2326
2736
  readonly tracking: Schema.optionalKey<Schema.Struct<{
2327
2737
  readonly opens: Schema.optionalKey<Schema.Boolean>;
2328
2738
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -2331,18 +2741,24 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
2331
2741
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
2332
2742
  }>>;
2333
2743
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
2744
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2334
2745
  }>;
2746
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
2747
+ readonly email: Schema.String;
2748
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2749
+ }>, Schema.Null]>>;
2750
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
2335
2751
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
2336
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2752
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
2337
2753
  }>;
2338
2754
  readonly audience: Schema.Struct<{
2755
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
2339
2756
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
2340
2757
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
2341
2758
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
2342
2759
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
2343
2760
  }>;
2344
2761
  readonly policy: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
2345
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
2346
2762
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
2347
2763
  }>, Schema.Null]>>;
2348
2764
  }>>, never, Schema.toCodecJson<Schema.Struct<{
@@ -2366,12 +2782,12 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
2366
2782
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
2367
2783
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
2368
2784
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2369
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2785
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
2370
2786
  readonly locale: Schema.optionalKey<Schema.String>;
2371
2787
  readonly timeZone: Schema.optionalKey<Schema.String>;
2372
2788
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
2373
2789
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
2374
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
2790
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
2375
2791
  readonly tracking: Schema.optionalKey<Schema.Struct<{
2376
2792
  readonly opens: Schema.optionalKey<Schema.Boolean>;
2377
2793
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -2380,18 +2796,24 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
2380
2796
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
2381
2797
  }>>;
2382
2798
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
2799
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2383
2800
  }>;
2801
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
2802
+ readonly email: Schema.String;
2803
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2804
+ }>, Schema.Null]>>;
2805
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
2384
2806
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
2385
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2807
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
2386
2808
  }>;
2387
2809
  readonly audience: Schema.Struct<{
2810
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
2388
2811
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
2389
2812
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
2390
2813
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
2391
2814
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
2392
2815
  }>;
2393
2816
  readonly policy: Schema.Struct<{
2394
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
2395
2817
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
2396
2818
  }>;
2397
2819
  readonly definition: Schema.Struct<{
@@ -2486,12 +2908,12 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
2486
2908
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
2487
2909
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
2488
2910
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2489
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2911
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
2490
2912
  readonly locale: Schema.optionalKey<Schema.String>;
2491
2913
  readonly timeZone: Schema.optionalKey<Schema.String>;
2492
2914
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
2493
2915
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
2494
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
2916
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
2495
2917
  readonly tracking: Schema.optionalKey<Schema.Struct<{
2496
2918
  readonly opens: Schema.optionalKey<Schema.Boolean>;
2497
2919
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -2500,18 +2922,24 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
2500
2922
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
2501
2923
  }>>;
2502
2924
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
2925
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2503
2926
  }>;
2927
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
2928
+ readonly email: Schema.String;
2929
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2930
+ }>, Schema.Null]>>;
2931
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
2504
2932
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
2505
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2933
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
2506
2934
  }>;
2507
2935
  readonly audience: Schema.Struct<{
2936
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
2508
2937
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
2509
2938
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
2510
2939
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
2511
2940
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
2512
2941
  }>;
2513
2942
  readonly policy: Schema.Struct<{
2514
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
2515
2943
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
2516
2944
  }>;
2517
2945
  readonly definition: Schema.Struct<{
@@ -2643,12 +3071,12 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
2643
3071
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
2644
3072
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
2645
3073
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2646
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
3074
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
2647
3075
  readonly locale: Schema.optionalKey<Schema.String>;
2648
3076
  readonly timeZone: Schema.optionalKey<Schema.String>;
2649
3077
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
2650
3078
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
2651
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
3079
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
2652
3080
  readonly tracking: Schema.optionalKey<Schema.Struct<{
2653
3081
  readonly opens: Schema.optionalKey<Schema.Boolean>;
2654
3082
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -2657,18 +3085,24 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
2657
3085
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
2658
3086
  }>>;
2659
3087
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
3088
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2660
3089
  }>;
3090
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
3091
+ readonly email: Schema.String;
3092
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3093
+ }>, Schema.Null]>>;
3094
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
2661
3095
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
2662
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
3096
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
2663
3097
  }>;
2664
3098
  readonly audienceSnapshot: Schema.Struct<{
3099
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
2665
3100
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
2666
3101
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
2667
3102
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
2668
3103
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
2669
3104
  }>;
2670
3105
  readonly policySnapshot: Schema.Struct<{
2671
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
2672
3106
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
2673
3107
  }>;
2674
3108
  readonly totalRecipients: Schema.Finite;
@@ -2677,7 +3111,7 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
2677
3111
  readonly skippedCount: Schema.Finite;
2678
3112
  readonly pendingCount: Schema.Finite;
2679
3113
  readonly skippedReasons: Schema.$Array<Schema.Struct<{
2680
- readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">]>;
3114
+ readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
2681
3115
  readonly count: Schema.Finite;
2682
3116
  }>>;
2683
3117
  readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -2772,84 +3206,198 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
2772
3206
  readonly _tag: Schema.tag<"ValidationError">;
2773
3207
  readonly message: Schema.String;
2774
3208
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
2775
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"campaignsList", "GET", "/v1/campaigns", never, Schema.toCodecStringTree<Schema.Struct<{
2776
- readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"archived">]>, Schema.Null]>>;
2777
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2778
- readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2779
- }>>, never, never, Schema.toCodecJson<Schema.Struct<{
2780
- readonly items: Schema.$Array<Schema.Struct<{
2781
- readonly id: Schema.brand<Schema.String, "CampaignId">;
2782
- readonly name: Schema.String;
2783
- readonly channel: Schema.Literal<"email">;
2784
- readonly content: Schema.Struct<{
2785
- readonly channel: Schema.Literal<"email">;
2786
- readonly email: Schema.Struct<{
2787
- readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2788
- readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2789
- readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2790
- readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
2791
- readonly filename: Schema.String;
2792
- readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2793
- readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
2794
- readonly contentType: Schema.String;
2795
- readonly size: Schema.Finite;
2796
- }>>, Schema.Null]>>;
2797
- readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
2798
- readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
2799
- readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
2800
- readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2801
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2802
- readonly locale: Schema.optionalKey<Schema.String>;
2803
- readonly timeZone: Schema.optionalKey<Schema.String>;
2804
- readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
2805
- readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
2806
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
2807
- readonly tracking: Schema.optionalKey<Schema.Struct<{
2808
- readonly opens: Schema.optionalKey<Schema.Boolean>;
2809
- readonly clicks: Schema.optionalKey<Schema.Boolean>;
2810
- }>>;
2811
- readonly footer: Schema.optionalKey<Schema.Struct<{
2812
- readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
2813
- }>>;
2814
- readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
2815
- }>;
2816
- readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
2817
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
2818
- }>;
2819
- readonly audience: Schema.Struct<{
2820
- readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
2821
- readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
2822
- readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
2823
- readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
2824
- }>;
2825
- readonly policy: Schema.Struct<{
2826
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
2827
- readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
2828
- }>;
2829
- readonly definition: Schema.Struct<{
2830
- readonly state: Schema.Union<readonly [Schema.Literal<"editable">, Schema.Literal<"frozen">, Schema.Literal<"archived">]>;
2831
- readonly frozenAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
2832
- }>;
2833
- readonly latestRun: Schema.Union<readonly [Schema.Struct<{
2834
- readonly id: Schema.brand<Schema.String, "CampaignRunId">;
2835
- readonly status: Schema.Union<readonly [Schema.Literal<"scheduled">, Schema.Literal<"resolving">, Schema.Literal<"dispatching">, Schema.Literal<"paused">, Schema.Literal<"completed">, Schema.Literal<"cancelled">, Schema.Literal<"failed">]>;
2836
- readonly scheduledFor: Schema.String;
2837
- readonly completedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
2838
- readonly totalRecipients: Schema.Finite;
2839
- readonly dispatchedCount: Schema.Finite;
2840
- readonly failedCount: Schema.Finite;
2841
- readonly skippedCount: Schema.Finite;
2842
- readonly pendingCount: Schema.Finite;
2843
- readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
2844
- }>, Schema.Null]>;
2845
- readonly createdBy: Schema.Union<readonly [Schema.String, Schema.Null]>;
2846
- readonly actorEmail: Schema.String;
2847
- readonly memberRole: Schema.String;
2848
- readonly createdAt: Schema.String;
2849
- readonly updatedAt: Schema.String;
2850
- readonly series: Schema.$Array<Schema.Finite>;
2851
- }>>;
2852
- readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
3209
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"campaignsGetRunReport", "GET", "/v1/campaigns/:id/runs/:runId/report", Schema.toCodecStringTree<Schema.Struct<{
3210
+ readonly id: Schema.brand<Schema.String, "CampaignId">;
3211
+ readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
3212
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
3213
+ readonly campaignId: Schema.brand<Schema.String, "CampaignId">;
3214
+ readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
3215
+ readonly totalRecipients: Schema.Finite;
3216
+ readonly dispatchedCount: Schema.Finite;
3217
+ readonly failedCount: Schema.Finite;
3218
+ readonly skippedCount: Schema.Finite;
3219
+ readonly deliveredCount: Schema.Finite;
3220
+ readonly hardBounceCount: Schema.Finite;
3221
+ readonly softBounceCount: Schema.Finite;
3222
+ readonly complaintCount: Schema.Finite;
3223
+ readonly engagement: Schema.Struct<{
3224
+ readonly measurement: Schema.Literal<"directional">;
3225
+ readonly uniqueOpens: Schema.Finite;
3226
+ readonly uniqueClicks: Schema.Finite;
3227
+ }>;
3228
+ readonly unsubscribesByTopic: Schema.$Array<Schema.Struct<{
3229
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
3230
+ readonly count: Schema.Finite;
3231
+ }>>;
3232
+ readonly replyCount: Schema.Finite;
3233
+ readonly skippedReasons: Schema.$Array<Schema.Struct<{
3234
+ readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
3235
+ readonly count: Schema.Finite;
3236
+ }>>;
3237
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
3238
+ readonly _tag: "ForbiddenError";
3239
+ readonly message: string;
3240
+ }, readonly [Schema.Struct<{
3241
+ readonly _tag: Schema.tag<"ForbiddenError">;
3242
+ readonly message: Schema.String;
3243
+ }>], {
3244
+ readonly _tag: "ForbiddenError";
3245
+ readonly message: string;
3246
+ }>, Schema.Struct<{
3247
+ readonly _tag: Schema.tag<"ForbiddenError">;
3248
+ readonly message: Schema.String;
3249
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
3250
+ readonly _tag: "GatewayTimeoutError";
3251
+ readonly message: string;
3252
+ readonly retryAfterSeconds: number;
3253
+ }, readonly [Schema.Struct<{
3254
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
3255
+ readonly message: Schema.String;
3256
+ readonly retryAfterSeconds: Schema.Finite;
3257
+ }>], {
3258
+ readonly _tag: "GatewayTimeoutError";
3259
+ readonly message: string;
3260
+ readonly retryAfterSeconds: number;
3261
+ }>, Schema.Struct<{
3262
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
3263
+ readonly message: Schema.String;
3264
+ readonly retryAfterSeconds: Schema.Finite;
3265
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
3266
+ readonly _tag: "ResourceNotFoundError";
3267
+ readonly resource: string;
3268
+ readonly id: string;
3269
+ readonly message: string;
3270
+ }, readonly [Schema.Struct<{
3271
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
3272
+ readonly resource: Schema.String;
3273
+ readonly id: Schema.String;
3274
+ readonly message: Schema.String;
3275
+ }>], {
3276
+ readonly _tag: "ResourceNotFoundError";
3277
+ readonly resource: string;
3278
+ readonly id: string;
3279
+ readonly message: string;
3280
+ }>, Schema.Struct<{
3281
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
3282
+ readonly resource: Schema.String;
3283
+ readonly id: Schema.String;
3284
+ readonly message: Schema.String;
3285
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
3286
+ readonly _tag: "UnauthorizedError";
3287
+ readonly message: string;
3288
+ }, readonly [Schema.Struct<{
3289
+ readonly _tag: Schema.tag<"UnauthorizedError">;
3290
+ readonly message: Schema.String;
3291
+ }>], {
3292
+ readonly _tag: "UnauthorizedError";
3293
+ readonly message: string;
3294
+ }>, Schema.Struct<{
3295
+ readonly _tag: Schema.tag<"UnauthorizedError">;
3296
+ readonly message: Schema.String;
3297
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
3298
+ readonly _tag: "ValidationError";
3299
+ readonly message: string;
3300
+ readonly fields?: {
3301
+ readonly [x: string]: readonly string[];
3302
+ } | null;
3303
+ }, readonly [Schema.Struct<{
3304
+ readonly _tag: Schema.tag<"ValidationError">;
3305
+ readonly message: Schema.String;
3306
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
3307
+ }>], {
3308
+ readonly _tag: "ValidationError";
3309
+ readonly message: string;
3310
+ readonly fields?: {
3311
+ readonly [x: string]: readonly string[];
3312
+ } | null;
3313
+ }>, Schema.Struct<{
3314
+ readonly _tag: Schema.tag<"ValidationError">;
3315
+ readonly message: Schema.String;
3316
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
3317
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"campaignsList", "GET", "/v1/campaigns", never, Schema.toCodecStringTree<Schema.Struct<{
3318
+ readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"archived">]>, Schema.Null]>>;
3319
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
3320
+ readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3321
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
3322
+ readonly items: Schema.$Array<Schema.Struct<{
3323
+ readonly id: Schema.brand<Schema.String, "CampaignId">;
3324
+ readonly name: Schema.String;
3325
+ readonly channel: Schema.Literal<"email">;
3326
+ readonly content: Schema.Struct<{
3327
+ readonly channel: Schema.Literal<"email">;
3328
+ readonly email: Schema.Struct<{
3329
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3330
+ readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3331
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3332
+ readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
3333
+ readonly filename: Schema.String;
3334
+ readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3335
+ readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
3336
+ readonly contentType: Schema.String;
3337
+ readonly size: Schema.Finite;
3338
+ }>>, Schema.Null]>>;
3339
+ readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
3340
+ readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
3341
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
3342
+ readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3343
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
3344
+ readonly locale: Schema.optionalKey<Schema.String>;
3345
+ readonly timeZone: Schema.optionalKey<Schema.String>;
3346
+ readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
3347
+ readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
3348
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
3349
+ readonly tracking: Schema.optionalKey<Schema.Struct<{
3350
+ readonly opens: Schema.optionalKey<Schema.Boolean>;
3351
+ readonly clicks: Schema.optionalKey<Schema.Boolean>;
3352
+ }>>;
3353
+ readonly footer: Schema.optionalKey<Schema.Struct<{
3354
+ readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
3355
+ }>>;
3356
+ readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
3357
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3358
+ }>;
3359
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
3360
+ readonly email: Schema.String;
3361
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3362
+ }>, Schema.Null]>>;
3363
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
3364
+ readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
3365
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
3366
+ }>;
3367
+ readonly audience: Schema.Struct<{
3368
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
3369
+ readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
3370
+ readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
3371
+ readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
3372
+ readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
3373
+ }>;
3374
+ readonly policy: Schema.Struct<{
3375
+ readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
3376
+ }>;
3377
+ readonly definition: Schema.Struct<{
3378
+ readonly state: Schema.Union<readonly [Schema.Literal<"editable">, Schema.Literal<"frozen">, Schema.Literal<"archived">]>;
3379
+ readonly frozenAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
3380
+ }>;
3381
+ readonly latestRun: Schema.Union<readonly [Schema.Struct<{
3382
+ readonly id: Schema.brand<Schema.String, "CampaignRunId">;
3383
+ readonly status: Schema.Union<readonly [Schema.Literal<"scheduled">, Schema.Literal<"resolving">, Schema.Literal<"dispatching">, Schema.Literal<"paused">, Schema.Literal<"completed">, Schema.Literal<"cancelled">, Schema.Literal<"failed">]>;
3384
+ readonly scheduledFor: Schema.String;
3385
+ readonly completedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
3386
+ readonly totalRecipients: Schema.Finite;
3387
+ readonly dispatchedCount: Schema.Finite;
3388
+ readonly failedCount: Schema.Finite;
3389
+ readonly skippedCount: Schema.Finite;
3390
+ readonly pendingCount: Schema.Finite;
3391
+ readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
3392
+ }>, Schema.Null]>;
3393
+ readonly createdBy: Schema.Union<readonly [Schema.String, Schema.Null]>;
3394
+ readonly actorEmail: Schema.String;
3395
+ readonly memberRole: Schema.String;
3396
+ readonly createdAt: Schema.String;
3397
+ readonly updatedAt: Schema.String;
3398
+ readonly series: Schema.$Array<Schema.Finite>;
3399
+ }>>;
3400
+ readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
2853
3401
  }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
2854
3402
  readonly _tag: "ForbiddenError";
2855
3403
  readonly message: string;
@@ -2915,7 +3463,7 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
2915
3463
  readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
2916
3464
  }>>, Schema.toCodecStringTree<Schema.Struct<{
2917
3465
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"dispatching">, Schema.Literal<"dispatched">, Schema.Literal<"failed">, Schema.Literal<"skipped">]>, Schema.Null]>>;
2918
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3466
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
2919
3467
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2920
3468
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
2921
3469
  readonly items: Schema.$Array<Schema.Struct<{
@@ -2925,7 +3473,7 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
2925
3473
  readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"dispatching">, Schema.Literal<"dispatched">, Schema.Literal<"failed">, Schema.Literal<"skipped">]>;
2926
3474
  readonly messageId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2927
3475
  readonly failureReason: Schema.Union<readonly [Schema.String, Schema.Null]>;
2928
- readonly skippedReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">]>, Schema.Null]>;
3476
+ readonly skippedReason: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>, Schema.Null]>;
2929
3477
  readonly createdAt: Schema.String;
2930
3478
  readonly updatedAt: Schema.String;
2931
3479
  }>>;
@@ -3014,7 +3562,7 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
3014
3562
  readonly id: Schema.brand<Schema.String, "CampaignId">;
3015
3563
  }>>, Schema.toCodecStringTree<Schema.Struct<{
3016
3564
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"scheduled">, Schema.Literal<"resolving">, Schema.Literal<"dispatching">, Schema.Literal<"paused">, Schema.Literal<"completed">, Schema.Literal<"cancelled">, Schema.Literal<"failed">]>, Schema.Null]>>;
3017
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3565
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
3018
3566
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3019
3567
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
3020
3568
  readonly items: Schema.$Array<Schema.Struct<{
@@ -3042,12 +3590,12 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
3042
3590
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
3043
3591
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
3044
3592
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3045
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
3593
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
3046
3594
  readonly locale: Schema.optionalKey<Schema.String>;
3047
3595
  readonly timeZone: Schema.optionalKey<Schema.String>;
3048
3596
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
3049
3597
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
3050
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
3598
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
3051
3599
  readonly tracking: Schema.optionalKey<Schema.Struct<{
3052
3600
  readonly opens: Schema.optionalKey<Schema.Boolean>;
3053
3601
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -3056,18 +3604,24 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
3056
3604
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
3057
3605
  }>>;
3058
3606
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
3607
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3059
3608
  }>;
3609
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
3610
+ readonly email: Schema.String;
3611
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3612
+ }>, Schema.Null]>>;
3613
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
3060
3614
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
3061
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
3615
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
3062
3616
  }>;
3063
3617
  readonly audienceSnapshot: Schema.Struct<{
3618
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
3064
3619
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
3065
3620
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
3066
3621
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
3067
3622
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
3068
3623
  }>;
3069
3624
  readonly policySnapshot: Schema.Struct<{
3070
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
3071
3625
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
3072
3626
  }>;
3073
3627
  readonly totalRecipients: Schema.Finite;
@@ -3076,7 +3630,7 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
3076
3630
  readonly skippedCount: Schema.Finite;
3077
3631
  readonly pendingCount: Schema.Finite;
3078
3632
  readonly skippedReasons: Schema.$Array<Schema.Struct<{
3079
- readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">]>;
3633
+ readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
3080
3634
  readonly count: Schema.Finite;
3081
3635
  }>>;
3082
3636
  readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -3203,12 +3757,12 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
3203
3757
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
3204
3758
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
3205
3759
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3206
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
3760
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
3207
3761
  readonly locale: Schema.optionalKey<Schema.String>;
3208
3762
  readonly timeZone: Schema.optionalKey<Schema.String>;
3209
3763
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
3210
3764
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
3211
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
3765
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
3212
3766
  readonly tracking: Schema.optionalKey<Schema.Struct<{
3213
3767
  readonly opens: Schema.optionalKey<Schema.Boolean>;
3214
3768
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -3217,18 +3771,24 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
3217
3771
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
3218
3772
  }>>;
3219
3773
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
3774
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3220
3775
  }>;
3776
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
3777
+ readonly email: Schema.String;
3778
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3779
+ }>, Schema.Null]>>;
3780
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
3221
3781
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
3222
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
3782
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
3223
3783
  }>;
3224
3784
  readonly audienceSnapshot: Schema.Struct<{
3785
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
3225
3786
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
3226
3787
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
3227
3788
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
3228
3789
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
3229
3790
  }>;
3230
3791
  readonly policySnapshot: Schema.Struct<{
3231
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
3232
3792
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
3233
3793
  }>;
3234
3794
  readonly totalRecipients: Schema.Finite;
@@ -3237,7 +3797,7 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
3237
3797
  readonly skippedCount: Schema.Finite;
3238
3798
  readonly pendingCount: Schema.Finite;
3239
3799
  readonly skippedReasons: Schema.$Array<Schema.Struct<{
3240
- readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">]>;
3800
+ readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
3241
3801
  readonly count: Schema.Finite;
3242
3802
  }>>;
3243
3803
  readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -3365,6 +3925,141 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
3365
3925
  readonly _tag: Schema.tag<"ValidationError">;
3366
3926
  readonly message: Schema.String;
3367
3927
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
3928
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"campaignsPreview", "POST", "/v1/campaigns/preview", never, never, Schema.toCodecJson<Schema.Struct<{
3929
+ readonly content: Schema.Struct<{
3930
+ readonly channel: Schema.Literal<"email">;
3931
+ readonly email: Schema.Struct<{
3932
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3933
+ readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3934
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3935
+ readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
3936
+ readonly filename: Schema.String;
3937
+ readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3938
+ readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
3939
+ readonly contentType: Schema.String;
3940
+ readonly size: Schema.Finite;
3941
+ }>>, Schema.Null]>>;
3942
+ readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
3943
+ readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
3944
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
3945
+ readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3946
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
3947
+ readonly locale: Schema.optionalKey<Schema.String>;
3948
+ readonly timeZone: Schema.optionalKey<Schema.String>;
3949
+ readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
3950
+ readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
3951
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
3952
+ readonly tracking: Schema.optionalKey<Schema.Struct<{
3953
+ readonly opens: Schema.optionalKey<Schema.Boolean>;
3954
+ readonly clicks: Schema.optionalKey<Schema.Boolean>;
3955
+ }>>;
3956
+ readonly footer: Schema.optionalKey<Schema.Struct<{
3957
+ readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
3958
+ }>>;
3959
+ readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
3960
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3961
+ }>;
3962
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
3963
+ readonly email: Schema.String;
3964
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3965
+ }>, Schema.Null]>>;
3966
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
3967
+ readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
3968
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
3969
+ }>;
3970
+ readonly audience: Schema.Struct<{
3971
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
3972
+ readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
3973
+ readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
3974
+ readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
3975
+ readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
3976
+ }>;
3977
+ readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
3978
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
3979
+ readonly subject: Schema.String;
3980
+ readonly preheader: Schema.optionalKey<Schema.String>;
3981
+ readonly html: Schema.String;
3982
+ readonly text: Schema.String;
3983
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
3984
+ readonly _tag: "ForbiddenError";
3985
+ readonly message: string;
3986
+ }, readonly [Schema.Struct<{
3987
+ readonly _tag: Schema.tag<"ForbiddenError">;
3988
+ readonly message: Schema.String;
3989
+ }>], {
3990
+ readonly _tag: "ForbiddenError";
3991
+ readonly message: string;
3992
+ }>, Schema.Struct<{
3993
+ readonly _tag: Schema.tag<"ForbiddenError">;
3994
+ readonly message: Schema.String;
3995
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
3996
+ readonly _tag: "GatewayTimeoutError";
3997
+ readonly message: string;
3998
+ readonly retryAfterSeconds: number;
3999
+ }, readonly [Schema.Struct<{
4000
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
4001
+ readonly message: Schema.String;
4002
+ readonly retryAfterSeconds: Schema.Finite;
4003
+ }>], {
4004
+ readonly _tag: "GatewayTimeoutError";
4005
+ readonly message: string;
4006
+ readonly retryAfterSeconds: number;
4007
+ }>, Schema.Struct<{
4008
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
4009
+ readonly message: Schema.String;
4010
+ readonly retryAfterSeconds: Schema.Finite;
4011
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
4012
+ readonly _tag: "ResourceNotFoundError";
4013
+ readonly resource: string;
4014
+ readonly id: string;
4015
+ readonly message: string;
4016
+ }, readonly [Schema.Struct<{
4017
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
4018
+ readonly resource: Schema.String;
4019
+ readonly id: Schema.String;
4020
+ readonly message: Schema.String;
4021
+ }>], {
4022
+ readonly _tag: "ResourceNotFoundError";
4023
+ readonly resource: string;
4024
+ readonly id: string;
4025
+ readonly message: string;
4026
+ }>, Schema.Struct<{
4027
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
4028
+ readonly resource: Schema.String;
4029
+ readonly id: Schema.String;
4030
+ readonly message: Schema.String;
4031
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
4032
+ readonly _tag: "UnauthorizedError";
4033
+ readonly message: string;
4034
+ }, readonly [Schema.Struct<{
4035
+ readonly _tag: Schema.tag<"UnauthorizedError">;
4036
+ readonly message: Schema.String;
4037
+ }>], {
4038
+ readonly _tag: "UnauthorizedError";
4039
+ readonly message: string;
4040
+ }>, Schema.Struct<{
4041
+ readonly _tag: Schema.tag<"UnauthorizedError">;
4042
+ readonly message: Schema.String;
4043
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
4044
+ readonly _tag: "ValidationError";
4045
+ readonly message: string;
4046
+ readonly fields?: {
4047
+ readonly [x: string]: readonly string[];
4048
+ } | null;
4049
+ }, readonly [Schema.Struct<{
4050
+ readonly _tag: Schema.tag<"ValidationError">;
4051
+ readonly message: Schema.String;
4052
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
4053
+ }>], {
4054
+ readonly _tag: "ValidationError";
4055
+ readonly message: string;
4056
+ readonly fields?: {
4057
+ readonly [x: string]: readonly string[];
4058
+ } | null;
4059
+ }>, Schema.Struct<{
4060
+ readonly _tag: Schema.tag<"ValidationError">;
4061
+ readonly message: Schema.String;
4062
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
3368
4063
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"campaignsResumeRun", "POST", "/v1/campaigns/:id/runs/:runId/resume", Schema.toCodecStringTree<Schema.Struct<{
3369
4064
  readonly id: Schema.brand<Schema.String, "CampaignId">;
3370
4065
  readonly runId: Schema.brand<Schema.String, "CampaignRunId">;
@@ -3395,12 +4090,12 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
3395
4090
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
3396
4091
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
3397
4092
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3398
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
4093
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
3399
4094
  readonly locale: Schema.optionalKey<Schema.String>;
3400
4095
  readonly timeZone: Schema.optionalKey<Schema.String>;
3401
4096
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
3402
4097
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
3403
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
4098
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
3404
4099
  readonly tracking: Schema.optionalKey<Schema.Struct<{
3405
4100
  readonly opens: Schema.optionalKey<Schema.Boolean>;
3406
4101
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -3409,18 +4104,24 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
3409
4104
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
3410
4105
  }>>;
3411
4106
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
4107
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3412
4108
  }>;
4109
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
4110
+ readonly email: Schema.String;
4111
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4112
+ }>, Schema.Null]>>;
4113
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
3413
4114
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
3414
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
4115
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
3415
4116
  }>;
3416
4117
  readonly audienceSnapshot: Schema.Struct<{
4118
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
3417
4119
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
3418
4120
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
3419
4121
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
3420
4122
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
3421
4123
  }>;
3422
4124
  readonly policySnapshot: Schema.Struct<{
3423
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
3424
4125
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
3425
4126
  }>;
3426
4127
  readonly totalRecipients: Schema.Finite;
@@ -3429,7 +4130,7 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
3429
4130
  readonly skippedCount: Schema.Finite;
3430
4131
  readonly pendingCount: Schema.Finite;
3431
4132
  readonly skippedReasons: Schema.$Array<Schema.Struct<{
3432
- readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">]>;
4133
+ readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
3433
4134
  readonly count: Schema.Finite;
3434
4135
  }>>;
3435
4136
  readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -3587,12 +4288,12 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
3587
4288
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
3588
4289
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
3589
4290
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3590
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
4291
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
3591
4292
  readonly locale: Schema.optionalKey<Schema.String>;
3592
4293
  readonly timeZone: Schema.optionalKey<Schema.String>;
3593
4294
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
3594
4295
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
3595
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
4296
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
3596
4297
  readonly tracking: Schema.optionalKey<Schema.Struct<{
3597
4298
  readonly opens: Schema.optionalKey<Schema.Boolean>;
3598
4299
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -3601,18 +4302,24 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
3601
4302
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
3602
4303
  }>>;
3603
4304
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
4305
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3604
4306
  }>;
4307
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
4308
+ readonly email: Schema.String;
4309
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4310
+ }>, Schema.Null]>>;
4311
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
3605
4312
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
3606
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
4313
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
3607
4314
  }>;
3608
4315
  readonly audienceSnapshot: Schema.Struct<{
4316
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
3609
4317
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
3610
4318
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
3611
4319
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
3612
4320
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
3613
4321
  }>;
3614
4322
  readonly policySnapshot: Schema.Struct<{
3615
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
3616
4323
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
3617
4324
  }>;
3618
4325
  readonly totalRecipients: Schema.Finite;
@@ -3621,7 +4328,7 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
3621
4328
  readonly skippedCount: Schema.Finite;
3622
4329
  readonly pendingCount: Schema.Finite;
3623
4330
  readonly skippedReasons: Schema.$Array<Schema.Struct<{
3624
- readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">]>;
4331
+ readonly reason: Schema.Union<readonly [Schema.Literal<"unsubscribed">, Schema.Literal<"blocked">, Schema.Literal<"suppressed">, Schema.Literal<"opted_out">, Schema.Literal<"unreachable">, Schema.Literal<"no_identity">, Schema.Literal<"inactive">, Schema.Literal<"run_cancelled">, Schema.Literal<"run_failed">, Schema.Literal<"missing_merge_field">]>;
3625
4332
  readonly count: Schema.Finite;
3626
4333
  }>>;
3627
4334
  readonly estimatedCompletionAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -3736,6 +4443,166 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
3736
4443
  }>, Schema.Struct<{
3737
4444
  readonly _tag: Schema.tag<"UnauthorizedError">;
3738
4445
  readonly message: Schema.String;
4446
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"campaignsSendTest", "POST", "/v1/campaigns/test-send", never, never, Schema.toCodecJson<Schema.Struct<{
4447
+ readonly content: Schema.Struct<{
4448
+ readonly channel: Schema.Literal<"email">;
4449
+ readonly email: Schema.Struct<{
4450
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4451
+ readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4452
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4453
+ readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
4454
+ readonly filename: Schema.String;
4455
+ readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4456
+ readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
4457
+ readonly contentType: Schema.String;
4458
+ readonly size: Schema.Finite;
4459
+ }>>, Schema.Null]>>;
4460
+ readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
4461
+ readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
4462
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
4463
+ readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4464
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
4465
+ readonly locale: Schema.optionalKey<Schema.String>;
4466
+ readonly timeZone: Schema.optionalKey<Schema.String>;
4467
+ readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
4468
+ readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
4469
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
4470
+ readonly tracking: Schema.optionalKey<Schema.Struct<{
4471
+ readonly opens: Schema.optionalKey<Schema.Boolean>;
4472
+ readonly clicks: Schema.optionalKey<Schema.Boolean>;
4473
+ }>>;
4474
+ readonly footer: Schema.optionalKey<Schema.Struct<{
4475
+ readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
4476
+ }>>;
4477
+ readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
4478
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4479
+ }>;
4480
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
4481
+ readonly email: Schema.String;
4482
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4483
+ }>, Schema.Null]>>;
4484
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
4485
+ readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
4486
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
4487
+ }>;
4488
+ readonly audience: Schema.Struct<{
4489
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
4490
+ readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
4491
+ readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
4492
+ readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
4493
+ readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
4494
+ }>;
4495
+ readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
4496
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
4497
+ readonly id: Schema.brand<Schema.String, "MessageId">;
4498
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof BillingProviderError, typeof ExternalServiceError]> | Schema.Union<readonly [typeof SenderNotReadyError, typeof DeliveryUnavailableError]> | Schema.Union<readonly [typeof ForbiddenError, typeof OnboardingReviewRequiredError, typeof FlagDisabledError]> | Schema.Union<readonly [typeof ValidationError, typeof FromAddressRequiredError, typeof BrandAddressRequiredError, typeof CampaignFooterRequiredError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
4499
+ readonly _tag: "ConflictError";
4500
+ readonly message: string;
4501
+ readonly resource: string;
4502
+ readonly id?: string | null;
4503
+ }, readonly [Schema.Struct<{
4504
+ readonly _tag: Schema.tag<"ConflictError">;
4505
+ readonly message: Schema.String;
4506
+ readonly resource: Schema.String;
4507
+ readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4508
+ }>], {
4509
+ readonly _tag: "ConflictError";
4510
+ readonly message: string;
4511
+ readonly resource: string;
4512
+ readonly id?: string | null;
4513
+ }>, Schema.Struct<{
4514
+ readonly _tag: Schema.tag<"ConflictError">;
4515
+ readonly message: Schema.String;
4516
+ readonly resource: Schema.String;
4517
+ readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4518
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
4519
+ readonly _tag: "GatewayTimeoutError";
4520
+ readonly message: string;
4521
+ readonly retryAfterSeconds: number;
4522
+ }, readonly [Schema.Struct<{
4523
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
4524
+ readonly message: Schema.String;
4525
+ readonly retryAfterSeconds: Schema.Finite;
4526
+ }>], {
4527
+ readonly _tag: "GatewayTimeoutError";
4528
+ readonly message: string;
4529
+ readonly retryAfterSeconds: number;
4530
+ }>, Schema.Struct<{
4531
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
4532
+ readonly message: Schema.String;
4533
+ readonly retryAfterSeconds: Schema.Finite;
4534
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<PaymentRequiredError, {
4535
+ readonly _tag: "PaymentRequiredError";
4536
+ readonly message: string;
4537
+ readonly resource: string;
4538
+ readonly currentUsage: number;
4539
+ readonly limit: number;
4540
+ }, readonly [Schema.Struct<{
4541
+ readonly _tag: Schema.tag<"PaymentRequiredError">;
4542
+ readonly message: Schema.String;
4543
+ readonly resource: Schema.String;
4544
+ readonly currentUsage: Schema.Finite;
4545
+ readonly limit: Schema.Finite;
4546
+ }>], {
4547
+ readonly _tag: "PaymentRequiredError";
4548
+ readonly message: string;
4549
+ readonly resource: string;
4550
+ readonly currentUsage: number;
4551
+ readonly limit: number;
4552
+ }>, Schema.Struct<{
4553
+ readonly _tag: Schema.tag<"PaymentRequiredError">;
4554
+ readonly message: Schema.String;
4555
+ readonly resource: Schema.String;
4556
+ readonly currentUsage: Schema.Finite;
4557
+ readonly limit: Schema.Finite;
4558
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<RateLimitedError, {
4559
+ readonly _tag: "RateLimitedError";
4560
+ readonly message: string;
4561
+ readonly retryAfterSeconds: number;
4562
+ }, readonly [Schema.Struct<{
4563
+ readonly _tag: Schema.tag<"RateLimitedError">;
4564
+ readonly message: Schema.String;
4565
+ readonly retryAfterSeconds: Schema.Finite;
4566
+ }>], {
4567
+ readonly _tag: "RateLimitedError";
4568
+ readonly message: string;
4569
+ readonly retryAfterSeconds: number;
4570
+ }>, Schema.Struct<{
4571
+ readonly _tag: Schema.tag<"RateLimitedError">;
4572
+ readonly message: Schema.String;
4573
+ readonly retryAfterSeconds: Schema.Finite;
4574
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
4575
+ readonly _tag: "ResourceNotFoundError";
4576
+ readonly resource: string;
4577
+ readonly id: string;
4578
+ readonly message: string;
4579
+ }, readonly [Schema.Struct<{
4580
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
4581
+ readonly resource: Schema.String;
4582
+ readonly id: Schema.String;
4583
+ readonly message: Schema.String;
4584
+ }>], {
4585
+ readonly _tag: "ResourceNotFoundError";
4586
+ readonly resource: string;
4587
+ readonly id: string;
4588
+ readonly message: string;
4589
+ }>, Schema.Struct<{
4590
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
4591
+ readonly resource: Schema.String;
4592
+ readonly id: Schema.String;
4593
+ readonly message: Schema.String;
4594
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
4595
+ readonly _tag: "UnauthorizedError";
4596
+ readonly message: string;
4597
+ }, readonly [Schema.Struct<{
4598
+ readonly _tag: Schema.tag<"UnauthorizedError">;
4599
+ readonly message: Schema.String;
4600
+ }>], {
4601
+ readonly _tag: "UnauthorizedError";
4602
+ readonly message: string;
4603
+ }>, Schema.Struct<{
4604
+ readonly _tag: Schema.tag<"UnauthorizedError">;
4605
+ readonly message: Schema.String;
3739
4606
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"campaignsUpdate", "PATCH", "/v1/campaigns/:id", Schema.toCodecStringTree<Schema.Struct<{
3740
4607
  readonly id: Schema.brand<Schema.String, "CampaignId">;
3741
4608
  }>>, never, Schema.toCodecJson<Schema.Struct<{
@@ -3757,12 +4624,12 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
3757
4624
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
3758
4625
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
3759
4626
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3760
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
4627
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
3761
4628
  readonly locale: Schema.optionalKey<Schema.String>;
3762
4629
  readonly timeZone: Schema.optionalKey<Schema.String>;
3763
4630
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
3764
4631
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
3765
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
4632
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
3766
4633
  readonly tracking: Schema.optionalKey<Schema.Struct<{
3767
4634
  readonly opens: Schema.optionalKey<Schema.Boolean>;
3768
4635
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -3771,18 +4638,24 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
3771
4638
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
3772
4639
  }>>;
3773
4640
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
4641
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3774
4642
  }>;
4643
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
4644
+ readonly email: Schema.String;
4645
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4646
+ }>, Schema.Null]>>;
4647
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
3775
4648
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
3776
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
4649
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
3777
4650
  }>, Schema.Null]>>;
3778
4651
  readonly audience: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
4652
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
3779
4653
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
3780
4654
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
3781
4655
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
3782
4656
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
3783
4657
  }>, Schema.Null]>>;
3784
4658
  readonly policy: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
3785
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
3786
4659
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
3787
4660
  }>, Schema.Null]>>;
3788
4661
  }>>, never, Schema.toCodecJson<Schema.Struct<{
@@ -3806,12 +4679,12 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
3806
4679
  readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
3807
4680
  readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
3808
4681
  readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3809
- readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
4682
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
3810
4683
  readonly locale: Schema.optionalKey<Schema.String>;
3811
4684
  readonly timeZone: Schema.optionalKey<Schema.String>;
3812
4685
  readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
3813
4686
  readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
3814
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>, Schema.Null]>>;
4687
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>, Schema.Null]>>;
3815
4688
  readonly tracking: Schema.optionalKey<Schema.Struct<{
3816
4689
  readonly opens: Schema.optionalKey<Schema.Boolean>;
3817
4690
  readonly clicks: Schema.optionalKey<Schema.Boolean>;
@@ -3820,18 +4693,24 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
3820
4693
  readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
3821
4694
  }>>;
3822
4695
  readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
4696
+ readonly preheader: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3823
4697
  }>;
4698
+ readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
4699
+ readonly email: Schema.String;
4700
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4701
+ }>, Schema.Null]>>;
4702
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
3824
4703
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
3825
- readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
4704
+ readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
3826
4705
  }>;
3827
4706
  readonly audience: Schema.Struct<{
4707
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
3828
4708
  readonly includeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
3829
4709
  readonly excludeTags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
3830
4710
  readonly contactIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactId">>, Schema.Null]>>;
3831
4711
  readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.brand<Schema.String, "ContactGroupId">>, Schema.Null]>>;
3832
4712
  }>;
3833
4713
  readonly policy: Schema.Struct<{
3834
- readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
3835
4714
  readonly pageSize: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
3836
4715
  }>;
3837
4716
  readonly definition: Schema.Struct<{