vms-nest-prisma-api-document 218.0.0 → 220.0.0
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/Enums.d.ts +8 -1
- package/dist/core/Enums.js +9 -0
- package/dist/services/account/bookmark_service.d.ts +11 -11
- package/dist/services/account/notification_preferences.service.d.ts +18 -18
- package/dist/services/account/report_preferences.service.d.ts +7 -7
- package/dist/services/account/ticket_service.d.ts +1 -1
- package/dist/services/fleet/bus_mangement/bus_stop.d.ts +23 -23
- package/dist/services/fleet/bus_mangement/calender.d.ts +8 -8
- package/dist/services/fleet/bus_mangement/master_route.d.ts +1 -1
- package/dist/services/fleet/bus_mangement/notice_board.d.ts +1 -1
- package/dist/services/fleet/bus_mangement/student.d.ts +17 -17
- package/dist/services/fleet/fuel_management/fleet_fuel_daily_summary_service.d.ts +27 -98
- package/dist/services/fleet/fuel_management/fleet_fuel_daily_summary_service.js +18 -16
- package/dist/services/fleet/fuel_management/fleet_fuel_refill_service.d.ts +70 -54
- package/dist/services/fleet/fuel_management/fleet_fuel_refill_service.js +75 -42
- package/dist/services/fleet/fuel_management/fleet_fuel_removal_service.d.ts +45 -42
- package/dist/services/fleet/fuel_management/fleet_fuel_removal_service.js +60 -54
- package/dist/services/fleet/incident_management/incident_management_service.d.ts +19 -13
- package/dist/services/fleet/incident_management/incident_management_service.js +17 -5
- package/dist/services/fleet/issue_management/issue_management_service.d.ts +49 -43
- package/dist/services/fleet/issue_management/issue_management_service.js +12 -6
- package/dist/services/fleet/service_management/fleet_service_management_service.d.ts +400 -0
- package/dist/services/fleet/service_management/fleet_service_management_service.js +573 -0
- package/dist/services/fleet/service_management/fleet_service_management_task_service.d.ts +145 -0
- package/dist/services/fleet/service_management/fleet_service_management_task_service.js +326 -0
- package/dist/services/fleet/vendor_management/fleet_vendor_fuel_station.d.ts +1 -1
- package/dist/services/fleet/vendor_management/fleet_vendor_fuel_station.js +41 -41
- package/dist/services/fleet/vendor_management/fleet_vendor_service.d.ts +1 -1
- package/dist/services/fleet/vendor_management/fleet_vendor_service.js +99 -93
- package/dist/services/fleet/vendor_management/fleet_vendor_service_center.d.ts +1 -1
- package/dist/services/fleet/vendor_management/fleet_vendor_service_center.js +53 -53
- package/dist/services/gps/features/geofence/gps_geofence_service.d.ts +3 -3
- package/dist/services/gps/features/geofence/gps_geofence_transaction_service.d.ts +6 -6
- package/dist/services/gps/features/geofence/gps_geofence_transaction_summary_service.d.ts +7 -7
- package/dist/services/gps/features/geofence/trip_geofence_to_geofence_service.d.ts +2 -2
- package/dist/services/gps/features/gps_live_track_share_link_service.d.ts +5 -5
- package/dist/services/gps/features/gps_track_history_share_link_service.d.ts +8 -8
- package/dist/services/main/devices/master_device_service.d.ts +1 -1
- package/dist/services/main/drivers/master_driver_service.d.ts +1 -1
- package/dist/services/main/sims/master_sim_service.d.ts +1 -1
- package/dist/services/main/users/auth_service.d.ts +1 -1
- package/dist/services/main/users/user_admin_service.d.ts +3 -3
- package/dist/services/main/users/user_organisation_service.d.ts +1 -1
- package/dist/services/main/users/user_service.d.ts +1 -1
- package/dist/services/main/vehicle/childs/vehicle_odometer_history.d.ts +1 -1
- package/dist/services/main/vehicle/master_vehicle_service.d.ts +1 -1
- package/dist/services/main/vehicle/master_vehicle_service.js +18 -18
- package/dist/services/master/bus/master_class_service.d.ts +1 -1
- package/dist/services/master/bus/master_program_service.d.ts +1 -1
- package/dist/services/master/bus/master_relationship_service.d.ts +1 -1
- package/dist/services/master/bus/master_section_service.d.ts +1 -1
- package/dist/services/master/bus/master_semester_service.d.ts +1 -1
- package/dist/services/master/bus/master_stream_service.d.ts +1 -1
- package/dist/services/master/bus/master_year_service.d.ts +1 -1
- package/dist/services/master/device/master_device_manufacturer_service.d.ts +1 -1
- package/dist/services/master/device/master_device_model_service.d.ts +1 -1
- package/dist/services/master/device/master_device_type_service.d.ts +1 -1
- package/dist/services/master/expense/master_expense_name_service.d.ts +1 -1
- package/dist/services/master/expense/master_expense_type_service.d.ts +1 -1
- package/dist/services/master/expense/master_fuel_company_service.d.ts +1 -1
- package/dist/services/master/expense/master_vendor_document_type_service.d.ts +1 -1
- package/dist/services/master/expense/master_vendor_tag_service.d.ts +1 -1
- package/dist/services/master/expense/master_vendor_type_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_incident_severity_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_incident_status_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_incident_type_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_insurance_claim_status_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_service_task_service.d.ts +5 -5
- package/dist/services/master/main/master_main_country_service.d.ts +1 -1
- package/dist/services/master/main/master_main_currency_service.d.ts +1 -1
- package/dist/services/master/main/master_main_date_format_service.d.ts +1 -1
- package/dist/services/master/main/master_main_industry_service.d.ts +1 -1
- package/dist/services/master/main/master_main_landmark_service.d.ts +1 -1
- package/dist/services/master/main/master_main_language_service.d.ts +1 -1
- package/dist/services/master/main/master_main_state_service.d.ts +1 -1
- package/dist/services/master/main/master_main_timezone_service.d.ts +1 -1
- package/dist/services/master/main/master_main_unit_distance_service.d.ts +1 -1
- package/dist/services/master/main/master_main_unit_mileage_service.d.ts +1 -1
- package/dist/services/master/main/master_main_unit_volume_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_branch_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_color_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_group_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_sub_company_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_tag_service.d.ts +1 -1
- package/dist/services/master/spare_part/master_spare_part_category_service.d.ts +1 -1
- package/dist/services/master/spare_part/master_spare_part_sub_category_service.d.ts +9 -9
- package/dist/services/master/spare_part/master_spare_part_unit_service.d.ts +1 -1
- package/dist/services/master/trip/master_trip_party_type_service.d.ts +1 -1
- package/dist/services/master/tyre/master_tyre_grade_service.d.ts +1 -1
- package/dist/services/master/tyre/master_tyre_make_service.d.ts +1 -1
- package/dist/services/master/tyre/master_tyre_model_service.d.ts +1 -1
- package/dist/services/master/user/master_user_role_service.d.ts +1 -1
- package/dist/services/master/user/master_user_status_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_associated_to_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_document_type_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_fuel_removal_reason_service.d.ts +3 -3
- package/dist/services/master/vehicle/master_vehicle_fuel_type_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_fuel_unit_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_make_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_model_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_ownership_type_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_status_type_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_sub_model_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_type_service.d.ts +1 -1
- package/dist/{user_organisation_service-BE5iA8UK.d.ts → user_organisation_service-WD4PyTEx.d.ts} +67 -62
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { YesNo, IncidentTime, IncidentWeather, IncidentRoadType, IncidentVisibil
|
|
|
2
2
|
import { BaseCommonFile, BR, AWSPresignedUrl, SBR, FBR } from '../../../core/BaseResponse.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { FilePresignedUrlDTO } from '../../../zod_utils/zod_base_schema.js';
|
|
5
|
-
import { U as UserOrganisation, a as User, M as MasterVehicle, b as MasterDriver } from '../../../user_organisation_service-
|
|
5
|
+
import { U as UserOrganisation, a as User, M as MasterVehicle, b as MasterDriver } from '../../../user_organisation_service-WD4PyTEx.js';
|
|
6
6
|
import { MasterFleetInsuranceClaimStatus } from '../../master/fleet/master_fleet_insurance_claim_status_service.js';
|
|
7
7
|
import { MasterFleetIncidentSeverity } from '../../master/fleet/master_fleet_incident_severity_service.js';
|
|
8
8
|
import { MasterFleetIncidentStatus } from '../../master/fleet/master_fleet_incident_status_service.js';
|
|
@@ -117,7 +117,6 @@ declare const FleetIncidentManagementFileSchema: z.ZodObject<{
|
|
|
117
117
|
}, "strip", z.ZodTypeAny, {
|
|
118
118
|
status: Status;
|
|
119
119
|
organisation_id: string;
|
|
120
|
-
vehicle_incident_id: string;
|
|
121
120
|
usage_type: string;
|
|
122
121
|
file_type: FileType;
|
|
123
122
|
file_url: string;
|
|
@@ -126,12 +125,13 @@ declare const FleetIncidentManagementFileSchema: z.ZodObject<{
|
|
|
126
125
|
file_description: string;
|
|
127
126
|
file_size: number;
|
|
128
127
|
file_metadata: Record<string, any>;
|
|
128
|
+
vehicle_incident_id: string;
|
|
129
129
|
}, {
|
|
130
130
|
status: Status;
|
|
131
131
|
organisation_id: string;
|
|
132
|
-
vehicle_incident_id: string;
|
|
133
132
|
usage_type: string;
|
|
134
133
|
file_type: FileType;
|
|
134
|
+
vehicle_incident_id: string;
|
|
135
135
|
file_url?: string | undefined;
|
|
136
136
|
file_key?: string | undefined;
|
|
137
137
|
file_name?: string | undefined;
|
|
@@ -179,6 +179,7 @@ declare const FleetIncidentManagementSchema: z.ZodObject<{
|
|
|
179
179
|
legal_description: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
180
180
|
involved_parties_description: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
181
181
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
182
|
+
time_zone_id: z.ZodEffects<z.ZodString, string, string>;
|
|
182
183
|
FleetIncidentManagementFileSchema: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
183
184
|
usage_type: z.ZodEffects<z.ZodString, string, string>;
|
|
184
185
|
file_type: z.ZodType<FileType, z.ZodTypeDef, FileType>;
|
|
@@ -195,7 +196,6 @@ declare const FleetIncidentManagementSchema: z.ZodObject<{
|
|
|
195
196
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
196
197
|
status: Status;
|
|
197
198
|
organisation_id: string;
|
|
198
|
-
vehicle_incident_id: string;
|
|
199
199
|
usage_type: string;
|
|
200
200
|
file_type: FileType;
|
|
201
201
|
file_url: string;
|
|
@@ -204,12 +204,13 @@ declare const FleetIncidentManagementSchema: z.ZodObject<{
|
|
|
204
204
|
file_description: string;
|
|
205
205
|
file_size: number;
|
|
206
206
|
file_metadata: Record<string, any>;
|
|
207
|
+
vehicle_incident_id: string;
|
|
207
208
|
}, {
|
|
208
209
|
status: Status;
|
|
209
210
|
organisation_id: string;
|
|
210
|
-
vehicle_incident_id: string;
|
|
211
211
|
usage_type: string;
|
|
212
212
|
file_type: FileType;
|
|
213
|
+
vehicle_incident_id: string;
|
|
213
214
|
file_url?: string | undefined;
|
|
214
215
|
file_key?: string | undefined;
|
|
215
216
|
file_name?: string | undefined;
|
|
@@ -224,6 +225,7 @@ declare const FleetIncidentManagementSchema: z.ZodObject<{
|
|
|
224
225
|
user_id: string;
|
|
225
226
|
vehicle_id: string;
|
|
226
227
|
driver_id: string;
|
|
228
|
+
time_zone_id: string;
|
|
227
229
|
google_location: string;
|
|
228
230
|
fleet_insurance_claim_status_id: string;
|
|
229
231
|
fleet_incident_severity_id: string;
|
|
@@ -254,7 +256,6 @@ declare const FleetIncidentManagementSchema: z.ZodObject<{
|
|
|
254
256
|
FleetIncidentManagementFileSchema: {
|
|
255
257
|
status: Status;
|
|
256
258
|
organisation_id: string;
|
|
257
|
-
vehicle_incident_id: string;
|
|
258
259
|
usage_type: string;
|
|
259
260
|
file_type: FileType;
|
|
260
261
|
file_url: string;
|
|
@@ -263,6 +264,7 @@ declare const FleetIncidentManagementSchema: z.ZodObject<{
|
|
|
263
264
|
file_description: string;
|
|
264
265
|
file_size: number;
|
|
265
266
|
file_metadata: Record<string, any>;
|
|
267
|
+
vehicle_incident_id: string;
|
|
266
268
|
}[];
|
|
267
269
|
latitude?: number | undefined;
|
|
268
270
|
longitude?: number | undefined;
|
|
@@ -275,6 +277,7 @@ declare const FleetIncidentManagementSchema: z.ZodObject<{
|
|
|
275
277
|
user_id: string;
|
|
276
278
|
vehicle_id: string;
|
|
277
279
|
driver_id: string;
|
|
280
|
+
time_zone_id: string;
|
|
278
281
|
fleet_insurance_claim_status_id: string;
|
|
279
282
|
fleet_incident_severity_id: string;
|
|
280
283
|
fleet_incident_status_id: string;
|
|
@@ -311,9 +314,9 @@ declare const FleetIncidentManagementSchema: z.ZodObject<{
|
|
|
311
314
|
FleetIncidentManagementFileSchema?: {
|
|
312
315
|
status: Status;
|
|
313
316
|
organisation_id: string;
|
|
314
|
-
vehicle_incident_id: string;
|
|
315
317
|
usage_type: string;
|
|
316
318
|
file_type: FileType;
|
|
319
|
+
vehicle_incident_id: string;
|
|
317
320
|
file_url?: string | undefined;
|
|
318
321
|
file_key?: string | undefined;
|
|
319
322
|
file_name?: string | undefined;
|
|
@@ -401,7 +404,6 @@ declare const FleetIncidentManagementQuerySchema: z.ZodObject<{
|
|
|
401
404
|
user_ids: string[];
|
|
402
405
|
vehicle_ids: string[];
|
|
403
406
|
driver_ids: string[];
|
|
404
|
-
vehicle_incident_ids: string[];
|
|
405
407
|
from_date: string;
|
|
406
408
|
to_date: string;
|
|
407
409
|
fleet_insurance_claim_status_ids: string[];
|
|
@@ -418,6 +420,7 @@ declare const FleetIncidentManagementQuerySchema: z.ZodObject<{
|
|
|
418
420
|
insurance_claimed: YesNo[];
|
|
419
421
|
police_report_filed: YesNo[];
|
|
420
422
|
any_injuries: YesNo[];
|
|
423
|
+
vehicle_incident_ids: string[];
|
|
421
424
|
}, {
|
|
422
425
|
date_format_id: string;
|
|
423
426
|
time_zone_id: string;
|
|
@@ -446,7 +449,6 @@ declare const FleetIncidentManagementQuerySchema: z.ZodObject<{
|
|
|
446
449
|
user_ids?: string[] | undefined;
|
|
447
450
|
vehicle_ids?: string[] | undefined;
|
|
448
451
|
driver_ids?: string[] | undefined;
|
|
449
|
-
vehicle_incident_ids?: string[] | undefined;
|
|
450
452
|
fleet_insurance_claim_status_ids?: string[] | undefined;
|
|
451
453
|
fleet_incident_severity_ids?: string[] | undefined;
|
|
452
454
|
fleet_incident_status_ids?: string[] | undefined;
|
|
@@ -461,6 +463,7 @@ declare const FleetIncidentManagementQuerySchema: z.ZodObject<{
|
|
|
461
463
|
insurance_claimed?: YesNo[] | undefined;
|
|
462
464
|
police_report_filed?: YesNo[] | undefined;
|
|
463
465
|
any_injuries?: YesNo[] | undefined;
|
|
466
|
+
vehicle_incident_ids?: string[] | undefined;
|
|
464
467
|
}>;
|
|
465
468
|
type FleetIncidentManagementQueryDTO = z.infer<typeof FleetIncidentManagementQuerySchema>;
|
|
466
469
|
declare const FleetIncidentManagementCostSchema: z.ZodObject<{
|
|
@@ -471,19 +474,22 @@ declare const FleetIncidentManagementCostSchema: z.ZodObject<{
|
|
|
471
474
|
incident_cost_amount: z.ZodOptional<z.ZodEffects<z.ZodDefault<z.ZodNumber>, number, unknown>>;
|
|
472
475
|
incident_cost_description: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
473
476
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
477
|
+
time_zone_id: z.ZodEffects<z.ZodString, string, string>;
|
|
474
478
|
}, "strip", z.ZodTypeAny, {
|
|
475
479
|
status: Status;
|
|
476
480
|
organisation_id: string;
|
|
477
|
-
|
|
481
|
+
time_zone_id: string;
|
|
478
482
|
expense_name_id: string;
|
|
483
|
+
vehicle_incident_id: string;
|
|
479
484
|
incident_cost_description: string;
|
|
480
485
|
incident_cost_date: string;
|
|
481
486
|
incident_cost_amount?: number | undefined;
|
|
482
487
|
}, {
|
|
483
488
|
status: Status;
|
|
484
489
|
organisation_id: string;
|
|
485
|
-
|
|
490
|
+
time_zone_id: string;
|
|
486
491
|
expense_name_id: string;
|
|
492
|
+
vehicle_incident_id: string;
|
|
487
493
|
incident_cost_date: string;
|
|
488
494
|
incident_cost_description?: string | undefined;
|
|
489
495
|
incident_cost_amount?: unknown;
|
|
@@ -547,8 +553,8 @@ declare const FleetIncidentManagementCostQuerySchema: z.ZodObject<{
|
|
|
547
553
|
date_format_id: string;
|
|
548
554
|
time_zone_id: string;
|
|
549
555
|
organisation_ids: string[];
|
|
550
|
-
vehicle_incident_ids: string[];
|
|
551
556
|
expense_name_ids: string[];
|
|
557
|
+
vehicle_incident_ids: string[];
|
|
552
558
|
incident_cost_ids: string[];
|
|
553
559
|
}, {
|
|
554
560
|
date_format_id: string;
|
|
@@ -573,8 +579,8 @@ declare const FleetIncidentManagementCostQuerySchema: z.ZodObject<{
|
|
|
573
579
|
}[] | undefined;
|
|
574
580
|
include_master_data?: YesNo | undefined;
|
|
575
581
|
organisation_ids?: string[] | undefined;
|
|
576
|
-
vehicle_incident_ids?: string[] | undefined;
|
|
577
582
|
expense_name_ids?: string[] | undefined;
|
|
583
|
+
vehicle_incident_ids?: string[] | undefined;
|
|
578
584
|
incident_cost_ids?: string[] | undefined;
|
|
579
585
|
}>;
|
|
580
586
|
type FleetIncidentManagementCostQueryDTO = z.infer<typeof FleetIncidentManagementCostQuerySchema>;
|
|
@@ -437,7 +437,7 @@ var FleetIncidentManagementSchema = z3.object({
|
|
|
437
437
|
insurance_settled_amount: doubleOptional("Insurance Settled Amount"),
|
|
438
438
|
insurance_policy_number: stringOptional("Insurance Policy Number", 0, 100),
|
|
439
439
|
insurance_company_name: stringOptional("Insurance Company Name", 0, 100),
|
|
440
|
-
insurance_contact_number: stringOptional("Insurance Contact Number", 0,
|
|
440
|
+
insurance_contact_number: stringOptional("Insurance Contact Number", 0, 100),
|
|
441
441
|
insurance_description: stringOptional("Insurance Description", 0, 2e3),
|
|
442
442
|
// Complaint Details
|
|
443
443
|
police_report_filed: enumMandatory("Police Report Filed", YesNo, "No" /* No */),
|
|
@@ -454,7 +454,9 @@ var FleetIncidentManagementSchema = z3.object({
|
|
|
454
454
|
0,
|
|
455
455
|
2e3
|
|
456
456
|
),
|
|
457
|
+
// Other
|
|
457
458
|
status: enumMandatory("Status", Status, "Active" /* Active */),
|
|
459
|
+
time_zone_id: single_select_mandatory("MasterMainTimeZone"),
|
|
458
460
|
FleetIncidentManagementFileSchema: nestedArrayOfObjectsOptional(
|
|
459
461
|
"FleetIncidentManagementFileSchema",
|
|
460
462
|
FleetIncidentManagementFileSchema,
|
|
@@ -543,7 +545,9 @@ var FleetIncidentManagementCostSchema = z3.object({
|
|
|
543
545
|
0,
|
|
544
546
|
2e3
|
|
545
547
|
),
|
|
546
|
-
|
|
548
|
+
// Other
|
|
549
|
+
status: enumMandatory("Status", Status, "Active" /* Active */),
|
|
550
|
+
time_zone_id: single_select_mandatory("MasterMainTimeZone")
|
|
547
551
|
});
|
|
548
552
|
var FleetIncidentManagementCostQuerySchema = BaseQuerySchema.extend({
|
|
549
553
|
incident_cost_ids: multi_select_optional("FleetIncidentManagementCost"),
|
|
@@ -601,6 +605,8 @@ var toFleetIncidentManagementPayload = (row) => ({
|
|
|
601
605
|
fleet_incident_severity_id: row.fleet_incident_severity_id || "",
|
|
602
606
|
fleet_insurance_claim_status_id: row.fleet_insurance_claim_status_id || "",
|
|
603
607
|
status: "Active" /* Active */,
|
|
608
|
+
time_zone_id: "",
|
|
609
|
+
// Needs to be provided manually
|
|
604
610
|
FleetIncidentManagementFileSchema: row.FleetIncidentManagementFile?.map((file) => ({
|
|
605
611
|
fleet_incident_management_file_id: file.fleet_incident_management_file_id ?? "",
|
|
606
612
|
usage_type: file.usage_type,
|
|
@@ -657,7 +663,9 @@ var newFleetIncidentManagementPayload = () => ({
|
|
|
657
663
|
legal_description: "",
|
|
658
664
|
involved_parties_description: "",
|
|
659
665
|
status: "Active" /* Active */,
|
|
660
|
-
FleetIncidentManagementFileSchema: []
|
|
666
|
+
FleetIncidentManagementFileSchema: [],
|
|
667
|
+
time_zone_id: ""
|
|
668
|
+
// Needs to be provided manually
|
|
661
669
|
});
|
|
662
670
|
var toFleetIncidentManagementCostPayload = (row) => ({
|
|
663
671
|
incident_cost_date: row.incident_cost_date || "",
|
|
@@ -666,7 +674,9 @@ var toFleetIncidentManagementCostPayload = (row) => ({
|
|
|
666
674
|
organisation_id: row.organisation_id || "",
|
|
667
675
|
vehicle_incident_id: row.vehicle_incident_id || "",
|
|
668
676
|
expense_name_id: row.expense_name_id || "",
|
|
669
|
-
status: "Active" /* Active
|
|
677
|
+
status: "Active" /* Active */,
|
|
678
|
+
time_zone_id: ""
|
|
679
|
+
// Needs to be provided manually
|
|
670
680
|
});
|
|
671
681
|
var newFleetIncidentManagementCostPayload = () => ({
|
|
672
682
|
organisation_id: "",
|
|
@@ -675,7 +685,9 @@ var newFleetIncidentManagementCostPayload = () => ({
|
|
|
675
685
|
incident_cost_date: "",
|
|
676
686
|
incident_cost_amount: 0,
|
|
677
687
|
incident_cost_description: "",
|
|
678
|
-
status: "Active" /* Active
|
|
688
|
+
status: "Active" /* Active */,
|
|
689
|
+
time_zone_id: ""
|
|
690
|
+
// Needs to be provided manually
|
|
679
691
|
});
|
|
680
692
|
var get_incident_file_presigned_url = async (data) => {
|
|
681
693
|
return apiPost(ENDPOINTS.incident_file_presigned_url, data);
|
|
@@ -2,8 +2,9 @@ import { IssueStatus, Priority, IssueSeverity, IssueSource, Status, FileType, PA
|
|
|
2
2
|
import { BaseCommonFile, BR, AWSPresignedUrl, SBR, FBR } from '../../../core/BaseResponse.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { FilePresignedUrlDTO } from '../../../zod_utils/zod_base_schema.js';
|
|
5
|
-
import { U as UserOrganisation, a as User, M as MasterVehicle, b as MasterDriver } from '../../../user_organisation_service-
|
|
5
|
+
import { U as UserOrganisation, a as User, M as MasterVehicle, b as MasterDriver } from '../../../user_organisation_service-WD4PyTEx.js';
|
|
6
6
|
import { FleetIncidentManagement } from '../incident_management/incident_management_service.js';
|
|
7
|
+
import { FleetServiceManagement } from '../service_management/fleet_service_management_service.js';
|
|
7
8
|
import '../../master/main/master_main_sim_provider_service.js';
|
|
8
9
|
import '../../master/fleet/master_fleet_insurance_claim_status_service.js';
|
|
9
10
|
import '../../master/fleet/master_fleet_incident_severity_service.js';
|
|
@@ -46,6 +47,8 @@ interface FleetIssueManagement extends Record<string, unknown> {
|
|
|
46
47
|
vehicle_incident_id?: string;
|
|
47
48
|
FleetIncidentManagement?: FleetIncidentManagement;
|
|
48
49
|
inspection_id?: string;
|
|
50
|
+
service_management_id?: string;
|
|
51
|
+
FleetServiceManagement?: FleetServiceManagement;
|
|
49
52
|
job_card_id?: string;
|
|
50
53
|
FleetIssueManagementFile: FleetIssueManagementFile[];
|
|
51
54
|
_count?: {
|
|
@@ -103,7 +106,6 @@ declare const FleetIssueManagementFileSchema: z.ZodObject<{
|
|
|
103
106
|
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
104
107
|
vehicle_issue_id: z.ZodEffects<z.ZodString, string, string>;
|
|
105
108
|
}, "strip", z.ZodTypeAny, {
|
|
106
|
-
vehicle_issue_id: string;
|
|
107
109
|
status: Status;
|
|
108
110
|
organisation_id: string;
|
|
109
111
|
usage_type: string;
|
|
@@ -114,12 +116,13 @@ declare const FleetIssueManagementFileSchema: z.ZodObject<{
|
|
|
114
116
|
file_description: string;
|
|
115
117
|
file_size: number;
|
|
116
118
|
file_metadata: Record<string, any>;
|
|
117
|
-
}, {
|
|
118
119
|
vehicle_issue_id: string;
|
|
120
|
+
}, {
|
|
119
121
|
status: Status;
|
|
120
122
|
organisation_id: string;
|
|
121
123
|
usage_type: string;
|
|
122
124
|
file_type: FileType;
|
|
125
|
+
vehicle_issue_id: string;
|
|
123
126
|
file_url?: string | undefined;
|
|
124
127
|
file_key?: string | undefined;
|
|
125
128
|
file_name?: string | undefined;
|
|
@@ -135,7 +138,7 @@ declare const FleetIssueManagementSchema: z.ZodObject<{
|
|
|
135
138
|
driver_id: z.ZodEffects<z.ZodString, string, string>;
|
|
136
139
|
vehicle_incident_id: z.ZodEffects<z.ZodString, string, string>;
|
|
137
140
|
inspection_id: z.ZodEffects<z.ZodString, string, string>;
|
|
138
|
-
|
|
141
|
+
service_management_id: z.ZodEffects<z.ZodString, string, string>;
|
|
139
142
|
issue_title: z.ZodEffects<z.ZodString, string, string>;
|
|
140
143
|
issue_description: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
141
144
|
issue_status: z.ZodType<IssueStatus, z.ZodTypeDef, IssueStatus>;
|
|
@@ -148,6 +151,7 @@ declare const FleetIssueManagementSchema: z.ZodObject<{
|
|
|
148
151
|
due_odometer_reading: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
149
152
|
issue_source: z.ZodType<IssueSource, z.ZodTypeDef, IssueSource>;
|
|
150
153
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
154
|
+
time_zone_id: z.ZodEffects<z.ZodString, string, string>;
|
|
151
155
|
FleetIssueManagementFileSchema: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
152
156
|
usage_type: z.ZodEffects<z.ZodString, string, string>;
|
|
153
157
|
file_type: z.ZodType<FileType, z.ZodTypeDef, FileType>;
|
|
@@ -162,7 +166,6 @@ declare const FleetIssueManagementSchema: z.ZodObject<{
|
|
|
162
166
|
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
163
167
|
vehicle_issue_id: z.ZodEffects<z.ZodString, string, string>;
|
|
164
168
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
165
|
-
vehicle_issue_id: string;
|
|
166
169
|
status: Status;
|
|
167
170
|
organisation_id: string;
|
|
168
171
|
usage_type: string;
|
|
@@ -173,12 +176,13 @@ declare const FleetIssueManagementSchema: z.ZodObject<{
|
|
|
173
176
|
file_description: string;
|
|
174
177
|
file_size: number;
|
|
175
178
|
file_metadata: Record<string, any>;
|
|
176
|
-
}, {
|
|
177
179
|
vehicle_issue_id: string;
|
|
180
|
+
}, {
|
|
178
181
|
status: Status;
|
|
179
182
|
organisation_id: string;
|
|
180
183
|
usage_type: string;
|
|
181
184
|
file_type: FileType;
|
|
185
|
+
vehicle_issue_id: string;
|
|
182
186
|
file_url?: string | undefined;
|
|
183
187
|
file_key?: string | undefined;
|
|
184
188
|
file_name?: string | undefined;
|
|
@@ -187,6 +191,15 @@ declare const FleetIssueManagementSchema: z.ZodObject<{
|
|
|
187
191
|
file_metadata?: Record<string, any> | undefined;
|
|
188
192
|
}>, "many">>>;
|
|
189
193
|
}, "strip", z.ZodTypeAny, {
|
|
194
|
+
service_management_id: string;
|
|
195
|
+
odometer_reading: number;
|
|
196
|
+
status: Status;
|
|
197
|
+
organisation_id: string;
|
|
198
|
+
user_id: string;
|
|
199
|
+
vehicle_id: string;
|
|
200
|
+
driver_id: string;
|
|
201
|
+
time_zone_id: string;
|
|
202
|
+
vehicle_incident_id: string;
|
|
190
203
|
issue_title: string;
|
|
191
204
|
issue_description: string;
|
|
192
205
|
issue_status: IssueStatus;
|
|
@@ -194,20 +207,11 @@ declare const FleetIssueManagementSchema: z.ZodObject<{
|
|
|
194
207
|
issue_severity: IssueSeverity;
|
|
195
208
|
report_date: string;
|
|
196
209
|
resolved_date: string;
|
|
197
|
-
odometer_reading: number;
|
|
198
210
|
due_date: string;
|
|
199
211
|
due_odometer_reading: number;
|
|
200
212
|
issue_source: IssueSource;
|
|
201
|
-
status: Status;
|
|
202
|
-
organisation_id: string;
|
|
203
|
-
user_id: string;
|
|
204
|
-
vehicle_id: string;
|
|
205
|
-
driver_id: string;
|
|
206
|
-
vehicle_incident_id: string;
|
|
207
213
|
inspection_id: string;
|
|
208
|
-
job_card_id: string;
|
|
209
214
|
FleetIssueManagementFileSchema: {
|
|
210
|
-
vehicle_issue_id: string;
|
|
211
215
|
status: Status;
|
|
212
216
|
organisation_id: string;
|
|
213
217
|
usage_type: string;
|
|
@@ -218,33 +222,35 @@ declare const FleetIssueManagementSchema: z.ZodObject<{
|
|
|
218
222
|
file_description: string;
|
|
219
223
|
file_size: number;
|
|
220
224
|
file_metadata: Record<string, any>;
|
|
225
|
+
vehicle_issue_id: string;
|
|
221
226
|
}[];
|
|
222
227
|
}, {
|
|
223
|
-
|
|
224
|
-
issue_status: IssueStatus;
|
|
225
|
-
issue_priority: Priority;
|
|
226
|
-
issue_severity: IssueSeverity;
|
|
227
|
-
report_date: string;
|
|
228
|
-
issue_source: IssueSource;
|
|
228
|
+
service_management_id: string;
|
|
229
229
|
status: Status;
|
|
230
230
|
organisation_id: string;
|
|
231
231
|
user_id: string;
|
|
232
232
|
vehicle_id: string;
|
|
233
233
|
driver_id: string;
|
|
234
|
+
time_zone_id: string;
|
|
234
235
|
vehicle_incident_id: string;
|
|
236
|
+
issue_title: string;
|
|
237
|
+
issue_status: IssueStatus;
|
|
238
|
+
issue_priority: Priority;
|
|
239
|
+
issue_severity: IssueSeverity;
|
|
240
|
+
report_date: string;
|
|
241
|
+
issue_source: IssueSource;
|
|
235
242
|
inspection_id: string;
|
|
236
|
-
|
|
243
|
+
odometer_reading?: unknown;
|
|
237
244
|
issue_description?: string | undefined;
|
|
238
245
|
resolved_date?: string | undefined;
|
|
239
|
-
odometer_reading?: unknown;
|
|
240
246
|
due_date?: string | undefined;
|
|
241
247
|
due_odometer_reading?: unknown;
|
|
242
248
|
FleetIssueManagementFileSchema?: {
|
|
243
|
-
vehicle_issue_id: string;
|
|
244
249
|
status: Status;
|
|
245
250
|
organisation_id: string;
|
|
246
251
|
usage_type: string;
|
|
247
252
|
file_type: FileType;
|
|
253
|
+
vehicle_issue_id: string;
|
|
248
254
|
file_url?: string | undefined;
|
|
249
255
|
file_key?: string | undefined;
|
|
250
256
|
file_name?: string | undefined;
|
|
@@ -292,7 +298,7 @@ declare const FleetIssueManagementQuerySchema: z.ZodObject<{
|
|
|
292
298
|
driver_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
293
299
|
vehicle_incident_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
294
300
|
inspection_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
295
|
-
|
|
301
|
+
service_management_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
296
302
|
issue_status: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof IssueStatus>, "many">>>;
|
|
297
303
|
issue_priority: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Priority>, "many">>>;
|
|
298
304
|
issue_severity: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof IssueSeverity>, "many">>>;
|
|
@@ -300,10 +306,6 @@ declare const FleetIssueManagementQuerySchema: z.ZodObject<{
|
|
|
300
306
|
from_date: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
301
307
|
to_date: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
302
308
|
}, "strip", z.ZodTypeAny, {
|
|
303
|
-
issue_status: IssueStatus[];
|
|
304
|
-
issue_priority: Priority[];
|
|
305
|
-
issue_severity: IssueSeverity[];
|
|
306
|
-
issue_source: IssueSource[];
|
|
307
309
|
status: Status[];
|
|
308
310
|
search: string;
|
|
309
311
|
paging: PAGING;
|
|
@@ -325,25 +327,25 @@ declare const FleetIssueManagementQuerySchema: z.ZodObject<{
|
|
|
325
327
|
include_master_data: YesNo;
|
|
326
328
|
date_format_id: string;
|
|
327
329
|
time_zone_id: string;
|
|
328
|
-
|
|
330
|
+
service_management_ids: string[];
|
|
329
331
|
organisation_ids: string[];
|
|
330
332
|
user_ids: string[];
|
|
331
333
|
vehicle_ids: string[];
|
|
332
334
|
driver_ids: string[];
|
|
333
|
-
vehicle_incident_ids: string[];
|
|
334
|
-
inspection_ids: string[];
|
|
335
|
-
job_card_ids: string[];
|
|
336
335
|
from_date: string;
|
|
337
336
|
to_date: string;
|
|
337
|
+
vehicle_incident_ids: string[];
|
|
338
|
+
issue_status: IssueStatus[];
|
|
339
|
+
issue_priority: Priority[];
|
|
340
|
+
issue_severity: IssueSeverity[];
|
|
341
|
+
issue_source: IssueSource[];
|
|
342
|
+
vehicle_issue_ids: string[];
|
|
343
|
+
inspection_ids: string[];
|
|
338
344
|
}, {
|
|
339
345
|
date_format_id: string;
|
|
340
346
|
time_zone_id: string;
|
|
341
347
|
from_date: string;
|
|
342
348
|
to_date: string;
|
|
343
|
-
issue_status?: IssueStatus[] | undefined;
|
|
344
|
-
issue_priority?: Priority[] | undefined;
|
|
345
|
-
issue_severity?: IssueSeverity[] | undefined;
|
|
346
|
-
issue_source?: IssueSource[] | undefined;
|
|
347
349
|
status?: Status[] | undefined;
|
|
348
350
|
search?: string | undefined;
|
|
349
351
|
paging?: PAGING | undefined;
|
|
@@ -363,14 +365,18 @@ declare const FleetIssueManagementQuerySchema: z.ZodObject<{
|
|
|
363
365
|
direction: OrderBy;
|
|
364
366
|
}[] | undefined;
|
|
365
367
|
include_master_data?: YesNo | undefined;
|
|
366
|
-
|
|
368
|
+
service_management_ids?: string[] | undefined;
|
|
367
369
|
organisation_ids?: string[] | undefined;
|
|
368
370
|
user_ids?: string[] | undefined;
|
|
369
371
|
vehicle_ids?: string[] | undefined;
|
|
370
372
|
driver_ids?: string[] | undefined;
|
|
371
373
|
vehicle_incident_ids?: string[] | undefined;
|
|
374
|
+
issue_status?: IssueStatus[] | undefined;
|
|
375
|
+
issue_priority?: Priority[] | undefined;
|
|
376
|
+
issue_severity?: IssueSeverity[] | undefined;
|
|
377
|
+
issue_source?: IssueSource[] | undefined;
|
|
378
|
+
vehicle_issue_ids?: string[] | undefined;
|
|
372
379
|
inspection_ids?: string[] | undefined;
|
|
373
|
-
job_card_ids?: string[] | undefined;
|
|
374
380
|
}>;
|
|
375
381
|
type FleetIssueManagementQueryDTO = z.infer<typeof FleetIssueManagementQuerySchema>;
|
|
376
382
|
declare const FleetIssueManagementCommentSchema: z.ZodObject<{
|
|
@@ -380,15 +386,15 @@ declare const FleetIssueManagementCommentSchema: z.ZodObject<{
|
|
|
380
386
|
comment_description: z.ZodEffects<z.ZodString, string, string>;
|
|
381
387
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
382
388
|
}, "strip", z.ZodTypeAny, {
|
|
383
|
-
vehicle_issue_id: string;
|
|
384
389
|
status: Status;
|
|
385
390
|
organisation_id: string;
|
|
391
|
+
vehicle_issue_id: string;
|
|
386
392
|
comment_text: string;
|
|
387
393
|
comment_description: string;
|
|
388
394
|
}, {
|
|
389
|
-
vehicle_issue_id: string;
|
|
390
395
|
status: Status;
|
|
391
396
|
organisation_id: string;
|
|
397
|
+
vehicle_issue_id: string;
|
|
392
398
|
comment_text: string;
|
|
393
399
|
comment_description: string;
|
|
394
400
|
}>;
|
|
@@ -449,8 +455,8 @@ declare const FleetIssueManagementCommentQuerySchema: z.ZodObject<{
|
|
|
449
455
|
include_master_data: YesNo;
|
|
450
456
|
date_format_id: string;
|
|
451
457
|
time_zone_id: string;
|
|
452
|
-
vehicle_issue_ids: string[];
|
|
453
458
|
organisation_ids: string[];
|
|
459
|
+
vehicle_issue_ids: string[];
|
|
454
460
|
vehicle_issue_comment_ids: string[];
|
|
455
461
|
}, {
|
|
456
462
|
date_format_id: string;
|
|
@@ -474,8 +480,8 @@ declare const FleetIssueManagementCommentQuerySchema: z.ZodObject<{
|
|
|
474
480
|
direction: OrderBy;
|
|
475
481
|
}[] | undefined;
|
|
476
482
|
include_master_data?: YesNo | undefined;
|
|
477
|
-
vehicle_issue_ids?: string[] | undefined;
|
|
478
483
|
organisation_ids?: string[] | undefined;
|
|
484
|
+
vehicle_issue_ids?: string[] | undefined;
|
|
479
485
|
vehicle_issue_comment_ids?: string[] | undefined;
|
|
480
486
|
}>;
|
|
481
487
|
type FleetIssueManagementCommentQueryDTO = z.infer<typeof FleetIssueManagementCommentQuerySchema>;
|
|
@@ -358,8 +358,8 @@ var FleetIssueManagementSchema = z3.object({
|
|
|
358
358
|
// ✅ Single-Selection -> FleetIncidentManagement
|
|
359
359
|
inspection_id: single_select_optional("FleetInspection"),
|
|
360
360
|
// ✅ Single-Selection -> FleetInspection
|
|
361
|
-
|
|
362
|
-
// ✅ Single-Selection ->
|
|
361
|
+
service_management_id: single_select_optional("FleetServiceManagement"),
|
|
362
|
+
// ✅ Single-Selection -> FleetServiceManagement
|
|
363
363
|
// Issue Details
|
|
364
364
|
issue_title: stringMandatory("Issue Title", 1, 100),
|
|
365
365
|
issue_description: stringOptional("Issue Description", 0, 2e3),
|
|
@@ -380,7 +380,9 @@ var FleetIssueManagementSchema = z3.object({
|
|
|
380
380
|
due_date: dateOptional("Due Date"),
|
|
381
381
|
due_odometer_reading: numberOptional("Due Odometer Reading"),
|
|
382
382
|
issue_source: enumMandatory("Issue Source", IssueSource, "Direct" /* Direct */),
|
|
383
|
+
// Other
|
|
383
384
|
status: enumMandatory("Status", Status, "Active" /* Active */),
|
|
385
|
+
time_zone_id: single_select_mandatory("MasterMainTimeZone"),
|
|
384
386
|
FleetIssueManagementFileSchema: nestedArrayOfObjectsOptional(
|
|
385
387
|
"FleetIssueManagementFileSchema",
|
|
386
388
|
FleetIssueManagementFileSchema,
|
|
@@ -402,8 +404,8 @@ var FleetIssueManagementQuerySchema = BaseQuerySchema.extend({
|
|
|
402
404
|
// ✅ Multi-Selection -> FleetIncidentManagement
|
|
403
405
|
inspection_ids: multi_select_optional("FleetInspection"),
|
|
404
406
|
// ✅ Multi-Selection -> FleetInspection
|
|
405
|
-
|
|
406
|
-
// ✅ Multi-Selection ->
|
|
407
|
+
service_management_ids: multi_select_optional("FleetServiceManagement"),
|
|
408
|
+
// ✅ Multi-Selection -> FleetServiceManagement
|
|
407
409
|
issue_status: enumArrayOptional("Issue Status", IssueStatus),
|
|
408
410
|
issue_priority: enumArrayOptional("Issue Priority", Priority),
|
|
409
411
|
issue_severity: enumArrayOptional("Issue Severity", IssueSeverity),
|
|
@@ -450,8 +452,10 @@ var toFleetIssueManagementPayload = (row) => ({
|
|
|
450
452
|
driver_id: row.driver_id || "",
|
|
451
453
|
vehicle_incident_id: row.vehicle_incident_id || "",
|
|
452
454
|
inspection_id: row.inspection_id || "",
|
|
453
|
-
|
|
455
|
+
service_management_id: row.service_management_id || "",
|
|
454
456
|
status: "Active" /* Active */,
|
|
457
|
+
time_zone_id: "",
|
|
458
|
+
// Needs to be provided manually
|
|
455
459
|
FleetIssueManagementFileSchema: row.FleetIssueManagementFile?.map((file) => ({
|
|
456
460
|
fleet_issue_management_file_id: file.fleet_issue_management_file_id ?? "",
|
|
457
461
|
usage_type: file.usage_type,
|
|
@@ -487,8 +491,10 @@ var newFleetIssueManagementPayload = () => ({
|
|
|
487
491
|
driver_id: "",
|
|
488
492
|
vehicle_incident_id: "",
|
|
489
493
|
inspection_id: "",
|
|
490
|
-
|
|
494
|
+
service_management_id: "",
|
|
491
495
|
status: "Active" /* Active */,
|
|
496
|
+
time_zone_id: "",
|
|
497
|
+
// Needs to be provided manually
|
|
492
498
|
FleetIssueManagementFileSchema: []
|
|
493
499
|
});
|
|
494
500
|
var toFleetIssueManagementCommentPayload = (row) => ({
|