phonic 0.31.15 → 0.31.17

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.
Files changed (95) hide show
  1. package/README.md +394 -0
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/Client.d.ts +3 -0
  4. package/dist/cjs/Client.js +9 -4
  5. package/dist/cjs/api/resources/agents/client/Client.d.ts +12 -0
  6. package/dist/cjs/api/resources/agents/client/Client.js +12 -0
  7. package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.d.ts +6 -0
  8. package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +13 -0
  9. package/dist/cjs/api/resources/agents/client/requests/UpsertAgentRequest.d.ts +4 -0
  10. package/dist/cjs/api/resources/conversations/client/requests/OutboundCallRequest.d.ts +4 -0
  11. package/dist/cjs/api/resources/index.d.ts +2 -0
  12. package/dist/cjs/api/resources/index.js +3 -1
  13. package/dist/cjs/api/resources/tts/client/Client.d.ts +23 -0
  14. package/dist/cjs/api/resources/tts/client/Client.js +115 -0
  15. package/dist/cjs/api/resources/tts/client/index.d.ts +1 -0
  16. package/dist/cjs/api/resources/tts/client/index.js +17 -0
  17. package/dist/cjs/api/resources/tts/client/requests/StreamTtsRequest.d.ts +28 -0
  18. package/dist/cjs/api/resources/tts/client/requests/StreamTtsRequest.js +14 -0
  19. package/dist/cjs/api/resources/tts/client/requests/index.d.ts +1 -0
  20. package/dist/cjs/api/resources/tts/client/requests/index.js +5 -0
  21. package/dist/cjs/api/resources/tts/exports.d.ts +2 -0
  22. package/dist/cjs/api/resources/tts/exports.js +21 -0
  23. package/dist/cjs/api/resources/tts/index.d.ts +1 -0
  24. package/dist/cjs/api/resources/tts/index.js +17 -0
  25. package/dist/cjs/api/types/Agent.d.ts +9 -0
  26. package/dist/cjs/api/types/ConfigOptions.d.ts +11 -5
  27. package/dist/cjs/api/types/Conversation.d.ts +9 -0
  28. package/dist/cjs/api/types/CreateAgentRequest.d.ts +9 -0
  29. package/dist/cjs/api/types/InlineWebSocketTool.d.ts +30 -0
  30. package/dist/cjs/api/types/InlineWebSocketTool.js +12 -0
  31. package/dist/cjs/api/types/OpenAiFunction.d.ts +10 -0
  32. package/dist/cjs/api/types/OpenAiFunction.js +3 -0
  33. package/dist/cjs/api/types/OpenAiFunctionParameters.d.ts +4 -0
  34. package/dist/cjs/api/types/OpenAiFunctionParameters.js +3 -0
  35. package/dist/cjs/api/types/OpenAiTool.d.ts +8 -0
  36. package/dist/cjs/api/types/OpenAiTool.js +3 -0
  37. package/dist/cjs/api/types/OutboundCallConfig.d.ts +9 -0
  38. package/dist/cjs/api/types/ToolDefinition.d.ts +2 -0
  39. package/dist/cjs/api/types/ToolDefinition.js +3 -0
  40. package/dist/cjs/api/types/ToolName.d.ts +4 -0
  41. package/dist/cjs/api/types/ToolName.js +3 -0
  42. package/dist/cjs/api/types/index.d.ts +6 -0
  43. package/dist/cjs/api/types/index.js +6 -0
  44. package/dist/cjs/environments.d.ts +2 -2
  45. package/dist/cjs/environments.js +2 -2
  46. package/dist/cjs/version.d.ts +1 -1
  47. package/dist/cjs/version.js +1 -1
  48. package/dist/esm/BaseClient.mjs +2 -2
  49. package/dist/esm/Client.d.mts +3 -0
  50. package/dist/esm/Client.mjs +5 -0
  51. package/dist/esm/api/resources/agents/client/Client.d.mts +12 -0
  52. package/dist/esm/api/resources/agents/client/Client.mjs +12 -0
  53. package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.d.mts +6 -0
  54. package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +13 -0
  55. package/dist/esm/api/resources/agents/client/requests/UpsertAgentRequest.d.mts +4 -0
  56. package/dist/esm/api/resources/conversations/client/requests/OutboundCallRequest.d.mts +4 -0
  57. package/dist/esm/api/resources/index.d.mts +2 -0
  58. package/dist/esm/api/resources/index.mjs +2 -0
  59. package/dist/esm/api/resources/tts/client/Client.d.mts +23 -0
  60. package/dist/esm/api/resources/tts/client/Client.mjs +78 -0
  61. package/dist/esm/api/resources/tts/client/index.d.mts +1 -0
  62. package/dist/esm/api/resources/tts/client/index.mjs +1 -0
  63. package/dist/esm/api/resources/tts/client/requests/StreamTtsRequest.d.mts +28 -0
  64. package/dist/esm/api/resources/tts/client/requests/StreamTtsRequest.mjs +11 -0
  65. package/dist/esm/api/resources/tts/client/requests/index.d.mts +1 -0
  66. package/dist/esm/api/resources/tts/client/requests/index.mjs +1 -0
  67. package/dist/esm/api/resources/tts/exports.d.mts +2 -0
  68. package/dist/esm/api/resources/tts/exports.mjs +3 -0
  69. package/dist/esm/api/resources/tts/index.d.mts +1 -0
  70. package/dist/esm/api/resources/tts/index.mjs +1 -0
  71. package/dist/esm/api/types/Agent.d.mts +9 -0
  72. package/dist/esm/api/types/ConfigOptions.d.mts +11 -5
  73. package/dist/esm/api/types/Conversation.d.mts +9 -0
  74. package/dist/esm/api/types/CreateAgentRequest.d.mts +9 -0
  75. package/dist/esm/api/types/InlineWebSocketTool.d.mts +30 -0
  76. package/dist/esm/api/types/InlineWebSocketTool.mjs +9 -0
  77. package/dist/esm/api/types/OpenAiFunction.d.mts +10 -0
  78. package/dist/esm/api/types/OpenAiFunction.mjs +2 -0
  79. package/dist/esm/api/types/OpenAiFunctionParameters.d.mts +4 -0
  80. package/dist/esm/api/types/OpenAiFunctionParameters.mjs +2 -0
  81. package/dist/esm/api/types/OpenAiTool.d.mts +8 -0
  82. package/dist/esm/api/types/OpenAiTool.mjs +2 -0
  83. package/dist/esm/api/types/OutboundCallConfig.d.mts +9 -0
  84. package/dist/esm/api/types/ToolDefinition.d.mts +2 -0
  85. package/dist/esm/api/types/ToolDefinition.mjs +2 -0
  86. package/dist/esm/api/types/ToolName.d.mts +4 -0
  87. package/dist/esm/api/types/ToolName.mjs +2 -0
  88. package/dist/esm/api/types/index.d.mts +6 -0
  89. package/dist/esm/api/types/index.mjs +6 -0
  90. package/dist/esm/environments.d.mts +2 -2
  91. package/dist/esm/environments.mjs +2 -2
  92. package/dist/esm/version.d.mts +1 -1
  93. package/dist/esm/version.mjs +1 -1
  94. package/package.json +19 -8
  95. package/reference.md +82 -0
@@ -1,7 +1,7 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  export const PhonicEnvironment = {
3
3
  Default: {
4
- base: "https://api.phonic.co/v1",
5
- production: "wss://api.phonic.co",
4
+ base: "https://api.phonic.ai/v1",
5
+ production: "wss://api.phonic.ai",
6
6
  },
7
7
  };
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.31.13";
1
+ export declare const SDK_VERSION = "0.31.17";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.31.13";
1
+ export const SDK_VERSION = "0.31.17";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phonic",
3
- "version": "0.31.15",
3
+ "version": "0.31.17",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -111,6 +111,17 @@
111
111
  },
112
112
  "default": "./dist/cjs/api/resources/auth/exports.js"
113
113
  },
114
+ "./tts": {
115
+ "import": {
116
+ "types": "./dist/esm/api/resources/tts/exports.d.mts",
117
+ "default": "./dist/esm/api/resources/tts/exports.mjs"
118
+ },
119
+ "require": {
120
+ "types": "./dist/cjs/api/resources/tts/exports.d.ts",
121
+ "default": "./dist/cjs/api/resources/tts/exports.js"
122
+ },
123
+ "default": "./dist/cjs/api/resources/tts/exports.js"
124
+ },
114
125
  "./projects": {
115
126
  "import": {
116
127
  "types": "./dist/esm/api/resources/projects/exports.d.mts",
@@ -148,18 +159,18 @@
148
159
  "ws": "^8.20.0"
149
160
  },
150
161
  "devDependencies": {
151
- "@biomejs/biome": "2.4.9",
152
- "@jest/globals": "^29.7.0",
153
- "@types/jest": "^29.5.14",
154
- "@types/node": "^18.19.70",
162
+ "webpack": "^5.105.4",
163
+ "ts-loader": "^9.5.4",
155
164
  "@types/ws": "^8.18.1",
156
165
  "jest": "^29.7.0",
166
+ "@jest/globals": "^29.7.0",
167
+ "@types/jest": "^29.5.14",
168
+ "ts-jest": "^29.3.4",
157
169
  "jest-environment-jsdom": "^29.7.0",
158
170
  "msw": "2.11.2",
159
- "ts-jest": "^29.3.4",
160
- "ts-loader": "^9.5.4",
171
+ "@types/node": "^18.19.70",
161
172
  "typescript": "~5.9.3",
162
- "webpack": "^5.105.4"
173
+ "@biomejs/biome": "2.4.9"
163
174
  },
164
175
  "browser": {
165
176
  "fs": false,
package/reference.md CHANGED
@@ -118,6 +118,10 @@ await client.agents.create({
118
118
  multilingual_mode: "request",
119
119
  push_to_talk: false,
120
120
  boosted_keywords: ["Load ID", "dispatch"],
121
+ pronunciation_dictionary: [{
122
+ word: "Phuket",
123
+ pronunciation: "Poo-ket"
124
+ }],
121
125
  min_words_to_interrupt: 1,
122
126
  configuration_endpoint: {
123
127
  url: "https://api.example.com/config",
@@ -217,6 +221,10 @@ await client.agents.upsert({
217
221
  multilingual_mode: "request",
218
222
  push_to_talk: false,
219
223
  boosted_keywords: ["Load ID", "dispatch"],
224
+ pronunciation_dictionary: [{
225
+ word: "Phuket",
226
+ pronunciation: "Poo-ket"
227
+ }],
220
228
  min_words_to_interrupt: 1,
221
229
  configuration_endpoint: {
222
230
  url: "https://api.example.com/config",
@@ -462,6 +470,10 @@ await client.agents.update("nameOrId", {
462
470
  multilingual_mode: "request",
463
471
  push_to_talk: false,
464
472
  boosted_keywords: ["Load ID", "dispatch"],
473
+ pronunciation_dictionary: [{
474
+ word: "Phuket",
475
+ pronunciation: "Poo-ket"
476
+ }],
465
477
  min_words_to_interrupt: 1,
466
478
  configuration_endpoint: {
467
479
  url: "https://api.example.com/config",
@@ -2337,6 +2349,10 @@ await client.conversations.outboundCall({
2337
2349
  multilingual_mode: "request",
2338
2350
  push_to_talk: false,
2339
2351
  boosted_keywords: ["Load ID", "dispatch"],
2352
+ pronunciation_dictionary: [{
2353
+ word: "Phuket",
2354
+ pronunciation: "Poo-ket"
2355
+ }],
2340
2356
  min_words_to_interrupt: 1,
2341
2357
  tools: ["keypad_input"]
2342
2358
  },
@@ -2506,6 +2522,72 @@ await client.auth.createSessionToken({
2506
2522
  </dl>
2507
2523
 
2508
2524
 
2525
+ </dd>
2526
+ </dl>
2527
+ </details>
2528
+
2529
+ ## Tts
2530
+ <details><summary><code>client.tts.<a href="/src/api/resources/tts/client/Client.ts">stream</a>({ ...params }) -> core.BinaryResponse</code></summary>
2531
+ <dl>
2532
+ <dd>
2533
+
2534
+ #### 📝 Description
2535
+
2536
+ <dl>
2537
+ <dd>
2538
+
2539
+ <dl>
2540
+ <dd>
2541
+
2542
+ Streams generated speech audio for the provided text.
2543
+ </dd>
2544
+ </dl>
2545
+ </dd>
2546
+ </dl>
2547
+
2548
+ #### 🔌 Usage
2549
+
2550
+ <dl>
2551
+ <dd>
2552
+
2553
+ <dl>
2554
+ <dd>
2555
+
2556
+ ```typescript
2557
+ await client.tts.stream({
2558
+ text: "x"
2559
+ });
2560
+
2561
+ ```
2562
+ </dd>
2563
+ </dl>
2564
+ </dd>
2565
+ </dl>
2566
+
2567
+ #### ⚙️ Parameters
2568
+
2569
+ <dl>
2570
+ <dd>
2571
+
2572
+ <dl>
2573
+ <dd>
2574
+
2575
+ **request:** `Phonic.StreamTtsRequest`
2576
+
2577
+ </dd>
2578
+ </dl>
2579
+
2580
+ <dl>
2581
+ <dd>
2582
+
2583
+ **requestOptions:** `TtsClient.RequestOptions`
2584
+
2585
+ </dd>
2586
+ </dl>
2587
+ </dd>
2588
+ </dl>
2589
+
2590
+
2509
2591
  </dd>
2510
2592
  </dl>
2511
2593
  </details>