@artisan-commerce/builders 0.6.0 → 0.7.0-canary.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/CHANGELOG.md +9 -0
- package/build/builders/account.builder.d.ts +2 -0
- package/build/builders/banner.builder.d.ts +6 -1
- package/build/builders/billingData.builder.d.ts +4 -1
- package/build/builders/catalogue.builder.d.ts +4 -1
- package/build/builders/category.builder.d.ts +10 -3
- package/build/builders/common.builder.d.ts +121 -51
- package/build/builders/country.builder.d.ts +11 -3
- package/build/builders/coupon.builder.d.ts +6 -0
- package/build/builders/fulfillment.builder.d.ts +178 -0
- package/build/builders/image.builder.d.ts +32 -0
- package/build/builders/notification.builder.d.ts +19 -0
- package/build/builders/order.builder.d.ts +167 -0
- package/build/builders/payment.builder.d.ts +18 -6
- package/build/builders/product.builder.d.ts +53 -17
- package/build/builders/settings.builder.d.ts +19 -0
- package/build/builders/shippingAddress.builder.d.ts +35 -7
- package/build/builders/shoppingCart.builder.d.ts +22 -7
- package/build/builders/store.builder.d.ts +26 -7
- package/build/builders/user.builder.d.ts +2 -0
- package/build/builders/vendor.builder.d.ts +2 -0
- package/build/index.d.ts +8 -1
- package/build/main.bundle.js +2 -2
- package/build/report.json +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CDNImage, URLImage, RandomImageConfig } from "@artisan-commerce/types";
|
|
2
|
+
/**
|
|
3
|
+
* Generates a random image url.
|
|
4
|
+
*
|
|
5
|
+
* @since 0.5.15
|
|
6
|
+
*/
|
|
7
|
+
export declare const buildURLImage: (randomImageConfig?: RandomImageConfig | undefined) => string;
|
|
8
|
+
/**
|
|
9
|
+
* Generates a list of URLImage.
|
|
10
|
+
*
|
|
11
|
+
* @since 0.5.15
|
|
12
|
+
* @param {number} quantity The number of objects to be generated
|
|
13
|
+
* @returns {URLImage} An array of {@link URLImage}
|
|
14
|
+
*/
|
|
15
|
+
export declare const genURLImages: (quantity?: number | undefined, overrides?: RandomImageConfig | undefined) => URLImage[];
|
|
16
|
+
/**
|
|
17
|
+
* Generates CDNImage object with random data.
|
|
18
|
+
*
|
|
19
|
+
* @since 0.5.15
|
|
20
|
+
* @param {Partial<CDNImage>} overrides Properties to override
|
|
21
|
+
* a {@link CDNImage}
|
|
22
|
+
* @returns {CDNImage} A {@link CDNImage} object
|
|
23
|
+
*/
|
|
24
|
+
export declare const buildCDNImage: (overrides?: Partial<CDNImage>) => CDNImage;
|
|
25
|
+
/**
|
|
26
|
+
* Generates a list of CDNImage objects with random data.
|
|
27
|
+
*
|
|
28
|
+
* @since 0.5.15
|
|
29
|
+
* @param {number} quantity The number of objects to be generated
|
|
30
|
+
* @returns {CDNImage[]} An array of CDNImage objects, see {@link CDNImage}
|
|
31
|
+
*/
|
|
32
|
+
export declare const genCDNImages: (quantity?: number | undefined) => CDNImage[];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Notification } from "@artisan-commerce/types";
|
|
2
|
+
/**
|
|
3
|
+
* Generates Notification object with random data.
|
|
4
|
+
*
|
|
5
|
+
* @since 0.5.15
|
|
6
|
+
* @param {Partial<Notification>} overrides Properties to override
|
|
7
|
+
* a {@link Notification}
|
|
8
|
+
* @returns {Notification} A {@link Notification} object
|
|
9
|
+
*/
|
|
10
|
+
export declare const buildNotification: (overrides?: Partial<Notification>) => Notification;
|
|
11
|
+
/**
|
|
12
|
+
* Generates a list of Notification objects with random data.
|
|
13
|
+
*
|
|
14
|
+
* @since 0.5.15
|
|
15
|
+
* @param {number} quantity The number of objects to be generated
|
|
16
|
+
* @returns {Notification[]} An array of Notification objects,
|
|
17
|
+
* see {@link Notification}
|
|
18
|
+
*/
|
|
19
|
+
export declare const genNotifications: (quantity?: number | undefined) => Notification[];
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { OrderLastRetry } from "@artisan-commerce/types";
|
|
2
|
+
import { BaseOrder, OrderDetails } from "@artisan-commerce/types";
|
|
3
|
+
import { OrderStep, OrderShoppingCart } from "@artisan-commerce/types";
|
|
4
|
+
import { OrderPaidPaymentMethod, OrderStore } from "@artisan-commerce/types";
|
|
5
|
+
import { OrderProduct, OrderDetailShippingCost } from "@artisan-commerce/types";
|
|
6
|
+
/**
|
|
7
|
+
* Generates BaseOrder object with random data.
|
|
8
|
+
*
|
|
9
|
+
* @since 0.5.14
|
|
10
|
+
* @param {Partial<BaseOrder>} overrides Properties to override
|
|
11
|
+
* a {@link BaseOrder}
|
|
12
|
+
* @returns {BaseOrder} A {@link BaseOrder} object
|
|
13
|
+
*/
|
|
14
|
+
export declare const buildBaseOrder: (overrides?: Partial<BaseOrder>) => BaseOrder;
|
|
15
|
+
/**
|
|
16
|
+
* Generates a list of BaseOrder objects with random data.
|
|
17
|
+
*
|
|
18
|
+
* @since 0.5.14
|
|
19
|
+
* @param {number} quantity The number of objects to be generated
|
|
20
|
+
* @returns {BaseOrder[]} An array of BaseOrder objects,
|
|
21
|
+
* see {@link BaseOrder}
|
|
22
|
+
*/
|
|
23
|
+
export declare const genBaseOrders: (quantity?: number | undefined) => BaseOrder[];
|
|
24
|
+
/**
|
|
25
|
+
* Generates OrderDetails object with random data.
|
|
26
|
+
*
|
|
27
|
+
* @since 0.5.14
|
|
28
|
+
* @param {Partial<OrderDetails>} overrides Properties to override
|
|
29
|
+
* a {@link OrderDetails}
|
|
30
|
+
* @returns {OrderDetails} A {@link OrderDetails} object
|
|
31
|
+
*/
|
|
32
|
+
export declare const buildOrderDetails: (overrides?: Partial<OrderDetails>) => OrderDetails;
|
|
33
|
+
/**
|
|
34
|
+
* Generates a list of OrderDetails objects with random data.
|
|
35
|
+
*
|
|
36
|
+
* @since 0.5.14
|
|
37
|
+
* @param {number} quantity The number of objects to be generated
|
|
38
|
+
* @returns {OrderDetails[]} An array of OrderDetails objects,
|
|
39
|
+
* see {@link OrderDetails}
|
|
40
|
+
*/
|
|
41
|
+
export declare const genOrderDetails: (quantity?: number | undefined) => OrderDetails[];
|
|
42
|
+
/**
|
|
43
|
+
* Generates OrderStep object with random data.
|
|
44
|
+
*
|
|
45
|
+
* @since 0.5.14
|
|
46
|
+
* @param {Partial<OrderStep>} overrides Properties to override
|
|
47
|
+
* a {@link OrderStep}
|
|
48
|
+
* @returns {OrderStep} A {@link OrderStep} object
|
|
49
|
+
*/
|
|
50
|
+
export declare const buildOrderStep: (overrides?: Partial<OrderStep>) => OrderStep;
|
|
51
|
+
/**
|
|
52
|
+
* Generates a list of OrderStep objects with random data.
|
|
53
|
+
*
|
|
54
|
+
* @since 0.5.14
|
|
55
|
+
* @param {number} quantity The number of objects to be generated
|
|
56
|
+
* @returns {OrderStep[]} An array of OrderStep objects,
|
|
57
|
+
* see {@link OrderStep}
|
|
58
|
+
*/
|
|
59
|
+
export declare const genOrderSteps: (quantity?: number | undefined) => OrderStep[];
|
|
60
|
+
/**
|
|
61
|
+
* Generates OrderDetailShippingCost object with random data.
|
|
62
|
+
*
|
|
63
|
+
* @since 0.5.14
|
|
64
|
+
* @param {Partial<OrderDetailShippingCost>} overrides Properties to override
|
|
65
|
+
* a {@link OrderDetailShippingCost}
|
|
66
|
+
* @returns {OrderDetailShippingCost} A {@link OrderDetailShippingCost} object
|
|
67
|
+
*/
|
|
68
|
+
export declare const buildOrderDetailShippingCost: (overrides?: Partial<OrderDetailShippingCost>) => OrderDetailShippingCost;
|
|
69
|
+
/**
|
|
70
|
+
* Generates a list of OrderDetailShippingCost objects with random data.
|
|
71
|
+
*
|
|
72
|
+
* @since 0.5.14
|
|
73
|
+
* @param {number} quantity The number of objects to be generated
|
|
74
|
+
* @returns {OrderDetailShippingCost[]} An array of OrderDetailShippingCost
|
|
75
|
+
* objects, see {@link OrderDetailShippingCost}
|
|
76
|
+
*/
|
|
77
|
+
export declare const genOrderDetailShippingCosts: (quantity?: number | undefined) => OrderDetailShippingCost[];
|
|
78
|
+
/**
|
|
79
|
+
* Generates OrderLastRetry object with random data.
|
|
80
|
+
*
|
|
81
|
+
* @since 0.5.14
|
|
82
|
+
* @param {Partial<OrderLastRetry>} overrides Properties to override
|
|
83
|
+
* a {@link OrderLastRetry}
|
|
84
|
+
* @returns {OrderLastRetry} A {@link OrderLastRetry} object
|
|
85
|
+
*/
|
|
86
|
+
export declare const buildOrderLastRetry: (overrides?: Partial<OrderLastRetry>) => OrderLastRetry;
|
|
87
|
+
/**
|
|
88
|
+
* Generates a list of OrderLastRetry objects with random data.
|
|
89
|
+
*
|
|
90
|
+
* @since 0.5.14
|
|
91
|
+
* @param {number} quantity The number of objects to be generated
|
|
92
|
+
* @returns {OrderLastRetry[]} An array of OrderLastRetry objects,
|
|
93
|
+
* see {@link OrderLastRetry}
|
|
94
|
+
*/
|
|
95
|
+
export declare const genOrderLastRetries: (quantity?: number | undefined) => OrderLastRetry[];
|
|
96
|
+
/**
|
|
97
|
+
* Generates OrderPaidPaymentMethod object with random data.
|
|
98
|
+
*
|
|
99
|
+
* @since 0.5.14
|
|
100
|
+
* @param {Partial<OrderPaidPaymentMethod>} overrides Properties to override
|
|
101
|
+
* a {@link OrderPaidPaymentMethod}
|
|
102
|
+
* @returns {OrderPaidPaymentMethod} A {@link OrderPaidPaymentMethod} object
|
|
103
|
+
*/
|
|
104
|
+
export declare const buildOrderPaidPaymentMethod: (overrides?: Partial<OrderPaidPaymentMethod>) => OrderPaidPaymentMethod;
|
|
105
|
+
/**
|
|
106
|
+
* Generates a list of OrderPaidPaymentMethod objects with random data.
|
|
107
|
+
*
|
|
108
|
+
* @since 0.5.14
|
|
109
|
+
* @param {number} quantity The number of objects to be generated
|
|
110
|
+
* @returns {OrderPaidPaymentMethod[]} An array of OrderPaidPaymentMethod
|
|
111
|
+
* objects, see {@link OrderPaidPaymentMethod}
|
|
112
|
+
*/
|
|
113
|
+
export declare const genOrderPaidPaymentMethods: (quantity?: number | undefined) => OrderPaidPaymentMethod[];
|
|
114
|
+
/**
|
|
115
|
+
* Generates OrderProduct object with random data.
|
|
116
|
+
*
|
|
117
|
+
* @since 0.5.14
|
|
118
|
+
* @param {Partial<OrderProduct>} overrides Properties to override
|
|
119
|
+
* a {@link OrderProduct}
|
|
120
|
+
* @returns {OrderProduct} A {@link OrderProduct} object
|
|
121
|
+
*/
|
|
122
|
+
export declare const buildOrderProduct: (overrides?: Partial<OrderProduct>) => OrderProduct;
|
|
123
|
+
/**
|
|
124
|
+
* Generates a list of OrderProduct objects with random data.
|
|
125
|
+
*
|
|
126
|
+
* @since 0.5.14
|
|
127
|
+
* @param {number} quantity The number of objects to be generated
|
|
128
|
+
* @returns {OrderProduct[]} An array of OrderProduct objects,
|
|
129
|
+
* see {@link OrderProduct}
|
|
130
|
+
*/
|
|
131
|
+
export declare const genOrderProducts: (quantity?: number | undefined) => OrderProduct[];
|
|
132
|
+
/**
|
|
133
|
+
* Generates OrderStore object with random data.
|
|
134
|
+
*
|
|
135
|
+
* @since 0.5.14
|
|
136
|
+
* @param {Partial<OrderStore>} overrides Properties to override
|
|
137
|
+
* a {@link OrderStore}
|
|
138
|
+
* @returns {OrderStore} A {@link OrderStore} object
|
|
139
|
+
*/
|
|
140
|
+
export declare const buildOrderStore: (overrides?: Partial<OrderStore>) => OrderStore;
|
|
141
|
+
/**
|
|
142
|
+
* Generates a list of OrderStore objects with random data.
|
|
143
|
+
*
|
|
144
|
+
* @since 0.5.14
|
|
145
|
+
* @param {number} quantity The number of objects to be generated
|
|
146
|
+
* @returns {OrderStore[]} An array of OrderStore objects,
|
|
147
|
+
* see {@link OrderStore}
|
|
148
|
+
*/
|
|
149
|
+
export declare const genOrderStores: (quantity?: number | undefined) => OrderStore[];
|
|
150
|
+
/**
|
|
151
|
+
* Generates OrderShoppingCart object with random data.
|
|
152
|
+
*
|
|
153
|
+
* @since 0.5.14
|
|
154
|
+
* @param {Partial<OrderShoppingCart>} overrides Properties to override
|
|
155
|
+
* a {@link OrderShoppingCart}
|
|
156
|
+
* @returns {OrderShoppingCart} A {@link OrderShoppingCart} object
|
|
157
|
+
*/
|
|
158
|
+
export declare const buildOrderShoppingCart: (overrides?: Partial<OrderShoppingCart>) => OrderShoppingCart;
|
|
159
|
+
/**
|
|
160
|
+
* Generates a list of OrderShoppingCart objects with random data.
|
|
161
|
+
*
|
|
162
|
+
* @since 0.5.14
|
|
163
|
+
* @param {number} quantity The number of objects to be generated
|
|
164
|
+
* @returns {OrderShoppingCart[]} An array of OrderShoppingCart objects,
|
|
165
|
+
* see {@link OrderShoppingCart}
|
|
166
|
+
*/
|
|
167
|
+
export declare const genOrderShoppingCarts: (quantity?: number | undefined) => OrderShoppingCart[];
|
|
@@ -3,42 +3,54 @@ import { CreditCardBrand, CreditCardMapping } from "@artisan-commerce/types";
|
|
|
3
3
|
/**
|
|
4
4
|
* Generates BasePaymentMethod object with random data.
|
|
5
5
|
*
|
|
6
|
-
* @
|
|
6
|
+
* @since 0.5.15
|
|
7
|
+
* @param {Partial<BasePaymentMethod>} overrides Properties to override
|
|
8
|
+
* a {@link BasePaymentMethod}
|
|
7
9
|
* @returns {BasePaymentMethod} A {@link BasePaymentMethod} object
|
|
8
10
|
*/
|
|
9
11
|
export declare const buildBasePaymentMethod: (overrides?: Partial<BasePaymentMethod>) => BasePaymentMethod;
|
|
10
12
|
/**
|
|
11
13
|
* Generates PaymentMethod object with random data.
|
|
12
14
|
*
|
|
13
|
-
* @
|
|
15
|
+
* @since 0.5.15
|
|
16
|
+
* @param {Partial<PaymentMethod>} overrides Properties to override
|
|
17
|
+
* a {@link PaymentMethod}
|
|
14
18
|
* @returns {PaymentMethod} A {@link PaymentMethod} object
|
|
15
19
|
*/
|
|
16
20
|
export declare const buildPaymentMethod: (overrides?: Partial<PaymentMethod>) => PaymentMethod;
|
|
17
21
|
/**
|
|
18
22
|
* Generates CreditCardBrand object with random data.
|
|
19
23
|
*
|
|
20
|
-
* @
|
|
24
|
+
* @since 0.5.15
|
|
25
|
+
* @param {Partial<CreditCardBrand>} overrides Properties to override
|
|
26
|
+
* a {@link CreditCardBrand}
|
|
21
27
|
* @returns {CreditCardBrand} A {@link CreditCardBrand} object
|
|
22
28
|
*/
|
|
23
29
|
export declare const buildCreditCardBrand: (overrides?: Partial<CreditCardBrand>) => CreditCardBrand;
|
|
24
30
|
/**
|
|
25
31
|
* Generates a list of CreditCardBrand objects with random data.
|
|
26
32
|
*
|
|
33
|
+
* @since 0.5.15
|
|
27
34
|
* @param {number} quantity The number of objects to be generated
|
|
28
|
-
* @returns {CreditCardBrand[]} An array of credit card brands,
|
|
35
|
+
* @returns {CreditCardBrand[]} An array of credit card brands,
|
|
36
|
+
* see {@link CreditCardBrand}
|
|
29
37
|
*/
|
|
30
38
|
export declare const genCreditCardBrands: (quantity?: number | undefined) => CreditCardBrand[];
|
|
31
39
|
/**
|
|
32
40
|
* Generates CreditCardMapping object with random data.
|
|
33
41
|
*
|
|
34
|
-
* @
|
|
42
|
+
* @since 0.5.15
|
|
43
|
+
* @param {Partial<CreditCardMapping>} overrides Properties to override
|
|
44
|
+
* a {@link CreditCardMapping}
|
|
35
45
|
* @returns {CreditCardMapping} A {@link CreditCardMapping} object
|
|
36
46
|
*/
|
|
37
47
|
export declare const buildCreditCardMapping: (overrides?: Partial<CreditCardMapping>) => CreditCardMapping;
|
|
38
48
|
/**
|
|
39
49
|
* Generates a list of CreditCardMapping objects with random data.
|
|
40
50
|
*
|
|
51
|
+
* @since 0.5.15
|
|
41
52
|
* @param {number} quantity The number of objects to be generated
|
|
42
|
-
* @returns {CreditCardMapping[]} An array of credit card mappings,
|
|
53
|
+
* @returns {CreditCardMapping[]} An array of credit card mappings,
|
|
54
|
+
* see {@link CreditCardMapping}
|
|
43
55
|
*/
|
|
44
56
|
export declare const genCreditCardMappings: (quantity?: number | undefined) => CreditCardMapping[];
|
|
@@ -7,44 +7,60 @@ import { PriceCategory, PriceCategoryTax } from "@artisan-commerce/types";
|
|
|
7
7
|
/**
|
|
8
8
|
* Generates PriceCategoryTax object with random data.
|
|
9
9
|
*
|
|
10
|
-
* @
|
|
10
|
+
* @since 0.5.14
|
|
11
|
+
* @param {Partial<PriceCategoryTax>} overrides Properties to override
|
|
12
|
+
* a {@link PriceCategoryTax}
|
|
11
13
|
* @returns {PriceCategoryTax} A {@link PriceCategoryTax} object
|
|
12
14
|
*/
|
|
13
15
|
export declare const buildPriceCategoryTax: (overrides?: Partial<PriceCategoryTax>) => PriceCategoryTax;
|
|
14
16
|
/**
|
|
15
17
|
* Generates a list of PriceCategoryTax objects with random data.
|
|
16
18
|
*
|
|
19
|
+
* @since 0.5.14
|
|
17
20
|
* @param {number} quantity The number of objects to be generated
|
|
18
|
-
* @returns {PriceCategoryTax[]} An array of price category taxes objects,
|
|
21
|
+
* @returns {PriceCategoryTax[]} An array of price category taxes objects,
|
|
22
|
+
* see {@link PriceCategoryTax}
|
|
19
23
|
*/
|
|
20
24
|
export declare const genPriceCategoryTaxes: (quantity?: number | undefined) => PriceCategoryTax[];
|
|
21
25
|
/**
|
|
22
26
|
* Generates PriceCategory object with random data.
|
|
23
27
|
*
|
|
24
|
-
* @
|
|
28
|
+
* @since 0.5.14
|
|
29
|
+
* @param {Partial<PriceCategory>} overrides Properties to override
|
|
30
|
+
* a {@link PriceCategory}
|
|
25
31
|
* @returns {PriceCategory} A {@link PriceCategory} object
|
|
26
32
|
*/
|
|
27
33
|
export declare const buildPriceCategory: (overrides?: Partial<PriceCategory>) => PriceCategory;
|
|
28
34
|
/**
|
|
29
35
|
* Generates BaseProduct object with random data.
|
|
30
36
|
*
|
|
31
|
-
* @
|
|
37
|
+
* @since 0.5.14
|
|
38
|
+
* @param {Partial<BaseProduct>} overrides Properties to override
|
|
39
|
+
* a {@link BaseProduct}
|
|
32
40
|
* @returns {BaseProduct} A {@link BaseProduct} object
|
|
33
41
|
*/
|
|
34
42
|
export declare const buildBaseProduct: (overrides?: Partial<BaseProduct>) => BaseProduct;
|
|
35
43
|
/**
|
|
36
44
|
* Generates a list of BaseProduct objects with random data.
|
|
37
45
|
*
|
|
46
|
+
* @since 0.5.14
|
|
38
47
|
* @param {number} quantity The number of objects to be generated
|
|
39
|
-
* @returns {BaseProduct[]} An array of BaseProduct objects,
|
|
48
|
+
* @returns {BaseProduct[]} An array of BaseProduct objects,
|
|
49
|
+
* see {@link BaseProduct}
|
|
40
50
|
*/
|
|
41
51
|
export declare const genBaseProducts: (quantity?: number | undefined) => BaseProduct[];
|
|
42
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* Render type for product answers
|
|
54
|
+
*
|
|
55
|
+
* @since 0.5.14
|
|
56
|
+
*/
|
|
43
57
|
export declare const MODIFIER_TYPES: string[];
|
|
44
58
|
/**
|
|
45
59
|
* Generates ProductAnswer object with random data.
|
|
46
60
|
*
|
|
47
|
-
* @
|
|
61
|
+
* @since 0.5.14
|
|
62
|
+
* @param {Partial<ProductAnswer>} overrides Properties to override
|
|
63
|
+
* a {@link ProductAnswer}
|
|
48
64
|
* @param {number} loop The quantity of loops the function will be run
|
|
49
65
|
* @returns {ProductAnswer} A {@link ProductAnswer} object
|
|
50
66
|
*/
|
|
@@ -52,15 +68,19 @@ export declare const buildProductAnswer: (overrides?: Partial<ProductAnswer>, lo
|
|
|
52
68
|
/**
|
|
53
69
|
* Generates a list of ProductAnswer objects with random data.
|
|
54
70
|
*
|
|
71
|
+
* @since 0.5.14
|
|
55
72
|
* @param {number} quantity The number of objects to be generated
|
|
56
73
|
* @param {number} loop The quantity of loops the function will be run
|
|
57
|
-
* @returns {ProductAnswer[]} An array of ProductAnswer objects,
|
|
74
|
+
* @returns {ProductAnswer[]} An array of ProductAnswer objects,
|
|
75
|
+
* see {@link ProductAnswer}
|
|
58
76
|
*/
|
|
59
77
|
export declare const genProductAnswers: (quantity?: number | undefined, loop?: number) => ProductAnswer[];
|
|
60
78
|
/**
|
|
61
79
|
* Generates ProductQuestion object with random data.
|
|
62
80
|
*
|
|
63
|
-
* @
|
|
81
|
+
* @since 0.5.14
|
|
82
|
+
* @param {Partial<ProductQuestion>} overrides Properties to override
|
|
83
|
+
* a {@link ProductQuestion}
|
|
64
84
|
* @param {number} loop The quantity of loops the function will be run
|
|
65
85
|
* @returns {ProductQuestion} A {@link ProductQuestion} object
|
|
66
86
|
*/
|
|
@@ -68,58 +88,74 @@ export declare const buildProductQuestion: (overrides?: Partial<ProductQuestion>
|
|
|
68
88
|
/**
|
|
69
89
|
* Generates a list of ProductQuestion objects with random data.
|
|
70
90
|
*
|
|
91
|
+
* @since 0.5.14
|
|
71
92
|
* @param {number} quantity The number of objects to be generated
|
|
72
93
|
* @param {number} loop The quantity of loops the function will be run
|
|
73
|
-
* @returns {ProductQuestion[]} An array of ProductQuestion objects,
|
|
94
|
+
* @returns {ProductQuestion[]} An array of ProductQuestion objects,
|
|
95
|
+
* see {@link ProductQuestion}
|
|
74
96
|
*/
|
|
75
97
|
export declare const genProductQuestions: (quantity?: number | undefined, loop?: number) => ProductQuestion[];
|
|
76
98
|
/**
|
|
77
99
|
* Generates ProductDetails object with random data.
|
|
78
100
|
*
|
|
79
|
-
* @
|
|
101
|
+
* @since 0.5.14
|
|
102
|
+
* @param {Partial<ProductDetails>} overrides Properties to override
|
|
103
|
+
* a {@link ProductDetails}
|
|
80
104
|
* @returns {ProductDetails} A {@link ProductDetails} object
|
|
81
105
|
*/
|
|
82
106
|
export declare const buildProductDetails: (overrides?: Partial<ProductDetails>) => ProductDetails;
|
|
83
107
|
/**
|
|
84
108
|
* Generates a list of ProductDetails objects with random data.
|
|
85
109
|
*
|
|
110
|
+
* @since 0.5.14
|
|
86
111
|
* @param {number} quantity The number of objects to be generated
|
|
87
|
-
* @returns {ProductDetails[]} An array of ProductDetails objects,
|
|
112
|
+
* @returns {ProductDetails[]} An array of ProductDetails objects,
|
|
113
|
+
* see {@link ProductDetails}
|
|
88
114
|
*/
|
|
89
115
|
export declare const genProductDetails: (quantity?: number | undefined) => ProductDetails[];
|
|
90
116
|
/**
|
|
91
117
|
* Generates CartProductAnswer object with random data.
|
|
92
118
|
*
|
|
119
|
+
* @since 0.5.14
|
|
93
120
|
* @param questionId The question id associated with the answer
|
|
94
|
-
* @param {Partial<CartProductAnswer>} overrides Properties to override
|
|
121
|
+
* @param {Partial<CartProductAnswer>} overrides Properties to override
|
|
122
|
+
* a {@link CartProductAnswer}
|
|
95
123
|
* @returns {CartProductAnswer} A {@link CartProductAnswer} object
|
|
96
124
|
*/
|
|
97
125
|
export declare const buildCartProductAnswer: (questionId: string, overrides?: Partial<CartProductAnswer>) => CartProductAnswer;
|
|
98
126
|
/**
|
|
99
127
|
* Generates a list of CartProductAnswer objects with random data.
|
|
100
128
|
*
|
|
129
|
+
* @since 0.5.14
|
|
101
130
|
* @param {number} quantity The number of objects to be generated
|
|
102
|
-
* @returns {CartProductAnswer[]} An array of CartProductAnswer objects,
|
|
131
|
+
* @returns {CartProductAnswer[]} An array of CartProductAnswer objects,
|
|
132
|
+
* see {@link CartProductAnswer}
|
|
103
133
|
*/
|
|
104
134
|
export declare const genCartProductAnswers: (quantity?: number | undefined) => CartProductAnswer[];
|
|
105
135
|
/**
|
|
106
136
|
* Generates CartProductQuestion object with random data.
|
|
107
137
|
*
|
|
108
|
-
* @
|
|
138
|
+
* @since 0.5.14
|
|
139
|
+
* @param {Partial<CartProductQuestion>} overrides Properties to override
|
|
140
|
+
* a {@link CartProductQuestion}
|
|
109
141
|
* @returns {CartProductQuestion} A {@link CartProductQuestion} object
|
|
110
142
|
*/
|
|
111
143
|
export declare const buildCartProductQuestion: (overrides?: Partial<CartProductQuestion>) => CartProductQuestion;
|
|
112
144
|
/**
|
|
113
145
|
* Generates a list of CartProductQuestion objects with random data.
|
|
114
146
|
*
|
|
147
|
+
* @since 0.5.14
|
|
115
148
|
* @param {number} quantity The number of objects to be generated
|
|
116
|
-
* @returns {CartProductQuestion[]} An array of CartProductQuestion objects,
|
|
149
|
+
* @returns {CartProductQuestion[]} An array of CartProductQuestion objects,
|
|
150
|
+
* see {@link CartProductQuestion}
|
|
117
151
|
*/
|
|
118
152
|
export declare const genCartProductQuestions: (quantity?: number | undefined) => CartProductQuestion[];
|
|
119
153
|
/**
|
|
120
154
|
* Generates CartProduct object with random data.
|
|
121
155
|
*
|
|
122
|
-
* @
|
|
156
|
+
* @since 0.5.14
|
|
157
|
+
* @param {Partial<CartProduct>} overrides Properties to override
|
|
158
|
+
* a {@link CartProduct}
|
|
123
159
|
* @returns {CartProduct} A {@link CartProduct} object
|
|
124
160
|
*/
|
|
125
161
|
export declare const buildCartProduct: (overrides?: Partial<CartProduct>) => CartProduct;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Settings } from "@artisan-commerce/types";
|
|
2
|
+
/**
|
|
3
|
+
* Generates Settings object with random data.
|
|
4
|
+
*
|
|
5
|
+
* @since 0.5.15
|
|
6
|
+
* @param {Partial<Settings>} overrides Properties to override
|
|
7
|
+
* a {@link Settings}
|
|
8
|
+
* @returns {Settings} A {@link Settings} object
|
|
9
|
+
*/
|
|
10
|
+
export declare const buildSettings: (overrides?: Partial<Settings>) => Settings;
|
|
11
|
+
/**
|
|
12
|
+
* Generates a list of Settings objects with random data.
|
|
13
|
+
*
|
|
14
|
+
* @since 0.5.15
|
|
15
|
+
* @param {number} quantity The number of objects to be generated
|
|
16
|
+
* @returns {Settings[]} An array of Settings objects,
|
|
17
|
+
* see {@link Settings}
|
|
18
|
+
*/
|
|
19
|
+
export declare const genSettings: (quantity?: number | undefined) => Settings[];
|
|
@@ -1,16 +1,33 @@
|
|
|
1
1
|
import { ShippingAddress, LivingPlace, Field } from "@artisan-commerce/types";
|
|
2
2
|
import { Rule, Message } from "@artisan-commerce/types";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Generates a random street name.
|
|
5
|
+
*
|
|
6
|
+
* @since 0.5.14
|
|
7
|
+
*/
|
|
4
8
|
export declare const genStreetName: () => string;
|
|
5
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Generates a random street number.
|
|
11
|
+
*
|
|
12
|
+
* @since 0.5.14
|
|
13
|
+
*/
|
|
6
14
|
export declare const genStreetNumber: (format?: string | undefined) => string;
|
|
7
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Generates a random latitude.
|
|
17
|
+
*
|
|
18
|
+
* @since 0.5.14
|
|
19
|
+
*/
|
|
8
20
|
export declare const genLatitude: () => string;
|
|
9
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Generates a random longitude.
|
|
23
|
+
*
|
|
24
|
+
* @since 0.5.14
|
|
25
|
+
*/
|
|
10
26
|
export declare const genLongitude: () => string;
|
|
11
27
|
/**
|
|
12
28
|
* Generates Field object with random data.
|
|
13
29
|
*
|
|
30
|
+
* @since 0.5.14
|
|
14
31
|
* @param {Partial<Field>} overrides Properties to override a {@link Field}
|
|
15
32
|
* @returns {Field} A {@link Field} object
|
|
16
33
|
*/
|
|
@@ -18,6 +35,7 @@ export declare const buildField: (overrides?: Partial<Field>) => Field;
|
|
|
18
35
|
/**
|
|
19
36
|
* Generates a list of Field objects with random data.
|
|
20
37
|
*
|
|
38
|
+
* @since 0.5.14
|
|
21
39
|
* @param {number} quantity The number of objects to be generated
|
|
22
40
|
* @returns {Field[]} A list of {@link Field} objects
|
|
23
41
|
*/
|
|
@@ -25,13 +43,15 @@ export declare const genFields: (quantity?: number | undefined) => Field[];
|
|
|
25
43
|
/**
|
|
26
44
|
* Generates Rule object with random data.
|
|
27
45
|
*
|
|
28
|
-
* @
|
|
46
|
+
* @since 0.5.14
|
|
47
|
+
* @param {Partial<Rule>} overrides Properties to override a {@link Rule}
|
|
29
48
|
* @returns {Rule} A {@link Rule} object
|
|
30
49
|
*/
|
|
31
50
|
export declare const buildRule: (overrides?: Partial<Rule> | undefined) => Rule;
|
|
32
51
|
/**
|
|
33
52
|
* Generates Message object with random data.
|
|
34
53
|
*
|
|
54
|
+
* @since 0.5.14
|
|
35
55
|
* @param {Partial<Message>} overrides Properties to override a {@link Message}
|
|
36
56
|
* @returns {Message} A {@link Message} object
|
|
37
57
|
*/
|
|
@@ -39,6 +59,7 @@ export declare const buildMessage: (overrides?: Partial<Message> | undefined) =>
|
|
|
39
59
|
/**
|
|
40
60
|
* Generates a list of Rules objects with random data.
|
|
41
61
|
*
|
|
62
|
+
* @since 0.5.14
|
|
42
63
|
* @param {number} quantity The number of objects to be generated
|
|
43
64
|
* @returns {Rule[]} A list of {@link Rule} objects
|
|
44
65
|
*/
|
|
@@ -46,6 +67,7 @@ export declare const genRules: (quantity?: number | undefined) => Rule[];
|
|
|
46
67
|
/**
|
|
47
68
|
* Generates a list of Messages objects with random data.
|
|
48
69
|
*
|
|
70
|
+
* @since 0.5.14
|
|
49
71
|
* @param {number} quantity The number of objects to be generated
|
|
50
72
|
* @returns {Message[]} A list of {@link Message} objects
|
|
51
73
|
*/
|
|
@@ -53,13 +75,16 @@ export declare const genMessages: (quantity?: number | undefined) => Message[];
|
|
|
53
75
|
/**
|
|
54
76
|
* Generates LivingPlace object with random data.
|
|
55
77
|
*
|
|
56
|
-
* @
|
|
78
|
+
* @since 0.5.14
|
|
79
|
+
* @param {Partial<LivingPlace>} overrides Properties to override
|
|
80
|
+
* a {@link LivingPlace}
|
|
57
81
|
* @returns {LivingPlace} A {@link LivingPlace} object
|
|
58
82
|
*/
|
|
59
83
|
export declare const buildLivingPlace: (overrides?: Partial<LivingPlace>) => LivingPlace;
|
|
60
84
|
/**
|
|
61
85
|
* Generates a list of LivingPlaces objects with random data.
|
|
62
86
|
*
|
|
87
|
+
* @since 0.5.14
|
|
63
88
|
* @param {number} quantity The number of objects to be generated
|
|
64
89
|
* @returns {LivingPlace[]} A list of {@link LivingPlace} objects
|
|
65
90
|
*/
|
|
@@ -67,13 +92,16 @@ export declare const genLivingPlaces: (quantity?: number | undefined) => LivingP
|
|
|
67
92
|
/**
|
|
68
93
|
* Generates ShippingAddress object with random data.
|
|
69
94
|
*
|
|
70
|
-
* @
|
|
95
|
+
* @since 0.5.14
|
|
96
|
+
* @param {Partial<ShippingAddress>} overrides Properties to override
|
|
97
|
+
* a {@link ShippingAddress}
|
|
71
98
|
* @returns {ShippingAddress} A {@link ShippingAddress} object
|
|
72
99
|
*/
|
|
73
100
|
export declare const buildShippingAddress: (overrides?: Partial<ShippingAddress>) => ShippingAddress;
|
|
74
101
|
/**
|
|
75
102
|
* Generates a list of ShippingAddresses objects with random data.
|
|
76
103
|
*
|
|
104
|
+
* @since 0.5.14
|
|
77
105
|
* @param {number} quantity The number of objects to be generated
|
|
78
106
|
* @returns {ShippingAddress[]} A list of {@link ShippingAddress} objects
|
|
79
107
|
*/
|
|
@@ -5,21 +5,27 @@ import { CartStore, Objectify } from "@artisan-commerce/types";
|
|
|
5
5
|
/**
|
|
6
6
|
* Generates BillTotalCategory object with random data.
|
|
7
7
|
*
|
|
8
|
-
* @
|
|
8
|
+
* @since 0.5.14
|
|
9
|
+
* @param {Partial<BillTotalCategory>} overrides Properties to override
|
|
10
|
+
* a {@link BillTotalCategory}
|
|
9
11
|
* @returns {BillTotalCategory} A {@link BillTotalCategory} object
|
|
10
12
|
*/
|
|
11
13
|
export declare const buildBillTotalNormalCategory: (overrides?: Partial<BillTotalCategory>) => BillTotalCategory;
|
|
12
14
|
/**
|
|
13
15
|
* Generates BillTotal object with random data.
|
|
14
16
|
*
|
|
15
|
-
* @
|
|
17
|
+
* @since 0.5.14
|
|
18
|
+
* @param {Partial<BillTotal>} overrides Properties to override
|
|
19
|
+
* a {@link BillTotal}
|
|
16
20
|
* @returns {BillTotal} A {@link BillTotal} object
|
|
17
21
|
*/
|
|
18
22
|
export declare const buildBillTotal: (overrides?: Partial<BillTotal>) => BillTotal;
|
|
19
23
|
/**
|
|
20
24
|
* Generates CartStore object with random data.
|
|
21
25
|
*
|
|
22
|
-
* @
|
|
26
|
+
* @since 0.5.14
|
|
27
|
+
* @param {Partial<CartStore>} overrides Properties to override
|
|
28
|
+
* a {@link CartStore}
|
|
23
29
|
* @returns {CartStore} A {@link CartStore} object
|
|
24
30
|
*/
|
|
25
31
|
export declare const buildCartStore: (overrides?: Partial<CartStore>) => CartStore;
|
|
@@ -27,6 +33,7 @@ export declare const buildCartStore: (overrides?: Partial<CartStore>) => CartSto
|
|
|
27
33
|
* Generates a CartStore object where the key is the store id
|
|
28
34
|
* and the value is the cart store object
|
|
29
35
|
*
|
|
36
|
+
* @since 0.5.14
|
|
30
37
|
* @param {number} quantity The number of objects to be generated
|
|
31
38
|
* @returns {Objectify<CartStore>} An Objectify<{@link CartStore}>
|
|
32
39
|
*/
|
|
@@ -34,28 +41,36 @@ export declare const genCartStores: (quantity?: number | undefined) => Objectify
|
|
|
34
41
|
/**
|
|
35
42
|
* Generates ShoppingCart object with random data.
|
|
36
43
|
*
|
|
37
|
-
* @
|
|
44
|
+
* @since 0.5.14
|
|
45
|
+
* @param {Partial<ShoppingCart>} overrides Properties to override
|
|
46
|
+
* a {@link ShoppingCart}
|
|
38
47
|
* @returns {ShoppingCart} A {@link ShoppingCart} object
|
|
39
48
|
*/
|
|
40
49
|
export declare const buildShoppingCart: (overrides?: Partial<ShoppingCart>) => ShoppingCart;
|
|
41
50
|
/**
|
|
42
51
|
* Generates ShippingCost object with random data.
|
|
43
52
|
*
|
|
44
|
-
* @
|
|
53
|
+
* @since 0.5.14
|
|
54
|
+
* @param {Partial<ShippingCost>} overrides Properties to override
|
|
55
|
+
* a {@link ShippingCost}
|
|
45
56
|
* @returns {ShippingCost} A {@link ShippingCost} object
|
|
46
57
|
*/
|
|
47
58
|
export declare const buildShippingCost: (overrides?: Partial<ShippingCost>) => ShippingCost;
|
|
48
59
|
/**
|
|
49
60
|
* Generates ShippingCostTax object with random data.
|
|
50
61
|
*
|
|
51
|
-
* @
|
|
62
|
+
* @since 0.5.14
|
|
63
|
+
* @param {Partial<ShippingCostTax>} overrides Properties to override
|
|
64
|
+
* a {@link ShippingCostTax}
|
|
52
65
|
* @returns {ShippingCostTax} A {@link ShippingCostTax} object
|
|
53
66
|
*/
|
|
54
67
|
export declare const buildShippingCostTax: (overrides?: Partial<ShippingCostTax>) => ShippingCostTax;
|
|
55
68
|
/**
|
|
56
69
|
* Generates a list of ShippingCostTax objects with random data.
|
|
57
70
|
*
|
|
71
|
+
* @since 0.5.14
|
|
58
72
|
* @param {number} quantity The number of objects to be generated
|
|
59
|
-
* @returns {ShippingCostTax[]} An array of shipping cost taxes objects,
|
|
73
|
+
* @returns {ShippingCostTax[]} An array of shipping cost taxes objects,
|
|
74
|
+
* see {@link ShippingCostTax}
|
|
60
75
|
*/
|
|
61
76
|
export declare const genShippingCostTaxes: (quantity?: number | undefined) => ShippingCostTax[];
|