@uappi/public-sdk 1.1.33 → 1.1.34

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, RequestLoginMFA, RequestSendMFA, ResponseLoginMFA } from "../types";
3
+ import { RequestConfirmMFA, RequestLoginMFA, RequestSendMFA } from "../types";
4
4
 
5
5
  export function sendMfa(payload: RequestSendMFA) {
6
6
  return usePublicApi<true>({
@@ -19,7 +19,7 @@ export function confirmMfa(payload: RequestConfirmMFA) {
19
19
  }
20
20
 
21
21
  export function loginMfa(payload: RequestLoginMFA) {
22
- return usePublicApi<ResponseLoginMFA>({
22
+ return usePublicApi<true>({
23
23
  endpoint: '/customer/login/mfa',
24
24
  method: 'POST',
25
25
  payload
@@ -1,6 +1,6 @@
1
1
  import type { Ref } from 'vue';
2
2
 
3
- import type { ApiParams, CustomerErrorCode } from '..';
3
+ import type { ApiParams, CustomerErrorCode, CustomerMFAErrorCode } from '..';
4
4
 
5
5
  export type ApiStatus = 'pending' | 'success' | 'error';
6
6
 
@@ -63,6 +63,7 @@ export interface ApiErrorData {
63
63
  | 'GATEWAY_TIME_OUT'
64
64
  | 'UAPPI_TOOLS_ITEM_EVALUATED'
65
65
  | 'UAPPI_TOOLS_REVIEW_NOT_FOUND'
66
- | CustomerErrorCode;
66
+ | CustomerErrorCode
67
+ | CustomerMFAErrorCode;
67
68
  message: string;
68
69
  }
@@ -23,12 +23,7 @@ export interface RequestLoginMFA {
23
23
  secretKey: string;
24
24
  }
25
25
 
26
- export interface ResponseLoginMFA {
27
- code: number;
28
- details: [];
29
- errorCode: 'UAPPI_STORE_CUSTOMER_MFA_CODE_INVALID' | 'UAPPI_STORE_CUSTOMER_MFA_CODE_ATTEMPTS_EXCEEDED';
30
- message: string;
31
- }
26
+ export type CustomerMFAErrorCode = 'UAPPI_STORE_CUSTOMER_MFA_CODE_INVALID' | 'UAPPI_STORE_CUSTOMER_MFA_CODE_ATTEMPTS_EXCEEDED'
32
27
 
33
28
  export interface MFAAPPSettings {
34
29
  otpauth: string;
@@ -245,7 +245,7 @@ import type {
245
245
  MFAEmailSettings,
246
246
  MFAPhoneSettings,
247
247
  RequestLoginMFA,
248
- ResponseLoginMFA
248
+ CustomerMFAErrorCode
249
249
  } from './endpoints/mfa/mfa.interfaces';
250
250
 
251
251
  export type {
@@ -475,7 +475,7 @@ export type {
475
475
  MFAEmailSettings,
476
476
  MFAPhoneSettings,
477
477
  RequestLoginMFA,
478
- ResponseLoginMFA,
478
+ CustomerMFAErrorCode,
479
479
 
480
480
  // Order
481
481
  Order,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uappi/public-sdk",
3
- "version": "1.1.33",
3
+ "version": "1.1.34",
4
4
  "description": "Pacotes públicos para desenvolvimento do ecossistema Uappi",
5
5
  "main": "main.ts",
6
6
  "scripts": {