@uappi/public-sdk 2.0.1 → 2.1.0
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.
|
@@ -4,6 +4,7 @@ import type {
|
|
|
4
4
|
ApiParams,
|
|
5
5
|
CustomerResponse,
|
|
6
6
|
SignupCustomer,
|
|
7
|
+
SignupCustomerBySocialLogin,
|
|
7
8
|
SigninCustomerByDocument,
|
|
8
9
|
SigninCustomerByEmail,
|
|
9
10
|
ResponseSigninCustomer,
|
|
@@ -58,7 +59,7 @@ export function detail(
|
|
|
58
59
|
>({ endpoint: '/customer', params: options });
|
|
59
60
|
}
|
|
60
61
|
|
|
61
|
-
export function signup(payload: SignupCustomer) {
|
|
62
|
+
export function signup(payload: SignupCustomer | SignupCustomerBySocialLogin) {
|
|
62
63
|
return usePublicApi<CustomerResponse>({
|
|
63
64
|
endpoint: '/customer',
|
|
64
65
|
method: 'POST',
|
|
@@ -85,6 +85,13 @@ export interface SignupCustomer {
|
|
|
85
85
|
documents?: Array<CustomerDocument>;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
export interface SignupCustomerBySocialLogin
|
|
89
|
+
extends Omit<SignupCustomer, 'email' | 'password'> {
|
|
90
|
+
socialLoginToken: string;
|
|
91
|
+
email?: never;
|
|
92
|
+
password?: never;
|
|
93
|
+
}
|
|
94
|
+
|
|
88
95
|
export interface CustomerDocument {
|
|
89
96
|
type: 'cpf' | 'rg' | 'cnpj' | 'ie' | 'document1' | 'document2' | 'document3';
|
|
90
97
|
document: string;
|
|
@@ -91,6 +91,7 @@ import type {
|
|
|
91
91
|
SigninCustomerByDocument,
|
|
92
92
|
SigninCustomerByEmail,
|
|
93
93
|
SignupCustomer,
|
|
94
|
+
SignupCustomerBySocialLogin,
|
|
94
95
|
ResponseSigninCustomer,
|
|
95
96
|
CustomerDocument,
|
|
96
97
|
UpsertCustomerAddressRequest,
|
|
@@ -476,6 +477,7 @@ export type {
|
|
|
476
477
|
ResponseSigninCustomer,
|
|
477
478
|
CustomerDocument,
|
|
478
479
|
SignupCustomer,
|
|
480
|
+
SignupCustomerBySocialLogin,
|
|
479
481
|
CustomerGender,
|
|
480
482
|
CustomerOrigin,
|
|
481
483
|
CustomerConditionFields,
|
|
@@ -16,6 +16,7 @@ import type {
|
|
|
16
16
|
SigninCustomerByDocument,
|
|
17
17
|
SigninCustomerByEmail,
|
|
18
18
|
SignupCustomer,
|
|
19
|
+
SignupCustomerBySocialLogin,
|
|
19
20
|
} from '../../Api/types';
|
|
20
21
|
|
|
21
22
|
export function detail(
|
|
@@ -42,7 +43,7 @@ export function detail(
|
|
|
42
43
|
});
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
export function signup(payload: SignupCustomer) {
|
|
46
|
+
export function signup(payload: SignupCustomer | SignupCustomerBySocialLogin) {
|
|
46
47
|
return publicApi.customer.signup(payload).then(data => {
|
|
47
48
|
signupAction();
|
|
48
49
|
return data;
|