@artisan-commerce/builders 0.4.2 → 0.4.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.
- package/README.md +93 -93
- package/build/main.bundle.js +1 -1
- package/build/report.html +2 -2
- package/build/src/builders/channel.builder.d.ts +3 -3
- package/build/src/builders/common.builder.d.ts +25 -25
- package/build/src/builders/product.builder.d.ts +24 -24
- package/build/src/builders/shoppingCart.builder.d.ts +8 -8
- package/build/src/builders/store.builder.d.ts +11 -11
- package/build/src/builders/vendor.builder.d.ts +2 -2
- package/build/src/config/constants.d.ts +13 -13
- package/build/src/i18n/i18n.d.ts +2 -2
- package/build/src/index.d.ts +7 -7
- package/build/src/utils/axios.d.ts +2 -2
- package/build/src/utils/bugsnag.d.ts +2 -2
- package/build/src/vendors.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Channel } from "@artisan-commerce/types";
|
|
2
|
-
export declare const buildChannel: (overrides?: Partial<Channel>) => Channel;
|
|
3
|
-
export declare const genChannels: (quantity?: number | undefined) => Channel[];
|
|
1
|
+
import { Channel } from "@artisan-commerce/types";
|
|
2
|
+
export declare const buildChannel: (overrides?: Partial<Channel>) => Channel;
|
|
3
|
+
export declare const genChannels: (quantity?: number | undefined) => Channel[];
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
export declare const getPassword: (...args: any[]) => string;
|
|
2
|
-
export declare const getUsername: (firstName?: string | undefined, lastName?: string | undefined) => string;
|
|
3
|
-
export declare const genId: () => string;
|
|
4
|
-
export declare const genNumericId: () => number;
|
|
5
|
-
export declare const genWord: () => string;
|
|
6
|
-
export declare const genName: (firstName?: string | undefined, lastName?: string | undefined, gender?: number | undefined) => string;
|
|
7
|
-
export declare const genEmail: (firstName?: string | undefined, lastName?: string | undefined, provider?: string | undefined) => string;
|
|
8
|
-
export declare const genCompanyName: (format?: number | undefined) => string;
|
|
9
|
-
export declare const genParagraph: (sentenceCount?: number | undefined) => string;
|
|
10
|
-
export declare const genTitle: () => string;
|
|
11
|
-
export declare const genNumber: {
|
|
12
|
-
(max?: number | undefined): number;
|
|
13
|
-
(options?: {
|
|
14
|
-
min?: number | undefined;
|
|
15
|
-
max?: number | undefined;
|
|
16
|
-
precision?: number | undefined;
|
|
17
|
-
} | undefined): number;
|
|
18
|
-
};
|
|
19
|
-
export declare const getBoolean: () => boolean;
|
|
20
|
-
export declare const genBiasBoolean: (bias: number) => boolean;
|
|
21
|
-
export declare const genDocument: (digits: number) => string;
|
|
22
|
-
export declare const genMobilPhone: (countryCode: string) => string;
|
|
23
|
-
export declare const fillNumber: (num: string, max?: number | undefined) => string;
|
|
24
|
-
export declare const chooseRandom: <T>(arr: T[]) => T;
|
|
25
|
-
export declare const chooseRandomEnum: <T>(anEnum: T) => T[keyof T];
|
|
1
|
+
export declare const getPassword: (...args: any[]) => string;
|
|
2
|
+
export declare const getUsername: (firstName?: string | undefined, lastName?: string | undefined) => string;
|
|
3
|
+
export declare const genId: () => string;
|
|
4
|
+
export declare const genNumericId: () => number;
|
|
5
|
+
export declare const genWord: () => string;
|
|
6
|
+
export declare const genName: (firstName?: string | undefined, lastName?: string | undefined, gender?: number | undefined) => string;
|
|
7
|
+
export declare const genEmail: (firstName?: string | undefined, lastName?: string | undefined, provider?: string | undefined) => string;
|
|
8
|
+
export declare const genCompanyName: (format?: number | undefined) => string;
|
|
9
|
+
export declare const genParagraph: (sentenceCount?: number | undefined) => string;
|
|
10
|
+
export declare const genTitle: () => string;
|
|
11
|
+
export declare const genNumber: {
|
|
12
|
+
(max?: number | undefined): number;
|
|
13
|
+
(options?: {
|
|
14
|
+
min?: number | undefined;
|
|
15
|
+
max?: number | undefined;
|
|
16
|
+
precision?: number | undefined;
|
|
17
|
+
} | undefined): number;
|
|
18
|
+
};
|
|
19
|
+
export declare const getBoolean: () => boolean;
|
|
20
|
+
export declare const genBiasBoolean: (bias: number) => boolean;
|
|
21
|
+
export declare const genDocument: (digits: number) => string;
|
|
22
|
+
export declare const genMobilPhone: (countryCode: string) => string;
|
|
23
|
+
export declare const fillNumber: (num: string, max?: number | undefined) => string;
|
|
24
|
+
export declare const chooseRandom: <T>(arr: T[]) => T;
|
|
25
|
+
export declare const chooseRandomEnum: <T>(anEnum: T) => T[keyof T];
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { CartProductQuestion } from "@artisan-commerce/types";
|
|
2
|
-
import { CartProductAnswer } from "@artisan-commerce/types";
|
|
3
|
-
import { ProductAnswer } from "@artisan-commerce/types";
|
|
4
|
-
import { CartProduct, ProductQuestion } from "@artisan-commerce/types";
|
|
5
|
-
import { PriceCategoryTax } from "@artisan-commerce/types";
|
|
6
|
-
import { BaseProduct } from "@artisan-commerce/types";
|
|
7
|
-
import { PriceCategory } from "@artisan-commerce/types";
|
|
8
|
-
import { ProductDetails } from "@artisan-commerce/types";
|
|
9
|
-
export declare const buildPriceCategoryTax: (overrides?: Partial<PriceCategoryTax>) => PriceCategoryTax;
|
|
10
|
-
export declare const genPriceCategoryTaxes: (quantity?: number | undefined) => PriceCategoryTax[];
|
|
11
|
-
export declare const buildPriceCategory: (overrides?: Partial<PriceCategory>) => PriceCategory;
|
|
12
|
-
export declare const buildBaseProduct: (overrides?: Partial<BaseProduct>) => BaseProduct;
|
|
13
|
-
export declare const genBaseProducts: (quantity?: number | undefined) => BaseProduct[];
|
|
14
|
-
export declare const buildProductAnswer: (overrides?: Partial<ProductAnswer>) => ProductAnswer;
|
|
15
|
-
export declare const genProductAnswers: (quantity?: number | undefined) => ProductAnswer[];
|
|
16
|
-
export declare const buildProductQuestion: (overrides?: Partial<ProductQuestion>) => ProductQuestion;
|
|
17
|
-
export declare const genProductQuestions: (quantity?: number | undefined) => ProductQuestion[];
|
|
18
|
-
export declare const buildProductDetails: (overrides?: Partial<ProductDetails>) => ProductDetails;
|
|
19
|
-
export declare const genProductDetails: (quantity?: number | undefined) => ProductDetails[];
|
|
20
|
-
export declare const buildCartProductAnswer: (questionId: string, overrides?: Partial<CartProductAnswer>) => CartProductAnswer;
|
|
21
|
-
export declare const genCartProductAnswers: (quantity?: number | undefined) => CartProductAnswer[];
|
|
22
|
-
export declare const buildCartProductQuestion: (overrides?: Partial<CartProductQuestion>) => CartProductQuestion;
|
|
23
|
-
export declare const genCartProductQuestions: (quantity?: number | undefined) => CartProductQuestion[];
|
|
24
|
-
export declare const buildCartProduct: (overrides?: Partial<CartProduct>) => CartProduct;
|
|
1
|
+
import { CartProductQuestion } from "@artisan-commerce/types";
|
|
2
|
+
import { CartProductAnswer } from "@artisan-commerce/types";
|
|
3
|
+
import { ProductAnswer } from "@artisan-commerce/types";
|
|
4
|
+
import { CartProduct, ProductQuestion } from "@artisan-commerce/types";
|
|
5
|
+
import { PriceCategoryTax } from "@artisan-commerce/types";
|
|
6
|
+
import { BaseProduct } from "@artisan-commerce/types";
|
|
7
|
+
import { PriceCategory } from "@artisan-commerce/types";
|
|
8
|
+
import { ProductDetails } from "@artisan-commerce/types";
|
|
9
|
+
export declare const buildPriceCategoryTax: (overrides?: Partial<PriceCategoryTax>) => PriceCategoryTax;
|
|
10
|
+
export declare const genPriceCategoryTaxes: (quantity?: number | undefined) => PriceCategoryTax[];
|
|
11
|
+
export declare const buildPriceCategory: (overrides?: Partial<PriceCategory>) => PriceCategory;
|
|
12
|
+
export declare const buildBaseProduct: (overrides?: Partial<BaseProduct>) => BaseProduct;
|
|
13
|
+
export declare const genBaseProducts: (quantity?: number | undefined) => BaseProduct[];
|
|
14
|
+
export declare const buildProductAnswer: (overrides?: Partial<ProductAnswer>) => ProductAnswer;
|
|
15
|
+
export declare const genProductAnswers: (quantity?: number | undefined) => ProductAnswer[];
|
|
16
|
+
export declare const buildProductQuestion: (overrides?: Partial<ProductQuestion>) => ProductQuestion;
|
|
17
|
+
export declare const genProductQuestions: (quantity?: number | undefined) => ProductQuestion[];
|
|
18
|
+
export declare const buildProductDetails: (overrides?: Partial<ProductDetails>) => ProductDetails;
|
|
19
|
+
export declare const genProductDetails: (quantity?: number | undefined) => ProductDetails[];
|
|
20
|
+
export declare const buildCartProductAnswer: (questionId: string, overrides?: Partial<CartProductAnswer>) => CartProductAnswer;
|
|
21
|
+
export declare const genCartProductAnswers: (quantity?: number | undefined) => CartProductAnswer[];
|
|
22
|
+
export declare const buildCartProductQuestion: (overrides?: Partial<CartProductQuestion>) => CartProductQuestion;
|
|
23
|
+
export declare const genCartProductQuestions: (quantity?: number | undefined) => CartProductQuestion[];
|
|
24
|
+
export declare const buildCartProduct: (overrides?: Partial<CartProduct>) => CartProduct;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BillTotal, BillTotalCategory } from "@artisan-commerce/types";
|
|
2
|
-
import { ShoppingCart } from "@artisan-commerce/types";
|
|
3
|
-
import { CartStore, Objectify } from "@artisan-commerce/types";
|
|
4
|
-
export declare const buildBillTotalCategory: (overrides?: Partial<BillTotalCategory>) => BillTotalCategory;
|
|
5
|
-
export declare const buildBillTotal: (overrides?: Partial<BillTotal>) => BillTotal;
|
|
6
|
-
export declare const buildCartStore: (overrides?: Partial<CartStore>) => CartStore;
|
|
7
|
-
export declare const genCartStores: (quantity?: number | undefined) => Objectify<CartStore>;
|
|
8
|
-
export declare const buildShoppingCart: (overrides?: Partial<ShoppingCart>) => ShoppingCart;
|
|
1
|
+
import { BillTotal, BillTotalCategory } from "@artisan-commerce/types";
|
|
2
|
+
import { ShoppingCart } from "@artisan-commerce/types";
|
|
3
|
+
import { CartStore, Objectify } from "@artisan-commerce/types";
|
|
4
|
+
export declare const buildBillTotalCategory: (overrides?: Partial<BillTotalCategory>) => BillTotalCategory;
|
|
5
|
+
export declare const buildBillTotal: (overrides?: Partial<BillTotal>) => BillTotal;
|
|
6
|
+
export declare const buildCartStore: (overrides?: Partial<CartStore>) => CartStore;
|
|
7
|
+
export declare const genCartStores: (quantity?: number | undefined) => Objectify<CartStore>;
|
|
8
|
+
export declare const buildShoppingCart: (overrides?: Partial<ShoppingCart>) => ShoppingCart;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Service } from "@artisan-commerce/types";
|
|
2
|
-
import { Store, AdditionalStoreInformation } from "@artisan-commerce/types";
|
|
3
|
-
import { Delivery, Schedule } from "@artisan-commerce/types";
|
|
4
|
-
export declare const buildStore: (overrides?: Partial<Store>) => Store;
|
|
5
|
-
export declare const buildAdditionalStoreInformation: (overrides?: Partial<AdditionalStoreInformation>) => AdditionalStoreInformation;
|
|
6
|
-
export declare const buildDelivery: (overrides?: Partial<Delivery>) => Delivery;
|
|
7
|
-
export declare const buildSchedule: (overrides?: Partial<Schedule>) => Schedule;
|
|
8
|
-
export declare const buildService: (overrides?: Partial<Service>) => Service;
|
|
9
|
-
export declare const genServices: (quantity?: number | undefined) => Service[];
|
|
10
|
-
export declare const genSchedules: (quantity?: number | undefined) => Schedule[];
|
|
11
|
-
export declare const genStores: (quantity?: number | undefined) => Store[];
|
|
1
|
+
import { Service } from "@artisan-commerce/types";
|
|
2
|
+
import { Store, AdditionalStoreInformation } from "@artisan-commerce/types";
|
|
3
|
+
import { Delivery, Schedule } from "@artisan-commerce/types";
|
|
4
|
+
export declare const buildStore: (overrides?: Partial<Store>) => Store;
|
|
5
|
+
export declare const buildAdditionalStoreInformation: (overrides?: Partial<AdditionalStoreInformation>) => AdditionalStoreInformation;
|
|
6
|
+
export declare const buildDelivery: (overrides?: Partial<Delivery>) => Delivery;
|
|
7
|
+
export declare const buildSchedule: (overrides?: Partial<Schedule>) => Schedule;
|
|
8
|
+
export declare const buildService: (overrides?: Partial<Service>) => Service;
|
|
9
|
+
export declare const genServices: (quantity?: number | undefined) => Service[];
|
|
10
|
+
export declare const genSchedules: (quantity?: number | undefined) => Schedule[];
|
|
11
|
+
export declare const genStores: (quantity?: number | undefined) => Store[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Vendor } from "@artisan-commerce/types";
|
|
2
|
-
export declare const buildVendor: (overrides?: Partial<Vendor>) => Vendor;
|
|
1
|
+
import { Vendor } from "@artisan-commerce/types";
|
|
2
|
+
export declare const buildVendor: (overrides?: Partial<Vendor>) => Vendor;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
declare const CONSTANTS: {
|
|
2
|
-
CLIENT_NAME: string;
|
|
3
|
-
DEFAULT_REQUEST_TIMEOUT: number;
|
|
4
|
-
EXCLUDED_LOGGER_STATUS_CODES: number[];
|
|
5
|
-
INCLUDED_LOGGER_ENVS: string[];
|
|
6
|
-
INCLUDED_INTL_LOG_ENVS: string[];
|
|
7
|
-
COUNTRY: {
|
|
8
|
-
NAME: string;
|
|
9
|
-
CODE: string;
|
|
10
|
-
LANGUAGE: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export default CONSTANTS;
|
|
1
|
+
declare const CONSTANTS: {
|
|
2
|
+
CLIENT_NAME: string;
|
|
3
|
+
DEFAULT_REQUEST_TIMEOUT: number;
|
|
4
|
+
EXCLUDED_LOGGER_STATUS_CODES: number[];
|
|
5
|
+
INCLUDED_LOGGER_ENVS: string[];
|
|
6
|
+
INCLUDED_INTL_LOG_ENVS: string[];
|
|
7
|
+
COUNTRY: {
|
|
8
|
+
NAME: string;
|
|
9
|
+
CODE: string;
|
|
10
|
+
LANGUAGE: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default CONSTANTS;
|
package/build/src/i18n/i18n.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import i18n from "i18next";
|
|
2
|
-
export default i18n;
|
|
1
|
+
import i18n from "i18next";
|
|
2
|
+
export default i18n;
|
package/build/src/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as common from "./builders/common.builder";
|
|
2
|
-
import * as product from "./builders/product.builder";
|
|
3
|
-
import * as vendor from "./builders/vendor.builder";
|
|
4
|
-
import * as shoppingCart from "./builders/shoppingCart.builder";
|
|
5
|
-
import * as store from "./builders/store.builder";
|
|
6
|
-
import * as channel from "./builders/channel.builder";
|
|
7
|
-
export { common, product, vendor, shoppingCart, store, channel };
|
|
1
|
+
import * as common from "./builders/common.builder";
|
|
2
|
+
import * as product from "./builders/product.builder";
|
|
3
|
+
import * as vendor from "./builders/vendor.builder";
|
|
4
|
+
import * as shoppingCart from "./builders/shoppingCart.builder";
|
|
5
|
+
import * as store from "./builders/store.builder";
|
|
6
|
+
import * as channel from "./builders/channel.builder";
|
|
7
|
+
export { common, product, vendor, shoppingCart, store, channel };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const axiosDefault: import("axios").AxiosInstance;
|
|
2
|
-
export default axiosDefault;
|
|
1
|
+
declare const axiosDefault: import("axios").AxiosInstance;
|
|
2
|
+
export default axiosDefault;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare let bugsnagClient: any;
|
|
2
|
-
export default bugsnagClient;
|
|
1
|
+
declare let bugsnagClient: any;
|
|
2
|
+
export default bugsnagClient;
|
package/build/src/vendors.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artisan-commerce/builders",
|
|
3
3
|
"description": "Builder functions for all artisan entities",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.3",
|
|
5
5
|
"main": "./build/main.bundle.js",
|
|
6
6
|
"types": "./build/src/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"i18next-xhr-backend": "^3.2.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@artisan-commerce/types": "^0.
|
|
41
|
+
"@artisan-commerce/types": "^0.10.0",
|
|
42
42
|
"@babel/core": "^7.10.5",
|
|
43
43
|
"@babel/preset-env": "^7.10.4",
|
|
44
44
|
"@babel/preset-react": "^7.10.4",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"webpack-dev-server": "^3.11.0",
|
|
85
85
|
"webpack-merge": "^5.0.9"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "941950bb17a4751dda7e727cdb698bbea55b37ed"
|
|
88
88
|
}
|