@artisan-commerce/types 0.14.0-canary.2 → 0.14.0-canary.21
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/CHANGELOG.md +167 -0
- package/dist/bundle.d.ts +2945 -0
- package/package.json +18 -12
- package/build/index.d.ts +0 -26
- package/build/index.js +0 -40
- package/build/index.js.map +0 -1
- package/build/types/account.types.d.ts +0 -17
- package/build/types/account.types.js +0 -4
- package/build/types/account.types.js.map +0 -1
- package/build/types/app.types.d.ts +0 -153
- package/build/types/app.types.js +0 -4
- package/build/types/app.types.js.map +0 -1
- package/build/types/artisnDB.types.d.ts +0 -29
- package/build/types/artisnDB.types.js +0 -4
- package/build/types/artisnDB.types.js.map +0 -1
- package/build/types/banner.types.d.ts +0 -97
- package/build/types/banner.types.js +0 -4
- package/build/types/banner.types.js.map +0 -1
- package/build/types/billingData.types.d.ts +0 -39
- package/build/types/billingData.types.js +0 -4
- package/build/types/billingData.types.js.map +0 -1
- package/build/types/catalogue.types.d.ts +0 -16
- package/build/types/catalogue.types.js +0 -4
- package/build/types/catalogue.types.js.map +0 -1
- package/build/types/category.types.d.ts +0 -33
- package/build/types/category.types.js +0 -4
- package/build/types/category.types.js.map +0 -1
- package/build/types/common.types.d.ts +0 -36
- package/build/types/common.types.js +0 -4
- package/build/types/common.types.js.map +0 -1
- package/build/types/country.types.d.ts +0 -51
- package/build/types/country.types.js +0 -4
- package/build/types/country.types.js.map +0 -1
- package/build/types/coupon.types.d.ts +0 -112
- package/build/types/coupon.types.js +0 -4
- package/build/types/coupon.types.js.map +0 -1
- package/build/types/currency.types.d.ts +0 -7
- package/build/types/currency.types.js +0 -4
- package/build/types/currency.types.js.map +0 -1
- package/build/types/fulfillment.types.d.ts +0 -218
- package/build/types/fulfillment.types.js +0 -4
- package/build/types/fulfillment.types.js.map +0 -1
- package/build/types/http.types.d.ts +0 -64
- package/build/types/http.types.js +0 -4
- package/build/types/http.types.js.map +0 -1
- package/build/types/image.types.d.ts +0 -82
- package/build/types/image.types.js +0 -4
- package/build/types/image.types.js.map +0 -1
- package/build/types/livingPlace.types.d.ts +0 -92
- package/build/types/livingPlace.types.js +0 -4
- package/build/types/livingPlace.types.js.map +0 -1
- package/build/types/notification.types.d.ts +0 -21
- package/build/types/notification.types.js +0 -4
- package/build/types/notification.types.js.map +0 -1
- package/build/types/order.types.d.ts +0 -157
- package/build/types/order.types.js +0 -3
- package/build/types/order.types.js.map +0 -1
- package/build/types/payment.types.d.ts +0 -97
- package/build/types/payment.types.js +0 -4
- package/build/types/payment.types.js.map +0 -1
- package/build/types/product.types.d.ts +0 -299
- package/build/types/product.types.js +0 -4
- package/build/types/product.types.js.map +0 -1
- package/build/types/settings.types.d.ts +0 -23
- package/build/types/settings.types.js +0 -4
- package/build/types/settings.types.js.map +0 -1
- package/build/types/shippingAddress.types.d.ts +0 -73
- package/build/types/shippingAddress.types.js +0 -4
- package/build/types/shippingAddress.types.js.map +0 -1
- package/build/types/shippingCost.types.d.ts +0 -54
- package/build/types/shippingCost.types.js +0 -4
- package/build/types/shippingCost.types.js.map +0 -1
- package/build/types/shoppingCart.types.d.ts +0 -124
- package/build/types/shoppingCart.types.js +0 -4
- package/build/types/shoppingCart.types.js.map +0 -1
- package/build/types/store.types.d.ts +0 -198
- package/build/types/store.types.js +0 -4
- package/build/types/store.types.js.map +0 -1
- package/build/types/user.types.d.ts +0 -114
- package/build/types/user.types.js +0 -4
- package/build/types/user.types.js.map +0 -1
- package/build/types/vendor.types.d.ts +0 -23
- package/build/types/vendor.types.js +0 -3
- package/build/types/vendor.types.js.map +0 -1
- package/build/vendors.d.ts +0 -1
- package/build/vendors.js +0 -4
- package/build/vendors.js.map +0 -1
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Notification object.
|
|
3
|
-
*
|
|
4
|
-
* @interface Notification
|
|
5
|
-
* @since 0.5.15
|
|
6
|
-
*/
|
|
7
|
-
export interface Notification {
|
|
8
|
-
/** Notification unique identifier */
|
|
9
|
-
id: number;
|
|
10
|
-
/** Notification title */
|
|
11
|
-
title: string;
|
|
12
|
-
/** Notification description */
|
|
13
|
-
description: string;
|
|
14
|
-
/**
|
|
15
|
-
* Whether or not the notification was read. Purposefully
|
|
16
|
-
* has a string type.
|
|
17
|
-
*/
|
|
18
|
-
read: string;
|
|
19
|
-
/** Notification creation date */
|
|
20
|
-
creationDate: string;
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notification.types.js","sourceRoot":"","sources":["../../src/types/notification.types.ts"],"names":[],"mappings":";AAAA,iCAAiC"}
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { BillTotalCategory } from "./shoppingCart.types";
|
|
2
|
-
import { ShippingAddress } from "./shippingAddress.types";
|
|
3
|
-
import { BillingData } from "./billingData.types";
|
|
4
|
-
/**
|
|
5
|
-
* Representation of common properties of the order.
|
|
6
|
-
*
|
|
7
|
-
* @interface BaseOrder
|
|
8
|
-
* @since 0.5.15
|
|
9
|
-
*/
|
|
10
|
-
export interface BaseOrder {
|
|
11
|
-
/** Order unique identifier */
|
|
12
|
-
id: number;
|
|
13
|
-
/** Order additional info */
|
|
14
|
-
additionalInfo: any[];
|
|
15
|
-
/** Order additional messages */
|
|
16
|
-
additionalMessage: string | null;
|
|
17
|
-
/** Order allocation */
|
|
18
|
-
allocation: string;
|
|
19
|
-
/** Channel unique identifier */
|
|
20
|
-
channelId: number;
|
|
21
|
-
/** Order date, e.g.: `02 Aug 2021` */
|
|
22
|
-
orderDate: string;
|
|
23
|
-
/** Order time, e.g.: `17:00 am` */
|
|
24
|
-
orderTime: string;
|
|
25
|
-
/** Pick up date, e.g.: `01 Aug 2021` */
|
|
26
|
-
pickupDate: string | null;
|
|
27
|
-
/** Pick up time, e.g.: `09:00 am` */
|
|
28
|
-
pickupTime: string | null;
|
|
29
|
-
/** Order sequence id */
|
|
30
|
-
seq_id: string;
|
|
31
|
-
/** Shopping cart associated with the order, see {@link OrderShoppingCart} */
|
|
32
|
-
shoppingCart: OrderShoppingCart;
|
|
33
|
-
/** Order step, see {@link OrderStep} */
|
|
34
|
-
step: OrderStep;
|
|
35
|
-
/** Step category */
|
|
36
|
-
stepCategory: string;
|
|
37
|
-
/** Step code */
|
|
38
|
-
stepCode: string;
|
|
39
|
-
/** Step unique identifier */
|
|
40
|
-
stepId: number;
|
|
41
|
-
/** Step name */
|
|
42
|
-
stepName: string;
|
|
43
|
-
/** Order transaction unique identifier */
|
|
44
|
-
transactionId: number | null;
|
|
45
|
-
/** Vendor unique identifier */
|
|
46
|
-
vendorId: number;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* The shopping cart associated with the order.
|
|
50
|
-
*
|
|
51
|
-
* @interface OrderShoppingCart
|
|
52
|
-
* @since 0.5.15
|
|
53
|
-
*/
|
|
54
|
-
export interface OrderShoppingCart {
|
|
55
|
-
/** Order bill total category, see {@link BillTotalCategory} */
|
|
56
|
-
billTotal: BillTotalCategory;
|
|
57
|
-
/**
|
|
58
|
-
* An array of the order paid payment methods,
|
|
59
|
-
* see {@link OrderPaidPaymentMethod}
|
|
60
|
-
*/
|
|
61
|
-
paidPaymentMethods: OrderPaidPaymentMethod[];
|
|
62
|
-
/** An array of order stores, see {@link OrderStore} */
|
|
63
|
-
stores: OrderStore[];
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Store associated with the order.
|
|
67
|
-
*
|
|
68
|
-
* @interface OrderStore
|
|
69
|
-
* @since 0.5.15
|
|
70
|
-
*/
|
|
71
|
-
export interface OrderStore {
|
|
72
|
-
/**
|
|
73
|
-
* An array of products associated with the order,
|
|
74
|
-
* see {@link OrderProduct}
|
|
75
|
-
*/
|
|
76
|
-
products: OrderProduct[];
|
|
77
|
-
/** Store name */
|
|
78
|
-
storeName: string;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Product associated with the order.
|
|
82
|
-
*
|
|
83
|
-
* @interface OrderProduct
|
|
84
|
-
* @since 0.5.15
|
|
85
|
-
*/
|
|
86
|
-
export interface OrderProduct {
|
|
87
|
-
/** Product unique identifier */
|
|
88
|
-
productId: number;
|
|
89
|
-
/** Product name */
|
|
90
|
-
productName: string;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Paid payment methods associated with the order.
|
|
94
|
-
*
|
|
95
|
-
* @interface OrderPaidPaymentMethod
|
|
96
|
-
* @since 0.5.15
|
|
97
|
-
*/
|
|
98
|
-
export interface OrderPaidPaymentMethod {
|
|
99
|
-
/** Order paid payment methods */
|
|
100
|
-
payment_method_name: string;
|
|
101
|
-
/** Order last retry, see {@link OrderLastRetry} */
|
|
102
|
-
lastRetry: OrderLastRetry;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* The last retry of the order.
|
|
106
|
-
*
|
|
107
|
-
* @interface OrderLastRetry
|
|
108
|
-
* @since 0.5.15
|
|
109
|
-
*/
|
|
110
|
-
export interface OrderLastRetry {
|
|
111
|
-
/** Order last retry step */
|
|
112
|
-
step: OrderStep;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* The step where the order is located.
|
|
116
|
-
*
|
|
117
|
-
* @interface OrderStep
|
|
118
|
-
* @since 0.5.15
|
|
119
|
-
*/
|
|
120
|
-
export interface OrderStep {
|
|
121
|
-
/** Step title to use on front end */
|
|
122
|
-
title_frontend: string;
|
|
123
|
-
/** Step description to use on front end */
|
|
124
|
-
description_frontend: string;
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* The details of the order.
|
|
128
|
-
*
|
|
129
|
-
* @interface OrderDetails
|
|
130
|
-
* @since 0.5.15
|
|
131
|
-
* @extends {{@link BaseOrder}
|
|
132
|
-
*/
|
|
133
|
-
export interface OrderDetails extends BaseOrder {
|
|
134
|
-
/** Order details' shipping address */
|
|
135
|
-
shippingAddress: ShippingAddress;
|
|
136
|
-
/** Order details' shipping cost, see {@link OrderDetailShippingCost} */
|
|
137
|
-
shippingCost: OrderDetailShippingCost;
|
|
138
|
-
/** Order details' billing data */
|
|
139
|
-
billingData: BillingData;
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* The shipping cost associated with the order.
|
|
143
|
-
*
|
|
144
|
-
* @interface OrderDetailShippingCost
|
|
145
|
-
* @since 0.5.15
|
|
146
|
-
*/
|
|
147
|
-
export interface OrderDetailShippingCost {
|
|
148
|
-
/** Shipping cost net price */
|
|
149
|
-
net_price: number;
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Representation of a Commerce Order.
|
|
153
|
-
*
|
|
154
|
-
* @typedef Order
|
|
155
|
-
* @since 0.5.15
|
|
156
|
-
*/
|
|
157
|
-
export declare type Order = BaseOrder | OrderDetails;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"order.types.js","sourceRoot":"","sources":["../../src/types/order.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Basic payment method object.
|
|
3
|
-
*
|
|
4
|
-
* @interface BasePaymentMethod
|
|
5
|
-
* @since 0.5.14
|
|
6
|
-
*/
|
|
7
|
-
export interface BasePaymentMethod {
|
|
8
|
-
/** Payment method's id */
|
|
9
|
-
id: number;
|
|
10
|
-
/** Payment method's created date */
|
|
11
|
-
created_at: string | null;
|
|
12
|
-
/** Payment method's updated date */
|
|
13
|
-
updated_at: string | null;
|
|
14
|
-
/** Payment method's deleted date */
|
|
15
|
-
deleted_at: string | null;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Representation of a Commerce Payment method.
|
|
19
|
-
*
|
|
20
|
-
* @interface PaymentMethod
|
|
21
|
-
* @since 0.5.14
|
|
22
|
-
* @extends {{@link BasePaymentMethod}
|
|
23
|
-
*/
|
|
24
|
-
export interface PaymentMethod extends BasePaymentMethod {
|
|
25
|
-
/** Payment method's name, see {@link PaymentMethodName} */
|
|
26
|
-
name: PaymentMethodName;
|
|
27
|
-
/** Payment method image's url, commonly used to save image cards */
|
|
28
|
-
image_url: string;
|
|
29
|
-
/** Whether or not the payment method is default */
|
|
30
|
-
default: boolean;
|
|
31
|
-
/** Payment method's external id */
|
|
32
|
-
external_id: string | null;
|
|
33
|
-
/** Payment method's external code */
|
|
34
|
-
external_code: number;
|
|
35
|
-
/** Payment method's parent id */
|
|
36
|
-
parent_id: string | null;
|
|
37
|
-
/** Payment method cards' allowed brands, see {@link CreditCardBrand} */
|
|
38
|
-
methods: CreditCardBrand[];
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Representation of a credit card brand.
|
|
42
|
-
*
|
|
43
|
-
* @interface CreditCardBrand
|
|
44
|
-
* @since 0.5.14
|
|
45
|
-
* @extends {{@link PaymentMethod}
|
|
46
|
-
*/
|
|
47
|
-
export interface CreditCardBrand extends PaymentMethod {
|
|
48
|
-
/** Payment method cards' allowed brands, see {@link CreditCardMappings}*/
|
|
49
|
-
cc_brands: CreditCardMapping[];
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Representation of a credit card brand.
|
|
53
|
-
*
|
|
54
|
-
* @interface CreditCardMapping
|
|
55
|
-
* @since 0.5.14
|
|
56
|
-
* @extends {{@link BasePaymentMethod}
|
|
57
|
-
*/
|
|
58
|
-
export interface CreditCardMapping extends BasePaymentMethod {
|
|
59
|
-
/** Credit card mapping unique identifier */
|
|
60
|
-
id: number;
|
|
61
|
-
/** Credit card mapping name, see {@link CardName} */
|
|
62
|
-
name: CardName;
|
|
63
|
-
/** Payment method image's url, commonly used to save image cards */
|
|
64
|
-
image_url: string;
|
|
65
|
-
/** Mapping of credit cards */
|
|
66
|
-
cc_brands_mapping: unknown[];
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Payment method common names.
|
|
70
|
-
*
|
|
71
|
-
* @typedef PaymentMethodName
|
|
72
|
-
* @since 0.5.14
|
|
73
|
-
*/
|
|
74
|
-
export declare type PaymentMethodName = "CREDIT_CARD" | "CASH";
|
|
75
|
-
/**
|
|
76
|
-
* Cards common names.
|
|
77
|
-
*
|
|
78
|
-
* @typedef CardName
|
|
79
|
-
* @since 0.5.14
|
|
80
|
-
*/
|
|
81
|
-
export declare type CardName = "Diners" | "Discover" | "American Express" | "Visa" | "MasterCard";
|
|
82
|
-
/**
|
|
83
|
-
* Representation of a card inscription.
|
|
84
|
-
*
|
|
85
|
-
* @interface CardInscription
|
|
86
|
-
* @since 0.5.15
|
|
87
|
-
*/
|
|
88
|
-
export interface CardInscription {
|
|
89
|
-
id: number;
|
|
90
|
-
uid: string;
|
|
91
|
-
number: string;
|
|
92
|
-
type: string;
|
|
93
|
-
authCode?: string;
|
|
94
|
-
bin: string;
|
|
95
|
-
paymentToken: string;
|
|
96
|
-
createdAt?: string;
|
|
97
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"payment.types.js","sourceRoot":"","sources":["../../src/types/payment.types.ts"],"names":[],"mappings":";AAAA,+BAA+B"}
|
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
import { BaseWeekDay } from "./common.types";
|
|
2
|
-
import { CDNImage } from "./image.types";
|
|
3
|
-
import { Alert } from "./shoppingCart.types";
|
|
4
|
-
/**
|
|
5
|
-
* Representation of a Commerce Product.
|
|
6
|
-
*
|
|
7
|
-
* @typedef Product
|
|
8
|
-
* @since 0.5.14
|
|
9
|
-
*/
|
|
10
|
-
export declare type Product = BaseProduct | ProductDetails | CartProduct;
|
|
11
|
-
/**
|
|
12
|
-
* Base product attributes.
|
|
13
|
-
*
|
|
14
|
-
* @interface BaseProduct
|
|
15
|
-
* @since 0.5.14
|
|
16
|
-
*/
|
|
17
|
-
export interface BaseProduct {
|
|
18
|
-
/** Product unique identifier */
|
|
19
|
-
productId: string;
|
|
20
|
-
/** The name of the product */
|
|
21
|
-
name: string;
|
|
22
|
-
/** The description of the product */
|
|
23
|
-
description: string;
|
|
24
|
-
/** The type of the product, see {@link ProductType} */
|
|
25
|
-
type: ProductType;
|
|
26
|
-
/** The cover url of the product */
|
|
27
|
-
coverUrl: string;
|
|
28
|
-
/** Product prices, see {@link ProductPrices} */
|
|
29
|
-
prices: ProductPrices;
|
|
30
|
-
/** Indicates if a product can be added directly to cart */
|
|
31
|
-
addDirectlyToCart: boolean;
|
|
32
|
-
/** Indicates if a product is out of service */
|
|
33
|
-
outOfService: boolean;
|
|
34
|
-
/** Indicates if a product is out of stock */
|
|
35
|
-
outOfStock: boolean;
|
|
36
|
-
/** The stock of the product */
|
|
37
|
-
stock: number;
|
|
38
|
-
/** The measure of the product */
|
|
39
|
-
measure: string;
|
|
40
|
-
/** Product attributes, see {@link ProductAttributes} */
|
|
41
|
-
attributes: ProductAttributes;
|
|
42
|
-
/** The suggested price of the product */
|
|
43
|
-
suggestedPrice: string;
|
|
44
|
-
/** Indicates if a product is available */
|
|
45
|
-
available: boolean;
|
|
46
|
-
/** Array of product images, see {@link CDNImage} */
|
|
47
|
-
images: CDNImage[];
|
|
48
|
-
/** The standard time of the product */
|
|
49
|
-
standardTime: string;
|
|
50
|
-
/** Indicates if a product is sponsored */
|
|
51
|
-
sponsored: boolean;
|
|
52
|
-
/** The status of the product, see {@link ProductStatus} */
|
|
53
|
-
status: ProductStatus;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Product prices attributes.
|
|
57
|
-
*
|
|
58
|
-
* @interface ProductPrices
|
|
59
|
-
* @since 0.5.14
|
|
60
|
-
*/
|
|
61
|
-
export interface ProductPrices {
|
|
62
|
-
/** Normal price category, see {@link PriceCategory} */
|
|
63
|
-
NORMAL: PriceCategory;
|
|
64
|
-
/** Points price category, see {@link PriceCategory} */
|
|
65
|
-
POINTS: PriceCategory;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Price category attributes.
|
|
69
|
-
*
|
|
70
|
-
* @interface PriceCategory
|
|
71
|
-
* @since 0.5.14
|
|
72
|
-
*/
|
|
73
|
-
export interface PriceCategory {
|
|
74
|
-
/** Price category type, see {@link PriceCategoryType} */
|
|
75
|
-
category: PriceCategoryType;
|
|
76
|
-
/** Price category without taxes */
|
|
77
|
-
grossPrice: number;
|
|
78
|
-
/** Price category with taxes */
|
|
79
|
-
netPrice: number;
|
|
80
|
-
/** Currency' symbol */
|
|
81
|
-
symbol: string;
|
|
82
|
-
/** Array of price category' taxes, see {@link PriceCategoryTax} */
|
|
83
|
-
taxes: PriceCategoryTax[];
|
|
84
|
-
/** Array of discounts applied to the price category */
|
|
85
|
-
discounts: any[];
|
|
86
|
-
/** Total discounts without taxes */
|
|
87
|
-
discountGrossPrice: number;
|
|
88
|
-
/** Total discounts with taxes */
|
|
89
|
-
discountNetPrice: number;
|
|
90
|
-
/** Total discounts applied to the price category */
|
|
91
|
-
discount: number;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Price category tax attributes.
|
|
95
|
-
*
|
|
96
|
-
* @interface PriceCategoryTax
|
|
97
|
-
* @since 0.5.14
|
|
98
|
-
*/
|
|
99
|
-
export interface PriceCategoryTax {
|
|
100
|
-
/** Price category' tax percentage */
|
|
101
|
-
percentage: number;
|
|
102
|
-
/** Price category' tax name, see {@link TaxType} */
|
|
103
|
-
name: TaxType;
|
|
104
|
-
/** Price category' value added tax rate */
|
|
105
|
-
vatRateCode: number;
|
|
106
|
-
/** Price category' tax code */
|
|
107
|
-
code: number;
|
|
108
|
-
/** Price category' value added tax */
|
|
109
|
-
vatRate: string;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Additional product attributes.
|
|
113
|
-
*
|
|
114
|
-
* @interface ProductAttributes
|
|
115
|
-
* @since 0.5.14
|
|
116
|
-
*/
|
|
117
|
-
export interface ProductAttributes {
|
|
118
|
-
/** Product's quantity, the attribute is not in camel case purposefully */
|
|
119
|
-
Cantidad: string;
|
|
120
|
-
/** Product external id */
|
|
121
|
-
externalId: string;
|
|
122
|
-
/** Whether or not to show product in menu */
|
|
123
|
-
showInMenu: boolean;
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* The product status.
|
|
127
|
-
*
|
|
128
|
-
* @typedef ProductStatus
|
|
129
|
-
* @since 0.5.14
|
|
130
|
-
**/
|
|
131
|
-
export declare type ProductStatus = "ACTIVE" | "INACTIVE";
|
|
132
|
-
/**
|
|
133
|
-
* Product type's possible values.
|
|
134
|
-
*
|
|
135
|
-
* @typedef ProductType
|
|
136
|
-
* @since 0.5.14
|
|
137
|
-
**/
|
|
138
|
-
export declare type ProductType = "PRODUCT" | "MODIFIER";
|
|
139
|
-
/**
|
|
140
|
-
* Price category's possible values.
|
|
141
|
-
*
|
|
142
|
-
* @typedef PriceCategoryType
|
|
143
|
-
* @since 0.5.14
|
|
144
|
-
**/
|
|
145
|
-
export declare type PriceCategoryType = "NORMAL" | "POINTS";
|
|
146
|
-
/**
|
|
147
|
-
* Tax's possible values.
|
|
148
|
-
*
|
|
149
|
-
* @typedef TaxType
|
|
150
|
-
* @since 0.5.14
|
|
151
|
-
**/
|
|
152
|
-
export declare type TaxType = "IVA";
|
|
153
|
-
/**
|
|
154
|
-
* Weekday product's schedule.
|
|
155
|
-
*
|
|
156
|
-
* @interface DayOfWeek
|
|
157
|
-
* @since 0.5.14
|
|
158
|
-
*/
|
|
159
|
-
export interface DayOfWeek {
|
|
160
|
-
/** Week day in uppercase, see {@link BaseWeekDay} */
|
|
161
|
-
day: BaseWeekDay;
|
|
162
|
-
/**
|
|
163
|
-
* `Date` value representing the start time in which
|
|
164
|
-
* the product is available */
|
|
165
|
-
from: number;
|
|
166
|
-
/**
|
|
167
|
-
* `Date` value representing the end time in which
|
|
168
|
-
* the product is available */
|
|
169
|
-
to: number;
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* The representation of a product question.
|
|
173
|
-
*
|
|
174
|
-
* @interface ProductQuestion
|
|
175
|
-
* @since 0.5.14
|
|
176
|
-
*/
|
|
177
|
-
export interface ProductQuestion {
|
|
178
|
-
/** Product question id */
|
|
179
|
-
questionId: string;
|
|
180
|
-
/** Product question name */
|
|
181
|
-
name: string;
|
|
182
|
-
/** Product question description */
|
|
183
|
-
description: string | null;
|
|
184
|
-
/** Product question minimum number of allowed answers */
|
|
185
|
-
min: number;
|
|
186
|
-
/** Product question maximum number of allowed answers */
|
|
187
|
-
max: number;
|
|
188
|
-
/** Product question type */
|
|
189
|
-
type: string | null;
|
|
190
|
-
/**
|
|
191
|
-
* Array of possible answers to a product question,
|
|
192
|
-
* see {@link ProductAnswer}
|
|
193
|
-
*/
|
|
194
|
-
answers: ProductAnswer[];
|
|
195
|
-
/** Array of product question images to display, see {@link CDNImage} */
|
|
196
|
-
images: CDNImage[] | undefined;
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* Common props for products and answers.
|
|
200
|
-
*
|
|
201
|
-
* @typedef CommonProductAndAnswersProps
|
|
202
|
-
* @since 0.5.14
|
|
203
|
-
*/
|
|
204
|
-
declare type CommonProductAndAnswersProps = "name" | "prices" | "attributes" | "productId" | "type" | "images";
|
|
205
|
-
/**
|
|
206
|
-
* Product details attributes.
|
|
207
|
-
*
|
|
208
|
-
* @interface ProductDetails
|
|
209
|
-
* @since 0.5.14
|
|
210
|
-
* @extends {{@link BaseProduct}
|
|
211
|
-
*/
|
|
212
|
-
export interface ProductDetails extends BaseProduct {
|
|
213
|
-
/** Indicates if a product has a price vip */
|
|
214
|
-
isPriceVip: boolean;
|
|
215
|
-
/** Manufacturer The manufacturer of the product */
|
|
216
|
-
manufacturer: string[];
|
|
217
|
-
/** The max amount for sale of the product */
|
|
218
|
-
maxAmountForSale: number;
|
|
219
|
-
/** Array of product schedules, see {@link DayOfWeek} */
|
|
220
|
-
schedule: DayOfWeek[];
|
|
221
|
-
/** Array of product questions, see {@link ProductQuestion} */
|
|
222
|
-
questions: ProductQuestion[];
|
|
223
|
-
/** The benefit id of the product */
|
|
224
|
-
benefitId?: number;
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* Representation of a Commerce Product Answer.
|
|
228
|
-
*
|
|
229
|
-
* @interface ProductAnswer
|
|
230
|
-
* @since 0.5.14
|
|
231
|
-
* @extends Pick<Product,CommonProductAndAnswersProps>, see
|
|
232
|
-
* {@link Product} and {@link CommonProductAndAnswersProps}
|
|
233
|
-
* for further information
|
|
234
|
-
*/
|
|
235
|
-
export interface ProductAnswer extends Pick<Product, CommonProductAndAnswersProps> {
|
|
236
|
-
/**
|
|
237
|
-
* Array of questions associated with the answer,
|
|
238
|
-
* see {@link ProductDetails}
|
|
239
|
-
*/
|
|
240
|
-
questions: ProductDetails["questions"];
|
|
241
|
-
/** Type of question to render */
|
|
242
|
-
renderType: string | null;
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* Representation of a Commerce Cart Product Question.
|
|
246
|
-
*
|
|
247
|
-
* @interface CartProductQuestion
|
|
248
|
-
* @since 0.5.14
|
|
249
|
-
* @extends {{@link ProductQuestion}
|
|
250
|
-
*/
|
|
251
|
-
export interface CartProductQuestion extends ProductQuestion {
|
|
252
|
-
/** Array of possible answers to the question */
|
|
253
|
-
answers: CartProductAnswer[];
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* Representation of a Commerce Cart Product Answer.
|
|
257
|
-
*
|
|
258
|
-
* @interface CartProductAnswer
|
|
259
|
-
* @since 0.5.14
|
|
260
|
-
* @extends {{@link ProductAnswer}
|
|
261
|
-
*/
|
|
262
|
-
export interface CartProductAnswer extends ProductAnswer {
|
|
263
|
-
/** Question unique identifier */
|
|
264
|
-
questionId: string;
|
|
265
|
-
/** Quantity of allowed cart product answers */
|
|
266
|
-
amount: number;
|
|
267
|
-
/** Price category value of a product answer */
|
|
268
|
-
priceCategory: PriceCategoryType;
|
|
269
|
-
/** Comment associated with the product answer */
|
|
270
|
-
comment: string;
|
|
271
|
-
/** Array of possible questions and answers */
|
|
272
|
-
questionsAndAnswers: CartProductQuestion[];
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Representation of a Commerce Cart Product.
|
|
276
|
-
*
|
|
277
|
-
* @interface CartProduct
|
|
278
|
-
* @since 0.5.14
|
|
279
|
-
* @extends {{@link ProductDetails}
|
|
280
|
-
*/
|
|
281
|
-
export interface CartProduct extends ProductDetails {
|
|
282
|
-
/** Quantity of allowed cart products */
|
|
283
|
-
amount: number;
|
|
284
|
-
/** Cart product price category */
|
|
285
|
-
priceCategory: PriceCategoryType;
|
|
286
|
-
/** Comment associated with the cart product */
|
|
287
|
-
comment: string;
|
|
288
|
-
/** Array of possible questions and answers associated with the product*/
|
|
289
|
-
questionsAndAnswers: CartProductQuestion[];
|
|
290
|
-
/** Cart product unique identifier */
|
|
291
|
-
hash: string;
|
|
292
|
-
/** Cart product creation date */
|
|
293
|
-
createdAt: string;
|
|
294
|
-
/** Cart product updating date */
|
|
295
|
-
updatedAt: string;
|
|
296
|
-
/** Array of alerts associated with the cart product */
|
|
297
|
-
alerts: Alert[];
|
|
298
|
-
}
|
|
299
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"product.types.js","sourceRoot":"","sources":["../../src/types/product.types.ts"],"names":[],"mappings":";AAAA,mDAAmD"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* User preferences.
|
|
3
|
-
*
|
|
4
|
-
* @interface UserSettings
|
|
5
|
-
* @since 0.5.15
|
|
6
|
-
*/
|
|
7
|
-
export interface UserSettings {
|
|
8
|
-
/** Individual settings, see {@link Settings} */
|
|
9
|
-
settings: Settings;
|
|
10
|
-
/** User unique identifier */
|
|
11
|
-
uid: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Individual user settings.
|
|
15
|
-
*
|
|
16
|
-
* @typedef Settings
|
|
17
|
-
* @since 0.5.15
|
|
18
|
-
* @property {boolean} `[key: string]` An object where its key is a string
|
|
19
|
-
* and its value is a boolean
|
|
20
|
-
*/
|
|
21
|
-
export declare type Settings = {
|
|
22
|
-
[key: string]: boolean;
|
|
23
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"settings.types.js","sourceRoot":"","sources":["../../src/types/settings.types.ts"],"names":[],"mappings":";AAAA,4BAA4B"}
|