@artisan-commerce/builders 0.6.0-canary.8 → 0.6.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 +38 -0
- package/build/builders/account.builder.d.ts +12 -0
- package/build/builders/banner.builder.d.ts +30 -0
- package/build/builders/billingData.builder.d.ts +13 -0
- package/build/builders/catalogue.builder.d.ts +15 -0
- package/build/builders/category.builder.d.ts +28 -4
- package/build/builders/common.builder.d.ts +105 -1
- package/build/builders/country.builder.d.ts +31 -0
- package/build/builders/coupon.builder.d.ts +44 -0
- package/build/builders/payment.builder.d.ts +44 -0
- package/build/builders/product.builder.d.ts +106 -6
- package/build/builders/shippingAddress.builder.d.ts +74 -22
- package/build/builders/shoppingCart.builder.d.ts +54 -1
- package/build/builders/store.builder.d.ts +78 -2
- package/build/builders/user.builder.d.ts +13 -0
- package/build/builders/vendor.builder.d.ts +13 -0
- package/build/index.d.ts +8 -7
- package/build/main.bundle.js +10 -1
- package/build/report.json +1 -1
- package/build/utils/common.utils.d.ts +8 -0
- package/build/vendors.bundle.js +1 -1
- package/package.json +5 -3
- package/build/builders/channel.builder.d.ts +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,44 @@
|
|
|
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.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
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **global:** fix percentage type on country ([b4920f2](https://bitbucket.org/tradesystem/artisan_sdk/commit/b4920f2021d4b3e5e1ea9cfd2423d98c122ae5ea))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **global:** reuse shopping cart config and fix builder name ([21f9526](https://bitbucket.org/tradesystem/artisan_sdk/commit/21f952680ca38a8579053d65e5795aa184eafcb2))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## [0.6.0-canary.11](https://bitbucket.org/tradesystem/artisan_sdk/compare/@artisan-commerce/builders@0.6.0-canary.10...@artisan-commerce/builders@0.6.0-canary.11) (2021-07-26)
|
|
21
|
+
|
|
22
|
+
**Note:** Version bump only for package @artisan-commerce/builders
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [0.6.0-canary.10](https://bitbucket.org/tradesystem/artisan_sdk/compare/@artisan-commerce/builders@0.6.0-canary.9...@artisan-commerce/builders@0.6.0-canary.10) (2021-06-18)
|
|
29
|
+
|
|
30
|
+
**Note:** Version bump only for package @artisan-commerce/builders
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## [0.6.0-canary.9](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/builders@0.6.0-canary.8...@artisan-commerce/builders@0.6.0-canary.9) (2021-06-10)
|
|
37
|
+
|
|
38
|
+
**Note:** Version bump only for package @artisan-commerce/builders
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
6
44
|
## [0.6.0-canary.8](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/builders@0.6.0-canary.7...@artisan-commerce/builders@0.6.0-canary.8) (2021-04-22)
|
|
7
45
|
|
|
8
46
|
|
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
import { Account } from "@artisan-commerce/types";
|
|
2
|
+
/**
|
|
3
|
+
* Generates Account object with random data.
|
|
4
|
+
*
|
|
5
|
+
* @param {Partial<Account>} overrides Properties to override a {@link Account}
|
|
6
|
+
* @returns {Account} A {@link Account} object
|
|
7
|
+
*/
|
|
2
8
|
export declare const buildAccount: (overrides?: Partial<Account>) => Account;
|
|
9
|
+
/**
|
|
10
|
+
* Generates a list of Account objects with random data.
|
|
11
|
+
*
|
|
12
|
+
* @param {number} quantity The number of objects to be generated
|
|
13
|
+
* @returns {Account[]} An array of {@link Account}s objects
|
|
14
|
+
*/
|
|
3
15
|
export declare const genAccounts: (quantity?: number | undefined) => Account[];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BannerImage } from "@artisan-commerce/types";
|
|
2
|
+
import { Banner } from "@artisan-commerce/types";
|
|
3
|
+
/**
|
|
4
|
+
* Generates banner object with random data.
|
|
5
|
+
*
|
|
6
|
+
* @param {Partial<Banner>} overrides Properties to override a {@link Banner}
|
|
7
|
+
* @returns {Banner} A {@link Banner} object
|
|
8
|
+
*/
|
|
9
|
+
export declare const buildBanner: (overrides?: Partial<Banner>) => Banner;
|
|
10
|
+
/**
|
|
11
|
+
* Generates a list of Banner objects with random data.
|
|
12
|
+
*
|
|
13
|
+
* @param {number} quantity The number of objects to be generated
|
|
14
|
+
* @returns {Banner[]} An array of {@link Banner}s objects
|
|
15
|
+
*/
|
|
16
|
+
export declare const genBanners: (quantity?: number | undefined) => Banner[];
|
|
17
|
+
/**
|
|
18
|
+
* Generates BannerImage object with random data.
|
|
19
|
+
*
|
|
20
|
+
* @param {Partial<BannerImage>} overrides Properties to override a {@link BannerImage}
|
|
21
|
+
* @returns {BannerImage} A {@link BannerImage} object
|
|
22
|
+
*/
|
|
23
|
+
export declare const buildBannerImage: (overrides?: Partial<BannerImage>) => BannerImage;
|
|
24
|
+
/**
|
|
25
|
+
* Generates a list of banner image objects with random data.
|
|
26
|
+
*
|
|
27
|
+
* @param {number} quantity The number of objects to be generated
|
|
28
|
+
* @returns {BannerImage[]} An array of banner images, see {@link BannerImage}
|
|
29
|
+
*/
|
|
30
|
+
export declare const genBannerImages: (quantity?: number | undefined) => BannerImage[];
|
|
@@ -1,2 +1,15 @@
|
|
|
1
1
|
import { BillingData } from "@artisan-commerce/types";
|
|
2
|
+
/**
|
|
3
|
+
* Generates BillingData object with random data.
|
|
4
|
+
*
|
|
5
|
+
* @param {Partial<BillingData>} overrides Properties to override a {@link BillingData}
|
|
6
|
+
* @returns {BillingData} A {@link BillingData} object
|
|
7
|
+
*/
|
|
2
8
|
export declare const buildBillingData: (overrides?: Partial<BillingData>) => BillingData;
|
|
9
|
+
/**
|
|
10
|
+
* Generates a list of Billing Data objects with random data.
|
|
11
|
+
*
|
|
12
|
+
* @param {number} quantity The number of objects to be generated
|
|
13
|
+
* @returns {BillingData[]} An array of {@link BillingData}s objects
|
|
14
|
+
*/
|
|
15
|
+
export declare const genBillingData: (quantity?: number | undefined) => BillingData[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Catalogue } from "@artisan-commerce/types";
|
|
2
|
+
/**
|
|
3
|
+
* Generates Catalogue object with random data.
|
|
4
|
+
*
|
|
5
|
+
* @param {Partial<Catalogue>} overrides Properties to override a {@link Catalogue}
|
|
6
|
+
* @returns {Catalogue} A {@link Catalogue} object
|
|
7
|
+
*/
|
|
8
|
+
export declare const buildCatalogue: (overrides?: Partial<Catalogue>) => Catalogue;
|
|
9
|
+
/**
|
|
10
|
+
* Generates a list of Catalogue objects with custom data.
|
|
11
|
+
*
|
|
12
|
+
* @param {number} quantity The number of objects to be generated
|
|
13
|
+
* @returns {Catalogue[]} An array of {@link Catalogue}s objects
|
|
14
|
+
*/
|
|
15
|
+
export declare const genCatalogues: (quantity?: number | undefined) => Catalogue[];
|
|
@@ -1,5 +1,29 @@
|
|
|
1
|
-
import { Category,
|
|
1
|
+
import { Category, CategoryWithProducts } from "@artisan-commerce/types";
|
|
2
|
+
/**
|
|
3
|
+
* Generates Category object with random data.
|
|
4
|
+
*
|
|
5
|
+
* @param {Partial<Category>} overrides Properties to override a {@link Category}
|
|
6
|
+
* @returns {Category} A {@link Category} object
|
|
7
|
+
*/
|
|
2
8
|
export declare const buildCategory: (overrides?: Partial<Category>) => Category;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Generates a list of Category objects with random data.
|
|
11
|
+
*
|
|
12
|
+
* @param {number} quantity The number of objects to be generated
|
|
13
|
+
* @returns {Category[]} An array of categories objects, see {@link Category}
|
|
14
|
+
*/
|
|
15
|
+
export declare const genCategories: (quantity?: number | undefined) => Category[];
|
|
16
|
+
/**
|
|
17
|
+
* Generates CategoryWithProducts object with random data.
|
|
18
|
+
*
|
|
19
|
+
* @param {Partial<CategoryWithProducts>} overrides Properties to override a {@link CategoryWithProducts}
|
|
20
|
+
* @returns {CategoryWithProducts} A {@link CategoryWithProducts} object
|
|
21
|
+
*/
|
|
22
|
+
export declare const buildCategoryWithProducts: (overrides?: Partial<CategoryWithProducts>) => CategoryWithProducts;
|
|
23
|
+
/**
|
|
24
|
+
* Generates a list of CategoryWithProducts objects with random data.
|
|
25
|
+
*
|
|
26
|
+
* @param {number} quantity The number of objects to be generated
|
|
27
|
+
* @returns {CategoryWithProducts[]} An array of products by categories, see {@link CategoryWithProducts}
|
|
28
|
+
*/
|
|
29
|
+
export declare const genCategoryWithProducts: (quantity?: number | undefined) => CategoryWithProducts[];
|
|
@@ -1,15 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CountrySummary, URLImage } from "@artisan-commerce/types";
|
|
2
|
+
import { DocumentType, CDNImage } from "@artisan-commerce/types";
|
|
3
|
+
/**
|
|
4
|
+
* Generates a random password.
|
|
5
|
+
*
|
|
6
|
+
* @param {any[]} args An array of arguments to be passed when generating the password
|
|
7
|
+
* @returns A random password
|
|
8
|
+
*/
|
|
2
9
|
export declare const getPassword: (...args: any[]) => string;
|
|
10
|
+
/** Generates a random username. */
|
|
3
11
|
export declare const getUsername: (firstName?: string | undefined, lastName?: string | undefined) => string;
|
|
12
|
+
/** Generates a random unique identifier. */
|
|
4
13
|
export declare const genId: () => string;
|
|
14
|
+
/** Generates a random id of type number. */
|
|
5
15
|
export declare const genNumericId: () => number;
|
|
16
|
+
/** Generates a random word. */
|
|
6
17
|
export declare const genWord: () => string;
|
|
18
|
+
/** Generates a random address. */
|
|
7
19
|
export declare const genAddress: (useFullAddress?: boolean | undefined) => string;
|
|
20
|
+
/** Generates a random name. */
|
|
8
21
|
export declare const genName: (firstName?: string | undefined, lastName?: string | undefined, gender?: number | undefined) => string;
|
|
22
|
+
/** Generates a random email. */
|
|
9
23
|
export declare const genEmail: (firstName?: string | undefined, lastName?: string | undefined, provider?: string | undefined) => string;
|
|
24
|
+
/** Generates a random company name. */
|
|
10
25
|
export declare const genCompanyName: (format?: number | undefined) => string;
|
|
26
|
+
/** Generates a random paragraph. */
|
|
11
27
|
export declare const genParagraph: (sentenceCount?: number | undefined) => string;
|
|
28
|
+
/** Generates a random title containing 3 words. */
|
|
12
29
|
export declare const genTitle: () => string;
|
|
30
|
+
/** Generates a random number. */
|
|
13
31
|
export declare const genNumber: {
|
|
14
32
|
(max?: number | undefined): number;
|
|
15
33
|
(options?: {
|
|
@@ -18,13 +36,99 @@ export declare const genNumber: {
|
|
|
18
36
|
precision?: number | undefined;
|
|
19
37
|
} | undefined): number;
|
|
20
38
|
};
|
|
39
|
+
/** Generates a random boolean value. */
|
|
21
40
|
export declare const getBoolean: () => boolean;
|
|
41
|
+
/** Generates a random country name. */
|
|
22
42
|
export declare const genCountryName: () => string;
|
|
43
|
+
/** Generates a random image. */
|
|
44
|
+
export declare const genRandomImage: string;
|
|
45
|
+
/** Generates random words.
|
|
46
|
+
*
|
|
47
|
+
* @param {number} words The quantity of words to be generated
|
|
48
|
+
*/
|
|
49
|
+
export declare const genWords: (words?: number | undefined) => string;
|
|
50
|
+
/** Generates a random internet url. */
|
|
51
|
+
export declare const genURL: string;
|
|
52
|
+
/** Generates a random date in ISO format. */
|
|
53
|
+
export declare const genDate: string;
|
|
54
|
+
/** Generates a random base64 value. */
|
|
55
|
+
export declare const genBase64: string;
|
|
56
|
+
/**
|
|
57
|
+
* Generates a random boolean value.
|
|
58
|
+
*
|
|
59
|
+
* @param {number} bias A number between 0 and 1 which will be used to generate a boolean
|
|
60
|
+
* @throws Error if bias is not between 0 and 1
|
|
61
|
+
* @returns {boolean} A boolean value
|
|
62
|
+
*/
|
|
23
63
|
export declare const genBiasBoolean: (bias: number) => boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Generates a random document.
|
|
66
|
+
*
|
|
67
|
+
* @param {number} digits The number of digits with which the document will be generated
|
|
68
|
+
* @returns {string} A random document
|
|
69
|
+
*/
|
|
24
70
|
export declare const genDocument: (digits: number) => string;
|
|
71
|
+
/** Generates a random document type. */
|
|
25
72
|
export declare const genDocumentType: () => DocumentType;
|
|
73
|
+
/**
|
|
74
|
+
* Generates a random mobile phone with the country code provided.
|
|
75
|
+
*
|
|
76
|
+
* @param {string} countryCode Country calling code
|
|
77
|
+
* @returns {string} A string like a mobile phone
|
|
78
|
+
*/
|
|
26
79
|
export declare const genMobilPhone: (countryCode: string) => string;
|
|
80
|
+
/**
|
|
81
|
+
* Generates a Country Summary object with random data.
|
|
82
|
+
*
|
|
83
|
+
* @param {number} id Country specific id
|
|
84
|
+
* @param {string} name Country specific name
|
|
85
|
+
* @returns {CountrySummary} A {@link CountrySummary} object
|
|
86
|
+
*/
|
|
27
87
|
export declare const genCountry: (id?: number | undefined, name?: string | undefined) => CountrySummary;
|
|
88
|
+
/**
|
|
89
|
+
* Fills a number of type string with characters.
|
|
90
|
+
*
|
|
91
|
+
* @param {string} num A string, the length of it will be used to fill the number
|
|
92
|
+
* @param {number} max A number, the length of it will be used to fill the number
|
|
93
|
+
* @returns {string} A string filled with the data passed
|
|
94
|
+
*/
|
|
28
95
|
export declare const fillNumber: (num: string, max?: number | undefined) => string;
|
|
96
|
+
/**
|
|
97
|
+
* Chooses a random item inside the array provided.
|
|
98
|
+
*
|
|
99
|
+
* @param {T[]} arr An array of generic items
|
|
100
|
+
* @returns {T} A random item of the array passed as param
|
|
101
|
+
*/
|
|
29
102
|
export declare const chooseRandom: <T>(arr: T[]) => T;
|
|
103
|
+
/**
|
|
104
|
+
* Chooses a random enum value of the enum provided.
|
|
105
|
+
*
|
|
106
|
+
* @param {T} anEnum An enum
|
|
107
|
+
* @returns {T[keyof T]} A random item of the enum passed as param
|
|
108
|
+
*/
|
|
30
109
|
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
|
+
/**
|
|
115
|
+
* Generates a list of URLImage.
|
|
116
|
+
*
|
|
117
|
+
* @param {number} quantity The number of objects to be generated
|
|
118
|
+
* @returns {URLImage} An array of {@link URLImage}
|
|
119
|
+
*/
|
|
120
|
+
export declare const genURLImages: (quantity?: number | undefined) => URLImage[];
|
|
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[];
|
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
import { Country, CountryCurrency, CountryTax } from "@artisan-commerce/types";
|
|
2
|
+
/**
|
|
3
|
+
* Generates CountryCurrency object with random data.
|
|
4
|
+
*
|
|
5
|
+
* @param {Partial<CountryCurrency>} overrides Properties to override a {@link CountryCurrency}
|
|
6
|
+
* @returns {CountryCurrency} A {@link CountryCurrency} object
|
|
7
|
+
*/
|
|
2
8
|
export declare const buildCountryCurrency: (overrides?: Partial<CountryCurrency>) => CountryCurrency;
|
|
9
|
+
/**
|
|
10
|
+
* Generates CountryTax object with random data.
|
|
11
|
+
*
|
|
12
|
+
* @param {Partial<CountryTax>} overrides Properties to override a {@link CountryTax}
|
|
13
|
+
* @returns {CountryTax} A {@link CountryTax} object
|
|
14
|
+
*/
|
|
3
15
|
export declare const buildCountryTax: (overrides?: Partial<CountryTax>) => CountryTax;
|
|
16
|
+
/**
|
|
17
|
+
* Generates a list of CountryTax objects with random data.
|
|
18
|
+
*
|
|
19
|
+
* @param {number} quantity The number of objects to be generated
|
|
20
|
+
* @returns {CountryTax[]} An array of categories objects, see {@link CountryTax}
|
|
21
|
+
*/
|
|
22
|
+
export declare const genCountryTax: (quantity?: number | undefined) => CountryTax[];
|
|
23
|
+
/**
|
|
24
|
+
* Generates Country object with random data.
|
|
25
|
+
*
|
|
26
|
+
* @param {Partial<Country>} overrides Properties to override a {@link Country}
|
|
27
|
+
* @returns {Country} A {@link Country} object
|
|
28
|
+
*/
|
|
4
29
|
export declare const buildCountry: (overrides?: Partial<Country>) => Country;
|
|
30
|
+
/**
|
|
31
|
+
* Generates a list of countries objects with random data.
|
|
32
|
+
*
|
|
33
|
+
* @param {number} quantity The number of objects to be generated
|
|
34
|
+
* @returns An array of countries objects, see {@link Country}
|
|
35
|
+
*/
|
|
5
36
|
export declare const genCountries: (quantity?: number | undefined) => Country[];
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
* @param {Partial<Benefit>} overrides Properties to override a {@link Benefit}
|
|
7
|
+
* @returns {Benefit} A {@link Benefit} object
|
|
8
|
+
*/
|
|
9
|
+
export declare const buildBenefit: (overrides?: Partial<Benefit>) => Benefit;
|
|
10
|
+
/**
|
|
11
|
+
* Generates a list of Benefit objects with random data.
|
|
12
|
+
*
|
|
13
|
+
* @param {number} quantity The number of objects to be generated
|
|
14
|
+
* @returns {Benefit[]} An array of Benefit objects, see {@link Benefit}
|
|
15
|
+
*/
|
|
16
|
+
export declare const genBenefits: (quantity?: number | undefined) => Benefit[];
|
|
17
|
+
/**
|
|
18
|
+
* Generates Award object with random data.
|
|
19
|
+
*
|
|
20
|
+
* @param {Partial<>} overrides Properties to override a {@link Award}
|
|
21
|
+
* @returns {Award} A {@link Award} object
|
|
22
|
+
*/
|
|
23
|
+
export declare const buildAward: (overrides?: Partial<Award>) => Award;
|
|
24
|
+
/**
|
|
25
|
+
* Generates a list of Award objects with random data.
|
|
26
|
+
*
|
|
27
|
+
* @param {number} quantity The number of objects to be generated
|
|
28
|
+
* @returns {Award[]} An array of Award objects, see {@link Award}
|
|
29
|
+
*/
|
|
30
|
+
export declare const genAwards: (quantity?: number | undefined) => Award[];
|
|
31
|
+
/**
|
|
32
|
+
* Generates Wallet object with random data.
|
|
33
|
+
*
|
|
34
|
+
* @param {Partial<Wallet>} overrides Properties to override a {@link Wallet}
|
|
35
|
+
* @returns {Wallet} A {@link Wallet} object
|
|
36
|
+
*/
|
|
37
|
+
export declare const buildWallet: (overrides?: Partial<Wallet>) => Wallet;
|
|
38
|
+
/**
|
|
39
|
+
* Generates a list of Wallet objects with random data.
|
|
40
|
+
*
|
|
41
|
+
* @param {number} quantity The number of objects to be generated
|
|
42
|
+
* @returns {Wallet[]} An array of Wallet objects, see {@link Wallet}
|
|
43
|
+
*/
|
|
44
|
+
export declare const genWallets: (quantity?: number | undefined) => Wallet[];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { BasePaymentMethod, PaymentMethod } from "@artisan-commerce/types";
|
|
2
|
+
import { CreditCardBrand, CreditCardMapping } from "@artisan-commerce/types";
|
|
3
|
+
/**
|
|
4
|
+
* Generates BasePaymentMethod object with random data.
|
|
5
|
+
*
|
|
6
|
+
* @param {Partial<BasePaymentMethod>} overrides Properties to override a {@link BasePaymentMethod}
|
|
7
|
+
* @returns {BasePaymentMethod} A {@link BasePaymentMethod} object
|
|
8
|
+
*/
|
|
9
|
+
export declare const buildBasePaymentMethod: (overrides?: Partial<BasePaymentMethod>) => BasePaymentMethod;
|
|
10
|
+
/**
|
|
11
|
+
* Generates PaymentMethod object with random data.
|
|
12
|
+
*
|
|
13
|
+
* @param {Partial<PaymentMethod>} overrides Properties to override a {@link PaymentMethod}
|
|
14
|
+
* @returns {PaymentMethod} A {@link PaymentMethod} object
|
|
15
|
+
*/
|
|
16
|
+
export declare const buildPaymentMethod: (overrides?: Partial<PaymentMethod>) => PaymentMethod;
|
|
17
|
+
/**
|
|
18
|
+
* Generates CreditCardBrand object with random data.
|
|
19
|
+
*
|
|
20
|
+
* @param {Partial<CreditCardBrand>} overrides Properties to override a {@link CreditCardBrand}
|
|
21
|
+
* @returns {CreditCardBrand} A {@link CreditCardBrand} object
|
|
22
|
+
*/
|
|
23
|
+
export declare const buildCreditCardBrand: (overrides?: Partial<CreditCardBrand>) => CreditCardBrand;
|
|
24
|
+
/**
|
|
25
|
+
* Generates a list of CreditCardBrand objects with random data.
|
|
26
|
+
*
|
|
27
|
+
* @param {number} quantity The number of objects to be generated
|
|
28
|
+
* @returns {CreditCardBrand[]} An array of credit card brands, see {@link CreditCardBrand}
|
|
29
|
+
*/
|
|
30
|
+
export declare const genCreditCardBrands: (quantity?: number | undefined) => CreditCardBrand[];
|
|
31
|
+
/**
|
|
32
|
+
* Generates CreditCardMapping object with random data.
|
|
33
|
+
*
|
|
34
|
+
* @param {Partial<CreditCardMapping>} overrides Properties to override a {@link CreditCardMapping}
|
|
35
|
+
* @returns {CreditCardMapping} A {@link CreditCardMapping} object
|
|
36
|
+
*/
|
|
37
|
+
export declare const buildCreditCardMapping: (overrides?: Partial<CreditCardMapping>) => CreditCardMapping;
|
|
38
|
+
/**
|
|
39
|
+
* Generates a list of CreditCardMapping objects with random data.
|
|
40
|
+
*
|
|
41
|
+
* @param {number} quantity The number of objects to be generated
|
|
42
|
+
* @returns {CreditCardMapping[]} An array of credit card mappings, see {@link CreditCardMapping}
|
|
43
|
+
*/
|
|
44
|
+
export declare const genCreditCardMappings: (quantity?: number | undefined) => CreditCardMapping[];
|
|
@@ -1,25 +1,125 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseProduct } from "@artisan-commerce/types";
|
|
2
2
|
import { CartProductAnswer } from "@artisan-commerce/types";
|
|
3
|
-
import {
|
|
3
|
+
import { CartProductQuestion } from "@artisan-commerce/types";
|
|
4
4
|
import { CartProduct, ProductQuestion } from "@artisan-commerce/types";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import { ProductAnswer, ProductDetails } from "@artisan-commerce/types";
|
|
6
|
+
import { PriceCategory, PriceCategoryTax } from "@artisan-commerce/types";
|
|
7
|
+
/**
|
|
8
|
+
* Generates PriceCategoryTax object with random data.
|
|
9
|
+
*
|
|
10
|
+
* @param {Partial<PriceCategoryTax>} overrides Properties to override a {@link PriceCategoryTax}
|
|
11
|
+
* @returns {PriceCategoryTax} A {@link PriceCategoryTax} object
|
|
12
|
+
*/
|
|
9
13
|
export declare const buildPriceCategoryTax: (overrides?: Partial<PriceCategoryTax>) => PriceCategoryTax;
|
|
14
|
+
/**
|
|
15
|
+
* Generates a list of PriceCategoryTax objects with random data.
|
|
16
|
+
*
|
|
17
|
+
* @param {number} quantity The number of objects to be generated
|
|
18
|
+
* @returns {PriceCategoryTax[]} An array of price category taxes objects, see {@link PriceCategoryTax}
|
|
19
|
+
*/
|
|
10
20
|
export declare const genPriceCategoryTaxes: (quantity?: number | undefined) => PriceCategoryTax[];
|
|
21
|
+
/**
|
|
22
|
+
* Generates PriceCategory object with random data.
|
|
23
|
+
*
|
|
24
|
+
* @param {Partial<PriceCategory>} overrides Properties to override a {@link PriceCategory}
|
|
25
|
+
* @returns {PriceCategory} A {@link PriceCategory} object
|
|
26
|
+
*/
|
|
11
27
|
export declare const buildPriceCategory: (overrides?: Partial<PriceCategory>) => PriceCategory;
|
|
28
|
+
/**
|
|
29
|
+
* Generates BaseProduct object with random data.
|
|
30
|
+
*
|
|
31
|
+
* @param {Partial<BaseProduct>} overrides Properties to override a {@link BaseProduct}
|
|
32
|
+
* @returns {BaseProduct} A {@link BaseProduct} object
|
|
33
|
+
*/
|
|
12
34
|
export declare const buildBaseProduct: (overrides?: Partial<BaseProduct>) => BaseProduct;
|
|
35
|
+
/**
|
|
36
|
+
* Generates a list of BaseProduct objects with random data.
|
|
37
|
+
*
|
|
38
|
+
* @param {number} quantity The number of objects to be generated
|
|
39
|
+
* @returns {BaseProduct[]} An array of BaseProduct objects, see {@link BaseProduct}
|
|
40
|
+
*/
|
|
13
41
|
export declare const genBaseProducts: (quantity?: number | undefined) => BaseProduct[];
|
|
42
|
+
/** Render type for product answers */
|
|
14
43
|
export declare const MODIFIER_TYPES: string[];
|
|
44
|
+
/**
|
|
45
|
+
* Generates ProductAnswer object with random data.
|
|
46
|
+
*
|
|
47
|
+
* @param {Partial<ProductAnswer>} overrides Properties to override a {@link ProductAnswer}
|
|
48
|
+
* @param {number} loop The quantity of loops the function will be run
|
|
49
|
+
* @returns {ProductAnswer} A {@link ProductAnswer} object
|
|
50
|
+
*/
|
|
15
51
|
export declare const buildProductAnswer: (overrides?: Partial<ProductAnswer>, loop?: number) => ProductAnswer;
|
|
52
|
+
/**
|
|
53
|
+
* Generates a list of ProductAnswer objects with random data.
|
|
54
|
+
*
|
|
55
|
+
* @param {number} quantity The number of objects to be generated
|
|
56
|
+
* @param {number} loop The quantity of loops the function will be run
|
|
57
|
+
* @returns {ProductAnswer[]} An array of ProductAnswer objects, see {@link ProductAnswer}
|
|
58
|
+
*/
|
|
16
59
|
export declare const genProductAnswers: (quantity?: number | undefined, loop?: number) => ProductAnswer[];
|
|
60
|
+
/**
|
|
61
|
+
* Generates ProductQuestion object with random data.
|
|
62
|
+
*
|
|
63
|
+
* @param {Partial<ProductQuestion>} overrides Properties to override a {@link ProductQuestion}
|
|
64
|
+
* @param {number} loop The quantity of loops the function will be run
|
|
65
|
+
* @returns {ProductQuestion} A {@link ProductQuestion} object
|
|
66
|
+
*/
|
|
17
67
|
export declare const buildProductQuestion: (overrides?: Partial<ProductQuestion>, loop?: number) => ProductQuestion;
|
|
68
|
+
/**
|
|
69
|
+
* Generates a list of ProductQuestion objects with random data.
|
|
70
|
+
*
|
|
71
|
+
* @param {number} quantity The number of objects to be generated
|
|
72
|
+
* @param {number} loop The quantity of loops the function will be run
|
|
73
|
+
* @returns {ProductQuestion[]} An array of ProductQuestion objects, see {@link ProductQuestion}
|
|
74
|
+
*/
|
|
18
75
|
export declare const genProductQuestions: (quantity?: number | undefined, loop?: number) => ProductQuestion[];
|
|
76
|
+
/**
|
|
77
|
+
* Generates ProductDetails object with random data.
|
|
78
|
+
*
|
|
79
|
+
* @param {Partial<ProductDetails>} overrides Properties to override a {@link ProductDetails}
|
|
80
|
+
* @returns {ProductDetails} A {@link ProductDetails} object
|
|
81
|
+
*/
|
|
19
82
|
export declare const buildProductDetails: (overrides?: Partial<ProductDetails>) => ProductDetails;
|
|
83
|
+
/**
|
|
84
|
+
* Generates a list of ProductDetails objects with random data.
|
|
85
|
+
*
|
|
86
|
+
* @param {number} quantity The number of objects to be generated
|
|
87
|
+
* @returns {ProductDetails[]} An array of ProductDetails objects, see {@link ProductDetails}
|
|
88
|
+
*/
|
|
20
89
|
export declare const genProductDetails: (quantity?: number | undefined) => ProductDetails[];
|
|
90
|
+
/**
|
|
91
|
+
* Generates CartProductAnswer object with random data.
|
|
92
|
+
*
|
|
93
|
+
* @param questionId The question id associated with the answer
|
|
94
|
+
* @param {Partial<CartProductAnswer>} overrides Properties to override a {@link CartProductAnswer}
|
|
95
|
+
* @returns {CartProductAnswer} A {@link CartProductAnswer} object
|
|
96
|
+
*/
|
|
21
97
|
export declare const buildCartProductAnswer: (questionId: string, overrides?: Partial<CartProductAnswer>) => CartProductAnswer;
|
|
98
|
+
/**
|
|
99
|
+
* Generates a list of CartProductAnswer objects with random data.
|
|
100
|
+
*
|
|
101
|
+
* @param {number} quantity The number of objects to be generated
|
|
102
|
+
* @returns {CartProductAnswer[]} An array of CartProductAnswer objects, see {@link CartProductAnswer}
|
|
103
|
+
*/
|
|
22
104
|
export declare const genCartProductAnswers: (quantity?: number | undefined) => CartProductAnswer[];
|
|
105
|
+
/**
|
|
106
|
+
* Generates CartProductQuestion object with random data.
|
|
107
|
+
*
|
|
108
|
+
* @param {Partial<CartProductQuestion>} overrides Properties to override a {@link CartProductQuestion}
|
|
109
|
+
* @returns {CartProductQuestion} A {@link CartProductQuestion} object
|
|
110
|
+
*/
|
|
23
111
|
export declare const buildCartProductQuestion: (overrides?: Partial<CartProductQuestion>) => CartProductQuestion;
|
|
112
|
+
/**
|
|
113
|
+
* Generates a list of CartProductQuestion objects with random data.
|
|
114
|
+
*
|
|
115
|
+
* @param {number} quantity The number of objects to be generated
|
|
116
|
+
* @returns {CartProductQuestion[]} An array of CartProductQuestion objects, see {@link CartProductQuestion}
|
|
117
|
+
*/
|
|
24
118
|
export declare const genCartProductQuestions: (quantity?: number | undefined) => CartProductQuestion[];
|
|
119
|
+
/**
|
|
120
|
+
* Generates CartProduct object with random data.
|
|
121
|
+
*
|
|
122
|
+
* @param {Partial<CartProduct>} overrides Properties to override a {@link CartProduct}
|
|
123
|
+
* @returns {CartProduct} A {@link CartProduct} object
|
|
124
|
+
*/
|
|
25
125
|
export declare const buildCartProduct: (overrides?: Partial<CartProduct>) => CartProduct;
|
|
@@ -1,28 +1,80 @@
|
|
|
1
|
-
import { ShippingAddress, LivingPlace } from "@artisan-commerce/types";
|
|
1
|
+
import { ShippingAddress, LivingPlace, Field } from "@artisan-commerce/types";
|
|
2
|
+
import { Rule, Message } from "@artisan-commerce/types";
|
|
3
|
+
/** Generates a random street name. */
|
|
2
4
|
export declare const genStreetName: () => string;
|
|
5
|
+
/** Generates a random street number. */
|
|
3
6
|
export declare const genStreetNumber: (format?: string | undefined) => string;
|
|
7
|
+
/** Generates a random latitude. */
|
|
4
8
|
export declare const genLatitude: () => string;
|
|
9
|
+
/** Generates a random longitude. */
|
|
5
10
|
export declare const genLongitude: () => string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export declare const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Generates Field object with random data.
|
|
13
|
+
*
|
|
14
|
+
* @param {Partial<Field>} overrides Properties to override a {@link Field}
|
|
15
|
+
* @returns {Field} A {@link Field} object
|
|
16
|
+
*/
|
|
17
|
+
export declare const buildField: (overrides?: Partial<Field>) => Field;
|
|
18
|
+
/**
|
|
19
|
+
* Generates a list of Field objects with random data.
|
|
20
|
+
*
|
|
21
|
+
* @param {number} quantity The number of objects to be generated
|
|
22
|
+
* @returns {Field[]} A list of {@link Field} objects
|
|
23
|
+
*/
|
|
24
|
+
export declare const genFields: (quantity?: number | undefined) => Field[];
|
|
25
|
+
/**
|
|
26
|
+
* Generates Rule object with random data.
|
|
27
|
+
*
|
|
28
|
+
* @param {Partial<Rule>} overrides Properties to override a {@link Message}
|
|
29
|
+
* @returns {Rule} A {@link Rule} object
|
|
30
|
+
*/
|
|
31
|
+
export declare const buildRule: (overrides?: Partial<Rule> | undefined) => Rule;
|
|
32
|
+
/**
|
|
33
|
+
* Generates Message object with random data.
|
|
34
|
+
*
|
|
35
|
+
* @param {Partial<Message>} overrides Properties to override a {@link Message}
|
|
36
|
+
* @returns {Message} A {@link Message} object
|
|
37
|
+
*/
|
|
38
|
+
export declare const buildMessage: (overrides?: Partial<Message> | undefined) => Message;
|
|
39
|
+
/**
|
|
40
|
+
* Generates a list of Rules objects with random data.
|
|
41
|
+
*
|
|
42
|
+
* @param {number} quantity The number of objects to be generated
|
|
43
|
+
* @returns {Rule[]} A list of {@link Rule} objects
|
|
44
|
+
*/
|
|
45
|
+
export declare const genRules: (quantity?: number | undefined) => Rule[];
|
|
46
|
+
/**
|
|
47
|
+
* Generates a list of Messages objects with random data.
|
|
48
|
+
*
|
|
49
|
+
* @param {number} quantity The number of objects to be generated
|
|
50
|
+
* @returns {Message[]} A list of {@link Message} objects
|
|
51
|
+
*/
|
|
52
|
+
export declare const genMessages: (quantity?: number | undefined) => Message[];
|
|
53
|
+
/**
|
|
54
|
+
* Generates LivingPlace object with random data.
|
|
55
|
+
*
|
|
56
|
+
* @param {Partial<LivingPlace>} overrides Properties to override a {@link LivingPlace}
|
|
57
|
+
* @returns {LivingPlace} A {@link LivingPlace} object
|
|
58
|
+
*/
|
|
27
59
|
export declare const buildLivingPlace: (overrides?: Partial<LivingPlace>) => LivingPlace;
|
|
60
|
+
/**
|
|
61
|
+
* Generates a list of LivingPlaces objects with random data.
|
|
62
|
+
*
|
|
63
|
+
* @param {number} quantity The number of objects to be generated
|
|
64
|
+
* @returns {LivingPlace[]} A list of {@link LivingPlace} objects
|
|
65
|
+
*/
|
|
66
|
+
export declare const genLivingPlaces: (quantity?: number | undefined) => LivingPlace[];
|
|
67
|
+
/**
|
|
68
|
+
* Generates ShippingAddress object with random data.
|
|
69
|
+
*
|
|
70
|
+
* @param {Partial<ShippingAddress>} overrides Properties to override a {@link ShippingAddress}
|
|
71
|
+
* @returns {ShippingAddress} A {@link ShippingAddress} object
|
|
72
|
+
*/
|
|
28
73
|
export declare const buildShippingAddress: (overrides?: Partial<ShippingAddress>) => ShippingAddress;
|
|
74
|
+
/**
|
|
75
|
+
* Generates a list of ShippingAddresses objects with random data.
|
|
76
|
+
*
|
|
77
|
+
* @param {number} quantity The number of objects to be generated
|
|
78
|
+
* @returns {ShippingAddress[]} A list of {@link ShippingAddress} objects
|
|
79
|
+
*/
|
|
80
|
+
export declare const genShippingAddress: (quantity?: number | undefined) => ShippingAddress[];
|