@flashbacktech/flashbackclient 0.0.67 → 0.0.69

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.
@@ -40,6 +40,7 @@ export declare class ApiClient implements IApiClient {
40
40
  validateStorageUnit: (unitId: string, data: ValidateUnitRequest) => Promise<ValidateUnitResponse>;
41
41
  updateStorageUnit: (unitId: string, data: UpdateUnitRequest) => Promise<UpdateUnitResponse>;
42
42
  deleteStorageUnit: (unitId: string) => Promise<ActionResponse>;
43
+ getAvailableStorageUnits: () => Promise<number[]>;
43
44
  createStorageRepo: (data: CreateRepoRequest) => Promise<CreateRepoResponse>;
44
45
  getStorageRepos: () => Promise<GetReposResponse>;
45
46
  updateStorageRepo: (repoId: string, data: UpdateRepoRequest) => Promise<UpdateRepoResponse>;
@@ -154,6 +154,9 @@ class ApiClient {
154
154
  this.deleteStorageUnit = async (unitId) => {
155
155
  return this.makeRequest(`unit/${unitId}`, 'DELETE', null);
156
156
  };
157
+ this.getAvailableStorageUnits = async () => {
158
+ return this.makeRequest('unit/available', 'GET', null);
159
+ };
157
160
  ////// Repos API
158
161
  this.createStorageRepo = async (data) => {
159
162
  return this.makeRequest('repo', 'POST', data);
@@ -11,6 +11,7 @@ export interface IApiClient {
11
11
  updateStorageUnit(unitId: string, data: UpdateUnitRequest): Promise<UpdateUnitResponse>;
12
12
  deleteStorageUnit(unitId: string): Promise<ActionResponse>;
13
13
  validateStorageUnit(unitId: string, data: ValidateUnitRequest): Promise<ValidateUnitResponse>;
14
+ getAvailableStorageUnits(): Promise<number[]>;
14
15
  createStorageRepo(data: CreateRepoRequest): Promise<CreateRepoResponse>;
15
16
  getStorageRepos(): Promise<GetReposResponse>;
16
17
  updateStorageRepo(repoId: string, data: UpdateRepoRequest): Promise<UpdateRepoResponse>;
@@ -36,10 +36,9 @@ export interface UpdateUnitResponse extends CreateUnitResponse {
36
36
  latency_ms?: number;
37
37
  }
38
38
  export interface RepoUnitInfo {
39
- id: string;
40
39
  folder: string;
41
40
  master: boolean;
42
- data?: StorageUnit;
41
+ unit?: StorageUnit;
43
42
  }
44
43
  export interface CreateRepoRequest {
45
44
  name: string;
@@ -77,7 +76,7 @@ export interface StorageRepo {
77
76
  name: string;
78
77
  storageType: StorageType;
79
78
  mode: ModeType;
80
- repoUnits: RepoUnitInfo[];
79
+ units: RepoUnitInfo[];
81
80
  apiKeys?: ApiKey[];
82
81
  createdAt: string;
83
82
  }
@@ -86,7 +85,7 @@ export interface ApiKey {
86
85
  name: string;
87
86
  accessType: AccessType;
88
87
  key: string;
89
- secret: string;
88
+ secret?: string;
90
89
  createdAt: string;
91
90
  }
92
91
  export interface StorageUnit {
@@ -95,7 +94,7 @@ export interface StorageUnit {
95
94
  bucket: string;
96
95
  storageType: StorageType;
97
96
  key: string;
98
- secret: string;
97
+ secret?: string;
99
98
  endpoint?: string;
100
99
  region?: string;
101
100
  status?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flashbacktech/flashbackclient",
3
- "version": "0.0.67",
3
+ "version": "0.0.69",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },