phonic 0.31.7 → 0.31.8
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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/conversations/client/Client.js +4 -3
- package/dist/cjs/api/resources/conversations/client/Socket.d.ts +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/conversations/client/Client.mjs +4 -3
- package/dist/esm/api/resources/conversations/client/Socket.d.mts +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +7 -7
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "phonic",
|
|
46
|
-
"X-Fern-SDK-Version": "0.31.
|
|
47
|
-
"User-Agent": "phonic/0.31.
|
|
46
|
+
"X-Fern-SDK-Version": "0.31.8",
|
|
47
|
+
"User-Agent": "phonic/0.31.8",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -745,14 +745,15 @@ class ConversationsClient {
|
|
|
745
745
|
}
|
|
746
746
|
connect() {
|
|
747
747
|
return __awaiter(this, arguments, void 0, function* (args = {}) {
|
|
748
|
-
var _a, _b;
|
|
748
|
+
var _a, _b, _c, _d, _e;
|
|
749
749
|
const { downstream_websocket_url: downstreamWebsocketUrl, protocols, queryParams, headers, debug, reconnectAttempts, connectionTimeoutInSeconds, abortSignal, } = args;
|
|
750
750
|
const _queryParams = {
|
|
751
751
|
downstream_websocket_url: downstreamWebsocketUrl,
|
|
752
752
|
};
|
|
753
|
-
const
|
|
753
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
754
|
+
const _headers = Object.assign(Object.assign(Object.assign({}, ((_a = _authRequest.headers) !== null && _a !== void 0 ? _a : {})), ((_c = (_b = this._options) === null || _b === void 0 ? void 0 : _b.headers) !== null && _c !== void 0 ? _c : {})), headers);
|
|
754
755
|
const socket = new core.ReconnectingWebSocket({
|
|
755
|
-
url: core.url.join((
|
|
756
|
+
url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : ((_e = (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.PhonicEnvironment.Default)
|
|
756
757
|
.production, "/v1/sts/ws"),
|
|
757
758
|
protocols: protocols !== null && protocols !== void 0 ? protocols : [],
|
|
758
759
|
queryParameters: Object.assign(Object.assign({}, _queryParams), queryParams),
|
|
@@ -50,7 +50,7 @@ export declare class ConversationsSocket {
|
|
|
50
50
|
/** Asserts that the websocket is open. */
|
|
51
51
|
private assertSocketIsOpen;
|
|
52
52
|
/** Send a binary payload to the websocket. */
|
|
53
|
-
protected sendBinary(payload:
|
|
53
|
+
protected sendBinary(payload: ArrayBuffer | Blob | ArrayBufferView): void;
|
|
54
54
|
/** Send a JSON payload to the websocket. */
|
|
55
55
|
protected sendJson(payload: Phonic.ConfigPayload | Phonic.AudioChunkPayload | Phonic.UpdateSystemPromptPayload | Phonic.AddSystemMessagePayload | Phonic.SetExternalIdPayload | Phonic.ToolCallOutputPayload | Phonic.GenerateReplyPayload | Phonic.SayPayload): void;
|
|
56
56
|
}
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.31.
|
|
1
|
+
export declare const SDK_VERSION = "0.31.8";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "phonic",
|
|
9
|
-
"X-Fern-SDK-Version": "0.31.
|
|
10
|
-
"User-Agent": "phonic/0.31.
|
|
9
|
+
"X-Fern-SDK-Version": "0.31.8",
|
|
10
|
+
"User-Agent": "phonic/0.31.8",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -709,14 +709,15 @@ export class ConversationsClient {
|
|
|
709
709
|
}
|
|
710
710
|
connect() {
|
|
711
711
|
return __awaiter(this, arguments, void 0, function* (args = {}) {
|
|
712
|
-
var _a, _b;
|
|
712
|
+
var _a, _b, _c, _d, _e;
|
|
713
713
|
const { downstream_websocket_url: downstreamWebsocketUrl, protocols, queryParams, headers, debug, reconnectAttempts, connectionTimeoutInSeconds, abortSignal, } = args;
|
|
714
714
|
const _queryParams = {
|
|
715
715
|
downstream_websocket_url: downstreamWebsocketUrl,
|
|
716
716
|
};
|
|
717
|
-
const
|
|
717
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
718
|
+
const _headers = Object.assign(Object.assign(Object.assign({}, ((_a = _authRequest.headers) !== null && _a !== void 0 ? _a : {})), ((_c = (_b = this._options) === null || _b === void 0 ? void 0 : _b.headers) !== null && _c !== void 0 ? _c : {})), headers);
|
|
718
719
|
const socket = new core.ReconnectingWebSocket({
|
|
719
|
-
url: core.url.join((
|
|
720
|
+
url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : ((_e = (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.PhonicEnvironment.Default)
|
|
720
721
|
.production, "/v1/sts/ws"),
|
|
721
722
|
protocols: protocols !== null && protocols !== void 0 ? protocols : [],
|
|
722
723
|
queryParameters: Object.assign(Object.assign({}, _queryParams), queryParams),
|
|
@@ -50,7 +50,7 @@ export declare class ConversationsSocket {
|
|
|
50
50
|
/** Asserts that the websocket is open. */
|
|
51
51
|
private assertSocketIsOpen;
|
|
52
52
|
/** Send a binary payload to the websocket. */
|
|
53
|
-
protected sendBinary(payload:
|
|
53
|
+
protected sendBinary(payload: ArrayBuffer | Blob | ArrayBufferView): void;
|
|
54
54
|
/** Send a JSON payload to the websocket. */
|
|
55
55
|
protected sendJson(payload: Phonic.ConfigPayload | Phonic.AudioChunkPayload | Phonic.UpdateSystemPromptPayload | Phonic.AddSystemMessagePayload | Phonic.SetExternalIdPayload | Phonic.ToolCallOutputPayload | Phonic.GenerateReplyPayload | Phonic.SayPayload): void;
|
|
56
56
|
}
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.31.
|
|
1
|
+
export declare const SDK_VERSION = "0.31.8";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.31.
|
|
1
|
+
export const SDK_VERSION = "0.31.8";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phonic",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.8",
|
|
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.
|
|
125
|
+
"ws": "^8.20.0"
|
|
126
126
|
},
|
|
127
127
|
"devDependencies": {
|
|
128
|
-
"webpack": "^5.
|
|
129
|
-
"ts-loader": "^9.5.
|
|
130
|
-
"@types/ws": "^8.
|
|
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.
|
|
139
|
-
"@biomejs/biome": "2.4.
|
|
138
|
+
"typescript": "~5.9.3",
|
|
139
|
+
"@biomejs/biome": "2.4.9"
|
|
140
140
|
},
|
|
141
141
|
"browser": {
|
|
142
142
|
"fs": false,
|