@artisan-commerce/types 0.11.0-canary.9 → 0.12.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 +47 -0
- package/build/index.d.ts +4 -0
- package/build/index.js +4 -0
- package/build/index.js.map +1 -1
- package/build/types/billingData.types.d.ts +14 -0
- package/build/types/billingData.types.js +3 -0
- package/build/types/billingData.types.js.map +1 -0
- package/build/types/common.types.d.ts +5 -0
- package/build/types/coupons.types.d.ts +1 -0
- package/build/types/http.types.d.ts +2 -0
- package/build/types/livingPlace.types.d.ts +25 -0
- package/build/types/livingPlace.types.js +3 -0
- package/build/types/livingPlace.types.js.map +1 -0
- package/build/types/product.types.d.ts +2 -7
- package/build/types/product.types.js +1 -8
- package/build/types/product.types.js.map +1 -1
- package/build/types/shippingAddress.types.d.ts +15 -0
- package/build/types/shippingAddress.types.js +3 -0
- package/build/types/shippingAddress.types.js.map +1 -0
- package/build/types/user.types.d.ts +44 -0
- package/build/types/user.types.js +15 -0
- package/build/types/user.types.js.map +1 -0
- package/package.json +5 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,53 @@
|
|
|
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.12.0](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/types@0.12.0-canary.1...@artisan-commerce/types@0.12.0) (2021-02-25)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @artisan-commerce/types
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.12.0-canary.1](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/types@0.11.0-canary.12...@artisan-commerce/types@0.12.0-canary.1) (2021-02-25)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @artisan-commerce/types
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [0.11.0-canary.12](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/types@0.11.0-canary.11...@artisan-commerce/types@0.11.0-canary.12) (2021-02-23)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* added billing data and shipping address builders ([6a9eaa9](https://bitbucket.org/tradesystem/artisan_monorepo/commit/6a9eaa921bab2367171473565de0ce6d662bd7c0))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* fixed yarn.lock and package.json ([f485433](https://bitbucket.org/tradesystem/artisan_monorepo/commit/f485433b750e8012ec543cc00f6cb2e016d77361))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## [0.11.0-canary.11](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/types@0.11.0-canary.10...@artisan-commerce/types@0.11.0-canary.11) (2021-02-12)
|
|
37
|
+
|
|
38
|
+
**Note:** Version bump only for package @artisan-commerce/types
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
## [0.11.0-canary.10](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/types@0.11.0-canary.9...@artisan-commerce/types@0.11.0-canary.10) (2021-02-08)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Features
|
|
48
|
+
|
|
49
|
+
* **products:** support custome types on modifier groups and normal modifers ([dda6c03](https://bitbucket.org/tradesystem/artisan_monorepo/commit/dda6c03ee8241a5719dcf1745c6a7def83650bda))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
6
53
|
## [0.11.0-canary.9](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/types@0.11.0-canary.8...@artisan-commerce/types@0.11.0-canary.9) (2021-02-05)
|
|
7
54
|
|
|
8
55
|
**Note:** Version bump only for package @artisan-commerce/types
|
package/build/index.d.ts
CHANGED
|
@@ -12,3 +12,7 @@ export * from "./types/shoppingCart.types";
|
|
|
12
12
|
export * from "./types/store.types";
|
|
13
13
|
export * from "./types/vendor.types";
|
|
14
14
|
export * from "./types/http.types";
|
|
15
|
+
export * from "./types/user.types";
|
|
16
|
+
export * from "./types/billingData.types";
|
|
17
|
+
export * from "./types/livingPlace.types";
|
|
18
|
+
export * from "./types/shippingAddress.types";
|
package/build/index.js
CHANGED
|
@@ -25,4 +25,8 @@ __exportStar(require("./types/shoppingCart.types"), exports);
|
|
|
25
25
|
__exportStar(require("./types/store.types"), exports);
|
|
26
26
|
__exportStar(require("./types/vendor.types"), exports);
|
|
27
27
|
__exportStar(require("./types/http.types"), exports);
|
|
28
|
+
__exportStar(require("./types/user.types"), exports);
|
|
29
|
+
__exportStar(require("./types/billingData.types"), exports);
|
|
30
|
+
__exportStar(require("./types/livingPlace.types"), exports);
|
|
31
|
+
__exportStar(require("./types/shippingAddress.types"), exports);
|
|
28
32
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO;AACP,oDAAkC;AAClC,wDAAsC;AACtC,0DAAwC;AACxC,yDAAuC;AACvC,wDAAsC;AACtC,uDAAqC;AACrC,wDAAsC;AACtC,sDAAoC;AACpC,wDAAsC;AACtC,6DAA2C;AAC3C,6DAA2C;AAC3C,sDAAoC;AACpC,uDAAqC;AACrC,qDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO;AACP,oDAAkC;AAClC,wDAAsC;AACtC,0DAAwC;AACxC,yDAAuC;AACvC,wDAAsC;AACtC,uDAAqC;AACrC,wDAAsC;AACtC,sDAAoC;AACpC,wDAAsC;AACtC,6DAA2C;AAC3C,6DAA2C;AAC3C,sDAAoC;AACpC,uDAAqC;AACrC,qDAAmC;AACnC,qDAAmC;AACnC,4DAA0C;AAC1C,4DAA0C;AAC1C,gEAA8C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Country } from "./common.types";
|
|
2
|
+
import { DocumentType } from "./common.types";
|
|
3
|
+
export interface BillingData {
|
|
4
|
+
id: number;
|
|
5
|
+
nickname: string;
|
|
6
|
+
name: string;
|
|
7
|
+
documentType: DocumentType;
|
|
8
|
+
document: string;
|
|
9
|
+
address: string;
|
|
10
|
+
phone: string;
|
|
11
|
+
email: string;
|
|
12
|
+
default: boolean;
|
|
13
|
+
country: Country;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billingData.types.js","sourceRoot":"","sources":["../../src/types/billingData.types.ts"],"names":[],"mappings":""}
|
|
@@ -40,3 +40,4 @@ export interface ShoppingCartBenefits {
|
|
|
40
40
|
}
|
|
41
41
|
export declare type BenefitsByUserNode = ArtisanDBQueryDocumentSnapshot<ArtisanDBDocumentData>;
|
|
42
42
|
export declare type BenefitsByUserNodes = ArtisanDBCollectionReference<ArtisanDBDocumentData>;
|
|
43
|
+
export declare type BenefitTypes = "ALTER_DELIVERY" | "PRODUCT" | "DISCOUNT";
|
|
@@ -4,8 +4,10 @@ export interface ArtisanRequest {
|
|
|
4
4
|
body: ArtisanRequestBody;
|
|
5
5
|
query: ArtisanQuery;
|
|
6
6
|
params: ArtisanParams;
|
|
7
|
+
method?: ArtisanRequestMethod;
|
|
7
8
|
}
|
|
8
9
|
export declare type ArtisanRequestHeaders = Headers;
|
|
10
|
+
export declare type ArtisanRequestMethod = "POST" | "GET" | "PUT" | "DELETE" | "PATCH";
|
|
9
11
|
export interface ArtisanRequestBody {
|
|
10
12
|
[key: string]: any;
|
|
11
13
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface LivingPlace {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
active: number;
|
|
5
|
+
fields: Field[] | FilledField[];
|
|
6
|
+
countryId: number;
|
|
7
|
+
}
|
|
8
|
+
export interface Field {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
rules: Rules;
|
|
12
|
+
messages: Messages;
|
|
13
|
+
}
|
|
14
|
+
export interface FilledField {
|
|
15
|
+
id: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}
|
|
18
|
+
export interface Messages {
|
|
19
|
+
max: string;
|
|
20
|
+
min: string;
|
|
21
|
+
}
|
|
22
|
+
export interface Rules {
|
|
23
|
+
max: number;
|
|
24
|
+
min: number;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"livingPlace.types.js","sourceRoot":"","sources":["../../src/types/livingPlace.types.ts"],"names":[],"mappings":""}
|
|
@@ -78,16 +78,10 @@ export interface ProductQuestion {
|
|
|
78
78
|
description: string | null;
|
|
79
79
|
min: number;
|
|
80
80
|
max: number;
|
|
81
|
-
type:
|
|
81
|
+
type: string | null;
|
|
82
82
|
answers: ProductAnswer[];
|
|
83
83
|
images: Image[] | undefined;
|
|
84
84
|
}
|
|
85
|
-
export declare enum QuestionTypes {
|
|
86
|
-
BOOLEAN = "BOOLEAN",
|
|
87
|
-
RADIO = "RADIO",
|
|
88
|
-
CHECKBOX = "CHECKBOX",
|
|
89
|
-
COUNTER = "COUNTER"
|
|
90
|
-
}
|
|
91
85
|
declare type CommonProductAndAnswersProps = "name" | "prices" | "attributes" | "productId" | "type" | "images";
|
|
92
86
|
export interface ProductDetails extends BaseProduct {
|
|
93
87
|
isPriceVip: boolean;
|
|
@@ -98,6 +92,7 @@ export interface ProductDetails extends BaseProduct {
|
|
|
98
92
|
}
|
|
99
93
|
export interface ProductAnswer extends Pick<Product, CommonProductAndAnswersProps> {
|
|
100
94
|
questions: ProductDetails["questions"];
|
|
95
|
+
renderType: string | null;
|
|
101
96
|
}
|
|
102
97
|
export interface CartProductQuestion extends ProductQuestion {
|
|
103
98
|
answers: CartProductAnswer[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.DayOfWeekName = exports.TaxType = exports.PriceCategoryType = exports.ProductType = void 0;
|
|
4
4
|
var ProductType;
|
|
5
5
|
(function (ProductType) {
|
|
6
6
|
ProductType["PRODUCT"] = "PRODUCT";
|
|
@@ -25,11 +25,4 @@ var DayOfWeekName;
|
|
|
25
25
|
DayOfWeekName["SATURDAY"] = "SATURDAY";
|
|
26
26
|
DayOfWeekName["SUNDAY"] = "SUNDAY";
|
|
27
27
|
})(DayOfWeekName = exports.DayOfWeekName || (exports.DayOfWeekName = {}));
|
|
28
|
-
var QuestionTypes;
|
|
29
|
-
(function (QuestionTypes) {
|
|
30
|
-
QuestionTypes["BOOLEAN"] = "BOOLEAN";
|
|
31
|
-
QuestionTypes["RADIO"] = "RADIO";
|
|
32
|
-
QuestionTypes["CHECKBOX"] = "CHECKBOX";
|
|
33
|
-
QuestionTypes["COUNTER"] = "COUNTER";
|
|
34
|
-
})(QuestionTypes = exports.QuestionTypes || (exports.QuestionTypes = {}));
|
|
35
28
|
//# sourceMappingURL=product.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.types.js","sourceRoot":"","sources":["../../src/types/product.types.ts"],"names":[],"mappings":";;;AAwDA,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;AACvB,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB;AACD,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,sCAAiB,CAAA;AACnB,CAAC,EAHW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAG5B;AACD,IAAY,OAEX;AAFD,WAAY,OAAO;IACjB,sBAAW,CAAA;AACb,CAAC,EAFW,OAAO,GAAP,eAAO,KAAP,eAAO,QAElB;AAQD,IAAY,aAQX;AARD,WAAY,aAAa;IACvB,kCAAiB,CAAA;IACjB,oCAAmB,CAAA;IACnB,wCAAuB,CAAA;IACvB,sCAAqB,CAAA;IACrB,kCAAiB,CAAA;IACjB,sCAAqB,CAAA;IACrB,kCAAiB,CAAA;AACnB,CAAC,EARW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAQxB
|
|
1
|
+
{"version":3,"file":"product.types.js","sourceRoot":"","sources":["../../src/types/product.types.ts"],"names":[],"mappings":";;;AAwDA,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;AACvB,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB;AACD,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,sCAAiB,CAAA;AACnB,CAAC,EAHW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAG5B;AACD,IAAY,OAEX;AAFD,WAAY,OAAO;IACjB,sBAAW,CAAA;AACb,CAAC,EAFW,OAAO,GAAP,eAAO,KAAP,eAAO,QAElB;AAQD,IAAY,aAQX;AARD,WAAY,aAAa;IACvB,kCAAiB,CAAA;IACjB,oCAAmB,CAAA;IACnB,wCAAuB,CAAA;IACvB,sCAAqB,CAAA;IACrB,kCAAiB,CAAA;IACjB,sCAAqB,CAAA;IACrB,kCAAiB,CAAA;AACnB,CAAC,EARW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAQxB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Country } from "./common.types";
|
|
2
|
+
import { LivingPlace } from "./livingPlace.types";
|
|
3
|
+
export interface ShippingAddress {
|
|
4
|
+
id: number;
|
|
5
|
+
default: boolean;
|
|
6
|
+
lat: number;
|
|
7
|
+
lng: number;
|
|
8
|
+
reference: string;
|
|
9
|
+
mainStreet: string;
|
|
10
|
+
number: string;
|
|
11
|
+
secondaryStreet: string;
|
|
12
|
+
addressReference: string;
|
|
13
|
+
livingPlace: Partial<LivingPlace>;
|
|
14
|
+
country: Country;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shippingAddress.types.js","sourceRoot":"","sources":["../../src/types/shippingAddress.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { DocumentType } from "./common.types";
|
|
2
|
+
export interface User {
|
|
3
|
+
uid: string;
|
|
4
|
+
name: string;
|
|
5
|
+
middleName: string;
|
|
6
|
+
lastname: string;
|
|
7
|
+
secondLastname: string;
|
|
8
|
+
email: string;
|
|
9
|
+
birthdate: string;
|
|
10
|
+
vendorId: number;
|
|
11
|
+
origin: string;
|
|
12
|
+
document: string;
|
|
13
|
+
documentType: DocumentType;
|
|
14
|
+
gender: Gender;
|
|
15
|
+
country: UserCountry;
|
|
16
|
+
phone: Phone;
|
|
17
|
+
idInt: number;
|
|
18
|
+
type: UserType | undefined;
|
|
19
|
+
externalId?: string;
|
|
20
|
+
maritalStatus?: MaritalStatus;
|
|
21
|
+
active?: boolean;
|
|
22
|
+
additionalInfo: AdditionalInfo;
|
|
23
|
+
}
|
|
24
|
+
export declare type UserType = "NORMAL" | "DEPENDENT";
|
|
25
|
+
export interface UserCountry {
|
|
26
|
+
id: number;
|
|
27
|
+
}
|
|
28
|
+
export interface AdditionalInfo {
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
}
|
|
31
|
+
export interface Phone {
|
|
32
|
+
number: string;
|
|
33
|
+
countryCode: string;
|
|
34
|
+
countryIsoCode: string;
|
|
35
|
+
}
|
|
36
|
+
export declare enum MaritalStatus {
|
|
37
|
+
MARRIED = "MARRIED",
|
|
38
|
+
DIVORCED = "DIVORCED",
|
|
39
|
+
SINGLE = "SINGLE"
|
|
40
|
+
}
|
|
41
|
+
export declare enum Gender {
|
|
42
|
+
MALE = "MALE",
|
|
43
|
+
FEMALE = "FEMALE"
|
|
44
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Gender = exports.MaritalStatus = void 0;
|
|
4
|
+
var MaritalStatus;
|
|
5
|
+
(function (MaritalStatus) {
|
|
6
|
+
MaritalStatus["MARRIED"] = "MARRIED";
|
|
7
|
+
MaritalStatus["DIVORCED"] = "DIVORCED";
|
|
8
|
+
MaritalStatus["SINGLE"] = "SINGLE";
|
|
9
|
+
})(MaritalStatus = exports.MaritalStatus || (exports.MaritalStatus = {}));
|
|
10
|
+
var Gender;
|
|
11
|
+
(function (Gender) {
|
|
12
|
+
Gender["MALE"] = "MALE";
|
|
13
|
+
Gender["FEMALE"] = "FEMALE";
|
|
14
|
+
})(Gender = exports.Gender || (exports.Gender = {}));
|
|
15
|
+
//# sourceMappingURL=user.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.types.js","sourceRoot":"","sources":["../../src/types/user.types.ts"],"names":[],"mappings":";;;AAwCA,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,sCAAqB,CAAA;IACrB,kCAAiB,CAAA;AACnB,CAAC,EAJW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAIxB;AAED,IAAY,MAGX;AAHD,WAAY,MAAM;IAChB,uBAAa,CAAA;IACb,2BAAiB,CAAA;AACnB,CAAC,EAHW,MAAM,GAAN,cAAM,KAAN,cAAM,QAGjB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artisan-commerce/types",
|
|
3
3
|
"description": "Artisan's types and interfaces library",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.12.0",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -15,11 +15,10 @@
|
|
|
15
15
|
"check-types": "tsc --noEmit",
|
|
16
16
|
"lint": "eslint --ignore-path .gitignore --ext .ts,.tsx .",
|
|
17
17
|
"prettier": "prettier --ignore-path .gitignore \"**/*.+(ts|tsx)\"",
|
|
18
|
-
"format": "yarn prettier --
|
|
19
|
-
"check-format": "yarn prettier --
|
|
18
|
+
"format": "yarn prettier --write",
|
|
19
|
+
"check-format": "yarn prettier --list-different",
|
|
20
20
|
"validate": "cross-env CI=true npm-run-all --parallel check-types check-format lint build",
|
|
21
|
-
"validate:ci": "npm-run-all --parallel check-types check-format lint"
|
|
22
|
-
"prepare": "yarn validate"
|
|
21
|
+
"validate:ci": "npm-run-all --parallel check-types check-format lint"
|
|
23
22
|
},
|
|
24
23
|
"author": "Luis Eduardo Andrade",
|
|
25
24
|
"license": "MIT",
|
|
@@ -45,8 +44,5 @@
|
|
|
45
44
|
"typescript": "^3.9.7",
|
|
46
45
|
"webpack-bundle-analyzer": "^3.9.0"
|
|
47
46
|
},
|
|
48
|
-
"gitHead": "
|
|
49
|
-
"dependencies": {
|
|
50
|
-
"jest-extended": "^0.11.5"
|
|
51
|
-
}
|
|
47
|
+
"gitHead": "f5cd4953e041594e2beec58711cde2b57298d286"
|
|
52
48
|
}
|