@flashbacktech/flashbackclient 0.2.75 → 0.2.77

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.
@@ -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';
41
+ type: 'bucket' | 'model' | 'user' | 'node' | 'rule' | 'apiKey';
42
42
  id: string;
43
43
  };
44
44
  }
@@ -100,6 +100,10 @@ export interface DashboardBreakdownQueryParams {
100
100
  includeSeries?: boolean;
101
101
  limit?: number;
102
102
  offset?: number;
103
+ apiKeyId?: string;
104
+ model?: string;
105
+ bucketId?: string;
106
+ ruleId?: string;
103
107
  }
104
108
  export interface StorageMetrics {
105
109
  uplBytes: number;
@@ -112,9 +116,10 @@ export interface StorageTimeSeriesPoint extends StorageMetrics {
112
116
  ts: number;
113
117
  entityId?: string;
114
118
  }
115
- /** GET /v2/stats/storage?scope=...&id=...&window=...&bucketId=... */
119
+ /** GET /v2/stats/storage?scope=...&id=...&window=...&bucketId=...&apiKeyId=... */
116
120
  export interface StorageStatsQueryParams extends DashboardStatsQueryParams {
117
121
  bucketId?: string;
122
+ apiKeyId?: string;
118
123
  }
119
124
  export type StorageTimeSeriesResponse = TimeSeriesResponse<StorageTimeSeriesPoint>;
120
125
  export type StorageBreakdownResponse = BreakdownResponse<StorageMetrics>;
@@ -147,9 +152,10 @@ export interface AiGatewayTimeSeriesPoint extends AiGatewayMetrics {
147
152
  ts: number;
148
153
  entityId?: string;
149
154
  }
150
- /** GET /v2/stats/ai?scope=...&id=...&window=...&model=... */
155
+ /** GET /v2/stats/ai?scope=...&id=...&window=...&model=...&apiKeyId=... */
151
156
  export interface AiGatewayStatsQueryParams extends DashboardStatsQueryParams {
152
157
  model?: string;
158
+ apiKeyId?: string;
153
159
  }
154
160
  export type AiGatewayTimeSeriesResponse = TimeSeriesResponse<AiGatewayTimeSeriesPoint>;
155
161
  export type AiGatewayBreakdownResponse = BreakdownResponse<AiGatewayMetrics>;
@@ -163,14 +169,15 @@ export interface PrivateChatTimeSeriesPoint extends PrivateChatMetrics {
163
169
  entityId?: string;
164
170
  }
165
171
  /**
166
- * GET /v2/stats/private-chat?scope=...&id=...&window=...&model=...&userId=...
172
+ * GET /v2/stats/private-chat?scope=...&id=...&window=...&model=...&userId=...&apiKeyId=...
167
173
  *
168
- * `model` and `userId` are resource-level filters that narrow the time-series
169
- * to a single model or user respectively.
174
+ * `model`, `userId`, and `apiKeyId` are resource-level filters that narrow the
175
+ * time-series to a single model, user, or API key respectively.
170
176
  */
171
177
  export interface PrivateChatStatsQueryParams extends DashboardStatsQueryParams {
172
178
  model?: string;
173
179
  userId?: string;
180
+ apiKeyId?: string;
174
181
  }
175
182
  export type PrivateChatTimeSeriesResponse = TimeSeriesResponse<PrivateChatTimeSeriesPoint>;
176
183
  export type PrivateChatModelBreakdownResponse = BreakdownResponse<PrivateChatMetrics>;
@@ -215,9 +222,10 @@ export interface PolicyTimeSeriesPoint extends PolicyMetrics {
215
222
  ts: number;
216
223
  entityId?: string;
217
224
  }
218
- /** GET /v2/stats/policies?scope=...&id=...&window=...&ruleId=... */
225
+ /** GET /v2/stats/policies?scope=...&id=...&window=...&ruleId=...&apiKeyId=... */
219
226
  export interface PolicyStatsQueryParams extends DashboardStatsQueryParams {
220
227
  ruleId?: string;
228
+ apiKeyId?: string;
221
229
  }
222
230
  export type PolicyTimeSeriesResponse = TimeSeriesResponse<PolicyTimeSeriesPoint>;
223
231
  /**
@@ -240,7 +248,9 @@ export interface CreditTimeSeriesPoint extends CreditMetrics {
240
248
  ts: number;
241
249
  entityId?: string;
242
250
  }
243
- /** GET /v2/stats/credits?scope=...&id=...&window=... */
244
- export type CreditStatsQueryParams = DashboardStatsQueryParams;
251
+ /** GET /v2/stats/credits?scope=...&id=...&window=...&apiKeyId=... */
252
+ export interface CreditStatsQueryParams extends DashboardStatsQueryParams {
253
+ apiKeyId?: string;
254
+ }
245
255
  export type CreditTimeSeriesResponse = TimeSeriesResponse<CreditTimeSeriesPoint>;
246
256
  export type CreditBreakdownResponse = BreakdownResponse<CreditMetrics>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flashbacktech/flashbackclient",
3
- "version": "0.2.75",
3
+ "version": "0.2.77",
4
4
  "type": "commonjs",
5
5
  "publishConfig": {
6
6
  "access": "public"