@artisan-commerce/types 0.12.2-canary.2 → 0.13.0-canary.1
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/app.types.d.ts +39 -3
- package/build/types/billingData.types.d.ts +4 -2
- 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.1](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/types@0.13.0-canary.0...@artisan-commerce/types@0.13.0-canary.1) (2021-03-19)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **types:** add init-rn types ([e4f44c4](https://bitbucket.org/tradesystem/artisan_monorepo/commit/e4f44c484e8d223a1716daf4cf0ec098dfde620a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [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)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **artisa-commerce:** added code documentation for users lib and types refactor ([1d0acf7](https://bitbucket.org/tradesystem/artisan_monorepo/commit/1d0acf703c6a9b6e4c7cb157ef045c49e6579d3a))
|
|
21
|
+
* **artisan-commerce:** merge branch 'canary' into feature/document-users-code ([e18fe40](https://bitbucket.org/tradesystem/artisan_monorepo/commit/e18fe401542d38afd0599bc98b0924d6b44bd74a))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
### [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)
|
|
7
26
|
|
|
8
27
|
|
|
@@ -1,21 +1,53 @@
|
|
|
1
1
|
import firebase from "firebase";
|
|
2
|
+
export declare type ArtisanApp = ArtisanAppWeb | ArtisanAppRN;
|
|
2
3
|
/**
|
|
3
|
-
* The
|
|
4
|
+
* The ArtisanAppWeb orchestrate the connections of the app with the DB, server and its settings.
|
|
4
5
|
*
|
|
5
|
-
* @interface
|
|
6
|
+
* @interface ArtisanAppWeb
|
|
6
7
|
* @author Luis Eduardo Andrade
|
|
7
8
|
* @since 0.5.14
|
|
8
9
|
* @property {string} name app's name
|
|
9
10
|
* @property {string} apiURL artisan's account API URL
|
|
10
11
|
* @property {ArtisanSettings} settings artisan app settings configuration
|
|
11
12
|
*/
|
|
12
|
-
export interface
|
|
13
|
+
export interface ArtisanAppWeb {
|
|
13
14
|
name: firebase.app.App["name"];
|
|
14
15
|
apiURL: string;
|
|
15
16
|
settings: ArtisanSettings;
|
|
16
17
|
__internals__: firebase.app.App;
|
|
17
18
|
__instance__: typeof firebase;
|
|
18
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* The ArtisanAppRN orchestrate the connections of the app with the DB, server and its settings.
|
|
22
|
+
*
|
|
23
|
+
* @interface ArtisanAppRN
|
|
24
|
+
* @author John Arias
|
|
25
|
+
* @since 0.5.14
|
|
26
|
+
* @property {string} name app's name
|
|
27
|
+
* @property {string} apiURL artisan's account API URL
|
|
28
|
+
* @property {ArtisanSettings} settings artisan app settings configuration
|
|
29
|
+
*/
|
|
30
|
+
export interface ArtisanAppRN {
|
|
31
|
+
apiURL: string;
|
|
32
|
+
__internals__: RNFirebaseInstance;
|
|
33
|
+
__instance__: RNFirebaseInstance;
|
|
34
|
+
settings: ArtisanSettings;
|
|
35
|
+
name: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Settings to configure the Firabse Instance.
|
|
39
|
+
*
|
|
40
|
+
* @interface RNFirebaseInstance
|
|
41
|
+
* @author John Arias
|
|
42
|
+
* @since 0.5.14
|
|
43
|
+
* @property {aut} auth auth package from react-native-auth
|
|
44
|
+
* @property {firestore} firestore firestore package from react-native-auth
|
|
45
|
+
* @property {ArtisanSettings} settings artisan app settings configuration
|
|
46
|
+
*/
|
|
47
|
+
export interface RNFirebaseInstance {
|
|
48
|
+
auth: any;
|
|
49
|
+
firestore: any;
|
|
50
|
+
}
|
|
19
51
|
/**
|
|
20
52
|
* Settings to configure the Artisan app.
|
|
21
53
|
*
|
|
@@ -37,6 +69,10 @@ export interface ArtisanSettings {
|
|
|
37
69
|
appId?: string;
|
|
38
70
|
authDomain: string;
|
|
39
71
|
}
|
|
72
|
+
export interface ArtisanSettingsRN {
|
|
73
|
+
platform: ArtisanPlatform;
|
|
74
|
+
accountId?: number;
|
|
75
|
+
}
|
|
40
76
|
/**
|
|
41
77
|
* Artisan app's allowed platforms to run on.
|
|
42
78
|
*
|
|
@@ -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,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.1",
|
|
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": "16fd34386acfecedb853c838ad41944fdce1ac22"
|
|
48
48
|
}
|