shopoflex-types 1.0.90 → 1.0.92
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/dist/common.d.ts +1 -41
- package/dist/productCart.d.ts +47 -3
- package/package.json +1 -1
package/dist/common.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import mongoose from 'mongoose';
|
|
2
|
-
import {
|
|
2
|
+
import { Category, GroupedCategory, ProductType } from 'shopoflex-types';
|
|
3
3
|
export interface Discount {
|
|
4
4
|
_id?: mongoose.Types.ObjectId;
|
|
5
5
|
code?: string;
|
|
@@ -82,46 +82,6 @@ export interface CashTransactionType {
|
|
|
82
82
|
type: 'opening' | 'sale' | 'refund' | 'owner_draw' | 'transfer' | 'expense' | 'variance';
|
|
83
83
|
}
|
|
84
84
|
export type CashTransactionTypeValue = CashTransactionType['type'];
|
|
85
|
-
export interface OrderType {
|
|
86
|
-
_id?: string | any;
|
|
87
|
-
orderType: PickType;
|
|
88
|
-
source: 'pos' | 'online';
|
|
89
|
-
tableNumber?: number;
|
|
90
|
-
customer?: Customer;
|
|
91
|
-
vendorId?: string;
|
|
92
|
-
cart?: Cart;
|
|
93
|
-
paymentMethod?: PaymentMethodType;
|
|
94
|
-
address?: Address;
|
|
95
|
-
status?: OrderStatusType;
|
|
96
|
-
paid?: boolean;
|
|
97
|
-
shipping: Shipping;
|
|
98
|
-
createdAt?: Date;
|
|
99
|
-
updatedAt?: Date;
|
|
100
|
-
scheduleTime: {
|
|
101
|
-
asap: boolean;
|
|
102
|
-
date?: Date;
|
|
103
|
-
time?: Date;
|
|
104
|
-
};
|
|
105
|
-
branch: {
|
|
106
|
-
_id: mongoose.Types.ObjectId | string;
|
|
107
|
-
name?: {
|
|
108
|
-
en?: string;
|
|
109
|
-
ar?: string;
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
orderNumber?: any;
|
|
113
|
-
promo?: {
|
|
114
|
-
_id?: string;
|
|
115
|
-
code?: string;
|
|
116
|
-
type?: string;
|
|
117
|
-
value?: number;
|
|
118
|
-
category?: string;
|
|
119
|
-
discountedAmount?: number;
|
|
120
|
-
};
|
|
121
|
-
processedBy?: mongoose.Types.ObjectId | string;
|
|
122
|
-
deliveredBy?: mongoose.Types.ObjectId | string;
|
|
123
|
-
terminalId?: string;
|
|
124
|
-
}
|
|
125
85
|
export interface CashTransactionInterface {
|
|
126
86
|
_id?: mongoose.Types.ObjectId | string;
|
|
127
87
|
type: CashTransactionTypeValue;
|
package/dist/productCart.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Customer, Dimensions, Discount, FileType, Label, PriceModel, StockHandle } from "shopoflex-types";
|
|
1
|
+
import { Address, Customer, Dimensions, Discount, FileType, Label, OrderStatusType, PaymentMethodType, PickType, PriceModel, Shipping, StockHandle } from "shopoflex-types";
|
|
2
2
|
import { UnitTypeValue } from "./common";
|
|
3
|
+
import mongoose from "mongoose";
|
|
3
4
|
type LanguageCode = 'en' | 'ar' | 'fr' | 'es' | 'de';
|
|
4
5
|
export type NameType = {
|
|
5
6
|
[K in LanguageCode]?: string;
|
|
@@ -52,13 +53,16 @@ export interface Modifier {
|
|
|
52
53
|
export interface CartItem {
|
|
53
54
|
_id?: string;
|
|
54
55
|
categoriesIds: string[];
|
|
55
|
-
price: number;
|
|
56
|
-
quantity: number;
|
|
57
56
|
unit: UnitTypeValue;
|
|
58
57
|
name?: NameType;
|
|
59
58
|
selectedModifiers?: sModifier[];
|
|
60
59
|
selectedVariant: VariantType | null;
|
|
61
60
|
files?: FileType[];
|
|
61
|
+
quantity: number;
|
|
62
|
+
basePrice?: number;
|
|
63
|
+
modifiersPrice?: number;
|
|
64
|
+
unitPrice?: number;
|
|
65
|
+
totalPrice?: number;
|
|
62
66
|
}
|
|
63
67
|
export interface sModifier {
|
|
64
68
|
name: NameType;
|
|
@@ -140,4 +144,44 @@ export interface GroupedCategory {
|
|
|
140
144
|
categoryName: NameType;
|
|
141
145
|
products: ProductType[];
|
|
142
146
|
}
|
|
147
|
+
export interface OrderType {
|
|
148
|
+
_id?: string | any;
|
|
149
|
+
orderType: PickType;
|
|
150
|
+
source: 'pos' | 'online';
|
|
151
|
+
tableNumber?: number;
|
|
152
|
+
customer?: Customer;
|
|
153
|
+
vendorId?: string;
|
|
154
|
+
cart?: Cart;
|
|
155
|
+
paymentMethod?: PaymentMethodType;
|
|
156
|
+
address?: Address;
|
|
157
|
+
status?: OrderStatusType;
|
|
158
|
+
paid?: boolean;
|
|
159
|
+
shipping: Shipping;
|
|
160
|
+
createdAt?: Date;
|
|
161
|
+
updatedAt?: Date;
|
|
162
|
+
scheduleTime: {
|
|
163
|
+
asap: boolean;
|
|
164
|
+
date?: Date;
|
|
165
|
+
time?: Date;
|
|
166
|
+
};
|
|
167
|
+
branch: {
|
|
168
|
+
_id: mongoose.Types.ObjectId | string;
|
|
169
|
+
name?: {
|
|
170
|
+
en?: string;
|
|
171
|
+
ar?: string;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
orderNumber?: any;
|
|
175
|
+
promo?: {
|
|
176
|
+
_id?: string;
|
|
177
|
+
code?: string;
|
|
178
|
+
type?: string;
|
|
179
|
+
value?: number;
|
|
180
|
+
category?: string;
|
|
181
|
+
discountedAmount?: number;
|
|
182
|
+
};
|
|
183
|
+
processedBy?: mongoose.Types.ObjectId | string;
|
|
184
|
+
deliveredBy?: mongoose.Types.ObjectId | string;
|
|
185
|
+
terminalId?: string;
|
|
186
|
+
}
|
|
143
187
|
export {};
|