@distilled.cloud/cloudflare 0.17.0 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client/api.d.ts.map +1 -1
- package/lib/client/api.js +26 -8
- package/lib/client/api.js.map +1 -1
- package/lib/credentials.d.ts +5 -5
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts +17 -1
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +15 -0
- package/lib/errors.js.map +1 -1
- package/lib/services/aisearch.d.ts +41 -41
- package/lib/services/aisearch.d.ts.map +1 -1
- package/lib/services/aisearch.js +41 -41
- package/lib/services/aisearch.js.map +1 -1
- package/lib/services/email-sending.d.ts +204 -0
- package/lib/services/email-sending.d.ts.map +1 -0
- package/lib/services/email-sending.js +309 -0
- package/lib/services/email-sending.js.map +1 -0
- package/lib/services/fraud.d.ts +77 -0
- package/lib/services/fraud.d.ts.map +1 -0
- package/lib/services/fraud.js +110 -0
- package/lib/services/fraud.js.map +1 -0
- package/lib/services/google-tag-gateway.d.ts +62 -0
- package/lib/services/google-tag-gateway.d.ts.map +1 -0
- package/lib/services/google-tag-gateway.js +52 -0
- package/lib/services/google-tag-gateway.js.map +1 -0
- package/lib/services/queues.d.ts.map +1 -1
- package/lib/services/queues.js +5 -1
- package/lib/services/queues.js.map +1 -1
- package/lib/services/workflows.d.ts +1 -1
- package/lib/services/workflows.d.ts.map +1 -1
- package/lib/services/workflows.js +1 -1
- package/lib/services/workflows.js.map +1 -1
- package/package.json +2 -2
- package/src/client/api.ts +29 -7
- package/src/credentials.ts +13 -13
- package/src/errors.ts +19 -0
- package/src/services/aisearch.ts +96 -82
- package/src/services/email-sending.ts +675 -0
- package/src/services/fraud.ts +252 -0
- package/src/services/google-tag-gateway.ts +132 -0
- package/src/services/queues.ts +5 -1
- package/src/services/workflows.ts +2 -2
|
@@ -0,0 +1,675 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cloudflare EMAIL-SENDING API
|
|
3
|
+
*
|
|
4
|
+
* Generated from Cloudflare TypeScript SDK.
|
|
5
|
+
* DO NOT EDIT - regenerate with: bun scripts/generate.ts --service email-sending
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import * as Schema from "effect/Schema";
|
|
9
|
+
import type * as HttpClient from "effect/unstable/http/HttpClient";
|
|
10
|
+
import * as API from "../client/api.ts";
|
|
11
|
+
import * as T from "../traits.ts";
|
|
12
|
+
import type { Credentials } from "../credentials.ts";
|
|
13
|
+
import { type DefaultErrors } from "../errors.ts";
|
|
14
|
+
|
|
15
|
+
// =============================================================================
|
|
16
|
+
// EmailSending
|
|
17
|
+
// =============================================================================
|
|
18
|
+
|
|
19
|
+
export interface SendEmailSendingRequest {
|
|
20
|
+
/** Path param: Identifier of the account. */
|
|
21
|
+
accountId: string;
|
|
22
|
+
/** Body param: Sender email address. Either a plain string or an object with address and name. */
|
|
23
|
+
from: string | { address: string; name: string };
|
|
24
|
+
/** Body param: Email subject line. */
|
|
25
|
+
subject: string;
|
|
26
|
+
/** Body param: Recipient(s). A single email string or an array of email strings. */
|
|
27
|
+
to: string | string[];
|
|
28
|
+
/** Body param: File attachments and inline images. */
|
|
29
|
+
attachments?: (
|
|
30
|
+
| {
|
|
31
|
+
content: string;
|
|
32
|
+
contentId: string;
|
|
33
|
+
disposition: "inline";
|
|
34
|
+
filename: string;
|
|
35
|
+
type: string;
|
|
36
|
+
}
|
|
37
|
+
| {
|
|
38
|
+
content: string;
|
|
39
|
+
disposition: "attachment";
|
|
40
|
+
filename: string;
|
|
41
|
+
type: string;
|
|
42
|
+
}
|
|
43
|
+
)[];
|
|
44
|
+
/** Body param: BCC recipient(s). A single email string or an array of email strings. */
|
|
45
|
+
bcc?: string | string[];
|
|
46
|
+
/** Body param: CC recipient(s). A single email string or an array of email strings. */
|
|
47
|
+
cc?: string | string[];
|
|
48
|
+
/** Body param: Custom email headers as key-value pairs. */
|
|
49
|
+
headers?: Record<string, unknown>;
|
|
50
|
+
/** Body param: HTML body of the email. At least one of text or html must be provided. */
|
|
51
|
+
html?: string;
|
|
52
|
+
/** Body param: Reply-to address. Either a plain string or an object with address and name. */
|
|
53
|
+
replyTo?: string | { address: string; name: string };
|
|
54
|
+
/** Body param: Plain text body of the email. At least one of text or html must be provided. */
|
|
55
|
+
text?: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export const SendEmailSendingRequest =
|
|
59
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
60
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
61
|
+
from: Schema.Union([
|
|
62
|
+
Schema.Struct({
|
|
63
|
+
address: Schema.String,
|
|
64
|
+
name: Schema.String,
|
|
65
|
+
}),
|
|
66
|
+
Schema.String,
|
|
67
|
+
]),
|
|
68
|
+
subject: Schema.String,
|
|
69
|
+
to: Schema.Union([Schema.String, Schema.Array(Schema.String)]),
|
|
70
|
+
attachments: Schema.optional(
|
|
71
|
+
Schema.Array(
|
|
72
|
+
Schema.Union([
|
|
73
|
+
Schema.Struct({
|
|
74
|
+
content: Schema.String,
|
|
75
|
+
contentId: Schema.String,
|
|
76
|
+
disposition: Schema.Literal("inline"),
|
|
77
|
+
filename: Schema.String,
|
|
78
|
+
type: Schema.String,
|
|
79
|
+
}).pipe(
|
|
80
|
+
Schema.encodeKeys({
|
|
81
|
+
content: "content",
|
|
82
|
+
contentId: "content_id",
|
|
83
|
+
disposition: "disposition",
|
|
84
|
+
filename: "filename",
|
|
85
|
+
type: "type",
|
|
86
|
+
}),
|
|
87
|
+
),
|
|
88
|
+
Schema.Struct({
|
|
89
|
+
content: Schema.String,
|
|
90
|
+
disposition: Schema.Literal("attachment"),
|
|
91
|
+
filename: Schema.String,
|
|
92
|
+
type: Schema.String,
|
|
93
|
+
}),
|
|
94
|
+
]),
|
|
95
|
+
),
|
|
96
|
+
),
|
|
97
|
+
bcc: Schema.optional(
|
|
98
|
+
Schema.Union([Schema.String, Schema.Array(Schema.String)]),
|
|
99
|
+
),
|
|
100
|
+
cc: Schema.optional(
|
|
101
|
+
Schema.Union([Schema.String, Schema.Array(Schema.String)]),
|
|
102
|
+
),
|
|
103
|
+
headers: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
|
|
104
|
+
html: Schema.optional(Schema.String),
|
|
105
|
+
replyTo: Schema.optional(
|
|
106
|
+
Schema.Union([
|
|
107
|
+
Schema.Struct({
|
|
108
|
+
address: Schema.String,
|
|
109
|
+
name: Schema.String,
|
|
110
|
+
}),
|
|
111
|
+
Schema.String,
|
|
112
|
+
]),
|
|
113
|
+
),
|
|
114
|
+
text: Schema.optional(Schema.String),
|
|
115
|
+
}).pipe(
|
|
116
|
+
Schema.encodeKeys({
|
|
117
|
+
from: "from",
|
|
118
|
+
subject: "subject",
|
|
119
|
+
to: "to",
|
|
120
|
+
attachments: "attachments",
|
|
121
|
+
bcc: "bcc",
|
|
122
|
+
cc: "cc",
|
|
123
|
+
headers: "headers",
|
|
124
|
+
html: "html",
|
|
125
|
+
replyTo: "reply_to",
|
|
126
|
+
text: "text",
|
|
127
|
+
}),
|
|
128
|
+
T.Http({
|
|
129
|
+
method: "POST",
|
|
130
|
+
path: "/accounts/{account_id}/email/sending/send",
|
|
131
|
+
}),
|
|
132
|
+
) as unknown as Schema.Schema<SendEmailSendingRequest>;
|
|
133
|
+
|
|
134
|
+
export interface SendEmailSendingResponse {
|
|
135
|
+
/** Email addresses to which the message was delivered immediately. */
|
|
136
|
+
delivered: string[];
|
|
137
|
+
/** Email addresses that permanently bounced. */
|
|
138
|
+
permanentBounces: string[];
|
|
139
|
+
/** Email addresses for which delivery was queued for later. */
|
|
140
|
+
queued: string[];
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export const SendEmailSendingResponse =
|
|
144
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
145
|
+
delivered: Schema.Array(Schema.String),
|
|
146
|
+
permanentBounces: Schema.Array(Schema.String),
|
|
147
|
+
queued: Schema.Array(Schema.String),
|
|
148
|
+
})
|
|
149
|
+
.pipe(
|
|
150
|
+
Schema.encodeKeys({
|
|
151
|
+
delivered: "delivered",
|
|
152
|
+
permanentBounces: "permanent_bounces",
|
|
153
|
+
queued: "queued",
|
|
154
|
+
}),
|
|
155
|
+
)
|
|
156
|
+
.pipe(
|
|
157
|
+
T.ResponsePath("result"),
|
|
158
|
+
) as unknown as Schema.Schema<SendEmailSendingResponse>;
|
|
159
|
+
|
|
160
|
+
export type SendEmailSendingError = DefaultErrors;
|
|
161
|
+
|
|
162
|
+
export const sendEmailSending: API.OperationMethod<
|
|
163
|
+
SendEmailSendingRequest,
|
|
164
|
+
SendEmailSendingResponse,
|
|
165
|
+
SendEmailSendingError,
|
|
166
|
+
Credentials | HttpClient.HttpClient
|
|
167
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
168
|
+
input: SendEmailSendingRequest,
|
|
169
|
+
output: SendEmailSendingResponse,
|
|
170
|
+
errors: [],
|
|
171
|
+
}));
|
|
172
|
+
|
|
173
|
+
// =============================================================================
|
|
174
|
+
// RawEmailSending
|
|
175
|
+
// =============================================================================
|
|
176
|
+
|
|
177
|
+
export interface SendRawEmailSendingRequest {
|
|
178
|
+
/** Path param: Identifier of the account. */
|
|
179
|
+
accountId: string;
|
|
180
|
+
/** Body param: Sender email address. */
|
|
181
|
+
from: string;
|
|
182
|
+
/** Body param: The full MIME-encoded email message. Should include standard RFC 5322 headers such as From, To, Subject, and Content-Type. The from and recipients fields in the request body control SMTP e */
|
|
183
|
+
mimeMessage: string;
|
|
184
|
+
/** Body param: List of recipient email addresses. */
|
|
185
|
+
recipients: string[];
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export const SendRawEmailSendingRequest =
|
|
189
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
190
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
191
|
+
from: Schema.String,
|
|
192
|
+
mimeMessage: Schema.String,
|
|
193
|
+
recipients: Schema.Array(Schema.String),
|
|
194
|
+
}).pipe(
|
|
195
|
+
Schema.encodeKeys({
|
|
196
|
+
from: "from",
|
|
197
|
+
mimeMessage: "mime_message",
|
|
198
|
+
recipients: "recipients",
|
|
199
|
+
}),
|
|
200
|
+
T.Http({
|
|
201
|
+
method: "POST",
|
|
202
|
+
path: "/accounts/{account_id}/email/sending/send_raw",
|
|
203
|
+
}),
|
|
204
|
+
) as unknown as Schema.Schema<SendRawEmailSendingRequest>;
|
|
205
|
+
|
|
206
|
+
export interface SendRawEmailSendingResponse {
|
|
207
|
+
/** Email addresses to which the message was delivered immediately. */
|
|
208
|
+
delivered: string[];
|
|
209
|
+
/** Email addresses that permanently bounced. */
|
|
210
|
+
permanentBounces: string[];
|
|
211
|
+
/** Email addresses for which delivery was queued for later. */
|
|
212
|
+
queued: string[];
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export const SendRawEmailSendingResponse =
|
|
216
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
217
|
+
delivered: Schema.Array(Schema.String),
|
|
218
|
+
permanentBounces: Schema.Array(Schema.String),
|
|
219
|
+
queued: Schema.Array(Schema.String),
|
|
220
|
+
})
|
|
221
|
+
.pipe(
|
|
222
|
+
Schema.encodeKeys({
|
|
223
|
+
delivered: "delivered",
|
|
224
|
+
permanentBounces: "permanent_bounces",
|
|
225
|
+
queued: "queued",
|
|
226
|
+
}),
|
|
227
|
+
)
|
|
228
|
+
.pipe(
|
|
229
|
+
T.ResponsePath("result"),
|
|
230
|
+
) as unknown as Schema.Schema<SendRawEmailSendingResponse>;
|
|
231
|
+
|
|
232
|
+
export type SendRawEmailSendingError = DefaultErrors;
|
|
233
|
+
|
|
234
|
+
export const sendRawEmailSending: API.OperationMethod<
|
|
235
|
+
SendRawEmailSendingRequest,
|
|
236
|
+
SendRawEmailSendingResponse,
|
|
237
|
+
SendRawEmailSendingError,
|
|
238
|
+
Credentials | HttpClient.HttpClient
|
|
239
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
240
|
+
input: SendRawEmailSendingRequest,
|
|
241
|
+
output: SendRawEmailSendingResponse,
|
|
242
|
+
errors: [],
|
|
243
|
+
}));
|
|
244
|
+
|
|
245
|
+
// =============================================================================
|
|
246
|
+
// Subdomain
|
|
247
|
+
// =============================================================================
|
|
248
|
+
|
|
249
|
+
export interface GetSubdomainRequest {
|
|
250
|
+
subdomainId: string;
|
|
251
|
+
/** Identifier. */
|
|
252
|
+
zoneId: string;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export const GetSubdomainRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
256
|
+
subdomainId: Schema.String.pipe(T.HttpPath("subdomainId")),
|
|
257
|
+
zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
|
|
258
|
+
}).pipe(
|
|
259
|
+
T.Http({
|
|
260
|
+
method: "GET",
|
|
261
|
+
path: "/zones/{zone_id}/email/sending/subdomains/{subdomainId}",
|
|
262
|
+
}),
|
|
263
|
+
) as unknown as Schema.Schema<GetSubdomainRequest>;
|
|
264
|
+
|
|
265
|
+
export interface GetSubdomainResponse {
|
|
266
|
+
/** Whether Email Sending is enabled on this subdomain. */
|
|
267
|
+
enabled: boolean;
|
|
268
|
+
/** The subdomain domain name. */
|
|
269
|
+
name: string;
|
|
270
|
+
/** Sending subdomain identifier. */
|
|
271
|
+
tag: string;
|
|
272
|
+
/** The date and time the destination address has been created. */
|
|
273
|
+
created?: string | null;
|
|
274
|
+
/** The DKIM selector used for email signing. */
|
|
275
|
+
dkimSelector?: string | null;
|
|
276
|
+
/** The date and time the destination address was last modified. */
|
|
277
|
+
modified?: string | null;
|
|
278
|
+
/** The return-path domain used for bounce handling. */
|
|
279
|
+
returnPathDomain?: string | null;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export const GetSubdomainResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
283
|
+
enabled: Schema.Boolean,
|
|
284
|
+
name: Schema.String,
|
|
285
|
+
tag: Schema.String,
|
|
286
|
+
created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
287
|
+
dkimSelector: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
288
|
+
modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
289
|
+
returnPathDomain: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
290
|
+
})
|
|
291
|
+
.pipe(
|
|
292
|
+
Schema.encodeKeys({
|
|
293
|
+
enabled: "enabled",
|
|
294
|
+
name: "name",
|
|
295
|
+
tag: "tag",
|
|
296
|
+
created: "created",
|
|
297
|
+
dkimSelector: "dkim_selector",
|
|
298
|
+
modified: "modified",
|
|
299
|
+
returnPathDomain: "return_path_domain",
|
|
300
|
+
}),
|
|
301
|
+
)
|
|
302
|
+
.pipe(
|
|
303
|
+
T.ResponsePath("result"),
|
|
304
|
+
) as unknown as Schema.Schema<GetSubdomainResponse>;
|
|
305
|
+
|
|
306
|
+
export type GetSubdomainError = DefaultErrors;
|
|
307
|
+
|
|
308
|
+
export const getSubdomain: API.OperationMethod<
|
|
309
|
+
GetSubdomainRequest,
|
|
310
|
+
GetSubdomainResponse,
|
|
311
|
+
GetSubdomainError,
|
|
312
|
+
Credentials | HttpClient.HttpClient
|
|
313
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
314
|
+
input: GetSubdomainRequest,
|
|
315
|
+
output: GetSubdomainResponse,
|
|
316
|
+
errors: [],
|
|
317
|
+
}));
|
|
318
|
+
|
|
319
|
+
export interface ListSubdomainsRequest {
|
|
320
|
+
/** Identifier. */
|
|
321
|
+
zoneId: string;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
export const ListSubdomainsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
325
|
+
zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
|
|
326
|
+
}).pipe(
|
|
327
|
+
T.Http({ method: "GET", path: "/zones/{zone_id}/email/sending/subdomains" }),
|
|
328
|
+
) as unknown as Schema.Schema<ListSubdomainsRequest>;
|
|
329
|
+
|
|
330
|
+
export interface ListSubdomainsResponse {
|
|
331
|
+
result: {
|
|
332
|
+
enabled: boolean;
|
|
333
|
+
name: string;
|
|
334
|
+
tag: string;
|
|
335
|
+
created?: string | null;
|
|
336
|
+
dkimSelector?: string | null;
|
|
337
|
+
modified?: string | null;
|
|
338
|
+
returnPathDomain?: string | null;
|
|
339
|
+
}[];
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export const ListSubdomainsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
343
|
+
{
|
|
344
|
+
result: Schema.Array(
|
|
345
|
+
Schema.Struct({
|
|
346
|
+
enabled: Schema.Boolean,
|
|
347
|
+
name: Schema.String,
|
|
348
|
+
tag: Schema.String,
|
|
349
|
+
created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
350
|
+
dkimSelector: Schema.optional(
|
|
351
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
352
|
+
),
|
|
353
|
+
modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
354
|
+
returnPathDomain: Schema.optional(
|
|
355
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
356
|
+
),
|
|
357
|
+
}).pipe(
|
|
358
|
+
Schema.encodeKeys({
|
|
359
|
+
enabled: "enabled",
|
|
360
|
+
name: "name",
|
|
361
|
+
tag: "tag",
|
|
362
|
+
created: "created",
|
|
363
|
+
dkimSelector: "dkim_selector",
|
|
364
|
+
modified: "modified",
|
|
365
|
+
returnPathDomain: "return_path_domain",
|
|
366
|
+
}),
|
|
367
|
+
),
|
|
368
|
+
),
|
|
369
|
+
},
|
|
370
|
+
) as unknown as Schema.Schema<ListSubdomainsResponse>;
|
|
371
|
+
|
|
372
|
+
export type ListSubdomainsError = DefaultErrors;
|
|
373
|
+
|
|
374
|
+
export const listSubdomains: API.PaginatedOperationMethod<
|
|
375
|
+
ListSubdomainsRequest,
|
|
376
|
+
ListSubdomainsResponse,
|
|
377
|
+
ListSubdomainsError,
|
|
378
|
+
Credentials | HttpClient.HttpClient
|
|
379
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
|
|
380
|
+
input: ListSubdomainsRequest,
|
|
381
|
+
output: ListSubdomainsResponse,
|
|
382
|
+
errors: [],
|
|
383
|
+
pagination: {
|
|
384
|
+
mode: "single",
|
|
385
|
+
items: "result",
|
|
386
|
+
} as const,
|
|
387
|
+
}));
|
|
388
|
+
|
|
389
|
+
export interface CreateSubdomainRequest {
|
|
390
|
+
/** Path param: Identifier. */
|
|
391
|
+
zoneId: string;
|
|
392
|
+
/** Body param: The subdomain name. Must be within the zone. */
|
|
393
|
+
name: string;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
export const CreateSubdomainRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
397
|
+
{
|
|
398
|
+
zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
|
|
399
|
+
name: Schema.String,
|
|
400
|
+
},
|
|
401
|
+
).pipe(
|
|
402
|
+
T.Http({ method: "POST", path: "/zones/{zone_id}/email/sending/subdomains" }),
|
|
403
|
+
) as unknown as Schema.Schema<CreateSubdomainRequest>;
|
|
404
|
+
|
|
405
|
+
export interface CreateSubdomainResponse {
|
|
406
|
+
/** Whether Email Sending is enabled on this subdomain. */
|
|
407
|
+
enabled: boolean;
|
|
408
|
+
/** The subdomain domain name. */
|
|
409
|
+
name: string;
|
|
410
|
+
/** Sending subdomain identifier. */
|
|
411
|
+
tag: string;
|
|
412
|
+
/** The date and time the destination address has been created. */
|
|
413
|
+
created?: string | null;
|
|
414
|
+
/** The DKIM selector used for email signing. */
|
|
415
|
+
dkimSelector?: string | null;
|
|
416
|
+
/** The date and time the destination address was last modified. */
|
|
417
|
+
modified?: string | null;
|
|
418
|
+
/** The return-path domain used for bounce handling. */
|
|
419
|
+
returnPathDomain?: string | null;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
export const CreateSubdomainResponse =
|
|
423
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
424
|
+
enabled: Schema.Boolean,
|
|
425
|
+
name: Schema.String,
|
|
426
|
+
tag: Schema.String,
|
|
427
|
+
created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
428
|
+
dkimSelector: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
429
|
+
modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
430
|
+
returnPathDomain: Schema.optional(
|
|
431
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
432
|
+
),
|
|
433
|
+
})
|
|
434
|
+
.pipe(
|
|
435
|
+
Schema.encodeKeys({
|
|
436
|
+
enabled: "enabled",
|
|
437
|
+
name: "name",
|
|
438
|
+
tag: "tag",
|
|
439
|
+
created: "created",
|
|
440
|
+
dkimSelector: "dkim_selector",
|
|
441
|
+
modified: "modified",
|
|
442
|
+
returnPathDomain: "return_path_domain",
|
|
443
|
+
}),
|
|
444
|
+
)
|
|
445
|
+
.pipe(
|
|
446
|
+
T.ResponsePath("result"),
|
|
447
|
+
) as unknown as Schema.Schema<CreateSubdomainResponse>;
|
|
448
|
+
|
|
449
|
+
export type CreateSubdomainError = DefaultErrors;
|
|
450
|
+
|
|
451
|
+
export const createSubdomain: API.OperationMethod<
|
|
452
|
+
CreateSubdomainRequest,
|
|
453
|
+
CreateSubdomainResponse,
|
|
454
|
+
CreateSubdomainError,
|
|
455
|
+
Credentials | HttpClient.HttpClient
|
|
456
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
457
|
+
input: CreateSubdomainRequest,
|
|
458
|
+
output: CreateSubdomainResponse,
|
|
459
|
+
errors: [],
|
|
460
|
+
}));
|
|
461
|
+
|
|
462
|
+
export interface DeleteSubdomainRequest {
|
|
463
|
+
subdomainId: string;
|
|
464
|
+
/** Identifier. */
|
|
465
|
+
zoneId: string;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
export const DeleteSubdomainRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
469
|
+
{
|
|
470
|
+
subdomainId: Schema.String.pipe(T.HttpPath("subdomainId")),
|
|
471
|
+
zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
|
|
472
|
+
},
|
|
473
|
+
).pipe(
|
|
474
|
+
T.Http({
|
|
475
|
+
method: "DELETE",
|
|
476
|
+
path: "/zones/{zone_id}/email/sending/subdomains/{subdomainId}",
|
|
477
|
+
}),
|
|
478
|
+
) as unknown as Schema.Schema<DeleteSubdomainRequest>;
|
|
479
|
+
|
|
480
|
+
export interface DeleteSubdomainResponse {
|
|
481
|
+
errors: {
|
|
482
|
+
code: number;
|
|
483
|
+
message: string;
|
|
484
|
+
documentationUrl?: string | null;
|
|
485
|
+
source?: { pointer?: string | null } | null;
|
|
486
|
+
}[];
|
|
487
|
+
messages: {
|
|
488
|
+
code: number;
|
|
489
|
+
message: string;
|
|
490
|
+
documentationUrl?: string | null;
|
|
491
|
+
source?: { pointer?: string | null } | null;
|
|
492
|
+
}[];
|
|
493
|
+
/** Whether the API call was successful. */
|
|
494
|
+
success: true;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
export const DeleteSubdomainResponse =
|
|
498
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
499
|
+
errors: Schema.Array(
|
|
500
|
+
Schema.Struct({
|
|
501
|
+
code: Schema.Number,
|
|
502
|
+
message: Schema.String,
|
|
503
|
+
documentationUrl: Schema.optional(
|
|
504
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
505
|
+
),
|
|
506
|
+
source: Schema.optional(
|
|
507
|
+
Schema.Union([
|
|
508
|
+
Schema.Struct({
|
|
509
|
+
pointer: Schema.optional(
|
|
510
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
511
|
+
),
|
|
512
|
+
}),
|
|
513
|
+
Schema.Null,
|
|
514
|
+
]),
|
|
515
|
+
),
|
|
516
|
+
}).pipe(
|
|
517
|
+
Schema.encodeKeys({
|
|
518
|
+
code: "code",
|
|
519
|
+
message: "message",
|
|
520
|
+
documentationUrl: "documentation_url",
|
|
521
|
+
source: "source",
|
|
522
|
+
}),
|
|
523
|
+
),
|
|
524
|
+
),
|
|
525
|
+
messages: Schema.Array(
|
|
526
|
+
Schema.Struct({
|
|
527
|
+
code: Schema.Number,
|
|
528
|
+
message: Schema.String,
|
|
529
|
+
documentationUrl: Schema.optional(
|
|
530
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
531
|
+
),
|
|
532
|
+
source: Schema.optional(
|
|
533
|
+
Schema.Union([
|
|
534
|
+
Schema.Struct({
|
|
535
|
+
pointer: Schema.optional(
|
|
536
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
537
|
+
),
|
|
538
|
+
}),
|
|
539
|
+
Schema.Null,
|
|
540
|
+
]),
|
|
541
|
+
),
|
|
542
|
+
}).pipe(
|
|
543
|
+
Schema.encodeKeys({
|
|
544
|
+
code: "code",
|
|
545
|
+
message: "message",
|
|
546
|
+
documentationUrl: "documentation_url",
|
|
547
|
+
source: "source",
|
|
548
|
+
}),
|
|
549
|
+
),
|
|
550
|
+
),
|
|
551
|
+
success: Schema.Literal(true),
|
|
552
|
+
}) as unknown as Schema.Schema<DeleteSubdomainResponse>;
|
|
553
|
+
|
|
554
|
+
export type DeleteSubdomainError = DefaultErrors;
|
|
555
|
+
|
|
556
|
+
export const deleteSubdomain: API.OperationMethod<
|
|
557
|
+
DeleteSubdomainRequest,
|
|
558
|
+
DeleteSubdomainResponse,
|
|
559
|
+
DeleteSubdomainError,
|
|
560
|
+
Credentials | HttpClient.HttpClient
|
|
561
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
562
|
+
input: DeleteSubdomainRequest,
|
|
563
|
+
output: DeleteSubdomainResponse,
|
|
564
|
+
errors: [],
|
|
565
|
+
}));
|
|
566
|
+
|
|
567
|
+
// =============================================================================
|
|
568
|
+
// SubdomainDn
|
|
569
|
+
// =============================================================================
|
|
570
|
+
|
|
571
|
+
export interface GetSubdomainDnsRequest {
|
|
572
|
+
subdomainId: string;
|
|
573
|
+
/** Identifier. */
|
|
574
|
+
zoneId: string;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
export const GetSubdomainDnsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
578
|
+
{
|
|
579
|
+
subdomainId: Schema.String.pipe(T.HttpPath("subdomainId")),
|
|
580
|
+
zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
|
|
581
|
+
},
|
|
582
|
+
).pipe(
|
|
583
|
+
T.Http({
|
|
584
|
+
method: "GET",
|
|
585
|
+
path: "/zones/{zone_id}/email/sending/subdomains/{subdomainId}/dns",
|
|
586
|
+
}),
|
|
587
|
+
) as unknown as Schema.Schema<GetSubdomainDnsRequest>;
|
|
588
|
+
|
|
589
|
+
export interface GetSubdomainDnsResponse {
|
|
590
|
+
result: {
|
|
591
|
+
content?: string | null;
|
|
592
|
+
name?: string | null;
|
|
593
|
+
priority?: number | null;
|
|
594
|
+
ttl?: number | "1" | null;
|
|
595
|
+
type?:
|
|
596
|
+
| "A"
|
|
597
|
+
| "AAAA"
|
|
598
|
+
| "CNAME"
|
|
599
|
+
| "HTTPS"
|
|
600
|
+
| "TXT"
|
|
601
|
+
| "SRV"
|
|
602
|
+
| "LOC"
|
|
603
|
+
| "MX"
|
|
604
|
+
| "NS"
|
|
605
|
+
| "CERT"
|
|
606
|
+
| "DNSKEY"
|
|
607
|
+
| "DS"
|
|
608
|
+
| "NAPTR"
|
|
609
|
+
| "SMIMEA"
|
|
610
|
+
| "SSHFP"
|
|
611
|
+
| "SVCB"
|
|
612
|
+
| "TLSA"
|
|
613
|
+
| "URI"
|
|
614
|
+
| null;
|
|
615
|
+
}[];
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
export const GetSubdomainDnsResponse =
|
|
619
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
620
|
+
result: Schema.Array(
|
|
621
|
+
Schema.Struct({
|
|
622
|
+
content: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
623
|
+
name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
624
|
+
priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
625
|
+
ttl: Schema.optional(
|
|
626
|
+
Schema.Union([
|
|
627
|
+
Schema.Union([Schema.Number, Schema.Literal("1")]),
|
|
628
|
+
Schema.Null,
|
|
629
|
+
]),
|
|
630
|
+
),
|
|
631
|
+
type: Schema.optional(
|
|
632
|
+
Schema.Union([
|
|
633
|
+
Schema.Literals([
|
|
634
|
+
"A",
|
|
635
|
+
"AAAA",
|
|
636
|
+
"CNAME",
|
|
637
|
+
"HTTPS",
|
|
638
|
+
"TXT",
|
|
639
|
+
"SRV",
|
|
640
|
+
"LOC",
|
|
641
|
+
"MX",
|
|
642
|
+
"NS",
|
|
643
|
+
"CERT",
|
|
644
|
+
"DNSKEY",
|
|
645
|
+
"DS",
|
|
646
|
+
"NAPTR",
|
|
647
|
+
"SMIMEA",
|
|
648
|
+
"SSHFP",
|
|
649
|
+
"SVCB",
|
|
650
|
+
"TLSA",
|
|
651
|
+
"URI",
|
|
652
|
+
]),
|
|
653
|
+
Schema.Null,
|
|
654
|
+
]),
|
|
655
|
+
),
|
|
656
|
+
}),
|
|
657
|
+
),
|
|
658
|
+
}) as unknown as Schema.Schema<GetSubdomainDnsResponse>;
|
|
659
|
+
|
|
660
|
+
export type GetSubdomainDnsError = DefaultErrors;
|
|
661
|
+
|
|
662
|
+
export const getSubdomainDns: API.PaginatedOperationMethod<
|
|
663
|
+
GetSubdomainDnsRequest,
|
|
664
|
+
GetSubdomainDnsResponse,
|
|
665
|
+
GetSubdomainDnsError,
|
|
666
|
+
Credentials | HttpClient.HttpClient
|
|
667
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
|
|
668
|
+
input: GetSubdomainDnsRequest,
|
|
669
|
+
output: GetSubdomainDnsResponse,
|
|
670
|
+
errors: [],
|
|
671
|
+
pagination: {
|
|
672
|
+
mode: "single",
|
|
673
|
+
items: "result",
|
|
674
|
+
} as const,
|
|
675
|
+
}));
|