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 +10 -10
- package/dist/index.d.mts +1 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
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
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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
package/dist/index.mjs
CHANGED