@uappi/public-sdk 1.2.9 → 1.2.10

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.
Files changed (106) hide show
  1. package/.gitlab-ci.yml +43 -0
  2. package/.vscode/extensions.json +4 -4
  3. package/.vscode/settings.json +6 -6
  4. package/README.md +67 -0
  5. package/components/Animations/ExpandTransition.ts +89 -89
  6. package/components/Animations/index.ts +1 -1
  7. package/components/ColorTheme/ColorTheme.ts +80 -80
  8. package/components/ColorTheme/index.ts +1 -1
  9. package/components/ColorTheme/types.ts +18 -18
  10. package/components/SocialAuth/FacebookAuth/types.ts +2 -2
  11. package/components/SocialAuth/GoogleAuth/types.ts +2 -2
  12. package/components/SocialAuth/index.ts +1 -1
  13. package/components/index.ts +2 -2
  14. package/main.ts +4 -4
  15. package/modules/Api/README.md +469 -469
  16. package/modules/Api/endpoints/CommonComposable.ts +24 -24
  17. package/modules/Api/endpoints/CouponComposable.ts +18 -18
  18. package/modules/Api/endpoints/LoggoutComposable.ts +8 -8
  19. package/modules/Api/endpoints/MFAComposable.ts +43 -43
  20. package/modules/Api/endpoints/PaymentComposable.ts +14 -14
  21. package/modules/Api/endpoints/PublicComposable.ts +8 -8
  22. package/modules/Api/endpoints/TemplateComposable.ts +7 -7
  23. package/modules/Api/endpoints/ThirdPartyComposable.ts +13 -13
  24. package/modules/Api/endpoints/UpsellComposable.ts +17 -17
  25. package/modules/Api/endpoints/VerifyComposable.ts +7 -7
  26. package/modules/Api/endpoints/WalletComposable.ts +36 -36
  27. package/modules/Api/paramsSerializer/encodeWafNormalizer.ts +7 -7
  28. package/modules/Api/types/endpoints/cart/cart.interfaces.ts +161 -161
  29. package/modules/Api/types/endpoints/cart/cart.types.ts +27 -27
  30. package/modules/Api/types/endpoints/common/common.interfaces.ts +21 -21
  31. package/modules/Api/types/endpoints/country/country.types.ts +7502 -7502
  32. package/modules/Api/types/endpoints/coupon/coupon.interfaces.ts +13 -13
  33. package/modules/Api/types/endpoints/discounts/discounts.interfaces.ts +9 -9
  34. package/modules/Api/types/endpoints/mfa/mfa.interfaces.ts +51 -51
  35. package/modules/Api/types/endpoints/payment/payment.interfaces.ts +103 -103
  36. package/modules/Api/types/endpoints/payment/payment.types.ts +27 -27
  37. package/modules/Api/types/endpoints/price/price.interfaces.ts +21 -21
  38. package/modules/Api/types/endpoints/template/template.interfaces.ts +29 -29
  39. package/modules/Api/types/endpoints/third-party/oauth.interfaces.ts +5 -5
  40. package/modules/Api/types/endpoints/upsell/upsell.interfaces.ts +12 -12
  41. package/modules/Api/types/endpoints/wallet/wallet-obsearch.ts +8 -8
  42. package/modules/Api/types/endpoints/wallet/wallet.interfaces.ts +57 -57
  43. package/modules/Api/types/endpoints/zipcode/zipcode.interfaces.ts +23 -23
  44. package/modules/Api/types/index.ts +504 -504
  45. package/modules/Tracking/endpoints/CartComposable.ts +75 -75
  46. package/modules/Tracking/endpoints/CustomerComposable.ts +71 -71
  47. package/modules/Tracking/endpoints/types.ts +11 -11
  48. package/modules/Tracking/events/actions/addPaymentInfo.ts +31 -31
  49. package/modules/Tracking/events/actions/addShippingInfo.ts +27 -27
  50. package/modules/Tracking/events/actions/addToCart.ts +35 -35
  51. package/modules/Tracking/events/actions/beginCheckout.ts +28 -28
  52. package/modules/Tracking/events/actions/customerProfile.ts +36 -36
  53. package/modules/Tracking/events/actions/generateLead.ts +12 -12
  54. package/modules/Tracking/events/actions/login.ts +8 -8
  55. package/modules/Tracking/events/actions/purchase.ts +42 -42
  56. package/modules/Tracking/events/actions/removeFromCart.ts +52 -52
  57. package/modules/Tracking/events/actions/search.ts +8 -8
  58. package/modules/Tracking/events/actions/selectItem.ts +64 -64
  59. package/modules/Tracking/events/actions/selectPromotion.ts +24 -24
  60. package/modules/Tracking/events/actions/shippingCalculation.ts +7 -7
  61. package/modules/Tracking/events/actions/signup.ts +8 -8
  62. package/modules/Tracking/events/actions/upsertToCart.ts +62 -62
  63. package/modules/Tracking/events/views/viewCart.ts +28 -28
  64. package/modules/Tracking/events/views/viewHome.ts +5 -5
  65. package/modules/Tracking/events/views/viewItem.ts +31 -31
  66. package/modules/Tracking/events/views/viewItemList.ts +65 -65
  67. package/modules/Tracking/events/views/viewNotFound.ts +5 -5
  68. package/modules/Tracking/events/views/viewOther.ts +5 -5
  69. package/modules/Tracking/events/views/viewPayment.ts +7 -7
  70. package/modules/Tracking/events/views/viewPromotion.ts +28 -28
  71. package/modules/Tracking/events/views/viewShipping.ts +7 -7
  72. package/modules/Tracking/index.ts +84 -84
  73. package/modules/Tracking/publicApiTracking.ts +35 -35
  74. package/modules/Tracking/types/actions/add-payment-info.interfaces.ts +12 -12
  75. package/modules/Tracking/types/actions/add-shipping-info.interfaces.ts +11 -11
  76. package/modules/Tracking/types/actions/add-to-cart.interfaces.ts +10 -10
  77. package/modules/Tracking/types/actions/begin-checkout.interfaces.ts +12 -12
  78. package/modules/Tracking/types/actions/customer-profile.interfaces.ts +19 -19
  79. package/modules/Tracking/types/actions/file-download.interfaces.ts +4 -4
  80. package/modules/Tracking/types/actions/generate-lead.interfaces.ts +12 -12
  81. package/modules/Tracking/types/actions/login.interfaces.ts +4 -4
  82. package/modules/Tracking/types/actions/purchase.interfaces.ts +18 -18
  83. package/modules/Tracking/types/actions/remove-from-cart.interfaces.ts +10 -10
  84. package/modules/Tracking/types/actions/search.interfaces.ts +4 -4
  85. package/modules/Tracking/types/actions/select-item.interfaces.ts +16 -16
  86. package/modules/Tracking/types/actions/select-promotion.interfaces.ts +8 -8
  87. package/modules/Tracking/types/actions/share.interfaces.ts +4 -4
  88. package/modules/Tracking/types/actions/shipping-calculation.interfaces.ts +3 -3
  89. package/modules/Tracking/types/actions/signup.interfaces.ts +4 -4
  90. package/modules/Tracking/types/event.types.ts +54 -54
  91. package/modules/Tracking/types/index.ts +37 -37
  92. package/modules/Tracking/types/item.interfaces.ts +30 -30
  93. package/modules/Tracking/types/views/view-cart.interfaces.ts +11 -11
  94. package/modules/Tracking/types/views/view-home.interfaces.ts +3 -3
  95. package/modules/Tracking/types/views/view-item-list.interfaces.ts +11 -11
  96. package/modules/Tracking/types/views/view-item.interfaces.ts +15 -15
  97. package/modules/Tracking/types/views/view-not-found.interfaces.ts +3 -3
  98. package/modules/Tracking/types/views/view-other.interfaces.ts +3 -3
  99. package/modules/Tracking/types/views/view-payment.interfaces.ts +3 -3
  100. package/modules/Tracking/types/views/view-promotion.interfaces.ts +8 -8
  101. package/modules/Tracking/types/views/view-shipping.interfaces.ts +3 -3
  102. package/modules/Tracking/utils/cart.ts +100 -100
  103. package/modules/Tracking/utils/pushDatalayer.ts +7 -7
  104. package/modules/index.ts +1 -1
  105. package/package.json +1 -1
  106. package/scripts/release.sh +34 -0
@@ -1,161 +1,161 @@
1
- import type {
2
- CustomerGender,
3
- Order,
4
- AddressToCartType,
5
- Coupon,
6
- CountryAlpha3,
7
- StateCode,
8
- CartErrorCode,
9
- } from '../..';
10
- export interface CartCustomer {
11
- customerId: number;
12
- nameCorporateName: string;
13
- tradeName: string;
14
- email: string;
15
- document: string;
16
- gender: CustomerGender;
17
- isCorporate: boolean;
18
- nationality: string;
19
- birthdate: string;
20
- phone: string;
21
- }
22
- export interface CartResponse {
23
- countryCode: string;
24
- quoteZipcode: string;
25
- subtotalValue: number;
26
- shippingValue: number;
27
- discountValue: number;
28
- additionValue: number;
29
- totalValue: number;
30
- requestedProductMap: Array<{
31
- productId: number;
32
- quantity: number;
33
- code: null;
34
- upsellId: null;
35
- productPairOfferId: null;
36
- }>;
37
- discountMap: {
38
- promotion: Array<{
39
- discountId: number;
40
- discountType: 'promotion';
41
- discountTitle: string;
42
- discountValue: number;
43
- discountMainCode: 'promotion';
44
- }>;
45
- coupon: Coupon | null;
46
- 'customer-wallet': null | {
47
- discountId: number;
48
- discountMainCode: 'customer-wallet';
49
- discountTitle: string;
50
- discountType: 'customer-wallet';
51
- discountValue: number;
52
- };
53
- 'point-system': null | {
54
- discountId: number;
55
- discountMainCode: 'point-system';
56
- discountTitle: string;
57
- discountType: 'point-system';
58
- discountValue: number;
59
- };
60
- };
61
- discountPreview: {
62
- pointSystem: null | {
63
- finalAmount: number;
64
- finalValue: number;
65
- name: string;
66
- originalAmount: number;
67
- pointValue: number;
68
- };
69
- cashDiscount: {
70
- discountPercentage: number;
71
- discountValue: number;
72
- valueWithDiscount: number;
73
- } | null;
74
- };
75
- customer: CartCustomer | null;
76
- addresses: Array<AddressToCartResponse>;
77
- orders: Array<Order>;
78
- warnings: Array<never>;
79
- errors: Array<CartError>;
80
- createdAt: string;
81
- updatedAt: string;
82
- }
83
-
84
- export interface CartError {
85
- description: string;
86
- entity: string;
87
- error: CartErrorCode;
88
- identifier: string;
89
- type: 'warning' | 'error';
90
- }
91
-
92
- export interface UpsertCartRequest {
93
- items: Array<UpsertCartItem>;
94
- }
95
-
96
- export interface UpsertCartItem {
97
- productId: number;
98
- quantity: number;
99
- code?: string | null;
100
- upsellId?: number | null;
101
- productPairOfferId?: number | null;
102
- }
103
-
104
- export interface DeleteCartRequest {
105
- items: Array<{ productId: number; upsellId?: number | null }>;
106
- }
107
-
108
- export interface AddressesToCartRequest {
109
- addresses: Array<AddressToCartRequest>;
110
- }
111
-
112
- export interface AddressToCartRequest {
113
- addressId: number;
114
- addressType: AddressToCartType;
115
- }
116
-
117
- export interface AddressToCartResponse {
118
- addressId: number;
119
- city: string;
120
- complement: string;
121
- countryCode: CountryAlpha3;
122
- district: string;
123
- identification: string;
124
- number: string;
125
- recipient: string;
126
- state: string;
127
- stateCode: StateCode;
128
- street: string;
129
- type: AddressToCartType;
130
- zipCode: string;
131
- }
132
-
133
- export interface BuyCartRequest {
134
- payments: Array<{
135
- paymentOptionId: number;
136
- value?: number;
137
- selectedInstallment?: number;
138
- card?: {
139
- token?: string;
140
- number: string;
141
- cvv: string;
142
- month: number;
143
- year: number;
144
- name: string;
145
- };
146
- }>;
147
- }
148
-
149
- export interface BuyCartResponse {
150
- cartId: string;
151
- code: string;
152
- createdAt: string;
153
- currency: string;
154
- id: number;
155
- issuedAt: string;
156
- salesChannelDomain: string;
157
- tradePolicyId: number;
158
- userEmail: null;
159
- userId: null;
160
- userName: null;
161
- }
1
+ import type {
2
+ CustomerGender,
3
+ Order,
4
+ AddressToCartType,
5
+ Coupon,
6
+ CountryAlpha3,
7
+ StateCode,
8
+ CartErrorCode,
9
+ } from '../..';
10
+ export interface CartCustomer {
11
+ customerId: number;
12
+ nameCorporateName: string;
13
+ tradeName: string;
14
+ email: string;
15
+ document: string;
16
+ gender: CustomerGender;
17
+ isCorporate: boolean;
18
+ nationality: string;
19
+ birthdate: string;
20
+ phone: string;
21
+ }
22
+ export interface CartResponse {
23
+ countryCode: string;
24
+ quoteZipcode: string;
25
+ subtotalValue: number;
26
+ shippingValue: number;
27
+ discountValue: number;
28
+ additionValue: number;
29
+ totalValue: number;
30
+ requestedProductMap: Array<{
31
+ productId: number;
32
+ quantity: number;
33
+ code: null;
34
+ upsellId: null;
35
+ productPairOfferId: null;
36
+ }>;
37
+ discountMap: {
38
+ promotion: Array<{
39
+ discountId: number;
40
+ discountType: 'promotion';
41
+ discountTitle: string;
42
+ discountValue: number;
43
+ discountMainCode: 'promotion';
44
+ }>;
45
+ coupon: Coupon | null;
46
+ 'customer-wallet': null | {
47
+ discountId: number;
48
+ discountMainCode: 'customer-wallet';
49
+ discountTitle: string;
50
+ discountType: 'customer-wallet';
51
+ discountValue: number;
52
+ };
53
+ 'point-system': null | {
54
+ discountId: number;
55
+ discountMainCode: 'point-system';
56
+ discountTitle: string;
57
+ discountType: 'point-system';
58
+ discountValue: number;
59
+ };
60
+ };
61
+ discountPreview: {
62
+ pointSystem: null | {
63
+ finalAmount: number;
64
+ finalValue: number;
65
+ name: string;
66
+ originalAmount: number;
67
+ pointValue: number;
68
+ };
69
+ cashDiscount: {
70
+ discountPercentage: number;
71
+ discountValue: number;
72
+ valueWithDiscount: number;
73
+ } | null;
74
+ };
75
+ customer: CartCustomer | null;
76
+ addresses: Array<AddressToCartResponse>;
77
+ orders: Array<Order>;
78
+ warnings: Array<never>;
79
+ errors: Array<CartError>;
80
+ createdAt: string;
81
+ updatedAt: string;
82
+ }
83
+
84
+ export interface CartError {
85
+ description: string;
86
+ entity: string;
87
+ error: CartErrorCode;
88
+ identifier: string;
89
+ type: 'warning' | 'error';
90
+ }
91
+
92
+ export interface UpsertCartRequest {
93
+ items: Array<UpsertCartItem>;
94
+ }
95
+
96
+ export interface UpsertCartItem {
97
+ productId: number;
98
+ quantity: number;
99
+ code?: string | null;
100
+ upsellId?: number | null;
101
+ productPairOfferId?: number | null;
102
+ }
103
+
104
+ export interface DeleteCartRequest {
105
+ items: Array<{ productId: number; upsellId?: number | null }>;
106
+ }
107
+
108
+ export interface AddressesToCartRequest {
109
+ addresses: Array<AddressToCartRequest>;
110
+ }
111
+
112
+ export interface AddressToCartRequest {
113
+ addressId: number;
114
+ addressType: AddressToCartType;
115
+ }
116
+
117
+ export interface AddressToCartResponse {
118
+ addressId: number;
119
+ city: string;
120
+ complement: string;
121
+ countryCode: CountryAlpha3;
122
+ district: string;
123
+ identification: string;
124
+ number: string;
125
+ recipient: string;
126
+ state: string;
127
+ stateCode: StateCode;
128
+ street: string;
129
+ type: AddressToCartType;
130
+ zipCode: string;
131
+ }
132
+
133
+ export interface BuyCartRequest {
134
+ payments: Array<{
135
+ paymentOptionId: number;
136
+ value?: number;
137
+ selectedInstallment?: number;
138
+ card?: {
139
+ token?: string;
140
+ number: string;
141
+ cvv: string;
142
+ month: number;
143
+ year: number;
144
+ name: string;
145
+ };
146
+ }>;
147
+ }
148
+
149
+ export interface BuyCartResponse {
150
+ cartId: string;
151
+ code: string;
152
+ createdAt: string;
153
+ currency: string;
154
+ id: number;
155
+ issuedAt: string;
156
+ salesChannelDomain: string;
157
+ tradePolicyId: number;
158
+ userEmail: null;
159
+ userId: null;
160
+ userName: null;
161
+ }
@@ -1,27 +1,27 @@
1
- export type AddressToCartType = 'both' | 'delivery' | 'billing';
2
-
3
- export type CartErrorCode =
4
- | 'UAPPI_STORE_CART_EMPTY_PAYMENT'
5
- | 'UAPPI_STORE_CART_INVALID_ID'
6
- | 'UAPPI_STORE_CART_TOKEN_IS_EXPIRED'
7
- | 'UAPPI_STORE_CART_INVALID_FIRST_ID'
8
- | 'UAPPI_STORE_CART_INVALID_SECOND_ID'
9
- | 'UAPPI_STORE_CART_NOT_FOUND'
10
- | 'UAPPI_STORE_CART_CUSTOMER_IS_ALREADY_DEFINED'
11
- | 'UAPPI_STORE_CART_ADDRESS_TYPE_BOTH_IS_REQUIRED'
12
- | 'UAPPI_STORE_CART_ADDRESS_TYPE_PAIR_IS_REQUIRED'
13
- | 'UAPPI_STORE_CART_ADDRESS_NOT_FOUND'
14
- | 'UAPPI_STORE_CART_CUSTOMER_IS_DISABLED'
15
- | 'UAPPI_STORE_CART_CUSTOMER_IS_REQUIRED'
16
- | 'UAPPI_STORE_CART_EMPTY'
17
- | 'UAPPI_STORE_CART_BUDGET_NOT_FOUND'
18
- | 'UAPPI_STORE_CART_EXPIRATION_DATE_INVALID'
19
- | 'UAPPI_STORE_CART_EXPIRATION_DATE_EXCEEDED_LIMIT'
20
- | 'UAPPI_STORE_CART_ABANDONMENT_DATE_INVALID'
21
- | 'UAPPI_STORE_CART_ABANDONMENT_DATE_EXCEEDED_LIMIT'
22
- | 'UAPPI_STORE_CART_INVALID_ERROR_TO_PUSH'
23
- | 'UAPPI_STORE_CART_QUOTE_ATTEMPT_FAILED'
24
- | 'UAPPI_STORE_CART_INVALID_ORDER_ID'
25
- | 'UAPPI_STORE_CART_INVALID_SHIPPING_OPTION'
26
- | 'UAPPI_STORE_CART_PICKUP_POINT_ID_IS_REQUIRED'
27
- | 'UAPPI_STORE_CART_INVALID_PICKUP_POINT_OPTION';
1
+ export type AddressToCartType = 'both' | 'delivery' | 'billing';
2
+
3
+ export type CartErrorCode =
4
+ | 'UAPPI_STORE_CART_EMPTY_PAYMENT'
5
+ | 'UAPPI_STORE_CART_INVALID_ID'
6
+ | 'UAPPI_STORE_CART_TOKEN_IS_EXPIRED'
7
+ | 'UAPPI_STORE_CART_INVALID_FIRST_ID'
8
+ | 'UAPPI_STORE_CART_INVALID_SECOND_ID'
9
+ | 'UAPPI_STORE_CART_NOT_FOUND'
10
+ | 'UAPPI_STORE_CART_CUSTOMER_IS_ALREADY_DEFINED'
11
+ | 'UAPPI_STORE_CART_ADDRESS_TYPE_BOTH_IS_REQUIRED'
12
+ | 'UAPPI_STORE_CART_ADDRESS_TYPE_PAIR_IS_REQUIRED'
13
+ | 'UAPPI_STORE_CART_ADDRESS_NOT_FOUND'
14
+ | 'UAPPI_STORE_CART_CUSTOMER_IS_DISABLED'
15
+ | 'UAPPI_STORE_CART_CUSTOMER_IS_REQUIRED'
16
+ | 'UAPPI_STORE_CART_EMPTY'
17
+ | 'UAPPI_STORE_CART_BUDGET_NOT_FOUND'
18
+ | 'UAPPI_STORE_CART_EXPIRATION_DATE_INVALID'
19
+ | 'UAPPI_STORE_CART_EXPIRATION_DATE_EXCEEDED_LIMIT'
20
+ | 'UAPPI_STORE_CART_ABANDONMENT_DATE_INVALID'
21
+ | 'UAPPI_STORE_CART_ABANDONMENT_DATE_EXCEEDED_LIMIT'
22
+ | 'UAPPI_STORE_CART_INVALID_ERROR_TO_PUSH'
23
+ | 'UAPPI_STORE_CART_QUOTE_ATTEMPT_FAILED'
24
+ | 'UAPPI_STORE_CART_INVALID_ORDER_ID'
25
+ | 'UAPPI_STORE_CART_INVALID_SHIPPING_OPTION'
26
+ | 'UAPPI_STORE_CART_PICKUP_POINT_ID_IS_REQUIRED'
27
+ | 'UAPPI_STORE_CART_INVALID_PICKUP_POINT_OPTION';
@@ -1,21 +1,21 @@
1
- import type {
2
- CountryAlpha2,
3
- CountryAlpha3,
4
- CountryName,
5
- CountryPhoneCode,
6
- StateCode,
7
- StateName,
8
- } from '../..';
9
-
10
- export interface CountryResponse {
11
- id: CountryAlpha3;
12
- code: CountryAlpha2;
13
- name: CountryName;
14
- ddi: CountryPhoneCode;
15
- states: Record<StateCode, State>;
16
- }
17
-
18
- export type State = {
19
- id: StateCode;
20
- name: StateName;
21
- };
1
+ import type {
2
+ CountryAlpha2,
3
+ CountryAlpha3,
4
+ CountryName,
5
+ CountryPhoneCode,
6
+ StateCode,
7
+ StateName,
8
+ } from '../..';
9
+
10
+ export interface CountryResponse {
11
+ id: CountryAlpha3;
12
+ code: CountryAlpha2;
13
+ name: CountryName;
14
+ ddi: CountryPhoneCode;
15
+ states: Record<StateCode, State>;
16
+ }
17
+
18
+ export type State = {
19
+ id: StateCode;
20
+ name: StateName;
21
+ };