phonic 0.30.2 → 0.30.4

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 (105) hide show
  1. package/README.md +2 -771
  2. package/dist/cjs/Client.js +2 -2
  3. package/dist/cjs/api/resources/agents/client/Client.d.ts +3 -3
  4. package/dist/cjs/api/resources/agents/client/Client.js +27 -21
  5. package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.d.ts +2 -4
  6. package/dist/cjs/api/resources/agents/client/requests/AgentsDeleteRequest.d.ts +1 -3
  7. package/dist/cjs/api/resources/agents/client/requests/AgentsGetRequest.d.ts +1 -3
  8. package/dist/cjs/api/resources/agents/client/requests/AgentsListRequest.d.ts +1 -3
  9. package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +2 -4
  10. package/dist/cjs/api/resources/agents/client/requests/UpsertAgentRequest.d.ts +2 -4
  11. package/dist/cjs/api/resources/conversations/client/requests/ConversationsListRequest.d.ts +9 -27
  12. package/dist/cjs/api/resources/conversations/client/requests/ConversationsSipOutboundCallRequest.d.ts +5 -15
  13. package/dist/cjs/api/resources/conversations/client/requests/OutboundCallRequest.d.ts +1 -1
  14. package/dist/cjs/api/resources/extractionSchemas/client/Client.js +20 -15
  15. package/dist/cjs/api/resources/extractionSchemas/client/requests/CreateExtractionSchemaRequest.d.ts +1 -3
  16. package/dist/cjs/api/resources/extractionSchemas/client/requests/ExtractionSchemasDeleteRequest.d.ts +1 -3
  17. package/dist/cjs/api/resources/extractionSchemas/client/requests/ExtractionSchemasGetRequest.d.ts +1 -3
  18. package/dist/cjs/api/resources/extractionSchemas/client/requests/ExtractionSchemasListRequest.d.ts +1 -3
  19. package/dist/cjs/api/resources/extractionSchemas/client/requests/UpdateExtractionSchemaRequest.d.ts +1 -3
  20. package/dist/cjs/api/resources/projects/client/Client.js +28 -21
  21. package/dist/cjs/api/resources/tools/client/Client.d.ts +10 -0
  22. package/dist/cjs/api/resources/tools/client/Client.js +30 -15
  23. package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.d.ts +15 -4
  24. package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.js +1 -0
  25. package/dist/cjs/api/resources/tools/client/requests/ToolsDeleteRequest.d.ts +1 -3
  26. package/dist/cjs/api/resources/tools/client/requests/ToolsGetRequest.d.ts +6 -3
  27. package/dist/cjs/api/resources/tools/client/requests/ToolsListRequest.d.ts +1 -3
  28. package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.d.ts +5 -4
  29. package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.js +1 -0
  30. package/dist/cjs/api/resources/voices/client/Client.js +8 -6
  31. package/dist/cjs/api/resources/voices/client/requests/VoicesListRequest.d.ts +1 -3
  32. package/dist/cjs/api/types/Conversation.d.ts +2 -0
  33. package/dist/cjs/api/types/ConversationItem.d.ts +0 -2
  34. package/dist/cjs/api/types/IsUserSpeakingPayload.d.ts +8 -0
  35. package/dist/cjs/api/types/IsUserSpeakingPayload.js +5 -0
  36. package/dist/cjs/api/types/OutboundCallConfig.d.ts +1 -1
  37. package/dist/cjs/api/types/Tool.d.ts +4 -1
  38. package/dist/cjs/api/types/Tool.js +1 -0
  39. package/dist/cjs/api/types/index.d.ts +1 -0
  40. package/dist/cjs/api/types/index.js +1 -0
  41. package/dist/cjs/core/auth/AuthProvider.d.ts +4 -0
  42. package/dist/cjs/core/auth/AuthProvider.js +2 -0
  43. package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
  44. package/dist/cjs/core/auth/AuthRequest.js +2 -0
  45. package/dist/cjs/core/auth/index.d.ts +2 -0
  46. package/dist/cjs/core/fetcher/Fetcher.js +2 -2
  47. package/dist/cjs/core/fetcher/index.d.ts +5 -5
  48. package/dist/cjs/core/fetcher/index.js +5 -5
  49. package/dist/cjs/version.d.ts +1 -1
  50. package/dist/cjs/version.js +1 -1
  51. package/dist/esm/Client.mjs +2 -2
  52. package/dist/esm/api/resources/agents/client/Client.d.mts +3 -3
  53. package/dist/esm/api/resources/agents/client/Client.mjs +27 -21
  54. package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.d.mts +2 -4
  55. package/dist/esm/api/resources/agents/client/requests/AgentsDeleteRequest.d.mts +1 -3
  56. package/dist/esm/api/resources/agents/client/requests/AgentsGetRequest.d.mts +1 -3
  57. package/dist/esm/api/resources/agents/client/requests/AgentsListRequest.d.mts +1 -3
  58. package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +2 -4
  59. package/dist/esm/api/resources/agents/client/requests/UpsertAgentRequest.d.mts +2 -4
  60. package/dist/esm/api/resources/conversations/client/requests/ConversationsListRequest.d.mts +9 -27
  61. package/dist/esm/api/resources/conversations/client/requests/ConversationsSipOutboundCallRequest.d.mts +5 -15
  62. package/dist/esm/api/resources/conversations/client/requests/OutboundCallRequest.d.mts +1 -1
  63. package/dist/esm/api/resources/extractionSchemas/client/Client.mjs +20 -15
  64. package/dist/esm/api/resources/extractionSchemas/client/requests/CreateExtractionSchemaRequest.d.mts +1 -3
  65. package/dist/esm/api/resources/extractionSchemas/client/requests/ExtractionSchemasDeleteRequest.d.mts +1 -3
  66. package/dist/esm/api/resources/extractionSchemas/client/requests/ExtractionSchemasGetRequest.d.mts +1 -3
  67. package/dist/esm/api/resources/extractionSchemas/client/requests/ExtractionSchemasListRequest.d.mts +1 -3
  68. package/dist/esm/api/resources/extractionSchemas/client/requests/UpdateExtractionSchemaRequest.d.mts +1 -3
  69. package/dist/esm/api/resources/projects/client/Client.mjs +28 -21
  70. package/dist/esm/api/resources/tools/client/Client.d.mts +10 -0
  71. package/dist/esm/api/resources/tools/client/Client.mjs +30 -15
  72. package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.d.mts +15 -4
  73. package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.mjs +1 -0
  74. package/dist/esm/api/resources/tools/client/requests/ToolsDeleteRequest.d.mts +1 -3
  75. package/dist/esm/api/resources/tools/client/requests/ToolsGetRequest.d.mts +6 -3
  76. package/dist/esm/api/resources/tools/client/requests/ToolsListRequest.d.mts +1 -3
  77. package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.d.mts +5 -4
  78. package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.mjs +1 -0
  79. package/dist/esm/api/resources/voices/client/Client.mjs +8 -6
  80. package/dist/esm/api/resources/voices/client/requests/VoicesListRequest.d.mts +1 -3
  81. package/dist/esm/api/types/Conversation.d.mts +2 -0
  82. package/dist/esm/api/types/ConversationItem.d.mts +0 -2
  83. package/dist/esm/api/types/IsUserSpeakingPayload.d.mts +8 -0
  84. package/dist/esm/api/types/IsUserSpeakingPayload.mjs +4 -0
  85. package/dist/esm/api/types/OutboundCallConfig.d.mts +1 -1
  86. package/dist/esm/api/types/Tool.d.mts +4 -1
  87. package/dist/esm/api/types/Tool.mjs +1 -0
  88. package/dist/esm/api/types/index.d.mts +1 -0
  89. package/dist/esm/api/types/index.mjs +1 -0
  90. package/dist/esm/core/auth/AuthProvider.d.mts +4 -0
  91. package/dist/esm/core/auth/AuthProvider.mjs +1 -0
  92. package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
  93. package/dist/esm/core/auth/AuthRequest.mjs +1 -0
  94. package/dist/esm/core/auth/index.d.mts +2 -0
  95. package/dist/esm/core/fetcher/Fetcher.mjs +2 -2
  96. package/dist/esm/core/fetcher/index.d.mts +5 -5
  97. package/dist/esm/core/fetcher/index.mjs +2 -2
  98. package/dist/esm/version.d.mts +1 -1
  99. package/dist/esm/version.mjs +1 -1
  100. package/package.json +2 -2
  101. package/reference.md +4 -4
  102. package/dist/index.d.mts +0 -686
  103. package/dist/index.d.ts +0 -686
  104. package/dist/index.js +0 -643
  105. package/dist/index.mjs +0 -606
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HttpResponsePromise = exports.unknownRawResponse = exports.toRawResponse = exports.abortRawResponse = exports.Supplier = exports.getHeader = exports.fetcher = void 0;
3
+ exports.Supplier = exports.unknownRawResponse = exports.toRawResponse = exports.abortRawResponse = exports.HttpResponsePromise = exports.getHeader = exports.fetcher = void 0;
4
4
  var Fetcher_js_1 = require("./Fetcher.js");
5
5
  Object.defineProperty(exports, "fetcher", { enumerable: true, get: function () { return Fetcher_js_1.fetcher; } });
6
6
  var getHeader_js_1 = require("./getHeader.js");
7
7
  Object.defineProperty(exports, "getHeader", { enumerable: true, get: function () { return getHeader_js_1.getHeader; } });
8
- var Supplier_js_1 = require("./Supplier.js");
9
- Object.defineProperty(exports, "Supplier", { enumerable: true, get: function () { return Supplier_js_1.Supplier; } });
8
+ var HttpResponsePromise_js_1 = require("./HttpResponsePromise.js");
9
+ Object.defineProperty(exports, "HttpResponsePromise", { enumerable: true, get: function () { return HttpResponsePromise_js_1.HttpResponsePromise; } });
10
10
  var RawResponse_js_1 = require("./RawResponse.js");
11
11
  Object.defineProperty(exports, "abortRawResponse", { enumerable: true, get: function () { return RawResponse_js_1.abortRawResponse; } });
12
12
  Object.defineProperty(exports, "toRawResponse", { enumerable: true, get: function () { return RawResponse_js_1.toRawResponse; } });
13
13
  Object.defineProperty(exports, "unknownRawResponse", { enumerable: true, get: function () { return RawResponse_js_1.unknownRawResponse; } });
14
- var HttpResponsePromise_js_1 = require("./HttpResponsePromise.js");
15
- Object.defineProperty(exports, "HttpResponsePromise", { enumerable: true, get: function () { return HttpResponsePromise_js_1.HttpResponsePromise; } });
14
+ var Supplier_js_1 = require("./Supplier.js");
15
+ Object.defineProperty(exports, "Supplier", { enumerable: true, get: function () { return Supplier_js_1.Supplier; } });
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.30.2";
1
+ export declare const SDK_VERSION = "0.30.4";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.30.2";
4
+ exports.SDK_VERSION = "0.30.4";
@@ -14,8 +14,8 @@ export class PhonicClient {
14
14
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
15
15
  "X-Fern-Language": "JavaScript",
16
16
  "X-Fern-SDK-Name": "phonic",
17
- "X-Fern-SDK-Version": "0.30.2",
18
- "User-Agent": "phonic/0.30.2",
17
+ "X-Fern-SDK-Version": "0.30.4",
18
+ "User-Agent": "phonic/0.30.4",
19
19
  "X-Fern-Runtime": core.RUNTIME.type,
20
20
  "X-Fern-Runtime-Version": core.RUNTIME.version,
21
21
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -62,7 +62,7 @@ export declare class Agents {
62
62
  * name: "support-agent",
63
63
  * phone_number: "assign-automatically",
64
64
  * timezone: "America/Los_Angeles",
65
- * voice_id: "sarah",
65
+ * voice_id: "grant",
66
66
  * audio_speed: 1,
67
67
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
68
68
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
@@ -103,7 +103,7 @@ export declare class Agents {
103
103
  * name: "support-agent",
104
104
  * phone_number: "assign-automatically",
105
105
  * timezone: "America/Los_Angeles",
106
- * voice_id: "sarah",
106
+ * voice_id: "grant",
107
107
  * audio_speed: 1,
108
108
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
109
109
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
@@ -179,7 +179,7 @@ export declare class Agents {
179
179
  * name: "updated-support-agent",
180
180
  * phone_number: "assign-automatically",
181
181
  * timezone: "America/Los_Angeles",
182
- * voice_id: "sarah",
182
+ * voice_id: "grant",
183
183
  * audio_speed: 1,
184
184
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
185
185
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
@@ -53,11 +53,12 @@ export class Agents {
53
53
  if (project != null) {
54
54
  _queryParams["project"] = project;
55
55
  }
56
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
57
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PhonicEnvironment.Default)
56
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
57
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
58
+ url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.PhonicEnvironment.Default)
58
59
  .base, "agents"),
59
60
  method: "GET",
60
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
61
+ headers: _headers,
61
62
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
62
63
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
63
64
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -115,7 +116,7 @@ export class Agents {
115
116
  * name: "support-agent",
116
117
  * phone_number: "assign-automatically",
117
118
  * timezone: "America/Los_Angeles",
118
- * voice_id: "sarah",
119
+ * voice_id: "grant",
119
120
  * audio_speed: 1,
120
121
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
121
122
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
@@ -150,11 +151,12 @@ export class Agents {
150
151
  if (project != null) {
151
152
  _queryParams["project"] = project;
152
153
  }
153
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
154
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PhonicEnvironment.Default)
154
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
155
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
156
+ url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.PhonicEnvironment.Default)
155
157
  .base, "agents"),
156
158
  method: "POST",
157
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
159
+ headers: _headers,
158
160
  contentType: "application/json",
159
161
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
160
162
  requestType: "json",
@@ -216,7 +218,7 @@ export class Agents {
216
218
  * name: "support-agent",
217
219
  * phone_number: "assign-automatically",
218
220
  * timezone: "America/Los_Angeles",
219
- * voice_id: "sarah",
221
+ * voice_id: "grant",
220
222
  * audio_speed: 1,
221
223
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
222
224
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
@@ -250,11 +252,12 @@ export class Agents {
250
252
  if (project != null) {
251
253
  _queryParams["project"] = project;
252
254
  }
253
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
254
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PhonicEnvironment.Default)
255
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
256
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
257
+ url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.PhonicEnvironment.Default)
255
258
  .base, "agents/upsert"),
256
259
  method: "PUT",
257
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
260
+ headers: _headers,
258
261
  contentType: "application/json",
259
262
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
260
263
  requestType: "json",
@@ -323,11 +326,12 @@ export class Agents {
323
326
  if (project != null) {
324
327
  _queryParams["project"] = project;
325
328
  }
326
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
327
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PhonicEnvironment.Default)
329
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
330
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
331
+ url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.PhonicEnvironment.Default)
328
332
  .base, `agents/${encodeURIComponent(nameOrId)}`),
329
333
  method: "GET",
330
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
334
+ headers: _headers,
331
335
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
332
336
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
333
337
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -393,11 +397,12 @@ export class Agents {
393
397
  if (project != null) {
394
398
  _queryParams["project"] = project;
395
399
  }
396
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
397
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PhonicEnvironment.Default)
400
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
401
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
402
+ url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.PhonicEnvironment.Default)
398
403
  .base, `agents/${encodeURIComponent(nameOrId)}`),
399
404
  method: "DELETE",
400
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
405
+ headers: _headers,
401
406
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
402
407
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
403
408
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -454,7 +459,7 @@ export class Agents {
454
459
  * name: "updated-support-agent",
455
460
  * phone_number: "assign-automatically",
456
461
  * timezone: "America/Los_Angeles",
457
- * voice_id: "sarah",
462
+ * voice_id: "grant",
458
463
  * audio_speed: 1,
459
464
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
460
465
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
@@ -488,11 +493,12 @@ export class Agents {
488
493
  if (project != null) {
489
494
  _queryParams["project"] = project;
490
495
  }
491
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
492
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PhonicEnvironment.Default)
496
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
497
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
498
+ url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.PhonicEnvironment.Default)
493
499
  .base, `agents/${encodeURIComponent(nameOrId)}`),
494
500
  method: "PATCH",
495
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
501
+ headers: _headers,
496
502
  contentType: "application/json",
497
503
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
498
504
  requestType: "json",
@@ -10,7 +10,7 @@ import * as Phonic from "../../../../index.mjs";
10
10
  * name: "support-agent",
11
11
  * phone_number: "assign-automatically",
12
12
  * timezone: "America/Los_Angeles",
13
- * voice_id: "sarah",
13
+ * voice_id: "grant",
14
14
  * audio_speed: 1,
15
15
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
16
16
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
@@ -35,9 +35,7 @@ import * as Phonic from "../../../../index.mjs";
35
35
  * }
36
36
  */
37
37
  export interface AgentsCreateRequest {
38
- /**
39
- * The name of the project to create the agent in.
40
- */
38
+ /** The name of the project to create the agent in. */
41
39
  project?: string;
42
40
  body: Phonic.CreateAgentRequest;
43
41
  }
@@ -8,8 +8,6 @@
8
8
  * }
9
9
  */
10
10
  export interface AgentsDeleteRequest {
11
- /**
12
- * The name of the project containing the agent. Only used when `nameOrId` is a name.
13
- */
11
+ /** The name of the project containing the agent. Only used when `nameOrId` is a name. */
14
12
  project?: string;
15
13
  }
@@ -8,8 +8,6 @@
8
8
  * }
9
9
  */
10
10
  export interface AgentsGetRequest {
11
- /**
12
- * The name of the project containing the agent. Only used when `nameOrId` is a name.
13
- */
11
+ /** The name of the project containing the agent. Only used when `nameOrId` is a name. */
14
12
  project?: string;
15
13
  }
@@ -6,8 +6,6 @@
6
6
  * {}
7
7
  */
8
8
  export interface AgentsListRequest {
9
- /**
10
- * The name of the project to list agents for.
11
- */
9
+ /** The name of the project to list agents for. */
12
10
  project?: string;
13
11
  }
@@ -9,7 +9,7 @@ import * as Phonic from "../../../../index.mjs";
9
9
  * name: "updated-support-agent",
10
10
  * phone_number: "assign-automatically",
11
11
  * timezone: "America/Los_Angeles",
12
- * voice_id: "sarah",
12
+ * voice_id: "grant",
13
13
  * audio_speed: 1,
14
14
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
15
15
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
@@ -33,9 +33,7 @@ import * as Phonic from "../../../../index.mjs";
33
33
  * }
34
34
  */
35
35
  export interface UpdateAgentRequest {
36
- /**
37
- * The name of the project containing the agent. Only used when `nameOrId` is a name.
38
- */
36
+ /** The name of the project containing the agent. Only used when `nameOrId` is a name. */
39
37
  project?: string;
40
38
  /** The name of the agent. Can only contain lowercase letters, numbers and hyphens. Must be unique within the project. */
41
39
  name?: string;
@@ -9,7 +9,7 @@ import * as Phonic from "../../../../index.mjs";
9
9
  * name: "support-agent",
10
10
  * phone_number: "assign-automatically",
11
11
  * timezone: "America/Los_Angeles",
12
- * voice_id: "sarah",
12
+ * voice_id: "grant",
13
13
  * audio_speed: 1,
14
14
  * welcome_message: "Hi {{customer_name}}. How can I help you today?",
15
15
  * system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
@@ -33,8 +33,6 @@ import * as Phonic from "../../../../index.mjs";
33
33
  * }
34
34
  */
35
35
  export interface UpsertAgentRequest extends Phonic.CreateAgentRequest {
36
- /**
37
- * The name of the project containing the agent.
38
- */
36
+ /** The name of the project containing the agent. */
39
37
  project?: string;
40
38
  }
@@ -9,40 +9,22 @@
9
9
  * {}
10
10
  */
11
11
  export interface ConversationsListRequest {
12
- /**
13
- * The name of the project to list conversations for.
14
- */
12
+ /** The name of the project to list conversations for. */
15
13
  project?: string;
16
- /**
17
- * Filter by external ID to get a specific conversation.
18
- */
14
+ /** Filter by external ID to get a specific conversation. */
19
15
  external_id?: string;
20
- /**
21
- * Minimum duration in seconds.
22
- */
16
+ /** Minimum duration in seconds. */
23
17
  duration_min?: number;
24
- /**
25
- * Maximum duration in seconds.
26
- */
18
+ /** Maximum duration in seconds. */
27
19
  duration_max?: number;
28
- /**
29
- * Minimum start date/time. Valid examples: `2025-04-17`, `2025-04-17T02:48:52.708Z`
30
- */
20
+ /** Minimum start date/time. Valid examples: `2025-04-17`, `2025-04-17T02:48:52.708Z` */
31
21
  started_at_min?: string;
32
- /**
33
- * Maximum start date/time. Valid examples: `2025-04-17`, `2025-04-17T02:48:52.708Z`
34
- */
22
+ /** Maximum start date/time. Valid examples: `2025-04-17`, `2025-04-17T02:48:52.708Z` */
35
23
  started_at_max?: string;
36
- /**
37
- * Cursor for pagination (before).
38
- */
24
+ /** Cursor for pagination (before). */
39
25
  before?: string;
40
- /**
41
- * Cursor for pagination (after).
42
- */
26
+ /** Cursor for pagination (after). */
43
27
  after?: string;
44
- /**
45
- * Maximum number of conversations to return.
46
- */
28
+ /** Maximum number of conversations to return. */
47
29
  limit?: number;
48
30
  }
@@ -11,25 +11,15 @@ import * as Phonic from "../../../../index.mjs";
11
11
  * }
12
12
  */
13
13
  export interface ConversationsSipOutboundCallRequest {
14
- /**
15
- * Optional session token used for STS authorization.
16
- */
14
+ /** Optional session token used for STS authorization. */
17
15
  token?: string;
18
- /**
19
- * Optional downstream STS WebSocket URL to override the default.
20
- */
16
+ /** Optional downstream STS WebSocket URL to override the default. */
21
17
  downstream_websocket_url?: string;
22
- /**
23
- * SIP address of the user's SIP trunk. Required.
24
- */
18
+ /** SIP address of the user's SIP trunk. Required. */
25
19
  "X-Sip-Address": string;
26
- /**
27
- * SIP auth username, if your provider requires it.
28
- */
20
+ /** SIP auth username, if your provider requires it. */
29
21
  "X-Sip-Auth-Username"?: string;
30
- /**
31
- * SIP auth password, if your provider requires it.
32
- */
22
+ /** SIP auth password, if your provider requires it. */
33
23
  "X-Sip-Auth-Password"?: string;
34
24
  /** Caller ID phone number in E.164 format. */
35
25
  from_phone_number: string;
@@ -14,7 +14,7 @@ import * as Phonic from "../../../../index.mjs";
14
14
  * "customer_name": "David",
15
15
  * "subject": "Chess"
16
16
  * },
17
- * voice_id: "sarah",
17
+ * voice_id: "grant",
18
18
  * no_input_poke_sec: 30,
19
19
  * no_input_poke_text: "Are you still there?",
20
20
  * no_input_end_conversation_sec: 180,
@@ -54,11 +54,12 @@ export class ExtractionSchemas {
54
54
  if (project != null) {
55
55
  _queryParams["project"] = project;
56
56
  }
57
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
58
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PhonicEnvironment.Default)
57
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
58
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
59
+ url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.PhonicEnvironment.Default)
59
60
  .base, "extraction_schemas"),
60
61
  method: "GET",
61
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
62
+ headers: _headers,
62
63
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
63
64
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
64
65
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -137,11 +138,12 @@ export class ExtractionSchemas {
137
138
  if (project != null) {
138
139
  _queryParams["project"] = project;
139
140
  }
140
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
141
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PhonicEnvironment.Default)
141
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
142
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
143
+ url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.PhonicEnvironment.Default)
142
144
  .base, "extraction_schemas"),
143
145
  method: "POST",
144
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
146
+ headers: _headers,
145
147
  contentType: "application/json",
146
148
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
147
149
  requestType: "json",
@@ -214,11 +216,12 @@ export class ExtractionSchemas {
214
216
  if (project != null) {
215
217
  _queryParams["project"] = project;
216
218
  }
217
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
218
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PhonicEnvironment.Default)
219
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
220
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
221
+ url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.PhonicEnvironment.Default)
219
222
  .base, `extraction_schemas/${encodeURIComponent(nameOrId)}`),
220
223
  method: "GET",
221
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
224
+ headers: _headers,
222
225
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
223
226
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
224
227
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -281,11 +284,12 @@ export class ExtractionSchemas {
281
284
  if (project != null) {
282
285
  _queryParams["project"] = project;
283
286
  }
284
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
285
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PhonicEnvironment.Default)
287
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
288
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
289
+ url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.PhonicEnvironment.Default)
286
290
  .base, `extraction_schemas/${encodeURIComponent(nameOrId)}`),
287
291
  method: "DELETE",
288
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
292
+ headers: _headers,
289
293
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
290
294
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
291
295
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -364,11 +368,12 @@ export class ExtractionSchemas {
364
368
  if (project != null) {
365
369
  _queryParams["project"] = project;
366
370
  }
367
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
368
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PhonicEnvironment.Default)
371
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
372
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
373
+ url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.PhonicEnvironment.Default)
369
374
  .base, `extraction_schemas/${encodeURIComponent(nameOrId)}`),
370
375
  method: "PATCH",
371
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
376
+ headers: _headers,
372
377
  contentType: "application/json",
373
378
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
374
379
  requestType: "json",
@@ -24,9 +24,7 @@ import * as Phonic from "../../../../index.mjs";
24
24
  * }
25
25
  */
26
26
  export interface CreateExtractionSchemaRequest {
27
- /**
28
- * The name of the project to create the extraction schema in.
29
- */
27
+ /** The name of the project to create the extraction schema in. */
30
28
  project?: string;
31
29
  /** A name for the extraction schema. */
32
30
  name: string;
@@ -8,8 +8,6 @@
8
8
  * }
9
9
  */
10
10
  export interface ExtractionSchemasDeleteRequest {
11
- /**
12
- * The name of the project containing the extraction schema. Only used when `nameOrId` is a name.
13
- */
11
+ /** The name of the project containing the extraction schema. Only used when `nameOrId` is a name. */
14
12
  project?: string;
15
13
  }
@@ -8,8 +8,6 @@
8
8
  * }
9
9
  */
10
10
  export interface ExtractionSchemasGetRequest {
11
- /**
12
- * The name of the project containing the extraction schema. Only used when `nameOrId` is a name.
13
- */
11
+ /** The name of the project containing the extraction schema. Only used when `nameOrId` is a name. */
14
12
  project?: string;
15
13
  }
@@ -8,8 +8,6 @@
8
8
  * }
9
9
  */
10
10
  export interface ExtractionSchemasListRequest {
11
- /**
12
- * The name of the project to list extraction schemas for.
13
- */
11
+ /** The name of the project to list extraction schemas for. */
14
12
  project?: string;
15
13
  }
@@ -20,9 +20,7 @@ import * as Phonic from "../../../../index.mjs";
20
20
  * }
21
21
  */
22
22
  export interface UpdateExtractionSchemaRequest {
23
- /**
24
- * The name of the project containing the extraction schema. Only used when `nameOrId` is a name.
25
- */
23
+ /** The name of the project containing the extraction schema. Only used when `nameOrId` is a name. */
26
24
  project?: string;
27
25
  /** A name for the extraction schema. */
28
26
  name?: string;