@managesome/eposmatic-toolkit 0.2.216 → 0.2.218

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.
@@ -674,6 +674,7 @@ export declare enum DELIVERY_AREAS_SEARCH_TYPE_ENUM {
674
674
  }
675
675
  export declare const ALL_DELIVERY_AREAS_SEARCH_TYPES: DELIVERY_AREAS_SEARCH_TYPE_ENUM[];
676
676
  export declare enum RIDER_FEE_TYPE_ENUM {
677
+ NONE = "NONE",
677
678
  DELIVERY_CHARGES_FULL = "DELIVERY_CHARGES_FULL",
678
679
  DISTANCE_ONE_WAY = "DISTANCE_ONE_WAY",
679
680
  DISTANCE_RETURN = "DISTANCE_RETURN"
@@ -1234,6 +1234,7 @@ exports.ALL_DELIVERY_AREAS_SEARCH_TYPES = Object.values(DELIVERY_AREAS_SEARCH_TY
1234
1234
  // ======================>> <<====================== //
1235
1235
  var RIDER_FEE_TYPE_ENUM;
1236
1236
  (function (RIDER_FEE_TYPE_ENUM) {
1237
+ RIDER_FEE_TYPE_ENUM["NONE"] = "NONE";
1237
1238
  RIDER_FEE_TYPE_ENUM["DELIVERY_CHARGES_FULL"] = "DELIVERY_CHARGES_FULL";
1238
1239
  RIDER_FEE_TYPE_ENUM["DISTANCE_ONE_WAY"] = "DISTANCE_ONE_WAY";
1239
1240
  RIDER_FEE_TYPE_ENUM["DISTANCE_RETURN"] = "DISTANCE_RETURN";
@@ -75,6 +75,7 @@ export declare function getChangeCourseStatusData(data: Partial<IOrder>, course_
75
75
  start_time: Date;
76
76
  reservation_time: Date;
77
77
  prep_minutes?: number | null;
78
+ order_taker_details?: import("../../schemas").IStaffDetails | null;
78
79
  } | null;
79
80
  _id?: string | undefined;
80
81
  tenant_id?: string | undefined;
@@ -1,7 +1,7 @@
1
1
  import { PLATFORMS_ENUM } from '../../constants';
2
2
  import { ICardDetails, IDiscountDetails, IOrder, IOrderCategory, IOrderDeliveryDetails, IOrderItem, IOrderIteration, IOrderModifier, IOrderOption, IOrderPayment } from '../../schemas';
3
3
  import { ISplitBill } from '../types';
4
- export declare function getOrderDeliveryDetailsWithPrice(delivery: IOrderDeliveryDetails | null | undefined, convertToPrice: (price: number) => number, writeable?: boolean): IOrderDeliveryDetails | null;
4
+ export declare function getOrderDeliveryDetailsWithPrice(delivery: IOrderDeliveryDetails | null | undefined, convertToPrice: (price: number) => number): IOrderDeliveryDetails | null;
5
5
  export declare function getOrderPaymentsCardDetailsWithPrice(card_details: ICardDetails | null | undefined, convertToPrice: (price: number) => number): ICardDetails | null;
6
6
  export declare function getOrderPaymentsWithPrice(payments: IOrderPayment[] | undefined, convertToPrice: (price: number) => number): IOrderPayment[];
7
7
  export declare function getOrderItemModifierOptionsWithPrice(options: IOrderOption[] | undefined, convertToPrice: (price: number) => number): IOrderOption[];
@@ -26,13 +26,12 @@ const constants_1 = require("../../constants");
26
26
  const utils_1 = require("../utils");
27
27
  const cart_actions_1 = require("./cart-actions");
28
28
  /* ======================>Order Object<====================== */
29
- function getOrderDeliveryDetailsWithPrice(delivery, convertToPrice, writeable) {
29
+ function getOrderDeliveryDetailsWithPrice(delivery, convertToPrice) {
30
30
  if (!delivery)
31
31
  return null;
32
- const riderRevenue = writeable ? (delivery.rider_revenue ?? delivery.delivery_cost ?? 0) : delivery.rider_revenue;
33
32
  return {
34
33
  ...delivery,
35
- ...(riderRevenue ? { rider_revenue: convertToPrice(riderRevenue) } : {}),
34
+ ...(delivery.rider_revenue != null ? { rider_revenue: convertToPrice(delivery.rider_revenue) } : {}),
36
35
  delivery_cost: convertToPrice(delivery.delivery_cost ?? 0),
37
36
  };
38
37
  }
@@ -126,7 +125,7 @@ function getOrderWithPrice(order, toCents) {
126
125
  : {}),
127
126
  ...(order.delivery_details != null
128
127
  ? {
129
- delivery_details: getOrderDeliveryDetailsWithPrice(order.delivery_details, convertToPrice, toCents),
128
+ delivery_details: getOrderDeliveryDetailsWithPrice(order.delivery_details, convertToPrice),
130
129
  }
131
130
  : {}),
132
131
  ...(order.categories != null
@@ -4,12 +4,12 @@ exports.getDeliveryWithPrice = getDeliveryWithPrice;
4
4
  const price_conversion_1 = require("./price-conversion");
5
5
  function getDeliveryWithPrice(delivery, writeable) {
6
6
  const convertToPrice = writeable ? price_conversion_1.convertPriceToCents : price_conversion_1.convertPriceFromCents;
7
- const fallbackDeliveryCost = delivery.order?.delivery_details?.delivery_cost ??
8
- delivery.delivery_cost ??
9
- 0;
10
- const riderRevenue = writeable ? (delivery.rider_revenue ?? fallbackDeliveryCost) : (delivery.rider_revenue ?? 0);
11
7
  return {
12
8
  ...delivery,
13
- rider_revenue: convertToPrice(riderRevenue),
9
+ ...(delivery.rider_revenue != null
10
+ ? {
11
+ rider_revenue: convertToPrice(delivery.rider_revenue ?? 0),
12
+ }
13
+ : {}),
14
14
  };
15
15
  }
@@ -919,14 +919,14 @@ function getLegacyItemReportBody({ categoriesChannel, itemsChannels, modifiersCh
919
919
  <h6 class="css-zfkluy-jskk">${item.count}</h6>
920
920
  <h6 class="css-21997j-jskk">${item.name}</h6>
921
921
  ${hasDeal
922
- ? `<p class="css-1jq5hv-jskk" style="color:#777;font-size:12px;line-height:14px;">Individual: ${individualCount} • Deal: ${dealCount}</p>`
922
+ ? `<p class="css-1jq5hv-jskk" style="color:#777;font-size:10px;line-height:12px;display:block;margin-top:2px;">Individual: ${individualCount} • Deal: ${dealCount}</p>`
923
923
  : ''}
924
924
  </div>
925
925
  ${shouldShowRevenue && item.grossAmount > 0
926
926
  ? `<h6 class="css-1z023sx-jskk">${(0, common_1.localeAmount)(currency_symbol, item.grossAmount)}</h6>`
927
927
  : ''}
928
928
  ${shouldShowRevenue && hasDeal && item.grossAmount > 0
929
- ? `<p class="css-1jq5hv-jskk" style="color:#777;font-size:12px;line-height:14px;">Individual revenue</p>`
929
+ ? `<p class="css-1jq5hv-jskk" style="color:#777;font-size:10px;line-height:12px;display:block;margin-top:2px;">Individual revenue</p>`
930
930
  : ''}
931
931
  </div>
932
932
  ${subItems}
@@ -2188,7 +2188,7 @@ function getNewItemReportBody({ categoriesChannel, itemsChannels, modifiersChann
2188
2188
  ${item.name}
2189
2189
  </h6>
2190
2190
  ${hasDeal
2191
- ? `<p class="css-1qqbci" style="color:#777;font-size:12px;line-height:14px;">Individual: ${individualCount} • Deal: ${dealCount}</p>`
2191
+ ? `<p class="css-1qqbci" style="color:#777;font-size:10px;line-height:12px;display:block;margin-top:2px;">Individual: ${individualCount} • Deal: ${dealCount}</p>`
2192
2192
  : ''}
2193
2193
  </div>
2194
2194
  </td>
@@ -2197,7 +2197,7 @@ function getNewItemReportBody({ categoriesChannel, itemsChannels, modifiersChann
2197
2197
  <h6 class="css-3jfma9">
2198
2198
  ${(0, common_1.localeAmount)(currency_symbol, item.itemAmount)}
2199
2199
  </h6>
2200
- ${hasDeal && item.itemAmount ? `<p class="css-1qqbci" style="color:#777;font-size:12px;line-height:14px;">Individual revenue</p>` : ''}
2200
+ ${hasDeal && item.itemAmount ? `<p class="css-1qqbci" style="color:#777;font-size:10px;line-height:12px;display:block;margin-top:2px;">Individual revenue</p>` : ''}
2201
2201
  </td>
2202
2202
  <td class="css-5u79pd">
2203
2203
  <h6 class="css-3jfma9">
@@ -38,8 +38,8 @@ export declare const DeliveriesSchema: Schema<any, import("mongoose").Model<any,
38
38
  0?: number | null | undefined;
39
39
  1?: number | null | undefined;
40
40
  }>;
41
- rider_revenue: number;
42
41
  cancel_reason?: string | null | undefined;
42
+ rider_revenue?: number | null | undefined;
43
43
  pickup_food_image_url?: string | null | undefined;
44
44
  dropoff_food_image_url?: string | null | undefined;
45
45
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
@@ -76,8 +76,8 @@ export declare const DeliveriesSchema: Schema<any, import("mongoose").Model<any,
76
76
  0?: number | null | undefined;
77
77
  1?: number | null | undefined;
78
78
  }>;
79
- rider_revenue: number;
80
79
  cancel_reason?: string | null | undefined;
80
+ rider_revenue?: number | null | undefined;
81
81
  pickup_food_image_url?: string | null | undefined;
82
82
  dropoff_food_image_url?: string | null | undefined;
83
83
  }>> & import("mongoose").FlatRecord<{
@@ -114,8 +114,8 @@ export declare const DeliveriesSchema: Schema<any, import("mongoose").Model<any,
114
114
  0?: number | null | undefined;
115
115
  1?: number | null | undefined;
116
116
  }>;
117
- rider_revenue: number;
118
117
  cancel_reason?: string | null | undefined;
118
+ rider_revenue?: number | null | undefined;
119
119
  pickup_food_image_url?: string | null | undefined;
120
120
  dropoff_food_image_url?: string | null | undefined;
121
121
  }> & Required<{
@@ -79,7 +79,7 @@ exports.DeliveriesSchema = new mongoose_1.Schema({
79
79
  rider_revenue: {
80
80
  type: Number,
81
81
  min: 0,
82
- required: true,
82
+ required: false,
83
83
  },
84
84
  pickup_food_image_url: {
85
85
  type: String,
@@ -2419,6 +2419,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
2419
2419
  tax_amount: number;
2420
2420
  amount_earned: number;
2421
2421
  grand_total: number;
2422
+ order_taker_details?: {
2423
+ staff_id: string;
2424
+ staff_name: string;
2425
+ staff_mobile: string;
2426
+ staff_email: string;
2427
+ } | null | undefined;
2422
2428
  delivery_details?: {
2423
2429
  city: string;
2424
2430
  address_instructions: string;
@@ -2464,6 +2470,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
2464
2470
  table_name: string;
2465
2471
  reservation_time: NativeDate;
2466
2472
  prep_minutes?: number | null | undefined;
2473
+ order_taker_details?: {
2474
+ staff_id: string;
2475
+ staff_name: string;
2476
+ staff_mobile: string;
2477
+ staff_email: string;
2478
+ } | null | undefined;
2467
2479
  } | null | undefined;
2468
2480
  takeaway_details?: {
2469
2481
  estimated_takeaway_time: NativeDate;
@@ -2474,12 +2486,6 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
2474
2486
  staff_mobile: string;
2475
2487
  staff_email: string;
2476
2488
  } | null | undefined;
2477
- order_taker_details?: {
2478
- staff_id: string;
2479
- staff_name: string;
2480
- staff_mobile: string;
2481
- staff_email: string;
2482
- } | null | undefined;
2483
2489
  order_discount_details?: {
2484
2490
  total_discount: number;
2485
2491
  voucher_discount?: number | null | undefined;
@@ -3681,6 +3687,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
3681
3687
  tax_amount: number;
3682
3688
  amount_earned: number;
3683
3689
  grand_total: number;
3690
+ order_taker_details?: {
3691
+ staff_id: string;
3692
+ staff_name: string;
3693
+ staff_mobile: string;
3694
+ staff_email: string;
3695
+ } | null | undefined;
3684
3696
  delivery_details?: {
3685
3697
  city: string;
3686
3698
  address_instructions: string;
@@ -3726,6 +3738,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
3726
3738
  table_name: string;
3727
3739
  reservation_time: NativeDate;
3728
3740
  prep_minutes?: number | null | undefined;
3741
+ order_taker_details?: {
3742
+ staff_id: string;
3743
+ staff_name: string;
3744
+ staff_mobile: string;
3745
+ staff_email: string;
3746
+ } | null | undefined;
3729
3747
  } | null | undefined;
3730
3748
  takeaway_details?: {
3731
3749
  estimated_takeaway_time: NativeDate;
@@ -3736,12 +3754,6 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
3736
3754
  staff_mobile: string;
3737
3755
  staff_email: string;
3738
3756
  } | null | undefined;
3739
- order_taker_details?: {
3740
- staff_id: string;
3741
- staff_name: string;
3742
- staff_mobile: string;
3743
- staff_email: string;
3744
- } | null | undefined;
3745
3757
  order_discount_details?: {
3746
3758
  total_discount: number;
3747
3759
  voucher_discount?: number | null | undefined;
@@ -4943,6 +4955,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
4943
4955
  tax_amount: number;
4944
4956
  amount_earned: number;
4945
4957
  grand_total: number;
4958
+ order_taker_details?: {
4959
+ staff_id: string;
4960
+ staff_name: string;
4961
+ staff_mobile: string;
4962
+ staff_email: string;
4963
+ } | null | undefined;
4946
4964
  delivery_details?: {
4947
4965
  city: string;
4948
4966
  address_instructions: string;
@@ -4988,6 +5006,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
4988
5006
  table_name: string;
4989
5007
  reservation_time: NativeDate;
4990
5008
  prep_minutes?: number | null | undefined;
5009
+ order_taker_details?: {
5010
+ staff_id: string;
5011
+ staff_name: string;
5012
+ staff_mobile: string;
5013
+ staff_email: string;
5014
+ } | null | undefined;
4991
5015
  } | null | undefined;
4992
5016
  takeaway_details?: {
4993
5017
  estimated_takeaway_time: NativeDate;
@@ -4998,12 +5022,6 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
4998
5022
  staff_mobile: string;
4999
5023
  staff_email: string;
5000
5024
  } | null | undefined;
5001
- order_taker_details?: {
5002
- staff_id: string;
5003
- staff_name: string;
5004
- staff_mobile: string;
5005
- staff_email: string;
5006
- } | null | undefined;
5007
5025
  order_discount_details?: {
5008
5026
  total_discount: number;
5009
5027
  voucher_discount?: number | null | undefined;
@@ -5050,6 +5068,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
5050
5068
  order_settled_at: NativeDate;
5051
5069
  order_settled_at_mins: number;
5052
5070
  cancel_reason?: string | null | undefined;
5071
+ order_taker_details?: {
5072
+ staff_id: string;
5073
+ staff_name: string;
5074
+ staff_mobile: string;
5075
+ staff_email: string;
5076
+ } | null | undefined;
5053
5077
  delivery_details?: {
5054
5078
  city: string;
5055
5079
  address_instructions: string;
@@ -5095,6 +5119,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
5095
5119
  table_name: string;
5096
5120
  reservation_time: NativeDate;
5097
5121
  prep_minutes?: number | null | undefined;
5122
+ order_taker_details?: {
5123
+ staff_id: string;
5124
+ staff_name: string;
5125
+ staff_mobile: string;
5126
+ staff_email: string;
5127
+ } | null | undefined;
5098
5128
  } | null | undefined;
5099
5129
  takeaway_details?: {
5100
5130
  estimated_takeaway_time: NativeDate;
@@ -5105,12 +5135,6 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
5105
5135
  staff_mobile: string;
5106
5136
  staff_email: string;
5107
5137
  } | null | undefined;
5108
- order_taker_details?: {
5109
- staff_id: string;
5110
- staff_name: string;
5111
- staff_mobile: string;
5112
- staff_email: string;
5113
- } | null | undefined;
5114
5138
  order_discount_details?: {
5115
5139
  total_discount: number;
5116
5140
  voucher_discount?: number | null | undefined;
@@ -7492,6 +7516,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
7492
7516
  tax_amount: number;
7493
7517
  amount_earned: number;
7494
7518
  grand_total: number;
7519
+ order_taker_details?: {
7520
+ staff_id: string;
7521
+ staff_name: string;
7522
+ staff_mobile: string;
7523
+ staff_email: string;
7524
+ } | null | undefined;
7495
7525
  delivery_details?: {
7496
7526
  city: string;
7497
7527
  address_instructions: string;
@@ -7537,6 +7567,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
7537
7567
  table_name: string;
7538
7568
  reservation_time: NativeDate;
7539
7569
  prep_minutes?: number | null | undefined;
7570
+ order_taker_details?: {
7571
+ staff_id: string;
7572
+ staff_name: string;
7573
+ staff_mobile: string;
7574
+ staff_email: string;
7575
+ } | null | undefined;
7540
7576
  } | null | undefined;
7541
7577
  takeaway_details?: {
7542
7578
  estimated_takeaway_time: NativeDate;
@@ -7547,12 +7583,6 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
7547
7583
  staff_mobile: string;
7548
7584
  staff_email: string;
7549
7585
  } | null | undefined;
7550
- order_taker_details?: {
7551
- staff_id: string;
7552
- staff_name: string;
7553
- staff_mobile: string;
7554
- staff_email: string;
7555
- } | null | undefined;
7556
7586
  order_discount_details?: {
7557
7587
  total_discount: number;
7558
7588
  voucher_discount?: number | null | undefined;
@@ -8754,6 +8784,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
8754
8784
  tax_amount: number;
8755
8785
  amount_earned: number;
8756
8786
  grand_total: number;
8787
+ order_taker_details?: {
8788
+ staff_id: string;
8789
+ staff_name: string;
8790
+ staff_mobile: string;
8791
+ staff_email: string;
8792
+ } | null | undefined;
8757
8793
  delivery_details?: {
8758
8794
  city: string;
8759
8795
  address_instructions: string;
@@ -8799,6 +8835,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
8799
8835
  table_name: string;
8800
8836
  reservation_time: NativeDate;
8801
8837
  prep_minutes?: number | null | undefined;
8838
+ order_taker_details?: {
8839
+ staff_id: string;
8840
+ staff_name: string;
8841
+ staff_mobile: string;
8842
+ staff_email: string;
8843
+ } | null | undefined;
8802
8844
  } | null | undefined;
8803
8845
  takeaway_details?: {
8804
8846
  estimated_takeaway_time: NativeDate;
@@ -8809,12 +8851,6 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
8809
8851
  staff_mobile: string;
8810
8852
  staff_email: string;
8811
8853
  } | null | undefined;
8812
- order_taker_details?: {
8813
- staff_id: string;
8814
- staff_name: string;
8815
- staff_mobile: string;
8816
- staff_email: string;
8817
- } | null | undefined;
8818
8854
  order_discount_details?: {
8819
8855
  total_discount: number;
8820
8856
  voucher_discount?: number | null | undefined;
@@ -10016,6 +10052,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
10016
10052
  tax_amount: number;
10017
10053
  amount_earned: number;
10018
10054
  grand_total: number;
10055
+ order_taker_details?: {
10056
+ staff_id: string;
10057
+ staff_name: string;
10058
+ staff_mobile: string;
10059
+ staff_email: string;
10060
+ } | null | undefined;
10019
10061
  delivery_details?: {
10020
10062
  city: string;
10021
10063
  address_instructions: string;
@@ -10061,6 +10103,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
10061
10103
  table_name: string;
10062
10104
  reservation_time: NativeDate;
10063
10105
  prep_minutes?: number | null | undefined;
10106
+ order_taker_details?: {
10107
+ staff_id: string;
10108
+ staff_name: string;
10109
+ staff_mobile: string;
10110
+ staff_email: string;
10111
+ } | null | undefined;
10064
10112
  } | null | undefined;
10065
10113
  takeaway_details?: {
10066
10114
  estimated_takeaway_time: NativeDate;
@@ -10071,12 +10119,6 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
10071
10119
  staff_mobile: string;
10072
10120
  staff_email: string;
10073
10121
  } | null | undefined;
10074
- order_taker_details?: {
10075
- staff_id: string;
10076
- staff_name: string;
10077
- staff_mobile: string;
10078
- staff_email: string;
10079
- } | null | undefined;
10080
10122
  order_discount_details?: {
10081
10123
  total_discount: number;
10082
10124
  voucher_discount?: number | null | undefined;
@@ -10123,6 +10165,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
10123
10165
  order_settled_at: NativeDate;
10124
10166
  order_settled_at_mins: number;
10125
10167
  cancel_reason?: string | null | undefined;
10168
+ order_taker_details?: {
10169
+ staff_id: string;
10170
+ staff_name: string;
10171
+ staff_mobile: string;
10172
+ staff_email: string;
10173
+ } | null | undefined;
10126
10174
  delivery_details?: {
10127
10175
  city: string;
10128
10176
  address_instructions: string;
@@ -10168,6 +10216,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
10168
10216
  table_name: string;
10169
10217
  reservation_time: NativeDate;
10170
10218
  prep_minutes?: number | null | undefined;
10219
+ order_taker_details?: {
10220
+ staff_id: string;
10221
+ staff_name: string;
10222
+ staff_mobile: string;
10223
+ staff_email: string;
10224
+ } | null | undefined;
10171
10225
  } | null | undefined;
10172
10226
  takeaway_details?: {
10173
10227
  estimated_takeaway_time: NativeDate;
@@ -10178,12 +10232,6 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
10178
10232
  staff_mobile: string;
10179
10233
  staff_email: string;
10180
10234
  } | null | undefined;
10181
- order_taker_details?: {
10182
- staff_id: string;
10183
- staff_name: string;
10184
- staff_mobile: string;
10185
- staff_email: string;
10186
- } | null | undefined;
10187
10235
  order_discount_details?: {
10188
10236
  total_discount: number;
10189
10237
  voucher_discount?: number | null | undefined;
@@ -12565,6 +12613,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
12565
12613
  tax_amount: number;
12566
12614
  amount_earned: number;
12567
12615
  grand_total: number;
12616
+ order_taker_details?: {
12617
+ staff_id: string;
12618
+ staff_name: string;
12619
+ staff_mobile: string;
12620
+ staff_email: string;
12621
+ } | null | undefined;
12568
12622
  delivery_details?: {
12569
12623
  city: string;
12570
12624
  address_instructions: string;
@@ -12610,6 +12664,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
12610
12664
  table_name: string;
12611
12665
  reservation_time: NativeDate;
12612
12666
  prep_minutes?: number | null | undefined;
12667
+ order_taker_details?: {
12668
+ staff_id: string;
12669
+ staff_name: string;
12670
+ staff_mobile: string;
12671
+ staff_email: string;
12672
+ } | null | undefined;
12613
12673
  } | null | undefined;
12614
12674
  takeaway_details?: {
12615
12675
  estimated_takeaway_time: NativeDate;
@@ -12620,12 +12680,6 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
12620
12680
  staff_mobile: string;
12621
12681
  staff_email: string;
12622
12682
  } | null | undefined;
12623
- order_taker_details?: {
12624
- staff_id: string;
12625
- staff_name: string;
12626
- staff_mobile: string;
12627
- staff_email: string;
12628
- } | null | undefined;
12629
12683
  order_discount_details?: {
12630
12684
  total_discount: number;
12631
12685
  voucher_discount?: number | null | undefined;
@@ -13827,6 +13881,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
13827
13881
  tax_amount: number;
13828
13882
  amount_earned: number;
13829
13883
  grand_total: number;
13884
+ order_taker_details?: {
13885
+ staff_id: string;
13886
+ staff_name: string;
13887
+ staff_mobile: string;
13888
+ staff_email: string;
13889
+ } | null | undefined;
13830
13890
  delivery_details?: {
13831
13891
  city: string;
13832
13892
  address_instructions: string;
@@ -13872,6 +13932,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
13872
13932
  table_name: string;
13873
13933
  reservation_time: NativeDate;
13874
13934
  prep_minutes?: number | null | undefined;
13935
+ order_taker_details?: {
13936
+ staff_id: string;
13937
+ staff_name: string;
13938
+ staff_mobile: string;
13939
+ staff_email: string;
13940
+ } | null | undefined;
13875
13941
  } | null | undefined;
13876
13942
  takeaway_details?: {
13877
13943
  estimated_takeaway_time: NativeDate;
@@ -13882,12 +13948,6 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
13882
13948
  staff_mobile: string;
13883
13949
  staff_email: string;
13884
13950
  } | null | undefined;
13885
- order_taker_details?: {
13886
- staff_id: string;
13887
- staff_name: string;
13888
- staff_mobile: string;
13889
- staff_email: string;
13890
- } | null | undefined;
13891
13951
  order_discount_details?: {
13892
13952
  total_discount: number;
13893
13953
  voucher_discount?: number | null | undefined;
@@ -15089,6 +15149,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
15089
15149
  tax_amount: number;
15090
15150
  amount_earned: number;
15091
15151
  grand_total: number;
15152
+ order_taker_details?: {
15153
+ staff_id: string;
15154
+ staff_name: string;
15155
+ staff_mobile: string;
15156
+ staff_email: string;
15157
+ } | null | undefined;
15092
15158
  delivery_details?: {
15093
15159
  city: string;
15094
15160
  address_instructions: string;
@@ -15134,6 +15200,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
15134
15200
  table_name: string;
15135
15201
  reservation_time: NativeDate;
15136
15202
  prep_minutes?: number | null | undefined;
15203
+ order_taker_details?: {
15204
+ staff_id: string;
15205
+ staff_name: string;
15206
+ staff_mobile: string;
15207
+ staff_email: string;
15208
+ } | null | undefined;
15137
15209
  } | null | undefined;
15138
15210
  takeaway_details?: {
15139
15211
  estimated_takeaway_time: NativeDate;
@@ -15144,12 +15216,6 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
15144
15216
  staff_mobile: string;
15145
15217
  staff_email: string;
15146
15218
  } | null | undefined;
15147
- order_taker_details?: {
15148
- staff_id: string;
15149
- staff_name: string;
15150
- staff_mobile: string;
15151
- staff_email: string;
15152
- } | null | undefined;
15153
15219
  order_discount_details?: {
15154
15220
  total_discount: number;
15155
15221
  voucher_discount?: number | null | undefined;
@@ -15196,6 +15262,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
15196
15262
  order_settled_at: NativeDate;
15197
15263
  order_settled_at_mins: number;
15198
15264
  cancel_reason?: string | null | undefined;
15265
+ order_taker_details?: {
15266
+ staff_id: string;
15267
+ staff_name: string;
15268
+ staff_mobile: string;
15269
+ staff_email: string;
15270
+ } | null | undefined;
15199
15271
  delivery_details?: {
15200
15272
  city: string;
15201
15273
  address_instructions: string;
@@ -15241,6 +15313,12 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
15241
15313
  table_name: string;
15242
15314
  reservation_time: NativeDate;
15243
15315
  prep_minutes?: number | null | undefined;
15316
+ order_taker_details?: {
15317
+ staff_id: string;
15318
+ staff_name: string;
15319
+ staff_mobile: string;
15320
+ staff_email: string;
15321
+ } | null | undefined;
15244
15322
  } | null | undefined;
15245
15323
  takeaway_details?: {
15246
15324
  estimated_takeaway_time: NativeDate;
@@ -15251,12 +15329,6 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
15251
15329
  staff_mobile: string;
15252
15330
  staff_email: string;
15253
15331
  } | null | undefined;
15254
- order_taker_details?: {
15255
- staff_id: string;
15256
- staff_name: string;
15257
- staff_mobile: string;
15258
- staff_email: string;
15259
- } | null | undefined;
15260
15332
  order_discount_details?: {
15261
15333
  total_discount: number;
15262
15334
  voucher_discount?: number | null | undefined;
@@ -96,6 +96,11 @@ const DineInDetailsSchema = new mongoose_1.Schema({
96
96
  type: Number,
97
97
  required: false,
98
98
  },
99
+ /** @deprecated Use top-level order_taker_details instead. */
100
+ order_taker_details: {
101
+ type: StaffDetailsSchema,
102
+ required: false,
103
+ },
99
104
  courses: {
100
105
  type: [OrderCourseSchema],
101
106
  default: null,
@@ -17,7 +17,7 @@ export interface IDelivery {
17
17
  cancel_reason?: string | null;
18
18
  polyline: [number, number][];
19
19
  distance_in_meters_from_store: number;
20
- rider_revenue: number;
20
+ rider_revenue?: number | null;
21
21
  pickup_food_image_url?: string | null;
22
22
  dropoff_food_image_url?: string | null;
23
23
  createdAt_mins: number;
@@ -101,7 +101,7 @@ export interface IOrderDeliveryDetails {
101
101
  country_code: string;
102
102
  delivery_code: string;
103
103
  delivery_cost: number;
104
- rider_revenue?: number;
104
+ rider_revenue?: number | null;
105
105
  estimated_delivery_time: Date | null;
106
106
  distance_in_meters_from_store: number;
107
107
  rider_details?: IStaffDetails | null;
@@ -114,6 +114,8 @@ export interface IOrderDineInDetails {
114
114
  start_time: Date;
115
115
  reservation_time: Date;
116
116
  prep_minutes?: number | null;
117
+ /** @deprecated Use top-level order_taker_details instead. */
118
+ order_taker_details?: IStaffDetails | null;
117
119
  courses: IOrderCourse[] | null;
118
120
  }
119
121
  export interface IOrderTakeawayDetails {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.2.216",
3
+ "version": "0.2.218",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",