@artisan-commerce/builders 0.7.0-canary.39 → 0.7.0-canary.4

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 (41) hide show
  1. package/CHANGELOG.md +0 -306
  2. package/build/builders/account.builder.d.ts +17 -0
  3. package/build/builders/banner.builder.d.ts +35 -0
  4. package/build/builders/billingData.builder.d.ts +18 -0
  5. package/build/builders/catalogue.builder.d.ts +18 -0
  6. package/build/builders/category.builder.d.ts +36 -0
  7. package/build/builders/common.builder.d.ts +204 -0
  8. package/build/builders/country.builder.d.ts +44 -0
  9. package/build/builders/coupon.builder.d.ts +50 -0
  10. package/build/builders/fulfillment.builder.d.ts +187 -0
  11. package/build/builders/image.builder.d.ts +34 -0
  12. package/build/builders/notification.builder.d.ts +19 -0
  13. package/build/builders/order.builder.d.ts +167 -0
  14. package/build/builders/payment.builder.d.ts +93 -0
  15. package/build/builders/product.builder.d.ts +161 -0
  16. package/build/builders/settings.builder.d.ts +37 -0
  17. package/build/builders/shippingAddress.builder.d.ts +108 -0
  18. package/build/builders/shoppingCart.builder.d.ts +76 -0
  19. package/build/builders/store.builder.d.ts +106 -0
  20. package/build/builders/user.builder.d.ts +17 -0
  21. package/build/builders/vendor.builder.d.ts +17 -0
  22. package/build/config/constants.d.ts +2 -0
  23. package/build/data/products.data.d.ts +4 -0
  24. package/build/index.d.ts +23 -0
  25. package/build/lib/artisn.d.ts +5 -0
  26. package/build/main.bundle.js +10 -0
  27. package/build/report.json +1 -0
  28. package/build/types/artisn.types.d.ts +1 -0
  29. package/build/types/product.types.d.ts +6 -0
  30. package/build/utils/artisn.utils.d.ts +2 -0
  31. package/build/utils/common.utils.d.ts +8 -0
  32. package/build/vendors.bundle.js +1 -0
  33. package/build/vendors.d.ts +1 -0
  34. package/package.json +55 -25
  35. package/dist/bundle.cjs.js +0 -143916
  36. package/dist/bundle.cjs.js.map +0 -1
  37. package/dist/bundle.d.ts +0 -2894
  38. package/dist/bundle.esm.js +0 -143893
  39. package/dist/bundle.esm.js.map +0 -1
  40. package/dist/bundle.umd.js +0 -143920
  41. package/dist/bundle.umd.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -3,312 +3,6 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [0.7.0-canary.39](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.38...@artisan-commerce/builders@0.7.0-canary.39) (2022-03-07)
7
-
8
- **Note:** Version bump only for package @artisan-commerce/builders
9
-
10
-
11
-
12
-
13
-
14
- ## [0.7.0-canary.38](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.37...@artisan-commerce/builders@0.7.0-canary.38) (2022-02-03)
15
-
16
-
17
- ### Features
18
-
19
- * **benefit:** add handle to discount_fixed ([b2f2381](https://bitbucket.org/tradesystem/artisn_sdk/commit/b2f23811e8a54018f4056f9d8593d035f86dd499))
20
- * **benefit:** update applyBenefit service ([d393665](https://bitbucket.org/tradesystem/artisn_sdk/commit/d393665edd5de83002d95e7e52a301c1e3631704))
21
-
22
-
23
-
24
- ## [0.7.0-canary.37](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.36...@artisan-commerce/builders@0.7.0-canary.37) (2022-01-14)
25
-
26
-
27
- ### Bug Fixes
28
-
29
- * **artisn:** delete base64 key ([95cda3c](https://bitbucket.org/tradesystem/artisn_sdk/commit/95cda3c4209f6057c4fe6a8aa847e750faf68a21))
30
-
31
-
32
-
33
- ## [0.7.0-canary.36](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.35...@artisan-commerce/builders@0.7.0-canary.36) (2022-01-06)
34
-
35
-
36
- ### Bug Fixes
37
-
38
- * **artisn:** fix order builder ([99de539](https://bitbucket.org/tradesystem/artisn_sdk/commit/99de53900afcfb09ee45eb26a7a8ac0dc38c2078))
39
-
40
-
41
-
42
- ## [0.7.0-canary.35](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.34...@artisan-commerce/builders@0.7.0-canary.35) (2021-12-28)
43
-
44
- **Note:** Version bump only for package @artisan-commerce/builders
45
-
46
-
47
-
48
-
49
-
50
- ## [0.7.0-canary.34](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.33...@artisan-commerce/builders@0.7.0-canary.34) (2021-12-15)
51
-
52
- **Note:** Version bump only for package @artisan-commerce/builders
53
-
54
-
55
-
56
-
57
-
58
- ## [0.7.0-canary.33](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.32...@artisan-commerce/builders@0.7.0-canary.33) (2021-12-13)
59
-
60
-
61
- ### Bug Fixes
62
-
63
- * **global:** fix types and builder for order store ([35286a9](https://bitbucket.org/tradesystem/artisn_sdk/commit/35286a92e5e3df2fe5b3cfa5f289a0e321a24128))
64
-
65
-
66
-
67
- ## [0.7.0-canary.32](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.31...@artisan-commerce/builders@0.7.0-canary.32) (2021-12-01)
68
-
69
-
70
- ### Features
71
-
72
- * **global:** update and add types and builders for notifications ([5d6902b](https://bitbucket.org/tradesystem/artisn_sdk/commit/5d6902ba54a84d14a783b5bcda3381ec68a1e636))
73
-
74
-
75
-
76
- ## [0.7.0-canary.31](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.30...@artisan-commerce/builders@0.7.0-canary.31) (2021-11-09)
77
-
78
-
79
- ### Bug Fixes
80
-
81
- * **builders:** add width and height to coupon detail ([4c63fa0](https://bitbucket.org/tradesystem/artisn_sdk/commit/4c63fa08ad450d22cfc6f31c5783e850b12570e2))
82
-
83
-
84
-
85
- ## [0.7.0-canary.30](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.29...@artisan-commerce/builders@0.7.0-canary.30) (2021-11-05)
86
-
87
-
88
- ### Features
89
-
90
- * **global:** fix types and builders for store coupon and add condition to shipping cost ([2800a87](https://bitbucket.org/tradesystem/artisn_sdk/commit/2800a87a326c9f0ca5e0f1fbe202e15768fc32c9))
91
-
92
-
93
-
94
- ## [0.7.0-canary.29](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.28...@artisan-commerce/builders@0.7.0-canary.29) (2021-10-27)
95
-
96
-
97
- ### Bug Fixes
98
-
99
- * **global:** move buffer dependency from global to builders package ([6ce5afd](https://bitbucket.org/tradesystem/artisn_sdk/commit/6ce5afd67002b617845089885a0e139ec821ef6d))
100
-
101
-
102
-
103
- ## [0.7.0-canary.28](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.27...@artisan-commerce/builders@0.7.0-canary.28) (2021-10-22)
104
-
105
-
106
- ### Bug Fixes
107
-
108
- * **builders:** remove warning when using random from faker ([b914f7c](https://bitbucket.org/tradesystem/artisn_sdk/commit/b914f7cd501649bcfc7846efc1b38b279becb975))
109
-
110
-
111
-
112
- ## [0.7.0-canary.27](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.26...@artisan-commerce/builders@0.7.0-canary.27) (2021-10-22)
113
-
114
-
115
- ### Features
116
-
117
- * **global:** add interfaces, functions and services for store coupons ([7e8a959](https://bitbucket.org/tradesystem/artisn_sdk/commit/7e8a95998982e8c8b892b61eb709e98ac7671a09))
118
- * **global:** add missing interface and docs ([e7fca2f](https://bitbucket.org/tradesystem/artisn_sdk/commit/e7fca2f5a608a592380b8cd9aafab04cc32ce13d))
119
-
120
-
121
-
122
- ## [0.7.0-canary.26](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.25...@artisan-commerce/builders@0.7.0-canary.26) (2021-10-21)
123
-
124
- **Note:** Version bump only for package @artisan-commerce/builders
125
-
126
-
127
-
128
-
129
-
130
- ## [0.7.0-canary.25](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.24...@artisan-commerce/builders@0.7.0-canary.25) (2021-10-21)
131
-
132
- **Note:** Version bump only for package @artisan-commerce/builders
133
-
134
-
135
-
136
-
137
-
138
- ## [0.7.0-canary.24](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.23...@artisan-commerce/builders@0.7.0-canary.24) (2021-10-20)
139
-
140
- **Note:** Version bump only for package @artisan-commerce/builders
141
-
142
-
143
-
144
-
145
-
146
- ## [0.7.0-canary.23](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.22...@artisan-commerce/builders@0.7.0-canary.23) (2021-10-19)
147
-
148
-
149
- ### Bug Fixes
150
-
151
- * **global:** add interfaces and builders for order ([53d18b0](https://bitbucket.org/tradesystem/artisn_sdk/commit/53d18b07c53fa54f9af69a0751b94a95452bfdc3))
152
- * **global:** fix tax calculation builder ([3f7698f](https://bitbucket.org/tradesystem/artisn_sdk/commit/3f7698f1cfdf97e2b8d8fa4040b70a7cfa150b74))
153
-
154
-
155
-
156
- ## [0.7.0-canary.22](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.21...@artisan-commerce/builders@0.7.0-canary.22) (2021-10-18)
157
-
158
-
159
- ### Bug Fixes
160
-
161
- * **global:** fix aritsn-rn package ([b18d632](https://bitbucket.org/tradesystem/artisn_sdk/commit/b18d632d539bf1e748c1d5f83e4bc73747a7e467))
162
-
163
-
164
-
165
- ## [0.7.0-canary.21](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.20...@artisan-commerce/builders@0.7.0-canary.21) (2021-10-14)
166
-
167
-
168
- ### Bug Fixes
169
-
170
- * **global:** make export not module by default ([4e701b1](https://bitbucket.org/tradesystem/artisn_sdk/commit/4e701b1b59df89cf8358cf500984b1c2c4f42c60))
171
-
172
-
173
-
174
- ## [0.7.0-canary.20](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.19...@artisan-commerce/builders@0.7.0-canary.20) (2021-10-14)
175
-
176
-
177
- ### Bug Fixes
178
-
179
- * **global:** fix some payment types ([8000970](https://bitbucket.org/tradesystem/artisn_sdk/commit/80009700cd8664828b1236e8ad7cc90ce2fcb3e7))
180
-
181
-
182
-
183
- ## [0.7.0-canary.19](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.18...@artisan-commerce/builders@0.7.0-canary.19) (2021-10-14)
184
-
185
- **Note:** Version bump only for package @artisan-commerce/builders
186
-
187
-
188
-
189
-
190
-
191
- ## [0.7.0-canary.18](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.17...@artisan-commerce/builders@0.7.0-canary.18) (2021-10-13)
192
-
193
-
194
- ### Features
195
-
196
- * **global:** fix builder and types to adjust better to reality ([11cdb93](https://bitbucket.org/tradesystem/artisn_sdk/commit/11cdb93199d5a57d12f5aa6f7ece17f0c38c0521))
197
- * **global:** fix unnecessary params on functions and add docs ([3830d7d](https://bitbucket.org/tradesystem/artisn_sdk/commit/3830d7d8b0044ca580bcbcc4acd0b0ea5a8b0266))
198
-
199
-
200
-
201
- ## [0.7.0-canary.17](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.16...@artisan-commerce/builders@0.7.0-canary.17) (2021-10-05)
202
-
203
-
204
- ### Bug Fixes
205
-
206
- * **global:** fix ProductDetail builder and update its types ([cdc6cf9](https://bitbucket.org/tradesystem/artisn_sdk/commit/cdc6cf9ed2e7ff1a340bc691b0dc1156bc682d38))
207
-
208
-
209
-
210
- ## [0.7.0-canary.16](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.15...@artisan-commerce/builders@0.7.0-canary.16) (2021-10-01)
211
-
212
- **Note:** Version bump only for package @artisan-commerce/builders
213
-
214
-
215
-
216
-
217
-
218
- ## [0.7.0-canary.15](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.14...@artisan-commerce/builders@0.7.0-canary.15) (2021-09-30)
219
-
220
- **Note:** Version bump only for package @artisan-commerce/builders
221
-
222
-
223
-
224
-
225
-
226
- ## [0.7.0-canary.14](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.13...@artisan-commerce/builders@0.7.0-canary.14) (2021-09-30)
227
-
228
- **Note:** Version bump only for package @artisan-commerce/builders
229
-
230
-
231
-
232
-
233
-
234
- ## [0.7.0-canary.13](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.12...@artisan-commerce/builders@0.7.0-canary.13) (2021-09-23)
235
-
236
-
237
- ### Bug Fixes
238
-
239
- * **global:** update types of CDNImage, reduce the depth of product questions ([82dba32](https://bitbucket.org/tradesystem/artisn_sdk/commit/82dba324457455e6cd2d76091aaffaef5f540d9f))
240
-
241
-
242
-
243
- ## [0.7.0-canary.12](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.11...@artisan-commerce/builders@0.7.0-canary.12) (2021-09-21)
244
-
245
-
246
- ### Bug Fixes
247
-
248
- * **global:** fix product details and settings builders ([5452fc9](https://bitbucket.org/tradesystem/artisn_sdk/commit/5452fc9d70ff3fa9f859ed4a665fd933e133c7ce))
249
-
250
-
251
-
252
- ## [0.7.0-canary.11](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.10...@artisan-commerce/builders@0.7.0-canary.11) (2021-09-17)
253
-
254
-
255
- ### Features
256
-
257
- * **global:** add categories property to product details interface ([0d95d09](https://bitbucket.org/tradesystem/artisn_sdk/commit/0d95d093383673322369b0870af290182bb57cb8))
258
-
259
-
260
-
261
- ## [0.7.0-canary.10](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.9...@artisan-commerce/builders@0.7.0-canary.10) (2021-08-25)
262
-
263
- **Note:** Version bump only for package @artisan-commerce/builders
264
-
265
-
266
-
267
-
268
-
269
- ## [0.7.0-canary.9](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.8...@artisan-commerce/builders@0.7.0-canary.9) (2021-08-25)
270
-
271
- **Note:** Version bump only for package @artisan-commerce/builders
272
-
273
-
274
-
275
-
276
-
277
- ## [0.7.0-canary.8](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.7...@artisan-commerce/builders@0.7.0-canary.8) (2021-08-24)
278
-
279
- **Note:** Version bump only for package @artisan-commerce/builders
280
-
281
-
282
-
283
-
284
-
285
- ## [0.7.0-canary.7](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.6...@artisan-commerce/builders@0.7.0-canary.7) (2021-08-23)
286
-
287
-
288
- ### Bug Fixes
289
-
290
- * **global:** add missing properties to order interfaces and types ([757157f](https://bitbucket.org/tradesystem/artisn_sdk/commit/757157fbb2dd25d04efc791cd9b9511e41685471))
291
-
292
-
293
-
294
- ## [0.7.0-canary.6](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.5...@artisan-commerce/builders@0.7.0-canary.6) (2021-08-23)
295
-
296
-
297
- ### Bug Fixes
298
-
299
- * **global:** add missing properties to shipping address and complete document type ([c9156f6](https://bitbucket.org/tradesystem/artisn_sdk/commit/c9156f6db3e55f23479484577760f5196e112afc))
300
-
301
-
302
-
303
- ## [0.7.0-canary.5](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.4...@artisan-commerce/builders@0.7.0-canary.5) (2021-08-12)
304
-
305
-
306
- ### Bug Fixes
307
-
308
- * **global:** add CountryCode type and update user builder ([f94eb5d](https://bitbucket.org/tradesystem/artisn_sdk/commit/f94eb5d38e0725bd157398e3c51b3bb8b2592abc))
309
-
310
-
311
-
312
6
  ## [0.7.0-canary.4](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.3...@artisan-commerce/builders@0.7.0-canary.4) (2021-08-12)
313
7
 
314
8
 
@@ -0,0 +1,17 @@
1
+ import { Account } from "@artisan-commerce/types";
2
+ /**
3
+ * Generates Account object with random data.
4
+ *
5
+ * @since 0.5.14
6
+ * @param {Partial<Account>} overrides Properties to override a {@link Account}
7
+ * @returns {Account} A {@link Account} object
8
+ */
9
+ export declare const buildAccount: (overrides?: Partial<Account>) => Account;
10
+ /**
11
+ * Generates a list of Account objects with random data.
12
+ *
13
+ * @since 0.5.14
14
+ * @param {number} quantity The number of objects to be generated
15
+ * @returns {Account[]} An array of {@link Account}s objects
16
+ */
17
+ export declare const genAccounts: (quantity?: number | undefined) => Account[];
@@ -0,0 +1,35 @@
1
+ import { BannerImage } from "@artisan-commerce/types";
2
+ import { Banner } from "@artisan-commerce/types";
3
+ /**
4
+ * Generates banner object with random data.
5
+ *
6
+ * @since 0.5.14
7
+ * @param {Partial<Banner>} overrides Properties to override a {@link Banner}
8
+ * @returns {Banner} A {@link Banner} object
9
+ */
10
+ export declare const buildBanner: (overrides?: Partial<Banner>) => Banner;
11
+ /**
12
+ * Generates a list of Banner objects with random data.
13
+ *
14
+ * @since 0.5.14
15
+ * @param {number} quantity The number of objects to be generated
16
+ * @returns {Banner[]} An array of {@link Banner}s objects
17
+ */
18
+ export declare const genBanners: (quantity?: number | undefined) => Banner[];
19
+ /**
20
+ * Generates BannerImage object with random data.
21
+ *
22
+ * @since 0.5.14
23
+ * @param {Partial<BannerImage>} overrides Properties to override
24
+ * a {@link BannerImage}
25
+ * @returns {BannerImage} A {@link BannerImage} object
26
+ */
27
+ export declare const buildBannerImage: (overrides?: Partial<BannerImage>) => BannerImage;
28
+ /**
29
+ * Generates a list of banner image objects with random data.
30
+ *
31
+ * @since 0.5.14
32
+ * @param {number} quantity The number of objects to be generated
33
+ * @returns {BannerImage[]} An array of banner images, see {@link BannerImage}
34
+ */
35
+ export declare const genBannerImages: (quantity?: number | undefined) => BannerImage[];
@@ -0,0 +1,18 @@
1
+ import { BillingData } from "@artisan-commerce/types";
2
+ /**
3
+ * Generates BillingData object with random data.
4
+ *
5
+ * @since 0.5.14
6
+ * @param {Partial<BillingData>} overrides Properties to override
7
+ * a {@link BillingData}
8
+ * @returns {BillingData} A {@link BillingData} object
9
+ */
10
+ export declare const buildBillingData: (overrides?: Partial<BillingData>) => BillingData;
11
+ /**
12
+ * Generates a list of Billing Data objects with random data.
13
+ *
14
+ * @since 0.5.14
15
+ * @param {number} quantity The number of objects to be generated
16
+ * @returns {BillingData[]} An array of {@link BillingData}s objects
17
+ */
18
+ export declare const genBillingData: (quantity?: number | undefined) => BillingData[];
@@ -0,0 +1,18 @@
1
+ import { Catalogue } from "@artisan-commerce/types";
2
+ /**
3
+ * Generates Catalogue object with random data.
4
+ *
5
+ * @since 0.5.14
6
+ * @param {Partial<Catalogue>} overrides Properties to override
7
+ * a {@link Catalogue}
8
+ * @returns {Catalogue} A {@link Catalogue} object
9
+ */
10
+ export declare const buildCatalogue: (overrides?: Partial<Catalogue>) => Catalogue;
11
+ /**
12
+ * Generates a list of Catalogue objects with custom data.
13
+ *
14
+ * @since 0.5.14
15
+ * @param {number} quantity The number of objects to be generated
16
+ * @returns {Catalogue[]} An array of {@link Catalogue}s objects
17
+ */
18
+ export declare const genCatalogues: (quantity?: number | undefined) => Catalogue[];
@@ -0,0 +1,36 @@
1
+ import { Category, CategoryWithProducts } from "@artisan-commerce/types";
2
+ /**
3
+ * Generates Category object with random data.
4
+ *
5
+ * @since 0.5.14
6
+ * @param {Partial<Category>} overrides Properties to override
7
+ * a {@link Category}
8
+ * @returns {Category} A {@link Category} object
9
+ */
10
+ export declare const buildCategory: (overrides?: Partial<Category>) => Category;
11
+ /**
12
+ * Generates a list of Category objects with random data.
13
+ *
14
+ * @since 0.5.14
15
+ * @param {number} quantity The number of objects to be generated
16
+ * @returns {Category[]} An array of categories objects, see {@link Category}
17
+ */
18
+ export declare const genCategories: (quantity?: number | undefined) => Category[];
19
+ /**
20
+ * Generates CategoryWithProducts object with random data.
21
+ *
22
+ * @since 0.5.14
23
+ * @param {Partial<CategoryWithProducts>} overrides Properties to override
24
+ * a {@link CategoryWithProducts}
25
+ * @returns {CategoryWithProducts} A {@link CategoryWithProducts} object
26
+ */
27
+ export declare const buildCategoryWithProducts: (overrides?: Partial<CategoryWithProducts>) => CategoryWithProducts;
28
+ /**
29
+ * Generates a list of CategoryWithProducts objects with random data.
30
+ *
31
+ * @since 0.5.14
32
+ * @param {number} quantity The number of objects to be generated
33
+ * @returns {CategoryWithProducts[]} An array of products by categories,
34
+ * see {@link CategoryWithProducts}
35
+ */
36
+ export declare const genCategoryWithProducts: (quantity?: number | undefined) => CategoryWithProducts[];
@@ -0,0 +1,204 @@
1
+ import { DocumentType } from "@artisan-commerce/types";
2
+ import { CountrySummary, RandomImageConfig } from "@artisan-commerce/types";
3
+ /**
4
+ * Generates a random password.
5
+ *
6
+ * @since 0.5.14
7
+ * @param {any[]} args An array of arguments to be passed when
8
+ * generating the password
9
+ * @returns A random password
10
+ */
11
+ export declare const getPassword: (...args: any[]) => string;
12
+ /**
13
+ * Generates a random username.
14
+ *
15
+ * @since 0.5.14
16
+ */
17
+ export declare const getUsername: (firstName?: string | undefined, lastName?: string | undefined) => string;
18
+ /**
19
+ * Generates a random unique identifier.
20
+ *
21
+ * @since 0.5.14
22
+ */
23
+ export declare const genId: () => string;
24
+ /**
25
+ * Generates a random id of type number.
26
+ *
27
+ * @since 0.5.14
28
+ */
29
+ export declare const genNumericId: () => number;
30
+ /**
31
+ * Generates a random word.
32
+ *
33
+ * @since 0.5.14
34
+ */
35
+ export declare const genWord: () => string;
36
+ /**
37
+ * Generates a random address.
38
+ *
39
+ * @since 0.5.14
40
+ */
41
+ export declare const genAddress: (useFullAddress?: boolean | undefined) => string;
42
+ /**
43
+ * Generates a random name.
44
+ *
45
+ * @since 0.5.14
46
+ */
47
+ export declare const genName: (firstName?: string | undefined, lastName?: string | undefined, gender?: number | undefined) => string;
48
+ /**
49
+ * Generates a random email.
50
+ *
51
+ * @since 0.5.14
52
+ */
53
+ export declare const genEmail: (firstName?: string | undefined, lastName?: string | undefined, provider?: string | undefined) => string;
54
+ /**
55
+ * Generates a random company name.
56
+ *
57
+ * @since 0.5.14
58
+ */
59
+ export declare const genCompanyName: (format?: number | undefined) => string;
60
+ /**
61
+ * Generates a random paragraph.
62
+ *
63
+ * @since 0.5.14
64
+ */
65
+ export declare const genParagraph: (sentenceCount?: number | undefined) => string;
66
+ /**
67
+ * Generates a random title containing 3 words.
68
+ *
69
+ * @since 0.5.14
70
+ */
71
+ export declare const genTitle: () => string;
72
+ /**
73
+ * Generates a random number.
74
+ *
75
+ * @since 0.5.14
76
+ */
77
+ export declare const genNumber: {
78
+ (max?: number | undefined): number;
79
+ (options?: {
80
+ min?: number | undefined;
81
+ max?: number | undefined;
82
+ precision?: number | undefined;
83
+ } | undefined): number;
84
+ };
85
+ /**
86
+ * Generates a random boolean value.
87
+ *
88
+ * @since 0.5.14
89
+ */
90
+ export declare const getBoolean: () => boolean;
91
+ /**
92
+ * Generates a random country name.
93
+ *
94
+ * @since 0.5.14
95
+ */
96
+ export declare const genCountryName: () => string;
97
+ /**
98
+ * Generates a random image based on custom configuration.
99
+ *
100
+ * @since 0.5.15
101
+ * @param {RandomImageConfig} randomImageConfig Configuration
102
+ * to generate a random image
103
+ * @returns {string} An url of the image generated
104
+ */
105
+ export declare const genRandomImage: (randomImageConfig?: RandomImageConfig | undefined) => string;
106
+ /** Generates random words.
107
+ *
108
+ * @since 0.5.14
109
+ * @param {number} words The quantity of words to be generated
110
+ */
111
+ export declare const genWords: (words?: number | undefined) => string;
112
+ /**
113
+ * Generates a random internet url.
114
+ *
115
+ * @since 0.5.14
116
+ */
117
+ export declare const genURL: () => string;
118
+ /**
119
+ * Generates a random date in ISO format.
120
+ *
121
+ * @since 0.5.14
122
+ */
123
+ export declare const genDate: () => string;
124
+ /**
125
+ * Generates a random base64 value.
126
+ *
127
+ * @since 0.5.14
128
+ */
129
+ export declare const genBase64: () => string;
130
+ /**
131
+ * Generates a random boolean value.
132
+ *
133
+ * @since 0.5.14
134
+ * @param {number} bias A number between 0 and 1 which will be used
135
+ * to generate a boolean
136
+ * @throws Error if bias is not between 0 and 1
137
+ * @returns {boolean} A boolean value
138
+ */
139
+ export declare const genBiasBoolean: (bias: number) => boolean;
140
+ /**
141
+ * Generates a random document.
142
+ *
143
+ * @since 0.5.14
144
+ * @param {number} digits The number of digits with which the document
145
+ * will be generated
146
+ * @returns {string} A random document
147
+ */
148
+ export declare const genDocument: (digits: number) => string;
149
+ /**
150
+ * Generates a random document type.
151
+ *
152
+ * @since 0.5.14
153
+ */
154
+ export declare const genDocumentType: () => DocumentType;
155
+ /**
156
+ * Generates a random mobile phone with the country code provided.
157
+ *
158
+ * @since 0.5.14
159
+ * @param {string} countryCode Country calling code
160
+ * @returns {string} A string like a mobile phone
161
+ */
162
+ export declare const genMobilPhone: (countryCode: string) => string;
163
+ /**
164
+ * Generates a Country Summary object with random data.
165
+ *
166
+ * @since 0.5.14
167
+ * @param {number} id Country specific id
168
+ * @param {string} name Country specific name
169
+ * @returns {CountrySummary} A {@link CountrySummary} object
170
+ */
171
+ export declare const genCountry: (id?: number | undefined, name?: string | undefined) => CountrySummary;
172
+ /**
173
+ * Fills a number of type string with characters.
174
+ *
175
+ * @since 0.5.14
176
+ * @param {string} num A string, the length of it will
177
+ * be used to fill the number
178
+ * @param {number} max A number, the length of it will
179
+ * be used to fill the number
180
+ * @returns {string} A string filled with the data passed
181
+ */
182
+ export declare const fillNumber: (num: string, max?: number | undefined) => string;
183
+ /**
184
+ * Chooses a random item inside the array provided.
185
+ *
186
+ * @since 0.5.14
187
+ * @param {T[]} arr An array of generic items
188
+ * @returns {T} A random item of the array passed as param
189
+ */
190
+ export declare const chooseRandom: <T>(arr: T[]) => T;
191
+ /**
192
+ * Chooses a random enum value of the enum provided.
193
+ *
194
+ * @since 0.5.14
195
+ * @param {T} anEnum An enum
196
+ * @returns {T[keyof T]} A random item of the enum passed as param
197
+ */
198
+ export declare const chooseRandomEnum: <T>(anEnum: T) => T[keyof T];
199
+ /**
200
+ * Generates a random currency symbol.
201
+ *
202
+ * @since 0.5.14
203
+ */
204
+ export declare const genSymbol: string;
@@ -0,0 +1,44 @@
1
+ import { Country, CountryCurrency, CountryTax } from "@artisan-commerce/types";
2
+ /**
3
+ * Generates CountryCurrency object with random data.
4
+ *
5
+ * @since 0.5.14
6
+ * @param {Partial<CountryCurrency>} overrides Properties to override
7
+ * a {@link CountryCurrency}
8
+ * @returns {CountryCurrency} A {@link CountryCurrency} object
9
+ */
10
+ export declare const buildCountryCurrency: (overrides?: Partial<CountryCurrency>) => CountryCurrency;
11
+ /**
12
+ * Generates CountryTax object with random data.
13
+ *
14
+ * @since 0.5.14
15
+ * @param {Partial<CountryTax>} overrides Properties to override a
16
+ * {@link CountryTax}
17
+ * @returns {CountryTax} A {@link CountryTax} object
18
+ */
19
+ export declare const buildCountryTax: (overrides?: Partial<CountryTax>) => CountryTax;
20
+ /**
21
+ * Generates a list of CountryTax objects with random data.
22
+ *
23
+ * @since 0.5.14
24
+ * @param {number} quantity The number of objects to be generated
25
+ * @returns {CountryTax[]} An array of categories objects,
26
+ * see {@link CountryTax}
27
+ */
28
+ export declare const genCountryTax: (quantity?: number | undefined) => CountryTax[];
29
+ /**
30
+ * Generates Country object with random data.
31
+ *
32
+ * @since 0.5.14
33
+ * @param {Partial<Country>} overrides Properties to override a {@link Country}
34
+ * @returns {Country} A {@link Country} object
35
+ */
36
+ export declare const buildCountry: (overrides?: Partial<Country>) => Country;
37
+ /**
38
+ * Generates a list of countries objects with random data.
39
+ *
40
+ * @since 0.5.14
41
+ * @param {number} quantity The number of objects to be generated
42
+ * @returns An array of countries objects, see {@link Country}
43
+ */
44
+ export declare const genCountries: (quantity?: number | undefined) => Country[];