agora-agents 2.16.0 → 2.16.1
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/agentkit/token.js +4 -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/agentkit/token.mjs +4 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -41,8 +41,8 @@ function normalizeClientOptions(options) {
|
|
|
41
41
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
42
42
|
"X-Fern-Language": "JavaScript",
|
|
43
43
|
"X-Fern-SDK-Name": "agora-agents",
|
|
44
|
-
"X-Fern-SDK-Version": "v2.16.
|
|
45
|
-
"User-Agent": "agora-agents/v2.16.
|
|
44
|
+
"X-Fern-SDK-Version": "v2.16.1",
|
|
45
|
+
"User-Agent": "agora-agents/v2.16.1",
|
|
46
46
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
47
47
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
48
48
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -157,7 +157,10 @@ function generateConvoAIToken(opts) {
|
|
|
157
157
|
const configuredPrivilegeExpire = (_b = opts.privilegeExpire) !== null && _b !== void 0 ? _b : 0;
|
|
158
158
|
const privilegeExpire = configuredPrivilegeExpire === 0 ? tokenExpire : configuredPrivilegeExpire;
|
|
159
159
|
const account = _uidToAccount(opts.uid);
|
|
160
|
-
return _requireBuiltToken(
|
|
160
|
+
return _requireBuiltToken(
|
|
161
|
+
// agora-token >= 2.0.7 signature. It grants publisher RTC privileges and
|
|
162
|
+
// RTM login for `account`, all expiring at `privilegeExpire`.
|
|
163
|
+
agora_token_1.default.ConvoAITokenBuilder.buildToken(opts.appId, opts.appCertificate, opts.channelName, account, tokenExpire, privilegeExpire), opts.appId, opts.appCertificate);
|
|
161
164
|
}
|
|
162
165
|
function _uidToAccount(uid) {
|
|
163
166
|
if (typeof uid === "string") {
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "v2.16.
|
|
1
|
+
export declare const SDK_VERSION = "v2.16.1";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -5,8 +5,8 @@ export function normalizeClientOptions(options) {
|
|
|
5
5
|
const headers = mergeHeaders({
|
|
6
6
|
"X-Fern-Language": "JavaScript",
|
|
7
7
|
"X-Fern-SDK-Name": "agora-agents",
|
|
8
|
-
"X-Fern-SDK-Version": "v2.16.
|
|
9
|
-
"User-Agent": "agora-agents/v2.16.
|
|
8
|
+
"X-Fern-SDK-Version": "v2.16.1",
|
|
9
|
+
"User-Agent": "agora-agents/v2.16.1",
|
|
10
10
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
11
11
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
12
12
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -147,7 +147,10 @@ export function generateConvoAIToken(opts) {
|
|
|
147
147
|
const configuredPrivilegeExpire = (_b = opts.privilegeExpire) !== null && _b !== void 0 ? _b : 0;
|
|
148
148
|
const privilegeExpire = configuredPrivilegeExpire === 0 ? tokenExpire : configuredPrivilegeExpire;
|
|
149
149
|
const account = _uidToAccount(opts.uid);
|
|
150
|
-
return _requireBuiltToken(
|
|
150
|
+
return _requireBuiltToken(
|
|
151
|
+
// agora-token >= 2.0.7 signature. It grants publisher RTC privileges and
|
|
152
|
+
// RTM login for `account`, all expiring at `privilegeExpire`.
|
|
153
|
+
agoraToken.ConvoAITokenBuilder.buildToken(opts.appId, opts.appCertificate, opts.channelName, account, tokenExpire, privilegeExpire), opts.appId, opts.appCertificate);
|
|
151
154
|
}
|
|
152
155
|
function _uidToAccount(uid) {
|
|
153
156
|
if (typeof uid === "string") {
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "v2.16.
|
|
1
|
+
export declare const SDK_VERSION = "v2.16.1";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "v2.16.
|
|
1
|
+
export const SDK_VERSION = "v2.16.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agora-agents",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": "github:AgoraIO/agora-agents-ts",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"test:coverage:unit": "vitest run --project unit --coverage"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"agora-token": "^2.0.
|
|
52
|
+
"agora-token": "^2.0.7"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"webpack": "^5.97.1",
|