@chopkola/common 1.0.187 → 1.0.190
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/build/types/cart.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CartItemTypeEnum, CartStatusEnum,
|
|
1
|
+
import { CartItemTypeEnum, CartStatusEnum, ScopeEnum } from "./enum/collection";
|
|
2
2
|
import { MoneyString, Timestamps, UUID, Nullable, DateString, TimeString } from "./global";
|
|
3
3
|
export interface CartSelectedModifierOption {
|
|
4
4
|
modifier_group_id: UUID;
|
|
@@ -56,7 +56,7 @@ export interface BaseCart<T extends CartItem> extends Timestamps {
|
|
|
56
56
|
id: UUID;
|
|
57
57
|
user_id: Nullable<UUID>;
|
|
58
58
|
session_id: string;
|
|
59
|
-
cart_type:
|
|
59
|
+
cart_type: ScopeEnum;
|
|
60
60
|
vendor_id: UUID;
|
|
61
61
|
status: CartStatusEnum;
|
|
62
62
|
expires_at: Date;
|
|
@@ -65,13 +65,13 @@ export interface BaseCart<T extends CartItem> extends Timestamps {
|
|
|
65
65
|
items: T[];
|
|
66
66
|
}
|
|
67
67
|
export interface RestaurantCart extends BaseCart<MealCartItem | ReservationCartItem> {
|
|
68
|
-
cart_type:
|
|
68
|
+
cart_type: ScopeEnum.RESTAURANT;
|
|
69
69
|
delivery_fee_estimate?: MoneyString;
|
|
70
70
|
tax_estimate?: MoneyString;
|
|
71
71
|
total_estimate?: MoneyString;
|
|
72
72
|
}
|
|
73
73
|
export interface GroceryCart extends BaseCart<ProductCartItem> {
|
|
74
|
-
cart_type:
|
|
74
|
+
cart_type: ScopeEnum.GROCERY;
|
|
75
75
|
bag_fee_estimate?: MoneyString;
|
|
76
76
|
delivery_fee_estimate?: MoneyString;
|
|
77
77
|
tax_estimate?: MoneyString;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UUID, Timestamps } from "./global";
|
|
2
|
-
import {
|
|
2
|
+
import { ScopeEnum, CategoryStatusEnum } from "./enum/collection";
|
|
3
3
|
export interface Category extends Timestamps {
|
|
4
4
|
id: UUID;
|
|
5
5
|
parent_id: UUID | null;
|
|
@@ -8,7 +8,7 @@ export interface Category extends Timestamps {
|
|
|
8
8
|
name: string;
|
|
9
9
|
slug: string;
|
|
10
10
|
description: string | null;
|
|
11
|
-
scope:
|
|
11
|
+
scope: ScopeEnum;
|
|
12
12
|
status: CategoryStatusEnum;
|
|
13
13
|
aliases: string[];
|
|
14
14
|
tags: string[];
|
|
@@ -15,10 +15,6 @@ export declare enum UserGenderEnum {
|
|
|
15
15
|
OTHERS = "other",
|
|
16
16
|
ANONYMOUS = "anonymous"
|
|
17
17
|
}
|
|
18
|
-
export declare enum VendorBusinessTypeEnum {
|
|
19
|
-
GROCERY = "grocery",
|
|
20
|
-
RESTAURANT = "restaurant"
|
|
21
|
-
}
|
|
22
18
|
export declare enum VendorStatusEnum {
|
|
23
19
|
PENDING_APPROVAL = "pending_approval",
|
|
24
20
|
NEEDS_REVISION = "needs_revision",
|
|
@@ -46,10 +42,6 @@ export declare enum VerificationPurposeEnum {
|
|
|
46
42
|
EMAIL_VERIFY = "email_verify",
|
|
47
43
|
PASSWORD_RESET = "password_reset"
|
|
48
44
|
}
|
|
49
|
-
export declare enum CategoryScopeEnum {
|
|
50
|
-
RESTAURANT = "restaurant",
|
|
51
|
-
GROCERY = "grocery"
|
|
52
|
-
}
|
|
53
45
|
export declare enum CategoryStatusEnum {
|
|
54
46
|
ACTIVE = "active",
|
|
55
47
|
ARCHIVED = "archived",
|
|
@@ -103,7 +95,7 @@ export declare enum ProductTypeEnum {
|
|
|
103
95
|
SIMPLE = "simple",
|
|
104
96
|
VARIANT = "variant"
|
|
105
97
|
}
|
|
106
|
-
export declare enum
|
|
98
|
+
export declare enum ScopeEnum {
|
|
107
99
|
RESTAURANT = "restaurant",
|
|
108
100
|
GROCERY = "grocery"
|
|
109
101
|
}
|
|
@@ -114,7 +106,7 @@ export declare enum CartItemTypeEnum {
|
|
|
114
106
|
}
|
|
115
107
|
export declare enum CartStatusEnum {
|
|
116
108
|
ACTIVE = "active",
|
|
117
|
-
CONVERTED = "converted"
|
|
109
|
+
CONVERTED = "converted",
|
|
118
110
|
ABANDONED = "abandoned",
|
|
119
111
|
USED = "used"
|
|
120
112
|
}
|
|
@@ -124,3 +116,11 @@ export declare enum VendorUserSummaryStatisticsIconEnum {
|
|
|
124
116
|
CLOCK = "clock",
|
|
125
117
|
BAN = "ban"
|
|
126
118
|
}
|
|
119
|
+
export declare enum ReservationStatusEnum {
|
|
120
|
+
PENDING = "pending",
|
|
121
|
+
CONFIRMED = "confirmed",
|
|
122
|
+
CANCELLED_BY_USER = "cancelled_by_user",
|
|
123
|
+
CANCELLED_BY_VENDOR = "cancelled_by_vendor",
|
|
124
|
+
NO_SHOW = "no_show",
|
|
125
|
+
COMPLETED = "completed"
|
|
126
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VendorUserSummaryStatisticsIconEnum = exports.CartStatusEnum = exports.CartItemTypeEnum = exports.
|
|
3
|
+
exports.ReservationStatusEnum = exports.VendorUserSummaryStatisticsIconEnum = exports.CartStatusEnum = exports.CartItemTypeEnum = exports.ScopeEnum = exports.ProductTypeEnum = exports.PromotionTypeEnum = exports.VendorProductsStatisticsIconEnum = exports.StockMovementReasonEnum = exports.StockStatusEnum = exports.RoleIconEnum = exports.CategoryStatusEnum = exports.VerificationPurposeEnum = exports.RoleRiskLevelEnum = exports.PermissionEnum = exports.DietryPreferencesEnum = exports.VendorStatusEnum = exports.UserGenderEnum = exports.UserAccountStatusEnum = exports.UserAccountTypeEnum = void 0;
|
|
4
4
|
var UserAccountTypeEnum;
|
|
5
5
|
(function (UserAccountTypeEnum) {
|
|
6
6
|
UserAccountTypeEnum["CUSTOMER"] = "customer";
|
|
@@ -21,11 +21,6 @@ var UserGenderEnum;
|
|
|
21
21
|
UserGenderEnum["OTHERS"] = "other";
|
|
22
22
|
UserGenderEnum["ANONYMOUS"] = "anonymous";
|
|
23
23
|
})(UserGenderEnum || (exports.UserGenderEnum = UserGenderEnum = {}));
|
|
24
|
-
var VendorBusinessTypeEnum;
|
|
25
|
-
(function (VendorBusinessTypeEnum) {
|
|
26
|
-
VendorBusinessTypeEnum["GROCERY"] = "grocery";
|
|
27
|
-
VendorBusinessTypeEnum["RESTAURANT"] = "restaurant";
|
|
28
|
-
})(VendorBusinessTypeEnum || (exports.VendorBusinessTypeEnum = VendorBusinessTypeEnum = {}));
|
|
29
24
|
var VendorStatusEnum;
|
|
30
25
|
(function (VendorStatusEnum) {
|
|
31
26
|
VendorStatusEnum["PENDING_APPROVAL"] = "pending_approval";
|
|
@@ -58,11 +53,6 @@ var VerificationPurposeEnum;
|
|
|
58
53
|
VerificationPurposeEnum["EMAIL_VERIFY"] = "email_verify";
|
|
59
54
|
VerificationPurposeEnum["PASSWORD_RESET"] = "password_reset";
|
|
60
55
|
})(VerificationPurposeEnum || (exports.VerificationPurposeEnum = VerificationPurposeEnum = {}));
|
|
61
|
-
var CategoryScopeEnum;
|
|
62
|
-
(function (CategoryScopeEnum) {
|
|
63
|
-
CategoryScopeEnum["RESTAURANT"] = "restaurant";
|
|
64
|
-
CategoryScopeEnum["GROCERY"] = "grocery";
|
|
65
|
-
})(CategoryScopeEnum || (exports.CategoryScopeEnum = CategoryScopeEnum = {}));
|
|
66
56
|
var CategoryStatusEnum;
|
|
67
57
|
(function (CategoryStatusEnum) {
|
|
68
58
|
CategoryStatusEnum["ACTIVE"] = "active";
|
|
@@ -123,11 +113,11 @@ var ProductTypeEnum;
|
|
|
123
113
|
ProductTypeEnum["SIMPLE"] = "simple";
|
|
124
114
|
ProductTypeEnum["VARIANT"] = "variant";
|
|
125
115
|
})(ProductTypeEnum || (exports.ProductTypeEnum = ProductTypeEnum = {}));
|
|
126
|
-
var
|
|
127
|
-
(function (
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
})(
|
|
116
|
+
var ScopeEnum;
|
|
117
|
+
(function (ScopeEnum) {
|
|
118
|
+
ScopeEnum["RESTAURANT"] = "restaurant";
|
|
119
|
+
ScopeEnum["GROCERY"] = "grocery";
|
|
120
|
+
})(ScopeEnum || (exports.ScopeEnum = ScopeEnum = {}));
|
|
131
121
|
var CartItemTypeEnum;
|
|
132
122
|
(function (CartItemTypeEnum) {
|
|
133
123
|
CartItemTypeEnum["MEAL"] = "meal";
|
|
@@ -148,3 +138,12 @@ var VendorUserSummaryStatisticsIconEnum;
|
|
|
148
138
|
VendorUserSummaryStatisticsIconEnum["CLOCK"] = "clock";
|
|
149
139
|
VendorUserSummaryStatisticsIconEnum["BAN"] = "ban";
|
|
150
140
|
})(VendorUserSummaryStatisticsIconEnum || (exports.VendorUserSummaryStatisticsIconEnum = VendorUserSummaryStatisticsIconEnum = {}));
|
|
141
|
+
var ReservationStatusEnum;
|
|
142
|
+
(function (ReservationStatusEnum) {
|
|
143
|
+
ReservationStatusEnum["PENDING"] = "pending";
|
|
144
|
+
ReservationStatusEnum["CONFIRMED"] = "confirmed";
|
|
145
|
+
ReservationStatusEnum["CANCELLED_BY_USER"] = "cancelled_by_user";
|
|
146
|
+
ReservationStatusEnum["CANCELLED_BY_VENDOR"] = "cancelled_by_vendor";
|
|
147
|
+
ReservationStatusEnum["NO_SHOW"] = "no_show";
|
|
148
|
+
ReservationStatusEnum["COMPLETED"] = "completed";
|
|
149
|
+
})(ReservationStatusEnum || (exports.ReservationStatusEnum = ReservationStatusEnum = {}));
|
package/build/types/vendor.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AddressI } from "./address";
|
|
2
|
-
import { PromotionTypeEnum,
|
|
2
|
+
import { PromotionTypeEnum, ScopeEnum, VendorStatusEnum } from "./enum/collection";
|
|
3
3
|
import { AddressPayloadType, UUID } from "./global";
|
|
4
4
|
import { MenuWithMeals } from "./menu_n_meal";
|
|
5
5
|
export type CuisineType = "African" | "Asian" | "Continental" | "Mediterranean" | "American";
|
|
@@ -19,7 +19,7 @@ export interface Vendor {
|
|
|
19
19
|
slug: string;
|
|
20
20
|
sku_prefix: string;
|
|
21
21
|
description: string | null;
|
|
22
|
-
business_type:
|
|
22
|
+
business_type: ScopeEnum;
|
|
23
23
|
business_status: VendorStatusEnum;
|
|
24
24
|
business_email: string;
|
|
25
25
|
business_phone: string;
|
|
@@ -90,11 +90,11 @@ export interface GroceryInfo {
|
|
|
90
90
|
updated_at: Date;
|
|
91
91
|
}
|
|
92
92
|
export interface RestaurantVendorAggregate extends Vendor {
|
|
93
|
-
business_type:
|
|
93
|
+
business_type: ScopeEnum.RESTAURANT;
|
|
94
94
|
restaurant_info: RestaurantInfo;
|
|
95
95
|
}
|
|
96
96
|
export interface GroceryVendorAggregate extends Vendor {
|
|
97
|
-
business_type:
|
|
97
|
+
business_type: ScopeEnum.GROCERY;
|
|
98
98
|
grocery_info: GroceryInfo;
|
|
99
99
|
}
|
|
100
100
|
export type VendorAggregate = RestaurantVendorAggregate | GroceryVendorAggregate;
|