@mobilerun/sdk 5.3.0 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/mailboxes/index.d.mts +3 -0
- package/resources/mailboxes/index.d.mts.map +1 -0
- package/resources/mailboxes/index.d.ts +3 -0
- package/resources/mailboxes/index.d.ts.map +1 -0
- package/resources/mailboxes/index.js +9 -0
- package/resources/mailboxes/index.js.map +1 -0
- package/resources/mailboxes/index.mjs +4 -0
- package/resources/mailboxes/index.mjs.map +1 -0
- package/resources/mailboxes/mailboxes.d.mts +366 -0
- package/resources/mailboxes/mailboxes.d.mts.map +1 -0
- package/resources/mailboxes/mailboxes.d.ts +366 -0
- package/resources/mailboxes/mailboxes.d.ts.map +1 -0
- package/resources/mailboxes/mailboxes.js +146 -0
- package/resources/mailboxes/mailboxes.js.map +1 -0
- package/resources/mailboxes/mailboxes.mjs +141 -0
- package/resources/mailboxes/mailboxes.mjs.map +1 -0
- package/resources/mailboxes/messages.d.mts +82 -0
- package/resources/mailboxes/messages.d.mts.map +1 -0
- package/resources/mailboxes/messages.d.ts +82 -0
- package/resources/mailboxes/messages.d.ts.map +1 -0
- package/resources/mailboxes/messages.js +39 -0
- package/resources/mailboxes/messages.js.map +1 -0
- package/resources/mailboxes/messages.mjs +35 -0
- package/resources/mailboxes/messages.mjs.map +1 -0
- package/resources/mailboxes.d.mts +2 -0
- package/resources/mailboxes.d.mts.map +1 -0
- package/resources/mailboxes.d.ts +2 -0
- package/resources/mailboxes.d.ts.map +1 -0
- package/resources/mailboxes.js +6 -0
- package/resources/mailboxes.js.map +1 -0
- package/resources/mailboxes.mjs +3 -0
- package/resources/mailboxes.mjs.map +1 -0
- package/src/client.ts +37 -0
- package/src/resources/index.ts +17 -0
- package/src/resources/mailboxes/index.ts +26 -0
- package/src/resources/mailboxes/mailboxes.ts +618 -0
- package/src/resources/mailboxes/messages.ts +134 -0
- package/src/resources/mailboxes.ts +3 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,618 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as Shared from '../shared';
|
|
5
|
+
import * as MessagesAPI from './messages';
|
|
6
|
+
import {
|
|
7
|
+
MessageListParams,
|
|
8
|
+
MessageListResponse,
|
|
9
|
+
MessageRetrieveParams,
|
|
10
|
+
MessageRetrieveResponse,
|
|
11
|
+
Messages,
|
|
12
|
+
} from './messages';
|
|
13
|
+
import { APIPromise } from '../../core/api-promise';
|
|
14
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
15
|
+
import { path } from '../../internal/utils/path';
|
|
16
|
+
|
|
17
|
+
export class Mailboxes extends APIResource {
|
|
18
|
+
messages: MessagesAPI.Messages = new MessagesAPI.Messages(this._client);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Reserves a permanently-allocated, individually-rented mailbox and starts an
|
|
22
|
+
* Autumn rental checkout. An optional localPart selects the full address local
|
|
23
|
+
* part; omitting it keeps the default random, non-guessable mx\_-prefixed address.
|
|
24
|
+
* The address is withheld until the first payment is confirmed. Idempotent on
|
|
25
|
+
* (owner, clientRequestId): same key + payload replays (200); a conflicting or
|
|
26
|
+
* already-held local part returns 409. 201 when the checkout URL is already
|
|
27
|
+
* persisted, otherwise 202 (poll GET for the URL).
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const mailbox = await client.mailboxes.create({
|
|
32
|
+
* clientRequestId: 'x',
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
create(body: MailboxCreateParams, options?: RequestOptions): APIPromise<MailboxCreateResponse> {
|
|
37
|
+
return this._client.post('/mailboxes', { body, ...options });
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Get a mailbox
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const mailbox = await client.mailboxes.retrieve(
|
|
46
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
47
|
+
* );
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
retrieve(mailboxID: string, options?: RequestOptions): APIPromise<MailboxRetrieveResponse> {
|
|
51
|
+
return this._client.get(path`/mailboxes/${mailboxID}`, options);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Updates the label of a mailbox.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* const mailbox = await client.mailboxes.update(
|
|
60
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
61
|
+
* { label: 'label' },
|
|
62
|
+
* );
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
update(
|
|
66
|
+
mailboxID: string,
|
|
67
|
+
body: MailboxUpdateParams,
|
|
68
|
+
options?: RequestOptions,
|
|
69
|
+
): APIPromise<MailboxUpdateResponse> {
|
|
70
|
+
return this._client.patch(path`/mailboxes/${mailboxID}`, { body, ...options });
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Lists the caller-owned mailboxes with page-based pagination.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* const mailboxes = await client.mailboxes.list();
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
list(
|
|
82
|
+
query: MailboxListParams | null | undefined = {},
|
|
83
|
+
options?: RequestOptions,
|
|
84
|
+
): APIPromise<MailboxListResponse> {
|
|
85
|
+
return this._client.get('/mailboxes', { query, ...options });
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* For paid rent, schedules end-of-cycle cancellation. For an included generation,
|
|
90
|
+
* archives immediately and releases its package seat. This never deletes the
|
|
91
|
+
* mailbox, its address, or its messages — the address is permanently reserved.
|
|
92
|
+
* Idempotent.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```ts
|
|
96
|
+
* const mailbox = await client.mailboxes.delete(
|
|
97
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
98
|
+
* );
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
delete(mailboxID: string, options?: RequestOptions): APIPromise<MailboxDeleteResponse> {
|
|
102
|
+
return this._client.delete(path`/mailboxes/${mailboxID}`, options);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Returns the authoritative number of package-funded mailbox claims currently
|
|
107
|
+
* available after local reservations.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```ts
|
|
111
|
+
* const response = await client.mailboxes.capacity();
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
capacity(options?: RequestOptions): APIPromise<MailboxCapacityResponse> {
|
|
115
|
+
return this._client.get('/mailboxes/capacity', options);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Returns the highest-confidence, most recent OTP for the mailbox, restricted to
|
|
120
|
+
* messages of completed/active paid intervals. Does not wait server-side (SDKs
|
|
121
|
+
* poll). 200 with the best code, 204 when none matches.
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* ```ts
|
|
125
|
+
* const response = await client.mailboxes.otp(
|
|
126
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
127
|
+
* );
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
otp(
|
|
131
|
+
mailboxID: string,
|
|
132
|
+
query: MailboxOtpParams | null | undefined = {},
|
|
133
|
+
options?: RequestOptions,
|
|
134
|
+
): APIPromise<MailboxOtpResponse> {
|
|
135
|
+
return this._client.get(path`/mailboxes/${mailboxID}/otp`, { query, ...options });
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Starts a new generation on an archived mailbox, reusing the same permanent
|
|
140
|
+
* address. Uses included capacity first unless paid rent is requested.
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```ts
|
|
144
|
+
* const response = await client.mailboxes.restart(
|
|
145
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
146
|
+
* );
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
restart(
|
|
150
|
+
mailboxID: string,
|
|
151
|
+
body: MailboxRestartParams | null | undefined = {},
|
|
152
|
+
options?: RequestOptions,
|
|
153
|
+
): APIPromise<MailboxRestartResponse> {
|
|
154
|
+
return this._client.post(path`/mailboxes/${mailboxID}/restart`, { body, ...options });
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Retracts a scheduled end-of-cycle cancellation for the current generation. Only
|
|
159
|
+
* valid while cancellation is pending.
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* ```ts
|
|
163
|
+
* const response = await client.mailboxes.uncancel(
|
|
164
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
165
|
+
* );
|
|
166
|
+
* ```
|
|
167
|
+
*/
|
|
168
|
+
uncancel(mailboxID: string, options?: RequestOptions): APIPromise<MailboxUncancelResponse> {
|
|
169
|
+
return this._client.post(path`/mailboxes/${mailboxID}/uncancel`, options);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface MailboxCreateResponse {
|
|
174
|
+
data: MailboxCreateResponse.Data;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export namespace MailboxCreateResponse {
|
|
178
|
+
export interface Data {
|
|
179
|
+
id: string;
|
|
180
|
+
|
|
181
|
+
address: string | null;
|
|
182
|
+
|
|
183
|
+
billingMode: 'rent' | 'included';
|
|
184
|
+
|
|
185
|
+
cancelAtPeriodEnd: boolean;
|
|
186
|
+
|
|
187
|
+
checkoutExpiresAt: string | null;
|
|
188
|
+
|
|
189
|
+
checkoutUrl: string | null;
|
|
190
|
+
|
|
191
|
+
createdAt: string;
|
|
192
|
+
|
|
193
|
+
currentPeriodEnd: string | null;
|
|
194
|
+
|
|
195
|
+
inboundMessages: Data.InboundMessages;
|
|
196
|
+
|
|
197
|
+
label: string | null;
|
|
198
|
+
|
|
199
|
+
status:
|
|
200
|
+
| 'provisioning'
|
|
201
|
+
| 'awaiting_payment'
|
|
202
|
+
| 'active'
|
|
203
|
+
| 'cancel_scheduled'
|
|
204
|
+
| 'archived'
|
|
205
|
+
| 'billing_error';
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export namespace Data {
|
|
209
|
+
export interface InboundMessages {
|
|
210
|
+
exhausted: boolean;
|
|
211
|
+
|
|
212
|
+
included: number;
|
|
213
|
+
|
|
214
|
+
resetsAt: string | null;
|
|
215
|
+
|
|
216
|
+
used: number;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export interface MailboxRetrieveResponse {
|
|
222
|
+
data: MailboxRetrieveResponse.Data;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export namespace MailboxRetrieveResponse {
|
|
226
|
+
export interface Data {
|
|
227
|
+
id: string;
|
|
228
|
+
|
|
229
|
+
address: string | null;
|
|
230
|
+
|
|
231
|
+
billingMode: 'rent' | 'included';
|
|
232
|
+
|
|
233
|
+
cancelAtPeriodEnd: boolean;
|
|
234
|
+
|
|
235
|
+
checkoutExpiresAt: string | null;
|
|
236
|
+
|
|
237
|
+
checkoutUrl: string | null;
|
|
238
|
+
|
|
239
|
+
createdAt: string;
|
|
240
|
+
|
|
241
|
+
currentPeriodEnd: string | null;
|
|
242
|
+
|
|
243
|
+
inboundMessages: Data.InboundMessages;
|
|
244
|
+
|
|
245
|
+
label: string | null;
|
|
246
|
+
|
|
247
|
+
status:
|
|
248
|
+
| 'provisioning'
|
|
249
|
+
| 'awaiting_payment'
|
|
250
|
+
| 'active'
|
|
251
|
+
| 'cancel_scheduled'
|
|
252
|
+
| 'archived'
|
|
253
|
+
| 'billing_error';
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export namespace Data {
|
|
257
|
+
export interface InboundMessages {
|
|
258
|
+
exhausted: boolean;
|
|
259
|
+
|
|
260
|
+
included: number;
|
|
261
|
+
|
|
262
|
+
resetsAt: string | null;
|
|
263
|
+
|
|
264
|
+
used: number;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export interface MailboxUpdateResponse {
|
|
270
|
+
data: MailboxUpdateResponse.Data;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export namespace MailboxUpdateResponse {
|
|
274
|
+
export interface Data {
|
|
275
|
+
id: string;
|
|
276
|
+
|
|
277
|
+
address: string | null;
|
|
278
|
+
|
|
279
|
+
billingMode: 'rent' | 'included';
|
|
280
|
+
|
|
281
|
+
cancelAtPeriodEnd: boolean;
|
|
282
|
+
|
|
283
|
+
checkoutExpiresAt: string | null;
|
|
284
|
+
|
|
285
|
+
checkoutUrl: string | null;
|
|
286
|
+
|
|
287
|
+
createdAt: string;
|
|
288
|
+
|
|
289
|
+
currentPeriodEnd: string | null;
|
|
290
|
+
|
|
291
|
+
inboundMessages: Data.InboundMessages;
|
|
292
|
+
|
|
293
|
+
label: string | null;
|
|
294
|
+
|
|
295
|
+
status:
|
|
296
|
+
| 'provisioning'
|
|
297
|
+
| 'awaiting_payment'
|
|
298
|
+
| 'active'
|
|
299
|
+
| 'cancel_scheduled'
|
|
300
|
+
| 'archived'
|
|
301
|
+
| 'billing_error';
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export namespace Data {
|
|
305
|
+
export interface InboundMessages {
|
|
306
|
+
exhausted: boolean;
|
|
307
|
+
|
|
308
|
+
included: number;
|
|
309
|
+
|
|
310
|
+
resetsAt: string | null;
|
|
311
|
+
|
|
312
|
+
used: number;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export interface MailboxListResponse {
|
|
318
|
+
items: Array<MailboxListResponse.Item>;
|
|
319
|
+
|
|
320
|
+
pagination: Shared.Pagination;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export namespace MailboxListResponse {
|
|
324
|
+
export interface Item {
|
|
325
|
+
id: string;
|
|
326
|
+
|
|
327
|
+
address: string | null;
|
|
328
|
+
|
|
329
|
+
billingMode: 'rent' | 'included';
|
|
330
|
+
|
|
331
|
+
cancelAtPeriodEnd: boolean;
|
|
332
|
+
|
|
333
|
+
checkoutExpiresAt: string | null;
|
|
334
|
+
|
|
335
|
+
checkoutUrl: string | null;
|
|
336
|
+
|
|
337
|
+
createdAt: string;
|
|
338
|
+
|
|
339
|
+
currentPeriodEnd: string | null;
|
|
340
|
+
|
|
341
|
+
inboundMessages: Item.InboundMessages;
|
|
342
|
+
|
|
343
|
+
label: string | null;
|
|
344
|
+
|
|
345
|
+
status:
|
|
346
|
+
| 'provisioning'
|
|
347
|
+
| 'awaiting_payment'
|
|
348
|
+
| 'active'
|
|
349
|
+
| 'cancel_scheduled'
|
|
350
|
+
| 'archived'
|
|
351
|
+
| 'billing_error';
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export namespace Item {
|
|
355
|
+
export interface InboundMessages {
|
|
356
|
+
exhausted: boolean;
|
|
357
|
+
|
|
358
|
+
included: number;
|
|
359
|
+
|
|
360
|
+
resetsAt: string | null;
|
|
361
|
+
|
|
362
|
+
used: number;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export interface MailboxDeleteResponse {
|
|
368
|
+
data: MailboxDeleteResponse.Data;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export namespace MailboxDeleteResponse {
|
|
372
|
+
export interface Data {
|
|
373
|
+
id: string;
|
|
374
|
+
|
|
375
|
+
address: string | null;
|
|
376
|
+
|
|
377
|
+
billingMode: 'rent' | 'included';
|
|
378
|
+
|
|
379
|
+
cancelAtPeriodEnd: boolean;
|
|
380
|
+
|
|
381
|
+
checkoutExpiresAt: string | null;
|
|
382
|
+
|
|
383
|
+
checkoutUrl: string | null;
|
|
384
|
+
|
|
385
|
+
createdAt: string;
|
|
386
|
+
|
|
387
|
+
currentPeriodEnd: string | null;
|
|
388
|
+
|
|
389
|
+
inboundMessages: Data.InboundMessages;
|
|
390
|
+
|
|
391
|
+
label: string | null;
|
|
392
|
+
|
|
393
|
+
status:
|
|
394
|
+
| 'provisioning'
|
|
395
|
+
| 'awaiting_payment'
|
|
396
|
+
| 'active'
|
|
397
|
+
| 'cancel_scheduled'
|
|
398
|
+
| 'archived'
|
|
399
|
+
| 'billing_error';
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export namespace Data {
|
|
403
|
+
export interface InboundMessages {
|
|
404
|
+
exhausted: boolean;
|
|
405
|
+
|
|
406
|
+
included: number;
|
|
407
|
+
|
|
408
|
+
resetsAt: string | null;
|
|
409
|
+
|
|
410
|
+
used: number;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
export interface MailboxCapacityResponse {
|
|
416
|
+
data: MailboxCapacityResponse.Data;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
export namespace MailboxCapacityResponse {
|
|
420
|
+
export interface Data {
|
|
421
|
+
includedRemaining: number;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
export interface MailboxOtpResponse {
|
|
426
|
+
data: MailboxOtpResponse.Data;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
export namespace MailboxOtpResponse {
|
|
430
|
+
export interface Data {
|
|
431
|
+
/**
|
|
432
|
+
* String to preserve leading zeros
|
|
433
|
+
*/
|
|
434
|
+
code: string;
|
|
435
|
+
|
|
436
|
+
confidence: 'high' | 'medium' | 'low';
|
|
437
|
+
|
|
438
|
+
messageId: string;
|
|
439
|
+
|
|
440
|
+
receivedAt: string;
|
|
441
|
+
|
|
442
|
+
sender: string | null;
|
|
443
|
+
|
|
444
|
+
subject: string | null;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
export interface MailboxRestartResponse {
|
|
449
|
+
data: MailboxRestartResponse.Data;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
export namespace MailboxRestartResponse {
|
|
453
|
+
export interface Data {
|
|
454
|
+
id: string;
|
|
455
|
+
|
|
456
|
+
address: string | null;
|
|
457
|
+
|
|
458
|
+
billingMode: 'rent' | 'included';
|
|
459
|
+
|
|
460
|
+
cancelAtPeriodEnd: boolean;
|
|
461
|
+
|
|
462
|
+
checkoutExpiresAt: string | null;
|
|
463
|
+
|
|
464
|
+
checkoutUrl: string | null;
|
|
465
|
+
|
|
466
|
+
createdAt: string;
|
|
467
|
+
|
|
468
|
+
currentPeriodEnd: string | null;
|
|
469
|
+
|
|
470
|
+
inboundMessages: Data.InboundMessages;
|
|
471
|
+
|
|
472
|
+
label: string | null;
|
|
473
|
+
|
|
474
|
+
status:
|
|
475
|
+
| 'provisioning'
|
|
476
|
+
| 'awaiting_payment'
|
|
477
|
+
| 'active'
|
|
478
|
+
| 'cancel_scheduled'
|
|
479
|
+
| 'archived'
|
|
480
|
+
| 'billing_error';
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
export namespace Data {
|
|
484
|
+
export interface InboundMessages {
|
|
485
|
+
exhausted: boolean;
|
|
486
|
+
|
|
487
|
+
included: number;
|
|
488
|
+
|
|
489
|
+
resetsAt: string | null;
|
|
490
|
+
|
|
491
|
+
used: number;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
export interface MailboxUncancelResponse {
|
|
497
|
+
data: MailboxUncancelResponse.Data;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
export namespace MailboxUncancelResponse {
|
|
501
|
+
export interface Data {
|
|
502
|
+
id: string;
|
|
503
|
+
|
|
504
|
+
address: string | null;
|
|
505
|
+
|
|
506
|
+
billingMode: 'rent' | 'included';
|
|
507
|
+
|
|
508
|
+
cancelAtPeriodEnd: boolean;
|
|
509
|
+
|
|
510
|
+
checkoutExpiresAt: string | null;
|
|
511
|
+
|
|
512
|
+
checkoutUrl: string | null;
|
|
513
|
+
|
|
514
|
+
createdAt: string;
|
|
515
|
+
|
|
516
|
+
currentPeriodEnd: string | null;
|
|
517
|
+
|
|
518
|
+
inboundMessages: Data.InboundMessages;
|
|
519
|
+
|
|
520
|
+
label: string | null;
|
|
521
|
+
|
|
522
|
+
status:
|
|
523
|
+
| 'provisioning'
|
|
524
|
+
| 'awaiting_payment'
|
|
525
|
+
| 'active'
|
|
526
|
+
| 'cancel_scheduled'
|
|
527
|
+
| 'archived'
|
|
528
|
+
| 'billing_error';
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
export namespace Data {
|
|
532
|
+
export interface InboundMessages {
|
|
533
|
+
exhausted: boolean;
|
|
534
|
+
|
|
535
|
+
included: number;
|
|
536
|
+
|
|
537
|
+
resetsAt: string | null;
|
|
538
|
+
|
|
539
|
+
used: number;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
export interface MailboxCreateParams {
|
|
545
|
+
clientRequestId: string;
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Funding preference. Omit or use included for included-first activation; rent
|
|
549
|
+
* always preserves package capacity and starts paid checkout.
|
|
550
|
+
*/
|
|
551
|
+
billingPreference?: 'included' | 'rent';
|
|
552
|
+
|
|
553
|
+
label?: string;
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Optional full mailbox local part (the address before "@"). Trimmed and
|
|
557
|
+
* lowercased before validation. Omit for a random, non-guessable mx\_-prefixed
|
|
558
|
+
* address.
|
|
559
|
+
*/
|
|
560
|
+
localPart?: string;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export interface MailboxUpdateParams {
|
|
564
|
+
label: string | null;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
export interface MailboxListParams {
|
|
568
|
+
page?: number;
|
|
569
|
+
|
|
570
|
+
pageSize?: number;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
export interface MailboxOtpParams {
|
|
574
|
+
after?: string;
|
|
575
|
+
|
|
576
|
+
maxLength?: number;
|
|
577
|
+
|
|
578
|
+
minLength?: number;
|
|
579
|
+
|
|
580
|
+
sender?: string;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
export interface MailboxRestartParams {
|
|
584
|
+
/**
|
|
585
|
+
* Funding preference. Omit or use included for included-first activation; rent
|
|
586
|
+
* always preserves package capacity and starts paid checkout.
|
|
587
|
+
*/
|
|
588
|
+
billingPreference?: 'included' | 'rent';
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
Mailboxes.Messages = Messages;
|
|
592
|
+
|
|
593
|
+
export declare namespace Mailboxes {
|
|
594
|
+
export {
|
|
595
|
+
type MailboxCreateResponse as MailboxCreateResponse,
|
|
596
|
+
type MailboxRetrieveResponse as MailboxRetrieveResponse,
|
|
597
|
+
type MailboxUpdateResponse as MailboxUpdateResponse,
|
|
598
|
+
type MailboxListResponse as MailboxListResponse,
|
|
599
|
+
type MailboxDeleteResponse as MailboxDeleteResponse,
|
|
600
|
+
type MailboxCapacityResponse as MailboxCapacityResponse,
|
|
601
|
+
type MailboxOtpResponse as MailboxOtpResponse,
|
|
602
|
+
type MailboxRestartResponse as MailboxRestartResponse,
|
|
603
|
+
type MailboxUncancelResponse as MailboxUncancelResponse,
|
|
604
|
+
type MailboxCreateParams as MailboxCreateParams,
|
|
605
|
+
type MailboxUpdateParams as MailboxUpdateParams,
|
|
606
|
+
type MailboxListParams as MailboxListParams,
|
|
607
|
+
type MailboxOtpParams as MailboxOtpParams,
|
|
608
|
+
type MailboxRestartParams as MailboxRestartParams,
|
|
609
|
+
};
|
|
610
|
+
|
|
611
|
+
export {
|
|
612
|
+
Messages as Messages,
|
|
613
|
+
type MessageRetrieveResponse as MessageRetrieveResponse,
|
|
614
|
+
type MessageListResponse as MessageListResponse,
|
|
615
|
+
type MessageRetrieveParams as MessageRetrieveParams,
|
|
616
|
+
type MessageListParams as MessageListParams,
|
|
617
|
+
};
|
|
618
|
+
}
|