@artisan-commerce/types 0.14.0-canary.11 → 0.14.0-canary.14
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 +25 -0
- package/build/types/app.types.d.ts +58 -47
- package/build/types/app.types.js +1 -1
- package/build/types/app.types.js.map +1 -1
- package/build/types/artisnDB.types.d.ts +9 -8
- package/build/types/artisnDB.types.js +0 -1
- package/build/types/artisnDB.types.js.map +1 -1
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,31 @@
|
|
|
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.14.0-canary.14](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/types@0.14.0-canary.13...@artisan-commerce/types@0.14.0-canary.14) (2021-10-01)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **global:** fix firebase related types ([efa5081](https://bitbucket.org/tradesystem/artisn_sdk/commit/efa5081a844be033ac9135ac65bf8f56184b71b0))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [0.14.0-canary.13](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/types@0.14.0-canary.12...@artisan-commerce/types@0.14.0-canary.13) (2021-09-30)
|
|
16
|
+
|
|
17
|
+
**Note:** Version bump only for package @artisan-commerce/types
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## [0.14.0-canary.12](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/types@0.14.0-canary.11...@artisan-commerce/types@0.14.0-canary.12) (2021-09-30)
|
|
24
|
+
|
|
25
|
+
**Note:** Version bump only for package @artisan-commerce/types
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
6
31
|
## [0.14.0-canary.11](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/types@0.14.0-canary.10...@artisan-commerce/types@0.14.0-canary.11) (2021-09-23)
|
|
7
32
|
|
|
8
33
|
|
|
@@ -1,66 +1,59 @@
|
|
|
1
1
|
import firebase from "firebase";
|
|
2
|
+
import { ReactNativeFirebase } from "@react-native-firebase/app";
|
|
3
|
+
import authRN, { FirebaseAuthTypes } from "@react-native-firebase/auth";
|
|
4
|
+
import "@react-native-firebase/firestore";
|
|
2
5
|
/**
|
|
3
6
|
* The ArtisnApp controls the app connection with the DBs and its settings.
|
|
4
7
|
*
|
|
5
8
|
* @typedef ArtisnApp
|
|
6
|
-
* @since 0.
|
|
9
|
+
* @since 0.1.0
|
|
7
10
|
*/
|
|
8
|
-
export declare type ArtisnApp =
|
|
11
|
+
export declare type ArtisnApp = ArtisnWebApp | ArtisnRNApp;
|
|
9
12
|
/**
|
|
10
|
-
* The
|
|
13
|
+
* The ArtisnWebApp orchestrate the connections of the app with the DB, server
|
|
14
|
+
* and its settings.
|
|
11
15
|
*
|
|
12
|
-
* @interface
|
|
13
|
-
* @since 0.
|
|
16
|
+
* @interface ArtisnWebApp
|
|
17
|
+
* @since 0.1.0
|
|
14
18
|
*/
|
|
15
|
-
export interface
|
|
19
|
+
export interface ArtisnWebApp {
|
|
16
20
|
/** App's name */
|
|
17
21
|
name: firebase.app.App["name"];
|
|
18
22
|
/** Artisn's account API URL */
|
|
19
23
|
apiURL: string;
|
|
20
|
-
/** Artisn app settings configuration, see {@link
|
|
21
|
-
settings:
|
|
22
|
-
/** Internal configuration of App and databases
|
|
24
|
+
/** Artisn app settings configuration, see {@link ArtisnWebSettings} */
|
|
25
|
+
settings: ArtisnWebSettings;
|
|
26
|
+
/** Internal configuration of App and databases */
|
|
23
27
|
__internals__: firebase.app.App;
|
|
24
28
|
/** ArtisnApp object internal instance */
|
|
25
29
|
__instance__: typeof firebase;
|
|
26
30
|
}
|
|
27
31
|
/**
|
|
28
|
-
* The
|
|
32
|
+
* The ArtisnRNApp orchestrate the connections of the app with the DB, server
|
|
33
|
+
* and its settings.
|
|
29
34
|
*
|
|
30
|
-
* @interface
|
|
31
|
-
* @since 0.
|
|
35
|
+
* @interface ArtisnRNApp
|
|
36
|
+
* @since 0.1.0
|
|
32
37
|
*/
|
|
33
|
-
export interface
|
|
38
|
+
export interface ArtisnRNApp {
|
|
39
|
+
/** App's name */
|
|
40
|
+
name: ReactNativeFirebase.FirebaseApp["name"];
|
|
34
41
|
/** Artisn's account API URL */
|
|
35
42
|
apiURL: string;
|
|
43
|
+
/** Artisn app settings configuration, see {@link ArtisnRNSettings} */
|
|
44
|
+
settings: ArtisnRNSettings;
|
|
36
45
|
/** Internal configuration of App and databases */
|
|
37
|
-
__internals__:
|
|
46
|
+
__internals__: ReactNativeFirebase.FirebaseApp;
|
|
38
47
|
/** ArtisnApp object internal instance */
|
|
39
|
-
__instance__:
|
|
40
|
-
/** Artisn app settings configuration, see {@link ArtisnSettings} */
|
|
41
|
-
settings: ArtisnSettings;
|
|
42
|
-
/** App's name */
|
|
43
|
-
name: string;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Settings to configure the Firebase Instance.
|
|
47
|
-
*
|
|
48
|
-
* @interface RNFirebaseInstance
|
|
49
|
-
* @since 0.5.14
|
|
50
|
-
*/
|
|
51
|
-
export interface RNFirebaseInstance {
|
|
52
|
-
/** Auth package from react-native-auth */
|
|
53
|
-
auth: any;
|
|
54
|
-
/** Firestore package from react-native-auth */
|
|
55
|
-
firestore: any;
|
|
48
|
+
__instance__: ReactNativeFirebase.Module;
|
|
56
49
|
}
|
|
57
50
|
/**
|
|
58
51
|
* Settings to configure the Artisn app.
|
|
59
52
|
*
|
|
60
|
-
* @interface
|
|
61
|
-
* @since 0.
|
|
53
|
+
* @interface ArtisnWebSettings
|
|
54
|
+
* @since 0.1.0
|
|
62
55
|
*/
|
|
63
|
-
export interface
|
|
56
|
+
export interface ArtisnWebSettings {
|
|
64
57
|
/** Artisn's account unique identifier */
|
|
65
58
|
accountId?: number;
|
|
66
59
|
/** Platform where the app is running, see {@link ArtisnPlatform} */
|
|
@@ -77,10 +70,10 @@ export interface ArtisnSettings {
|
|
|
77
70
|
/**
|
|
78
71
|
* Settings to configure the Artisn app react-native.
|
|
79
72
|
*
|
|
80
|
-
* @interface
|
|
81
|
-
* @since 0.
|
|
73
|
+
* @interface ArtisnRNSettings
|
|
74
|
+
* @since 0.1.0
|
|
82
75
|
*/
|
|
83
|
-
export interface
|
|
76
|
+
export interface ArtisnRNSettings {
|
|
84
77
|
/** Platform where the app is running, see {@link ArtisnPlatform} */
|
|
85
78
|
platform: ArtisnPlatform;
|
|
86
79
|
/** Artisn's account unique identifier */
|
|
@@ -90,29 +83,47 @@ export interface ArtisnSettingsRN {
|
|
|
90
83
|
* Artisn app's allowed platforms to run on.
|
|
91
84
|
*
|
|
92
85
|
* @typedef ArtisnPlatform
|
|
93
|
-
* @since 0.
|
|
86
|
+
* @since 0.1.0
|
|
94
87
|
*/
|
|
95
88
|
export declare type ArtisnPlatform = "web" | "ios" | "android" | "windows" | "macos" | "call center";
|
|
96
89
|
/**
|
|
97
90
|
* Artisn's auth instance is the instance of the internal auth object.
|
|
98
91
|
*
|
|
99
|
-
* @typedef
|
|
100
|
-
* @since 0.
|
|
92
|
+
* @typedef ArtisnWebAuthInstance
|
|
93
|
+
* @since 0.1.0
|
|
101
94
|
*/
|
|
102
|
-
export declare type
|
|
95
|
+
export declare type ArtisnWebAuthInstance = typeof firebase.auth;
|
|
96
|
+
/**
|
|
97
|
+
* Artisn's auth instance is the instance of the internal auth object for react
|
|
98
|
+
* native.
|
|
99
|
+
*
|
|
100
|
+
* @typedef ArtisnRNAuthInstance
|
|
101
|
+
* @since 0.1.0
|
|
102
|
+
*/
|
|
103
|
+
export declare type ArtisnRNAuthInstance = typeof authRN;
|
|
103
104
|
/**
|
|
104
105
|
* Artisn's auth object to handle providers authentication.
|
|
105
106
|
*
|
|
106
|
-
* @
|
|
107
|
-
* @since 0.
|
|
107
|
+
* @interface ArtisnWebAuth
|
|
108
|
+
* @since 0.1.0
|
|
109
|
+
* @extends {{@link firebase.auth.Auth}
|
|
110
|
+
*/
|
|
111
|
+
export interface ArtisnWebAuth extends firebase.auth.Auth {
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Artisn's auth object to handle providers authentication for react native.
|
|
115
|
+
*
|
|
116
|
+
* @interface ArtisnRNAuth
|
|
117
|
+
* @since 0.1.0
|
|
118
|
+
* @extends {{@link FirebaseAuthTypes.Module}
|
|
108
119
|
*/
|
|
109
|
-
export interface
|
|
120
|
+
export interface ArtisnRNAuth extends FirebaseAuthTypes.Module {
|
|
110
121
|
}
|
|
111
122
|
/**
|
|
112
123
|
* Main artisn commerce filters.
|
|
113
124
|
*
|
|
114
125
|
* @interface ArtisnHints
|
|
115
|
-
* @since 0.
|
|
126
|
+
* @since 0.1.0
|
|
116
127
|
*/
|
|
117
128
|
export interface ArtisnHints {
|
|
118
129
|
/** Artisn's account unique identifier */
|
|
@@ -132,7 +143,7 @@ export interface ArtisnHints {
|
|
|
132
143
|
* Unrestricted allowed Artisn SDK rest api headers.
|
|
133
144
|
*
|
|
134
145
|
* @interface ArtisnHeaders
|
|
135
|
-
* @since 0.
|
|
146
|
+
* @since 0.1.0
|
|
136
147
|
*/
|
|
137
148
|
export interface ArtisnHeaders {
|
|
138
149
|
/** Platform where the app is running, see {@link ArtisnPlatform} */
|
|
@@ -144,7 +155,7 @@ export interface ArtisnHeaders {
|
|
|
144
155
|
* Restricted allowed Artisn SDK rest api headers.
|
|
145
156
|
*
|
|
146
157
|
* @interface ArtisnRestrictedHeaders
|
|
147
|
-
* @since 0.
|
|
158
|
+
* @since 0.1.0
|
|
148
159
|
* @extends {{@link ArtisnHeaders}
|
|
149
160
|
*/
|
|
150
161
|
export interface ArtisnRestrictedHeaders extends ArtisnHeaders {
|
package/build/types/app.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.types.js","sourceRoot":"","sources":["../../src/types/app.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app.types.js","sourceRoot":"","sources":["../../src/types/app.types.ts"],"names":[],"mappings":";;AAIA,4CAA0C"}
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import firebase from "firebase";
|
|
2
|
+
import { FirebaseFirestoreTypes } from "@react-native-firebase/firestore";
|
|
2
3
|
/**
|
|
3
4
|
* Artisn database object.
|
|
4
5
|
*
|
|
5
6
|
* @typedef ArtisnDB
|
|
6
|
-
* @since 0.
|
|
7
|
+
* @since 0.1.0
|
|
7
8
|
*/
|
|
8
|
-
export declare type ArtisnDB = firebase.firestore.Firestore;
|
|
9
|
+
export declare type ArtisnDB = firebase.firestore.Firestore | FirebaseFirestoreTypes.Module;
|
|
9
10
|
/**
|
|
10
11
|
* Artisn database document data object.
|
|
11
12
|
*
|
|
12
13
|
* @typedef ArtisnDBDocumentData
|
|
13
|
-
* @since 0.
|
|
14
|
+
* @since 0.1.0
|
|
14
15
|
*/
|
|
15
|
-
export declare type ArtisnDBDocumentData = firebase.firestore.DocumentData;
|
|
16
|
+
export declare type ArtisnDBDocumentData = firebase.firestore.DocumentData | FirebaseFirestoreTypes.DocumentData;
|
|
16
17
|
/**
|
|
17
18
|
* The current state of a node from the Artisn DB.
|
|
18
19
|
*
|
|
19
20
|
* @typedef ArtisnDBQueryDocumentSnapshot
|
|
20
|
-
* @since 0.
|
|
21
|
+
* @since 0.1.0
|
|
21
22
|
*/
|
|
22
|
-
export declare type ArtisnDBQueryDocumentSnapshot<T = ArtisnDBDocumentData> = firebase.firestore.QueryDocumentSnapshot<T>;
|
|
23
|
+
export declare type ArtisnDBQueryDocumentSnapshot<T = ArtisnDBDocumentData> = firebase.firestore.QueryDocumentSnapshot<T> | FirebaseFirestoreTypes.QueryDocumentSnapshot<T>;
|
|
23
24
|
/**
|
|
24
25
|
* An Artisn DB collection of nodes.
|
|
25
26
|
*
|
|
26
27
|
* @typedef ArtisnDBCollectionReference
|
|
27
|
-
* @since 0.
|
|
28
|
+
* @since 0.1.0
|
|
28
29
|
*/
|
|
29
|
-
export declare type ArtisnDBCollectionReference<T = ArtisnDBDocumentData> = firebase.firestore.CollectionReference<T>;
|
|
30
|
+
export declare type ArtisnDBCollectionReference<T = ArtisnDBDocumentData> = firebase.firestore.CollectionReference<T> | FirebaseFirestoreTypes.CollectionReference<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artisnDB.types.js","sourceRoot":"","sources":["../../src/types/artisnDB.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"artisnDB.types.js","sourceRoot":"","sources":["../../src/types/artisnDB.types.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artisan-commerce/types",
|
|
3
3
|
"description": "Artisn's types and interfaces library",
|
|
4
|
-
"version": "0.14.0-canary.
|
|
4
|
+
"version": "0.14.0-canary.14",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -23,6 +23,9 @@
|
|
|
23
23
|
"author": "Luis Eduardo Andrade",
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
+
"@react-native-firebase/app": "^12.8.0",
|
|
27
|
+
"@react-native-firebase/auth": "^12.8.0",
|
|
28
|
+
"@react-native-firebase/firestore": "^12.8.0",
|
|
26
29
|
"@types/node": "^14.0.24",
|
|
27
30
|
"@typescript-eslint/eslint-plugin": "^3.7.0",
|
|
28
31
|
"@typescript-eslint/parser": "^3.7.0",
|
|
@@ -42,5 +45,5 @@
|
|
|
42
45
|
"prettier": "^2.1.2",
|
|
43
46
|
"webpack-bundle-analyzer": "^3.9.0"
|
|
44
47
|
},
|
|
45
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "d910055ad25b500ba9eba2c90148c4ff75cdae0c"
|
|
46
49
|
}
|