phonic 0.30.0-rc4 → 0.30.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 +772 -2
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/agents/client/Client.d.ts +9 -2
- package/dist/cjs/api/resources/agents/client/Client.js +9 -2
- package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.d.ts +1 -0
- package/dist/cjs/api/resources/agents/client/requests/AgentsDeleteRequest.d.ts +3 -1
- package/dist/cjs/api/resources/agents/client/requests/AgentsGetRequest.d.ts +3 -1
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +1 -0
- package/dist/cjs/api/resources/agents/client/requests/UpsertAgentRequest.d.ts +1 -0
- package/dist/cjs/api/resources/conversations/client/Client.js +1 -0
- package/dist/cjs/api/resources/extractionSchemas/client/Client.d.ts +11 -3
- package/dist/cjs/api/resources/extractionSchemas/client/Client.js +11 -3
- package/dist/cjs/api/resources/extractionSchemas/client/requests/CreateExtractionSchemaRequest.d.ts +1 -0
- package/dist/cjs/api/resources/extractionSchemas/client/requests/ExtractionSchemasDeleteRequest.d.ts +3 -1
- package/dist/cjs/api/resources/extractionSchemas/client/requests/ExtractionSchemasGetRequest.d.ts +3 -1
- package/dist/cjs/api/resources/extractionSchemas/client/requests/ExtractionSchemasListRequest.d.ts +3 -1
- package/dist/cjs/api/resources/extractionSchemas/client/requests/UpdateExtractionSchemaRequest.d.ts +1 -0
- package/dist/cjs/api/resources/tools/client/Client.d.ts +12 -3
- package/dist/cjs/api/resources/tools/client/Client.js +12 -3
- package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.d.ts +2 -0
- package/dist/cjs/api/resources/tools/client/requests/ToolsDeleteRequest.d.ts +3 -1
- package/dist/cjs/api/resources/tools/client/requests/ToolsGetRequest.d.ts +6 -2
- package/dist/cjs/api/resources/tools/client/requests/ToolsListRequest.d.ts +3 -1
- package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.d.ts +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/agents/client/Client.d.mts +9 -2
- package/dist/esm/api/resources/agents/client/Client.mjs +9 -2
- package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.d.mts +1 -0
- package/dist/esm/api/resources/agents/client/requests/AgentsDeleteRequest.d.mts +3 -1
- package/dist/esm/api/resources/agents/client/requests/AgentsGetRequest.d.mts +3 -1
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +1 -0
- package/dist/esm/api/resources/agents/client/requests/UpsertAgentRequest.d.mts +1 -0
- package/dist/esm/api/resources/conversations/client/Client.mjs +1 -0
- package/dist/esm/api/resources/extractionSchemas/client/Client.d.mts +11 -3
- package/dist/esm/api/resources/extractionSchemas/client/Client.mjs +11 -3
- package/dist/esm/api/resources/extractionSchemas/client/requests/CreateExtractionSchemaRequest.d.mts +1 -0
- package/dist/esm/api/resources/extractionSchemas/client/requests/ExtractionSchemasDeleteRequest.d.mts +3 -1
- package/dist/esm/api/resources/extractionSchemas/client/requests/ExtractionSchemasGetRequest.d.mts +3 -1
- package/dist/esm/api/resources/extractionSchemas/client/requests/ExtractionSchemasListRequest.d.mts +3 -1
- package/dist/esm/api/resources/extractionSchemas/client/requests/UpdateExtractionSchemaRequest.d.mts +1 -0
- package/dist/esm/api/resources/tools/client/Client.d.mts +12 -3
- package/dist/esm/api/resources/tools/client/Client.mjs +12 -3
- package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.d.mts +2 -0
- package/dist/esm/api/resources/tools/client/requests/ToolsDeleteRequest.d.mts +3 -1
- package/dist/esm/api/resources/tools/client/requests/ToolsGetRequest.d.mts +6 -2
- package/dist/esm/api/resources/tools/client/requests/ToolsListRequest.d.mts +3 -1
- package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.d.mts +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/index.d.mts +686 -0
- package/dist/index.d.ts +686 -0
- package/dist/index.js +643 -0
- package/dist/index.mjs +606 -0
- package/package.json +2 -2
- package/reference.md +31 -8
|
@@ -831,6 +831,7 @@ export class Conversations {
|
|
|
831
831
|
_queryParams["downstream_websocket_url"] = downstream_websocket_url;
|
|
832
832
|
}
|
|
833
833
|
let _headers = Object.assign({}, headers);
|
|
834
|
+
_headers["Authorization"] = yield this._getAuthorizationHeader();
|
|
834
835
|
const socket = new core.ReconnectingWebSocket({
|
|
835
836
|
url: core.url.join((_a = (yield core.Supplier.get(this._options["baseUrl"]))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options["environment"]))) !== null && _b !== void 0 ? _b : environments.PhonicEnvironment.Default)
|
|
836
837
|
.production, "/v1/sts/ws"),
|
|
@@ -39,7 +39,9 @@ export declare class ExtractionSchemas {
|
|
|
39
39
|
* @throws {@link Phonic.NotFoundError}
|
|
40
40
|
*
|
|
41
41
|
* @example
|
|
42
|
-
* await client.extractionSchemas.list(
|
|
42
|
+
* await client.extractionSchemas.list({
|
|
43
|
+
* project: "main"
|
|
44
|
+
* })
|
|
43
45
|
*/
|
|
44
46
|
list(request?: Phonic.ExtractionSchemasListRequest, requestOptions?: ExtractionSchemas.RequestOptions): core.HttpResponsePromise<Phonic.ExtractionSchemasListResponse>;
|
|
45
47
|
private __list;
|
|
@@ -55,6 +57,7 @@ export declare class ExtractionSchemas {
|
|
|
55
57
|
*
|
|
56
58
|
* @example
|
|
57
59
|
* await client.extractionSchemas.create({
|
|
60
|
+
* project: "main",
|
|
58
61
|
* name: "Appointment details",
|
|
59
62
|
* prompt: "Dates should be in `9 Apr 2025` format. Prices should be in $150.00 format.",
|
|
60
63
|
* fields: [{
|
|
@@ -84,7 +87,9 @@ export declare class ExtractionSchemas {
|
|
|
84
87
|
* @throws {@link Phonic.NotFoundError}
|
|
85
88
|
*
|
|
86
89
|
* @example
|
|
87
|
-
* await client.extractionSchemas.get("nameOrId"
|
|
90
|
+
* await client.extractionSchemas.get("nameOrId", {
|
|
91
|
+
* project: "main"
|
|
92
|
+
* })
|
|
88
93
|
*/
|
|
89
94
|
get(nameOrId: string, request?: Phonic.ExtractionSchemasGetRequest, requestOptions?: ExtractionSchemas.RequestOptions): core.HttpResponsePromise<Phonic.ExtractionSchemasGetResponse>;
|
|
90
95
|
private __get;
|
|
@@ -98,7 +103,9 @@ export declare class ExtractionSchemas {
|
|
|
98
103
|
* @throws {@link Phonic.NotFoundError}
|
|
99
104
|
*
|
|
100
105
|
* @example
|
|
101
|
-
* await client.extractionSchemas.delete("nameOrId"
|
|
106
|
+
* await client.extractionSchemas.delete("nameOrId", {
|
|
107
|
+
* project: "main"
|
|
108
|
+
* })
|
|
102
109
|
*/
|
|
103
110
|
delete(nameOrId: string, request?: Phonic.ExtractionSchemasDeleteRequest, requestOptions?: ExtractionSchemas.RequestOptions): core.HttpResponsePromise<Phonic.ExtractionSchemasDeleteResponse>;
|
|
104
111
|
private __delete;
|
|
@@ -115,6 +122,7 @@ export declare class ExtractionSchemas {
|
|
|
115
122
|
*
|
|
116
123
|
* @example
|
|
117
124
|
* await client.extractionSchemas.update("nameOrId", {
|
|
125
|
+
* project: "main",
|
|
118
126
|
* name: "Updated appointment details",
|
|
119
127
|
* prompt: "Updated extraction instructions. Dates should be in `9 Apr 2025` format.",
|
|
120
128
|
* fields: [{
|
|
@@ -39,7 +39,9 @@ export class ExtractionSchemas {
|
|
|
39
39
|
* @throws {@link Phonic.NotFoundError}
|
|
40
40
|
*
|
|
41
41
|
* @example
|
|
42
|
-
* await client.extractionSchemas.list(
|
|
42
|
+
* await client.extractionSchemas.list({
|
|
43
|
+
* project: "main"
|
|
44
|
+
* })
|
|
43
45
|
*/
|
|
44
46
|
list(request = {}, requestOptions) {
|
|
45
47
|
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
@@ -106,6 +108,7 @@ export class ExtractionSchemas {
|
|
|
106
108
|
*
|
|
107
109
|
* @example
|
|
108
110
|
* await client.extractionSchemas.create({
|
|
111
|
+
* project: "main",
|
|
109
112
|
* name: "Appointment details",
|
|
110
113
|
* prompt: "Dates should be in `9 Apr 2025` format. Prices should be in $150.00 format.",
|
|
111
114
|
* fields: [{
|
|
@@ -196,7 +199,9 @@ export class ExtractionSchemas {
|
|
|
196
199
|
* @throws {@link Phonic.NotFoundError}
|
|
197
200
|
*
|
|
198
201
|
* @example
|
|
199
|
-
* await client.extractionSchemas.get("nameOrId"
|
|
202
|
+
* await client.extractionSchemas.get("nameOrId", {
|
|
203
|
+
* project: "main"
|
|
204
|
+
* })
|
|
200
205
|
*/
|
|
201
206
|
get(nameOrId, request = {}, requestOptions) {
|
|
202
207
|
return core.HttpResponsePromise.fromPromise(this.__get(nameOrId, request, requestOptions));
|
|
@@ -261,7 +266,9 @@ export class ExtractionSchemas {
|
|
|
261
266
|
* @throws {@link Phonic.NotFoundError}
|
|
262
267
|
*
|
|
263
268
|
* @example
|
|
264
|
-
* await client.extractionSchemas.delete("nameOrId"
|
|
269
|
+
* await client.extractionSchemas.delete("nameOrId", {
|
|
270
|
+
* project: "main"
|
|
271
|
+
* })
|
|
265
272
|
*/
|
|
266
273
|
delete(nameOrId, request = {}, requestOptions) {
|
|
267
274
|
return core.HttpResponsePromise.fromPromise(this.__delete(nameOrId, request, requestOptions));
|
|
@@ -332,6 +339,7 @@ export class ExtractionSchemas {
|
|
|
332
339
|
*
|
|
333
340
|
* @example
|
|
334
341
|
* await client.extractionSchemas.update("nameOrId", {
|
|
342
|
+
* project: "main",
|
|
335
343
|
* name: "Updated appointment details",
|
|
336
344
|
* prompt: "Updated extraction instructions. Dates should be in `9 Apr 2025` format.",
|
|
337
345
|
* fields: [{
|
|
@@ -39,7 +39,9 @@ export declare class Tools {
|
|
|
39
39
|
* @throws {@link Phonic.NotFoundError}
|
|
40
40
|
*
|
|
41
41
|
* @example
|
|
42
|
-
* await client.tools.list(
|
|
42
|
+
* await client.tools.list({
|
|
43
|
+
* project: "main"
|
|
44
|
+
* })
|
|
43
45
|
*/
|
|
44
46
|
list(request?: Phonic.ToolsListRequest, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<Phonic.ToolsListResponse>;
|
|
45
47
|
private __list;
|
|
@@ -55,6 +57,7 @@ export declare class Tools {
|
|
|
55
57
|
*
|
|
56
58
|
* @example
|
|
57
59
|
* await client.tools.create({
|
|
60
|
+
* project: "main",
|
|
58
61
|
* name: "book_appointment",
|
|
59
62
|
* description: "Books an appointment in the calendar system",
|
|
60
63
|
* type: "custom_webhook",
|
|
@@ -81,6 +84,7 @@ export declare class Tools {
|
|
|
81
84
|
*
|
|
82
85
|
* @example
|
|
83
86
|
* await client.tools.create({
|
|
87
|
+
* project: "main",
|
|
84
88
|
* name: "check_inventory",
|
|
85
89
|
* description: "Checks product inventory levels",
|
|
86
90
|
* type: "custom_websocket",
|
|
@@ -107,7 +111,9 @@ export declare class Tools {
|
|
|
107
111
|
* @throws {@link Phonic.NotFoundError}
|
|
108
112
|
*
|
|
109
113
|
* @example
|
|
110
|
-
* await client.tools.get("nameOrId"
|
|
114
|
+
* await client.tools.get("nameOrId", {
|
|
115
|
+
* project: "main"
|
|
116
|
+
* })
|
|
111
117
|
*/
|
|
112
118
|
get(nameOrId: string, request?: Phonic.ToolsGetRequest, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<Phonic.ToolsGetResponse>;
|
|
113
119
|
private __get;
|
|
@@ -121,7 +127,9 @@ export declare class Tools {
|
|
|
121
127
|
* @throws {@link Phonic.NotFoundError}
|
|
122
128
|
*
|
|
123
129
|
* @example
|
|
124
|
-
* await client.tools.delete("nameOrId"
|
|
130
|
+
* await client.tools.delete("nameOrId", {
|
|
131
|
+
* project: "main"
|
|
132
|
+
* })
|
|
125
133
|
*/
|
|
126
134
|
delete(nameOrId: string, request?: Phonic.ToolsDeleteRequest, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<Phonic.ToolsDeleteResponse>;
|
|
127
135
|
private __delete;
|
|
@@ -138,6 +146,7 @@ export declare class Tools {
|
|
|
138
146
|
*
|
|
139
147
|
* @example
|
|
140
148
|
* await client.tools.update("nameOrId", {
|
|
149
|
+
* project: "main",
|
|
141
150
|
* description: "Updated description for booking appointments with enhanced features",
|
|
142
151
|
* endpoint_headers: {
|
|
143
152
|
* "Authorization": "Bearer updated_token456"
|
|
@@ -39,7 +39,9 @@ export class Tools {
|
|
|
39
39
|
* @throws {@link Phonic.NotFoundError}
|
|
40
40
|
*
|
|
41
41
|
* @example
|
|
42
|
-
* await client.tools.list(
|
|
42
|
+
* await client.tools.list({
|
|
43
|
+
* project: "main"
|
|
44
|
+
* })
|
|
43
45
|
*/
|
|
44
46
|
list(request = {}, requestOptions) {
|
|
45
47
|
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
@@ -106,6 +108,7 @@ export class Tools {
|
|
|
106
108
|
*
|
|
107
109
|
* @example
|
|
108
110
|
* await client.tools.create({
|
|
111
|
+
* project: "main",
|
|
109
112
|
* name: "book_appointment",
|
|
110
113
|
* description: "Books an appointment in the calendar system",
|
|
111
114
|
* type: "custom_webhook",
|
|
@@ -132,6 +135,7 @@ export class Tools {
|
|
|
132
135
|
*
|
|
133
136
|
* @example
|
|
134
137
|
* await client.tools.create({
|
|
138
|
+
* project: "main",
|
|
135
139
|
* name: "check_inventory",
|
|
136
140
|
* description: "Checks product inventory levels",
|
|
137
141
|
* type: "custom_websocket",
|
|
@@ -216,7 +220,9 @@ export class Tools {
|
|
|
216
220
|
* @throws {@link Phonic.NotFoundError}
|
|
217
221
|
*
|
|
218
222
|
* @example
|
|
219
|
-
* await client.tools.get("nameOrId"
|
|
223
|
+
* await client.tools.get("nameOrId", {
|
|
224
|
+
* project: "main"
|
|
225
|
+
* })
|
|
220
226
|
*/
|
|
221
227
|
get(nameOrId, request = {}, requestOptions) {
|
|
222
228
|
return core.HttpResponsePromise.fromPromise(this.__get(nameOrId, request, requestOptions));
|
|
@@ -283,7 +289,9 @@ export class Tools {
|
|
|
283
289
|
* @throws {@link Phonic.NotFoundError}
|
|
284
290
|
*
|
|
285
291
|
* @example
|
|
286
|
-
* await client.tools.delete("nameOrId"
|
|
292
|
+
* await client.tools.delete("nameOrId", {
|
|
293
|
+
* project: "main"
|
|
294
|
+
* })
|
|
287
295
|
*/
|
|
288
296
|
delete(nameOrId, request = {}, requestOptions) {
|
|
289
297
|
return core.HttpResponsePromise.fromPromise(this.__delete(nameOrId, request, requestOptions));
|
|
@@ -351,6 +359,7 @@ export class Tools {
|
|
|
351
359
|
*
|
|
352
360
|
* @example
|
|
353
361
|
* await client.tools.update("nameOrId", {
|
|
362
|
+
* project: "main",
|
|
354
363
|
* description: "Updated description for booking appointments with enhanced features",
|
|
355
364
|
* endpoint_headers: {
|
|
356
365
|
* "Authorization": "Bearer updated_token456"
|
|
@@ -5,6 +5,7 @@ import * as Phonic from "../../../../index.mjs";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
+
* project: "main",
|
|
8
9
|
* name: "book_appointment",
|
|
9
10
|
* description: "Books an appointment in the calendar system",
|
|
10
11
|
* type: "custom_webhook",
|
|
@@ -31,6 +32,7 @@ import * as Phonic from "../../../../index.mjs";
|
|
|
31
32
|
*
|
|
32
33
|
* @example
|
|
33
34
|
* {
|
|
35
|
+
* project: "main",
|
|
34
36
|
* name: "check_inventory",
|
|
35
37
|
* description: "Checks product inventory levels",
|
|
36
38
|
* type: "custom_websocket",
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.30.
|
|
1
|
+
export declare const SDK_VERSION = "0.30.2";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.30.
|
|
1
|
+
export const SDK_VERSION = "0.30.2";
|