@managesome/eposmatic-toolkit 0.2.237 → 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.
- package/lib/constants/REPORT_WEBVIEW.d.ts +28 -0
- package/lib/constants/REPORT_WEBVIEW.js +31 -0
- package/lib/constants/index.d.ts +1 -0
- package/lib/constants/index.js +1 -0
- package/lib/helpers/store/cart-actions.js +1 -1
- package/lib/helpers/types/index.d.ts +1 -0
- package/lib/helpers/types/index.js +1 -0
- package/lib/helpers/types/report-webview.d.ts +130 -0
- package/lib/helpers/utils/receipt-engine.js +1 -1
- package/package.json +1 -1
- package/lib/helpers/store/warehouse-cart-actions.d.ts +0 -54
- package/lib/helpers/store/warehouse-cart-actions.js +0 -486
- package/lib/helpers/store/warehouse-catalog-actions.d.ts +0 -4
- package/lib/helpers/store/warehouse-catalog-actions.js +0 -46
- package/lib/helpers/types/printer-settings.d.ts +0 -11
- package/lib/helpers/types/printer-settings.js +0 -3
- package/lib/helpers/types/usable-offers.d.ts +0 -27
- package/lib/helpers/types/warehouse-cart-actions.d.ts +0 -51
- package/lib/helpers/types/warehouse-cart-actions.js +0 -2
- package/lib/helpers/utils/comparison-report-helpers.d.ts +0 -27
- package/lib/helpers/utils/comparison-report-helpers.js +0 -802
- package/lib/helpers/utils/comparitive-report-helpers.d.ts +0 -7
- package/lib/helpers/utils/comparitive-report-helpers.js +0 -826
- package/lib/helpers/utils/short-inventory.d.ts +0 -3
- package/lib/helpers/utils/short-inventory.js +0 -26
- package/lib/helpers/utils/simplified-warehouse-catalog.d.ts +0 -10
- package/lib/helpers/utils/simplified-warehouse-catalog.js +0 -108
- package/lib/helpers/utils/stock-details.d.ts +0 -3
- package/lib/helpers/utils/stock-details.js +0 -26
- package/lib/helpers/utils/stock-wastage.d.ts +0 -3
- package/lib/helpers/utils/stock-wastage.js +0 -26
- package/lib/helpers/utils/warehouse-order-engine.d.ts +0 -9
- package/lib/helpers/utils/warehouse-order-engine.js +0 -34
- package/lib/schemas/models/drivers.d.ts +0 -55
- package/lib/schemas/models/drivers.js +0 -60
- package/lib/schemas/models/internal_expense_details.d.ts +0 -55
- package/lib/schemas/models/internal_expense_details.js +0 -63
- package/lib/schemas/models/internal_restaurant_details.d.ts +0 -64
- package/lib/schemas/models/internal_restaurant_details.js +0 -77
- package/lib/schemas/models/platform.d.ts +0 -34
- package/lib/schemas/models/platform.js +0 -30
- package/lib/schemas/models/short_inventory.d.ts +0 -65
- package/lib/schemas/models/short_inventory.js +0 -46
- package/lib/schemas/models/stock_consumption.d.ts +0 -77
- package/lib/schemas/models/stock_consumption.js +0 -64
- package/lib/schemas/models/stock_entry.d.ts +0 -65
- package/lib/schemas/models/stock_entry.js +0 -46
- package/lib/schemas/models/stock_wastage.d.ts +0 -71
- package/lib/schemas/models/stock_wastage.js +0 -54
- package/lib/schemas/models/tenant_shift_sessions.d.ts +0 -146
- package/lib/schemas/models/tenant_shift_sessions.js +0 -125
- package/lib/schemas/models/warehouse_settings.d.ts +0 -40
- package/lib/schemas/models/warehouse_settings.js +0 -40
- package/lib/schemas/types/drivers.d.ts +0 -13
- package/lib/schemas/types/drivers.js +0 -2
- package/lib/schemas/types/internal_expense_details.d.ts +0 -14
- package/lib/schemas/types/internal_expense_details.js +0 -2
- package/lib/schemas/types/internal_restaurant_details.d.ts +0 -17
- package/lib/schemas/types/internal_restaurant_details.js +0 -2
- package/lib/schemas/types/marketing.d.ts +0 -10
- package/lib/schemas/types/marketing.js +0 -2
- package/lib/schemas/types/platform.d.ts +0 -6
- package/lib/schemas/types/platform.js +0 -2
- package/lib/schemas/types/pos_days.d.ts +0 -29
- package/lib/schemas/types/pos_days.js +0 -2
- package/lib/schemas/types/pos_shifts.d.ts +0 -33
- package/lib/schemas/types/pos_shifts.js +0 -2
- package/lib/schemas/types/short_inventory.d.ts +0 -9
- package/lib/schemas/types/short_inventory.js +0 -2
- package/lib/schemas/types/split_bill.d.ts +0 -18
- package/lib/schemas/types/split_bill.js +0 -2
- package/lib/schemas/types/stock_consumption.d.ts +0 -13
- package/lib/schemas/types/stock_consumption.js +0 -2
- package/lib/schemas/types/stock_entry.d.ts +0 -9
- package/lib/schemas/types/stock_entry.js +0 -2
- package/lib/schemas/types/stock_wastage.d.ts +0 -11
- package/lib/schemas/types/stock_wastage.js +0 -2
- package/lib/schemas/types/tenant_shift_sessions.d.ts +0 -33
- package/lib/schemas/types/tenant_shift_sessions.js +0 -2
- package/lib/schemas/types/third_party_payments.d.ts +0 -41
- package/lib/schemas/types/third_party_payments.js +0 -2
- package/lib/schemas/types/used_ingredients.d.ts +0 -8
- package/lib/schemas/types/used_ingredients.js +0 -2
- package/lib/schemas/types/warehouse_settings.d.ts +0 -8
- package/lib/schemas/types/warehouse_settings.js +0 -2
- /package/lib/helpers/types/{usable-offers.js → report-webview.js} +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { IShortInventory } from '../../schemas';
|
|
2
|
-
export declare function getShortInventoryDetailsWithInt<T extends Partial<IShortInventory> | IShortInventory>(stock: T): T;
|
|
3
|
-
export declare function getShortInventoryDetailsWithDecimal<T extends Partial<IShortInventory> | IShortInventory>(stock: T): T;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getShortInventoryDetailsWithDecimal = exports.getShortInventoryDetailsWithInt = void 0;
|
|
4
|
-
const inventory_1 = require("./inventory");
|
|
5
|
-
function getShortInventoryDetailsWithInt(stock) {
|
|
6
|
-
return {
|
|
7
|
-
...stock,
|
|
8
|
-
...(typeof stock.quantity === 'number'
|
|
9
|
-
? {
|
|
10
|
-
quantity: (0, inventory_1.convertDecimalToInt)(stock.quantity),
|
|
11
|
-
}
|
|
12
|
-
: {}),
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
exports.getShortInventoryDetailsWithInt = getShortInventoryDetailsWithInt;
|
|
16
|
-
function getShortInventoryDetailsWithDecimal(stock) {
|
|
17
|
-
return {
|
|
18
|
-
...stock,
|
|
19
|
-
...(typeof stock.quantity === 'number'
|
|
20
|
-
? {
|
|
21
|
-
quantity: (0, inventory_1.convertIntToDecimal)(stock.quantity),
|
|
22
|
-
}
|
|
23
|
-
: {}),
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
exports.getShortInventoryDetailsWithDecimal = getShortInventoryDetailsWithDecimal;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IWarehouseCategory, IWarehouseItem } from '../../schemas';
|
|
2
|
-
import { ISimplifiedWarehouseCategory, ISimplifiedWarehouseItem } from '../types';
|
|
3
|
-
export declare function convertWarehouseCategoryToSimplifiedCategory(category: IWarehouseCategory): ISimplifiedWarehouseCategory;
|
|
4
|
-
export declare function convertWarehouseCategoriesToSimplifiedCategories(categories: IWarehouseCategory[]): ISimplifiedWarehouseCategory[];
|
|
5
|
-
export declare function convertWarehouseItemToSimplifiedItem(item: IWarehouseItem): ISimplifiedWarehouseItem;
|
|
6
|
-
export declare function convertWarehouseItemsToSimplifiedItems(items: IWarehouseItem[]): ISimplifiedWarehouseItem[];
|
|
7
|
-
export declare function convertPartialWarehouseCatalogItemToPartialSimplifiedItem(item: Partial<IWarehouseItem>): Partial<ISimplifiedWarehouseItem>;
|
|
8
|
-
export declare function convertPartialWarehouseCatalogCategoryToPartialSimplifiedCategory(category: Partial<IWarehouseCategory>): Partial<ISimplifiedWarehouseCategory>;
|
|
9
|
-
export declare function convertWarehouseCatalogItemToSimplifiedItem(item: IWarehouseItem): ISimplifiedWarehouseItem;
|
|
10
|
-
export declare function convertWarehouseCatalogCategoryToSimpleCategory(category: IWarehouseCategory): ISimplifiedWarehouseCategory;
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convertWarehouseCategoryToSimplifiedCategory = convertWarehouseCategoryToSimplifiedCategory;
|
|
4
|
-
exports.convertWarehouseCategoriesToSimplifiedCategories = convertWarehouseCategoriesToSimplifiedCategories;
|
|
5
|
-
exports.convertWarehouseItemToSimplifiedItem = convertWarehouseItemToSimplifiedItem;
|
|
6
|
-
exports.convertWarehouseItemsToSimplifiedItems = convertWarehouseItemsToSimplifiedItems;
|
|
7
|
-
exports.convertPartialWarehouseCatalogItemToPartialSimplifiedItem = convertPartialWarehouseCatalogItemToPartialSimplifiedItem;
|
|
8
|
-
exports.convertPartialWarehouseCatalogCategoryToPartialSimplifiedCategory = convertPartialWarehouseCatalogCategoryToPartialSimplifiedCategory;
|
|
9
|
-
exports.convertWarehouseCatalogItemToSimplifiedItem = convertWarehouseCatalogItemToSimplifiedItem;
|
|
10
|
-
exports.convertWarehouseCatalogCategoryToSimpleCategory = convertWarehouseCatalogCategoryToSimpleCategory;
|
|
11
|
-
const minified_catalog_1 = require("./minified-catalog");
|
|
12
|
-
function convertWarehouseCategoryToSimplifiedCategory(category) {
|
|
13
|
-
return {
|
|
14
|
-
_id: category._id,
|
|
15
|
-
image_url: category.image_url,
|
|
16
|
-
name: category.name,
|
|
17
|
-
subtitle: category.subtitle,
|
|
18
|
-
active: category.active,
|
|
19
|
-
sort_id: category.sort_id,
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
function convertWarehouseCategoriesToSimplifiedCategories(categories) {
|
|
23
|
-
const newCategories = [];
|
|
24
|
-
for (let i = 0; i < categories.length; i++) {
|
|
25
|
-
const category = categories[i];
|
|
26
|
-
const simpleCategory = convertWarehouseCategoryToSimplifiedCategory(category);
|
|
27
|
-
newCategories.push(simpleCategory);
|
|
28
|
-
}
|
|
29
|
-
return newCategories;
|
|
30
|
-
}
|
|
31
|
-
// =========================>>><<<=========================
|
|
32
|
-
function convertWarehouseItemToSimplifiedItem(item) {
|
|
33
|
-
return {
|
|
34
|
-
_id: item._id,
|
|
35
|
-
category_id: item.category_id,
|
|
36
|
-
name: item.name,
|
|
37
|
-
hide_name: item.hide_name || undefined,
|
|
38
|
-
sold_out: item.sold_out || undefined,
|
|
39
|
-
description: item.description,
|
|
40
|
-
active: item.active,
|
|
41
|
-
sort_id: item.sort_id,
|
|
42
|
-
price: (0, minified_catalog_1.convertOriginalPlatformNumToMinifiedPlatformNum)(item.price),
|
|
43
|
-
keywords: item.keywords.length > 0 ? item.keywords : undefined,
|
|
44
|
-
image_url: item.image_url,
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
function convertWarehouseItemsToSimplifiedItems(items) {
|
|
48
|
-
const newItems = [];
|
|
49
|
-
for (let j = 0; j < items.length; j++) {
|
|
50
|
-
const item = items[j];
|
|
51
|
-
const simpleItem = convertWarehouseItemToSimplifiedItem(item);
|
|
52
|
-
newItems.push(simpleItem);
|
|
53
|
-
}
|
|
54
|
-
return newItems;
|
|
55
|
-
}
|
|
56
|
-
// =========================>>><<<=========================
|
|
57
|
-
function convertPartialWarehouseCatalogItemToPartialSimplifiedItem(item) {
|
|
58
|
-
return {
|
|
59
|
-
...(item.hide_name !== undefined ? { hide_name: item.hide_name } : {}),
|
|
60
|
-
...(item.sold_out !== undefined ? { sold_out: item.sold_out } : {}),
|
|
61
|
-
...(item.sort_id !== undefined ? { sort_id: item.sort_id } : {}),
|
|
62
|
-
...(item.keywords !== undefined ? { keywords: item.keywords } : {}),
|
|
63
|
-
...(item._id !== undefined ? { _id: item._id } : {}),
|
|
64
|
-
...(item.category_id !== undefined ? { category_id: item.category_id } : {}),
|
|
65
|
-
...(item.name !== undefined ? { name: item.name } : {}),
|
|
66
|
-
...(item.description !== undefined ? { description: item.description } : {}),
|
|
67
|
-
...(item.active !== undefined ? { active: item.active } : {}),
|
|
68
|
-
...(item.sort_id !== undefined ? { sort_id: item.sort_id } : {}),
|
|
69
|
-
...(item.image_url !== undefined ? { image_url: item.image_url } : {}),
|
|
70
|
-
...(item.price !== undefined ? { price: (0, minified_catalog_1.convertOriginalPlatformNumToMinifiedPlatformNum)(item.price) } : {}),
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
function convertPartialWarehouseCatalogCategoryToPartialSimplifiedCategory(category) {
|
|
74
|
-
return {
|
|
75
|
-
_id: category._id,
|
|
76
|
-
image_url: category.image_url,
|
|
77
|
-
name: category.name,
|
|
78
|
-
subtitle: category.subtitle,
|
|
79
|
-
active: category.active,
|
|
80
|
-
sort_id: category.sort_id,
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
// ========================>>><<<=========================
|
|
84
|
-
function convertWarehouseCatalogItemToSimplifiedItem(item) {
|
|
85
|
-
return {
|
|
86
|
-
hide_name: item.hide_name || undefined,
|
|
87
|
-
sold_out: item.sold_out || undefined,
|
|
88
|
-
keywords: item.keywords.length > 0 ? item.keywords : undefined,
|
|
89
|
-
_id: item._id,
|
|
90
|
-
category_id: item.category_id,
|
|
91
|
-
name: item.name,
|
|
92
|
-
description: item.description,
|
|
93
|
-
active: item.active,
|
|
94
|
-
sort_id: item.sort_id,
|
|
95
|
-
image_url: item.image_url,
|
|
96
|
-
price: (0, minified_catalog_1.convertOriginalPlatformNumToMinifiedPlatformNum)(item.price),
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
function convertWarehouseCatalogCategoryToSimpleCategory(category) {
|
|
100
|
-
return {
|
|
101
|
-
_id: category._id,
|
|
102
|
-
image_url: category.image_url,
|
|
103
|
-
name: category.name,
|
|
104
|
-
subtitle: category.subtitle,
|
|
105
|
-
active: category.active,
|
|
106
|
-
sort_id: category.sort_id,
|
|
107
|
-
};
|
|
108
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getStockDetailsWithDecimal = exports.getStockDetailsWithInt = void 0;
|
|
4
|
-
const inventory_1 = require("./inventory");
|
|
5
|
-
function getStockDetailsWithInt(stock) {
|
|
6
|
-
return {
|
|
7
|
-
...stock,
|
|
8
|
-
...(typeof stock.quantity === 'number'
|
|
9
|
-
? {
|
|
10
|
-
quantity: (0, inventory_1.convertDecimalToInt)(stock.quantity),
|
|
11
|
-
}
|
|
12
|
-
: {}),
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
exports.getStockDetailsWithInt = getStockDetailsWithInt;
|
|
16
|
-
function getStockDetailsWithDecimal(stock) {
|
|
17
|
-
return {
|
|
18
|
-
...stock,
|
|
19
|
-
...(typeof stock.quantity === 'number'
|
|
20
|
-
? {
|
|
21
|
-
quantity: (0, inventory_1.convertIntToDecimal)(stock.quantity),
|
|
22
|
-
}
|
|
23
|
-
: {}),
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
exports.getStockDetailsWithDecimal = getStockDetailsWithDecimal;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { IStockWastage } from '../../schemas';
|
|
2
|
-
export declare function getStockWastageWithInt<T extends Partial<IStockWastage> | IStockWastage>(stock: T): T;
|
|
3
|
-
export declare function getStockWastageWithDecimal<T extends Partial<IStockWastage> | IStockWastage>(stock: T): T;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getStockWastageWithDecimal = exports.getStockWastageWithInt = void 0;
|
|
4
|
-
const inventory_1 = require("./inventory");
|
|
5
|
-
function getStockWastageWithInt(stock) {
|
|
6
|
-
return {
|
|
7
|
-
...stock,
|
|
8
|
-
...(typeof stock.quantity_wasted === 'number'
|
|
9
|
-
? {
|
|
10
|
-
quantity_wasted: (0, inventory_1.convertDecimalToInt)(stock.quantity_wasted),
|
|
11
|
-
}
|
|
12
|
-
: {}),
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
exports.getStockWastageWithInt = getStockWastageWithInt;
|
|
16
|
-
function getStockWastageWithDecimal(stock) {
|
|
17
|
-
return {
|
|
18
|
-
...stock,
|
|
19
|
-
...(typeof stock.quantity_wasted === 'number'
|
|
20
|
-
? {
|
|
21
|
-
quantity_wasted: (0, inventory_1.convertIntToDecimal)(stock.quantity_wasted),
|
|
22
|
-
}
|
|
23
|
-
: {}),
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
exports.getStockWastageWithDecimal = getStockWastageWithDecimal;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IPurchaseOrderItem, IWarehouseItem } from '../../schemas';
|
|
2
|
-
interface IConvertWarehouseItemToPurchaseOrderItemParams {
|
|
3
|
-
vendorId: string;
|
|
4
|
-
item: IWarehouseItem;
|
|
5
|
-
orderItem?: IPurchaseOrderItem;
|
|
6
|
-
}
|
|
7
|
-
export declare function convertWarehouseItemToPurchaseOrderItem({ vendorId, item, orderItem, }: IConvertWarehouseItemToPurchaseOrderItemParams): IPurchaseOrderItem;
|
|
8
|
-
export declare function getCurrentPurchaseOrderItemTotalPrice(orderItem: IPurchaseOrderItem): number;
|
|
9
|
-
export {};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.convertWarehouseItemToPurchaseOrderItem = convertWarehouseItemToPurchaseOrderItem;
|
|
7
|
-
exports.getCurrentPurchaseOrderItemTotalPrice = getCurrentPurchaseOrderItemTotalPrice;
|
|
8
|
-
const bson_objectid_1 = __importDefault(require("bson-objectid"));
|
|
9
|
-
function convertWarehouseItemToPurchaseOrderItem({ vendorId, item, orderItem, }) {
|
|
10
|
-
const { _id = (0, bson_objectid_1.default)().toHexString(), price = item.purchase_price?.[vendorId] ?? item.purchase_price?.BASE_PRICE ?? 0, quantity = 1, special_instructions = '', is_ready, } = orderItem ?? {};
|
|
11
|
-
const purchaseOrderItem = {
|
|
12
|
-
_id,
|
|
13
|
-
item_id: item._id,
|
|
14
|
-
name: item.name,
|
|
15
|
-
price,
|
|
16
|
-
subtotal: price * quantity,
|
|
17
|
-
quantity,
|
|
18
|
-
special_instructions,
|
|
19
|
-
is_ready,
|
|
20
|
-
// These values will be auto calculated
|
|
21
|
-
_discount_amount: 0,
|
|
22
|
-
_gross_amount: 0,
|
|
23
|
-
_gst_amount: 0,
|
|
24
|
-
_net_amount: 0,
|
|
25
|
-
};
|
|
26
|
-
return purchaseOrderItem;
|
|
27
|
-
}
|
|
28
|
-
// ==========================================================><====================================================
|
|
29
|
-
function getCurrentPurchaseOrderItemTotalPrice(orderItem) {
|
|
30
|
-
// For purchase orders, total is simply price * quantity
|
|
31
|
-
// No modifiers, discounts, etc.
|
|
32
|
-
const total = orderItem.price * orderItem.quantity;
|
|
33
|
-
return total;
|
|
34
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'mongoose';
|
|
2
|
-
export declare const DriverSchema: 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
|
-
active: boolean;
|
|
14
|
-
tenant_id: string;
|
|
15
|
-
phone_number: number;
|
|
16
|
-
display_name: string;
|
|
17
|
-
license_number: string;
|
|
18
|
-
license_expiry_date: NativeDate;
|
|
19
|
-
vehicle_type: string;
|
|
20
|
-
vehicle_registration_number: string;
|
|
21
|
-
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
22
|
-
createdAt: NativeDate;
|
|
23
|
-
updatedAt: NativeDate;
|
|
24
|
-
} & {
|
|
25
|
-
_id: import("mongoose").Types.ObjectId;
|
|
26
|
-
createdAt: NativeDate;
|
|
27
|
-
updatedAt: NativeDate;
|
|
28
|
-
active: boolean;
|
|
29
|
-
tenant_id: string;
|
|
30
|
-
phone_number: number;
|
|
31
|
-
display_name: string;
|
|
32
|
-
license_number: string;
|
|
33
|
-
license_expiry_date: NativeDate;
|
|
34
|
-
vehicle_type: string;
|
|
35
|
-
vehicle_registration_number: string;
|
|
36
|
-
}>> & import("mongoose").FlatRecord<{
|
|
37
|
-
createdAt: NativeDate;
|
|
38
|
-
updatedAt: NativeDate;
|
|
39
|
-
} & {
|
|
40
|
-
_id: import("mongoose").Types.ObjectId;
|
|
41
|
-
createdAt: NativeDate;
|
|
42
|
-
updatedAt: NativeDate;
|
|
43
|
-
active: boolean;
|
|
44
|
-
tenant_id: string;
|
|
45
|
-
phone_number: number;
|
|
46
|
-
display_name: string;
|
|
47
|
-
license_number: string;
|
|
48
|
-
license_expiry_date: NativeDate;
|
|
49
|
-
vehicle_type: string;
|
|
50
|
-
vehicle_registration_number: string;
|
|
51
|
-
}> & Required<{
|
|
52
|
-
_id: import("mongoose").Types.ObjectId;
|
|
53
|
-
}> & {
|
|
54
|
-
__v: number;
|
|
55
|
-
}>;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DriverSchema = void 0;
|
|
4
|
-
const mongoose_1 = require("mongoose");
|
|
5
|
-
exports.DriverSchema = new mongoose_1.Schema({
|
|
6
|
-
_id: {
|
|
7
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
8
|
-
required: true,
|
|
9
|
-
immutable: true,
|
|
10
|
-
},
|
|
11
|
-
tenant_id: {
|
|
12
|
-
type: String,
|
|
13
|
-
required: true,
|
|
14
|
-
immutable: true,
|
|
15
|
-
ref: 'tenants',
|
|
16
|
-
},
|
|
17
|
-
display_name: {
|
|
18
|
-
type: String,
|
|
19
|
-
required: true,
|
|
20
|
-
},
|
|
21
|
-
license_number: {
|
|
22
|
-
type: String,
|
|
23
|
-
required: true,
|
|
24
|
-
},
|
|
25
|
-
license_expiry_date: {
|
|
26
|
-
type: mongoose_1.Schema.Types.Date,
|
|
27
|
-
required: true,
|
|
28
|
-
},
|
|
29
|
-
vehicle_type: {
|
|
30
|
-
type: String,
|
|
31
|
-
required: true,
|
|
32
|
-
},
|
|
33
|
-
vehicle_registration_number: {
|
|
34
|
-
type: String,
|
|
35
|
-
required: true,
|
|
36
|
-
},
|
|
37
|
-
phone_number: {
|
|
38
|
-
type: Number,
|
|
39
|
-
required: true,
|
|
40
|
-
},
|
|
41
|
-
active: {
|
|
42
|
-
type: Boolean,
|
|
43
|
-
default: false,
|
|
44
|
-
},
|
|
45
|
-
createdAt: {
|
|
46
|
-
type: mongoose_1.Schema.Types.Date,
|
|
47
|
-
required: true,
|
|
48
|
-
default: () => new Date(),
|
|
49
|
-
immutable: true,
|
|
50
|
-
},
|
|
51
|
-
updatedAt: {
|
|
52
|
-
type: mongoose_1.Schema.Types.Date,
|
|
53
|
-
required: true,
|
|
54
|
-
default: () => new Date(),
|
|
55
|
-
},
|
|
56
|
-
}, {
|
|
57
|
-
timestamps: true,
|
|
58
|
-
versionKey: false,
|
|
59
|
-
minimize: false,
|
|
60
|
-
});
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'mongoose';
|
|
2
|
-
export declare const InternalExpenseDetailsSchema: 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
|
-
image_url: string;
|
|
12
|
-
createdAt: NativeDate;
|
|
13
|
-
updatedAt: NativeDate;
|
|
14
|
-
description: string;
|
|
15
|
-
date_incurred: NativeDate;
|
|
16
|
-
provider_id: string;
|
|
17
|
-
restaurant_name: string;
|
|
18
|
-
expense_category: import("../../constants").INTERNAL_EXPENSE_CATEGORY_TYPE_ENUM;
|
|
19
|
-
total_amount: number;
|
|
20
|
-
expense_payment_status: import("../../constants").INTERNAL_PAYMENT_STATUS_TYPE_ENUM;
|
|
21
|
-
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
22
|
-
createdAt: NativeDate;
|
|
23
|
-
updatedAt: NativeDate;
|
|
24
|
-
} & {
|
|
25
|
-
_id: import("mongoose").Types.ObjectId;
|
|
26
|
-
image_url: string;
|
|
27
|
-
createdAt: NativeDate;
|
|
28
|
-
updatedAt: NativeDate;
|
|
29
|
-
description: string;
|
|
30
|
-
date_incurred: NativeDate;
|
|
31
|
-
provider_id: string;
|
|
32
|
-
restaurant_name: string;
|
|
33
|
-
expense_category: import("../../constants").INTERNAL_EXPENSE_CATEGORY_TYPE_ENUM;
|
|
34
|
-
total_amount: number;
|
|
35
|
-
expense_payment_status: import("../../constants").INTERNAL_PAYMENT_STATUS_TYPE_ENUM;
|
|
36
|
-
}>> & import("mongoose").FlatRecord<{
|
|
37
|
-
createdAt: NativeDate;
|
|
38
|
-
updatedAt: NativeDate;
|
|
39
|
-
} & {
|
|
40
|
-
_id: import("mongoose").Types.ObjectId;
|
|
41
|
-
image_url: string;
|
|
42
|
-
createdAt: NativeDate;
|
|
43
|
-
updatedAt: NativeDate;
|
|
44
|
-
description: string;
|
|
45
|
-
date_incurred: NativeDate;
|
|
46
|
-
provider_id: string;
|
|
47
|
-
restaurant_name: string;
|
|
48
|
-
expense_category: import("../../constants").INTERNAL_EXPENSE_CATEGORY_TYPE_ENUM;
|
|
49
|
-
total_amount: number;
|
|
50
|
-
expense_payment_status: import("../../constants").INTERNAL_PAYMENT_STATUS_TYPE_ENUM;
|
|
51
|
-
}> & Required<{
|
|
52
|
-
_id: import("mongoose").Types.ObjectId;
|
|
53
|
-
}> & {
|
|
54
|
-
__v: number;
|
|
55
|
-
}>;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InternalExpenseDetailsSchema = void 0;
|
|
4
|
-
const mongoose_1 = require("mongoose");
|
|
5
|
-
const constants_1 = require("../../constants");
|
|
6
|
-
exports.InternalExpenseDetailsSchema = new mongoose_1.Schema({
|
|
7
|
-
_id: {
|
|
8
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
9
|
-
required: true,
|
|
10
|
-
immutable: true,
|
|
11
|
-
},
|
|
12
|
-
provider_id: {
|
|
13
|
-
type: String,
|
|
14
|
-
required: true,
|
|
15
|
-
immutable: true,
|
|
16
|
-
ref: 'providers',
|
|
17
|
-
},
|
|
18
|
-
restaurant_name: {
|
|
19
|
-
type: String,
|
|
20
|
-
required: true,
|
|
21
|
-
},
|
|
22
|
-
expense_category: {
|
|
23
|
-
type: String,
|
|
24
|
-
enum: constants_1.ALL_INTERNAL_EXPENSE_CATEGORY_TYPES,
|
|
25
|
-
required: true,
|
|
26
|
-
},
|
|
27
|
-
description: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: null,
|
|
30
|
-
},
|
|
31
|
-
total_amount: {
|
|
32
|
-
type: Number,
|
|
33
|
-
required: true,
|
|
34
|
-
},
|
|
35
|
-
expense_payment_status: {
|
|
36
|
-
type: String,
|
|
37
|
-
enum: constants_1.ALL_INTERNAL_PAYMENT_STATUS_TYPES,
|
|
38
|
-
required: true,
|
|
39
|
-
},
|
|
40
|
-
image_url: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: null,
|
|
43
|
-
},
|
|
44
|
-
date_incurred: {
|
|
45
|
-
type: Date,
|
|
46
|
-
required: true,
|
|
47
|
-
},
|
|
48
|
-
createdAt: {
|
|
49
|
-
type: mongoose_1.Schema.Types.Date,
|
|
50
|
-
required: true,
|
|
51
|
-
default: () => new Date(),
|
|
52
|
-
immutable: true,
|
|
53
|
-
},
|
|
54
|
-
updatedAt: {
|
|
55
|
-
type: mongoose_1.Schema.Types.Date,
|
|
56
|
-
required: true,
|
|
57
|
-
default: () => new Date(),
|
|
58
|
-
},
|
|
59
|
-
}, {
|
|
60
|
-
timestamps: true,
|
|
61
|
-
versionKey: false,
|
|
62
|
-
minimize: false,
|
|
63
|
-
});
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'mongoose';
|
|
2
|
-
export declare const InternalRestaurantDetailsSchema: 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
|
-
image_url: string;
|
|
12
|
-
createdAt: NativeDate;
|
|
13
|
-
updatedAt: NativeDate;
|
|
14
|
-
date_incurred: NativeDate;
|
|
15
|
-
provider_id: string;
|
|
16
|
-
restaurant_name: string;
|
|
17
|
-
restaurant_status: import("../../constants").INTERNAL_RESTAURANT_STATUS_TYPE_ENUM;
|
|
18
|
-
subscriptions: import("../../constants").INTERNAL_SUBSCRIPTIONS_TYPE_ENUM[];
|
|
19
|
-
subscription_plan: import("../../constants").INTERNAL_SUBSCRIPTION_PLAN_TYPE_ENUM;
|
|
20
|
-
payment_status: import("../../constants").INTERNAL_PAYMENT_STATUS_TYPE_ENUM;
|
|
21
|
-
notes: string;
|
|
22
|
-
subscription_amount: number;
|
|
23
|
-
hardware_amount: number;
|
|
24
|
-
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
25
|
-
createdAt: NativeDate;
|
|
26
|
-
updatedAt: NativeDate;
|
|
27
|
-
} & {
|
|
28
|
-
_id: import("mongoose").Types.ObjectId;
|
|
29
|
-
image_url: string;
|
|
30
|
-
createdAt: NativeDate;
|
|
31
|
-
updatedAt: NativeDate;
|
|
32
|
-
date_incurred: NativeDate;
|
|
33
|
-
provider_id: string;
|
|
34
|
-
restaurant_name: string;
|
|
35
|
-
restaurant_status: import("../../constants").INTERNAL_RESTAURANT_STATUS_TYPE_ENUM;
|
|
36
|
-
subscriptions: import("../../constants").INTERNAL_SUBSCRIPTIONS_TYPE_ENUM[];
|
|
37
|
-
subscription_plan: import("../../constants").INTERNAL_SUBSCRIPTION_PLAN_TYPE_ENUM;
|
|
38
|
-
payment_status: import("../../constants").INTERNAL_PAYMENT_STATUS_TYPE_ENUM;
|
|
39
|
-
notes: string;
|
|
40
|
-
subscription_amount: number;
|
|
41
|
-
hardware_amount: number;
|
|
42
|
-
}>> & import("mongoose").FlatRecord<{
|
|
43
|
-
createdAt: NativeDate;
|
|
44
|
-
updatedAt: NativeDate;
|
|
45
|
-
} & {
|
|
46
|
-
_id: import("mongoose").Types.ObjectId;
|
|
47
|
-
image_url: string;
|
|
48
|
-
createdAt: NativeDate;
|
|
49
|
-
updatedAt: NativeDate;
|
|
50
|
-
date_incurred: NativeDate;
|
|
51
|
-
provider_id: string;
|
|
52
|
-
restaurant_name: string;
|
|
53
|
-
restaurant_status: import("../../constants").INTERNAL_RESTAURANT_STATUS_TYPE_ENUM;
|
|
54
|
-
subscriptions: import("../../constants").INTERNAL_SUBSCRIPTIONS_TYPE_ENUM[];
|
|
55
|
-
subscription_plan: import("../../constants").INTERNAL_SUBSCRIPTION_PLAN_TYPE_ENUM;
|
|
56
|
-
payment_status: import("../../constants").INTERNAL_PAYMENT_STATUS_TYPE_ENUM;
|
|
57
|
-
notes: string;
|
|
58
|
-
subscription_amount: number;
|
|
59
|
-
hardware_amount: number;
|
|
60
|
-
}> & Required<{
|
|
61
|
-
_id: import("mongoose").Types.ObjectId;
|
|
62
|
-
}> & {
|
|
63
|
-
__v: number;
|
|
64
|
-
}>;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InternalRestaurantDetailsSchema = void 0;
|
|
4
|
-
const mongoose_1 = require("mongoose");
|
|
5
|
-
const constants_1 = require("../../constants");
|
|
6
|
-
const SubscriptionTypesSchema = { type: String, enum: constants_1.ALL_INTERNAL_SUBSCRIPTIONS_TYPES };
|
|
7
|
-
exports.InternalRestaurantDetailsSchema = new mongoose_1.Schema({
|
|
8
|
-
_id: {
|
|
9
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
10
|
-
required: true,
|
|
11
|
-
immutable: true,
|
|
12
|
-
},
|
|
13
|
-
provider_id: {
|
|
14
|
-
type: String,
|
|
15
|
-
required: true,
|
|
16
|
-
immutable: true,
|
|
17
|
-
ref: 'providers',
|
|
18
|
-
},
|
|
19
|
-
restaurant_name: {
|
|
20
|
-
type: String,
|
|
21
|
-
required: true,
|
|
22
|
-
},
|
|
23
|
-
restaurant_status: {
|
|
24
|
-
type: String,
|
|
25
|
-
enum: constants_1.ALL_INTERNAL_RESTAURANT_STATUS_TYPES,
|
|
26
|
-
required: true,
|
|
27
|
-
},
|
|
28
|
-
subscriptions: {
|
|
29
|
-
type: [SubscriptionTypesSchema],
|
|
30
|
-
default: [],
|
|
31
|
-
},
|
|
32
|
-
subscription_plan: {
|
|
33
|
-
type: String,
|
|
34
|
-
enum: constants_1.ALL_INTERNAL_SUBSCRIPTION_PLAN_TYPES,
|
|
35
|
-
required: true,
|
|
36
|
-
},
|
|
37
|
-
payment_status: {
|
|
38
|
-
type: String,
|
|
39
|
-
enum: constants_1.ALL_INTERNAL_PAYMENT_STATUS_TYPES,
|
|
40
|
-
required: true,
|
|
41
|
-
},
|
|
42
|
-
notes: {
|
|
43
|
-
type: String,
|
|
44
|
-
default: '',
|
|
45
|
-
},
|
|
46
|
-
subscription_amount: {
|
|
47
|
-
type: Number,
|
|
48
|
-
required: true,
|
|
49
|
-
},
|
|
50
|
-
hardware_amount: {
|
|
51
|
-
type: Number,
|
|
52
|
-
required: true,
|
|
53
|
-
},
|
|
54
|
-
image_url: {
|
|
55
|
-
type: String,
|
|
56
|
-
default: null,
|
|
57
|
-
},
|
|
58
|
-
date_incurred: {
|
|
59
|
-
type: Date,
|
|
60
|
-
required: true,
|
|
61
|
-
},
|
|
62
|
-
createdAt: {
|
|
63
|
-
type: mongoose_1.Schema.Types.Date,
|
|
64
|
-
required: true,
|
|
65
|
-
default: () => new Date(),
|
|
66
|
-
immutable: true,
|
|
67
|
-
},
|
|
68
|
-
updatedAt: {
|
|
69
|
-
type: mongoose_1.Schema.Types.Date,
|
|
70
|
-
required: true,
|
|
71
|
-
default: () => new Date(),
|
|
72
|
-
},
|
|
73
|
-
}, {
|
|
74
|
-
timestamps: true,
|
|
75
|
-
versionKey: false,
|
|
76
|
-
minimize: false,
|
|
77
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'mongoose';
|
|
2
|
-
export declare const PlatformSchema: 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: string;
|
|
11
|
-
name: string;
|
|
12
|
-
createdAt: NativeDate;
|
|
13
|
-
updatedAt: NativeDate;
|
|
14
|
-
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
15
|
-
createdAt: NativeDate;
|
|
16
|
-
updatedAt: NativeDate;
|
|
17
|
-
} & {
|
|
18
|
-
_id: string;
|
|
19
|
-
name: string;
|
|
20
|
-
createdAt: NativeDate;
|
|
21
|
-
updatedAt: NativeDate;
|
|
22
|
-
}>> & import("mongoose").FlatRecord<{
|
|
23
|
-
createdAt: NativeDate;
|
|
24
|
-
updatedAt: NativeDate;
|
|
25
|
-
} & {
|
|
26
|
-
_id: string;
|
|
27
|
-
name: string;
|
|
28
|
-
createdAt: NativeDate;
|
|
29
|
-
updatedAt: NativeDate;
|
|
30
|
-
}> & Required<{
|
|
31
|
-
_id: string;
|
|
32
|
-
}> & {
|
|
33
|
-
__v: number;
|
|
34
|
-
}>;
|