@otterlabs/blocx 0.1.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.
@@ -0,0 +1,2591 @@
1
+ type AuthToken = string | undefined;
2
+ interface Auth {
3
+ /**
4
+ * Which part of the request do we use to send the auth?
5
+ *
6
+ * @default 'header'
7
+ */
8
+ in?: "header" | "query" | "cookie";
9
+ /**
10
+ * Header or query parameter name.
11
+ *
12
+ * @default 'Authorization'
13
+ */
14
+ name?: string;
15
+ scheme?: "basic" | "bearer";
16
+ type: "apiKey" | "http";
17
+ }
18
+
19
+ interface SerializerOptions<T> {
20
+ /**
21
+ * @default true
22
+ */
23
+ explode: boolean;
24
+ style: T;
25
+ }
26
+ type ArrayStyle = "form" | "spaceDelimited" | "pipeDelimited";
27
+ type ObjectStyle = "form" | "deepObject";
28
+
29
+ type QuerySerializer = (query: Record<string, unknown>) => string;
30
+ type BodySerializer = (body: any) => any;
31
+ interface QuerySerializerOptions {
32
+ allowReserved?: boolean;
33
+ array?: SerializerOptions<ArrayStyle>;
34
+ object?: SerializerOptions<ObjectStyle>;
35
+ }
36
+
37
+ type HttpMethod = "connect" | "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
38
+ type Client$1<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
39
+ /**
40
+ * Returns the final request URL.
41
+ */
42
+ buildUrl: BuildUrlFn;
43
+ getConfig: () => Config;
44
+ request: RequestFn;
45
+ setConfig: (config: Config) => Config;
46
+ } & {
47
+ [K in HttpMethod]: MethodFn;
48
+ } & ([SseFn] extends [never] ? {
49
+ sse?: never;
50
+ } : {
51
+ sse: {
52
+ [K in HttpMethod]: SseFn;
53
+ };
54
+ });
55
+ interface Config$1 {
56
+ /**
57
+ * Auth token or a function returning auth token. The resolved value will be
58
+ * added to the request payload as defined by its `security` array.
59
+ */
60
+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
61
+ /**
62
+ * A function for serializing request body parameter. By default,
63
+ * {@link JSON.stringify()} will be used.
64
+ */
65
+ bodySerializer?: BodySerializer | null;
66
+ /**
67
+ * An object containing any HTTP headers that you want to pre-populate your
68
+ * `Headers` object with.
69
+ *
70
+ * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
71
+ */
72
+ headers?: RequestInit["headers"] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
73
+ /**
74
+ * The request method.
75
+ *
76
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
77
+ */
78
+ method?: Uppercase<HttpMethod>;
79
+ /**
80
+ * A function for serializing request query parameters. By default, arrays
81
+ * will be exploded in form style, objects will be exploded in deepObject
82
+ * style, and reserved characters are percent-encoded.
83
+ *
84
+ * This method will have no effect if the native `paramsSerializer()` Axios
85
+ * API function is used.
86
+ *
87
+ * {@link https://swagger.io/docs/specification/serialization/#query View examples}
88
+ */
89
+ querySerializer?: QuerySerializer | QuerySerializerOptions;
90
+ /**
91
+ * A function validating request data. This is useful if you want to ensure
92
+ * the request conforms to the desired shape, so it can be safely sent to
93
+ * the server.
94
+ */
95
+ requestValidator?: (data: unknown) => Promise<unknown>;
96
+ /**
97
+ * A function transforming response data before it's returned. This is useful
98
+ * for post-processing data, e.g. converting ISO strings into Date objects.
99
+ */
100
+ responseTransformer?: (data: unknown) => Promise<unknown>;
101
+ /**
102
+ * A function validating response data. This is useful if you want to ensure
103
+ * the response conforms to the desired shape, so it can be safely passed to
104
+ * the transformers and returned to the user.
105
+ */
106
+ responseValidator?: (data: unknown) => Promise<unknown>;
107
+ }
108
+
109
+ type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, "method"> & Pick<Config$1, "method" | "responseTransformer" | "responseValidator"> & {
110
+ /**
111
+ * Fetch API implementation. You can use this option to provide a custom
112
+ * fetch instance.
113
+ *
114
+ * @default globalThis.fetch
115
+ */
116
+ fetch?: typeof fetch;
117
+ /**
118
+ * Implementing clients can call request interceptors inside this hook.
119
+ */
120
+ onRequest?: (url: string, init: RequestInit) => Promise<Request>;
121
+ /**
122
+ * Callback invoked when a network or parsing error occurs during streaming.
123
+ *
124
+ * This option applies only if the endpoint returns a stream of events.
125
+ *
126
+ * @param error The error that occurred.
127
+ */
128
+ onSseError?: (error: unknown) => void;
129
+ /**
130
+ * Callback invoked when an event is streamed from the server.
131
+ *
132
+ * This option applies only if the endpoint returns a stream of events.
133
+ *
134
+ * @param event Event streamed from the server.
135
+ * @returns Nothing (void).
136
+ */
137
+ onSseEvent?: (event: StreamEvent<TData>) => void;
138
+ serializedBody?: RequestInit["body"];
139
+ /**
140
+ * Default retry delay in milliseconds.
141
+ *
142
+ * This option applies only if the endpoint returns a stream of events.
143
+ *
144
+ * @default 3000
145
+ */
146
+ sseDefaultRetryDelay?: number;
147
+ /**
148
+ * Maximum number of retry attempts before giving up.
149
+ */
150
+ sseMaxRetryAttempts?: number;
151
+ /**
152
+ * Maximum retry delay in milliseconds.
153
+ *
154
+ * Applies only when exponential backoff is used.
155
+ *
156
+ * This option applies only if the endpoint returns a stream of events.
157
+ *
158
+ * @default 30000
159
+ */
160
+ sseMaxRetryDelay?: number;
161
+ /**
162
+ * Optional sleep function for retry backoff.
163
+ *
164
+ * Defaults to using `setTimeout`.
165
+ */
166
+ sseSleepFn?: (ms: number) => Promise<void>;
167
+ url: string;
168
+ };
169
+ interface StreamEvent<TData = unknown> {
170
+ data: TData;
171
+ event?: string;
172
+ id?: string;
173
+ retry?: number;
174
+ }
175
+ type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {
176
+ stream: AsyncGenerator<TData extends Record<string, unknown> ? TData[keyof TData] : TData, TReturn, TNext>;
177
+ };
178
+
179
+ type ErrInterceptor<Err, Res, Req, Options> = (error: Err, response: Res, request: Req, options: Options) => Err | Promise<Err>;
180
+ type ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
181
+ type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
182
+ declare class Interceptors<Interceptor> {
183
+ fns: Array<Interceptor | null>;
184
+ clear(): void;
185
+ eject(id: number | Interceptor): void;
186
+ exists(id: number | Interceptor): boolean;
187
+ getInterceptorIndex(id: number | Interceptor): number;
188
+ update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
189
+ use(fn: Interceptor): number;
190
+ }
191
+ interface Middleware<Req, Res, Err, Options> {
192
+ error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;
193
+ request: Interceptors<ReqInterceptor<Req, Options>>;
194
+ response: Interceptors<ResInterceptor<Res, Req, Options>>;
195
+ }
196
+
197
+ type ResponseStyle = "data" | "fields";
198
+ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<RequestInit, "body" | "headers" | "method">, Config$1 {
199
+ /**
200
+ * Base URL for all requests made by this client.
201
+ */
202
+ baseUrl?: T["baseUrl"];
203
+ /**
204
+ * Fetch API implementation. You can use this option to provide a custom
205
+ * fetch instance.
206
+ *
207
+ * @default globalThis.fetch
208
+ */
209
+ fetch?: typeof fetch;
210
+ /**
211
+ * Please don't use the Fetch client for Next.js applications. The `next`
212
+ * options won't have any effect.
213
+ *
214
+ * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.
215
+ */
216
+ next?: never;
217
+ /**
218
+ * Return the response data parsed in a specified format. By default, `auto`
219
+ * will infer the appropriate method from the `Content-Type` response header.
220
+ * You can override this behavior with any of the {@link Body} methods.
221
+ * Select `stream` if you don't want to parse response data at all.
222
+ *
223
+ * @default 'auto'
224
+ */
225
+ parseAs?: "arrayBuffer" | "auto" | "blob" | "formData" | "json" | "stream" | "text";
226
+ /**
227
+ * Should we return only data or multiple fields (data, error, response, etc.)?
228
+ *
229
+ * @default 'fields'
230
+ */
231
+ responseStyle?: ResponseStyle;
232
+ /**
233
+ * Throw an error instead of returning it in the response?
234
+ *
235
+ * @default false
236
+ */
237
+ throwOnError?: T["throwOnError"];
238
+ }
239
+ interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = "fields", ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
240
+ responseStyle: TResponseStyle;
241
+ throwOnError: ThrowOnError;
242
+ }>, Pick<ServerSentEventsOptions<TData>, "onSseError" | "onSseEvent" | "sseDefaultRetryDelay" | "sseMaxRetryAttempts" | "sseMaxRetryDelay"> {
243
+ /**
244
+ * Any body that you want to add to your request.
245
+ *
246
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
247
+ */
248
+ body?: unknown;
249
+ path?: Record<string, unknown>;
250
+ query?: Record<string, unknown>;
251
+ /**
252
+ * Security mechanism(s) to use for the request.
253
+ */
254
+ security?: ReadonlyArray<Auth>;
255
+ url: Url;
256
+ }
257
+ interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = "fields", ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
258
+ serializedBody?: string;
259
+ }
260
+ type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = "fields"> = ThrowOnError extends true ? Promise<TResponseStyle extends "data" ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
261
+ data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
262
+ request: Request;
263
+ response: Response;
264
+ }> : Promise<TResponseStyle extends "data" ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({
265
+ data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
266
+ error: undefined;
267
+ } | {
268
+ data: undefined;
269
+ error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
270
+ }) & {
271
+ request: Request;
272
+ response: Response;
273
+ }>;
274
+ interface ClientOptions$1 {
275
+ baseUrl?: string;
276
+ responseStyle?: ResponseStyle;
277
+ throwOnError?: boolean;
278
+ }
279
+ type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = "fields">(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, "method">) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
280
+ type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = "fields">(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, "method">) => Promise<ServerSentEventsResult<TData, TError>>;
281
+ type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = "fields">(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, "method"> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, "method">) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
282
+ type BuildUrlFn = <TData extends {
283
+ body?: unknown;
284
+ path?: Record<string, unknown>;
285
+ query?: Record<string, unknown>;
286
+ url: string;
287
+ }>(options: Pick<TData, "url"> & Options$1<TData>) => string;
288
+ type Client = Client$1<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
289
+ interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
290
+ };
291
+ interface TDataShape {
292
+ body?: unknown;
293
+ headers?: unknown;
294
+ path?: unknown;
295
+ query?: unknown;
296
+ url: string;
297
+ }
298
+ type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
299
+ type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = "fields"> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, "body" | "path" | "query" | "url"> & Omit<TData, "url">;
300
+
301
+ type ClientOptions = {
302
+ baseUrl: `${string}://${string}` | (string & {});
303
+ };
304
+ type Brand = {
305
+ id: number;
306
+ /**
307
+ * TCR-assigned brand ID. Empty while registration is pending.
308
+ */
309
+ tcrBrandId: string;
310
+ entityType: "PRIVATE_PROFIT" | "PUBLIC_PROFIT" | "NON_PROFIT" | "GOVERNMENT";
311
+ displayName: string;
312
+ companyName: string | null;
313
+ /**
314
+ * ISO 3166-1 alpha-2
315
+ */
316
+ country: string;
317
+ email: string;
318
+ phone: string;
319
+ vertical: "PROFESSIONAL" | "REAL_ESTATE" | "HEALTHCARE" | "HUMAN_RESOURCES" | "ENERGY" | "ENTERTAINMENT" | "RETAIL" | "TRANSPORTATION" | "AGRICULTURE" | "INSURANCE" | "POSTAL" | "EDUCATION" | "HOSPITALITY" | "FINANCIAL" | "POLITICAL" | "GAMBLING" | "LEGAL" | "CONSTRUCTION" | "NGO" | "MANUFACTURING" | "GOVERNMENT" | "TECHNOLOGY" | "COMMUNICATION" | null;
320
+ brandRelationship: "BASIC_ACCOUNT" | "SMALL_ACCOUNT" | "MEDIUM_ACCOUNT" | "LARGE_ACCOUNT" | "KEY_ACCOUNT" | null;
321
+ webhookUrl: string | null;
322
+ failoverUrl: string | null;
323
+ tags: Array<string>;
324
+ identityStatus: "PENDING" | "UNVERIFIED" | "SELF_DECLARED" | "VERIFIED" | "VETTED_VERIFIED" | "FAILED";
325
+ status: "PENDING_REGISTRATION" | "ACTIVE" | "DELETED";
326
+ createdAt: string;
327
+ };
328
+ type BrandDetail = Brand & {
329
+ ein: string | null;
330
+ updatedAt: string;
331
+ campaigns: Array<{
332
+ id: number;
333
+ tcrCampaignId: string | null;
334
+ usecase: "2FA" | "ACCOUNT_NOTIFICATION" | "CUSTOMER_CARE" | "DELIVERY_NOTIFICATION" | "FRAUD_ALERT" | "HIGHER_EDUCATION" | "MARKETING" | "POLLING_VOTING" | "PUBLIC_SERVICE_ANNOUNCEMENT" | "SECURITY_ALERT" | "LOW_VOLUME" | "MIXED" | "M2M" | "AGENTS_FRANCHISES" | "CARRIER_EXEMPT" | "CHARITY" | "EMERGENCY" | "K12_EDUCATION" | "POLITICAL" | "PROXY" | "PUBLIC_SAFETY_RESTRICTED" | "SOCIAL" | "SOLE_PROPRIETOR" | "SWEEPSTAKE" | "TRIAL" | "UCAAS_HIGH" | "UCAAS_LOW";
335
+ status: "PENDING_REGISTRATION" | "ACTIVE" | "SUSPENDED" | "EXPIRED" | "DELETED";
336
+ provisioningStage: ProvisioningStage;
337
+ createdAt: string;
338
+ }>;
339
+ };
340
+ /**
341
+ * Derived stage for UI display. Computed from status, sharingStatus, dcaCompletedAt, and mnoStatus.
342
+ */
343
+ type ProvisioningStage = "REGISTERING" | "REGISTRATION_FAILED" | "PENDING_SHARE" | "SHARE_REJECTED" | "SHARED" | "DCA_COMPLETE" | "LIVE" | "PARTIAL" | "SUSPENDED" | "EXPIRED";
344
+ type _Error = {
345
+ /**
346
+ * Human-readable error message
347
+ */
348
+ error: string;
349
+ };
350
+ type BrandFeedback = {
351
+ brandId: string;
352
+ /**
353
+ * Feedback categories from TCR indicating issues to resolve
354
+ */
355
+ category: Array<string>;
356
+ };
357
+ type Campaign = {
358
+ id: number;
359
+ /**
360
+ * TCR-assigned campaign ID. Null while pending.
361
+ */
362
+ tcrCampaignId: string | null;
363
+ usecase: "2FA" | "ACCOUNT_NOTIFICATION" | "CUSTOMER_CARE" | "DELIVERY_NOTIFICATION" | "FRAUD_ALERT" | "HIGHER_EDUCATION" | "MARKETING" | "POLLING_VOTING" | "PUBLIC_SERVICE_ANNOUNCEMENT" | "SECURITY_ALERT" | "LOW_VOLUME" | "MIXED" | "M2M" | "AGENTS_FRANCHISES" | "CARRIER_EXEMPT" | "CHARITY" | "EMERGENCY" | "K12_EDUCATION" | "POLITICAL" | "PROXY" | "PUBLIC_SAFETY_RESTRICTED" | "SOCIAL" | "SOLE_PROPRIETOR" | "SWEEPSTAKE" | "TRIAL" | "UCAAS_HIGH" | "UCAAS_LOW";
364
+ contentType: "SMS" | "SMS_MMS";
365
+ description: string;
366
+ status: "PENDING_REGISTRATION" | "ACTIVE" | "SUSPENDED" | "EXPIRED" | "DELETED";
367
+ messageFlow: string | null;
368
+ helpMessage: string | null;
369
+ autoRenewal: boolean;
370
+ tags: Array<string>;
371
+ createdAt: string;
372
+ sharingStatus: "PENDING" | "ACCEPTED" | "DECLINED" | "FAILED" | null;
373
+ sharedWithCnpId: string | null;
374
+ sharedAt: string | null;
375
+ shareResolvedAt: string | null;
376
+ shareError: string | null;
377
+ /**
378
+ * When all carriers first went ACTIVE.
379
+ */
380
+ dcaCompletedAt: string | null;
381
+ /**
382
+ * Per-carrier operational status keyed by MNO name, e.g. { "AT&T": "ACTIVE" }.
383
+ */
384
+ mnoStatus: {
385
+ [key: string]: string;
386
+ } | null;
387
+ mnoStatusFetchedAt: string | null;
388
+ provisioningStage: ProvisioningStage;
389
+ brand: {
390
+ id: number;
391
+ tcrBrandId: string | null;
392
+ displayName: string;
393
+ };
394
+ };
395
+ type UseCase = {
396
+ usecase: "2FA" | "ACCOUNT_NOTIFICATION" | "CUSTOMER_CARE" | "DELIVERY_NOTIFICATION" | "FRAUD_ALERT" | "HIGHER_EDUCATION" | "MARKETING" | "POLLING_VOTING" | "PUBLIC_SERVICE_ANNOUNCEMENT" | "SECURITY_ALERT" | "LOW_VOLUME" | "MIXED" | "M2M" | "AGENTS_FRANCHISES" | "CARRIER_EXEMPT" | "CHARITY" | "EMERGENCY" | "K12_EDUCATION" | "POLITICAL" | "PROXY" | "PUBLIC_SAFETY_RESTRICTED" | "SOCIAL" | "SOLE_PROPRIETOR" | "SWEEPSTAKE" | "TRIAL" | "UCAAS_HIGH" | "UCAAS_LOW";
397
+ usecaseDisplayName?: string;
398
+ eligible: boolean;
399
+ /**
400
+ * Monthly fee in dollars
401
+ */
402
+ monthlyFee?: number;
403
+ requirements?: Array<string>;
404
+ };
405
+ type CampaignSharing = {
406
+ campaignId: string;
407
+ upstreamCnpId: string;
408
+ sharingStatus: "PENDING" | "ACCEPTED" | "DECLINED";
409
+ statusDate?: string;
410
+ };
411
+ type CampaignMnoStatus = {
412
+ campaignId: string;
413
+ /**
414
+ * Mobile Network Operator ID
415
+ */
416
+ mnoId: number;
417
+ mnoName: string;
418
+ status: "ACTIVE" | "SUSPENDED" | "PENDING";
419
+ reason?: string;
420
+ };
421
+ type ComplianceEvent = {
422
+ id: number;
423
+ title: string;
424
+ description: string;
425
+ status: "ACTION_NEEDED" | "APPROVED" | "RESOLVED" | "INFO";
426
+ category: "BRAND" | "CAMPAIGN_10DLC";
427
+ source: string;
428
+ read: boolean;
429
+ createdAt: string;
430
+ brand: {
431
+ id: number;
432
+ tcrBrandId: string;
433
+ displayName: string;
434
+ } | null;
435
+ campaign: {
436
+ id: number;
437
+ tcrCampaignId: string;
438
+ usecase: "2FA" | "ACCOUNT_NOTIFICATION" | "CUSTOMER_CARE" | "DELIVERY_NOTIFICATION" | "FRAUD_ALERT" | "HIGHER_EDUCATION" | "MARKETING" | "POLLING_VOTING" | "PUBLIC_SERVICE_ANNOUNCEMENT" | "SECURITY_ALERT" | "LOW_VOLUME" | "MIXED" | "M2M" | "AGENTS_FRANCHISES" | "CARRIER_EXEMPT" | "CHARITY" | "EMERGENCY" | "K12_EDUCATION" | "POLITICAL" | "PROXY" | "PUBLIC_SAFETY_RESTRICTED" | "SOCIAL" | "SOLE_PROPRIETOR" | "SWEEPSTAKE" | "TRIAL" | "UCAAS_HIGH" | "UCAAS_LOW";
439
+ status: "PENDING_REGISTRATION" | "ACTIVE" | "SUSPENDED" | "EXPIRED" | "DELETED";
440
+ } | null;
441
+ };
442
+ type ComplianceEventDetail = ComplianceEvent & {
443
+ messages: Array<{
444
+ id: number;
445
+ sender: "SYSTEM" | "TCR" | "USER";
446
+ senderName: string;
447
+ body: string;
448
+ createdAt: string;
449
+ }>;
450
+ comments: Array<{
451
+ id: number;
452
+ userId: number;
453
+ body: string;
454
+ createdAt: string;
455
+ }>;
456
+ };
457
+ type EmailIdentity = {
458
+ id: number;
459
+ type: "DOMAIN" | "EMAIL";
460
+ domain: string;
461
+ status: "PENDING" | "VERIFIED" | "FAILED";
462
+ createdAt: string;
463
+ updatedAt: string;
464
+ /**
465
+ * Empty while domain is being set up.
466
+ */
467
+ dnsRecords: Array<DnsRecord>;
468
+ };
469
+ type DnsRecord = {
470
+ id: number;
471
+ type: "TXT" | "CNAME" | "MX";
472
+ name: "@" | "_dmarc" | "mail" | "dkim2048_1._domainkey" | "links";
473
+ value: string;
474
+ /**
475
+ * For MX records only
476
+ */
477
+ priority: number | null;
478
+ verified: boolean;
479
+ };
480
+ type SentEmail = {
481
+ messageId: string;
482
+ from: string;
483
+ to: Array<string>;
484
+ subject: string;
485
+ domain: string;
486
+ sentAt: string;
487
+ };
488
+ type Verification = {
489
+ verificationId: string;
490
+ status: "pending" | "approved" | "expired" | "failed";
491
+ /**
492
+ * ISO 8601 expiry (default 10 min)
493
+ */
494
+ expiresAt: string;
495
+ };
496
+ type VerificationCheck = {
497
+ verificationId: string;
498
+ /**
499
+ * `approved` = correct code. `pending` = wrong code, attempts remaining. `failed` = max attempts exceeded. `expired` = TTL elapsed.
500
+ */
501
+ status: "pending" | "approved" | "expired" | "failed";
502
+ };
503
+ type TwoFaTemplate = {
504
+ id: string;
505
+ name: string;
506
+ channel: "EMAIL" | "SMS";
507
+ /**
508
+ * Email subject (null for SMS)
509
+ */
510
+ subject: string | null;
511
+ /**
512
+ * Email body type (null for SMS)
513
+ */
514
+ bodyType: "HTML" | "TEXT" | null;
515
+ body: string;
516
+ status: "DRAFT" | "PENDING_REVIEW" | "APPROVED" | "REJECTED";
517
+ /**
518
+ * Reason if rejected by admin
519
+ */
520
+ rejectionReason: string | null;
521
+ submittedAt: string | null;
522
+ reviewedAt: string | null;
523
+ createdAt: string;
524
+ updatedAt: string;
525
+ };
526
+ type Quota = {
527
+ resource: string;
528
+ action: string;
529
+ window: "MINUTE" | "HOUR" | "DAY" | "MONTH";
530
+ /**
531
+ * Effective limit (override or default)
532
+ */
533
+ limit: number;
534
+ /**
535
+ * Global default
536
+ */
537
+ defaultLimit: number;
538
+ /**
539
+ * True if admin set a custom limit
540
+ */
541
+ isOverride: boolean;
542
+ label: string;
543
+ description: string;
544
+ };
545
+ type QuotaIncreaseRequest = {
546
+ id: number;
547
+ resource: string;
548
+ action: string;
549
+ window: "MINUTE" | "HOUR" | "DAY" | "MONTH";
550
+ currentLimit: number;
551
+ requestedLimit: number;
552
+ justification: string;
553
+ status: "PENDING" | "APPROVED" | "REJECTED";
554
+ resolutionNote: string | null;
555
+ resolvedAt: string | null;
556
+ createdAt: string;
557
+ };
558
+ type MessagingProfile = {
559
+ id: number;
560
+ name: string;
561
+ enabled: boolean;
562
+ webhookUrl: string | null;
563
+ allowedCountries: Array<string>;
564
+ optOutKeywords: Array<string>;
565
+ optOutMessage: string | null;
566
+ optInKeywords: Array<string>;
567
+ optInMessage: string | null;
568
+ helpKeywords: Array<string>;
569
+ helpMessage: string | null;
570
+ createdAt: string;
571
+ updatedAt: string;
572
+ };
573
+ type PhoneNumber = {
574
+ id: number;
575
+ phoneNumber: string;
576
+ status: "UNASSIGNED" | "ASSIGNED" | "ACTIVE" | "RELEASED";
577
+ capabilities: Array<"SMS" | "MMS" | "SMS_MMS">;
578
+ tags: Array<string>;
579
+ /**
580
+ * Monthly cost in microdollars
581
+ */
582
+ monthlyCost: string;
583
+ messagingProfileId: number | null;
584
+ createdAt: string;
585
+ };
586
+ type PhoneOrder = {
587
+ id: number;
588
+ status: "PENDING" | "COMPLETED" | "FAILED";
589
+ /**
590
+ * Microdollars
591
+ */
592
+ totalUpfrontCost: string;
593
+ /**
594
+ * Microdollars
595
+ */
596
+ totalMonthlyCost: string;
597
+ createdAt: string;
598
+ items: Array<{
599
+ id: number;
600
+ phoneNumber: string;
601
+ upfrontCost: string;
602
+ monthlyCost: string;
603
+ capabilities: Array<string>;
604
+ }>;
605
+ };
606
+ type ListBrandsData = {
607
+ body?: never;
608
+ path?: never;
609
+ query?: never;
610
+ url: "/brands";
611
+ };
612
+ type ListBrandsResponses = {
613
+ /**
614
+ * List of brands
615
+ */
616
+ 200: {
617
+ brands: Array<Brand>;
618
+ };
619
+ };
620
+ type ListBrandsResponse = ListBrandsResponses[keyof ListBrandsResponses];
621
+ type CreateBrandData = {
622
+ body?: {
623
+ entityType: "PRIVATE_PROFIT" | "PUBLIC_PROFIT" | "NON_PROFIT" | "GOVERNMENT";
624
+ displayName: string;
625
+ companyName: string;
626
+ ein: string;
627
+ einIssuingCountry?: string;
628
+ phone: string;
629
+ street: string;
630
+ city: string;
631
+ state: string;
632
+ postalCode: string;
633
+ country: string;
634
+ email: string;
635
+ website?: string;
636
+ vertical: "PROFESSIONAL" | "REAL_ESTATE" | "HEALTHCARE" | "HUMAN_RESOURCES" | "ENERGY" | "ENTERTAINMENT" | "RETAIL" | "TRANSPORTATION" | "AGRICULTURE" | "INSURANCE" | "POSTAL" | "EDUCATION" | "HOSPITALITY" | "FINANCIAL" | "POLITICAL" | "GAMBLING" | "LEGAL" | "CONSTRUCTION" | "NGO" | "MANUFACTURING" | "GOVERNMENT" | "TECHNOLOGY" | "COMMUNICATION";
637
+ brandRelationship: "BASIC_ACCOUNT" | "SMALL_ACCOUNT" | "MEDIUM_ACCOUNT" | "LARGE_ACCOUNT" | "KEY_ACCOUNT";
638
+ stockSymbol?: string;
639
+ stockExchange?: "NONE" | "NASDAQ" | "NYSE" | "AMEX" | "AMX" | "ASX" | "B3" | "BME" | "BSE" | "FRA" | "ICEX" | "JPX" | "JSE" | "KRX" | "LON" | "NSE" | "OMX" | "SEHK" | "SGX" | "SSE" | "STO" | "SWX" | "SZSE" | "TSX" | "TWSE" | "VSE" | "OTHER";
640
+ altBusinessId?: string;
641
+ altBusinessIdType?: "NONE" | "DUNS" | "GIIN" | "LEI";
642
+ firstName?: string;
643
+ lastName?: string;
644
+ mobilePhone?: string;
645
+ businessContactEmail?: string;
646
+ referenceId?: string;
647
+ webhookUrl?: string;
648
+ failoverUrl?: string;
649
+ tags?: Array<string>;
650
+ };
651
+ path?: never;
652
+ query?: never;
653
+ url: "/brands";
654
+ };
655
+ type CreateBrandResponses = {
656
+ /**
657
+ * Brand created (pending)
658
+ */
659
+ 201: Brand;
660
+ };
661
+ type CreateBrandResponse = CreateBrandResponses[keyof CreateBrandResponses];
662
+ type GetBrandData = {
663
+ body?: never;
664
+ path?: {
665
+ /**
666
+ * Resource ID
667
+ */
668
+ id?: number | null;
669
+ };
670
+ query?: never;
671
+ url: "/brands/{id}";
672
+ };
673
+ type GetBrandErrors = {
674
+ /**
675
+ * Not found
676
+ */
677
+ 404: _Error;
678
+ };
679
+ type GetBrandError = GetBrandErrors[keyof GetBrandErrors];
680
+ type GetBrandResponses = {
681
+ /**
682
+ * Brand details
683
+ */
684
+ 200: BrandDetail;
685
+ };
686
+ type GetBrandResponse = GetBrandResponses[keyof GetBrandResponses];
687
+ type GetBrandFeedbackData = {
688
+ body?: never;
689
+ path?: {
690
+ /**
691
+ * Resource ID
692
+ */
693
+ id?: number | null;
694
+ };
695
+ query?: never;
696
+ url: "/brands/{id}/feedback";
697
+ };
698
+ type GetBrandFeedbackErrors = {
699
+ /**
700
+ * Not found
701
+ */
702
+ 404: _Error;
703
+ };
704
+ type GetBrandFeedbackError = GetBrandFeedbackErrors[keyof GetBrandFeedbackErrors];
705
+ type GetBrandFeedbackResponses = {
706
+ /**
707
+ * Brand feedback
708
+ */
709
+ 200: BrandFeedback;
710
+ };
711
+ type GetBrandFeedbackResponse = GetBrandFeedbackResponses[keyof GetBrandFeedbackResponses];
712
+ type ListCampaignsData = {
713
+ body?: never;
714
+ path?: never;
715
+ query?: never;
716
+ url: "/campaigns";
717
+ };
718
+ type ListCampaignsResponses = {
719
+ /**
720
+ * List of campaigns
721
+ */
722
+ 200: {
723
+ campaigns: Array<Campaign>;
724
+ };
725
+ };
726
+ type ListCampaignsResponse = ListCampaignsResponses[keyof ListCampaignsResponses];
727
+ type CreateCampaignData = {
728
+ body?: {
729
+ brandId: number;
730
+ usecase: "2FA" | "ACCOUNT_NOTIFICATION" | "CUSTOMER_CARE" | "DELIVERY_NOTIFICATION" | "FRAUD_ALERT" | "HIGHER_EDUCATION" | "MARKETING" | "POLLING_VOTING" | "PUBLIC_SERVICE_ANNOUNCEMENT" | "SECURITY_ALERT" | "LOW_VOLUME" | "MIXED" | "M2M" | "AGENTS_FRANCHISES" | "CARRIER_EXEMPT" | "CHARITY" | "EMERGENCY" | "K12_EDUCATION" | "POLITICAL" | "PROXY" | "PUBLIC_SAFETY_RESTRICTED" | "SOCIAL" | "SOLE_PROPRIETOR" | "SWEEPSTAKE" | "TRIAL" | "UCAAS_HIGH" | "UCAAS_LOW";
731
+ contentType?: "SMS" | "SMS_MMS";
732
+ subUsecases?: Array<"2FA" | "ACCOUNT_NOTIFICATION" | "CUSTOMER_CARE" | "DELIVERY_NOTIFICATION" | "FRAUD_ALERT" | "HIGHER_EDUCATION" | "MARKETING" | "POLLING_VOTING" | "PUBLIC_SERVICE_ANNOUNCEMENT" | "SECURITY_ALERT">;
733
+ description: string;
734
+ messageFlow: string;
735
+ helpMessage: string;
736
+ helpKeywords?: Array<string>;
737
+ optinKeywords?: Array<string>;
738
+ optinMessage: string;
739
+ optoutKeywords?: Array<string>;
740
+ optoutMessage: string;
741
+ sample1: string;
742
+ sample2?: string;
743
+ sample3?: string;
744
+ sample4?: string;
745
+ sample5?: string;
746
+ embeddedLink?: boolean;
747
+ embeddedPhone?: boolean;
748
+ numberPool?: boolean;
749
+ ageGated?: boolean;
750
+ directLending?: boolean;
751
+ subscriberOptIn?: boolean;
752
+ subscriberOptOut?: boolean;
753
+ subscriberHelp?: boolean;
754
+ termsAndConditions?: boolean;
755
+ autoRenewal?: boolean;
756
+ tags?: Array<string>;
757
+ };
758
+ path?: never;
759
+ query?: never;
760
+ url: "/campaigns";
761
+ };
762
+ type CreateCampaignResponses = {
763
+ /**
764
+ * Campaign created (pending)
765
+ */
766
+ 201: Campaign;
767
+ };
768
+ type CreateCampaignResponse = CreateCampaignResponses[keyof CreateCampaignResponses];
769
+ type GetCampaignData = {
770
+ body?: never;
771
+ path?: {
772
+ /**
773
+ * Resource ID
774
+ */
775
+ id?: number | null;
776
+ };
777
+ query?: never;
778
+ url: "/campaigns/{id}";
779
+ };
780
+ type GetCampaignErrors = {
781
+ /**
782
+ * Not found
783
+ */
784
+ 404: _Error;
785
+ };
786
+ type GetCampaignError = GetCampaignErrors[keyof GetCampaignErrors];
787
+ type GetCampaignResponses = {
788
+ /**
789
+ * Campaign details
790
+ */
791
+ 200: Campaign;
792
+ };
793
+ type GetCampaignResponse = GetCampaignResponses[keyof GetCampaignResponses];
794
+ type GetQualifiedUseCasesData = {
795
+ body?: never;
796
+ path?: {
797
+ /**
798
+ * Brand ID
799
+ */
800
+ brandId?: number | null;
801
+ };
802
+ query?: never;
803
+ url: "/campaigns/usecases/{brandId}";
804
+ };
805
+ type GetQualifiedUseCasesResponses = {
806
+ /**
807
+ * Qualified use cases
808
+ */
809
+ 200: {
810
+ usecases: Array<UseCase>;
811
+ };
812
+ };
813
+ type GetQualifiedUseCasesResponse = GetQualifiedUseCasesResponses[keyof GetQualifiedUseCasesResponses];
814
+ type ShareCampaignData = {
815
+ body?: {
816
+ /**
817
+ * CNP/DCA ID
818
+ */
819
+ upstreamCnpId: string;
820
+ };
821
+ path?: {
822
+ /**
823
+ * Resource ID
824
+ */
825
+ id?: number | null;
826
+ };
827
+ query?: never;
828
+ url: "/campaigns/{id}/share";
829
+ };
830
+ type ShareCampaignResponses = {
831
+ /**
832
+ * Sharing initiated
833
+ */
834
+ 200: CampaignSharing;
835
+ };
836
+ type ShareCampaignResponse = ShareCampaignResponses[keyof ShareCampaignResponses];
837
+ type GetCampaignSharingData = {
838
+ body?: never;
839
+ path?: {
840
+ /**
841
+ * Resource ID
842
+ */
843
+ id?: number | null;
844
+ };
845
+ query?: never;
846
+ url: "/campaigns/{id}/sharing";
847
+ };
848
+ type GetCampaignSharingResponses = {
849
+ /**
850
+ * Sharing status
851
+ */
852
+ 200: CampaignSharing;
853
+ };
854
+ type GetCampaignSharingResponse = GetCampaignSharingResponses[keyof GetCampaignSharingResponses];
855
+ type GetCampaignMnoStatusData = {
856
+ body?: never;
857
+ path?: {
858
+ /**
859
+ * Resource ID
860
+ */
861
+ id?: number | null;
862
+ };
863
+ query?: never;
864
+ url: "/campaigns/{id}/operation-status";
865
+ };
866
+ type GetCampaignMnoStatusResponses = {
867
+ /**
868
+ * MNO status
869
+ */
870
+ 200: Array<CampaignMnoStatus>;
871
+ };
872
+ type GetCampaignMnoStatusResponse = GetCampaignMnoStatusResponses[keyof GetCampaignMnoStatusResponses];
873
+ type ListComplianceEventsData = {
874
+ body?: never;
875
+ path?: never;
876
+ query?: {
877
+ status?: "ACTION_NEEDED" | "APPROVED" | "RESOLVED" | "INFO";
878
+ category?: "BRAND" | "CAMPAIGN_10DLC";
879
+ unread?: "true" | "false";
880
+ search?: string;
881
+ };
882
+ url: "/compliance";
883
+ };
884
+ type ListComplianceEventsResponses = {
885
+ /**
886
+ * Compliance events
887
+ */
888
+ 200: {
889
+ events: Array<ComplianceEvent>;
890
+ };
891
+ };
892
+ type ListComplianceEventsResponse = ListComplianceEventsResponses[keyof ListComplianceEventsResponses];
893
+ type GetComplianceEventData = {
894
+ body?: never;
895
+ path?: {
896
+ /**
897
+ * Resource ID
898
+ */
899
+ id?: number | null;
900
+ };
901
+ query?: never;
902
+ url: "/compliance/{id}";
903
+ };
904
+ type GetComplianceEventErrors = {
905
+ /**
906
+ * Not found
907
+ */
908
+ 404: _Error;
909
+ };
910
+ type GetComplianceEventError = GetComplianceEventErrors[keyof GetComplianceEventErrors];
911
+ type GetComplianceEventResponses = {
912
+ /**
913
+ * Event details
914
+ */
915
+ 200: ComplianceEventDetail;
916
+ };
917
+ type GetComplianceEventResponse = GetComplianceEventResponses[keyof GetComplianceEventResponses];
918
+ type GetEmailStatusData = {
919
+ body?: never;
920
+ path?: never;
921
+ query?: never;
922
+ url: "/email/status";
923
+ };
924
+ type GetEmailStatusResponses = {
925
+ /**
926
+ * Status
927
+ */
928
+ 200: {
929
+ enabled: boolean;
930
+ };
931
+ };
932
+ type GetEmailStatusResponse = GetEmailStatusResponses[keyof GetEmailStatusResponses];
933
+ type EnableEmailData = {
934
+ body?: never;
935
+ path?: never;
936
+ query?: never;
937
+ url: "/email/enable";
938
+ };
939
+ type EnableEmailResponses = {
940
+ /**
941
+ * Enable requested
942
+ */
943
+ 200: {
944
+ enabled: boolean;
945
+ pending?: boolean;
946
+ };
947
+ };
948
+ type EnableEmailResponse = EnableEmailResponses[keyof EnableEmailResponses];
949
+ type ListEmailIdentitiesData = {
950
+ body?: never;
951
+ path?: never;
952
+ query?: never;
953
+ url: "/email/identities";
954
+ };
955
+ type ListEmailIdentitiesResponses = {
956
+ /**
957
+ * Identities
958
+ */
959
+ 200: {
960
+ identities: Array<EmailIdentity>;
961
+ };
962
+ };
963
+ type ListEmailIdentitiesResponse = ListEmailIdentitiesResponses[keyof ListEmailIdentitiesResponses];
964
+ type CreateEmailIdentityData = {
965
+ body?: {
966
+ domain: string;
967
+ mailFromPrefix?: string;
968
+ };
969
+ path?: never;
970
+ query?: never;
971
+ url: "/email/identities";
972
+ };
973
+ type CreateEmailIdentityErrors = {
974
+ /**
975
+ * Plan does not allow multiple domains
976
+ */
977
+ 402: _Error;
978
+ /**
979
+ * Already exists
980
+ */
981
+ 409: _Error;
982
+ /**
983
+ * Email not enabled
984
+ */
985
+ 412: _Error;
986
+ };
987
+ type CreateEmailIdentityError = CreateEmailIdentityErrors[keyof CreateEmailIdentityErrors];
988
+ type CreateEmailIdentityResponses = {
989
+ /**
990
+ * Created
991
+ */
992
+ 201: EmailIdentity;
993
+ };
994
+ type CreateEmailIdentityResponse = CreateEmailIdentityResponses[keyof CreateEmailIdentityResponses];
995
+ type DeleteEmailIdentityData = {
996
+ body?: never;
997
+ path?: {
998
+ /**
999
+ * Resource ID
1000
+ */
1001
+ id?: number | null;
1002
+ };
1003
+ query?: never;
1004
+ url: "/email/identities/{id}";
1005
+ };
1006
+ type DeleteEmailIdentityErrors = {
1007
+ /**
1008
+ * Not found
1009
+ */
1010
+ 404: _Error;
1011
+ };
1012
+ type DeleteEmailIdentityError = DeleteEmailIdentityErrors[keyof DeleteEmailIdentityErrors];
1013
+ type DeleteEmailIdentityResponses = {
1014
+ /**
1015
+ * Deleted
1016
+ */
1017
+ 200: {
1018
+ ok: true;
1019
+ };
1020
+ };
1021
+ type DeleteEmailIdentityResponse = DeleteEmailIdentityResponses[keyof DeleteEmailIdentityResponses];
1022
+ type GetEmailIdentityData = {
1023
+ body?: never;
1024
+ path?: {
1025
+ /**
1026
+ * Resource ID
1027
+ */
1028
+ id?: number | null;
1029
+ };
1030
+ query?: never;
1031
+ url: "/email/identities/{id}";
1032
+ };
1033
+ type GetEmailIdentityErrors = {
1034
+ /**
1035
+ * Not found
1036
+ */
1037
+ 404: _Error;
1038
+ };
1039
+ type GetEmailIdentityError = GetEmailIdentityErrors[keyof GetEmailIdentityErrors];
1040
+ type GetEmailIdentityResponses = {
1041
+ /**
1042
+ * Identity
1043
+ */
1044
+ 200: EmailIdentity;
1045
+ };
1046
+ type GetEmailIdentityResponse = GetEmailIdentityResponses[keyof GetEmailIdentityResponses];
1047
+ type VerifyEmailIdentityDnsData = {
1048
+ body?: never;
1049
+ path?: {
1050
+ /**
1051
+ * Resource ID
1052
+ */
1053
+ id?: number | null;
1054
+ };
1055
+ query?: never;
1056
+ url: "/email/identities/{id}/check-dns";
1057
+ };
1058
+ type VerifyEmailIdentityDnsResponses = {
1059
+ /**
1060
+ * Updated identity
1061
+ */
1062
+ 200: EmailIdentity;
1063
+ };
1064
+ type VerifyEmailIdentityDnsResponse = VerifyEmailIdentityDnsResponses[keyof VerifyEmailIdentityDnsResponses];
1065
+ type SendEmailIdentityTestData = {
1066
+ body?: {
1067
+ to: string;
1068
+ };
1069
+ path?: {
1070
+ /**
1071
+ * Resource ID
1072
+ */
1073
+ id?: number | null;
1074
+ };
1075
+ query?: never;
1076
+ url: "/email/identities/{id}/send-test";
1077
+ };
1078
+ type SendEmailIdentityTestErrors = {
1079
+ /**
1080
+ * Domain not verified
1081
+ */
1082
+ 412: _Error;
1083
+ };
1084
+ type SendEmailIdentityTestError = SendEmailIdentityTestErrors[keyof SendEmailIdentityTestErrors];
1085
+ type SendEmailIdentityTestResponses = {
1086
+ /**
1087
+ * Sent
1088
+ */
1089
+ 200: {
1090
+ messageId: string;
1091
+ };
1092
+ };
1093
+ type SendEmailIdentityTestResponse = SendEmailIdentityTestResponses[keyof SendEmailIdentityTestResponses];
1094
+ type GetEmailHistoryData = {
1095
+ body?: never;
1096
+ path?: never;
1097
+ query?: {
1098
+ /**
1099
+ * Max results (default 50, max 100)
1100
+ */
1101
+ limit?: string;
1102
+ /**
1103
+ * Cursor for next page
1104
+ */
1105
+ nextToken?: string;
1106
+ /**
1107
+ * Filter by domain
1108
+ */
1109
+ domain?: string;
1110
+ };
1111
+ url: "/email/history";
1112
+ };
1113
+ type GetEmailHistoryResponses = {
1114
+ /**
1115
+ * Email history
1116
+ */
1117
+ 200: {
1118
+ emails: Array<SentEmail>;
1119
+ nextToken?: string;
1120
+ };
1121
+ };
1122
+ type GetEmailHistoryResponse = GetEmailHistoryResponses[keyof GetEmailHistoryResponses];
1123
+ type GetBalanceData = {
1124
+ body?: never;
1125
+ path?: never;
1126
+ query?: never;
1127
+ url: "/balance";
1128
+ };
1129
+ type GetBalanceResponses = {
1130
+ /**
1131
+ * Balance
1132
+ */
1133
+ 200: {
1134
+ balance: string;
1135
+ };
1136
+ };
1137
+ type GetBalanceResponse = GetBalanceResponses[keyof GetBalanceResponses];
1138
+ type GetBalanceHistoryData = {
1139
+ body?: never;
1140
+ path?: never;
1141
+ query?: {
1142
+ page?: string;
1143
+ limit?: string;
1144
+ type?: "CREDIT" | "DEBIT";
1145
+ };
1146
+ url: "/balance/history";
1147
+ };
1148
+ type GetBalanceHistoryResponses = {
1149
+ /**
1150
+ * History
1151
+ */
1152
+ 200: {
1153
+ actions: Array<{
1154
+ id: number;
1155
+ type: "CREDIT" | "DEBIT";
1156
+ amount: string;
1157
+ balanceBefore: string;
1158
+ balanceAfter: string;
1159
+ description: string;
1160
+ createdAt: string;
1161
+ }>;
1162
+ total: number;
1163
+ page: number;
1164
+ limit: number;
1165
+ };
1166
+ };
1167
+ type GetBalanceHistoryResponse = GetBalanceHistoryResponses[keyof GetBalanceHistoryResponses];
1168
+ type GetBalanceUsageData = {
1169
+ body?: never;
1170
+ path?: never;
1171
+ query?: never;
1172
+ url: "/balance/usage";
1173
+ };
1174
+ type GetBalanceUsageResponses = {
1175
+ /**
1176
+ * Usage
1177
+ */
1178
+ 200: {
1179
+ /**
1180
+ * Total debits in microdollars
1181
+ */
1182
+ total: string;
1183
+ count: number;
1184
+ periodStart: string;
1185
+ periodEnd: string;
1186
+ };
1187
+ };
1188
+ type GetBalanceUsageResponse = GetBalanceUsageResponses[keyof GetBalanceUsageResponses];
1189
+ type SendMessageData = {
1190
+ body?: {
1191
+ /**
1192
+ * Recipient E.164 phone number
1193
+ */
1194
+ to: string;
1195
+ /**
1196
+ * Sender phone number (must be owned)
1197
+ */
1198
+ from: string;
1199
+ /**
1200
+ * Message text
1201
+ */
1202
+ body?: string;
1203
+ /**
1204
+ * Up to 10 media URLs
1205
+ */
1206
+ mediaUrls?: Array<string>;
1207
+ /**
1208
+ * Defaults to SMS
1209
+ */
1210
+ type?: "SMS" | "MMS";
1211
+ /**
1212
+ * Custom tracking tags
1213
+ */
1214
+ tags?: Array<string>;
1215
+ };
1216
+ path?: never;
1217
+ query?: never;
1218
+ url: "/messaging/send";
1219
+ };
1220
+ type SendMessageErrors = {
1221
+ /**
1222
+ * Rate limited
1223
+ */
1224
+ 429: _Error;
1225
+ };
1226
+ type SendMessageError = SendMessageErrors[keyof SendMessageErrors];
1227
+ type SendMessageResponses = {
1228
+ /**
1229
+ * Queued
1230
+ */
1231
+ 202: {
1232
+ messageId: string;
1233
+ type: "SMS" | "MMS";
1234
+ status: "QUEUED";
1235
+ to: string;
1236
+ from: string;
1237
+ };
1238
+ };
1239
+ type SendMessageResponse = SendMessageResponses[keyof SendMessageResponses];
1240
+ type SendEmailData = {
1241
+ body?: {
1242
+ /**
1243
+ * Sender (domain must be verified)
1244
+ */
1245
+ from: string;
1246
+ /**
1247
+ * 1-50 recipients
1248
+ */
1249
+ to: Array<string>;
1250
+ subject: string;
1251
+ body: {
1252
+ type: "HTML" | "TEXT";
1253
+ content: string;
1254
+ };
1255
+ /**
1256
+ * Custom tracking tags
1257
+ */
1258
+ tags?: Array<string>;
1259
+ };
1260
+ path?: never;
1261
+ query?: never;
1262
+ url: "/email/send";
1263
+ };
1264
+ type SendEmailErrors = {
1265
+ /**
1266
+ * Domain not verified
1267
+ */
1268
+ 403: _Error;
1269
+ /**
1270
+ * Rate limited
1271
+ */
1272
+ 429: _Error;
1273
+ };
1274
+ type SendEmailError = SendEmailErrors[keyof SendEmailErrors];
1275
+ type SendEmailResponses = {
1276
+ /**
1277
+ * Sent
1278
+ */
1279
+ 200: {
1280
+ messageId: string;
1281
+ status: "SENT";
1282
+ };
1283
+ };
1284
+ type SendEmailResponse = SendEmailResponses[keyof SendEmailResponses];
1285
+ type CreateVerificationData = {
1286
+ body?: {
1287
+ /**
1288
+ * Delivery channel.
1289
+ */
1290
+ channel: "EMAIL" | "SMS";
1291
+ /**
1292
+ * Recipient: email address (channel=EMAIL) or E.164 phone (channel=SMS).
1293
+ */
1294
+ to: string;
1295
+ /**
1296
+ * Approved template ID matching the channel. Omit for default.
1297
+ */
1298
+ templateId?: string;
1299
+ /**
1300
+ * EMAIL only: verified EmailIdentity ID. Omit for default sender.
1301
+ */
1302
+ fromIdentityId?: number;
1303
+ /**
1304
+ * SMS only: tenant PhoneNumber ID (must be active and attached to a profile). Omit for default sender.
1305
+ */
1306
+ fromPhoneNumberId?: number;
1307
+ };
1308
+ headers?: {
1309
+ /**
1310
+ * Dedupe key (5 min window)
1311
+ */
1312
+ "Idempotency-Key"?: string;
1313
+ };
1314
+ path?: never;
1315
+ query?: never;
1316
+ url: "/twofa/verifications";
1317
+ };
1318
+ type CreateVerificationErrors = {
1319
+ /**
1320
+ * Template not found
1321
+ */
1322
+ 404: _Error;
1323
+ /**
1324
+ * Template not approved
1325
+ */
1326
+ 422: _Error;
1327
+ /**
1328
+ * Rate limited
1329
+ */
1330
+ 429: _Error;
1331
+ };
1332
+ type CreateVerificationError = CreateVerificationErrors[keyof CreateVerificationErrors];
1333
+ type CreateVerificationResponses = {
1334
+ /**
1335
+ * Verification created
1336
+ */
1337
+ 201: Verification;
1338
+ };
1339
+ type CreateVerificationResponse = CreateVerificationResponses[keyof CreateVerificationResponses];
1340
+ type CheckVerificationData = {
1341
+ body?: {
1342
+ /**
1343
+ * 6-digit code received by the recipient (email or SMS)
1344
+ */
1345
+ code: string;
1346
+ };
1347
+ path: {
1348
+ /**
1349
+ * Verification ID
1350
+ */
1351
+ id: string;
1352
+ };
1353
+ query?: never;
1354
+ url: "/twofa/verifications/{id}/check";
1355
+ };
1356
+ type CheckVerificationErrors = {
1357
+ /**
1358
+ * Verification not found
1359
+ */
1360
+ 404: _Error;
1361
+ /**
1362
+ * Rate limited
1363
+ */
1364
+ 429: _Error;
1365
+ };
1366
+ type CheckVerificationError = CheckVerificationErrors[keyof CheckVerificationErrors];
1367
+ type CheckVerificationResponses = {
1368
+ /**
1369
+ * Check result
1370
+ */
1371
+ 200: VerificationCheck;
1372
+ };
1373
+ type CheckVerificationResponse = CheckVerificationResponses[keyof CheckVerificationResponses];
1374
+ type ListTwofaTemplatesData = {
1375
+ body?: never;
1376
+ path?: never;
1377
+ query?: never;
1378
+ url: "/twofa/templates";
1379
+ };
1380
+ type ListTwofaTemplatesResponses = {
1381
+ /**
1382
+ * Templates
1383
+ */
1384
+ 200: {
1385
+ templates: Array<TwoFaTemplate>;
1386
+ };
1387
+ };
1388
+ type ListTwofaTemplatesResponse = ListTwofaTemplatesResponses[keyof ListTwofaTemplatesResponses];
1389
+ type CreateTwofaTemplateData = {
1390
+ body?: {
1391
+ channel: "EMAIL";
1392
+ name: string;
1393
+ subject: string;
1394
+ bodyType: "HTML" | "TEXT";
1395
+ body: string;
1396
+ } | {
1397
+ channel: "SMS";
1398
+ name: string;
1399
+ body: string;
1400
+ };
1401
+ path?: never;
1402
+ query?: never;
1403
+ url: "/twofa/templates";
1404
+ };
1405
+ type CreateTwofaTemplateResponses = {
1406
+ /**
1407
+ * Created
1408
+ */
1409
+ 201: TwoFaTemplate;
1410
+ };
1411
+ type CreateTwofaTemplateResponse = CreateTwofaTemplateResponses[keyof CreateTwofaTemplateResponses];
1412
+ type DeleteTwofaTemplateData = {
1413
+ body?: never;
1414
+ path: {
1415
+ /**
1416
+ * Template ID
1417
+ */
1418
+ id: string;
1419
+ };
1420
+ query?: never;
1421
+ url: "/twofa/templates/{id}";
1422
+ };
1423
+ type DeleteTwofaTemplateErrors = {
1424
+ /**
1425
+ * Not found
1426
+ */
1427
+ 404: _Error;
1428
+ /**
1429
+ * Template under review
1430
+ */
1431
+ 409: _Error;
1432
+ };
1433
+ type DeleteTwofaTemplateError = DeleteTwofaTemplateErrors[keyof DeleteTwofaTemplateErrors];
1434
+ type DeleteTwofaTemplateResponses = {
1435
+ /**
1436
+ * Deleted
1437
+ */
1438
+ 200: {
1439
+ success: true;
1440
+ };
1441
+ };
1442
+ type DeleteTwofaTemplateResponse = DeleteTwofaTemplateResponses[keyof DeleteTwofaTemplateResponses];
1443
+ type GetTwofaTemplateData = {
1444
+ body?: never;
1445
+ path: {
1446
+ /**
1447
+ * Template ID
1448
+ */
1449
+ id: string;
1450
+ };
1451
+ query?: never;
1452
+ url: "/twofa/templates/{id}";
1453
+ };
1454
+ type GetTwofaTemplateErrors = {
1455
+ /**
1456
+ * Not found
1457
+ */
1458
+ 404: _Error;
1459
+ };
1460
+ type GetTwofaTemplateError = GetTwofaTemplateErrors[keyof GetTwofaTemplateErrors];
1461
+ type GetTwofaTemplateResponses = {
1462
+ /**
1463
+ * Template
1464
+ */
1465
+ 200: TwoFaTemplate;
1466
+ };
1467
+ type GetTwofaTemplateResponse = GetTwofaTemplateResponses[keyof GetTwofaTemplateResponses];
1468
+ type UpdateTwofaTemplateData = {
1469
+ body?: {
1470
+ channel: "EMAIL";
1471
+ name?: string;
1472
+ subject?: string;
1473
+ bodyType?: "HTML" | "TEXT";
1474
+ body?: string;
1475
+ } | {
1476
+ channel: "SMS";
1477
+ name?: string;
1478
+ body?: string;
1479
+ };
1480
+ path: {
1481
+ /**
1482
+ * Template ID
1483
+ */
1484
+ id: string;
1485
+ };
1486
+ query?: never;
1487
+ url: "/twofa/templates/{id}";
1488
+ };
1489
+ type UpdateTwofaTemplateErrors = {
1490
+ /**
1491
+ * Not found
1492
+ */
1493
+ 404: _Error;
1494
+ /**
1495
+ * Template under review
1496
+ */
1497
+ 409: _Error;
1498
+ };
1499
+ type UpdateTwofaTemplateError = UpdateTwofaTemplateErrors[keyof UpdateTwofaTemplateErrors];
1500
+ type UpdateTwofaTemplateResponses = {
1501
+ /**
1502
+ * Updated
1503
+ */
1504
+ 200: TwoFaTemplate;
1505
+ };
1506
+ type UpdateTwofaTemplateResponse = UpdateTwofaTemplateResponses[keyof UpdateTwofaTemplateResponses];
1507
+ type SubmitTwofaTemplateData = {
1508
+ body?: never;
1509
+ path: {
1510
+ /**
1511
+ * Template ID
1512
+ */
1513
+ id: string;
1514
+ };
1515
+ query?: never;
1516
+ url: "/twofa/templates/{id}/submit";
1517
+ };
1518
+ type SubmitTwofaTemplateErrors = {
1519
+ /**
1520
+ * Invalid status transition
1521
+ */
1522
+ 409: _Error;
1523
+ };
1524
+ type SubmitTwofaTemplateError = SubmitTwofaTemplateErrors[keyof SubmitTwofaTemplateErrors];
1525
+ type SubmitTwofaTemplateResponses = {
1526
+ /**
1527
+ * Submitted
1528
+ */
1529
+ 200: TwoFaTemplate;
1530
+ };
1531
+ type SubmitTwofaTemplateResponse = SubmitTwofaTemplateResponses[keyof SubmitTwofaTemplateResponses];
1532
+ type ListQuotasData = {
1533
+ body?: never;
1534
+ path?: never;
1535
+ query?: never;
1536
+ url: "/quotas";
1537
+ };
1538
+ type ListQuotasResponses = {
1539
+ /**
1540
+ * Quotas
1541
+ */
1542
+ 200: {
1543
+ quotas: Array<Quota>;
1544
+ };
1545
+ };
1546
+ type ListQuotasResponse = ListQuotasResponses[keyof ListQuotasResponses];
1547
+ type ListQuotaIncreaseRequestsData = {
1548
+ body?: never;
1549
+ path?: never;
1550
+ query?: never;
1551
+ url: "/quotas/increase-requests";
1552
+ };
1553
+ type ListQuotaIncreaseRequestsResponses = {
1554
+ /**
1555
+ * Requests
1556
+ */
1557
+ 200: {
1558
+ requests: Array<QuotaIncreaseRequest>;
1559
+ };
1560
+ };
1561
+ type ListQuotaIncreaseRequestsResponse = ListQuotaIncreaseRequestsResponses[keyof ListQuotaIncreaseRequestsResponses];
1562
+ type CreateQuotaIncreaseRequestData = {
1563
+ body?: {
1564
+ resource: string;
1565
+ action: string;
1566
+ window: "MINUTE" | "HOUR" | "DAY" | "MONTH";
1567
+ requestedLimit: number;
1568
+ justification: string;
1569
+ };
1570
+ path?: never;
1571
+ query?: never;
1572
+ url: "/quotas/increase-requests";
1573
+ };
1574
+ type CreateQuotaIncreaseRequestErrors = {
1575
+ /**
1576
+ * Requested limit not greater than current
1577
+ */
1578
+ 400: _Error;
1579
+ /**
1580
+ * Pending request already exists
1581
+ */
1582
+ 409: _Error;
1583
+ };
1584
+ type CreateQuotaIncreaseRequestError = CreateQuotaIncreaseRequestErrors[keyof CreateQuotaIncreaseRequestErrors];
1585
+ type CreateQuotaIncreaseRequestResponses = {
1586
+ /**
1587
+ * Request created
1588
+ */
1589
+ 201: QuotaIncreaseRequest;
1590
+ };
1591
+ type CreateQuotaIncreaseRequestResponse = CreateQuotaIncreaseRequestResponses[keyof CreateQuotaIncreaseRequestResponses];
1592
+ type GetQuotaIncreaseRequestData = {
1593
+ body?: never;
1594
+ path?: {
1595
+ /**
1596
+ * Request ID
1597
+ */
1598
+ id?: number | null;
1599
+ };
1600
+ query?: never;
1601
+ url: "/quotas/increase-requests/{id}";
1602
+ };
1603
+ type GetQuotaIncreaseRequestErrors = {
1604
+ /**
1605
+ * Not found
1606
+ */
1607
+ 404: _Error;
1608
+ };
1609
+ type GetQuotaIncreaseRequestError = GetQuotaIncreaseRequestErrors[keyof GetQuotaIncreaseRequestErrors];
1610
+ type GetQuotaIncreaseRequestResponses = {
1611
+ /**
1612
+ * Request
1613
+ */
1614
+ 200: QuotaIncreaseRequest;
1615
+ };
1616
+ type GetQuotaIncreaseRequestResponse = GetQuotaIncreaseRequestResponses[keyof GetQuotaIncreaseRequestResponses];
1617
+ type ListMessagingProfilesData = {
1618
+ body?: never;
1619
+ path?: never;
1620
+ query?: {
1621
+ page?: string;
1622
+ limit?: string;
1623
+ search?: string;
1624
+ sortBy?: "id" | "name" | "createdAt";
1625
+ sortOrder?: "asc" | "desc";
1626
+ };
1627
+ url: "/messaging-profiles";
1628
+ };
1629
+ type ListMessagingProfilesResponses = {
1630
+ /**
1631
+ * List of messaging profiles
1632
+ */
1633
+ 200: {
1634
+ profiles: Array<MessagingProfile>;
1635
+ total: number;
1636
+ page: number;
1637
+ limit: number;
1638
+ };
1639
+ };
1640
+ type ListMessagingProfilesResponse = ListMessagingProfilesResponses[keyof ListMessagingProfilesResponses];
1641
+ type CreateMessagingProfileData = {
1642
+ body?: {
1643
+ name: string;
1644
+ enabled?: boolean;
1645
+ webhookUrl?: string;
1646
+ allowedCountries?: Array<string>;
1647
+ };
1648
+ path?: never;
1649
+ query?: never;
1650
+ url: "/messaging-profiles";
1651
+ };
1652
+ type CreateMessagingProfileResponses = {
1653
+ /**
1654
+ * Profile created
1655
+ */
1656
+ 201: MessagingProfile;
1657
+ };
1658
+ type CreateMessagingProfileResponse = CreateMessagingProfileResponses[keyof CreateMessagingProfileResponses];
1659
+ type DeleteMessagingProfileData = {
1660
+ body?: never;
1661
+ path?: {
1662
+ /**
1663
+ * Messaging profile ID
1664
+ */
1665
+ id?: number | null;
1666
+ };
1667
+ query?: never;
1668
+ url: "/messaging-profiles/{id}";
1669
+ };
1670
+ type DeleteMessagingProfileErrors = {
1671
+ /**
1672
+ * Not found
1673
+ */
1674
+ 404: _Error;
1675
+ /**
1676
+ * Numbers still assigned
1677
+ */
1678
+ 409: _Error;
1679
+ };
1680
+ type DeleteMessagingProfileError = DeleteMessagingProfileErrors[keyof DeleteMessagingProfileErrors];
1681
+ type DeleteMessagingProfileResponses = {
1682
+ /**
1683
+ * Profile deleted
1684
+ */
1685
+ 200: {
1686
+ success: true;
1687
+ };
1688
+ };
1689
+ type DeleteMessagingProfileResponse = DeleteMessagingProfileResponses[keyof DeleteMessagingProfileResponses];
1690
+ type GetMessagingProfileData = {
1691
+ body?: never;
1692
+ path?: {
1693
+ /**
1694
+ * Messaging profile ID
1695
+ */
1696
+ id?: number | null;
1697
+ };
1698
+ query?: never;
1699
+ url: "/messaging-profiles/{id}";
1700
+ };
1701
+ type GetMessagingProfileErrors = {
1702
+ /**
1703
+ * Not found
1704
+ */
1705
+ 404: _Error;
1706
+ };
1707
+ type GetMessagingProfileError = GetMessagingProfileErrors[keyof GetMessagingProfileErrors];
1708
+ type GetMessagingProfileResponses = {
1709
+ /**
1710
+ * Profile details
1711
+ */
1712
+ 200: MessagingProfile;
1713
+ };
1714
+ type GetMessagingProfileResponse = GetMessagingProfileResponses[keyof GetMessagingProfileResponses];
1715
+ type UpdateMessagingProfileData = {
1716
+ body?: {
1717
+ name?: string;
1718
+ enabled?: boolean;
1719
+ webhookUrl?: string | null;
1720
+ allowedCountries?: Array<string>;
1721
+ optOutKeywords?: Array<string>;
1722
+ optOutMessage?: string | null;
1723
+ optInKeywords?: Array<string>;
1724
+ optInMessage?: string | null;
1725
+ helpKeywords?: Array<string>;
1726
+ helpMessage?: string | null;
1727
+ };
1728
+ path?: {
1729
+ /**
1730
+ * Messaging profile ID
1731
+ */
1732
+ id?: number | null;
1733
+ };
1734
+ query?: never;
1735
+ url: "/messaging-profiles/{id}";
1736
+ };
1737
+ type UpdateMessagingProfileErrors = {
1738
+ /**
1739
+ * Not found
1740
+ */
1741
+ 404: _Error;
1742
+ };
1743
+ type UpdateMessagingProfileError = UpdateMessagingProfileErrors[keyof UpdateMessagingProfileErrors];
1744
+ type UpdateMessagingProfileResponses = {
1745
+ /**
1746
+ * Profile updated
1747
+ */
1748
+ 200: MessagingProfile;
1749
+ };
1750
+ type UpdateMessagingProfileResponse = UpdateMessagingProfileResponses[keyof UpdateMessagingProfileResponses];
1751
+ type AssignMessagingProfileNumbersData = {
1752
+ body?: {
1753
+ phoneNumberIds: Array<number>;
1754
+ };
1755
+ path?: {
1756
+ /**
1757
+ * Messaging profile ID
1758
+ */
1759
+ id?: number | null;
1760
+ };
1761
+ query?: never;
1762
+ url: "/messaging-profiles/{id}/assign";
1763
+ };
1764
+ type AssignMessagingProfileNumbersResponses = {
1765
+ /**
1766
+ * Assignment result
1767
+ */
1768
+ 200: {
1769
+ assigned: number;
1770
+ failed: number;
1771
+ };
1772
+ };
1773
+ type AssignMessagingProfileNumbersResponse = AssignMessagingProfileNumbersResponses[keyof AssignMessagingProfileNumbersResponses];
1774
+ type UnassignMessagingProfileNumbersData = {
1775
+ body?: {
1776
+ phoneNumberIds: Array<number>;
1777
+ };
1778
+ path?: {
1779
+ /**
1780
+ * Messaging profile ID
1781
+ */
1782
+ id?: number | null;
1783
+ };
1784
+ query?: never;
1785
+ url: "/messaging-profiles/{id}/unassign";
1786
+ };
1787
+ type UnassignMessagingProfileNumbersResponses = {
1788
+ /**
1789
+ * Unassignment result
1790
+ */
1791
+ 200: {
1792
+ unassigned: number;
1793
+ failed: number;
1794
+ };
1795
+ };
1796
+ type UnassignMessagingProfileNumbersResponse = UnassignMessagingProfileNumbersResponses[keyof UnassignMessagingProfileNumbersResponses];
1797
+ type SearchPhoneNumbersData = {
1798
+ body?: never;
1799
+ path?: never;
1800
+ query?: {
1801
+ country?: string;
1802
+ areaCode?: string;
1803
+ startsWith?: string;
1804
+ endsWith?: string;
1805
+ contains?: string;
1806
+ capabilities?: "SMS" | "MMS" | "SMS_MMS";
1807
+ limit?: string;
1808
+ };
1809
+ url: "/phone-numbers/search";
1810
+ };
1811
+ type SearchPhoneNumbersErrors = {
1812
+ /**
1813
+ * Rate limited
1814
+ */
1815
+ 429: _Error;
1816
+ };
1817
+ type SearchPhoneNumbersError = SearchPhoneNumbersErrors[keyof SearchPhoneNumbersErrors];
1818
+ type SearchPhoneNumbersResponses = {
1819
+ /**
1820
+ * Available numbers
1821
+ */
1822
+ 200: {
1823
+ numbers: Array<{
1824
+ phoneNumber: string;
1825
+ capabilities: Array<string>;
1826
+ /**
1827
+ * Microdollars
1828
+ */
1829
+ upfrontCost: string;
1830
+ /**
1831
+ * Microdollars
1832
+ */
1833
+ monthlyCost: string;
1834
+ region?: string;
1835
+ locality?: string;
1836
+ }>;
1837
+ };
1838
+ };
1839
+ type SearchPhoneNumbersResponse = SearchPhoneNumbersResponses[keyof SearchPhoneNumbersResponses];
1840
+ type ListPhoneNumbersData = {
1841
+ body?: never;
1842
+ path?: never;
1843
+ query?: {
1844
+ page?: string;
1845
+ limit?: string;
1846
+ search?: string;
1847
+ status?: "UNASSIGNED" | "ASSIGNED" | "ACTIVE" | "RELEASED";
1848
+ capabilities?: "SMS" | "MMS" | "SMS_MMS";
1849
+ messagingProfileId?: string;
1850
+ tag?: string;
1851
+ /**
1852
+ * ISO 3166-1 alpha-2
1853
+ */
1854
+ country?: string;
1855
+ sortBy?: "id" | "phoneNumber" | "status" | "createdAt" | "monthlyCost";
1856
+ sortOrder?: "asc" | "desc";
1857
+ };
1858
+ url: "/phone-numbers";
1859
+ };
1860
+ type ListPhoneNumbersResponses = {
1861
+ /**
1862
+ * Phone numbers
1863
+ */
1864
+ 200: {
1865
+ numbers: Array<PhoneNumber>;
1866
+ total: number;
1867
+ page: number;
1868
+ limit: number;
1869
+ };
1870
+ };
1871
+ type ListPhoneNumbersResponse = ListPhoneNumbersResponses[keyof ListPhoneNumbersResponses];
1872
+ type GetPhoneNumberData = {
1873
+ body?: never;
1874
+ path?: {
1875
+ /**
1876
+ * Phone number ID
1877
+ */
1878
+ id?: number | null;
1879
+ };
1880
+ query?: never;
1881
+ url: "/phone-numbers/{id}";
1882
+ };
1883
+ type GetPhoneNumberErrors = {
1884
+ /**
1885
+ * Not found
1886
+ */
1887
+ 404: _Error;
1888
+ };
1889
+ type GetPhoneNumberError = GetPhoneNumberErrors[keyof GetPhoneNumberErrors];
1890
+ type GetPhoneNumberResponses = {
1891
+ /**
1892
+ * Phone number
1893
+ */
1894
+ 200: PhoneNumber;
1895
+ };
1896
+ type GetPhoneNumberResponse = GetPhoneNumberResponses[keyof GetPhoneNumberResponses];
1897
+ type UpdatePhoneNumberData = {
1898
+ body?: {
1899
+ /**
1900
+ * Set to null to unassign
1901
+ */
1902
+ messagingProfileId?: number | null;
1903
+ tags?: Array<string>;
1904
+ };
1905
+ path?: {
1906
+ /**
1907
+ * Phone number ID
1908
+ */
1909
+ id?: number | null;
1910
+ };
1911
+ query?: never;
1912
+ url: "/phone-numbers/{id}";
1913
+ };
1914
+ type UpdatePhoneNumberErrors = {
1915
+ /**
1916
+ * Not found
1917
+ */
1918
+ 404: _Error;
1919
+ };
1920
+ type UpdatePhoneNumberError = UpdatePhoneNumberErrors[keyof UpdatePhoneNumberErrors];
1921
+ type UpdatePhoneNumberResponses = {
1922
+ /**
1923
+ * Updated
1924
+ */
1925
+ 200: PhoneNumber;
1926
+ };
1927
+ type UpdatePhoneNumberResponse = UpdatePhoneNumberResponses[keyof UpdatePhoneNumberResponses];
1928
+ type BulkAssignPhoneNumbersData = {
1929
+ body?: {
1930
+ phoneNumberIds: Array<number>;
1931
+ messagingProfileId: number;
1932
+ };
1933
+ path?: never;
1934
+ query?: never;
1935
+ url: "/phone-numbers/bulk-assign";
1936
+ };
1937
+ type BulkAssignPhoneNumbersResponses = {
1938
+ /**
1939
+ * Bulk assign result
1940
+ */
1941
+ 200: {
1942
+ assigned: number;
1943
+ failed: number;
1944
+ };
1945
+ };
1946
+ type BulkAssignPhoneNumbersResponse = BulkAssignPhoneNumbersResponses[keyof BulkAssignPhoneNumbersResponses];
1947
+ type BulkUnassignPhoneNumbersData = {
1948
+ body?: {
1949
+ phoneNumberIds: Array<number>;
1950
+ };
1951
+ path?: never;
1952
+ query?: never;
1953
+ url: "/phone-numbers/bulk-unassign";
1954
+ };
1955
+ type BulkUnassignPhoneNumbersResponses = {
1956
+ /**
1957
+ * Bulk unassign result
1958
+ */
1959
+ 200: {
1960
+ unassigned: number;
1961
+ failed: number;
1962
+ };
1963
+ };
1964
+ type BulkUnassignPhoneNumbersResponse = BulkUnassignPhoneNumbersResponses[keyof BulkUnassignPhoneNumbersResponses];
1965
+ type ListPhoneOrdersData = {
1966
+ body?: never;
1967
+ path?: never;
1968
+ query?: {
1969
+ page?: string;
1970
+ limit?: string;
1971
+ search?: string;
1972
+ status?: "PENDING" | "COMPLETED" | "FAILED";
1973
+ sortBy?: "id" | "status" | "totalUpfrontCost" | "createdAt";
1974
+ sortOrder?: "asc" | "desc";
1975
+ };
1976
+ url: "/phone-orders";
1977
+ };
1978
+ type ListPhoneOrdersResponses = {
1979
+ /**
1980
+ * Phone orders
1981
+ */
1982
+ 200: {
1983
+ orders: Array<PhoneOrder>;
1984
+ total: number;
1985
+ page: number;
1986
+ limit: number;
1987
+ };
1988
+ };
1989
+ type ListPhoneOrdersResponse = ListPhoneOrdersResponses[keyof ListPhoneOrdersResponses];
1990
+ type CreatePhoneOrderData = {
1991
+ body?: {
1992
+ items: Array<{
1993
+ phoneNumber: string;
1994
+ /**
1995
+ * Microdollars
1996
+ */
1997
+ upfrontCost: string;
1998
+ /**
1999
+ * Microdollars
2000
+ */
2001
+ monthlyCost: string;
2002
+ capabilities: Array<"SMS" | "MMS" | "SMS_MMS">;
2003
+ }>;
2004
+ /**
2005
+ * Assign all numbers to this profile on purchase
2006
+ */
2007
+ messagingProfileId?: number;
2008
+ };
2009
+ path?: never;
2010
+ query?: never;
2011
+ url: "/phone-orders";
2012
+ };
2013
+ type CreatePhoneOrderErrors = {
2014
+ /**
2015
+ * Validation error or insufficient balance
2016
+ */
2017
+ 400: _Error;
2018
+ };
2019
+ type CreatePhoneOrderError = CreatePhoneOrderErrors[keyof CreatePhoneOrderErrors];
2020
+ type CreatePhoneOrderResponses = {
2021
+ /**
2022
+ * Order placed
2023
+ */
2024
+ 201: PhoneOrder;
2025
+ };
2026
+ type CreatePhoneOrderResponse = CreatePhoneOrderResponses[keyof CreatePhoneOrderResponses];
2027
+ type GetPhoneOrderData = {
2028
+ body?: never;
2029
+ path?: {
2030
+ /**
2031
+ * Order ID
2032
+ */
2033
+ id?: number | null;
2034
+ };
2035
+ query?: never;
2036
+ url: "/phone-orders/{id}";
2037
+ };
2038
+ type GetPhoneOrderErrors = {
2039
+ /**
2040
+ * Not found
2041
+ */
2042
+ 404: _Error;
2043
+ };
2044
+ type GetPhoneOrderError = GetPhoneOrderErrors[keyof GetPhoneOrderErrors];
2045
+ type GetPhoneOrderResponses = {
2046
+ /**
2047
+ * Order details
2048
+ */
2049
+ 200: PhoneOrder;
2050
+ };
2051
+ type GetPhoneOrderResponse = GetPhoneOrderResponses[keyof GetPhoneOrderResponses];
2052
+
2053
+ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
2054
+ /**
2055
+ * You can provide a client instance returned by `createClient()` instead of
2056
+ * individual options. This might be also useful if you want to implement a
2057
+ * custom client.
2058
+ */
2059
+ client?: Client;
2060
+ /**
2061
+ * You can pass arbitrary values through the `meta` object. This can be
2062
+ * used to access values that aren't defined as part of the SDK function.
2063
+ */
2064
+ meta?: Record<string, unknown>;
2065
+ };
2066
+ declare class Brands {
2067
+ /**
2068
+ * List brands
2069
+ *
2070
+ * List all registered 10DLC brands.
2071
+ *
2072
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2073
+ */
2074
+ static listBrands<ThrowOnError extends boolean = false>(options?: Options<ListBrandsData, ThrowOnError>): RequestResult<ListBrandsResponses, unknown, ThrowOnError, "fields">;
2075
+ /**
2076
+ * Register brand
2077
+ *
2078
+ * Register a 10DLC brand. Created as `PENDING_REGISTRATION`, processed async. $4.50 fee charged on completion.
2079
+ *
2080
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2081
+ */
2082
+ static createBrand<ThrowOnError extends boolean = false>(options?: Options<CreateBrandData, ThrowOnError>): RequestResult<CreateBrandResponses, unknown, ThrowOnError, "fields">;
2083
+ /**
2084
+ * Get brand
2085
+ *
2086
+ * Get brand details including campaigns.
2087
+ *
2088
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2089
+ */
2090
+ static getBrand<ThrowOnError extends boolean = false>(options?: Options<GetBrandData, ThrowOnError>): RequestResult<GetBrandResponses, GetBrandErrors, ThrowOnError, "fields">;
2091
+ /**
2092
+ * Get brand feedback
2093
+ *
2094
+ * Get TCR identity feedback (reasons for UNVERIFIED).
2095
+ *
2096
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2097
+ */
2098
+ static getBrandFeedback<ThrowOnError extends boolean = false>(options?: Options<GetBrandFeedbackData, ThrowOnError>): RequestResult<GetBrandFeedbackResponses, GetBrandFeedbackErrors, ThrowOnError, "fields">;
2099
+ }
2100
+ declare class Campaigns {
2101
+ /**
2102
+ * List campaigns
2103
+ *
2104
+ * List all 10DLC campaigns.
2105
+ *
2106
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2107
+ */
2108
+ static listCampaigns<ThrowOnError extends boolean = false>(options?: Options<ListCampaignsData, ThrowOnError>): RequestResult<ListCampaignsResponses, unknown, ThrowOnError, "fields">;
2109
+ /**
2110
+ * Create campaign
2111
+ *
2112
+ * Register a 10DLC campaign. Created as `PENDING_REGISTRATION`, processed async. Fee varies by use case.
2113
+ *
2114
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2115
+ */
2116
+ static createCampaign<ThrowOnError extends boolean = false>(options?: Options<CreateCampaignData, ThrowOnError>): RequestResult<CreateCampaignResponses, unknown, ThrowOnError, "fields">;
2117
+ /**
2118
+ * Get campaign
2119
+ *
2120
+ * Get campaign details.
2121
+ *
2122
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2123
+ */
2124
+ static getCampaign<ThrowOnError extends boolean = false>(options?: Options<GetCampaignData, ThrowOnError>): RequestResult<GetCampaignResponses, GetCampaignErrors, ThrowOnError, "fields">;
2125
+ /**
2126
+ * Get qualified use cases
2127
+ *
2128
+ * Get use cases a brand qualifies for.
2129
+ *
2130
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2131
+ */
2132
+ static getQualifiedUseCases<ThrowOnError extends boolean = false>(options?: Options<GetQualifiedUseCasesData, ThrowOnError>): RequestResult<GetQualifiedUseCasesResponses, unknown, ThrowOnError, "fields">;
2133
+ /**
2134
+ * Share campaign
2135
+ *
2136
+ * Share with upstream CNP/DCA.
2137
+ *
2138
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2139
+ */
2140
+ static shareCampaign<ThrowOnError extends boolean = false>(options?: Options<ShareCampaignData, ThrowOnError>): RequestResult<ShareCampaignResponses, unknown, ThrowOnError, "fields">;
2141
+ /**
2142
+ * Get sharing status
2143
+ *
2144
+ * Get campaign sharing status with upstream CNPs.
2145
+ *
2146
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2147
+ */
2148
+ static getCampaignSharing<ThrowOnError extends boolean = false>(options?: Options<GetCampaignSharingData, ThrowOnError>): RequestResult<GetCampaignSharingResponses, unknown, ThrowOnError, "fields">;
2149
+ /**
2150
+ * Get MNO status
2151
+ *
2152
+ * Get per-carrier approval status.
2153
+ *
2154
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2155
+ */
2156
+ static getCampaignMnoStatus<ThrowOnError extends boolean = false>(options?: Options<GetCampaignMnoStatusData, ThrowOnError>): RequestResult<GetCampaignMnoStatusResponses, unknown, ThrowOnError, "fields">;
2157
+ }
2158
+ declare class Compliance {
2159
+ /**
2160
+ * List compliance events
2161
+ *
2162
+ * List compliance events. Created automatically on brand/campaign status changes.
2163
+ *
2164
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2165
+ */
2166
+ static listComplianceEvents<ThrowOnError extends boolean = false>(options?: Options<ListComplianceEventsData, ThrowOnError>): RequestResult<ListComplianceEventsResponses, unknown, ThrowOnError, "fields">;
2167
+ /**
2168
+ * Get compliance event
2169
+ *
2170
+ * Get event with messages and comments. Auto-marks as read.
2171
+ *
2172
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2173
+ */
2174
+ static getComplianceEvent<ThrowOnError extends boolean = false>(options?: Options<GetComplianceEventData, ThrowOnError>): RequestResult<GetComplianceEventResponses, GetComplianceEventErrors, ThrowOnError, "fields">;
2175
+ }
2176
+ declare class Email {
2177
+ /**
2178
+ * Get email status
2179
+ *
2180
+ * Check if email is enabled.
2181
+ */
2182
+ static getEmailStatus<ThrowOnError extends boolean = false>(options?: Options<GetEmailStatusData, ThrowOnError>): RequestResult<GetEmailStatusResponses, unknown, ThrowOnError, "fields">;
2183
+ /**
2184
+ * Enable email
2185
+ *
2186
+ * Enable email sending. Async — poll `GET /email/status` until `enabled` is `true`.
2187
+ */
2188
+ static enableEmail<ThrowOnError extends boolean = false>(options?: Options<EnableEmailData, ThrowOnError>): RequestResult<EnableEmailResponses, unknown, ThrowOnError, "fields">;
2189
+ /**
2190
+ * List identities
2191
+ *
2192
+ * List email domain identities.
2193
+ */
2194
+ static listEmailIdentities<ThrowOnError extends boolean = false>(options?: Options<ListEmailIdentitiesData, ThrowOnError>): RequestResult<ListEmailIdentitiesResponses, unknown, ThrowOnError, "fields">;
2195
+ /**
2196
+ * Add domain
2197
+ *
2198
+ * Add a sending domain. DNS records appear once processing completes.
2199
+ *
2200
+ * **Plan**: Adding a second (or further) verified domain requires the `multiple_email_domains` capability — included in the **Email** and **All Services** plans.
2201
+ */
2202
+ static createEmailIdentity<ThrowOnError extends boolean = false>(options?: Options<CreateEmailIdentityData, ThrowOnError>): RequestResult<CreateEmailIdentityResponses, CreateEmailIdentityErrors, ThrowOnError, "fields">;
2203
+ /**
2204
+ * Delete identity
2205
+ *
2206
+ * Remove a domain identity.
2207
+ */
2208
+ static deleteEmailIdentity<ThrowOnError extends boolean = false>(options?: Options<DeleteEmailIdentityData, ThrowOnError>): RequestResult<DeleteEmailIdentityResponses, DeleteEmailIdentityErrors, ThrowOnError, "fields">;
2209
+ /**
2210
+ * Get identity
2211
+ *
2212
+ * Get identity with DNS records.
2213
+ */
2214
+ static getEmailIdentity<ThrowOnError extends boolean = false>(options?: Options<GetEmailIdentityData, ThrowOnError>): RequestResult<GetEmailIdentityResponses, GetEmailIdentityErrors, ThrowOnError, "fields">;
2215
+ /**
2216
+ * Verify DNS
2217
+ *
2218
+ * Trigger DNS verification check.
2219
+ */
2220
+ static verifyEmailIdentityDns<ThrowOnError extends boolean = false>(options?: Options<VerifyEmailIdentityDnsData, ThrowOnError>): RequestResult<VerifyEmailIdentityDnsResponses, unknown, ThrowOnError, "fields">;
2221
+ /**
2222
+ * Send test email
2223
+ *
2224
+ * Send a test email from a verified domain.
2225
+ */
2226
+ static sendEmailIdentityTest<ThrowOnError extends boolean = false>(options?: Options<SendEmailIdentityTestData, ThrowOnError>): RequestResult<SendEmailIdentityTestResponses, SendEmailIdentityTestErrors, ThrowOnError, "fields">;
2227
+ /**
2228
+ * Get sent emails
2229
+ *
2230
+ * Sent email history, newest first. Cursor-paginated.
2231
+ */
2232
+ static getEmailHistory<ThrowOnError extends boolean = false>(options?: Options<GetEmailHistoryData, ThrowOnError>): RequestResult<GetEmailHistoryResponses, unknown, ThrowOnError, "fields">;
2233
+ /**
2234
+ * Send email
2235
+ *
2236
+ * Send an email. The `from` domain must be verified. Rate limit headers are included: `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`.
2237
+ */
2238
+ static sendEmail<ThrowOnError extends boolean = false>(options?: Options<SendEmailData, ThrowOnError>): RequestResult<SendEmailResponses, SendEmailErrors, ThrowOnError, "fields">;
2239
+ }
2240
+ declare class Balance {
2241
+ /**
2242
+ * Get balance
2243
+ *
2244
+ * Current balance in microdollars (1 dollar = 1,000,000).
2245
+ */
2246
+ static getBalance<ThrowOnError extends boolean = false>(options?: Options<GetBalanceData, ThrowOnError>): RequestResult<GetBalanceResponses, unknown, ThrowOnError, "fields">;
2247
+ /**
2248
+ * Get history
2249
+ *
2250
+ * Paginated transaction history.
2251
+ */
2252
+ static getBalanceHistory<ThrowOnError extends boolean = false>(options?: Options<GetBalanceHistoryData, ThrowOnError>): RequestResult<GetBalanceHistoryResponses, unknown, ThrowOnError, "fields">;
2253
+ /**
2254
+ * Get usage
2255
+ *
2256
+ * Current month debit summary.
2257
+ */
2258
+ static getBalanceUsage<ThrowOnError extends boolean = false>(options?: Options<GetBalanceUsageData, ThrowOnError>): RequestResult<GetBalanceUsageResponses, unknown, ThrowOnError, "fields">;
2259
+ }
2260
+ declare class Messaging {
2261
+ /**
2262
+ * Send message
2263
+ *
2264
+ * Send an SMS or MMS. Rate limit headers are included: `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`.
2265
+ *
2266
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2267
+ */
2268
+ static sendMessage<ThrowOnError extends boolean = false>(options?: Options<SendMessageData, ThrowOnError>): RequestResult<SendMessageResponses, SendMessageErrors, ThrowOnError, "fields">;
2269
+ }
2270
+ declare class FaVerifications {
2271
+ /**
2272
+ * Send verification code
2273
+ *
2274
+ * Send a 6-digit verification code via email or SMS. Rate limit headers are included: `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`.
2275
+ *
2276
+ * Requires permission: `twofa.create`.
2277
+ *
2278
+ * **Plan**: Requires the `twofa` capability — included in the **All Services** plan.
2279
+ *
2280
+ * **Rate limits**: 60/min per account, 1/min per recipient, 5/hour per tenant+recipient.
2281
+ *
2282
+ * **Note**: This endpoint is served by the 2FA service, not the main API. Base URL differs in production.
2283
+ */
2284
+ static createVerification<ThrowOnError extends boolean = false>(options?: Options<CreateVerificationData, ThrowOnError>): RequestResult<CreateVerificationResponses, CreateVerificationErrors, ThrowOnError, "fields">;
2285
+ /**
2286
+ * Check verification code
2287
+ *
2288
+ * Verify a submitted code. Returns the verification status.
2289
+ *
2290
+ * Requires permission: `twofa.check`.
2291
+ *
2292
+ * **Plan**: Requires the `twofa` capability — included in the **All Services** plan.
2293
+ *
2294
+ * After 5 wrong attempts the verification is permanently `failed`. Codes expire after 10 minutes.
2295
+ *
2296
+ * **Terminal statuses** (`approved`, `failed`, `expired`) reject further checks.
2297
+ */
2298
+ static checkVerification<ThrowOnError extends boolean = false>(options: Options<CheckVerificationData, ThrowOnError>): RequestResult<CheckVerificationResponses, CheckVerificationErrors, ThrowOnError, "fields">;
2299
+ }
2300
+ declare class FaTemplates {
2301
+ /**
2302
+ * List templates
2303
+ *
2304
+ * List all 2FA templates (email and SMS) for the account.
2305
+ *
2306
+ * Requires permission: `twofa_templates.read`.
2307
+ *
2308
+ * **Plan**: Requires the `twofa` capability — included in the **All Services** plan.
2309
+ */
2310
+ static listTwofaTemplates<ThrowOnError extends boolean = false>(options?: Options<ListTwofaTemplatesData, ThrowOnError>): RequestResult<ListTwofaTemplatesResponses, unknown, ThrowOnError, "fields">;
2311
+ /**
2312
+ * Create template
2313
+ *
2314
+ * Create a new 2FA template. Set `channel` to `EMAIL` (with `subject` + `bodyType`) or `SMS` (body-only). Starts in `DRAFT` status. Body must contain the `{{code}}` placeholder.
2315
+ *
2316
+ * Requires permission: `twofa_templates.write`.
2317
+ *
2318
+ * **Plan**: Requires the `twofa` capability — included in the **All Services** plan.
2319
+ */
2320
+ static createTwofaTemplate<ThrowOnError extends boolean = false>(options?: Options<CreateTwofaTemplateData, ThrowOnError>): RequestResult<CreateTwofaTemplateResponses, unknown, ThrowOnError, "fields">;
2321
+ /**
2322
+ * Delete template
2323
+ *
2324
+ * Delete a template. Cannot delete while in `PENDING_REVIEW` status.
2325
+ *
2326
+ * Requires permission: `twofa_templates.write`.
2327
+ *
2328
+ * **Plan**: Requires the `twofa` capability — included in the **All Services** plan.
2329
+ */
2330
+ static deleteTwofaTemplate<ThrowOnError extends boolean = false>(options: Options<DeleteTwofaTemplateData, ThrowOnError>): RequestResult<DeleteTwofaTemplateResponses, DeleteTwofaTemplateErrors, ThrowOnError, "fields">;
2331
+ /**
2332
+ * Get template
2333
+ *
2334
+ * Get a single template by ID.
2335
+ *
2336
+ * Requires permission: `twofa_templates.read`.
2337
+ *
2338
+ * **Plan**: Requires the `twofa` capability — included in the **All Services** plan.
2339
+ */
2340
+ static getTwofaTemplate<ThrowOnError extends boolean = false>(options: Options<GetTwofaTemplateData, ThrowOnError>): RequestResult<GetTwofaTemplateResponses, GetTwofaTemplateErrors, ThrowOnError, "fields">;
2341
+ /**
2342
+ * Update template
2343
+ *
2344
+ * Update a template. The `channel` field must match the existing template — channel cannot be changed. Only editable in `DRAFT` or `REJECTED` status. Editing resets status to `DRAFT`.
2345
+ *
2346
+ * Requires permission: `twofa_templates.write`.
2347
+ *
2348
+ * **Plan**: Requires the `twofa` capability — included in the **All Services** plan.
2349
+ */
2350
+ static updateTwofaTemplate<ThrowOnError extends boolean = false>(options: Options<UpdateTwofaTemplateData, ThrowOnError>): RequestResult<UpdateTwofaTemplateResponses, UpdateTwofaTemplateErrors, ThrowOnError, "fields">;
2351
+ /**
2352
+ * Submit for review
2353
+ *
2354
+ * Submit a `DRAFT` or `REJECTED` template for admin review. Once submitted, edits are locked until the template is approved or rejected.
2355
+ *
2356
+ * Requires permission: `twofa_templates.write`.
2357
+ *
2358
+ * **Plan**: Requires the `twofa` capability — included in the **All Services** plan.
2359
+ *
2360
+ * **Approval flow**: `DRAFT` → `PENDING_REVIEW` → `APPROVED` or `REJECTED`. Only `APPROVED` templates can be used in verification API calls.
2361
+ */
2362
+ static submitTwofaTemplate<ThrowOnError extends boolean = false>(options: Options<SubmitTwofaTemplateData, ThrowOnError>): RequestResult<SubmitTwofaTemplateResponses, SubmitTwofaTemplateErrors, ThrowOnError, "fields">;
2363
+ }
2364
+ declare class Quotas {
2365
+ /**
2366
+ * List account quotas
2367
+ *
2368
+ * Get all rate limits and quotas for the account. Shows both defaults and any admin-set overrides.
2369
+ *
2370
+ * Requires permission: `quotas.read`.
2371
+ */
2372
+ static listQuotas<ThrowOnError extends boolean = false>(options?: Options<ListQuotasData, ThrowOnError>): RequestResult<ListQuotasResponses, unknown, ThrowOnError, "fields">;
2373
+ /**
2374
+ * List increase requests
2375
+ *
2376
+ * List all quota increase requests for the account.
2377
+ *
2378
+ * Requires permission: `quotas.read`.
2379
+ */
2380
+ static listQuotaIncreaseRequests<ThrowOnError extends boolean = false>(options?: Options<ListQuotaIncreaseRequestsData, ThrowOnError>): RequestResult<ListQuotaIncreaseRequestsResponses, unknown, ThrowOnError, "fields">;
2381
+ /**
2382
+ * Request quota increase
2383
+ *
2384
+ * Submit a request to increase a specific quota. Only one pending request per resource/action/window is allowed. The requested limit must exceed the current limit.
2385
+ *
2386
+ * Requires permission: `quotas.request_increase`.
2387
+ *
2388
+ * Admin will review and either approve (automatically applies the new limit) or reject (with a note).
2389
+ */
2390
+ static createQuotaIncreaseRequest<ThrowOnError extends boolean = false>(options?: Options<CreateQuotaIncreaseRequestData, ThrowOnError>): RequestResult<CreateQuotaIncreaseRequestResponses, CreateQuotaIncreaseRequestErrors, ThrowOnError, "fields">;
2391
+ /**
2392
+ * Get increase request
2393
+ *
2394
+ * Get a single quota increase request by ID.
2395
+ *
2396
+ * Requires permission: `quotas.read`.
2397
+ */
2398
+ static getQuotaIncreaseRequest<ThrowOnError extends boolean = false>(options?: Options<GetQuotaIncreaseRequestData, ThrowOnError>): RequestResult<GetQuotaIncreaseRequestResponses, GetQuotaIncreaseRequestErrors, ThrowOnError, "fields">;
2399
+ }
2400
+ declare class MessagingProfiles {
2401
+ /**
2402
+ * List messaging profiles
2403
+ *
2404
+ * List all messaging profiles for the account. Supports pagination and search.
2405
+ *
2406
+ * Requires permission: `messaging_profiles.read`.
2407
+ *
2408
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2409
+ */
2410
+ static listMessagingProfiles<ThrowOnError extends boolean = false>(options?: Options<ListMessagingProfilesData, ThrowOnError>): RequestResult<ListMessagingProfilesResponses, unknown, ThrowOnError, "fields">;
2411
+ /**
2412
+ * Create messaging profile
2413
+ *
2414
+ * Create a new messaging profile. Default allowed destination is US.
2415
+ *
2416
+ * Requires permission: `messaging_profiles.write`.
2417
+ *
2418
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2419
+ */
2420
+ static createMessagingProfile<ThrowOnError extends boolean = false>(options?: Options<CreateMessagingProfileData, ThrowOnError>): RequestResult<CreateMessagingProfileResponses, unknown, ThrowOnError, "fields">;
2421
+ /**
2422
+ * Delete messaging profile
2423
+ *
2424
+ * Delete a messaging profile. All phone numbers must be unassigned first — deletion is blocked while numbers are still associated.
2425
+ *
2426
+ * Requires permission: `messaging_profiles.write`.
2427
+ *
2428
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2429
+ */
2430
+ static deleteMessagingProfile<ThrowOnError extends boolean = false>(options?: Options<DeleteMessagingProfileData, ThrowOnError>): RequestResult<DeleteMessagingProfileResponses, DeleteMessagingProfileErrors, ThrowOnError, "fields">;
2431
+ /**
2432
+ * Get messaging profile
2433
+ *
2434
+ * Get a messaging profile by ID with full configuration.
2435
+ *
2436
+ * Requires permission: `messaging_profiles.read`.
2437
+ *
2438
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2439
+ */
2440
+ static getMessagingProfile<ThrowOnError extends boolean = false>(options?: Options<GetMessagingProfileData, ThrowOnError>): RequestResult<GetMessagingProfileResponses, GetMessagingProfileErrors, ThrowOnError, "fields">;
2441
+ /**
2442
+ * Update messaging profile
2443
+ *
2444
+ * Update a messaging profile. Changes to auto-response keywords are applied automatically.
2445
+ *
2446
+ * Requires permission: `messaging_profiles.write`.
2447
+ *
2448
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2449
+ */
2450
+ static updateMessagingProfile<ThrowOnError extends boolean = false>(options?: Options<UpdateMessagingProfileData, ThrowOnError>): RequestResult<UpdateMessagingProfileResponses, UpdateMessagingProfileErrors, ThrowOnError, "fields">;
2451
+ /**
2452
+ * Assign numbers to profile
2453
+ *
2454
+ * Assign phone numbers to a messaging profile. Numbers that fail to assign are skipped and reported in the response.
2455
+ *
2456
+ * Requires permission: `messaging_profiles.write`.
2457
+ *
2458
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2459
+ */
2460
+ static assignMessagingProfileNumbers<ThrowOnError extends boolean = false>(options?: Options<AssignMessagingProfileNumbersData, ThrowOnError>): RequestResult<AssignMessagingProfileNumbersResponses, unknown, ThrowOnError, "fields">;
2461
+ /**
2462
+ * Unassign numbers from profile
2463
+ *
2464
+ * Unassign phone numbers from a messaging profile. Numbers revert to `UNASSIGNED` status.
2465
+ *
2466
+ * Requires permission: `messaging_profiles.write`.
2467
+ *
2468
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2469
+ */
2470
+ static unassignMessagingProfileNumbers<ThrowOnError extends boolean = false>(options?: Options<UnassignMessagingProfileNumbersData, ThrowOnError>): RequestResult<UnassignMessagingProfileNumbersResponses, unknown, ThrowOnError, "fields">;
2471
+ }
2472
+ declare class PhoneNumbers {
2473
+ /**
2474
+ * Search available numbers
2475
+ *
2476
+ * Search for available phone numbers to purchase. Rate limit headers are included: `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`.
2477
+ *
2478
+ * Requires permission: `numbers.search`.
2479
+ *
2480
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2481
+ *
2482
+ * **Rate limit**: 30 searches/min per account.
2483
+ */
2484
+ static searchPhoneNumbers<ThrowOnError extends boolean = false>(options?: Options<SearchPhoneNumbersData, ThrowOnError>): RequestResult<SearchPhoneNumbersResponses, SearchPhoneNumbersErrors, ThrowOnError, "fields">;
2485
+ /**
2486
+ * List phone numbers
2487
+ *
2488
+ * List all phone numbers for the account. Supports filtering by status, capabilities, messaging profile, tags, and country.
2489
+ *
2490
+ * Requires permission: `numbers.read`.
2491
+ *
2492
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2493
+ */
2494
+ static listPhoneNumbers<ThrowOnError extends boolean = false>(options?: Options<ListPhoneNumbersData, ThrowOnError>): RequestResult<ListPhoneNumbersResponses, unknown, ThrowOnError, "fields">;
2495
+ /**
2496
+ * Get phone number
2497
+ *
2498
+ * Get a single phone number by ID.
2499
+ *
2500
+ * Requires permission: `numbers.read`.
2501
+ *
2502
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2503
+ */
2504
+ static getPhoneNumber<ThrowOnError extends boolean = false>(options?: Options<GetPhoneNumberData, ThrowOnError>): RequestResult<GetPhoneNumberResponses, GetPhoneNumberErrors, ThrowOnError, "fields">;
2505
+ /**
2506
+ * Update phone number
2507
+ *
2508
+ * Update a phone number (messaging profile assignment, tags). If a messaging profile assignment fails, the update is rejected.
2509
+ *
2510
+ * Requires permission: `numbers.write`.
2511
+ *
2512
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2513
+ */
2514
+ static updatePhoneNumber<ThrowOnError extends boolean = false>(options?: Options<UpdatePhoneNumberData, ThrowOnError>): RequestResult<UpdatePhoneNumberResponses, UpdatePhoneNumberErrors, ThrowOnError, "fields">;
2515
+ /**
2516
+ * Bulk assign to profile
2517
+ *
2518
+ * Assign multiple phone numbers to a messaging profile. Numbers that fail to assign are skipped and reported in the response.
2519
+ *
2520
+ * Requires permission: `numbers.write`.
2521
+ *
2522
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2523
+ */
2524
+ static bulkAssignPhoneNumbers<ThrowOnError extends boolean = false>(options?: Options<BulkAssignPhoneNumbersData, ThrowOnError>): RequestResult<BulkAssignPhoneNumbersResponses, unknown, ThrowOnError, "fields">;
2525
+ /**
2526
+ * Bulk unassign from profile
2527
+ *
2528
+ * Unassign multiple phone numbers from their messaging profiles. Numbers revert to `UNASSIGNED` status.
2529
+ *
2530
+ * Requires permission: `numbers.write`.
2531
+ *
2532
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2533
+ */
2534
+ static bulkUnassignPhoneNumbers<ThrowOnError extends boolean = false>(options?: Options<BulkUnassignPhoneNumbersData, ThrowOnError>): RequestResult<BulkUnassignPhoneNumbersResponses, unknown, ThrowOnError, "fields">;
2535
+ }
2536
+ declare class PhoneOrders {
2537
+ /**
2538
+ * List phone orders
2539
+ *
2540
+ * List all phone number orders. Supports pagination and filtering by status.
2541
+ *
2542
+ * Requires permission: `numbers.read`.
2543
+ *
2544
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2545
+ */
2546
+ static listPhoneOrders<ThrowOnError extends boolean = false>(options?: Options<ListPhoneOrdersData, ThrowOnError>): RequestResult<ListPhoneOrdersResponses, unknown, ThrowOnError, "fields">;
2547
+ /**
2548
+ * Place phone number order
2549
+ *
2550
+ * Purchase phone numbers. Creates a PhoneOrder with items, provisions the numbers, charges the account balance, and optionally assigns to a messaging profile.
2551
+ *
2552
+ * Requires permission: `numbers.buy`.
2553
+ *
2554
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2555
+ */
2556
+ static createPhoneOrder<ThrowOnError extends boolean = false>(options?: Options<CreatePhoneOrderData, ThrowOnError>): RequestResult<CreatePhoneOrderResponses, CreatePhoneOrderErrors, ThrowOnError, "fields">;
2557
+ /**
2558
+ * Get phone order
2559
+ *
2560
+ * Get a single phone order with items.
2561
+ *
2562
+ * Requires permission: `numbers.read`.
2563
+ *
2564
+ * **Plan**: Requires the `sms` capability — included in the **All Services** plan.
2565
+ */
2566
+ static getPhoneOrder<ThrowOnError extends boolean = false>(options?: Options<GetPhoneOrderData, ThrowOnError>): RequestResult<GetPhoneOrderResponses, GetPhoneOrderErrors, ThrowOnError, "fields">;
2567
+ }
2568
+
2569
+ interface BlocxConfig {
2570
+ /** API access key ID (sent as `x-access-key-id`). */
2571
+ accessKeyId: string;
2572
+ /** API secret access key (sent as `x-secret-access-key`). */
2573
+ secretAccessKey: string;
2574
+ /** Override the API base URL. Defaults to https://api.blocx.com. */
2575
+ baseUrl?: string;
2576
+ /** Optional custom fetch implementation. */
2577
+ fetch?: typeof globalThis.fetch;
2578
+ /** Additional headers to merge into every request. */
2579
+ headers?: Record<string, string>;
2580
+ }
2581
+ /**
2582
+ * Create a configured Blocx SDK client. Pass the returned `client` into any
2583
+ * generated SDK call via the `client` option, or call `setDefault()` to make
2584
+ * it the default for every call in the process.
2585
+ */
2586
+ declare function createBlocxClient(options: BlocxConfig): {
2587
+ client: Client;
2588
+ setDefault: () => Client;
2589
+ };
2590
+
2591
+ export { type AssignMessagingProfileNumbersData, type AssignMessagingProfileNumbersResponse, type AssignMessagingProfileNumbersResponses, Balance, type BlocxConfig, type Brand, type BrandDetail, type BrandFeedback, Brands, type BulkAssignPhoneNumbersData, type BulkAssignPhoneNumbersResponse, type BulkAssignPhoneNumbersResponses, type BulkUnassignPhoneNumbersData, type BulkUnassignPhoneNumbersResponse, type BulkUnassignPhoneNumbersResponses, type Campaign, type CampaignMnoStatus, type CampaignSharing, Campaigns, type CheckVerificationData, type CheckVerificationError, type CheckVerificationErrors, type CheckVerificationResponse, type CheckVerificationResponses, type ClientOptions, Compliance, type ComplianceEvent, type ComplianceEventDetail, type CreateBrandData, type CreateBrandResponse, type CreateBrandResponses, type CreateCampaignData, type CreateCampaignResponse, type CreateCampaignResponses, type CreateEmailIdentityData, type CreateEmailIdentityError, type CreateEmailIdentityErrors, type CreateEmailIdentityResponse, type CreateEmailIdentityResponses, type CreateMessagingProfileData, type CreateMessagingProfileResponse, type CreateMessagingProfileResponses, type CreatePhoneOrderData, type CreatePhoneOrderError, type CreatePhoneOrderErrors, type CreatePhoneOrderResponse, type CreatePhoneOrderResponses, type CreateQuotaIncreaseRequestData, type CreateQuotaIncreaseRequestError, type CreateQuotaIncreaseRequestErrors, type CreateQuotaIncreaseRequestResponse, type CreateQuotaIncreaseRequestResponses, type CreateTwofaTemplateData, type CreateTwofaTemplateResponse, type CreateTwofaTemplateResponses, type CreateVerificationData, type CreateVerificationError, type CreateVerificationErrors, type CreateVerificationResponse, type CreateVerificationResponses, type DeleteEmailIdentityData, type DeleteEmailIdentityError, type DeleteEmailIdentityErrors, type DeleteEmailIdentityResponse, type DeleteEmailIdentityResponses, type DeleteMessagingProfileData, type DeleteMessagingProfileError, type DeleteMessagingProfileErrors, type DeleteMessagingProfileResponse, type DeleteMessagingProfileResponses, type DeleteTwofaTemplateData, type DeleteTwofaTemplateError, type DeleteTwofaTemplateErrors, type DeleteTwofaTemplateResponse, type DeleteTwofaTemplateResponses, type DnsRecord, Email, type EmailIdentity, type EnableEmailData, type EnableEmailResponse, type EnableEmailResponses, FaTemplates, FaVerifications, type GetBalanceData, type GetBalanceHistoryData, type GetBalanceHistoryResponse, type GetBalanceHistoryResponses, type GetBalanceResponse, type GetBalanceResponses, type GetBalanceUsageData, type GetBalanceUsageResponse, type GetBalanceUsageResponses, type GetBrandData, type GetBrandError, type GetBrandErrors, type GetBrandFeedbackData, type GetBrandFeedbackError, type GetBrandFeedbackErrors, type GetBrandFeedbackResponse, type GetBrandFeedbackResponses, type GetBrandResponse, type GetBrandResponses, type GetCampaignData, type GetCampaignError, type GetCampaignErrors, type GetCampaignMnoStatusData, type GetCampaignMnoStatusResponse, type GetCampaignMnoStatusResponses, type GetCampaignResponse, type GetCampaignResponses, type GetCampaignSharingData, type GetCampaignSharingResponse, type GetCampaignSharingResponses, type GetComplianceEventData, type GetComplianceEventError, type GetComplianceEventErrors, type GetComplianceEventResponse, type GetComplianceEventResponses, type GetEmailHistoryData, type GetEmailHistoryResponse, type GetEmailHistoryResponses, type GetEmailIdentityData, type GetEmailIdentityError, type GetEmailIdentityErrors, type GetEmailIdentityResponse, type GetEmailIdentityResponses, type GetEmailStatusData, type GetEmailStatusResponse, type GetEmailStatusResponses, type GetMessagingProfileData, type GetMessagingProfileError, type GetMessagingProfileErrors, type GetMessagingProfileResponse, type GetMessagingProfileResponses, type GetPhoneNumberData, type GetPhoneNumberError, type GetPhoneNumberErrors, type GetPhoneNumberResponse, type GetPhoneNumberResponses, type GetPhoneOrderData, type GetPhoneOrderError, type GetPhoneOrderErrors, type GetPhoneOrderResponse, type GetPhoneOrderResponses, type GetQualifiedUseCasesData, type GetQualifiedUseCasesResponse, type GetQualifiedUseCasesResponses, type GetQuotaIncreaseRequestData, type GetQuotaIncreaseRequestError, type GetQuotaIncreaseRequestErrors, type GetQuotaIncreaseRequestResponse, type GetQuotaIncreaseRequestResponses, type GetTwofaTemplateData, type GetTwofaTemplateError, type GetTwofaTemplateErrors, type GetTwofaTemplateResponse, type GetTwofaTemplateResponses, type ListBrandsData, type ListBrandsResponse, type ListBrandsResponses, type ListCampaignsData, type ListCampaignsResponse, type ListCampaignsResponses, type ListComplianceEventsData, type ListComplianceEventsResponse, type ListComplianceEventsResponses, type ListEmailIdentitiesData, type ListEmailIdentitiesResponse, type ListEmailIdentitiesResponses, type ListMessagingProfilesData, type ListMessagingProfilesResponse, type ListMessagingProfilesResponses, type ListPhoneNumbersData, type ListPhoneNumbersResponse, type ListPhoneNumbersResponses, type ListPhoneOrdersData, type ListPhoneOrdersResponse, type ListPhoneOrdersResponses, type ListQuotaIncreaseRequestsData, type ListQuotaIncreaseRequestsResponse, type ListQuotaIncreaseRequestsResponses, type ListQuotasData, type ListQuotasResponse, type ListQuotasResponses, type ListTwofaTemplatesData, type ListTwofaTemplatesResponse, type ListTwofaTemplatesResponses, Messaging, type MessagingProfile, MessagingProfiles, type Options, type PhoneNumber, PhoneNumbers, type PhoneOrder, PhoneOrders, type ProvisioningStage, type Quota, type QuotaIncreaseRequest, Quotas, type SearchPhoneNumbersData, type SearchPhoneNumbersError, type SearchPhoneNumbersErrors, type SearchPhoneNumbersResponse, type SearchPhoneNumbersResponses, type SendEmailData, type SendEmailError, type SendEmailErrors, type SendEmailIdentityTestData, type SendEmailIdentityTestError, type SendEmailIdentityTestErrors, type SendEmailIdentityTestResponse, type SendEmailIdentityTestResponses, type SendEmailResponse, type SendEmailResponses, type SendMessageData, type SendMessageError, type SendMessageErrors, type SendMessageResponse, type SendMessageResponses, type SentEmail, type ShareCampaignData, type ShareCampaignResponse, type ShareCampaignResponses, type SubmitTwofaTemplateData, type SubmitTwofaTemplateError, type SubmitTwofaTemplateErrors, type SubmitTwofaTemplateResponse, type SubmitTwofaTemplateResponses, type TwoFaTemplate, type UnassignMessagingProfileNumbersData, type UnassignMessagingProfileNumbersResponse, type UnassignMessagingProfileNumbersResponses, type UpdateMessagingProfileData, type UpdateMessagingProfileError, type UpdateMessagingProfileErrors, type UpdateMessagingProfileResponse, type UpdateMessagingProfileResponses, type UpdatePhoneNumberData, type UpdatePhoneNumberError, type UpdatePhoneNumberErrors, type UpdatePhoneNumberResponse, type UpdatePhoneNumberResponses, type UpdateTwofaTemplateData, type UpdateTwofaTemplateError, type UpdateTwofaTemplateErrors, type UpdateTwofaTemplateResponse, type UpdateTwofaTemplateResponses, type UseCase, type Verification, type VerificationCheck, type VerifyEmailIdentityDnsData, type VerifyEmailIdentityDnsResponse, type VerifyEmailIdentityDnsResponses, type _Error, createBlocxClient };