@artisan-commerce/builders 0.7.0-canary.19 → 0.7.0-canary.2

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 -147
  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 +32 -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 +20 -22
  35. package/dist/bundle.cjs.js +0 -90339
  36. package/dist/bundle.cjs.js.map +0 -1
  37. package/dist/bundle.d.ts +0 -2364
  38. package/dist/bundle.esm.js +0 -90316
  39. package/dist/bundle.esm.js.map +0 -1
  40. package/dist/bundle.umd.js +0 -90345
  41. package/dist/bundle.umd.js.map +0 -1
@@ -0,0 +1,37 @@
1
+ import { Settings, UserSettings } from "@artisan-commerce/types";
2
+ /**
3
+ * Generates Settings object with random data.
4
+ *
5
+ * @since 0.5.15
6
+ * @param {Partial<Settings>} overrides Properties to override
7
+ * a {@link Settings}
8
+ * @returns {Settings} A {@link Settings} object
9
+ */
10
+ export declare const buildSettings: (overrides?: Partial<Settings>) => Settings;
11
+ /**
12
+ * Generates a list of Settings objects with random data.
13
+ *
14
+ * @since 0.5.15
15
+ * @param {number} quantity The number of objects to be generated
16
+ * @returns {Settings[]} An array of Settings objects,
17
+ * see {@link Settings}
18
+ */
19
+ export declare const genSettings: (quantity?: number | undefined) => Settings[];
20
+ /**
21
+ * Generates UserSettings object with random data.
22
+ *
23
+ * @since 0.5.15
24
+ * @param {Partial<UserSettings>} overrides Properties to override
25
+ * a {@link UserSettings}
26
+ * @returns {UserSettings} A {@link UserSettings} object
27
+ */
28
+ export declare const buildUserSettings: (overrides?: Partial<UserSettings>) => UserSettings;
29
+ /**
30
+ * Generates a list of UserSettings objects with random data.
31
+ *
32
+ * @since 0.5.15
33
+ * @param {number} quantity The number of objects to be generated
34
+ * @returns {UserSettings[]} An array of UserSettings objects,
35
+ * see {@link UserSettings}
36
+ */
37
+ export declare const genUserSettings: (quantity?: number | undefined) => UserSettings[];
@@ -0,0 +1,108 @@
1
+ import { ShippingAddress, LivingPlace, Field } from "@artisan-commerce/types";
2
+ import { Rule, Message } from "@artisan-commerce/types";
3
+ /**
4
+ * Generates a random street name.
5
+ *
6
+ * @since 0.5.14
7
+ */
8
+ export declare const genStreetName: () => string;
9
+ /**
10
+ * Generates a random street number.
11
+ *
12
+ * @since 0.5.14
13
+ */
14
+ export declare const genStreetNumber: (format?: string | undefined) => string;
15
+ /**
16
+ * Generates a random latitude.
17
+ *
18
+ * @since 0.5.14
19
+ */
20
+ export declare const genLatitude: () => string;
21
+ /**
22
+ * Generates a random longitude.
23
+ *
24
+ * @since 0.5.14
25
+ */
26
+ export declare const genLongitude: () => string;
27
+ /**
28
+ * Generates Field object with random data.
29
+ *
30
+ * @since 0.5.14
31
+ * @param {Partial<Field>} overrides Properties to override a {@link Field}
32
+ * @returns {Field} A {@link Field} object
33
+ */
34
+ export declare const buildField: (overrides?: Partial<Field>) => Field;
35
+ /**
36
+ * Generates a list of Field objects with random data.
37
+ *
38
+ * @since 0.5.14
39
+ * @param {number} quantity The number of objects to be generated
40
+ * @returns {Field[]} A list of {@link Field} objects
41
+ */
42
+ export declare const genFields: (quantity?: number | undefined) => Field[];
43
+ /**
44
+ * Generates Rule object with random data.
45
+ *
46
+ * @since 0.5.14
47
+ * @param {Partial<Rule>} overrides Properties to override a {@link Rule}
48
+ * @returns {Rule} A {@link Rule} object
49
+ */
50
+ export declare const buildRule: (overrides?: Partial<Rule> | undefined) => Rule;
51
+ /**
52
+ * Generates Message object with random data.
53
+ *
54
+ * @since 0.5.14
55
+ * @param {Partial<Message>} overrides Properties to override a {@link Message}
56
+ * @returns {Message} A {@link Message} object
57
+ */
58
+ export declare const buildMessage: (overrides?: Partial<Message> | undefined) => Message;
59
+ /**
60
+ * Generates a list of Rules objects with random data.
61
+ *
62
+ * @since 0.5.14
63
+ * @param {number} quantity The number of objects to be generated
64
+ * @returns {Rule[]} A list of {@link Rule} objects
65
+ */
66
+ export declare const genRules: (quantity?: number | undefined) => Rule[];
67
+ /**
68
+ * Generates a list of Messages objects with random data.
69
+ *
70
+ * @since 0.5.14
71
+ * @param {number} quantity The number of objects to be generated
72
+ * @returns {Message[]} A list of {@link Message} objects
73
+ */
74
+ export declare const genMessages: (quantity?: number | undefined) => Message[];
75
+ /**
76
+ * Generates LivingPlace object with random data.
77
+ *
78
+ * @since 0.5.14
79
+ * @param {Partial<LivingPlace>} overrides Properties to override
80
+ * a {@link LivingPlace}
81
+ * @returns {LivingPlace} A {@link LivingPlace} object
82
+ */
83
+ export declare const buildLivingPlace: (overrides?: Partial<LivingPlace>) => LivingPlace;
84
+ /**
85
+ * Generates a list of LivingPlaces objects with random data.
86
+ *
87
+ * @since 0.5.14
88
+ * @param {number} quantity The number of objects to be generated
89
+ * @returns {LivingPlace[]} A list of {@link LivingPlace} objects
90
+ */
91
+ export declare const genLivingPlaces: (quantity?: number | undefined) => LivingPlace[];
92
+ /**
93
+ * Generates ShippingAddress object with random data.
94
+ *
95
+ * @since 0.5.14
96
+ * @param {Partial<ShippingAddress>} overrides Properties to override
97
+ * a {@link ShippingAddress}
98
+ * @returns {ShippingAddress} A {@link ShippingAddress} object
99
+ */
100
+ export declare const buildShippingAddress: (overrides?: Partial<ShippingAddress>) => ShippingAddress;
101
+ /**
102
+ * Generates a list of ShippingAddresses objects with random data.
103
+ *
104
+ * @since 0.5.14
105
+ * @param {number} quantity The number of objects to be generated
106
+ * @returns {ShippingAddress[]} A list of {@link ShippingAddress} objects
107
+ */
108
+ export declare const genShippingAddress: (quantity?: number | undefined) => ShippingAddress[];
@@ -0,0 +1,76 @@
1
+ import { ShippingCostTax } from "@artisan-commerce/types";
2
+ import { BillTotal, BillTotalCategory } from "@artisan-commerce/types";
3
+ import { ShoppingCart, ShippingCost } from "@artisan-commerce/types";
4
+ import { CartStore, Objectify } from "@artisan-commerce/types";
5
+ /**
6
+ * Generates BillTotalCategory object with random data.
7
+ *
8
+ * @since 0.5.14
9
+ * @param {Partial<BillTotalCategory>} overrides Properties to override
10
+ * a {@link BillTotalCategory}
11
+ * @returns {BillTotalCategory} A {@link BillTotalCategory} object
12
+ */
13
+ export declare const buildBillTotalNormalCategory: (overrides?: Partial<BillTotalCategory>) => BillTotalCategory;
14
+ /**
15
+ * Generates BillTotal object with random data.
16
+ *
17
+ * @since 0.5.14
18
+ * @param {Partial<BillTotal>} overrides Properties to override
19
+ * a {@link BillTotal}
20
+ * @returns {BillTotal} A {@link BillTotal} object
21
+ */
22
+ export declare const buildBillTotal: (overrides?: Partial<BillTotal>) => BillTotal;
23
+ /**
24
+ * Generates CartStore object with random data.
25
+ *
26
+ * @since 0.5.14
27
+ * @param {Partial<CartStore>} overrides Properties to override
28
+ * a {@link CartStore}
29
+ * @returns {CartStore} A {@link CartStore} object
30
+ */
31
+ export declare const buildCartStore: (overrides?: Partial<CartStore>) => CartStore;
32
+ /**
33
+ * Generates a CartStore object where the key is the store id
34
+ * and the value is the cart store object
35
+ *
36
+ * @since 0.5.14
37
+ * @param {number} quantity The number of objects to be generated
38
+ * @returns {Objectify<CartStore>} An Objectify<{@link CartStore}>
39
+ */
40
+ export declare const genCartStores: (quantity?: number | undefined) => Objectify<CartStore>;
41
+ /**
42
+ * Generates ShoppingCart object with random data.
43
+ *
44
+ * @since 0.5.14
45
+ * @param {Partial<ShoppingCart>} overrides Properties to override
46
+ * a {@link ShoppingCart}
47
+ * @returns {ShoppingCart} A {@link ShoppingCart} object
48
+ */
49
+ export declare const buildShoppingCart: (overrides?: Partial<ShoppingCart>) => ShoppingCart;
50
+ /**
51
+ * Generates ShippingCost object with random data.
52
+ *
53
+ * @since 0.5.14
54
+ * @param {Partial<ShippingCost>} overrides Properties to override
55
+ * a {@link ShippingCost}
56
+ * @returns {ShippingCost} A {@link ShippingCost} object
57
+ */
58
+ export declare const buildShippingCost: (overrides?: Partial<ShippingCost>) => ShippingCost;
59
+ /**
60
+ * Generates ShippingCostTax object with random data.
61
+ *
62
+ * @since 0.5.14
63
+ * @param {Partial<ShippingCostTax>} overrides Properties to override
64
+ * a {@link ShippingCostTax}
65
+ * @returns {ShippingCostTax} A {@link ShippingCostTax} object
66
+ */
67
+ export declare const buildShippingCostTax: (overrides?: Partial<ShippingCostTax>) => ShippingCostTax;
68
+ /**
69
+ * Generates a list of ShippingCostTax objects with random data.
70
+ *
71
+ * @since 0.5.14
72
+ * @param {number} quantity The number of objects to be generated
73
+ * @returns {ShippingCostTax[]} An array of shipping cost taxes objects,
74
+ * see {@link ShippingCostTax}
75
+ */
76
+ export declare const genShippingCostTaxes: (quantity?: number | undefined) => ShippingCostTax[];
@@ -0,0 +1,106 @@
1
+ import { Service, Delivery, Schedule } from "@artisan-commerce/types";
2
+ import { Store, AdditionalStoreInformation } from "@artisan-commerce/types";
3
+ import { GenericStoreLocation, StoreLocation } from "@artisan-commerce/types";
4
+ /**
5
+ * Generates Store object with random data.
6
+ *
7
+ * @since 0.5.14
8
+ * @param {Partial<Store>} overrides Properties to override a {@link Store}
9
+ * @returns {Store} A {@link Store} object
10
+ */
11
+ export declare const buildStore: (overrides?: Partial<Store>) => Store;
12
+ /**
13
+ * Generates AdditionalStoreInformation object with random data.
14
+ *
15
+ * @since 0.5.14
16
+ * @param {Partial<AdditionalStoreInformation>} overrides Properties to
17
+ * override a {@link AdditionalStoreInformation}
18
+ * @returns {AdditionalStoreInformation} A
19
+ * {@link AdditionalStoreInformation} object
20
+ */
21
+ export declare const buildAdditionalStoreInformation: (overrides?: Partial<AdditionalStoreInformation>) => AdditionalStoreInformation;
22
+ /**
23
+ * Generates Delivery object with random data.
24
+ *
25
+ * @since 0.5.14
26
+ * @param {Partial<Delivery>} overrides Properties to override
27
+ * a {@link Delivery}
28
+ * @returns {Delivery} A {@link Delivery} object
29
+ */
30
+ export declare const buildDelivery: (overrides?: Partial<Delivery>) => Delivery;
31
+ /**
32
+ * Generates Schedule object with random data.
33
+ *
34
+ * @since 0.5.14
35
+ * @param {Partial<Schedule>} overrides Properties to override
36
+ * a {@link Schedule}
37
+ * @returns {Schedule} A {@link Schedule} object
38
+ */
39
+ export declare const buildSchedule: (overrides?: Partial<Schedule>) => Schedule;
40
+ /**
41
+ * Generates Service object with random data.
42
+ *
43
+ * @since 0.5.14
44
+ * @param {Partial<Service>} overrides Properties to override a {@link Service}
45
+ * @returns {Service} A {@link Service} object
46
+ */
47
+ export declare const buildService: (overrides?: Partial<Service>) => Service;
48
+ /**
49
+ * Generates a list of Service objects with random data.
50
+ *
51
+ * @since 0.5.14
52
+ * @param {number} quantity The number of objects to be generated
53
+ * @returns {Service[]} An array of {@link Service}s objects
54
+ */
55
+ export declare const genServices: (quantity?: number | undefined) => Service[];
56
+ /**
57
+ * Generates a list of Schedule objects with random data.
58
+ *
59
+ * @since 0.5.14
60
+ * @param {number} quantity The number of objects to be generated
61
+ * @returns {Schedule[]} An array of {@link Schedule}s objects
62
+ */
63
+ export declare const genSchedules: (quantity?: number | undefined) => Schedule[];
64
+ /**
65
+ * Generates a list of Store objects with random data.
66
+ *
67
+ * @since 0.5.14
68
+ * @param {number} quantity The number of objects to be generated
69
+ * @returns {Store[]} An array of {@link Store}s objects
70
+ */
71
+ export declare const genStores: (quantity?: number | undefined) => Store[];
72
+ /**
73
+ * Generates GenericStoreLocation object with random data.
74
+ *
75
+ * @since 0.5.14
76
+ * @param {Partial<GenericStoreLocation>} overrides Properties to override
77
+ * a {@link GenericStoreLocation}
78
+ * @returns {GenericStoreLocation} A {@link GenericStoreLocation} object
79
+ */
80
+ export declare const buildGenericStoreLocation: (overrides?: Partial<GenericStoreLocation>) => GenericStoreLocation;
81
+ /**
82
+ * Generates a list of GenericStoreLocation objects with random data.
83
+ *
84
+ * @since 0.5.14
85
+ * @param {number} quantity The number of objects to be generated
86
+ * @returns {GenericStoreLocation[]} An array of {@link GenericStoreLocation}s
87
+ * objects
88
+ */
89
+ export declare const genGenericStoreLocation: (quantity?: number | undefined) => GenericStoreLocation[];
90
+ /**
91
+ * Generates StoreLocation object with random data.
92
+ *
93
+ * @since 0.5.14
94
+ * @param {Partial<StoreLocation>} overrides Properties to override
95
+ * a {@link StoreLocation}
96
+ * @returns {StoreLocation} A {@link StoreLocation} object
97
+ */
98
+ export declare const buildStoreLocation: (overrides?: Partial<StoreLocation>) => StoreLocation;
99
+ /**
100
+ * Generates a list of StoreLocation objects with random data.
101
+ *
102
+ * @since 0.5.14
103
+ * @param {number} quantity The number of objects to be generated
104
+ * @returns {StoreLocation[]} An array of {@link StoreLocation}s objects
105
+ */
106
+ export declare const genStoreLocation: (quantity?: number | undefined) => StoreLocation[];
@@ -0,0 +1,17 @@
1
+ import { User } from "@artisan-commerce/types";
2
+ /**
3
+ * Generates User object with random data.
4
+ *
5
+ * @since 0.5.14
6
+ * @param {Partial<User>} overrides Properties to override a {@link User}
7
+ * @returns {User} A {@link User} object
8
+ */
9
+ export declare const buildUser: (overrides?: Partial<User>) => User;
10
+ /**
11
+ * Generates a list of User objects with random data.
12
+ *
13
+ * @since 0.5.14
14
+ * @param {number} quantity The number of objects to be generated
15
+ * @returns {User[]} An array of {@link User}s objects
16
+ */
17
+ export declare const genUsers: (quantity?: number | undefined) => User[];
@@ -0,0 +1,17 @@
1
+ import { Vendor } from "@artisan-commerce/types";
2
+ /**
3
+ * Generates Vendor object with random data.
4
+ *
5
+ * @since 0.5.14
6
+ * @param {Partial<Vendor>} overrides Properties to override a {@link Vendor}
7
+ * @returns {Vendor} A {@link Vendor} object
8
+ */
9
+ export declare const buildVendor: (overrides?: Partial<Vendor>) => Vendor;
10
+ /**
11
+ * Generates a list of Vendor objects with random data.
12
+ *
13
+ * @since 0.5.14
14
+ * @param {number} quantity The number of objects to be generated
15
+ * @returns {Vendor[]} An array of {@link Vendor}s objects
16
+ */
17
+ export declare const genVendors: (quantity?: number | undefined) => Vendor[];
@@ -0,0 +1,2 @@
1
+ declare const CONSTANTS: {};
2
+ export default CONSTANTS;
@@ -0,0 +1,4 @@
1
+ import { ProductFixedData } from "../types/product.types";
2
+ export declare const foodShopProducts: ProductFixedData[];
3
+ export declare const electronicsProducts: ProductFixedData[];
4
+ export declare const products: ProductFixedData[];
@@ -0,0 +1,23 @@
1
+ import * as accountBuilders from "./builders/account.builder";
2
+ import * as bannerBuilders from "./builders/banner.builder";
3
+ import * as billingDataBuilders from "./builders/billingData.builder";
4
+ import * as catalogueBuilders from "./builders/catalogue.builder";
5
+ import * as categoryBuilders from "./builders/category.builder";
6
+ import * as common from "./builders/common.builder";
7
+ import * as countryBuilders from "./builders/country.builder";
8
+ import * as couponBuilders from "./builders/coupon.builder";
9
+ import * as fulfillmentBuilders from "./builders/fulfillment.builder";
10
+ import * as imageBuilders from "./builders/image.builder";
11
+ import * as notificationBuilders from "./builders/notification.builder";
12
+ import * as orderBuilders from "./builders/order.builder";
13
+ import * as paymentBuilders from "./builders/payment.builder";
14
+ import * as productBuilders from "./builders/product.builder";
15
+ import * as settingsBuilders from "./builders/settings.builder";
16
+ import * as shippingAddressBuilders from "./builders/shippingAddress.builder";
17
+ import * as shoppingCartBuilders from "./builders/shoppingCart.builder";
18
+ import * as storeBuilders from "./builders/store.builder";
19
+ import * as userBuilders from "./builders/user.builder";
20
+ import * as vendorBuilders from "./builders/vendor.builder";
21
+ import ArtisnData from "./lib/artisn";
22
+ export { common, accountBuilders, bannerBuilders, billingDataBuilders, categoryBuilders, catalogueBuilders, countryBuilders, couponBuilders, fulfillmentBuilders, imageBuilders, notificationBuilders, orderBuilders, productBuilders, paymentBuilders, settingsBuilders, shippingAddressBuilders, shoppingCartBuilders, vendorBuilders, storeBuilders, userBuilders };
23
+ export default ArtisnData;
@@ -0,0 +1,5 @@
1
+ import { ECOMMERCE_TYPES } from "../types/artisn.types";
2
+ declare class ArtisnData {
3
+ constructor(ecommerceType: ECOMMERCE_TYPES);
4
+ }
5
+ export default ArtisnData;