@flashbacktech/flashbackclient 0.1.90 → 0.1.91

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,8 @@ import { CreateUnitRequest, CreateUnitResponse, CreateRepoRequest, CreateRepoRes
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 } from './types/bridge';
5
+ import { NodeInfo, RegisterRequest } from './types/bridge';
6
+ import { GetOrganizationKeysResponse } from './types/noderegistration';
6
7
  import { QuotaResponse } from './types/quota';
7
8
  import { DeviceListResponse, DeviceDetailsResponse, SessionListResponse, TrustDeviceRequest, TrustDeviceResponse, UntrustDeviceResponse, RemoveDeviceResponse, RevokeSessionResponse, RevokeAllSessionsResponse, SessionHeartbeatResponse, DeviceInfo } from './types/device';
8
9
  import { BuySubscriptionRequest, BuySubscriptionResponse, GetSubscriptionsResponse, MySubscriptionResponse, PaymentsListResponse, PaymentsQueryParams, CancelSubscriptionResponse } from './types/subscriptions';
@@ -198,5 +199,13 @@ export declare class ApiClient implements IApiClient {
198
199
  }>;
199
200
  getOrganization: (orgId: string) => Promise<GetOrganizationResponse>;
200
201
  updateOrganization: (orgId: string, request: UpdateOrganizationBody) => Promise<UpdateOrganizationResponse>;
202
+ generateOrgKey: (idOrg: string) => Promise<string>;
203
+ deleteOrgKeys: (idOrg: string) => Promise<{
204
+ success: boolean;
205
+ message: string;
206
+ }>;
207
+ getOrgKeys: (idOrg: string) => Promise<GetOrganizationKeysResponse>;
208
+ nodeRegister: (data: RegisterRequest) => Promise<RegisterResponse>;
209
+ nodeUnregister: (data: RegisterRequest) => Promise<RegisterResponse>;
201
210
  }
202
211
  export {};
@@ -475,6 +475,24 @@ class ApiClient {
475
475
  this.updateOrganization = async (orgId, request) => {
476
476
  return this.makeRequest(`organization/${orgId}`, 'PUT', request);
477
477
  };
478
+ // Node registration methods
479
+ // Organization Keys API calls
480
+ this.generateOrgKey = async (idOrg) => {
481
+ return this.makeRequest(`organization/${idOrg}/key`, 'POST');
482
+ };
483
+ this.deleteOrgKeys = async (idOrg) => {
484
+ return this.makeRequest(`organization/${idOrg}/key`, 'DELETE');
485
+ };
486
+ this.getOrgKeys = async (idOrg) => {
487
+ return this.makeRequest(`organization/${idOrg}/key`, 'GET');
488
+ };
489
+ // Node Registration API calls
490
+ this.nodeRegister = async (data) => {
491
+ return this.makeRequest('register', 'POST', data);
492
+ };
493
+ this.nodeUnregister = async (data) => {
494
+ return this.makeRequest('unregister', 'POST', data);
495
+ };
478
496
  this.baseURL = baseURL;
479
497
  this.headers = {};
480
498
  this.debug = false;
@@ -13,4 +13,5 @@ import * as SettingsTypes from './types/settings';
13
13
  import * as RolesTypes from './types/roles';
14
14
  import * as WorkspaceTypes from './types/workspace';
15
15
  import * as OrganizationTypes from './types/organization';
16
- export { ApiClient, ApiTypes, AuthTypes, StatsTypes, ApiInterfaces, HttpError, BridgeTypes, EmailTypes, QuotaTypes, SubscriptionTypes, DeviceTypes, MFATypes, SettingsTypes, RolesTypes, WorkspaceTypes, OrganizationTypes };
16
+ import * as NodeRegistrationTypes from './types/noderegistration';
17
+ export { ApiClient, ApiTypes, AuthTypes, StatsTypes, ApiInterfaces, HttpError, BridgeTypes, EmailTypes, QuotaTypes, SubscriptionTypes, DeviceTypes, MFATypes, SettingsTypes, RolesTypes, WorkspaceTypes, OrganizationTypes, NodeRegistrationTypes };
package/dist/api/index.js CHANGED
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.OrganizationTypes = exports.WorkspaceTypes = exports.RolesTypes = exports.SettingsTypes = exports.MFATypes = exports.DeviceTypes = exports.SubscriptionTypes = exports.QuotaTypes = exports.EmailTypes = exports.BridgeTypes = exports.HttpError = exports.ApiInterfaces = exports.StatsTypes = exports.AuthTypes = exports.ApiTypes = exports.ApiClient = void 0;
36
+ exports.NodeRegistrationTypes = exports.OrganizationTypes = exports.WorkspaceTypes = exports.RolesTypes = exports.SettingsTypes = exports.MFATypes = exports.DeviceTypes = exports.SubscriptionTypes = exports.QuotaTypes = exports.EmailTypes = exports.BridgeTypes = exports.HttpError = exports.ApiInterfaces = exports.StatsTypes = exports.AuthTypes = exports.ApiTypes = exports.ApiClient = void 0;
37
37
  const client_1 = require("./client");
38
38
  Object.defineProperty(exports, "ApiClient", { enumerable: true, get: function () { return client_1.ApiClient; } });
39
39
  Object.defineProperty(exports, "HttpError", { enumerable: true, get: function () { return client_1.HttpError; } });
@@ -65,3 +65,5 @@ const WorkspaceTypes = __importStar(require("./types/workspace"));
65
65
  exports.WorkspaceTypes = WorkspaceTypes;
66
66
  const OrganizationTypes = __importStar(require("./types/organization"));
67
67
  exports.OrganizationTypes = OrganizationTypes;
68
+ const NodeRegistrationTypes = __importStar(require("./types/noderegistration"));
69
+ exports.NodeRegistrationTypes = NodeRegistrationTypes;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Node Registration DTOs
3
+ * Data Transfer Objects for organization keys
4
+ */
5
+ export interface NodeKey {
6
+ keyId: string;
7
+ nodeId: string;
8
+ }
9
+ export interface OrganizationKey {
10
+ id: string;
11
+ orgId: string;
12
+ publicKey: string;
13
+ createdAt: Date;
14
+ nodeKeys: NodeKey[];
15
+ }
16
+ export interface GetOrganizationKeysResponse {
17
+ success: boolean;
18
+ data?: OrganizationKey[];
19
+ message: string;
20
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * Node Registration DTOs
4
+ * Data Transfer Objects for organization keys
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flashbacktech/flashbackclient",
3
- "version": "0.1.90",
3
+ "version": "0.1.91",
4
4
  "type": "commonjs",
5
5
  "publishConfig": {
6
6
  "access": "public"