@artisan-commerce/types 0.10.3 → 0.10.4
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/README.md +93 -93
- package/build/index.d.ts +14 -14
- package/build/index.js +27 -27
- package/build/types/{app.types.d.ts → App.types.d.ts} +35 -35
- package/build/types/{app.types.js → App.types.js} +2 -2
- package/build/types/{app.types.js.map → App.types.js.map} +0 -0
- package/build/types/account.types.d.ts +4 -4
- package/build/types/account.types.js +3 -3
- package/build/types/artisanDB.types.d.ts +5 -5
- package/build/types/artisanDB.types.js +2 -2
- package/build/types/category.types.d.ts +9 -9
- package/build/types/category.types.js +2 -2
- package/build/types/channel.types.d.ts +5 -5
- package/build/types/channel.types.js +3 -3
- package/build/types/common.types.d.ts +3 -3
- package/build/types/common.types.js +3 -3
- package/build/types/coupons.types.d.ts +42 -42
- package/build/types/coupons.types.js +2 -2
- package/build/types/http.types.d.ts +17 -17
- package/build/types/http.types.js +3 -3
- package/build/types/image.types.d.ts +14 -14
- package/build/types/image.types.js +3 -3
- package/build/types/product.types.d.ts +122 -122
- package/build/types/product.types.js +34 -34
- package/build/types/shippingCost.types.d.ts +23 -23
- package/build/types/shippingCost.types.js +3 -3
- package/build/types/shoppingCart.types.d.ts +49 -49
- package/build/types/shoppingCart.types.js +2 -2
- package/build/types/store.types.d.ts +69 -69
- package/build/types/store.types.js +23 -23
- package/build/types/vendor.types.d.ts +7 -7
- package/build/types/vendor.types.js +2 -2
- package/build/vendors.d.ts +1 -1
- package/build/vendors.js +3 -3
- package/package.json +2 -2
|
@@ -1,122 +1,122 @@
|
|
|
1
|
-
import { Image } from "./image.types";
|
|
2
|
-
import { Alert } from "./shoppingCart.types";
|
|
3
|
-
export declare type Product = BaseProduct | ProductDetails | CartProduct;
|
|
4
|
-
export interface BaseProduct {
|
|
5
|
-
productId: string;
|
|
6
|
-
name: string;
|
|
7
|
-
description: string;
|
|
8
|
-
type: ProductType;
|
|
9
|
-
coverUrl: string;
|
|
10
|
-
prices: {
|
|
11
|
-
NORMAL: PriceCategory;
|
|
12
|
-
POINTS: PriceCategory;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
outOfService: boolean;
|
|
16
|
-
outOfStock: boolean;
|
|
17
|
-
stock: number;
|
|
18
|
-
measure: string;
|
|
19
|
-
attributes: ProductAttributes;
|
|
20
|
-
suggestedPrice: string;
|
|
21
|
-
available: boolean;
|
|
22
|
-
images: Image[];
|
|
23
|
-
standardTime: string;
|
|
24
|
-
sponsored: boolean;
|
|
25
|
-
status: "ACTIVE" | "INACTIVE";
|
|
26
|
-
}
|
|
27
|
-
export interface PriceCategory {
|
|
28
|
-
category: PriceCategoryType;
|
|
29
|
-
grossPrice: number;
|
|
30
|
-
netPrice: number;
|
|
31
|
-
symbol: string;
|
|
32
|
-
taxes: PriceCategoryTax[];
|
|
33
|
-
discounts: any[];
|
|
34
|
-
discountGrossPrice: number;
|
|
35
|
-
discountNetPrice: number;
|
|
36
|
-
discount: number;
|
|
37
|
-
}
|
|
38
|
-
export interface PriceCategoryTax {
|
|
39
|
-
percentage: number;
|
|
40
|
-
name: TaxType;
|
|
41
|
-
vatRateCode: number;
|
|
42
|
-
code: number;
|
|
43
|
-
vatRate: string;
|
|
44
|
-
}
|
|
45
|
-
export interface ProductAttributes {
|
|
46
|
-
Cantidad: string;
|
|
47
|
-
externalId: string;
|
|
48
|
-
showInMenu: boolean;
|
|
49
|
-
}
|
|
50
|
-
export declare enum ProductType {
|
|
51
|
-
PRODUCT = "PRODUCT",
|
|
52
|
-
MODIFIER = "MODIFIER"
|
|
53
|
-
}
|
|
54
|
-
export declare enum PriceCategoryType {
|
|
55
|
-
NORMAL = "NORMAL",
|
|
56
|
-
POINTS = "POINTS"
|
|
57
|
-
}
|
|
58
|
-
export declare enum TaxType {
|
|
59
|
-
IVA = "IVA"
|
|
60
|
-
}
|
|
61
|
-
export interface DayOfWeek {
|
|
62
|
-
day: DayOfWeekName;
|
|
63
|
-
from: number;
|
|
64
|
-
to: number;
|
|
65
|
-
}
|
|
66
|
-
export declare enum DayOfWeekName {
|
|
67
|
-
MONDAY = "MONDAY",
|
|
68
|
-
TUESDAY = "TUESDAY",
|
|
69
|
-
WEDNESDAY = "WEDNESDAY",
|
|
70
|
-
THURSDAY = "THURSDAY",
|
|
71
|
-
FRIDAY = "FRIDAY",
|
|
72
|
-
SATURDAY = "SATURDAY",
|
|
73
|
-
SUNDAY = "SUNDAY"
|
|
74
|
-
}
|
|
75
|
-
export interface ProductQuestion {
|
|
76
|
-
questionId: string;
|
|
77
|
-
name: string;
|
|
78
|
-
description: string | null;
|
|
79
|
-
min: number;
|
|
80
|
-
max: number;
|
|
81
|
-
type: QuestionTypes | null;
|
|
82
|
-
answers: ProductAnswer[];
|
|
83
|
-
images: Image[] | undefined;
|
|
84
|
-
}
|
|
85
|
-
export declare enum QuestionTypes {
|
|
86
|
-
BOOLEAN = "BOOLEAN",
|
|
87
|
-
RADIO = "RADIO",
|
|
88
|
-
CHECKBOX = "CHECKBOX",
|
|
89
|
-
COUNTER = "COUNTER"
|
|
90
|
-
}
|
|
91
|
-
declare type CommonProductAndAnswersProps = "name" | "prices" | "attributes" | "productId" | "type" | "images";
|
|
92
|
-
export interface ProductDetails extends BaseProduct {
|
|
93
|
-
isPriceVip: boolean;
|
|
94
|
-
manufacturer: string[];
|
|
95
|
-
maxAmountForSale: number;
|
|
96
|
-
schedule: DayOfWeek[];
|
|
97
|
-
questions: ProductQuestion[];
|
|
98
|
-
}
|
|
99
|
-
export interface ProductAnswer extends Pick<Product, CommonProductAndAnswersProps> {
|
|
100
|
-
questions: ProductDetails["questions"];
|
|
101
|
-
}
|
|
102
|
-
export interface CartProductQuestion extends ProductQuestion {
|
|
103
|
-
answers: CartProductAnswer[];
|
|
104
|
-
}
|
|
105
|
-
export interface CartProductAnswer extends ProductAnswer {
|
|
106
|
-
questionId: string;
|
|
107
|
-
amount: number;
|
|
108
|
-
priceCategory: PriceCategoryType;
|
|
109
|
-
comment: string;
|
|
110
|
-
questionsAndAnswers: CartProductQuestion[];
|
|
111
|
-
}
|
|
112
|
-
export interface CartProduct extends ProductDetails {
|
|
113
|
-
amount: number;
|
|
114
|
-
priceCategory: PriceCategoryType;
|
|
115
|
-
comment: string;
|
|
116
|
-
questionsAndAnswers: CartProductQuestion[];
|
|
117
|
-
hash: string;
|
|
118
|
-
createdAt: string;
|
|
119
|
-
updatedAt: string;
|
|
120
|
-
alerts: Alert[];
|
|
121
|
-
}
|
|
122
|
-
export {};
|
|
1
|
+
import { Image } from "./image.types";
|
|
2
|
+
import { Alert } from "./shoppingCart.types";
|
|
3
|
+
export declare type Product = BaseProduct | ProductDetails | CartProduct;
|
|
4
|
+
export interface BaseProduct {
|
|
5
|
+
productId: string;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
type: ProductType;
|
|
9
|
+
coverUrl: string;
|
|
10
|
+
prices: {
|
|
11
|
+
NORMAL: PriceCategory;
|
|
12
|
+
POINTS: PriceCategory;
|
|
13
|
+
};
|
|
14
|
+
addDirectlyToCart: boolean;
|
|
15
|
+
outOfService: boolean;
|
|
16
|
+
outOfStock: boolean;
|
|
17
|
+
stock: number;
|
|
18
|
+
measure: string;
|
|
19
|
+
attributes: ProductAttributes;
|
|
20
|
+
suggestedPrice: string;
|
|
21
|
+
available: boolean;
|
|
22
|
+
images: Image[];
|
|
23
|
+
standardTime: string;
|
|
24
|
+
sponsored: boolean;
|
|
25
|
+
status: "ACTIVE" | "INACTIVE";
|
|
26
|
+
}
|
|
27
|
+
export interface PriceCategory {
|
|
28
|
+
category: PriceCategoryType;
|
|
29
|
+
grossPrice: number;
|
|
30
|
+
netPrice: number;
|
|
31
|
+
symbol: string;
|
|
32
|
+
taxes: PriceCategoryTax[];
|
|
33
|
+
discounts: any[];
|
|
34
|
+
discountGrossPrice: number;
|
|
35
|
+
discountNetPrice: number;
|
|
36
|
+
discount: number;
|
|
37
|
+
}
|
|
38
|
+
export interface PriceCategoryTax {
|
|
39
|
+
percentage: number;
|
|
40
|
+
name: TaxType;
|
|
41
|
+
vatRateCode: number;
|
|
42
|
+
code: number;
|
|
43
|
+
vatRate: string;
|
|
44
|
+
}
|
|
45
|
+
export interface ProductAttributes {
|
|
46
|
+
Cantidad: string;
|
|
47
|
+
externalId: string;
|
|
48
|
+
showInMenu: boolean;
|
|
49
|
+
}
|
|
50
|
+
export declare enum ProductType {
|
|
51
|
+
PRODUCT = "PRODUCT",
|
|
52
|
+
MODIFIER = "MODIFIER"
|
|
53
|
+
}
|
|
54
|
+
export declare enum PriceCategoryType {
|
|
55
|
+
NORMAL = "NORMAL",
|
|
56
|
+
POINTS = "POINTS"
|
|
57
|
+
}
|
|
58
|
+
export declare enum TaxType {
|
|
59
|
+
IVA = "IVA"
|
|
60
|
+
}
|
|
61
|
+
export interface DayOfWeek {
|
|
62
|
+
day: DayOfWeekName;
|
|
63
|
+
from: number;
|
|
64
|
+
to: number;
|
|
65
|
+
}
|
|
66
|
+
export declare enum DayOfWeekName {
|
|
67
|
+
MONDAY = "MONDAY",
|
|
68
|
+
TUESDAY = "TUESDAY",
|
|
69
|
+
WEDNESDAY = "WEDNESDAY",
|
|
70
|
+
THURSDAY = "THURSDAY",
|
|
71
|
+
FRIDAY = "FRIDAY",
|
|
72
|
+
SATURDAY = "SATURDAY",
|
|
73
|
+
SUNDAY = "SUNDAY"
|
|
74
|
+
}
|
|
75
|
+
export interface ProductQuestion {
|
|
76
|
+
questionId: string;
|
|
77
|
+
name: string;
|
|
78
|
+
description: string | null;
|
|
79
|
+
min: number;
|
|
80
|
+
max: number;
|
|
81
|
+
type: QuestionTypes | null;
|
|
82
|
+
answers: ProductAnswer[];
|
|
83
|
+
images: Image[] | undefined;
|
|
84
|
+
}
|
|
85
|
+
export declare enum QuestionTypes {
|
|
86
|
+
BOOLEAN = "BOOLEAN",
|
|
87
|
+
RADIO = "RADIO",
|
|
88
|
+
CHECKBOX = "CHECKBOX",
|
|
89
|
+
COUNTER = "COUNTER"
|
|
90
|
+
}
|
|
91
|
+
declare type CommonProductAndAnswersProps = "name" | "prices" | "attributes" | "productId" | "type" | "images";
|
|
92
|
+
export interface ProductDetails extends BaseProduct {
|
|
93
|
+
isPriceVip: boolean;
|
|
94
|
+
manufacturer: string[];
|
|
95
|
+
maxAmountForSale: number;
|
|
96
|
+
schedule: DayOfWeek[];
|
|
97
|
+
questions: ProductQuestion[];
|
|
98
|
+
}
|
|
99
|
+
export interface ProductAnswer extends Pick<Product, CommonProductAndAnswersProps> {
|
|
100
|
+
questions: ProductDetails["questions"];
|
|
101
|
+
}
|
|
102
|
+
export interface CartProductQuestion extends ProductQuestion {
|
|
103
|
+
answers: CartProductAnswer[];
|
|
104
|
+
}
|
|
105
|
+
export interface CartProductAnswer extends ProductAnswer {
|
|
106
|
+
questionId: string;
|
|
107
|
+
amount: number;
|
|
108
|
+
priceCategory: PriceCategoryType;
|
|
109
|
+
comment: string;
|
|
110
|
+
questionsAndAnswers: CartProductQuestion[];
|
|
111
|
+
}
|
|
112
|
+
export interface CartProduct extends ProductDetails {
|
|
113
|
+
amount: number;
|
|
114
|
+
priceCategory: PriceCategoryType;
|
|
115
|
+
comment: string;
|
|
116
|
+
questionsAndAnswers: CartProductQuestion[];
|
|
117
|
+
hash: string;
|
|
118
|
+
createdAt: string;
|
|
119
|
+
updatedAt: string;
|
|
120
|
+
alerts: Alert[];
|
|
121
|
+
}
|
|
122
|
+
export {};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QuestionTypes = exports.DayOfWeekName = exports.TaxType = exports.PriceCategoryType = exports.ProductType = void 0;
|
|
4
|
-
var ProductType;
|
|
5
|
-
(function (ProductType) {
|
|
6
|
-
ProductType["PRODUCT"] = "PRODUCT";
|
|
7
|
-
ProductType["MODIFIER"] = "MODIFIER";
|
|
8
|
-
})(ProductType = exports.ProductType || (exports.ProductType = {}));
|
|
9
|
-
var PriceCategoryType;
|
|
10
|
-
(function (PriceCategoryType) {
|
|
11
|
-
PriceCategoryType["NORMAL"] = "NORMAL";
|
|
12
|
-
PriceCategoryType["POINTS"] = "POINTS";
|
|
13
|
-
})(PriceCategoryType = exports.PriceCategoryType || (exports.PriceCategoryType = {}));
|
|
14
|
-
var TaxType;
|
|
15
|
-
(function (TaxType) {
|
|
16
|
-
TaxType["IVA"] = "IVA";
|
|
17
|
-
})(TaxType = exports.TaxType || (exports.TaxType = {}));
|
|
18
|
-
var DayOfWeekName;
|
|
19
|
-
(function (DayOfWeekName) {
|
|
20
|
-
DayOfWeekName["MONDAY"] = "MONDAY";
|
|
21
|
-
DayOfWeekName["TUESDAY"] = "TUESDAY";
|
|
22
|
-
DayOfWeekName["WEDNESDAY"] = "WEDNESDAY";
|
|
23
|
-
DayOfWeekName["THURSDAY"] = "THURSDAY";
|
|
24
|
-
DayOfWeekName["FRIDAY"] = "FRIDAY";
|
|
25
|
-
DayOfWeekName["SATURDAY"] = "SATURDAY";
|
|
26
|
-
DayOfWeekName["SUNDAY"] = "SUNDAY";
|
|
27
|
-
})(DayOfWeekName = exports.DayOfWeekName || (exports.DayOfWeekName = {}));
|
|
28
|
-
var QuestionTypes;
|
|
29
|
-
(function (QuestionTypes) {
|
|
30
|
-
QuestionTypes["BOOLEAN"] = "BOOLEAN";
|
|
31
|
-
QuestionTypes["RADIO"] = "RADIO";
|
|
32
|
-
QuestionTypes["CHECKBOX"] = "CHECKBOX";
|
|
33
|
-
QuestionTypes["COUNTER"] = "COUNTER";
|
|
34
|
-
})(QuestionTypes = exports.QuestionTypes || (exports.QuestionTypes = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuestionTypes = exports.DayOfWeekName = exports.TaxType = exports.PriceCategoryType = exports.ProductType = void 0;
|
|
4
|
+
var ProductType;
|
|
5
|
+
(function (ProductType) {
|
|
6
|
+
ProductType["PRODUCT"] = "PRODUCT";
|
|
7
|
+
ProductType["MODIFIER"] = "MODIFIER";
|
|
8
|
+
})(ProductType = exports.ProductType || (exports.ProductType = {}));
|
|
9
|
+
var PriceCategoryType;
|
|
10
|
+
(function (PriceCategoryType) {
|
|
11
|
+
PriceCategoryType["NORMAL"] = "NORMAL";
|
|
12
|
+
PriceCategoryType["POINTS"] = "POINTS";
|
|
13
|
+
})(PriceCategoryType = exports.PriceCategoryType || (exports.PriceCategoryType = {}));
|
|
14
|
+
var TaxType;
|
|
15
|
+
(function (TaxType) {
|
|
16
|
+
TaxType["IVA"] = "IVA";
|
|
17
|
+
})(TaxType = exports.TaxType || (exports.TaxType = {}));
|
|
18
|
+
var DayOfWeekName;
|
|
19
|
+
(function (DayOfWeekName) {
|
|
20
|
+
DayOfWeekName["MONDAY"] = "MONDAY";
|
|
21
|
+
DayOfWeekName["TUESDAY"] = "TUESDAY";
|
|
22
|
+
DayOfWeekName["WEDNESDAY"] = "WEDNESDAY";
|
|
23
|
+
DayOfWeekName["THURSDAY"] = "THURSDAY";
|
|
24
|
+
DayOfWeekName["FRIDAY"] = "FRIDAY";
|
|
25
|
+
DayOfWeekName["SATURDAY"] = "SATURDAY";
|
|
26
|
+
DayOfWeekName["SUNDAY"] = "SUNDAY";
|
|
27
|
+
})(DayOfWeekName = exports.DayOfWeekName || (exports.DayOfWeekName = {}));
|
|
28
|
+
var QuestionTypes;
|
|
29
|
+
(function (QuestionTypes) {
|
|
30
|
+
QuestionTypes["BOOLEAN"] = "BOOLEAN";
|
|
31
|
+
QuestionTypes["RADIO"] = "RADIO";
|
|
32
|
+
QuestionTypes["CHECKBOX"] = "CHECKBOX";
|
|
33
|
+
QuestionTypes["COUNTER"] = "COUNTER";
|
|
34
|
+
})(QuestionTypes = exports.QuestionTypes || (exports.QuestionTypes = {}));
|
|
35
35
|
//# sourceMappingURL=product.types.js.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
export interface ShippingCost {
|
|
2
|
-
productId: number;
|
|
3
|
-
name: string;
|
|
4
|
-
amount: number;
|
|
5
|
-
symbol: string;
|
|
6
|
-
taxes: ShippingCostTax[];
|
|
7
|
-
grossPrice: number;
|
|
8
|
-
netPrice: number;
|
|
9
|
-
subtotalBeforeTaxes: number;
|
|
10
|
-
taxTotal: number;
|
|
11
|
-
discounts: any[];
|
|
12
|
-
discountTotal: number;
|
|
13
|
-
total: number;
|
|
14
|
-
}
|
|
15
|
-
export interface ShippingCostTax {
|
|
16
|
-
percentage: number;
|
|
17
|
-
name: string;
|
|
18
|
-
vatRateCode: number;
|
|
19
|
-
code: number;
|
|
20
|
-
vatRate: string;
|
|
21
|
-
taxBase: number;
|
|
22
|
-
value: string;
|
|
23
|
-
}
|
|
1
|
+
export interface ShippingCost {
|
|
2
|
+
productId: number;
|
|
3
|
+
name: string;
|
|
4
|
+
amount: number;
|
|
5
|
+
symbol: string;
|
|
6
|
+
taxes: ShippingCostTax[];
|
|
7
|
+
grossPrice: number;
|
|
8
|
+
netPrice: number;
|
|
9
|
+
subtotalBeforeTaxes: number;
|
|
10
|
+
taxTotal: number;
|
|
11
|
+
discounts: any[];
|
|
12
|
+
discountTotal: number;
|
|
13
|
+
total: number;
|
|
14
|
+
}
|
|
15
|
+
export interface ShippingCostTax {
|
|
16
|
+
percentage: number;
|
|
17
|
+
name: string;
|
|
18
|
+
vatRateCode: number;
|
|
19
|
+
code: number;
|
|
20
|
+
vatRate: string;
|
|
21
|
+
taxBase: number;
|
|
22
|
+
value: string;
|
|
23
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// ShippingCost types and interfaces
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
// ShippingCost types and interfaces
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
//# sourceMappingURL=shippingCost.types.js.map
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { CartProduct } from "./product.types";
|
|
2
|
-
import { PriceCategoryType } from "./product.types";
|
|
3
|
-
import { Objectify } from "./common.types";
|
|
4
|
-
import { Store } from "./store.types";
|
|
5
|
-
import { ShippingCost } from "./shippingCost.types";
|
|
6
|
-
import { ShoppingCartBenefits } from "./coupons.types";
|
|
7
|
-
import { ArtisanDBCollectionReference } from "./artisanDB.types";
|
|
8
|
-
import { ArtisanDBQueryDocumentSnapshot } from "./artisanDB.types";
|
|
9
|
-
import { ArtisanDBDocumentData } from "./artisanDB.types";
|
|
10
|
-
export interface ShoppingCart {
|
|
11
|
-
id: string;
|
|
12
|
-
name: string;
|
|
13
|
-
latitude: number;
|
|
14
|
-
longitude: number;
|
|
15
|
-
priceCategory?: PriceCategoryType;
|
|
16
|
-
createdAt: string;
|
|
17
|
-
updatedAt: string;
|
|
18
|
-
channelId: number;
|
|
19
|
-
stores: Objectify<CartStore>;
|
|
20
|
-
shippingCost?: ShippingCost;
|
|
21
|
-
additional_info?: Record<string, any>;
|
|
22
|
-
billTotal: BillTotal;
|
|
23
|
-
benefits?: ShoppingCartBenefits;
|
|
24
|
-
benefitHash?: string;
|
|
25
|
-
}
|
|
26
|
-
export interface Alert {
|
|
27
|
-
errorLevel: number;
|
|
28
|
-
message: string;
|
|
29
|
-
type: string;
|
|
30
|
-
}
|
|
31
|
-
export interface CartStore extends Store {
|
|
32
|
-
products: Objectify<CartProduct>;
|
|
33
|
-
alerts: [];
|
|
34
|
-
}
|
|
35
|
-
export declare type BillTotal = {
|
|
36
|
-
NORMAL?: BillTotalCategory;
|
|
37
|
-
POINTS?: BillTotalCategory;
|
|
38
|
-
};
|
|
39
|
-
export interface BillTotalCategory {
|
|
40
|
-
subtotalBeforeTaxes: number;
|
|
41
|
-
taxTotal: number;
|
|
42
|
-
total: number;
|
|
43
|
-
}
|
|
44
|
-
export interface CartTotals {
|
|
45
|
-
subtotal: number;
|
|
46
|
-
shippingCost: number;
|
|
47
|
-
}
|
|
48
|
-
export declare type ShoppingCartNode = ArtisanDBQueryDocumentSnapshot<ArtisanDBDocumentData>;
|
|
49
|
-
export declare type ShoppingCartNodes = ArtisanDBCollectionReference<ArtisanDBDocumentData>;
|
|
1
|
+
import { CartProduct } from "./product.types";
|
|
2
|
+
import { PriceCategoryType } from "./product.types";
|
|
3
|
+
import { Objectify } from "./common.types";
|
|
4
|
+
import { Store } from "./store.types";
|
|
5
|
+
import { ShippingCost } from "./shippingCost.types";
|
|
6
|
+
import { ShoppingCartBenefits } from "./coupons.types";
|
|
7
|
+
import { ArtisanDBCollectionReference } from "./artisanDB.types";
|
|
8
|
+
import { ArtisanDBQueryDocumentSnapshot } from "./artisanDB.types";
|
|
9
|
+
import { ArtisanDBDocumentData } from "./artisanDB.types";
|
|
10
|
+
export interface ShoppingCart {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
latitude: number;
|
|
14
|
+
longitude: number;
|
|
15
|
+
priceCategory?: PriceCategoryType;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
channelId: number;
|
|
19
|
+
stores: Objectify<CartStore>;
|
|
20
|
+
shippingCost?: ShippingCost;
|
|
21
|
+
additional_info?: Record<string, any>;
|
|
22
|
+
billTotal: BillTotal;
|
|
23
|
+
benefits?: ShoppingCartBenefits;
|
|
24
|
+
benefitHash?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface Alert {
|
|
27
|
+
errorLevel: number;
|
|
28
|
+
message: string;
|
|
29
|
+
type: string;
|
|
30
|
+
}
|
|
31
|
+
export interface CartStore extends Store {
|
|
32
|
+
products: Objectify<CartProduct>;
|
|
33
|
+
alerts: [];
|
|
34
|
+
}
|
|
35
|
+
export declare type BillTotal = {
|
|
36
|
+
NORMAL?: BillTotalCategory;
|
|
37
|
+
POINTS?: BillTotalCategory;
|
|
38
|
+
};
|
|
39
|
+
export interface BillTotalCategory {
|
|
40
|
+
subtotalBeforeTaxes: number;
|
|
41
|
+
taxTotal: number;
|
|
42
|
+
total: number;
|
|
43
|
+
}
|
|
44
|
+
export interface CartTotals {
|
|
45
|
+
subtotal: number;
|
|
46
|
+
shippingCost: number;
|
|
47
|
+
}
|
|
48
|
+
export declare type ShoppingCartNode = ArtisanDBQueryDocumentSnapshot<ArtisanDBDocumentData>;
|
|
49
|
+
export declare type ShoppingCartNodes = ArtisanDBCollectionReference<ArtisanDBDocumentData>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=shoppingCart.types.js.map
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import { Vendor } from "./vendor.types";
|
|
2
|
-
export interface Store {
|
|
3
|
-
storeId: number;
|
|
4
|
-
storeName: string;
|
|
5
|
-
address: string;
|
|
6
|
-
vendor: Vendor;
|
|
7
|
-
additionalInfo: AdditionalStoreInformation;
|
|
8
|
-
avatarUrl: string;
|
|
9
|
-
coverage: boolean;
|
|
10
|
-
coverUrl: string;
|
|
11
|
-
delivery: Delivery;
|
|
12
|
-
description: string | null;
|
|
13
|
-
isOpen: boolean;
|
|
14
|
-
maxOrderAmount: number;
|
|
15
|
-
minOrderAmount: number;
|
|
16
|
-
orderSymbol: string;
|
|
17
|
-
phone: string;
|
|
18
|
-
sponsored: boolean;
|
|
19
|
-
latitude: number;
|
|
20
|
-
longitude: number;
|
|
21
|
-
schedules: Schedule[];
|
|
22
|
-
timezone: string;
|
|
23
|
-
cookTime: number;
|
|
24
|
-
services: Service[];
|
|
25
|
-
totalItems: number;
|
|
26
|
-
totalPages: number;
|
|
27
|
-
page: number;
|
|
28
|
-
size: number;
|
|
29
|
-
}
|
|
30
|
-
export interface AdditionalStoreInformation {
|
|
31
|
-
externalId: string;
|
|
32
|
-
externalCode: string;
|
|
33
|
-
idDeliveryKfc: string;
|
|
34
|
-
isDrinksStore: boolean;
|
|
35
|
-
showDrinksStore: boolean;
|
|
36
|
-
}
|
|
37
|
-
export interface Delivery {
|
|
38
|
-
deliveryTimeUnit: DeliveryTimeUnit;
|
|
39
|
-
deliveryTimeValue: number;
|
|
40
|
-
express: boolean;
|
|
41
|
-
freeDelivery: boolean;
|
|
42
|
-
}
|
|
43
|
-
export interface Schedule {
|
|
44
|
-
day: Days;
|
|
45
|
-
from: number;
|
|
46
|
-
to: number;
|
|
47
|
-
}
|
|
48
|
-
export interface Service {
|
|
49
|
-
name: string;
|
|
50
|
-
status: ServiceStatus;
|
|
51
|
-
url: string;
|
|
52
|
-
}
|
|
53
|
-
export declare enum DeliveryTimeUnit {
|
|
54
|
-
MIN = "min"
|
|
55
|
-
}
|
|
56
|
-
export declare enum Days {
|
|
57
|
-
MONDAY = "MONDAY",
|
|
58
|
-
TUESDAY = "TUESDAY",
|
|
59
|
-
WEDNESDAY = "WEDNESDAY",
|
|
60
|
-
THURSDAY = "THURSDAY",
|
|
61
|
-
FRIDAY = "FRIDAY",
|
|
62
|
-
SATURDAY = "SATURDAY",
|
|
63
|
-
SUNDAY = "SUNDAY",
|
|
64
|
-
SPECIAL = "SPECIAL"
|
|
65
|
-
}
|
|
66
|
-
export declare enum ServiceStatus {
|
|
67
|
-
INACTIVE = "INACTIVE",
|
|
68
|
-
ACTIVE = "ACTIVE"
|
|
69
|
-
}
|
|
1
|
+
import { Vendor } from "./vendor.types";
|
|
2
|
+
export interface Store {
|
|
3
|
+
storeId: number;
|
|
4
|
+
storeName: string;
|
|
5
|
+
address: string;
|
|
6
|
+
vendor: Vendor;
|
|
7
|
+
additionalInfo: AdditionalStoreInformation;
|
|
8
|
+
avatarUrl: string;
|
|
9
|
+
coverage: boolean;
|
|
10
|
+
coverUrl: string;
|
|
11
|
+
delivery: Delivery;
|
|
12
|
+
description: string | null;
|
|
13
|
+
isOpen: boolean;
|
|
14
|
+
maxOrderAmount: number;
|
|
15
|
+
minOrderAmount: number;
|
|
16
|
+
orderSymbol: string;
|
|
17
|
+
phone: string;
|
|
18
|
+
sponsored: boolean;
|
|
19
|
+
latitude: number;
|
|
20
|
+
longitude: number;
|
|
21
|
+
schedules: Schedule[];
|
|
22
|
+
timezone: string;
|
|
23
|
+
cookTime: number;
|
|
24
|
+
services: Service[];
|
|
25
|
+
totalItems: number;
|
|
26
|
+
totalPages: number;
|
|
27
|
+
page: number;
|
|
28
|
+
size: number;
|
|
29
|
+
}
|
|
30
|
+
export interface AdditionalStoreInformation {
|
|
31
|
+
externalId: string;
|
|
32
|
+
externalCode: string;
|
|
33
|
+
idDeliveryKfc: string;
|
|
34
|
+
isDrinksStore: boolean;
|
|
35
|
+
showDrinksStore: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface Delivery {
|
|
38
|
+
deliveryTimeUnit: DeliveryTimeUnit;
|
|
39
|
+
deliveryTimeValue: number;
|
|
40
|
+
express: boolean;
|
|
41
|
+
freeDelivery: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface Schedule {
|
|
44
|
+
day: Days;
|
|
45
|
+
from: number;
|
|
46
|
+
to: number;
|
|
47
|
+
}
|
|
48
|
+
export interface Service {
|
|
49
|
+
name: string;
|
|
50
|
+
status: ServiceStatus;
|
|
51
|
+
url: string;
|
|
52
|
+
}
|
|
53
|
+
export declare enum DeliveryTimeUnit {
|
|
54
|
+
MIN = "min"
|
|
55
|
+
}
|
|
56
|
+
export declare enum Days {
|
|
57
|
+
MONDAY = "MONDAY",
|
|
58
|
+
TUESDAY = "TUESDAY",
|
|
59
|
+
WEDNESDAY = "WEDNESDAY",
|
|
60
|
+
THURSDAY = "THURSDAY",
|
|
61
|
+
FRIDAY = "FRIDAY",
|
|
62
|
+
SATURDAY = "SATURDAY",
|
|
63
|
+
SUNDAY = "SUNDAY",
|
|
64
|
+
SPECIAL = "SPECIAL"
|
|
65
|
+
}
|
|
66
|
+
export declare enum ServiceStatus {
|
|
67
|
+
INACTIVE = "INACTIVE",
|
|
68
|
+
ACTIVE = "ACTIVE"
|
|
69
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
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 = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
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
24
|
//# sourceMappingURL=store.types.js.map
|