@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
|
@@ -1,69 +1,198 @@
|
|
|
1
|
+
import { Image } from "./image.types";
|
|
1
2
|
import { Vendor } from "./vendor.types";
|
|
3
|
+
import { Catalogue } from "./catalogue.types";
|
|
4
|
+
import { BaseWeekDay } from "./common.types";
|
|
5
|
+
/**
|
|
6
|
+
* Representation of a Commerce Store.
|
|
7
|
+
*
|
|
8
|
+
* @interface Store
|
|
9
|
+
* @since 0.5.14
|
|
10
|
+
*/
|
|
2
11
|
export interface Store {
|
|
12
|
+
/** Store unique identifier */
|
|
3
13
|
storeId: number;
|
|
14
|
+
/** Store name */
|
|
4
15
|
storeName: string;
|
|
16
|
+
/** Store address */
|
|
5
17
|
address: string;
|
|
18
|
+
/** The vendor associated with the store, see {@link Vendor} */
|
|
6
19
|
vendor: Vendor;
|
|
20
|
+
/**
|
|
21
|
+
* Additional store information, see
|
|
22
|
+
* {@link AdditionalStoreInformation} for further information
|
|
23
|
+
*/
|
|
7
24
|
additionalInfo: AdditionalStoreInformation;
|
|
8
|
-
|
|
25
|
+
/** Whether or not the store is within coverage */
|
|
9
26
|
coverage: boolean;
|
|
27
|
+
/** Store cover url */
|
|
10
28
|
coverUrl: string;
|
|
29
|
+
/** Store delivery detailed information */
|
|
11
30
|
delivery: Delivery;
|
|
31
|
+
/** Store description */
|
|
12
32
|
description: string | null;
|
|
33
|
+
/** Whether or not the store is open */
|
|
13
34
|
isOpen: boolean;
|
|
35
|
+
/** Order maximum amount allowed */
|
|
14
36
|
maxOrderAmount: number;
|
|
37
|
+
/** Order minimum amount allowed */
|
|
15
38
|
minOrderAmount: number;
|
|
39
|
+
/** Order currency's symbol */
|
|
16
40
|
orderSymbol: string;
|
|
41
|
+
/** Store phone */
|
|
17
42
|
phone: string;
|
|
43
|
+
/** Whether or not the store is sponsored */
|
|
18
44
|
sponsored: boolean;
|
|
45
|
+
/** Store latitude */
|
|
19
46
|
latitude: number;
|
|
47
|
+
/** Store longitude */
|
|
20
48
|
longitude: number;
|
|
49
|
+
/** Store schedules, see {@link Schedule} for further information */
|
|
21
50
|
schedules: Schedule[];
|
|
51
|
+
/** Store timezone */
|
|
22
52
|
timezone: string;
|
|
23
|
-
|
|
53
|
+
/** Store available services, see {@link Service} */
|
|
24
54
|
services: Service[];
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
55
|
+
/** Estimated store cook time */
|
|
56
|
+
cookTime: string;
|
|
57
|
+
/**
|
|
58
|
+
* Generic store location in regards to the city,
|
|
59
|
+
* see {@link GenericStoreLocation}
|
|
60
|
+
*/
|
|
61
|
+
city: GenericStoreLocation;
|
|
62
|
+
/** Whether or not the store is out of service */
|
|
63
|
+
outOfService: boolean;
|
|
64
|
+
/** Whether or not the store is default */
|
|
65
|
+
isDefault: boolean;
|
|
66
|
+
/** Whether or not the store is active */
|
|
67
|
+
active: boolean;
|
|
68
|
+
/** The value of the allowed minimum order */
|
|
69
|
+
minOrder: number;
|
|
70
|
+
/** Minimum order currency's symbol */
|
|
71
|
+
minOrderSymbol: string;
|
|
72
|
+
/**
|
|
73
|
+
* Generic store location in regards to the country,
|
|
74
|
+
* see {@link GenericStoreLocation} for further information
|
|
75
|
+
*/
|
|
76
|
+
country: GenericStoreLocation;
|
|
77
|
+
/** Store location, see {@link StoreLocation} for further information */
|
|
78
|
+
location: StoreLocation;
|
|
79
|
+
/** Array of catalogues, see {@link Catalogue} */
|
|
80
|
+
catalogues: Catalogue[];
|
|
81
|
+
/** Array of store images, see {@link Image}*/
|
|
82
|
+
images: Image[];
|
|
83
|
+
/** The distance between the user and the store, roughly in metres */
|
|
84
|
+
distance: number;
|
|
29
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Store location.
|
|
88
|
+
*
|
|
89
|
+
* @interface StoreLocation
|
|
90
|
+
* @since 0.5.14
|
|
91
|
+
*/
|
|
92
|
+
export interface StoreLocation {
|
|
93
|
+
/** Store location latitude */
|
|
94
|
+
lat: number;
|
|
95
|
+
/** Store location longitude */
|
|
96
|
+
lon: number;
|
|
97
|
+
/** The geo hash associated with the store */
|
|
98
|
+
geohash: string;
|
|
99
|
+
/** Whether or not the store is a fragment */
|
|
100
|
+
fragment: boolean;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Store generic location.
|
|
104
|
+
*
|
|
105
|
+
* @interface GenericStoreLocation
|
|
106
|
+
* @since 0.5.14
|
|
107
|
+
*/
|
|
108
|
+
export interface GenericStoreLocation {
|
|
109
|
+
/** Generic store location unique identifier */
|
|
110
|
+
id: string;
|
|
111
|
+
/** Generic store location name */
|
|
112
|
+
name: string;
|
|
113
|
+
/** Whether or not the generic store location is active */
|
|
114
|
+
active: boolean;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Additional store information.
|
|
118
|
+
*
|
|
119
|
+
* @interface AdditionalStoreInformation
|
|
120
|
+
* @since 0.5.14
|
|
121
|
+
*/
|
|
30
122
|
export interface AdditionalStoreInformation {
|
|
123
|
+
/** Store external id */
|
|
31
124
|
externalId: string;
|
|
125
|
+
/** Store external code */
|
|
32
126
|
externalCode: string;
|
|
127
|
+
/** Delivery unique identifier */
|
|
33
128
|
idDeliveryKfc: string;
|
|
129
|
+
/** Whether or not the store has a drinks store */
|
|
34
130
|
isDrinksStore: boolean;
|
|
131
|
+
/** Whether or not to show the drinks store */
|
|
35
132
|
showDrinksStore: boolean;
|
|
36
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* Store delivery modality information.
|
|
136
|
+
*
|
|
137
|
+
* @interface Delivery
|
|
138
|
+
* @since 0.5.14
|
|
139
|
+
*/
|
|
37
140
|
export interface Delivery {
|
|
141
|
+
/** Time unit for delivery, see {@link DeliveryTimeUnit} */
|
|
38
142
|
deliveryTimeUnit: DeliveryTimeUnit;
|
|
39
|
-
|
|
143
|
+
/** Time value for delivery as string */
|
|
144
|
+
deliveryTimeValue: string;
|
|
145
|
+
/** Whether or not the store has a express delivery */
|
|
40
146
|
express: boolean;
|
|
147
|
+
/** Whether or not the store has free delivery */
|
|
41
148
|
freeDelivery: boolean;
|
|
42
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* Store schedules.
|
|
152
|
+
*
|
|
153
|
+
* @interface Schedule
|
|
154
|
+
* @since 0.5.14
|
|
155
|
+
*/
|
|
43
156
|
export interface Schedule {
|
|
157
|
+
/** Week day in uppercase, see {@link Days} */
|
|
44
158
|
day: Days;
|
|
159
|
+
/**
|
|
160
|
+
* `Date` value representing the start time in which
|
|
161
|
+
* the product is available
|
|
162
|
+
*/
|
|
45
163
|
from: number;
|
|
164
|
+
/** `Date` value representing the end time in which
|
|
165
|
+
* the product is available
|
|
166
|
+
*/
|
|
46
167
|
to: number;
|
|
168
|
+
/** Store catalogue unique identifier */
|
|
169
|
+
catalogueId: string;
|
|
47
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* The services available on the store.
|
|
173
|
+
*
|
|
174
|
+
* @interface Service
|
|
175
|
+
* @since 0.5.14
|
|
176
|
+
*/
|
|
48
177
|
export interface Service {
|
|
178
|
+
/** Service name */
|
|
49
179
|
name: string;
|
|
50
|
-
|
|
180
|
+
/** Whether or not the service is active on the store */
|
|
181
|
+
active: boolean;
|
|
182
|
+
/** Service image url */
|
|
51
183
|
url: string;
|
|
52
184
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
export declare
|
|
67
|
-
INACTIVE = "INACTIVE",
|
|
68
|
-
ACTIVE = "ACTIVE"
|
|
69
|
-
}
|
|
185
|
+
/**
|
|
186
|
+
* Time unit for delivery.
|
|
187
|
+
*
|
|
188
|
+
* @typedef DeliveryTimeUnit
|
|
189
|
+
* @since 0.5.14
|
|
190
|
+
*/
|
|
191
|
+
export declare type DeliveryTimeUnit = "min";
|
|
192
|
+
/**
|
|
193
|
+
* Allowed days for schedules.
|
|
194
|
+
*
|
|
195
|
+
* @typedef Days
|
|
196
|
+
* @since 0.5.14
|
|
197
|
+
*/
|
|
198
|
+
export declare type Days = BaseWeekDay | "SPECIAL";
|
|
@@ -1,24 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// Store types and interfaces
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ServiceStatus = exports.Days = exports.DeliveryTimeUnit = void 0;
|
|
4
|
-
var DeliveryTimeUnit;
|
|
5
|
-
(function (DeliveryTimeUnit) {
|
|
6
|
-
DeliveryTimeUnit["MIN"] = "min";
|
|
7
|
-
})(DeliveryTimeUnit = exports.DeliveryTimeUnit || (exports.DeliveryTimeUnit = {}));
|
|
8
|
-
var Days;
|
|
9
|
-
(function (Days) {
|
|
10
|
-
Days["MONDAY"] = "MONDAY";
|
|
11
|
-
Days["TUESDAY"] = "TUESDAY";
|
|
12
|
-
Days["WEDNESDAY"] = "WEDNESDAY";
|
|
13
|
-
Days["THURSDAY"] = "THURSDAY";
|
|
14
|
-
Days["FRIDAY"] = "FRIDAY";
|
|
15
|
-
Days["SATURDAY"] = "SATURDAY";
|
|
16
|
-
Days["SUNDAY"] = "SUNDAY";
|
|
17
|
-
Days["SPECIAL"] = "SPECIAL";
|
|
18
|
-
})(Days = exports.Days || (exports.Days = {}));
|
|
19
|
-
var ServiceStatus;
|
|
20
|
-
(function (ServiceStatus) {
|
|
21
|
-
ServiceStatus["INACTIVE"] = "INACTIVE";
|
|
22
|
-
ServiceStatus["ACTIVE"] = "ACTIVE";
|
|
23
|
-
})(ServiceStatus = exports.ServiceStatus || (exports.ServiceStatus = {}));
|
|
24
4
|
//# sourceMappingURL=store.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.types.js","sourceRoot":"","sources":["../../src/types/store.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"store.types.js","sourceRoot":"","sources":["../../src/types/store.types.ts"],"names":[],"mappings":";AAAA,6BAA6B"}
|
|
@@ -1,46 +1,114 @@
|
|
|
1
1
|
import { DocumentType } from "./common.types";
|
|
2
|
+
/**
|
|
3
|
+
* Representation of a Commerce User.
|
|
4
|
+
*
|
|
5
|
+
* @interface BaseUser
|
|
6
|
+
* @since 0.5.14
|
|
7
|
+
*/
|
|
2
8
|
export interface BaseUser {
|
|
9
|
+
/** User's unique identifier */
|
|
3
10
|
uid: string;
|
|
11
|
+
/** User's first name */
|
|
4
12
|
name: string;
|
|
13
|
+
/** User's middle name */
|
|
5
14
|
middleName?: string;
|
|
15
|
+
/** User's last name */
|
|
6
16
|
lastname: string;
|
|
17
|
+
/** User's second surname */
|
|
7
18
|
secondLastname?: string;
|
|
19
|
+
/** User's email */
|
|
8
20
|
email: string;
|
|
21
|
+
/** User's birthdate, e.g: 1991-05-02 */
|
|
9
22
|
birthdate?: string;
|
|
23
|
+
/** The vendor which the user was created */
|
|
10
24
|
vendorId?: number;
|
|
25
|
+
/** The platform where the user was generated */
|
|
11
26
|
origin?: string;
|
|
27
|
+
/** User's document */
|
|
12
28
|
document?: string;
|
|
29
|
+
/**User's document type, see {@link DocumentType} */
|
|
13
30
|
documentType?: DocumentType;
|
|
31
|
+
/** User's gender, see {@link Gender} */
|
|
14
32
|
gender?: Gender;
|
|
33
|
+
/** User's country object, see {@link UserCountry} */
|
|
15
34
|
country: UserCountry;
|
|
35
|
+
/** User's phone detailed information, see {@link Phone} */
|
|
16
36
|
phone?: Phone;
|
|
37
|
+
/** User's type, see {@link UserType} */
|
|
17
38
|
type?: UserType;
|
|
39
|
+
/** User's externalId */
|
|
18
40
|
externalId?: string;
|
|
41
|
+
/** User's marital status, see {@link MaritalStatus} */
|
|
19
42
|
maritalStatus?: MaritalStatus;
|
|
43
|
+
/** Whether or not the user is active */
|
|
20
44
|
active?: boolean;
|
|
45
|
+
/** User's additional info, see {@link AdditionalInfo} */
|
|
21
46
|
additionalInfo?: AdditionalInfo;
|
|
22
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Representation of a user saved on a database.
|
|
50
|
+
*
|
|
51
|
+
* @interface User
|
|
52
|
+
* @since 0.5.14
|
|
53
|
+
* @extends {{@link BaseUser}
|
|
54
|
+
*/
|
|
23
55
|
export interface User extends BaseUser {
|
|
56
|
+
/** User's auto generated id */
|
|
24
57
|
idInt: number;
|
|
25
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* The possible values for the user's type.
|
|
61
|
+
*
|
|
62
|
+
* @typedef UserType
|
|
63
|
+
* @since 0.5.14
|
|
64
|
+
*/
|
|
26
65
|
export declare type UserType = "NORMAL" | "DEPENDENT";
|
|
66
|
+
/**
|
|
67
|
+
* Representation of a phone.
|
|
68
|
+
*
|
|
69
|
+
* @interface UserCountry
|
|
70
|
+
* @since 0.5.14
|
|
71
|
+
*/
|
|
27
72
|
export interface UserCountry {
|
|
73
|
+
/** User's country id */
|
|
28
74
|
id: number;
|
|
29
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Representation of the user's additional info,
|
|
78
|
+
* commonly used to save user's images urls.
|
|
79
|
+
*
|
|
80
|
+
* @interface AdditionalInfo
|
|
81
|
+
* @since 0.5.14
|
|
82
|
+
* @property {any} `[key: string]` Property with key value pairs
|
|
83
|
+
*/
|
|
30
84
|
export interface AdditionalInfo {
|
|
31
85
|
[key: string]: any;
|
|
32
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Representation of a phone.
|
|
89
|
+
*
|
|
90
|
+
* @interface Phone
|
|
91
|
+
* @since 0.5.14
|
|
92
|
+
*/
|
|
33
93
|
export interface Phone {
|
|
94
|
+
/** User's phone number */
|
|
34
95
|
number: string;
|
|
96
|
+
/** User's country calling code, e.g.: +593 */
|
|
35
97
|
countryCode: string;
|
|
98
|
+
/** User's country ISO code, e.g.: EC */
|
|
36
99
|
countryIsoCode: string;
|
|
37
100
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
101
|
+
/**
|
|
102
|
+
* The possible values for the user's marital status.
|
|
103
|
+
*
|
|
104
|
+
* @typedef MaritalStatus
|
|
105
|
+
* @since 0.5.14
|
|
106
|
+
*/
|
|
107
|
+
export declare type MaritalStatus = "MARRIED" | "DIVORCED" | "SINGLE";
|
|
108
|
+
/**
|
|
109
|
+
* The possible values for the user's gender.
|
|
110
|
+
*
|
|
111
|
+
* @typedef Gender
|
|
112
|
+
* @since 0.5.14
|
|
113
|
+
*/
|
|
114
|
+
export declare type Gender = "MALE" | "FEMALE";
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// User types and interfaces
|
|
2
3
|
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
4
|
//# sourceMappingURL=user.types.js.map
|
|
@@ -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":";AAAA,4BAA4B"}
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
import { Image } from "./image.types";
|
|
2
|
+
/**
|
|
3
|
+
* Representation of a Commerce Vendor.
|
|
4
|
+
*
|
|
5
|
+
* @interface Vendor
|
|
6
|
+
* @since 0.5.14
|
|
7
|
+
*/
|
|
2
8
|
export interface Vendor {
|
|
9
|
+
/** Artisan's vendor unique identifier */
|
|
3
10
|
id: number;
|
|
11
|
+
/** Vendor's images, see {@link Image} */
|
|
4
12
|
images: Image[];
|
|
13
|
+
/** Vendor's name */
|
|
5
14
|
name: string;
|
|
15
|
+
/** Vendor's maximum purchase value */
|
|
6
16
|
maxPurchaseValue: number;
|
|
17
|
+
/** Vendor's description */
|
|
18
|
+
description: string;
|
|
19
|
+
/** Whether or not the vendor is sponsored */
|
|
20
|
+
sponsored: boolean;
|
|
21
|
+
/** Whether or not the vendor is active */
|
|
22
|
+
active: boolean;
|
|
7
23
|
}
|
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.13.0
|
|
4
|
+
"version": "0.13.0",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"prettier": "^2.1.2",
|
|
43
43
|
"webpack-bundle-analyzer": "^3.9.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "67d5892dc7a40d6ba5f1c7bbbdf6423d97899ac3"
|
|
46
46
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"channel.types.js","sourceRoot":"","sources":["../../src/types/channel.types.ts"],"names":[],"mappings":";AAAA,+BAA+B"}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { ArtisanDBCollectionReference } from "./artisanDB.types";
|
|
2
|
-
import { ArtisanDBQueryDocumentSnapshot } from "./artisanDB.types";
|
|
3
|
-
import { ArtisanDBDocumentData } from "./artisanDB.types";
|
|
4
|
-
import { Image } from "./image.types";
|
|
5
|
-
/**
|
|
6
|
-
* Walllet user information.
|
|
7
|
-
*
|
|
8
|
-
* @interface Wallet
|
|
9
|
-
* @since 0.5.14
|
|
10
|
-
* @property {Benefit[]} benefits Benefit's array from firestore user wallet
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
export interface Wallet {
|
|
14
|
-
benefits: Benefit[];
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Benefit information.
|
|
18
|
-
*
|
|
19
|
-
* @interface Benefit
|
|
20
|
-
* @since 0.5.14
|
|
21
|
-
* @property {string} hash The user wallet id
|
|
22
|
-
* @property {Award} award The benefit awards
|
|
23
|
-
* @property {number} benefitId Benefit id
|
|
24
|
-
* @property {number} benefitWalletId Benefit wallet id
|
|
25
|
-
* @property {null} code Benefit code in back-end
|
|
26
|
-
* @property {string} combined Combined
|
|
27
|
-
* @property {string} createdAt Benefit creation date
|
|
28
|
-
* @property {string} description Benefit description
|
|
29
|
-
* @property {number} discountPercentage Benefit discount percentage
|
|
30
|
-
* @property {string} expirationDate Benefit expiration date
|
|
31
|
-
* @property {null} externalId External benefit id
|
|
32
|
-
* @property {Image[]} image Benefit images
|
|
33
|
-
* @property {null} limitAward The award limit
|
|
34
|
-
* @property {number} limitBenefit The benefit limit
|
|
35
|
-
* @property {string} logicOperator The logic operator of the benefit
|
|
36
|
-
* @property {number} quantity Benefit stock
|
|
37
|
-
* @property {any[]} rules The rules of the benefit
|
|
38
|
-
* @property {string} title The benefit title
|
|
39
|
-
* @property {BenefitTypes} type Benefit type
|
|
40
|
-
* @property {string} updatedAt Benefit update date
|
|
41
|
-
*
|
|
42
|
-
*/
|
|
43
|
-
export interface Benefit {
|
|
44
|
-
hash: string;
|
|
45
|
-
award: Award;
|
|
46
|
-
benefitId: number;
|
|
47
|
-
benefitWalletId: number;
|
|
48
|
-
code: null;
|
|
49
|
-
combined: string;
|
|
50
|
-
createdAt: string;
|
|
51
|
-
description: string;
|
|
52
|
-
discountPercentage: number;
|
|
53
|
-
expirationDate: string;
|
|
54
|
-
externalId: null;
|
|
55
|
-
image: Image[];
|
|
56
|
-
limitAward: null;
|
|
57
|
-
limitBenefit: number;
|
|
58
|
-
logicOperator: string;
|
|
59
|
-
quantity: number;
|
|
60
|
-
rules: any[];
|
|
61
|
-
title: string;
|
|
62
|
-
type: BenefitTypes;
|
|
63
|
-
updatedAt: string;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Award information.
|
|
67
|
-
*
|
|
68
|
-
* @interface Award
|
|
69
|
-
* @since 0.5.14
|
|
70
|
-
* @property {number} id The id of the award
|
|
71
|
-
* @property {number} benefitId The id of the benefit
|
|
72
|
-
* @property {number} discountPercentage Benefit discount percentage
|
|
73
|
-
* @property {null} discountValue Benefit discount value
|
|
74
|
-
*
|
|
75
|
-
*/
|
|
76
|
-
export interface Award {
|
|
77
|
-
id: number;
|
|
78
|
-
benefitId: number;
|
|
79
|
-
discountPercentage: number;
|
|
80
|
-
discountValue: null;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Applied benefit array in shopping cart
|
|
84
|
-
*
|
|
85
|
-
* @type ShoppingCartBenefits
|
|
86
|
-
**/
|
|
87
|
-
export declare type ShoppingCartBenefits = Benefit[];
|
|
88
|
-
export declare type BenefitsByUserNode = ArtisanDBQueryDocumentSnapshot<ArtisanDBDocumentData>;
|
|
89
|
-
export declare type BenefitsByUserNodes = ArtisanDBCollectionReference<ArtisanDBDocumentData>;
|
|
90
|
-
export declare type BenefitTypes = "ALTER_DELIVERY" | "PRODUCT" | "DISCOUNT";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coupons.types.js","sourceRoot":"","sources":["../../src/types/coupons.types.ts"],"names":[],"mappings":""}
|