@flashbacktech/flashbackclient 0.0.69 → 0.0.71

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,4 +1,4 @@
1
- import { CreateUnitRequest, CreateUnitResponse, CreateRepoRequest, CreateRepoResponse, CreateRepoKeyRequest, CreateRepoKeyResponse, GetUnitsResponse, GetReposResponse, GetRepoKeysResponse, UpdateUnitRequest, UpdateUnitResponse, ActionResponse, UpdateRepoRequest, UpdateRepoResponse, UpdateRepoKeyRequest, UpdateRepoKeyResponse, ValidateUnitRequest, ValidateUnitResponse, ValidateRepoUnitsRequest, ValidateRepoUnitsResponse } from './types/storage';
1
+ import { CreateUnitRequest, CreateUnitResponse, CreateRepoRequest, CreateRepoResponse, StorageUnit, CreateRepoKeyRequest, CreateRepoKeyResponse, GetUnitsResponse, GetReposResponse, GetRepoKeysResponse, UpdateUnitRequest, UpdateUnitResponse, ActionResponse, UpdateRepoRequest, UpdateRepoResponse, UpdateRepoKeyRequest, UpdateRepoKeyResponse, ValidateUnitRequest, ValidateUnitResponse, ValidateRepoUnitsRequest, ValidateRepoUnitsResponse } from './types/storage';
2
2
  import { IApiClient, ProviderType } from './interfaces';
3
3
  import { OAuth2ResponseDTO, RefreshTokenResponse } from './types/auth';
4
4
  interface ErrorResponse {
@@ -40,7 +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
+ getAvailableStorageUnits: () => Promise<StorageUnit[]>;
44
44
  createStorageRepo: (data: CreateRepoRequest) => Promise<CreateRepoResponse>;
45
45
  getStorageRepos: () => Promise<GetReposResponse>;
46
46
  updateStorageRepo: (repoId: string, data: UpdateRepoRequest) => Promise<UpdateRepoResponse>;
@@ -49,7 +49,7 @@ export declare class ApiClient implements IApiClient {
49
49
  validateUpdateRepoUnits: (data: ValidateRepoUnitsRequest) => Promise<ValidateRepoUnitsResponse>;
50
50
  createRepoKey: (data: CreateRepoKeyRequest) => Promise<CreateRepoKeyResponse>;
51
51
  getRepoKeys: (repoId: string) => Promise<GetRepoKeysResponse>;
52
- updateRepoKey: (repoId: string, data: UpdateRepoKeyRequest) => Promise<UpdateRepoKeyResponse>;
52
+ updateRepoKey: (repoId: string, keyId: string, data: UpdateRepoKeyRequest) => Promise<UpdateRepoKeyResponse>;
53
53
  deleteRepoKey: (repoId: string, keyId: string) => Promise<ActionResponse>;
54
54
  }
55
55
  export {};
@@ -183,8 +183,8 @@ class ApiClient {
183
183
  this.getRepoKeys = async (repoId) => {
184
184
  return this.makeRequest(`repo/${repoId}/apikey`, 'GET', null);
185
185
  };
186
- this.updateRepoKey = async (repoId, data) => {
187
- return this.makeRequest(`repo/${repoId}/apikey`, 'PUT', data);
186
+ this.updateRepoKey = async (repoId, keyId, data) => {
187
+ return this.makeRequest(`repo/${repoId}/apikey/${keyId}`, 'PUT', data);
188
188
  };
189
189
  this.deleteRepoKey = async (repoId, keyId) => {
190
190
  return this.makeRequest(`repo/${repoId}/apikey/${keyId}`, 'DELETE', null);
@@ -1,4 +1,4 @@
1
- import { CreateUnitRequest, CreateUnitResponse, CreateRepoRequest, CreateRepoResponse, CreateRepoKeyRequest, CreateRepoKeyResponse, GetUnitsResponse, GetReposResponse, GetRepoKeysResponse, UpdateUnitRequest, UpdateUnitResponse, ActionResponse, UpdateRepoResponse, UpdateRepoRequest, UpdateRepoKeyRequest, UpdateRepoKeyResponse, ValidateUnitRequest, ValidateUnitResponse, ValidateRepoUnitsRequest, ValidateRepoUnitsResponse } from "./types/storage";
1
+ import { StorageUnit, CreateUnitRequest, CreateUnitResponse, CreateRepoRequest, CreateRepoResponse, CreateRepoKeyRequest, CreateRepoKeyResponse, GetUnitsResponse, GetReposResponse, GetRepoKeysResponse, UpdateUnitRequest, UpdateUnitResponse, ActionResponse, UpdateRepoResponse, UpdateRepoRequest, UpdateRepoKeyRequest, UpdateRepoKeyResponse, ValidateUnitRequest, ValidateUnitResponse, ValidateRepoUnitsRequest, ValidateRepoUnitsResponse } from "./types/storage";
2
2
  export declare enum ProviderType {
3
3
  GOOGLE = "GOOGLE",
4
4
  GITHUB = "GITHUB",
@@ -11,14 +11,14 @@ 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
+ getAvailableStorageUnits(): Promise<StorageUnit[]>;
15
15
  createStorageRepo(data: CreateRepoRequest): Promise<CreateRepoResponse>;
16
16
  getStorageRepos(): Promise<GetReposResponse>;
17
17
  updateStorageRepo(repoId: string, data: UpdateRepoRequest): Promise<UpdateRepoResponse>;
18
18
  deleteStorageRepo(repoId: string): Promise<ActionResponse>;
19
19
  createRepoKey(data: CreateRepoKeyRequest): Promise<CreateRepoKeyResponse>;
20
20
  getRepoKeys(repoId: string): Promise<GetRepoKeysResponse>;
21
- updateRepoKey(repoId: string, data: UpdateRepoKeyRequest): Promise<UpdateRepoKeyResponse>;
21
+ updateRepoKey(repoId: string, keyId: string, data: UpdateRepoKeyRequest): Promise<UpdateRepoKeyResponse>;
22
22
  deleteRepoKey(repoId: string, keyId: string): Promise<ActionResponse>;
23
23
  validateNewRepoUnits(data: ValidateRepoUnitsRequest): Promise<ValidateRepoUnitsResponse>;
24
24
  validateUpdateRepoUnits(data: ValidateRepoUnitsRequest): Promise<ValidateRepoUnitsResponse>;
@@ -67,9 +67,10 @@ export interface CreateRepoKeyResponse {
67
67
  key: string;
68
68
  secret: string;
69
69
  }
70
- export interface UpdateRepoKeyRequest extends CreateRepoKeyRequest {
70
+ export interface UpdateRepoKeyRequest {
71
+ name: string;
71
72
  }
72
- export interface UpdateRepoKeyResponse extends CreateRepoKeyResponse {
73
+ export interface UpdateRepoKeyResponse extends ActionResponse {
73
74
  }
74
75
  export interface StorageRepo {
75
76
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flashbacktech/flashbackclient",
3
- "version": "0.0.69",
3
+ "version": "0.0.71",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -23,6 +23,7 @@
23
23
  "author": "Javier Ortiz <javier.ortiz@flashback.tech>",
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
+ "@aws-sdk/client-sts": "^3.777.0",
26
27
  "@stellar/stellar-sdk": "^13.0.0",
27
28
  "formdata-node": "^6.0.3"
28
29
  },
@@ -45,7 +46,7 @@
45
46
  "dist"
46
47
  ],
47
48
  "devDependencies": {
48
- "@aws-sdk/client-s3": "^3.726.1",
49
+ "@aws-sdk/client-s3": "^3.777.0",
49
50
  "@eslint/js": "^8.56.0",
50
51
  "@google-cloud/storage": "^7.15.0",
51
52
  "@types/jest": "^29.5.14",