@fonoster/apiserver 0.52.0 → 0.52.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.
|
@@ -136,7 +136,7 @@ function subscribeRegistryUsage(nc, db) {
|
|
|
136
136
|
*/
|
|
137
137
|
function listWarnings(db_1, accessKeyId_1) {
|
|
138
138
|
return __awaiter(this, arguments, void 0, function* (db, accessKeyId, now = new Date()) {
|
|
139
|
-
var _a, _b, _c, _d
|
|
139
|
+
var _a, _b, _c, _d;
|
|
140
140
|
const notActive = { state: { not: "ACTIVE" } };
|
|
141
141
|
const [providers, models, voices, apps, notices] = yield Promise.all([
|
|
142
142
|
db.registryProvider.findMany({ where: notActive }),
|
|
@@ -203,8 +203,7 @@ function listWarnings(db_1, accessKeyId_1) {
|
|
|
203
203
|
[app.speechVoice, "app", "voice"],
|
|
204
204
|
[app.speechTtsModel, "app", "ttsModel"],
|
|
205
205
|
[app.speechSttModel, "app", "sttModel"],
|
|
206
|
-
[(_a = agent === null || agent === void 0 ? void 0 : agent.languageModel) === null || _a === void 0 ? void 0 : _a.model, "agent", "llm"]
|
|
207
|
-
[(_b = agent === null || agent === void 0 ? void 0 : agent.conversationSettings) === null || _b === void 0 ? void 0 : _b.voice, "agent", "voice"]
|
|
206
|
+
[(_a = agent === null || agent === void 0 ? void 0 : agent.languageModel) === null || _a === void 0 ? void 0 : _a.model, "agent", "llm"]
|
|
208
207
|
];
|
|
209
208
|
for (const [id, kind, field] of refs) {
|
|
210
209
|
if (!id)
|
|
@@ -218,15 +217,15 @@ function listWarnings(db_1, accessKeyId_1) {
|
|
|
218
217
|
const since = now.getTime() - exports.RUNTIME_WARNING_DAYS * 24 * 3600 * 1000;
|
|
219
218
|
for (const n of notices) {
|
|
220
219
|
const d = n.data;
|
|
221
|
-
const last = Date.parse(String((
|
|
220
|
+
const last = Date.parse(String((_b = d.lastSeenAt) !== null && _b !== void 0 ? _b : ""));
|
|
222
221
|
if (!(last >= since))
|
|
223
222
|
continue;
|
|
224
223
|
for (const e of flagged(String(d.id))) {
|
|
225
224
|
const w = warning(e);
|
|
226
225
|
w.runtimeApps = [
|
|
227
|
-
...new Set([...w.runtimeApps, ...((
|
|
226
|
+
...new Set([...w.runtimeApps, ...((_c = d.apps) !== null && _c !== void 0 ? _c : [])])
|
|
228
227
|
];
|
|
229
|
-
w.runtimeSessions += Number((
|
|
228
|
+
w.runtimeSessions += Number((_d = d.sessions) !== null && _d !== void 0 ? _d : 0);
|
|
230
229
|
if (!w.lastUsedAt || String(d.lastSeenAt) > w.lastUsedAt)
|
|
231
230
|
w.lastUsedAt = String(d.lastSeenAt);
|
|
232
231
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonoster/apiserver",
|
|
3
|
-
"version": "0.52.
|
|
3
|
+
"version": "0.52.1",
|
|
4
4
|
"description": "APIServer for Fonoster",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/fonoster#readme",
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"fonoster-owner": "./dist/bin/owner.js"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@fonoster/authz": "^0.52.
|
|
27
|
-
"@fonoster/autopilot": "^0.52.
|
|
26
|
+
"@fonoster/authz": "^0.52.1",
|
|
27
|
+
"@fonoster/autopilot": "^0.52.1",
|
|
28
28
|
"@fonoster/callrecord": "^0.52.0",
|
|
29
|
-
"@fonoster/common": "^0.52.
|
|
30
|
-
"@fonoster/identity": "^0.52.
|
|
29
|
+
"@fonoster/common": "^0.52.1",
|
|
30
|
+
"@fonoster/identity": "^0.52.1",
|
|
31
31
|
"@fonoster/logger": "^0.52.0",
|
|
32
|
-
"@fonoster/sipnet": "^0.52.
|
|
32
|
+
"@fonoster/sipnet": "^0.52.1",
|
|
33
33
|
"@fonoster/types": "^0.52.0",
|
|
34
34
|
"@grpc/grpc-js": "~1.14.6",
|
|
35
35
|
"@prisma/client": "^6.19.1",
|
|
@@ -62,13 +62,13 @@
|
|
|
62
62
|
"url": "https://github.com/fonoster/fonoster/issues"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@fonoster/ops": "^0.52.
|
|
65
|
+
"@fonoster/ops": "^0.52.1",
|
|
66
66
|
"@types/express": "^5.0.6",
|
|
67
67
|
"@types/jsonwebtoken": "^9.0.10",
|
|
68
68
|
"@types/uuid": "^10.0.0",
|
|
69
69
|
"@types/validator": "^13.15.10"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "f4affc8e96b5971ec37dd11f25f16a8eb6de3070",
|
|
72
72
|
"prisma": {
|
|
73
73
|
"seed": "tsx src/core/seed.ts"
|
|
74
74
|
}
|