@artisan-commerce/types 0.12.2-canary.1 → 0.13.0-canary.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 +19 -0
- package/build/types/billingData.types.d.ts +4 -2
- package/build/types/image.types.d.ts +3 -1
- package/build/types/livingPlace.types.d.ts +9 -3
- package/build/types/shippingAddress.types.d.ts +14 -4
- package/build/types/user.types.d.ts +15 -13
- package/build/types/user.types.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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.13.0-canary.0](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/types@0.12.2-canary.2...@artisan-commerce/types@0.13.0-canary.0) (2021-03-18)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **artisa-commerce:** added code documentation for users lib and types refactor ([1d0acf7](https://bitbucket.org/tradesystem/artisan_monorepo/commit/1d0acf703c6a9b6e4c7cb157ef045c49e6579d3a))
|
|
12
|
+
* **artisan-commerce:** merge branch 'canary' into feature/document-users-code ([e18fe40](https://bitbucket.org/tradesystem/artisan_monorepo/commit/e18fe401542d38afd0599bc98b0924d6b44bd74a))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### [0.12.2-canary.2](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/types@0.12.2-canary.1...@artisan-commerce/types@0.12.2-canary.2) (2021-03-18)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **types:** update image type ([c461609](https://bitbucket.org/tradesystem/artisan_monorepo/commit/c461609e3aab757a4722d7a820a765a96588d94c))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
### [0.12.2-canary.1](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/types@0.12.2-canary.0...@artisan-commerce/types@0.12.2-canary.1) (2021-03-18)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @artisan-commerce/types
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Country } from "./common.types";
|
|
2
2
|
import { DocumentType } from "./common.types";
|
|
3
|
-
export interface
|
|
4
|
-
id: number;
|
|
3
|
+
export interface BaseBillingData {
|
|
5
4
|
nickname: string;
|
|
6
5
|
name: string;
|
|
7
6
|
documentType: DocumentType;
|
|
@@ -12,3 +11,6 @@ export interface BillingData {
|
|
|
12
11
|
default: boolean;
|
|
13
12
|
country: Country;
|
|
14
13
|
}
|
|
14
|
+
export interface BillingData extends BaseBillingData {
|
|
15
|
+
id: number;
|
|
16
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface CDNImage {
|
|
2
2
|
bucket?: string;
|
|
3
3
|
cloudFrontUrl?: string;
|
|
4
4
|
key?: string;
|
|
@@ -6,9 +6,11 @@ export interface Image {
|
|
|
6
6
|
url: string;
|
|
7
7
|
base64?: string;
|
|
8
8
|
}
|
|
9
|
+
export declare type URLImage = string;
|
|
9
10
|
export interface ImageManipulationConfig {
|
|
10
11
|
width?: number;
|
|
11
12
|
height?: number;
|
|
12
13
|
fit?: "fill" | "cover" | "contain" | "inside" | "outside";
|
|
13
14
|
toFormat?: "jpg" | "jpeg" | "png" | "svg";
|
|
14
15
|
}
|
|
16
|
+
export declare type Image = CDNImage | URLImage;
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface BaseLivingPlace {
|
|
2
2
|
id: number;
|
|
3
|
+
}
|
|
4
|
+
export interface LivingPlace extends BaseLivingPlace {
|
|
3
5
|
name: string;
|
|
4
6
|
active: number;
|
|
5
|
-
fields: Field[] | FilledField[];
|
|
6
7
|
countryId: number;
|
|
8
|
+
fields: Field[];
|
|
9
|
+
}
|
|
10
|
+
export interface LivingPlaceToSave extends BaseLivingPlace {
|
|
11
|
+
fields: FieldRecord[];
|
|
7
12
|
}
|
|
8
13
|
export interface Field {
|
|
9
14
|
id: string;
|
|
10
15
|
label: string;
|
|
11
16
|
rules: Rules;
|
|
12
17
|
messages: Messages;
|
|
18
|
+
value?: string;
|
|
13
19
|
}
|
|
14
|
-
export interface
|
|
20
|
+
export interface FieldRecord {
|
|
15
21
|
id: string;
|
|
16
22
|
value: string;
|
|
17
23
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Country } from "./common.types";
|
|
2
|
-
import { LivingPlace } from "./livingPlace.types";
|
|
3
|
-
export interface
|
|
4
|
-
id: number;
|
|
2
|
+
import { LivingPlace, LivingPlaceToSave } from "./livingPlace.types";
|
|
3
|
+
export interface BaseShippingAddress {
|
|
5
4
|
default: boolean;
|
|
6
5
|
lat: number;
|
|
7
6
|
lng: number;
|
|
@@ -10,6 +9,17 @@ export interface ShippingAddress {
|
|
|
10
9
|
number: string;
|
|
11
10
|
secondaryStreet: string;
|
|
12
11
|
addressReference: string;
|
|
13
|
-
livingPlace: Partial<LivingPlace>;
|
|
14
12
|
country: Country;
|
|
15
13
|
}
|
|
14
|
+
export interface ShippingAddress extends BaseShippingAddress {
|
|
15
|
+
id: number;
|
|
16
|
+
livingPlace: LivingPlace;
|
|
17
|
+
}
|
|
18
|
+
export interface NewShippingAddress extends BaseShippingAddress {
|
|
19
|
+
id?: number;
|
|
20
|
+
livingPlace: LivingPlaceToSave;
|
|
21
|
+
}
|
|
22
|
+
export interface UpdatedShippingAddress extends BaseShippingAddress {
|
|
23
|
+
id: number;
|
|
24
|
+
livingPlace: LivingPlaceToSave;
|
|
25
|
+
}
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import { DocumentType } from "./common.types";
|
|
2
|
-
export interface
|
|
2
|
+
export interface BaseUser {
|
|
3
3
|
uid: string;
|
|
4
4
|
name: string;
|
|
5
|
-
middleName
|
|
5
|
+
middleName?: string;
|
|
6
6
|
lastname: string;
|
|
7
|
-
secondLastname
|
|
7
|
+
secondLastname?: string;
|
|
8
8
|
email: string;
|
|
9
|
-
birthdate
|
|
10
|
-
vendorId
|
|
11
|
-
origin
|
|
12
|
-
document
|
|
13
|
-
documentType
|
|
14
|
-
gender
|
|
9
|
+
birthdate?: string;
|
|
10
|
+
vendorId?: number;
|
|
11
|
+
origin?: string;
|
|
12
|
+
document?: string;
|
|
13
|
+
documentType?: DocumentType;
|
|
14
|
+
gender?: Gender;
|
|
15
15
|
country: UserCountry;
|
|
16
|
-
phone
|
|
17
|
-
|
|
18
|
-
type: UserType | undefined;
|
|
16
|
+
phone?: Phone;
|
|
17
|
+
type?: UserType;
|
|
19
18
|
externalId?: string;
|
|
20
19
|
maritalStatus?: MaritalStatus;
|
|
21
20
|
active?: boolean;
|
|
22
|
-
additionalInfo
|
|
21
|
+
additionalInfo?: AdditionalInfo;
|
|
22
|
+
}
|
|
23
|
+
export interface User extends BaseUser {
|
|
24
|
+
idInt: number;
|
|
23
25
|
}
|
|
24
26
|
export declare type UserType = "NORMAL" | "DEPENDENT";
|
|
25
27
|
export interface UserCountry {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.types.js","sourceRoot":"","sources":["../../src/types/user.types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"user.types.js","sourceRoot":"","sources":["../../src/types/user.types.ts"],"names":[],"mappings":";;;AA2CA,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.13.0-canary.0",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"typescript": "^3.9.7",
|
|
45
45
|
"webpack-bundle-analyzer": "^3.9.0"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "68827d9ca402ce4d599f8e626f8d94a15dde6086"
|
|
48
48
|
}
|