@gtmi/ramp-agent-client 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1430 @@
1
+ import { z } from 'zod';
2
+
3
+ type AuthToken = string | undefined;
4
+ interface Auth {
5
+ /**
6
+ * Which part of the request do we use to send the auth?
7
+ *
8
+ * @default 'header'
9
+ */
10
+ in?: 'header' | 'query' | 'cookie';
11
+ /**
12
+ * A unique identifier for the security scheme.
13
+ *
14
+ * Defined only when there are multiple security schemes whose `Auth`
15
+ * shape would otherwise be identical.
16
+ */
17
+ key?: string;
18
+ /**
19
+ * Header or query parameter name.
20
+ *
21
+ * @default 'Authorization'
22
+ */
23
+ name?: string;
24
+ scheme?: 'basic' | 'bearer';
25
+ type: 'apiKey' | 'http';
26
+ }
27
+
28
+ interface SerializerOptions<T> {
29
+ /**
30
+ * @default true
31
+ */
32
+ explode: boolean;
33
+ style: T;
34
+ }
35
+ type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
36
+ type ObjectStyle = 'form' | 'deepObject';
37
+
38
+ type QuerySerializer = (query: Record<string, unknown>) => string;
39
+ type BodySerializer = (body: unknown) => unknown;
40
+ type QuerySerializerOptionsObject = {
41
+ allowReserved?: boolean;
42
+ array?: Partial<SerializerOptions<ArrayStyle>>;
43
+ object?: Partial<SerializerOptions<ObjectStyle>>;
44
+ };
45
+ type QuerySerializerOptions = QuerySerializerOptionsObject & {
46
+ /**
47
+ * Per-parameter serialization overrides. When provided, these settings
48
+ * override the global array/object settings for specific parameter names.
49
+ */
50
+ parameters?: Record<string, QuerySerializerOptionsObject>;
51
+ };
52
+
53
+ type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
54
+ type Client$1<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
55
+ /**
56
+ * Returns the final request URL.
57
+ */
58
+ buildUrl: BuildUrlFn;
59
+ getConfig: () => Config;
60
+ request: RequestFn;
61
+ setConfig: (config: Config) => Config;
62
+ } & {
63
+ [K in HttpMethod]: MethodFn;
64
+ } & ([SseFn] extends [never] ? {
65
+ sse?: never;
66
+ } : {
67
+ sse: {
68
+ [K in HttpMethod]: SseFn;
69
+ };
70
+ });
71
+ interface Config$1 {
72
+ /**
73
+ * Auth token or a function returning auth token. The resolved value will be
74
+ * added to the request payload as defined by its `security` array.
75
+ */
76
+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
77
+ /**
78
+ * A function for serializing request body parameter. By default,
79
+ * {@link JSON.stringify()} will be used.
80
+ */
81
+ bodySerializer?: BodySerializer | null;
82
+ /**
83
+ * An object containing any HTTP headers that you want to pre-populate your
84
+ * `Headers` object with.
85
+ *
86
+ * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
87
+ */
88
+ headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
89
+ /**
90
+ * The request method.
91
+ *
92
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
93
+ */
94
+ method?: Uppercase<HttpMethod>;
95
+ /**
96
+ * A function for serializing request query parameters. By default, arrays
97
+ * will be exploded in form style, objects will be exploded in deepObject
98
+ * style, and reserved characters are percent-encoded.
99
+ *
100
+ * This method will have no effect if the native `paramsSerializer()` Axios
101
+ * API function is used.
102
+ *
103
+ * {@link https://swagger.io/docs/specification/serialization/#query View examples}
104
+ */
105
+ querySerializer?: QuerySerializer | QuerySerializerOptions;
106
+ /**
107
+ * A function validating request data. This is useful if you want to ensure
108
+ * the request conforms to the desired shape, so it can be safely sent to
109
+ * the server.
110
+ */
111
+ requestValidator?: (data: unknown) => Promise<unknown>;
112
+ /**
113
+ * A function transforming response data before it's returned. This is useful
114
+ * for post-processing data, e.g., converting ISO strings into Date objects.
115
+ */
116
+ responseTransformer?: (data: unknown) => Promise<unknown>;
117
+ /**
118
+ * A function validating response data. This is useful if you want to ensure
119
+ * the response conforms to the desired shape, so it can be safely passed to
120
+ * the transformers and returned to the user.
121
+ */
122
+ responseValidator?: (data: unknown) => Promise<unknown>;
123
+ }
124
+ /**
125
+ * Arbitrary metadata passed through the `meta` request option.
126
+ */
127
+ interface ClientMeta {
128
+ }
129
+
130
+ type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
131
+ /**
132
+ * Fetch API implementation. You can use this option to provide a custom
133
+ * fetch instance.
134
+ *
135
+ * @default globalThis.fetch
136
+ */
137
+ fetch?: typeof fetch;
138
+ /**
139
+ * Implementing clients can call request interceptors inside this hook.
140
+ */
141
+ onRequest?: (url: string, init: RequestInit) => Promise<Request>;
142
+ /**
143
+ * Callback invoked when a network or parsing error occurs during streaming.
144
+ *
145
+ * This option applies only if the endpoint returns a stream of events.
146
+ *
147
+ * @param error The error that occurred.
148
+ */
149
+ onSseError?: (error: unknown) => void;
150
+ /**
151
+ * Callback invoked when an event is streamed from the server.
152
+ *
153
+ * This option applies only if the endpoint returns a stream of events.
154
+ *
155
+ * @param event Event streamed from the server.
156
+ * @returns Nothing (void).
157
+ */
158
+ onSseEvent?: (event: StreamEvent<TData>) => void;
159
+ serializedBody?: RequestInit['body'];
160
+ /**
161
+ * Default retry delay in milliseconds.
162
+ *
163
+ * This option applies only if the endpoint returns a stream of events.
164
+ *
165
+ * @default 3000
166
+ */
167
+ sseDefaultRetryDelay?: number;
168
+ /**
169
+ * Maximum number of retry attempts before giving up.
170
+ */
171
+ sseMaxRetryAttempts?: number;
172
+ /**
173
+ * Maximum retry delay in milliseconds.
174
+ *
175
+ * Applies only when exponential backoff is used.
176
+ *
177
+ * This option applies only if the endpoint returns a stream of events.
178
+ *
179
+ * @default 30000
180
+ */
181
+ sseMaxRetryDelay?: number;
182
+ /**
183
+ * Optional sleep function for retry backoff.
184
+ *
185
+ * Defaults to using `setTimeout`.
186
+ */
187
+ sseSleepFn?: (ms: number) => Promise<void>;
188
+ url: string;
189
+ };
190
+ interface StreamEvent<TData = unknown> {
191
+ data: TData;
192
+ event?: string;
193
+ id?: string;
194
+ retry?: number;
195
+ }
196
+ type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {
197
+ stream: AsyncGenerator<TData extends Record<string, unknown> ? TData[keyof TData] : TData, TReturn, TNext>;
198
+ };
199
+
200
+ type ErrInterceptor<Err, Res, Req, Options> = (error: Err,
201
+ /** response may be undefined due to a network error where no response object is produced */
202
+ response: Res | undefined,
203
+ /** request may be undefined, because error may be from building the request object itself */
204
+ request: Req | undefined, options: Options) => Err | Promise<Err>;
205
+ type ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
206
+ type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
207
+ declare class Interceptors<Interceptor> {
208
+ fns: Array<Interceptor | null>;
209
+ clear(): void;
210
+ eject(id: number | Interceptor): void;
211
+ exists(id: number | Interceptor): boolean;
212
+ getInterceptorIndex(id: number | Interceptor): number;
213
+ update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
214
+ use(fn: Interceptor): number;
215
+ }
216
+ interface Middleware<Req, Res, Err, Options> {
217
+ error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;
218
+ request: Interceptors<ReqInterceptor<Req, Options>>;
219
+ response: Interceptors<ResInterceptor<Res, Req, Options>>;
220
+ }
221
+
222
+ type ResponseStyle = 'data' | 'fields';
223
+ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$1 {
224
+ /**
225
+ * Base URL for all requests made by this client.
226
+ */
227
+ baseUrl?: T['baseUrl'];
228
+ /**
229
+ * Fetch API implementation. You can use this option to provide a custom
230
+ * fetch instance.
231
+ *
232
+ * @default globalThis.fetch
233
+ */
234
+ fetch?: typeof fetch;
235
+ /**
236
+ * Please don't use the Fetch client for Next.js applications. The `next`
237
+ * options won't have any effect.
238
+ *
239
+ * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.
240
+ */
241
+ next?: never;
242
+ /**
243
+ * Return the response data parsed in a specified format. By default, `auto`
244
+ * will infer the appropriate method from the `Content-Type` response header.
245
+ * You can override this behavior with any of the {@link Body} methods.
246
+ * Select `stream` if you don't want to parse response data at all.
247
+ *
248
+ * @default 'auto'
249
+ */
250
+ parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';
251
+ /**
252
+ * Should we return only data or multiple fields (data, error, response, etc.)?
253
+ *
254
+ * @default 'fields'
255
+ */
256
+ responseStyle?: ResponseStyle;
257
+ /**
258
+ * Throw an error instead of returning it in the response?
259
+ *
260
+ * @default false
261
+ */
262
+ throwOnError?: T['throwOnError'];
263
+ }
264
+ interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
265
+ responseStyle: TResponseStyle;
266
+ throwOnError: ThrowOnError;
267
+ }>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
268
+ /**
269
+ * Any body that you want to add to your request.
270
+ *
271
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
272
+ */
273
+ body?: unknown;
274
+ path?: Record<string, unknown>;
275
+ query?: Record<string, unknown>;
276
+ /**
277
+ * Security mechanism(s) to use for the request.
278
+ */
279
+ security?: ReadonlyArray<Auth>;
280
+ url: Url;
281
+ }
282
+ interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
283
+ headers: Headers;
284
+ serializedBody?: string;
285
+ }
286
+ 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 : {
287
+ data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
288
+ request: Request;
289
+ response: Response;
290
+ }> : Promise<TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({
291
+ data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
292
+ error: undefined;
293
+ } | {
294
+ data: undefined;
295
+ error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
296
+ }) & {
297
+ /** request may be undefined, because error may be from building the request object itself */
298
+ request?: Request;
299
+ /** response may be undefined, because error may be from building the request object itself or from a network error */
300
+ response?: Response;
301
+ }>;
302
+ interface ClientOptions$1 {
303
+ baseUrl?: string;
304
+ responseStyle?: ResponseStyle;
305
+ throwOnError?: boolean;
306
+ }
307
+ 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>;
308
+ type SseFn = <TData = unknown, _TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<never, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData>>;
309
+ 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>;
310
+ type BuildUrlFn = <TData extends {
311
+ body?: unknown;
312
+ path?: Record<string, unknown>;
313
+ query?: Record<string, unknown>;
314
+ url: string;
315
+ }>(options: TData & Options$1<TData>) => string;
316
+ type Client = Client$1<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
317
+ interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
318
+ };
319
+ interface TDataShape {
320
+ body?: unknown;
321
+ headers?: unknown;
322
+ path?: unknown;
323
+ query?: unknown;
324
+ url: string;
325
+ }
326
+ type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
327
+ 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'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
328
+
329
+ type CreateRampAgentClientOptions = Omit<Config, 'auth' | 'baseUrl'> & {
330
+ /** Base URL of the RAMP Agent server, e.g. `https://agent.example.com`. */
331
+ baseUrl: string;
332
+ /**
333
+ * Bearer token (or a function resolving one) sent as `Authorization: Bearer
334
+ * <token>` on requests to private endpoints.
335
+ */
336
+ getAuthToken?: () => string | Promise<string>;
337
+ };
338
+
339
+ declare const createRampAgentClient: ({ baseUrl, getAuthToken, ...config }: CreateRampAgentClientOptions) => Client;
340
+
341
+ type ClientOptions = {
342
+ baseUrl: `${string}://${string}` | (string & {});
343
+ };
344
+ type GetCountryConfigsData = {
345
+ body?: never;
346
+ path?: never;
347
+ query?: never;
348
+ url: '/country-configs';
349
+ };
350
+ type GetCountryConfigsErrors = {
351
+ /**
352
+ * Unauthorized — requires Bearer token
353
+ */
354
+ 401: unknown;
355
+ /**
356
+ * Internal server error
357
+ */
358
+ 500: unknown;
359
+ };
360
+ type GetCountryConfigsResponses = {
361
+ /**
362
+ * Success
363
+ */
364
+ 200: unknown;
365
+ };
366
+ type GetRecentlyActiveNumbersData = {
367
+ body?: never;
368
+ path?: never;
369
+ query?: never;
370
+ url: '/recently-active-numbers';
371
+ };
372
+ type GetRecentlyActiveNumbersErrors = {
373
+ /**
374
+ * Unauthorized — requires Bearer token
375
+ */
376
+ 401: unknown;
377
+ /**
378
+ * Internal server error
379
+ */
380
+ 500: unknown;
381
+ };
382
+ type GetRecentlyActiveNumbersResponses = {
383
+ /**
384
+ * Success
385
+ */
386
+ 200: unknown;
387
+ };
388
+ type GetStatsData = {
389
+ body?: never;
390
+ path?: never;
391
+ query?: never;
392
+ url: '/stats';
393
+ };
394
+ type GetStatsErrors = {
395
+ /**
396
+ * Unauthorized — requires Bearer token
397
+ */
398
+ 401: unknown;
399
+ /**
400
+ * Internal server error
401
+ */
402
+ 500: unknown;
403
+ };
404
+ type GetStatsResponses = {
405
+ /**
406
+ * Success
407
+ */
408
+ 200: unknown;
409
+ };
410
+ type GetPhoneLogsByPhoneNumberData = {
411
+ body?: never;
412
+ path: {
413
+ phoneNumber: string;
414
+ };
415
+ query?: never;
416
+ url: '/phone-logs/{phoneNumber}';
417
+ };
418
+ type GetPhoneLogsByPhoneNumberErrors = {
419
+ /**
420
+ * Unauthorized — requires Bearer token
421
+ */
422
+ 401: unknown;
423
+ /**
424
+ * Internal server error
425
+ */
426
+ 500: unknown;
427
+ };
428
+ type GetPhoneLogsByPhoneNumberResponses = {
429
+ /**
430
+ * Success
431
+ */
432
+ 200: unknown;
433
+ };
434
+ type PostOutboundCallData = {
435
+ body: {
436
+ /**
437
+ * The phone number to call (recipient). Required.
438
+ */
439
+ to: string;
440
+ /**
441
+ * The Twilio phone number to call from. Required.
442
+ */
443
+ from: string;
444
+ };
445
+ path?: never;
446
+ query?: never;
447
+ url: '/outbound-call';
448
+ };
449
+ type PostOutboundCallErrors = {
450
+ /**
451
+ * Unauthorized — requires Bearer token
452
+ */
453
+ 401: unknown;
454
+ /**
455
+ * Internal server error
456
+ */
457
+ 500: unknown;
458
+ };
459
+ type PostOutboundCallResponses = {
460
+ /**
461
+ * Success
462
+ */
463
+ 200: unknown;
464
+ };
465
+ type GetOutboundCallByCallSidData = {
466
+ body?: never;
467
+ path: {
468
+ callSid: string;
469
+ };
470
+ query?: never;
471
+ url: '/outbound-call/{callSid}';
472
+ };
473
+ type GetOutboundCallByCallSidErrors = {
474
+ /**
475
+ * Unauthorized — requires Bearer token
476
+ */
477
+ 401: unknown;
478
+ /**
479
+ * Internal server error
480
+ */
481
+ 500: unknown;
482
+ };
483
+ type GetOutboundCallByCallSidResponses = {
484
+ /**
485
+ * Success
486
+ */
487
+ 200: unknown;
488
+ };
489
+ type PostOutboundCommunicationTextData = {
490
+ body: {
491
+ [key: string]: unknown;
492
+ };
493
+ path?: never;
494
+ query?: never;
495
+ url: '/outbound-communication-text';
496
+ };
497
+ type PostOutboundCommunicationTextErrors = {
498
+ /**
499
+ * Unauthorized — requires Bearer token
500
+ */
501
+ 401: unknown;
502
+ /**
503
+ * Internal server error
504
+ */
505
+ 500: unknown;
506
+ };
507
+ type PostOutboundCommunicationTextResponses = {
508
+ /**
509
+ * Success
510
+ */
511
+ 200: unknown;
512
+ };
513
+ type PostExportLogsData = {
514
+ body?: never;
515
+ path?: never;
516
+ query?: never;
517
+ url: '/export-logs';
518
+ };
519
+ type PostExportLogsErrors = {
520
+ /**
521
+ * Unauthorized — requires Bearer token
522
+ */
523
+ 401: unknown;
524
+ /**
525
+ * Internal server error
526
+ */
527
+ 500: unknown;
528
+ };
529
+ type PostExportLogsResponses = {
530
+ /**
531
+ * Success
532
+ */
533
+ 200: unknown;
534
+ };
535
+ type DeleteLiveNumbersData = {
536
+ body?: never;
537
+ path?: never;
538
+ query?: never;
539
+ url: '/live-numbers';
540
+ };
541
+ type DeleteLiveNumbersErrors = {
542
+ /**
543
+ * Unauthorized — requires Bearer token
544
+ */
545
+ 401: unknown;
546
+ /**
547
+ * Internal server error
548
+ */
549
+ 500: unknown;
550
+ };
551
+ type DeleteLiveNumbersResponses = {
552
+ /**
553
+ * Success
554
+ */
555
+ 200: unknown;
556
+ };
557
+ type GetLiveNumbersData = {
558
+ body?: never;
559
+ path?: never;
560
+ query?: never;
561
+ url: '/live-numbers';
562
+ };
563
+ type GetLiveNumbersErrors = {
564
+ /**
565
+ * Unauthorized — requires Bearer token
566
+ */
567
+ 401: unknown;
568
+ /**
569
+ * Internal server error
570
+ */
571
+ 500: unknown;
572
+ };
573
+ type GetLiveNumbersResponses = {
574
+ /**
575
+ * Success
576
+ */
577
+ 200: unknown;
578
+ };
579
+ type DeleteLiveNumbersByPhoneNumberData = {
580
+ body?: never;
581
+ path: {
582
+ phoneNumber: string;
583
+ };
584
+ query?: never;
585
+ url: '/live-numbers/{phoneNumber}';
586
+ };
587
+ type DeleteLiveNumbersByPhoneNumberErrors = {
588
+ /**
589
+ * Internal server error
590
+ */
591
+ 500: unknown;
592
+ };
593
+ type DeleteLiveNumbersByPhoneNumberResponses = {
594
+ /**
595
+ * Success
596
+ */
597
+ 200: unknown;
598
+ };
599
+ type DeleteKillConversationByPhoneNumberData = {
600
+ body?: never;
601
+ path: {
602
+ phoneNumber: string;
603
+ };
604
+ query?: never;
605
+ url: '/kill-conversation/{phoneNumber}';
606
+ };
607
+ type DeleteKillConversationByPhoneNumberErrors = {
608
+ /**
609
+ * Unauthorized — requires Bearer token
610
+ */
611
+ 401: unknown;
612
+ /**
613
+ * Internal server error
614
+ */
615
+ 500: unknown;
616
+ };
617
+ type DeleteKillConversationByPhoneNumberResponses = {
618
+ /**
619
+ * Success
620
+ */
621
+ 200: unknown;
622
+ };
623
+ type PostSendEmailData = {
624
+ body: {
625
+ /**
626
+ * Recipient email address. Required.
627
+ */
628
+ to: string;
629
+ /**
630
+ * Email subject. Required.
631
+ */
632
+ subject: string;
633
+ /**
634
+ * Plain text body. Required.
635
+ */
636
+ text: string;
637
+ };
638
+ path?: never;
639
+ query?: never;
640
+ url: '/send-email';
641
+ };
642
+ type PostSendEmailErrors = {
643
+ /**
644
+ * Unauthorized — requires Bearer token
645
+ */
646
+ 401: unknown;
647
+ /**
648
+ * Internal server error
649
+ */
650
+ 500: unknown;
651
+ };
652
+ type PostSendEmailResponses = {
653
+ /**
654
+ * Success
655
+ */
656
+ 200: unknown;
657
+ };
658
+ type PostAddMessageData = {
659
+ body: {
660
+ /**
661
+ * The customer's phone number (PrefixedAddress). Required.
662
+ */
663
+ to: string;
664
+ /**
665
+ * The message content to inject. Required.
666
+ */
667
+ content: string;
668
+ };
669
+ path?: never;
670
+ query?: never;
671
+ url: '/add-message';
672
+ };
673
+ type PostAddMessageErrors = {
674
+ /**
675
+ * Unauthorized — requires Bearer token
676
+ */
677
+ 401: unknown;
678
+ /**
679
+ * Internal server error
680
+ */
681
+ 500: unknown;
682
+ };
683
+ type PostAddMessageResponses = {
684
+ /**
685
+ * Success
686
+ */
687
+ 200: unknown;
688
+ };
689
+ type PostActiveConversationsAgentClaimData = {
690
+ body: {
691
+ [key: string]: unknown;
692
+ };
693
+ path?: never;
694
+ query?: never;
695
+ url: '/active-conversations/agent/claim';
696
+ };
697
+ type PostActiveConversationsAgentClaimErrors = {
698
+ /**
699
+ * Unauthorized — requires Bearer token
700
+ */
701
+ 401: unknown;
702
+ /**
703
+ * Internal server error
704
+ */
705
+ 500: unknown;
706
+ };
707
+ type PostActiveConversationsAgentClaimResponses = {
708
+ /**
709
+ * Success
710
+ */
711
+ 200: unknown;
712
+ };
713
+ type GetActiveConversationsAgentByAgentNumberData = {
714
+ body?: never;
715
+ path: {
716
+ agentNumber: string;
717
+ };
718
+ query?: never;
719
+ url: '/active-conversations/agent/{agentNumber}';
720
+ };
721
+ type GetActiveConversationsAgentByAgentNumberErrors = {
722
+ /**
723
+ * Unauthorized — requires Bearer token
724
+ */
725
+ 401: unknown;
726
+ /**
727
+ * Internal server error
728
+ */
729
+ 500: unknown;
730
+ };
731
+ type GetActiveConversationsAgentByAgentNumberResponses = {
732
+ /**
733
+ * Success
734
+ */
735
+ 200: unknown;
736
+ };
737
+ type GetActiveConversationsByCustomerNumberData = {
738
+ body?: never;
739
+ path: {
740
+ customerNumber: string;
741
+ };
742
+ query?: never;
743
+ url: '/active-conversations/{customerNumber}';
744
+ };
745
+ type GetActiveConversationsByCustomerNumberErrors = {
746
+ /**
747
+ * Unauthorized — requires Bearer token
748
+ */
749
+ 401: unknown;
750
+ /**
751
+ * Internal server error
752
+ */
753
+ 500: unknown;
754
+ };
755
+ type GetActiveConversationsByCustomerNumberResponses = {
756
+ /**
757
+ * Success
758
+ */
759
+ 200: unknown;
760
+ };
761
+ type GetHealthData = {
762
+ body?: never;
763
+ path?: never;
764
+ query?: never;
765
+ url: '/health';
766
+ };
767
+ type GetHealthErrors = {
768
+ /**
769
+ * Internal server error
770
+ */
771
+ 500: unknown;
772
+ };
773
+ type GetHealthResponses = {
774
+ /**
775
+ * Success
776
+ */
777
+ 200: unknown;
778
+ };
779
+ type PostCallData = {
780
+ body: {
781
+ [key: string]: unknown;
782
+ };
783
+ path?: never;
784
+ query?: never;
785
+ url: '/call';
786
+ };
787
+ type PostCallErrors = {
788
+ /**
789
+ * Internal server error
790
+ */
791
+ 500: unknown;
792
+ };
793
+ type PostCallResponses = {
794
+ /**
795
+ * Success
796
+ */
797
+ 200: unknown;
798
+ };
799
+ type PostLiveAgentData = {
800
+ body: {
801
+ /**
802
+ * Caller phone number
803
+ */
804
+ From: string;
805
+ /**
806
+ * Called phone number (Twilio number)
807
+ */
808
+ To: string;
809
+ /**
810
+ * Call direction ('inbound' or 'outbound-api')
811
+ */
812
+ Direction: string;
813
+ };
814
+ path?: never;
815
+ query?: never;
816
+ url: '/live-agent';
817
+ };
818
+ type PostLiveAgentErrors = {
819
+ /**
820
+ * Internal server error
821
+ */
822
+ 500: unknown;
823
+ };
824
+ type PostLiveAgentResponses = {
825
+ /**
826
+ * Success
827
+ */
828
+ 200: unknown;
829
+ };
830
+ type PostRedirectToLiveAgentData = {
831
+ body: {
832
+ [key: string]: unknown;
833
+ };
834
+ path?: never;
835
+ query?: never;
836
+ url: '/redirect-to-live-agent';
837
+ };
838
+ type PostRedirectToLiveAgentErrors = {
839
+ /**
840
+ * Internal server error
841
+ */
842
+ 500: unknown;
843
+ };
844
+ type PostRedirectToLiveAgentResponses = {
845
+ /**
846
+ * Success
847
+ */
848
+ 200: unknown;
849
+ };
850
+ type GetStressTestData = {
851
+ body?: never;
852
+ path?: never;
853
+ query?: {
854
+ From?: string;
855
+ To?: string;
856
+ CallSid?: string;
857
+ SpeechResult?: string;
858
+ Confidence?: string;
859
+ CallStatus?: string;
860
+ };
861
+ url: '/stress-test';
862
+ };
863
+ type GetStressTestErrors = {
864
+ /**
865
+ * Internal server error
866
+ */
867
+ 500: unknown;
868
+ };
869
+ type GetStressTestResponses = {
870
+ /**
871
+ * Success
872
+ */
873
+ 200: unknown;
874
+ };
875
+ type PostStressTestSmsData = {
876
+ body: {
877
+ [key: string]: unknown;
878
+ };
879
+ path?: never;
880
+ query?: {
881
+ From?: string;
882
+ To?: string;
883
+ CallSid?: string;
884
+ SpeechResult?: string;
885
+ Confidence?: string;
886
+ CallStatus?: string;
887
+ };
888
+ url: '/stress-test-sms';
889
+ };
890
+ type PostStressTestSmsErrors = {
891
+ /**
892
+ * Internal server error
893
+ */
894
+ 500: unknown;
895
+ };
896
+ type PostStressTestSmsResponses = {
897
+ /**
898
+ * Success
899
+ */
900
+ 200: unknown;
901
+ };
902
+ type PostWebchatSendData = {
903
+ body: {
904
+ [key: string]: unknown;
905
+ };
906
+ path?: never;
907
+ query?: never;
908
+ url: '/webchat-send';
909
+ };
910
+ type PostWebchatSendErrors = {
911
+ /**
912
+ * Internal server error
913
+ */
914
+ 500: unknown;
915
+ };
916
+ type PostWebchatSendResponses = {
917
+ /**
918
+ * Success
919
+ */
920
+ 200: unknown;
921
+ };
922
+ type PostCintelOperatorsData = {
923
+ body: {
924
+ [key: string]: unknown;
925
+ };
926
+ path?: never;
927
+ query?: never;
928
+ url: '/cintel-operators';
929
+ };
930
+ type PostCintelOperatorsErrors = {
931
+ /**
932
+ * Internal server error
933
+ */
934
+ 500: unknown;
935
+ };
936
+ type PostCintelOperatorsResponses = {
937
+ /**
938
+ * Success
939
+ */
940
+ 200: unknown;
941
+ };
942
+ type PostFlexTranscriptionData = {
943
+ body: {
944
+ [key: string]: unknown;
945
+ };
946
+ path?: never;
947
+ query?: never;
948
+ url: '/flex-transcription';
949
+ };
950
+ type PostFlexTranscriptionErrors = {
951
+ /**
952
+ * Internal server error
953
+ */
954
+ 500: unknown;
955
+ };
956
+ type PostFlexTranscriptionResponses = {
957
+ /**
958
+ * Success
959
+ */
960
+ 200: unknown;
961
+ };
962
+ type PostTaskrouterWebhookData = {
963
+ body: {
964
+ [key: string]: unknown;
965
+ };
966
+ path?: never;
967
+ query?: never;
968
+ url: '/taskrouter-webhook';
969
+ };
970
+ type PostTaskrouterWebhookErrors = {
971
+ /**
972
+ * Internal server error
973
+ */
974
+ 500: unknown;
975
+ };
976
+ type PostTaskrouterWebhookResponses = {
977
+ /**
978
+ * Success
979
+ */
980
+ 200: unknown;
981
+ };
982
+ type PostResolvePhoneData = {
983
+ body: {
984
+ [key: string]: unknown;
985
+ };
986
+ path?: never;
987
+ query?: never;
988
+ url: '/resolve-phone';
989
+ };
990
+ type PostResolvePhoneErrors = {
991
+ /**
992
+ * Internal server error
993
+ */
994
+ 500: unknown;
995
+ };
996
+ type PostResolvePhoneResponses = {
997
+ /**
998
+ * Success
999
+ */
1000
+ 200: unknown;
1001
+ };
1002
+ type PostCommunicationTextData = {
1003
+ body: {
1004
+ [key: string]: unknown;
1005
+ };
1006
+ path?: never;
1007
+ query?: never;
1008
+ url: '/communication-text';
1009
+ };
1010
+ type PostCommunicationTextErrors = {
1011
+ /**
1012
+ * Internal server error
1013
+ */
1014
+ 500: unknown;
1015
+ };
1016
+ type PostCommunicationTextResponses = {
1017
+ /**
1018
+ * Success
1019
+ */
1020
+ 200: unknown;
1021
+ };
1022
+ type GetDocsOpenapiJsonData = {
1023
+ body?: never;
1024
+ path?: never;
1025
+ query?: never;
1026
+ url: '/docs/openapi.json';
1027
+ };
1028
+ type GetDocsOpenapiJsonErrors = {
1029
+ /**
1030
+ * Unauthorized — requires Bearer token
1031
+ */
1032
+ 401: unknown;
1033
+ /**
1034
+ * Internal server error
1035
+ */
1036
+ 500: unknown;
1037
+ };
1038
+ type GetDocsOpenapiJsonResponses = {
1039
+ /**
1040
+ * Success
1041
+ */
1042
+ 200: unknown;
1043
+ };
1044
+
1045
+ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options$1<TData, ThrowOnError, TResponse> & {
1046
+ /**
1047
+ * You can provide a client instance returned by `createClient()` instead of
1048
+ * individual options. This might be also useful if you want to implement a
1049
+ * custom client.
1050
+ */
1051
+ client?: Client;
1052
+ /**
1053
+ * You can pass arbitrary values through the `meta` object. This can be
1054
+ * used to access values that aren't defined as part of the SDK function.
1055
+ */
1056
+ meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
1057
+ };
1058
+ /**
1059
+ * GET /country-configs
1060
+ *
1061
+ * Returns the list of available country configurations with their phone numbers
1062
+ */
1063
+ declare const getCountryConfigs: <ThrowOnError extends boolean = false>(options?: Options<GetCountryConfigsData, ThrowOnError>) => RequestResult<GetCountryConfigsResponses, GetCountryConfigsErrors, ThrowOnError>;
1064
+ /**
1065
+ * GET /recently-active-numbers
1066
+ *
1067
+ * Retrieves a list of all phone numbers with recent activity, including both
1068
+ * active conversations and recently completed ones
1069
+ */
1070
+ declare const getRecentlyActiveNumbers: <ThrowOnError extends boolean = false>(options?: Options<GetRecentlyActiveNumbersData, ThrowOnError>) => RequestResult<GetRecentlyActiveNumbersResponses, GetRecentlyActiveNumbersErrors, ThrowOnError>;
1071
+ /**
1072
+ * GET /stats
1073
+ *
1074
+ * Retrieves server statistics including the number of active calls and deployment timestamp
1075
+ */
1076
+ declare const getStats: <ThrowOnError extends boolean = false>(options?: Options<GetStatsData, ThrowOnError>) => RequestResult<GetStatsResponses, GetStatsErrors, ThrowOnError>;
1077
+ /**
1078
+ * GET /phone-logs/:phoneNumber
1079
+ *
1080
+ * Retrieves complete call logs and conversation history for a specific phone number
1081
+ */
1082
+ declare const getPhoneLogsByPhoneNumber: <ThrowOnError extends boolean = false>(options: Options<GetPhoneLogsByPhoneNumberData, ThrowOnError>) => RequestResult<GetPhoneLogsByPhoneNumberResponses, GetPhoneLogsByPhoneNumberErrors, ThrowOnError>;
1083
+ /**
1084
+ * POST /outbound-call
1085
+ *
1086
+ * Initiates an outbound phone call using Twilio
1087
+ */
1088
+ declare const postOutboundCall: <ThrowOnError extends boolean = false>(options: Options<PostOutboundCallData, ThrowOnError>) => RequestResult<PostOutboundCallResponses, PostOutboundCallErrors, ThrowOnError>;
1089
+ /**
1090
+ * GET /outbound-call/:callSid
1091
+ *
1092
+ * Retrieves the current status and details of a Twilio call by its SID
1093
+ */
1094
+ declare const getOutboundCallByCallSid: <ThrowOnError extends boolean = false>(options: Options<GetOutboundCallByCallSidData, ThrowOnError>) => RequestResult<GetOutboundCallByCallSidResponses, GetOutboundCallByCallSidErrors, ThrowOnError>;
1095
+ /**
1096
+ * POST /outbound-communication-text
1097
+ *
1098
+ * Initiates an outbound text message (SMS, RCS, or WhatsApp) to a customer
1099
+ */
1100
+ declare const postOutboundCommunicationText: <ThrowOnError extends boolean = false>(options: Options<PostOutboundCommunicationTextData, ThrowOnError>) => RequestResult<PostOutboundCommunicationTextResponses, PostOutboundCommunicationTextErrors, ThrowOnError>;
1101
+ /**
1102
+ * POST /export-logs
1103
+ */
1104
+ declare const postExportLogs: <ThrowOnError extends boolean = false>(options?: Options<PostExportLogsData, ThrowOnError>) => RequestResult<PostExportLogsResponses, PostExportLogsErrors, ThrowOnError>;
1105
+ /**
1106
+ * DELETE /live-numbers
1107
+ *
1108
+ * Terminates all active conversations, closes websocket connections, and ends all active calls
1109
+ */
1110
+ declare const deleteLiveNumbers: <ThrowOnError extends boolean = false>(options?: Options<DeleteLiveNumbersData, ThrowOnError>) => RequestResult<DeleteLiveNumbersResponses, DeleteLiveNumbersErrors, ThrowOnError>;
1111
+ /**
1112
+ * GET /live-numbers
1113
+ *
1114
+ * Retrieves a list of all currently active conversations with their phone numbers and metadata
1115
+ */
1116
+ declare const getLiveNumbers: <ThrowOnError extends boolean = false>(options?: Options<GetLiveNumbersData, ThrowOnError>) => RequestResult<GetLiveNumbersResponses, GetLiveNumbersErrors, ThrowOnError>;
1117
+ /**
1118
+ * DELETE /live-numbers/:phoneNumber
1119
+ *
1120
+ * Ends an active conversation for a specific phone number by terminating the call,
1121
+ * closing the conversation, and removing it from active conversations
1122
+ */
1123
+ declare const deleteLiveNumbersByPhoneNumber: <ThrowOnError extends boolean = false>(options: Options<DeleteLiveNumbersByPhoneNumberData, ThrowOnError>) => RequestResult<DeleteLiveNumbersByPhoneNumberResponses, DeleteLiveNumbersByPhoneNumberErrors, ThrowOnError>;
1124
+ /**
1125
+ * DELETE /kill-conversation/:phoneNumber
1126
+ *
1127
+ * Removes ALL Twilio conversations associated with a phone number,
1128
+ * clears in-memory state, and terminates any active calls
1129
+ */
1130
+ declare const deleteKillConversationByPhoneNumber: <ThrowOnError extends boolean = false>(options: Options<DeleteKillConversationByPhoneNumberData, ThrowOnError>) => RequestResult<DeleteKillConversationByPhoneNumberResponses, DeleteKillConversationByPhoneNumberErrors, ThrowOnError>;
1131
+ /**
1132
+ * POST /send-email
1133
+ *
1134
+ * Sends an email via SendGrid using the environment-configured credentials
1135
+ */
1136
+ declare const postSendEmail: <ThrowOnError extends boolean = false>(options: Options<PostSendEmailData, ThrowOnError>) => RequestResult<PostSendEmailResponses, PostSendEmailErrors, ThrowOnError>;
1137
+ /**
1138
+ * POST /add-message
1139
+ *
1140
+ * Injects a message directly into an active LLM session and optionally resumes
1141
+ * the conversation
1142
+ */
1143
+ declare const postAddMessage: <ThrowOnError extends boolean = false>(options: Options<PostAddMessageData, ThrowOnError>) => RequestResult<PostAddMessageResponses, PostAddMessageErrors, ThrowOnError>;
1144
+ /**
1145
+ * POST /active-conversations/agent/claim
1146
+ */
1147
+ declare const postActiveConversationsAgentClaim: <ThrowOnError extends boolean = false>(options: Options<PostActiveConversationsAgentClaimData, ThrowOnError>) => RequestResult<PostActiveConversationsAgentClaimResponses, PostActiveConversationsAgentClaimErrors, ThrowOnError>;
1148
+ /**
1149
+ * GET /active-conversations/agent/:agentNumber
1150
+ */
1151
+ declare const getActiveConversationsAgentByAgentNumber: <ThrowOnError extends boolean = false>(options: Options<GetActiveConversationsAgentByAgentNumberData, ThrowOnError>) => RequestResult<GetActiveConversationsAgentByAgentNumberResponses, GetActiveConversationsAgentByAgentNumberErrors, ThrowOnError>;
1152
+ /**
1153
+ * GET /active-conversations/:customerNumber
1154
+ *
1155
+ * Retrieves an active conversation by customer phone number
1156
+ */
1157
+ declare const getActiveConversationsByCustomerNumber: <ThrowOnError extends boolean = false>(options: Options<GetActiveConversationsByCustomerNumberData, ThrowOnError>) => RequestResult<GetActiveConversationsByCustomerNumberResponses, GetActiveConversationsByCustomerNumberErrors, ThrowOnError>;
1158
+ /**
1159
+ * GET /health
1160
+ *
1161
+ * Health check endpoint for the agent service
1162
+ */
1163
+ declare const getHealth: <ThrowOnError extends boolean = false>(options?: Options<GetHealthData, ThrowOnError>) => RequestResult<GetHealthResponses, GetHealthErrors, ThrowOnError>;
1164
+ /**
1165
+ * POST /call
1166
+ *
1167
+ * Twilio webhook endpoint that generates TwiML for incoming/outgoing voice calls
1168
+ */
1169
+ declare const postCall: <ThrowOnError extends boolean = false>(options: Options<PostCallData, ThrowOnError>) => RequestResult<PostCallResponses, PostCallErrors, ThrowOnError>;
1170
+ /**
1171
+ * POST /live-agent
1172
+ *
1173
+ * Twilio webhook endpoint that generates TwiML for handoff to live agent (Flex or external Flex)
1174
+ */
1175
+ declare const postLiveAgent: <ThrowOnError extends boolean = false>(options: Options<PostLiveAgentData, ThrowOnError>) => RequestResult<PostLiveAgentResponses, PostLiveAgentErrors, ThrowOnError>;
1176
+ /**
1177
+ * POST /redirect-to-live-agent
1178
+ *
1179
+ * Redirects an active call to the live agent endpoint while gracefully ending the Conversation Relay session
1180
+ */
1181
+ declare const postRedirectToLiveAgent: <ThrowOnError extends boolean = false>(options: Options<PostRedirectToLiveAgentData, ThrowOnError>) => RequestResult<PostRedirectToLiveAgentResponses, PostRedirectToLiveAgentErrors, ThrowOnError>;
1182
+ /**
1183
+ * GET /stress-test
1184
+ *
1185
+ * Twilio webhook endpoint for stress testing voice calls
1186
+ */
1187
+ declare const getStressTest: <ThrowOnError extends boolean = false>(options?: Options<GetStressTestData, ThrowOnError>) => RequestResult<GetStressTestResponses, GetStressTestErrors, ThrowOnError>;
1188
+ /**
1189
+ * POST /stress-test-sms
1190
+ *
1191
+ * Twilio webhook endpoint for stress testing voice calls
1192
+ */
1193
+ declare const postStressTestSms: <ThrowOnError extends boolean = false>(options: Options<PostStressTestSmsData, ThrowOnError>) => RequestResult<PostStressTestSmsResponses, PostStressTestSmsErrors, ThrowOnError>;
1194
+ /**
1195
+ * POST /webchat-send
1196
+ *
1197
+ * Handles an inbound webchat message and returns the agent's reply
1198
+ */
1199
+ declare const postWebchatSend: <ThrowOnError extends boolean = false>(options: Options<PostWebchatSendData, ThrowOnError>) => RequestResult<PostWebchatSendResponses, PostWebchatSendErrors, ThrowOnError>;
1200
+ /**
1201
+ * POST /cintel-operators
1202
+ *
1203
+ * Handles incoming CINTEL operator webhook responses from Twilio
1204
+ */
1205
+ declare const postCintelOperators: <ThrowOnError extends boolean = false>(options: Options<PostCintelOperatorsData, ThrowOnError>) => RequestResult<PostCintelOperatorsResponses, PostCintelOperatorsErrors, ThrowOnError>;
1206
+ /**
1207
+ * POST /flex-transcription
1208
+ */
1209
+ declare const postFlexTranscription: <ThrowOnError extends boolean = false>(options: Options<PostFlexTranscriptionData, ThrowOnError>) => RequestResult<PostFlexTranscriptionResponses, PostFlexTranscriptionErrors, ThrowOnError>;
1210
+ /**
1211
+ * POST /taskrouter-webhook
1212
+ */
1213
+ declare const postTaskrouterWebhook: <ThrowOnError extends boolean = false>(options: Options<PostTaskrouterWebhookData, ThrowOnError>) => RequestResult<PostTaskrouterWebhookResponses, PostTaskrouterWebhookErrors, ThrowOnError>;
1214
+ /**
1215
+ * POST /resolve-phone
1216
+ *
1217
+ * Resolves a phone number from the Segment Profiles API given an email
1218
+ */
1219
+ declare const postResolvePhone: <ThrowOnError extends boolean = false>(options: Options<PostResolvePhoneData, ThrowOnError>) => RequestResult<PostResolvePhoneResponses, PostResolvePhoneErrors, ThrowOnError>;
1220
+ /**
1221
+ * POST /communication-text
1222
+ *
1223
+ * Handles inbound text messages (SMS, RCS, WhatsApp) from Twilio
1224
+ */
1225
+ declare const postCommunicationText: <ThrowOnError extends boolean = false>(options: Options<PostCommunicationTextData, ThrowOnError>) => RequestResult<PostCommunicationTextResponses, PostCommunicationTextErrors, ThrowOnError>;
1226
+ /**
1227
+ * GET /docs/openapi.json
1228
+ *
1229
+ * docsSpecGet
1230
+ * Serves the generated OpenAPI JSON spec
1231
+ */
1232
+ declare const getDocsOpenapiJson: <ThrowOnError extends boolean = false>(options?: Options<GetDocsOpenapiJsonData, ThrowOnError>) => RequestResult<GetDocsOpenapiJsonResponses, GetDocsOpenapiJsonErrors, ThrowOnError>;
1233
+
1234
+ declare const zGetPhoneLogsByPhoneNumberPath: z.ZodObject<{
1235
+ phoneNumber: z.ZodString;
1236
+ }, "strip", z.ZodTypeAny, {
1237
+ phoneNumber: string;
1238
+ }, {
1239
+ phoneNumber: string;
1240
+ }>;
1241
+ declare const zPostOutboundCallBody: z.ZodObject<{
1242
+ to: z.ZodString;
1243
+ from: z.ZodString;
1244
+ }, "strip", z.ZodTypeAny, {
1245
+ to: string;
1246
+ from: string;
1247
+ }, {
1248
+ to: string;
1249
+ from: string;
1250
+ }>;
1251
+ declare const zGetOutboundCallByCallSidPath: z.ZodObject<{
1252
+ callSid: z.ZodString;
1253
+ }, "strip", z.ZodTypeAny, {
1254
+ callSid: string;
1255
+ }, {
1256
+ callSid: string;
1257
+ }>;
1258
+ declare const zPostOutboundCommunicationTextBody: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1259
+ declare const zDeleteLiveNumbersByPhoneNumberPath: z.ZodObject<{
1260
+ phoneNumber: z.ZodString;
1261
+ }, "strip", z.ZodTypeAny, {
1262
+ phoneNumber: string;
1263
+ }, {
1264
+ phoneNumber: string;
1265
+ }>;
1266
+ declare const zDeleteKillConversationByPhoneNumberPath: z.ZodObject<{
1267
+ phoneNumber: z.ZodString;
1268
+ }, "strip", z.ZodTypeAny, {
1269
+ phoneNumber: string;
1270
+ }, {
1271
+ phoneNumber: string;
1272
+ }>;
1273
+ declare const zPostSendEmailBody: z.ZodObject<{
1274
+ to: z.ZodString;
1275
+ subject: z.ZodString;
1276
+ text: z.ZodString;
1277
+ }, "strip", z.ZodTypeAny, {
1278
+ to: string;
1279
+ subject: string;
1280
+ text: string;
1281
+ }, {
1282
+ to: string;
1283
+ subject: string;
1284
+ text: string;
1285
+ }>;
1286
+ declare const zPostAddMessageBody: z.ZodObject<{
1287
+ to: z.ZodString;
1288
+ content: z.ZodString;
1289
+ }, "strip", z.ZodTypeAny, {
1290
+ to: string;
1291
+ content: string;
1292
+ }, {
1293
+ to: string;
1294
+ content: string;
1295
+ }>;
1296
+ declare const zPostActiveConversationsAgentClaimBody: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1297
+ declare const zGetActiveConversationsAgentByAgentNumberPath: z.ZodObject<{
1298
+ agentNumber: z.ZodString;
1299
+ }, "strip", z.ZodTypeAny, {
1300
+ agentNumber: string;
1301
+ }, {
1302
+ agentNumber: string;
1303
+ }>;
1304
+ declare const zGetActiveConversationsByCustomerNumberPath: z.ZodObject<{
1305
+ customerNumber: z.ZodString;
1306
+ }, "strip", z.ZodTypeAny, {
1307
+ customerNumber: string;
1308
+ }, {
1309
+ customerNumber: string;
1310
+ }>;
1311
+ declare const zPostCallBody: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1312
+ declare const zPostLiveAgentBody: z.ZodObject<{
1313
+ From: z.ZodString;
1314
+ To: z.ZodString;
1315
+ Direction: z.ZodString;
1316
+ }, "strip", z.ZodTypeAny, {
1317
+ From: string;
1318
+ To: string;
1319
+ Direction: string;
1320
+ }, {
1321
+ From: string;
1322
+ To: string;
1323
+ Direction: string;
1324
+ }>;
1325
+ declare const zPostRedirectToLiveAgentBody: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1326
+ declare const zGetStressTestQuery: z.ZodObject<{
1327
+ From: z.ZodOptional<z.ZodString>;
1328
+ To: z.ZodOptional<z.ZodString>;
1329
+ CallSid: z.ZodOptional<z.ZodString>;
1330
+ SpeechResult: z.ZodOptional<z.ZodString>;
1331
+ Confidence: z.ZodOptional<z.ZodString>;
1332
+ CallStatus: z.ZodOptional<z.ZodString>;
1333
+ }, "strip", z.ZodTypeAny, {
1334
+ From?: string | undefined;
1335
+ To?: string | undefined;
1336
+ CallSid?: string | undefined;
1337
+ SpeechResult?: string | undefined;
1338
+ Confidence?: string | undefined;
1339
+ CallStatus?: string | undefined;
1340
+ }, {
1341
+ From?: string | undefined;
1342
+ To?: string | undefined;
1343
+ CallSid?: string | undefined;
1344
+ SpeechResult?: string | undefined;
1345
+ Confidence?: string | undefined;
1346
+ CallStatus?: string | undefined;
1347
+ }>;
1348
+ declare const zPostStressTestSmsBody: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1349
+ declare const zPostStressTestSmsQuery: z.ZodObject<{
1350
+ From: z.ZodOptional<z.ZodString>;
1351
+ To: z.ZodOptional<z.ZodString>;
1352
+ CallSid: z.ZodOptional<z.ZodString>;
1353
+ SpeechResult: z.ZodOptional<z.ZodString>;
1354
+ Confidence: z.ZodOptional<z.ZodString>;
1355
+ CallStatus: z.ZodOptional<z.ZodString>;
1356
+ }, "strip", z.ZodTypeAny, {
1357
+ From?: string | undefined;
1358
+ To?: string | undefined;
1359
+ CallSid?: string | undefined;
1360
+ SpeechResult?: string | undefined;
1361
+ Confidence?: string | undefined;
1362
+ CallStatus?: string | undefined;
1363
+ }, {
1364
+ From?: string | undefined;
1365
+ To?: string | undefined;
1366
+ CallSid?: string | undefined;
1367
+ SpeechResult?: string | undefined;
1368
+ Confidence?: string | undefined;
1369
+ CallStatus?: string | undefined;
1370
+ }>;
1371
+ declare const zPostWebchatSendBody: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1372
+ declare const zPostCintelOperatorsBody: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1373
+ declare const zPostFlexTranscriptionBody: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1374
+ declare const zPostTaskrouterWebhookBody: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1375
+ declare const zPostResolvePhoneBody: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1376
+ declare const zPostCommunicationTextBody: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1377
+
1378
+ declare const zod_gen_zDeleteKillConversationByPhoneNumberPath: typeof zDeleteKillConversationByPhoneNumberPath;
1379
+ declare const zod_gen_zDeleteLiveNumbersByPhoneNumberPath: typeof zDeleteLiveNumbersByPhoneNumberPath;
1380
+ declare const zod_gen_zGetActiveConversationsAgentByAgentNumberPath: typeof zGetActiveConversationsAgentByAgentNumberPath;
1381
+ declare const zod_gen_zGetActiveConversationsByCustomerNumberPath: typeof zGetActiveConversationsByCustomerNumberPath;
1382
+ declare const zod_gen_zGetOutboundCallByCallSidPath: typeof zGetOutboundCallByCallSidPath;
1383
+ declare const zod_gen_zGetPhoneLogsByPhoneNumberPath: typeof zGetPhoneLogsByPhoneNumberPath;
1384
+ declare const zod_gen_zGetStressTestQuery: typeof zGetStressTestQuery;
1385
+ declare const zod_gen_zPostActiveConversationsAgentClaimBody: typeof zPostActiveConversationsAgentClaimBody;
1386
+ declare const zod_gen_zPostAddMessageBody: typeof zPostAddMessageBody;
1387
+ declare const zod_gen_zPostCallBody: typeof zPostCallBody;
1388
+ declare const zod_gen_zPostCintelOperatorsBody: typeof zPostCintelOperatorsBody;
1389
+ declare const zod_gen_zPostCommunicationTextBody: typeof zPostCommunicationTextBody;
1390
+ declare const zod_gen_zPostFlexTranscriptionBody: typeof zPostFlexTranscriptionBody;
1391
+ declare const zod_gen_zPostLiveAgentBody: typeof zPostLiveAgentBody;
1392
+ declare const zod_gen_zPostOutboundCallBody: typeof zPostOutboundCallBody;
1393
+ declare const zod_gen_zPostOutboundCommunicationTextBody: typeof zPostOutboundCommunicationTextBody;
1394
+ declare const zod_gen_zPostRedirectToLiveAgentBody: typeof zPostRedirectToLiveAgentBody;
1395
+ declare const zod_gen_zPostResolvePhoneBody: typeof zPostResolvePhoneBody;
1396
+ declare const zod_gen_zPostSendEmailBody: typeof zPostSendEmailBody;
1397
+ declare const zod_gen_zPostStressTestSmsBody: typeof zPostStressTestSmsBody;
1398
+ declare const zod_gen_zPostStressTestSmsQuery: typeof zPostStressTestSmsQuery;
1399
+ declare const zod_gen_zPostTaskrouterWebhookBody: typeof zPostTaskrouterWebhookBody;
1400
+ declare const zod_gen_zPostWebchatSendBody: typeof zPostWebchatSendBody;
1401
+ declare namespace zod_gen {
1402
+ export {
1403
+ zod_gen_zDeleteKillConversationByPhoneNumberPath as zDeleteKillConversationByPhoneNumberPath,
1404
+ zod_gen_zDeleteLiveNumbersByPhoneNumberPath as zDeleteLiveNumbersByPhoneNumberPath,
1405
+ zod_gen_zGetActiveConversationsAgentByAgentNumberPath as zGetActiveConversationsAgentByAgentNumberPath,
1406
+ zod_gen_zGetActiveConversationsByCustomerNumberPath as zGetActiveConversationsByCustomerNumberPath,
1407
+ zod_gen_zGetOutboundCallByCallSidPath as zGetOutboundCallByCallSidPath,
1408
+ zod_gen_zGetPhoneLogsByPhoneNumberPath as zGetPhoneLogsByPhoneNumberPath,
1409
+ zod_gen_zGetStressTestQuery as zGetStressTestQuery,
1410
+ zod_gen_zPostActiveConversationsAgentClaimBody as zPostActiveConversationsAgentClaimBody,
1411
+ zod_gen_zPostAddMessageBody as zPostAddMessageBody,
1412
+ zod_gen_zPostCallBody as zPostCallBody,
1413
+ zod_gen_zPostCintelOperatorsBody as zPostCintelOperatorsBody,
1414
+ zod_gen_zPostCommunicationTextBody as zPostCommunicationTextBody,
1415
+ zod_gen_zPostFlexTranscriptionBody as zPostFlexTranscriptionBody,
1416
+ zod_gen_zPostLiveAgentBody as zPostLiveAgentBody,
1417
+ zod_gen_zPostOutboundCallBody as zPostOutboundCallBody,
1418
+ zod_gen_zPostOutboundCommunicationTextBody as zPostOutboundCommunicationTextBody,
1419
+ zod_gen_zPostRedirectToLiveAgentBody as zPostRedirectToLiveAgentBody,
1420
+ zod_gen_zPostResolvePhoneBody as zPostResolvePhoneBody,
1421
+ zod_gen_zPostSendEmailBody as zPostSendEmailBody,
1422
+ zod_gen_zPostStressTestSmsBody as zPostStressTestSmsBody,
1423
+ zod_gen_zPostStressTestSmsQuery as zPostStressTestSmsQuery,
1424
+ zod_gen_zPostTaskrouterWebhookBody as zPostTaskrouterWebhookBody,
1425
+ zod_gen_zPostWebchatSendBody as zPostWebchatSendBody,
1426
+ };
1427
+ }
1428
+
1429
+ export { createRampAgentClient, deleteKillConversationByPhoneNumber, deleteLiveNumbers, deleteLiveNumbersByPhoneNumber, getActiveConversationsAgentByAgentNumber, getActiveConversationsByCustomerNumber, getCountryConfigs, getDocsOpenapiJson, getHealth, getLiveNumbers, getOutboundCallByCallSid, getPhoneLogsByPhoneNumber, getRecentlyActiveNumbers, getStats, getStressTest, postActiveConversationsAgentClaim, postAddMessage, postCall, postCintelOperators, postCommunicationText, postExportLogs, postFlexTranscription, postLiveAgent, postOutboundCall, postOutboundCommunicationText, postRedirectToLiveAgent, postResolvePhone, postSendEmail, postStressTestSms, postTaskrouterWebhook, postWebchatSend, zod_gen as schemas };
1430
+ export type { Client, ClientOptions, Config, CreateRampAgentClientOptions, DeleteKillConversationByPhoneNumberData, DeleteKillConversationByPhoneNumberErrors, DeleteKillConversationByPhoneNumberResponses, DeleteLiveNumbersByPhoneNumberData, DeleteLiveNumbersByPhoneNumberErrors, DeleteLiveNumbersByPhoneNumberResponses, DeleteLiveNumbersData, DeleteLiveNumbersErrors, DeleteLiveNumbersResponses, GetActiveConversationsAgentByAgentNumberData, GetActiveConversationsAgentByAgentNumberErrors, GetActiveConversationsAgentByAgentNumberResponses, GetActiveConversationsByCustomerNumberData, GetActiveConversationsByCustomerNumberErrors, GetActiveConversationsByCustomerNumberResponses, GetCountryConfigsData, GetCountryConfigsErrors, GetCountryConfigsResponses, GetDocsOpenapiJsonData, GetDocsOpenapiJsonErrors, GetDocsOpenapiJsonResponses, GetHealthData, GetHealthErrors, GetHealthResponses, GetLiveNumbersData, GetLiveNumbersErrors, GetLiveNumbersResponses, GetOutboundCallByCallSidData, GetOutboundCallByCallSidErrors, GetOutboundCallByCallSidResponses, GetPhoneLogsByPhoneNumberData, GetPhoneLogsByPhoneNumberErrors, GetPhoneLogsByPhoneNumberResponses, GetRecentlyActiveNumbersData, GetRecentlyActiveNumbersErrors, GetRecentlyActiveNumbersResponses, GetStatsData, GetStatsErrors, GetStatsResponses, GetStressTestData, GetStressTestErrors, GetStressTestResponses, Options, PostActiveConversationsAgentClaimData, PostActiveConversationsAgentClaimErrors, PostActiveConversationsAgentClaimResponses, PostAddMessageData, PostAddMessageErrors, PostAddMessageResponses, PostCallData, PostCallErrors, PostCallResponses, PostCintelOperatorsData, PostCintelOperatorsErrors, PostCintelOperatorsResponses, PostCommunicationTextData, PostCommunicationTextErrors, PostCommunicationTextResponses, PostExportLogsData, PostExportLogsErrors, PostExportLogsResponses, PostFlexTranscriptionData, PostFlexTranscriptionErrors, PostFlexTranscriptionResponses, PostLiveAgentData, PostLiveAgentErrors, PostLiveAgentResponses, PostOutboundCallData, PostOutboundCallErrors, PostOutboundCallResponses, PostOutboundCommunicationTextData, PostOutboundCommunicationTextErrors, PostOutboundCommunicationTextResponses, PostRedirectToLiveAgentData, PostRedirectToLiveAgentErrors, PostRedirectToLiveAgentResponses, PostResolvePhoneData, PostResolvePhoneErrors, PostResolvePhoneResponses, PostSendEmailData, PostSendEmailErrors, PostSendEmailResponses, PostStressTestSmsData, PostStressTestSmsErrors, PostStressTestSmsResponses, PostTaskrouterWebhookData, PostTaskrouterWebhookErrors, PostTaskrouterWebhookResponses, PostWebchatSendData, PostWebchatSendErrors, PostWebchatSendResponses, RequestResult };