@uappi/public-sdk 1.1.31 → 1.1.32
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,6 +1,6 @@
|
|
|
1
1
|
import { usePublicApi } from '..';
|
|
2
2
|
|
|
3
|
-
import { RequestConfirmMFA, RequestSendMFA } from "../types";
|
|
3
|
+
import { RequestConfirmMFA, RequestLoginMFA, RequestSendMFA } from "../types";
|
|
4
4
|
|
|
5
5
|
export function sendMfa(payload: RequestSendMFA) {
|
|
6
6
|
return usePublicApi<true>({
|
|
@@ -17,3 +17,11 @@ export function confirmMfa(payload: RequestConfirmMFA) {
|
|
|
17
17
|
payload
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
|
+
|
|
21
|
+
export function loginMfa(payload: RequestLoginMFA) {
|
|
22
|
+
return usePublicApi<true>({
|
|
23
|
+
endpoint: '/customer/login/mfa',
|
|
24
|
+
method: 'POST',
|
|
25
|
+
payload
|
|
26
|
+
});
|
|
27
|
+
}
|
package/modules/Api/index.ts
CHANGED
|
@@ -81,7 +81,7 @@ import { upsells } from './endpoints/UpsellComposable'
|
|
|
81
81
|
import { contact } from './endpoints/PublicComposable'
|
|
82
82
|
import { oauthRedirect } from './endpoints/ThirdPartyComposable';
|
|
83
83
|
|
|
84
|
-
import { sendMfa, confirmMfa } from './endpoints/MFAComposable';
|
|
84
|
+
import { sendMfa, confirmMfa, loginMfa } from './endpoints/MFAComposable';
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
import { usePublicApi } from './usePublicApi';
|
|
@@ -133,7 +133,8 @@ const customer = {
|
|
|
133
133
|
addProductToWishlist,
|
|
134
134
|
removeProductToWishlist,
|
|
135
135
|
sendMfa,
|
|
136
|
-
confirmMfa
|
|
136
|
+
confirmMfa,
|
|
137
|
+
loginMfa
|
|
137
138
|
};
|
|
138
139
|
|
|
139
140
|
const cart = {
|
|
@@ -16,6 +16,13 @@ export interface MFAOption {
|
|
|
16
16
|
settings: MFAAPPSettings | MFAEmailSettings | MFAPhoneSettings;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
export interface RequestLoginMFA {
|
|
20
|
+
mfaOptionId: number;
|
|
21
|
+
mfaToken: string;
|
|
22
|
+
code: string;
|
|
23
|
+
secretKey: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
19
26
|
export interface MFAAPPSettings {
|
|
20
27
|
otpauth: string;
|
|
21
28
|
qrCode: string;
|
|
@@ -237,7 +237,7 @@ import type { PriceRule } from './endpoints/price/price.interfaces';
|
|
|
237
237
|
|
|
238
238
|
import type { RedirectRequest, OauthType } from './endpoints/third-party/oauth.interfaces';
|
|
239
239
|
|
|
240
|
-
import type { MFAOption, RequestSendMFA, RequestConfirmMFA, MFAAPPSettings, MFAEmailSettings, MFAPhoneSettings } from './endpoints/mfa/mfa.interfaces'
|
|
240
|
+
import type { MFAOption, RequestSendMFA, RequestConfirmMFA, MFAAPPSettings, MFAEmailSettings, MFAPhoneSettings, RequestLoginMFA } from './endpoints/mfa/mfa.interfaces'
|
|
241
241
|
export type {
|
|
242
242
|
// Config da useApi
|
|
243
243
|
ApiResponse,
|
|
@@ -464,6 +464,7 @@ export type {
|
|
|
464
464
|
MFAAPPSettings,
|
|
465
465
|
MFAEmailSettings,
|
|
466
466
|
MFAPhoneSettings,
|
|
467
|
+
RequestLoginMFA,
|
|
467
468
|
|
|
468
469
|
// Order
|
|
469
470
|
Order,
|