@artisan-commerce/builders 0.6.0 → 0.7.0-canary.1
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 +18 -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 +187 -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 +55 -6
- package/build/builders/product.builder.d.ts +53 -17
- package/build/builders/settings.builder.d.ts +37 -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
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
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.1](https://bitbucket.org/tradesystem/artisan_sdk/compare/@artisan-commerce/builders@0.7.0-canary.0...@artisan-commerce/builders@0.7.0-canary.1) (2021-08-06)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **builders:** add missing builders and delete unused type ([361abac](https://bitbucket.org/tradesystem/artisan_sdk/commit/361abac9996fef1b0c308b1bd940f19379f8842a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [0.7.0-canary.0](https://bitbucket.org/tradesystem/artisan_sdk/compare/@artisan-commerce/builders@0.6.0...@artisan-commerce/builders@0.7.0-canary.0) (2021-08-04)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **global:** add and export missing builders and types ([67ad6ac](https://bitbucket.org/tradesystem/artisan_sdk/commit/67ad6ac8e563aa53c2c62dac86b65f3435a0b16a))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## [0.6.0](https://bitbucket.org/tradesystem/artisan_sdk/compare/@artisan-commerce/builders@0.6.0-canary.11...@artisan-commerce/builders@0.6.0) (2021-07-30)
|
|
7
25
|
|
|
8
26
|
|
|
@@ -2,6 +2,7 @@ import { Account } from "@artisan-commerce/types";
|
|
|
2
2
|
/**
|
|
3
3
|
* Generates Account object with random data.
|
|
4
4
|
*
|
|
5
|
+
* @since 0.5.14
|
|
5
6
|
* @param {Partial<Account>} overrides Properties to override a {@link Account}
|
|
6
7
|
* @returns {Account} A {@link Account} object
|
|
7
8
|
*/
|
|
@@ -9,6 +10,7 @@ export declare const buildAccount: (overrides?: Partial<Account>) => Account;
|
|
|
9
10
|
/**
|
|
10
11
|
* Generates a list of Account objects with random data.
|
|
11
12
|
*
|
|
13
|
+
* @since 0.5.14
|
|
12
14
|
* @param {number} quantity The number of objects to be generated
|
|
13
15
|
* @returns {Account[]} An array of {@link Account}s objects
|
|
14
16
|
*/
|
|
@@ -3,6 +3,7 @@ import { Banner } from "@artisan-commerce/types";
|
|
|
3
3
|
/**
|
|
4
4
|
* Generates banner object with random data.
|
|
5
5
|
*
|
|
6
|
+
* @since 0.5.14
|
|
6
7
|
* @param {Partial<Banner>} overrides Properties to override a {@link Banner}
|
|
7
8
|
* @returns {Banner} A {@link Banner} object
|
|
8
9
|
*/
|
|
@@ -10,6 +11,7 @@ export declare const buildBanner: (overrides?: Partial<Banner>) => Banner;
|
|
|
10
11
|
/**
|
|
11
12
|
* Generates a list of Banner objects with random data.
|
|
12
13
|
*
|
|
14
|
+
* @since 0.5.14
|
|
13
15
|
* @param {number} quantity The number of objects to be generated
|
|
14
16
|
* @returns {Banner[]} An array of {@link Banner}s objects
|
|
15
17
|
*/
|
|
@@ -17,13 +19,16 @@ export declare const genBanners: (quantity?: number | undefined) => Banner[];
|
|
|
17
19
|
/**
|
|
18
20
|
* Generates BannerImage object with random data.
|
|
19
21
|
*
|
|
20
|
-
* @
|
|
22
|
+
* @since 0.5.14
|
|
23
|
+
* @param {Partial<BannerImage>} overrides Properties to override
|
|
24
|
+
* a {@link BannerImage}
|
|
21
25
|
* @returns {BannerImage} A {@link BannerImage} object
|
|
22
26
|
*/
|
|
23
27
|
export declare const buildBannerImage: (overrides?: Partial<BannerImage>) => BannerImage;
|
|
24
28
|
/**
|
|
25
29
|
* Generates a list of banner image objects with random data.
|
|
26
30
|
*
|
|
31
|
+
* @since 0.5.14
|
|
27
32
|
* @param {number} quantity The number of objects to be generated
|
|
28
33
|
* @returns {BannerImage[]} An array of banner images, see {@link BannerImage}
|
|
29
34
|
*/
|
|
@@ -2,13 +2,16 @@ import { BillingData } from "@artisan-commerce/types";
|
|
|
2
2
|
/**
|
|
3
3
|
* Generates BillingData object with random data.
|
|
4
4
|
*
|
|
5
|
-
* @
|
|
5
|
+
* @since 0.5.14
|
|
6
|
+
* @param {Partial<BillingData>} overrides Properties to override
|
|
7
|
+
* a {@link BillingData}
|
|
6
8
|
* @returns {BillingData} A {@link BillingData} object
|
|
7
9
|
*/
|
|
8
10
|
export declare const buildBillingData: (overrides?: Partial<BillingData>) => BillingData;
|
|
9
11
|
/**
|
|
10
12
|
* Generates a list of Billing Data objects with random data.
|
|
11
13
|
*
|
|
14
|
+
* @since 0.5.14
|
|
12
15
|
* @param {number} quantity The number of objects to be generated
|
|
13
16
|
* @returns {BillingData[]} An array of {@link BillingData}s objects
|
|
14
17
|
*/
|
|
@@ -2,13 +2,16 @@ import { Catalogue } from "@artisan-commerce/types";
|
|
|
2
2
|
/**
|
|
3
3
|
* Generates Catalogue object with random data.
|
|
4
4
|
*
|
|
5
|
-
* @
|
|
5
|
+
* @since 0.5.14
|
|
6
|
+
* @param {Partial<Catalogue>} overrides Properties to override
|
|
7
|
+
* a {@link Catalogue}
|
|
6
8
|
* @returns {Catalogue} A {@link Catalogue} object
|
|
7
9
|
*/
|
|
8
10
|
export declare const buildCatalogue: (overrides?: Partial<Catalogue>) => Catalogue;
|
|
9
11
|
/**
|
|
10
12
|
* Generates a list of Catalogue objects with custom data.
|
|
11
13
|
*
|
|
14
|
+
* @since 0.5.14
|
|
12
15
|
* @param {number} quantity The number of objects to be generated
|
|
13
16
|
* @returns {Catalogue[]} An array of {@link Catalogue}s objects
|
|
14
17
|
*/
|
|
@@ -2,13 +2,16 @@ import { Category, CategoryWithProducts } from "@artisan-commerce/types";
|
|
|
2
2
|
/**
|
|
3
3
|
* Generates Category object with random data.
|
|
4
4
|
*
|
|
5
|
-
* @
|
|
5
|
+
* @since 0.5.14
|
|
6
|
+
* @param {Partial<Category>} overrides Properties to override
|
|
7
|
+
* a {@link Category}
|
|
6
8
|
* @returns {Category} A {@link Category} object
|
|
7
9
|
*/
|
|
8
10
|
export declare const buildCategory: (overrides?: Partial<Category>) => Category;
|
|
9
11
|
/**
|
|
10
12
|
* Generates a list of Category objects with random data.
|
|
11
13
|
*
|
|
14
|
+
* @since 0.5.14
|
|
12
15
|
* @param {number} quantity The number of objects to be generated
|
|
13
16
|
* @returns {Category[]} An array of categories objects, see {@link Category}
|
|
14
17
|
*/
|
|
@@ -16,14 +19,18 @@ export declare const genCategories: (quantity?: number | undefined) => Category[
|
|
|
16
19
|
/**
|
|
17
20
|
* Generates CategoryWithProducts object with random data.
|
|
18
21
|
*
|
|
19
|
-
* @
|
|
22
|
+
* @since 0.5.14
|
|
23
|
+
* @param {Partial<CategoryWithProducts>} overrides Properties to override
|
|
24
|
+
* a {@link CategoryWithProducts}
|
|
20
25
|
* @returns {CategoryWithProducts} A {@link CategoryWithProducts} object
|
|
21
26
|
*/
|
|
22
27
|
export declare const buildCategoryWithProducts: (overrides?: Partial<CategoryWithProducts>) => CategoryWithProducts;
|
|
23
28
|
/**
|
|
24
29
|
* Generates a list of CategoryWithProducts objects with random data.
|
|
25
30
|
*
|
|
31
|
+
* @since 0.5.14
|
|
26
32
|
* @param {number} quantity The number of objects to be generated
|
|
27
|
-
* @returns {CategoryWithProducts[]} An array of products by categories,
|
|
33
|
+
* @returns {CategoryWithProducts[]} An array of products by categories,
|
|
34
|
+
* see {@link CategoryWithProducts}
|
|
28
35
|
*/
|
|
29
36
|
export declare const genCategoryWithProducts: (quantity?: number | undefined) => CategoryWithProducts[];
|
|
@@ -1,33 +1,79 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { DocumentType } from "@artisan-commerce/types";
|
|
2
|
+
import { CountrySummary, RandomImageConfig } from "@artisan-commerce/types";
|
|
3
3
|
/**
|
|
4
4
|
* Generates a random password.
|
|
5
5
|
*
|
|
6
|
-
* @
|
|
6
|
+
* @since 0.5.14
|
|
7
|
+
* @param {any[]} args An array of arguments to be passed when
|
|
8
|
+
* generating the password
|
|
7
9
|
* @returns A random password
|
|
8
10
|
*/
|
|
9
11
|
export declare const getPassword: (...args: any[]) => string;
|
|
10
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Generates a random username.
|
|
14
|
+
*
|
|
15
|
+
* @since 0.5.14
|
|
16
|
+
*/
|
|
11
17
|
export declare const getUsername: (firstName?: string | undefined, lastName?: string | undefined) => string;
|
|
12
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Generates a random unique identifier.
|
|
20
|
+
*
|
|
21
|
+
* @since 0.5.14
|
|
22
|
+
*/
|
|
13
23
|
export declare const genId: () => string;
|
|
14
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Generates a random id of type number.
|
|
26
|
+
*
|
|
27
|
+
* @since 0.5.14
|
|
28
|
+
*/
|
|
15
29
|
export declare const genNumericId: () => number;
|
|
16
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Generates a random word.
|
|
32
|
+
*
|
|
33
|
+
* @since 0.5.14
|
|
34
|
+
*/
|
|
17
35
|
export declare const genWord: () => string;
|
|
18
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* Generates a random address.
|
|
38
|
+
*
|
|
39
|
+
* @since 0.5.14
|
|
40
|
+
*/
|
|
19
41
|
export declare const genAddress: (useFullAddress?: boolean | undefined) => string;
|
|
20
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Generates a random name.
|
|
44
|
+
*
|
|
45
|
+
* @since 0.5.14
|
|
46
|
+
*/
|
|
21
47
|
export declare const genName: (firstName?: string | undefined, lastName?: string | undefined, gender?: number | undefined) => string;
|
|
22
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Generates a random email.
|
|
50
|
+
*
|
|
51
|
+
* @since 0.5.14
|
|
52
|
+
*/
|
|
23
53
|
export declare const genEmail: (firstName?: string | undefined, lastName?: string | undefined, provider?: string | undefined) => string;
|
|
24
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* Generates a random company name.
|
|
56
|
+
*
|
|
57
|
+
* @since 0.5.14
|
|
58
|
+
*/
|
|
25
59
|
export declare const genCompanyName: (format?: number | undefined) => string;
|
|
26
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* Generates a random paragraph.
|
|
62
|
+
*
|
|
63
|
+
* @since 0.5.14
|
|
64
|
+
*/
|
|
27
65
|
export declare const genParagraph: (sentenceCount?: number | undefined) => string;
|
|
28
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* Generates a random title containing 3 words.
|
|
68
|
+
*
|
|
69
|
+
* @since 0.5.14
|
|
70
|
+
*/
|
|
29
71
|
export declare const genTitle: () => string;
|
|
30
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* Generates a random number.
|
|
74
|
+
*
|
|
75
|
+
* @since 0.5.14
|
|
76
|
+
*/
|
|
31
77
|
export declare const genNumber: {
|
|
32
78
|
(max?: number | undefined): number;
|
|
33
79
|
(options?: {
|
|
@@ -36,27 +82,57 @@ export declare const genNumber: {
|
|
|
36
82
|
precision?: number | undefined;
|
|
37
83
|
} | undefined): number;
|
|
38
84
|
};
|
|
39
|
-
/**
|
|
85
|
+
/**
|
|
86
|
+
* Generates a random boolean value.
|
|
87
|
+
*
|
|
88
|
+
* @since 0.5.14
|
|
89
|
+
*/
|
|
40
90
|
export declare const getBoolean: () => boolean;
|
|
41
|
-
/**
|
|
91
|
+
/**
|
|
92
|
+
* Generates a random country name.
|
|
93
|
+
*
|
|
94
|
+
* @since 0.5.14
|
|
95
|
+
*/
|
|
42
96
|
export declare const genCountryName: () => string;
|
|
43
|
-
/**
|
|
44
|
-
|
|
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;
|
|
45
106
|
/** Generates random words.
|
|
46
107
|
*
|
|
108
|
+
* @since 0.5.14
|
|
47
109
|
* @param {number} words The quantity of words to be generated
|
|
48
110
|
*/
|
|
49
111
|
export declare const genWords: (words?: number | undefined) => string;
|
|
50
|
-
/**
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
export declare const
|
|
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;
|
|
56
130
|
/**
|
|
57
131
|
* Generates a random boolean value.
|
|
58
132
|
*
|
|
59
|
-
* @
|
|
133
|
+
* @since 0.5.14
|
|
134
|
+
* @param {number} bias A number between 0 and 1 which will be used
|
|
135
|
+
* to generate a boolean
|
|
60
136
|
* @throws Error if bias is not between 0 and 1
|
|
61
137
|
* @returns {boolean} A boolean value
|
|
62
138
|
*/
|
|
@@ -64,15 +140,22 @@ export declare const genBiasBoolean: (bias: number) => boolean;
|
|
|
64
140
|
/**
|
|
65
141
|
* Generates a random document.
|
|
66
142
|
*
|
|
67
|
-
* @
|
|
143
|
+
* @since 0.5.14
|
|
144
|
+
* @param {number} digits The number of digits with which the document
|
|
145
|
+
* will be generated
|
|
68
146
|
* @returns {string} A random document
|
|
69
147
|
*/
|
|
70
148
|
export declare const genDocument: (digits: number) => string;
|
|
71
|
-
/**
|
|
149
|
+
/**
|
|
150
|
+
* Generates a random document type.
|
|
151
|
+
*
|
|
152
|
+
* @since 0.5.14
|
|
153
|
+
*/
|
|
72
154
|
export declare const genDocumentType: () => DocumentType;
|
|
73
155
|
/**
|
|
74
156
|
* Generates a random mobile phone with the country code provided.
|
|
75
157
|
*
|
|
158
|
+
* @since 0.5.14
|
|
76
159
|
* @param {string} countryCode Country calling code
|
|
77
160
|
* @returns {string} A string like a mobile phone
|
|
78
161
|
*/
|
|
@@ -80,6 +163,7 @@ export declare const genMobilPhone: (countryCode: string) => string;
|
|
|
80
163
|
/**
|
|
81
164
|
* Generates a Country Summary object with random data.
|
|
82
165
|
*
|
|
166
|
+
* @since 0.5.14
|
|
83
167
|
* @param {number} id Country specific id
|
|
84
168
|
* @param {string} name Country specific name
|
|
85
169
|
* @returns {CountrySummary} A {@link CountrySummary} object
|
|
@@ -88,14 +172,18 @@ export declare const genCountry: (id?: number | undefined, name?: string | undef
|
|
|
88
172
|
/**
|
|
89
173
|
* Fills a number of type string with characters.
|
|
90
174
|
*
|
|
91
|
-
* @
|
|
92
|
-
* @param {
|
|
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
|
|
93
180
|
* @returns {string} A string filled with the data passed
|
|
94
181
|
*/
|
|
95
182
|
export declare const fillNumber: (num: string, max?: number | undefined) => string;
|
|
96
183
|
/**
|
|
97
184
|
* Chooses a random item inside the array provided.
|
|
98
185
|
*
|
|
186
|
+
* @since 0.5.14
|
|
99
187
|
* @param {T[]} arr An array of generic items
|
|
100
188
|
* @returns {T} A random item of the array passed as param
|
|
101
189
|
*/
|
|
@@ -103,32 +191,14 @@ export declare const chooseRandom: <T>(arr: T[]) => T;
|
|
|
103
191
|
/**
|
|
104
192
|
* Chooses a random enum value of the enum provided.
|
|
105
193
|
*
|
|
194
|
+
* @since 0.5.14
|
|
106
195
|
* @param {T} anEnum An enum
|
|
107
196
|
* @returns {T[keyof T]} A random item of the enum passed as param
|
|
108
197
|
*/
|
|
109
198
|
export declare const chooseRandomEnum: <T>(anEnum: T) => T[keyof T];
|
|
110
|
-
/** Generates a random currency symbol. */
|
|
111
|
-
export declare const genSymbol: string;
|
|
112
|
-
/** Generates a random image url. */
|
|
113
|
-
export declare const buildURLImage: string;
|
|
114
199
|
/**
|
|
115
|
-
* Generates a
|
|
200
|
+
* Generates a random currency symbol.
|
|
116
201
|
*
|
|
117
|
-
* @
|
|
118
|
-
* @returns {URLImage} An array of {@link URLImage}
|
|
202
|
+
* @since 0.5.14
|
|
119
203
|
*/
|
|
120
|
-
export declare const
|
|
121
|
-
/**
|
|
122
|
-
* Generates CDNImage object with random data.
|
|
123
|
-
*
|
|
124
|
-
* @param {Partial<CDNImage>} overrides Properties to override a {@link CDNImage}
|
|
125
|
-
* @returns {CDNImage} A {@link CDNImage} object
|
|
126
|
-
*/
|
|
127
|
-
export declare const buildCDNImage: (overrides?: Partial<CDNImage>) => CDNImage;
|
|
128
|
-
/**
|
|
129
|
-
* Generates a list of CDNImage objects with random data.
|
|
130
|
-
*
|
|
131
|
-
* @param {number} quantity The number of objects to be generated
|
|
132
|
-
* @returns {CDNImage[]} An array of CDNImage objects, see {@link CDNImage}
|
|
133
|
-
*/
|
|
134
|
-
export declare const genCDNImages: (quantity?: number | undefined) => CDNImage[];
|
|
204
|
+
export declare const genSymbol: string;
|
|
@@ -2,27 +2,34 @@ import { Country, CountryCurrency, CountryTax } from "@artisan-commerce/types";
|
|
|
2
2
|
/**
|
|
3
3
|
* Generates CountryCurrency object with random data.
|
|
4
4
|
*
|
|
5
|
-
* @
|
|
5
|
+
* @since 0.5.14
|
|
6
|
+
* @param {Partial<CountryCurrency>} overrides Properties to override
|
|
7
|
+
* a {@link CountryCurrency}
|
|
6
8
|
* @returns {CountryCurrency} A {@link CountryCurrency} object
|
|
7
9
|
*/
|
|
8
10
|
export declare const buildCountryCurrency: (overrides?: Partial<CountryCurrency>) => CountryCurrency;
|
|
9
11
|
/**
|
|
10
12
|
* Generates CountryTax object with random data.
|
|
11
13
|
*
|
|
12
|
-
* @
|
|
14
|
+
* @since 0.5.14
|
|
15
|
+
* @param {Partial<CountryTax>} overrides Properties to override a
|
|
16
|
+
* {@link CountryTax}
|
|
13
17
|
* @returns {CountryTax} A {@link CountryTax} object
|
|
14
18
|
*/
|
|
15
19
|
export declare const buildCountryTax: (overrides?: Partial<CountryTax>) => CountryTax;
|
|
16
20
|
/**
|
|
17
21
|
* Generates a list of CountryTax objects with random data.
|
|
18
22
|
*
|
|
23
|
+
* @since 0.5.14
|
|
19
24
|
* @param {number} quantity The number of objects to be generated
|
|
20
|
-
* @returns {CountryTax[]} An array of categories objects,
|
|
25
|
+
* @returns {CountryTax[]} An array of categories objects,
|
|
26
|
+
* see {@link CountryTax}
|
|
21
27
|
*/
|
|
22
28
|
export declare const genCountryTax: (quantity?: number | undefined) => CountryTax[];
|
|
23
29
|
/**
|
|
24
30
|
* Generates Country object with random data.
|
|
25
31
|
*
|
|
32
|
+
* @since 0.5.14
|
|
26
33
|
* @param {Partial<Country>} overrides Properties to override a {@link Country}
|
|
27
34
|
* @returns {Country} A {@link Country} object
|
|
28
35
|
*/
|
|
@@ -30,6 +37,7 @@ export declare const buildCountry: (overrides?: Partial<Country>) => Country;
|
|
|
30
37
|
/**
|
|
31
38
|
* Generates a list of countries objects with random data.
|
|
32
39
|
*
|
|
40
|
+
* @since 0.5.14
|
|
33
41
|
* @param {number} quantity The number of objects to be generated
|
|
34
42
|
* @returns An array of countries objects, see {@link Country}
|
|
35
43
|
*/
|
|
@@ -3,6 +3,7 @@ import { Benefit, Award } from "@artisan-commerce/types";
|
|
|
3
3
|
/**
|
|
4
4
|
* Generates Benefit object with random data.
|
|
5
5
|
*
|
|
6
|
+
* @since 0.5.14
|
|
6
7
|
* @param {Partial<Benefit>} overrides Properties to override a {@link Benefit}
|
|
7
8
|
* @returns {Benefit} A {@link Benefit} object
|
|
8
9
|
*/
|
|
@@ -10,6 +11,7 @@ export declare const buildBenefit: (overrides?: Partial<Benefit>) => Benefit;
|
|
|
10
11
|
/**
|
|
11
12
|
* Generates a list of Benefit objects with random data.
|
|
12
13
|
*
|
|
14
|
+
* @since 0.5.14
|
|
13
15
|
* @param {number} quantity The number of objects to be generated
|
|
14
16
|
* @returns {Benefit[]} An array of Benefit objects, see {@link Benefit}
|
|
15
17
|
*/
|
|
@@ -17,6 +19,7 @@ export declare const genBenefits: (quantity?: number | undefined) => Benefit[];
|
|
|
17
19
|
/**
|
|
18
20
|
* Generates Award object with random data.
|
|
19
21
|
*
|
|
22
|
+
* @since 0.5.14
|
|
20
23
|
* @param {Partial<>} overrides Properties to override a {@link Award}
|
|
21
24
|
* @returns {Award} A {@link Award} object
|
|
22
25
|
*/
|
|
@@ -24,6 +27,7 @@ export declare const buildAward: (overrides?: Partial<Award>) => Award;
|
|
|
24
27
|
/**
|
|
25
28
|
* Generates a list of Award objects with random data.
|
|
26
29
|
*
|
|
30
|
+
* @since 0.5.14
|
|
27
31
|
* @param {number} quantity The number of objects to be generated
|
|
28
32
|
* @returns {Award[]} An array of Award objects, see {@link Award}
|
|
29
33
|
*/
|
|
@@ -31,6 +35,7 @@ export declare const genAwards: (quantity?: number | undefined) => Award[];
|
|
|
31
35
|
/**
|
|
32
36
|
* Generates Wallet object with random data.
|
|
33
37
|
*
|
|
38
|
+
* @since 0.5.14
|
|
34
39
|
* @param {Partial<Wallet>} overrides Properties to override a {@link Wallet}
|
|
35
40
|
* @returns {Wallet} A {@link Wallet} object
|
|
36
41
|
*/
|
|
@@ -38,6 +43,7 @@ export declare const buildWallet: (overrides?: Partial<Wallet>) => Wallet;
|
|
|
38
43
|
/**
|
|
39
44
|
* Generates a list of Wallet objects with random data.
|
|
40
45
|
*
|
|
46
|
+
* @since 0.5.14
|
|
41
47
|
* @param {number} quantity The number of objects to be generated
|
|
42
48
|
* @returns {Wallet[]} An array of Wallet objects, see {@link Wallet}
|
|
43
49
|
*/
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { Workflow, StepWorkflow } from "@artisan-commerce/types";
|
|
2
|
+
import { StepWorkflowAdditionalInfo } from "@artisan-commerce/types";
|
|
3
|
+
import { StepWorkflowGroup } from "@artisan-commerce/types";
|
|
4
|
+
import { Issue } from "@artisan-commerce/types";
|
|
5
|
+
import { StepNotification } from "@artisan-commerce/types";
|
|
6
|
+
import { IssueAdditionalInfo, IssueHistory } from "@artisan-commerce/types";
|
|
7
|
+
import { WebhookWorkflow, TransitionWorkflow } from "@artisan-commerce/types";
|
|
8
|
+
/**
|
|
9
|
+
* Generates Issue object with random data.
|
|
10
|
+
*
|
|
11
|
+
* @since 0.5.15
|
|
12
|
+
* @param {Partial<Issue>} overrides Properties to override
|
|
13
|
+
* a {@link Issue}
|
|
14
|
+
* @returns {Issue} A {@link Issue} object
|
|
15
|
+
*/
|
|
16
|
+
export declare const buildIssue: (overrides?: Partial<Issue>) => Issue;
|
|
17
|
+
/**
|
|
18
|
+
* Generates a list of Issue objects with random data.
|
|
19
|
+
*
|
|
20
|
+
* @since 0.5.15
|
|
21
|
+
* @param {number} quantity The number of objects to be generated
|
|
22
|
+
* @returns {Issue[]} An array of Issue objects,
|
|
23
|
+
* see {@link Issue}
|
|
24
|
+
*/
|
|
25
|
+
export declare const genIssues: (quantity?: number | undefined) => Issue[];
|
|
26
|
+
/**
|
|
27
|
+
* Generates IssueAdditionalInfo object with random data.
|
|
28
|
+
*
|
|
29
|
+
* @since 0.5.15
|
|
30
|
+
* @param {Partial<IssueAdditionalInfo>} overrides Properties to override
|
|
31
|
+
* a {@link IssueAdditionalInfo}
|
|
32
|
+
* @returns {IssueAdditionalInfo} A {@link IssueAdditionalInfo} object
|
|
33
|
+
*/
|
|
34
|
+
export declare const buildIssueAdditionalInfo: (overrides?: Partial<IssueAdditionalInfo>) => IssueAdditionalInfo;
|
|
35
|
+
/**
|
|
36
|
+
* Generates a list of IssueAdditionalInfo objects with random data.
|
|
37
|
+
*
|
|
38
|
+
* @since 0.5.15
|
|
39
|
+
* @param {number} quantity The number of objects to be generated
|
|
40
|
+
* @returns {IssueAdditionalInfo[]} An array of IssueAdditionalInfo objects,
|
|
41
|
+
* see {@link IssueAdditionalInfo}
|
|
42
|
+
*/
|
|
43
|
+
export declare const genIssueAdditionalInfo: (quantity?: number | undefined) => IssueAdditionalInfo[];
|
|
44
|
+
/**
|
|
45
|
+
* Generates IssueHistory object with random data.
|
|
46
|
+
*
|
|
47
|
+
* @since 0.5.15
|
|
48
|
+
* @param {Partial<IssueHistory>} overrides Properties to override
|
|
49
|
+
* a {@link IssueHistory}
|
|
50
|
+
* @returns {IssueHistory} A {@link IssueHistory} object
|
|
51
|
+
*/
|
|
52
|
+
export declare const buildIssueHistory: (overrides?: Partial<IssueHistory>) => IssueHistory;
|
|
53
|
+
/**
|
|
54
|
+
* Generates a list of IssueHistory objects with random data.
|
|
55
|
+
*
|
|
56
|
+
* @since 0.5.15
|
|
57
|
+
* @param {number} quantity The number of objects to be generated
|
|
58
|
+
* @returns {IssueHistory[]} An array of IssueHistory objects,
|
|
59
|
+
* see {@link IssueHistory}
|
|
60
|
+
*/
|
|
61
|
+
export declare const genIssueHistory: (quantity?: number | undefined) => IssueHistory[];
|
|
62
|
+
/**
|
|
63
|
+
* Generates Workflow object with random data.
|
|
64
|
+
*
|
|
65
|
+
* @since 0.5.15
|
|
66
|
+
* @param {Partial<Workflow>} overrides Properties to override
|
|
67
|
+
* a {@link Workflow}
|
|
68
|
+
* @returns {Workflow} A {@link Workflow} object
|
|
69
|
+
*/
|
|
70
|
+
export declare const buildWorkflow: (overrides?: Partial<Workflow>) => Workflow;
|
|
71
|
+
/**
|
|
72
|
+
* Generates a list of Workflow objects with random data.
|
|
73
|
+
*
|
|
74
|
+
* @since 0.5.15
|
|
75
|
+
* @param {number} quantity The number of objects to be generated
|
|
76
|
+
* @returns {Workflow[]} An array of Workflow objects, see {@link Workflow}
|
|
77
|
+
*/
|
|
78
|
+
export declare const genWorkflows: (quantity?: number | undefined) => Workflow[];
|
|
79
|
+
/**
|
|
80
|
+
* Generates StepNotification object with random data.
|
|
81
|
+
*
|
|
82
|
+
* @since 0.5.15
|
|
83
|
+
* @param {Partial<StepNotification>} overrides Properties to override
|
|
84
|
+
* a {@link StepNotification}
|
|
85
|
+
* @returns {StepNotification} A {@link StepNotification} object
|
|
86
|
+
*/
|
|
87
|
+
export declare const buildStepNotification: (overrides?: Partial<StepNotification>) => StepNotification;
|
|
88
|
+
/**
|
|
89
|
+
* Generates a list of StepNotification objects with random data.
|
|
90
|
+
*
|
|
91
|
+
* @since 0.5.15
|
|
92
|
+
* @param {number} quantity The number of objects to be generated
|
|
93
|
+
* @returns {StepNotification[]} An array of StepNotification objects,
|
|
94
|
+
* see {@link StepNotification}
|
|
95
|
+
*/
|
|
96
|
+
export declare const genStepNotifications: (quantity?: number | undefined) => StepNotification[];
|
|
97
|
+
/**
|
|
98
|
+
* Generates StepWorkflow object with random data.
|
|
99
|
+
*
|
|
100
|
+
* @since 0.5.15
|
|
101
|
+
* @param {Partial<StepWorkflow>} overrides Properties to override
|
|
102
|
+
* a {@link StepWorkflow}
|
|
103
|
+
* @returns {StepWorkflow} A {@link StepWorkflow} object
|
|
104
|
+
*/
|
|
105
|
+
export declare const buildStepWorkflow: (overrides?: Partial<StepWorkflow>) => StepWorkflow;
|
|
106
|
+
/**
|
|
107
|
+
* Generates a list of StepWorkflow objects with random data.
|
|
108
|
+
*
|
|
109
|
+
* @since 0.5.15
|
|
110
|
+
* @param {number} quantity The number of objects to be generated
|
|
111
|
+
* @returns {StepWorkflow[]} An array of StepWorkflow objects,
|
|
112
|
+
* see {@link StepWorkflow}
|
|
113
|
+
*/
|
|
114
|
+
export declare const genStepWorkflows: (quantity?: number | undefined) => StepWorkflow[];
|
|
115
|
+
/**
|
|
116
|
+
* Generates WebhookWorkflow object with random data.
|
|
117
|
+
*
|
|
118
|
+
* @since 0.5.15
|
|
119
|
+
* @param {Partial<WebhookWorkflow>} overrides Properties to override
|
|
120
|
+
* a {@link WebhookWorkflow}
|
|
121
|
+
* @returns {WebhookWorkflow} A {@link WebhookWorkflow} object
|
|
122
|
+
*/
|
|
123
|
+
export declare const buildWebhookWorkflow: (overrides?: Partial<WebhookWorkflow>) => WebhookWorkflow;
|
|
124
|
+
/**
|
|
125
|
+
* Generates a list of WebhookWorkflow objects with random data.
|
|
126
|
+
*
|
|
127
|
+
* @since 0.5.15
|
|
128
|
+
* @param {number} quantity The number of objects to be generated
|
|
129
|
+
* @returns {WebhookWorkflow[]} An array of WebhookWorkflow objects,
|
|
130
|
+
* see {@link WebhookWorkflow}
|
|
131
|
+
*/
|
|
132
|
+
export declare const genWebhookWorkflows: (quantity?: number | undefined) => WebhookWorkflow[];
|
|
133
|
+
/**
|
|
134
|
+
* Generates StepWorkflowAdditionalInfo object with random data.
|
|
135
|
+
*
|
|
136
|
+
* @since 0.5.15
|
|
137
|
+
* @param {Partial<StepWorkflowAdditionalInfo>} overrides Properties to
|
|
138
|
+
* override a {@link StepWorkflowAdditionalInfo}
|
|
139
|
+
* @returns {StepWorkflowAdditionalInfo} A
|
|
140
|
+
* {@link StepWorkflowAdditionalInfo} object
|
|
141
|
+
*/
|
|
142
|
+
export declare const buildStepWorkflowAdditionalInfo: (overrides?: Partial<StepWorkflowAdditionalInfo>) => StepWorkflowAdditionalInfo;
|
|
143
|
+
/**
|
|
144
|
+
* Generates a list of StepWorkflowAdditionalInfo objects with random data.
|
|
145
|
+
*
|
|
146
|
+
* @since 0.5.15
|
|
147
|
+
* @param {number} quantity The number of objects to be generated
|
|
148
|
+
* @returns {StepWorkflowAdditionalInfo[]} An array of
|
|
149
|
+
* StepWorkflowAdditionalInfo objects, see {@link StepWorkflowAdditionalInfo}
|
|
150
|
+
*/
|
|
151
|
+
export declare const genStepWorkflowAdditionalInfos: (quantity?: number | undefined) => StepWorkflowAdditionalInfo[];
|
|
152
|
+
/**
|
|
153
|
+
* Generates StepWorkflowGroup object with random data.
|
|
154
|
+
*
|
|
155
|
+
* @since 0.5.15
|
|
156
|
+
* @param {Partial<StepWorkflowGroup>} overrides Properties to override
|
|
157
|
+
* a {@link StepWorkflowGroup}
|
|
158
|
+
* @returns {StepWorkflowGroup} A {@link StepWorkflowGroup} object
|
|
159
|
+
*/
|
|
160
|
+
export declare const buildStepWorkflowGroup: (overrides?: Partial<StepWorkflowGroup>) => StepWorkflowGroup;
|
|
161
|
+
/**
|
|
162
|
+
* Generates a list of StepWorkflowGroup objects with random data.
|
|
163
|
+
*
|
|
164
|
+
* @since 0.5.15
|
|
165
|
+
* @param {number} quantity The number of objects to be generated
|
|
166
|
+
* @returns {StepWorkflowGroup[]} An array of StepWorkflowGroup objects,
|
|
167
|
+
* see {@link StepWorkflowGroup}
|
|
168
|
+
*/
|
|
169
|
+
export declare const genStepWorkflowGroups: (quantity?: number | undefined) => StepWorkflowGroup[];
|
|
170
|
+
/**
|
|
171
|
+
* Generates TransitionWorkflow object with random data.
|
|
172
|
+
*
|
|
173
|
+
* @since 0.5.15
|
|
174
|
+
* @param {Partial<TransitionWorkflow>} overrides Properties to override
|
|
175
|
+
* a {@link TransitionWorkflow}
|
|
176
|
+
* @returns {TransitionWorkflow} A {@link TransitionWorkflow} object
|
|
177
|
+
*/
|
|
178
|
+
export declare const buildTransitionWorkflow: (overrides?: Partial<TransitionWorkflow>) => TransitionWorkflow;
|
|
179
|
+
/**
|
|
180
|
+
* Generates a list of TransitionWorkflow objects with random data.
|
|
181
|
+
*
|
|
182
|
+
* @since 0.5.15
|
|
183
|
+
* @param {number} quantity The number of objects to be generated
|
|
184
|
+
* @returns {TransitionWorkflow[]} An array of TransitionWorkflow objects,
|
|
185
|
+
* see {@link TransitionWorkflow}
|
|
186
|
+
*/
|
|
187
|
+
export declare const genTransitionWorkflows: (quantity?: number | undefined) => TransitionWorkflow[];
|