@uappi/public-sdk 1.0.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.
Files changed (158) hide show
  1. package/.editorconfig +6 -0
  2. package/.vscode/extensions.json +5 -0
  3. package/.vscode/settings.json +7 -0
  4. package/components/Animations/ExpandTransition.ts +89 -0
  5. package/components/Animations/index.ts +1 -0
  6. package/components/Themes/CustomTheme.ts +77 -0
  7. package/components/Themes/index.ts +1 -0
  8. package/main.ts +16 -0
  9. package/modules/Api/README.md +469 -0
  10. package/modules/Api/endpoints/BannerComposable.ts +31 -0
  11. package/modules/Api/endpoints/BrandComposable.ts +21 -0
  12. package/modules/Api/endpoints/CartComposable.ts +121 -0
  13. package/modules/Api/endpoints/CommonComposable.ts +24 -0
  14. package/modules/Api/endpoints/CouponComposable.ts +18 -0
  15. package/modules/Api/endpoints/CustomerComposable.ts +255 -0
  16. package/modules/Api/endpoints/InterestComposable.ts +11 -0
  17. package/modules/Api/endpoints/LoggoutComposable.ts +8 -0
  18. package/modules/Api/endpoints/MenuComposable.ts +25 -0
  19. package/modules/Api/endpoints/PairOfferComposable.ts +14 -0
  20. package/modules/Api/endpoints/PaymentComposable.ts +14 -0
  21. package/modules/Api/endpoints/ProductCommentComposable.ts +51 -0
  22. package/modules/Api/endpoints/ProductQuoteShipment.ts +20 -0
  23. package/modules/Api/endpoints/PublicComposable.ts +9 -0
  24. package/modules/Api/endpoints/ReviewComposable.ts +64 -0
  25. package/modules/Api/endpoints/SearchComposable.ts +27 -0
  26. package/modules/Api/endpoints/ShowcaseComposable.ts +45 -0
  27. package/modules/Api/endpoints/TemplateComposable.ts +8 -0
  28. package/modules/Api/endpoints/ThirdPartyComposable.ts +14 -0
  29. package/modules/Api/endpoints/UpsellComposable.ts +18 -0
  30. package/modules/Api/endpoints/UrlComposable.ts +26 -0
  31. package/modules/Api/endpoints/VariationComposable.ts +36 -0
  32. package/modules/Api/endpoints/WalletComposable.ts +36 -0
  33. package/modules/Api/endpoints/ZipcodeComposable.ts +10 -0
  34. package/modules/Api/index.ts +194 -0
  35. package/modules/Api/paramsSerializer/encodeWafNormalizer.ts +7 -0
  36. package/modules/Api/types/context/api-config.types.ts +68 -0
  37. package/modules/Api/types/context/api-params.types.ts +74 -0
  38. package/modules/Api/types/endpoints/attribute/attribute.interfaces.ts +42 -0
  39. package/modules/Api/types/endpoints/banner/banner.interfaces.ts +45 -0
  40. package/modules/Api/types/endpoints/brand/brand-field.types.ts +3 -0
  41. package/modules/Api/types/endpoints/brand/brand.interfaces.ts +23 -0
  42. package/modules/Api/types/endpoints/cart/cart.interfaces.ts +161 -0
  43. package/modules/Api/types/endpoints/cart/cart.types.ts +27 -0
  44. package/modules/Api/types/endpoints/common/common.interfaces.ts +21 -0
  45. package/modules/Api/types/endpoints/context/context.types.ts +1 -0
  46. package/modules/Api/types/endpoints/country/country.types.ts +7502 -0
  47. package/modules/Api/types/endpoints/coupon/coupon.interfaces.ts +13 -0
  48. package/modules/Api/types/endpoints/customer/customer-erros.ts +13 -0
  49. package/modules/Api/types/endpoints/customer/customer-obsearch.ts +103 -0
  50. package/modules/Api/types/endpoints/customer/customer.interfaces.ts +448 -0
  51. package/modules/Api/types/endpoints/customer/customer.types.ts +3 -0
  52. package/modules/Api/types/endpoints/description/description.interfaces.ts +30 -0
  53. package/modules/Api/types/endpoints/discounts/discounts.interfaces.ts +9 -0
  54. package/modules/Api/types/endpoints/discounts/discounts.types.ts +5 -0
  55. package/modules/Api/types/endpoints/filters/filter.type.ts +1 -0
  56. package/modules/Api/types/endpoints/filters/filters.interfaces.ts +26 -0
  57. package/modules/Api/types/endpoints/interest/interest.interfaces.ts +22 -0
  58. package/modules/Api/types/endpoints/media/media.interfaces.ts +13 -0
  59. package/modules/Api/types/endpoints/menu/menu.enums.ts +8 -0
  60. package/modules/Api/types/endpoints/menu/menu.interfaces.ts +26 -0
  61. package/modules/Api/types/endpoints/order/order.interfaces.ts +63 -0
  62. package/modules/Api/types/endpoints/page/page.interfaces.ts +15 -0
  63. package/modules/Api/types/endpoints/pagination/pagination.interfaces.ts +6 -0
  64. package/modules/Api/types/endpoints/pair-offer/pair-offer.interfaces.ts +19 -0
  65. package/modules/Api/types/endpoints/payment/payment.interfaces.ts +103 -0
  66. package/modules/Api/types/endpoints/payment/payment.types.ts +27 -0
  67. package/modules/Api/types/endpoints/price/price.interfaces.ts +22 -0
  68. package/modules/Api/types/endpoints/product/product-obsearch.types.ts +63 -0
  69. package/modules/Api/types/endpoints/product/product.interfaces.ts +109 -0
  70. package/modules/Api/types/endpoints/product/product.types.ts +3 -0
  71. package/modules/Api/types/endpoints/product-comment/product-comment-obsearch.types.ts +24 -0
  72. package/modules/Api/types/endpoints/product-comment/product-comment.interfaces.ts +32 -0
  73. package/modules/Api/types/endpoints/redirect/redirect.interfaces.ts +7 -0
  74. package/modules/Api/types/endpoints/review/review-obsearch.types.ts +18 -0
  75. package/modules/Api/types/endpoints/review/review.interfaces.ts +34 -0
  76. package/modules/Api/types/endpoints/seal/seal.interfaces.ts +21 -0
  77. package/modules/Api/types/endpoints/seal/seal.types.ts +3 -0
  78. package/modules/Api/types/endpoints/search/search.interfaces.ts +11 -0
  79. package/modules/Api/types/endpoints/seo/seo.interfaces.ts +11 -0
  80. package/modules/Api/types/endpoints/shipment/shipment.interfaces.ts +137 -0
  81. package/modules/Api/types/endpoints/showcase/showcase.enums.ts +8 -0
  82. package/modules/Api/types/endpoints/showcase/showcase.interfaces.ts +10 -0
  83. package/modules/Api/types/endpoints/simple-product/simple-product.interfaces.ts +15 -0
  84. package/modules/Api/types/endpoints/storage/storage.interfaces.ts +16 -0
  85. package/modules/Api/types/endpoints/template/template.interfaces.ts +30 -0
  86. package/modules/Api/types/endpoints/third-party/oauth.interfaces.ts +6 -0
  87. package/modules/Api/types/endpoints/upsell/upsell.interfaces.ts +13 -0
  88. package/modules/Api/types/endpoints/url/url.interfaces.ts +85 -0
  89. package/modules/Api/types/endpoints/wallet/wallet-obsearch.ts +8 -0
  90. package/modules/Api/types/endpoints/wallet/wallet.interfaces.ts +57 -0
  91. package/modules/Api/types/endpoints/zipcode/zipcode.interfaces.ts +23 -0
  92. package/modules/Api/types/index.ts +459 -0
  93. package/modules/Api/usePublicApi.ts +68 -0
  94. package/modules/Tracking/endpoints/BannerComposable.ts +33 -0
  95. package/modules/Tracking/endpoints/CartComposable.ts +75 -0
  96. package/modules/Tracking/endpoints/CustomerComposable.ts +68 -0
  97. package/modules/Tracking/endpoints/ProductQuoteShipment.ts +14 -0
  98. package/modules/Tracking/endpoints/SearchComposable.ts +32 -0
  99. package/modules/Tracking/endpoints/ShowcaseComposable.ts +54 -0
  100. package/modules/Tracking/endpoints/UrlComposable.ts +41 -0
  101. package/modules/Tracking/endpoints/types.ts +11 -0
  102. package/modules/Tracking/events/actions/addPaymentInfo.ts +31 -0
  103. package/modules/Tracking/events/actions/addShippingInfo.ts +27 -0
  104. package/modules/Tracking/events/actions/addToCart.ts +35 -0
  105. package/modules/Tracking/events/actions/beginCheckout.ts +28 -0
  106. package/modules/Tracking/events/actions/customerProfile.ts +36 -0
  107. package/modules/Tracking/events/actions/generateLead.ts +12 -0
  108. package/modules/Tracking/events/actions/login.ts +8 -0
  109. package/modules/Tracking/events/actions/purchase.ts +42 -0
  110. package/modules/Tracking/events/actions/removeFromCart.ts +52 -0
  111. package/modules/Tracking/events/actions/search.ts +8 -0
  112. package/modules/Tracking/events/actions/selectItem.ts +64 -0
  113. package/modules/Tracking/events/actions/selectPromotion.ts +24 -0
  114. package/modules/Tracking/events/actions/shippingCalculation.ts +7 -0
  115. package/modules/Tracking/events/actions/signup.ts +8 -0
  116. package/modules/Tracking/events/actions/upsertToCart.ts +62 -0
  117. package/modules/Tracking/events/views/viewCart.ts +28 -0
  118. package/modules/Tracking/events/views/viewHome.ts +5 -0
  119. package/modules/Tracking/events/views/viewItem.ts +31 -0
  120. package/modules/Tracking/events/views/viewItemList.ts +65 -0
  121. package/modules/Tracking/events/views/viewNotFound.ts +5 -0
  122. package/modules/Tracking/events/views/viewOther.ts +5 -0
  123. package/modules/Tracking/events/views/viewPayment.ts +7 -0
  124. package/modules/Tracking/events/views/viewPromotion.ts +28 -0
  125. package/modules/Tracking/events/views/viewShipping.ts +7 -0
  126. package/modules/Tracking/index.ts +84 -0
  127. package/modules/Tracking/publicApiTracking.ts +36 -0
  128. package/modules/Tracking/types/actions/add-payment-info.interfaces.ts +12 -0
  129. package/modules/Tracking/types/actions/add-shipping-info.interfaces.ts +11 -0
  130. package/modules/Tracking/types/actions/add-to-cart.interfaces.ts +10 -0
  131. package/modules/Tracking/types/actions/begin-checkout.interfaces.ts +12 -0
  132. package/modules/Tracking/types/actions/customer-profile.interfaces.ts +19 -0
  133. package/modules/Tracking/types/actions/file-download.interfaces.ts +4 -0
  134. package/modules/Tracking/types/actions/generate-lead.interfaces.ts +12 -0
  135. package/modules/Tracking/types/actions/login.interfaces.ts +4 -0
  136. package/modules/Tracking/types/actions/purchase.interfaces.ts +18 -0
  137. package/modules/Tracking/types/actions/remove-from-cart.interfaces.ts +10 -0
  138. package/modules/Tracking/types/actions/search.interfaces.ts +4 -0
  139. package/modules/Tracking/types/actions/select-item.interfaces.ts +16 -0
  140. package/modules/Tracking/types/actions/select-promotion.interfaces.ts +8 -0
  141. package/modules/Tracking/types/actions/share.interfaces.ts +4 -0
  142. package/modules/Tracking/types/actions/shipping-calculation.interfaces.ts +3 -0
  143. package/modules/Tracking/types/actions/signup.interfaces.ts +4 -0
  144. package/modules/Tracking/types/event.types.ts +54 -0
  145. package/modules/Tracking/types/index.ts +37 -0
  146. package/modules/Tracking/types/item.interfaces.ts +30 -0
  147. package/modules/Tracking/types/views/view-cart.interfaces.ts +11 -0
  148. package/modules/Tracking/types/views/view-home.interfaces.ts +3 -0
  149. package/modules/Tracking/types/views/view-item-list.interfaces.ts +11 -0
  150. package/modules/Tracking/types/views/view-item.interfaces.ts +15 -0
  151. package/modules/Tracking/types/views/view-not-found.interfaces.ts +3 -0
  152. package/modules/Tracking/types/views/view-other.interfaces.ts +3 -0
  153. package/modules/Tracking/types/views/view-payment.interfaces.ts +3 -0
  154. package/modules/Tracking/types/views/view-promotion.interfaces.ts +8 -0
  155. package/modules/Tracking/types/views/view-shipping.interfaces.ts +3 -0
  156. package/modules/Tracking/utils/cart.ts +100 -0
  157. package/modules/Tracking/utils/pushDatalayer.ts +7 -0
  158. package/package.json +27 -0
@@ -0,0 +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
+ }
@@ -0,0 +1,13 @@
1
+ export type CustomerErrorCode =
2
+ | 'UAPPI_STORE_CUSTOMER_EMAIL_ALREADY_IN_USE'
3
+ | 'UAPPI_STORE_CUSTOMER_NOT_FOUND'
4
+ | 'UAPPI_STORE_ALREADY_USED_CUSTOMER_DOCUMENT'
5
+ | 'UAPPI_STORE_INVALID_ADDRESS'
6
+ | 'UAPPI_STORE_INVALID_LOGIN'
7
+ | 'UAPPI_STORE_MFA_IS_REQUIRED'
8
+ | 'UAPPI_STORE_DIFFERENT_PASSWORD'
9
+ | 'UAPPI_STORE_INVALID_PASSWORD_LENGTH'
10
+ | 'UAPPI_STORE_INVALID_CURRENT_PASSWORD'
11
+ | 'UAPPI_STORE_PASSWORD_NOT_UPDATED'
12
+ | 'UAPPI_STORE_INVALID_CUSTOMER_FLAG'
13
+ | 'UAPPI_STORE_HISTORY_NOT_FOUND';
@@ -0,0 +1,103 @@
1
+ export type CustomerFields =
2
+ | 'addresses'
3
+ | 'documents'
4
+ | 'flags'
5
+ | 'giftCardBalance'
6
+ | 'totalOrderQuantity'
7
+ | 'cancelledOrderQuantity'
8
+ | 'totalOrderValue'
9
+ | 'pointSystemAmount';
10
+
11
+ export type CustomerConditionFields =
12
+ | 'id'
13
+ | 'email'
14
+ | 'nameCorporateName'
15
+ | 'active'
16
+ | 'isCorporate'
17
+ | 'salesChannelId'
18
+ | 'deleted'
19
+ | 'createdAt'
20
+ | 'gender'
21
+ | 'nationaly'
22
+ | 'document'
23
+ | 'sendPromotionalEmail'
24
+ | 'sendPromotionalSms'
25
+ | 'sendOrderEmail'
26
+ | 'sendOrderSms';
27
+
28
+ export type CustomerSortFields =
29
+ | 'id'
30
+ | 'email'
31
+ | 'nameCorporateName'
32
+ | 'createdAt';
33
+
34
+ export type CustomerOrderGroupFields =
35
+ | 'customer'
36
+ | 'addresses'
37
+ | 'values'
38
+ | 'orders'
39
+ | 'productStorage'
40
+ | 'status'
41
+ | 'reserves'
42
+ | 'payments'
43
+ | 'paymentLogs'
44
+ | 'items'
45
+ | 'shipping'
46
+ | 'invoice'
47
+ | 'observations'
48
+ | 'discounts'
49
+ | 'additions';
50
+
51
+ export type CustomerOrderGroupSortFields = 'id' | 'createdAt' | 'issuedAt';
52
+
53
+ export type CustomerOrderGroupConditionFields =
54
+ | 'id'
55
+ | 'userId'
56
+ | 'createdAt'
57
+ | 'issuedAt'
58
+ | 'code'
59
+ | 'cartId'
60
+ | 'salesChannelId'
61
+ | 'salesChannelDomain'
62
+ | 'tradePolicyId'
63
+ | 'customerId'
64
+ | 'customerNameCorporateName'
65
+ | 'customerTradeName'
66
+ | 'customerEmail'
67
+ | 'customerDocument'
68
+ | 'customerDocument2'
69
+ | 'orderPaymentId'
70
+ | 'paymentOptionId'
71
+ | 'paymentStatus'
72
+ | 'transactionId'
73
+ | 'shippingTableId'
74
+ | 'addressId'
75
+ | 'zipCode'
76
+ | 'state'
77
+ | 'city'
78
+ | 'country'
79
+ | 'orderItemProductId'
80
+ | 'orderItemProductName'
81
+ | 'orderItemProductSku'
82
+ | 'productStorageId'
83
+ | 'orderStatusId'
84
+ | 'orderItemProductAmount'
85
+ | 'orderItemAmount'
86
+ | 'subtotalValue'
87
+ | 'shippingValue'
88
+ | 'totalValue';
89
+
90
+ export type CustomerOrderItemHistorySortFields = 'id' | 'createdAt';
91
+
92
+ export type CustomerOrderItemHistoryConditionFields =
93
+ | 'origin'
94
+ | 'action'
95
+ | 'createdAt';
96
+
97
+ export type CustomerHistorySortFields = 'id' | 'createdAt';
98
+
99
+ export type CustomerHistoryConditionFields =
100
+ | 'orderId'
101
+ | 'origin'
102
+ | 'action'
103
+ | 'createdAt';
@@ -0,0 +1,448 @@
1
+ import type {
2
+ CustomerGender,
3
+ CustomerOrigin,
4
+ CountryAlpha3,
5
+ StateCode,
6
+ Pagination,
7
+ PaymentCode,
8
+ AddressToCartType,
9
+ SimpleProduct,
10
+ Discount,
11
+ } from '../..';
12
+ import type { PickupPoint } from '../shipment/shipment.interfaces';
13
+
14
+ export interface CustomerResponse {
15
+ id: number;
16
+ salesChannelId: number;
17
+ tradePolicyId: number;
18
+ email: string;
19
+ dealerGroupId: number;
20
+ nameCorporateName: string;
21
+ tradeName: string;
22
+ isCorporate: false;
23
+ gender: CustomerGender;
24
+ nationality: CountryAlpha3;
25
+ birthdate: string;
26
+ phone: string;
27
+ walletAmount: number;
28
+ pointSystemAmount: number;
29
+ orderQuantity: number;
30
+ cancelledOrderQuantity: number;
31
+ orderValue: number;
32
+ origin: CustomerOrigin;
33
+ createdAt: string;
34
+ active: true;
35
+ deleted: false;
36
+ masked: false;
37
+ addresses: null | Array<CustomerAddressResponse>;
38
+ documents: null | Array<CustomerDocument>;
39
+ flags: null | {
40
+ sendOrderEmail: boolean;
41
+ sendOrderSms: boolean;
42
+ sendPromotionalEmail: boolean;
43
+ sendPromotionalSms: boolean;
44
+ };
45
+ giftCardBalance: null | number;
46
+ }
47
+
48
+ export interface SigninCustomerByEmail {
49
+ email: string;
50
+ password: string;
51
+ }
52
+
53
+ export interface SigninCustomerByDocument {
54
+ document: string;
55
+ password: string;
56
+ }
57
+
58
+ export interface ResponseSigninCustomer {
59
+ token: string;
60
+ }
61
+
62
+ export interface CheckCustomer {
63
+ identification: string;
64
+ }
65
+
66
+ export type CheckCustomerResponse = 'not-exists' | 'exists' | 'inactive';
67
+
68
+ export interface SignupCustomer {
69
+ email: string;
70
+ nameCorporateName: string;
71
+ isCorporate: boolean;
72
+ gender: CustomerGender;
73
+ birthdate: string;
74
+ phone: string;
75
+ nationality: CountryAlpha3;
76
+ origin: CustomerOrigin;
77
+ password: string;
78
+ documents?: Array<CustomerDocument>;
79
+ }
80
+
81
+ export interface CustomerDocument {
82
+ type: 'cpf' | 'rg' | 'cnpj' | 'ie' | 'document1' | 'document2' | 'document3';
83
+ document: string;
84
+ }
85
+
86
+ export interface PasswordRecoveryCustomer {
87
+ email: string;
88
+ }
89
+
90
+ export interface ChangePasswordCustomerByCode {
91
+ code: string;
92
+ password: string;
93
+ confirmPassword: string;
94
+ }
95
+ export interface ChangePasswordCustomerAuthenticated {
96
+ password: string;
97
+ confirmPassword: string;
98
+ currentPassword: string;
99
+ }
100
+
101
+ export interface UpdateCustomer {
102
+ email?: string;
103
+ nameCorporateName?: string;
104
+ tradeName?: string;
105
+ isCorporate?: boolean;
106
+ gender?: CustomerGender;
107
+ phone?: string;
108
+ }
109
+
110
+ export interface UpdateCustomerDocument {
111
+ documents: Array<CustomerDocument>;
112
+ }
113
+
114
+ export type UpdateCustomerDocumentResponse = Array<CustomerDocument>;
115
+
116
+ export interface UpsertCustomerAddressRequest {
117
+ zipCode: string;
118
+ identification: string;
119
+ countryCode: CountryAlpha3;
120
+ stateCode: StateCode;
121
+ state: string;
122
+ city: string;
123
+ street: string;
124
+ number: string;
125
+ district: string;
126
+ complement: string;
127
+ recipient: string;
128
+ }
129
+
130
+ export interface CustomerAddressResponse {
131
+ city: string;
132
+ complement: string;
133
+ countryCode: CountryAlpha3;
134
+ district: string;
135
+ id: number;
136
+ identification: string;
137
+ main: boolean;
138
+ number: string;
139
+ recipient: string;
140
+ state: string;
141
+ stateCode: StateCode;
142
+ street: string;
143
+ zipCode: string;
144
+ updatedAt: string;
145
+ createdAt: string;
146
+ }
147
+
148
+ export interface CustomerAddressesResponse {
149
+ registers: Array<CustomerAddressResponse>;
150
+ pagination: Pagination;
151
+ }
152
+
153
+ export interface CustomerOrderResponse {
154
+ id: number;
155
+ cartId: string;
156
+ tradePolicyId: number;
157
+ userId: null;
158
+ userEmail: null;
159
+ userName: null;
160
+ code: string;
161
+ salesChannelDomain: string;
162
+ currency: string;
163
+ createdAt: string;
164
+ issuedAt: string;
165
+ masked: boolean;
166
+ payments: Array<CustomerOrderPayment>;
167
+ customer: {
168
+ orderGroupId: number;
169
+ customerId: number;
170
+ customerNameCorporateName: string;
171
+ customerTradeName: string;
172
+ customerEmail: string;
173
+ customerDocument: string;
174
+ customerDocument2: string;
175
+ customerPhone: string;
176
+ customerIsCorporate: false;
177
+ customerGender: CustomerGender;
178
+ customerBirthdate: string;
179
+ };
180
+ addresses: Array<{
181
+ orderGroupId: number;
182
+ customerAddressType: AddressToCartType;
183
+ customerAddressId: number;
184
+ addressZipCode: string;
185
+ addressRecipient: string;
186
+ addressStreet: string;
187
+ addressNumber: string;
188
+ addressDistrict: string;
189
+ addressCity: string;
190
+ addressState: string;
191
+ addressStateCode: StateCode;
192
+ addressCountryCode: CountryAlpha3;
193
+ addressComplement: string;
194
+ }>;
195
+ values: {
196
+ orderId: number;
197
+ subtotalValue: number;
198
+ additionValue: number;
199
+ shippingValue: number;
200
+ discountValue: number;
201
+ totalValue: number;
202
+ } | null;
203
+ observations: null;
204
+ orders: Array<{
205
+ id: number;
206
+ orderGroupId: number;
207
+ productStorageId: number;
208
+ orderStatusId: number;
209
+ masked: boolean;
210
+ orderGroup: null;
211
+ productStorage: {
212
+ id: number;
213
+ code: string;
214
+ corporateName: string;
215
+ email: string;
216
+ phone: string;
217
+ tradeName: string;
218
+ stateCode: StateCode;
219
+ countryCode: CountryAlpha3;
220
+ document: string;
221
+ zipCode: string;
222
+ city: string;
223
+ address: string;
224
+ district: string;
225
+ number: string;
226
+ complement: string;
227
+ latitude: string;
228
+ longitude: string;
229
+ active: boolean;
230
+ observation: string;
231
+ tradePolicyExceptions: Array<null>;
232
+ };
233
+ status: {
234
+ id: number;
235
+ orderStatusParentId: null | number;
236
+ code:
237
+ | 'pending'
238
+ | 'paid'
239
+ | 'invoiced'
240
+ | 'sent'
241
+ | 'delivered'
242
+ | 'canceled'
243
+ | 'returned';
244
+ name: string;
245
+ icon: 'access_time';
246
+ children: Array<null>;
247
+ };
248
+ customer: null;
249
+ addresses: null;
250
+ values: {
251
+ orderId: number;
252
+ subtotalValue: number;
253
+ additionValue: number;
254
+ shippingValue: number;
255
+ discountValue: number;
256
+ totalValue: number;
257
+ };
258
+ shipping: {
259
+ orderId: number;
260
+ shippingTableId: number;
261
+ label: string;
262
+ shippingCarrierId: number;
263
+ shippingCarrier: string;
264
+ beginShippingTime: number;
265
+ endShippingTime: number;
266
+ initialDeliveryForecast: null;
267
+ finalDeliveryForecast: null;
268
+ shippingValue: number;
269
+ trackingCode: null | string;
270
+ reverseLogisticsCode: null;
271
+ trackingUrl: null | string;
272
+ schedule: boolean;
273
+ scheduleDay: null;
274
+ scheduleHour: null;
275
+ pickUpDetails: null | PickupPoint;
276
+ } | null;
277
+ discounts: null;
278
+ additions: null;
279
+ items: Array<CustomerOrderItem>;
280
+ payments: Array<CustomerOrderPayment>;
281
+ reserves: null;
282
+ invoice: null | {
283
+ key: string;
284
+ number: string;
285
+ orderId: number;
286
+ serie: null;
287
+ url: string;
288
+ xml: null;
289
+ };
290
+ }>;
291
+ discounts: null | Array<Discount>;
292
+ additions: null;
293
+ }
294
+
295
+ export interface CustomerOrdersResponse {
296
+ registers: Array<CustomerOrderResponse>;
297
+ pagination: Pagination;
298
+ }
299
+
300
+ export interface CustomerOrderItemHistoryResponse {
301
+ id: 466;
302
+ userId: null;
303
+ userName: null;
304
+ userEmail: null;
305
+ origin: 'alteration' | 'order';
306
+ action: 'create-addition';
307
+ createdAt: string;
308
+ before: [];
309
+ after: {
310
+ orderId?: number;
311
+ entity?: 'payment-fee';
312
+ entityId?: number;
313
+ description?: string;
314
+ value?: number;
315
+ type?: 'addition';
316
+ retroactiveDate?: string | null;
317
+ id?: number;
318
+ orderGroupId: number;
319
+ productStorageId?: number;
320
+ orderStatusId?: number;
321
+ };
322
+ }
323
+ export interface CustomerOrderItemHistoriesResponse {
324
+ registers: Array<CustomerOrderItemHistoryResponse>;
325
+ pagination: Pagination;
326
+ }
327
+
328
+ export interface CustomerOrderItem {
329
+ id: number;
330
+ orderId: number;
331
+ productId: number;
332
+ name: string;
333
+ description: string;
334
+ sku: string;
335
+ priceRule: null;
336
+ quantity: number;
337
+ unitValue: number;
338
+ unitAdditionValue: number;
339
+ unitDiscountValue: number;
340
+ subtotalValue: number;
341
+ subtotalAdditionValue: number;
342
+ subtotalDiscountValue: number;
343
+ totalValue: number;
344
+ generateGiftCard: boolean;
345
+ discounts: null;
346
+ additions: null;
347
+ simpleProduct: SimpleProduct;
348
+ }
349
+
350
+ export interface CustomerOrderPayment {
351
+ id: 154;
352
+ orderGroupId: number;
353
+ orderId: null;
354
+ customerCardId: null;
355
+ paymentType: Exclude<PaymentCode, 'multiple-payment'>;
356
+ paymentProof: string;
357
+ paymentExpirationDate: string;
358
+ paymentOptionId: number;
359
+ parentPaymentOptionId: null;
360
+ paymentOptionLabel: string;
361
+ paymentOptionDetail: string;
362
+ integrationName: string;
363
+ transactionId: string;
364
+ currentStatus: 'waiting-payment' | 'paid';
365
+ paymentAntiFraudId: null;
366
+ paymentAntiFraudCredentialId: null;
367
+ antiFraudStatus: null;
368
+ pixQrCode: null | string;
369
+ pixEmv: null | string;
370
+ billetBarCode: null | string;
371
+ billetDigitableLine: null | string;
372
+ billetUrl: null | string;
373
+ cardAutomaticCapture: boolean;
374
+ cardMasked: string | null;
375
+ cardFlag:
376
+ | 'visa'
377
+ | 'master'
378
+ | 'elo'
379
+ | 'americanexpress'
380
+ | 'diners'
381
+ | 'hipercard'
382
+ | 'discover'
383
+ | 'jcb'
384
+ | 'aura'
385
+ | null;
386
+ cardExpiration: string | null;
387
+ value: number;
388
+ installment: number | null;
389
+ installmentValue: number;
390
+ fee: number;
391
+ orderGroup: null;
392
+ logs: Array<null>;
393
+ }
394
+
395
+ export interface AddCustomerToNewsletterRequest {
396
+ email: string;
397
+ name: string;
398
+ }
399
+
400
+ export interface AddCustomerToNewsletterResponse {
401
+ createdAt: string;
402
+ email: string;
403
+ id: number;
404
+ masked: boolean;
405
+ name: string;
406
+ salesChannelId: number;
407
+ }
408
+ export interface CustomerHistory {
409
+ id: number;
410
+ userId: null;
411
+ userName: null;
412
+ userEmail: null;
413
+ origin: 'customer' | 'address' | 'document' | 'password' | 'point-system';
414
+ action:
415
+ | 'create-customer'
416
+ | 'update-customer'
417
+ | 'remove-customer'
418
+ | 'create-address'
419
+ | 'update-address'
420
+ | 'remove-address'
421
+ | 'update-main-address'
422
+ | 'update-document'
423
+ | 'remove-document'
424
+ | 'update-flag'
425
+ | 'manual-point-addition'
426
+ | 'order-point-addition'
427
+ | 'manual-point-remove'
428
+ | 'point-expiration'
429
+ | 'order-point-cancelled'
430
+ | 'order-point-use'
431
+ | 'order-point-available'
432
+ | 'order-point-unavailable'
433
+ | 'order-point-refunded'
434
+ | 'order-point-cunsumed-again';
435
+ createdAt: string;
436
+ before: [] | { id: number };
437
+ after:
438
+ | CustomerResponse
439
+ | { id: number }
440
+ | CustomerAddressResponse
441
+ | { amount: number };
442
+ orderId: null | number;
443
+ }
444
+
445
+ export interface CustomerHistoryResponse {
446
+ registers: Array<CustomerHistory>;
447
+ pagination: Pagination;
448
+ }
@@ -0,0 +1,3 @@
1
+ export type CustomerGender = 'male' | 'female' | 'undefined';
2
+
3
+ export type CustomerOrigin = 'frontend' | 'api' | 'admin';
@@ -0,0 +1,30 @@
1
+ export interface Descriptions {
2
+ id: number;
3
+ salesChannelId: number;
4
+ name: string;
5
+ shortDescription: null | string;
6
+ videoUrl: null | string;
7
+ searchDescription: null | string;
8
+ description: null | string;
9
+ customDescription1: null | string;
10
+ customDescription2: null | string;
11
+ customDescription3: null | string;
12
+ measureTable: null | string;
13
+ seoTitle: null | string;
14
+ seoDescription: null | string;
15
+ seoKeywords: null | string;
16
+ seoCanonical: null | string;
17
+ seoSocialTitle: null | string;
18
+ seoSocialDescription: null | string;
19
+ seoTwitterImageUrl: null | string;
20
+ seoGraphImageUrl: null | string;
21
+ seoGoogleCategoryId: null | number;
22
+ seoIndexOnGoogle: boolean;
23
+ seoGoogleCondition: null | string;
24
+ seoGoogleAgeGroup: null | string;
25
+ seoGoogleGender: null | string;
26
+ productId: null | number;
27
+ productCategoryId: null | number;
28
+ productBrandId: null | number;
29
+ productPageId: null | number;
30
+ }
@@ -0,0 +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
+ }
@@ -0,0 +1,5 @@
1
+ export type DiscountType =
2
+ | 'promotion'
3
+ | 'points'
4
+ | 'coupon'
5
+ | 'customer-wallet';
@@ -0,0 +1 @@
1
+ export type TypeFilter = 'text' | 'enum' | 'bool' | 'array';
@@ -0,0 +1,26 @@
1
+ import type { TypeFilter } from '../..';
2
+
3
+ export interface Filter {
4
+ id: number;
5
+ name: string;
6
+ active: boolean;
7
+ showInListing: boolean;
8
+ showInSpecificationTable: boolean;
9
+ type: TypeFilter;
10
+ values?: Array<FilterValue>;
11
+ }
12
+
13
+ export interface FilterValue {
14
+ id: number;
15
+ name: string;
16
+ image: string;
17
+ originalImage: string;
18
+ color: string;
19
+ order: number;
20
+ value: null | string;
21
+ }
22
+
23
+ export interface PriceFilter {
24
+ min: number | null;
25
+ max: number | null;
26
+ }
@@ -0,0 +1,22 @@
1
+ export type InterestType = 'notify-me' | 'on-request';
2
+
3
+ export interface RequestInterest {
4
+ productId: number;
5
+ origin: InterestType;
6
+ name: string;
7
+ email: string;
8
+ phone: string;
9
+ message: string;
10
+ }
11
+
12
+ export interface ResponseInterest {
13
+ id: number;
14
+ productId: number;
15
+ origin: InterestType;
16
+ name: string;
17
+ email: string;
18
+ phone: string;
19
+ message: string;
20
+ replied: boolean;
21
+ createdAt: string;
22
+ }
@@ -0,0 +1,13 @@
1
+ export interface Media {
2
+ id: number;
3
+ title: string;
4
+ alternativeText: string;
5
+ type: 'image';
6
+ file: string;
7
+ originalFile: string;
8
+ originalSize: number;
9
+ size: number;
10
+ url: null;
11
+ width: number;
12
+ height: number;
13
+ }
@@ -0,0 +1,8 @@
1
+ export type Target = '_self' | '_blank';
2
+
3
+ export type Type =
4
+ | 'personalizado'
5
+ | 'categoria'
6
+ | 'categoriaSecundaria'
7
+ | 'marca'
8
+ | 'pagina';