shopoflex-types 1.0.102 → 1.0.103

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.
@@ -186,9 +186,18 @@ export interface OrderType {
186
186
  category?: string;
187
187
  discountedAmount?: number;
188
188
  };
189
- processedBy?: mongoose.Types.ObjectId | string;
190
- deliveredBy?: mongoose.Types.ObjectId | string;
189
+ sessionId?: mongoose.Types.ObjectId | string;
191
190
  terminalId?: string;
191
+ createdBy?: mongoose.Types.ObjectId | string;
192
+ timeline?: Array<{
193
+ action: 'created' | 'payment_received' | 'payment_failed' | 'confirmed' | 'preparing' | 'ready' | 'picked_up' | 'out_for_delivery' | 'delivered' | 'completed' | 'cancelled' | 'refunded' | 'modified';
194
+ timestamp: Date;
195
+ userId?: mongoose.Types.ObjectId | string;
196
+ }>;
197
+ currentHandler?: mongoose.Types.ObjectId | string;
192
198
  notes?: string;
199
+ addTimelineEntry?(action: string, userId?: mongoose.Types.ObjectId | string): this;
200
+ getWhoDidAction?(action: string): any;
201
+ getUserTimeline?(userId: mongoose.Types.ObjectId | string): any[];
193
202
  }
194
203
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shopoflex-types",
3
- "version": "1.0.102",
3
+ "version": "1.0.103",
4
4
  "description": "Shared TypeScript types for Shopoflex applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",