retell-sdk 5.49.1 → 5.49.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/client.d.mts +9 -9
- package/client.d.mts.map +1 -1
- package/client.d.ts +9 -9
- package/client.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/agent.d.mts +69 -69
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +69 -69
- package/resources/agent.d.ts.map +1 -1
- package/resources/agent.js +30 -30
- package/resources/agent.js.map +1 -1
- package/resources/agent.mjs +30 -30
- package/resources/agent.mjs.map +1 -1
- package/resources/call.d.mts +1350 -1350
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +1350 -1350
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +60 -60
- package/resources/call.js.map +1 -1
- package/resources/call.mjs +60 -60
- package/resources/call.mjs.map +1 -1
- package/resources/chat-agent.d.mts +70 -70
- package/resources/chat-agent.d.mts.map +1 -1
- package/resources/chat-agent.d.ts +70 -70
- package/resources/chat-agent.d.ts.map +1 -1
- package/resources/chat-agent.js +31 -31
- package/resources/chat-agent.js.map +1 -1
- package/resources/chat-agent.mjs +31 -31
- package/resources/chat-agent.mjs.map +1 -1
- package/resources/chat.d.mts +97 -97
- package/resources/chat.d.mts.map +1 -1
- package/resources/chat.d.ts +97 -97
- package/resources/chat.d.ts.map +1 -1
- package/resources/chat.js +55 -55
- package/resources/chat.js.map +1 -1
- package/resources/chat.mjs +55 -55
- package/resources/chat.mjs.map +1 -1
- package/resources/conversation-flow-component.d.mts +25 -25
- package/resources/conversation-flow-component.d.mts.map +1 -1
- package/resources/conversation-flow-component.d.ts +25 -25
- package/resources/conversation-flow-component.d.ts.map +1 -1
- package/resources/conversation-flow-component.js +12 -12
- package/resources/conversation-flow-component.js.map +1 -1
- package/resources/conversation-flow-component.mjs +12 -12
- package/resources/conversation-flow-component.mjs.map +1 -1
- package/resources/conversation-flow.d.mts +25 -25
- package/resources/conversation-flow.d.mts.map +1 -1
- package/resources/conversation-flow.d.ts +25 -25
- package/resources/conversation-flow.d.ts.map +1 -1
- package/resources/conversation-flow.js +12 -12
- package/resources/conversation-flow.js.map +1 -1
- package/resources/conversation-flow.mjs +12 -12
- package/resources/conversation-flow.mjs.map +1 -1
- package/resources/index.d.mts +9 -9
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +9 -9
- package/resources/index.d.ts.map +1 -1
- package/resources/llm.d.mts +24 -24
- package/resources/llm.d.mts.map +1 -1
- package/resources/llm.d.ts +24 -24
- package/resources/llm.d.ts.map +1 -1
- package/resources/llm.js +11 -11
- package/resources/llm.js.map +1 -1
- package/resources/llm.mjs +11 -11
- package/resources/llm.mjs.map +1 -1
- package/resources/phone-number.d.mts +130 -130
- package/resources/phone-number.d.mts.map +1 -1
- package/resources/phone-number.d.ts +130 -130
- package/resources/phone-number.d.ts.map +1 -1
- package/resources/phone-number.js +27 -27
- package/resources/phone-number.js.map +1 -1
- package/resources/phone-number.mjs +27 -27
- package/resources/phone-number.mjs.map +1 -1
- package/resources/tests.d.mts +95 -95
- package/resources/tests.d.mts.map +1 -1
- package/resources/tests.d.ts +95 -95
- package/resources/tests.d.ts.map +1 -1
- package/resources/tests.js +27 -27
- package/resources/tests.js.map +1 -1
- package/resources/tests.mjs +27 -27
- package/resources/tests.mjs.map +1 -1
- package/resources/voice.d.mts +8 -8
- package/resources/voice.d.mts.map +1 -1
- package/resources/voice.d.ts +8 -8
- package/resources/voice.d.ts.map +1 -1
- package/resources/voice.js +12 -12
- package/resources/voice.js.map +1 -1
- package/resources/voice.mjs +12 -12
- package/resources/voice.mjs.map +1 -1
- package/src/client.ts +18 -18
- package/src/resources/agent.ts +90 -90
- package/src/resources/call.ts +1821 -1821
- package/src/resources/chat-agent.ts +95 -95
- package/src/resources/chat.ts +112 -112
- package/src/resources/conversation-flow-component.ts +34 -34
- package/src/resources/conversation-flow.ts +34 -34
- package/src/resources/index.ts +18 -18
- package/src/resources/llm.ts +30 -30
- package/src/resources/phone-number.ts +152 -152
- package/src/resources/tests.ts +136 -136
- package/src/resources/voice.ts +12 -12
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -12,20 +12,6 @@ export declare class PhoneNumber extends APIResource {
|
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
14
|
create(body: PhoneNumberCreateParams, options?: RequestOptions): APIPromise<PhoneNumberResponse>;
|
|
15
|
-
/**
|
|
16
|
-
* Import a phone number from custom telephony & Bind agents
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```ts
|
|
20
|
-
* const phoneNumberResponse = await client.phoneNumber.import(
|
|
21
|
-
* {
|
|
22
|
-
* phone_number: '+14157774444',
|
|
23
|
-
* termination_uri: 'someuri.pstn.twilio.com',
|
|
24
|
-
* },
|
|
25
|
-
* );
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
import(body: PhoneNumberImportParams, options?: RequestOptions): APIPromise<PhoneNumberResponse>;
|
|
29
15
|
/**
|
|
30
16
|
* Retrieve details of a specific phone number
|
|
31
17
|
*
|
|
@@ -36,15 +22,6 @@ export declare class PhoneNumber extends APIResource {
|
|
|
36
22
|
* ```
|
|
37
23
|
*/
|
|
38
24
|
retrieve(phoneNumber: string, options?: RequestOptions): APIPromise<PhoneNumberResponse>;
|
|
39
|
-
/**
|
|
40
|
-
* List phone numbers with pagination
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* ```ts
|
|
44
|
-
* const phoneNumbers = await client.phoneNumber.list();
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
|
-
list(query?: PhoneNumberListParams | null | undefined, options?: RequestOptions): APIPromise<PhoneNumberListResponse>;
|
|
48
25
|
/**
|
|
49
26
|
* Update agent bound to a purchased phone number
|
|
50
27
|
*
|
|
@@ -73,6 +50,15 @@ export declare class PhoneNumber extends APIResource {
|
|
|
73
50
|
* ```
|
|
74
51
|
*/
|
|
75
52
|
update(phoneNumber: string, body: PhoneNumberUpdateParams, options?: RequestOptions): APIPromise<PhoneNumberResponse>;
|
|
53
|
+
/**
|
|
54
|
+
* List phone numbers with pagination
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* const phoneNumbers = await client.phoneNumber.list();
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
list(query?: PhoneNumberListParams | null | undefined, options?: RequestOptions): APIPromise<PhoneNumberListResponse>;
|
|
76
62
|
/**
|
|
77
63
|
* Delete an existing phone number
|
|
78
64
|
*
|
|
@@ -82,6 +68,20 @@ export declare class PhoneNumber extends APIResource {
|
|
|
82
68
|
* ```
|
|
83
69
|
*/
|
|
84
70
|
delete(phoneNumber: string, options?: RequestOptions): APIPromise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Import a phone number from custom telephony & Bind agents
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* const phoneNumberResponse = await client.phoneNumber.import(
|
|
77
|
+
* {
|
|
78
|
+
* phone_number: '+14157774444',
|
|
79
|
+
* termination_uri: 'someuri.pstn.twilio.com',
|
|
80
|
+
* },
|
|
81
|
+
* );
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
import(body: PhoneNumberImportParams, options?: RequestOptions): APIPromise<PhoneNumberResponse>;
|
|
85
85
|
}
|
|
86
86
|
export interface PhoneNumberResponse {
|
|
87
87
|
/**
|
|
@@ -387,19 +387,7 @@ export declare namespace PhoneNumberCreateParams {
|
|
|
387
387
|
agent_version?: string | number;
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
|
-
export interface
|
|
391
|
-
/**
|
|
392
|
-
* The number you are trying to import in E.164 format of the number (+country
|
|
393
|
-
* code, then number with no space, no special characters), used as the unique
|
|
394
|
-
* identifier for phone number APIs.
|
|
395
|
-
*/
|
|
396
|
-
phone_number: string;
|
|
397
|
-
/**
|
|
398
|
-
* The termination uri to uniquely identify your elastic SIP trunk. This is used
|
|
399
|
-
* for outbound calls. For Twilio elastic SIP trunks it always end with
|
|
400
|
-
* ".pstn.twilio.com".
|
|
401
|
-
*/
|
|
402
|
-
termination_uri: string;
|
|
390
|
+
export interface PhoneNumberUpdateParams {
|
|
403
391
|
/**
|
|
404
392
|
* List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed.
|
|
405
393
|
* If not set or empty, calls from all countries are allowed.
|
|
@@ -411,18 +399,41 @@ export interface PhoneNumberImportParams {
|
|
|
411
399
|
*/
|
|
412
400
|
allowed_outbound_country_list?: Array<string> | null;
|
|
413
401
|
/**
|
|
414
|
-
*
|
|
415
|
-
*
|
|
416
|
-
* true. Must be a boolean literal; string values like "true" or "false" are
|
|
417
|
-
* invalid.
|
|
402
|
+
* The password used for authentication for the SIP trunk to update for the phone
|
|
403
|
+
* number.
|
|
418
404
|
*/
|
|
419
|
-
|
|
405
|
+
auth_password?: string;
|
|
406
|
+
/**
|
|
407
|
+
* The username used for authentication for the SIP trunk to update for the phone
|
|
408
|
+
* number.
|
|
409
|
+
*/
|
|
410
|
+
auth_username?: string;
|
|
411
|
+
/**
|
|
412
|
+
* When inbound call concurrency is reached and a slot does not free up after
|
|
413
|
+
* extended ringing, the call will fall back to this number. Can be either a Retell
|
|
414
|
+
* phone number or an external number. Set to null to remove. Cannot be the same as
|
|
415
|
+
* this phone number, and cannot be a number that already has its own fallback
|
|
416
|
+
* configured (prevents nested forwarding).
|
|
417
|
+
*/
|
|
418
|
+
fallback_number?: string | null;
|
|
420
419
|
/**
|
|
421
420
|
* Inbound agents to bind to the number with weights. If set and non-empty, one
|
|
422
421
|
* agent will be picked randomly for each inbound call, with probability
|
|
423
422
|
* proportional to the weight. Total weights must add up to 1.
|
|
424
423
|
*/
|
|
425
|
-
inbound_agents?: Array<
|
|
424
|
+
inbound_agents?: Array<PhoneNumberUpdateParams.InboundAgent> | null;
|
|
425
|
+
/**
|
|
426
|
+
* Inbound SMS agents to bind to the number with weights. If set and non-empty, one
|
|
427
|
+
* agent will be picked randomly for each inbound SMS, with probability
|
|
428
|
+
* proportional to the weight. Total weights must add up to 1.
|
|
429
|
+
*/
|
|
430
|
+
inbound_sms_agents?: Array<PhoneNumberUpdateParams.InboundSMSAgent> | null;
|
|
431
|
+
/**
|
|
432
|
+
* If set, Retell will send a webhook for inbound SMS, where you can override the
|
|
433
|
+
* agent ID, set dynamic variables, reject the SMS, and configure other fields
|
|
434
|
+
* specific to that chat.
|
|
435
|
+
*/
|
|
436
|
+
inbound_sms_webhook_url?: string | null;
|
|
426
437
|
/**
|
|
427
438
|
* If set, Retell will send a webhook for inbound calls, where you can override the
|
|
428
439
|
* agent ID, set dynamic variables, reject the call, and configure other fields
|
|
@@ -432,28 +443,31 @@ export interface PhoneNumberImportParams {
|
|
|
432
443
|
/**
|
|
433
444
|
* Nickname of the number. This is for your reference only.
|
|
434
445
|
*/
|
|
435
|
-
nickname?: string;
|
|
446
|
+
nickname?: string | null;
|
|
436
447
|
/**
|
|
437
448
|
* Outbound agents to bind to the number with weights. If set and non-empty, one
|
|
438
449
|
* agent will be picked randomly for each outbound call, with probability
|
|
439
450
|
* proportional to the weight. Total weights must add up to 1.
|
|
440
451
|
*/
|
|
441
|
-
outbound_agents?: Array<
|
|
452
|
+
outbound_agents?: Array<PhoneNumberUpdateParams.OutboundAgent> | null;
|
|
442
453
|
/**
|
|
443
|
-
*
|
|
454
|
+
* Outbound SMS agents to bind to the number with weights. If set and non-empty,
|
|
455
|
+
* one agent will be picked randomly for each outbound SMS, with probability
|
|
456
|
+
* proportional to the weight. Total weights must add up to 1.
|
|
444
457
|
*/
|
|
445
|
-
|
|
458
|
+
outbound_sms_agents?: Array<PhoneNumberUpdateParams.OutboundSMSAgent> | null;
|
|
446
459
|
/**
|
|
447
|
-
* The
|
|
460
|
+
* The termination uri to update for the phone number. This is used for outbound
|
|
461
|
+
* calls.
|
|
448
462
|
*/
|
|
449
|
-
|
|
463
|
+
termination_uri?: string;
|
|
450
464
|
/**
|
|
451
465
|
* Outbound transport protocol to update for the phone number. Valid values are
|
|
452
466
|
* "TLS", "TCP" and "UDP". Default is "TCP".
|
|
453
467
|
*/
|
|
454
468
|
transport?: string | null;
|
|
455
469
|
}
|
|
456
|
-
export declare namespace
|
|
470
|
+
export declare namespace PhoneNumberUpdateParams {
|
|
457
471
|
interface InboundAgent {
|
|
458
472
|
agent_id: string;
|
|
459
473
|
/**
|
|
@@ -474,6 +488,26 @@ export declare namespace PhoneNumberImportParams {
|
|
|
474
488
|
*/
|
|
475
489
|
agent_version?: string | number;
|
|
476
490
|
}
|
|
491
|
+
interface InboundSMSAgent {
|
|
492
|
+
agent_id: string;
|
|
493
|
+
/**
|
|
494
|
+
* The weight of the agent. When used in a list of agents, the total weights must
|
|
495
|
+
* add up to 1.
|
|
496
|
+
*/
|
|
497
|
+
weight: number;
|
|
498
|
+
/**
|
|
499
|
+
* Agent version reference. Supports a numeric version (for example 3) or a
|
|
500
|
+
* tag/environment name (for example "prod"). The string "latest" resolves to the
|
|
501
|
+
* most recently created version (the largest version number), and
|
|
502
|
+
* "latest_published" resolves to the most recently published version. When a tag
|
|
503
|
+
* is provided, resolution uses that exact tag assignment (including its dynamic
|
|
504
|
+
* variables). If the tag exists but is currently unassigned, it resolves to
|
|
505
|
+
* latest. When a numeric version, latest, or latest_published is provided,
|
|
506
|
+
* resolution applies dynamic variables from the preferred tag for that resolved
|
|
507
|
+
* version (most recently assigned), if any.
|
|
508
|
+
*/
|
|
509
|
+
agent_version?: string | number;
|
|
510
|
+
}
|
|
477
511
|
interface OutboundAgent {
|
|
478
512
|
agent_id: string;
|
|
479
513
|
/**
|
|
@@ -494,6 +528,26 @@ export declare namespace PhoneNumberImportParams {
|
|
|
494
528
|
*/
|
|
495
529
|
agent_version?: string | number;
|
|
496
530
|
}
|
|
531
|
+
interface OutboundSMSAgent {
|
|
532
|
+
agent_id: string;
|
|
533
|
+
/**
|
|
534
|
+
* The weight of the agent. When used in a list of agents, the total weights must
|
|
535
|
+
* add up to 1.
|
|
536
|
+
*/
|
|
537
|
+
weight: number;
|
|
538
|
+
/**
|
|
539
|
+
* Agent version reference. Supports a numeric version (for example 3) or a
|
|
540
|
+
* tag/environment name (for example "prod"). The string "latest" resolves to the
|
|
541
|
+
* most recently created version (the largest version number), and
|
|
542
|
+
* "latest_published" resolves to the most recently published version. When a tag
|
|
543
|
+
* is provided, resolution uses that exact tag assignment (including its dynamic
|
|
544
|
+
* variables). If the tag exists but is currently unassigned, it resolves to
|
|
545
|
+
* latest. When a numeric version, latest, or latest_published is provided,
|
|
546
|
+
* resolution applies dynamic variables from the preferred tag for that resolved
|
|
547
|
+
* version (most recently assigned), if any.
|
|
548
|
+
*/
|
|
549
|
+
agent_version?: string | number;
|
|
550
|
+
}
|
|
497
551
|
}
|
|
498
552
|
export interface PhoneNumberListParams {
|
|
499
553
|
/**
|
|
@@ -509,7 +563,19 @@ export interface PhoneNumberListParams {
|
|
|
509
563
|
*/
|
|
510
564
|
sort_order?: 'ascending' | 'descending';
|
|
511
565
|
}
|
|
512
|
-
export interface
|
|
566
|
+
export interface PhoneNumberImportParams {
|
|
567
|
+
/**
|
|
568
|
+
* The number you are trying to import in E.164 format of the number (+country
|
|
569
|
+
* code, then number with no space, no special characters), used as the unique
|
|
570
|
+
* identifier for phone number APIs.
|
|
571
|
+
*/
|
|
572
|
+
phone_number: string;
|
|
573
|
+
/**
|
|
574
|
+
* The termination uri to uniquely identify your elastic SIP trunk. This is used
|
|
575
|
+
* for outbound calls. For Twilio elastic SIP trunks it always end with
|
|
576
|
+
* ".pstn.twilio.com".
|
|
577
|
+
*/
|
|
578
|
+
termination_uri: string;
|
|
513
579
|
/**
|
|
514
580
|
* List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed.
|
|
515
581
|
* If not set or empty, calls from all countries are allowed.
|
|
@@ -521,41 +587,18 @@ export interface PhoneNumberUpdateParams {
|
|
|
521
587
|
*/
|
|
522
588
|
allowed_outbound_country_list?: Array<string> | null;
|
|
523
589
|
/**
|
|
524
|
-
*
|
|
525
|
-
*
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
/**
|
|
529
|
-
* The username used for authentication for the SIP trunk to update for the phone
|
|
530
|
-
* number.
|
|
531
|
-
*/
|
|
532
|
-
auth_username?: string;
|
|
533
|
-
/**
|
|
534
|
-
* When inbound call concurrency is reached and a slot does not free up after
|
|
535
|
-
* extended ringing, the call will fall back to this number. Can be either a Retell
|
|
536
|
-
* phone number or an external number. Set to null to remove. Cannot be the same as
|
|
537
|
-
* this phone number, and cannot be a number that already has its own fallback
|
|
538
|
-
* configured (prevents nested forwarding).
|
|
590
|
+
* If true, E.164 validation for phone_number is skipped. This is useful for
|
|
591
|
+
* internal pseudo numbers when using custom telephony. If omitted, default is
|
|
592
|
+
* true. Must be a boolean literal; string values like "true" or "false" are
|
|
593
|
+
* invalid.
|
|
539
594
|
*/
|
|
540
|
-
|
|
595
|
+
ignore_e164_validation?: boolean;
|
|
541
596
|
/**
|
|
542
597
|
* Inbound agents to bind to the number with weights. If set and non-empty, one
|
|
543
598
|
* agent will be picked randomly for each inbound call, with probability
|
|
544
599
|
* proportional to the weight. Total weights must add up to 1.
|
|
545
600
|
*/
|
|
546
|
-
inbound_agents?: Array<
|
|
547
|
-
/**
|
|
548
|
-
* Inbound SMS agents to bind to the number with weights. If set and non-empty, one
|
|
549
|
-
* agent will be picked randomly for each inbound SMS, with probability
|
|
550
|
-
* proportional to the weight. Total weights must add up to 1.
|
|
551
|
-
*/
|
|
552
|
-
inbound_sms_agents?: Array<PhoneNumberUpdateParams.InboundSMSAgent> | null;
|
|
553
|
-
/**
|
|
554
|
-
* If set, Retell will send a webhook for inbound SMS, where you can override the
|
|
555
|
-
* agent ID, set dynamic variables, reject the SMS, and configure other fields
|
|
556
|
-
* specific to that chat.
|
|
557
|
-
*/
|
|
558
|
-
inbound_sms_webhook_url?: string | null;
|
|
601
|
+
inbound_agents?: Array<PhoneNumberImportParams.InboundAgent> | null;
|
|
559
602
|
/**
|
|
560
603
|
* If set, Retell will send a webhook for inbound calls, where you can override the
|
|
561
604
|
* agent ID, set dynamic variables, reject the call, and configure other fields
|
|
@@ -565,31 +608,28 @@ export interface PhoneNumberUpdateParams {
|
|
|
565
608
|
/**
|
|
566
609
|
* Nickname of the number. This is for your reference only.
|
|
567
610
|
*/
|
|
568
|
-
nickname?: string
|
|
611
|
+
nickname?: string;
|
|
569
612
|
/**
|
|
570
613
|
* Outbound agents to bind to the number with weights. If set and non-empty, one
|
|
571
614
|
* agent will be picked randomly for each outbound call, with probability
|
|
572
615
|
* proportional to the weight. Total weights must add up to 1.
|
|
573
616
|
*/
|
|
574
|
-
outbound_agents?: Array<
|
|
617
|
+
outbound_agents?: Array<PhoneNumberImportParams.OutboundAgent> | null;
|
|
575
618
|
/**
|
|
576
|
-
*
|
|
577
|
-
* one agent will be picked randomly for each outbound SMS, with probability
|
|
578
|
-
* proportional to the weight. Total weights must add up to 1.
|
|
619
|
+
* The password used for authentication for the SIP trunk.
|
|
579
620
|
*/
|
|
580
|
-
|
|
621
|
+
sip_trunk_auth_password?: string;
|
|
581
622
|
/**
|
|
582
|
-
* The
|
|
583
|
-
* calls.
|
|
623
|
+
* The username used for authentication for the SIP trunk.
|
|
584
624
|
*/
|
|
585
|
-
|
|
625
|
+
sip_trunk_auth_username?: string;
|
|
586
626
|
/**
|
|
587
627
|
* Outbound transport protocol to update for the phone number. Valid values are
|
|
588
628
|
* "TLS", "TCP" and "UDP". Default is "TCP".
|
|
589
629
|
*/
|
|
590
630
|
transport?: string | null;
|
|
591
631
|
}
|
|
592
|
-
export declare namespace
|
|
632
|
+
export declare namespace PhoneNumberImportParams {
|
|
593
633
|
interface InboundAgent {
|
|
594
634
|
agent_id: string;
|
|
595
635
|
/**
|
|
@@ -610,26 +650,6 @@ export declare namespace PhoneNumberUpdateParams {
|
|
|
610
650
|
*/
|
|
611
651
|
agent_version?: string | number;
|
|
612
652
|
}
|
|
613
|
-
interface InboundSMSAgent {
|
|
614
|
-
agent_id: string;
|
|
615
|
-
/**
|
|
616
|
-
* The weight of the agent. When used in a list of agents, the total weights must
|
|
617
|
-
* add up to 1.
|
|
618
|
-
*/
|
|
619
|
-
weight: number;
|
|
620
|
-
/**
|
|
621
|
-
* Agent version reference. Supports a numeric version (for example 3) or a
|
|
622
|
-
* tag/environment name (for example "prod"). The string "latest" resolves to the
|
|
623
|
-
* most recently created version (the largest version number), and
|
|
624
|
-
* "latest_published" resolves to the most recently published version. When a tag
|
|
625
|
-
* is provided, resolution uses that exact tag assignment (including its dynamic
|
|
626
|
-
* variables). If the tag exists but is currently unassigned, it resolves to
|
|
627
|
-
* latest. When a numeric version, latest, or latest_published is provided,
|
|
628
|
-
* resolution applies dynamic variables from the preferred tag for that resolved
|
|
629
|
-
* version (most recently assigned), if any.
|
|
630
|
-
*/
|
|
631
|
-
agent_version?: string | number;
|
|
632
|
-
}
|
|
633
653
|
interface OutboundAgent {
|
|
634
654
|
agent_id: string;
|
|
635
655
|
/**
|
|
@@ -650,28 +670,8 @@ export declare namespace PhoneNumberUpdateParams {
|
|
|
650
670
|
*/
|
|
651
671
|
agent_version?: string | number;
|
|
652
672
|
}
|
|
653
|
-
interface OutboundSMSAgent {
|
|
654
|
-
agent_id: string;
|
|
655
|
-
/**
|
|
656
|
-
* The weight of the agent. When used in a list of agents, the total weights must
|
|
657
|
-
* add up to 1.
|
|
658
|
-
*/
|
|
659
|
-
weight: number;
|
|
660
|
-
/**
|
|
661
|
-
* Agent version reference. Supports a numeric version (for example 3) or a
|
|
662
|
-
* tag/environment name (for example "prod"). The string "latest" resolves to the
|
|
663
|
-
* most recently created version (the largest version number), and
|
|
664
|
-
* "latest_published" resolves to the most recently published version. When a tag
|
|
665
|
-
* is provided, resolution uses that exact tag assignment (including its dynamic
|
|
666
|
-
* variables). If the tag exists but is currently unassigned, it resolves to
|
|
667
|
-
* latest. When a numeric version, latest, or latest_published is provided,
|
|
668
|
-
* resolution applies dynamic variables from the preferred tag for that resolved
|
|
669
|
-
* version (most recently assigned), if any.
|
|
670
|
-
*/
|
|
671
|
-
agent_version?: string | number;
|
|
672
|
-
}
|
|
673
673
|
}
|
|
674
674
|
export declare namespace PhoneNumber {
|
|
675
|
-
export { type PhoneNumberResponse as PhoneNumberResponse, type PhoneNumberListResponse as PhoneNumberListResponse, type PhoneNumberCreateParams as PhoneNumberCreateParams, type
|
|
675
|
+
export { type PhoneNumberResponse as PhoneNumberResponse, type PhoneNumberListResponse as PhoneNumberListResponse, type PhoneNumberCreateParams as PhoneNumberCreateParams, type PhoneNumberUpdateParams as PhoneNumberUpdateParams, type PhoneNumberListParams as PhoneNumberListParams, type PhoneNumberImportParams as PhoneNumberImportParams, };
|
|
676
676
|
}
|
|
677
677
|
//# sourceMappingURL=phone-number.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone-number.d.ts","sourceRoot":"","sources":["../src/resources/phone-number.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;IAIhG
|
|
1
|
+
{"version":3,"file":"phone-number.d.ts","sourceRoot":"","sources":["../src/resources/phone-number.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAI,EAAE,uBAAuB,E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MAAM,CAAC;QAEf;;;;;;;;;;WAUG;QACH,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KACjC;CACF;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -18,22 +18,6 @@ class PhoneNumber extends resource_1.APIResource {
|
|
|
18
18
|
create(body, options) {
|
|
19
19
|
return this._client.post('/create-phone-number', { body, ...options });
|
|
20
20
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Import a phone number from custom telephony & Bind agents
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```ts
|
|
26
|
-
* const phoneNumberResponse = await client.phoneNumber.import(
|
|
27
|
-
* {
|
|
28
|
-
* phone_number: '+14157774444',
|
|
29
|
-
* termination_uri: 'someuri.pstn.twilio.com',
|
|
30
|
-
* },
|
|
31
|
-
* );
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
import(body, options) {
|
|
35
|
-
return this._client.post('/import-phone-number', { body, ...options });
|
|
36
|
-
}
|
|
37
21
|
/**
|
|
38
22
|
* Retrieve details of a specific phone number
|
|
39
23
|
*
|
|
@@ -46,17 +30,6 @@ class PhoneNumber extends resource_1.APIResource {
|
|
|
46
30
|
retrieve(phoneNumber, options) {
|
|
47
31
|
return this._client.get((0, path_1.path) `/get-phone-number/${phoneNumber}`, options);
|
|
48
32
|
}
|
|
49
|
-
/**
|
|
50
|
-
* List phone numbers with pagination
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* ```ts
|
|
54
|
-
* const phoneNumbers = await client.phoneNumber.list();
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
list(query = {}, options) {
|
|
58
|
-
return this._client.get('/v2/list-phone-numbers', { query, ...options });
|
|
59
|
-
}
|
|
60
33
|
/**
|
|
61
34
|
* Update agent bound to a purchased phone number
|
|
62
35
|
*
|
|
@@ -87,6 +60,17 @@ class PhoneNumber extends resource_1.APIResource {
|
|
|
87
60
|
update(phoneNumber, body, options) {
|
|
88
61
|
return this._client.patch((0, path_1.path) `/update-phone-number/${phoneNumber}`, { body, ...options });
|
|
89
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* List phone numbers with pagination
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* const phoneNumbers = await client.phoneNumber.list();
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
list(query = {}, options) {
|
|
72
|
+
return this._client.get('/v2/list-phone-numbers', { query, ...options });
|
|
73
|
+
}
|
|
90
74
|
/**
|
|
91
75
|
* Delete an existing phone number
|
|
92
76
|
*
|
|
@@ -101,6 +85,22 @@ class PhoneNumber extends resource_1.APIResource {
|
|
|
101
85
|
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
102
86
|
});
|
|
103
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Import a phone number from custom telephony & Bind agents
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```ts
|
|
93
|
+
* const phoneNumberResponse = await client.phoneNumber.import(
|
|
94
|
+
* {
|
|
95
|
+
* phone_number: '+14157774444',
|
|
96
|
+
* termination_uri: 'someuri.pstn.twilio.com',
|
|
97
|
+
* },
|
|
98
|
+
* );
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
import(body, options) {
|
|
102
|
+
return this._client.post('/import-phone-number', { body, ...options });
|
|
103
|
+
}
|
|
104
104
|
}
|
|
105
105
|
exports.PhoneNumber = PhoneNumber;
|
|
106
106
|
//# sourceMappingURL=phone-number.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone-number.js","sourceRoot":"","sources":["../src/resources/phone-number.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAEnD,oDAA8C;AAE9C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;OAQG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"phone-number.js","sourceRoot":"","sources":["../src/resources/phone-number.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAEnD,oDAA8C;AAE9C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;OAQG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;OAQG;IACH,QAAQ,CAAC,WAAmB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,CACJ,WAAmB,EACnB,IAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,wBAAwB,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CACF,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,WAAmB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,wBAAwB,WAAW,EAAE,EAAE;YACpE,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;CACF;AA5GD,kCA4GC"}
|
|
@@ -15,22 +15,6 @@ export class PhoneNumber extends APIResource {
|
|
|
15
15
|
create(body, options) {
|
|
16
16
|
return this._client.post('/create-phone-number', { body, ...options });
|
|
17
17
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Import a phone number from custom telephony & Bind agents
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```ts
|
|
23
|
-
* const phoneNumberResponse = await client.phoneNumber.import(
|
|
24
|
-
* {
|
|
25
|
-
* phone_number: '+14157774444',
|
|
26
|
-
* termination_uri: 'someuri.pstn.twilio.com',
|
|
27
|
-
* },
|
|
28
|
-
* );
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
import(body, options) {
|
|
32
|
-
return this._client.post('/import-phone-number', { body, ...options });
|
|
33
|
-
}
|
|
34
18
|
/**
|
|
35
19
|
* Retrieve details of a specific phone number
|
|
36
20
|
*
|
|
@@ -43,17 +27,6 @@ export class PhoneNumber extends APIResource {
|
|
|
43
27
|
retrieve(phoneNumber, options) {
|
|
44
28
|
return this._client.get(path `/get-phone-number/${phoneNumber}`, options);
|
|
45
29
|
}
|
|
46
|
-
/**
|
|
47
|
-
* List phone numbers with pagination
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```ts
|
|
51
|
-
* const phoneNumbers = await client.phoneNumber.list();
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
list(query = {}, options) {
|
|
55
|
-
return this._client.get('/v2/list-phone-numbers', { query, ...options });
|
|
56
|
-
}
|
|
57
30
|
/**
|
|
58
31
|
* Update agent bound to a purchased phone number
|
|
59
32
|
*
|
|
@@ -84,6 +57,17 @@ export class PhoneNumber extends APIResource {
|
|
|
84
57
|
update(phoneNumber, body, options) {
|
|
85
58
|
return this._client.patch(path `/update-phone-number/${phoneNumber}`, { body, ...options });
|
|
86
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* List phone numbers with pagination
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* const phoneNumbers = await client.phoneNumber.list();
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
list(query = {}, options) {
|
|
69
|
+
return this._client.get('/v2/list-phone-numbers', { query, ...options });
|
|
70
|
+
}
|
|
87
71
|
/**
|
|
88
72
|
* Delete an existing phone number
|
|
89
73
|
*
|
|
@@ -98,5 +82,21 @@ export class PhoneNumber extends APIResource {
|
|
|
98
82
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
99
83
|
});
|
|
100
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Import a phone number from custom telephony & Bind agents
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* const phoneNumberResponse = await client.phoneNumber.import(
|
|
91
|
+
* {
|
|
92
|
+
* phone_number: '+14157774444',
|
|
93
|
+
* termination_uri: 'someuri.pstn.twilio.com',
|
|
94
|
+
* },
|
|
95
|
+
* );
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
import(body, options) {
|
|
99
|
+
return this._client.post('/import-phone-number', { body, ...options });
|
|
100
|
+
}
|
|
101
101
|
}
|
|
102
102
|
//# sourceMappingURL=phone-number.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone-number.mjs","sourceRoot":"","sources":["../src/resources/phone-number.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;OAQG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"phone-number.mjs","sourceRoot":"","sources":["../src/resources/phone-number.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;OAQG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;OAQG;IACH,QAAQ,CAAC,WAAmB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,qBAAqB,WAAW,EAAE,EAAE,OAAO,CAAC,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