@managesome/eposmatic-toolkit 0.4.80 → 0.4.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.
- package/esm/constants/WORKER_ENDPOINTS.js +0 -6
- package/esm/constants/enums/customer.js +13 -0
- package/esm/constants/enums/order.js +0 -5
- package/lib/constants/WORKER_ENDPOINTS.d.ts +0 -5
- package/lib/constants/WORKER_ENDPOINTS.js +0 -6
- package/lib/constants/enums/customer.d.ts +11 -0
- package/lib/constants/enums/customer.js +14 -1
- package/lib/constants/enums/order.d.ts +0 -4
- package/lib/constants/enums/order.js +1 -6
- package/lib/helpers/types/api-types.d.ts +31 -1
- package/lib/helpers/types/workers.d.ts +0 -19
- package/package.json +1 -1
|
@@ -66,12 +66,6 @@ export const WORKER_ENDPOINTS = {
|
|
|
66
66
|
UPDATE_WAREHOUSE_LOT_SERIAL_ON_CANCEL_PURCHASE_ORDER: '/update-warehouse-lot-serial-on-cancel-purchase-order',
|
|
67
67
|
UPDATE_WAREHOUSE_LOT_SERIAL_ON_PURCHASE_ORDER_EDIT: '/update-warehouse-lot-serial-on-purchase-order-edit',
|
|
68
68
|
UPDATE_WAREHOUSE_INTERNAL_MOVEMENT_INVENTORY_ON_DELIVERED: '/update-warehouse-internal-movement-inventory-on-delivered',
|
|
69
|
-
// ========================>> Foodstreet <<======================= //
|
|
70
|
-
POSTED_FOODSTREET_ORDER: '/posted-foodstreet-order',
|
|
71
|
-
UPDATED_FOODSTREET_ORIGINAL_ORDER: '/updated-foodstreet-original-order',
|
|
72
|
-
UPDATED_FOODSTREET_SPLIT_ORDER: '/updated-foodstreet-split-order',
|
|
73
|
-
REOPENED_FOODSTREET_ORIGINAL_ORDER: '/reopened-foodstreet-original-order',
|
|
74
|
-
REOPENED_FOODSTREET_SPLIT_ORDER: '/reopened-foodstreet-split-order',
|
|
75
69
|
// ========================>> Activity Logs <<======================= //
|
|
76
70
|
POST_WAREHOUSE_ACTIVITY_LOGS: '/post-warehouse-activity-logs',
|
|
77
71
|
// ========================>> Shift / Business Day / Cash Drawer (compile) <<======================= //
|
|
@@ -3,3 +3,16 @@ export var CUSTOMER_EMAIL_LOGIN_STATUS_ENUM;
|
|
|
3
3
|
CUSTOMER_EMAIL_LOGIN_STATUS_ENUM["LOGGED_IN"] = "logged_in";
|
|
4
4
|
CUSTOMER_EMAIL_LOGIN_STATUS_ENUM["NEEDS_PHONE"] = "needs_phone";
|
|
5
5
|
})(CUSTOMER_EMAIL_LOGIN_STATUS_ENUM || (CUSTOMER_EMAIL_LOGIN_STATUS_ENUM = {}));
|
|
6
|
+
export var CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM;
|
|
7
|
+
(function (CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM) {
|
|
8
|
+
CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM["AVAILABLE"] = "available";
|
|
9
|
+
CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM["LINKED_TO_CURRENT_PHONE"] = "linked_to_current_phone";
|
|
10
|
+
CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM["LINKED_TO_OTHER_PHONE"] = "linked_to_other_phone";
|
|
11
|
+
CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM["ACCOUNT_HAS_DIFFERENT_EMAIL"] = "account_has_different_email";
|
|
12
|
+
})(CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM || (CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM = {}));
|
|
13
|
+
export var CUSTOMER_PHONE_LINK_CHECK_STATUS_ENUM;
|
|
14
|
+
(function (CUSTOMER_PHONE_LINK_CHECK_STATUS_ENUM) {
|
|
15
|
+
CUSTOMER_PHONE_LINK_CHECK_STATUS_ENUM["AVAILABLE"] = "available";
|
|
16
|
+
CUSTOMER_PHONE_LINK_CHECK_STATUS_ENUM["PHONE_HAS_DIFFERENT_EMAIL"] = "phone_has_different_email";
|
|
17
|
+
CUSTOMER_PHONE_LINK_CHECK_STATUS_ENUM["EMAIL_HAS_OTHER_PHONE"] = "email_has_other_phone";
|
|
18
|
+
})(CUSTOMER_PHONE_LINK_CHECK_STATUS_ENUM || (CUSTOMER_PHONE_LINK_CHECK_STATUS_ENUM = {}));
|
|
@@ -105,11 +105,6 @@ export const ALL_SPLIT_BILL_TYPES = Object.values(SPLIT_BILL_TYPE_ENUM);
|
|
|
105
105
|
* - PARENT: Update originated from parent order syncing to children
|
|
106
106
|
* - CHILD: Update originated from child order syncing to parent
|
|
107
107
|
*/
|
|
108
|
-
export var SPLIT_SYNC_SOURCE_ENUM;
|
|
109
|
-
(function (SPLIT_SYNC_SOURCE_ENUM) {
|
|
110
|
-
SPLIT_SYNC_SOURCE_ENUM["PARENT"] = "PARENT";
|
|
111
|
-
SPLIT_SYNC_SOURCE_ENUM["CHILD"] = "CHILD";
|
|
112
|
-
})(SPLIT_SYNC_SOURCE_ENUM || (SPLIT_SYNC_SOURCE_ENUM = {}));
|
|
113
108
|
// ======================>> <<====================== //
|
|
114
109
|
export var VOID_ORDER_ITEM_TYPE_ENUM;
|
|
115
110
|
(function (VOID_ORDER_ITEM_TYPE_ENUM) {
|
|
@@ -55,11 +55,6 @@ export declare const WORKER_ENDPOINTS: {
|
|
|
55
55
|
readonly UPDATE_WAREHOUSE_LOT_SERIAL_ON_CANCEL_PURCHASE_ORDER: "/update-warehouse-lot-serial-on-cancel-purchase-order";
|
|
56
56
|
readonly UPDATE_WAREHOUSE_LOT_SERIAL_ON_PURCHASE_ORDER_EDIT: "/update-warehouse-lot-serial-on-purchase-order-edit";
|
|
57
57
|
readonly UPDATE_WAREHOUSE_INTERNAL_MOVEMENT_INVENTORY_ON_DELIVERED: "/update-warehouse-internal-movement-inventory-on-delivered";
|
|
58
|
-
readonly POSTED_FOODSTREET_ORDER: "/posted-foodstreet-order";
|
|
59
|
-
readonly UPDATED_FOODSTREET_ORIGINAL_ORDER: "/updated-foodstreet-original-order";
|
|
60
|
-
readonly UPDATED_FOODSTREET_SPLIT_ORDER: "/updated-foodstreet-split-order";
|
|
61
|
-
readonly REOPENED_FOODSTREET_ORIGINAL_ORDER: "/reopened-foodstreet-original-order";
|
|
62
|
-
readonly REOPENED_FOODSTREET_SPLIT_ORDER: "/reopened-foodstreet-split-order";
|
|
63
58
|
readonly POST_WAREHOUSE_ACTIVITY_LOGS: "/post-warehouse-activity-logs";
|
|
64
59
|
readonly END_INSTORE_SHIFT: "/end-instore-shift";
|
|
65
60
|
readonly END_TENANT_DAY: "/end-tenant-day";
|
|
@@ -69,12 +69,6 @@ exports.WORKER_ENDPOINTS = {
|
|
|
69
69
|
UPDATE_WAREHOUSE_LOT_SERIAL_ON_CANCEL_PURCHASE_ORDER: '/update-warehouse-lot-serial-on-cancel-purchase-order',
|
|
70
70
|
UPDATE_WAREHOUSE_LOT_SERIAL_ON_PURCHASE_ORDER_EDIT: '/update-warehouse-lot-serial-on-purchase-order-edit',
|
|
71
71
|
UPDATE_WAREHOUSE_INTERNAL_MOVEMENT_INVENTORY_ON_DELIVERED: '/update-warehouse-internal-movement-inventory-on-delivered',
|
|
72
|
-
// ========================>> Foodstreet <<======================= //
|
|
73
|
-
POSTED_FOODSTREET_ORDER: '/posted-foodstreet-order',
|
|
74
|
-
UPDATED_FOODSTREET_ORIGINAL_ORDER: '/updated-foodstreet-original-order',
|
|
75
|
-
UPDATED_FOODSTREET_SPLIT_ORDER: '/updated-foodstreet-split-order',
|
|
76
|
-
REOPENED_FOODSTREET_ORIGINAL_ORDER: '/reopened-foodstreet-original-order',
|
|
77
|
-
REOPENED_FOODSTREET_SPLIT_ORDER: '/reopened-foodstreet-split-order',
|
|
78
72
|
// ========================>> Activity Logs <<======================= //
|
|
79
73
|
POST_WAREHOUSE_ACTIVITY_LOGS: '/post-warehouse-activity-logs',
|
|
80
74
|
// ========================>> Shift / Business Day / Cash Drawer (compile) <<======================= //
|
|
@@ -2,3 +2,14 @@ export declare enum CUSTOMER_EMAIL_LOGIN_STATUS_ENUM {
|
|
|
2
2
|
LOGGED_IN = "logged_in",
|
|
3
3
|
NEEDS_PHONE = "needs_phone"
|
|
4
4
|
}
|
|
5
|
+
export declare enum CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM {
|
|
6
|
+
AVAILABLE = "available",
|
|
7
|
+
LINKED_TO_CURRENT_PHONE = "linked_to_current_phone",
|
|
8
|
+
LINKED_TO_OTHER_PHONE = "linked_to_other_phone",
|
|
9
|
+
ACCOUNT_HAS_DIFFERENT_EMAIL = "account_has_different_email"
|
|
10
|
+
}
|
|
11
|
+
export declare enum CUSTOMER_PHONE_LINK_CHECK_STATUS_ENUM {
|
|
12
|
+
AVAILABLE = "available",
|
|
13
|
+
PHONE_HAS_DIFFERENT_EMAIL = "phone_has_different_email",
|
|
14
|
+
EMAIL_HAS_OTHER_PHONE = "email_has_other_phone"
|
|
15
|
+
}
|
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CUSTOMER_EMAIL_LOGIN_STATUS_ENUM = void 0;
|
|
3
|
+
exports.CUSTOMER_PHONE_LINK_CHECK_STATUS_ENUM = exports.CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM = exports.CUSTOMER_EMAIL_LOGIN_STATUS_ENUM = void 0;
|
|
4
4
|
var CUSTOMER_EMAIL_LOGIN_STATUS_ENUM;
|
|
5
5
|
(function (CUSTOMER_EMAIL_LOGIN_STATUS_ENUM) {
|
|
6
6
|
CUSTOMER_EMAIL_LOGIN_STATUS_ENUM["LOGGED_IN"] = "logged_in";
|
|
7
7
|
CUSTOMER_EMAIL_LOGIN_STATUS_ENUM["NEEDS_PHONE"] = "needs_phone";
|
|
8
8
|
})(CUSTOMER_EMAIL_LOGIN_STATUS_ENUM || (exports.CUSTOMER_EMAIL_LOGIN_STATUS_ENUM = CUSTOMER_EMAIL_LOGIN_STATUS_ENUM = {}));
|
|
9
|
+
var CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM;
|
|
10
|
+
(function (CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM) {
|
|
11
|
+
CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM["AVAILABLE"] = "available";
|
|
12
|
+
CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM["LINKED_TO_CURRENT_PHONE"] = "linked_to_current_phone";
|
|
13
|
+
CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM["LINKED_TO_OTHER_PHONE"] = "linked_to_other_phone";
|
|
14
|
+
CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM["ACCOUNT_HAS_DIFFERENT_EMAIL"] = "account_has_different_email";
|
|
15
|
+
})(CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM || (exports.CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM = CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM = {}));
|
|
16
|
+
var CUSTOMER_PHONE_LINK_CHECK_STATUS_ENUM;
|
|
17
|
+
(function (CUSTOMER_PHONE_LINK_CHECK_STATUS_ENUM) {
|
|
18
|
+
CUSTOMER_PHONE_LINK_CHECK_STATUS_ENUM["AVAILABLE"] = "available";
|
|
19
|
+
CUSTOMER_PHONE_LINK_CHECK_STATUS_ENUM["PHONE_HAS_DIFFERENT_EMAIL"] = "phone_has_different_email";
|
|
20
|
+
CUSTOMER_PHONE_LINK_CHECK_STATUS_ENUM["EMAIL_HAS_OTHER_PHONE"] = "email_has_other_phone";
|
|
21
|
+
})(CUSTOMER_PHONE_LINK_CHECK_STATUS_ENUM || (exports.CUSTOMER_PHONE_LINK_CHECK_STATUS_ENUM = CUSTOMER_PHONE_LINK_CHECK_STATUS_ENUM = {}));
|
|
@@ -85,10 +85,6 @@ export declare const ALL_SPLIT_BILL_TYPES: SPLIT_BILL_TYPE_ENUM[];
|
|
|
85
85
|
* - PARENT: Update originated from parent order syncing to children
|
|
86
86
|
* - CHILD: Update originated from child order syncing to parent
|
|
87
87
|
*/
|
|
88
|
-
export declare enum SPLIT_SYNC_SOURCE_ENUM {
|
|
89
|
-
PARENT = "PARENT",
|
|
90
|
-
CHILD = "CHILD"
|
|
91
|
-
}
|
|
92
88
|
export declare enum VOID_ORDER_ITEM_TYPE_ENUM {
|
|
93
89
|
ITEM_VOID = "ITEM_VOID",
|
|
94
90
|
ORDER_VOID = "ORDER_VOID"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Auto-split from constants/ENUMS.ts — see ENUMS.ts barrel for exports.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.ALL_ORDER_COMPLETION_TYPES = exports.ORDER_COMPLETION_TYPE_ENUM = exports.ALL_VOID_PURCHASE_ORDER_ITEM_TYPES = exports.VOID_PURCHASE_ORDER_ITEM_TYPE_ENUM = exports.ALL_VOID_ORDER_ITEM_TYPES = exports.VOID_ORDER_ITEM_TYPE_ENUM = exports.
|
|
4
|
+
exports.ALL_ORDER_COMPLETION_TYPES = exports.ORDER_COMPLETION_TYPE_ENUM = exports.ALL_VOID_PURCHASE_ORDER_ITEM_TYPES = exports.VOID_PURCHASE_ORDER_ITEM_TYPE_ENUM = exports.ALL_VOID_ORDER_ITEM_TYPES = exports.VOID_ORDER_ITEM_TYPE_ENUM = exports.ALL_SPLIT_BILL_TYPES = exports.SPLIT_BILL_TYPE_ENUM = exports.SORT_TYPE_ENUM = exports.ALL_SORT_ORDER_BY_TYPES = exports.SORT_ORDER_BY_ENUM = exports.ALL_ORDER_ITEM_TYPES = exports.ORDER_ITEM_TYPE_ENUM = exports.ALL_PATHWAY_TO_UNLOCK_TYPE_ORDERS_SCOPES = exports.PATHWAY_TO_UNLOCK_TYPE_ORDERS_SCOPE_ENUM = exports.ALL_ORDER_NUMBER_GROUPING_TYPES = exports.ORDER_NUMBER_GROUPING_TYPE_ENUM = exports.ALL_TRACK_ORDER_NUMBER_TYPES = exports.TRACK_ORDER_NUMBER_ENUM = exports.ALL_ORDER_STATUS_NAMES = exports.ORDER_STATUS_ENUM = exports.ALL_ORDER_TYPE_NAMES = exports.ORDER_TYPE_ENUM = exports.ALL_ORDER_FROM_NAMES = exports.ORDER_FROM_ENUM = void 0;
|
|
5
5
|
var ORDER_FROM_ENUM;
|
|
6
6
|
(function (ORDER_FROM_ENUM) {
|
|
7
7
|
ORDER_FROM_ENUM["WEB"] = "WEB";
|
|
@@ -108,11 +108,6 @@ exports.ALL_SPLIT_BILL_TYPES = Object.values(SPLIT_BILL_TYPE_ENUM);
|
|
|
108
108
|
* - PARENT: Update originated from parent order syncing to children
|
|
109
109
|
* - CHILD: Update originated from child order syncing to parent
|
|
110
110
|
*/
|
|
111
|
-
var SPLIT_SYNC_SOURCE_ENUM;
|
|
112
|
-
(function (SPLIT_SYNC_SOURCE_ENUM) {
|
|
113
|
-
SPLIT_SYNC_SOURCE_ENUM["PARENT"] = "PARENT";
|
|
114
|
-
SPLIT_SYNC_SOURCE_ENUM["CHILD"] = "CHILD";
|
|
115
|
-
})(SPLIT_SYNC_SOURCE_ENUM || (exports.SPLIT_SYNC_SOURCE_ENUM = SPLIT_SYNC_SOURCE_ENUM = {}));
|
|
116
111
|
// ======================>> <<====================== //
|
|
117
112
|
var VOID_ORDER_ITEM_TYPE_ENUM;
|
|
118
113
|
(function (VOID_ORDER_ITEM_TYPE_ENUM) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { CUSTOMER_EMAIL_LOGIN_STATUS_ENUM } from '../../constants/enums/customer';
|
|
1
|
+
import { CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM, CUSTOMER_EMAIL_LOGIN_STATUS_ENUM, CUSTOMER_PHONE_LINK_CHECK_STATUS_ENUM } from '../../constants/enums/customer';
|
|
2
|
+
import { ICustomer } from '../../schemas/types/customers';
|
|
2
3
|
import { CUSTOMER_TARGET_MODE_ENUM, DIALER_TYPES_ENUM, WALLET_ASSET_TYPE_ENUM, WALLET_ASSIGNMENT_BEHAVIOR_ENUM } from '../../constants';
|
|
3
4
|
/**
|
|
4
5
|
* Request/response contracts for backend service APIs, shared between apps and
|
|
@@ -325,3 +326,32 @@ export type TCustomerEmailLoginResponse = {
|
|
|
325
326
|
status: CUSTOMER_EMAIL_LOGIN_STATUS_ENUM.NEEDS_PHONE;
|
|
326
327
|
email_proof: string;
|
|
327
328
|
};
|
|
329
|
+
/** Body for /email/auth/send-otp and /email/auth/verify-otp (encrypted). */
|
|
330
|
+
export interface IEmailAuthTokenRequest {
|
|
331
|
+
token: string;
|
|
332
|
+
}
|
|
333
|
+
/** Body for /email/auth/link-check. */
|
|
334
|
+
export interface IEmailLinkCheckRequest {
|
|
335
|
+
tenant_id: string;
|
|
336
|
+
email: string;
|
|
337
|
+
}
|
|
338
|
+
export interface IEmailLinkCheckResponse {
|
|
339
|
+
status: CUSTOMER_EMAIL_LINK_CHECK_STATUS_ENUM;
|
|
340
|
+
}
|
|
341
|
+
/** Body for /email/auth/phone-check. */
|
|
342
|
+
export interface IEmailPhoneCheckRequest {
|
|
343
|
+
tenant_id: string;
|
|
344
|
+
phone_number: string;
|
|
345
|
+
email_proof: string;
|
|
346
|
+
}
|
|
347
|
+
export interface IEmailPhoneCheckResponse {
|
|
348
|
+
status: CUSTOMER_PHONE_LINK_CHECK_STATUS_ENUM;
|
|
349
|
+
}
|
|
350
|
+
/** Body for /email/auth/link-email (phone Firebase token required). */
|
|
351
|
+
export interface IEmailLinkRequest {
|
|
352
|
+
tenant_id: string;
|
|
353
|
+
email_proof: string;
|
|
354
|
+
}
|
|
355
|
+
export interface IEmailLinkResponse {
|
|
356
|
+
customer: ICustomer;
|
|
357
|
+
}
|
|
@@ -360,25 +360,6 @@ export interface IWorker_SyncDineinTableWithOrder {
|
|
|
360
360
|
export interface IWorker_InternalLeadSubmission {
|
|
361
361
|
lead: IInternalLead;
|
|
362
362
|
}
|
|
363
|
-
export interface IWorker_PostedFoodstreetOrder {
|
|
364
|
-
order: IOrder;
|
|
365
|
-
}
|
|
366
|
-
export interface IWorker_UpdatedFoodstreetOriginalOrder {
|
|
367
|
-
prevOrderJson: IOrder;
|
|
368
|
-
updatedOrderJson: IOrder;
|
|
369
|
-
}
|
|
370
|
-
export interface IWorker_UpdatedFoodstreetSplitOrder {
|
|
371
|
-
prevOrderJson: IOrder;
|
|
372
|
-
updatedOrderJson: IOrder;
|
|
373
|
-
}
|
|
374
|
-
export interface IWorker_ReopenedFoodstreetOriginalOrder {
|
|
375
|
-
prevOrderJson: IOrder;
|
|
376
|
-
updatedOrderJson: IOrder;
|
|
377
|
-
}
|
|
378
|
-
export interface IWorker_ReopenedFoodstreetSplitOrder {
|
|
379
|
-
prevOrderJson: IOrder;
|
|
380
|
-
updatedOrderJson: IOrder;
|
|
381
|
-
}
|
|
382
363
|
export interface IWorker_IncrementCashInHand {
|
|
383
364
|
tenant_id: string;
|
|
384
365
|
staff_id: string;
|