@flashbacktech/flashbackclient 0.2.83 → 0.2.85
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
|
@@ -237,6 +237,8 @@ class ApiClient {
|
|
|
237
237
|
queryParams.append('workspaceId', params.workspaceId);
|
|
238
238
|
if (params.capability !== undefined)
|
|
239
239
|
queryParams.append('capability', String(params.capability));
|
|
240
|
+
if (params.provider)
|
|
241
|
+
queryParams.append('provider', params.provider);
|
|
240
242
|
}
|
|
241
243
|
}
|
|
242
244
|
return this.makeRequest('apikeys?' + queryParams.toString(), 'GET', null);
|
|
@@ -14,7 +14,7 @@ export type DashboardScope = 'org' | 'workspace' | 'repo';
|
|
|
14
14
|
export type DashboardWindow = '24h' | '7d' | '30d' | '90d' | '180d' | '365d';
|
|
15
15
|
export type DashboardTimeBucketSize = '5m' | '10m' | '1h' | '6h' | '12h' | '1d';
|
|
16
16
|
export type StorageBreakdownBy = 'workspaces' | 'repos' | 'buckets' | 'providers' | 'nodes';
|
|
17
|
-
export type AiBreakdownBy = 'workspaces' | 'repos' | 'models' | 'providers' | 'nodes';
|
|
17
|
+
export type AiBreakdownBy = 'workspaces' | 'repos' | 'models' | 'providers' | 'nodes' | 'configs';
|
|
18
18
|
export type PrivateChatBreakdownBy = 'models' | 'users';
|
|
19
19
|
export type PolicyBreakdownBy = 'rules' | 'users';
|
|
20
20
|
export type CreditBreakdownBy = 'workspaces' | 'repos' | 'models' | 'providers' | 'buckets';
|
|
@@ -38,7 +38,7 @@ export interface TimeSeriesMeta {
|
|
|
38
38
|
window: DashboardWindow;
|
|
39
39
|
timeBucketSize: DashboardTimeBucketSize;
|
|
40
40
|
resourceFilter?: {
|
|
41
|
-
type: 'bucket' | 'model' | 'user' | 'node' | 'rule' | 'apiKey';
|
|
41
|
+
type: 'bucket' | 'model' | 'user' | 'node' | 'rule' | 'apiKey' | 'aiLlm';
|
|
42
42
|
id: string;
|
|
43
43
|
};
|
|
44
44
|
}
|
|
@@ -54,7 +54,7 @@ export interface BreakdownMeta {
|
|
|
54
54
|
offset: number;
|
|
55
55
|
totalEntities: number;
|
|
56
56
|
resourceFilter?: {
|
|
57
|
-
type: 'bucket' | 'model' | 'user' | 'node' | 'rule' | 'apiKey';
|
|
57
|
+
type: 'bucket' | 'model' | 'user' | 'node' | 'rule' | 'apiKey' | 'aiLlm';
|
|
58
58
|
id: string;
|
|
59
59
|
};
|
|
60
60
|
}
|
|
@@ -109,6 +109,7 @@ export interface DashboardBreakdownQueryParams {
|
|
|
109
109
|
bucketId?: string;
|
|
110
110
|
ruleId?: string;
|
|
111
111
|
userId?: string;
|
|
112
|
+
aiLlmId?: string;
|
|
112
113
|
}
|
|
113
114
|
export interface StorageMetrics {
|
|
114
115
|
uplBytes: number;
|
|
@@ -161,6 +162,7 @@ export interface AiGatewayTimeSeriesPoint extends AiGatewayMetrics {
|
|
|
161
162
|
export interface AiGatewayStatsQueryParams extends DashboardStatsQueryParams {
|
|
162
163
|
model?: string;
|
|
163
164
|
apiKeyId?: string;
|
|
165
|
+
aiLlmId?: string;
|
|
164
166
|
}
|
|
165
167
|
export type AiGatewayTimeSeriesResponse = TimeSeriesResponse<AiGatewayTimeSeriesPoint>;
|
|
166
168
|
export type AiGatewayBreakdownResponse = BreakdownResponse<AiGatewayMetrics>;
|
|
@@ -183,6 +185,7 @@ export interface PrivateChatStatsQueryParams extends DashboardStatsQueryParams {
|
|
|
183
185
|
model?: string;
|
|
184
186
|
userId?: string;
|
|
185
187
|
apiKeyId?: string;
|
|
188
|
+
aiLlmId?: string;
|
|
186
189
|
}
|
|
187
190
|
export type PrivateChatTimeSeriesResponse = TimeSeriesResponse<PrivateChatTimeSeriesPoint>;
|
|
188
191
|
export type PrivateChatModelBreakdownResponse = BreakdownResponse<PrivateChatMetrics>;
|
|
@@ -256,6 +259,7 @@ export interface CreditTimeSeriesPoint extends CreditMetrics {
|
|
|
256
259
|
/** GET /v2/stats/credits?scope=...&id=...&window=...&apiKeyId=... */
|
|
257
260
|
export interface CreditStatsQueryParams extends DashboardStatsQueryParams {
|
|
258
261
|
apiKeyId?: string;
|
|
262
|
+
aiLlmId?: string;
|
|
259
263
|
}
|
|
260
264
|
export type CreditTimeSeriesResponse = TimeSeriesResponse<CreditTimeSeriesPoint>;
|
|
261
265
|
export type CreditBreakdownResponse = BreakdownResponse<CreditMetrics>;
|
|
@@ -280,11 +280,13 @@ export declare enum ProviderCapability {
|
|
|
280
280
|
/** General / all (e.g. OTHER provider). */
|
|
281
281
|
All = 255
|
|
282
282
|
}
|
|
283
|
-
/** Query params for GET /apikeys. When capability is set, only keys whose provider supports that capability are returned. */
|
|
283
|
+
/** Query params for GET /apikeys. When capability is set, only keys whose provider supports that capability are returned. When provider is set, only keys for that provider (e.g. "AWS", "OPENAI") are returned. */
|
|
284
284
|
export interface GetProviderApiKeysParams {
|
|
285
285
|
workspaceId?: string;
|
|
286
286
|
/** Filter to providers that support this capability (e.g. ProviderCapability.Storage or ProviderCapability.AI). */
|
|
287
287
|
capability?: ProviderCapability;
|
|
288
|
+
/** Filter to API keys for this provider only (e.g. "AWS", "GCP", "OPENAI", "ANTHROPIC"). Use when the user has already chosen a provider (e.g. creating an AWS bucket or OPENAI LLM). */
|
|
289
|
+
provider?: string;
|
|
288
290
|
}
|
|
289
291
|
export interface ProviderApiKeyDTO {
|
|
290
292
|
id: string;
|