@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.
- package/.editorconfig +6 -0
- package/.vscode/extensions.json +5 -0
- package/.vscode/settings.json +7 -0
- package/components/Animations/ExpandTransition.ts +89 -0
- package/components/Animations/index.ts +1 -0
- package/components/Themes/CustomTheme.ts +77 -0
- package/components/Themes/index.ts +1 -0
- package/main.ts +16 -0
- package/modules/Api/README.md +469 -0
- package/modules/Api/endpoints/BannerComposable.ts +31 -0
- package/modules/Api/endpoints/BrandComposable.ts +21 -0
- package/modules/Api/endpoints/CartComposable.ts +121 -0
- package/modules/Api/endpoints/CommonComposable.ts +24 -0
- package/modules/Api/endpoints/CouponComposable.ts +18 -0
- package/modules/Api/endpoints/CustomerComposable.ts +255 -0
- package/modules/Api/endpoints/InterestComposable.ts +11 -0
- package/modules/Api/endpoints/LoggoutComposable.ts +8 -0
- package/modules/Api/endpoints/MenuComposable.ts +25 -0
- package/modules/Api/endpoints/PairOfferComposable.ts +14 -0
- package/modules/Api/endpoints/PaymentComposable.ts +14 -0
- package/modules/Api/endpoints/ProductCommentComposable.ts +51 -0
- package/modules/Api/endpoints/ProductQuoteShipment.ts +20 -0
- package/modules/Api/endpoints/PublicComposable.ts +9 -0
- package/modules/Api/endpoints/ReviewComposable.ts +64 -0
- package/modules/Api/endpoints/SearchComposable.ts +27 -0
- package/modules/Api/endpoints/ShowcaseComposable.ts +45 -0
- package/modules/Api/endpoints/TemplateComposable.ts +8 -0
- package/modules/Api/endpoints/ThirdPartyComposable.ts +14 -0
- package/modules/Api/endpoints/UpsellComposable.ts +18 -0
- package/modules/Api/endpoints/UrlComposable.ts +26 -0
- package/modules/Api/endpoints/VariationComposable.ts +36 -0
- package/modules/Api/endpoints/WalletComposable.ts +36 -0
- package/modules/Api/endpoints/ZipcodeComposable.ts +10 -0
- package/modules/Api/index.ts +194 -0
- package/modules/Api/paramsSerializer/encodeWafNormalizer.ts +7 -0
- package/modules/Api/types/context/api-config.types.ts +68 -0
- package/modules/Api/types/context/api-params.types.ts +74 -0
- package/modules/Api/types/endpoints/attribute/attribute.interfaces.ts +42 -0
- package/modules/Api/types/endpoints/banner/banner.interfaces.ts +45 -0
- package/modules/Api/types/endpoints/brand/brand-field.types.ts +3 -0
- package/modules/Api/types/endpoints/brand/brand.interfaces.ts +23 -0
- package/modules/Api/types/endpoints/cart/cart.interfaces.ts +161 -0
- package/modules/Api/types/endpoints/cart/cart.types.ts +27 -0
- package/modules/Api/types/endpoints/common/common.interfaces.ts +21 -0
- package/modules/Api/types/endpoints/context/context.types.ts +1 -0
- package/modules/Api/types/endpoints/country/country.types.ts +7502 -0
- package/modules/Api/types/endpoints/coupon/coupon.interfaces.ts +13 -0
- package/modules/Api/types/endpoints/customer/customer-erros.ts +13 -0
- package/modules/Api/types/endpoints/customer/customer-obsearch.ts +103 -0
- package/modules/Api/types/endpoints/customer/customer.interfaces.ts +448 -0
- package/modules/Api/types/endpoints/customer/customer.types.ts +3 -0
- package/modules/Api/types/endpoints/description/description.interfaces.ts +30 -0
- package/modules/Api/types/endpoints/discounts/discounts.interfaces.ts +9 -0
- package/modules/Api/types/endpoints/discounts/discounts.types.ts +5 -0
- package/modules/Api/types/endpoints/filters/filter.type.ts +1 -0
- package/modules/Api/types/endpoints/filters/filters.interfaces.ts +26 -0
- package/modules/Api/types/endpoints/interest/interest.interfaces.ts +22 -0
- package/modules/Api/types/endpoints/media/media.interfaces.ts +13 -0
- package/modules/Api/types/endpoints/menu/menu.enums.ts +8 -0
- package/modules/Api/types/endpoints/menu/menu.interfaces.ts +26 -0
- package/modules/Api/types/endpoints/order/order.interfaces.ts +63 -0
- package/modules/Api/types/endpoints/page/page.interfaces.ts +15 -0
- package/modules/Api/types/endpoints/pagination/pagination.interfaces.ts +6 -0
- package/modules/Api/types/endpoints/pair-offer/pair-offer.interfaces.ts +19 -0
- package/modules/Api/types/endpoints/payment/payment.interfaces.ts +103 -0
- package/modules/Api/types/endpoints/payment/payment.types.ts +27 -0
- package/modules/Api/types/endpoints/price/price.interfaces.ts +22 -0
- package/modules/Api/types/endpoints/product/product-obsearch.types.ts +63 -0
- package/modules/Api/types/endpoints/product/product.interfaces.ts +109 -0
- package/modules/Api/types/endpoints/product/product.types.ts +3 -0
- package/modules/Api/types/endpoints/product-comment/product-comment-obsearch.types.ts +24 -0
- package/modules/Api/types/endpoints/product-comment/product-comment.interfaces.ts +32 -0
- package/modules/Api/types/endpoints/redirect/redirect.interfaces.ts +7 -0
- package/modules/Api/types/endpoints/review/review-obsearch.types.ts +18 -0
- package/modules/Api/types/endpoints/review/review.interfaces.ts +34 -0
- package/modules/Api/types/endpoints/seal/seal.interfaces.ts +21 -0
- package/modules/Api/types/endpoints/seal/seal.types.ts +3 -0
- package/modules/Api/types/endpoints/search/search.interfaces.ts +11 -0
- package/modules/Api/types/endpoints/seo/seo.interfaces.ts +11 -0
- package/modules/Api/types/endpoints/shipment/shipment.interfaces.ts +137 -0
- package/modules/Api/types/endpoints/showcase/showcase.enums.ts +8 -0
- package/modules/Api/types/endpoints/showcase/showcase.interfaces.ts +10 -0
- package/modules/Api/types/endpoints/simple-product/simple-product.interfaces.ts +15 -0
- package/modules/Api/types/endpoints/storage/storage.interfaces.ts +16 -0
- package/modules/Api/types/endpoints/template/template.interfaces.ts +30 -0
- package/modules/Api/types/endpoints/third-party/oauth.interfaces.ts +6 -0
- package/modules/Api/types/endpoints/upsell/upsell.interfaces.ts +13 -0
- package/modules/Api/types/endpoints/url/url.interfaces.ts +85 -0
- package/modules/Api/types/endpoints/wallet/wallet-obsearch.ts +8 -0
- package/modules/Api/types/endpoints/wallet/wallet.interfaces.ts +57 -0
- package/modules/Api/types/endpoints/zipcode/zipcode.interfaces.ts +23 -0
- package/modules/Api/types/index.ts +459 -0
- package/modules/Api/usePublicApi.ts +68 -0
- package/modules/Tracking/endpoints/BannerComposable.ts +33 -0
- package/modules/Tracking/endpoints/CartComposable.ts +75 -0
- package/modules/Tracking/endpoints/CustomerComposable.ts +68 -0
- package/modules/Tracking/endpoints/ProductQuoteShipment.ts +14 -0
- package/modules/Tracking/endpoints/SearchComposable.ts +32 -0
- package/modules/Tracking/endpoints/ShowcaseComposable.ts +54 -0
- package/modules/Tracking/endpoints/UrlComposable.ts +41 -0
- package/modules/Tracking/endpoints/types.ts +11 -0
- package/modules/Tracking/events/actions/addPaymentInfo.ts +31 -0
- package/modules/Tracking/events/actions/addShippingInfo.ts +27 -0
- package/modules/Tracking/events/actions/addToCart.ts +35 -0
- package/modules/Tracking/events/actions/beginCheckout.ts +28 -0
- package/modules/Tracking/events/actions/customerProfile.ts +36 -0
- package/modules/Tracking/events/actions/generateLead.ts +12 -0
- package/modules/Tracking/events/actions/login.ts +8 -0
- package/modules/Tracking/events/actions/purchase.ts +42 -0
- package/modules/Tracking/events/actions/removeFromCart.ts +52 -0
- package/modules/Tracking/events/actions/search.ts +8 -0
- package/modules/Tracking/events/actions/selectItem.ts +64 -0
- package/modules/Tracking/events/actions/selectPromotion.ts +24 -0
- package/modules/Tracking/events/actions/shippingCalculation.ts +7 -0
- package/modules/Tracking/events/actions/signup.ts +8 -0
- package/modules/Tracking/events/actions/upsertToCart.ts +62 -0
- package/modules/Tracking/events/views/viewCart.ts +28 -0
- package/modules/Tracking/events/views/viewHome.ts +5 -0
- package/modules/Tracking/events/views/viewItem.ts +31 -0
- package/modules/Tracking/events/views/viewItemList.ts +65 -0
- package/modules/Tracking/events/views/viewNotFound.ts +5 -0
- package/modules/Tracking/events/views/viewOther.ts +5 -0
- package/modules/Tracking/events/views/viewPayment.ts +7 -0
- package/modules/Tracking/events/views/viewPromotion.ts +28 -0
- package/modules/Tracking/events/views/viewShipping.ts +7 -0
- package/modules/Tracking/index.ts +84 -0
- package/modules/Tracking/publicApiTracking.ts +36 -0
- package/modules/Tracking/types/actions/add-payment-info.interfaces.ts +12 -0
- package/modules/Tracking/types/actions/add-shipping-info.interfaces.ts +11 -0
- package/modules/Tracking/types/actions/add-to-cart.interfaces.ts +10 -0
- package/modules/Tracking/types/actions/begin-checkout.interfaces.ts +12 -0
- package/modules/Tracking/types/actions/customer-profile.interfaces.ts +19 -0
- package/modules/Tracking/types/actions/file-download.interfaces.ts +4 -0
- package/modules/Tracking/types/actions/generate-lead.interfaces.ts +12 -0
- package/modules/Tracking/types/actions/login.interfaces.ts +4 -0
- package/modules/Tracking/types/actions/purchase.interfaces.ts +18 -0
- package/modules/Tracking/types/actions/remove-from-cart.interfaces.ts +10 -0
- package/modules/Tracking/types/actions/search.interfaces.ts +4 -0
- package/modules/Tracking/types/actions/select-item.interfaces.ts +16 -0
- package/modules/Tracking/types/actions/select-promotion.interfaces.ts +8 -0
- package/modules/Tracking/types/actions/share.interfaces.ts +4 -0
- package/modules/Tracking/types/actions/shipping-calculation.interfaces.ts +3 -0
- package/modules/Tracking/types/actions/signup.interfaces.ts +4 -0
- package/modules/Tracking/types/event.types.ts +54 -0
- package/modules/Tracking/types/index.ts +37 -0
- package/modules/Tracking/types/item.interfaces.ts +30 -0
- package/modules/Tracking/types/views/view-cart.interfaces.ts +11 -0
- package/modules/Tracking/types/views/view-home.interfaces.ts +3 -0
- package/modules/Tracking/types/views/view-item-list.interfaces.ts +11 -0
- package/modules/Tracking/types/views/view-item.interfaces.ts +15 -0
- package/modules/Tracking/types/views/view-not-found.interfaces.ts +3 -0
- package/modules/Tracking/types/views/view-other.interfaces.ts +3 -0
- package/modules/Tracking/types/views/view-payment.interfaces.ts +3 -0
- package/modules/Tracking/types/views/view-promotion.interfaces.ts +8 -0
- package/modules/Tracking/types/views/view-shipping.interfaces.ts +3 -0
- package/modules/Tracking/utils/cart.ts +100 -0
- package/modules/Tracking/utils/pushDatalayer.ts +7 -0
- package/package.json +27 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface Menu {
|
|
2
|
+
id: number;
|
|
3
|
+
code: string;
|
|
4
|
+
name: string;
|
|
5
|
+
items: Array<MenuItem>;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface MenuItem {
|
|
9
|
+
id: number;
|
|
10
|
+
templateMenuItemId: number;
|
|
11
|
+
active: boolean;
|
|
12
|
+
title: string;
|
|
13
|
+
type: 'custom' | 'product' | 'category' | 'brand' | 'page';
|
|
14
|
+
productId: number | null;
|
|
15
|
+
productCategoryId: number | null;
|
|
16
|
+
productBrandId: number | null;
|
|
17
|
+
productPageId: number | null;
|
|
18
|
+
image1: string;
|
|
19
|
+
image2: string;
|
|
20
|
+
highlight: boolean;
|
|
21
|
+
order: number;
|
|
22
|
+
url: string;
|
|
23
|
+
target: '_blank' | '_self' | '_parent' | '_top';
|
|
24
|
+
bannerGroups: Array<string>;
|
|
25
|
+
items: Array<MenuItem>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
Media,
|
|
3
|
+
ProductType,
|
|
4
|
+
Storage,
|
|
5
|
+
ShippingOption,
|
|
6
|
+
CurrentAttribute,
|
|
7
|
+
} from '../..';
|
|
8
|
+
|
|
9
|
+
export interface Order {
|
|
10
|
+
orderId: number;
|
|
11
|
+
quoteId: string;
|
|
12
|
+
distance: number;
|
|
13
|
+
subtotalValue: number;
|
|
14
|
+
shippingValue: number;
|
|
15
|
+
discountValue: number;
|
|
16
|
+
additionValue: number;
|
|
17
|
+
totalValue: number;
|
|
18
|
+
service: boolean;
|
|
19
|
+
storage: null | Storage;
|
|
20
|
+
items: Array<OrderItem>;
|
|
21
|
+
additions: Array<never>;
|
|
22
|
+
discounts: Array<OrderDiscount>;
|
|
23
|
+
shippingOptions: Array<ShippingOption>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface OrderItem {
|
|
27
|
+
itemId: number;
|
|
28
|
+
upsellId: null | number;
|
|
29
|
+
productPairOfferId: null | number;
|
|
30
|
+
productPriceRuleId: number;
|
|
31
|
+
productPriceRuleName: 'Original';
|
|
32
|
+
quantity: number;
|
|
33
|
+
code: null | string;
|
|
34
|
+
unitValue: number;
|
|
35
|
+
unitAdditionValue: number;
|
|
36
|
+
unitDiscountValue: number;
|
|
37
|
+
subtotalValue: number;
|
|
38
|
+
subtotalAdditionValue: number;
|
|
39
|
+
subtotalDiscountValue: number;
|
|
40
|
+
totalValue: number;
|
|
41
|
+
product: {
|
|
42
|
+
active: boolean;
|
|
43
|
+
brandId: number;
|
|
44
|
+
productId: number;
|
|
45
|
+
type: ProductType;
|
|
46
|
+
sku: string;
|
|
47
|
+
name: string;
|
|
48
|
+
url: null | string;
|
|
49
|
+
comparisonPrice: number;
|
|
50
|
+
stock: number;
|
|
51
|
+
medias: null | Array<Media>;
|
|
52
|
+
combination: Array<number>;
|
|
53
|
+
currentAttributes: Array<CurrentAttribute>;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface OrderDiscount {
|
|
58
|
+
discountId: number;
|
|
59
|
+
discountMainCode: string;
|
|
60
|
+
discountTitle: string;
|
|
61
|
+
discountType: 'coupon';
|
|
62
|
+
discountValue: number;
|
|
63
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Descriptions } from '../..';
|
|
2
|
+
|
|
3
|
+
export interface Page {
|
|
4
|
+
id: number;
|
|
5
|
+
code: string;
|
|
6
|
+
name: string;
|
|
7
|
+
active: boolean;
|
|
8
|
+
bannerGroups: Array<string>;
|
|
9
|
+
url: string;
|
|
10
|
+
urls: Array<string>;
|
|
11
|
+
linkedTradePolicies: null;
|
|
12
|
+
description: Descriptions;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
updatedAt: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PriceRule, Product } from '../..';
|
|
2
|
+
|
|
3
|
+
export interface PairOffer {
|
|
4
|
+
productId1: number;
|
|
5
|
+
productId2: number;
|
|
6
|
+
target: 'both' | 'product-1' | 'product-2';
|
|
7
|
+
active: boolean;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
priceRule: PriceRule;
|
|
10
|
+
price: {
|
|
11
|
+
comparisonPrice: number;
|
|
12
|
+
discountValue: number;
|
|
13
|
+
salePrice: number;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
products: Array<Product>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type PairOfferResponse = Array<PairOffer>;
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -0,0 +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';
|
|
@@ -0,0 +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>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export type ProductFields =
|
|
2
|
+
| 'brand'
|
|
3
|
+
| 'flags'
|
|
4
|
+
| 'mainUrl'
|
|
5
|
+
| 'secondaryUrls'
|
|
6
|
+
| 'description'
|
|
7
|
+
| 'indicatedProducts'
|
|
8
|
+
| 'relatedProducts'
|
|
9
|
+
| 'tax'
|
|
10
|
+
| 'filters'
|
|
11
|
+
| 'stockByStorage'
|
|
12
|
+
| 'stock'
|
|
13
|
+
| 'seals'
|
|
14
|
+
| 'mainCategory'
|
|
15
|
+
| 'categories'
|
|
16
|
+
| 'categoryBreadcrumb'
|
|
17
|
+
| 'dimension'
|
|
18
|
+
| 'variation'
|
|
19
|
+
| 'media'
|
|
20
|
+
| 'price'
|
|
21
|
+
| 'bannerGroups'
|
|
22
|
+
| 'review'
|
|
23
|
+
| 'status';
|
|
24
|
+
|
|
25
|
+
export type ProductConditionFields =
|
|
26
|
+
| 'id'
|
|
27
|
+
| 'brandId'
|
|
28
|
+
| 'active'
|
|
29
|
+
| 'type'
|
|
30
|
+
| 'sku'
|
|
31
|
+
| 'url'
|
|
32
|
+
| 'showInSite'
|
|
33
|
+
| 'saleWithoutStock'
|
|
34
|
+
| 'category'
|
|
35
|
+
| 'mainCategory'
|
|
36
|
+
| 'salePrice'
|
|
37
|
+
| 'comparisonPrice'
|
|
38
|
+
| 'priceDifference'
|
|
39
|
+
| 'filter'
|
|
40
|
+
| 'stock'
|
|
41
|
+
| 'stockInStorage'
|
|
42
|
+
| 'name'
|
|
43
|
+
| 'shortDescription'
|
|
44
|
+
| 'description'
|
|
45
|
+
| 'searchDescription'
|
|
46
|
+
| 'seal'
|
|
47
|
+
| 'tradePolicyId'
|
|
48
|
+
| 'productAttributeValueId'
|
|
49
|
+
| 'exclusive'
|
|
50
|
+
| 'ean'
|
|
51
|
+
| 'averageRating'
|
|
52
|
+
| 'quantityRating';
|
|
53
|
+
|
|
54
|
+
export type ProductSortFields =
|
|
55
|
+
| 'id'
|
|
56
|
+
| 'priority'
|
|
57
|
+
| 'sku'
|
|
58
|
+
| 'relevance'
|
|
59
|
+
| 'stock'
|
|
60
|
+
| 'stockByStorage'
|
|
61
|
+
| 'name'
|
|
62
|
+
| 'price'
|
|
63
|
+
| 'hasStock';
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
Descriptions,
|
|
3
|
+
Seals,
|
|
4
|
+
Filter,
|
|
5
|
+
Media,
|
|
6
|
+
ProductStatus,
|
|
7
|
+
ProductType,
|
|
8
|
+
Variations,
|
|
9
|
+
BrandItem,
|
|
10
|
+
CurrentAttribute,
|
|
11
|
+
} from '../..';
|
|
12
|
+
|
|
13
|
+
export interface Product {
|
|
14
|
+
id: number;
|
|
15
|
+
type: ProductType;
|
|
16
|
+
sku: string;
|
|
17
|
+
name: string;
|
|
18
|
+
priority: number;
|
|
19
|
+
basePrice: number;
|
|
20
|
+
active: boolean;
|
|
21
|
+
bannerGroups: Array<never>;
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
url: string;
|
|
24
|
+
urls: [];
|
|
25
|
+
currentAttributes: Array<CurrentAttribute>
|
|
26
|
+
brand: null | BrandItem;
|
|
27
|
+
mainCategory: null | ProductCategory;
|
|
28
|
+
categories: null | Array<ProductCategory>;
|
|
29
|
+
categoryBreadcrumb: null | Array<ProductCategory>;
|
|
30
|
+
description: null | Descriptions;
|
|
31
|
+
dimensions: null | ProductDimension;
|
|
32
|
+
filters: null | Array<Filter>;
|
|
33
|
+
flags: null | ProductFlags;
|
|
34
|
+
indicatedProducts: null;
|
|
35
|
+
linkedTradePolicies: null;
|
|
36
|
+
medias: null | Array<Media>;
|
|
37
|
+
originalPrice: null;
|
|
38
|
+
parentProductId: null | number;
|
|
39
|
+
price: null | ProductPrice;
|
|
40
|
+
priceRules: null;
|
|
41
|
+
relatedProducts: null;
|
|
42
|
+
seals: null | Seals;
|
|
43
|
+
stock: null | Stock;
|
|
44
|
+
stocks: null;
|
|
45
|
+
status: null | ProductStatus;
|
|
46
|
+
tax: null;
|
|
47
|
+
variations: null | Variations;
|
|
48
|
+
review: null | {
|
|
49
|
+
productId: number,
|
|
50
|
+
averageRating: number,
|
|
51
|
+
quantityRating: number
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
combination: Array<never>;
|
|
55
|
+
createdAt: string;
|
|
56
|
+
isGiftCard: boolean;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface ProductCategory {
|
|
60
|
+
id: number;
|
|
61
|
+
name: string;
|
|
62
|
+
url: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface ProductPrice {
|
|
66
|
+
comparisonPrice: number;
|
|
67
|
+
salePrice: number;
|
|
68
|
+
markup: number;
|
|
69
|
+
ruleId: number;
|
|
70
|
+
ruleTrigger: string;
|
|
71
|
+
ruleName: string;
|
|
72
|
+
priceWithDiscount: number;
|
|
73
|
+
availableForSale: boolean;
|
|
74
|
+
installments: Array<ProductInstallment>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface ProductInstallment {
|
|
78
|
+
fee: number;
|
|
79
|
+
feeTotalValue: number;
|
|
80
|
+
installment: number;
|
|
81
|
+
installmentValue: number;
|
|
82
|
+
totalValue: number;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface ProductDimension {
|
|
86
|
+
shippingCargoTypeId: null | number;
|
|
87
|
+
additionalTime: null | number;
|
|
88
|
+
width: number;
|
|
89
|
+
height: number;
|
|
90
|
+
length: number;
|
|
91
|
+
weight: number;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface ProductFlags {
|
|
95
|
+
subscription: boolean;
|
|
96
|
+
service: boolean;
|
|
97
|
+
pickUp: boolean;
|
|
98
|
+
showInSite: boolean;
|
|
99
|
+
saleWithoutStock: boolean;
|
|
100
|
+
minimumStock: number;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface Stock {
|
|
104
|
+
productId: number;
|
|
105
|
+
productStorageId: number;
|
|
106
|
+
availableStock: number;
|
|
107
|
+
reservedStock: number;
|
|
108
|
+
updatedAt?: string;
|
|
109
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type ProductCommentFields = '';
|
|
2
|
+
|
|
3
|
+
export type ProductCommentConditionFields =
|
|
4
|
+
| 'parentCommentId'
|
|
5
|
+
| 'productId'
|
|
6
|
+
| 'userId'
|
|
7
|
+
| 'userName'
|
|
8
|
+
| 'userEmail'
|
|
9
|
+
| 'customerId'
|
|
10
|
+
| 'customerName'
|
|
11
|
+
| 'customerEmail'
|
|
12
|
+
| 'replyByUser'
|
|
13
|
+
| 'active'
|
|
14
|
+
| 'createdAt';
|
|
15
|
+
|
|
16
|
+
export type ProductCommentSortFields =
|
|
17
|
+
| 'productId'
|
|
18
|
+
| 'userId'
|
|
19
|
+
| 'userName'
|
|
20
|
+
| 'userEmail'
|
|
21
|
+
| 'customerId'
|
|
22
|
+
| 'customerName'
|
|
23
|
+
| 'customerEmail'
|
|
24
|
+
| 'createdAt';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Pagination, SimpleProduct } from '../..';
|
|
2
|
+
|
|
3
|
+
export interface ProductComment {
|
|
4
|
+
id: number;
|
|
5
|
+
productId: number;
|
|
6
|
+
parentCommentId: number;
|
|
7
|
+
customerId: number;
|
|
8
|
+
customerName: string;
|
|
9
|
+
customerEmail: string;
|
|
10
|
+
userId: number;
|
|
11
|
+
userName: string;
|
|
12
|
+
userEmail: string;
|
|
13
|
+
message: string;
|
|
14
|
+
replyByUser: boolean;
|
|
15
|
+
active: boolean;
|
|
16
|
+
totalReplies: number;
|
|
17
|
+
product: SimpleProduct | null;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
updateAt: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface CreateProductComment {
|
|
23
|
+
customerName: string;
|
|
24
|
+
customerEmail: string;
|
|
25
|
+
parentCommentId: number | null;
|
|
26
|
+
message: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface ProductCommentsResponse {
|
|
30
|
+
registers: Array<ProductComment>;
|
|
31
|
+
pagination: Pagination;
|
|
32
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type ReviewFields = 'products' | 'medias';
|
|
2
|
+
|
|
3
|
+
export type ReviewConditionFields =
|
|
4
|
+
| 'recommended'
|
|
5
|
+
| 'createdAt'
|
|
6
|
+
| 'active'
|
|
7
|
+
| 'score'
|
|
8
|
+
| 'productId'
|
|
9
|
+
| 'salesChannelId'
|
|
10
|
+
| 'customerId';
|
|
11
|
+
|
|
12
|
+
export type ReviewSortFields =
|
|
13
|
+
| 'id'
|
|
14
|
+
| 'createdAt'
|
|
15
|
+
| 'score'
|
|
16
|
+
| 'productId'
|
|
17
|
+
| 'salesChannelId'
|
|
18
|
+
| 'customerId';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Pagination, SimpleProduct } from '../..';
|
|
2
|
+
|
|
3
|
+
export interface ProductReview {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
email: string;
|
|
7
|
+
comment: string;
|
|
8
|
+
recommended: boolean;
|
|
9
|
+
score: number;
|
|
10
|
+
active: boolean;
|
|
11
|
+
masked: boolean;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
updatedAt: string;
|
|
14
|
+
productId: number;
|
|
15
|
+
customerId: number;
|
|
16
|
+
medias: null | Array<{
|
|
17
|
+
reviewId: number;
|
|
18
|
+
mediaId: number;
|
|
19
|
+
image: string;
|
|
20
|
+
createdAt: string;
|
|
21
|
+
}>;
|
|
22
|
+
product: null | SimpleProduct;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface ProductReviewResponse {
|
|
26
|
+
registers: Array<ProductReview>;
|
|
27
|
+
pagination: Pagination;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface ProductReviewRequest {
|
|
31
|
+
comment: string;
|
|
32
|
+
recommended: boolean;
|
|
33
|
+
score: number;
|
|
34
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface Seal {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
active: boolean;
|
|
6
|
+
textColor: string;
|
|
7
|
+
sealColor: string;
|
|
8
|
+
image: string | null;
|
|
9
|
+
originalImage: string | null;
|
|
10
|
+
setting: SealSetting;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface SealSetting {
|
|
15
|
+
horizontalPosition: 'left' | 'center' | 'right';
|
|
16
|
+
id: number;
|
|
17
|
+
proportionInProductDetail: number;
|
|
18
|
+
proportionInProductShowcase: number;
|
|
19
|
+
scheduling: null;
|
|
20
|
+
verticalPosition: 'top' | 'mid' | 'bottom';
|
|
21
|
+
}
|