vms-nest-prisma-api-document 229.0.0 → 240.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 +18 -1
- package/dist/core/Enums.js +23 -0
- package/dist/services/account/analytics/user_login_analytics_service.d.ts +3 -3
- package/dist/services/account/analytics/user_page_analytics_service.d.ts +1 -1
- package/dist/services/account/bookmark_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/bus_mangement/bus_stop.d.ts +13 -248
- package/dist/services/fleet/bus_mangement/bus_stop.js +9 -7
- package/dist/services/fleet/bus_mangement/calender.d.ts +6 -2
- package/dist/services/fleet/bus_mangement/calender.js +18 -12
- package/dist/services/fleet/bus_mangement/master_route.d.ts +251 -4
- package/dist/services/fleet/bus_mangement/master_route.js +58 -52
- package/dist/services/fleet/bus_mangement/notice_board.d.ts +6 -2
- package/dist/services/fleet/bus_mangement/notice_board.js +17 -11
- package/dist/services/fleet/bus_mangement/student.d.ts +40 -27
- package/dist/services/fleet/bus_mangement/student.js +130 -105
- package/dist/services/fleet/fuel_management/fleet_fuel_daily_summary_service.d.ts +20 -20
- package/dist/services/fleet/fuel_management/fleet_fuel_refill_service.d.ts +58 -58
- package/dist/services/fleet/fuel_management/fleet_fuel_removal_service.d.ts +30 -30
- package/dist/services/fleet/incident_management/incident_management_service.d.ts +1 -1
- package/dist/services/fleet/inspection_management/fleet_inspection_form_service.d.ts +16 -0
- package/dist/services/fleet/inspection_management/fleet_inspection_form_service.js +308 -0
- package/dist/services/fleet/inspection_management/fleet_inspection_management_service.d.ts +16 -0
- package/dist/services/fleet/inspection_management/fleet_inspection_management_service.js +501 -0
- package/dist/services/fleet/inspection_management/fleet_inspection_schedule_service.d.ts +697 -0
- package/dist/services/fleet/inspection_management/fleet_inspection_schedule_service.js +340 -0
- package/dist/services/fleet/issue_management/issue_management_service.d.ts +48 -48
- package/dist/services/fleet/service_management/fleet_service_management_service.d.ts +185 -52
- package/dist/services/fleet/service_management/fleet_service_management_service.js +86 -11
- package/dist/services/fleet/service_management/fleet_service_schedule_service.d.ts +166 -0
- package/dist/services/fleet/service_management/fleet_service_schedule_service.js +338 -0
- package/dist/services/fleet/vendor_management/fleet_vendor_fuel_station.d.ts +1 -1
- package/dist/services/fleet/vendor_management/fleet_vendor_service.d.ts +1 -1
- package/dist/services/fleet/vendor_management/fleet_vendor_service_center.d.ts +1 -1
- 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 +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 +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/main/vehicle/master_vehicle_service.js +13 -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/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 +4 -4
- 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_eway_bill_provider_service.d.ts +2 -2
- package/dist/services/master/main/master_main_fasttag_bank_service.d.ts +2 -2
- 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/services/website/contact_us_detail_service.d.ts +1 -1
- package/dist/services/website/faq_service.d.ts +1 -1
- package/dist/{user_organisation_service-KwfWBPXf.d.ts → user_organisation_service-BZaeiu6L.d.ts} +4 -1
- package/package.json +1 -1
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
// src/core/sdk-config.ts
|
|
2
|
+
var KEY = "__vms_axios_instance__";
|
|
3
|
+
var getAxiosInstance = () => {
|
|
4
|
+
const instance = globalThis[KEY];
|
|
5
|
+
if (!instance) {
|
|
6
|
+
throw new Error("\u274C Axios instance not configured. Call setAxiosInstance() first.");
|
|
7
|
+
}
|
|
8
|
+
return instance;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// src/core/apiCall.ts
|
|
12
|
+
var apiPost = async (url, data) => {
|
|
13
|
+
const response = await getAxiosInstance().post(url, data);
|
|
14
|
+
return response.data;
|
|
15
|
+
};
|
|
16
|
+
var apiPatch = async (url, data) => {
|
|
17
|
+
const response = await getAxiosInstance().patch(url, data);
|
|
18
|
+
return response.data;
|
|
19
|
+
};
|
|
20
|
+
var apiDelete = async (url) => {
|
|
21
|
+
const response = await getAxiosInstance().delete(url);
|
|
22
|
+
return response.data;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
// src/services/fleet/inspection_management/fleet_inspection_schedule_service.ts
|
|
26
|
+
import { z as z3 } from "zod";
|
|
27
|
+
|
|
28
|
+
// src/zod_utils/zod_utils.ts
|
|
29
|
+
import { z } from "zod";
|
|
30
|
+
|
|
31
|
+
// src/core/BaseResponse.ts
|
|
32
|
+
var r_log = (data = {}) => {
|
|
33
|
+
return data;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// src/zod_utils/zod_utils.ts
|
|
37
|
+
var handleNullOrUndefined = (value) => typeof value === "string" ? value : "";
|
|
38
|
+
var stringMandatory = (fieldName, min = 1, max = 100) => {
|
|
39
|
+
const schema = z.string().trim().min(min, `${fieldName} must be at least ${min} characters.`).max(max, `${fieldName} must be at most ${max} characters.`).nonempty(`${fieldName} is required.`).transform(handleNullOrUndefined);
|
|
40
|
+
return schema;
|
|
41
|
+
};
|
|
42
|
+
var stringOptional = (fieldName, min = 0, max = 255, defaultValue = "") => {
|
|
43
|
+
const schema = z.string().trim().min(min, `${fieldName} must be at least ${min} characters.`).max(max, `${fieldName} must be at most ${max} characters.`).transform(handleNullOrUndefined).default(defaultValue);
|
|
44
|
+
return schema;
|
|
45
|
+
};
|
|
46
|
+
var stringArrayOptional = (fieldName, min = 0, max = 100, defaultValue = [], unique = false) => {
|
|
47
|
+
const schema = z.array(z.string().trim(), {
|
|
48
|
+
invalid_type_error: `${fieldName} must be an array of strings.`
|
|
49
|
+
}).min(min, `${fieldName} must contain at least ${min} items.`).max(max, `${fieldName} must contain at most ${max} items.`);
|
|
50
|
+
if (unique) {
|
|
51
|
+
schema.refine(
|
|
52
|
+
(arr) => new Set(arr).size === arr.length,
|
|
53
|
+
`${fieldName} must contain unique values.`
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
return schema.optional().default(defaultValue);
|
|
57
|
+
};
|
|
58
|
+
var numberOptional = (fieldName, min = 0, max = 1e14, defaultValue = 0) => {
|
|
59
|
+
return z.preprocess(
|
|
60
|
+
(val) => typeof val === "string" && val.trim() !== "" ? Number(val) : val,
|
|
61
|
+
z.number({ invalid_type_error: `${fieldName} must be a number.` }).min(min, `${fieldName} must be at least ${min}.`).max(max, `${fieldName} must be at most ${max}.`).optional().default(defaultValue)
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
var enumMandatory = (fieldName, enumType, defaultValue) => {
|
|
65
|
+
return z.union([
|
|
66
|
+
z.nativeEnum(enumType, {
|
|
67
|
+
invalid_type_error: `${fieldName} should be one of the following values: ${Object.values(
|
|
68
|
+
enumType
|
|
69
|
+
).join(", ")}.`
|
|
70
|
+
}),
|
|
71
|
+
z.string().refine((val) => Object.values(enumType).includes(val), {
|
|
72
|
+
message: `${fieldName} should be one of the following values: ${Object.values(
|
|
73
|
+
enumType
|
|
74
|
+
).join(", ")}.`
|
|
75
|
+
})
|
|
76
|
+
]).default(defaultValue).refine((val) => val !== "", {
|
|
77
|
+
message: `Please select ${fieldName}.`
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
var enumOptional = (fieldName, enumType, defaultValue) => {
|
|
81
|
+
return z.nativeEnum(enumType, {
|
|
82
|
+
invalid_type_error: `${fieldName} must be an array containing only the following values: ${Object.values(
|
|
83
|
+
enumType
|
|
84
|
+
).join(", ")}.`
|
|
85
|
+
}).optional().default(() => defaultValue);
|
|
86
|
+
};
|
|
87
|
+
var getAllEnums = (enumType) => {
|
|
88
|
+
return Object.values(enumType);
|
|
89
|
+
};
|
|
90
|
+
var enumArrayOptional = (fieldName, enumType, defaultValue = getAllEnums(enumType), min = 0, max = 100, unique = false) => {
|
|
91
|
+
const schema = z.array(z.nativeEnum(enumType), {
|
|
92
|
+
invalid_type_error: `${fieldName} must be an array containing only the following values: ${Object.values(
|
|
93
|
+
enumType
|
|
94
|
+
).join(", ")}.`
|
|
95
|
+
}).min(min, `${fieldName} must contain at least ${min} items.`).max(max, `${fieldName} must contain at most ${max} items.`);
|
|
96
|
+
if (unique) {
|
|
97
|
+
schema.refine(
|
|
98
|
+
(arr) => new Set(arr).size === arr.length,
|
|
99
|
+
`${fieldName} must contain unique values.`
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
return schema.optional().default(() => defaultValue);
|
|
103
|
+
};
|
|
104
|
+
var dateOptional = (fieldName, minDate, maxDate, defaultValue = (/* @__PURE__ */ new Date()).toISOString()) => {
|
|
105
|
+
const schema = z.string().refine((val) => !isNaN(Date.parse(val)), {
|
|
106
|
+
message: `${fieldName} must be a valid ISO date.`
|
|
107
|
+
}).optional().default(defaultValue);
|
|
108
|
+
if (minDate) {
|
|
109
|
+
schema.refine((val) => new Date(val) >= new Date(minDate), {
|
|
110
|
+
message: `${fieldName} must be after ${minDate}.`
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
if (maxDate) {
|
|
114
|
+
schema.refine((val) => new Date(val) <= new Date(maxDate), {
|
|
115
|
+
message: `${fieldName} must be before ${maxDate}.`
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
return schema;
|
|
119
|
+
};
|
|
120
|
+
var dynamicJsonSchema = (fieldName, defaultValue = {}) => z.record(z.any()).optional().default(() => defaultValue);
|
|
121
|
+
var single_select_mandatory = (fieldName) => {
|
|
122
|
+
const schema = z.string().trim().nonempty(`Please select ${fieldName}.`).transform(handleNullOrUndefined);
|
|
123
|
+
return schema;
|
|
124
|
+
};
|
|
125
|
+
var single_select_optional = (fieldName) => {
|
|
126
|
+
r_log(fieldName);
|
|
127
|
+
const schema = z.string().trim().transform(handleNullOrUndefined);
|
|
128
|
+
return schema;
|
|
129
|
+
};
|
|
130
|
+
var multi_select_optional = (fieldName, max = 1e3, defaultValue = []) => {
|
|
131
|
+
const schema = z.array(
|
|
132
|
+
z.string({
|
|
133
|
+
invalid_type_error: `${fieldName} must be an array of strings.`
|
|
134
|
+
})
|
|
135
|
+
).max(
|
|
136
|
+
max,
|
|
137
|
+
`Please select at most ${max} ${fieldName}${max > 1 ? "s" : ""}.`
|
|
138
|
+
);
|
|
139
|
+
return schema.optional().default(defaultValue);
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
// src/zod_utils/zod_base_schema.ts
|
|
143
|
+
import { z as z2 } from "zod";
|
|
144
|
+
|
|
145
|
+
// src/core/Enums.ts
|
|
146
|
+
var PAGING = /* @__PURE__ */ ((PAGING2) => {
|
|
147
|
+
PAGING2["Yes"] = "Yes";
|
|
148
|
+
PAGING2["No"] = "No";
|
|
149
|
+
return PAGING2;
|
|
150
|
+
})(PAGING || {});
|
|
151
|
+
var LoadParents = /* @__PURE__ */ ((LoadParents2) => {
|
|
152
|
+
LoadParents2["Yes"] = "Yes";
|
|
153
|
+
LoadParents2["No"] = "No";
|
|
154
|
+
LoadParents2["Custom"] = "Custom";
|
|
155
|
+
return LoadParents2;
|
|
156
|
+
})(LoadParents || {});
|
|
157
|
+
var LoadChild = /* @__PURE__ */ ((LoadChild2) => {
|
|
158
|
+
LoadChild2["No"] = "No";
|
|
159
|
+
LoadChild2["Yes"] = "Yes";
|
|
160
|
+
LoadChild2["Count"] = "Count";
|
|
161
|
+
LoadChild2["Custom"] = "Custom";
|
|
162
|
+
LoadChild2["Direct"] = "Direct";
|
|
163
|
+
return LoadChild2;
|
|
164
|
+
})(LoadChild || {});
|
|
165
|
+
var LoadChildCount = /* @__PURE__ */ ((LoadChildCount2) => {
|
|
166
|
+
LoadChildCount2["No"] = "No";
|
|
167
|
+
LoadChildCount2["Yes"] = "Yes";
|
|
168
|
+
LoadChildCount2["Custom"] = "Custom";
|
|
169
|
+
return LoadChildCount2;
|
|
170
|
+
})(LoadChildCount || {});
|
|
171
|
+
var OrderBy = /* @__PURE__ */ ((OrderBy2) => {
|
|
172
|
+
OrderBy2["asc"] = "asc";
|
|
173
|
+
OrderBy2["desc"] = "desc";
|
|
174
|
+
return OrderBy2;
|
|
175
|
+
})(OrderBy || {});
|
|
176
|
+
var LoginFrom = /* @__PURE__ */ ((LoginFrom2) => {
|
|
177
|
+
LoginFrom2["Web"] = "Web";
|
|
178
|
+
LoginFrom2["Android"] = "Android";
|
|
179
|
+
LoginFrom2["IPhone"] = "IPhone";
|
|
180
|
+
LoginFrom2["AndroidPWA"] = "AndroidPWA";
|
|
181
|
+
LoginFrom2["iOSPWA"] = "iOSPWA";
|
|
182
|
+
return LoginFrom2;
|
|
183
|
+
})(LoginFrom || {});
|
|
184
|
+
var Status = /* @__PURE__ */ ((Status2) => {
|
|
185
|
+
Status2["Active"] = "Active";
|
|
186
|
+
Status2["Inactive"] = "Inactive";
|
|
187
|
+
return Status2;
|
|
188
|
+
})(Status || {});
|
|
189
|
+
var FileType = /* @__PURE__ */ ((FileType2) => {
|
|
190
|
+
FileType2["NoFile"] = "NoFile";
|
|
191
|
+
FileType2["Image"] = "Image";
|
|
192
|
+
FileType2["Video"] = "Video";
|
|
193
|
+
FileType2["PDF"] = "PDF";
|
|
194
|
+
return FileType2;
|
|
195
|
+
})(FileType || {});
|
|
196
|
+
var YesNo = /* @__PURE__ */ ((YesNo2) => {
|
|
197
|
+
YesNo2["Yes"] = "Yes";
|
|
198
|
+
YesNo2["No"] = "No";
|
|
199
|
+
return YesNo2;
|
|
200
|
+
})(YesNo || {});
|
|
201
|
+
|
|
202
|
+
// src/zod_utils/zod_base_schema.ts
|
|
203
|
+
var OrderBySchema = z2.array(
|
|
204
|
+
z2.object({
|
|
205
|
+
name: stringMandatory("Order Field Name", 0, 255),
|
|
206
|
+
field: stringMandatory("Order Field Name", 0, 255),
|
|
207
|
+
direction: enumMandatory("Order Direction", OrderBy, "asc" /* asc */)
|
|
208
|
+
})
|
|
209
|
+
);
|
|
210
|
+
var BaseFileSchema = z2.object({
|
|
211
|
+
usage_type: stringMandatory("Usage Type", 3, 100),
|
|
212
|
+
file_type: enumMandatory("File Type", FileType, "Image" /* Image */),
|
|
213
|
+
file_url: stringOptional("File URL", 0, 300),
|
|
214
|
+
file_key: stringOptional("File Key", 0, 300),
|
|
215
|
+
file_name: stringOptional("File Name", 0, 300),
|
|
216
|
+
file_description: stringOptional("File Description", 0, 2e3),
|
|
217
|
+
file_size: numberOptional("File Size"),
|
|
218
|
+
file_metadata: dynamicJsonSchema("File Metadata", {}),
|
|
219
|
+
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
220
|
+
});
|
|
221
|
+
var BaseQuerySchema = z2.object({
|
|
222
|
+
search: stringOptional("Search", 0, 255, ""),
|
|
223
|
+
status: enumArrayOptional("Status", Status, getAllEnums(Status), 0, 10, true),
|
|
224
|
+
paging: enumOptional("Paging", PAGING, "Yes" /* Yes */),
|
|
225
|
+
page_count: numberOptional("Page Count", 0, 1e3, 100),
|
|
226
|
+
page_index: numberOptional("Page Index", 0, 1e3, 0),
|
|
227
|
+
load_parents: enumOptional("Load Parents", LoadParents, "No" /* No */),
|
|
228
|
+
load_parents_list: stringArrayOptional("Load Parents List"),
|
|
229
|
+
load_child: enumOptional("Load Child", LoadChild, "No" /* No */),
|
|
230
|
+
load_child_list: stringArrayOptional("Load Child List"),
|
|
231
|
+
load_child_count: enumOptional(
|
|
232
|
+
"Load Child",
|
|
233
|
+
LoadChildCount,
|
|
234
|
+
"No" /* No */
|
|
235
|
+
),
|
|
236
|
+
load_child_count_list: stringArrayOptional("Load Child List"),
|
|
237
|
+
include_details: dynamicJsonSchema("Include Details", {}),
|
|
238
|
+
where_relations: dynamicJsonSchema("Where Relations", {}),
|
|
239
|
+
order_by: OrderBySchema.optional().default([]),
|
|
240
|
+
include_master_data: enumOptional("Include Master Data", YesNo, "No" /* No */),
|
|
241
|
+
date_format_id: single_select_optional("MasterMainDateFormat"),
|
|
242
|
+
time_zone_id: single_select_optional("MasterMainTimeZone")
|
|
243
|
+
});
|
|
244
|
+
var FilePresignedUrlSchema = z2.object({
|
|
245
|
+
file_name: stringMandatory("File Name", 1, 255),
|
|
246
|
+
file_type: enumMandatory("File Type", FileType, "Image" /* Image */)
|
|
247
|
+
});
|
|
248
|
+
var MongoBaseQuerySchema = z2.object({
|
|
249
|
+
search: stringOptional("Search", 0, 255, ""),
|
|
250
|
+
paging: enumOptional("Paging", PAGING, "Yes" /* Yes */),
|
|
251
|
+
page_count: numberOptional("Page Count", 0, 1e3, 100),
|
|
252
|
+
page_index: numberOptional("Page Index", 0, 1e3, 0),
|
|
253
|
+
login_from: enumMandatory("Login From", LoginFrom, "Web" /* Web */),
|
|
254
|
+
date_format_id: single_select_optional("MasterMainDateFormat"),
|
|
255
|
+
// ✅ Single-selection -> MasterMainDateFormat
|
|
256
|
+
time_zone_id: single_select_optional("MasterMainTimeZone")
|
|
257
|
+
// ✅ Single-selection -> MasterMainTimeZone
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
// src/services/fleet/inspection_management/fleet_inspection_schedule_service.ts
|
|
261
|
+
var URL = "fleet/inspection_management/inspection_schedule";
|
|
262
|
+
var ENDPOINTS = {
|
|
263
|
+
find: `${URL}/search`,
|
|
264
|
+
create: `${URL}`,
|
|
265
|
+
update: (id) => `${URL}/${id}`,
|
|
266
|
+
delete: (id) => `${URL}/${id}`
|
|
267
|
+
};
|
|
268
|
+
var FleetInspectionScheduleSchema = z3.object({
|
|
269
|
+
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
270
|
+
// ✅ Single-Selection -> UserOrganisation
|
|
271
|
+
user_id: single_select_mandatory("User"),
|
|
272
|
+
// ✅ Single-Selection -> User
|
|
273
|
+
inspection_schedule_name: stringMandatory("Inspection Schedule Name", 0, 100),
|
|
274
|
+
inspection_schedule_description: stringOptional(
|
|
275
|
+
"Inspection Schedule Description",
|
|
276
|
+
0,
|
|
277
|
+
2e3
|
|
278
|
+
),
|
|
279
|
+
inspection_schedule_start_date: dateOptional(
|
|
280
|
+
"Inspection Schedule Start Date"
|
|
281
|
+
),
|
|
282
|
+
inspection_schedule_due_date: dateOptional("Inspection Schedule Due Date"),
|
|
283
|
+
vehicle_ids: multi_select_optional("MasterVehicle"),
|
|
284
|
+
// Multi selection -> MasterVehicle
|
|
285
|
+
// Other
|
|
286
|
+
status: enumMandatory("Status", Status, "Active" /* Active */),
|
|
287
|
+
time_zone_id: single_select_mandatory("MasterMainTimeZone")
|
|
288
|
+
});
|
|
289
|
+
var FleetInspectionScheduleQuerySchema = BaseQuerySchema.extend({
|
|
290
|
+
inspection_schedule_ids: multi_select_optional("FleetInspectionSchedule"),
|
|
291
|
+
// ✅ Multi-Selection -> FleetInspectionSchedule
|
|
292
|
+
organisation_ids: multi_select_optional("UserOrganisation")
|
|
293
|
+
// ✅ Multi-Selection -> UserOrganisation
|
|
294
|
+
});
|
|
295
|
+
var toFleetInspectionSchedulePayload = (row) => ({
|
|
296
|
+
organisation_id: row.organisation_id || "",
|
|
297
|
+
user_id: row.user_id || "",
|
|
298
|
+
inspection_schedule_name: row.inspection_schedule_name || "",
|
|
299
|
+
inspection_schedule_description: row.inspection_schedule_description || "",
|
|
300
|
+
inspection_schedule_start_date: row.inspection_schedule_start_date || "",
|
|
301
|
+
inspection_schedule_due_date: row.inspection_schedule_due_date || "",
|
|
302
|
+
vehicle_ids: row.FleetInspectionScheduleVehicleLink?.map((v) => v.vehicle_id) ?? [],
|
|
303
|
+
status: "Active" /* Active */,
|
|
304
|
+
time_zone_id: ""
|
|
305
|
+
// Needs to be provided manually
|
|
306
|
+
});
|
|
307
|
+
var newFleetInspectionSchedulePayload = () => ({
|
|
308
|
+
organisation_id: "",
|
|
309
|
+
user_id: "",
|
|
310
|
+
inspection_schedule_name: "",
|
|
311
|
+
inspection_schedule_description: "",
|
|
312
|
+
inspection_schedule_start_date: "",
|
|
313
|
+
inspection_schedule_due_date: "",
|
|
314
|
+
vehicle_ids: [],
|
|
315
|
+
status: "Active" /* Active */,
|
|
316
|
+
time_zone_id: ""
|
|
317
|
+
// Needs to be provided manually
|
|
318
|
+
});
|
|
319
|
+
var findFleetInspectionSchedule = async (data) => {
|
|
320
|
+
return apiPost(ENDPOINTS.find, data);
|
|
321
|
+
};
|
|
322
|
+
var createFleetInspectionSchedule = async (data) => {
|
|
323
|
+
return apiPost(ENDPOINTS.create, data);
|
|
324
|
+
};
|
|
325
|
+
var updateFleetInspectionSchedule = async (id, data) => {
|
|
326
|
+
return apiPatch(ENDPOINTS.update(id), data);
|
|
327
|
+
};
|
|
328
|
+
var deleteFleetInspectionSchedule = async (id) => {
|
|
329
|
+
return apiDelete(ENDPOINTS.delete(id));
|
|
330
|
+
};
|
|
331
|
+
export {
|
|
332
|
+
FleetInspectionScheduleQuerySchema,
|
|
333
|
+
FleetInspectionScheduleSchema,
|
|
334
|
+
createFleetInspectionSchedule,
|
|
335
|
+
deleteFleetInspectionSchedule,
|
|
336
|
+
findFleetInspectionSchedule,
|
|
337
|
+
newFleetInspectionSchedulePayload,
|
|
338
|
+
toFleetInspectionSchedulePayload,
|
|
339
|
+
updateFleetInspectionSchedule
|
|
340
|
+
};
|
|
@@ -2,7 +2,7 @@ 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-BZaeiu6L.js';
|
|
6
6
|
import { FleetIncidentManagement } from '../incident_management/incident_management_service.js';
|
|
7
7
|
import { FleetServiceManagement } from '../service_management/fleet_service_management_service.js';
|
|
8
8
|
import '../../master/main/master_main_sim_provider_service.js';
|
|
@@ -109,7 +109,6 @@ declare const FleetIssueManagementFileSchema: z.ZodObject<{
|
|
|
109
109
|
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
110
110
|
vehicle_issue_id: z.ZodEffects<z.ZodString, string, string>;
|
|
111
111
|
}, "strip", z.ZodTypeAny, {
|
|
112
|
-
vehicle_issue_id: string;
|
|
113
112
|
status: Status;
|
|
114
113
|
organisation_id: string;
|
|
115
114
|
usage_type: string;
|
|
@@ -120,12 +119,13 @@ declare const FleetIssueManagementFileSchema: z.ZodObject<{
|
|
|
120
119
|
file_description: string;
|
|
121
120
|
file_size: number;
|
|
122
121
|
file_metadata: Record<string, any>;
|
|
123
|
-
}, {
|
|
124
122
|
vehicle_issue_id: string;
|
|
123
|
+
}, {
|
|
125
124
|
status: Status;
|
|
126
125
|
organisation_id: string;
|
|
127
126
|
usage_type: string;
|
|
128
127
|
file_type: FileType;
|
|
128
|
+
vehicle_issue_id: string;
|
|
129
129
|
file_url?: string | undefined;
|
|
130
130
|
file_key?: string | undefined;
|
|
131
131
|
file_name?: string | undefined;
|
|
@@ -169,7 +169,6 @@ declare const FleetIssueManagementSchema: z.ZodObject<{
|
|
|
169
169
|
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
170
170
|
vehicle_issue_id: z.ZodEffects<z.ZodString, string, string>;
|
|
171
171
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
172
|
-
vehicle_issue_id: string;
|
|
173
172
|
status: Status;
|
|
174
173
|
organisation_id: string;
|
|
175
174
|
usage_type: string;
|
|
@@ -180,12 +179,13 @@ declare const FleetIssueManagementSchema: z.ZodObject<{
|
|
|
180
179
|
file_description: string;
|
|
181
180
|
file_size: number;
|
|
182
181
|
file_metadata: Record<string, any>;
|
|
183
|
-
}, {
|
|
184
182
|
vehicle_issue_id: string;
|
|
183
|
+
}, {
|
|
185
184
|
status: Status;
|
|
186
185
|
organisation_id: string;
|
|
187
186
|
usage_type: string;
|
|
188
187
|
file_type: FileType;
|
|
188
|
+
vehicle_issue_id: string;
|
|
189
189
|
file_url?: string | undefined;
|
|
190
190
|
file_key?: string | undefined;
|
|
191
191
|
file_name?: string | undefined;
|
|
@@ -194,6 +194,15 @@ declare const FleetIssueManagementSchema: z.ZodObject<{
|
|
|
194
194
|
file_metadata?: Record<string, any> | undefined;
|
|
195
195
|
}>, "many">>>;
|
|
196
196
|
}, "strip", z.ZodTypeAny, {
|
|
197
|
+
status: Status;
|
|
198
|
+
organisation_id: string;
|
|
199
|
+
time_zone_id: string;
|
|
200
|
+
driver_id: string;
|
|
201
|
+
vehicle_id: string;
|
|
202
|
+
user_id: string;
|
|
203
|
+
odometer_reading: number;
|
|
204
|
+
vehicle_incident_id: string;
|
|
205
|
+
service_management_id: string;
|
|
197
206
|
issue_title: string;
|
|
198
207
|
issue_description: string;
|
|
199
208
|
issue_status: IssueStatus;
|
|
@@ -201,21 +210,11 @@ declare const FleetIssueManagementSchema: z.ZodObject<{
|
|
|
201
210
|
issue_severity: IssueSeverity;
|
|
202
211
|
report_date: string;
|
|
203
212
|
resolved_date: string;
|
|
204
|
-
odometer_reading: number;
|
|
205
213
|
due_date: string;
|
|
206
214
|
due_odometer_reading: number;
|
|
207
215
|
issue_source: IssueSource;
|
|
208
|
-
status: Status;
|
|
209
|
-
organisation_id: string;
|
|
210
|
-
user_id: string;
|
|
211
|
-
vehicle_id: string;
|
|
212
|
-
driver_id: string;
|
|
213
|
-
vehicle_incident_id: string;
|
|
214
216
|
inspection_id: string;
|
|
215
|
-
service_management_id: string;
|
|
216
|
-
time_zone_id: string;
|
|
217
217
|
FleetIssueManagementFileSchema: {
|
|
218
|
-
vehicle_issue_id: string;
|
|
219
218
|
status: Status;
|
|
220
219
|
organisation_id: string;
|
|
221
220
|
usage_type: string;
|
|
@@ -226,34 +225,35 @@ declare const FleetIssueManagementSchema: z.ZodObject<{
|
|
|
226
225
|
file_description: string;
|
|
227
226
|
file_size: number;
|
|
228
227
|
file_metadata: Record<string, any>;
|
|
228
|
+
vehicle_issue_id: string;
|
|
229
229
|
}[];
|
|
230
230
|
}, {
|
|
231
|
+
status: Status;
|
|
232
|
+
organisation_id: string;
|
|
233
|
+
time_zone_id: string;
|
|
234
|
+
driver_id: string;
|
|
235
|
+
vehicle_id: string;
|
|
236
|
+
user_id: string;
|
|
237
|
+
vehicle_incident_id: string;
|
|
238
|
+
service_management_id: string;
|
|
231
239
|
issue_title: string;
|
|
232
240
|
issue_status: IssueStatus;
|
|
233
241
|
issue_priority: Priority;
|
|
234
242
|
issue_severity: IssueSeverity;
|
|
235
243
|
report_date: string;
|
|
236
244
|
issue_source: IssueSource;
|
|
237
|
-
status: Status;
|
|
238
|
-
organisation_id: string;
|
|
239
|
-
user_id: string;
|
|
240
|
-
vehicle_id: string;
|
|
241
|
-
driver_id: string;
|
|
242
|
-
vehicle_incident_id: string;
|
|
243
245
|
inspection_id: string;
|
|
244
|
-
|
|
245
|
-
time_zone_id: string;
|
|
246
|
+
odometer_reading?: unknown;
|
|
246
247
|
issue_description?: string | undefined;
|
|
247
248
|
resolved_date?: string | undefined;
|
|
248
|
-
odometer_reading?: unknown;
|
|
249
249
|
due_date?: string | undefined;
|
|
250
250
|
due_odometer_reading?: unknown;
|
|
251
251
|
FleetIssueManagementFileSchema?: {
|
|
252
|
-
vehicle_issue_id: string;
|
|
253
252
|
status: Status;
|
|
254
253
|
organisation_id: string;
|
|
255
254
|
usage_type: string;
|
|
256
255
|
file_type: FileType;
|
|
256
|
+
vehicle_issue_id: string;
|
|
257
257
|
file_url?: string | undefined;
|
|
258
258
|
file_key?: string | undefined;
|
|
259
259
|
file_name?: string | undefined;
|
|
@@ -309,12 +309,7 @@ declare const FleetIssueManagementQuerySchema: z.ZodObject<{
|
|
|
309
309
|
from_date: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
310
310
|
to_date: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
311
311
|
}, "strip", z.ZodTypeAny, {
|
|
312
|
-
issue_status: IssueStatus[];
|
|
313
|
-
issue_priority: Priority[];
|
|
314
|
-
issue_severity: IssueSeverity[];
|
|
315
|
-
issue_source: IssueSource[];
|
|
316
312
|
status: Status[];
|
|
317
|
-
time_zone_id: string;
|
|
318
313
|
search: string;
|
|
319
314
|
paging: PAGING;
|
|
320
315
|
page_count: number;
|
|
@@ -334,25 +329,26 @@ declare const FleetIssueManagementQuerySchema: z.ZodObject<{
|
|
|
334
329
|
}[];
|
|
335
330
|
include_master_data: YesNo;
|
|
336
331
|
date_format_id: string;
|
|
337
|
-
|
|
332
|
+
time_zone_id: string;
|
|
338
333
|
organisation_ids: string[];
|
|
339
|
-
user_ids: string[];
|
|
340
334
|
vehicle_ids: string[];
|
|
341
335
|
driver_ids: string[];
|
|
336
|
+
user_ids: string[];
|
|
342
337
|
vehicle_incident_ids: string[];
|
|
343
|
-
inspection_ids: string[];
|
|
344
|
-
service_management_ids: string[];
|
|
345
338
|
from_date: string;
|
|
346
339
|
to_date: string;
|
|
340
|
+
service_management_ids: string[];
|
|
341
|
+
issue_status: IssueStatus[];
|
|
342
|
+
issue_priority: Priority[];
|
|
343
|
+
issue_severity: IssueSeverity[];
|
|
344
|
+
issue_source: IssueSource[];
|
|
345
|
+
vehicle_issue_ids: string[];
|
|
346
|
+
inspection_ids: string[];
|
|
347
347
|
}, {
|
|
348
|
-
time_zone_id: string;
|
|
349
348
|
date_format_id: string;
|
|
349
|
+
time_zone_id: string;
|
|
350
350
|
from_date: string;
|
|
351
351
|
to_date: string;
|
|
352
|
-
issue_status?: IssueStatus[] | undefined;
|
|
353
|
-
issue_priority?: Priority[] | undefined;
|
|
354
|
-
issue_severity?: IssueSeverity[] | undefined;
|
|
355
|
-
issue_source?: IssueSource[] | undefined;
|
|
356
352
|
status?: Status[] | undefined;
|
|
357
353
|
search?: string | undefined;
|
|
358
354
|
paging?: PAGING | undefined;
|
|
@@ -372,14 +368,18 @@ declare const FleetIssueManagementQuerySchema: z.ZodObject<{
|
|
|
372
368
|
direction: OrderBy;
|
|
373
369
|
}[] | undefined;
|
|
374
370
|
include_master_data?: YesNo | undefined;
|
|
375
|
-
vehicle_issue_ids?: string[] | undefined;
|
|
376
371
|
organisation_ids?: string[] | undefined;
|
|
377
|
-
user_ids?: string[] | undefined;
|
|
378
372
|
vehicle_ids?: string[] | undefined;
|
|
379
373
|
driver_ids?: string[] | undefined;
|
|
374
|
+
user_ids?: string[] | undefined;
|
|
380
375
|
vehicle_incident_ids?: string[] | undefined;
|
|
381
|
-
inspection_ids?: string[] | undefined;
|
|
382
376
|
service_management_ids?: string[] | undefined;
|
|
377
|
+
issue_status?: IssueStatus[] | undefined;
|
|
378
|
+
issue_priority?: Priority[] | undefined;
|
|
379
|
+
issue_severity?: IssueSeverity[] | undefined;
|
|
380
|
+
issue_source?: IssueSource[] | undefined;
|
|
381
|
+
vehicle_issue_ids?: string[] | undefined;
|
|
382
|
+
inspection_ids?: string[] | undefined;
|
|
383
383
|
}>;
|
|
384
384
|
type FleetIssueManagementQueryDTO = z.infer<typeof FleetIssueManagementQuerySchema>;
|
|
385
385
|
declare const FleetIssueManagementCommentSchema: z.ZodObject<{
|
|
@@ -389,15 +389,15 @@ declare const FleetIssueManagementCommentSchema: z.ZodObject<{
|
|
|
389
389
|
comment_description: z.ZodEffects<z.ZodString, string, string>;
|
|
390
390
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
391
391
|
}, "strip", z.ZodTypeAny, {
|
|
392
|
-
vehicle_issue_id: string;
|
|
393
392
|
status: Status;
|
|
394
393
|
organisation_id: string;
|
|
394
|
+
vehicle_issue_id: string;
|
|
395
395
|
comment_text: string;
|
|
396
396
|
comment_description: string;
|
|
397
397
|
}, {
|
|
398
|
-
vehicle_issue_id: string;
|
|
399
398
|
status: Status;
|
|
400
399
|
organisation_id: string;
|
|
400
|
+
vehicle_issue_id: string;
|
|
401
401
|
comment_text: string;
|
|
402
402
|
comment_description: string;
|
|
403
403
|
}>;
|
|
@@ -438,7 +438,6 @@ declare const FleetIssueManagementCommentQuerySchema: z.ZodObject<{
|
|
|
438
438
|
vehicle_issue_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
439
439
|
}, "strip", z.ZodTypeAny, {
|
|
440
440
|
status: Status[];
|
|
441
|
-
time_zone_id: string;
|
|
442
441
|
search: string;
|
|
443
442
|
paging: PAGING;
|
|
444
443
|
page_count: number;
|
|
@@ -458,12 +457,13 @@ declare const FleetIssueManagementCommentQuerySchema: z.ZodObject<{
|
|
|
458
457
|
}[];
|
|
459
458
|
include_master_data: YesNo;
|
|
460
459
|
date_format_id: string;
|
|
461
|
-
|
|
460
|
+
time_zone_id: string;
|
|
462
461
|
organisation_ids: string[];
|
|
462
|
+
vehicle_issue_ids: string[];
|
|
463
463
|
vehicle_issue_comment_ids: string[];
|
|
464
464
|
}, {
|
|
465
|
-
time_zone_id: string;
|
|
466
465
|
date_format_id: string;
|
|
466
|
+
time_zone_id: string;
|
|
467
467
|
status?: Status[] | undefined;
|
|
468
468
|
search?: string | undefined;
|
|
469
469
|
paging?: PAGING | undefined;
|
|
@@ -483,8 +483,8 @@ declare const FleetIssueManagementCommentQuerySchema: z.ZodObject<{
|
|
|
483
483
|
direction: OrderBy;
|
|
484
484
|
}[] | undefined;
|
|
485
485
|
include_master_data?: YesNo | undefined;
|
|
486
|
-
vehicle_issue_ids?: string[] | undefined;
|
|
487
486
|
organisation_ids?: string[] | undefined;
|
|
487
|
+
vehicle_issue_ids?: string[] | undefined;
|
|
488
488
|
vehicle_issue_comment_ids?: string[] | undefined;
|
|
489
489
|
}>;
|
|
490
490
|
type FleetIssueManagementCommentQueryDTO = z.infer<typeof FleetIssueManagementCommentQuerySchema>;
|