shopoflex-types 1.0.81 → 1.0.83
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 +68 -37
- package/package.json +1 -1
package/dist/common.d.ts
CHANGED
|
@@ -77,6 +77,65 @@ export type PickType = OrderTypeOptions['type'];
|
|
|
77
77
|
export type PaymentMethodType = PaymentMethod['type'];
|
|
78
78
|
export type OrderStatusType = OrderStatus['status'];
|
|
79
79
|
export type UnitTypeValue = UnitType['unit'];
|
|
80
|
+
export interface CashTransactionType {
|
|
81
|
+
type: 'opening' | 'sale' | 'refund' | 'owner_draw' | 'transfer' | 'expense' | 'variance';
|
|
82
|
+
}
|
|
83
|
+
export type CashTransactionTypeValue = CashTransactionType['type'];
|
|
84
|
+
export interface OrderType {
|
|
85
|
+
_id?: string | any;
|
|
86
|
+
orderType: PickType;
|
|
87
|
+
source: 'pos' | 'online';
|
|
88
|
+
tableNumber?: number;
|
|
89
|
+
customer?: Customer;
|
|
90
|
+
vendorId?: string;
|
|
91
|
+
cart?: Cart;
|
|
92
|
+
paymentMethod?: PaymentMethodType;
|
|
93
|
+
address?: Address;
|
|
94
|
+
status?: OrderStatusType;
|
|
95
|
+
paid?: boolean;
|
|
96
|
+
shipping: Shipping;
|
|
97
|
+
createdAt?: Date;
|
|
98
|
+
updatedAt?: Date;
|
|
99
|
+
scheduleTime: {
|
|
100
|
+
asap: boolean;
|
|
101
|
+
date?: Date;
|
|
102
|
+
time?: Date;
|
|
103
|
+
};
|
|
104
|
+
branch: {
|
|
105
|
+
_id: mongoose.Types.ObjectId | string;
|
|
106
|
+
name?: {
|
|
107
|
+
en?: string;
|
|
108
|
+
ar?: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
orderNumber?: any;
|
|
112
|
+
promo?: {
|
|
113
|
+
_id?: string;
|
|
114
|
+
code?: string;
|
|
115
|
+
type?: string;
|
|
116
|
+
value?: number;
|
|
117
|
+
category?: string;
|
|
118
|
+
discountedAmount?: number;
|
|
119
|
+
};
|
|
120
|
+
processedBy?: mongoose.Types.ObjectId | string;
|
|
121
|
+
deliveredBy?: mongoose.Types.ObjectId | string;
|
|
122
|
+
terminalId?: string;
|
|
123
|
+
}
|
|
124
|
+
export interface CashTransactionInterface {
|
|
125
|
+
_id?: mongoose.Types.ObjectId | string;
|
|
126
|
+
type: CashTransactionTypeValue;
|
|
127
|
+
amount: number;
|
|
128
|
+
terminalId: string;
|
|
129
|
+
employeeId?: mongoose.Types.ObjectId | string;
|
|
130
|
+
orderId?: mongoose.Types.ObjectId | string;
|
|
131
|
+
reason?: string;
|
|
132
|
+
transferTo?: string;
|
|
133
|
+
transferFrom?: string;
|
|
134
|
+
vendorId: mongoose.Types.ObjectId | string;
|
|
135
|
+
branchId: string;
|
|
136
|
+
createdAt?: Date;
|
|
137
|
+
updatedAt?: Date;
|
|
138
|
+
}
|
|
80
139
|
export interface PriceModel {
|
|
81
140
|
price: number;
|
|
82
141
|
discountedPrice?: number;
|
|
@@ -167,6 +226,12 @@ export interface Category {
|
|
|
167
226
|
isActive: boolean;
|
|
168
227
|
vendorId: string | any;
|
|
169
228
|
}
|
|
229
|
+
export interface CompositionType {
|
|
230
|
+
componentId: string;
|
|
231
|
+
variantId: string;
|
|
232
|
+
quantity: number;
|
|
233
|
+
priceOverride?: number;
|
|
234
|
+
}
|
|
170
235
|
export interface ProductType {
|
|
171
236
|
_id?: string;
|
|
172
237
|
name: {
|
|
@@ -185,6 +250,9 @@ export interface ProductType {
|
|
|
185
250
|
branchesIds?: string[];
|
|
186
251
|
modifiers?: Modifier[];
|
|
187
252
|
hasModifiers?: boolean;
|
|
253
|
+
composition?: CompositionType[];
|
|
254
|
+
isComposite?: boolean;
|
|
255
|
+
isSellable?: boolean;
|
|
188
256
|
sort?: number;
|
|
189
257
|
hasVariants?: boolean;
|
|
190
258
|
variants: VariantType[];
|
|
@@ -309,43 +377,6 @@ export interface Shipping {
|
|
|
309
377
|
cost?: number;
|
|
310
378
|
trackingNumber?: string;
|
|
311
379
|
}
|
|
312
|
-
export interface OrderType {
|
|
313
|
-
_id?: string | any;
|
|
314
|
-
orderType: PickType;
|
|
315
|
-
source: 'pos' | 'online';
|
|
316
|
-
tableNumber?: number;
|
|
317
|
-
customer?: Customer;
|
|
318
|
-
vendorId?: string;
|
|
319
|
-
cart?: Cart;
|
|
320
|
-
paymentMethod?: PaymentMethodType;
|
|
321
|
-
address?: Address;
|
|
322
|
-
status?: OrderStatusType;
|
|
323
|
-
paid?: boolean;
|
|
324
|
-
shipping: Shipping;
|
|
325
|
-
createdAt?: Date;
|
|
326
|
-
updatedAt?: Date;
|
|
327
|
-
scheduleTime: {
|
|
328
|
-
asap: boolean;
|
|
329
|
-
date?: Date;
|
|
330
|
-
time?: Date;
|
|
331
|
-
};
|
|
332
|
-
branch: {
|
|
333
|
-
_id: mongoose.Types.ObjectId | string;
|
|
334
|
-
name?: {
|
|
335
|
-
en?: string;
|
|
336
|
-
ar?: string;
|
|
337
|
-
};
|
|
338
|
-
};
|
|
339
|
-
orderNumber?: any;
|
|
340
|
-
promo?: {
|
|
341
|
-
_id?: string;
|
|
342
|
-
code?: string;
|
|
343
|
-
type?: string;
|
|
344
|
-
value?: number;
|
|
345
|
-
category?: string;
|
|
346
|
-
discountedAmount?: number;
|
|
347
|
-
};
|
|
348
|
-
}
|
|
349
380
|
export interface Customer {
|
|
350
381
|
_id?: string;
|
|
351
382
|
uid?: string;
|