@flashbacktech/flashbackclient 0.1.77 → 0.1.79
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.
- package/dist/api/client.d.ts +3 -1
- package/dist/api/client.js +6 -0
- package/dist/api/types/mfa.d.ts +8 -0
- package/package.json +1 -1
package/dist/api/client.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { NodeInfo } from './types/bridge';
|
|
|
6
6
|
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
|
-
import { MFAMethodsResponse, MFASetupRequest, MFASetupResponse, MFAStatusResponse, MFAVerificationSetupRequest, MFAVerificationSetupResponse, MFAEnableRequest, MFAEnableResponse, MFADisableResponse, MFAPrimaryRequest, MFAPrimaryResponse, MFAResetResponse, MFAOrganizationEnforceRequest, MFAOrganizationEnforceResponse, MagicLinkSendResponse, PasskeyAuthOptionsResult, PasskeyCompleteRegistrationRequest, PasskeyCompleteRegistrationResponse } from './types/mfa';
|
|
9
|
+
import { MFAMethodsResponse, MFASetupRequest, MFASetupResponse, MFAStatusResponse, MFAVerificationSetupRequest, MFAVerificationSetupResponse, MFAEnableRequest, MFAEnableResponse, MFADisableResponse, MFAPrimaryRequest, MFAPrimaryResponse, MFAResetResponse, MFAOrganizationEnforceRequest, MFAOrganizationEnforceResponse, MagicLinkActivationRequest, MagicLinkActivationResponse, MagicLinkSendResponse, PasskeyAuthOptionsResult, PasskeyCompleteRegistrationRequest, PasskeyCompleteRegistrationResponse, MFAVerificationRequest, MFAVerificationResult } from './types/mfa';
|
|
10
10
|
interface ErrorResponse {
|
|
11
11
|
message?: string;
|
|
12
12
|
[key: string]: any;
|
|
@@ -125,12 +125,14 @@ export declare class ApiClient implements IApiClient {
|
|
|
125
125
|
getAvailableMethods: () => Promise<MFAMethodsResponse>;
|
|
126
126
|
setupMFA: (request: MFASetupRequest) => Promise<MFASetupResponse>;
|
|
127
127
|
verifyMFASetup: (request: MFAVerificationSetupRequest) => Promise<MFAVerificationSetupResponse>;
|
|
128
|
+
verifyMFALogin: (request: MFAVerificationRequest) => Promise<MFAVerificationResult>;
|
|
128
129
|
enableMFA: (request: MFAEnableRequest) => Promise<MFAEnableResponse>;
|
|
129
130
|
disableMFA: (request: MFAEnableRequest) => Promise<MFADisableResponse>;
|
|
130
131
|
setPrimaryMFA: (request: MFAPrimaryRequest) => Promise<MFAPrimaryResponse>;
|
|
131
132
|
resetMFA: () => Promise<MFAResetResponse>;
|
|
132
133
|
enforceOrganizationMFA: (request: MFAOrganizationEnforceRequest) => Promise<MFAOrganizationEnforceResponse>;
|
|
133
134
|
sendMagicLink: () => Promise<MagicLinkSendResponse>;
|
|
135
|
+
activateMagicLink: (data: MagicLinkActivationRequest) => Promise<MagicLinkActivationResponse>;
|
|
134
136
|
getPasskeyAuthOptions: () => Promise<PasskeyAuthOptionsResult>;
|
|
135
137
|
completePasskeyRegistration: (request: PasskeyCompleteRegistrationRequest) => Promise<PasskeyCompleteRegistrationResponse>;
|
|
136
138
|
}
|
package/dist/api/client.js
CHANGED
|
@@ -348,6 +348,9 @@ class ApiClient {
|
|
|
348
348
|
this.verifyMFASetup = async (request) => {
|
|
349
349
|
return this.makeRequest('mfa/verify-setup', 'POST', request);
|
|
350
350
|
};
|
|
351
|
+
this.verifyMFALogin = async (request) => {
|
|
352
|
+
return this.makeRequest('mfa/verify-login', 'POST', request);
|
|
353
|
+
};
|
|
351
354
|
////// MFA Management API
|
|
352
355
|
this.enableMFA = async (request) => {
|
|
353
356
|
return this.makeRequest('mfa/enable', 'POST', request);
|
|
@@ -369,6 +372,9 @@ class ApiClient {
|
|
|
369
372
|
this.sendMagicLink = async () => {
|
|
370
373
|
return this.makeRequest('mfa/magic-link/send', 'POST', null);
|
|
371
374
|
};
|
|
375
|
+
this.activateMagicLink = async (data) => {
|
|
376
|
+
return this.makeRequest('mfa/magic-link/activate', 'POST', data);
|
|
377
|
+
};
|
|
372
378
|
////// Passkey MFA API
|
|
373
379
|
this.getPasskeyAuthOptions = async () => {
|
|
374
380
|
return this.makeRequest('mfa/passkey/auth-options', 'POST', null);
|
package/dist/api/types/mfa.d.ts
CHANGED
|
@@ -103,6 +103,9 @@ export interface PasskeyCompleteRegistrationRequest {
|
|
|
103
103
|
credential: PasskeyRegistrationCredential;
|
|
104
104
|
challenge: string;
|
|
105
105
|
}
|
|
106
|
+
export interface MagicLinkActivationRequest {
|
|
107
|
+
token: string;
|
|
108
|
+
}
|
|
106
109
|
export interface MFAVerificationResult {
|
|
107
110
|
success: boolean;
|
|
108
111
|
mfaMethod: MFAType;
|
|
@@ -151,6 +154,11 @@ export interface MFAOrganizationEnforceResult {
|
|
|
151
154
|
message?: string;
|
|
152
155
|
error?: string;
|
|
153
156
|
}
|
|
157
|
+
export interface MagicLinkActivationResponse {
|
|
158
|
+
success: boolean;
|
|
159
|
+
message: string;
|
|
160
|
+
error?: string;
|
|
161
|
+
}
|
|
154
162
|
export interface GoogleAuthSetupData {
|
|
155
163
|
secret: string;
|
|
156
164
|
qrCode: string;
|