@managesome/eposmatic-toolkit 0.2.426 → 0.2.429

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 (128) hide show
  1. package/lib/constants/RFQ.js +8 -8
  2. package/lib/schemas/models/applied_order_discounts.d.ts +80 -0
  3. package/lib/schemas/models/applied_order_discounts.js +106 -0
  4. package/lib/schemas/models/brands.d.ts +45 -0
  5. package/lib/schemas/models/brands.js +45 -0
  6. package/lib/schemas/models/categories.d.ts +60 -0
  7. package/lib/schemas/models/categories.js +67 -0
  8. package/lib/schemas/models/close_dates.js +2 -2
  9. package/lib/schemas/models/dinein_tables.d.ts +6 -6
  10. package/lib/schemas/models/dinein_tables_fingerprints.d.ts +65 -0
  11. package/lib/schemas/models/dinein_tables_fingerprints.js +85 -0
  12. package/lib/schemas/models/discounts.js +3 -3
  13. package/lib/schemas/models/expense_categories.d.ts +83 -0
  14. package/lib/schemas/models/expense_categories.js +64 -0
  15. package/lib/schemas/models/halfhalf_setup.js +3 -3
  16. package/lib/schemas/models/index.d.ts +23 -23
  17. package/lib/schemas/models/index.js +23 -23
  18. package/lib/schemas/models/inventories.d.ts +99 -0
  19. package/lib/schemas/models/inventories.js +87 -0
  20. package/lib/schemas/models/inventory_lot_serial_numbers.d.ts +15 -15
  21. package/lib/schemas/models/items.d.ts +11269 -0
  22. package/lib/schemas/models/items.js +333 -0
  23. package/lib/schemas/models/menus.d.ts +941 -0
  24. package/lib/schemas/models/menus.js +69 -0
  25. package/lib/schemas/models/offers.js +3 -3
  26. package/lib/schemas/models/orders.d.ts +15437 -0
  27. package/lib/schemas/models/orders.js +891 -0
  28. package/lib/schemas/models/public_holidays.js +2 -2
  29. package/lib/schemas/models/purchase_order_receipts.d.ts +3 -3
  30. package/lib/schemas/models/purchase_order_receipts.js +2 -2
  31. package/lib/schemas/models/purchase_order_rfqs.d.ts +1959 -0
  32. package/lib/schemas/models/purchase_order_rfqs.js +328 -0
  33. package/lib/schemas/models/purchase_order_vendor_returns.d.ts +15 -15
  34. package/lib/schemas/models/purchase_order_vendor_returns.js +2 -2
  35. package/lib/schemas/models/purchase_orders.js +4 -4
  36. package/lib/schemas/models/riders.d.ts +65 -0
  37. package/lib/schemas/models/riders.js +74 -0
  38. package/lib/schemas/models/specials.js +3 -3
  39. package/lib/schemas/models/tenant_staffs.d.ts +932 -0
  40. package/lib/schemas/models/tenant_staffs.js +96 -0
  41. package/lib/schemas/models/tenants.d.ts +528 -0
  42. package/lib/schemas/models/tenants.js +755 -0
  43. package/lib/schemas/models/track_order_numbers.d.ts +413 -0
  44. package/lib/schemas/models/track_order_numbers.js +45 -0
  45. package/lib/schemas/models/void_purchase_order_items.js +2 -2
  46. package/lib/schemas/models/void_warehouse_invoice_items.d.ts +6 -6
  47. package/lib/schemas/models/void_warehouse_invoice_items.js +2 -2
  48. package/lib/schemas/models/wallets.d.ts +38 -0
  49. package/lib/schemas/models/wallets.js +37 -0
  50. package/lib/schemas/models/warehouse-activity-logs.js +2 -2
  51. package/lib/schemas/models/warehouse_communications.d.ts +228 -0
  52. package/lib/schemas/models/warehouse_communications.js +216 -0
  53. package/lib/schemas/models/warehouse_internal_movements.d.ts +33 -34
  54. package/lib/schemas/models/warehouse_internal_movements.js +2 -34
  55. package/lib/schemas/models/warehouse_invoices.js +2 -2
  56. package/lib/schemas/models/warehouse_items.js +2 -2
  57. package/lib/schemas/models/warehouse_sale_deliveries.d.ts +167 -0
  58. package/lib/schemas/models/warehouse_sale_deliveries.js +155 -0
  59. package/lib/schemas/models/warehouse_sale_invoices.d.ts +227 -0
  60. package/lib/schemas/models/warehouse_sale_invoices.js +206 -0
  61. package/lib/schemas/models/warehouse_sale_order_rfqs.d.ts +1938 -0
  62. package/lib/schemas/models/warehouse_sale_order_rfqs.js +309 -0
  63. package/lib/schemas/models/warehouse_sale_orders.d.ts +1943 -0
  64. package/lib/schemas/models/warehouse_sale_orders.js +324 -0
  65. package/lib/schemas/models/warehouse_staffs.d.ts +65 -0
  66. package/lib/schemas/models/warehouse_staffs.js +78 -0
  67. package/lib/schemas/models/warehouse_track_order_numbers.d.ts +50 -0
  68. package/lib/schemas/models/warehouse_track_order_numbers.js +52 -0
  69. package/lib/schemas/models/warehouse_vendors.d.ts +3 -3
  70. package/lib/schemas/models/warehouses.d.ts +162 -0
  71. package/lib/schemas/models/warehouses.js +222 -0
  72. package/lib/schemas/types/applied_order_discounts.d.ts +22 -0
  73. package/lib/schemas/types/applied_order_discounts.js +2 -0
  74. package/lib/schemas/types/brands.d.ts +32 -0
  75. package/lib/schemas/types/brands.js +2 -0
  76. package/lib/schemas/types/categories.d.ts +15 -0
  77. package/lib/schemas/types/categories.js +2 -0
  78. package/lib/schemas/types/deliveries.d.ts +1 -1
  79. package/lib/schemas/types/expense_categories.d.ts +20 -0
  80. package/lib/schemas/types/expense_categories.js +2 -0
  81. package/lib/schemas/types/expense_details.d.ts +1 -1
  82. package/lib/schemas/types/index.d.ts +22 -22
  83. package/lib/schemas/types/index.js +22 -22
  84. package/lib/schemas/types/inventories.d.ts +48 -0
  85. package/lib/schemas/types/inventories.js +2 -0
  86. package/lib/schemas/types/items.d.ts +89 -0
  87. package/lib/schemas/types/items.js +2 -0
  88. package/lib/schemas/types/menus.d.ts +17 -0
  89. package/lib/schemas/types/menus.js +2 -0
  90. package/lib/schemas/types/multi_tenants.d.ts +2 -2
  91. package/lib/schemas/types/orders.d.ts +242 -0
  92. package/lib/schemas/types/orders.js +2 -0
  93. package/lib/schemas/types/purchase_order_common.d.ts +1 -1
  94. package/lib/schemas/types/purchase_order_rfqs.d.ts +33 -0
  95. package/lib/schemas/types/purchase_order_rfqs.js +2 -0
  96. package/lib/schemas/types/purchase_orders.d.ts +1 -1
  97. package/lib/schemas/types/reservations.d.ts +1 -1
  98. package/lib/schemas/types/riders.d.ts +16 -0
  99. package/lib/schemas/types/riders.js +2 -0
  100. package/lib/schemas/types/sale_order_common.d.ts +1 -1
  101. package/lib/schemas/types/specials.d.ts +1 -1
  102. package/lib/schemas/types/tenant_staffs.d.ts +22 -0
  103. package/lib/schemas/types/tenant_staffs.js +2 -0
  104. package/lib/schemas/types/tenants.d.ts +205 -0
  105. package/lib/schemas/types/tenants.js +2 -0
  106. package/lib/schemas/types/track_order_numbers.d.ts +10 -0
  107. package/lib/schemas/types/track_order_numbers.js +2 -0
  108. package/lib/schemas/types/wallets.d.ts +7 -0
  109. package/lib/schemas/types/wallets.js +2 -0
  110. package/lib/schemas/types/warehouse_communications.d.ts +54 -0
  111. package/lib/schemas/types/warehouse_communications.js +2 -0
  112. package/lib/schemas/types/warehouse_internal_movements.d.ts +2 -2
  113. package/lib/schemas/types/warehouse_invoices.d.ts +1 -1
  114. package/lib/schemas/types/warehouse_sale_deliveries.d.ts +67 -0
  115. package/lib/schemas/types/warehouse_sale_deliveries.js +2 -0
  116. package/lib/schemas/types/warehouse_sale_invoices.d.ts +49 -0
  117. package/lib/schemas/types/warehouse_sale_invoices.js +2 -0
  118. package/lib/schemas/types/warehouse_sale_order_rfqs.d.ts +25 -0
  119. package/lib/schemas/types/warehouse_sale_order_rfqs.js +2 -0
  120. package/lib/schemas/types/warehouse_sale_orders.d.ts +30 -0
  121. package/lib/schemas/types/warehouse_sale_orders.js +2 -0
  122. package/lib/schemas/types/warehouse_staffs.d.ts +17 -0
  123. package/lib/schemas/types/warehouse_staffs.js +2 -0
  124. package/lib/schemas/types/warehouse_track_order_numbers.d.ts +11 -0
  125. package/lib/schemas/types/warehouse_track_order_numbers.js +2 -0
  126. package/lib/schemas/types/warehouses.d.ts +49 -0
  127. package/lib/schemas/types/warehouses.js +2 -0
  128. package/package.json +1 -1
@@ -26,13 +26,13 @@ function getRfqRespondPageResult(code, action, rfqType) {
26
26
  case RFQ_PUBLIC_RESPOND_CODE_ENUM.PROCESSED:
27
27
  return {
28
28
  status: 'PENDING',
29
- title: action === RFQ_PUBLIC_RESPOND_ACTION_ENUM.CONFIRM ? `${label} Approved` : `${label} Cancelled`,
29
+ title: action === RFQ_PUBLIC_RESPOND_ACTION_ENUM.CONFIRM ? `${label} Accepted` : `${label} Declined`,
30
30
  message: getRfqPublicRespondMessage(code, action),
31
31
  };
32
32
  case RFQ_PUBLIC_RESPOND_CODE_ENUM.ALREADY_PROCESSED:
33
33
  return {
34
34
  status: 'COMPLETED',
35
- title: action === RFQ_PUBLIC_RESPOND_ACTION_ENUM.CONFIRM ? 'Already Approved' : 'Already Cancelled',
35
+ title: action === RFQ_PUBLIC_RESPOND_ACTION_ENUM.CONFIRM ? 'Already Accepted' : 'Already Declined',
36
36
  message: getRfqPublicRespondMessage(code, action),
37
37
  };
38
38
  case RFQ_PUBLIC_RESPOND_CODE_ENUM.EXPIRED:
@@ -66,20 +66,20 @@ function getRfqPublicRespondMessage(code, action) {
66
66
  switch (code) {
67
67
  case RFQ_PUBLIC_RESPOND_CODE_ENUM.PROCESSED:
68
68
  return action === RFQ_PUBLIC_RESPOND_ACTION_ENUM.CONFIRM
69
- ? 'The RFQ has been approved successfully.'
70
- : 'The RFQ has been cancelled successfully.';
69
+ ? 'You have accepted this RFQ. The buyer will review your response.'
70
+ : 'You have declined this RFQ.';
71
71
  case RFQ_PUBLIC_RESPOND_CODE_ENUM.ALREADY_PROCESSED:
72
72
  return action === RFQ_PUBLIC_RESPOND_ACTION_ENUM.CONFIRM
73
- ? 'This RFQ has already been approved.'
74
- : 'This RFQ has already been cancelled.';
73
+ ? 'You have already accepted this RFQ.'
74
+ : 'You have already declined this RFQ.';
75
75
  case RFQ_PUBLIC_RESPOND_CODE_ENUM.EXPIRED:
76
76
  return 'This RFQ has expired and can no longer be responded to.';
77
77
  case RFQ_PUBLIC_RESPOND_CODE_ENUM.NOT_FOUND:
78
78
  return 'This RFQ could not be found. It may have been deleted or the link is invalid.';
79
79
  case RFQ_PUBLIC_RESPOND_CODE_ENUM.INVALID_TRANSITION:
80
80
  return action === RFQ_PUBLIC_RESPOND_ACTION_ENUM.CONFIRM
81
- ? 'This RFQ has already been cancelled and cannot be approved.'
82
- : 'This RFQ has already been approved and cannot be cancelled via this link.';
81
+ ? 'This RFQ has already been declined and cannot be accepted.'
82
+ : 'This RFQ has already been accepted and cannot be declined via this link.';
83
83
  default:
84
84
  return 'An unknown error occurred.';
85
85
  }
@@ -0,0 +1,80 @@
1
+ import { Schema } from 'mongoose';
2
+ export declare const AppliedOrderDiscountsSchema: 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
+ type: import("../../constants").DISCOUNT_TYPE_ENUM;
12
+ name: string;
13
+ tenant_id: string;
14
+ order_id: import("mongoose").Types.ObjectId;
15
+ discount_id: string;
16
+ applicability: import("../../constants").DISCOUNT_APPLICABILITY_ENUM;
17
+ platform: import("../../constants").PLATFORMS_ENUM;
18
+ order_amount: number;
19
+ discount_amount: number;
20
+ reason: string;
21
+ staff_id: string;
22
+ staff_phone: string;
23
+ staff_name: string;
24
+ createdAt_mins: number;
25
+ createdAt: NativeDate;
26
+ updatedAt: NativeDate;
27
+ discount_rate?: number | null | undefined;
28
+ reference_number?: string | null | undefined;
29
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
30
+ createdAt: NativeDate;
31
+ updatedAt: NativeDate;
32
+ } & {
33
+ _id: import("mongoose").Types.ObjectId;
34
+ type: import("../../constants").DISCOUNT_TYPE_ENUM;
35
+ name: string;
36
+ tenant_id: string;
37
+ order_id: import("mongoose").Types.ObjectId;
38
+ discount_id: string;
39
+ applicability: import("../../constants").DISCOUNT_APPLICABILITY_ENUM;
40
+ platform: import("../../constants").PLATFORMS_ENUM;
41
+ order_amount: number;
42
+ discount_amount: number;
43
+ reason: string;
44
+ staff_id: string;
45
+ staff_phone: string;
46
+ staff_name: string;
47
+ createdAt_mins: number;
48
+ createdAt: NativeDate;
49
+ updatedAt: NativeDate;
50
+ discount_rate?: number | null | undefined;
51
+ reference_number?: string | null | undefined;
52
+ }>> & import("mongoose").FlatRecord<{
53
+ createdAt: NativeDate;
54
+ updatedAt: NativeDate;
55
+ } & {
56
+ _id: import("mongoose").Types.ObjectId;
57
+ type: import("../../constants").DISCOUNT_TYPE_ENUM;
58
+ name: string;
59
+ tenant_id: string;
60
+ order_id: import("mongoose").Types.ObjectId;
61
+ discount_id: string;
62
+ applicability: import("../../constants").DISCOUNT_APPLICABILITY_ENUM;
63
+ platform: import("../../constants").PLATFORMS_ENUM;
64
+ order_amount: number;
65
+ discount_amount: number;
66
+ reason: string;
67
+ staff_id: string;
68
+ staff_phone: string;
69
+ staff_name: string;
70
+ createdAt_mins: number;
71
+ createdAt: NativeDate;
72
+ updatedAt: NativeDate;
73
+ discount_rate?: number | null | undefined;
74
+ reference_number?: string | null | undefined;
75
+ }> & Required<{
76
+ _id: import("mongoose").Types.ObjectId;
77
+ }> & {
78
+ __v: number;
79
+ }>;
80
+ export declare const APPLIED_ORDER_DISCOUNTS_COLLECTION_NAME = "applied_order_discounts";
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.APPLIED_ORDER_DISCOUNTS_COLLECTION_NAME = exports.AppliedOrderDiscountsSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const constants_1 = require("../../constants");
6
+ exports.AppliedOrderDiscountsSchema = new mongoose_1.Schema({
7
+ _id: {
8
+ type: mongoose_1.Schema.Types.ObjectId,
9
+ required: true,
10
+ immutable: true,
11
+ },
12
+ tenant_id: {
13
+ type: String,
14
+ required: true,
15
+ immutable: true,
16
+ ref: 'tenants',
17
+ },
18
+ order_id: {
19
+ type: mongoose_1.Schema.Types.ObjectId,
20
+ required: true,
21
+ immutable: true,
22
+ },
23
+ discount_id: {
24
+ type: String,
25
+ required: true,
26
+ },
27
+ type: {
28
+ type: String,
29
+ required: true,
30
+ enum: constants_1.ALL_DISCOUNT_TYPES,
31
+ },
32
+ applicability: {
33
+ type: String,
34
+ required: true,
35
+ enum: constants_1.ALL_DISCOUNT_APPLICABILITY_TYPES,
36
+ },
37
+ platform: {
38
+ type: String,
39
+ enum: constants_1.ALL_PLATFORMS,
40
+ required: true,
41
+ },
42
+ name: {
43
+ type: String,
44
+ required: true,
45
+ },
46
+ order_amount: {
47
+ type: Number,
48
+ required: true,
49
+ min: 0,
50
+ },
51
+ discount_amount: {
52
+ type: Number,
53
+ required: true,
54
+ min: 0,
55
+ },
56
+ discount_rate: {
57
+ type: Number,
58
+ required: false,
59
+ default: null,
60
+ },
61
+ reason: {
62
+ type: String,
63
+ required: true,
64
+ },
65
+ reference_number: {
66
+ type: String,
67
+ required: false,
68
+ },
69
+ staff_id: {
70
+ type: String,
71
+ required: true,
72
+ },
73
+ staff_phone: {
74
+ type: String,
75
+ required: true,
76
+ },
77
+ staff_name: {
78
+ type: String,
79
+ required: true,
80
+ },
81
+ createdAt_mins: {
82
+ type: Number,
83
+ required: true,
84
+ immutable: true,
85
+ default: () => {
86
+ const date = new Date();
87
+ return Math.floor(date.getHours() * 60 + date.getMinutes());
88
+ },
89
+ },
90
+ createdAt: {
91
+ type: mongoose_1.Schema.Types.Date,
92
+ required: true,
93
+ default: () => new Date(),
94
+ immutable: true,
95
+ },
96
+ updatedAt: {
97
+ type: mongoose_1.Schema.Types.Date,
98
+ required: true,
99
+ default: () => new Date(),
100
+ },
101
+ }, {
102
+ timestamps: true,
103
+ versionKey: false,
104
+ minimize: false,
105
+ });
106
+ exports.APPLIED_ORDER_DISCOUNTS_COLLECTION_NAME = 'applied_order_discounts';
@@ -0,0 +1,45 @@
1
+ import { Schema } from 'mongoose';
2
+ import { MULTI_TENANT_WEBSITE_TYPE_ENUM } from '../../constants';
3
+ export declare const BrandSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
4
+ timestamps: true;
5
+ versionKey: false;
6
+ minimize: false;
7
+ }, {
8
+ createdAt: NativeDate;
9
+ updatedAt: NativeDate;
10
+ } & {
11
+ _id: string;
12
+ name: string;
13
+ createdAt: NativeDate;
14
+ updatedAt: NativeDate;
15
+ image_url: string;
16
+ multi_tenant_website: string;
17
+ website_display_type: MULTI_TENANT_WEBSITE_TYPE_ENUM;
18
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
19
+ createdAt: NativeDate;
20
+ updatedAt: NativeDate;
21
+ } & {
22
+ _id: string;
23
+ name: string;
24
+ createdAt: NativeDate;
25
+ updatedAt: NativeDate;
26
+ image_url: string;
27
+ multi_tenant_website: string;
28
+ website_display_type: MULTI_TENANT_WEBSITE_TYPE_ENUM;
29
+ }>> & import("mongoose").FlatRecord<{
30
+ createdAt: NativeDate;
31
+ updatedAt: NativeDate;
32
+ } & {
33
+ _id: string;
34
+ name: string;
35
+ createdAt: NativeDate;
36
+ updatedAt: NativeDate;
37
+ image_url: string;
38
+ multi_tenant_website: string;
39
+ website_display_type: MULTI_TENANT_WEBSITE_TYPE_ENUM;
40
+ }> & Required<{
41
+ _id: string;
42
+ }> & {
43
+ __v: number;
44
+ }>;
45
+ export declare const BRANDS_COLLECTION_NAME = "brands";
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BRANDS_COLLECTION_NAME = exports.BrandSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const constants_1 = require("../../constants");
6
+ exports.BrandSchema = new mongoose_1.Schema({
7
+ _id: {
8
+ type: String,
9
+ required: true,
10
+ immutable: true,
11
+ },
12
+ name: {
13
+ type: String,
14
+ required: true,
15
+ },
16
+ image_url: {
17
+ type: String,
18
+ required: true,
19
+ },
20
+ multi_tenant_website: {
21
+ type: String,
22
+ default: null,
23
+ },
24
+ website_display_type: {
25
+ type: String,
26
+ enum: constants_1.ALL_MULTI_TENANT_WEBSITE_TYPES,
27
+ default: constants_1.MULTI_TENANT_WEBSITE_TYPE_ENUM.DEFAULT,
28
+ },
29
+ createdAt: {
30
+ type: mongoose_1.Schema.Types.Date,
31
+ required: true,
32
+ default: () => new Date(),
33
+ immutable: true,
34
+ },
35
+ updatedAt: {
36
+ type: mongoose_1.Schema.Types.Date,
37
+ required: true,
38
+ default: () => new Date(),
39
+ },
40
+ }, {
41
+ timestamps: true,
42
+ versionKey: false,
43
+ minimize: false,
44
+ });
45
+ exports.BRANDS_COLLECTION_NAME = 'brands';
@@ -0,0 +1,60 @@
1
+ import { Schema } from 'mongoose';
2
+ import { CATEGORY_DISPLAY_TYPE_ENUM } from '../../constants';
3
+ export declare const CategorySchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
4
+ timestamps: true;
5
+ versionKey: false;
6
+ minimize: false;
7
+ }, {
8
+ createdAt: NativeDate;
9
+ updatedAt: NativeDate;
10
+ } & {
11
+ _id: import("mongoose").Types.ObjectId;
12
+ name: string;
13
+ tenants: string[];
14
+ createdAt: NativeDate;
15
+ updatedAt: NativeDate;
16
+ image_url: string;
17
+ brand_id: string;
18
+ subtitle: string;
19
+ active: boolean;
20
+ sort_id: number;
21
+ display_type: CATEGORY_DISPLAY_TYPE_ENUM;
22
+ banner_url?: string | null | undefined;
23
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
24
+ createdAt: NativeDate;
25
+ updatedAt: NativeDate;
26
+ } & {
27
+ _id: import("mongoose").Types.ObjectId;
28
+ name: string;
29
+ tenants: string[];
30
+ createdAt: NativeDate;
31
+ updatedAt: NativeDate;
32
+ image_url: string;
33
+ brand_id: string;
34
+ subtitle: string;
35
+ active: boolean;
36
+ sort_id: number;
37
+ display_type: CATEGORY_DISPLAY_TYPE_ENUM;
38
+ banner_url?: string | null | undefined;
39
+ }>> & import("mongoose").FlatRecord<{
40
+ createdAt: NativeDate;
41
+ updatedAt: NativeDate;
42
+ } & {
43
+ _id: import("mongoose").Types.ObjectId;
44
+ name: string;
45
+ tenants: string[];
46
+ createdAt: NativeDate;
47
+ updatedAt: NativeDate;
48
+ image_url: string;
49
+ brand_id: string;
50
+ subtitle: string;
51
+ active: boolean;
52
+ sort_id: number;
53
+ display_type: CATEGORY_DISPLAY_TYPE_ENUM;
54
+ banner_url?: string | null | undefined;
55
+ }> & Required<{
56
+ _id: import("mongoose").Types.ObjectId;
57
+ }> & {
58
+ __v: number;
59
+ }>;
60
+ export declare const CATEGORIES_COLLECTION_NAME = "categories";
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CATEGORIES_COLLECTION_NAME = exports.CategorySchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const constants_1 = require("../../constants");
6
+ exports.CategorySchema = new mongoose_1.Schema({
7
+ _id: {
8
+ type: mongoose_1.Schema.Types.ObjectId,
9
+ required: true,
10
+ immutable: true,
11
+ },
12
+ brand_id: {
13
+ type: String,
14
+ required: true,
15
+ immutable: true,
16
+ ref: 'brands',
17
+ },
18
+ tenants: {
19
+ type: [{ type: String, ref: 'tenants' }],
20
+ required: true,
21
+ },
22
+ image_url: {
23
+ type: String,
24
+ required: true,
25
+ },
26
+ banner_url: {
27
+ type: String,
28
+ required: false,
29
+ },
30
+ name: {
31
+ type: String,
32
+ required: true,
33
+ },
34
+ subtitle: {
35
+ type: String,
36
+ default: '',
37
+ },
38
+ active: {
39
+ type: Boolean,
40
+ required: true,
41
+ },
42
+ sort_id: {
43
+ type: Number,
44
+ required: true,
45
+ },
46
+ display_type: {
47
+ type: String,
48
+ enum: constants_1.ALL_CATEGORY_DISPLAY_TYPES,
49
+ default: constants_1.CATEGORY_DISPLAY_TYPE_ENUM.REGULAR,
50
+ },
51
+ createdAt: {
52
+ type: mongoose_1.Schema.Types.Date,
53
+ required: true,
54
+ default: () => new Date(),
55
+ immutable: true,
56
+ },
57
+ updatedAt: {
58
+ type: mongoose_1.Schema.Types.Date,
59
+ required: true,
60
+ default: () => new Date(),
61
+ },
62
+ }, {
63
+ timestamps: true,
64
+ versionKey: false,
65
+ minimize: false,
66
+ });
67
+ exports.CATEGORIES_COLLECTION_NAME = 'categories';
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CLOSE_DATES_COLLECTION_NAME = exports.CloseDatesSchema = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
- const item_1 = require("./item");
5
+ const items_1 = require("./items");
6
6
  exports.CloseDatesSchema = new mongoose_1.Schema({
7
7
  _id: {
8
8
  type: mongoose_1.Schema.Types.ObjectId,
@@ -16,7 +16,7 @@ exports.CloseDatesSchema = new mongoose_1.Schema({
16
16
  ref: 'tenants',
17
17
  },
18
18
  included_platforms: {
19
- type: [item_1.PlatformsSchema],
19
+ type: [items_1.PlatformsSchema],
20
20
  required: true,
21
21
  min: 1,
22
22
  },
@@ -17,11 +17,11 @@ export declare const DineinTablesSchema: Schema<any, import("mongoose").Model<an
17
17
  dinein_floor_id: import("mongoose").Types.ObjectId;
18
18
  num_of_seats: number;
19
19
  table_type: import("../../constants").TABLE_TYPE_ENUM;
20
- num_of_guests: number;
21
- order_placed_at: NativeDate;
22
20
  scale: number;
23
21
  angle: number;
22
+ num_of_guests: number;
24
23
  seated_at: NativeDate;
24
+ order_placed_at: NativeDate;
25
25
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
26
26
  createdAt: NativeDate;
27
27
  updatedAt: NativeDate;
@@ -36,11 +36,11 @@ export declare const DineinTablesSchema: Schema<any, import("mongoose").Model<an
36
36
  dinein_floor_id: import("mongoose").Types.ObjectId;
37
37
  num_of_seats: number;
38
38
  table_type: import("../../constants").TABLE_TYPE_ENUM;
39
- num_of_guests: number;
40
- order_placed_at: NativeDate;
41
39
  scale: number;
42
40
  angle: number;
41
+ num_of_guests: number;
43
42
  seated_at: NativeDate;
43
+ order_placed_at: NativeDate;
44
44
  }>> & import("mongoose").FlatRecord<{
45
45
  createdAt: NativeDate;
46
46
  updatedAt: NativeDate;
@@ -55,11 +55,11 @@ export declare const DineinTablesSchema: Schema<any, import("mongoose").Model<an
55
55
  dinein_floor_id: import("mongoose").Types.ObjectId;
56
56
  num_of_seats: number;
57
57
  table_type: import("../../constants").TABLE_TYPE_ENUM;
58
- num_of_guests: number;
59
- order_placed_at: NativeDate;
60
58
  scale: number;
61
59
  angle: number;
60
+ num_of_guests: number;
62
61
  seated_at: NativeDate;
62
+ order_placed_at: NativeDate;
63
63
  }> & Required<{
64
64
  _id: import("mongoose").Types.ObjectId;
65
65
  }> & {
@@ -0,0 +1,65 @@
1
+ import { Schema } from 'mongoose';
2
+ export declare const DineinTableFingerprintSchema: 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
+ name: string;
12
+ tenant_id: string;
13
+ order_id: import("mongoose").Types.ObjectId;
14
+ createdAt_mins: number;
15
+ createdAt: NativeDate;
16
+ updatedAt: NativeDate;
17
+ order_number: number;
18
+ dinein_floor_id: import("mongoose").Types.ObjectId;
19
+ num_of_seats: number;
20
+ table_type: import("../../constants").TABLE_TYPE_ENUM;
21
+ num_of_guests: number;
22
+ order_placed_at: NativeDate;
23
+ table_id: import("mongoose").Types.ObjectId;
24
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
25
+ createdAt: NativeDate;
26
+ updatedAt: NativeDate;
27
+ } & {
28
+ _id: import("mongoose").Types.ObjectId;
29
+ name: string;
30
+ tenant_id: string;
31
+ order_id: import("mongoose").Types.ObjectId;
32
+ createdAt_mins: number;
33
+ createdAt: NativeDate;
34
+ updatedAt: NativeDate;
35
+ order_number: number;
36
+ dinein_floor_id: import("mongoose").Types.ObjectId;
37
+ num_of_seats: number;
38
+ table_type: import("../../constants").TABLE_TYPE_ENUM;
39
+ num_of_guests: number;
40
+ order_placed_at: NativeDate;
41
+ table_id: import("mongoose").Types.ObjectId;
42
+ }>> & import("mongoose").FlatRecord<{
43
+ createdAt: NativeDate;
44
+ updatedAt: NativeDate;
45
+ } & {
46
+ _id: import("mongoose").Types.ObjectId;
47
+ name: string;
48
+ tenant_id: string;
49
+ order_id: import("mongoose").Types.ObjectId;
50
+ createdAt_mins: number;
51
+ createdAt: NativeDate;
52
+ updatedAt: NativeDate;
53
+ order_number: number;
54
+ dinein_floor_id: import("mongoose").Types.ObjectId;
55
+ num_of_seats: number;
56
+ table_type: import("../../constants").TABLE_TYPE_ENUM;
57
+ num_of_guests: number;
58
+ order_placed_at: NativeDate;
59
+ table_id: import("mongoose").Types.ObjectId;
60
+ }> & Required<{
61
+ _id: import("mongoose").Types.ObjectId;
62
+ }> & {
63
+ __v: number;
64
+ }>;
65
+ export declare const DINEIN_TABLES_FINGERPRINT_COLLECTION_NAME = "dinein_tables_fingerprints";
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DINEIN_TABLES_FINGERPRINT_COLLECTION_NAME = exports.DineinTableFingerprintSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const constants_1 = require("../../constants");
6
+ exports.DineinTableFingerprintSchema = new mongoose_1.Schema({
7
+ _id: {
8
+ type: mongoose_1.Schema.Types.ObjectId,
9
+ required: true,
10
+ immutable: true,
11
+ },
12
+ table_id: {
13
+ type: mongoose_1.Schema.Types.ObjectId,
14
+ required: true,
15
+ immutable: true,
16
+ ref: 'dinein_tables',
17
+ },
18
+ tenant_id: {
19
+ type: String,
20
+ required: true,
21
+ immutable: true,
22
+ ref: 'tenants',
23
+ },
24
+ dinein_floor_id: {
25
+ type: mongoose_1.Schema.Types.ObjectId,
26
+ required: true,
27
+ immutable: true,
28
+ ref: 'dinein_floors',
29
+ },
30
+ order_id: {
31
+ type: mongoose_1.Schema.Types.ObjectId,
32
+ ref: 'orders',
33
+ default: null,
34
+ },
35
+ order_number: {
36
+ type: Number,
37
+ default: null,
38
+ },
39
+ name: {
40
+ type: String,
41
+ required: true,
42
+ },
43
+ num_of_seats: {
44
+ type: Number,
45
+ required: true,
46
+ },
47
+ table_type: {
48
+ type: String,
49
+ enum: constants_1.ALL_TABLE_TYPES,
50
+ required: true,
51
+ },
52
+ num_of_guests: {
53
+ type: Number,
54
+ required: true,
55
+ },
56
+ order_placed_at: {
57
+ type: mongoose_1.Schema.Types.Date,
58
+ default: null,
59
+ },
60
+ createdAt_mins: {
61
+ type: Number,
62
+ required: true,
63
+ immutable: true,
64
+ default: () => {
65
+ const date = new Date();
66
+ return Math.floor(date.getHours() * 60 + date.getMinutes());
67
+ },
68
+ },
69
+ createdAt: {
70
+ type: mongoose_1.Schema.Types.Date,
71
+ required: true,
72
+ default: () => new Date(),
73
+ immutable: true,
74
+ },
75
+ updatedAt: {
76
+ type: mongoose_1.Schema.Types.Date,
77
+ required: true,
78
+ default: () => new Date(),
79
+ },
80
+ }, {
81
+ timestamps: true,
82
+ versionKey: false,
83
+ minimize: false,
84
+ });
85
+ exports.DINEIN_TABLES_FINGERPRINT_COLLECTION_NAME = 'dinein_tables_fingerprints';
@@ -4,7 +4,7 @@ exports.DISCOUNTS_COLLECTION_NAME = exports.DiscountSchema = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
5
  const constants_1 = require("../../constants");
6
6
  const common_models_1 = require("./common-models");
7
- const item_1 = require("./item");
7
+ const items_1 = require("./items");
8
8
  exports.DiscountSchema = new mongoose_1.Schema({
9
9
  _id: {
10
10
  type: mongoose_1.Schema.Types.ObjectId,
@@ -18,7 +18,7 @@ exports.DiscountSchema = new mongoose_1.Schema({
18
18
  ref: 'tenants',
19
19
  },
20
20
  included_platforms: {
21
- type: [item_1.PlatformsSchema],
21
+ type: [items_1.PlatformsSchema],
22
22
  required: true,
23
23
  min: 1,
24
24
  },
@@ -64,7 +64,7 @@ exports.DiscountSchema = new mongoose_1.Schema({
64
64
  default: false,
65
65
  },
66
66
  discount_special_hours: {
67
- type: [item_1.SpecialHoursSchema],
67
+ type: [items_1.SpecialHoursSchema],
68
68
  required: false,
69
69
  },
70
70
  item_ids: {