@flashbacktech/flashbackclient 0.2.2 → 0.2.3

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.
@@ -2,7 +2,7 @@ import { CreateRepoRequest, CreateRepoResponse, CreateRepoKeyRequest, CreateRepo
2
2
  import { IApiClient, ProviderType } from './interfaces';
3
3
  import { ActivateResponse, DeactivateResponse, LoginBody, LoginResponse, LogoutResponse, OAuth2ResponseDTO, RefreshTokenErrorResponse, RefreshTokenResponse, RegisterBody, RegisterResponse, ResetPasswordBody, Web3RegisterBody } from './types/auth';
4
4
  import { StatsQueryParams, StatsResponse, NodeStatsMinuteResponse, NodeStatsDailyResponse, NodeStatsQueryParams, UnitStatsResponse, RepoStatsResponse, NodeStatsDailyQueryParams, BucketStatsResponse, StatsQueryWithBucketParams, NodeStatsQueryWithBucketParams, NodeStatsDailyQueryWithBucketParams } from './types/stats';
5
- import { NodeInfo, RegisterRequest } from './types/bridge';
5
+ import { NodeInfoResponse, RegisterRequest } from './types/bridge';
6
6
  import { GetOrganizationKeysResponse } from './types/noderegistration';
7
7
  import { QuotaResponse } from './types/quota';
8
8
  import { DeviceListResponse, DeviceDetailsResponse, SessionListResponse, TrustDeviceRequest, TrustDeviceResponse, UntrustDeviceResponse, RemoveDeviceResponse, RevokeSessionResponse, RevokeAllSessionsResponse, SessionHeartbeatResponse, DeviceInfo } from './types/device';
@@ -111,7 +111,12 @@ export declare class ApiClient implements IApiClient {
111
111
  getBucketStats: (params?: {
112
112
  bucketId?: string[];
113
113
  }) => Promise<BucketStatsResponse>;
114
- getNodeInfo: () => Promise<NodeInfo[]>;
114
+ getNodeInfo: () => Promise<NodeInfoResponse>;
115
+ getPrivateNodeInfo: (orgId: string) => Promise<NodeInfoResponse>;
116
+ deletePrivateNode: (orgId: string, nodeId: string) => Promise<{
117
+ success: boolean;
118
+ message: string;
119
+ }>;
115
120
  sendFeedbackEmail: (data: FormData) => Promise<ActionResponse>;
116
121
  getSubscriptions: () => Promise<GetSubscriptionsResponse>;
117
122
  getMySubscription: () => Promise<MySubscriptionResponse>;
@@ -261,6 +261,12 @@ class ApiClient {
261
261
  this.getNodeInfo = async () => {
262
262
  return this.makeRequest('node', 'GET', null);
263
263
  };
264
+ this.getPrivateNodeInfo = async (orgId) => {
265
+ return this.makeRequest(`organization/${orgId}/nodes`, 'GET', null);
266
+ };
267
+ this.deletePrivateNode = async (orgId, nodeId) => {
268
+ return this.makeRequest(`organization/${orgId}/node/${nodeId}`, 'DELETE', null);
269
+ };
264
270
  this.sendFeedbackEmail = async (data) => {
265
271
  return this.makeRequest('email/feedback', 'POST', data);
266
272
  };
@@ -52,4 +52,9 @@ export interface NodeInfo {
52
52
  url: string;
53
53
  id_org?: string;
54
54
  }
55
+ export interface NodeInfoResponse {
56
+ success: true;
57
+ data: NodeInfo[];
58
+ total: number;
59
+ }
55
60
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flashbacktech/flashbackclient",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "type": "commonjs",
5
5
  "publishConfig": {
6
6
  "access": "public"