@artisan-commerce/types 0.13.0-canary.8 → 0.13.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 +27 -0
- package/build/index.d.ts +8 -6
- package/build/index.js +8 -6
- package/build/index.js.map +1 -1
- package/build/types/account.types.d.ts +5 -5
- package/build/types/app.types.d.ts +46 -29
- package/build/types/app.types.js +1 -0
- package/build/types/app.types.js.map +1 -1
- package/build/types/artisanDB.types.d.ts +24 -0
- package/build/types/artisanDB.types.js +1 -0
- package/build/types/artisanDB.types.js.map +1 -1
- package/build/types/banner.types.d.ts +97 -0
- package/build/types/{coupons.types.js → banner.types.js} +2 -1
- package/build/types/banner.types.js.map +1 -0
- package/build/types/billingData.types.d.ts +23 -0
- package/build/types/billingData.types.js +1 -0
- package/build/types/billingData.types.js.map +1 -1
- package/build/types/catalogue.types.d.ts +16 -0
- package/build/types/catalogue.types.js +4 -0
- package/build/types/catalogue.types.js.map +1 -0
- package/build/types/category.types.d.ts +21 -2
- package/build/types/category.types.js +1 -0
- package/build/types/category.types.js.map +1 -1
- package/build/types/common.types.d.ts +28 -0
- package/build/types/common.types.js +1 -1
- package/build/types/common.types.js.map +1 -1
- package/build/types/country.types.d.ts +34 -1
- package/build/types/coupon.types.d.ts +112 -0
- package/build/types/{channel.types.js → coupon.types.js} +2 -2
- package/build/types/coupon.types.js.map +1 -0
- package/build/types/http.types.d.ts +45 -0
- package/build/types/image.types.d.ts +54 -2
- package/build/types/livingPlace.types.d.ts +65 -4
- package/build/types/livingPlace.types.js +1 -0
- package/build/types/livingPlace.types.js.map +1 -1
- package/build/types/payment.types.d.ts +81 -0
- package/build/types/payment.types.js +4 -0
- package/build/types/payment.types.js.map +1 -0
- package/build/types/product.types.d.ts +178 -52
- package/build/types/product.types.js +1 -25
- package/build/types/product.types.js.map +1 -1
- package/build/types/shippingAddress.types.d.ts +48 -0
- package/build/types/shippingAddress.types.js +1 -0
- package/build/types/shippingAddress.types.js.map +1 -1
- package/build/types/shippingCost.types.d.ts +31 -0
- package/build/types/shoppingCart.types.d.ts +75 -21
- package/build/types/shoppingCart.types.js +1 -0
- package/build/types/shoppingCart.types.js.map +1 -1
- package/build/types/store.types.d.ts +154 -25
- package/build/types/store.types.js +1 -21
- package/build/types/store.types.js.map +1 -1
- package/build/types/user.types.d.ts +77 -9
- package/build/types/user.types.js +1 -12
- package/build/types/user.types.js.map +1 -1
- package/build/types/vendor.types.d.ts +16 -0
- package/package.json +2 -2
- package/build/types/channel.types.d.ts +0 -5
- package/build/types/channel.types.js.map +0 -1
- package/build/types/coupons.types.d.ts +0 -90
- package/build/types/coupons.types.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
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](https://bitbucket.org/tradesystem/artisan_sdk/compare/@artisan-commerce/types@0.13.0-canary.10...@artisan-commerce/types@0.13.0) (2021-07-30)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **global:** fix percentage type on country ([b4920f2](https://bitbucket.org/tradesystem/artisan_sdk/commit/b4920f2021d4b3e5e1ea9cfd2423d98c122ae5ea))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [0.13.0-canary.10](https://bitbucket.org/tradesystem/artisan_sdk/compare/@artisan-commerce/types@0.13.0-canary.9...@artisan-commerce/types@0.13.0-canary.10) (2021-07-26)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **global:** anonymous shopping cart ([99762c1](https://bitbucket.org/tradesystem/artisan_sdk/commit/99762c1ee8e2bce47eb936b3f76a280048579916))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## [0.13.0-canary.9](https://bitbucket.org/tradesystem/artisan_sdk/compare/@artisan-commerce/types@0.13.0-canary.8...@artisan-commerce/types@0.13.0-canary.9) (2021-06-18)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Bug Fixes
|
|
28
|
+
|
|
29
|
+
* **global:** fix remove benefit method ([a6cb684](https://bitbucket.org/tradesystem/artisan_sdk/commit/a6cb68453250ca855d8609b9f3c8de8c0d5d9b90))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
## [0.13.0-canary.8](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/types@0.13.0-canary.7...@artisan-commerce/types@0.13.0-canary.8) (2021-06-10)
|
|
7
34
|
|
|
8
35
|
|
package/build/index.d.ts
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
export * from "./types/app.types";
|
|
2
2
|
export * from "./types/account.types";
|
|
3
3
|
export * from "./types/artisanDB.types";
|
|
4
|
+
export * from "./types/banner.types";
|
|
5
|
+
export * from "./types/billingData.types";
|
|
4
6
|
export * from "./types/category.types";
|
|
5
|
-
export * from "./types/
|
|
7
|
+
export * from "./types/catalogue.types";
|
|
6
8
|
export * from "./types/common.types";
|
|
7
|
-
export * from "./types/
|
|
9
|
+
export * from "./types/coupon.types";
|
|
8
10
|
export * from "./types/country.types";
|
|
9
11
|
export * from "./types/currency.types";
|
|
12
|
+
export * from "./types/http.types";
|
|
10
13
|
export * from "./types/image.types";
|
|
14
|
+
export * from "./types/livingPlace.types";
|
|
15
|
+
export * from "./types/payment.types";
|
|
11
16
|
export * from "./types/product.types";
|
|
17
|
+
export * from "./types/shippingAddress.types";
|
|
12
18
|
export * from "./types/shippingCost.types";
|
|
13
19
|
export * from "./types/shoppingCart.types";
|
|
14
20
|
export * from "./types/store.types";
|
|
15
21
|
export * from "./types/vendor.types";
|
|
16
|
-
export * from "./types/http.types";
|
|
17
22
|
export * from "./types/user.types";
|
|
18
|
-
export * from "./types/billingData.types";
|
|
19
|
-
export * from "./types/livingPlace.types";
|
|
20
|
-
export * from "./types/shippingAddress.types";
|
package/build/index.js
CHANGED
|
@@ -14,21 +14,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
14
14
|
__exportStar(require("./types/app.types"), exports);
|
|
15
15
|
__exportStar(require("./types/account.types"), exports);
|
|
16
16
|
__exportStar(require("./types/artisanDB.types"), exports);
|
|
17
|
+
__exportStar(require("./types/banner.types"), exports);
|
|
18
|
+
__exportStar(require("./types/billingData.types"), exports);
|
|
17
19
|
__exportStar(require("./types/category.types"), exports);
|
|
18
|
-
__exportStar(require("./types/
|
|
20
|
+
__exportStar(require("./types/catalogue.types"), exports);
|
|
19
21
|
__exportStar(require("./types/common.types"), exports);
|
|
20
|
-
__exportStar(require("./types/
|
|
22
|
+
__exportStar(require("./types/coupon.types"), exports);
|
|
21
23
|
__exportStar(require("./types/country.types"), exports);
|
|
22
24
|
__exportStar(require("./types/currency.types"), exports);
|
|
25
|
+
__exportStar(require("./types/http.types"), exports);
|
|
23
26
|
__exportStar(require("./types/image.types"), exports);
|
|
27
|
+
__exportStar(require("./types/livingPlace.types"), exports);
|
|
28
|
+
__exportStar(require("./types/payment.types"), exports);
|
|
24
29
|
__exportStar(require("./types/product.types"), exports);
|
|
30
|
+
__exportStar(require("./types/shippingAddress.types"), exports);
|
|
25
31
|
__exportStar(require("./types/shippingCost.types"), exports);
|
|
26
32
|
__exportStar(require("./types/shoppingCart.types"), exports);
|
|
27
33
|
__exportStar(require("./types/store.types"), exports);
|
|
28
34
|
__exportStar(require("./types/vendor.types"), exports);
|
|
29
|
-
__exportStar(require("./types/http.types"), exports);
|
|
30
35
|
__exportStar(require("./types/user.types"), exports);
|
|
31
|
-
__exportStar(require("./types/billingData.types"), exports);
|
|
32
|
-
__exportStar(require("./types/livingPlace.types"), exports);
|
|
33
|
-
__exportStar(require("./types/shippingAddress.types"), exports);
|
|
34
36
|
//# 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,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO;AACP,oDAAkC;AAClC,wDAAsC;AACtC,0DAAwC;AACxC,uDAAqC;AACrC,4DAA0C;AAC1C,yDAAuC;AACvC,0DAAwC;AACxC,uDAAqC;AACrC,uDAAqC;AACrC,wDAAsC;AACtC,yDAAuC;AACvC,qDAAmC;AACnC,sDAAoC;AACpC,4DAA0C;AAC1C,wDAAsC;AACtC,wDAAsC;AACtC,gEAA8C;AAC9C,6DAA2C;AAC3C,6DAA2C;AAC3C,sDAAoC;AACpC,uDAAqC;AACrC,qDAAmC"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Image } from "./image.types";
|
|
2
2
|
/**
|
|
3
|
-
* Representation of a Commerce Account
|
|
3
|
+
* Representation of a Commerce Account.
|
|
4
4
|
*
|
|
5
5
|
* @interface Account
|
|
6
6
|
* @since 0.5.14
|
|
7
|
-
* @property {number} accountId artisan's account unique identifier.
|
|
8
|
-
* @property {string} name account's name.
|
|
9
|
-
* @property {string} description account's description.
|
|
10
|
-
* @property {string} images account's images.
|
|
11
7
|
*/
|
|
12
8
|
export interface Account {
|
|
9
|
+
/** Artisan's account unique identifier */
|
|
13
10
|
accountId: number;
|
|
11
|
+
/** Account's name */
|
|
14
12
|
name: string;
|
|
13
|
+
/** Account's description */
|
|
15
14
|
description?: string;
|
|
15
|
+
/** Account's images, see {@link Image} for further information */
|
|
16
16
|
images: Image[];
|
|
17
17
|
}
|
|
@@ -1,19 +1,27 @@
|
|
|
1
1
|
import firebase from "firebase";
|
|
2
|
+
/**
|
|
3
|
+
* The ArtisanApp controls the app connection with the DBs and its settings.
|
|
4
|
+
*
|
|
5
|
+
* @typedef ArtisanApp
|
|
6
|
+
* @since 0.5.14
|
|
7
|
+
*/
|
|
2
8
|
export declare type ArtisanApp = ArtisanAppWeb | ArtisanAppRN;
|
|
3
9
|
/**
|
|
4
10
|
* The ArtisanAppWeb orchestrate the connections of the app with the DB, server and its settings.
|
|
5
11
|
*
|
|
6
12
|
* @interface ArtisanAppWeb
|
|
7
13
|
* @since 0.5.14
|
|
8
|
-
* @property {string} name app's name
|
|
9
|
-
* @property {string} apiURL artisan's account API URL
|
|
10
|
-
* @property {ArtisanSettings} settings artisan app settings configuration
|
|
11
14
|
*/
|
|
12
15
|
export interface ArtisanAppWeb {
|
|
16
|
+
/** App's name */
|
|
13
17
|
name: firebase.app.App["name"];
|
|
18
|
+
/** Artisan's account API URL */
|
|
14
19
|
apiURL: string;
|
|
20
|
+
/** Artisan app settings configuration, see {@link ArtisanSettings} */
|
|
15
21
|
settings: ArtisanSettings;
|
|
22
|
+
/** Internal configuration of App and databases */
|
|
16
23
|
__internals__: firebase.app.App;
|
|
24
|
+
/** ArtisanApp object internal instance */
|
|
17
25
|
__instance__: typeof firebase;
|
|
18
26
|
}
|
|
19
27
|
/**
|
|
@@ -21,28 +29,29 @@ export interface ArtisanAppWeb {
|
|
|
21
29
|
*
|
|
22
30
|
* @interface ArtisanAppRN
|
|
23
31
|
* @since 0.5.14
|
|
24
|
-
* @property {string} name app's name
|
|
25
|
-
* @property {string} apiURL artisan's account API URL
|
|
26
|
-
* @property {ArtisanSettings} settings artisan app settings configuration
|
|
27
32
|
*/
|
|
28
33
|
export interface ArtisanAppRN {
|
|
34
|
+
/** Artisan's account API URL */
|
|
29
35
|
apiURL: string;
|
|
36
|
+
/** Internal configuration of App and databases */
|
|
30
37
|
__internals__: RNFirebaseInstance;
|
|
38
|
+
/** ArtisanApp object internal instance */
|
|
31
39
|
__instance__: RNFirebaseInstance;
|
|
40
|
+
/** Artisan app settings configuration, see {@link ArtisanSettings} */
|
|
32
41
|
settings: ArtisanSettings;
|
|
42
|
+
/** App's name */
|
|
33
43
|
name: string;
|
|
34
44
|
}
|
|
35
45
|
/**
|
|
36
|
-
* Settings to configure the
|
|
46
|
+
* Settings to configure the Firebase Instance.
|
|
37
47
|
*
|
|
38
48
|
* @interface RNFirebaseInstance
|
|
39
49
|
* @since 0.5.14
|
|
40
|
-
* @property {aut} auth auth package from react-native-auth
|
|
41
|
-
* @property {firestore} firestore firestore package from react-native-auth
|
|
42
|
-
* @property {ArtisanSettings} settings artisan app settings configuration
|
|
43
50
|
*/
|
|
44
51
|
export interface RNFirebaseInstance {
|
|
52
|
+
/** Auth package from react-native-auth */
|
|
45
53
|
auth: any;
|
|
54
|
+
/** Firestore package from react-native-auth */
|
|
46
55
|
firestore: any;
|
|
47
56
|
}
|
|
48
57
|
/**
|
|
@@ -50,23 +59,31 @@ export interface RNFirebaseInstance {
|
|
|
50
59
|
*
|
|
51
60
|
* @interface ArtisanSettings
|
|
52
61
|
* @since 0.5.14
|
|
53
|
-
* @property {number} accountId artisan's account unique identifier
|
|
54
|
-
* @property {ArtisanPlatform} platform app's running on platform
|
|
55
|
-
* @property {string} projectId app's project id
|
|
56
|
-
* @property {string} apiKey app's API key
|
|
57
|
-
* @property {string} appId app's external app id
|
|
58
|
-
* @property {string} authDomain app's auth domain url
|
|
59
62
|
*/
|
|
60
63
|
export interface ArtisanSettings {
|
|
64
|
+
/** Artisan's account unique identifier */
|
|
61
65
|
accountId?: number;
|
|
66
|
+
/** Platform where the app is running, see {@link ArtisanPlatform} */
|
|
62
67
|
platform?: ArtisanPlatform;
|
|
68
|
+
/** App's project id */
|
|
63
69
|
projectId: string;
|
|
70
|
+
/** App's API key */
|
|
64
71
|
apiKey: string;
|
|
72
|
+
/** App's external app id */
|
|
65
73
|
appId?: string;
|
|
74
|
+
/** App's auth domain url */
|
|
66
75
|
authDomain: string;
|
|
67
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Settings to configure the Artisan app react-native.
|
|
79
|
+
*
|
|
80
|
+
* @interface ArtisanSettingsRN
|
|
81
|
+
* @since 0.5.14
|
|
82
|
+
*/
|
|
68
83
|
export interface ArtisanSettingsRN {
|
|
84
|
+
/** Platform where the app is running, see {@link ArtisanPlatform} */
|
|
69
85
|
platform: ArtisanPlatform;
|
|
86
|
+
/** Artisan's account unique identifier */
|
|
70
87
|
accountId?: number;
|
|
71
88
|
}
|
|
72
89
|
/**
|
|
@@ -77,12 +94,12 @@ export interface ArtisanSettingsRN {
|
|
|
77
94
|
*/
|
|
78
95
|
export declare type ArtisanPlatform = "web" | "ios" | "android" | "windows" | "macos" | "call center";
|
|
79
96
|
/**
|
|
80
|
-
* Artisan's auth instance is the
|
|
97
|
+
* Artisan's auth instance is the instance of the internal auth object.
|
|
81
98
|
*
|
|
82
|
-
* @typedef
|
|
99
|
+
* @typedef ArtisanInstanceAuth
|
|
83
100
|
* @since 0.5.14
|
|
84
101
|
*/
|
|
85
|
-
export declare type
|
|
102
|
+
export declare type ArtisanInstanceAuth = typeof firebase.auth;
|
|
86
103
|
/**
|
|
87
104
|
* Artisan's auth object to handle providers authentication.
|
|
88
105
|
*
|
|
@@ -96,19 +113,19 @@ export interface ArtisanAuth extends firebase.auth.Auth {
|
|
|
96
113
|
*
|
|
97
114
|
* @interface ArtisanHints
|
|
98
115
|
* @since 0.5.14
|
|
99
|
-
* @property {string|number} accountId artisan's account unique identifier
|
|
100
|
-
* @property {string|number} vendorId vendor's id
|
|
101
|
-
* @property {string|number} catalogueId catalogue's id
|
|
102
|
-
* @property {number} storeId store's id
|
|
103
|
-
* @property {string|number} categoryId category's id
|
|
104
|
-
* @property {string|number} productId product's id
|
|
105
116
|
*/
|
|
106
117
|
export interface ArtisanHints {
|
|
118
|
+
/** Artisan's account unique identifier */
|
|
107
119
|
accountId: string | number;
|
|
120
|
+
/** Artisan's vendor unique identifier */
|
|
108
121
|
vendorId?: string | number;
|
|
122
|
+
/** Artisan's catalogue unique identifier */
|
|
109
123
|
catalogueId?: string | number;
|
|
124
|
+
/** Artisan's store unique identifier */
|
|
110
125
|
storeId?: number;
|
|
126
|
+
/** Artisan's category unique identifier */
|
|
111
127
|
categoryId?: string | number;
|
|
128
|
+
/** Artisan's productId unique identifier */
|
|
112
129
|
productId?: string | number;
|
|
113
130
|
}
|
|
114
131
|
/**
|
|
@@ -116,21 +133,21 @@ export interface ArtisanHints {
|
|
|
116
133
|
*
|
|
117
134
|
* @interface ArtisanHeaders
|
|
118
135
|
* @since 0.5.14
|
|
119
|
-
* @property {ArtisanPlatform} Platform app's running on platform
|
|
120
|
-
* @property {string|number} account account's id
|
|
121
136
|
*/
|
|
122
137
|
export interface ArtisanHeaders {
|
|
138
|
+
/** Platform where the app is running, see {@link ArtisanPlatform} */
|
|
123
139
|
Platform: ArtisanPlatform;
|
|
140
|
+
/** Artisan's account unique identifier */
|
|
124
141
|
account: string;
|
|
125
142
|
}
|
|
126
143
|
/**
|
|
127
144
|
* Restricted allowed Artisan SDK rest api headers.
|
|
128
145
|
*
|
|
129
146
|
* @interface ArtisanRestrictedHeaders
|
|
130
|
-
* @extends ArtisanHeaders
|
|
131
147
|
* @since 0.5.14
|
|
132
|
-
* @
|
|
148
|
+
* @extends {{@link ArtisanHeaders}
|
|
133
149
|
*/
|
|
134
150
|
export interface ArtisanRestrictedHeaders extends ArtisanHeaders {
|
|
151
|
+
/** Authorization app's authentication token */
|
|
135
152
|
Authorization: string;
|
|
136
153
|
}
|
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":";AAAA,mCAAmC"}
|
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
import firebase from "firebase";
|
|
2
|
+
/**
|
|
3
|
+
* Artisan database object.
|
|
4
|
+
*
|
|
5
|
+
* @typedef ArtisanDB
|
|
6
|
+
* @since 0.5.14
|
|
7
|
+
*/
|
|
2
8
|
export declare type ArtisanDB = firebase.firestore.Firestore;
|
|
9
|
+
/**
|
|
10
|
+
* Artisan database document data object.
|
|
11
|
+
*
|
|
12
|
+
* @typedef ArtisanDBDocumentData
|
|
13
|
+
* @since 0.5.14
|
|
14
|
+
*/
|
|
3
15
|
export declare type ArtisanDBDocumentData = firebase.firestore.DocumentData;
|
|
16
|
+
/**
|
|
17
|
+
* The current state of a node from the Artisan DB.
|
|
18
|
+
*
|
|
19
|
+
* @typedef ArtisanDBQueryDocumentSnapshot
|
|
20
|
+
* @since 0.5.14
|
|
21
|
+
*/
|
|
4
22
|
export declare type ArtisanDBQueryDocumentSnapshot<T = ArtisanDBDocumentData> = firebase.firestore.QueryDocumentSnapshot<T>;
|
|
23
|
+
/**
|
|
24
|
+
* An Artisan DB collection of nodes.
|
|
25
|
+
*
|
|
26
|
+
* @typedef ArtisanDBCollectionReference
|
|
27
|
+
* @since 0.5.14
|
|
28
|
+
*/
|
|
5
29
|
export declare type ArtisanDBCollectionReference<T = ArtisanDBDocumentData> = firebase.firestore.CollectionReference<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artisanDB.types.js","sourceRoot":"","sources":["../../src/types/artisanDB.types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"artisanDB.types.js","sourceRoot":"","sources":["../../src/types/artisanDB.types.ts"],"names":[],"mappings":";AAAA,kCAAkC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { CDNImage } from "./image.types";
|
|
2
|
+
/**
|
|
3
|
+
* Representation of a Commerce Banner.
|
|
4
|
+
*
|
|
5
|
+
* @interface Banner
|
|
6
|
+
* @since 0.5.14
|
|
7
|
+
*/
|
|
8
|
+
export interface Banner {
|
|
9
|
+
/** Banner category id */
|
|
10
|
+
banner_category_id: number;
|
|
11
|
+
/** Banner description */
|
|
12
|
+
banner_description: string;
|
|
13
|
+
/** Banner qr code */
|
|
14
|
+
banner_qr_code: string;
|
|
15
|
+
/** Banner title */
|
|
16
|
+
banner_title: string;
|
|
17
|
+
/** Banner type, see {@link BannerType} */
|
|
18
|
+
banner_type: BannerType;
|
|
19
|
+
/** Banner image url */
|
|
20
|
+
banner_url: string | null;
|
|
21
|
+
/** Banner's benefits */
|
|
22
|
+
benefits: null;
|
|
23
|
+
/** Banner category id */
|
|
24
|
+
category_id: number;
|
|
25
|
+
/** Banner category name */
|
|
26
|
+
category_name: string;
|
|
27
|
+
/** Banner channel's id */
|
|
28
|
+
channel_id: number;
|
|
29
|
+
/** Banner coupon's code */
|
|
30
|
+
coupon: null;
|
|
31
|
+
/** Banner coupon's id */
|
|
32
|
+
coupon_id: string | null;
|
|
33
|
+
/** The base 64 image value, see {@link CDNImage} */
|
|
34
|
+
image_base64: CDNImage["base64"];
|
|
35
|
+
/** The bucket where the image is saved */
|
|
36
|
+
image_bucket: string | null;
|
|
37
|
+
/** he cloud where the banner is saved, see {@link CDNImage} */
|
|
38
|
+
image_cloud_front_url: CDNImage["cloudFrontUrl"];
|
|
39
|
+
/** Banner image's filename */
|
|
40
|
+
image_file_name: string;
|
|
41
|
+
/** The directory where the banner image is saved */
|
|
42
|
+
image_key: string;
|
|
43
|
+
/** The url where the banner image is saved */
|
|
44
|
+
image_url: string;
|
|
45
|
+
/** An array of banner images, see {@link BannerImage} */
|
|
46
|
+
images: BannerImage[];
|
|
47
|
+
/** Banner product's id */
|
|
48
|
+
product_id: null;
|
|
49
|
+
/** Banner product's name */
|
|
50
|
+
product_name: null;
|
|
51
|
+
/** Banner's section */
|
|
52
|
+
section: null;
|
|
53
|
+
/** Banner's scope, see {@link BannerScope} */
|
|
54
|
+
scope: BannerScope;
|
|
55
|
+
/** Banner stores array */
|
|
56
|
+
stores: unknown[];
|
|
57
|
+
/** Banner vendor's id */
|
|
58
|
+
vendor_id: number;
|
|
59
|
+
/** Banner vendor's name */
|
|
60
|
+
vendor_name: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The possible values of the banner's type.
|
|
64
|
+
*
|
|
65
|
+
* @typedef BannerType
|
|
66
|
+
* @since 0.5.14
|
|
67
|
+
*/
|
|
68
|
+
export declare type BannerType = "INFO" | "URL" | "PRODUCT" | "COUPON";
|
|
69
|
+
/**
|
|
70
|
+
* The possible values of the banner's scope.
|
|
71
|
+
*
|
|
72
|
+
* @typedef BannerScope
|
|
73
|
+
* @since 0.5.14
|
|
74
|
+
*/
|
|
75
|
+
export declare type BannerScope = "WEB" | "GLOBAL" | "APP";
|
|
76
|
+
/**
|
|
77
|
+
* Representation of a Banner image.
|
|
78
|
+
*
|
|
79
|
+
* @interface BannerImage
|
|
80
|
+
* @since 0.5.14
|
|
81
|
+
*/
|
|
82
|
+
export interface BannerImage {
|
|
83
|
+
/** Banner's id */
|
|
84
|
+
id: number;
|
|
85
|
+
/** Banner image's filename */
|
|
86
|
+
file_name: string;
|
|
87
|
+
/** Banner image's filename */
|
|
88
|
+
image_file_name: string;
|
|
89
|
+
/** Banner image's directory */
|
|
90
|
+
image_key: string;
|
|
91
|
+
/** The url where the banner image is saved */
|
|
92
|
+
image_url: string;
|
|
93
|
+
/** Banner's position inside the banner images array */
|
|
94
|
+
position: number;
|
|
95
|
+
/** The url where the banner image is saved */
|
|
96
|
+
url: string;
|
|
97
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"banner.types.js","sourceRoot":"","sources":["../../src/types/banner.types.ts"],"names":[],"mappings":";AAAA,8BAA8B"}
|
|
@@ -1,16 +1,39 @@
|
|
|
1
1
|
import { CountrySummary } from "./common.types";
|
|
2
2
|
import { DocumentType } from "./common.types";
|
|
3
|
+
/**
|
|
4
|
+
* Representation of a Commerce Billing Data.
|
|
5
|
+
*
|
|
6
|
+
* @interface BillingData
|
|
7
|
+
* @since 0.5.14
|
|
8
|
+
*/
|
|
3
9
|
export interface BaseBillingData {
|
|
10
|
+
/** Billing's nickname */
|
|
4
11
|
nickname: string;
|
|
12
|
+
/** Billing's associated user complete name */
|
|
5
13
|
name: string;
|
|
14
|
+
/** Billing's associated document type, see {@link DocumentType} */
|
|
6
15
|
documentType: DocumentType;
|
|
16
|
+
/** Billing's associated document */
|
|
7
17
|
document: string;
|
|
18
|
+
/** Billing's associated user address */
|
|
8
19
|
address: string;
|
|
20
|
+
/** Billing's associated user phone without country calling code */
|
|
9
21
|
phone: string;
|
|
22
|
+
/** Billing's associated user email */
|
|
10
23
|
email: string;
|
|
24
|
+
/** Whether or not the billing is default */
|
|
11
25
|
default: boolean;
|
|
26
|
+
/** It contains country id and country name, see {@link CountrySummary} */
|
|
12
27
|
country: CountrySummary;
|
|
13
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Representation of a billing data saved on a database.
|
|
31
|
+
*
|
|
32
|
+
* @interface BillingData
|
|
33
|
+
* @since 0.5.14
|
|
34
|
+
* @extends {{@link BaseBillingData}
|
|
35
|
+
*/
|
|
14
36
|
export interface BillingData extends BaseBillingData {
|
|
37
|
+
/** Billing's auto generated id */
|
|
15
38
|
id: number;
|
|
16
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billingData.types.js","sourceRoot":"","sources":["../../src/types/billingData.types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"billingData.types.js","sourceRoot":"","sources":["../../src/types/billingData.types.ts"],"names":[],"mappings":";AAAA,oCAAoC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Representation of a Commerce Catalogue.
|
|
3
|
+
*
|
|
4
|
+
* @interface Catalogue
|
|
5
|
+
* @since 0.5.14
|
|
6
|
+
*/
|
|
7
|
+
export interface Catalogue {
|
|
8
|
+
/** Catalogue's id */
|
|
9
|
+
catalogueId: string;
|
|
10
|
+
/** Catalogue's name */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Whether or not the catalogue is active */
|
|
13
|
+
active: boolean;
|
|
14
|
+
/** Catalogue's friendly name to use on front end */
|
|
15
|
+
friendlyName?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalogue.types.js","sourceRoot":"","sources":["../../src/types/catalogue.types.ts"],"names":[],"mappings":";AAAA,iCAAiC"}
|
|
@@ -1,14 +1,33 @@
|
|
|
1
1
|
import { Image } from "./image.types";
|
|
2
2
|
import { BaseProduct } from "./product.types";
|
|
3
|
+
/**
|
|
4
|
+
* Representation of a Commerce Category.
|
|
5
|
+
*
|
|
6
|
+
* @interface Category
|
|
7
|
+
* @since 0.5.14
|
|
8
|
+
*/
|
|
3
9
|
export interface Category {
|
|
10
|
+
/** Category's id */
|
|
4
11
|
categoryId: number;
|
|
12
|
+
/** Category's name */
|
|
5
13
|
name: string;
|
|
14
|
+
/** Category image's array, see {@link Image} */
|
|
6
15
|
images: Image[];
|
|
16
|
+
/** Whether or not to display the category */
|
|
7
17
|
displayInMenu: boolean;
|
|
18
|
+
/** Whether or not the category should be reloaded */
|
|
8
19
|
reload: boolean;
|
|
20
|
+
/** Whether or not the category has subcategories */
|
|
9
21
|
subcategories: boolean;
|
|
10
22
|
}
|
|
11
|
-
|
|
12
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Representation of a category which contains several base products.
|
|
25
|
+
*
|
|
26
|
+
* @interface CategoryWithProducts
|
|
27
|
+
* @since 0.5.14
|
|
28
|
+
* @extends {{@link Category}
|
|
29
|
+
*/
|
|
30
|
+
export interface CategoryWithProducts extends Category {
|
|
31
|
+
/** Array of base products associated with a category, see {@link BaseProduct} */
|
|
13
32
|
products: BaseProduct[];
|
|
14
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.types.js","sourceRoot":"","sources":["../../src/types/category.types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"category.types.js","sourceRoot":"","sources":["../../src/types/category.types.ts"],"names":[],"mappings":";AAAA,kCAAkC"}
|
|
@@ -1,8 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Representation of a generic object.
|
|
3
|
+
*
|
|
4
|
+
* @interface Objectify<T>
|
|
5
|
+
* @since 0.5.14
|
|
6
|
+
* @property {T} [key: string] object key
|
|
7
|
+
*/
|
|
1
8
|
export interface Objectify<T> {
|
|
2
9
|
[key: string]: T;
|
|
3
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* The possible values of a document type.
|
|
13
|
+
*
|
|
14
|
+
* @typedef DocumentType
|
|
15
|
+
* @since 0.5.14
|
|
16
|
+
*/
|
|
4
17
|
export declare type DocumentType = "CI" | "RUC" | "PASSPORT";
|
|
18
|
+
/**
|
|
19
|
+
* Representation of the country's summary.
|
|
20
|
+
*
|
|
21
|
+
* @interface CountrySummary
|
|
22
|
+
* @since 0.5.14
|
|
23
|
+
*/
|
|
5
24
|
export interface CountrySummary {
|
|
25
|
+
/** Country's id */
|
|
6
26
|
id: number;
|
|
27
|
+
/** Country's name */
|
|
7
28
|
name: string;
|
|
8
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* The possible values of a week day.
|
|
32
|
+
*
|
|
33
|
+
* @typedef BaseWeekDay
|
|
34
|
+
* @since 0.5.14
|
|
35
|
+
*/
|
|
36
|
+
export declare type BaseWeekDay = "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | "SUNDAY";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.types.js","sourceRoot":"","sources":["../../src/types/common.types.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"common.types.js","sourceRoot":"","sources":["../../src/types/common.types.ts"],"names":[],"mappings":";AAAA,0CAA0C"}
|