vms-nest-prisma-api-document 1.1.7 → 1.2.1
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/dist/core/BaseRequest.js +28 -2
- package/dist/core/BaseResponse.js +27 -2
- package/dist/core/Enums.js +93 -2
- package/dist/core/apiCall.js +32 -2
- package/dist/core/sdk-config.js +28 -2
- package/dist/index.js +1 -0
- package/dist/services/account/alert_service.d.ts +32 -32
- package/dist/services/account/alert_service.js +84 -58
- package/dist/services/account/analytics/user_login_analytics_service.js +49 -21
- package/dist/services/account/analytics/user_page_analytics_service.js +47 -14
- package/dist/services/account/bookmark_service.d.ts +9 -9
- package/dist/services/account/bookmark_service.js +59 -33
- package/dist/services/account/notification_service.d.ts +6 -6
- package/dist/services/account/notification_service.js +64 -39
- package/dist/services/account/ticket_service.d.ts +3 -3
- package/dist/services/account/ticket_service.js +70 -44
- package/dist/services/gps/features/fuel/gps_fuel_vehicle_daily_summary_service.d.ts +1 -1
- package/dist/services/gps/features/fuel/gps_fuel_vehicle_daily_summary_service.js +71 -44
- package/dist/services/gps/features/fuel/gps_fuel_vehicle_refill_service.d.ts +11 -11
- package/dist/services/gps/features/fuel/gps_fuel_vehicle_refill_service.js +73 -52
- package/dist/services/gps/features/fuel/gps_fuel_vehicle_removal_service.d.ts +11 -11
- package/dist/services/gps/features/fuel/gps_fuel_vehicle_removal_service.js +73 -52
- package/dist/services/gps/features/geofence/gps_geofence_data_service.d.ts +11 -11
- package/dist/services/gps/features/geofence/gps_geofence_data_service.js +61 -38
- package/dist/services/gps/features/geofence/gps_geofence_transaction_service.d.ts +10 -10
- package/dist/services/gps/features/geofence/gps_geofence_transaction_service.js +54 -28
- package/dist/services/gps/features/geofence/gps_geofence_transaction_summary_service.d.ts +5 -5
- package/dist/services/gps/features/geofence/gps_geofence_transaction_summary_service.js +57 -31
- package/dist/services/gps/features/geofence/trip_geofence_to_geofence_service.d.ts +3 -3
- package/dist/services/gps/features/geofence/trip_geofence_to_geofence_service.js +70 -45
- package/dist/services/gps/features/gps_live_track_share_link_service.d.ts +17 -17
- package/dist/services/gps/features/gps_live_track_share_link_service.js +74 -47
- package/dist/services/gps/features/gps_track_history_share_link_service.d.ts +10 -10
- package/dist/services/gps/features/gps_track_history_share_link_service.js +62 -35
- package/dist/services/gps/reports/gps_models/DashboardSummaryReport.js +18 -0
- package/dist/services/gps/reports/gps_models/FuelConsumptionMonthly.js +18 -0
- package/dist/services/gps/reports/gps_models/GPSOverSpeedViolation.js +18 -0
- package/dist/services/gps/reports/gps_models/GpsAnalytics.js +18 -0
- package/dist/services/gps/reports/gps_models/GpsPacket.js +18 -0
- package/dist/services/gps/reports/gps_models/GpsSensor.js +18 -0
- package/dist/services/gps/reports/gps_models/HourlyKmAnalysis.js +18 -0
- package/dist/services/gps/reports/gps_models/KilometerMonthly.js +18 -0
- package/dist/services/gps/reports/gps_models/Last24HoursKmReport.js +18 -0
- package/dist/services/gps/reports/gps_models/OverSpeedViolationMonthly.js +18 -0
- package/dist/services/gps/reports/gps_reports_mongo_service.d.ts +43 -43
- package/dist/services/gps/reports/gps_reports_mongo_service.js +111 -70
- package/dist/services/gps/reports/gps_reports_postgre_service.js +1 -0
- package/dist/services/main/devices/master_device_service.d.ts +1 -1
- package/dist/services/main/devices/master_device_service.js +69 -38
- package/dist/services/main/drivers/master_driver_service.d.ts +1 -1
- package/dist/services/main/drivers/master_driver_service.js +73 -43
- package/dist/services/main/sims/master_sim_service.d.ts +1 -1
- package/dist/services/main/sims/master_sim_service.js +54 -27
- package/dist/services/main/users/auth_service.d.ts +1 -1
- package/dist/services/main/users/auth_service.js +47 -15
- package/dist/services/main/users/user_admin_service.js +52 -21
- package/dist/services/main/users/user_organisation_service.d.ts +1 -1
- package/dist/services/main/users/user_organisation_service.js +88 -59
- package/dist/services/main/users/user_service.d.ts +1 -1
- package/dist/services/main/users/user_service.js +142 -98
- package/dist/services/main/vehicle/childs/vehicle_odometer_history.d.ts +1 -1
- package/dist/services/main/vehicle/childs/vehicle_odometer_history.js +52 -24
- package/dist/services/main/vehicle/master_vehicle_service.d.ts +1 -1
- package/dist/services/main/vehicle/master_vehicle_service.js +282 -227
- package/dist/services/master/device/master_device_manufacturer_service.d.ts +1 -1
- package/dist/services/master/device/master_device_manufacturer_service.js +48 -16
- package/dist/services/master/device/master_device_model_service.d.ts +1 -1
- package/dist/services/master/device/master_device_model_service.js +50 -19
- package/dist/services/master/device/master_device_type_service.d.ts +1 -1
- package/dist/services/master/device/master_device_type_service.js +53 -22
- package/dist/services/master/expense/master_expense_name_service.d.ts +1 -1
- package/dist/services/master/expense/master_expense_name_service.js +49 -20
- package/dist/services/master/expense/master_expense_type_service.d.ts +1 -1
- package/dist/services/master/expense/master_expense_type_service.js +47 -17
- package/dist/services/master/expense/master_vendor_type_service.d.ts +1 -1
- package/dist/services/master/expense/master_vendor_type_service.js +48 -19
- package/dist/services/master/fleet/master_fleet_incident_severity_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_incident_severity_service.js +47 -17
- package/dist/services/master/fleet/master_fleet_incident_status_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_incident_status_service.js +47 -17
- package/dist/services/master/fleet/master_fleet_incident_type_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_incident_type_service.js +47 -17
- package/dist/services/master/fleet/master_fleet_insurance_claim_status_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_insurance_claim_status_service.js +47 -17
- package/dist/services/master/fleet/master_fleet_service_task_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_service_task_service.js +47 -17
- package/dist/services/master/main/master_main_country_service.d.ts +1 -1
- package/dist/services/master/main/master_main_country_service.js +48 -16
- package/dist/services/master/main/master_main_currency_service.d.ts +1 -1
- package/dist/services/master/main/master_main_currency_service.js +49 -20
- package/dist/services/master/main/master_main_date_format_service.d.ts +1 -1
- package/dist/services/master/main/master_main_date_format_service.js +46 -15
- package/dist/services/master/main/master_main_eway_bill_provider_service.d.ts +2 -2
- package/dist/services/master/main/master_main_eway_bill_provider_service.js +46 -16
- package/dist/services/master/main/master_main_fasttag_bank_service.d.ts +2 -2
- package/dist/services/master/main/master_main_fasttag_bank_service.js +46 -16
- package/dist/services/master/main/master_main_industry_service.d.ts +1 -1
- package/dist/services/master/main/master_main_industry_service.js +46 -16
- package/dist/services/master/main/master_main_landmark_service.d.ts +1 -1
- package/dist/services/master/main/master_main_landmark_service.js +55 -28
- package/dist/services/master/main/master_main_language_service.d.ts +1 -1
- package/dist/services/master/main/master_main_language_service.js +46 -15
- package/dist/services/master/main/master_main_sim_provider_service.js +46 -15
- package/dist/services/master/main/master_main_state_service.d.ts +1 -1
- package/dist/services/master/main/master_main_state_service.js +48 -19
- package/dist/services/master/main/master_main_timezone_service.d.ts +1 -1
- package/dist/services/master/main/master_main_timezone_service.js +51 -22
- package/dist/services/master/main/master_main_unit_distance_service.d.ts +1 -1
- package/dist/services/master/main/master_main_unit_distance_service.js +46 -15
- package/dist/services/master/main/master_main_unit_mileage_service.d.ts +1 -1
- package/dist/services/master/main/master_main_unit_mileage_service.js +46 -15
- package/dist/services/master/main/master_main_unit_volume_service.d.ts +1 -1
- package/dist/services/master/main/master_main_unit_volume_service.js +46 -15
- package/dist/services/master/organisation/organisation_branch_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_branch_service.js +51 -19
- package/dist/services/master/organisation/organisation_color_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_color_service.js +50 -18
- package/dist/services/master/organisation/organisation_group_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_group_service.js +51 -19
- package/dist/services/master/organisation/organisation_sub_company_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_sub_company_service.js +52 -21
- package/dist/services/master/organisation/organisation_tag_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_tag_service.js +49 -17
- package/dist/services/master/spare_part/master_spare_part_category_service.d.ts +1 -1
- package/dist/services/master/spare_part/master_spare_part_category_service.js +51 -18
- package/dist/services/master/spare_part/master_spare_part_sub_category_service.d.ts +1 -1
- package/dist/services/master/spare_part/master_spare_part_sub_category_service.js +50 -20
- package/dist/services/master/spare_part/master_spare_part_unit_service.d.ts +1 -1
- package/dist/services/master/spare_part/master_spare_part_unit_service.js +48 -18
- package/dist/services/master/trip/master_trip_party_type_service.d.ts +1 -1
- package/dist/services/master/trip/master_trip_party_type_service.js +47 -17
- package/dist/services/master/tyre/master_tyre_grade_service.d.ts +1 -1
- package/dist/services/master/tyre/master_tyre_grade_service.js +47 -17
- package/dist/services/master/tyre/master_tyre_make_service.d.ts +1 -1
- package/dist/services/master/tyre/master_tyre_make_service.js +50 -17
- package/dist/services/master/tyre/master_tyre_model_service.d.ts +1 -1
- package/dist/services/master/tyre/master_tyre_model_service.js +49 -19
- package/dist/services/master/user/master_user_role_service.d.ts +1 -1
- package/dist/services/master/user/master_user_role_service.js +47 -17
- package/dist/services/master/user/master_user_status_service.d.ts +1 -1
- package/dist/services/master/user/master_user_status_service.js +47 -17
- package/dist/services/master/vehicle/master_vehicle_fuel_type_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_fuel_type_service.js +47 -17
- package/dist/services/master/vehicle/master_vehicle_make_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_make_service.js +49 -17
- package/dist/services/master/vehicle/master_vehicle_model_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_model_service.js +49 -19
- package/dist/services/master/vehicle/master_vehicle_ownership_type_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_ownership_type_service.js +47 -17
- package/dist/services/master/vehicle/master_vehicle_status_type_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_status_type_service.js +47 -17
- package/dist/services/master/vehicle/master_vehicle_sub_model_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_sub_model_service.js +51 -21
- package/dist/services/master/vehicle/master_vehicle_type_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_type_service.js +49 -17
- package/dist/services/website/contact_us_detail_service.js +53 -23
- package/dist/services/website/faq_service.js +46 -16
- package/dist/services/website/static_pages_service.js +47 -17
- package/dist/zod/zod_base_schema.js +47 -20
- package/dist/zod/zod_utils.js +108 -49
- package/package.json +2 -2
- package/dist/{user_organisation_service-umUoNvpJ.d.ts → user_organisation_service-CNOJPhQD.d.ts} +20 -20
|
@@ -1,3 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/services/main/vehicle/master_vehicle_service.ts
|
|
21
|
+
var master_vehicle_service_exports = {};
|
|
22
|
+
__export(master_vehicle_service_exports, {
|
|
23
|
+
SimpleFindQuerySchema: () => SimpleFindQuerySchema,
|
|
24
|
+
VehicleDetailBodySchema: () => VehicleDetailBodySchema,
|
|
25
|
+
VehicleDetailGPSAnalyticsSchema: () => VehicleDetailGPSAnalyticsSchema,
|
|
26
|
+
VehicleDetailGPSDataSchema: () => VehicleDetailGPSDataSchema,
|
|
27
|
+
VehicleDetailGPSMainSchema: () => VehicleDetailGPSMainSchema,
|
|
28
|
+
VehicleDetailLifeCycleSchema: () => VehicleDetailLifeCycleSchema,
|
|
29
|
+
VehicleDetailPurchaseSchema: () => VehicleDetailPurchaseSchema,
|
|
30
|
+
VehicleDetailTripSchema: () => VehicleDetailTripSchema,
|
|
31
|
+
VehicleDeviceLinkSchema: () => VehicleDeviceLinkSchema,
|
|
32
|
+
VehicleDeviceUnlinkSchema: () => VehicleDeviceUnlinkSchema,
|
|
33
|
+
VehicleDriverLinkSchema: () => VehicleDriverLinkSchema,
|
|
34
|
+
VehicleGPSQuerySchema: () => VehicleGPSQuerySchema,
|
|
35
|
+
VehicleQuerySchema: () => VehicleQuerySchema,
|
|
36
|
+
VehicleSchema: () => VehicleSchema,
|
|
37
|
+
createVehicle: () => createVehicle,
|
|
38
|
+
deleteVehicle: () => deleteVehicle,
|
|
39
|
+
findVehicleGPSDetails: () => findVehicleGPSDetails,
|
|
40
|
+
findVehicles: () => findVehicles,
|
|
41
|
+
findVehiclesLiveDashboard: () => findVehiclesLiveDashboard,
|
|
42
|
+
getDeviceLinkHistoryByDevice: () => getDeviceLinkHistoryByDevice,
|
|
43
|
+
getDeviceLinkHistoryByVehicle: () => getDeviceLinkHistoryByVehicle,
|
|
44
|
+
getDriverLinkHistoryByDriver: () => getDriverLinkHistoryByDriver,
|
|
45
|
+
getDriverLinkHistoryByVehicle: () => getDriverLinkHistoryByVehicle,
|
|
46
|
+
getVehicleCache: () => getVehicleCache,
|
|
47
|
+
getVehicleParentCache: () => getVehicleParentCache,
|
|
48
|
+
getVehicleSimpleCache: () => getVehicleSimpleCache,
|
|
49
|
+
getVehicleSimpleDropdownCustom: () => getVehicleSimpleDropdownCustom,
|
|
50
|
+
linkDeviceToVehicle: () => linkDeviceToVehicle,
|
|
51
|
+
linkDriverToVehicle: () => linkDriverToVehicle,
|
|
52
|
+
newVehiclePayload: () => newVehiclePayload,
|
|
53
|
+
toVehicleDetailLifeCyclePayload: () => toVehicleDetailLifeCyclePayload,
|
|
54
|
+
toVehicleDetailPurchasePayload: () => toVehicleDetailPurchasePayload,
|
|
55
|
+
toVehicleDetailsBodyPayload: () => toVehicleDetailsBodyPayload,
|
|
56
|
+
toVehicleDetailsGPSPayload: () => toVehicleDetailsGPSPayload,
|
|
57
|
+
toVehiclePayload: () => toVehiclePayload,
|
|
58
|
+
unlinkDeviceFromVehicle: () => unlinkDeviceFromVehicle,
|
|
59
|
+
unlinkDriverFromVehicle: () => unlinkDriverFromVehicle,
|
|
60
|
+
updateVehicle: () => updateVehicle,
|
|
61
|
+
updateVehicleBodyDetails: () => updateVehicleBodyDetails,
|
|
62
|
+
updateVehicleGPSDetailsAnalytics: () => updateVehicleGPSDetailsAnalytics,
|
|
63
|
+
updateVehicleGPSDetailsData: () => updateVehicleGPSDetailsData,
|
|
64
|
+
updateVehicleGPSDetailsMain: () => updateVehicleGPSDetailsMain,
|
|
65
|
+
updateVehicleLifeCycleDetails: () => updateVehicleLifeCycleDetails,
|
|
66
|
+
updateVehiclePurchaseDetails: () => updateVehiclePurchaseDetails,
|
|
67
|
+
updateVehicleTripDetails: () => updateVehicleTripDetails
|
|
68
|
+
});
|
|
69
|
+
module.exports = __toCommonJS(master_vehicle_service_exports);
|
|
70
|
+
|
|
1
71
|
// src/core/sdk-config.ts
|
|
2
72
|
var axiosInstance;
|
|
3
73
|
var getAxiosInstance = () => {
|
|
@@ -26,25 +96,9 @@ var apiDelete = async (url) => {
|
|
|
26
96
|
};
|
|
27
97
|
|
|
28
98
|
// src/services/main/vehicle/master_vehicle_service.ts
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
stringOptional,
|
|
33
|
-
numberOptional,
|
|
34
|
-
enumMandatory,
|
|
35
|
-
enumOptional,
|
|
36
|
-
booleanOptional,
|
|
37
|
-
multi_select_optional,
|
|
38
|
-
single_select_optional,
|
|
39
|
-
single_select_mandatory,
|
|
40
|
-
doubleOptional,
|
|
41
|
-
doubleOptionalLatLng,
|
|
42
|
-
doubleOptionalAmount,
|
|
43
|
-
dateOptional,
|
|
44
|
-
enumArrayOptional,
|
|
45
|
-
getAllEnums
|
|
46
|
-
} from "zod/zod_utils";
|
|
47
|
-
import { BaseQuerySchema } from "zod/zod_base_schema";
|
|
99
|
+
var import_zod = require("zod");
|
|
100
|
+
var import_zod_utils = require("zod/zod_utils");
|
|
101
|
+
var import_zod_base_schema = require("zod/zod_base_schema");
|
|
48
102
|
|
|
49
103
|
// src/core/Enums.ts
|
|
50
104
|
var Status = /* @__PURE__ */ ((Status2) => {
|
|
@@ -118,328 +172,328 @@ var ENDPOINTS = {
|
|
|
118
172
|
CACHE_PARENT: `${URL}/cache_parent/:organisation_id`,
|
|
119
173
|
CACHE_SIMPLE_DROPDOWN: `${URL}/cache_vehicle_simple_dropdown_custom/:organisation_id`
|
|
120
174
|
};
|
|
121
|
-
var VehicleSchema = z.object({
|
|
122
|
-
organisation_id: single_select_mandatory("Organisation ID"),
|
|
175
|
+
var VehicleSchema = import_zod.z.object({
|
|
176
|
+
organisation_id: (0, import_zod_utils.single_select_mandatory)("Organisation ID"),
|
|
123
177
|
// Single selection -> UserOrganisation
|
|
124
|
-
vehicle_number: stringMandatory("Vehicle Number", 2, 50),
|
|
125
|
-
vehicle_name: stringOptional("Vehicle Name", 0, 50),
|
|
126
|
-
odometer_reading: numberOptional("Odometer Reading"),
|
|
127
|
-
engine_number: stringOptional("Engine Number", 0, 20),
|
|
128
|
-
chassis_number: stringOptional("Chassis Number", 0, 20),
|
|
129
|
-
vehicle_make_year: numberOptional("Vehicle Make Year"),
|
|
130
|
-
is_fleet_active: enumMandatory("Is Fleet Active", YesNo, "Yes" /* Yes */),
|
|
131
|
-
is_gps_active: enumMandatory("Is GPS Active", YesNo, "No" /* No */),
|
|
132
|
-
is_trip_active: enumMandatory("Is Trip Active", YesNo, "No" /* No */),
|
|
133
|
-
vehicle_front_image_url: stringOptional("Vehicle Front Image URL", 0, 300),
|
|
134
|
-
vehicle_front_image_key: stringOptional("Vehicle Front Image Key", 0, 300),
|
|
135
|
-
vehicle_plate_image_url: stringOptional("Vehicle Plate Image URL", 0, 300),
|
|
136
|
-
vehicle_plate_image_key: stringOptional("Vehicle Plate Image Key", 0, 300),
|
|
137
|
-
vehicle_full_image_url: stringOptional("Vehicle Full Image URL", 0, 300),
|
|
138
|
-
vehicle_full_image_key: stringOptional("Vehicle Full Image Key", 0, 300),
|
|
139
|
-
status: enumMandatory("Status", Status, "Active" /* Active */),
|
|
140
|
-
organisation_sub_company_id: single_select_optional(
|
|
178
|
+
vehicle_number: (0, import_zod_utils.stringMandatory)("Vehicle Number", 2, 50),
|
|
179
|
+
vehicle_name: (0, import_zod_utils.stringOptional)("Vehicle Name", 0, 50),
|
|
180
|
+
odometer_reading: (0, import_zod_utils.numberOptional)("Odometer Reading"),
|
|
181
|
+
engine_number: (0, import_zod_utils.stringOptional)("Engine Number", 0, 20),
|
|
182
|
+
chassis_number: (0, import_zod_utils.stringOptional)("Chassis Number", 0, 20),
|
|
183
|
+
vehicle_make_year: (0, import_zod_utils.numberOptional)("Vehicle Make Year"),
|
|
184
|
+
is_fleet_active: (0, import_zod_utils.enumMandatory)("Is Fleet Active", YesNo, "Yes" /* Yes */),
|
|
185
|
+
is_gps_active: (0, import_zod_utils.enumMandatory)("Is GPS Active", YesNo, "No" /* No */),
|
|
186
|
+
is_trip_active: (0, import_zod_utils.enumMandatory)("Is Trip Active", YesNo, "No" /* No */),
|
|
187
|
+
vehicle_front_image_url: (0, import_zod_utils.stringOptional)("Vehicle Front Image URL", 0, 300),
|
|
188
|
+
vehicle_front_image_key: (0, import_zod_utils.stringOptional)("Vehicle Front Image Key", 0, 300),
|
|
189
|
+
vehicle_plate_image_url: (0, import_zod_utils.stringOptional)("Vehicle Plate Image URL", 0, 300),
|
|
190
|
+
vehicle_plate_image_key: (0, import_zod_utils.stringOptional)("Vehicle Plate Image Key", 0, 300),
|
|
191
|
+
vehicle_full_image_url: (0, import_zod_utils.stringOptional)("Vehicle Full Image URL", 0, 300),
|
|
192
|
+
vehicle_full_image_key: (0, import_zod_utils.stringOptional)("Vehicle Full Image Key", 0, 300),
|
|
193
|
+
status: (0, import_zod_utils.enumMandatory)("Status", Status, "Active" /* Active */),
|
|
194
|
+
organisation_sub_company_id: (0, import_zod_utils.single_select_optional)(
|
|
141
195
|
"Organisation Sub Company ID"
|
|
142
196
|
),
|
|
143
197
|
// Single selection -> OrganisationSubCompany
|
|
144
|
-
organisation_branch_id: single_select_optional("Organisation Branch ID"),
|
|
198
|
+
organisation_branch_id: (0, import_zod_utils.single_select_optional)("Organisation Branch ID"),
|
|
145
199
|
// Single selection -> OrganisationBranch
|
|
146
|
-
organisation_tag_id: single_select_optional("Organisation Tag ID"),
|
|
200
|
+
organisation_tag_id: (0, import_zod_utils.single_select_optional)("Organisation Tag ID"),
|
|
147
201
|
// Single selection -> OrganisationTag
|
|
148
|
-
organisation_color_id: single_select_optional("Organisation Color ID"),
|
|
202
|
+
organisation_color_id: (0, import_zod_utils.single_select_optional)("Organisation Color ID"),
|
|
149
203
|
// Single selection -> OrganisationColor
|
|
150
|
-
organisation_group_ids: multi_select_optional("Organisation Groups"),
|
|
204
|
+
organisation_group_ids: (0, import_zod_utils.multi_select_optional)("Organisation Groups"),
|
|
151
205
|
// Multi selection -> OrganisationGroup
|
|
152
|
-
vehicle_make_id: single_select_optional("Vehicle Make ID"),
|
|
206
|
+
vehicle_make_id: (0, import_zod_utils.single_select_optional)("Vehicle Make ID"),
|
|
153
207
|
// Single selection -> MasterVehicleMake
|
|
154
|
-
vehicle_model_id: single_select_optional("Vehicle Model ID"),
|
|
208
|
+
vehicle_model_id: (0, import_zod_utils.single_select_optional)("Vehicle Model ID"),
|
|
155
209
|
// Single selection -> MasterVehicleModel
|
|
156
|
-
vehicle_sub_model_id: single_select_optional("Vehicle Sub Model ID"),
|
|
210
|
+
vehicle_sub_model_id: (0, import_zod_utils.single_select_optional)("Vehicle Sub Model ID"),
|
|
157
211
|
// Single selection -> MasterVehicleSubModel
|
|
158
|
-
vehicle_type_id: single_select_optional("Vehicle Type ID"),
|
|
212
|
+
vehicle_type_id: (0, import_zod_utils.single_select_optional)("Vehicle Type ID"),
|
|
159
213
|
// Single selection -> MasterVehicleType
|
|
160
|
-
vehicle_status_type_id: single_select_optional("Vehicle Status Type ID"),
|
|
214
|
+
vehicle_status_type_id: (0, import_zod_utils.single_select_optional)("Vehicle Status Type ID"),
|
|
161
215
|
// Single selection -> MasterVehicleStatusType
|
|
162
|
-
vehicle_ownership_type_id: single_select_optional(
|
|
216
|
+
vehicle_ownership_type_id: (0, import_zod_utils.single_select_optional)(
|
|
163
217
|
"Vehicle Ownership Type ID"
|
|
164
218
|
),
|
|
165
219
|
// Single selection -> MasterVehicleOwnershipType
|
|
166
|
-
vehicle_fuel_type_id: single_select_optional("Vehicle Fuel Type ID")
|
|
220
|
+
vehicle_fuel_type_id: (0, import_zod_utils.single_select_optional)("Vehicle Fuel Type ID")
|
|
167
221
|
// Single selection -> MasterVehicleFuelType
|
|
168
222
|
});
|
|
169
|
-
var VehicleDeviceLinkSchema = z.object({
|
|
170
|
-
device_id: single_select_mandatory("Device ID"),
|
|
223
|
+
var VehicleDeviceLinkSchema = import_zod.z.object({
|
|
224
|
+
device_id: (0, import_zod_utils.single_select_mandatory)("Device ID"),
|
|
171
225
|
// Single selection -> MasterDevice
|
|
172
|
-
device_manufacturer_id: single_select_mandatory("Device Manufacturer ID"),
|
|
226
|
+
device_manufacturer_id: (0, import_zod_utils.single_select_mandatory)("Device Manufacturer ID"),
|
|
173
227
|
// Single selection -> MasterDeviceManufacturer
|
|
174
|
-
device_model_id: single_select_mandatory("Device Model ID"),
|
|
228
|
+
device_model_id: (0, import_zod_utils.single_select_mandatory)("Device Model ID"),
|
|
175
229
|
// Single selection -> MasterDeviceModel
|
|
176
|
-
device_type_id: single_select_mandatory("Device Type ID"),
|
|
230
|
+
device_type_id: (0, import_zod_utils.single_select_mandatory)("Device Type ID"),
|
|
177
231
|
// Single selection -> MasterDeviceType
|
|
178
|
-
organisation_id: single_select_mandatory("Organisation ID"),
|
|
232
|
+
organisation_id: (0, import_zod_utils.single_select_mandatory)("Organisation ID"),
|
|
179
233
|
// Single selection -> UserOrganisation
|
|
180
|
-
country_id: single_select_mandatory("Country ID"),
|
|
234
|
+
country_id: (0, import_zod_utils.single_select_mandatory)("Country ID"),
|
|
181
235
|
// Single selection -> MasterMainCountry
|
|
182
|
-
time_zone_id: single_select_mandatory("Time Zone ID"),
|
|
236
|
+
time_zone_id: (0, import_zod_utils.single_select_mandatory)("Time Zone ID"),
|
|
183
237
|
// Single selection -> MasterMainTimeZone
|
|
184
|
-
vehicle_id: single_select_mandatory("Vehicle ID"),
|
|
238
|
+
vehicle_id: (0, import_zod_utils.single_select_mandatory)("Vehicle ID"),
|
|
185
239
|
// Single selection -> Vehicle
|
|
186
|
-
device_image_url: stringOptional("Fuel Receipt URL", 0, 300),
|
|
187
|
-
device_image_key: stringOptional("Fuel Receipt Key", 0, 300),
|
|
188
|
-
vehicle_image_url: stringOptional("Fuel Receipt URL", 0, 300),
|
|
189
|
-
vehicle_image_key: stringOptional("Fuel Receipt Key", 0, 300),
|
|
190
|
-
sim_image_url: stringOptional("Fuel Receipt URL", 0, 300),
|
|
191
|
-
sim_image_key: stringOptional("Fuel Receipt Key", 0, 300),
|
|
192
|
-
gps_lock_relay: enumOptional("GPS Lock Relay", YesNo, "No" /* No */),
|
|
193
|
-
gps_door_locker: enumOptional("GPS Door Locker", YesNo, "No" /* No */),
|
|
194
|
-
door_sensor: enumOptional("Door Sensor", YesNo, "No" /* No */),
|
|
195
|
-
genset_sensor: enumOptional("Genset Sensor", YesNo, "No" /* No */),
|
|
196
|
-
dashcam_sensor: enumOptional("Dashcam Sensor", YesNo, "No" /* No */),
|
|
197
|
-
is_rear_cam: enumOptional("Is Rear Cam", YesNo, "No" /* No */),
|
|
198
|
-
is_front_cam: enumOptional("Is Front Cam", YesNo, "No" /* No */),
|
|
199
|
-
camera_extra_count: numberOptional("Camera Extra Count")
|
|
240
|
+
device_image_url: (0, import_zod_utils.stringOptional)("Fuel Receipt URL", 0, 300),
|
|
241
|
+
device_image_key: (0, import_zod_utils.stringOptional)("Fuel Receipt Key", 0, 300),
|
|
242
|
+
vehicle_image_url: (0, import_zod_utils.stringOptional)("Fuel Receipt URL", 0, 300),
|
|
243
|
+
vehicle_image_key: (0, import_zod_utils.stringOptional)("Fuel Receipt Key", 0, 300),
|
|
244
|
+
sim_image_url: (0, import_zod_utils.stringOptional)("Fuel Receipt URL", 0, 300),
|
|
245
|
+
sim_image_key: (0, import_zod_utils.stringOptional)("Fuel Receipt Key", 0, 300),
|
|
246
|
+
gps_lock_relay: (0, import_zod_utils.enumOptional)("GPS Lock Relay", YesNo, "No" /* No */),
|
|
247
|
+
gps_door_locker: (0, import_zod_utils.enumOptional)("GPS Door Locker", YesNo, "No" /* No */),
|
|
248
|
+
door_sensor: (0, import_zod_utils.enumOptional)("Door Sensor", YesNo, "No" /* No */),
|
|
249
|
+
genset_sensor: (0, import_zod_utils.enumOptional)("Genset Sensor", YesNo, "No" /* No */),
|
|
250
|
+
dashcam_sensor: (0, import_zod_utils.enumOptional)("Dashcam Sensor", YesNo, "No" /* No */),
|
|
251
|
+
is_rear_cam: (0, import_zod_utils.enumOptional)("Is Rear Cam", YesNo, "No" /* No */),
|
|
252
|
+
is_front_cam: (0, import_zod_utils.enumOptional)("Is Front Cam", YesNo, "No" /* No */),
|
|
253
|
+
camera_extra_count: (0, import_zod_utils.numberOptional)("Camera Extra Count")
|
|
200
254
|
});
|
|
201
|
-
var VehicleDeviceUnlinkSchema = z.object({
|
|
202
|
-
vehicle_id: single_select_mandatory("Vehicle ID"),
|
|
255
|
+
var VehicleDeviceUnlinkSchema = import_zod.z.object({
|
|
256
|
+
vehicle_id: (0, import_zod_utils.single_select_mandatory)("Vehicle ID"),
|
|
203
257
|
// Single selection -> Vehicle
|
|
204
|
-
device_id: single_select_mandatory("Device ID")
|
|
258
|
+
device_id: (0, import_zod_utils.single_select_mandatory)("Device ID")
|
|
205
259
|
// Single selection -> MasterDevice
|
|
206
260
|
});
|
|
207
|
-
var VehicleDriverLinkSchema = z.object({
|
|
208
|
-
organisation_id: single_select_mandatory("Organisation ID"),
|
|
261
|
+
var VehicleDriverLinkSchema = import_zod.z.object({
|
|
262
|
+
organisation_id: (0, import_zod_utils.single_select_mandatory)("Organisation ID"),
|
|
209
263
|
// Single selection -> Organisation
|
|
210
|
-
vehicle_id: single_select_mandatory("Vehicle ID"),
|
|
264
|
+
vehicle_id: (0, import_zod_utils.single_select_mandatory)("Vehicle ID"),
|
|
211
265
|
// Single selection -> Vehicle
|
|
212
|
-
driver_id: single_select_mandatory("Driver ID")
|
|
266
|
+
driver_id: (0, import_zod_utils.single_select_mandatory)("Driver ID")
|
|
213
267
|
// Single selection -> MasterDriver
|
|
214
268
|
});
|
|
215
|
-
var SimpleFindQuerySchema = BaseQuerySchema.extend({
|
|
216
|
-
organisation_id: single_select_mandatory("Organisation ID")
|
|
269
|
+
var SimpleFindQuerySchema = import_zod_base_schema.BaseQuerySchema.extend({
|
|
270
|
+
organisation_id: (0, import_zod_utils.single_select_mandatory)("Organisation ID")
|
|
217
271
|
// Single selection -> UserOrganisation
|
|
218
272
|
});
|
|
219
|
-
var VehicleDetailBodySchema = z.object({
|
|
220
|
-
vehicle_body_details: stringOptional("Vehicle Body Details", 0, 300),
|
|
221
|
-
vehicle_height: doubleOptional("Vehicle Height", 0, 1e4, 2),
|
|
222
|
-
vehicle_width: doubleOptional("Vehicle Width", 0, 1e4, 2),
|
|
223
|
-
vehicle_length: doubleOptional("Vehicle Length", 0, 1e4, 2),
|
|
224
|
-
vehicle_passenger_capacity: numberOptional("Vehicle Passenger Capacity"),
|
|
225
|
-
vehicle_cargo_volume: doubleOptional("Vehicle Cargo Volume", 0, 1e4, 2),
|
|
226
|
-
vehicle_maximum_weight_capacity: doubleOptional(
|
|
273
|
+
var VehicleDetailBodySchema = import_zod.z.object({
|
|
274
|
+
vehicle_body_details: (0, import_zod_utils.stringOptional)("Vehicle Body Details", 0, 300),
|
|
275
|
+
vehicle_height: (0, import_zod_utils.doubleOptional)("Vehicle Height", 0, 1e4, 2),
|
|
276
|
+
vehicle_width: (0, import_zod_utils.doubleOptional)("Vehicle Width", 0, 1e4, 2),
|
|
277
|
+
vehicle_length: (0, import_zod_utils.doubleOptional)("Vehicle Length", 0, 1e4, 2),
|
|
278
|
+
vehicle_passenger_capacity: (0, import_zod_utils.numberOptional)("Vehicle Passenger Capacity"),
|
|
279
|
+
vehicle_cargo_volume: (0, import_zod_utils.doubleOptional)("Vehicle Cargo Volume", 0, 1e4, 2),
|
|
280
|
+
vehicle_maximum_weight_capacity: (0, import_zod_utils.doubleOptional)(
|
|
227
281
|
"Vehicle Maximum Weight Capacity",
|
|
228
282
|
0,
|
|
229
283
|
1e4,
|
|
230
284
|
2
|
|
231
285
|
),
|
|
232
|
-
vehicle_total_fuel_quantity: numberOptional("Vehicle Total Fuel Quantity"),
|
|
233
|
-
vehicle_tank_1_fuel_quantity: numberOptional("Vehicle Tank 1 Fuel Quantity"),
|
|
234
|
-
vehicle_tank_2_fuel_quantity: numberOptional("Vehicle Tank 2 Fuel Quantity"),
|
|
235
|
-
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
286
|
+
vehicle_total_fuel_quantity: (0, import_zod_utils.numberOptional)("Vehicle Total Fuel Quantity"),
|
|
287
|
+
vehicle_tank_1_fuel_quantity: (0, import_zod_utils.numberOptional)("Vehicle Tank 1 Fuel Quantity"),
|
|
288
|
+
vehicle_tank_2_fuel_quantity: (0, import_zod_utils.numberOptional)("Vehicle Tank 2 Fuel Quantity"),
|
|
289
|
+
status: (0, import_zod_utils.enumMandatory)("Status", Status, "Active" /* Active */)
|
|
236
290
|
});
|
|
237
|
-
var VehicleDetailGPSMainSchema = z.object({
|
|
238
|
-
gps_lock_relay: enumOptional("GPS Lock Relay", YesNo, "No" /* No */),
|
|
239
|
-
gps_door_locker: enumOptional("GPS Door Locker", YesNo, "No" /* No */),
|
|
240
|
-
door_sensor: enumOptional("Door Sensor", YesNo, "No" /* No */),
|
|
241
|
-
genset_sensor: enumOptional("Genset Sensor", YesNo, "No" /* No */),
|
|
242
|
-
dashcam_sensor: enumOptional("Dashcam Sensor", YesNo, "No" /* No */),
|
|
243
|
-
is_rear_cam: enumOptional("Is Rear Cam", YesNo, "No" /* No */),
|
|
244
|
-
is_front_cam: enumOptional("Is Front Cam", YesNo, "No" /* No */),
|
|
245
|
-
camera_extra_count: numberOptional("Camera Extra Count"),
|
|
246
|
-
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
291
|
+
var VehicleDetailGPSMainSchema = import_zod.z.object({
|
|
292
|
+
gps_lock_relay: (0, import_zod_utils.enumOptional)("GPS Lock Relay", YesNo, "No" /* No */),
|
|
293
|
+
gps_door_locker: (0, import_zod_utils.enumOptional)("GPS Door Locker", YesNo, "No" /* No */),
|
|
294
|
+
door_sensor: (0, import_zod_utils.enumOptional)("Door Sensor", YesNo, "No" /* No */),
|
|
295
|
+
genset_sensor: (0, import_zod_utils.enumOptional)("Genset Sensor", YesNo, "No" /* No */),
|
|
296
|
+
dashcam_sensor: (0, import_zod_utils.enumOptional)("Dashcam Sensor", YesNo, "No" /* No */),
|
|
297
|
+
is_rear_cam: (0, import_zod_utils.enumOptional)("Is Rear Cam", YesNo, "No" /* No */),
|
|
298
|
+
is_front_cam: (0, import_zod_utils.enumOptional)("Is Front Cam", YesNo, "No" /* No */),
|
|
299
|
+
camera_extra_count: (0, import_zod_utils.numberOptional)("Camera Extra Count"),
|
|
300
|
+
status: (0, import_zod_utils.enumMandatory)("Status", Status, "Active" /* Active */)
|
|
247
301
|
});
|
|
248
|
-
var VehicleDetailGPSDataSchema = z.object({
|
|
249
|
-
attributes: stringOptional("Attributes", 0, 2e3),
|
|
250
|
-
raw: stringOptional("Raw Data", 0, 2e3),
|
|
251
|
-
st: stringOptional("ST"),
|
|
252
|
-
dt: stringOptional("DT"),
|
|
253
|
-
ft: stringOptional("FT"),
|
|
254
|
-
sts: numberOptional("STS"),
|
|
255
|
-
dts: numberOptional("DTS"),
|
|
256
|
-
fts: numberOptional("FTS"),
|
|
257
|
-
la: doubleOptionalLatLng("Latitude"),
|
|
258
|
-
lo: doubleOptionalLatLng("Longitude"),
|
|
259
|
-
al: numberOptional("Altitude"),
|
|
260
|
-
s: numberOptional("Speed"),
|
|
261
|
-
b: numberOptional("Bearing"),
|
|
262
|
-
c: numberOptional("Course"),
|
|
263
|
-
i: booleanOptional("I"),
|
|
264
|
-
m: booleanOptional("M"),
|
|
265
|
-
p: booleanOptional("P"),
|
|
266
|
-
v: booleanOptional("V"),
|
|
267
|
-
b_r: stringOptional("B_R", 0, 100),
|
|
302
|
+
var VehicleDetailGPSDataSchema = import_zod.z.object({
|
|
303
|
+
attributes: (0, import_zod_utils.stringOptional)("Attributes", 0, 2e3),
|
|
304
|
+
raw: (0, import_zod_utils.stringOptional)("Raw Data", 0, 2e3),
|
|
305
|
+
st: (0, import_zod_utils.stringOptional)("ST"),
|
|
306
|
+
dt: (0, import_zod_utils.stringOptional)("DT"),
|
|
307
|
+
ft: (0, import_zod_utils.stringOptional)("FT"),
|
|
308
|
+
sts: (0, import_zod_utils.numberOptional)("STS"),
|
|
309
|
+
dts: (0, import_zod_utils.numberOptional)("DTS"),
|
|
310
|
+
fts: (0, import_zod_utils.numberOptional)("FTS"),
|
|
311
|
+
la: (0, import_zod_utils.doubleOptionalLatLng)("Latitude"),
|
|
312
|
+
lo: (0, import_zod_utils.doubleOptionalLatLng)("Longitude"),
|
|
313
|
+
al: (0, import_zod_utils.numberOptional)("Altitude"),
|
|
314
|
+
s: (0, import_zod_utils.numberOptional)("Speed"),
|
|
315
|
+
b: (0, import_zod_utils.numberOptional)("Bearing"),
|
|
316
|
+
c: (0, import_zod_utils.numberOptional)("Course"),
|
|
317
|
+
i: (0, import_zod_utils.booleanOptional)("I"),
|
|
318
|
+
m: (0, import_zod_utils.booleanOptional)("M"),
|
|
319
|
+
p: (0, import_zod_utils.booleanOptional)("P"),
|
|
320
|
+
v: (0, import_zod_utils.booleanOptional)("V"),
|
|
321
|
+
b_r: (0, import_zod_utils.stringOptional)("B_R", 0, 100),
|
|
268
322
|
// Fuel and Temperature
|
|
269
|
-
f1_r: stringOptional("Fuel Sensor 1 Reading", 0, 100),
|
|
270
|
-
f2_r: stringOptional("Fuel Sensor 2 Reading", 0, 100),
|
|
271
|
-
f1: doubleOptionalLatLng("Fuel Level 1", 2),
|
|
272
|
-
f2: doubleOptionalLatLng("Fuel Level 2", 2),
|
|
273
|
-
t1_r: stringOptional("Temperature Sensor 1 Reading", 0, 100),
|
|
274
|
-
t2_r: stringOptional("Temperature Sensor 2 Reading", 0, 100),
|
|
275
|
-
t1: doubleOptionalLatLng("Temperature 1", 2),
|
|
276
|
-
t2: doubleOptionalLatLng("Temperature 2", 2),
|
|
323
|
+
f1_r: (0, import_zod_utils.stringOptional)("Fuel Sensor 1 Reading", 0, 100),
|
|
324
|
+
f2_r: (0, import_zod_utils.stringOptional)("Fuel Sensor 2 Reading", 0, 100),
|
|
325
|
+
f1: (0, import_zod_utils.doubleOptionalLatLng)("Fuel Level 1", 2),
|
|
326
|
+
f2: (0, import_zod_utils.doubleOptionalLatLng)("Fuel Level 2", 2),
|
|
327
|
+
t1_r: (0, import_zod_utils.stringOptional)("Temperature Sensor 1 Reading", 0, 100),
|
|
328
|
+
t2_r: (0, import_zod_utils.stringOptional)("Temperature Sensor 2 Reading", 0, 100),
|
|
329
|
+
t1: (0, import_zod_utils.doubleOptionalLatLng)("Temperature 1", 2),
|
|
330
|
+
t2: (0, import_zod_utils.doubleOptionalLatLng)("Temperature 2", 2),
|
|
277
331
|
// Landmark Location
|
|
278
|
-
gl: stringOptional("GL", 0, 300),
|
|
279
|
-
lid: stringOptional("LID", 0, 300),
|
|
280
|
-
ll: stringOptional("LL", 0, 300),
|
|
281
|
-
ld: numberOptional("LD"),
|
|
332
|
+
gl: (0, import_zod_utils.stringOptional)("GL", 0, 300),
|
|
333
|
+
lid: (0, import_zod_utils.stringOptional)("LID", 0, 300),
|
|
334
|
+
ll: (0, import_zod_utils.stringOptional)("LL", 0, 300),
|
|
335
|
+
ld: (0, import_zod_utils.numberOptional)("LD"),
|
|
282
336
|
// Sensor
|
|
283
|
-
s_r_l: booleanOptional("S_R_L"),
|
|
284
|
-
s_d_l: booleanOptional("S_D_L"),
|
|
285
|
-
s_d: booleanOptional("S_D"),
|
|
286
|
-
s_g: booleanOptional("S_G"),
|
|
287
|
-
g_s: enumOptional("GPS Source", GPSSource, "NoDevice" /* NoDevice */)
|
|
337
|
+
s_r_l: (0, import_zod_utils.booleanOptional)("S_R_L"),
|
|
338
|
+
s_d_l: (0, import_zod_utils.booleanOptional)("S_D_L"),
|
|
339
|
+
s_d: (0, import_zod_utils.booleanOptional)("S_D"),
|
|
340
|
+
s_g: (0, import_zod_utils.booleanOptional)("S_G"),
|
|
341
|
+
g_s: (0, import_zod_utils.enumOptional)("GPS Source", GPSSource, "NoDevice" /* NoDevice */)
|
|
288
342
|
});
|
|
289
|
-
var VehicleDetailGPSAnalyticsSchema = z.object({
|
|
290
|
-
km_today: doubleOptionalLatLng("Kilometers Today", 3),
|
|
291
|
-
km_this_week_sunday: doubleOptionalLatLng("Kilometers This Week (Sunday)", 3),
|
|
292
|
-
km_this_week_monday: doubleOptionalLatLng("Kilometers This Week (Monday)", 3),
|
|
293
|
-
km_this_month: doubleOptionalLatLng("Kilometers This Month", 3),
|
|
294
|
-
km_this_year: doubleOptionalLatLng("Kilometers This Year", 3),
|
|
295
|
-
km_this_financial_year: doubleOptionalLatLng(
|
|
343
|
+
var VehicleDetailGPSAnalyticsSchema = import_zod.z.object({
|
|
344
|
+
km_today: (0, import_zod_utils.doubleOptionalLatLng)("Kilometers Today", 3),
|
|
345
|
+
km_this_week_sunday: (0, import_zod_utils.doubleOptionalLatLng)("Kilometers This Week (Sunday)", 3),
|
|
346
|
+
km_this_week_monday: (0, import_zod_utils.doubleOptionalLatLng)("Kilometers This Week (Monday)", 3),
|
|
347
|
+
km_this_month: (0, import_zod_utils.doubleOptionalLatLng)("Kilometers This Month", 3),
|
|
348
|
+
km_this_year: (0, import_zod_utils.doubleOptionalLatLng)("Kilometers This Year", 3),
|
|
349
|
+
km_this_financial_year: (0, import_zod_utils.doubleOptionalLatLng)(
|
|
296
350
|
"Kilometers This Financial Year",
|
|
297
351
|
3
|
|
298
352
|
),
|
|
299
|
-
km_slotted_today: doubleOptionalLatLng("Slotted Kilometers Today", 3),
|
|
300
|
-
km_slotted_this_week_sunday: doubleOptionalLatLng(
|
|
353
|
+
km_slotted_today: (0, import_zod_utils.doubleOptionalLatLng)("Slotted Kilometers Today", 3),
|
|
354
|
+
km_slotted_this_week_sunday: (0, import_zod_utils.doubleOptionalLatLng)(
|
|
301
355
|
"Slotted Kilometers This Week (Sunday)",
|
|
302
356
|
3
|
|
303
357
|
),
|
|
304
|
-
km_slotted_this_week_monday: doubleOptionalLatLng(
|
|
358
|
+
km_slotted_this_week_monday: (0, import_zod_utils.doubleOptionalLatLng)(
|
|
305
359
|
"Slotted Kilometers This Week (Monday)",
|
|
306
360
|
3
|
|
307
361
|
),
|
|
308
|
-
km_slotted_this_month: doubleOptionalLatLng(
|
|
362
|
+
km_slotted_this_month: (0, import_zod_utils.doubleOptionalLatLng)(
|
|
309
363
|
"Slotted Kilometers This Month",
|
|
310
364
|
3
|
|
311
365
|
),
|
|
312
|
-
km_slotted_this_year: doubleOptionalLatLng("Slotted Kilometers This Year", 3),
|
|
313
|
-
km_slotted_this_financial_year: doubleOptionalLatLng(
|
|
366
|
+
km_slotted_this_year: (0, import_zod_utils.doubleOptionalLatLng)("Slotted Kilometers This Year", 3),
|
|
367
|
+
km_slotted_this_financial_year: (0, import_zod_utils.doubleOptionalLatLng)(
|
|
314
368
|
"Slotted Kilometers This Financial Year",
|
|
315
369
|
3
|
|
316
370
|
),
|
|
317
|
-
km_total_distance: doubleOptionalLatLng("Total Distance", 3)
|
|
371
|
+
km_total_distance: (0, import_zod_utils.doubleOptionalLatLng)("Total Distance", 3)
|
|
318
372
|
});
|
|
319
|
-
var VehicleDetailLifeCycleSchema = z.object({
|
|
320
|
-
service_start_date: dateOptional("Service Start Date"),
|
|
321
|
-
service_start_odometer_reading: numberOptional(
|
|
373
|
+
var VehicleDetailLifeCycleSchema = import_zod.z.object({
|
|
374
|
+
service_start_date: (0, import_zod_utils.dateOptional)("Service Start Date"),
|
|
375
|
+
service_start_odometer_reading: (0, import_zod_utils.numberOptional)(
|
|
322
376
|
"Service Start Odometer Reading"
|
|
323
377
|
),
|
|
324
|
-
service_end_date: dateOptional("Service End Date"),
|
|
325
|
-
service_end_odometer_reading: numberOptional("Service End Odometer Reading"),
|
|
326
|
-
life_estimate_max_month_year: dateOptional("Life Estimate Max Month/Year"),
|
|
327
|
-
life_estimate_max_odometer_reading: numberOptional(
|
|
378
|
+
service_end_date: (0, import_zod_utils.dateOptional)("Service End Date"),
|
|
379
|
+
service_end_odometer_reading: (0, import_zod_utils.numberOptional)("Service End Odometer Reading"),
|
|
380
|
+
life_estimate_max_month_year: (0, import_zod_utils.dateOptional)("Life Estimate Max Month/Year"),
|
|
381
|
+
life_estimate_max_odometer_reading: (0, import_zod_utils.numberOptional)(
|
|
328
382
|
"Life Estimate Max Odometer Reading"
|
|
329
383
|
),
|
|
330
|
-
life_expiry: enumOptional("Life Expiry", LifeExpiry, "No" /* No */),
|
|
384
|
+
life_expiry: (0, import_zod_utils.enumOptional)("Life Expiry", LifeExpiry, "No" /* No */),
|
|
331
385
|
// Adjust default as needed
|
|
332
|
-
life_expiry_message: stringOptional("Life Expiry Message", 0, 300),
|
|
333
|
-
life_expiry_note: stringOptional("Life Expiry Note", 0, 2e3),
|
|
334
|
-
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
386
|
+
life_expiry_message: (0, import_zod_utils.stringOptional)("Life Expiry Message", 0, 300),
|
|
387
|
+
life_expiry_note: (0, import_zod_utils.stringOptional)("Life Expiry Note", 0, 2e3),
|
|
388
|
+
status: (0, import_zod_utils.enumMandatory)("Status", Status, "Active" /* Active */)
|
|
335
389
|
});
|
|
336
|
-
var VehicleDetailPurchaseSchema = z.object({
|
|
390
|
+
var VehicleDetailPurchaseSchema = import_zod.z.object({
|
|
337
391
|
// Purchase Info
|
|
338
|
-
purchase_date: dateOptional("Purchase Date"),
|
|
339
|
-
purchase_notes: stringOptional("Purchase Notes", 0, 300),
|
|
340
|
-
purchase_vehicle_type: enumOptional(
|
|
392
|
+
purchase_date: (0, import_zod_utils.dateOptional)("Purchase Date"),
|
|
393
|
+
purchase_notes: (0, import_zod_utils.stringOptional)("Purchase Notes", 0, 300),
|
|
394
|
+
purchase_vehicle_type: (0, import_zod_utils.enumOptional)(
|
|
341
395
|
"Purchase Vehicle Type",
|
|
342
396
|
PurchaseVehicleType,
|
|
343
397
|
"New" /* New */
|
|
344
398
|
),
|
|
345
|
-
purchase_type: enumOptional(
|
|
399
|
+
purchase_type: (0, import_zod_utils.enumOptional)(
|
|
346
400
|
"Purchase Type",
|
|
347
401
|
PurchaseType,
|
|
348
402
|
"NoFinance" /* NoFinance */
|
|
349
403
|
),
|
|
350
|
-
purchase_vendor_id: single_select_optional("Purchase Vendor ID"),
|
|
351
|
-
purchase_total_amount: doubleOptionalAmount("Purchase Total Amount", 2),
|
|
404
|
+
purchase_vendor_id: (0, import_zod_utils.single_select_optional)("Purchase Vendor ID"),
|
|
405
|
+
purchase_total_amount: (0, import_zod_utils.doubleOptionalAmount)("Purchase Total Amount", 2),
|
|
352
406
|
// Loan Info
|
|
353
|
-
loan_lender_id: single_select_optional("Loan Lender ID"),
|
|
354
|
-
loan_amount: doubleOptionalAmount("Loan Amount", 2),
|
|
355
|
-
loan_down_payment: doubleOptionalAmount("Loan Down Payment", 2),
|
|
356
|
-
loan_interest_rate: doubleOptionalAmount("Loan Interest Rate", 2),
|
|
357
|
-
loan_no_of_installments: numberOptional("Loan No of Installments"),
|
|
358
|
-
loan_first_payment_date: dateOptional("Loan First Payment Date"),
|
|
359
|
-
loan_last_payment_date: dateOptional("Loan Last Payment Date"),
|
|
360
|
-
loan_monthly_emi: doubleOptionalAmount("Loan Monthly EMI"),
|
|
361
|
-
loan_emi_date: numberOptional("Loan EMI Date"),
|
|
407
|
+
loan_lender_id: (0, import_zod_utils.single_select_optional)("Loan Lender ID"),
|
|
408
|
+
loan_amount: (0, import_zod_utils.doubleOptionalAmount)("Loan Amount", 2),
|
|
409
|
+
loan_down_payment: (0, import_zod_utils.doubleOptionalAmount)("Loan Down Payment", 2),
|
|
410
|
+
loan_interest_rate: (0, import_zod_utils.doubleOptionalAmount)("Loan Interest Rate", 2),
|
|
411
|
+
loan_no_of_installments: (0, import_zod_utils.numberOptional)("Loan No of Installments"),
|
|
412
|
+
loan_first_payment_date: (0, import_zod_utils.dateOptional)("Loan First Payment Date"),
|
|
413
|
+
loan_last_payment_date: (0, import_zod_utils.dateOptional)("Loan Last Payment Date"),
|
|
414
|
+
loan_monthly_emi: (0, import_zod_utils.doubleOptionalAmount)("Loan Monthly EMI"),
|
|
415
|
+
loan_emi_date: (0, import_zod_utils.numberOptional)("Loan EMI Date"),
|
|
362
416
|
// Lease Info
|
|
363
|
-
lease_vendor_id: single_select_optional("Lease Vendor ID"),
|
|
364
|
-
lease_start_date: dateOptional("Lease Start Date"),
|
|
365
|
-
lease_end_date: dateOptional("Lease End Date"),
|
|
366
|
-
lease_security_deposit_amount: doubleOptionalAmount(
|
|
417
|
+
lease_vendor_id: (0, import_zod_utils.single_select_optional)("Lease Vendor ID"),
|
|
418
|
+
lease_start_date: (0, import_zod_utils.dateOptional)("Lease Start Date"),
|
|
419
|
+
lease_end_date: (0, import_zod_utils.dateOptional)("Lease End Date"),
|
|
420
|
+
lease_security_deposit_amount: (0, import_zod_utils.doubleOptionalAmount)(
|
|
367
421
|
"Lease Security Deposit Amount",
|
|
368
422
|
2
|
|
369
423
|
),
|
|
370
|
-
lease_monthly_emi_amount: doubleOptionalAmount("Lease Monthly EMI Amount", 2),
|
|
371
|
-
lease_emi_date: numberOptional("Lease EMI Date"),
|
|
424
|
+
lease_monthly_emi_amount: (0, import_zod_utils.doubleOptionalAmount)("Lease Monthly EMI Amount", 2),
|
|
425
|
+
lease_emi_date: (0, import_zod_utils.numberOptional)("Lease EMI Date"),
|
|
372
426
|
// Warranty Info
|
|
373
|
-
warranty_expiration_date: dateOptional("Warranty Expiration Date"),
|
|
374
|
-
warranty_max_odometer_reading: numberOptional(
|
|
427
|
+
warranty_expiration_date: (0, import_zod_utils.dateOptional)("Warranty Expiration Date"),
|
|
428
|
+
warranty_max_odometer_reading: (0, import_zod_utils.numberOptional)(
|
|
375
429
|
"Warranty Max Odometer Reading"
|
|
376
430
|
),
|
|
377
|
-
warranty_exchange_date: dateOptional("Warranty Exchange Date"),
|
|
431
|
+
warranty_exchange_date: (0, import_zod_utils.dateOptional)("Warranty Exchange Date"),
|
|
378
432
|
// Metadata
|
|
379
|
-
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
433
|
+
status: (0, import_zod_utils.enumMandatory)("Status", Status, "Active" /* Active */)
|
|
380
434
|
});
|
|
381
|
-
var VehicleDetailTripSchema = z.object({
|
|
382
|
-
trip_name: stringOptional("Trip Name", 0, 100),
|
|
383
|
-
trip_no: stringOptional("Trip Name", 0, 100),
|
|
384
|
-
eway_bill_number: stringOptional("E-Way Bill Number", 0, 100),
|
|
385
|
-
route_name: stringOptional("Route Name", 0, 100),
|
|
386
|
-
trip_start_date: dateOptional("Trip Start Date"),
|
|
387
|
-
trip_end_date: dateOptional("Trip End Date"),
|
|
388
|
-
trip_notes_1: stringOptional("Trip Notes 1", 0, 200),
|
|
389
|
-
trip_notes_2: stringOptional("Trip Notes 2", 0, 200),
|
|
390
|
-
trip_notes_3: stringOptional("Trip Notes 3", 0, 200),
|
|
391
|
-
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
435
|
+
var VehicleDetailTripSchema = import_zod.z.object({
|
|
436
|
+
trip_name: (0, import_zod_utils.stringOptional)("Trip Name", 0, 100),
|
|
437
|
+
trip_no: (0, import_zod_utils.stringOptional)("Trip Name", 0, 100),
|
|
438
|
+
eway_bill_number: (0, import_zod_utils.stringOptional)("E-Way Bill Number", 0, 100),
|
|
439
|
+
route_name: (0, import_zod_utils.stringOptional)("Route Name", 0, 100),
|
|
440
|
+
trip_start_date: (0, import_zod_utils.dateOptional)("Trip Start Date"),
|
|
441
|
+
trip_end_date: (0, import_zod_utils.dateOptional)("Trip End Date"),
|
|
442
|
+
trip_notes_1: (0, import_zod_utils.stringOptional)("Trip Notes 1", 0, 200),
|
|
443
|
+
trip_notes_2: (0, import_zod_utils.stringOptional)("Trip Notes 2", 0, 200),
|
|
444
|
+
trip_notes_3: (0, import_zod_utils.stringOptional)("Trip Notes 3", 0, 200),
|
|
445
|
+
status: (0, import_zod_utils.enumMandatory)("Status", Status, "Active" /* Active */)
|
|
392
446
|
});
|
|
393
|
-
var VehicleQuerySchema = BaseQuerySchema.extend({
|
|
394
|
-
organisation_ids: multi_select_optional("Organisation IDs"),
|
|
447
|
+
var VehicleQuerySchema = import_zod_base_schema.BaseQuerySchema.extend({
|
|
448
|
+
organisation_ids: (0, import_zod_utils.multi_select_optional)("Organisation IDs"),
|
|
395
449
|
// Multi-selection -> UserOrganisation
|
|
396
|
-
driver_ids: multi_select_optional("Driver IDs"),
|
|
450
|
+
driver_ids: (0, import_zod_utils.multi_select_optional)("Driver IDs"),
|
|
397
451
|
// Multi-selection -> MasterDriver
|
|
398
|
-
device_ids: multi_select_optional("Device IDs"),
|
|
452
|
+
device_ids: (0, import_zod_utils.multi_select_optional)("Device IDs"),
|
|
399
453
|
// Multi-selection -> MasterDevice
|
|
400
|
-
organisation_sub_company_ids: multi_select_optional(
|
|
454
|
+
organisation_sub_company_ids: (0, import_zod_utils.multi_select_optional)(
|
|
401
455
|
"Organisation Sub Company IDs"
|
|
402
456
|
),
|
|
403
457
|
// Multi-selection -> OrganisationSubCompany
|
|
404
|
-
organisation_branch_ids: multi_select_optional("Organisation Branch IDs"),
|
|
458
|
+
organisation_branch_ids: (0, import_zod_utils.multi_select_optional)("Organisation Branch IDs"),
|
|
405
459
|
// Multi-selection -> OrganisationBranch
|
|
406
|
-
organisation_tag_ids: multi_select_optional("Organisation Tag IDs"),
|
|
460
|
+
organisation_tag_ids: (0, import_zod_utils.multi_select_optional)("Organisation Tag IDs"),
|
|
407
461
|
// Multi-selection -> OrganisationTag
|
|
408
|
-
organisation_color_ids: multi_select_optional("Organisation Color IDs"),
|
|
462
|
+
organisation_color_ids: (0, import_zod_utils.multi_select_optional)("Organisation Color IDs"),
|
|
409
463
|
// Multi-selection -> OrganisationColor
|
|
410
|
-
vehicle_make_ids: multi_select_optional("Vehicle Make IDs", 100, []),
|
|
464
|
+
vehicle_make_ids: (0, import_zod_utils.multi_select_optional)("Vehicle Make IDs", 100, []),
|
|
411
465
|
// Multi-selection -> MasterVehicleMake
|
|
412
|
-
vehicle_model_ids: multi_select_optional("Vehicle Model IDs", 100, []),
|
|
466
|
+
vehicle_model_ids: (0, import_zod_utils.multi_select_optional)("Vehicle Model IDs", 100, []),
|
|
413
467
|
// Multi-selection -> MasterVehicleModel
|
|
414
|
-
vehicle_sub_model_ids: multi_select_optional("Vehicle Sub Model IDs"),
|
|
468
|
+
vehicle_sub_model_ids: (0, import_zod_utils.multi_select_optional)("Vehicle Sub Model IDs"),
|
|
415
469
|
// Multi-selection -> MasterVehicleSubModel
|
|
416
|
-
vehicle_type_ids: multi_select_optional("Vehicle Type IDs", 100, []),
|
|
470
|
+
vehicle_type_ids: (0, import_zod_utils.multi_select_optional)("Vehicle Type IDs", 100, []),
|
|
417
471
|
// Multi-selection -> MasterVehicleType
|
|
418
|
-
vehicle_status_type_ids: multi_select_optional("Vehicle Status Type IDs"),
|
|
472
|
+
vehicle_status_type_ids: (0, import_zod_utils.multi_select_optional)("Vehicle Status Type IDs"),
|
|
419
473
|
// Multi-selection -> MasterVehicleStatusType
|
|
420
|
-
vehicle_ownership_type_ids: multi_select_optional(
|
|
474
|
+
vehicle_ownership_type_ids: (0, import_zod_utils.multi_select_optional)(
|
|
421
475
|
"Vehicle Ownership Type IDs"
|
|
422
476
|
),
|
|
423
477
|
// Multi-selection -> MasterVehicleOwnershipType
|
|
424
|
-
vehicle_fuel_type_ids: multi_select_optional("Vehicle Fuel Type IDs"),
|
|
478
|
+
vehicle_fuel_type_ids: (0, import_zod_utils.multi_select_optional)("Vehicle Fuel Type IDs"),
|
|
425
479
|
// Multi-selection -> MasterVehicleFuelType
|
|
426
|
-
vehicle_ids: multi_select_optional("Vehicle IDs"),
|
|
480
|
+
vehicle_ids: (0, import_zod_utils.multi_select_optional)("Vehicle IDs"),
|
|
427
481
|
// Multi-selection -> Vehicles
|
|
428
|
-
is_device_installed: enumArrayOptional(
|
|
482
|
+
is_device_installed: (0, import_zod_utils.enumArrayOptional)(
|
|
429
483
|
"Is Device Installed",
|
|
430
484
|
YesNo,
|
|
431
|
-
getAllEnums(YesNo)
|
|
485
|
+
(0, import_zod_utils.getAllEnums)(YesNo)
|
|
432
486
|
),
|
|
433
|
-
is_driver_assigned: enumArrayOptional(
|
|
487
|
+
is_driver_assigned: (0, import_zod_utils.enumArrayOptional)(
|
|
434
488
|
"Is Device Installed",
|
|
435
489
|
YesNo,
|
|
436
|
-
getAllEnums(YesNo)
|
|
490
|
+
(0, import_zod_utils.getAllEnums)(YesNo)
|
|
437
491
|
)
|
|
438
492
|
});
|
|
439
|
-
var VehicleGPSQuerySchema = BaseQuerySchema.extend({
|
|
440
|
-
organisation_id: single_select_mandatory("Organisation ID"),
|
|
493
|
+
var VehicleGPSQuerySchema = import_zod_base_schema.BaseQuerySchema.extend({
|
|
494
|
+
organisation_id: (0, import_zod_utils.single_select_mandatory)("Organisation ID"),
|
|
441
495
|
// Single selection -> UserOrganisation
|
|
442
|
-
vehicle_id: single_select_mandatory("Vehicle ID")
|
|
496
|
+
vehicle_id: (0, import_zod_utils.single_select_mandatory)("Vehicle ID")
|
|
443
497
|
// Single-selection -> Vehicles
|
|
444
498
|
});
|
|
445
499
|
var toVehiclePayload = (vehicle) => ({
|
|
@@ -695,7 +749,8 @@ var getVehicleParentCache = async (organisationId) => {
|
|
|
695
749
|
ENDPOINTS.CACHE_PARENT.replace(":organisation_id", organisationId)
|
|
696
750
|
);
|
|
697
751
|
};
|
|
698
|
-
export
|
|
752
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
753
|
+
0 && (module.exports = {
|
|
699
754
|
SimpleFindQuerySchema,
|
|
700
755
|
VehicleDetailBodySchema,
|
|
701
756
|
VehicleDetailGPSAnalyticsSchema,
|
|
@@ -741,4 +796,4 @@ export {
|
|
|
741
796
|
updateVehicleLifeCycleDetails,
|
|
742
797
|
updateVehiclePurchaseDetails,
|
|
743
798
|
updateVehicleTripDetails
|
|
744
|
-
};
|
|
799
|
+
});
|