@flashbacktech/flashbackclient 0.2.57 → 0.2.59
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/api/client.d.ts
CHANGED
|
@@ -235,8 +235,8 @@ export declare class ApiClient implements IApiClient {
|
|
|
235
235
|
nodeRegister: (data: RegisterRequest) => Promise<RegisterResponse>;
|
|
236
236
|
nodeUnregister: (data: RegisterRequest) => Promise<RegisterResponse>;
|
|
237
237
|
getSystemEvents: (data: SystemEventQueryRequest) => Promise<SystemEventQueryResponse>;
|
|
238
|
-
markSystemEventAsRead: (systemEventLogId: number) => Promise<SystemEventReadStatusResponse>;
|
|
239
|
-
markSystemEventAsUnread: (systemEventLogId: number) => Promise<SystemEventReadStatusResponse>;
|
|
238
|
+
markSystemEventAsRead: (systemEventLogId: number | number[]) => Promise<SystemEventReadStatusResponse>;
|
|
239
|
+
markSystemEventAsUnread: (systemEventLogId: number | number[]) => Promise<SystemEventReadStatusResponse>;
|
|
240
240
|
createAiLlm: (data: CreateAiLlmRequest) => Promise<CreateAiLlmResponse>;
|
|
241
241
|
getAiLlms: (workspaceId?: string) => Promise<GetAiLlmsResponse>;
|
|
242
242
|
getAiLlmStats: (aiLlmId?: string) => Promise<AiLlmStatsResponse>;
|
package/dist/api/client.js
CHANGED
|
@@ -582,10 +582,16 @@ class ApiClient {
|
|
|
582
582
|
return this.makeRequest('systemevent', 'POST', data);
|
|
583
583
|
};
|
|
584
584
|
this.markSystemEventAsRead = async (systemEventLogId) => {
|
|
585
|
-
|
|
585
|
+
const body = Array.isArray(systemEventLogId)
|
|
586
|
+
? { ids: systemEventLogId }
|
|
587
|
+
: { id: systemEventLogId };
|
|
588
|
+
return this.makeRequest('systemevent/read', 'POST', body);
|
|
586
589
|
};
|
|
587
590
|
this.markSystemEventAsUnread = async (systemEventLogId) => {
|
|
588
|
-
|
|
591
|
+
const body = Array.isArray(systemEventLogId)
|
|
592
|
+
? { ids: systemEventLogId }
|
|
593
|
+
: { id: systemEventLogId };
|
|
594
|
+
return this.makeRequest('systemevent/read', 'DELETE', body);
|
|
589
595
|
};
|
|
590
596
|
////// AI LLM API calls
|
|
591
597
|
this.createAiLlm = async (data) => {
|
|
@@ -976,6 +982,12 @@ class ApiClient {
|
|
|
976
982
|
if (params.llmModel && params.llmModel.length > 0) {
|
|
977
983
|
queryParams.append('llmModel', params.llmModel.join(','));
|
|
978
984
|
}
|
|
985
|
+
if (params.userUuid && params.userUuid.length > 0) {
|
|
986
|
+
queryParams.append('userUuid', params.userUuid.join(','));
|
|
987
|
+
}
|
|
988
|
+
if (params.conversationUuid && params.conversationUuid.length > 0) {
|
|
989
|
+
queryParams.append('conversationUuid', params.conversationUuid.join(','));
|
|
990
|
+
}
|
|
979
991
|
return this.makeRequest(`aistats/daily?${queryParams.toString()}`, 'GET', null);
|
|
980
992
|
}
|
|
981
993
|
async getAiStatsMinute(params) {
|
|
@@ -1004,6 +1016,12 @@ class ApiClient {
|
|
|
1004
1016
|
if (params.llmModel && params.llmModel.length > 0) {
|
|
1005
1017
|
queryParams.append('llmModel', params.llmModel.join(','));
|
|
1006
1018
|
}
|
|
1019
|
+
if (params.userUuid && params.userUuid.length > 0) {
|
|
1020
|
+
queryParams.append('userUuid', params.userUuid.join(','));
|
|
1021
|
+
}
|
|
1022
|
+
if (params.conversationUuid && params.conversationUuid.length > 0) {
|
|
1023
|
+
queryParams.append('conversationUuid', params.conversationUuid.join(','));
|
|
1024
|
+
}
|
|
1007
1025
|
return this.makeRequest(`aistats/minute?${queryParams.toString()}`, 'GET', null);
|
|
1008
1026
|
}
|
|
1009
1027
|
async getNodeStatsMinute(params) {
|
|
@@ -7,6 +7,8 @@ export interface AiStatsQueryParams {
|
|
|
7
7
|
hosts?: string[];
|
|
8
8
|
llmType?: string[];
|
|
9
9
|
llmModel?: string[];
|
|
10
|
+
userUuid?: string[];
|
|
11
|
+
conversationUuid?: string[];
|
|
10
12
|
}
|
|
11
13
|
export interface AiStatsResponse {
|
|
12
14
|
success: boolean;
|
|
@@ -34,4 +36,6 @@ export interface AiStatsData {
|
|
|
34
36
|
llmType: string;
|
|
35
37
|
llmModel: string;
|
|
36
38
|
host: string;
|
|
39
|
+
userUuid: string;
|
|
40
|
+
conversationUuid: string;
|
|
37
41
|
}
|
|
@@ -32,6 +32,11 @@ export interface SystemEventQueryResponse {
|
|
|
32
32
|
skip: number;
|
|
33
33
|
take: number;
|
|
34
34
|
}
|
|
35
|
+
/** Request body for mark-as-read / mark-as-unread: single id or array of ids. */
|
|
36
|
+
export interface SystemEventReadIdsRequest {
|
|
37
|
+
id?: number;
|
|
38
|
+
ids?: number[];
|
|
39
|
+
}
|
|
35
40
|
/** Response for mark-as-read / mark-as-unread. */
|
|
36
41
|
export interface SystemEventReadStatusResponse {
|
|
37
42
|
success: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flashbacktech/flashbackclient",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.59",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@aws-sdk/client-sts": "^3.777.0",
|
|
28
|
-
"@flashbacktech/flashbackclient": "^0.2.
|
|
28
|
+
"@flashbacktech/flashbackclient": "^0.2.58",
|
|
29
29
|
"@google-cloud/storage": "^7.15.0",
|
|
30
30
|
"@stellar/stellar-sdk": "^14.0.0",
|
|
31
31
|
"formdata-node": "^6.0.3",
|