phonic 0.30.32 → 0.30.33

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/README.md CHANGED
@@ -45,7 +45,7 @@ await client.agents.create({
45
45
  name: "support-agent",
46
46
  phone_number: "assign-automatically",
47
47
  timezone: "America/Los_Angeles",
48
- voice_id: "grant",
48
+ voice_id: "sabrina",
49
49
  audio_speed: 1,
50
50
  background_noise_level: 0,
51
51
  generate_welcome_message: false,
@@ -53,7 +53,7 @@ await client.agents.create({
53
53
  system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
54
54
  template_variables: {
55
55
  customer_name: {
56
- default_value: null,
56
+ default_value: "David",
57
57
  },
58
58
  subject: {
59
59
  default_value: "Chess",
@@ -42,7 +42,7 @@ export interface AgentsCreateRequest {
42
42
  project?: string;
43
43
  /** The name of the agent. Can only contain lowercase letters, numbers and hyphens. Must be unique within the project. */
44
44
  name: string;
45
- phone_number?: Phonic.CreateAgentRequest.PhoneNumber | null;
45
+ phone_number: Phonic.CreateAgentRequest.PhoneNumber | null;
46
46
  /** The custom phone number to use for the agent in E.164 format (e.g., +1234567890). This field is deprecated. Use `custom_phone_numbers` instead. */
47
47
  custom_phone_number?: string | null;
48
48
  /** Array of custom phone numbers in E.164 format (e.g., ["+1234567890", "+0987654321"]). The agent will be able to receive phone calls on any of these numbers. Required when `phone_number` is set to `"custom"`. All phone numbers must be unique. */
@@ -42,7 +42,7 @@ export interface UpdateAgentRequest {
42
42
  project?: string;
43
43
  /** The name of the agent. Can only contain lowercase letters, numbers and hyphens. Must be unique within the project. */
44
44
  name?: string;
45
- phone_number?: UpdateAgentRequest.PhoneNumber | null;
45
+ phone_number: UpdateAgentRequest.PhoneNumber | null;
46
46
  /** The custom phone number to use for the agent in E.164 format (e.g., +1234567890). This field is deprecated. Use `custom_phone_numbers` instead. */
47
47
  custom_phone_number?: string | null;
48
48
  /** Array of custom phone numbers in E.164 format (e.g., ["+1234567890", "+0987654321"]). The agent will be able to receive phone calls on any of these numbers. Required when `phone_number` is set to `"custom"`. All phone numbers must be unique. */
@@ -42,7 +42,7 @@ export interface AgentsCreateRequest {
42
42
  project?: string;
43
43
  /** The name of the agent. Can only contain lowercase letters, numbers and hyphens. Must be unique within the project. */
44
44
  name: string;
45
- phone_number?: Phonic.CreateAgentRequest.PhoneNumber | null;
45
+ phone_number: Phonic.CreateAgentRequest.PhoneNumber | null;
46
46
  /** The custom phone number to use for the agent in E.164 format (e.g., +1234567890). This field is deprecated. Use `custom_phone_numbers` instead. */
47
47
  custom_phone_number?: string | null;
48
48
  /** Array of custom phone numbers in E.164 format (e.g., ["+1234567890", "+0987654321"]). The agent will be able to receive phone calls on any of these numbers. Required when `phone_number` is set to `"custom"`. All phone numbers must be unique. */
@@ -42,7 +42,7 @@ export interface UpdateAgentRequest {
42
42
  project?: string;
43
43
  /** The name of the agent. Can only contain lowercase letters, numbers and hyphens. Must be unique within the project. */
44
44
  name?: string;
45
- phone_number?: UpdateAgentRequest.PhoneNumber | null;
45
+ phone_number: UpdateAgentRequest.PhoneNumber | null;
46
46
  /** The custom phone number to use for the agent in E.164 format (e.g., +1234567890). This field is deprecated. Use `custom_phone_numbers` instead. */
47
47
  custom_phone_number?: string | null;
48
48
  /** Array of custom phone numbers in E.164 format (e.g., ["+1234567890", "+0987654321"]). The agent will be able to receive phone calls on any of these numbers. Required when `phone_number` is set to `"custom"`. All phone numbers must be unique. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phonic",
3
- "version": "0.30.32",
3
+ "version": "0.30.33",
4
4
  "private": false,
5
5
  "repository": "github:Phonic-Co/phonic-node",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -98,7 +98,7 @@ await client.agents.create({
98
98
  name: "support-agent",
99
99
  phone_number: "assign-automatically",
100
100
  timezone: "America/Los_Angeles",
101
- voice_id: "grant",
101
+ voice_id: "sabrina",
102
102
  audio_speed: 1,
103
103
  background_noise_level: 0,
104
104
  generate_welcome_message: false,
@@ -106,7 +106,7 @@ await client.agents.create({
106
106
  system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
107
107
  template_variables: {
108
108
  customer_name: {
109
- default_value: null,
109
+ default_value: "David",
110
110
  },
111
111
  subject: {
112
112
  default_value: "Chess",
@@ -192,7 +192,7 @@ await client.agents.upsert({
192
192
  name: "support-agent",
193
193
  phone_number: "assign-automatically",
194
194
  timezone: "America/Los_Angeles",
195
- voice_id: "grant",
195
+ voice_id: "sabrina",
196
196
  audio_speed: 1,
197
197
  background_noise_level: 0,
198
198
  generate_welcome_message: false,
@@ -200,7 +200,7 @@ await client.agents.upsert({
200
200
  system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
201
201
  template_variables: {
202
202
  customer_name: {
203
- default_value: null,
203
+ default_value: "David",
204
204
  },
205
205
  subject: {
206
206
  default_value: "Chess",
@@ -432,7 +432,7 @@ await client.agents.update("nameOrId", {
432
432
  name: "updated-support-agent",
433
433
  phone_number: "assign-automatically",
434
434
  timezone: "America/Los_Angeles",
435
- voice_id: "grant",
435
+ voice_id: "sabrina",
436
436
  audio_speed: 1,
437
437
  background_noise_level: 0,
438
438
  generate_welcome_message: false,
@@ -440,7 +440,7 @@ await client.agents.update("nameOrId", {
440
440
  system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
441
441
  template_variables: {
442
442
  customer_name: {
443
- default_value: null,
443
+ default_value: "David",
444
444
  },
445
445
  subject: {
446
446
  default_value: "Chess",
@@ -532,6 +532,13 @@ Adds a custom phone number to an agent. The user must configure their SIP trunk
532
532
  await client.agents.addCustomPhoneNumber("nameOrId", {
533
533
  project: "main",
534
534
  phone_number: "+15551234567",
535
+ configuration_endpoint: {
536
+ url: "https://api.example.com/config",
537
+ headers: {
538
+ Authorization: "Bearer token123",
539
+ },
540
+ timeout_ms: 7000,
541
+ },
535
542
  });
536
543
  ```
537
544
 
@@ -575,7 +582,81 @@ await client.agents.addCustomPhoneNumber("nameOrId", {
575
582
  </dl>
576
583
  </details>
577
584
 
578
- <details><summary><code>client.agents.<a href="/src/api/resources/agents/client/Client.ts">removeCustomPhoneNumber</a>(nameOrId, { ...params }) -> Phonic.AgentsRemoveCustomPhoneNumberResponse</code></summary>
585
+ <details><summary><code>client.agents.<a href="/src/api/resources/agents/client/Client.ts">deleteCustomPhoneNumber</a>(nameOrId, { ...params }) -> Phonic.AgentsDeleteCustomPhoneNumberResponse</code></summary>
586
+ <dl>
587
+ <dd>
588
+
589
+ #### 📝 Description
590
+
591
+ <dl>
592
+ <dd>
593
+
594
+ <dl>
595
+ <dd>
596
+
597
+ Deletes a custom phone number from an agent.
598
+
599
+ </dd>
600
+ </dl>
601
+ </dd>
602
+ </dl>
603
+
604
+ #### 🔌 Usage
605
+
606
+ <dl>
607
+ <dd>
608
+
609
+ <dl>
610
+ <dd>
611
+
612
+ ```typescript
613
+ await client.agents.deleteCustomPhoneNumber("nameOrId", {
614
+ project: "main",
615
+ phone_number: "+15551234567",
616
+ });
617
+ ```
618
+
619
+ </dd>
620
+ </dl>
621
+ </dd>
622
+ </dl>
623
+
624
+ #### ⚙️ Parameters
625
+
626
+ <dl>
627
+ <dd>
628
+
629
+ <dl>
630
+ <dd>
631
+
632
+ **nameOrId:** `string` — The name or the ID of the agent.
633
+
634
+ </dd>
635
+ </dl>
636
+
637
+ <dl>
638
+ <dd>
639
+
640
+ **request:** `Phonic.AgentsDeleteCustomPhoneNumberRequest`
641
+
642
+ </dd>
643
+ </dl>
644
+
645
+ <dl>
646
+ <dd>
647
+
648
+ **requestOptions:** `Agents.RequestOptions`
649
+
650
+ </dd>
651
+ </dl>
652
+ </dd>
653
+ </dl>
654
+
655
+ </dd>
656
+ </dl>
657
+ </details>
658
+
659
+ <details><summary><code>client.agents.<a href="/src/api/resources/agents/client/Client.ts">updatePhoneNumber</a>(nameOrId, { ...params }) -> Phonic.AgentsUpdatePhoneNumberResponse</code></summary>
579
660
  <dl>
580
661
  <dd>
581
662
 
@@ -587,7 +668,7 @@ await client.agents.addCustomPhoneNumber("nameOrId", {
587
668
  <dl>
588
669
  <dd>
589
670
 
590
- Removes a custom phone number from an agent.
671
+ Updates a phone number on an agent.
591
672
 
592
673
  </dd>
593
674
  </dl>
@@ -603,9 +684,16 @@ Removes a custom phone number from an agent.
603
684
  <dd>
604
685
 
605
686
  ```typescript
606
- await client.agents.removeCustomPhoneNumber("nameOrId", {
687
+ await client.agents.updatePhoneNumber("nameOrId", {
607
688
  project: "main",
608
689
  phone_number: "+15551234567",
690
+ configuration_endpoint: {
691
+ url: "https://api.example.com/config",
692
+ headers: {
693
+ Authorization: "Bearer token123",
694
+ },
695
+ timeout_ms: 7000,
696
+ },
609
697
  });
610
698
  ```
611
699
 
@@ -630,7 +718,7 @@ await client.agents.removeCustomPhoneNumber("nameOrId", {
630
718
  <dl>
631
719
  <dd>
632
720
 
633
- **request:** `Phonic.AgentsRemoveCustomPhoneNumberRequest`
721
+ **request:** `Phonic.AgentsUpdatePhoneNumberRequest`
634
722
 
635
723
  </dd>
636
724
  </dl>
@@ -2098,7 +2186,7 @@ await client.conversations.outboundCall({
2098
2186
  customer_name: "David",
2099
2187
  subject: "Chess",
2100
2188
  },
2101
- voice_id: "grant",
2189
+ voice_id: "sabrina",
2102
2190
  no_input_poke_sec: 30,
2103
2191
  no_input_poke_text: "Are you still there?",
2104
2192
  no_input_end_conversation_sec: 180,