@flashbacktech/flashbackclient 0.2.47 → 0.2.48
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.js
CHANGED
|
@@ -698,6 +698,21 @@ class ApiClient {
|
|
|
698
698
|
if (query.skip !== undefined) {
|
|
699
699
|
queryParams.append('skip', query.skip.toString());
|
|
700
700
|
}
|
|
701
|
+
if (query.llmType && query.llmType.length > 0) {
|
|
702
|
+
queryParams.append('llmType', query.llmType.join(','));
|
|
703
|
+
}
|
|
704
|
+
if (query.llmModel && query.llmModel.length > 0) {
|
|
705
|
+
queryParams.append('llmModel', query.llmModel.join(','));
|
|
706
|
+
}
|
|
707
|
+
if (query.host && query.host.length > 0) {
|
|
708
|
+
queryParams.append('host', query.host.join(','));
|
|
709
|
+
}
|
|
710
|
+
if (query.severity && query.severity.length > 0) {
|
|
711
|
+
queryParams.append('severity', query.severity.join(','));
|
|
712
|
+
}
|
|
713
|
+
if (query.block !== undefined) {
|
|
714
|
+
queryParams.append('block', query.block.toString());
|
|
715
|
+
}
|
|
701
716
|
return this.makeRequest(`policy/violations?${queryParams.toString()}`, 'GET', null);
|
|
702
717
|
};
|
|
703
718
|
this.getPolicyViolationsByPolicyId = async (policyId, query) => {
|
|
@@ -720,6 +735,21 @@ class ApiClient {
|
|
|
720
735
|
if (query.skip !== undefined) {
|
|
721
736
|
queryParams.append('skip', query.skip.toString());
|
|
722
737
|
}
|
|
738
|
+
if (query.llmType && query.llmType.length > 0) {
|
|
739
|
+
queryParams.append('llmType', query.llmType.join(','));
|
|
740
|
+
}
|
|
741
|
+
if (query.llmModel && query.llmModel.length > 0) {
|
|
742
|
+
queryParams.append('llmModel', query.llmModel.join(','));
|
|
743
|
+
}
|
|
744
|
+
if (query.host && query.host.length > 0) {
|
|
745
|
+
queryParams.append('host', query.host.join(','));
|
|
746
|
+
}
|
|
747
|
+
if (query.severity && query.severity.length > 0) {
|
|
748
|
+
queryParams.append('severity', query.severity.join(','));
|
|
749
|
+
}
|
|
750
|
+
if (query.block !== undefined) {
|
|
751
|
+
queryParams.append('block', query.block.toString());
|
|
752
|
+
}
|
|
723
753
|
return this.makeRequest(`policy/${policyId}/violations${queryParams.toString() ? `?${queryParams.toString()}` : ''}`, 'GET', null);
|
|
724
754
|
};
|
|
725
755
|
this.getPolicyAlerts = async (query) => {
|
|
@@ -745,6 +775,15 @@ class ApiClient {
|
|
|
745
775
|
if (query.skip !== undefined) {
|
|
746
776
|
queryParams.append('skip', query.skip.toString());
|
|
747
777
|
}
|
|
778
|
+
if (query.llmType && query.llmType.length > 0) {
|
|
779
|
+
queryParams.append('llmType', query.llmType.join(','));
|
|
780
|
+
}
|
|
781
|
+
if (query.llmModel && query.llmModel.length > 0) {
|
|
782
|
+
queryParams.append('llmModel', query.llmModel.join(','));
|
|
783
|
+
}
|
|
784
|
+
if (query.host && query.host.length > 0) {
|
|
785
|
+
queryParams.append('host', query.host.join(','));
|
|
786
|
+
}
|
|
748
787
|
return this.makeRequest(`policy/alerts?${queryParams.toString()}`, 'GET', null);
|
|
749
788
|
};
|
|
750
789
|
this.getPolicyAlertsByPolicyId = async (policyId, query) => {
|
|
@@ -767,6 +806,15 @@ class ApiClient {
|
|
|
767
806
|
if (query.skip !== undefined) {
|
|
768
807
|
queryParams.append('skip', query.skip.toString());
|
|
769
808
|
}
|
|
809
|
+
if (query.llmType && query.llmType.length > 0) {
|
|
810
|
+
queryParams.append('llmType', query.llmType.join(','));
|
|
811
|
+
}
|
|
812
|
+
if (query.llmModel && query.llmModel.length > 0) {
|
|
813
|
+
queryParams.append('llmModel', query.llmModel.join(','));
|
|
814
|
+
}
|
|
815
|
+
if (query.host && query.host.length > 0) {
|
|
816
|
+
queryParams.append('host', query.host.join(','));
|
|
817
|
+
}
|
|
770
818
|
return this.makeRequest(`policy/${policyId}/alerts${queryParams.toString() ? `?${queryParams.toString()}` : ''}`, 'GET', null);
|
|
771
819
|
};
|
|
772
820
|
this.validatePolicies = async (data) => {
|
|
@@ -866,6 +914,12 @@ class ApiClient {
|
|
|
866
914
|
if (params.hosts && params.hosts.length > 0) {
|
|
867
915
|
queryParams.append('hosts', params.hosts.join(','));
|
|
868
916
|
}
|
|
917
|
+
if (params.llmType && params.llmType.length > 0) {
|
|
918
|
+
queryParams.append('llmType', params.llmType.join(','));
|
|
919
|
+
}
|
|
920
|
+
if (params.llmModel && params.llmModel.length > 0) {
|
|
921
|
+
queryParams.append('llmModel', params.llmModel.join(','));
|
|
922
|
+
}
|
|
869
923
|
return this.makeRequest(`aistats/daily?${queryParams.toString()}`, 'GET', null);
|
|
870
924
|
}
|
|
871
925
|
async getAiStatsMinute(params) {
|
|
@@ -888,6 +942,12 @@ class ApiClient {
|
|
|
888
942
|
if (params.hosts && params.hosts.length > 0) {
|
|
889
943
|
queryParams.append('hosts', params.hosts.join(','));
|
|
890
944
|
}
|
|
945
|
+
if (params.llmType && params.llmType.length > 0) {
|
|
946
|
+
queryParams.append('llmType', params.llmType.join(','));
|
|
947
|
+
}
|
|
948
|
+
if (params.llmModel && params.llmModel.length > 0) {
|
|
949
|
+
queryParams.append('llmModel', params.llmModel.join(','));
|
|
950
|
+
}
|
|
891
951
|
return this.makeRequest(`aistats/minute?${queryParams.toString()}`, 'GET', null);
|
|
892
952
|
}
|
|
893
953
|
async getNodeStatsMinute(params) {
|
|
@@ -63,6 +63,11 @@ export interface GetPolicyViolationsQuery {
|
|
|
63
63
|
to?: string;
|
|
64
64
|
take?: number;
|
|
65
65
|
skip?: number;
|
|
66
|
+
llmType?: string[];
|
|
67
|
+
llmModel?: string[];
|
|
68
|
+
host?: string[];
|
|
69
|
+
severity?: RiskType[];
|
|
70
|
+
block?: boolean;
|
|
66
71
|
}
|
|
67
72
|
export interface PolicyViolationDTO {
|
|
68
73
|
id: string;
|
|
@@ -77,6 +82,11 @@ export interface PolicyViolationDTO {
|
|
|
77
82
|
userName: string;
|
|
78
83
|
repoAiApiKeyId: string;
|
|
79
84
|
repoAiApiKeyName: string;
|
|
85
|
+
severity: RiskType | null;
|
|
86
|
+
block: boolean;
|
|
87
|
+
llmType: string;
|
|
88
|
+
llmModel: string;
|
|
89
|
+
host: string;
|
|
80
90
|
}
|
|
81
91
|
export interface GetPolicyViolationsResponse {
|
|
82
92
|
success: boolean;
|
|
@@ -93,6 +103,9 @@ export interface GetPolicyAlertsQuery {
|
|
|
93
103
|
to?: string;
|
|
94
104
|
take?: number;
|
|
95
105
|
skip?: number;
|
|
106
|
+
llmType?: string[];
|
|
107
|
+
llmModel?: string[];
|
|
108
|
+
host?: string[];
|
|
96
109
|
}
|
|
97
110
|
export interface PolicyAlertDTO {
|
|
98
111
|
id: string;
|
|
@@ -107,6 +120,9 @@ export interface PolicyAlertDTO {
|
|
|
107
120
|
userName: string;
|
|
108
121
|
repoAiApiKeyId: string;
|
|
109
122
|
repoAiApiKeyName: string;
|
|
123
|
+
llmType: string;
|
|
124
|
+
llmModel: string;
|
|
125
|
+
host: string;
|
|
110
126
|
}
|
|
111
127
|
export interface GetPolicyAlertsResponse {
|
|
112
128
|
success: boolean;
|
|
@@ -5,6 +5,8 @@ export interface AiStatsQueryParams {
|
|
|
5
5
|
aiLlmId?: string[];
|
|
6
6
|
repoAiApiKeyId?: string[];
|
|
7
7
|
hosts?: string[];
|
|
8
|
+
llmType?: string[];
|
|
9
|
+
llmModel?: string[];
|
|
8
10
|
}
|
|
9
11
|
export interface AiStatsResponse {
|
|
10
12
|
success: boolean;
|
|
@@ -25,6 +27,9 @@ export interface AiStatsData {
|
|
|
25
27
|
policyViolations: number;
|
|
26
28
|
numAlerts: number;
|
|
27
29
|
numBlocks: number;
|
|
30
|
+
numSeverityLow: number;
|
|
31
|
+
numSeverityMedium: number;
|
|
32
|
+
numSeverityHigh: number;
|
|
28
33
|
latency_ms: number;
|
|
29
34
|
llmType: string;
|
|
30
35
|
llmModel: string;
|