@flashbacktech/flashbackclient 0.1.81 → 0.1.82

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.
@@ -7,6 +7,7 @@ import { QuotaResponse } from './types/quota';
7
7
  import { DeviceListResponse, DeviceDetailsResponse, SessionListResponse, TrustDeviceRequest, TrustDeviceResponse, UntrustDeviceResponse, RemoveDeviceResponse, RevokeSessionResponse, RevokeAllSessionsResponse, SessionHeartbeatResponse, DeviceInfo } from './types/device';
8
8
  import { BuySubscriptionRequest, BuySubscriptionResponse, GetSubscriptionsResponse, MySubscriptionResponse, PaymentsListResponse, PaymentsQueryParams, CancelSubscriptionResponse } from './types/subscriptions';
9
9
  import { MFAMethodsResponse, MFASetupRequest, MFASetupResponse, MFAStatusResponse, MFAVerificationSetupRequest, MFAVerificationSetupResponse, MFAEnableRequest, MFAEnableResponse, MFADisableResponse, MFAPrimaryRequest, MFAPrimaryResponse, MFAResetResponse, MFAOrganizationEnforceRequest, MFAOrganizationEnforceResponse, MagicLinkActivationRequest, MagicLinkActivationResponse, MagicLinkSendResponse, PasskeyAuthOptionsResult, PasskeyCompleteRegistrationRequest, PasskeyCompleteRegistrationResponse, MFAVerificationRequest, MFAVerificationLoginResponse } from './types/mfa';
10
+ import { DeleteSettingsRequest, GetSettingsResponse, PartialUpdateSettingsRequest, UpdateSettingsRequest } from './types/settings';
10
11
  interface ErrorResponse {
11
12
  message?: string;
12
13
  [key: string]: any;
@@ -135,5 +136,31 @@ export declare class ApiClient implements IApiClient {
135
136
  activateMagicLink: (data: MagicLinkActivationRequest) => Promise<MagicLinkActivationResponse>;
136
137
  getPasskeyAuthOptions: () => Promise<PasskeyAuthOptionsResult>;
137
138
  completePasskeyRegistration: (request: PasskeyCompleteRegistrationRequest) => Promise<PasskeyCompleteRegistrationResponse>;
139
+ getUserSettings: () => Promise<GetSettingsResponse>;
140
+ updateUserSettings: (request: UpdateSettingsRequest) => Promise<{
141
+ success: boolean;
142
+ message: string;
143
+ }>;
144
+ partialUpdateUserSettings: (request: PartialUpdateSettingsRequest) => Promise<{
145
+ success: boolean;
146
+ message: string;
147
+ }>;
148
+ deleteUserSettingsKeys: (request: DeleteSettingsRequest) => Promise<{
149
+ success: boolean;
150
+ message: string;
151
+ }>;
152
+ getOrganizationSettings: () => Promise<GetSettingsResponse>;
153
+ updateOrganizationSettings: (request: UpdateSettingsRequest) => Promise<{
154
+ success: boolean;
155
+ message: string;
156
+ }>;
157
+ partialUpdateOrganizationSettings: (request: PartialUpdateSettingsRequest) => Promise<{
158
+ success: boolean;
159
+ message: string;
160
+ }>;
161
+ deleteOrganizationSettingsKeys: (request: DeleteSettingsRequest) => Promise<{
162
+ success: boolean;
163
+ message: string;
164
+ }>;
138
165
  }
139
166
  export {};
@@ -382,6 +382,31 @@ class ApiClient {
382
382
  this.completePasskeyRegistration = async (request) => {
383
383
  return this.makeRequest('mfa/passkey/complete-registration', 'POST', request);
384
384
  };
385
+ this.getUserSettings = async () => {
386
+ return this.makeRequest('settings/user', 'GET');
387
+ };
388
+ this.updateUserSettings = async (request) => {
389
+ return this.makeRequest('settings/user', 'POST', request);
390
+ };
391
+ this.partialUpdateUserSettings = async (request) => {
392
+ return this.makeRequest('settings/user', 'PUT', request);
393
+ };
394
+ this.deleteUserSettingsKeys = async (request) => {
395
+ return this.makeRequest('settings/user', 'DELETE', request);
396
+ };
397
+ // Organization Settings Methods
398
+ this.getOrganizationSettings = async () => {
399
+ return this.makeRequest('settings/organization', 'GET');
400
+ };
401
+ this.updateOrganizationSettings = async (request) => {
402
+ return this.makeRequest('settings/organization', 'POST', request);
403
+ };
404
+ this.partialUpdateOrganizationSettings = async (request) => {
405
+ return this.makeRequest('settings/organization', 'PUT', request);
406
+ };
407
+ this.deleteOrganizationSettingsKeys = async (request) => {
408
+ return this.makeRequest('settings/organization', 'DELETE', request);
409
+ };
385
410
  this.baseURL = baseURL;
386
411
  this.headers = {};
387
412
  this.debug = false;
@@ -9,4 +9,5 @@ import * as QuotaTypes from './types/quota';
9
9
  import * as SubscriptionTypes from './types/subscriptions';
10
10
  import * as DeviceTypes from './types/device';
11
11
  import * as MFATypes from './types/mfa';
12
- export { ApiClient, ApiTypes, AuthTypes, StatsTypes, ApiInterfaces, HttpError, BridgeTypes, EmailTypes, QuotaTypes, SubscriptionTypes, DeviceTypes, MFATypes };
12
+ import * as SettingsTypes from './types/settings';
13
+ export { ApiClient, ApiTypes, AuthTypes, StatsTypes, ApiInterfaces, HttpError, BridgeTypes, EmailTypes, QuotaTypes, SubscriptionTypes, DeviceTypes, MFATypes, SettingsTypes };
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.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.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; } });
@@ -57,3 +57,5 @@ const DeviceTypes = __importStar(require("./types/device"));
57
57
  exports.DeviceTypes = DeviceTypes;
58
58
  const MFATypes = __importStar(require("./types/mfa"));
59
59
  exports.MFATypes = MFATypes;
60
+ const SettingsTypes = __importStar(require("./types/settings"));
61
+ exports.SettingsTypes = SettingsTypes;
@@ -0,0 +1,18 @@
1
+ export interface GetSettingsResponse {
2
+ success: boolean;
3
+ settings: Record<string, any>;
4
+ }
5
+ export interface UpdateSettingsRequest {
6
+ settings: Record<string, any>;
7
+ }
8
+ export interface PartialUpdateSettingsRequest {
9
+ [key: string]: any;
10
+ }
11
+ export interface DeleteSettingsRequest {
12
+ keys: string[];
13
+ }
14
+ export interface SettingsErrorResponse {
15
+ success: false;
16
+ message: string;
17
+ error?: string;
18
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
4
+ ;
5
+ ;
6
+ ;
7
+ ;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flashbacktech/flashbackclient",
3
- "version": "0.1.81",
3
+ "version": "0.1.82",
4
4
  "type": "commonjs",
5
5
  "publishConfig": {
6
6
  "access": "public"