phonic 0.32.15 → 0.32.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.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/auth/client/requests/CreateSessionTokenRequest.d.ts +2 -0
- package/dist/cjs/api/resources/conversationItems/client/Client.d.ts +5 -6
- package/dist/cjs/api/resources/conversationItems/client/Client.js +7 -8
- package/dist/cjs/api/resources/conversationItems/client/requests/ReplayConversationItemRequest.d.ts +3 -5
- 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/auth/client/requests/CreateSessionTokenRequest.d.mts +2 -0
- package/dist/esm/api/resources/conversationItems/client/Client.d.mts +5 -6
- package/dist/esm/api/resources/conversationItems/client/Client.mjs +7 -8
- package/dist/esm/api/resources/conversationItems/client/requests/ReplayConversationItemRequest.d.mts +3 -5
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +4 -5
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.32.
|
|
47
|
-
"User-Agent": "phonic/0.32.
|
|
46
|
+
"X-Fern-SDK-Version": "0.32.17",
|
|
47
|
+
"User-Agent": "phonic/0.32.17",
|
|
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);
|
|
@@ -7,4 +7,6 @@
|
|
|
7
7
|
export interface CreateSessionTokenRequest {
|
|
8
8
|
/** Time-to-live for the session token in seconds. */
|
|
9
9
|
ttl_seconds?: number;
|
|
10
|
+
/** Restricts the token to these conversations. A restricted token can read only their live audio and transcript, and cannot open the STS WebSocket or create an STS session. Omit it and the token can read any live conversation in the org. Pass it whenever the token will reach an end user's browser. */
|
|
11
|
+
conversation_ids?: string[];
|
|
10
12
|
}
|
|
@@ -14,8 +14,9 @@ export declare class ConversationItemsClient {
|
|
|
14
14
|
* Returns the alternative response(s) the assistant would have
|
|
15
15
|
* produced for this conversation turn given changes to the agent system prompt.
|
|
16
16
|
*
|
|
17
|
-
* Only assistant items from ended conversations can be replayed.
|
|
18
|
-
*
|
|
17
|
+
* Only assistant items from ended conversations can be replayed. Omit the
|
|
18
|
+
* request body (or omit `system_prompt`) to replay the turn exactly as it
|
|
19
|
+
* originally ran.
|
|
19
20
|
*
|
|
20
21
|
* @param {string} id - The ID of the conversation item to replay.
|
|
21
22
|
* @param {Phonic.ReplayConversationItemRequest} request
|
|
@@ -30,10 +31,8 @@ export declare class ConversationItemsClient {
|
|
|
30
31
|
* @throws {@link Phonic.InternalServerError}
|
|
31
32
|
*
|
|
32
33
|
* @example
|
|
33
|
-
* await client.conversationItems.replay("id"
|
|
34
|
-
* system_prompt: "system_prompt"
|
|
35
|
-
* })
|
|
34
|
+
* await client.conversationItems.replay("id")
|
|
36
35
|
*/
|
|
37
|
-
replay(id: string, request
|
|
36
|
+
replay(id: string, request?: Phonic.ReplayConversationItemRequest, requestOptions?: ConversationItemsClient.RequestOptions): core.HttpResponsePromise<Phonic.ReplayConversationItemResponse>;
|
|
38
37
|
private __replay;
|
|
39
38
|
}
|
|
@@ -59,8 +59,9 @@ class ConversationItemsClient {
|
|
|
59
59
|
* Returns the alternative response(s) the assistant would have
|
|
60
60
|
* produced for this conversation turn given changes to the agent system prompt.
|
|
61
61
|
*
|
|
62
|
-
* Only assistant items from ended conversations can be replayed.
|
|
63
|
-
*
|
|
62
|
+
* Only assistant items from ended conversations can be replayed. Omit the
|
|
63
|
+
* request body (or omit `system_prompt`) to replay the turn exactly as it
|
|
64
|
+
* originally ran.
|
|
64
65
|
*
|
|
65
66
|
* @param {string} id - The ID of the conversation item to replay.
|
|
66
67
|
* @param {Phonic.ReplayConversationItemRequest} request
|
|
@@ -75,15 +76,13 @@ class ConversationItemsClient {
|
|
|
75
76
|
* @throws {@link Phonic.InternalServerError}
|
|
76
77
|
*
|
|
77
78
|
* @example
|
|
78
|
-
* await client.conversationItems.replay("id"
|
|
79
|
-
* system_prompt: "system_prompt"
|
|
80
|
-
* })
|
|
79
|
+
* await client.conversationItems.replay("id")
|
|
81
80
|
*/
|
|
82
|
-
replay(id, request, requestOptions) {
|
|
81
|
+
replay(id, request = {}, requestOptions) {
|
|
83
82
|
return core.HttpResponsePromise.fromPromise(this.__replay(id, request, requestOptions));
|
|
84
83
|
}
|
|
85
|
-
__replay(
|
|
86
|
-
return __awaiter(this,
|
|
84
|
+
__replay(id_1) {
|
|
85
|
+
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
87
86
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
88
87
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
89
88
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
package/dist/cjs/api/resources/conversationItems/client/requests/ReplayConversationItemRequest.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
|
-
* {
|
|
4
|
-
* system_prompt: "system_prompt"
|
|
5
|
-
* }
|
|
3
|
+
* {}
|
|
6
4
|
*/
|
|
7
5
|
export interface ReplayConversationItemRequest {
|
|
8
|
-
/** The system prompt to use when generating replay responses. Use this to test prompt changes against this conversation turn. */
|
|
9
|
-
system_prompt
|
|
6
|
+
/** The system prompt to use when generating replay responses. Use this to test prompt changes against this conversation turn. Omit it to replay the turn with the system prompt it originally ran with. */
|
|
7
|
+
system_prompt?: string;
|
|
10
8
|
/** Number of alternative responses to generate. */
|
|
11
9
|
num_responses?: number;
|
|
12
10
|
}
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.32.
|
|
1
|
+
export declare const SDK_VERSION = "0.32.17";
|
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.32.
|
|
10
|
-
"User-Agent": "phonic/0.32.
|
|
9
|
+
"X-Fern-SDK-Version": "0.32.17",
|
|
10
|
+
"User-Agent": "phonic/0.32.17",
|
|
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);
|
|
@@ -7,4 +7,6 @@
|
|
|
7
7
|
export interface CreateSessionTokenRequest {
|
|
8
8
|
/** Time-to-live for the session token in seconds. */
|
|
9
9
|
ttl_seconds?: number;
|
|
10
|
+
/** Restricts the token to these conversations. A restricted token can read only their live audio and transcript, and cannot open the STS WebSocket or create an STS session. Omit it and the token can read any live conversation in the org. Pass it whenever the token will reach an end user's browser. */
|
|
11
|
+
conversation_ids?: string[];
|
|
10
12
|
}
|
|
@@ -14,8 +14,9 @@ export declare class ConversationItemsClient {
|
|
|
14
14
|
* Returns the alternative response(s) the assistant would have
|
|
15
15
|
* produced for this conversation turn given changes to the agent system prompt.
|
|
16
16
|
*
|
|
17
|
-
* Only assistant items from ended conversations can be replayed.
|
|
18
|
-
*
|
|
17
|
+
* Only assistant items from ended conversations can be replayed. Omit the
|
|
18
|
+
* request body (or omit `system_prompt`) to replay the turn exactly as it
|
|
19
|
+
* originally ran.
|
|
19
20
|
*
|
|
20
21
|
* @param {string} id - The ID of the conversation item to replay.
|
|
21
22
|
* @param {Phonic.ReplayConversationItemRequest} request
|
|
@@ -30,10 +31,8 @@ export declare class ConversationItemsClient {
|
|
|
30
31
|
* @throws {@link Phonic.InternalServerError}
|
|
31
32
|
*
|
|
32
33
|
* @example
|
|
33
|
-
* await client.conversationItems.replay("id"
|
|
34
|
-
* system_prompt: "system_prompt"
|
|
35
|
-
* })
|
|
34
|
+
* await client.conversationItems.replay("id")
|
|
36
35
|
*/
|
|
37
|
-
replay(id: string, request
|
|
36
|
+
replay(id: string, request?: Phonic.ReplayConversationItemRequest, requestOptions?: ConversationItemsClient.RequestOptions): core.HttpResponsePromise<Phonic.ReplayConversationItemResponse>;
|
|
38
37
|
private __replay;
|
|
39
38
|
}
|
|
@@ -23,8 +23,9 @@ export class ConversationItemsClient {
|
|
|
23
23
|
* Returns the alternative response(s) the assistant would have
|
|
24
24
|
* produced for this conversation turn given changes to the agent system prompt.
|
|
25
25
|
*
|
|
26
|
-
* Only assistant items from ended conversations can be replayed.
|
|
27
|
-
*
|
|
26
|
+
* Only assistant items from ended conversations can be replayed. Omit the
|
|
27
|
+
* request body (or omit `system_prompt`) to replay the turn exactly as it
|
|
28
|
+
* originally ran.
|
|
28
29
|
*
|
|
29
30
|
* @param {string} id - The ID of the conversation item to replay.
|
|
30
31
|
* @param {Phonic.ReplayConversationItemRequest} request
|
|
@@ -39,15 +40,13 @@ export class ConversationItemsClient {
|
|
|
39
40
|
* @throws {@link Phonic.InternalServerError}
|
|
40
41
|
*
|
|
41
42
|
* @example
|
|
42
|
-
* await client.conversationItems.replay("id"
|
|
43
|
-
* system_prompt: "system_prompt"
|
|
44
|
-
* })
|
|
43
|
+
* await client.conversationItems.replay("id")
|
|
45
44
|
*/
|
|
46
|
-
replay(id, request, requestOptions) {
|
|
45
|
+
replay(id, request = {}, requestOptions) {
|
|
47
46
|
return core.HttpResponsePromise.fromPromise(this.__replay(id, request, requestOptions));
|
|
48
47
|
}
|
|
49
|
-
__replay(
|
|
50
|
-
return __awaiter(this,
|
|
48
|
+
__replay(id_1) {
|
|
49
|
+
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
51
50
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
52
51
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
53
52
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
package/dist/esm/api/resources/conversationItems/client/requests/ReplayConversationItemRequest.d.mts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
|
-
* {
|
|
4
|
-
* system_prompt: "system_prompt"
|
|
5
|
-
* }
|
|
3
|
+
* {}
|
|
6
4
|
*/
|
|
7
5
|
export interface ReplayConversationItemRequest {
|
|
8
|
-
/** The system prompt to use when generating replay responses. Use this to test prompt changes against this conversation turn. */
|
|
9
|
-
system_prompt
|
|
6
|
+
/** The system prompt to use when generating replay responses. Use this to test prompt changes against this conversation turn. Omit it to replay the turn with the system prompt it originally ran with. */
|
|
7
|
+
system_prompt?: string;
|
|
10
8
|
/** Number of alternative responses to generate. */
|
|
11
9
|
num_responses?: number;
|
|
12
10
|
}
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.32.
|
|
1
|
+
export declare const SDK_VERSION = "0.32.17";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.32.
|
|
1
|
+
export const SDK_VERSION = "0.32.17";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -2406,8 +2406,9 @@ await client.apiKeys.rotate("id");
|
|
|
2406
2406
|
Returns the alternative response(s) the assistant would have
|
|
2407
2407
|
produced for this conversation turn given changes to the agent system prompt.
|
|
2408
2408
|
|
|
2409
|
-
Only assistant items from ended conversations can be replayed.
|
|
2410
|
-
|
|
2409
|
+
Only assistant items from ended conversations can be replayed. Omit the
|
|
2410
|
+
request body (or omit `system_prompt`) to replay the turn exactly as it
|
|
2411
|
+
originally ran.
|
|
2411
2412
|
</dd>
|
|
2412
2413
|
</dl>
|
|
2413
2414
|
</dd>
|
|
@@ -2422,9 +2423,7 @@ conversation must have an associated agent.
|
|
|
2422
2423
|
<dd>
|
|
2423
2424
|
|
|
2424
2425
|
```typescript
|
|
2425
|
-
await client.conversationItems.replay("id"
|
|
2426
|
-
system_prompt: "system_prompt"
|
|
2427
|
-
});
|
|
2426
|
+
await client.conversationItems.replay("id");
|
|
2428
2427
|
|
|
2429
2428
|
```
|
|
2430
2429
|
</dd>
|