vms-nest-prisma-api-document 1012.0.0 → 1013.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/{bookmark_service-DgvbWhS0.d.ts → bookmark_service-GDSTht_e.d.ts} +3197 -2367
- package/dist/core/Enums.d.ts +12 -1
- package/dist/core/Enums.js +13 -0
- package/dist/services/account/bookmark_service.d.ts +1 -1
- package/dist/services/account/invoice_service.d.ts +1 -1
- package/dist/services/account/notification_preferences.service.d.ts +1 -1
- package/dist/services/account/report_preferences.service.d.ts +1 -1
- package/dist/services/account/ticket_service.d.ts +1 -1
- package/dist/services/fleet/breakdown_management/breakdown_management_service.d.ts +6 -0
- package/dist/services/fleet/breakdown_management/breakdown_management_service.js +580 -0
- package/dist/services/fleet/bus_mangement/bus_stop.d.ts +1 -1
- package/dist/services/fleet/bus_mangement/calendar.d.ts +1 -1
- package/dist/services/fleet/bus_mangement/day_run.d.ts +1 -1
- package/dist/services/fleet/bus_mangement/master_route.d.ts +1 -1
- package/dist/services/fleet/bus_mangement/master_schedule.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 +1 -1
- package/dist/services/fleet/document_management/document_management_service.d.ts +596 -0
- package/dist/services/fleet/document_management/document_management_service.js +555 -0
- package/dist/services/fleet/fuel_management/fleet_fuel_daily_summary_service.d.ts +1 -1
- package/dist/services/fleet/fuel_management/fleet_fuel_daily_summary_service.js +0 -4
- package/dist/services/fleet/fuel_management/fleet_fuel_refill_service.d.ts +1 -1
- package/dist/services/fleet/fuel_management/fleet_fuel_removal_service.d.ts +1 -1
- package/dist/services/fleet/incident_management/incident_management_service.d.ts +1 -1
- package/dist/services/fleet/incident_management/incident_management_service.js +136 -213
- package/dist/services/fleet/inspection_management/fleet_inspection_form_service.d.ts +1 -1
- package/dist/services/fleet/inspection_management/fleet_inspection_form_service.js +10 -4
- package/dist/services/fleet/inspection_management/fleet_inspection_management_service.d.ts +1 -1
- package/dist/services/fleet/inspection_management/fleet_inspection_management_service.js +57 -68
- package/dist/services/fleet/inspection_management/fleet_inspection_schedule_service.d.ts +1 -1
- package/dist/services/fleet/inspection_management/fleet_inspection_schedule_service.js +5 -12
- package/dist/services/fleet/issue_management/issue_management_service.d.ts +1 -1
- package/dist/services/fleet/issue_management/issue_management_service.js +130 -130
- package/dist/services/fleet/service_management/fleet_service_schedule_service.d.ts +1 -1
- package/dist/services/fleet/service_management/fleet_service_schedule_service.js +4 -9
- package/dist/services/fleet/service_management/fleet_service_service.d.ts +6 -0
- package/dist/services/fleet/service_management/{fleet_service_management_service.js → fleet_service_service.js} +186 -188
- 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 +51 -44
- package/dist/services/fleet/vendor_management/fleet_vendor_service.d.ts +1 -1
- package/dist/services/fleet/vendor_management/fleet_vendor_service.js +262 -279
- 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 -43
- package/dist/services/fleet/workshop_management/fleet_workshop_service.d.ts +6 -0
- package/dist/services/fleet/workshop_management/fleet_workshop_service.js +347 -0
- package/dist/services/gps/features/geofence/gps_geofence_service.d.ts +1 -1
- package/dist/services/gps/features/geofence/gps_geofence_transaction_service.d.ts +1 -1
- package/dist/services/gps/features/geofence/gps_geofence_transaction_summary_service.d.ts +1 -1
- package/dist/services/gps/features/geofence/trip_geofence_to_geofence_service.d.ts +1 -1
- package/dist/services/gps/features/gps_live_track_share_link_service.d.ts +1 -1
- package/dist/services/gps/features/gps_track_history_share_link_service.d.ts +1 -1
- package/dist/services/gps/reports/gps_reports_mongo_service.d.ts +46 -46
- 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 +1 -1
- 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/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/cache_reset/master_reset_cache_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_breakdown_type_service.d.ts +6 -0
- package/dist/services/master/fleet/master_fleet_breakdown_type_service.js +315 -0
- 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_part_service.d.ts +6 -0
- package/dist/services/master/fleet/master_fleet_service_part_service.js +332 -0
- package/dist/services/master/fleet/master_fleet_service_task_service.d.ts +1 -1
- 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_sim_provider_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 +1 -1
- 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/tyre/master_tyre_model_service.js +32 -0
- 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 +1 -1
- 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/services/website/exclusive_feature_access.d.ts +1 -1
- package/package.json +1 -1
- package/dist/services/fleet/service_management/fleet_service_management_service.d.ts +0 -6
|
@@ -357,37 +357,39 @@ var MongoBaseQuerySchema = z2.object({
|
|
|
357
357
|
});
|
|
358
358
|
|
|
359
359
|
// src/services/fleet/incident_management/incident_management_service.ts
|
|
360
|
-
var URL = "fleet/incident_management/
|
|
360
|
+
var URL = "fleet/incident_management/fleet_incident";
|
|
361
361
|
var ENDPOINTS = {
|
|
362
362
|
// AWS S3 PRESIGNED
|
|
363
363
|
incident_file_presigned_url: `${URL}/incident_file_presigned_url`,
|
|
364
364
|
// File Uploads
|
|
365
365
|
create_incident_file: `${URL}/create_incident_file`,
|
|
366
366
|
remove_incident_file: (id) => `${URL}/remove_incident_file/${id}`,
|
|
367
|
-
//
|
|
368
|
-
find: `${URL}/search`,
|
|
369
|
-
create: `${URL}`,
|
|
370
|
-
update: (id) => `${URL}/${id}`,
|
|
371
|
-
delete: (id) => `${URL}/${id}`,
|
|
367
|
+
// FleetIncident APIs
|
|
368
|
+
find: `${URL}/fleet_incident/search`,
|
|
369
|
+
create: `${URL}/fleet_incident`,
|
|
370
|
+
update: (id) => `${URL}/fleet_incident/${id}`,
|
|
371
|
+
delete: (id) => `${URL}/fleet_incident/${id}`,
|
|
372
372
|
incident_dashboard: `${URL}/incident_dashboard`,
|
|
373
|
-
//
|
|
374
|
-
find_cost: `${URL}/
|
|
375
|
-
create_cost: `${URL}/
|
|
376
|
-
update_cost: (id) => `${URL}/
|
|
377
|
-
|
|
373
|
+
// FleetIncidentCost APIs
|
|
374
|
+
find_cost: `${URL}/incident_cost/search`,
|
|
375
|
+
create_cost: `${URL}/incident_cost`,
|
|
376
|
+
update_cost: (id) => `${URL}/incident_cost/${id}`,
|
|
377
|
+
delete_cost: (id) => `${URL}/incident_cost/${id}`
|
|
378
378
|
};
|
|
379
|
-
var
|
|
379
|
+
var FleetIncidentFileSchema = BaseFileSchema.extend({
|
|
380
380
|
// Relations - Parent
|
|
381
381
|
organisation_id: single_select_optional("UserOrganisation"),
|
|
382
382
|
// Single-Selection -> UserOrganisation
|
|
383
|
-
|
|
384
|
-
// Single-Selection ->
|
|
383
|
+
user_id: single_select_optional("User"),
|
|
384
|
+
// Single-Selection -> User
|
|
385
|
+
incident_id: single_select_optional("FleetIncident")
|
|
386
|
+
// Single-Selection -> FleetIncident
|
|
385
387
|
});
|
|
386
|
-
var
|
|
388
|
+
var FleetIncidentSchema = z3.object({
|
|
387
389
|
// Relations - Parent
|
|
388
390
|
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
389
391
|
// Single-Selection -> UserOrganisation
|
|
390
|
-
user_id:
|
|
392
|
+
user_id: single_select_optional("User"),
|
|
391
393
|
// Single-Selection -> User
|
|
392
394
|
vehicle_id: single_select_mandatory("MasterVehicle"),
|
|
393
395
|
// Single-Selection -> MasterVehicle
|
|
@@ -395,49 +397,22 @@ var FleetIncidentManagementSchema = z3.object({
|
|
|
395
397
|
// Single-Selection -> MasterDriver
|
|
396
398
|
// Main Field Details
|
|
397
399
|
fleet_incident_type_id: single_select_mandatory("MasterFleetIncidentType"),
|
|
398
|
-
// MasterFleetIncidentType
|
|
399
|
-
fleet_incident_status_id: single_select_mandatory(
|
|
400
|
-
|
|
401
|
-
),
|
|
402
|
-
//
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
),
|
|
406
|
-
// MasterFleetIncidentSeverity
|
|
407
|
-
fleet_insurance_claim_status_id: single_select_mandatory(
|
|
408
|
-
"MasterFleetInsuranceClaimStatus"
|
|
409
|
-
),
|
|
410
|
-
// MasterFleetInsuranceClaimStatus
|
|
400
|
+
// Single-Selection -> MasterFleetIncidentType
|
|
401
|
+
fleet_incident_status_id: single_select_mandatory("MasterFleetIncidentStatus"),
|
|
402
|
+
// Single-Selection -> MasterFleetIncidentStatus
|
|
403
|
+
fleet_incident_severity_id: single_select_mandatory("MasterFleetIncidentSeverity"),
|
|
404
|
+
// Single-Selection -> MasterFleetIncidentSeverity
|
|
405
|
+
fleet_insurance_claim_status_id: single_select_mandatory("MasterFleetInsuranceClaimStatus"),
|
|
406
|
+
// Single-Selection -> MasterFleetInsuranceClaimStatus
|
|
411
407
|
// Incident Details
|
|
412
408
|
incident_date: dateMandatory("Incident Date"),
|
|
413
409
|
was_towed: enumMandatory("Was Towed", YesNo, "No" /* No */),
|
|
414
|
-
is_vehicle_operational: enumMandatory(
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
),
|
|
419
|
-
incident_time: enumMandatory(
|
|
420
|
-
"Incident Time",
|
|
421
|
-
IncidentTime,
|
|
422
|
-
"Unknown" /* Unknown */
|
|
423
|
-
),
|
|
424
|
-
incident_weather: enumMandatory(
|
|
425
|
-
"Incident Weather",
|
|
426
|
-
IncidentWeather,
|
|
427
|
-
"Unknown" /* Unknown */
|
|
428
|
-
),
|
|
429
|
-
incident_road_type: enumMandatory(
|
|
430
|
-
"Incident Road Type",
|
|
431
|
-
IncidentRoadType,
|
|
432
|
-
"Unknown" /* Unknown */
|
|
433
|
-
),
|
|
434
|
-
incident_visibility: enumMandatory(
|
|
435
|
-
"Incident Visibility",
|
|
436
|
-
IncidentVisibility,
|
|
437
|
-
"Unknown" /* Unknown */
|
|
438
|
-
),
|
|
410
|
+
is_vehicle_operational: enumMandatory("Is Vehicle Operational", YesNo, "Yes" /* Yes */),
|
|
411
|
+
incident_time: enumMandatory("Incident Time", IncidentTime, "Unknown" /* Unknown */),
|
|
412
|
+
incident_weather: enumMandatory("Incident Weather", IncidentWeather, "Unknown" /* Unknown */),
|
|
413
|
+
incident_road_type: enumMandatory("Incident Road Type", IncidentRoadType, "Unknown" /* Unknown */),
|
|
414
|
+
incident_visibility: enumMandatory("Incident Visibility", IncidentVisibility, "Unknown" /* Unknown */),
|
|
439
415
|
odometer_reading: numberOptional("Odometer Reading"),
|
|
440
|
-
incident_cost: doubleOptional("Incident Cost"),
|
|
441
416
|
incident_description: stringOptional("Incident Description", 0, 2e3),
|
|
442
417
|
// Location Details
|
|
443
418
|
latitude: doubleOptionalLatLng("Latitude"),
|
|
@@ -448,13 +423,13 @@ var FleetIncidentManagementSchema = z3.object({
|
|
|
448
423
|
insurance_claimed: enumMandatory("Insurance Claimed", YesNo, "No" /* No */),
|
|
449
424
|
insurance_claimed_amount: doubleOptional("Insurance Claimed Amount"),
|
|
450
425
|
insurance_settled_amount: doubleOptional("Insurance Settled Amount"),
|
|
451
|
-
insurance_policy_number: stringOptional("Insurance Policy
|
|
426
|
+
insurance_policy_number: stringOptional("Insurance Policy Number", 0, 100),
|
|
452
427
|
insurance_company_name: stringOptional("Insurance Company Name", 0, 100),
|
|
453
428
|
insurance_contact_number: stringOptional("Insurance Contact Number", 0, 100),
|
|
454
429
|
insurance_description: stringOptional("Insurance Description", 0, 2e3),
|
|
455
430
|
// Complaint Details
|
|
456
431
|
police_report_filed: enumMandatory("Police Report Filed", YesNo, "No" /* No */),
|
|
457
|
-
police_report_number: stringOptional("Police Report
|
|
432
|
+
police_report_number: stringOptional("Police Report Number", 0, 100),
|
|
458
433
|
police_station_name: stringOptional("Police Station Name", 0, 100),
|
|
459
434
|
// Injury Details
|
|
460
435
|
any_injuries: enumMandatory("Any Injuries", YesNo, "No" /* No */),
|
|
@@ -462,25 +437,19 @@ var FleetIncidentManagementSchema = z3.object({
|
|
|
462
437
|
injured_persons_count: numberOptional("Injury Persons Count"),
|
|
463
438
|
// Other Details
|
|
464
439
|
legal_description: stringOptional("Legal Description", 0, 2e3),
|
|
465
|
-
involved_parties_description: stringOptional(
|
|
466
|
-
"Involved Parties Description",
|
|
467
|
-
0,
|
|
468
|
-
2e3
|
|
469
|
-
),
|
|
440
|
+
involved_parties_description: stringOptional("Involved Parties Description", 0, 2e3),
|
|
470
441
|
// Other
|
|
471
442
|
time_zone_id: single_select_mandatory("MasterMainTimeZone"),
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
FleetIncidentManagementFileSchema,
|
|
475
|
-
[]
|
|
476
|
-
),
|
|
443
|
+
// Files
|
|
444
|
+
FleetIncidentFileSchema: nestedArrayOfObjectsOptional("FleetIncidentFileSchema", FleetIncidentFileSchema, []),
|
|
477
445
|
// Metadata
|
|
478
446
|
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
479
447
|
});
|
|
480
|
-
var
|
|
481
|
-
//
|
|
482
|
-
|
|
483
|
-
// Multi-Selection ->
|
|
448
|
+
var FleetIncidentQuerySchema = BaseQuerySchema.extend({
|
|
449
|
+
// Self Table
|
|
450
|
+
incident_ids: multi_select_optional("FleetIncident"),
|
|
451
|
+
// Multi-Selection -> FleetIncident
|
|
452
|
+
// Relations - Parent
|
|
484
453
|
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
485
454
|
// Multi-Selection -> UserOrganisation
|
|
486
455
|
user_ids: multi_select_optional("User"),
|
|
@@ -494,104 +463,74 @@ var FleetIncidentManagementQuerySchema = BaseQuerySchema.extend({
|
|
|
494
463
|
// Multi-Selection -> MasterFleetIncidentType
|
|
495
464
|
fleet_incident_status_ids: multi_select_optional("MasterFleetIncidentStatus"),
|
|
496
465
|
// Multi-Selection -> MasterFleetIncidentStatus
|
|
497
|
-
fleet_incident_severity_ids: multi_select_optional(
|
|
498
|
-
"MasterFleetIncidentSeverity"
|
|
499
|
-
),
|
|
466
|
+
fleet_incident_severity_ids: multi_select_optional("MasterFleetIncidentSeverity"),
|
|
500
467
|
// Multi-Selection -> MasterFleetIncidentSeverity
|
|
501
|
-
fleet_insurance_claim_status_ids: multi_select_optional(
|
|
502
|
-
"MasterFleetInsuranceClaimStatus"
|
|
503
|
-
),
|
|
468
|
+
fleet_insurance_claim_status_ids: multi_select_optional("MasterFleetInsuranceClaimStatus"),
|
|
504
469
|
// Multi-Selection -> MasterFleetInsuranceClaimStatus
|
|
505
470
|
was_towed: enumArrayOptional("Was Towed", YesNo, getAllEnums(YesNo)),
|
|
506
|
-
is_vehicle_operational: enumArrayOptional(
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
),
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
getAllEnums(IncidentTime)
|
|
515
|
-
),
|
|
516
|
-
incident_weather: enumArrayOptional(
|
|
517
|
-
"Incident Weather",
|
|
518
|
-
IncidentWeather,
|
|
519
|
-
getAllEnums(IncidentWeather)
|
|
520
|
-
),
|
|
521
|
-
incident_road_type: enumArrayOptional(
|
|
522
|
-
"Incident Road Type",
|
|
523
|
-
IncidentRoadType,
|
|
524
|
-
getAllEnums(IncidentRoadType)
|
|
525
|
-
),
|
|
526
|
-
incident_visibility: enumArrayOptional(
|
|
527
|
-
"Incident Visibility",
|
|
528
|
-
IncidentVisibility,
|
|
529
|
-
getAllEnums(IncidentVisibility)
|
|
530
|
-
),
|
|
531
|
-
insurance_cover: enumArrayOptional(
|
|
532
|
-
"Insurance Cover",
|
|
533
|
-
YesNo,
|
|
534
|
-
getAllEnums(YesNo)
|
|
535
|
-
),
|
|
536
|
-
insurance_claimed: enumArrayOptional(
|
|
537
|
-
"Insurance Claimed",
|
|
538
|
-
YesNo,
|
|
539
|
-
getAllEnums(YesNo)
|
|
540
|
-
),
|
|
541
|
-
police_report_filed: enumArrayOptional(
|
|
542
|
-
"Police Report Filed",
|
|
543
|
-
YesNo,
|
|
544
|
-
getAllEnums(YesNo)
|
|
545
|
-
),
|
|
471
|
+
is_vehicle_operational: enumArrayOptional("Is Vehicle Operational", YesNo, getAllEnums(YesNo)),
|
|
472
|
+
incident_time: enumArrayOptional("Incident Time", IncidentTime, getAllEnums(IncidentTime)),
|
|
473
|
+
incident_weather: enumArrayOptional("Incident Weather", IncidentWeather, getAllEnums(IncidentWeather)),
|
|
474
|
+
incident_road_type: enumArrayOptional("Incident Road Type", IncidentRoadType, getAllEnums(IncidentRoadType)),
|
|
475
|
+
incident_visibility: enumArrayOptional("Incident Visibility", IncidentVisibility, getAllEnums(IncidentVisibility)),
|
|
476
|
+
insurance_cover: enumArrayOptional("Insurance Cover", YesNo, getAllEnums(YesNo)),
|
|
477
|
+
insurance_claimed: enumArrayOptional("Insurance Claimed", YesNo, getAllEnums(YesNo)),
|
|
478
|
+
police_report_filed: enumArrayOptional("Police Report Filed", YesNo, getAllEnums(YesNo)),
|
|
546
479
|
any_injuries: enumArrayOptional("Any Injuries", YesNo, getAllEnums(YesNo)),
|
|
547
480
|
from_date: dateMandatory("From Date"),
|
|
548
481
|
to_date: dateMandatory("To Date")
|
|
549
482
|
});
|
|
550
|
-
var
|
|
551
|
-
//
|
|
483
|
+
var FleetIncidentDashBoardQuerySchema = BaseQuerySchema.extend({
|
|
484
|
+
// Relations - Parent
|
|
552
485
|
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
553
486
|
// Multi-Selection -> UserOrganisation
|
|
554
487
|
vehicle_ids: multi_select_optional("MasterVehicle"),
|
|
555
488
|
// Multi-Selection -> MasterVehicle
|
|
556
|
-
// Main Field Details
|
|
557
489
|
from_date: dateMandatory("From Date"),
|
|
558
490
|
to_date: dateMandatory("To Date")
|
|
559
491
|
});
|
|
560
|
-
var
|
|
492
|
+
var FleetIncidentCostSchema = z3.object({
|
|
561
493
|
// Relations - Parent
|
|
562
494
|
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
563
495
|
// Single-Selection -> UserOrganisation
|
|
564
|
-
|
|
565
|
-
// Single-Selection ->
|
|
496
|
+
user_id: single_select_optional("User"),
|
|
497
|
+
// Single-Selection -> User
|
|
498
|
+
incident_id: single_select_mandatory("FleetIncident"),
|
|
499
|
+
// Single-Selection -> FleetIncident
|
|
566
500
|
expense_name_id: single_select_mandatory("MasterExpenseName"),
|
|
567
501
|
// Single-Selection -> MasterExpenseName
|
|
568
502
|
// Main Field Details
|
|
569
503
|
incident_cost_date: dateOptional("Incident Cost Date"),
|
|
570
504
|
incident_cost_amount: doubleOptional("Incident Cost Amount"),
|
|
571
|
-
incident_cost_description: stringOptional(
|
|
572
|
-
"Incident Cost Description",
|
|
573
|
-
0,
|
|
574
|
-
2e3
|
|
575
|
-
),
|
|
505
|
+
incident_cost_description: stringOptional("Incident Cost Description", 0, 2e3),
|
|
576
506
|
// Other
|
|
577
507
|
time_zone_id: single_select_mandatory("MasterMainTimeZone"),
|
|
578
508
|
// Metadata
|
|
579
509
|
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
580
510
|
});
|
|
581
|
-
var
|
|
582
|
-
//
|
|
583
|
-
incident_cost_ids: multi_select_optional("
|
|
584
|
-
// Multi-Selection ->
|
|
585
|
-
//
|
|
511
|
+
var FleetIncidentCostQuerySchema = BaseQuerySchema.extend({
|
|
512
|
+
// Self Table
|
|
513
|
+
incident_cost_ids: multi_select_optional("FleetIncidentCost"),
|
|
514
|
+
// Multi-Selection -> FleetIncidentCost
|
|
515
|
+
// Relations - Parent
|
|
586
516
|
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
587
517
|
// Multi-Selection -> UserOrganisation
|
|
588
|
-
|
|
589
|
-
// Multi-Selection ->
|
|
518
|
+
user_ids: multi_select_optional("User"),
|
|
519
|
+
// Multi-Selection -> User
|
|
520
|
+
incident_ids: multi_select_optional("FleetIncident"),
|
|
521
|
+
// Multi-Selection -> FleetIncident
|
|
590
522
|
expense_name_ids: multi_select_optional("MasterExpenseName")
|
|
591
523
|
// Multi-Selection -> MasterExpenseName
|
|
592
524
|
});
|
|
593
|
-
var
|
|
594
|
-
|
|
525
|
+
var toFleetIncidentPayload = (row) => ({
|
|
526
|
+
organisation_id: row.organisation_id || "",
|
|
527
|
+
user_id: row.user_id || "",
|
|
528
|
+
vehicle_id: row.vehicle_id || "",
|
|
529
|
+
driver_id: row.driver_id || "",
|
|
530
|
+
fleet_incident_type_id: row.fleet_incident_type_id || "",
|
|
531
|
+
fleet_incident_status_id: row.fleet_incident_status_id || "",
|
|
532
|
+
fleet_incident_severity_id: row.fleet_incident_severity_id || "",
|
|
533
|
+
fleet_insurance_claim_status_id: row.fleet_insurance_claim_status_id || "",
|
|
595
534
|
incident_date: row.incident_date || "",
|
|
596
535
|
was_towed: row.was_towed || "No" /* No */,
|
|
597
536
|
is_vehicle_operational: row.is_vehicle_operational || "Yes" /* Yes */,
|
|
@@ -600,13 +539,10 @@ var toFleetIncidentManagementPayload = (row) => ({
|
|
|
600
539
|
incident_road_type: row.incident_road_type || "Unknown" /* Unknown */,
|
|
601
540
|
incident_visibility: row.incident_visibility || "Unknown" /* Unknown */,
|
|
602
541
|
odometer_reading: row.odometer_reading || 0,
|
|
603
|
-
incident_cost: row.incident_cost || 0,
|
|
604
542
|
incident_description: row.incident_description || "",
|
|
605
|
-
// Location Details
|
|
606
543
|
latitude: row.latitude || 0,
|
|
607
544
|
longitude: row.longitude || 0,
|
|
608
545
|
google_location: row.google_location || "",
|
|
609
|
-
// Insurance Details
|
|
610
546
|
insurance_cover: row.insurance_cover || "No" /* No */,
|
|
611
547
|
insurance_claimed: row.insurance_claimed || "No" /* No */,
|
|
612
548
|
insurance_claimed_amount: row.insurance_claimed_amount || 0,
|
|
@@ -615,47 +551,36 @@ var toFleetIncidentManagementPayload = (row) => ({
|
|
|
615
551
|
insurance_company_name: row.insurance_company_name || "",
|
|
616
552
|
insurance_contact_number: row.insurance_contact_number || "",
|
|
617
553
|
insurance_description: row.insurance_description || "",
|
|
618
|
-
// Complaint Details
|
|
619
554
|
police_report_filed: row.police_report_filed || "No" /* No */,
|
|
620
555
|
police_report_number: row.police_report_number || "",
|
|
621
556
|
police_station_name: row.police_station_name || "",
|
|
622
|
-
// Injury Details
|
|
623
557
|
any_injuries: row.any_injuries || "No" /* No */,
|
|
624
558
|
injury_description: row.injury_description || "",
|
|
625
559
|
injured_persons_count: row.injured_persons_count || 0,
|
|
626
|
-
// Other Details
|
|
627
560
|
legal_description: row.legal_description || "",
|
|
628
561
|
involved_parties_description: row.involved_parties_description || "",
|
|
629
|
-
// Relations
|
|
630
|
-
organisation_id: row.organisation_id || "",
|
|
631
|
-
user_id: row.user_id || "",
|
|
632
|
-
vehicle_id: row.vehicle_id || "",
|
|
633
|
-
driver_id: row.driver_id || "",
|
|
634
|
-
fleet_incident_type_id: row.fleet_incident_type_id || "",
|
|
635
|
-
fleet_incident_status_id: row.fleet_incident_status_id || "",
|
|
636
|
-
fleet_incident_severity_id: row.fleet_incident_severity_id || "",
|
|
637
|
-
fleet_insurance_claim_status_id: row.fleet_insurance_claim_status_id || "",
|
|
638
|
-
status: row.status || "Active" /* Active */,
|
|
639
562
|
time_zone_id: "",
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
usage_type:
|
|
563
|
+
FleetIncidentFileSchema: row.FleetIncidentFile?.map((file) => ({
|
|
564
|
+
incident_file_id: file.incident_file_id || "",
|
|
565
|
+
// Usage Type -> Incident Images, Incident Videos, Incident Documents
|
|
566
|
+
usage_type: file.usage_type || "",
|
|
644
567
|
file_type: file.file_type || "Image" /* Image */,
|
|
645
|
-
file_url:
|
|
646
|
-
file_key:
|
|
647
|
-
file_name:
|
|
648
|
-
file_description:
|
|
568
|
+
file_url: file.file_url || "",
|
|
569
|
+
file_key: file.file_key || "",
|
|
570
|
+
file_name: file.file_name || "",
|
|
571
|
+
file_description: file.file_description || "",
|
|
649
572
|
file_size: file.file_size || 0,
|
|
650
573
|
file_metadata: file.file_metadata || {},
|
|
651
|
-
status: file.status
|
|
652
|
-
added_date_time: file.added_date_time
|
|
653
|
-
modified_date_time: file.modified_date_time
|
|
574
|
+
status: file.status || "Active" /* Active */,
|
|
575
|
+
added_date_time: file.added_date_time,
|
|
576
|
+
modified_date_time: file.modified_date_time,
|
|
654
577
|
organisation_id: file.organisation_id || "",
|
|
655
|
-
|
|
656
|
-
|
|
578
|
+
user_id: file.user_id || "",
|
|
579
|
+
incident_id: file.incident_id || ""
|
|
580
|
+
})) || [],
|
|
581
|
+
status: row.status || "Active" /* Active */
|
|
657
582
|
});
|
|
658
|
-
var
|
|
583
|
+
var newFleetIncidentPayload = () => ({
|
|
659
584
|
organisation_id: "",
|
|
660
585
|
user_id: "",
|
|
661
586
|
vehicle_id: "",
|
|
@@ -672,7 +597,6 @@ var newFleetIncidentManagementPayload = () => ({
|
|
|
672
597
|
incident_road_type: "Unknown" /* Unknown */,
|
|
673
598
|
incident_visibility: "Unknown" /* Unknown */,
|
|
674
599
|
odometer_reading: 0,
|
|
675
|
-
incident_cost: 0,
|
|
676
600
|
incident_description: "",
|
|
677
601
|
latitude: 0,
|
|
678
602
|
longitude: 0,
|
|
@@ -693,32 +617,31 @@ var newFleetIncidentManagementPayload = () => ({
|
|
|
693
617
|
injured_persons_count: 0,
|
|
694
618
|
legal_description: "",
|
|
695
619
|
involved_parties_description: "",
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
// Needs to be provided manually
|
|
620
|
+
time_zone_id: "",
|
|
621
|
+
FleetIncidentFileSchema: [],
|
|
622
|
+
status: "Active" /* Active */
|
|
700
623
|
});
|
|
701
|
-
var
|
|
624
|
+
var toFleetIncidentCostPayload = (row) => ({
|
|
702
625
|
organisation_id: row.organisation_id || "",
|
|
703
|
-
|
|
626
|
+
user_id: row.user_id || "",
|
|
627
|
+
incident_id: row.incident_id || "",
|
|
704
628
|
expense_name_id: row.expense_name_id || "",
|
|
705
629
|
incident_cost_date: row.incident_cost_date || "",
|
|
706
630
|
incident_cost_amount: row.incident_cost_amount || 0,
|
|
707
631
|
incident_cost_description: row.incident_cost_description || "",
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
// Needs to be provided manually
|
|
632
|
+
time_zone_id: "",
|
|
633
|
+
status: row.status || "Active" /* Active */
|
|
711
634
|
});
|
|
712
|
-
var
|
|
635
|
+
var newFleetIncidentCostPayload = () => ({
|
|
713
636
|
organisation_id: "",
|
|
714
|
-
|
|
637
|
+
user_id: "",
|
|
638
|
+
incident_id: "",
|
|
715
639
|
expense_name_id: "",
|
|
716
640
|
incident_cost_date: "",
|
|
717
641
|
incident_cost_amount: 0,
|
|
718
642
|
incident_cost_description: "",
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
// Needs to be provided manually
|
|
643
|
+
time_zone_id: "",
|
|
644
|
+
status: "Active" /* Active */
|
|
722
645
|
});
|
|
723
646
|
var get_incident_file_presigned_url = async (data) => {
|
|
724
647
|
return apiPost(ENDPOINTS.incident_file_presigned_url, data);
|
|
@@ -729,54 +652,54 @@ var create_incident_file = async (data) => {
|
|
|
729
652
|
var remove_incident_file = async (id) => {
|
|
730
653
|
return apiDelete(ENDPOINTS.remove_incident_file(id));
|
|
731
654
|
};
|
|
732
|
-
var
|
|
733
|
-
return apiPost(ENDPOINTS.create, data);
|
|
734
|
-
};
|
|
735
|
-
var findFleetIncidentManagement = async (data) => {
|
|
655
|
+
var findFleetIncident = async (data) => {
|
|
736
656
|
return apiPost(ENDPOINTS.find, data);
|
|
737
657
|
};
|
|
738
|
-
var
|
|
658
|
+
var createFleetIncident = async (data) => {
|
|
659
|
+
return apiPost(ENDPOINTS.create, data);
|
|
660
|
+
};
|
|
661
|
+
var updateFleetIncident = async (id, data) => {
|
|
739
662
|
return apiPatch(ENDPOINTS.update(id), data);
|
|
740
663
|
};
|
|
741
|
-
var
|
|
664
|
+
var deleteFleetIncident = async (id) => {
|
|
742
665
|
return apiDelete(ENDPOINTS.delete(id));
|
|
743
666
|
};
|
|
744
667
|
var incident_dashboard = async (data) => {
|
|
745
668
|
return apiPost(ENDPOINTS.incident_dashboard, data);
|
|
746
669
|
};
|
|
747
|
-
var
|
|
748
|
-
return apiPost(ENDPOINTS.create_cost, data);
|
|
749
|
-
};
|
|
750
|
-
var findFleetIncidentManagementCost = async (data) => {
|
|
670
|
+
var findFleetIncidentCost = async (data) => {
|
|
751
671
|
return apiPost(ENDPOINTS.find_cost, data);
|
|
752
672
|
};
|
|
753
|
-
var
|
|
673
|
+
var createFleetIncidentCost = async (data) => {
|
|
674
|
+
return apiPost(ENDPOINTS.create_cost, data);
|
|
675
|
+
};
|
|
676
|
+
var updateFleetIncidentCost = async (id, data) => {
|
|
754
677
|
return apiPatch(ENDPOINTS.update_cost(id), data);
|
|
755
678
|
};
|
|
756
|
-
var
|
|
757
|
-
return apiDelete(ENDPOINTS.
|
|
679
|
+
var deleteFleetIncidentCost = async (id) => {
|
|
680
|
+
return apiDelete(ENDPOINTS.delete_cost(id));
|
|
758
681
|
};
|
|
759
682
|
export {
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
683
|
+
FleetIncidentCostQuerySchema,
|
|
684
|
+
FleetIncidentCostSchema,
|
|
685
|
+
FleetIncidentDashBoardQuerySchema,
|
|
686
|
+
FleetIncidentFileSchema,
|
|
687
|
+
FleetIncidentQuerySchema,
|
|
688
|
+
FleetIncidentSchema,
|
|
689
|
+
createFleetIncident,
|
|
690
|
+
createFleetIncidentCost,
|
|
768
691
|
create_incident_file,
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
692
|
+
deleteFleetIncident,
|
|
693
|
+
deleteFleetIncidentCost,
|
|
694
|
+
findFleetIncident,
|
|
695
|
+
findFleetIncidentCost,
|
|
773
696
|
get_incident_file_presigned_url,
|
|
774
697
|
incident_dashboard,
|
|
775
|
-
|
|
776
|
-
|
|
698
|
+
newFleetIncidentCostPayload,
|
|
699
|
+
newFleetIncidentPayload,
|
|
777
700
|
remove_incident_file,
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
701
|
+
toFleetIncidentCostPayload,
|
|
702
|
+
toFleetIncidentPayload,
|
|
703
|
+
updateFleetIncident,
|
|
704
|
+
updateFleetIncidentCost
|
|
782
705
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../../core/Enums.js';
|
|
2
2
|
import '../../../core/BaseResponse.js';
|
|
3
3
|
import 'zod';
|
|
4
|
-
export {
|
|
4
|
+
export { fP as FleetInspectionForm, fS as FleetInspectionFormDTO, fW as FleetInspectionFormFieldsDTO, fV as FleetInspectionFormFieldsSchema, fU as FleetInspectionFormQueryDTO, fT as FleetInspectionFormQuerySchema, fR as FleetInspectionFormSchema, fQ as FleetInspectionFormSimple, f_ as createFleetInspectionForm, g1 as deleteFleetInspectionForm, fZ as findFleetInspectionForm, g2 as find_inspection_form_cache_simple, fY as newFleetInspectionFormPayload, fX as toFleetInspectionFormPayload, f$ as updateFleetInspectionForm, g0 as updateFleetInspectionFormData } from '../../../bookmark_service-GDSTht_e.js';
|
|
5
5
|
import '../../../zod_utils/zod_base_schema.js';
|
|
6
6
|
import '../../gps/reports/gps_models/FuelConsumptionMonthly.js';
|
|
@@ -255,13 +255,15 @@ var ENDPOINTS = {
|
|
|
255
255
|
update: (id) => `${URL}/${id}`,
|
|
256
256
|
update_form_data: (id) => `${URL}/update_form_data/${id}`,
|
|
257
257
|
delete: (id) => `${URL}/${id}`,
|
|
258
|
-
// Cache
|
|
258
|
+
// FleetInspectionForm Cache
|
|
259
259
|
cache_simple: (organisation_id) => `${URL}/cache_simple/${organisation_id}`
|
|
260
260
|
};
|
|
261
261
|
var FleetInspectionFormSchema = z3.object({
|
|
262
262
|
// Relations - Parent
|
|
263
263
|
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
264
264
|
// Single-Selection -> UserOrganisation
|
|
265
|
+
user_id: single_select_optional("User"),
|
|
266
|
+
// Single-Selection -> User
|
|
265
267
|
// Main Field Details
|
|
266
268
|
inspection_form_name: stringMandatory("Inspection Form Name", 3, 100),
|
|
267
269
|
inspection_form_notes: stringOptional("Inspection Form Notes", 0, 500),
|
|
@@ -274,14 +276,17 @@ var FleetInspectionFormQuerySchema = BaseQuerySchema.extend({
|
|
|
274
276
|
inspection_form_ids: multi_select_optional("FleetInspectionForm"),
|
|
275
277
|
// Multi-Selection -> FleetInspectionForm
|
|
276
278
|
// Relations - Parent
|
|
277
|
-
organisation_ids: multi_select_optional("UserOrganisation")
|
|
279
|
+
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
278
280
|
// Multi-Selection -> UserOrganisation
|
|
281
|
+
user_ids: multi_select_optional("User")
|
|
282
|
+
// Multi-Selection -> User
|
|
279
283
|
});
|
|
280
284
|
var FleetInspectionFormFieldsSchema = z3.object({
|
|
281
285
|
inspection_form_data: dynamicJsonSchema("Inspection Form Data", {})
|
|
282
286
|
});
|
|
283
287
|
var toFleetInspectionFormPayload = (row) => ({
|
|
284
288
|
organisation_id: row.organisation_id || "",
|
|
289
|
+
user_id: row.user_id || "",
|
|
285
290
|
inspection_form_name: row.inspection_form_name || "",
|
|
286
291
|
inspection_form_notes: row.inspection_form_notes || "",
|
|
287
292
|
inspection_form_data: row.inspection_form_data || {},
|
|
@@ -289,6 +294,7 @@ var toFleetInspectionFormPayload = (row) => ({
|
|
|
289
294
|
});
|
|
290
295
|
var newFleetInspectionFormPayload = () => ({
|
|
291
296
|
organisation_id: "",
|
|
297
|
+
user_id: "",
|
|
292
298
|
inspection_form_name: "",
|
|
293
299
|
inspection_form_notes: "",
|
|
294
300
|
inspection_form_data: {},
|
|
@@ -309,7 +315,7 @@ var updateFleetInspectionFormData = async (id, data) => {
|
|
|
309
315
|
var deleteFleetInspectionForm = async (id) => {
|
|
310
316
|
return apiDelete(ENDPOINTS.delete(id));
|
|
311
317
|
};
|
|
312
|
-
var
|
|
318
|
+
var find_inspection_form_cache_simple = async (organisation_id) => {
|
|
313
319
|
return apiGet(ENDPOINTS.cache_simple(organisation_id));
|
|
314
320
|
};
|
|
315
321
|
export {
|
|
@@ -319,7 +325,7 @@ export {
|
|
|
319
325
|
createFleetInspectionForm,
|
|
320
326
|
deleteFleetInspectionForm,
|
|
321
327
|
findFleetInspectionForm,
|
|
322
|
-
|
|
328
|
+
find_inspection_form_cache_simple,
|
|
323
329
|
newFleetInspectionFormPayload,
|
|
324
330
|
toFleetInspectionFormPayload,
|
|
325
331
|
updateFleetInspectionForm,
|
|
@@ -2,5 +2,5 @@ import '../../../core/Enums.js';
|
|
|
2
2
|
import '../../../core/BaseResponse.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '../../../zod_utils/zod_base_schema.js';
|
|
5
|
-
export {
|
|
5
|
+
export { g3 as FleetInspection, g9 as FleetInspectionDTO, gd as FleetInspectionDashBoardQueryDTO, gc as FleetInspectionDashBoardQuerySchema, g4 as FleetInspectionFile, g7 as FleetInspectionFileDTO, g6 as FleetInspectionFileSchema, gb as FleetInspectionQueryDTO, ga as FleetInspectionQuerySchema, g8 as FleetInspectionSchema, g5 as InspectionDashboard, gk as createFleetInspection, gh as create_inspection_file, gm as deleteFleetInspection, gj as findFleetInspection, gg as get_inspection_file_presigned_url, gn as inspection_dashboard, gf as newFleetInspectionPayload, gi as remove_inspection_file, ge as toFleetInspectionPayload, gl as updateFleetInspection } from '../../../bookmark_service-GDSTht_e.js';
|
|
6
6
|
import '../../gps/reports/gps_models/FuelConsumptionMonthly.js';
|