@uappi/public-sdk 1.2.9 → 1.3.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.
- package/.gitlab-ci.yml +43 -0
- package/.vscode/extensions.json +4 -4
- package/.vscode/settings.json +6 -6
- package/README.md +67 -0
- package/components/Animations/ExpandTransition.ts +89 -89
- package/components/Animations/index.ts +1 -1
- package/components/ColorTheme/ColorTheme.ts +80 -80
- package/components/ColorTheme/index.ts +1 -1
- package/components/ColorTheme/types.ts +18 -18
- package/components/SocialAuth/FacebookAuth/types.ts +2 -2
- package/components/SocialAuth/GoogleAuth/types.ts +2 -2
- package/components/SocialAuth/index.ts +1 -1
- package/components/index.ts +2 -2
- package/main.ts +4 -4
- package/modules/Api/README.md +479 -469
- package/modules/Api/endpoints/CategoryComposable.ts +15 -0
- package/modules/Api/endpoints/CommonComposable.ts +24 -24
- package/modules/Api/endpoints/CouponComposable.ts +18 -18
- package/modules/Api/endpoints/LoggoutComposable.ts +8 -8
- package/modules/Api/endpoints/MFAComposable.ts +43 -43
- package/modules/Api/endpoints/PaymentComposable.ts +14 -14
- package/modules/Api/endpoints/PublicComposable.ts +8 -8
- package/modules/Api/endpoints/TemplateComposable.ts +7 -7
- package/modules/Api/endpoints/ThirdPartyComposable.ts +13 -13
- package/modules/Api/endpoints/UpsellComposable.ts +17 -17
- package/modules/Api/endpoints/VerifyComposable.ts +7 -7
- package/modules/Api/endpoints/WalletComposable.ts +36 -36
- package/modules/Api/index.ts +3 -0
- package/modules/Api/paramsSerializer/encodeWafNormalizer.ts +7 -7
- package/modules/Api/types/endpoints/cart/cart.interfaces.ts +161 -161
- package/modules/Api/types/endpoints/cart/cart.types.ts +27 -27
- package/modules/Api/types/endpoints/category/category.interfaces.ts +16 -0
- package/modules/Api/types/endpoints/common/common.interfaces.ts +21 -21
- package/modules/Api/types/endpoints/country/country.types.ts +7502 -7502
- package/modules/Api/types/endpoints/coupon/coupon.interfaces.ts +13 -13
- package/modules/Api/types/endpoints/discounts/discounts.interfaces.ts +9 -9
- package/modules/Api/types/endpoints/mfa/mfa.interfaces.ts +51 -51
- package/modules/Api/types/endpoints/payment/payment.interfaces.ts +103 -103
- package/modules/Api/types/endpoints/payment/payment.types.ts +27 -27
- package/modules/Api/types/endpoints/price/price.interfaces.ts +21 -21
- package/modules/Api/types/endpoints/template/template.interfaces.ts +29 -29
- package/modules/Api/types/endpoints/third-party/oauth.interfaces.ts +5 -5
- package/modules/Api/types/endpoints/upsell/upsell.interfaces.ts +12 -12
- package/modules/Api/types/endpoints/wallet/wallet-obsearch.ts +8 -8
- package/modules/Api/types/endpoints/wallet/wallet.interfaces.ts +57 -57
- package/modules/Api/types/endpoints/zipcode/zipcode.interfaces.ts +23 -23
- package/modules/Api/types/index.ts +514 -504
- package/modules/Tracking/endpoints/CartComposable.ts +75 -75
- package/modules/Tracking/endpoints/CustomerComposable.ts +71 -71
- package/modules/Tracking/endpoints/types.ts +11 -11
- package/modules/Tracking/events/actions/addPaymentInfo.ts +31 -31
- package/modules/Tracking/events/actions/addShippingInfo.ts +27 -27
- package/modules/Tracking/events/actions/addToCart.ts +35 -35
- package/modules/Tracking/events/actions/beginCheckout.ts +28 -28
- package/modules/Tracking/events/actions/customerProfile.ts +36 -36
- package/modules/Tracking/events/actions/generateLead.ts +12 -12
- package/modules/Tracking/events/actions/login.ts +8 -8
- package/modules/Tracking/events/actions/purchase.ts +42 -42
- package/modules/Tracking/events/actions/removeFromCart.ts +52 -52
- package/modules/Tracking/events/actions/search.ts +8 -8
- package/modules/Tracking/events/actions/selectItem.ts +64 -64
- package/modules/Tracking/events/actions/selectPromotion.ts +24 -24
- package/modules/Tracking/events/actions/shippingCalculation.ts +7 -7
- package/modules/Tracking/events/actions/signup.ts +8 -8
- package/modules/Tracking/events/actions/upsertToCart.ts +62 -62
- package/modules/Tracking/events/views/viewCart.ts +28 -28
- package/modules/Tracking/events/views/viewHome.ts +5 -5
- package/modules/Tracking/events/views/viewItem.ts +31 -31
- package/modules/Tracking/events/views/viewItemList.ts +65 -65
- package/modules/Tracking/events/views/viewNotFound.ts +5 -5
- package/modules/Tracking/events/views/viewOther.ts +5 -5
- package/modules/Tracking/events/views/viewPayment.ts +7 -7
- package/modules/Tracking/events/views/viewPromotion.ts +28 -28
- package/modules/Tracking/events/views/viewShipping.ts +7 -7
- package/modules/Tracking/index.ts +84 -84
- package/modules/Tracking/publicApiTracking.ts +35 -35
- package/modules/Tracking/types/actions/add-payment-info.interfaces.ts +12 -12
- package/modules/Tracking/types/actions/add-shipping-info.interfaces.ts +11 -11
- package/modules/Tracking/types/actions/add-to-cart.interfaces.ts +10 -10
- package/modules/Tracking/types/actions/begin-checkout.interfaces.ts +12 -12
- package/modules/Tracking/types/actions/customer-profile.interfaces.ts +19 -19
- package/modules/Tracking/types/actions/file-download.interfaces.ts +4 -4
- package/modules/Tracking/types/actions/generate-lead.interfaces.ts +12 -12
- package/modules/Tracking/types/actions/login.interfaces.ts +4 -4
- package/modules/Tracking/types/actions/purchase.interfaces.ts +18 -18
- package/modules/Tracking/types/actions/remove-from-cart.interfaces.ts +10 -10
- package/modules/Tracking/types/actions/search.interfaces.ts +4 -4
- package/modules/Tracking/types/actions/select-item.interfaces.ts +16 -16
- package/modules/Tracking/types/actions/select-promotion.interfaces.ts +8 -8
- package/modules/Tracking/types/actions/share.interfaces.ts +4 -4
- package/modules/Tracking/types/actions/shipping-calculation.interfaces.ts +3 -3
- package/modules/Tracking/types/actions/signup.interfaces.ts +4 -4
- package/modules/Tracking/types/event.types.ts +54 -54
- package/modules/Tracking/types/index.ts +37 -37
- package/modules/Tracking/types/item.interfaces.ts +30 -30
- package/modules/Tracking/types/views/view-cart.interfaces.ts +11 -11
- package/modules/Tracking/types/views/view-home.interfaces.ts +3 -3
- package/modules/Tracking/types/views/view-item-list.interfaces.ts +11 -11
- package/modules/Tracking/types/views/view-item.interfaces.ts +15 -15
- package/modules/Tracking/types/views/view-not-found.interfaces.ts +3 -3
- package/modules/Tracking/types/views/view-other.interfaces.ts +3 -3
- package/modules/Tracking/types/views/view-payment.interfaces.ts +3 -3
- package/modules/Tracking/types/views/view-promotion.interfaces.ts +8 -8
- package/modules/Tracking/types/views/view-shipping.interfaces.ts +3 -3
- package/modules/Tracking/utils/cart.ts +100 -100
- package/modules/Tracking/utils/pushDatalayer.ts +7 -7
- package/modules/index.ts +1 -1
- package/package.json +2 -3
- package/scripts/release.sh +34 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { DiscountType } from '../..';
|
|
2
|
-
|
|
3
|
-
export interface AddCouponRequest {
|
|
4
|
-
hash: string;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface Coupon {
|
|
8
|
-
discountId: number;
|
|
9
|
-
discountMainCode: string;
|
|
10
|
-
discountTitle: string;
|
|
11
|
-
discountType: DiscountType;
|
|
12
|
-
discountValue: number;
|
|
13
|
-
}
|
|
1
|
+
import type { DiscountType } from '../..';
|
|
2
|
+
|
|
3
|
+
export interface AddCouponRequest {
|
|
4
|
+
hash: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface Coupon {
|
|
8
|
+
discountId: number;
|
|
9
|
+
discountMainCode: string;
|
|
10
|
+
discountTitle: string;
|
|
11
|
+
discountType: DiscountType;
|
|
12
|
+
discountValue: number;
|
|
13
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { DiscountType } from '../..';
|
|
2
|
-
|
|
3
|
-
export interface Discount {
|
|
4
|
-
entityId: string;
|
|
5
|
-
id: number;
|
|
6
|
-
orderId: number;
|
|
7
|
-
type: DiscountType;
|
|
8
|
-
value: number;
|
|
9
|
-
}
|
|
1
|
+
import type { DiscountType } from '../..';
|
|
2
|
+
|
|
3
|
+
export interface Discount {
|
|
4
|
+
entityId: string;
|
|
5
|
+
id: number;
|
|
6
|
+
orderId: number;
|
|
7
|
+
type: DiscountType;
|
|
8
|
+
value: number;
|
|
9
|
+
}
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
export interface RequestSendMFA {
|
|
2
|
-
mfaToken: string;
|
|
3
|
-
mfaOptionId: number;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export interface RequestConfirmMFA {
|
|
7
|
-
mfaToken: string;
|
|
8
|
-
mfaOptionId: number;
|
|
9
|
-
code: string;
|
|
10
|
-
secretKey: string;
|
|
11
|
-
password: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface MFAOption {
|
|
15
|
-
type: 'email' | 'sms' | 'app' | 'whatsapp' | 'external';
|
|
16
|
-
id: number;
|
|
17
|
-
label: string;
|
|
18
|
-
settings: MFAAPPSettings | MFAEmailSettings | MFAPhoneSettings | Array<never>;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface RequestLoginMFA {
|
|
22
|
-
mfaOptionId: number;
|
|
23
|
-
mfaToken: string;
|
|
24
|
-
code: string;
|
|
25
|
-
secretKey?: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export type CustomerMFAErrorCode = 'UAPPI_STORE_CUSTOMER_MFA_CODE_INVALID' | 'UAPPI_STORE_CUSTOMER_MFA_CODE_ATTEMPTS_EXCEEDED' | 'UAPPI_STORE_CUSTOMER_MFA_APP_SETUP_DISABLED';
|
|
29
|
-
|
|
30
|
-
export interface MFAAPPSettings {
|
|
31
|
-
otpauth: string;
|
|
32
|
-
qrCode: string;
|
|
33
|
-
secretKey: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface MFAEmailSettings {
|
|
37
|
-
email: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface MFAPhoneSettings {
|
|
41
|
-
phone: string;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
export interface RequestMFASetup {
|
|
46
|
-
force: boolean;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface ResponseMFASetup {
|
|
50
|
-
mfaToken: string;
|
|
51
|
-
options: Array<MFAOption>;
|
|
1
|
+
export interface RequestSendMFA {
|
|
2
|
+
mfaToken: string;
|
|
3
|
+
mfaOptionId: number;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface RequestConfirmMFA {
|
|
7
|
+
mfaToken: string;
|
|
8
|
+
mfaOptionId: number;
|
|
9
|
+
code: string;
|
|
10
|
+
secretKey: string;
|
|
11
|
+
password: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface MFAOption {
|
|
15
|
+
type: 'email' | 'sms' | 'app' | 'whatsapp' | 'external';
|
|
16
|
+
id: number;
|
|
17
|
+
label: string;
|
|
18
|
+
settings: MFAAPPSettings | MFAEmailSettings | MFAPhoneSettings | Array<never>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface RequestLoginMFA {
|
|
22
|
+
mfaOptionId: number;
|
|
23
|
+
mfaToken: string;
|
|
24
|
+
code: string;
|
|
25
|
+
secretKey?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type CustomerMFAErrorCode = 'UAPPI_STORE_CUSTOMER_MFA_CODE_INVALID' | 'UAPPI_STORE_CUSTOMER_MFA_CODE_ATTEMPTS_EXCEEDED' | 'UAPPI_STORE_CUSTOMER_MFA_APP_SETUP_DISABLED';
|
|
29
|
+
|
|
30
|
+
export interface MFAAPPSettings {
|
|
31
|
+
otpauth: string;
|
|
32
|
+
qrCode: string;
|
|
33
|
+
secretKey: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface MFAEmailSettings {
|
|
37
|
+
email: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface MFAPhoneSettings {
|
|
41
|
+
phone: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
export interface RequestMFASetup {
|
|
46
|
+
force: boolean;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface ResponseMFASetup {
|
|
50
|
+
mfaToken: string;
|
|
51
|
+
options: Array<MFAOption>;
|
|
52
52
|
}
|
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
import type { ConfigurationCode, PaymentCode, ProductInstallment } from '../..';
|
|
2
|
-
|
|
3
|
-
export type PaymentResponse = Array<{
|
|
4
|
-
paymentOption: Payment;
|
|
5
|
-
error: null | string;
|
|
6
|
-
installments: Array<ProductInstallment>;
|
|
7
|
-
cashDiscount: {
|
|
8
|
-
discountPercentage: number;
|
|
9
|
-
discountValue: number;
|
|
10
|
-
valueWithDiscount: number;
|
|
11
|
-
};
|
|
12
|
-
}>;
|
|
13
|
-
|
|
14
|
-
export interface Payment {
|
|
15
|
-
id: number;
|
|
16
|
-
paymentId: number;
|
|
17
|
-
paymentStoreCredentialId: number;
|
|
18
|
-
paymentAntiFraudCredentialId: null;
|
|
19
|
-
paymentType: PaymentType;
|
|
20
|
-
active: boolean;
|
|
21
|
-
label: string;
|
|
22
|
-
description: string;
|
|
23
|
-
instruction: string;
|
|
24
|
-
paymentCode: string;
|
|
25
|
-
publicCredentials: any;
|
|
26
|
-
order: number;
|
|
27
|
-
options: Array<Payment>;
|
|
28
|
-
configurations: Array<PaymentConfiguration>;
|
|
29
|
-
cashDiscount: {
|
|
30
|
-
discountPercentage: number;
|
|
31
|
-
discountValue: number;
|
|
32
|
-
valueWithDiscount: number;
|
|
33
|
-
};
|
|
34
|
-
installments: Array<ProductInstallment>; // TODO ver depois
|
|
35
|
-
error: null | string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface PaymentType {
|
|
39
|
-
id: number;
|
|
40
|
-
code: PaymentCode;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface PaymentConfiguration {
|
|
44
|
-
code: ConfigurationCode;
|
|
45
|
-
title: string;
|
|
46
|
-
value: number;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface PaymentOption {
|
|
50
|
-
id: number;
|
|
51
|
-
paymentId: number;
|
|
52
|
-
paymentStoreCredentialId: number;
|
|
53
|
-
paymentAntiFraudCredentialId: null;
|
|
54
|
-
paymentType: PaymentType;
|
|
55
|
-
active: boolean;
|
|
56
|
-
label: string;
|
|
57
|
-
description: string;
|
|
58
|
-
instruction: string;
|
|
59
|
-
order: number;
|
|
60
|
-
options: Array<PaymentOption>;
|
|
61
|
-
configurations: Array<PaymentConfiguration>;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface CardFlags {
|
|
65
|
-
master: string;
|
|
66
|
-
visa: string;
|
|
67
|
-
hiper: string;
|
|
68
|
-
amex: string;
|
|
69
|
-
hipercard: string;
|
|
70
|
-
americanexpress: string;
|
|
71
|
-
jcb: string;
|
|
72
|
-
aura: string;
|
|
73
|
-
banescard: string;
|
|
74
|
-
cabal: string;
|
|
75
|
-
diners: string;
|
|
76
|
-
discover: string;
|
|
77
|
-
sorocred: string;
|
|
78
|
-
unionpay: string;
|
|
79
|
-
credz: string;
|
|
80
|
-
elo: string;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export interface PaymentConditionsRequest {
|
|
84
|
-
cashDiscountPaymentOptionId: number;
|
|
85
|
-
installmentPaymentOptionId: number | null;
|
|
86
|
-
items: Array<{
|
|
87
|
-
reference: string;
|
|
88
|
-
value: number;
|
|
89
|
-
}>;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export interface PaymentConditionsResponse {
|
|
93
|
-
[key: string]: {
|
|
94
|
-
reference: string;
|
|
95
|
-
value: number;
|
|
96
|
-
cashDiscount: {
|
|
97
|
-
discountPercentage: number;
|
|
98
|
-
discountValue: number;
|
|
99
|
-
valueWithDiscount: number;
|
|
100
|
-
};
|
|
101
|
-
installments: Array<ProductInstallment> | null;
|
|
102
|
-
};
|
|
103
|
-
}
|
|
1
|
+
import type { ConfigurationCode, PaymentCode, ProductInstallment } from '../..';
|
|
2
|
+
|
|
3
|
+
export type PaymentResponse = Array<{
|
|
4
|
+
paymentOption: Payment;
|
|
5
|
+
error: null | string;
|
|
6
|
+
installments: Array<ProductInstallment>;
|
|
7
|
+
cashDiscount: {
|
|
8
|
+
discountPercentage: number;
|
|
9
|
+
discountValue: number;
|
|
10
|
+
valueWithDiscount: number;
|
|
11
|
+
};
|
|
12
|
+
}>;
|
|
13
|
+
|
|
14
|
+
export interface Payment {
|
|
15
|
+
id: number;
|
|
16
|
+
paymentId: number;
|
|
17
|
+
paymentStoreCredentialId: number;
|
|
18
|
+
paymentAntiFraudCredentialId: null;
|
|
19
|
+
paymentType: PaymentType;
|
|
20
|
+
active: boolean;
|
|
21
|
+
label: string;
|
|
22
|
+
description: string;
|
|
23
|
+
instruction: string;
|
|
24
|
+
paymentCode: string;
|
|
25
|
+
publicCredentials: any;
|
|
26
|
+
order: number;
|
|
27
|
+
options: Array<Payment>;
|
|
28
|
+
configurations: Array<PaymentConfiguration>;
|
|
29
|
+
cashDiscount: {
|
|
30
|
+
discountPercentage: number;
|
|
31
|
+
discountValue: number;
|
|
32
|
+
valueWithDiscount: number;
|
|
33
|
+
};
|
|
34
|
+
installments: Array<ProductInstallment>; // TODO ver depois
|
|
35
|
+
error: null | string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface PaymentType {
|
|
39
|
+
id: number;
|
|
40
|
+
code: PaymentCode;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface PaymentConfiguration {
|
|
44
|
+
code: ConfigurationCode;
|
|
45
|
+
title: string;
|
|
46
|
+
value: number;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface PaymentOption {
|
|
50
|
+
id: number;
|
|
51
|
+
paymentId: number;
|
|
52
|
+
paymentStoreCredentialId: number;
|
|
53
|
+
paymentAntiFraudCredentialId: null;
|
|
54
|
+
paymentType: PaymentType;
|
|
55
|
+
active: boolean;
|
|
56
|
+
label: string;
|
|
57
|
+
description: string;
|
|
58
|
+
instruction: string;
|
|
59
|
+
order: number;
|
|
60
|
+
options: Array<PaymentOption>;
|
|
61
|
+
configurations: Array<PaymentConfiguration>;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface CardFlags {
|
|
65
|
+
master: string;
|
|
66
|
+
visa: string;
|
|
67
|
+
hiper: string;
|
|
68
|
+
amex: string;
|
|
69
|
+
hipercard: string;
|
|
70
|
+
americanexpress: string;
|
|
71
|
+
jcb: string;
|
|
72
|
+
aura: string;
|
|
73
|
+
banescard: string;
|
|
74
|
+
cabal: string;
|
|
75
|
+
diners: string;
|
|
76
|
+
discover: string;
|
|
77
|
+
sorocred: string;
|
|
78
|
+
unionpay: string;
|
|
79
|
+
credz: string;
|
|
80
|
+
elo: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface PaymentConditionsRequest {
|
|
84
|
+
cashDiscountPaymentOptionId: number;
|
|
85
|
+
installmentPaymentOptionId: number | null;
|
|
86
|
+
items: Array<{
|
|
87
|
+
reference: string;
|
|
88
|
+
value: number;
|
|
89
|
+
}>;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface PaymentConditionsResponse {
|
|
93
|
+
[key: string]: {
|
|
94
|
+
reference: string;
|
|
95
|
+
value: number;
|
|
96
|
+
cashDiscount: {
|
|
97
|
+
discountPercentage: number;
|
|
98
|
+
discountValue: number;
|
|
99
|
+
valueWithDiscount: number;
|
|
100
|
+
};
|
|
101
|
+
installments: Array<ProductInstallment> | null;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
export type ConfigurationCode =
|
|
2
|
-
| 'order-cancellation-time'
|
|
3
|
-
| 'show-payment-min-value'
|
|
4
|
-
| 'show-payment-max-value'
|
|
5
|
-
| 'max-number-installment'
|
|
6
|
-
| 'min-value-installment'
|
|
7
|
-
| 'installment-map'
|
|
8
|
-
| 'cash-discount'
|
|
9
|
-
| 'automatic-capture'
|
|
10
|
-
| 'payment-min-value'
|
|
11
|
-
| 'max-number-card'
|
|
12
|
-
| 'expiration-time'
|
|
13
|
-
| 'bank-account-map';
|
|
14
|
-
|
|
15
|
-
export type PaymentCode =
|
|
16
|
-
| 'credit-card'
|
|
17
|
-
| 'pix'
|
|
18
|
-
| 'billet'
|
|
19
|
-
| 'external'
|
|
20
|
-
| 'external-deposit'
|
|
21
|
-
| 'billet-pix'
|
|
22
|
-
| 'internal-deposit'
|
|
23
|
-
| 'incorporated'
|
|
24
|
-
| 'custom'
|
|
25
|
-
| 'debit-card'
|
|
26
|
-
| 'multiple-payment'
|
|
27
|
-
| 'zero-value';
|
|
1
|
+
export type ConfigurationCode =
|
|
2
|
+
| 'order-cancellation-time'
|
|
3
|
+
| 'show-payment-min-value'
|
|
4
|
+
| 'show-payment-max-value'
|
|
5
|
+
| 'max-number-installment'
|
|
6
|
+
| 'min-value-installment'
|
|
7
|
+
| 'installment-map'
|
|
8
|
+
| 'cash-discount'
|
|
9
|
+
| 'automatic-capture'
|
|
10
|
+
| 'payment-min-value'
|
|
11
|
+
| 'max-number-card'
|
|
12
|
+
| 'expiration-time'
|
|
13
|
+
| 'bank-account-map';
|
|
14
|
+
|
|
15
|
+
export type PaymentCode =
|
|
16
|
+
| 'credit-card'
|
|
17
|
+
| 'pix'
|
|
18
|
+
| 'billet'
|
|
19
|
+
| 'external'
|
|
20
|
+
| 'external-deposit'
|
|
21
|
+
| 'billet-pix'
|
|
22
|
+
| 'internal-deposit'
|
|
23
|
+
| 'incorporated'
|
|
24
|
+
| 'custom'
|
|
25
|
+
| 'debit-card'
|
|
26
|
+
| 'multiple-payment'
|
|
27
|
+
| 'zero-value';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
export interface PriceRule {
|
|
2
|
-
id: number;
|
|
3
|
-
name: string;
|
|
4
|
-
trigger: 'automatic' | 'code' | 'quantity-rule';
|
|
5
|
-
ruleTarget: 'product' | 'brand' | 'category';
|
|
6
|
-
applyInGroup: boolean;
|
|
7
|
-
updateComparisonPrice: 'original-sale-price' | 'not-update' | 'apply-rule';
|
|
8
|
-
basePriceField: 'sale-price' | 'base-price';
|
|
9
|
-
code: null;
|
|
10
|
-
beginQuantity: null;
|
|
11
|
-
endQuantity: null;
|
|
12
|
-
value: number;
|
|
13
|
-
valueType: 'percentage' | 'value' | 'balance';
|
|
14
|
-
priority: number;
|
|
15
|
-
active: boolean;
|
|
16
|
-
scheduling: {
|
|
17
|
-
id: number;
|
|
18
|
-
startDate: string;
|
|
19
|
-
endDate: string;
|
|
20
|
-
};
|
|
21
|
-
tradePolicies: Array<number>;
|
|
1
|
+
export interface PriceRule {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
trigger: 'automatic' | 'code' | 'quantity-rule';
|
|
5
|
+
ruleTarget: 'product' | 'brand' | 'category';
|
|
6
|
+
applyInGroup: boolean;
|
|
7
|
+
updateComparisonPrice: 'original-sale-price' | 'not-update' | 'apply-rule';
|
|
8
|
+
basePriceField: 'sale-price' | 'base-price';
|
|
9
|
+
code: null;
|
|
10
|
+
beginQuantity: null;
|
|
11
|
+
endQuantity: null;
|
|
12
|
+
value: number;
|
|
13
|
+
valueType: 'percentage' | 'value' | 'balance';
|
|
14
|
+
priority: number;
|
|
15
|
+
active: boolean;
|
|
16
|
+
scheduling: {
|
|
17
|
+
id: number;
|
|
18
|
+
startDate: string;
|
|
19
|
+
endDate: string;
|
|
20
|
+
};
|
|
21
|
+
tradePolicies: Array<number>;
|
|
22
22
|
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
type App = {
|
|
2
|
-
code: 'google-tag-manager';
|
|
3
|
-
settings: {
|
|
4
|
-
'google-tag-manager-id': string;
|
|
5
|
-
}
|
|
6
|
-
} | {
|
|
7
|
-
code: 'meta-pixel';
|
|
8
|
-
settings: {
|
|
9
|
-
'meta-pixel-id': string;
|
|
10
|
-
}
|
|
11
|
-
} | {
|
|
12
|
-
code: 'google-consumer-reviews';
|
|
13
|
-
settings: {
|
|
14
|
-
'google-merchant-id': string;
|
|
15
|
-
}
|
|
16
|
-
} | {
|
|
17
|
-
code: 'google-login';
|
|
18
|
-
settings: {
|
|
19
|
-
'google-login-client-id': string;
|
|
20
|
-
}
|
|
21
|
-
} | {
|
|
22
|
-
code: 'facebook-login';
|
|
23
|
-
settings: {
|
|
24
|
-
'facebook-login-client-id': string;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
export interface TemplateResponse<S = unknown> {
|
|
28
|
-
apps: Array<App>;
|
|
29
|
-
settings: S;
|
|
1
|
+
type App = {
|
|
2
|
+
code: 'google-tag-manager';
|
|
3
|
+
settings: {
|
|
4
|
+
'google-tag-manager-id': string;
|
|
5
|
+
}
|
|
6
|
+
} | {
|
|
7
|
+
code: 'meta-pixel';
|
|
8
|
+
settings: {
|
|
9
|
+
'meta-pixel-id': string;
|
|
10
|
+
}
|
|
11
|
+
} | {
|
|
12
|
+
code: 'google-consumer-reviews';
|
|
13
|
+
settings: {
|
|
14
|
+
'google-merchant-id': string;
|
|
15
|
+
}
|
|
16
|
+
} | {
|
|
17
|
+
code: 'google-login';
|
|
18
|
+
settings: {
|
|
19
|
+
'google-login-client-id': string;
|
|
20
|
+
}
|
|
21
|
+
} | {
|
|
22
|
+
code: 'facebook-login';
|
|
23
|
+
settings: {
|
|
24
|
+
'facebook-login-client-id': string;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export interface TemplateResponse<S = unknown> {
|
|
28
|
+
apps: Array<App>;
|
|
29
|
+
settings: S;
|
|
30
30
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type OauthType = 'google-login' | 'facebook-login';
|
|
2
|
-
|
|
3
|
-
export interface RedirectRequest {
|
|
4
|
-
loginUrl: string;
|
|
5
|
-
registerUrl: string;
|
|
1
|
+
export type OauthType = 'google-login' | 'facebook-login';
|
|
2
|
+
|
|
3
|
+
export interface RedirectRequest {
|
|
4
|
+
loginUrl: string;
|
|
5
|
+
registerUrl: string;
|
|
6
6
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { PriceRule, Product } from '../..';
|
|
2
|
-
|
|
3
|
-
export interface Upsell {
|
|
4
|
-
id: number;
|
|
5
|
-
displayTitle: string;
|
|
6
|
-
displayDescription: string;
|
|
7
|
-
displayButtonText: string;
|
|
8
|
-
quantity: number;
|
|
9
|
-
upsellProduct: Product;
|
|
10
|
-
priceRule: PriceRule;
|
|
11
|
-
}
|
|
12
|
-
|
|
1
|
+
import type { PriceRule, Product } from '../..';
|
|
2
|
+
|
|
3
|
+
export interface Upsell {
|
|
4
|
+
id: number;
|
|
5
|
+
displayTitle: string;
|
|
6
|
+
displayDescription: string;
|
|
7
|
+
displayButtonText: string;
|
|
8
|
+
quantity: number;
|
|
9
|
+
upsellProduct: Product;
|
|
10
|
+
priceRule: PriceRule;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
13
|
export type UpsellResponse = Array<Upsell>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export type WalletSortFields = 'id' | 'createdAt';
|
|
2
|
-
|
|
3
|
-
export type WalletConditionFields =
|
|
4
|
-
| 'action'
|
|
5
|
-
| 'promotionalVoucherId'
|
|
6
|
-
| 'productGiftCardGeneratedId'
|
|
7
|
-
| 'orderId'
|
|
8
|
-
| 'createdAt';
|
|
1
|
+
export type WalletSortFields = 'id' | 'createdAt';
|
|
2
|
+
|
|
3
|
+
export type WalletConditionFields =
|
|
4
|
+
| 'action'
|
|
5
|
+
| 'promotionalVoucherId'
|
|
6
|
+
| 'productGiftCardGeneratedId'
|
|
7
|
+
| 'orderId'
|
|
8
|
+
| 'createdAt';
|