@managesome/eposmatic-toolkit 0.2.236 → 0.2.238

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 (87) hide show
  1. package/lib/constants/REPORT_WEBVIEW.d.ts +28 -0
  2. package/lib/constants/REPORT_WEBVIEW.js +31 -0
  3. package/lib/constants/index.d.ts +1 -0
  4. package/lib/constants/index.js +1 -0
  5. package/lib/helpers/store/cart-actions.js +1 -1
  6. package/lib/helpers/types/index.d.ts +1 -0
  7. package/lib/helpers/types/index.js +1 -0
  8. package/lib/helpers/types/report-webview.d.ts +130 -0
  9. package/lib/helpers/utils/item-report-helpers.js +8 -8
  10. package/lib/helpers/utils/receipt-engine.js +1 -1
  11. package/package.json +1 -1
  12. package/lib/helpers/store/warehouse-cart-actions.d.ts +0 -54
  13. package/lib/helpers/store/warehouse-cart-actions.js +0 -486
  14. package/lib/helpers/store/warehouse-catalog-actions.d.ts +0 -4
  15. package/lib/helpers/store/warehouse-catalog-actions.js +0 -46
  16. package/lib/helpers/types/printer-settings.d.ts +0 -11
  17. package/lib/helpers/types/printer-settings.js +0 -3
  18. package/lib/helpers/types/usable-offers.d.ts +0 -27
  19. package/lib/helpers/types/warehouse-cart-actions.d.ts +0 -51
  20. package/lib/helpers/types/warehouse-cart-actions.js +0 -2
  21. package/lib/helpers/utils/comparison-report-helpers.d.ts +0 -27
  22. package/lib/helpers/utils/comparison-report-helpers.js +0 -802
  23. package/lib/helpers/utils/comparitive-report-helpers.d.ts +0 -7
  24. package/lib/helpers/utils/comparitive-report-helpers.js +0 -826
  25. package/lib/helpers/utils/short-inventory.d.ts +0 -3
  26. package/lib/helpers/utils/short-inventory.js +0 -26
  27. package/lib/helpers/utils/simplified-warehouse-catalog.d.ts +0 -10
  28. package/lib/helpers/utils/simplified-warehouse-catalog.js +0 -108
  29. package/lib/helpers/utils/stock-details.d.ts +0 -3
  30. package/lib/helpers/utils/stock-details.js +0 -26
  31. package/lib/helpers/utils/stock-wastage.d.ts +0 -3
  32. package/lib/helpers/utils/stock-wastage.js +0 -26
  33. package/lib/helpers/utils/warehouse-order-engine.d.ts +0 -9
  34. package/lib/helpers/utils/warehouse-order-engine.js +0 -34
  35. package/lib/schemas/models/drivers.d.ts +0 -55
  36. package/lib/schemas/models/drivers.js +0 -60
  37. package/lib/schemas/models/internal_expense_details.d.ts +0 -55
  38. package/lib/schemas/models/internal_expense_details.js +0 -63
  39. package/lib/schemas/models/internal_restaurant_details.d.ts +0 -64
  40. package/lib/schemas/models/internal_restaurant_details.js +0 -77
  41. package/lib/schemas/models/platform.d.ts +0 -34
  42. package/lib/schemas/models/platform.js +0 -30
  43. package/lib/schemas/models/short_inventory.d.ts +0 -65
  44. package/lib/schemas/models/short_inventory.js +0 -46
  45. package/lib/schemas/models/stock_consumption.d.ts +0 -77
  46. package/lib/schemas/models/stock_consumption.js +0 -64
  47. package/lib/schemas/models/stock_entry.d.ts +0 -65
  48. package/lib/schemas/models/stock_entry.js +0 -46
  49. package/lib/schemas/models/stock_wastage.d.ts +0 -71
  50. package/lib/schemas/models/stock_wastage.js +0 -54
  51. package/lib/schemas/models/tenant_shift_sessions.d.ts +0 -146
  52. package/lib/schemas/models/tenant_shift_sessions.js +0 -125
  53. package/lib/schemas/models/warehouse_settings.d.ts +0 -40
  54. package/lib/schemas/models/warehouse_settings.js +0 -40
  55. package/lib/schemas/types/drivers.d.ts +0 -13
  56. package/lib/schemas/types/drivers.js +0 -2
  57. package/lib/schemas/types/internal_expense_details.d.ts +0 -14
  58. package/lib/schemas/types/internal_expense_details.js +0 -2
  59. package/lib/schemas/types/internal_restaurant_details.d.ts +0 -17
  60. package/lib/schemas/types/internal_restaurant_details.js +0 -2
  61. package/lib/schemas/types/marketing.d.ts +0 -10
  62. package/lib/schemas/types/marketing.js +0 -2
  63. package/lib/schemas/types/platform.d.ts +0 -6
  64. package/lib/schemas/types/platform.js +0 -2
  65. package/lib/schemas/types/pos_days.d.ts +0 -29
  66. package/lib/schemas/types/pos_days.js +0 -2
  67. package/lib/schemas/types/pos_shifts.d.ts +0 -33
  68. package/lib/schemas/types/pos_shifts.js +0 -2
  69. package/lib/schemas/types/short_inventory.d.ts +0 -9
  70. package/lib/schemas/types/short_inventory.js +0 -2
  71. package/lib/schemas/types/split_bill.d.ts +0 -18
  72. package/lib/schemas/types/split_bill.js +0 -2
  73. package/lib/schemas/types/stock_consumption.d.ts +0 -13
  74. package/lib/schemas/types/stock_consumption.js +0 -2
  75. package/lib/schemas/types/stock_entry.d.ts +0 -9
  76. package/lib/schemas/types/stock_entry.js +0 -2
  77. package/lib/schemas/types/stock_wastage.d.ts +0 -11
  78. package/lib/schemas/types/stock_wastage.js +0 -2
  79. package/lib/schemas/types/tenant_shift_sessions.d.ts +0 -33
  80. package/lib/schemas/types/tenant_shift_sessions.js +0 -2
  81. package/lib/schemas/types/third_party_payments.d.ts +0 -41
  82. package/lib/schemas/types/third_party_payments.js +0 -2
  83. package/lib/schemas/types/used_ingredients.d.ts +0 -8
  84. package/lib/schemas/types/used_ingredients.js +0 -2
  85. package/lib/schemas/types/warehouse_settings.d.ts +0 -8
  86. package/lib/schemas/types/warehouse_settings.js +0 -2
  87. /package/lib/helpers/types/{usable-offers.js → report-webview.js} +0 -0
@@ -1,125 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.INSTORE_SHIFT_SESSIONS_COLLECTION_NAME = exports.InstoreShiftSessionSchema = void 0;
4
- const mongoose_1 = require("mongoose");
5
- const constants_1 = require("../../constants");
6
- const common_models_1 = require("./common-models");
7
- const InstoreShiftOpeningSchema = new mongoose_1.Schema({
8
- staff_id: {
9
- type: String,
10
- required: true,
11
- },
12
- staff_name: {
13
- type: String,
14
- required: true,
15
- },
16
- note: {
17
- type: String,
18
- default: '',
19
- },
20
- opened_at: {
21
- type: Date,
22
- required: true,
23
- },
24
- cash_amount: {
25
- type: Number,
26
- required: true,
27
- },
28
- }, { _id: false, minimize: false });
29
- const InstoreShiftClosingSchema = new mongoose_1.Schema({
30
- staff_id: {
31
- type: String,
32
- required: true,
33
- },
34
- staff_name: {
35
- type: String,
36
- required: true,
37
- },
38
- note: {
39
- type: String,
40
- default: '',
41
- },
42
- closed_at: {
43
- type: Date,
44
- required: true,
45
- },
46
- cash_amount: {
47
- type: Number,
48
- required: true,
49
- },
50
- }, { _id: false, minimize: false });
51
- exports.InstoreShiftSessionSchema = new mongoose_1.Schema({
52
- _id: {
53
- type: mongoose_1.Schema.Types.ObjectId,
54
- required: true,
55
- immutable: true,
56
- },
57
- tenant_id: {
58
- type: String,
59
- required: true,
60
- immutable: true,
61
- ref: 'tenants',
62
- },
63
- day_id: {
64
- type: mongoose_1.Schema.Types.ObjectId,
65
- required: true,
66
- },
67
- shift_id: {
68
- type: mongoose_1.Schema.Types.ObjectId,
69
- required: true,
70
- },
71
- shift_number: {
72
- type: Number,
73
- required: true,
74
- },
75
- status: {
76
- type: String,
77
- enum: constants_1.ALL_POS_SHIFT_STATUS,
78
- required: true,
79
- },
80
- opening: {
81
- type: InstoreShiftOpeningSchema,
82
- default: null,
83
- },
84
- closing: {
85
- type: InstoreShiftClosingSchema,
86
- default: null,
87
- },
88
- cash_in_total: {
89
- type: Number,
90
- required: true,
91
- },
92
- cash_out_total: {
93
- type: Number,
94
- required: true,
95
- },
96
- expected_drawer_total: {
97
- type: Number,
98
- required: true,
99
- },
100
- actual_drawer_total: {
101
- type: Number,
102
- required: true,
103
- },
104
- difference: {
105
- type: Number,
106
- required: true,
107
- },
108
- ...common_models_1.LocalTimeFieldsSchema,
109
- createdAt: {
110
- type: mongoose_1.Schema.Types.Date,
111
- required: true,
112
- default: () => new Date(),
113
- immutable: true,
114
- },
115
- updatedAt: {
116
- type: mongoose_1.Schema.Types.Date,
117
- required: true,
118
- default: () => new Date(),
119
- },
120
- }, {
121
- timestamps: true,
122
- versionKey: false,
123
- minimize: false,
124
- });
125
- exports.INSTORE_SHIFT_SESSIONS_COLLECTION_NAME = 'instore_shift_sessions';
@@ -1,40 +0,0 @@
1
- import { Schema } from 'mongoose';
2
- export declare const WarehouseSettingsSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
3
- timestamps: true;
4
- versionKey: false;
5
- minimize: false;
6
- }, {
7
- createdAt: NativeDate;
8
- updatedAt: NativeDate;
9
- } & {
10
- _id: import("mongoose").Types.ObjectId;
11
- createdAt: NativeDate;
12
- updatedAt: NativeDate;
13
- brand_id: string;
14
- tenants: string[];
15
- active: boolean;
16
- }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
17
- createdAt: NativeDate;
18
- updatedAt: NativeDate;
19
- } & {
20
- _id: import("mongoose").Types.ObjectId;
21
- createdAt: NativeDate;
22
- updatedAt: NativeDate;
23
- brand_id: string;
24
- tenants: string[];
25
- active: boolean;
26
- }>> & import("mongoose").FlatRecord<{
27
- createdAt: NativeDate;
28
- updatedAt: NativeDate;
29
- } & {
30
- _id: import("mongoose").Types.ObjectId;
31
- createdAt: NativeDate;
32
- updatedAt: NativeDate;
33
- brand_id: string;
34
- tenants: string[];
35
- active: boolean;
36
- }> & Required<{
37
- _id: import("mongoose").Types.ObjectId;
38
- }> & {
39
- __v: number;
40
- }>;
@@ -1,40 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WarehouseSettingsSchema = void 0;
4
- const mongoose_1 = require("mongoose");
5
- exports.WarehouseSettingsSchema = new mongoose_1.Schema({
6
- _id: {
7
- type: mongoose_1.Schema.Types.ObjectId,
8
- required: true,
9
- immutable: true,
10
- },
11
- brand_id: {
12
- type: String,
13
- required: true,
14
- immutable: true,
15
- ref: 'brands',
16
- },
17
- tenants: {
18
- type: [{ type: String, ref: 'tenants' }],
19
- required: true,
20
- },
21
- active: {
22
- type: Boolean,
23
- required: true,
24
- },
25
- createdAt: {
26
- type: mongoose_1.Schema.Types.Date,
27
- required: true,
28
- default: () => new Date(),
29
- immutable: true,
30
- },
31
- updatedAt: {
32
- type: mongoose_1.Schema.Types.Date,
33
- required: true,
34
- default: () => new Date(),
35
- },
36
- }, {
37
- timestamps: true,
38
- versionKey: false,
39
- minimize: false,
40
- });
@@ -1,13 +0,0 @@
1
- export interface IDriver {
2
- _id: string;
3
- tenant_id: string;
4
- display_name: string;
5
- phone_number: number;
6
- license_number: string;
7
- license_expiry_date: Date;
8
- vehicle_type: string;
9
- vehicle_registration_number: string;
10
- active: boolean;
11
- createdAt: Date;
12
- updatedAt: Date;
13
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,14 +0,0 @@
1
- import { INTERNAL_EXPENSE_CATEGORY_TYPE_ENUM, INTERNAL_PAYMENT_STATUS_TYPE_ENUM } from '../../constants';
2
- export interface IInternalExpenseDetails {
3
- _id: string;
4
- provider_id: string;
5
- restaurant_name: string;
6
- expense_category: INTERNAL_EXPENSE_CATEGORY_TYPE_ENUM;
7
- description: string | null;
8
- total_amount: number;
9
- expense_payment_status: INTERNAL_PAYMENT_STATUS_TYPE_ENUM;
10
- date_incurred: Date;
11
- image_url: string | null;
12
- createdAt: Date;
13
- updatedAt: Date;
14
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,17 +0,0 @@
1
- import { INTERNAL_PAYMENT_STATUS_TYPE_ENUM, INTERNAL_RESTAURANT_STATUS_TYPE_ENUM, INTERNAL_SUBSCRIPTIONS_TYPE_ENUM, INTERNAL_SUBSCRIPTION_PLAN_TYPE_ENUM } from '../../constants';
2
- export interface IInternalRestaurantDetails {
3
- _id: string;
4
- provider_id: string;
5
- restaurant_name: string;
6
- restaurant_status: INTERNAL_RESTAURANT_STATUS_TYPE_ENUM;
7
- subscriptions: INTERNAL_SUBSCRIPTIONS_TYPE_ENUM[];
8
- subscription_plan: INTERNAL_SUBSCRIPTION_PLAN_TYPE_ENUM;
9
- subscription_amount: number;
10
- hardware_amount: number;
11
- payment_status: INTERNAL_PAYMENT_STATUS_TYPE_ENUM;
12
- notes?: string;
13
- image_url: string | null;
14
- date_incurred: Date;
15
- createdAt: Date;
16
- updatedAt: Date;
17
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,10 +0,0 @@
1
- import { MARKETING_RECEIPIENT_ENUM, MARKETING_TYPE_ENUM } from '../../constants';
2
- export interface ICreateMarketing {
3
- types: MARKETING_TYPE_ENUM[];
4
- recipient: MARKETING_RECEIPIENT_ENUM;
5
- message: string;
6
- total_recipients?: number;
7
- phone_numbers?: string[];
8
- emails?: string[];
9
- inactive_since?: Date;
10
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- export interface IPlatform {
2
- _id: string;
3
- name: string;
4
- createdAt: Date;
5
- updatedAt: Date;
6
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,29 +0,0 @@
1
- import { POS_DAY_STATUS_ENUM } from '../../constants';
2
- import { ILocalTimeFields } from '../../helpers';
3
- export interface IPosDayOpening {
4
- staff_id: string;
5
- staff_name: string;
6
- note: string;
7
- opened_at: Date;
8
- cash_amount: number;
9
- }
10
- export interface IPosDayClosing {
11
- staff_id: string;
12
- staff_name: string;
13
- note: string;
14
- closed_at: Date;
15
- cash_amount: number;
16
- expected_cash_amount: number;
17
- difference: number;
18
- cash_amount_id: string | null;
19
- }
20
- export interface IPosDay extends ILocalTimeFields {
21
- _id: string;
22
- tenant_id: string;
23
- status: POS_DAY_STATUS_ENUM;
24
- opening: IPosDayOpening | null;
25
- closing: IPosDayClosing | null;
26
- shifts: string[];
27
- createdAt: Date;
28
- updatedAt: Date;
29
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,33 +0,0 @@
1
- import { POS_SHIFT_STATUS_ENUM } from '../../constants';
2
- import { ILocalTimeFields } from '../../helpers';
3
- export interface IPosShiftOpening {
4
- staff_id: string;
5
- staff_name: string;
6
- note: string;
7
- opened_at: Date;
8
- cash_amount: number;
9
- }
10
- export interface IPosShiftClosing {
11
- staff_id: string;
12
- staff_name: string;
13
- note: string;
14
- closed_at: Date;
15
- cash_amount: number;
16
- }
17
- export interface IPosShift extends ILocalTimeFields {
18
- _id: string;
19
- tenant_id: string;
20
- day_id: string;
21
- shift_id: string;
22
- shift_number: number;
23
- status: POS_SHIFT_STATUS_ENUM;
24
- opening: IPosShiftOpening | null;
25
- closing: IPosShiftClosing | null;
26
- cash_in_total: number;
27
- cash_out_total: number;
28
- expected_drawer_total: number;
29
- actual_drawer_total: number;
30
- difference: number;
31
- createdAt: Date;
32
- updatedAt: Date;
33
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +0,0 @@
1
- export interface IShortInventory {
2
- _id: string;
3
- tenant_id: string;
4
- inventory_code: string;
5
- quantity: number;
6
- date_incurred: Date;
7
- createdAt: Date;
8
- updatedAt: Date;
9
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,18 +0,0 @@
1
- import { SPLIT_BILL_TYPE_ENUM } from '../../constants';
2
- export interface ISplitBillItem {
3
- _id: string;
4
- item_id: string;
5
- split_id: string;
6
- quantity: number;
7
- }
8
- export interface ISplitBillCheck {
9
- _id: string;
10
- portions?: number | null;
11
- seat_number?: number | null;
12
- split_items?: ISplitBillItem[] | null;
13
- split_amount?: number | null;
14
- }
15
- export interface ISplitBill {
16
- checks: ISplitBillCheck[];
17
- split_type: SPLIT_BILL_TYPE_ENUM;
18
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,13 +0,0 @@
1
- export interface IStockConsumption {
2
- _id: string;
3
- tenant_id: string;
4
- inventory_code: string;
5
- quantity: number;
6
- order_id: string;
7
- order_number: number | null;
8
- item_id: string;
9
- item_name: string;
10
- date_incurred: Date;
11
- createdAt: Date;
12
- updatedAt: Date;
13
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +0,0 @@
1
- export interface IStockEntry {
2
- _id: string;
3
- tenant_id: string;
4
- inventory_code: string;
5
- quantity: number;
6
- date_incurred: Date;
7
- createdAt: Date;
8
- updatedAt: Date;
9
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,11 +0,0 @@
1
- export interface IStockWastage {
2
- _id: string;
3
- tenant_id: string;
4
- inventory_code: string;
5
- quantity_wasted: number;
6
- reason: string;
7
- staff_name: string;
8
- date_incurred: Date;
9
- createdAt: Date;
10
- updatedAt: Date;
11
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,33 +0,0 @@
1
- import { POS_SHIFT_STATUS_ENUM } from '../../constants';
2
- import { ILocalTimeFields } from '../../helpers';
3
- export interface IInstoreShiftOpening {
4
- staff_id: string;
5
- staff_name: string;
6
- note: string;
7
- opened_at: Date;
8
- cash_amount: number;
9
- }
10
- export interface IInstoreShiftClosing {
11
- staff_id: string;
12
- staff_name: string;
13
- note: string;
14
- closed_at: Date;
15
- cash_amount: number;
16
- }
17
- export interface IInstoreShiftSession extends ILocalTimeFields {
18
- _id: string;
19
- tenant_id: string;
20
- day_id: string;
21
- shift_id: string;
22
- shift_number: number;
23
- status: POS_SHIFT_STATUS_ENUM;
24
- opening: IInstoreShiftOpening | null;
25
- closing: IInstoreShiftClosing | null;
26
- cash_in_total: number;
27
- cash_out_total: number;
28
- expected_drawer_total: number;
29
- actual_drawer_total: number;
30
- difference: number;
31
- createdAt: Date;
32
- updatedAt: Date;
33
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,41 +0,0 @@
1
- export interface IThirdPartyCardPayments {
2
- _id: string;
3
- order_id: string;
4
- phone: string;
5
- platform: string;
6
- tenant_id: string;
7
- tenant_name: string;
8
- transaction_id: string;
9
- amount_charged: string;
10
- amount_due: string;
11
- amount_received: number;
12
- amount_capturable: number;
13
- application_fee_amount: number;
14
- currency_symbol: string;
15
- description: string | null;
16
- customer: string | null;
17
- currency: string;
18
- status: string;
19
- createdAt: Date;
20
- }
21
- export interface IThirdPartyCardPayouts {
22
- _id: string;
23
- amount: number;
24
- currency: string;
25
- description: string | null;
26
- method: string;
27
- source_type: string;
28
- status: string;
29
- type: string;
30
- arrival_date: Date;
31
- failure_reason?: string | null;
32
- createdAt: Date;
33
- }
34
- export interface IThirdPartyCardRefunds {
35
- _id: string;
36
- amount: number;
37
- currency: string;
38
- description: string | null;
39
- failure_reason?: string | null;
40
- createdAt: Date;
41
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +0,0 @@
1
- export interface IUsedIngredient {
2
- _id: string;
3
- item_id: string;
4
- ref: string | null;
5
- modifier_level: number;
6
- inventory_code: string;
7
- usage_quantity: number;
8
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +0,0 @@
1
- export interface IWarehouseSetting {
2
- _id: string;
3
- brand_id: string;
4
- tenants: string[];
5
- active: boolean;
6
- createdAt: Date;
7
- updatedAt: Date;
8
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });