phonic 0.21.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -62,6 +62,7 @@ const createAgentResult = await phonic.agents.create({
62
62
  // Optional fields
63
63
  project: "my-project", // Defaults to "main"
64
64
  phoneNumber: "assign-automatically", // Defaults to null
65
+ timezone: "Australia/Melbourne", // Defaults to "America/Los_Angeles"
65
66
  audioFormat: "mulaw_8000", // Defaults to "pcm_44100". Must be "mulaw_8000" when `phoneNumber` is "assign-automatically"
66
67
  voiceId: "sarah", // Defaults to "grant"
67
68
  welcomeMessage: "Hello, how can I help you?", // Defaults to ""
@@ -98,6 +99,7 @@ const updateAgentResult = await phonic.agents.update("my-agent", {
98
99
  // Optional fields
99
100
  project: "my-project",
100
101
  phoneNumber: "assign-automatically", // or null
102
+ timezone: "Australia/Melbourne",
101
103
  voiceId: "sarah",
102
104
  audioFormat: "mulaw_8000", // Must be "mulaw_8000" when `phoneNumber` is "assign-automatically"
103
105
  welcomeMessage: "Hello, how can I help you?",
package/dist/index.d.mts CHANGED
@@ -112,6 +112,7 @@ type PhonicConfigurationEndpointRequestPayload = {
112
112
  type PhonicConfigurationEndpointResponsePayload = {
113
113
  welcome_message?: string | null;
114
114
  system_prompt?: string;
115
+ template_variables?: Record<string, string>;
115
116
  tools?: Array<PhonicTool>;
116
117
  boosted_keywords?: string[];
117
118
  };
@@ -157,6 +158,7 @@ type GetAgentSuccessResponse = DataOrError<{
157
158
  }>;
158
159
  interface AgentOptionalParams {
159
160
  project?: string;
161
+ timezone?: string;
160
162
  voiceId?: string;
161
163
  welcomeMessage?: string;
162
164
  systemPrompt?: string;
package/dist/index.d.ts CHANGED
@@ -112,6 +112,7 @@ type PhonicConfigurationEndpointRequestPayload = {
112
112
  type PhonicConfigurationEndpointResponsePayload = {
113
113
  welcome_message?: string | null;
114
114
  system_prompt?: string;
115
+ template_variables?: Record<string, string>;
115
116
  tools?: Array<PhonicTool>;
116
117
  boosted_keywords?: string[];
117
118
  };
@@ -157,6 +158,7 @@ type GetAgentSuccessResponse = DataOrError<{
157
158
  }>;
158
159
  interface AgentOptionalParams {
159
160
  project?: string;
161
+ timezone?: string;
160
162
  voiceId?: string;
161
163
  welcomeMessage?: string;
162
164
  systemPrompt?: string;
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ __export(index_exports, {
35
35
  module.exports = __toCommonJS(index_exports);
36
36
 
37
37
  // package.json
38
- var version = "0.21.0";
38
+ var version = "0.22.0";
39
39
 
40
40
  // src/agents/index.ts
41
41
  var Agents = class {
@@ -90,6 +90,7 @@ var Agents = class {
90
90
  {
91
91
  name: params.name,
92
92
  phone_number: params.phoneNumber,
93
+ timezone: params.timezone,
93
94
  audio_format: params.phoneNumber === "assign-automatically" ? "mulaw_8000" : params.audioFormat,
94
95
  voice_id: params.voiceId,
95
96
  welcome_message: params.welcomeMessage,
@@ -115,6 +116,7 @@ var Agents = class {
115
116
  {
116
117
  name: params.name,
117
118
  phone_number: params.phoneNumber,
119
+ timezone: params.timezone,
118
120
  audio_format: params.phoneNumber === "assign-automatically" ? "mulaw_8000" : params.audioFormat,
119
121
  voice_id: params.voiceId,
120
122
  welcome_message: params.welcomeMessage,
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.21.0";
2
+ var version = "0.22.0";
3
3
 
4
4
  // src/agents/index.ts
5
5
  var Agents = class {
@@ -54,6 +54,7 @@ var Agents = class {
54
54
  {
55
55
  name: params.name,
56
56
  phone_number: params.phoneNumber,
57
+ timezone: params.timezone,
57
58
  audio_format: params.phoneNumber === "assign-automatically" ? "mulaw_8000" : params.audioFormat,
58
59
  voice_id: params.voiceId,
59
60
  welcome_message: params.welcomeMessage,
@@ -79,6 +80,7 @@ var Agents = class {
79
80
  {
80
81
  name: params.name,
81
82
  phone_number: params.phoneNumber,
83
+ timezone: params.timezone,
82
84
  audio_format: params.phoneNumber === "assign-automatically" ? "mulaw_8000" : params.audioFormat,
83
85
  voice_id: params.voiceId,
84
86
  welcome_message: params.welcomeMessage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phonic",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "description": "Phonic Node.js SDK",
5
5
  "scripts": {
6
6
  "build": "tsup",