@flashbacktech/flashbackclient 0.0.99 → 0.1.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.
@@ -1,7 +1,7 @@
1
1
  import { CreateUnitRequest, CreateUnitResponse, CreateRepoRequest, CreateRepoResponse, StorageUnit, CreateRepoKeyRequest, CreateRepoKeyResponse, GetUnitsResponse, GetReposResponse, GetRepoKeysResponse, UpdateUnitRequest, UpdateUnitResponse, ActionResponse, UpdateRepoRequest, UpdateRepoResponse, UpdateRepoKeyRequest, UpdateRepoKeyResponse, ValidateUnitRequest, ValidateUnitResponse, ValidateRepoUnitsRequest, ValidateRepoUnitsResponse, StorageUnitStatusResponse, GetUnitNodeStatsResponse, GetUnitNodeStatsRequest } from './types/storage';
2
2
  import { IApiClient, ProviderType } from './interfaces';
3
3
  import { ActivateResponse, DeactivateResponse, LoginBody, LoginResponse, LogoutResponse, OAuth2ResponseDTO, RefreshTokenErrorResponse, RefreshTokenResponse, RegisterBody, RegisterResponse } from './types/auth';
4
- import { StatsQueryParams, StatsResponse, NodeStatsMinuteResponse, NodeStatsDailyResponse, NodeStatsQueryParams, UnitStatsResponse, RepoStatsResponse } from './types/stats';
4
+ import { StatsQueryParams, StatsResponse, NodeStatsMinuteResponse, NodeStatsDailyResponse, NodeStatsQueryParams, UnitStatsResponse, RepoStatsResponse, NodeStatsDailyQueryParams } from './types/stats';
5
5
  interface ErrorResponse {
6
6
  message?: string;
7
7
  [key: string]: any;
@@ -64,7 +64,7 @@ export declare class ApiClient implements IApiClient {
64
64
  getDailyStats: (params: StatsQueryParams) => Promise<StatsResponse>;
65
65
  getMinuteStats: (params: StatsQueryParams) => Promise<StatsResponse>;
66
66
  getNodeStatsMinute: (params: NodeStatsQueryParams) => Promise<NodeStatsMinuteResponse>;
67
- getNodeStatsDaily: (params: NodeStatsQueryParams) => Promise<NodeStatsDailyResponse>;
67
+ getNodeStatsDaily: (params: NodeStatsDailyQueryParams) => Promise<NodeStatsDailyResponse>;
68
68
  getRepoStats: (params?: {
69
69
  repoId?: string[];
70
70
  }) => Promise<RepoStatsResponse>;
@@ -255,12 +255,6 @@ class ApiClient {
255
255
  if (params.unitId.length > 0) {
256
256
  queryParams.append('unitId', params.unitId.join(','));
257
257
  }
258
- if (params.startDate) {
259
- queryParams.append('startDate', params.startDate.toISOString());
260
- }
261
- if (params.endDate) {
262
- queryParams.append('endDate', params.endDate.toISOString());
263
- }
264
258
  const response = await this.makeRequest(`stats/nodes/minute?${queryParams.toString() ? `?${queryParams.toString()}` : ''}`, 'GET', null);
265
259
  // Process the response to convert lastUpdated strings to Date objects
266
260
  const processedData = response.data.map((item) => ({
@@ -50,6 +50,9 @@ export interface NodeStatsDailyData {
50
50
  }
51
51
  export interface NodeStatsQueryParams {
52
52
  unitId: string[];
53
+ }
54
+ export interface NodeStatsDailyQueryParams {
55
+ unitId: string[];
53
56
  startDate?: Date;
54
57
  endDate?: Date;
55
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flashbacktech/flashbackclient",
3
- "version": "0.0.99",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"