phonic 0.18.0 → 0.18.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/README.md CHANGED
@@ -98,9 +98,8 @@ if (error === null) {
98
98
 
99
99
  ```ts
100
100
  const { data, error } = await phonic.sts.outboundCall("+19189396241", {
101
- welcome_message: "Hello, how can I help you?",
102
-
103
101
  // Optional fields
102
+ welcome_message: "Hello, how can I help you?",
104
103
  project: "main",
105
104
  system_prompt: "You are a helpful assistant.",
106
105
  voice_id: "greta",
@@ -114,19 +113,20 @@ const { data, error } = await phonic.sts.outboundCall("+19189396241", {
114
113
 
115
114
  ### STS outbound call using own Twilio account
116
115
 
116
+ In Twilio, create a restricted API key with the following permission: voice -> calls -> create
117
+
117
118
  ```ts
118
119
  const { data, error } = await phonic.sts.twilio.outboundCall(
119
120
  {
120
- account_sid: "AC...",
121
- api_key_sid: "SK...",
122
- api_key_secret: "...",
123
- from_phone_number: "+19189372905",
124
- to_phone_number: "+19189396241",
125
- },
121
+ account_sid: "AC...",
122
+ api_key_sid: "SK...",
123
+ api_key_secret: "...",
124
+ from_phone_number: "+19189372905",
125
+ to_phone_number: "+19189396241",
126
+ },
126
127
  {
127
- welcome_message: "Hello, how can I help you?",
128
-
129
128
  // Optional fields
129
+ welcome_message: "Hello, how can I help you?",
130
130
  project: "main",
131
131
  system_prompt: "You are a helpful assistant.",
132
132
  voice_id: "greta",
package/dist/index.d.mts CHANGED
@@ -125,9 +125,7 @@ type PhonicSTSWebSocketResponseMessage = {
125
125
  type OnMessageCallback = (message: PhonicSTSWebSocketResponseMessage) => void;
126
126
  type OnCloseCallback = (event: WebSocket.CloseEvent) => void;
127
127
  type OnErrorCallback = (event: WebSocket.ErrorEvent) => void;
128
- type PhonicSTSOutboundCallConfig = Omit<PhonicSTSConfig, "input_format" | "output_format"> & {
129
- welcome_message: string;
130
- };
128
+ type PhonicSTSOutboundCallConfig = Omit<PhonicSTSConfig, "input_format" | "output_format">;
131
129
  type OutboundCallSuccessResponse = {
132
130
  success: true;
133
131
  };
package/dist/index.d.ts CHANGED
@@ -125,9 +125,7 @@ type PhonicSTSWebSocketResponseMessage = {
125
125
  type OnMessageCallback = (message: PhonicSTSWebSocketResponseMessage) => void;
126
126
  type OnCloseCallback = (event: WebSocket.CloseEvent) => void;
127
127
  type OnErrorCallback = (event: WebSocket.ErrorEvent) => void;
128
- type PhonicSTSOutboundCallConfig = Omit<PhonicSTSConfig, "input_format" | "output_format"> & {
129
- welcome_message: string;
130
- };
128
+ type PhonicSTSOutboundCallConfig = Omit<PhonicSTSConfig, "input_format" | "output_format">;
131
129
  type OutboundCallSuccessResponse = {
132
130
  success: true;
133
131
  };
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.18.0";
38
+ var version = "0.18.2";
39
39
 
40
40
  // src/conversations/index.ts
41
41
  var Conversations = class {
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.18.0";
2
+ var version = "0.18.2";
3
3
 
4
4
  // src/conversations/index.ts
5
5
  var Conversations = class {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phonic",
3
- "version": "0.18.0",
3
+ "version": "0.18.2",
4
4
  "description": "Phonic Node.js SDK",
5
5
  "scripts": {
6
6
  "build": "tsup",