vms-nest-prisma-api-document 1.2.1 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/dist/core/BaseRequest.js +2 -28
  2. package/dist/core/BaseResponse.js +2 -27
  3. package/dist/core/Enums.js +2 -93
  4. package/dist/core/apiCall.js +2 -32
  5. package/dist/core/sdk-config.js +2 -28
  6. package/dist/index.js +0 -1
  7. package/dist/services/account/alert_service.js +58 -84
  8. package/dist/services/account/analytics/user_login_analytics_service.d.ts +3 -3
  9. package/dist/services/account/analytics/user_login_analytics_service.js +21 -49
  10. package/dist/services/account/analytics/user_page_analytics_service.d.ts +1 -1
  11. package/dist/services/account/analytics/user_page_analytics_service.js +14 -47
  12. package/dist/services/account/bookmark_service.js +33 -59
  13. package/dist/services/account/notification_service.js +39 -64
  14. package/dist/services/account/ticket_service.js +44 -70
  15. package/dist/services/gps/features/fuel/gps_fuel_vehicle_daily_summary_service.d.ts +12 -12
  16. package/dist/services/gps/features/fuel/gps_fuel_vehicle_daily_summary_service.js +44 -71
  17. package/dist/services/gps/features/fuel/gps_fuel_vehicle_refill_service.d.ts +27 -27
  18. package/dist/services/gps/features/fuel/gps_fuel_vehicle_refill_service.js +52 -73
  19. package/dist/services/gps/features/fuel/gps_fuel_vehicle_removal_service.d.ts +22 -22
  20. package/dist/services/gps/features/fuel/gps_fuel_vehicle_removal_service.js +52 -73
  21. package/dist/services/gps/features/geofence/gps_geofence_data_service.d.ts +10 -10
  22. package/dist/services/gps/features/geofence/gps_geofence_data_service.js +38 -61
  23. package/dist/services/gps/features/geofence/gps_geofence_transaction_service.d.ts +9 -9
  24. package/dist/services/gps/features/geofence/gps_geofence_transaction_service.js +28 -54
  25. package/dist/services/gps/features/geofence/gps_geofence_transaction_summary_service.d.ts +4 -4
  26. package/dist/services/gps/features/geofence/gps_geofence_transaction_summary_service.js +31 -57
  27. package/dist/services/gps/features/geofence/trip_geofence_to_geofence_service.d.ts +2 -2
  28. package/dist/services/gps/features/geofence/trip_geofence_to_geofence_service.js +45 -70
  29. package/dist/services/gps/features/gps_live_track_share_link_service.js +47 -74
  30. package/dist/services/gps/features/gps_track_history_share_link_service.js +35 -62
  31. package/dist/services/gps/reports/gps_models/DashboardSummaryReport.js +0 -18
  32. package/dist/services/gps/reports/gps_models/FuelConsumptionMonthly.js +0 -18
  33. package/dist/services/gps/reports/gps_models/GPSOverSpeedViolation.js +0 -18
  34. package/dist/services/gps/reports/gps_models/GpsAnalytics.js +0 -18
  35. package/dist/services/gps/reports/gps_models/GpsPacket.js +0 -18
  36. package/dist/services/gps/reports/gps_models/GpsSensor.js +0 -18
  37. package/dist/services/gps/reports/gps_models/HourlyKmAnalysis.js +0 -18
  38. package/dist/services/gps/reports/gps_models/KilometerMonthly.js +0 -18
  39. package/dist/services/gps/reports/gps_models/Last24HoursKmReport.js +0 -18
  40. package/dist/services/gps/reports/gps_models/OverSpeedViolationMonthly.js +0 -18
  41. package/dist/services/gps/reports/gps_reports_mongo_service.js +70 -111
  42. package/dist/services/gps/reports/gps_reports_postgre_service.js +0 -1
  43. package/dist/services/main/devices/master_device_service.js +38 -69
  44. package/dist/services/main/drivers/master_driver_service.js +43 -73
  45. package/dist/services/main/sims/master_sim_service.js +27 -54
  46. package/dist/services/main/users/auth_service.js +15 -47
  47. package/dist/services/main/users/user_admin_service.js +21 -52
  48. package/dist/services/main/users/user_organisation_service.js +59 -88
  49. package/dist/services/main/users/user_service.js +98 -142
  50. package/dist/services/main/vehicle/childs/vehicle_odometer_history.js +24 -52
  51. package/dist/services/main/vehicle/master_vehicle_service.js +227 -282
  52. package/dist/services/master/device/master_device_manufacturer_service.js +16 -48
  53. package/dist/services/master/device/master_device_model_service.js +19 -50
  54. package/dist/services/master/device/master_device_type_service.js +22 -53
  55. package/dist/services/master/expense/master_expense_name_service.js +20 -49
  56. package/dist/services/master/expense/master_expense_type_service.js +17 -47
  57. package/dist/services/master/expense/master_vendor_type_service.js +19 -48
  58. package/dist/services/master/fleet/master_fleet_incident_severity_service.js +17 -47
  59. package/dist/services/master/fleet/master_fleet_incident_status_service.js +17 -47
  60. package/dist/services/master/fleet/master_fleet_incident_type_service.js +17 -47
  61. package/dist/services/master/fleet/master_fleet_insurance_claim_status_service.js +17 -47
  62. package/dist/services/master/fleet/master_fleet_service_task_service.js +17 -47
  63. package/dist/services/master/main/master_main_country_service.js +16 -48
  64. package/dist/services/master/main/master_main_currency_service.js +20 -49
  65. package/dist/services/master/main/master_main_date_format_service.js +15 -46
  66. package/dist/services/master/main/master_main_eway_bill_provider_service.d.ts +2 -2
  67. package/dist/services/master/main/master_main_eway_bill_provider_service.js +16 -46
  68. package/dist/services/master/main/master_main_fasttag_bank_service.d.ts +2 -2
  69. package/dist/services/master/main/master_main_fasttag_bank_service.js +16 -46
  70. package/dist/services/master/main/master_main_industry_service.js +16 -46
  71. package/dist/services/master/main/master_main_landmark_service.js +28 -55
  72. package/dist/services/master/main/master_main_language_service.js +15 -46
  73. package/dist/services/master/main/master_main_sim_provider_service.js +15 -46
  74. package/dist/services/master/main/master_main_state_service.js +19 -48
  75. package/dist/services/master/main/master_main_timezone_service.js +22 -51
  76. package/dist/services/master/main/master_main_unit_distance_service.js +15 -46
  77. package/dist/services/master/main/master_main_unit_mileage_service.js +15 -46
  78. package/dist/services/master/main/master_main_unit_volume_service.js +15 -46
  79. package/dist/services/master/organisation/organisation_branch_service.js +19 -51
  80. package/dist/services/master/organisation/organisation_color_service.js +18 -50
  81. package/dist/services/master/organisation/organisation_group_service.js +19 -51
  82. package/dist/services/master/organisation/organisation_sub_company_service.js +21 -52
  83. package/dist/services/master/organisation/organisation_tag_service.js +17 -49
  84. package/dist/services/master/spare_part/master_spare_part_category_service.js +18 -51
  85. package/dist/services/master/spare_part/master_spare_part_sub_category_service.js +20 -50
  86. package/dist/services/master/spare_part/master_spare_part_unit_service.js +18 -48
  87. package/dist/services/master/trip/master_trip_party_type_service.js +17 -47
  88. package/dist/services/master/tyre/master_tyre_grade_service.js +17 -47
  89. package/dist/services/master/tyre/master_tyre_make_service.js +17 -50
  90. package/dist/services/master/tyre/master_tyre_model_service.js +19 -49
  91. package/dist/services/master/user/master_user_role_service.js +17 -47
  92. package/dist/services/master/user/master_user_status_service.js +17 -47
  93. package/dist/services/master/vehicle/master_vehicle_fuel_type_service.js +17 -47
  94. package/dist/services/master/vehicle/master_vehicle_make_service.js +17 -49
  95. package/dist/services/master/vehicle/master_vehicle_model_service.js +19 -49
  96. package/dist/services/master/vehicle/master_vehicle_ownership_type_service.js +17 -47
  97. package/dist/services/master/vehicle/master_vehicle_status_type_service.js +17 -47
  98. package/dist/services/master/vehicle/master_vehicle_sub_model_service.js +21 -51
  99. package/dist/services/master/vehicle/master_vehicle_type_service.js +17 -49
  100. package/dist/services/website/contact_us_detail_service.d.ts +1 -1
  101. package/dist/services/website/contact_us_detail_service.js +23 -53
  102. package/dist/services/website/faq_service.d.ts +1 -1
  103. package/dist/services/website/faq_service.js +16 -46
  104. package/dist/services/website/static_pages_service.js +17 -47
  105. package/dist/zod/zod_base_schema.js +20 -47
  106. package/dist/zod/zod_utils.js +49 -108
  107. package/package.json +2 -2
@@ -1,36 +1,3 @@
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/gps/features/fuel/gps_fuel_vehicle_removal_service.ts
21
- var gps_fuel_vehicle_removal_service_exports = {};
22
- __export(gps_fuel_vehicle_removal_service_exports, {
23
- GPSFuelVehicleRemovalQuerySchema: () => GPSFuelVehicleRemovalQuerySchema,
24
- GPSFuelVehicleRemovalSchema: () => GPSFuelVehicleRemovalSchema,
25
- createGPSFuelVehicleRemoval: () => createGPSFuelVehicleRemoval,
26
- deleteGPSFuelVehicleRemoval: () => deleteGPSFuelVehicleRemoval,
27
- findGPSFuelVehicleRemovals: () => findGPSFuelVehicleRemovals,
28
- newGPSFuelVehicleRemovalPayload: () => newGPSFuelVehicleRemovalPayload,
29
- toGPSFuelVehicleRemovalPayload: () => toGPSFuelVehicleRemovalPayload,
30
- updateGPSFuelVehicleRemoval: () => updateGPSFuelVehicleRemoval
31
- });
32
- module.exports = __toCommonJS(gps_fuel_vehicle_removal_service_exports);
33
-
34
1
  // src/core/sdk-config.ts
35
2
  var axiosInstance;
36
3
  var getAxiosInstance = () => {
@@ -55,9 +22,22 @@ var apiDelete = async (url) => {
55
22
  };
56
23
 
57
24
  // src/services/gps/features/fuel/gps_fuel_vehicle_removal_service.ts
58
- var import_zod = require("zod");
59
- var import_zod_utils = require("zod/zod_utils");
60
- var import_zod_base_schema = require("zod/zod_base_schema");
25
+ import { z } from "zod";
26
+ import {
27
+ doubleMandatory,
28
+ doubleOptional,
29
+ enumMandatory,
30
+ enumArrayOptional,
31
+ getAllEnums,
32
+ multi_select_optional,
33
+ single_select_mandatory,
34
+ single_select_optional,
35
+ stringOptional,
36
+ dateMandatory,
37
+ doubleOptionalLatLng,
38
+ numberOptional
39
+ } from "zod/zod_utils";
40
+ import { BaseQuerySchema } from "zod/zod_base_schema";
61
41
 
62
42
  // src/core/Enums.ts
63
43
  var Status = /* @__PURE__ */ ((Status2) => {
@@ -85,53 +65,53 @@ var ENDPOINTS = {
85
65
  update: (id) => `${URL}/${id}`,
86
66
  delete: (id) => `${URL}/${id}`
87
67
  };
88
- var GPSFuelVehicleRemovalSchema = import_zod.z.object({
89
- organisation_id: (0, import_zod_utils.single_select_mandatory)("Organisation ID"),
90
- vehicle_id: (0, import_zod_utils.single_select_mandatory)("Master Vehicle ID"),
91
- device_id: (0, import_zod_utils.single_select_mandatory)("Device ID"),
92
- user_id: (0, import_zod_utils.single_select_optional)("User ID"),
93
- driver_id: (0, import_zod_utils.single_select_optional)("Driver ID"),
94
- before_remove_fuel_liters: (0, import_zod_utils.doubleMandatory)("Before Remove Fuel Liters"),
95
- after_remove_fuel_liters: (0, import_zod_utils.doubleMandatory)("Before Remove Fuel Liters"),
96
- gps_removal_liters: (0, import_zod_utils.doubleMandatory)("GPS Removal Liters"),
97
- verified_removal_liters: (0, import_zod_utils.doubleMandatory)("Verified Removal Liters"),
98
- verified: (0, import_zod_utils.enumMandatory)("Verified", YesNo, "Yes" /* Yes */),
99
- approved: (0, import_zod_utils.enumMandatory)(
68
+ var GPSFuelVehicleRemovalSchema = z.object({
69
+ organisation_id: single_select_mandatory("Organisation ID"),
70
+ vehicle_id: single_select_mandatory("Master Vehicle ID"),
71
+ device_id: single_select_mandatory("Device ID"),
72
+ user_id: single_select_optional("User ID"),
73
+ driver_id: single_select_optional("Driver ID"),
74
+ before_remove_fuel_liters: doubleMandatory("Before Remove Fuel Liters"),
75
+ after_remove_fuel_liters: doubleMandatory("Before Remove Fuel Liters"),
76
+ gps_removal_liters: doubleMandatory("GPS Removal Liters"),
77
+ verified_removal_liters: doubleMandatory("Verified Removal Liters"),
78
+ verified: enumMandatory("Verified", YesNo, "Yes" /* Yes */),
79
+ approved: enumMandatory(
100
80
  "GPS Fuel Approve Status",
101
81
  GPSFuelApproveStatus,
102
82
  "Pending" /* Pending */
103
83
  ),
104
- date_time: (0, import_zod_utils.dateMandatory)("Date Time"),
105
- cost_per_liter: (0, import_zod_utils.doubleOptional)("Cost Per Liter"),
106
- total_cost: (0, import_zod_utils.doubleOptional)("Total Cost"),
107
- refill_details: (0, import_zod_utils.stringOptional)("Refill Details", 0, 300),
108
- latitude: (0, import_zod_utils.doubleOptionalLatLng)("Latitude"),
109
- longitude: (0, import_zod_utils.doubleOptionalLatLng)("Longitude"),
110
- gl: (0, import_zod_utils.stringOptional)("GL", 0, 300),
111
- lid: (0, import_zod_utils.stringOptional)("LID", 0, 300),
112
- ll: (0, import_zod_utils.stringOptional)("LL", 0, 300),
113
- ld: (0, import_zod_utils.numberOptional)("LD"),
114
- status: (0, import_zod_utils.enumMandatory)("Status", Status, "Active" /* Active */)
84
+ date_time: dateMandatory("Date Time"),
85
+ cost_per_liter: doubleOptional("Cost Per Liter"),
86
+ total_cost: doubleOptional("Total Cost"),
87
+ refill_details: stringOptional("Refill Details", 0, 300),
88
+ latitude: doubleOptionalLatLng("Latitude"),
89
+ longitude: doubleOptionalLatLng("Longitude"),
90
+ gl: stringOptional("GL", 0, 300),
91
+ lid: stringOptional("LID", 0, 300),
92
+ ll: stringOptional("LL", 0, 300),
93
+ ld: numberOptional("LD"),
94
+ status: enumMandatory("Status", Status, "Active" /* Active */)
115
95
  });
116
- var GPSFuelVehicleRemovalQuerySchema = import_zod_base_schema.BaseQuerySchema.extend({
117
- organisation_ids: (0, import_zod_utils.multi_select_optional)("User Organisation IDs"),
96
+ var GPSFuelVehicleRemovalQuerySchema = BaseQuerySchema.extend({
97
+ organisation_ids: multi_select_optional("User Organisation IDs"),
118
98
  // ✅ Multi-selection -> UserOrganisation
119
- user_ids: (0, import_zod_utils.multi_select_optional)("User IDs"),
99
+ user_ids: multi_select_optional("User IDs"),
120
100
  // ✅ Multi-selection -> User
121
- vehicle_ids: (0, import_zod_utils.multi_select_optional)("Master Vehicle IDs"),
101
+ vehicle_ids: multi_select_optional("Master Vehicle IDs"),
122
102
  // ✅ Multi-selection -> MasterVehicle
123
- device_ids: (0, import_zod_utils.multi_select_optional)("Master Device IDs"),
103
+ device_ids: multi_select_optional("Master Device IDs"),
124
104
  // ✅ Multi-selection -> Master Device
125
- driver_ids: (0, import_zod_utils.multi_select_optional)("Master Driver IDs"),
105
+ driver_ids: multi_select_optional("Master Driver IDs"),
126
106
  // ✅ Multi-selection -> Master Driver
127
- approved: (0, import_zod_utils.enumArrayOptional)(
107
+ approved: enumArrayOptional(
128
108
  "Approved",
129
109
  GPSFuelApproveStatus,
130
- (0, import_zod_utils.getAllEnums)(GPSFuelApproveStatus)
110
+ getAllEnums(GPSFuelApproveStatus)
131
111
  ),
132
- verified: (0, import_zod_utils.enumArrayOptional)("Verified", YesNo, (0, import_zod_utils.getAllEnums)(YesNo)),
133
- from_date: (0, import_zod_utils.dateMandatory)("From Date"),
134
- to_date: (0, import_zod_utils.dateMandatory)("To Date")
112
+ verified: enumArrayOptional("Verified", YesNo, getAllEnums(YesNo)),
113
+ from_date: dateMandatory("From Date"),
114
+ to_date: dateMandatory("To Date")
135
115
  });
136
116
  var toGPSFuelVehicleRemovalPayload = (item) => ({
137
117
  organisation_id: item.organisation_id,
@@ -196,8 +176,7 @@ var updateGPSFuelVehicleRemoval = async (id, data) => {
196
176
  var deleteGPSFuelVehicleRemoval = async (id) => {
197
177
  return apiDelete(ENDPOINTS.delete(id));
198
178
  };
199
- // Annotate the CommonJS export names for ESM import in node:
200
- 0 && (module.exports = {
179
+ export {
201
180
  GPSFuelVehicleRemovalQuerySchema,
202
181
  GPSFuelVehicleRemovalSchema,
203
182
  createGPSFuelVehicleRemoval,
@@ -206,4 +185,4 @@ var deleteGPSFuelVehicleRemoval = async (id) => {
206
185
  newGPSFuelVehicleRemovalPayload,
207
186
  toGPSFuelVehicleRemovalPayload,
208
187
  updateGPSFuelVehicleRemoval
209
- });
188
+ };
@@ -59,6 +59,8 @@ declare const GPSGeofenceDataSchema: z.ZodObject<{
59
59
  geofence_purpose_type: z.ZodType<GeofencePurposeType, z.ZodTypeDef, GeofencePurposeType>;
60
60
  status: z.ZodType<Status, z.ZodTypeDef, Status>;
61
61
  }, "strip", z.ZodTypeAny, {
62
+ status: Status;
63
+ organisation_id: string;
62
64
  geofence_name: string;
63
65
  location_name: string;
64
66
  geofence_type: GeofenceType;
@@ -68,21 +70,19 @@ declare const GPSGeofenceDataSchema: z.ZodObject<{
68
70
  }[];
69
71
  geofence_description: string;
70
72
  geofence_purpose_type: GeofencePurposeType;
71
- status: Status;
72
- organisation_id: string;
73
- radius_km?: number | undefined;
74
73
  latitude?: number | undefined;
75
74
  longitude?: number | undefined;
75
+ radius_km?: number | undefined;
76
76
  }, {
77
+ status: Status;
78
+ organisation_id: string;
77
79
  geofence_name: string;
78
80
  location_name: string;
79
81
  geofence_type: GeofenceType;
80
82
  geofence_purpose_type: GeofencePurposeType;
81
- status: Status;
82
- organisation_id: string;
83
- radius_km?: unknown;
84
83
  latitude?: unknown;
85
84
  longitude?: unknown;
85
+ radius_km?: unknown;
86
86
  poliline_data?: {
87
87
  latitude?: unknown;
88
88
  longitude?: unknown;
@@ -125,8 +125,6 @@ declare const GPSGeofenceDataQuerySchema: z.ZodObject<{
125
125
  geofence_type: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof GeofenceType>, "many">>>;
126
126
  geofence_purpose_type: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof GeofencePurposeType>, "many">>>;
127
127
  }, "strip", z.ZodTypeAny, {
128
- geofence_type: GeofenceType[];
129
- geofence_purpose_type: GeofencePurposeType[];
130
128
  status: Status[];
131
129
  search: string;
132
130
  paging: PAGING;
@@ -149,11 +147,11 @@ declare const GPSGeofenceDataQuerySchema: z.ZodObject<{
149
147
  date_format_id: string;
150
148
  time_zone_id: string;
151
149
  organisation_ids: string[];
150
+ geofence_type: GeofenceType[];
151
+ geofence_purpose_type: GeofencePurposeType[];
152
152
  }, {
153
153
  date_format_id: string;
154
154
  time_zone_id: string;
155
- geofence_type?: GeofenceType[] | undefined;
156
- geofence_purpose_type?: GeofencePurposeType[] | undefined;
157
155
  status?: Status[] | undefined;
158
156
  search?: string | undefined;
159
157
  paging?: PAGING | undefined;
@@ -174,6 +172,8 @@ declare const GPSGeofenceDataQuerySchema: z.ZodObject<{
174
172
  }[] | undefined;
175
173
  include_master_data?: YesNo | undefined;
176
174
  organisation_ids?: string[] | undefined;
175
+ geofence_type?: GeofenceType[] | undefined;
176
+ geofence_purpose_type?: GeofencePurposeType[] | undefined;
177
177
  }>;
178
178
  type GPSGeofenceDataQueryDTO = z.infer<typeof GPSGeofenceDataQuerySchema>;
179
179
  declare const toGPSGeofenceDataPayload: (data: GPSGeofenceData) => GPSGeofenceDataDTO;
@@ -1,37 +1,3 @@
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/gps/features/geofence/gps_geofence_data_service.ts
21
- var gps_geofence_data_service_exports = {};
22
- __export(gps_geofence_data_service_exports, {
23
- GPSGeofenceDataQuerySchema: () => GPSGeofenceDataQuerySchema,
24
- GPSGeofenceDataSchema: () => GPSGeofenceDataSchema,
25
- GPSGeofencePolilineDataSchema: () => GPSGeofencePolilineDataSchema,
26
- createGPSGeofenceData: () => createGPSGeofenceData,
27
- deleteGPSGeofenceData: () => deleteGPSGeofenceData,
28
- findGPSGeofenceData: () => findGPSGeofenceData,
29
- newGPSGeofenceDataPayload: () => newGPSGeofenceDataPayload,
30
- toGPSGeofenceDataPayload: () => toGPSGeofenceDataPayload,
31
- updateGPSGeofenceData: () => updateGPSGeofenceData
32
- });
33
- module.exports = __toCommonJS(gps_geofence_data_service_exports);
34
-
35
1
  // src/core/sdk-config.ts
36
2
  var axiosInstance;
37
3
  var getAxiosInstance = () => {
@@ -56,9 +22,21 @@ var apiDelete = async (url) => {
56
22
  };
57
23
 
58
24
  // src/services/gps/features/geofence/gps_geofence_data_service.ts
59
- var import_zod = require("zod");
60
- var import_zod_utils = require("zod/zod_utils");
61
- var import_zod_base_schema = require("zod/zod_base_schema");
25
+ import { z } from "zod";
26
+ import {
27
+ stringMandatory,
28
+ stringOptional,
29
+ enumMandatory,
30
+ enumArrayOptional,
31
+ multi_select_optional,
32
+ single_select_mandatory,
33
+ doubleOptional,
34
+ doubleMandatoryLatLng,
35
+ nestedArrayOfObjectsOptional,
36
+ getAllEnums,
37
+ doubleOptionalLatLng
38
+ } from "zod/zod_utils";
39
+ import { BaseQuerySchema } from "zod/zod_base_schema";
62
40
 
63
41
  // src/core/Enums.ts
64
42
  var Status = /* @__PURE__ */ ((Status2) => {
@@ -140,47 +118,47 @@ var ENDPOINTS = {
140
118
  update: (id) => `${URL}/${id}`,
141
119
  delete: (id) => `${URL}/${id}`
142
120
  };
143
- var GPSGeofencePolilineDataSchema = import_zod.z.object({
144
- latitude: (0, import_zod_utils.doubleMandatoryLatLng)("latitude"),
145
- longitude: (0, import_zod_utils.doubleMandatoryLatLng)("longitude")
121
+ var GPSGeofencePolilineDataSchema = z.object({
122
+ latitude: doubleMandatoryLatLng("latitude"),
123
+ longitude: doubleMandatoryLatLng("longitude")
146
124
  });
147
- var GPSGeofenceDataSchema = import_zod.z.object({
148
- organisation_id: (0, import_zod_utils.single_select_mandatory)("Organisation ID"),
149
- geofence_name: (0, import_zod_utils.stringMandatory)("Geofence Name", 3, 100),
150
- location_name: (0, import_zod_utils.stringMandatory)("Location Name", 3, 100),
151
- geofence_type: (0, import_zod_utils.enumMandatory)(
125
+ var GPSGeofenceDataSchema = z.object({
126
+ organisation_id: single_select_mandatory("Organisation ID"),
127
+ geofence_name: stringMandatory("Geofence Name", 3, 100),
128
+ location_name: stringMandatory("Location Name", 3, 100),
129
+ geofence_type: enumMandatory(
152
130
  "Geofence Type",
153
131
  GeofenceType,
154
132
  "Circle" /* Circle */
155
133
  ),
156
- radius_km: (0, import_zod_utils.doubleOptional)("radius_km"),
157
- latitude: (0, import_zod_utils.doubleOptionalLatLng)("latitude"),
158
- longitude: (0, import_zod_utils.doubleOptionalLatLng)("longitude"),
159
- poliline_data: (0, import_zod_utils.nestedArrayOfObjectsOptional)(
134
+ radius_km: doubleOptional("radius_km"),
135
+ latitude: doubleOptionalLatLng("latitude"),
136
+ longitude: doubleOptionalLatLng("longitude"),
137
+ poliline_data: nestedArrayOfObjectsOptional(
160
138
  "Polyline Data",
161
139
  GPSGeofencePolilineDataSchema,
162
140
  []
163
141
  ),
164
- geofence_description: (0, import_zod_utils.stringOptional)("Geofence Description", 0, 500),
165
- geofence_purpose_type: (0, import_zod_utils.enumMandatory)(
142
+ geofence_description: stringOptional("Geofence Description", 0, 500),
143
+ geofence_purpose_type: enumMandatory(
166
144
  "Geofence Purpuse Type",
167
145
  GeofencePurposeType,
168
146
  "TripSourceLocation" /* TripSourceLocation */
169
147
  ),
170
- status: (0, import_zod_utils.enumMandatory)("Status", Status, "Active" /* Active */)
148
+ status: enumMandatory("Status", Status, "Active" /* Active */)
171
149
  });
172
- var GPSGeofenceDataQuerySchema = import_zod_base_schema.BaseQuerySchema.extend({
173
- organisation_ids: (0, import_zod_utils.multi_select_optional)("User Organisation IDs"),
150
+ var GPSGeofenceDataQuerySchema = BaseQuerySchema.extend({
151
+ organisation_ids: multi_select_optional("User Organisation IDs"),
174
152
  // ✅ Multi-selection -> UserOrganisation
175
- geofence_type: (0, import_zod_utils.enumArrayOptional)(
153
+ geofence_type: enumArrayOptional(
176
154
  "Geofence Type",
177
155
  GeofenceType,
178
- (0, import_zod_utils.getAllEnums)(GeofenceType)
156
+ getAllEnums(GeofenceType)
179
157
  ),
180
- geofence_purpose_type: (0, import_zod_utils.enumArrayOptional)(
158
+ geofence_purpose_type: enumArrayOptional(
181
159
  "Geofence Purpose Type",
182
160
  GeofencePurposeType,
183
- (0, import_zod_utils.getAllEnums)(GeofencePurposeType)
161
+ getAllEnums(GeofencePurposeType)
184
162
  )
185
163
  });
186
164
  var toGPSGeofenceDataPayload = (data) => ({
@@ -221,8 +199,7 @@ var updateGPSGeofenceData = async (id, data) => {
221
199
  var deleteGPSGeofenceData = async (id) => {
222
200
  return apiDelete(ENDPOINTS.delete(id));
223
201
  };
224
- // Annotate the CommonJS export names for ESM import in node:
225
- 0 && (module.exports = {
202
+ export {
226
203
  GPSGeofenceDataQuerySchema,
227
204
  GPSGeofenceDataSchema,
228
205
  GPSGeofencePolilineDataSchema,
@@ -232,4 +209,4 @@ var deleteGPSGeofenceData = async (id) => {
232
209
  newGPSGeofenceDataPayload,
233
210
  toGPSGeofenceDataPayload,
234
211
  updateGPSGeofenceData
235
- });
212
+ };
@@ -31,21 +31,21 @@ declare const GPSGeofenceTransactionSchema: z.ZodObject<{
31
31
  geofence_time: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
32
32
  status: z.ZodType<Status, z.ZodTypeDef, Status>;
33
33
  }, "strip", z.ZodTypeAny, {
34
- gps_geofence_id: string;
34
+ geofence_status_type: GeofenceStatusType;
35
+ geofence_time: string;
35
36
  status: Status;
36
37
  organisation_id: string;
37
- driver_id: string;
38
38
  vehicle_id: string;
39
+ driver_id: string;
40
+ gps_geofence_id: string;
41
+ }, {
39
42
  geofence_status_type: GeofenceStatusType;
40
43
  geofence_time: string;
41
- }, {
42
- gps_geofence_id: string;
43
44
  status: Status;
44
45
  organisation_id: string;
45
- driver_id: string;
46
46
  vehicle_id: string;
47
- geofence_status_type: GeofenceStatusType;
48
- geofence_time: string;
47
+ driver_id: string;
48
+ gps_geofence_id: string;
49
49
  }>;
50
50
  type GPSGeofenceTransactionDTO = z.infer<typeof GPSGeofenceTransactionSchema>;
51
51
  declare const GPSGeofenceTransactionQuerySchema: z.ZodObject<{
@@ -85,6 +85,7 @@ declare const GPSGeofenceTransactionQuerySchema: z.ZodObject<{
85
85
  gps_geofence_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
86
86
  geofence_status_type: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof GeofenceStatusType>, "many">>>;
87
87
  }, "strip", z.ZodTypeAny, {
88
+ geofence_status_type: GeofenceStatusType[];
88
89
  status: Status[];
89
90
  search: string;
90
91
  paging: PAGING;
@@ -109,11 +110,11 @@ declare const GPSGeofenceTransactionQuerySchema: z.ZodObject<{
109
110
  organisation_ids: string[];
110
111
  vehicle_ids: string[];
111
112
  driver_ids: string[];
112
- geofence_status_type: GeofenceStatusType[];
113
113
  gps_geofence_ids: string[];
114
114
  }, {
115
115
  date_format_id: string;
116
116
  time_zone_id: string;
117
+ geofence_status_type?: GeofenceStatusType[] | undefined;
117
118
  status?: Status[] | undefined;
118
119
  search?: string | undefined;
119
120
  paging?: PAGING | undefined;
@@ -136,7 +137,6 @@ declare const GPSGeofenceTransactionQuerySchema: z.ZodObject<{
136
137
  organisation_ids?: string[] | undefined;
137
138
  vehicle_ids?: string[] | undefined;
138
139
  driver_ids?: string[] | undefined;
139
- geofence_status_type?: GeofenceStatusType[] | undefined;
140
140
  gps_geofence_ids?: string[] | undefined;
141
141
  }>;
142
142
  type GPSGeofenceTransactionQueryDTO = z.infer<typeof GPSGeofenceTransactionQuerySchema>;
@@ -1,36 +1,3 @@
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/gps/features/geofence/gps_geofence_transaction_service.ts
21
- var gps_geofence_transaction_service_exports = {};
22
- __export(gps_geofence_transaction_service_exports, {
23
- GPSGeofenceTransactionQuerySchema: () => GPSGeofenceTransactionQuerySchema,
24
- GPSGeofenceTransactionSchema: () => GPSGeofenceTransactionSchema,
25
- createGPSGeofenceTransaction: () => createGPSGeofenceTransaction,
26
- deleteGPSGeofenceTransaction: () => deleteGPSGeofenceTransaction,
27
- findGPSGeofenceTransactions: () => findGPSGeofenceTransactions,
28
- newGPSGeofenceTransactionPayload: () => newGPSGeofenceTransactionPayload,
29
- toGPSGeofenceTransactionPayload: () => toGPSGeofenceTransactionPayload,
30
- updateGPSGeofenceTransaction: () => updateGPSGeofenceTransaction
31
- });
32
- module.exports = __toCommonJS(gps_geofence_transaction_service_exports);
33
-
34
1
  // src/core/sdk-config.ts
35
2
  var axiosInstance;
36
3
  var getAxiosInstance = () => {
@@ -55,9 +22,17 @@ var apiDelete = async (url) => {
55
22
  };
56
23
 
57
24
  // src/services/gps/features/geofence/gps_geofence_transaction_service.ts
58
- var import_zod = require("zod");
59
- var import_zod_utils = require("zod/zod_utils");
60
- var import_zod_base_schema = require("zod/zod_base_schema");
25
+ import { z } from "zod";
26
+ import {
27
+ enumMandatory,
28
+ enumArrayOptional,
29
+ single_select_mandatory,
30
+ single_select_optional,
31
+ dateMandatory,
32
+ getAllEnums,
33
+ multi_select_optional
34
+ } from "zod/zod_utils";
35
+ import { BaseQuerySchema } from "zod/zod_base_schema";
61
36
 
62
37
  // src/core/Enums.ts
63
38
  var Status = /* @__PURE__ */ ((Status2) => {
@@ -79,32 +54,32 @@ var ENDPOINTS = {
79
54
  update: (id) => `${URL}/${id}`,
80
55
  delete: (id) => `${URL}/${id}`
81
56
  };
82
- var GPSGeofenceTransactionSchema = import_zod.z.object({
83
- organisation_id: (0, import_zod_utils.single_select_mandatory)("Organisation ID"),
84
- vehicle_id: (0, import_zod_utils.single_select_mandatory)("Master Vehicle ID"),
85
- gps_geofence_id: (0, import_zod_utils.single_select_mandatory)("GPS Geofence ID"),
86
- driver_id: (0, import_zod_utils.single_select_optional)("Driver ID"),
87
- geofence_status_type: (0, import_zod_utils.enumMandatory)(
57
+ var GPSGeofenceTransactionSchema = z.object({
58
+ organisation_id: single_select_mandatory("Organisation ID"),
59
+ vehicle_id: single_select_mandatory("Master Vehicle ID"),
60
+ gps_geofence_id: single_select_mandatory("GPS Geofence ID"),
61
+ driver_id: single_select_optional("Driver ID"),
62
+ geofence_status_type: enumMandatory(
88
63
  "Geofence Status Type",
89
64
  GeofenceStatusType,
90
65
  "Enter" /* Enter */
91
66
  ),
92
- geofence_time: (0, import_zod_utils.dateMandatory)("Geofence Time"),
93
- status: (0, import_zod_utils.enumMandatory)("Status", Status, "Active" /* Active */)
67
+ geofence_time: dateMandatory("Geofence Time"),
68
+ status: enumMandatory("Status", Status, "Active" /* Active */)
94
69
  });
95
- var GPSGeofenceTransactionQuerySchema = import_zod_base_schema.BaseQuerySchema.extend({
96
- organisation_ids: (0, import_zod_utils.multi_select_optional)("User Organisation IDs"),
70
+ var GPSGeofenceTransactionQuerySchema = BaseQuerySchema.extend({
71
+ organisation_ids: multi_select_optional("User Organisation IDs"),
97
72
  // ✅ Multi-selection -> UserOrganisation
98
- vehicle_ids: (0, import_zod_utils.multi_select_optional)("Master Vehicle IDs"),
73
+ vehicle_ids: multi_select_optional("Master Vehicle IDs"),
99
74
  // ✅ Multi-selection -> Master Vehicle
100
- driver_ids: (0, import_zod_utils.multi_select_optional)("Master Driver IDs"),
75
+ driver_ids: multi_select_optional("Master Driver IDs"),
101
76
  // ✅ Multi-selection -> Master Driver
102
- gps_geofence_ids: (0, import_zod_utils.multi_select_optional)("Gps Geofence IDs"),
77
+ gps_geofence_ids: multi_select_optional("Gps Geofence IDs"),
103
78
  // ✅ Multi-selection -> Gps Geofence
104
- geofence_status_type: (0, import_zod_utils.enumArrayOptional)(
79
+ geofence_status_type: enumArrayOptional(
105
80
  "Geofence Status Type",
106
81
  GeofenceStatusType,
107
- (0, import_zod_utils.getAllEnums)(GeofenceStatusType)
82
+ getAllEnums(GeofenceStatusType)
108
83
  )
109
84
  });
110
85
  var toGPSGeofenceTransactionPayload = (data) => ({
@@ -137,8 +112,7 @@ var updateGPSGeofenceTransaction = async (id, data) => {
137
112
  var deleteGPSGeofenceTransaction = async (id) => {
138
113
  return apiDelete(ENDPOINTS.delete(id));
139
114
  };
140
- // Annotate the CommonJS export names for ESM import in node:
141
- 0 && (module.exports = {
115
+ export {
142
116
  GPSGeofenceTransactionQuerySchema,
143
117
  GPSGeofenceTransactionSchema,
144
118
  createGPSGeofenceTransaction,
@@ -147,4 +121,4 @@ var deleteGPSGeofenceTransaction = async (id) => {
147
121
  newGPSGeofenceTransactionPayload,
148
122
  toGPSGeofenceTransactionPayload,
149
123
  updateGPSGeofenceTransaction
150
- });
124
+ };
@@ -40,22 +40,22 @@ declare const GPSGeofenceTransactionSummarySchema: z.ZodObject<{
40
40
  duration_seconds: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
41
41
  status: z.ZodType<Status, z.ZodTypeDef, Status>;
42
42
  }, "strip", z.ZodTypeAny, {
43
- gps_geofence_id: string;
44
43
  status: Status;
45
44
  organisation_id: string;
46
- driver_id: string;
47
45
  vehicle_id: string;
46
+ driver_id: string;
47
+ gps_geofence_id: string;
48
48
  geofence_enter_date_time: string;
49
49
  geofence_exit_date_time: string;
50
50
  duration_seconds: number;
51
51
  enter_gps_geofence_transaction_id: string;
52
52
  exit_gps_geofence_transaction_id: string;
53
53
  }, {
54
- gps_geofence_id: string;
55
54
  status: Status;
56
55
  organisation_id: string;
57
- driver_id: string;
58
56
  vehicle_id: string;
57
+ driver_id: string;
58
+ gps_geofence_id: string;
59
59
  geofence_enter_date_time: string;
60
60
  enter_gps_geofence_transaction_id: string;
61
61
  exit_gps_geofence_transaction_id: string;