vms-nest-prisma-api-document 110.0.0 → 140.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 +34 -1
- package/dist/core/Enums.js +47 -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 +250 -0
- package/dist/services/fleet/bus_mangement/bus_stop.js +453 -0
- package/dist/services/fleet/bus_mangement/calender.d.ts +145 -0
- package/dist/services/fleet/bus_mangement/calender.js +342 -0
- package/dist/services/fleet/bus_mangement/master_route.d.ts +801 -0
- package/dist/services/fleet/bus_mangement/master_route.js +763 -0
- package/dist/services/fleet/bus_mangement/notice_board.d.ts +138 -0
- package/dist/services/fleet/bus_mangement/notice_board.js +329 -0
- package/dist/services/fleet/bus_mangement/student.d.ts +1192 -0
- package/dist/services/fleet/bus_mangement/student.js +948 -0
- package/dist/services/fleet/fuel_management/fleet_fuel_daily_summary_service.d.ts +1 -1
- 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/gps/features/geofence/gps_geofence_service.d.ts +5 -5
- 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/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_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 +8 -1
- package/dist/services/master/bus/master_class_service.d.ts +2 -2
- package/dist/services/master/bus/master_program_service.d.ts +4 -4
- package/dist/services/master/bus/master_relationship_service.d.ts +2 -2
- package/dist/services/master/bus/master_section_service.d.ts +2 -2
- package/dist/services/master/bus/master_semester_service.d.ts +2 -2
- package/dist/services/master/bus/master_stream_service.d.ts +2 -2
- package/dist/services/master/bus/master_year_service.d.ts +2 -2
- 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_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 +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 +3 -3
- 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 +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/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/contact_us_detail_service.d.ts +1 -1
- package/dist/services/website/faq_service.d.ts +1 -1
- package/dist/{user_organisation_service-Dkh1nIGX.d.ts → user_organisation_service-CdoeXDR4.d.ts} +6 -1
- package/package.json +1 -1
|
@@ -0,0 +1,948 @@
|
|
|
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/bus_mangement/student.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 doubleOptionalLatLng = (fieldName, defaultValue = 0) => {
|
|
65
|
+
return z.preprocess(
|
|
66
|
+
(val) => {
|
|
67
|
+
if (typeof val === "string") {
|
|
68
|
+
val = parseFloat(val);
|
|
69
|
+
}
|
|
70
|
+
if (typeof val === "number") {
|
|
71
|
+
return parseFloat(val.toFixed(6));
|
|
72
|
+
}
|
|
73
|
+
return val;
|
|
74
|
+
},
|
|
75
|
+
z.number({ invalid_type_error: `${fieldName} must be a number.` }).min(-180, `${fieldName} must be at least -180.`).max(180, `${fieldName} must be at most 180.`).default(defaultValue)
|
|
76
|
+
).optional();
|
|
77
|
+
};
|
|
78
|
+
var enumMandatory = (fieldName, enumType, defaultValue) => {
|
|
79
|
+
return z.union([
|
|
80
|
+
z.nativeEnum(enumType, {
|
|
81
|
+
invalid_type_error: `${fieldName} should be one of the following values: ${Object.values(
|
|
82
|
+
enumType
|
|
83
|
+
).join(", ")}.`
|
|
84
|
+
}),
|
|
85
|
+
z.string().refine((val) => Object.values(enumType).includes(val), {
|
|
86
|
+
message: `${fieldName} should be one of the following values: ${Object.values(
|
|
87
|
+
enumType
|
|
88
|
+
).join(", ")}.`
|
|
89
|
+
})
|
|
90
|
+
]).default(defaultValue).refine((val) => val !== "", {
|
|
91
|
+
message: `Please select ${fieldName}.`
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
var enumOptional = (fieldName, enumType, defaultValue) => {
|
|
95
|
+
return z.nativeEnum(enumType, {
|
|
96
|
+
invalid_type_error: `${fieldName} must be an array containing only the following values: ${Object.values(
|
|
97
|
+
enumType
|
|
98
|
+
).join(", ")}.`
|
|
99
|
+
}).optional().default(() => defaultValue);
|
|
100
|
+
};
|
|
101
|
+
var getAllEnums = (enumType) => {
|
|
102
|
+
return Object.values(enumType);
|
|
103
|
+
};
|
|
104
|
+
var enumArrayOptional = (fieldName, enumType, defaultValue = getAllEnums(enumType), min = 0, max = 100, unique = false) => {
|
|
105
|
+
const schema = z.array(z.nativeEnum(enumType), {
|
|
106
|
+
invalid_type_error: `${fieldName} must be an array containing only the following values: ${Object.values(
|
|
107
|
+
enumType
|
|
108
|
+
).join(", ")}.`
|
|
109
|
+
}).min(min, `${fieldName} must contain at least ${min} items.`).max(max, `${fieldName} must contain at most ${max} items.`);
|
|
110
|
+
if (unique) {
|
|
111
|
+
schema.refine(
|
|
112
|
+
(arr) => new Set(arr).size === arr.length,
|
|
113
|
+
`${fieldName} must contain unique values.`
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
return schema.optional().default(() => defaultValue);
|
|
117
|
+
};
|
|
118
|
+
var handleNullOrUndefinedDate = (value, defaultValue) => {
|
|
119
|
+
if (typeof value === "string" && !isNaN(Date.parse(value))) {
|
|
120
|
+
return value;
|
|
121
|
+
}
|
|
122
|
+
return defaultValue;
|
|
123
|
+
};
|
|
124
|
+
var dateMandatory = (fieldName, minDate, maxDate, defaultValue = (/* @__PURE__ */ new Date()).toISOString()) => {
|
|
125
|
+
const schema = z.string().refine((val) => !isNaN(Date.parse(val)), {
|
|
126
|
+
message: `${fieldName} must be a valid ISO date.`
|
|
127
|
+
}).transform((val) => handleNullOrUndefinedDate(val, defaultValue));
|
|
128
|
+
if (minDate) {
|
|
129
|
+
schema.refine((val) => new Date(val) >= new Date(minDate), {
|
|
130
|
+
message: `${fieldName} must be after ${minDate}.`
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
if (maxDate) {
|
|
134
|
+
schema.refine((val) => new Date(val) <= new Date(maxDate), {
|
|
135
|
+
message: `${fieldName} must be before ${maxDate}.`
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
return schema;
|
|
139
|
+
};
|
|
140
|
+
var dateOptional = (fieldName, minDate, maxDate, defaultValue = (/* @__PURE__ */ new Date()).toISOString()) => {
|
|
141
|
+
const schema = z.string().refine((val) => !isNaN(Date.parse(val)), {
|
|
142
|
+
message: `${fieldName} must be a valid ISO date.`
|
|
143
|
+
}).optional().default(defaultValue);
|
|
144
|
+
if (minDate) {
|
|
145
|
+
schema.refine((val) => new Date(val) >= new Date(minDate), {
|
|
146
|
+
message: `${fieldName} must be after ${minDate}.`
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
if (maxDate) {
|
|
150
|
+
schema.refine((val) => new Date(val) <= new Date(maxDate), {
|
|
151
|
+
message: `${fieldName} must be before ${maxDate}.`
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
return schema;
|
|
155
|
+
};
|
|
156
|
+
var dynamicJsonSchema = (fieldName, defaultValue = {}) => z.record(z.any()).optional().default(() => defaultValue);
|
|
157
|
+
var single_select_mandatory = (fieldName) => {
|
|
158
|
+
const schema = z.string().trim().nonempty(`Please select ${fieldName}.`).transform(handleNullOrUndefined);
|
|
159
|
+
return schema;
|
|
160
|
+
};
|
|
161
|
+
var single_select_optional = (fieldName) => {
|
|
162
|
+
r_log(fieldName);
|
|
163
|
+
const schema = z.string().trim().transform(handleNullOrUndefined);
|
|
164
|
+
return schema;
|
|
165
|
+
};
|
|
166
|
+
var multi_select_optional = (fieldName, max = 1e3, defaultValue = []) => {
|
|
167
|
+
const schema = z.array(
|
|
168
|
+
z.string({
|
|
169
|
+
invalid_type_error: `${fieldName} must be an array of strings.`
|
|
170
|
+
})
|
|
171
|
+
).max(
|
|
172
|
+
max,
|
|
173
|
+
`Please select at most ${max} ${fieldName}${max > 1 ? "s" : ""}.`
|
|
174
|
+
);
|
|
175
|
+
return schema.optional().default(defaultValue);
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
// src/zod_utils/zod_base_schema.ts
|
|
179
|
+
import { z as z2 } from "zod";
|
|
180
|
+
|
|
181
|
+
// src/core/Enums.ts
|
|
182
|
+
var PAGING = /* @__PURE__ */ ((PAGING2) => {
|
|
183
|
+
PAGING2["Yes"] = "Yes";
|
|
184
|
+
PAGING2["No"] = "No";
|
|
185
|
+
return PAGING2;
|
|
186
|
+
})(PAGING || {});
|
|
187
|
+
var LoadParents = /* @__PURE__ */ ((LoadParents2) => {
|
|
188
|
+
LoadParents2["Yes"] = "Yes";
|
|
189
|
+
LoadParents2["No"] = "No";
|
|
190
|
+
LoadParents2["Custom"] = "Custom";
|
|
191
|
+
return LoadParents2;
|
|
192
|
+
})(LoadParents || {});
|
|
193
|
+
var LoadChild = /* @__PURE__ */ ((LoadChild2) => {
|
|
194
|
+
LoadChild2["No"] = "No";
|
|
195
|
+
LoadChild2["Yes"] = "Yes";
|
|
196
|
+
LoadChild2["Count"] = "Count";
|
|
197
|
+
LoadChild2["Custom"] = "Custom";
|
|
198
|
+
LoadChild2["Direct"] = "Direct";
|
|
199
|
+
return LoadChild2;
|
|
200
|
+
})(LoadChild || {});
|
|
201
|
+
var LoadChildCount = /* @__PURE__ */ ((LoadChildCount2) => {
|
|
202
|
+
LoadChildCount2["No"] = "No";
|
|
203
|
+
LoadChildCount2["Yes"] = "Yes";
|
|
204
|
+
LoadChildCount2["Custom"] = "Custom";
|
|
205
|
+
return LoadChildCount2;
|
|
206
|
+
})(LoadChildCount || {});
|
|
207
|
+
var OrderBy = /* @__PURE__ */ ((OrderBy2) => {
|
|
208
|
+
OrderBy2["asc"] = "asc";
|
|
209
|
+
OrderBy2["desc"] = "desc";
|
|
210
|
+
return OrderBy2;
|
|
211
|
+
})(OrderBy || {});
|
|
212
|
+
var LoginFrom = /* @__PURE__ */ ((LoginFrom2) => {
|
|
213
|
+
LoginFrom2["Web"] = "Web";
|
|
214
|
+
LoginFrom2["Android"] = "Android";
|
|
215
|
+
LoginFrom2["IPhone"] = "IPhone";
|
|
216
|
+
LoginFrom2["AndroidPWA"] = "AndroidPWA";
|
|
217
|
+
LoginFrom2["iOSPWA"] = "iOSPWA";
|
|
218
|
+
return LoginFrom2;
|
|
219
|
+
})(LoginFrom || {});
|
|
220
|
+
var Status = /* @__PURE__ */ ((Status2) => {
|
|
221
|
+
Status2["Active"] = "Active";
|
|
222
|
+
Status2["Inactive"] = "Inactive";
|
|
223
|
+
return Status2;
|
|
224
|
+
})(Status || {});
|
|
225
|
+
var FileType = /* @__PURE__ */ ((FileType2) => {
|
|
226
|
+
FileType2["NoFile"] = "NoFile";
|
|
227
|
+
FileType2["Image"] = "Image";
|
|
228
|
+
FileType2["Video"] = "Video";
|
|
229
|
+
FileType2["PDF"] = "PDF";
|
|
230
|
+
return FileType2;
|
|
231
|
+
})(FileType || {});
|
|
232
|
+
var YesNo = /* @__PURE__ */ ((YesNo2) => {
|
|
233
|
+
YesNo2["Yes"] = "Yes";
|
|
234
|
+
YesNo2["No"] = "No";
|
|
235
|
+
return YesNo2;
|
|
236
|
+
})(YesNo || {});
|
|
237
|
+
var EnrollmentStatus = /* @__PURE__ */ ((EnrollmentStatus2) => {
|
|
238
|
+
EnrollmentStatus2["Active"] = "Active";
|
|
239
|
+
EnrollmentStatus2["Inactive"] = "Inactive";
|
|
240
|
+
return EnrollmentStatus2;
|
|
241
|
+
})(EnrollmentStatus || {});
|
|
242
|
+
var TransportPlanType = /* @__PURE__ */ ((TransportPlanType2) => {
|
|
243
|
+
TransportPlanType2["Both"] = "Both";
|
|
244
|
+
TransportPlanType2["PickupOnly"] = "PickupOnly";
|
|
245
|
+
TransportPlanType2["DropOnly"] = "DropOnly";
|
|
246
|
+
return TransportPlanType2;
|
|
247
|
+
})(TransportPlanType || {});
|
|
248
|
+
var ApprovalStatus = /* @__PURE__ */ ((ApprovalStatus2) => {
|
|
249
|
+
ApprovalStatus2["Pending"] = "Pending";
|
|
250
|
+
ApprovalStatus2["Approved"] = "Approved";
|
|
251
|
+
ApprovalStatus2["Rejected"] = "Rejected";
|
|
252
|
+
return ApprovalStatus2;
|
|
253
|
+
})(ApprovalStatus || {});
|
|
254
|
+
var StudentLeaveType = /* @__PURE__ */ ((StudentLeaveType2) => {
|
|
255
|
+
StudentLeaveType2["FullDay"] = "FullDay";
|
|
256
|
+
StudentLeaveType2["PickupOnly"] = "PickupOnly";
|
|
257
|
+
StudentLeaveType2["DropOnly"] = "DropOnly";
|
|
258
|
+
return StudentLeaveType2;
|
|
259
|
+
})(StudentLeaveType || {});
|
|
260
|
+
|
|
261
|
+
// src/zod_utils/zod_base_schema.ts
|
|
262
|
+
var OrderBySchema = z2.array(
|
|
263
|
+
z2.object({
|
|
264
|
+
name: stringMandatory("Order Field Name", 0, 255),
|
|
265
|
+
field: stringMandatory("Order Field Name", 0, 255),
|
|
266
|
+
direction: enumMandatory("Order Direction", OrderBy, "asc" /* asc */)
|
|
267
|
+
})
|
|
268
|
+
);
|
|
269
|
+
var BaseFileSchema = z2.object({
|
|
270
|
+
usage_type: stringMandatory("Usage Type", 3, 100),
|
|
271
|
+
file_type: enumMandatory("File Type", FileType, "Image" /* Image */),
|
|
272
|
+
file_url: stringOptional("File URL", 0, 300),
|
|
273
|
+
file_key: stringOptional("File Key", 0, 300),
|
|
274
|
+
file_name: stringOptional("File Name", 0, 300),
|
|
275
|
+
file_description: stringOptional("File Description", 0, 2e3),
|
|
276
|
+
file_size: numberOptional("File Size"),
|
|
277
|
+
file_metadata: dynamicJsonSchema("File Metadata", {}),
|
|
278
|
+
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
279
|
+
});
|
|
280
|
+
var BaseQuerySchema = z2.object({
|
|
281
|
+
search: stringOptional("Search", 0, 255, ""),
|
|
282
|
+
status: enumArrayOptional("Status", Status, getAllEnums(Status), 0, 10, true),
|
|
283
|
+
paging: enumOptional("Paging", PAGING, "Yes" /* Yes */),
|
|
284
|
+
page_count: numberOptional("Page Count", 0, 1e3, 100),
|
|
285
|
+
page_index: numberOptional("Page Index", 0, 1e3, 0),
|
|
286
|
+
load_parents: enumOptional("Load Parents", LoadParents, "No" /* No */),
|
|
287
|
+
load_parents_list: stringArrayOptional("Load Parents List"),
|
|
288
|
+
load_child: enumOptional("Load Child", LoadChild, "No" /* No */),
|
|
289
|
+
load_child_list: stringArrayOptional("Load Child List"),
|
|
290
|
+
load_child_count: enumOptional(
|
|
291
|
+
"Load Child",
|
|
292
|
+
LoadChildCount,
|
|
293
|
+
"No" /* No */
|
|
294
|
+
),
|
|
295
|
+
load_child_count_list: stringArrayOptional("Load Child List"),
|
|
296
|
+
include_details: dynamicJsonSchema("Include Details", {}),
|
|
297
|
+
where_relations: dynamicJsonSchema("Where Relations", {}),
|
|
298
|
+
order_by: OrderBySchema.optional().default([]),
|
|
299
|
+
include_master_data: enumOptional("Include Master Data", YesNo, "No" /* No */),
|
|
300
|
+
date_format_id: single_select_optional("MasterMainDateFormat"),
|
|
301
|
+
time_zone_id: single_select_optional("MasterMainTimeZone")
|
|
302
|
+
});
|
|
303
|
+
var FilePresignedUrlSchema = z2.object({
|
|
304
|
+
file_name: stringMandatory("File Name", 1, 255),
|
|
305
|
+
file_type: enumMandatory("File Type", FileType, "Image" /* Image */)
|
|
306
|
+
});
|
|
307
|
+
var MongoBaseQuerySchema = z2.object({
|
|
308
|
+
search: stringOptional("Search", 0, 255, ""),
|
|
309
|
+
paging: enumOptional("Paging", PAGING, "Yes" /* Yes */),
|
|
310
|
+
page_count: numberOptional("Page Count", 0, 1e3, 100),
|
|
311
|
+
page_index: numberOptional("Page Index", 0, 1e3, 0),
|
|
312
|
+
login_from: enumMandatory("Login From", LoginFrom, "Web" /* Web */),
|
|
313
|
+
date_format_id: single_select_optional("MasterMainDateFormat"),
|
|
314
|
+
// ✅ Single-selection -> MasterMainDateFormat
|
|
315
|
+
time_zone_id: single_select_optional("MasterMainTimeZone")
|
|
316
|
+
// ✅ Single-selection -> MasterMainTimeZone
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
// src/services/fleet/bus_mangement/student.ts
|
|
320
|
+
var URL = "student";
|
|
321
|
+
var ENDPOINTS = {
|
|
322
|
+
// Student
|
|
323
|
+
find: `${URL}/search`,
|
|
324
|
+
create: URL,
|
|
325
|
+
find_students_with_no_route_pickup: `${URL}/no_route_pickup/search`,
|
|
326
|
+
find_students_with_no_route_drop: `${URL}/no_route_drop/search`,
|
|
327
|
+
update: (id) => `${URL}/${id}`,
|
|
328
|
+
update_profile_picture: (id) => `${URL}/update_profile_picture/${id}`,
|
|
329
|
+
remove: (id) => `${URL}/${id}`,
|
|
330
|
+
// Address
|
|
331
|
+
create_address: `${URL}/address`,
|
|
332
|
+
find_address: `${URL}/address/search`,
|
|
333
|
+
update_address: (id) => `${URL}/address/${id}`,
|
|
334
|
+
update_address_bus_stop_assign: (id) => `${URL}/address_bus_stop_assign/${id}`,
|
|
335
|
+
remove_address: (id) => `${URL}/address/${id}`,
|
|
336
|
+
// Guardian Link
|
|
337
|
+
create_guardian_link: `${URL}/guardian_link`,
|
|
338
|
+
find_guardian_link: `${URL}/guardian_link/search`,
|
|
339
|
+
update_guardian_link: (id) => `${URL}/guardian_link/${id}`,
|
|
340
|
+
update_guardian_profile_picture: (id) => `${URL}/guardian_profile_picture/${id}`,
|
|
341
|
+
update_guardian_details: (id) => `${URL}/guardian_details/${id}`,
|
|
342
|
+
update_guardian_mobile_number: (id) => `${URL}/guardian_mobile_number/${id}`,
|
|
343
|
+
remove_guardian_link: (id) => `${URL}/guardian_link/${id}`,
|
|
344
|
+
find_guardian_autofill_details: `${URL}/guardian_autofill/search`,
|
|
345
|
+
// Leave Request
|
|
346
|
+
create_leave_request: `${URL}/leave_request`,
|
|
347
|
+
find_leave_request: `${URL}/leave_request/search`,
|
|
348
|
+
update_leave_request: (id) => `${URL}/leave_request/${id}`,
|
|
349
|
+
approve_leave_request: (id) => `${URL}/approve_leave_request/${id}`,
|
|
350
|
+
remove_leave_request: (id) => `${URL}/leave_request/${id}`,
|
|
351
|
+
// Stop Change Request
|
|
352
|
+
create_stop_change_request: `${URL}/stop_change_request`,
|
|
353
|
+
find_stop_change_request: `${URL}/stop_change_request/search`,
|
|
354
|
+
update_stop_change_request: (id) => `${URL}/stop_change_request/${id}`,
|
|
355
|
+
approve_stop_change_request: (id) => `${URL}/approve_stop_change_request/${id}`,
|
|
356
|
+
remove_stop_change_request: (id) => `${URL}/stop_change_request/${id}`
|
|
357
|
+
};
|
|
358
|
+
var StudentSchema = z3.object({
|
|
359
|
+
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
360
|
+
// ✅ Single-Selection -> UserOrganisation
|
|
361
|
+
organisation_branch_id: single_select_mandatory("OrganisationBranch"),
|
|
362
|
+
// ✅ Single-Selection -> OrganisationBranch
|
|
363
|
+
program_id: single_select_optional("MasterProgram"),
|
|
364
|
+
// ✅ Single-Selection -> MasterProgram
|
|
365
|
+
stream_id: single_select_optional("MasterStream"),
|
|
366
|
+
// ✅ Single-Selection -> MasterStream
|
|
367
|
+
year_id: single_select_optional("MasterYear"),
|
|
368
|
+
// ✅ Single-Selection -> MasterYear
|
|
369
|
+
semester_id: single_select_optional("MasterSemester"),
|
|
370
|
+
// ✅ Single-Selection -> MasterSemester
|
|
371
|
+
class_id: single_select_optional("MasterClass"),
|
|
372
|
+
// ✅ Single-Selection -> MasterClass
|
|
373
|
+
section_id: single_select_optional("MasterSection"),
|
|
374
|
+
// ✅ Single-Selection -> MasterSection
|
|
375
|
+
photo_url: stringOptional("Photo URL", 0, 300),
|
|
376
|
+
photo_key: stringOptional("Photo Key", 0, 300),
|
|
377
|
+
photo_name: stringOptional("Photo Name", 0, 300),
|
|
378
|
+
admission_registration_number: stringOptional(
|
|
379
|
+
"Admission Registration Number",
|
|
380
|
+
0,
|
|
381
|
+
100
|
|
382
|
+
),
|
|
383
|
+
roll_number: stringOptional("Roll Number", 0, 100),
|
|
384
|
+
first_name: stringMandatory("First Name", 3, 100),
|
|
385
|
+
last_name: stringOptional("Last Name", 0, 100),
|
|
386
|
+
mobile_number: stringOptional("Mobile Number", 0, 10),
|
|
387
|
+
email: stringOptional("Email", 0, 100),
|
|
388
|
+
dob: dateOptional("DOB"),
|
|
389
|
+
gender: stringOptional("Gender", 0, 10),
|
|
390
|
+
blood_group: stringOptional("Blood Group", 0, 10),
|
|
391
|
+
special_notes: stringOptional("Special Notes", 0, 500),
|
|
392
|
+
enrollment_status: enumOptional(
|
|
393
|
+
"Enrollment Status",
|
|
394
|
+
EnrollmentStatus,
|
|
395
|
+
"Active" /* Active */
|
|
396
|
+
),
|
|
397
|
+
transport_plan_type: enumOptional(
|
|
398
|
+
"Transport Plan Type",
|
|
399
|
+
TransportPlanType,
|
|
400
|
+
"Both" /* Both */
|
|
401
|
+
),
|
|
402
|
+
change_reason: stringOptional("Change Reason", 0, 500)
|
|
403
|
+
});
|
|
404
|
+
var StudentProfilePictureSchema = z3.object({
|
|
405
|
+
photo_url: stringOptional("Photo URL", 0, 300),
|
|
406
|
+
photo_key: stringOptional("Photo Key", 0, 300),
|
|
407
|
+
photo_name: stringOptional("Photo Name", 0, 300)
|
|
408
|
+
});
|
|
409
|
+
var StudentQuerySchema = BaseQuerySchema.extend({
|
|
410
|
+
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
411
|
+
// ✅ Multi-selection -> UserOrganisation
|
|
412
|
+
organisation_branch_ids: multi_select_optional("OrganisationBranch"),
|
|
413
|
+
// ✅ Multi-selection -> OrganisationBranch
|
|
414
|
+
program_ids: multi_select_optional("MasterProgram"),
|
|
415
|
+
// ✅ Multi-selection -> MasterProgram
|
|
416
|
+
stream_ids: multi_select_optional("MasterStream"),
|
|
417
|
+
// ✅ Multi-selection -> MasterStream
|
|
418
|
+
year_ids: multi_select_optional("MasterYear"),
|
|
419
|
+
// ✅ Multi-selection -> MasterYear
|
|
420
|
+
semester_ids: multi_select_optional("MasterSemester"),
|
|
421
|
+
// ✅ Multi-selection -> MasterSemester
|
|
422
|
+
class_ids: multi_select_optional("MasterClass"),
|
|
423
|
+
// ✅ Multi-selection -> MasterClass
|
|
424
|
+
section_ids: multi_select_optional("MasterSection"),
|
|
425
|
+
// ✅ Multi-selection -> MasterSection
|
|
426
|
+
student_ids: multi_select_optional("Student"),
|
|
427
|
+
// ✅ Multi-selection -> Student
|
|
428
|
+
pickup_route_ids: multi_select_optional("MasterRoute"),
|
|
429
|
+
// ✅ Multi-selection -> MasterRoute
|
|
430
|
+
drop_route_ids: multi_select_optional("MasterRoute"),
|
|
431
|
+
// ✅ Multi-selection -> MasterRoute
|
|
432
|
+
pickup_route_stop_ids: multi_select_optional("MasterRouteStop"),
|
|
433
|
+
// ✅ Multi-selection -> MasterRouteStop
|
|
434
|
+
drop_route_stop_ids: multi_select_optional("MasterRouteStop"),
|
|
435
|
+
// ✅ Multi-selection -> MasterRouteStop
|
|
436
|
+
pickup_fixed_schedule_ids: multi_select_optional("MasterFixedSchedule"),
|
|
437
|
+
// ✅ Multi-selection -> MasterFixedSchedule
|
|
438
|
+
drop_fixed_schedule_ids: multi_select_optional("MasterFixedSchedule"),
|
|
439
|
+
// ✅ Multi-selection -> MasterFixedSchedule
|
|
440
|
+
enrollment_status: enumArrayOptional(
|
|
441
|
+
"Enrollment Status",
|
|
442
|
+
EnrollmentStatus,
|
|
443
|
+
getAllEnums(EnrollmentStatus)
|
|
444
|
+
),
|
|
445
|
+
transport_plan_type: enumArrayOptional(
|
|
446
|
+
"Transport Plan Type",
|
|
447
|
+
TransportPlanType,
|
|
448
|
+
getAllEnums(TransportPlanType)
|
|
449
|
+
)
|
|
450
|
+
});
|
|
451
|
+
var StudentNoRouteQuerySchema = BaseQuerySchema.extend({
|
|
452
|
+
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
453
|
+
// ✅ Multi-selection -> UserOrganisation
|
|
454
|
+
organisation_branch_id: single_select_mandatory("OrganisationBranch")
|
|
455
|
+
// ✅ Single-Selection -> OrganisationBranch
|
|
456
|
+
});
|
|
457
|
+
var StudentAddressSchema = z3.object({
|
|
458
|
+
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
459
|
+
// ✅ Single-Selection -> UserOrganisation
|
|
460
|
+
organisation_branch_id: single_select_mandatory("OrganisationBranch"),
|
|
461
|
+
// ✅ Single-Selection -> OrganisationBranch
|
|
462
|
+
student_id: single_select_mandatory("Student"),
|
|
463
|
+
// ✅ Single-Selection -> Student
|
|
464
|
+
// Address
|
|
465
|
+
address_line1: stringMandatory("Address Line 1", 1, 150),
|
|
466
|
+
address_line2: stringOptional("Address Line 2", 0, 150),
|
|
467
|
+
locality_landmark: stringOptional("Locality / Landmark", 0, 150),
|
|
468
|
+
neighborhood: stringOptional("Neighborhood", 0, 100),
|
|
469
|
+
town_city: stringOptional("Town / City", 0, 100),
|
|
470
|
+
district_county: stringOptional("District / County", 0, 100),
|
|
471
|
+
state_province_region: stringOptional("State / Province / Region", 0, 100),
|
|
472
|
+
postal_code: stringOptional("Postal Code", 0, 20),
|
|
473
|
+
country: stringOptional("Country", 0, 100),
|
|
474
|
+
country_code: stringOptional("Country Code", 0, 5),
|
|
475
|
+
google_location: stringOptional("Google Location", 0, 500),
|
|
476
|
+
latitude: doubleOptionalLatLng("Latitude"),
|
|
477
|
+
longitude: doubleOptionalLatLng("Longitude"),
|
|
478
|
+
is_default: enumMandatory("Is Active", YesNo, "No" /* No */),
|
|
479
|
+
notes: stringOptional("Notes", 0, 1e3),
|
|
480
|
+
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
481
|
+
});
|
|
482
|
+
var StudentAddressBusStopAssignSchema = z3.object({
|
|
483
|
+
bus_stop_id: single_select_mandatory("BusStop")
|
|
484
|
+
// ✅ Single-Selection -> BusStop
|
|
485
|
+
});
|
|
486
|
+
var StudentAddressQuerySchema = BaseQuerySchema.extend({
|
|
487
|
+
// Multi-select relations
|
|
488
|
+
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
489
|
+
// ✅ Multi-selection -> UserOrganisation
|
|
490
|
+
organisation_branch_ids: multi_select_optional("OrganisationBranch"),
|
|
491
|
+
// ✅ Multi-selection -> OrganisationBranch
|
|
492
|
+
student_ids: multi_select_optional("Student"),
|
|
493
|
+
// ✅ Multi-selection -> Student
|
|
494
|
+
bus_stop_ids: multi_select_optional("BusStop"),
|
|
495
|
+
// ✅ Multi-selection -> BusStop
|
|
496
|
+
student_address_ids: multi_select_optional("StudentAddress"),
|
|
497
|
+
// ✅ Multi-selection -> StudentAddress
|
|
498
|
+
is_default: enumArrayOptional("Is Active", YesNo, getAllEnums(YesNo))
|
|
499
|
+
});
|
|
500
|
+
var StudentGuardianLinkSchema = z3.object({
|
|
501
|
+
is_primary: enumMandatory("Is Primary", YesNo, "No" /* No */),
|
|
502
|
+
notes: stringOptional("Notes", 0, 500),
|
|
503
|
+
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
504
|
+
organisation_branch_id: single_select_mandatory("OrganisationBranch"),
|
|
505
|
+
// ✅ Single-Selection -> OrganisationBranch
|
|
506
|
+
student_id: single_select_mandatory("Student"),
|
|
507
|
+
relationship_id: single_select_mandatory("MasterRelationship"),
|
|
508
|
+
// Guardian
|
|
509
|
+
photo_url: stringOptional("Photo URL", 0, 300),
|
|
510
|
+
photo_key: stringOptional("Photo Key", 0, 300),
|
|
511
|
+
photo_name: stringOptional("Photo Name", 0, 300),
|
|
512
|
+
full_name: stringMandatory("Full Name", 3, 100),
|
|
513
|
+
mobile: stringMandatory("Mobile", 1, 10),
|
|
514
|
+
email: stringOptional("Email", 0, 100),
|
|
515
|
+
alternative_mobile: stringOptional("Alternative Mobile", 0, 10),
|
|
516
|
+
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
517
|
+
});
|
|
518
|
+
var GuardianProfilePictureSchema = z3.object({
|
|
519
|
+
photo_url: stringOptional("Photo URL", 0, 300),
|
|
520
|
+
photo_key: stringOptional("Photo Key", 0, 300),
|
|
521
|
+
photo_name: stringOptional("Photo Name", 0, 300)
|
|
522
|
+
});
|
|
523
|
+
var GuardianDetailsSchema = z3.object({
|
|
524
|
+
full_name: stringMandatory("Full Name", 3, 100),
|
|
525
|
+
email: stringOptional("Email", 0, 100),
|
|
526
|
+
alternative_mobile: stringOptional("Alternative Mobile", 0, 10)
|
|
527
|
+
});
|
|
528
|
+
var GuardianMobileNumberSchema = z3.object({
|
|
529
|
+
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
530
|
+
organisation_branch_id: single_select_mandatory("OrganisationBranch"),
|
|
531
|
+
// ✅ Single-Selection -> OrganisationBranch
|
|
532
|
+
old_mobile: stringMandatory("Mobile", 1, 10),
|
|
533
|
+
new_mobile: stringMandatory("Mobile", 1, 10)
|
|
534
|
+
});
|
|
535
|
+
var StudentGuardianLinkQuerySchema = BaseQuerySchema.extend({
|
|
536
|
+
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
537
|
+
// ✅ Multi-selection -> UserOrganisation
|
|
538
|
+
organisation_branch_ids: multi_select_optional("OrganisationBranch"),
|
|
539
|
+
// ✅ Multi-selection -> OrganisationBranch
|
|
540
|
+
student_ids: multi_select_optional("Student"),
|
|
541
|
+
// ✅ Multi-selection -> Student
|
|
542
|
+
guardian_ids: multi_select_optional("StudentGuardian")
|
|
543
|
+
// ✅ Multi-selection -> StudentGuardian
|
|
544
|
+
});
|
|
545
|
+
var StudentGuardianAutofillQuerySchema = BaseQuerySchema.extend({
|
|
546
|
+
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
547
|
+
organisation_branch_id: single_select_mandatory("OrganisationBranch"),
|
|
548
|
+
// ✅ Single-Selection -> OrganisationBranch
|
|
549
|
+
mobile: stringMandatory("Mobile", 1, 10)
|
|
550
|
+
});
|
|
551
|
+
var StudentLeaveRequestSchema = z3.object({
|
|
552
|
+
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
553
|
+
organisation_branch_id: single_select_mandatory("OrganisationBranch"),
|
|
554
|
+
// ✅ Single-Selection -> OrganisationBranch
|
|
555
|
+
student_id: single_select_mandatory("Student"),
|
|
556
|
+
// Leave details
|
|
557
|
+
date_from: dateMandatory("Date From"),
|
|
558
|
+
date_to: dateMandatory("Date To"),
|
|
559
|
+
leave_type: enumMandatory(
|
|
560
|
+
"Leave Type",
|
|
561
|
+
StudentLeaveType,
|
|
562
|
+
"FullDay" /* FullDay */
|
|
563
|
+
),
|
|
564
|
+
reason: stringOptional("Reason", 0, 500)
|
|
565
|
+
});
|
|
566
|
+
var StudentLeaveRequestApprovalSchema = z3.object({
|
|
567
|
+
approval_status: enumMandatory(
|
|
568
|
+
"Approval Status",
|
|
569
|
+
ApprovalStatus,
|
|
570
|
+
"Pending" /* Pending */
|
|
571
|
+
),
|
|
572
|
+
approval_notes: stringOptional("Approval Notes", 0, 500)
|
|
573
|
+
});
|
|
574
|
+
var StudentLeaveRequestQuerySchema = BaseQuerySchema.extend({
|
|
575
|
+
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
576
|
+
// ✅ Multi-selection -> UserOrganisation
|
|
577
|
+
organisation_branch_ids: multi_select_optional("OrganisationBranch"),
|
|
578
|
+
// ✅ Multi-selection -> OrganisationBranch
|
|
579
|
+
student_ids: multi_select_optional("Student"),
|
|
580
|
+
// ✅ Multi-selection -> Student
|
|
581
|
+
student_leave_request_ids: multi_select_optional("StudentLeaveRequest"),
|
|
582
|
+
// ✅ Multi-selection -> StudentLeaveRequest
|
|
583
|
+
approval_status: enumArrayOptional(
|
|
584
|
+
"Approval Status",
|
|
585
|
+
ApprovalStatus,
|
|
586
|
+
getAllEnums(ApprovalStatus)
|
|
587
|
+
)
|
|
588
|
+
});
|
|
589
|
+
var StudentStopChangeRequestSchema = z3.object({
|
|
590
|
+
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
591
|
+
organisation_branch_id: single_select_mandatory("OrganisationBranch"),
|
|
592
|
+
// ✅ Single-Selection -> OrganisationBranch
|
|
593
|
+
student_id: single_select_mandatory("Student"),
|
|
594
|
+
student_address_id: single_select_mandatory("StudentAddress"),
|
|
595
|
+
change_pickup: enumMandatory("Change Pickup", YesNo, "Yes" /* Yes */),
|
|
596
|
+
change_drop: enumMandatory("Change Drop", YesNo, "Yes" /* Yes */),
|
|
597
|
+
is_temporary: enumMandatory("Is Temporary", YesNo, "No" /* No */),
|
|
598
|
+
apply_from: dateMandatory("Apply From"),
|
|
599
|
+
apply_until: dateOptional("Apply Until"),
|
|
600
|
+
reason: stringOptional("Reason", 0, 500),
|
|
601
|
+
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
602
|
+
});
|
|
603
|
+
var StudentStopChangeRequestApprovalSchema = z3.object({
|
|
604
|
+
approval_status: enumMandatory(
|
|
605
|
+
"Approval Status",
|
|
606
|
+
ApprovalStatus,
|
|
607
|
+
"Pending" /* Pending */
|
|
608
|
+
),
|
|
609
|
+
approval_notes: stringOptional("Approval Notes", 0, 500)
|
|
610
|
+
});
|
|
611
|
+
var StudentStopChangeRequestQuerySchema = BaseQuerySchema.extend({
|
|
612
|
+
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
613
|
+
// ✅ Multi-selection -> UserOrganisation
|
|
614
|
+
organisation_branch_ids: multi_select_optional("OrganisationBranch"),
|
|
615
|
+
// ✅ Multi-selection -> OrganisationBranch
|
|
616
|
+
student_ids: multi_select_optional("Student"),
|
|
617
|
+
// ✅ Multi-selection -> Student
|
|
618
|
+
student_address_ids: multi_select_optional("StudentAddress"),
|
|
619
|
+
// ✅ Multi-selection -> StudentAddress
|
|
620
|
+
student_stop_change_request_ids: multi_select_optional(
|
|
621
|
+
"StudentStopChangeRequest"
|
|
622
|
+
),
|
|
623
|
+
// ✅ Multi-selection -> StudentStopChangeRequest
|
|
624
|
+
approval_status: enumArrayOptional(
|
|
625
|
+
"Approval Status",
|
|
626
|
+
ApprovalStatus,
|
|
627
|
+
getAllEnums(ApprovalStatus)
|
|
628
|
+
)
|
|
629
|
+
});
|
|
630
|
+
var toStudentPayload = (row) => ({
|
|
631
|
+
organisation_id: row.organisation_id,
|
|
632
|
+
organisation_branch_id: row.organisation_branch_id,
|
|
633
|
+
program_id: row.program_id ?? "",
|
|
634
|
+
stream_id: row.stream_id ?? "",
|
|
635
|
+
year_id: row.year_id ?? "",
|
|
636
|
+
semester_id: row.semester_id ?? "",
|
|
637
|
+
class_id: row.class_id ?? "",
|
|
638
|
+
section_id: row.section_id ?? "",
|
|
639
|
+
photo_url: row.photo_url ?? "",
|
|
640
|
+
photo_key: row.photo_key ?? "",
|
|
641
|
+
photo_name: row.photo_name ?? "",
|
|
642
|
+
admission_registration_number: row.admission_registration_number ?? "",
|
|
643
|
+
roll_number: row.roll_number ?? "",
|
|
644
|
+
first_name: row.first_name,
|
|
645
|
+
last_name: row.last_name ?? "",
|
|
646
|
+
mobile_number: row.mobile_number ?? "",
|
|
647
|
+
email: row.email ?? "",
|
|
648
|
+
dob: row.dob,
|
|
649
|
+
gender: row.gender ?? "",
|
|
650
|
+
blood_group: row.blood_group ?? "",
|
|
651
|
+
special_notes: row.special_notes ?? "",
|
|
652
|
+
enrollment_status: row.enrollment_status ?? "",
|
|
653
|
+
transport_plan_type: row.transport_plan_type ?? "",
|
|
654
|
+
change_reason: ""
|
|
655
|
+
});
|
|
656
|
+
var newStudentPayload = () => ({
|
|
657
|
+
organisation_id: "",
|
|
658
|
+
organisation_branch_id: "",
|
|
659
|
+
program_id: "",
|
|
660
|
+
stream_id: "",
|
|
661
|
+
year_id: "",
|
|
662
|
+
semester_id: "",
|
|
663
|
+
class_id: "",
|
|
664
|
+
section_id: "",
|
|
665
|
+
photo_url: "",
|
|
666
|
+
photo_key: "",
|
|
667
|
+
photo_name: "",
|
|
668
|
+
admission_registration_number: "",
|
|
669
|
+
roll_number: "",
|
|
670
|
+
first_name: "",
|
|
671
|
+
last_name: "",
|
|
672
|
+
mobile_number: "",
|
|
673
|
+
email: "",
|
|
674
|
+
dob: "",
|
|
675
|
+
gender: "",
|
|
676
|
+
blood_group: "",
|
|
677
|
+
special_notes: "",
|
|
678
|
+
enrollment_status: "Active" /* Active */,
|
|
679
|
+
transport_plan_type: "Both" /* Both */,
|
|
680
|
+
change_reason: ""
|
|
681
|
+
});
|
|
682
|
+
var toStudentAddressPayload = (row) => ({
|
|
683
|
+
organisation_id: row.organisation_id,
|
|
684
|
+
organisation_branch_id: row.organisation_branch_id,
|
|
685
|
+
student_id: row.student_id,
|
|
686
|
+
address_line1: row.address_line1,
|
|
687
|
+
address_line2: row.address_line2 ?? "",
|
|
688
|
+
locality_landmark: row.locality_landmark ?? "",
|
|
689
|
+
neighborhood: row.neighborhood ?? "",
|
|
690
|
+
town_city: row.town_city ?? "",
|
|
691
|
+
district_county: row.district_county ?? "",
|
|
692
|
+
state_province_region: row.state_province_region ?? "",
|
|
693
|
+
postal_code: row.postal_code ?? "",
|
|
694
|
+
country: row.country ?? "",
|
|
695
|
+
country_code: row.country_code ?? "",
|
|
696
|
+
google_location: row.google_location ?? "",
|
|
697
|
+
latitude: row.latitude ?? 0,
|
|
698
|
+
longitude: row.longitude ?? 0,
|
|
699
|
+
is_default: row.is_default,
|
|
700
|
+
notes: row.notes ?? "",
|
|
701
|
+
status: row.status
|
|
702
|
+
});
|
|
703
|
+
var newStudentAddressPayload = () => ({
|
|
704
|
+
student_id: "",
|
|
705
|
+
status: "Active" /* Active */,
|
|
706
|
+
organisation_id: "",
|
|
707
|
+
organisation_branch_id: "",
|
|
708
|
+
address_line1: "",
|
|
709
|
+
address_line2: "",
|
|
710
|
+
locality_landmark: "",
|
|
711
|
+
neighborhood: "",
|
|
712
|
+
town_city: "",
|
|
713
|
+
district_county: "",
|
|
714
|
+
state_province_region: "",
|
|
715
|
+
postal_code: "",
|
|
716
|
+
country: "",
|
|
717
|
+
country_code: "",
|
|
718
|
+
google_location: "",
|
|
719
|
+
is_default: "Yes" /* Yes */,
|
|
720
|
+
notes: ""
|
|
721
|
+
});
|
|
722
|
+
var toStudentLeaveRequestPayload = (row) => ({
|
|
723
|
+
organisation_id: row.organisation_id,
|
|
724
|
+
organisation_branch_id: row.organisation_branch_id,
|
|
725
|
+
student_id: row.student_id,
|
|
726
|
+
date_from: row.date_from,
|
|
727
|
+
date_to: row.date_to,
|
|
728
|
+
leave_type: row.leave_type,
|
|
729
|
+
reason: row.reason ?? ""
|
|
730
|
+
});
|
|
731
|
+
var newStudentLeaveRequestPayload = () => ({
|
|
732
|
+
student_id: "",
|
|
733
|
+
organisation_id: "",
|
|
734
|
+
organisation_branch_id: "",
|
|
735
|
+
date_from: "",
|
|
736
|
+
date_to: "",
|
|
737
|
+
leave_type: "FullDay" /* FullDay */,
|
|
738
|
+
reason: ""
|
|
739
|
+
});
|
|
740
|
+
var toStudentStopChangeRequestPayload = (row) => ({
|
|
741
|
+
organisation_id: row.organisation_id,
|
|
742
|
+
organisation_branch_id: row.organisation_branch_id,
|
|
743
|
+
student_id: row.student_id,
|
|
744
|
+
student_address_id: row.student_address_id,
|
|
745
|
+
change_pickup: row.change_pickup,
|
|
746
|
+
change_drop: row.change_drop,
|
|
747
|
+
is_temporary: row.is_temporary,
|
|
748
|
+
apply_from: row.apply_from,
|
|
749
|
+
apply_until: row.apply_until ?? "",
|
|
750
|
+
reason: row.reason ?? "",
|
|
751
|
+
status: row.status
|
|
752
|
+
});
|
|
753
|
+
var newStudentStopChangeRequestPayload = () => ({
|
|
754
|
+
student_id: "",
|
|
755
|
+
status: "Active" /* Active */,
|
|
756
|
+
organisation_id: "",
|
|
757
|
+
organisation_branch_id: "",
|
|
758
|
+
student_address_id: "",
|
|
759
|
+
reason: "",
|
|
760
|
+
change_pickup: "Yes" /* Yes */,
|
|
761
|
+
change_drop: "Yes" /* Yes */,
|
|
762
|
+
is_temporary: "Yes" /* Yes */,
|
|
763
|
+
apply_from: "",
|
|
764
|
+
apply_until: ""
|
|
765
|
+
});
|
|
766
|
+
var toStudentGuardianLinkPayload = (row) => ({
|
|
767
|
+
organisation_id: row.organisation_id,
|
|
768
|
+
organisation_branch_id: row.organisation_branch_id,
|
|
769
|
+
student_id: row.student_id,
|
|
770
|
+
relationship_id: row.relationship_id,
|
|
771
|
+
is_primary: row.is_primary,
|
|
772
|
+
notes: row.notes ?? "",
|
|
773
|
+
photo_url: row.photo_url ?? "",
|
|
774
|
+
photo_key: row.photo_key ?? "",
|
|
775
|
+
photo_name: row.photo_name ?? "",
|
|
776
|
+
full_name: row.full_name,
|
|
777
|
+
mobile: row.mobile,
|
|
778
|
+
email: row.email ?? "",
|
|
779
|
+
alternative_mobile: row.alternative_mobile ?? "",
|
|
780
|
+
status: row.status
|
|
781
|
+
});
|
|
782
|
+
var newStudentGuardianLinkPayload = () => ({
|
|
783
|
+
student_id: "",
|
|
784
|
+
photo_url: "",
|
|
785
|
+
photo_key: "",
|
|
786
|
+
photo_name: "",
|
|
787
|
+
email: "",
|
|
788
|
+
status: "Active" /* Active */,
|
|
789
|
+
organisation_id: "",
|
|
790
|
+
organisation_branch_id: "",
|
|
791
|
+
notes: "",
|
|
792
|
+
is_primary: "Yes" /* Yes */,
|
|
793
|
+
full_name: "",
|
|
794
|
+
mobile: "",
|
|
795
|
+
relationship_id: "",
|
|
796
|
+
alternative_mobile: ""
|
|
797
|
+
});
|
|
798
|
+
var findStudent = async (data) => {
|
|
799
|
+
return apiPost(ENDPOINTS.find, data);
|
|
800
|
+
};
|
|
801
|
+
var createStudent = async (data) => {
|
|
802
|
+
return apiPost(ENDPOINTS.create, data);
|
|
803
|
+
};
|
|
804
|
+
var updateStudent = async (id, data) => {
|
|
805
|
+
return apiPatch(ENDPOINTS.update(id), data);
|
|
806
|
+
};
|
|
807
|
+
var deleteStudent = async (id) => {
|
|
808
|
+
return apiDelete(ENDPOINTS.remove(id));
|
|
809
|
+
};
|
|
810
|
+
var findStudentsWithNoRoutePickup = async (data) => {
|
|
811
|
+
return apiPost(`${URL}/no_route_pickup/search`, data);
|
|
812
|
+
};
|
|
813
|
+
var findStudentsWithNoRouteDrop = async (data) => {
|
|
814
|
+
return apiPost(`${URL}/no_route_drop/search`, data);
|
|
815
|
+
};
|
|
816
|
+
var updateProfilePicture = async (id, data) => {
|
|
817
|
+
return apiPatch(ENDPOINTS.update_profile_picture(id), data);
|
|
818
|
+
};
|
|
819
|
+
var createStudentAddress = async (data) => {
|
|
820
|
+
return apiPost(ENDPOINTS.create_address, data);
|
|
821
|
+
};
|
|
822
|
+
var findStudentAddress = async (data) => {
|
|
823
|
+
return apiPost(ENDPOINTS.find_address, data);
|
|
824
|
+
};
|
|
825
|
+
var updateStudentAddress = async (id, data) => {
|
|
826
|
+
return apiPatch(ENDPOINTS.update_address(id), data);
|
|
827
|
+
};
|
|
828
|
+
var updateAddressBusStopAssign = async (id, data) => {
|
|
829
|
+
return apiPatch(ENDPOINTS.update_address_bus_stop_assign(id), data);
|
|
830
|
+
};
|
|
831
|
+
var deleteStudentAddress = async (id) => {
|
|
832
|
+
return apiDelete(ENDPOINTS.remove_address(id));
|
|
833
|
+
};
|
|
834
|
+
var createStudentGuardianLink = async (data) => {
|
|
835
|
+
return apiPost(ENDPOINTS.create_guardian_link, data);
|
|
836
|
+
};
|
|
837
|
+
var findStudentGuardianLink = async (data) => {
|
|
838
|
+
return apiPost(ENDPOINTS.find_guardian_link, data);
|
|
839
|
+
};
|
|
840
|
+
var updateStudentGuardianLink = async (id, data) => {
|
|
841
|
+
return apiPatch(ENDPOINTS.update_guardian_link(id), data);
|
|
842
|
+
};
|
|
843
|
+
var updateGuardianProfilePicture = async (id, data) => {
|
|
844
|
+
return apiPatch(ENDPOINTS.update_guardian_profile_picture(id), data);
|
|
845
|
+
};
|
|
846
|
+
var updateGuardianDetails = async (id, data) => {
|
|
847
|
+
return apiPatch(ENDPOINTS.update_guardian_details(id), data);
|
|
848
|
+
};
|
|
849
|
+
var updateGuardianMobileNumber = async (id, data) => {
|
|
850
|
+
return apiPatch(ENDPOINTS.update_guardian_mobile_number(id), data);
|
|
851
|
+
};
|
|
852
|
+
var deleteStudentGuardian = async (id) => {
|
|
853
|
+
return apiDelete(ENDPOINTS.remove_guardian_link(id));
|
|
854
|
+
};
|
|
855
|
+
var findStudentGuardianAutofillDetails = async (data) => {
|
|
856
|
+
return apiPost(ENDPOINTS.find_guardian_autofill_details, data);
|
|
857
|
+
};
|
|
858
|
+
var createStudentLeaveRequest = async (data) => {
|
|
859
|
+
return apiPost(ENDPOINTS.create_leave_request, data);
|
|
860
|
+
};
|
|
861
|
+
var findStudentLeaveRequest = async (data) => {
|
|
862
|
+
return apiPost(ENDPOINTS.find_leave_request, data);
|
|
863
|
+
};
|
|
864
|
+
var updateStudentLeaveRequest = async (id, data) => {
|
|
865
|
+
return apiPatch(ENDPOINTS.update_leave_request(id), data);
|
|
866
|
+
};
|
|
867
|
+
var approveLeaveRequest = async (id, data) => {
|
|
868
|
+
return apiPatch(ENDPOINTS.approve_leave_request(id), data);
|
|
869
|
+
};
|
|
870
|
+
var deleteStudentLeaveRequest = async (id) => {
|
|
871
|
+
return apiDelete(ENDPOINTS.remove_leave_request(id));
|
|
872
|
+
};
|
|
873
|
+
var createStudentStopChangeRequest = async (data) => {
|
|
874
|
+
return apiPost(ENDPOINTS.create_stop_change_request, data);
|
|
875
|
+
};
|
|
876
|
+
var findStudentStopChangeRequest = async (data) => {
|
|
877
|
+
return apiPost(ENDPOINTS.find_stop_change_request, data);
|
|
878
|
+
};
|
|
879
|
+
var updateStudentStopChangeRequest = async (id, data) => {
|
|
880
|
+
return apiPatch(ENDPOINTS.update_stop_change_request(id), data);
|
|
881
|
+
};
|
|
882
|
+
var approveStopChangeRequest = async (id, data) => {
|
|
883
|
+
return apiPatch(ENDPOINTS.approve_stop_change_request(id), data);
|
|
884
|
+
};
|
|
885
|
+
var deleteStudentStopChangeRequest = async (id) => {
|
|
886
|
+
return apiDelete(ENDPOINTS.remove_stop_change_request(id));
|
|
887
|
+
};
|
|
888
|
+
export {
|
|
889
|
+
GuardianDetailsSchema,
|
|
890
|
+
GuardianMobileNumberSchema,
|
|
891
|
+
GuardianProfilePictureSchema,
|
|
892
|
+
StudentAddressBusStopAssignSchema,
|
|
893
|
+
StudentAddressQuerySchema,
|
|
894
|
+
StudentAddressSchema,
|
|
895
|
+
StudentGuardianAutofillQuerySchema,
|
|
896
|
+
StudentGuardianLinkQuerySchema,
|
|
897
|
+
StudentGuardianLinkSchema,
|
|
898
|
+
StudentLeaveRequestApprovalSchema,
|
|
899
|
+
StudentLeaveRequestQuerySchema,
|
|
900
|
+
StudentLeaveRequestSchema,
|
|
901
|
+
StudentNoRouteQuerySchema,
|
|
902
|
+
StudentProfilePictureSchema,
|
|
903
|
+
StudentQuerySchema,
|
|
904
|
+
StudentSchema,
|
|
905
|
+
StudentStopChangeRequestApprovalSchema,
|
|
906
|
+
StudentStopChangeRequestQuerySchema,
|
|
907
|
+
StudentStopChangeRequestSchema,
|
|
908
|
+
approveLeaveRequest,
|
|
909
|
+
approveStopChangeRequest,
|
|
910
|
+
createStudent,
|
|
911
|
+
createStudentAddress,
|
|
912
|
+
createStudentGuardianLink,
|
|
913
|
+
createStudentLeaveRequest,
|
|
914
|
+
createStudentStopChangeRequest,
|
|
915
|
+
deleteStudent,
|
|
916
|
+
deleteStudentAddress,
|
|
917
|
+
deleteStudentGuardian,
|
|
918
|
+
deleteStudentLeaveRequest,
|
|
919
|
+
deleteStudentStopChangeRequest,
|
|
920
|
+
findStudent,
|
|
921
|
+
findStudentAddress,
|
|
922
|
+
findStudentGuardianAutofillDetails,
|
|
923
|
+
findStudentGuardianLink,
|
|
924
|
+
findStudentLeaveRequest,
|
|
925
|
+
findStudentStopChangeRequest,
|
|
926
|
+
findStudentsWithNoRouteDrop,
|
|
927
|
+
findStudentsWithNoRoutePickup,
|
|
928
|
+
newStudentAddressPayload,
|
|
929
|
+
newStudentGuardianLinkPayload,
|
|
930
|
+
newStudentLeaveRequestPayload,
|
|
931
|
+
newStudentPayload,
|
|
932
|
+
newStudentStopChangeRequestPayload,
|
|
933
|
+
toStudentAddressPayload,
|
|
934
|
+
toStudentGuardianLinkPayload,
|
|
935
|
+
toStudentLeaveRequestPayload,
|
|
936
|
+
toStudentPayload,
|
|
937
|
+
toStudentStopChangeRequestPayload,
|
|
938
|
+
updateAddressBusStopAssign,
|
|
939
|
+
updateGuardianDetails,
|
|
940
|
+
updateGuardianMobileNumber,
|
|
941
|
+
updateGuardianProfilePicture,
|
|
942
|
+
updateProfilePicture,
|
|
943
|
+
updateStudent,
|
|
944
|
+
updateStudentAddress,
|
|
945
|
+
updateStudentGuardianLink,
|
|
946
|
+
updateStudentLeaveRequest,
|
|
947
|
+
updateStudentStopChangeRequest
|
|
948
|
+
};
|