phonic 0.31.7 → 0.31.9

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 (89) hide show
  1. package/README.md +1 -0
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/api/resources/agents/client/Client.d.ts +3 -0
  4. package/dist/cjs/api/resources/agents/client/Client.js +3 -0
  5. package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.d.ts +3 -0
  6. package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +3 -0
  7. package/dist/cjs/api/resources/agents/client/requests/UpsertAgentRequest.d.ts +1 -0
  8. package/dist/cjs/api/resources/conversations/client/Client.js +4 -3
  9. package/dist/cjs/api/resources/conversations/client/Socket.d.ts +1 -1
  10. package/dist/cjs/api/resources/conversations/client/requests/ConversationsSipOutboundCallRequest.d.ts +2 -0
  11. package/dist/cjs/api/resources/conversations/client/requests/OutboundCallRequest.d.ts +5 -1
  12. package/dist/cjs/api/resources/conversations/types/ConversationsOutboundCallResponse.d.ts +2 -4
  13. package/dist/cjs/api/resources/conversations/types/ConversationsSipOutboundCallResponse.d.ts +2 -6
  14. package/dist/cjs/api/types/Agent.d.ts +2 -0
  15. package/dist/cjs/api/types/ConfigPayload.d.ts +2 -0
  16. package/dist/cjs/api/types/Conversation.d.ts +2 -0
  17. package/dist/cjs/api/types/CreateAgentRequest.d.ts +2 -0
  18. package/dist/cjs/api/types/OutboundCallConfig.d.ts +2 -0
  19. package/dist/cjs/api/types/OutboundCallInitiatedResponse.d.ts +6 -0
  20. package/dist/cjs/api/types/{InterruptedResponsePayload.js → OutboundCallInitiatedResponse.js} +1 -3
  21. package/dist/cjs/api/types/OutboundDryRunResponse.d.ts +6 -0
  22. package/dist/cjs/api/{resources/agents/client/requests/AgentsRemoveCustomPhoneNumberRequest.js → types/OutboundDryRunResponse.js} +1 -3
  23. package/dist/cjs/api/types/SipOutboundCallInitiatedResponse.d.ts +8 -0
  24. package/dist/cjs/api/types/{AudioFinishedPayload.js → SipOutboundCallInitiatedResponse.js} +1 -3
  25. package/dist/cjs/api/types/SipOutboundDryRunResponse.d.ts +8 -0
  26. package/dist/cjs/api/{resources/agents/types/AgentsRemoveCustomPhoneNumberResponse.js → types/SipOutboundDryRunResponse.js} +1 -3
  27. package/dist/cjs/api/types/index.d.ts +4 -0
  28. package/dist/cjs/api/types/index.js +4 -0
  29. package/dist/cjs/version.d.ts +1 -1
  30. package/dist/cjs/version.js +1 -1
  31. package/dist/esm/BaseClient.mjs +2 -2
  32. package/dist/esm/api/resources/agents/client/Client.d.mts +3 -0
  33. package/dist/esm/api/resources/agents/client/Client.mjs +3 -0
  34. package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.d.mts +3 -0
  35. package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +3 -0
  36. package/dist/esm/api/resources/agents/client/requests/UpsertAgentRequest.d.mts +1 -0
  37. package/dist/esm/api/resources/conversations/client/Client.mjs +4 -3
  38. package/dist/esm/api/resources/conversations/client/Socket.d.mts +1 -1
  39. package/dist/esm/api/resources/conversations/client/requests/ConversationsSipOutboundCallRequest.d.mts +2 -0
  40. package/dist/esm/api/resources/conversations/client/requests/OutboundCallRequest.d.mts +5 -1
  41. package/dist/esm/api/resources/conversations/types/ConversationsOutboundCallResponse.d.mts +2 -4
  42. package/dist/esm/api/resources/conversations/types/ConversationsSipOutboundCallResponse.d.mts +2 -6
  43. package/dist/esm/api/types/Agent.d.mts +2 -0
  44. package/dist/esm/api/types/ConfigPayload.d.mts +2 -0
  45. package/dist/esm/api/types/Conversation.d.mts +2 -0
  46. package/dist/esm/api/types/CreateAgentRequest.d.mts +2 -0
  47. package/dist/esm/api/types/OutboundCallConfig.d.mts +2 -0
  48. package/dist/esm/api/types/OutboundCallInitiatedResponse.d.mts +6 -0
  49. package/dist/esm/api/types/OutboundCallInitiatedResponse.mjs +2 -0
  50. package/dist/esm/api/types/OutboundDryRunResponse.d.mts +6 -0
  51. package/dist/esm/api/types/OutboundDryRunResponse.mjs +2 -0
  52. package/dist/esm/api/types/SipOutboundCallInitiatedResponse.d.mts +8 -0
  53. package/dist/esm/api/types/SipOutboundCallInitiatedResponse.mjs +2 -0
  54. package/dist/esm/api/types/SipOutboundDryRunResponse.d.mts +8 -0
  55. package/dist/esm/api/types/SipOutboundDryRunResponse.mjs +2 -0
  56. package/dist/esm/api/types/index.d.mts +4 -0
  57. package/dist/esm/api/types/index.mjs +4 -0
  58. package/dist/esm/version.d.mts +1 -1
  59. package/dist/esm/version.mjs +1 -1
  60. package/package.json +7 -7
  61. package/reference.md +6 -1
  62. package/dist/cjs/api/resources/agents/client/requests/AgentsRemoveCustomPhoneNumberRequest.d.ts +0 -16
  63. package/dist/cjs/api/resources/agents/types/AgentsRemoveCustomPhoneNumberResponse.d.ts +0 -6
  64. package/dist/cjs/api/types/AudioFinishedPayload.d.ts +0 -6
  65. package/dist/cjs/api/types/InterruptedResponsePayload.d.ts +0 -8
  66. package/dist/cjs/api/types/IsUserSpeakingPayload.d.ts +0 -8
  67. package/dist/cjs/api/types/IsUserSpeakingPayload.js +0 -5
  68. package/dist/cjs/api/types/SetTwilioCallSidPayload.d.ts +0 -8
  69. package/dist/cjs/api/types/SetTwilioCallSidPayload.js +0 -5
  70. package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +0 -4
  71. package/dist/cjs/core/fetcher/ResponseWithBody.js +0 -6
  72. package/dist/esm/api/resources/agents/client/requests/AgentsRemoveCustomPhoneNumberRequest.d.mts +0 -16
  73. package/dist/esm/api/resources/agents/client/requests/AgentsRemoveCustomPhoneNumberRequest.mjs +0 -4
  74. package/dist/esm/api/resources/agents/types/AgentsRemoveCustomPhoneNumberResponse.d.mts +0 -6
  75. package/dist/esm/api/resources/agents/types/AgentsRemoveCustomPhoneNumberResponse.mjs +0 -4
  76. package/dist/esm/api/types/AudioFinishedPayload.d.mts +0 -6
  77. package/dist/esm/api/types/AudioFinishedPayload.mjs +0 -4
  78. package/dist/esm/api/types/InterruptedResponsePayload.d.mts +0 -8
  79. package/dist/esm/api/types/InterruptedResponsePayload.mjs +0 -4
  80. package/dist/esm/api/types/IsUserSpeakingPayload.d.mts +0 -8
  81. package/dist/esm/api/types/IsUserSpeakingPayload.mjs +0 -4
  82. package/dist/esm/api/types/SetTwilioCallSidPayload.d.mts +0 -8
  83. package/dist/esm/api/types/SetTwilioCallSidPayload.mjs +0 -4
  84. package/dist/esm/core/fetcher/ResponseWithBody.d.mts +0 -4
  85. package/dist/esm/core/fetcher/ResponseWithBody.mjs +0 -3
  86. package/dist/index.d.mts +0 -686
  87. package/dist/index.d.ts +0 -686
  88. package/dist/index.js +0 -643
  89. package/dist/index.mjs +0 -606
@@ -0,0 +1,8 @@
1
+ export interface SipOutboundCallInitiatedResponse {
2
+ /** The ID of the created conversation. */
3
+ conversation_id: string;
4
+ /** The Twilio Call SID. */
5
+ twilio_call_sid: string;
6
+ /** Always false when a call was placed. */
7
+ dry_run: false;
8
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,8 @@
1
+ export interface SipOutboundDryRunResponse {
2
+ /** Always null when `dry_run` is true. */
3
+ conversation_id: unknown | null;
4
+ /** Always null when `dry_run` is true. */
5
+ twilio_call_sid: unknown | null;
6
+ /** Always true for this response. */
7
+ dry_run: true;
8
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -29,10 +29,14 @@ export * from "./InputCancelledPayload.mjs";
29
29
  export * from "./InputTextPayload.mjs";
30
30
  export * from "./LanguageCode.mjs";
31
31
  export * from "./OutboundCallConfig.mjs";
32
+ export * from "./OutboundCallInitiatedResponse.mjs";
33
+ export * from "./OutboundDryRunResponse.mjs";
32
34
  export * from "./Project.mjs";
33
35
  export * from "./ReadyToStartConversationPayload.mjs";
34
36
  export * from "./SayPayload.mjs";
35
37
  export * from "./SetExternalIdPayload.mjs";
38
+ export * from "./SipOutboundCallInitiatedResponse.mjs";
39
+ export * from "./SipOutboundDryRunResponse.mjs";
36
40
  export * from "./Task.mjs";
37
41
  export * from "./Tool.mjs";
38
42
  export * from "./ToolCallInterruptedPayload.mjs";
@@ -29,10 +29,14 @@ export * from "./InputCancelledPayload.mjs";
29
29
  export * from "./InputTextPayload.mjs";
30
30
  export * from "./LanguageCode.mjs";
31
31
  export * from "./OutboundCallConfig.mjs";
32
+ export * from "./OutboundCallInitiatedResponse.mjs";
33
+ export * from "./OutboundDryRunResponse.mjs";
32
34
  export * from "./Project.mjs";
33
35
  export * from "./ReadyToStartConversationPayload.mjs";
34
36
  export * from "./SayPayload.mjs";
35
37
  export * from "./SetExternalIdPayload.mjs";
38
+ export * from "./SipOutboundCallInitiatedResponse.mjs";
39
+ export * from "./SipOutboundDryRunResponse.mjs";
36
40
  export * from "./Task.mjs";
37
41
  export * from "./Tool.mjs";
38
42
  export * from "./ToolCallInterruptedPayload.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.31.7";
1
+ export declare const SDK_VERSION = "0.31.9";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.31.7";
1
+ export const SDK_VERSION = "0.31.9";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phonic",
3
- "version": "0.31.7",
3
+ "version": "0.31.9",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -122,12 +122,12 @@
122
122
  "test:wire": "jest --selectProjects wire"
123
123
  },
124
124
  "dependencies": {
125
- "ws": "^8.16.0"
125
+ "ws": "^8.20.0"
126
126
  },
127
127
  "devDependencies": {
128
- "webpack": "^5.97.1",
129
- "ts-loader": "^9.5.1",
130
- "@types/ws": "^8.5.10",
128
+ "webpack": "^5.105.4",
129
+ "ts-loader": "^9.5.4",
130
+ "@types/ws": "^8.18.1",
131
131
  "jest": "^29.7.0",
132
132
  "@jest/globals": "^29.7.0",
133
133
  "@types/jest": "^29.5.14",
@@ -135,8 +135,8 @@
135
135
  "jest-environment-jsdom": "^29.7.0",
136
136
  "msw": "2.11.2",
137
137
  "@types/node": "^18.19.70",
138
- "typescript": "~5.7.2",
139
- "@biomejs/biome": "2.4.3"
138
+ "typescript": "~5.9.3",
139
+ "@biomejs/biome": "2.4.9"
140
140
  },
141
141
  "browser": {
142
142
  "fs": false,
package/reference.md CHANGED
@@ -117,6 +117,7 @@ await client.agents.create({
117
117
  additional_languages: ["es"],
118
118
  multilingual_mode: "request",
119
119
  boosted_keywords: ["Load ID", "dispatch"],
120
+ min_words_to_interrupt: 1,
120
121
  configuration_endpoint: {
121
122
  url: "https://api.example.com/config",
122
123
  headers: {
@@ -214,6 +215,7 @@ await client.agents.upsert({
214
215
  additional_languages: ["es"],
215
216
  multilingual_mode: "request",
216
217
  boosted_keywords: ["Load ID", "dispatch"],
218
+ min_words_to_interrupt: 1,
217
219
  configuration_endpoint: {
218
220
  url: "https://api.example.com/config",
219
221
  headers: {
@@ -457,6 +459,7 @@ await client.agents.update("nameOrId", {
457
459
  additional_languages: ["es"],
458
460
  multilingual_mode: "request",
459
461
  boosted_keywords: ["Load ID", "dispatch"],
462
+ min_words_to_interrupt: 1,
460
463
  configuration_endpoint: {
461
464
  url: "https://api.example.com/config",
462
465
  headers: {
@@ -2196,8 +2199,10 @@ await client.conversations.outboundCall({
2196
2199
  additional_languages: ["es"],
2197
2200
  multilingual_mode: "request",
2198
2201
  boosted_keywords: ["Load ID", "dispatch"],
2202
+ min_words_to_interrupt: 1,
2199
2203
  tools: ["keypad_input"]
2200
- }
2204
+ },
2205
+ dry_run: false
2201
2206
  });
2202
2207
 
2203
2208
  ```
@@ -1,16 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- /**
5
- * @example
6
- * {
7
- * project: "main",
8
- * phone_number: "+15551234567"
9
- * }
10
- */
11
- export interface AgentsRemoveCustomPhoneNumberRequest {
12
- /** The name of the project containing the agent. Only used when `nameOrId` is a name. */
13
- project?: string;
14
- /** The E.164 formatted phone number to remove (e.g., "+15551234567"). */
15
- phone_number: string;
16
- }
@@ -1,6 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface AgentsRemoveCustomPhoneNumberResponse {
5
- success: boolean;
6
- }
@@ -1,6 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface AudioFinishedPayload {
5
- type: "audio_finished";
6
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface InterruptedResponsePayload {
5
- type: "interrupted_response";
6
- /** Truncated AI response text at interruption point */
7
- text: string;
8
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface IsUserSpeakingPayload {
5
- type: "is_user_speaking";
6
- /** Whether the user is currently speaking */
7
- is_user_speaking: boolean;
8
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface SetTwilioCallSidPayload {
5
- type: "set_twilio_call_sid";
6
- /** Encrypted Twilio call data */
7
- encrypted_data: string;
8
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- export type ResponseWithBody = Response & {
2
- body: ReadableStream<Uint8Array>;
3
- };
4
- export declare function isResponseWithBody(response: Response): response is ResponseWithBody;
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isResponseWithBody = isResponseWithBody;
4
- function isResponseWithBody(response) {
5
- return response.body != null;
6
- }
@@ -1,16 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- /**
5
- * @example
6
- * {
7
- * project: "main",
8
- * phone_number: "+15551234567"
9
- * }
10
- */
11
- export interface AgentsRemoveCustomPhoneNumberRequest {
12
- /** The name of the project containing the agent. Only used when `nameOrId` is a name. */
13
- project?: string;
14
- /** The E.164 formatted phone number to remove (e.g., "+15551234567"). */
15
- phone_number: string;
16
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -1,6 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface AgentsRemoveCustomPhoneNumberResponse {
5
- success: boolean;
6
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -1,6 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface AudioFinishedPayload {
5
- type: "audio_finished";
6
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -1,8 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface InterruptedResponsePayload {
5
- type: "interrupted_response";
6
- /** Truncated AI response text at interruption point */
7
- text: string;
8
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -1,8 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface IsUserSpeakingPayload {
5
- type: "is_user_speaking";
6
- /** Whether the user is currently speaking */
7
- is_user_speaking: boolean;
8
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -1,8 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface SetTwilioCallSidPayload {
5
- type: "set_twilio_call_sid";
6
- /** Encrypted Twilio call data */
7
- encrypted_data: string;
8
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -1,4 +0,0 @@
1
- export type ResponseWithBody = Response & {
2
- body: ReadableStream<Uint8Array>;
3
- };
4
- export declare function isResponseWithBody(response: Response): response is ResponseWithBody;
@@ -1,3 +0,0 @@
1
- export function isResponseWithBody(response) {
2
- return response.body != null;
3
- }