@artisan-commerce/builders 0.7.0-canary.29 → 0.7.0-canary.3

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 -227
  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 -143745
  36. package/dist/bundle.cjs.js.map +0 -1
  37. package/dist/bundle.d.ts +0 -2675
  38. package/dist/bundle.esm.js +0 -143722
  39. package/dist/bundle.esm.js.map +0 -1
  40. package/dist/bundle.umd.js +0 -143749
  41. package/dist/bundle.umd.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -3,233 +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.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)
7
-
8
-
9
- ### Bug Fixes
10
-
11
- * **global:** move buffer dependency from global to builders package ([6ce5afd](https://bitbucket.org/tradesystem/artisn_sdk/commit/6ce5afd67002b617845089885a0e139ec821ef6d))
12
-
13
-
14
-
15
- ## [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)
16
-
17
-
18
- ### Bug Fixes
19
-
20
- * **builders:** remove warning when using random from faker ([b914f7c](https://bitbucket.org/tradesystem/artisn_sdk/commit/b914f7cd501649bcfc7846efc1b38b279becb975))
21
-
22
-
23
-
24
- ## [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)
25
-
26
-
27
- ### Features
28
-
29
- * **global:** add interfaces, functions and services for store coupons ([7e8a959](https://bitbucket.org/tradesystem/artisn_sdk/commit/7e8a95998982e8c8b892b61eb709e98ac7671a09))
30
- * **global:** add missing interface and docs ([e7fca2f](https://bitbucket.org/tradesystem/artisn_sdk/commit/e7fca2f5a608a592380b8cd9aafab04cc32ce13d))
31
-
32
-
33
-
34
- ## [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)
35
-
36
- **Note:** Version bump only for package @artisan-commerce/builders
37
-
38
-
39
-
40
-
41
-
42
- ## [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)
43
-
44
- **Note:** Version bump only for package @artisan-commerce/builders
45
-
46
-
47
-
48
-
49
-
50
- ## [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)
51
-
52
- **Note:** Version bump only for package @artisan-commerce/builders
53
-
54
-
55
-
56
-
57
-
58
- ## [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)
59
-
60
-
61
- ### Bug Fixes
62
-
63
- * **global:** add interfaces and builders for order ([53d18b0](https://bitbucket.org/tradesystem/artisn_sdk/commit/53d18b07c53fa54f9af69a0751b94a95452bfdc3))
64
- * **global:** fix tax calculation builder ([3f7698f](https://bitbucket.org/tradesystem/artisn_sdk/commit/3f7698f1cfdf97e2b8d8fa4040b70a7cfa150b74))
65
-
66
-
67
-
68
- ## [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)
69
-
70
-
71
- ### Bug Fixes
72
-
73
- * **global:** fix aritsn-rn package ([b18d632](https://bitbucket.org/tradesystem/artisn_sdk/commit/b18d632d539bf1e748c1d5f83e4bc73747a7e467))
74
-
75
-
76
-
77
- ## [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)
78
-
79
-
80
- ### Bug Fixes
81
-
82
- * **global:** make export not module by default ([4e701b1](https://bitbucket.org/tradesystem/artisn_sdk/commit/4e701b1b59df89cf8358cf500984b1c2c4f42c60))
83
-
84
-
85
-
86
- ## [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)
87
-
88
-
89
- ### Bug Fixes
90
-
91
- * **global:** fix some payment types ([8000970](https://bitbucket.org/tradesystem/artisn_sdk/commit/80009700cd8664828b1236e8ad7cc90ce2fcb3e7))
92
-
93
-
94
-
95
- ## [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)
96
-
97
- **Note:** Version bump only for package @artisan-commerce/builders
98
-
99
-
100
-
101
-
102
-
103
- ## [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)
104
-
105
-
106
- ### Features
107
-
108
- * **global:** fix builder and types to adjust better to reality ([11cdb93](https://bitbucket.org/tradesystem/artisn_sdk/commit/11cdb93199d5a57d12f5aa6f7ece17f0c38c0521))
109
- * **global:** fix unnecessary params on functions and add docs ([3830d7d](https://bitbucket.org/tradesystem/artisn_sdk/commit/3830d7d8b0044ca580bcbcc4acd0b0ea5a8b0266))
110
-
111
-
112
-
113
- ## [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)
114
-
115
-
116
- ### Bug Fixes
117
-
118
- * **global:** fix ProductDetail builder and update its types ([cdc6cf9](https://bitbucket.org/tradesystem/artisn_sdk/commit/cdc6cf9ed2e7ff1a340bc691b0dc1156bc682d38))
119
-
120
-
121
-
122
- ## [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)
123
-
124
- **Note:** Version bump only for package @artisan-commerce/builders
125
-
126
-
127
-
128
-
129
-
130
- ## [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)
131
-
132
- **Note:** Version bump only for package @artisan-commerce/builders
133
-
134
-
135
-
136
-
137
-
138
- ## [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)
139
-
140
- **Note:** Version bump only for package @artisan-commerce/builders
141
-
142
-
143
-
144
-
145
-
146
- ## [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)
147
-
148
-
149
- ### Bug Fixes
150
-
151
- * **global:** update types of CDNImage, reduce the depth of product questions ([82dba32](https://bitbucket.org/tradesystem/artisn_sdk/commit/82dba324457455e6cd2d76091aaffaef5f540d9f))
152
-
153
-
154
-
155
- ## [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)
156
-
157
-
158
- ### Bug Fixes
159
-
160
- * **global:** fix product details and settings builders ([5452fc9](https://bitbucket.org/tradesystem/artisn_sdk/commit/5452fc9d70ff3fa9f859ed4a665fd933e133c7ce))
161
-
162
-
163
-
164
- ## [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)
165
-
166
-
167
- ### Features
168
-
169
- * **global:** add categories property to product details interface ([0d95d09](https://bitbucket.org/tradesystem/artisn_sdk/commit/0d95d093383673322369b0870af290182bb57cb8))
170
-
171
-
172
-
173
- ## [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)
174
-
175
- **Note:** Version bump only for package @artisan-commerce/builders
176
-
177
-
178
-
179
-
180
-
181
- ## [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)
182
-
183
- **Note:** Version bump only for package @artisan-commerce/builders
184
-
185
-
186
-
187
-
188
-
189
- ## [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)
190
-
191
- **Note:** Version bump only for package @artisan-commerce/builders
192
-
193
-
194
-
195
-
196
-
197
- ## [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)
198
-
199
-
200
- ### Bug Fixes
201
-
202
- * **global:** add missing properties to order interfaces and types ([757157f](https://bitbucket.org/tradesystem/artisn_sdk/commit/757157fbb2dd25d04efc791cd9b9511e41685471))
203
-
204
-
205
-
206
- ## [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)
207
-
208
-
209
- ### Bug Fixes
210
-
211
- * **global:** add missing properties to shipping address and complete document type ([c9156f6](https://bitbucket.org/tradesystem/artisn_sdk/commit/c9156f6db3e55f23479484577760f5196e112afc))
212
-
213
-
214
-
215
- ## [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)
216
-
217
-
218
- ### Bug Fixes
219
-
220
- * **global:** add CountryCode type and update user builder ([f94eb5d](https://bitbucket.org/tradesystem/artisn_sdk/commit/f94eb5d38e0725bd157398e3c51b3bb8b2592abc))
221
-
222
-
223
-
224
- ## [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)
225
-
226
-
227
- ### Bug Fixes
228
-
229
- * **image-builders:** make bucket not use undefined ([5f7e95d](https://bitbucket.org/tradesystem/artisn_sdk/commit/5f7e95d6b0b4d4d1e47e38400b126a0ee9aa3478))
230
-
231
-
232
-
233
6
  ## [0.7.0-canary.3](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.2...@artisan-commerce/builders@0.7.0-canary.3) (2021-08-12)
234
7
 
235
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[];
@@ -0,0 +1,50 @@
1
+ import { Wallet } from "@artisan-commerce/types";
2
+ import { Benefit, Award } from "@artisan-commerce/types";
3
+ /**
4
+ * Generates Benefit object with random data.
5
+ *
6
+ * @since 0.5.14
7
+ * @param {Partial<Benefit>} overrides Properties to override a {@link Benefit}
8
+ * @returns {Benefit} A {@link Benefit} object
9
+ */
10
+ export declare const buildBenefit: (overrides?: Partial<Benefit>) => Benefit;
11
+ /**
12
+ * Generates a list of Benefit objects with random data.
13
+ *
14
+ * @since 0.5.14
15
+ * @param {number} quantity The number of objects to be generated
16
+ * @returns {Benefit[]} An array of Benefit objects, see {@link Benefit}
17
+ */
18
+ export declare const genBenefits: (quantity?: number | undefined) => Benefit[];
19
+ /**
20
+ * Generates Award object with random data.
21
+ *
22
+ * @since 0.5.14
23
+ * @param {Partial<>} overrides Properties to override a {@link Award}
24
+ * @returns {Award} A {@link Award} object
25
+ */
26
+ export declare const buildAward: (overrides?: Partial<Award>) => Award;
27
+ /**
28
+ * Generates a list of Award objects with random data.
29
+ *
30
+ * @since 0.5.14
31
+ * @param {number} quantity The number of objects to be generated
32
+ * @returns {Award[]} An array of Award objects, see {@link Award}
33
+ */
34
+ export declare const genAwards: (quantity?: number | undefined) => Award[];
35
+ /**
36
+ * Generates Wallet object with random data.
37
+ *
38
+ * @since 0.5.14
39
+ * @param {Partial<Wallet>} overrides Properties to override a {@link Wallet}
40
+ * @returns {Wallet} A {@link Wallet} object
41
+ */
42
+ export declare const buildWallet: (overrides?: Partial<Wallet>) => Wallet;
43
+ /**
44
+ * Generates a list of Wallet objects with random data.
45
+ *
46
+ * @since 0.5.14
47
+ * @param {number} quantity The number of objects to be generated
48
+ * @returns {Wallet[]} An array of Wallet objects, see {@link Wallet}
49
+ */
50
+ export declare const genWallets: (quantity?: number | undefined) => Wallet[];