@managesome/eposmatic-toolkit 0.2.503 → 0.2.506

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.
@@ -8,7 +8,9 @@ export declare const WORKER_ENDPOINTS: {
8
8
  readonly RESERVE_CUSTOMER_REDEMPTIONS_FOR_ORDER: "/reserve-customer-redemptions-for-order";
9
9
  readonly RELEASE_CUSTOMER_REDEMPTIONS_FOR_ORDER: "/release-customer-redemptions-for-order";
10
10
  readonly UPDATE_CUSTOMER_REDEMPTIONS_ON_WALLET_ASSIGNMENT: "/update-customer-redemptions-on-wallet-assignment";
11
- readonly WA_ORDER_NOTIFICATION: "/wa-order-notification";
11
+ readonly SEND_WA_ORDER_NOTIFICATION: "/send-wa-order-notification";
12
+ readonly SEND_EMAIL_ORDER_NOTIFICATION: "/send-email-order-notification";
13
+ readonly SEND_APP_ORDER_NOTIFICATION: "/send-app-order-notification";
12
14
  readonly NOTIFY_TO_RATE_ORDER: "/notify-to-rate-order";
13
15
  readonly CREATE_VOID_ORDER_ITEMS: "/create-void-order-items";
14
16
  readonly CREATE_VOID_ORDER_ITEMS_ON_OFFLINE_SYNC: "/create-void-order-items-on-offline-sync";
@@ -12,7 +12,9 @@ exports.WORKER_ENDPOINTS = {
12
12
  RESERVE_CUSTOMER_REDEMPTIONS_FOR_ORDER: '/reserve-customer-redemptions-for-order',
13
13
  RELEASE_CUSTOMER_REDEMPTIONS_FOR_ORDER: '/release-customer-redemptions-for-order',
14
14
  UPDATE_CUSTOMER_REDEMPTIONS_ON_WALLET_ASSIGNMENT: '/update-customer-redemptions-on-wallet-assignment',
15
- WA_ORDER_NOTIFICATION: '/wa-order-notification',
15
+ SEND_WA_ORDER_NOTIFICATION: '/send-wa-order-notification',
16
+ SEND_EMAIL_ORDER_NOTIFICATION: '/send-email-order-notification',
17
+ SEND_APP_ORDER_NOTIFICATION: '/send-app-order-notification',
16
18
  NOTIFY_TO_RATE_ORDER: '/notify-to-rate-order',
17
19
  CREATE_VOID_ORDER_ITEMS: '/create-void-order-items',
18
20
  CREATE_VOID_ORDER_ITEMS_ON_OFFLINE_SYNC: '/create-void-order-items-on-offline-sync',
@@ -46,7 +46,35 @@ export interface IWorker_ReleaseCustomerRedemptionsForOrder {
46
46
  brand_id: string;
47
47
  phoneNumber?: string;
48
48
  }
49
- export interface IWorker_WhatsAppOrderNotification {
49
+ export interface IWorker_SendWhatsAppOrderNotification {
50
+ tenantName: string;
51
+ takeaway_is_pickup: boolean | undefined;
52
+ image_url: string;
53
+ orderType: string;
54
+ rider_name: string | null | undefined;
55
+ rider_phone: string | null | undefined;
56
+ cancel_reason: string | null | undefined;
57
+ order_status: ORDER_STATUS_ENUM;
58
+ order_id: string;
59
+ customer_phone: string;
60
+ tenant_id: string;
61
+ order_number: number | null;
62
+ }
63
+ export interface IWorker_SendEmailOrderNotification {
64
+ tenantName: string;
65
+ takeaway_is_pickup: boolean | undefined;
66
+ image_url: string;
67
+ orderType: string;
68
+ rider_name: string | null | undefined;
69
+ rider_phone: string | null | undefined;
70
+ cancel_reason: string | null | undefined;
71
+ order_status: ORDER_STATUS_ENUM;
72
+ order_id: string;
73
+ customer_phone: string;
74
+ tenant_id: string;
75
+ order_number: number | null;
76
+ }
77
+ export interface IWorker_SendAppOrderNotification {
50
78
  tenantName: string;
51
79
  takeaway_is_pickup: boolean | undefined;
52
80
  image_url: string;
@@ -79,6 +79,26 @@ function getSettingsWithPrice(settings, writeable) {
79
79
  cash_gst: convertToPrice(settings.cash_gst),
80
80
  }
81
81
  : {}),
82
+ ...(settings.im_card_gst != null
83
+ ? {
84
+ im_card_gst: convertToPrice(settings.im_card_gst),
85
+ }
86
+ : {}),
87
+ ...(settings.im_cash_gst != null
88
+ ? {
89
+ im_cash_gst: convertToPrice(settings.im_cash_gst),
90
+ }
91
+ : {}),
92
+ ...(settings.po_card_gst != null
93
+ ? {
94
+ po_card_gst: convertToPrice(settings.po_card_gst),
95
+ }
96
+ : {}),
97
+ ...(settings.po_cash_gst != null
98
+ ? {
99
+ po_cash_gst: convertToPrice(settings.po_cash_gst),
100
+ }
101
+ : {}),
82
102
  ...(settings.dinein_service_fee != null
83
103
  ? {
84
104
  dinein_service_fee: convertToPrice(settings.dinein_service_fee),
@@ -101,12 +101,6 @@ export declare const TenantSchema: Schema<any, import("mongoose").Model<any, any
101
101
  card_gst: number;
102
102
  cash_gst: number;
103
103
  default_gst_type: GST_TYPE_ENUM;
104
- im_card_gst: number;
105
- im_cash_gst: number;
106
- default_im_gst_type: GST_TYPE_ENUM;
107
- po_card_gst: number;
108
- po_cash_gst: number;
109
- default_po_gst_type: GST_TYPE_ENUM;
110
104
  web_cover_image: string;
111
105
  web_favicon: string;
112
106
  web_design_type: ONLINE_ORDERING_DESIGN_TYPE_ENUM;
@@ -124,8 +118,6 @@ export declare const TenantSchema: Schema<any, import("mongoose").Model<any, any
124
118
  auto_accept_order_for_platforms: PLATFORMS_ENUM[];
125
119
  custom_payment_types: string[];
126
120
  expense_payment_types: string[];
127
- im_custom_payment_types: string[];
128
- po_custom_payment_types: string[];
129
121
  reservation_enabled: boolean;
130
122
  integrations: string[];
131
123
  exempt_gst_for_platforms: PLATFORMS_ENUM[];
@@ -158,6 +150,12 @@ export declare const TenantSchema: Schema<any, import("mongoose").Model<any, any
158
150
  rider_pickup_food_image_mandatory?: boolean | null | undefined;
159
151
  rider_dropoff_food_image_mandatory?: boolean | null | undefined;
160
152
  disable_reason_for_discount?: boolean | null | undefined;
153
+ im_card_gst?: number | null | undefined;
154
+ im_cash_gst?: number | null | undefined;
155
+ default_im_gst_type?: GST_TYPE_ENUM | null | undefined;
156
+ po_card_gst?: number | null | undefined;
157
+ po_cash_gst?: number | null | undefined;
158
+ default_po_gst_type?: GST_TYPE_ENUM | null | undefined;
161
159
  card_processing_provider?: import("../../constants").CARD_PROCESSING_PROVIDERS_ENUM | null | undefined;
162
160
  card_processing_account_id?: string | null | undefined;
163
161
  _card_processing_account_token?: string | null | undefined;
@@ -165,6 +163,8 @@ export declare const TenantSchema: Schema<any, import("mongoose").Model<any, any
165
163
  sms_processing_account_id?: string | null | undefined;
166
164
  email_processing_provider?: import("../../constants").EMAIL_PROCESSING_PROVIDERS_ENUM.NONE | null | undefined;
167
165
  email_processing_account_id?: string | null | undefined;
166
+ im_custom_payment_types?: string[] | null | undefined;
167
+ po_custom_payment_types?: string[] | null | undefined;
168
168
  ms_clarity_id?: string | null | undefined;
169
169
  fb_pixel_id?: string | null | undefined;
170
170
  gtm_id?: string | null | undefined;
@@ -281,12 +281,6 @@ export declare const TenantSchema: Schema<any, import("mongoose").Model<any, any
281
281
  card_gst: number;
282
282
  cash_gst: number;
283
283
  default_gst_type: GST_TYPE_ENUM;
284
- im_card_gst: number;
285
- im_cash_gst: number;
286
- default_im_gst_type: GST_TYPE_ENUM;
287
- po_card_gst: number;
288
- po_cash_gst: number;
289
- default_po_gst_type: GST_TYPE_ENUM;
290
284
  web_cover_image: string;
291
285
  web_favicon: string;
292
286
  web_design_type: ONLINE_ORDERING_DESIGN_TYPE_ENUM;
@@ -304,8 +298,6 @@ export declare const TenantSchema: Schema<any, import("mongoose").Model<any, any
304
298
  auto_accept_order_for_platforms: PLATFORMS_ENUM[];
305
299
  custom_payment_types: string[];
306
300
  expense_payment_types: string[];
307
- im_custom_payment_types: string[];
308
- po_custom_payment_types: string[];
309
301
  reservation_enabled: boolean;
310
302
  integrations: string[];
311
303
  exempt_gst_for_platforms: PLATFORMS_ENUM[];
@@ -338,6 +330,12 @@ export declare const TenantSchema: Schema<any, import("mongoose").Model<any, any
338
330
  rider_pickup_food_image_mandatory?: boolean | null | undefined;
339
331
  rider_dropoff_food_image_mandatory?: boolean | null | undefined;
340
332
  disable_reason_for_discount?: boolean | null | undefined;
333
+ im_card_gst?: number | null | undefined;
334
+ im_cash_gst?: number | null | undefined;
335
+ default_im_gst_type?: GST_TYPE_ENUM | null | undefined;
336
+ po_card_gst?: number | null | undefined;
337
+ po_cash_gst?: number | null | undefined;
338
+ default_po_gst_type?: GST_TYPE_ENUM | null | undefined;
341
339
  card_processing_provider?: import("../../constants").CARD_PROCESSING_PROVIDERS_ENUM | null | undefined;
342
340
  card_processing_account_id?: string | null | undefined;
343
341
  _card_processing_account_token?: string | null | undefined;
@@ -345,6 +343,8 @@ export declare const TenantSchema: Schema<any, import("mongoose").Model<any, any
345
343
  sms_processing_account_id?: string | null | undefined;
346
344
  email_processing_provider?: import("../../constants").EMAIL_PROCESSING_PROVIDERS_ENUM.NONE | null | undefined;
347
345
  email_processing_account_id?: string | null | undefined;
346
+ im_custom_payment_types?: string[] | null | undefined;
347
+ po_custom_payment_types?: string[] | null | undefined;
348
348
  ms_clarity_id?: string | null | undefined;
349
349
  fb_pixel_id?: string | null | undefined;
350
350
  gtm_id?: string | null | undefined;
@@ -461,12 +461,6 @@ export declare const TenantSchema: Schema<any, import("mongoose").Model<any, any
461
461
  card_gst: number;
462
462
  cash_gst: number;
463
463
  default_gst_type: GST_TYPE_ENUM;
464
- im_card_gst: number;
465
- im_cash_gst: number;
466
- default_im_gst_type: GST_TYPE_ENUM;
467
- po_card_gst: number;
468
- po_cash_gst: number;
469
- default_po_gst_type: GST_TYPE_ENUM;
470
464
  web_cover_image: string;
471
465
  web_favicon: string;
472
466
  web_design_type: ONLINE_ORDERING_DESIGN_TYPE_ENUM;
@@ -484,8 +478,6 @@ export declare const TenantSchema: Schema<any, import("mongoose").Model<any, any
484
478
  auto_accept_order_for_platforms: PLATFORMS_ENUM[];
485
479
  custom_payment_types: string[];
486
480
  expense_payment_types: string[];
487
- im_custom_payment_types: string[];
488
- po_custom_payment_types: string[];
489
481
  reservation_enabled: boolean;
490
482
  integrations: string[];
491
483
  exempt_gst_for_platforms: PLATFORMS_ENUM[];
@@ -518,6 +510,12 @@ export declare const TenantSchema: Schema<any, import("mongoose").Model<any, any
518
510
  rider_pickup_food_image_mandatory?: boolean | null | undefined;
519
511
  rider_dropoff_food_image_mandatory?: boolean | null | undefined;
520
512
  disable_reason_for_discount?: boolean | null | undefined;
513
+ im_card_gst?: number | null | undefined;
514
+ im_cash_gst?: number | null | undefined;
515
+ default_im_gst_type?: GST_TYPE_ENUM | null | undefined;
516
+ po_card_gst?: number | null | undefined;
517
+ po_cash_gst?: number | null | undefined;
518
+ default_po_gst_type?: GST_TYPE_ENUM | null | undefined;
521
519
  card_processing_provider?: import("../../constants").CARD_PROCESSING_PROVIDERS_ENUM | null | undefined;
522
520
  card_processing_account_id?: string | null | undefined;
523
521
  _card_processing_account_token?: string | null | undefined;
@@ -525,6 +523,8 @@ export declare const TenantSchema: Schema<any, import("mongoose").Model<any, any
525
523
  sms_processing_account_id?: string | null | undefined;
526
524
  email_processing_provider?: import("../../constants").EMAIL_PROCESSING_PROVIDERS_ENUM.NONE | null | undefined;
527
525
  email_processing_account_id?: string | null | undefined;
526
+ im_custom_payment_types?: string[] | null | undefined;
527
+ po_custom_payment_types?: string[] | null | undefined;
528
528
  ms_clarity_id?: string | null | undefined;
529
529
  fb_pixel_id?: string | null | undefined;
530
530
  gtm_id?: string | null | undefined;
@@ -448,29 +448,29 @@ exports.TenantSchema = new mongoose_1.Schema({
448
448
  },
449
449
  im_card_gst: {
450
450
  type: Number,
451
- default: 10,
451
+ required: false,
452
452
  },
453
453
  im_cash_gst: {
454
454
  type: Number,
455
- default: 5,
455
+ required: false,
456
456
  },
457
457
  default_im_gst_type: {
458
458
  type: String,
459
459
  enum: constants_1.ALL_GST_TYPES,
460
- default: constants_1.GST_TYPE_ENUM.CARD,
460
+ required: false,
461
461
  },
462
462
  po_card_gst: {
463
463
  type: Number,
464
- default: 10,
464
+ required: false,
465
465
  },
466
466
  po_cash_gst: {
467
467
  type: Number,
468
- default: 5,
468
+ required: false,
469
469
  },
470
470
  default_po_gst_type: {
471
471
  type: String,
472
472
  enum: constants_1.ALL_GST_TYPES,
473
- default: constants_1.GST_TYPE_ENUM.CARD,
473
+ required: false,
474
474
  },
475
475
  web_design_type: {
476
476
  type: String,
@@ -593,11 +593,11 @@ exports.TenantSchema = new mongoose_1.Schema({
593
593
  },
594
594
  im_custom_payment_types: {
595
595
  type: [String],
596
- default: [],
596
+ required: false,
597
597
  },
598
598
  po_custom_payment_types: {
599
599
  type: [String],
600
- default: [],
600
+ required: false,
601
601
  },
602
602
  takeaway_is_pickup: {
603
603
  type: Boolean,
@@ -104,12 +104,12 @@ export interface ITenant {
104
104
  card_gst: number;
105
105
  cash_gst: number;
106
106
  default_gst_type: GST_TYPE_ENUM;
107
- im_card_gst: number;
108
- im_cash_gst: number;
109
- default_im_gst_type: GST_TYPE_ENUM;
110
- po_card_gst: number;
111
- po_cash_gst: number;
112
- default_po_gst_type: GST_TYPE_ENUM;
107
+ im_card_gst?: number;
108
+ im_cash_gst?: number;
109
+ default_im_gst_type?: GST_TYPE_ENUM;
110
+ po_card_gst?: number;
111
+ po_cash_gst?: number;
112
+ default_po_gst_type?: GST_TYPE_ENUM;
113
113
  web_cover_image: string;
114
114
  web_favicon: string;
115
115
  web_design_type: ONLINE_ORDERING_DESIGN_TYPE_ENUM;
@@ -134,8 +134,8 @@ export interface ITenant {
134
134
  auto_accept_order_for_platforms: PLATFORMS_ENUM[];
135
135
  custom_payment_types: string[];
136
136
  expense_payment_types: string[];
137
- im_custom_payment_types: string[];
138
- po_custom_payment_types: string[];
137
+ im_custom_payment_types?: string[] | null;
138
+ po_custom_payment_types?: string[] | null;
139
139
  takeaway_is_pickup?: boolean;
140
140
  reservation_enabled: boolean;
141
141
  ms_clarity_id?: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.2.503",
3
+ "version": "0.2.506",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",