shopoflex-types 1.0.80 → 1.0.82

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.
Files changed (2) hide show
  1. package/dist/common.d.ts +59 -37
  2. 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;
@@ -309,43 +368,6 @@ export interface Shipping {
309
368
  cost?: number;
310
369
  trackingNumber?: string;
311
370
  }
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
371
  export interface Customer {
350
372
  _id?: string;
351
373
  uid?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shopoflex-types",
3
- "version": "1.0.80",
3
+ "version": "1.0.82",
4
4
  "description": "Shared TypeScript types for Shopoflex applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",