vms-nest-prisma-api-document 215.0.0 → 216.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.
Files changed (99) hide show
  1. package/dist/core/Enums.d.ts +8 -1
  2. package/dist/core/Enums.js +9 -0
  3. package/dist/services/account/analytics/user_login_analytics_service.d.ts +3 -3
  4. package/dist/services/account/analytics/user_page_analytics_service.d.ts +1 -1
  5. package/dist/services/account/bookmark_service.d.ts +3 -3
  6. package/dist/services/account/notification_preferences.service.d.ts +18 -18
  7. package/dist/services/account/report_preferences.service.d.ts +7 -7
  8. package/dist/services/account/ticket_service.d.ts +1 -1
  9. package/dist/services/fleet/bus_mangement/bus_stop.d.ts +1 -1
  10. package/dist/services/fleet/bus_mangement/calender.d.ts +1 -1
  11. package/dist/services/fleet/bus_mangement/master_route.d.ts +1 -1
  12. package/dist/services/fleet/bus_mangement/notice_board.d.ts +1 -1
  13. package/dist/services/fleet/bus_mangement/student.d.ts +1 -1
  14. package/dist/services/fleet/fuel_management/fleet_fuel_daily_summary_service.d.ts +17 -17
  15. package/dist/services/fleet/fuel_management/fleet_fuel_refill_service.d.ts +47 -47
  16. package/dist/services/fleet/fuel_management/fleet_fuel_removal_service.d.ts +30 -30
  17. package/dist/services/fleet/issue_management/issue_management_service.d.ts +494 -0
  18. package/dist/services/fleet/issue_management/issue_management_service.js +559 -0
  19. package/dist/services/fleet/vendor_management/fleet_vendor_fuel_station.d.ts +290 -0
  20. package/dist/services/fleet/vendor_management/fleet_vendor_fuel_station.js +442 -0
  21. package/dist/services/fleet/vendor_management/fleet_vendor_service.d.ts +1220 -0
  22. package/dist/services/fleet/vendor_management/fleet_vendor_service.js +957 -0
  23. package/dist/services/fleet/vendor_management/fleet_vendor_service_center.d.ts +314 -0
  24. package/dist/services/fleet/vendor_management/fleet_vendor_service_center.js +447 -0
  25. package/dist/services/gps/features/geofence/gps_geofence_service.d.ts +3 -3
  26. package/dist/services/gps/features/geofence/gps_geofence_transaction_service.d.ts +6 -6
  27. package/dist/services/gps/features/geofence/gps_geofence_transaction_summary_service.d.ts +7 -7
  28. package/dist/services/gps/features/geofence/trip_geofence_to_geofence_service.d.ts +2 -2
  29. package/dist/services/gps/features/gps_live_track_share_link_service.d.ts +5 -5
  30. package/dist/services/gps/features/gps_track_history_share_link_service.d.ts +8 -8
  31. package/dist/services/main/devices/master_device_service.d.ts +1 -1
  32. package/dist/services/main/drivers/master_driver_service.d.ts +1 -1
  33. package/dist/services/main/sims/master_sim_service.d.ts +1 -1
  34. package/dist/services/main/users/auth_service.d.ts +1 -1
  35. package/dist/services/main/users/user_admin_service.d.ts +22 -22
  36. package/dist/services/main/users/user_organisation_service.d.ts +1 -1
  37. package/dist/services/main/users/user_service.d.ts +1 -1
  38. package/dist/services/main/vehicle/childs/vehicle_odometer_history.d.ts +1 -1
  39. package/dist/services/main/vehicle/master_vehicle_service.d.ts +1 -1
  40. package/dist/services/master/bus/master_class_service.d.ts +1 -1
  41. package/dist/services/master/bus/master_program_service.d.ts +1 -1
  42. package/dist/services/master/bus/master_relationship_service.d.ts +1 -1
  43. package/dist/services/master/bus/master_section_service.d.ts +1 -1
  44. package/dist/services/master/bus/master_semester_service.d.ts +1 -1
  45. package/dist/services/master/bus/master_stream_service.d.ts +1 -1
  46. package/dist/services/master/bus/master_year_service.d.ts +1 -1
  47. package/dist/services/master/device/master_device_manufacturer_service.d.ts +1 -1
  48. package/dist/services/master/device/master_device_model_service.d.ts +1 -1
  49. package/dist/services/master/device/master_device_type_service.d.ts +1 -1
  50. package/dist/services/master/expense/master_expense_name_service.d.ts +1 -1
  51. package/dist/services/master/expense/master_expense_type_service.d.ts +1 -1
  52. package/dist/services/master/expense/master_fuel_company_service.d.ts +6 -6
  53. package/dist/services/master/expense/master_vendor_document_type_service.d.ts +2 -2
  54. package/dist/services/master/expense/master_vendor_tag_service.d.ts +126 -0
  55. package/dist/services/master/expense/master_vendor_tag_service.js +307 -0
  56. package/dist/services/master/expense/master_vendor_type_service.d.ts +5 -5
  57. package/dist/services/master/fleet/master_fleet_incident_severity_service.d.ts +3 -3
  58. package/dist/services/master/fleet/master_fleet_incident_status_service.d.ts +1 -1
  59. package/dist/services/master/fleet/master_fleet_incident_type_service.d.ts +3 -3
  60. package/dist/services/master/fleet/master_fleet_insurance_claim_status_service.d.ts +1 -1
  61. package/dist/services/master/fleet/master_fleet_service_task_service.d.ts +1 -1
  62. package/dist/services/master/main/master_main_country_service.d.ts +1 -1
  63. package/dist/services/master/main/master_main_currency_service.d.ts +1 -1
  64. package/dist/services/master/main/master_main_date_format_service.d.ts +1 -1
  65. package/dist/services/master/main/master_main_industry_service.d.ts +1 -1
  66. package/dist/services/master/main/master_main_landmark_service.d.ts +5 -5
  67. package/dist/services/master/main/master_main_language_service.d.ts +1 -1
  68. package/dist/services/master/main/master_main_state_service.d.ts +1 -1
  69. package/dist/services/master/main/master_main_timezone_service.d.ts +1 -1
  70. package/dist/services/master/main/master_main_unit_distance_service.d.ts +1 -1
  71. package/dist/services/master/main/master_main_unit_mileage_service.d.ts +1 -1
  72. package/dist/services/master/main/master_main_unit_volume_service.d.ts +1 -1
  73. package/dist/services/master/organisation/organisation_branch_service.d.ts +1 -1
  74. package/dist/services/master/organisation/organisation_color_service.d.ts +1 -1
  75. package/dist/services/master/organisation/organisation_group_service.d.ts +1 -1
  76. package/dist/services/master/organisation/organisation_sub_company_service.d.ts +1 -1
  77. package/dist/services/master/organisation/organisation_tag_service.d.ts +1 -1
  78. package/dist/services/master/spare_part/master_spare_part_category_service.d.ts +1 -1
  79. package/dist/services/master/spare_part/master_spare_part_sub_category_service.d.ts +1 -1
  80. package/dist/services/master/spare_part/master_spare_part_unit_service.d.ts +1 -1
  81. package/dist/services/master/trip/master_trip_party_type_service.d.ts +1 -1
  82. package/dist/services/master/tyre/master_tyre_grade_service.d.ts +3 -3
  83. package/dist/services/master/tyre/master_tyre_make_service.d.ts +1 -1
  84. package/dist/services/master/tyre/master_tyre_model_service.d.ts +3 -3
  85. package/dist/services/master/user/master_user_role_service.d.ts +1 -1
  86. package/dist/services/master/user/master_user_status_service.d.ts +1 -1
  87. package/dist/services/master/vehicle/master_vehicle_associated_to_service.d.ts +1 -1
  88. package/dist/services/master/vehicle/master_vehicle_document_type_service.d.ts +1 -1
  89. package/dist/services/master/vehicle/master_vehicle_fuel_removal_reason_service.d.ts +3 -3
  90. package/dist/services/master/vehicle/master_vehicle_fuel_type_service.d.ts +1 -1
  91. package/dist/services/master/vehicle/master_vehicle_fuel_unit_service.d.ts +1 -1
  92. package/dist/services/master/vehicle/master_vehicle_make_service.d.ts +1 -1
  93. package/dist/services/master/vehicle/master_vehicle_model_service.d.ts +1 -1
  94. package/dist/services/master/vehicle/master_vehicle_ownership_type_service.d.ts +1 -1
  95. package/dist/services/master/vehicle/master_vehicle_status_type_service.d.ts +1 -1
  96. package/dist/services/master/vehicle/master_vehicle_sub_model_service.d.ts +1 -1
  97. package/dist/services/master/vehicle/master_vehicle_type_service.d.ts +1 -1
  98. package/dist/{user_organisation_service-Dn5ij2oU.d.ts → user_organisation_service-C186BM9A.d.ts} +59 -59
  99. package/package.json +1 -1
@@ -0,0 +1,957 @@
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 apiGet = async (url, params) => {
13
+ const response = await getAxiosInstance().get(url, { params });
14
+ return response.data;
15
+ };
16
+ var apiPost = async (url, data) => {
17
+ const response = await getAxiosInstance().post(url, data);
18
+ return response.data;
19
+ };
20
+ var apiPatch = async (url, data) => {
21
+ const response = await getAxiosInstance().patch(url, data);
22
+ return response.data;
23
+ };
24
+ var apiDelete = async (url) => {
25
+ const response = await getAxiosInstance().delete(url);
26
+ return response.data;
27
+ };
28
+
29
+ // src/services/fleet/vendor_management/fleet_vendor_service.ts
30
+ import { z as z3 } from "zod";
31
+
32
+ // src/zod_utils/zod_utils.ts
33
+ import { z } from "zod";
34
+
35
+ // src/core/BaseResponse.ts
36
+ var r_log = (data = {}) => {
37
+ return data;
38
+ };
39
+
40
+ // src/zod_utils/zod_utils.ts
41
+ var handleNullOrUndefined = (value) => typeof value === "string" ? value : "";
42
+ var stringMandatory = (fieldName, min = 1, max = 100) => {
43
+ 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);
44
+ return schema;
45
+ };
46
+ var stringOptional = (fieldName, min = 0, max = 255, defaultValue = "") => {
47
+ 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);
48
+ return schema;
49
+ };
50
+ var stringArrayOptional = (fieldName, min = 0, max = 100, defaultValue = [], unique = false) => {
51
+ const schema = z.array(z.string().trim(), {
52
+ invalid_type_error: `${fieldName} must be an array of strings.`
53
+ }).min(min, `${fieldName} must contain at least ${min} items.`).max(max, `${fieldName} must contain at most ${max} items.`);
54
+ if (unique) {
55
+ schema.refine(
56
+ (arr) => new Set(arr).size === arr.length,
57
+ `${fieldName} must contain unique values.`
58
+ );
59
+ }
60
+ return schema.optional().default(defaultValue);
61
+ };
62
+ var numberMandatory = (fieldName, min = 1, max = 1e14, defaultValue = 0) => {
63
+ return z.preprocess(
64
+ (val) => {
65
+ if (val === null || val === void 0 || val === "") {
66
+ return defaultValue;
67
+ }
68
+ if (typeof val === "string" && !isNaN(Number(val))) {
69
+ return Number(val);
70
+ }
71
+ return val;
72
+ },
73
+ 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}.`)
74
+ );
75
+ };
76
+ var numberOptional = (fieldName, min = 0, max = 1e14, defaultValue = 0) => {
77
+ return z.preprocess(
78
+ (val) => typeof val === "string" && val.trim() !== "" ? Number(val) : val,
79
+ 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)
80
+ );
81
+ };
82
+ var doubleOptionalLatLng = (fieldName, defaultValue = 0) => {
83
+ return z.preprocess(
84
+ (val) => {
85
+ if (typeof val === "string") {
86
+ val = parseFloat(val);
87
+ }
88
+ if (typeof val === "number") {
89
+ return parseFloat(val.toFixed(6));
90
+ }
91
+ return val;
92
+ },
93
+ 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)
94
+ ).optional();
95
+ };
96
+ var enumMandatory = (fieldName, enumType, defaultValue) => {
97
+ return z.union([
98
+ z.nativeEnum(enumType, {
99
+ invalid_type_error: `${fieldName} should be one of the following values: ${Object.values(
100
+ enumType
101
+ ).join(", ")}.`
102
+ }),
103
+ z.string().refine((val) => Object.values(enumType).includes(val), {
104
+ message: `${fieldName} should be one of the following values: ${Object.values(
105
+ enumType
106
+ ).join(", ")}.`
107
+ })
108
+ ]).default(defaultValue).refine((val) => val !== "", {
109
+ message: `Please select ${fieldName}.`
110
+ });
111
+ };
112
+ var enumOptional = (fieldName, enumType, defaultValue) => {
113
+ return z.nativeEnum(enumType, {
114
+ invalid_type_error: `${fieldName} must be an array containing only the following values: ${Object.values(
115
+ enumType
116
+ ).join(", ")}.`
117
+ }).optional().default(() => defaultValue);
118
+ };
119
+ var getAllEnums = (enumType) => {
120
+ return Object.values(enumType);
121
+ };
122
+ var enumArrayOptional = (fieldName, enumType, defaultValue = getAllEnums(enumType), min = 0, max = 100, unique = false) => {
123
+ const schema = z.array(z.nativeEnum(enumType), {
124
+ invalid_type_error: `${fieldName} must be an array containing only the following values: ${Object.values(
125
+ enumType
126
+ ).join(", ")}.`
127
+ }).min(min, `${fieldName} must contain at least ${min} items.`).max(max, `${fieldName} must contain at most ${max} items.`);
128
+ if (unique) {
129
+ schema.refine(
130
+ (arr) => new Set(arr).size === arr.length,
131
+ `${fieldName} must contain unique values.`
132
+ );
133
+ }
134
+ return schema.optional().default(() => defaultValue);
135
+ };
136
+ var dateOptional = (fieldName, minDate, maxDate, defaultValue = (/* @__PURE__ */ new Date()).toISOString()) => {
137
+ const schema = z.string().refine((val) => !isNaN(Date.parse(val)), {
138
+ message: `${fieldName} must be a valid ISO date.`
139
+ }).optional().default(defaultValue);
140
+ if (minDate) {
141
+ schema.refine((val) => new Date(val) >= new Date(minDate), {
142
+ message: `${fieldName} must be after ${minDate}.`
143
+ });
144
+ }
145
+ if (maxDate) {
146
+ schema.refine((val) => new Date(val) <= new Date(maxDate), {
147
+ message: `${fieldName} must be before ${maxDate}.`
148
+ });
149
+ }
150
+ return schema;
151
+ };
152
+ var dynamicJsonSchema = (fieldName, defaultValue = {}) => z.record(z.any()).optional().default(() => defaultValue);
153
+ var nestedArrayOfObjectsOptional = (fieldName, schema, defaultValue = [], min = 0, max) => {
154
+ let arraySchema = z.array(schema, {
155
+ invalid_type_error: `${fieldName} must be an array of objects.`
156
+ }).min(min, `${fieldName} must contain at least ${min} items.`);
157
+ if (max !== void 0) {
158
+ arraySchema = arraySchema.max(
159
+ max,
160
+ `${fieldName} must contain at most ${max} items.`
161
+ );
162
+ }
163
+ return arraySchema.optional().default(() => defaultValue);
164
+ };
165
+ var single_select_mandatory = (fieldName) => {
166
+ const schema = z.string().trim().nonempty(`Please select ${fieldName}.`).transform(handleNullOrUndefined);
167
+ return schema;
168
+ };
169
+ var single_select_optional = (fieldName) => {
170
+ r_log(fieldName);
171
+ const schema = z.string().trim().transform(handleNullOrUndefined);
172
+ return schema;
173
+ };
174
+ var multi_select_optional = (fieldName, max = 1e3, defaultValue = []) => {
175
+ const schema = z.array(
176
+ z.string({
177
+ invalid_type_error: `${fieldName} must be an array of strings.`
178
+ })
179
+ ).max(
180
+ max,
181
+ `Please select at most ${max} ${fieldName}${max > 1 ? "s" : ""}.`
182
+ );
183
+ return schema.optional().default(defaultValue);
184
+ };
185
+
186
+ // src/zod_utils/zod_base_schema.ts
187
+ import { z as z2 } from "zod";
188
+
189
+ // src/core/Enums.ts
190
+ var PAGING = /* @__PURE__ */ ((PAGING2) => {
191
+ PAGING2["Yes"] = "Yes";
192
+ PAGING2["No"] = "No";
193
+ return PAGING2;
194
+ })(PAGING || {});
195
+ var LoadParents = /* @__PURE__ */ ((LoadParents2) => {
196
+ LoadParents2["Yes"] = "Yes";
197
+ LoadParents2["No"] = "No";
198
+ LoadParents2["Custom"] = "Custom";
199
+ return LoadParents2;
200
+ })(LoadParents || {});
201
+ var LoadChild = /* @__PURE__ */ ((LoadChild2) => {
202
+ LoadChild2["No"] = "No";
203
+ LoadChild2["Yes"] = "Yes";
204
+ LoadChild2["Count"] = "Count";
205
+ LoadChild2["Custom"] = "Custom";
206
+ LoadChild2["Direct"] = "Direct";
207
+ return LoadChild2;
208
+ })(LoadChild || {});
209
+ var LoadChildCount = /* @__PURE__ */ ((LoadChildCount2) => {
210
+ LoadChildCount2["No"] = "No";
211
+ LoadChildCount2["Yes"] = "Yes";
212
+ LoadChildCount2["Custom"] = "Custom";
213
+ return LoadChildCount2;
214
+ })(LoadChildCount || {});
215
+ var OrderBy = /* @__PURE__ */ ((OrderBy2) => {
216
+ OrderBy2["asc"] = "asc";
217
+ OrderBy2["desc"] = "desc";
218
+ return OrderBy2;
219
+ })(OrderBy || {});
220
+ var LoginFrom = /* @__PURE__ */ ((LoginFrom2) => {
221
+ LoginFrom2["Web"] = "Web";
222
+ LoginFrom2["Android"] = "Android";
223
+ LoginFrom2["IPhone"] = "IPhone";
224
+ LoginFrom2["AndroidPWA"] = "AndroidPWA";
225
+ LoginFrom2["iOSPWA"] = "iOSPWA";
226
+ return LoginFrom2;
227
+ })(LoginFrom || {});
228
+ var Status = /* @__PURE__ */ ((Status2) => {
229
+ Status2["Active"] = "Active";
230
+ Status2["Inactive"] = "Inactive";
231
+ return Status2;
232
+ })(Status || {});
233
+ var FileType = /* @__PURE__ */ ((FileType2) => {
234
+ FileType2["NoFile"] = "NoFile";
235
+ FileType2["Image"] = "Image";
236
+ FileType2["Video"] = "Video";
237
+ FileType2["PDF"] = "PDF";
238
+ return FileType2;
239
+ })(FileType || {});
240
+ var YesNo = /* @__PURE__ */ ((YesNo2) => {
241
+ YesNo2["Yes"] = "Yes";
242
+ YesNo2["No"] = "No";
243
+ return YesNo2;
244
+ })(YesNo || {});
245
+ var FleetVendorAddressLabel = /* @__PURE__ */ ((FleetVendorAddressLabel2) => {
246
+ FleetVendorAddressLabel2["HQ"] = "HQ";
247
+ FleetVendorAddressLabel2["BILLING"] = "BILLING";
248
+ FleetVendorAddressLabel2["SHIPPING"] = "SHIPPING";
249
+ FleetVendorAddressLabel2["WORKSHOP"] = "WORKSHOP";
250
+ FleetVendorAddressLabel2["OTHER"] = "OTHER";
251
+ return FleetVendorAddressLabel2;
252
+ })(FleetVendorAddressLabel || {});
253
+
254
+ // src/zod_utils/zod_base_schema.ts
255
+ var OrderBySchema = z2.array(
256
+ z2.object({
257
+ name: stringMandatory("Order Field Name", 0, 255),
258
+ field: stringMandatory("Order Field Name", 0, 255),
259
+ direction: enumMandatory("Order Direction", OrderBy, "asc" /* asc */)
260
+ })
261
+ );
262
+ var BaseFileSchema = z2.object({
263
+ usage_type: stringMandatory("Usage Type", 3, 100),
264
+ file_type: enumMandatory("File Type", FileType, "Image" /* Image */),
265
+ file_url: stringOptional("File URL", 0, 300),
266
+ file_key: stringOptional("File Key", 0, 300),
267
+ file_name: stringOptional("File Name", 0, 300),
268
+ file_description: stringOptional("File Description", 0, 2e3),
269
+ file_size: numberOptional("File Size"),
270
+ file_metadata: dynamicJsonSchema("File Metadata", {}),
271
+ status: enumMandatory("Status", Status, "Active" /* Active */)
272
+ });
273
+ var BaseQuerySchema = z2.object({
274
+ search: stringOptional("Search", 0, 255, ""),
275
+ status: enumArrayOptional("Status", Status, getAllEnums(Status), 0, 10, true),
276
+ paging: enumOptional("Paging", PAGING, "Yes" /* Yes */),
277
+ page_count: numberOptional("Page Count", 0, 1e3, 100),
278
+ page_index: numberOptional("Page Index", 0, 1e3, 0),
279
+ load_parents: enumOptional("Load Parents", LoadParents, "No" /* No */),
280
+ load_parents_list: stringArrayOptional("Load Parents List"),
281
+ load_child: enumOptional("Load Child", LoadChild, "No" /* No */),
282
+ load_child_list: stringArrayOptional("Load Child List"),
283
+ load_child_count: enumOptional(
284
+ "Load Child",
285
+ LoadChildCount,
286
+ "No" /* No */
287
+ ),
288
+ load_child_count_list: stringArrayOptional("Load Child List"),
289
+ include_details: dynamicJsonSchema("Include Details", {}),
290
+ where_relations: dynamicJsonSchema("Where Relations", {}),
291
+ order_by: OrderBySchema.optional().default([]),
292
+ include_master_data: enumOptional("Include Master Data", YesNo, "No" /* No */),
293
+ date_format_id: single_select_optional("MasterMainDateFormat"),
294
+ time_zone_id: single_select_optional("MasterMainTimeZone")
295
+ });
296
+ var FilePresignedUrlSchema = z2.object({
297
+ file_name: stringMandatory("File Name", 1, 255),
298
+ file_type: enumMandatory("File Type", FileType, "Image" /* Image */)
299
+ });
300
+ var MongoBaseQuerySchema = z2.object({
301
+ search: stringOptional("Search", 0, 255, ""),
302
+ paging: enumOptional("Paging", PAGING, "Yes" /* Yes */),
303
+ page_count: numberOptional("Page Count", 0, 1e3, 100),
304
+ page_index: numberOptional("Page Index", 0, 1e3, 0),
305
+ login_from: enumMandatory("Login From", LoginFrom, "Web" /* Web */),
306
+ date_format_id: single_select_optional("MasterMainDateFormat"),
307
+ // ✅ Single-selection -> MasterMainDateFormat
308
+ time_zone_id: single_select_optional("MasterMainTimeZone")
309
+ // ✅ Single-selection -> MasterMainTimeZone
310
+ });
311
+
312
+ // src/services/fleet/vendor_management/fleet_vendor_service.ts
313
+ var URL = "fleet/vendor_management/fleet_vendor";
314
+ var ENDPOINTS = {
315
+ // AWS S3 PRESIGNED
316
+ vendor_logo_presigned_url: (fileName) => `${URL}/vendor_logo_presigned_url/${fileName}`,
317
+ vendor_contact_person_logo_presigned_url: (fileName) => `${URL}/vendor_contact_person_logo_presigned_url/${fileName}`,
318
+ presigned_url_file: `${URL}/presigned_url`,
319
+ find: `${URL}/search`,
320
+ create: `${URL}`,
321
+ update: (id) => `${URL}/${id}`,
322
+ delete: (id) => `${URL}/${id}`,
323
+ update_vendor_logo: (id) => `${URL}/update_vendor_logo/${id}`,
324
+ delete_vendor_logo: (id) => `${URL}/delete_vendor_logo/${id}`,
325
+ // Address
326
+ create_address: `${URL}/address`,
327
+ find_address: `${URL}/address/search`,
328
+ update_address: (id) => `${URL}/address/${id}`,
329
+ remove_address: (id) => `${URL}/address/${id}`,
330
+ // Bank Account
331
+ create_bank_account: `${URL}/bank_account`,
332
+ find_bank_account: `${URL}/bank_account/search`,
333
+ update_bank_account: (id) => `${URL}/bank_account/${id}`,
334
+ remove_bank_account: (id) => `${URL}/bank_account/${id}`,
335
+ // Contact Person
336
+ create_contact_person: `${URL}/contact_person`,
337
+ find_contact_person: `${URL}/contact_person/search`,
338
+ update_contact_person: (id) => `${URL}/contact_person/${id}`,
339
+ remove_contact_person: (id) => `${URL}/contact_person/${id}`,
340
+ update_vendor_contact_person_logo: (id) => `${URL}/update_vendor_contact_person_logo/${id}`,
341
+ delete_vendor_contact_person_logo: (id) => `${URL}/delete_vendor_contact_person_logo/${id}`,
342
+ // Review
343
+ create_review: `${URL}/review`,
344
+ find_review: `${URL}/review/search`,
345
+ update_review: (id) => `${URL}/review/${id}`,
346
+ remove_review: (id) => `${URL}/review/${id}`,
347
+ // Document
348
+ create_document: `${URL}/document`,
349
+ find_document: `${URL}/document/search`,
350
+ update_document: (id) => `${URL}/document/${id}`,
351
+ remove_document: (id) => `${URL}/document/${id}`,
352
+ // File
353
+ create_file: `${URL}/create_file`,
354
+ remove_file: (id) => `${URL}/remove_file/${id}`
355
+ };
356
+ var FleetVendorSchema = z3.object({
357
+ organisation_id: single_select_mandatory("UserOrganisation"),
358
+ // ✅ Single-Selection -> UserOrganisation
359
+ vendor_name: stringMandatory("Vendor Name", 3, 100),
360
+ vendor_code: stringOptional("Vendor Name", 0, 100),
361
+ business_mobile: stringOptional("Business Mobile", 0, 15),
362
+ business_email: stringOptional("Business Email", 0, 100),
363
+ logo_url: stringOptional("Logo URL", 0, 300),
364
+ logo_key: stringOptional("Logo Key", 0, 300),
365
+ logo_name: stringOptional("Logo Name", 0, 300),
366
+ organisation_name: stringOptional("Organisation Name", 0, 150),
367
+ gst_number: stringOptional("GST Number", 0, 15),
368
+ pan_number: stringOptional("PAN Number", 0, 10),
369
+ tax_id_number: stringOptional("Tax ID Number", 0, 30),
370
+ vat_number: stringOptional("VAT Number", 0, 30),
371
+ business_registration_number: stringOptional(
372
+ "Business Registration Number",
373
+ 0,
374
+ 50
375
+ ),
376
+ payment_terms: stringOptional("Payment Terms", 0, 2e3),
377
+ financial_notes: stringOptional("Financial Notes", 0, 2e3),
378
+ // Additional
379
+ additional_details_1: stringOptional("Additional Details 1", 0, 2e3),
380
+ additional_details_2: stringOptional("Additional Details 2", 0, 2e3),
381
+ additional_details_3: stringOptional("Additional Details 3", 0, 2e3),
382
+ status: enumMandatory("Status", Status, "Active" /* Active */),
383
+ vendor_type_ids: multi_select_optional("MasterVendorType"),
384
+ // Multi selection -> MasterVendorType
385
+ vendor_tag_ids: multi_select_optional("MasterVendorTag")
386
+ // Multi selection -> MasterVendorTag
387
+ });
388
+ var FleetVendorLogoSchema = z3.object({
389
+ logo_url: stringMandatory("Logo URL", 0, 300),
390
+ logo_key: stringMandatory("Logo Key", 0, 300),
391
+ logo_name: stringMandatory("Logo Name", 0, 300)
392
+ });
393
+ var FleetVendorQuerySchema = BaseQuerySchema.extend({
394
+ organisation_ids: multi_select_optional("UserOrganisation"),
395
+ // ✅ Multi-Selection -> UserOrganisation
396
+ vendor_ids: multi_select_optional("FleetVendor")
397
+ // ✅ Multi-Selection -> FleetVendor
398
+ });
399
+ var FleetVendorAddressSchema = z3.object({
400
+ organisation_id: single_select_mandatory("UserOrganisation"),
401
+ // ✅ Single-Selection -> UserOrganisation
402
+ vendor_id: single_select_mandatory("FleetVendor"),
403
+ // ✅ Single-Selection -> FleetVendor
404
+ vendor_address_label: enumMandatory(
405
+ "Fleet Vendor Address Label",
406
+ FleetVendorAddressLabel,
407
+ "OTHER" /* OTHER */
408
+ ),
409
+ address_line1: stringOptional("Address Line 1", 0, 150),
410
+ address_line2: stringOptional("Address Line 2", 0, 150),
411
+ locality_landmark: stringOptional("Locality / Landmark", 0, 150),
412
+ neighborhood: stringOptional("Neighborhood", 0, 100),
413
+ town_city: stringOptional("Town / City", 0, 100),
414
+ district_county: stringOptional("District / County", 0, 100),
415
+ state_province_region: stringOptional("State / Province / Region", 0, 100),
416
+ postal_code: stringOptional("Postal Code", 0, 20),
417
+ country: stringOptional("Country", 0, 100),
418
+ country_code: stringOptional("Country Code", 0, 5),
419
+ // Location Details
420
+ latitude: doubleOptionalLatLng("Latitude"),
421
+ longitude: doubleOptionalLatLng("Longitude"),
422
+ google_location: stringOptional("Google Location", 0, 500),
423
+ is_default: enumMandatory("Is Default", YesNo, "No" /* No */),
424
+ notes: stringOptional("Notes", 0, 2e3),
425
+ status: enumMandatory("Status", Status, "Active" /* Active */)
426
+ });
427
+ var FleetVendorAddressQuerySchema = BaseQuerySchema.extend({
428
+ organisation_ids: multi_select_optional("UserOrganisation"),
429
+ // ✅ Multi-Selection -> UserOrganisation
430
+ vendor_ids: multi_select_optional("FleetVendor"),
431
+ // ✅ Multi-Selection -> FleetVendor
432
+ landmark_ids: multi_select_optional("MasterMainLandMark"),
433
+ // ✅ Multi-Selection -> MasterMainLandMark
434
+ vendor_address_ids: multi_select_optional("FleetVendorAddress"),
435
+ // ✅ Multi-Selection -> FleetVendorAddress
436
+ vendor_address_label: enumArrayOptional(
437
+ "Vendor Address Label",
438
+ FleetVendorAddressLabel,
439
+ getAllEnums(FleetVendorAddressLabel)
440
+ ),
441
+ is_default: enumArrayOptional("Is Default", YesNo, getAllEnums(YesNo))
442
+ });
443
+ var FleetVendorBankAccountSchema = z3.object({
444
+ organisation_id: single_select_mandatory("UserOrganisation"),
445
+ // ✅ Single-Selection -> UserOrganisation
446
+ vendor_id: single_select_mandatory("FleetVendor"),
447
+ // ✅ Single-Selection -> FleetVendor
448
+ bank_name: stringOptional("Bank Name", 0, 100),
449
+ bank_branch_name: stringOptional("Bank Branch Name", 0, 100),
450
+ bank_account_name: stringOptional("Bank Account Name", 0, 100),
451
+ bank_account_number: stringOptional("Bank Account Number", 0, 34),
452
+ ifsc_code: stringOptional("IFSC Code", 0, 20),
453
+ swift_code: stringOptional("Swift Code", 0, 20),
454
+ iban_number: stringOptional("IBAN Number", 0, 34),
455
+ upi_id: stringOptional("UPI ID", 0, 100),
456
+ is_primary: enumMandatory("Is Primary", YesNo, "No" /* No */),
457
+ notes: stringOptional("Notes", 0, 2e3),
458
+ status: enumMandatory("Status", Status, "Active" /* Active */)
459
+ });
460
+ var FleetVendorBankAccountQuerySchema = BaseQuerySchema.extend({
461
+ organisation_ids: multi_select_optional("UserOrganisation"),
462
+ // ✅ Multi-Selection -> UserOrganisation
463
+ vendor_ids: multi_select_optional("FleetVendor"),
464
+ // ✅ Multi-Selection -> FleetVendor
465
+ vendor_bank_account_ids: multi_select_optional("FleetVendorBankAccount"),
466
+ // ✅ Multi-Selection -> FleetVendorBankAccount
467
+ is_primary: enumArrayOptional("Is Primary", YesNo, getAllEnums(YesNo))
468
+ });
469
+ var FleetVendorContactPersonsSchema = z3.object({
470
+ organisation_id: single_select_mandatory("UserOrganisation"),
471
+ // ✅ Single-Selection -> UserOrganisation
472
+ vendor_id: single_select_mandatory("FleetVendor"),
473
+ // ✅ Single-Selection -> FleetVendor
474
+ image_url: stringOptional("Image URL", 0, 300),
475
+ image_key: stringOptional("Image Key", 0, 300),
476
+ image_name: stringOptional("Image Name", 0, 300),
477
+ name: stringMandatory("Name", 3, 100),
478
+ mobile: stringOptional("Mobile", 0, 15),
479
+ alternative_mobile: stringOptional("Alternative Mobile", 0, 15),
480
+ email: stringOptional("Email", 0, 100),
481
+ designation: stringOptional("Designation", 0, 50),
482
+ branch_name: stringOptional("Branch Name", 0, 100),
483
+ preferred_language: stringOptional("Preferred Language", 0, 10),
484
+ is_primary: enumMandatory("Is Primary", YesNo, "No" /* No */),
485
+ is_active_contact: enumMandatory("Is Active Contact", YesNo, "Yes" /* Yes */),
486
+ notes: stringOptional("Notes", 0, 2e3),
487
+ status: enumMandatory("Status", Status, "Active" /* Active */)
488
+ });
489
+ var FleetVendorContactPersonsLogoSchema = z3.object({
490
+ image_url: stringMandatory("Image URL", 0, 300),
491
+ image_key: stringMandatory("Image Key", 0, 300),
492
+ image_name: stringMandatory("Image Name", 0, 300)
493
+ });
494
+ var FleetVendorContactPersonsQuerySchema = BaseQuerySchema.extend({
495
+ organisation_ids: multi_select_optional("UserOrganisation"),
496
+ // ✅ Multi-Selection -> UserOrganisation
497
+ vendor_ids: multi_select_optional("FleetVendor"),
498
+ // ✅ Multi-Selection -> FleetVendor
499
+ contact_person_ids: multi_select_optional("FleetVendorContactPersons"),
500
+ // ✅ Multi-Selection -> FleetVendorContactPersons
501
+ is_primary: enumArrayOptional("Is Primary", YesNo, getAllEnums(YesNo)),
502
+ is_active_contact: enumArrayOptional(
503
+ "Is Active Contact",
504
+ YesNo,
505
+ getAllEnums(YesNo)
506
+ )
507
+ });
508
+ var FleetVendorReviewSchema = z3.object({
509
+ organisation_id: single_select_mandatory("UserOrganisation"),
510
+ // ✅ Single-Selection -> UserOrganisation
511
+ vendor_id: single_select_mandatory("FleetVendor"),
512
+ // ✅ Single-Selection -> FleetVendor
513
+ user_id: single_select_optional("User"),
514
+ // ✅ Single-Selection -> User
515
+ rating: numberMandatory("Rating"),
516
+ comment: stringOptional("Comment", 0, 2e3),
517
+ status: enumMandatory("Status", Status, "Active" /* Active */)
518
+ });
519
+ var FleetVendorReviewQuerySchema = BaseQuerySchema.extend({
520
+ organisation_ids: multi_select_optional("UserOrganisation"),
521
+ // ✅ Multi-Selection -> UserOrganisation
522
+ vendor_ids: multi_select_optional("FleetVendor"),
523
+ // ✅ Multi-Selection -> FleetVendor
524
+ user_ids: multi_select_optional("User"),
525
+ // ✅ Multi-Selection -> User
526
+ vendor_review_ids: multi_select_optional("FleetVendorReview")
527
+ // ✅ Multi-Selection -> FleetVendorReview
528
+ });
529
+ var FleetVendorDocumentFileSchema = BaseFileSchema.extend({
530
+ organisation_id: single_select_optional("UserOrganisation"),
531
+ // ✅ Single-Selection -> UserOrganisation
532
+ fleet_vendor_document_id: single_select_optional("FleetVendorDocument")
533
+ // ✅ Single-Selection -> FleetVendorDocument
534
+ });
535
+ var FleetVendorDocumentSchema = z3.object({
536
+ organisation_id: single_select_mandatory("UserOrganisation"),
537
+ // ✅ Single-Selection -> UserOrganisation
538
+ user_id: single_select_optional("User"),
539
+ // ✅ Single-Selection -> User
540
+ vendor_id: single_select_mandatory("FleetVendor"),
541
+ // ✅ Single-Selection -> FleetVendor
542
+ document_type_id: single_select_mandatory("MasterVendorDocumentType"),
543
+ // ✅ Single-Selection -> MasterVendorDocumentType
544
+ document_name: stringOptional("Document Name", 0, 150),
545
+ document_number: stringOptional("Document Number", 0, 150),
546
+ issuing_authority: stringOptional("Issuing Authority", 0, 150),
547
+ issue_date: dateOptional("Issue Date"),
548
+ expiry_date: dateOptional("Expiry Date"),
549
+ remarks: stringOptional("Remarks", 0, 150),
550
+ FleetVendorDocumentFileSchema: nestedArrayOfObjectsOptional(
551
+ "FleetVendorDocumentFileSchema",
552
+ FleetVendorDocumentFileSchema,
553
+ []
554
+ ),
555
+ status: enumMandatory("Status", Status, "Active" /* Active */)
556
+ });
557
+ var FleetVendorDocumentQuerySchema = BaseQuerySchema.extend({
558
+ organisation_ids: multi_select_optional("UserOrganisation"),
559
+ // ✅ Multi-selection -> UserOrganisation
560
+ user_ids: multi_select_optional("User"),
561
+ // ✅ Multi-selection -> User
562
+ vendor_ids: multi_select_optional("FleetVendor"),
563
+ // ✅ Multi-selection -> FleetVendor
564
+ document_type_ids: multi_select_optional("MasterVendorDocumentType"),
565
+ // ✅ Multi-selection -> MasterVendorDocumentType
566
+ fleet_vendor_document_ids: multi_select_optional("FleetVendorDocument")
567
+ // ✅ Multi-selection -> FleetVendorDocument
568
+ });
569
+ var toFleetVendorPayload = (vendor) => ({
570
+ vendor_name: vendor.vendor_name || "",
571
+ vendor_code: vendor.vendor_code || "",
572
+ business_mobile: vendor.business_mobile || "",
573
+ business_email: vendor.business_email || "",
574
+ logo_url: vendor.logo_url || "",
575
+ logo_key: vendor.logo_key || "",
576
+ logo_name: vendor.logo_name || "",
577
+ // Business Details
578
+ organisation_name: vendor.organisation_name || "",
579
+ gst_number: vendor.gst_number || "",
580
+ pan_number: vendor.pan_number || "",
581
+ tax_id_number: vendor.tax_id_number || "",
582
+ vat_number: vendor.vat_number || "",
583
+ business_registration_number: vendor.business_email || "",
584
+ // Financial Details
585
+ payment_terms: vendor.payment_terms || "",
586
+ financial_notes: vendor.financial_notes || "",
587
+ // Additional Information
588
+ additional_details_1: vendor.additional_details_1 || "",
589
+ additional_details_2: vendor.additional_details_2 || "",
590
+ additional_details_3: vendor.additional_details_3 || "",
591
+ // Relations
592
+ organisation_id: vendor.organisation_id || "",
593
+ vendor_type_ids: vendor.FleetVendorTypeLink?.map((v) => v.vendor_type_id) || [],
594
+ vendor_tag_ids: vendor.FleetVendorTagLink?.map((v) => v.vendor_tag_id) || [],
595
+ status: "Active" /* Active */
596
+ });
597
+ var newFleetVendorPayload = () => ({
598
+ vendor_name: "",
599
+ vendor_code: "",
600
+ business_mobile: "",
601
+ business_email: "",
602
+ logo_url: "",
603
+ logo_key: "",
604
+ logo_name: "",
605
+ organisation_name: "",
606
+ gst_number: "",
607
+ pan_number: "",
608
+ tax_id_number: "",
609
+ vat_number: "",
610
+ business_registration_number: "",
611
+ payment_terms: "",
612
+ financial_notes: "",
613
+ additional_details_1: "",
614
+ additional_details_2: "",
615
+ additional_details_3: "",
616
+ organisation_id: "",
617
+ vendor_type_ids: [],
618
+ vendor_tag_ids: [],
619
+ status: "Active" /* Active */
620
+ });
621
+ var toFleetVendorAddressPayload = (vendorAddress) => ({
622
+ vendor_address_label: vendorAddress.vendor_address_label || "HQ" /* HQ */,
623
+ // Address Details
624
+ address_line1: vendorAddress.address_line1 || "",
625
+ address_line2: vendorAddress.address_line2 || "",
626
+ locality_landmark: vendorAddress.locality_landmark || "",
627
+ neighborhood: vendorAddress.neighborhood || "",
628
+ town_city: vendorAddress.town_city || "",
629
+ district_county: vendorAddress.district_county || "",
630
+ state_province_region: vendorAddress.state_province_region || "",
631
+ postal_code: vendorAddress.postal_code || "",
632
+ country: vendorAddress.country || "",
633
+ country_code: vendorAddress.country_code || "",
634
+ // Location Details
635
+ latitude: vendorAddress.latitude || 0,
636
+ longitude: vendorAddress.longitude || 0,
637
+ google_location: vendorAddress.google_location || "",
638
+ organisation_id: vendorAddress.organisation_id || "",
639
+ vendor_id: vendorAddress.vendor_id || "",
640
+ is_default: vendorAddress.is_default || "No" /* No */,
641
+ notes: vendorAddress.notes || "",
642
+ status: "Active" /* Active */
643
+ });
644
+ var newFleetVendorAddressPayload = () => ({
645
+ vendor_address_label: "HQ" /* HQ */,
646
+ address_line1: "",
647
+ address_line2: "",
648
+ locality_landmark: "",
649
+ neighborhood: "",
650
+ town_city: "",
651
+ district_county: "",
652
+ state_province_region: "",
653
+ postal_code: "",
654
+ country: "",
655
+ country_code: "",
656
+ latitude: 0,
657
+ longitude: 0,
658
+ google_location: "",
659
+ organisation_id: "",
660
+ vendor_id: "",
661
+ is_default: "Yes" /* Yes */,
662
+ notes: "",
663
+ status: "Active" /* Active */
664
+ });
665
+ var toFleetVendorBankAccountPayload = (vendorBankAccount) => ({
666
+ bank_name: vendorBankAccount.bank_name || "",
667
+ bank_branch_name: vendorBankAccount.bank_branch_name || "",
668
+ bank_account_name: vendorBankAccount.bank_account_name || "",
669
+ bank_account_number: vendorBankAccount.bank_account_number || "",
670
+ ifsc_code: vendorBankAccount.ifsc_code || "",
671
+ swift_code: vendorBankAccount.swift_code || "",
672
+ iban_number: vendorBankAccount.iban_number || "",
673
+ upi_id: vendorBankAccount.upi_id || "",
674
+ is_primary: vendorBankAccount.is_primary || "Yes" /* Yes */,
675
+ notes: vendorBankAccount.notes || "",
676
+ // Relations
677
+ organisation_id: vendorBankAccount.organisation_id || "",
678
+ vendor_id: vendorBankAccount.vendor_id || "",
679
+ status: "Active" /* Active */
680
+ });
681
+ var newFleetVendorBankAccountPayload = () => ({
682
+ bank_name: "",
683
+ bank_branch_name: "",
684
+ bank_account_name: "",
685
+ bank_account_number: "",
686
+ ifsc_code: "",
687
+ swift_code: "",
688
+ iban_number: "",
689
+ upi_id: "",
690
+ is_primary: "Yes" /* Yes */,
691
+ notes: "",
692
+ vendor_id: "",
693
+ organisation_id: "",
694
+ status: "Active" /* Active */
695
+ });
696
+ var toFleetVendorContactPersonsPayload = (vendorContactPersons) => ({
697
+ // Image
698
+ image_url: vendorContactPersons.image_url || "",
699
+ image_key: vendorContactPersons.image_key || "",
700
+ image_name: vendorContactPersons.image_name || "",
701
+ // Primary Details
702
+ name: vendorContactPersons.name || "",
703
+ mobile: vendorContactPersons.mobile || "",
704
+ alternative_mobile: vendorContactPersons.alternative_mobile || "",
705
+ email: vendorContactPersons.email || "",
706
+ designation: vendorContactPersons.designation || "",
707
+ // Additional Details
708
+ branch_name: vendorContactPersons.branch_name || "",
709
+ preferred_language: vendorContactPersons.preferred_language || "",
710
+ is_primary: vendorContactPersons.is_primary || "No" /* No */,
711
+ is_active_contact: vendorContactPersons.is_active_contact || "Yes" /* Yes */,
712
+ notes: vendorContactPersons.notes || "",
713
+ organisation_id: vendorContactPersons.organisation_id || "",
714
+ vendor_id: vendorContactPersons.vendor_id || "",
715
+ status: "Active" /* Active */
716
+ });
717
+ var newFleetVendorContactPersonsPayload = () => ({
718
+ image_url: "",
719
+ image_key: "",
720
+ image_name: "",
721
+ name: "",
722
+ mobile: "",
723
+ alternative_mobile: "",
724
+ email: "",
725
+ designation: "",
726
+ branch_name: "",
727
+ preferred_language: "",
728
+ is_primary: "Yes" /* Yes */,
729
+ is_active_contact: "Yes" /* Yes */,
730
+ notes: "",
731
+ organisation_id: "",
732
+ vendor_id: "",
733
+ status: "Active" /* Active */
734
+ });
735
+ var toFleetVendorReviewPayload = (vendorReview) => ({
736
+ rating: vendorReview.rating || 0,
737
+ comment: vendorReview.comment || "",
738
+ // Relations
739
+ organisation_id: vendorReview.organisation_id || "",
740
+ vendor_id: vendorReview.vendor_id || "",
741
+ user_id: vendorReview.user_id || "",
742
+ status: "Active" /* Active */
743
+ });
744
+ var newFleetVendorReviewPayload = () => ({
745
+ rating: 0,
746
+ comment: "",
747
+ organisation_id: "",
748
+ vendor_id: "",
749
+ user_id: "",
750
+ status: "Active" /* Active */
751
+ });
752
+ var toFleetVendorDocumentPayload = (vendorDocument) => ({
753
+ // Document Details
754
+ document_name: vendorDocument.document_name || "",
755
+ document_number: vendorDocument.document_number || "",
756
+ issuing_authority: vendorDocument.issuing_authority || "",
757
+ issue_date: vendorDocument.issue_date || "",
758
+ expiry_date: vendorDocument.expiry_date || "",
759
+ remarks: vendorDocument.remarks || "",
760
+ // Relations
761
+ organisation_id: vendorDocument.organisation_id || "",
762
+ vendor_id: vendorDocument.vendor_id || "",
763
+ user_id: vendorDocument.user_id || "",
764
+ document_type_id: vendorDocument.document_type_id || "",
765
+ status: "Active" /* Active */,
766
+ FleetVendorDocumentFileSchema: vendorDocument.FleetVendorDocumentFile?.map((file) => ({
767
+ fleet_vendor_document_file_id: file.fleet_vendor_document_file_id ?? "",
768
+ usage_type: file.usage_type,
769
+ file_type: file.file_type,
770
+ file_url: file.file_url || "",
771
+ file_key: file.file_key || "",
772
+ file_name: file.file_name || "",
773
+ file_description: file.file_description || "",
774
+ file_size: file.file_size || 0,
775
+ file_metadata: file.file_metadata ?? {},
776
+ status: file.status,
777
+ added_date_time: file.added_date_time,
778
+ modified_date_time: file.modified_date_time,
779
+ organisation_id: file.organisation_id ?? "",
780
+ fleet_vendor_document_id: file.fleet_vendor_document_id ?? ""
781
+ })) ?? []
782
+ });
783
+ var newFleetVendorDocumentPayload = () => ({
784
+ document_name: "",
785
+ document_number: "",
786
+ issuing_authority: "",
787
+ issue_date: "",
788
+ expiry_date: "",
789
+ remarks: "",
790
+ organisation_id: "",
791
+ vendor_id: "",
792
+ user_id: "",
793
+ document_type_id: "",
794
+ status: "Active" /* Active */,
795
+ FleetVendorDocumentFileSchema: []
796
+ });
797
+ var vendor_logo_presigned_url = async (fileName) => {
798
+ return apiGet(ENDPOINTS.vendor_logo_presigned_url(fileName));
799
+ };
800
+ var vendor_contact_person_logo_presigned_url = async (fileName) => {
801
+ return apiGet(ENDPOINTS.vendor_contact_person_logo_presigned_url(fileName));
802
+ };
803
+ var presigned_url_file = async (data) => {
804
+ return apiPost(ENDPOINTS.presigned_url_file, data);
805
+ };
806
+ var findFleetVendor = async (data) => {
807
+ return apiPost(ENDPOINTS.find, data);
808
+ };
809
+ var createFleetVendor = async (data) => {
810
+ return apiPost(ENDPOINTS.create, data);
811
+ };
812
+ var updateFleetVendor = async (id, data) => {
813
+ return apiPatch(ENDPOINTS.update(id), data);
814
+ };
815
+ var deleteFleetVendor = async (id) => {
816
+ return apiDelete(ENDPOINTS.delete(id));
817
+ };
818
+ var updateFleetVendorLogo = async (id, data) => {
819
+ return apiPatch(ENDPOINTS.update_vendor_logo(id), data);
820
+ };
821
+ var deleteFleetVendorLogo = async (id) => {
822
+ return apiDelete(ENDPOINTS.delete_vendor_logo(id));
823
+ };
824
+ var createFleetVendorAddress = async (data) => {
825
+ return apiPost(ENDPOINTS.create_address, data);
826
+ };
827
+ var findFleetVendorAddress = async (data) => {
828
+ return apiPost(ENDPOINTS.find_address, data);
829
+ };
830
+ var updateFleetVendorAddress = async (id, data) => {
831
+ return apiPatch(ENDPOINTS.update_address(id), data);
832
+ };
833
+ var deleteFleetVendorAddress = async (id) => {
834
+ return apiDelete(ENDPOINTS.remove_address(id));
835
+ };
836
+ var createFleetVendorBankAccount = async (data) => {
837
+ return apiPost(ENDPOINTS.create_bank_account, data);
838
+ };
839
+ var findFleetVendorBankAccount = async (data) => {
840
+ return apiPost(ENDPOINTS.find_bank_account, data);
841
+ };
842
+ var updateFleetVendorBankAccount = async (id, data) => {
843
+ return apiPatch(ENDPOINTS.update_bank_account(id), data);
844
+ };
845
+ var deleteFleetVendorBankAccount = async (id) => {
846
+ return apiDelete(ENDPOINTS.remove_bank_account(id));
847
+ };
848
+ var createFleetVendorContactPersons = async (data) => {
849
+ return apiPost(ENDPOINTS.create_contact_person, data);
850
+ };
851
+ var findFleetVendorContactPersons = async (data) => {
852
+ return apiPost(ENDPOINTS.find_contact_person, data);
853
+ };
854
+ var updateFleetVendorContactPersons = async (id, data) => {
855
+ return apiPatch(ENDPOINTS.update_contact_person(id), data);
856
+ };
857
+ var deleteFleetVendorContactPersons = async (id) => {
858
+ return apiDelete(ENDPOINTS.remove_contact_person(id));
859
+ };
860
+ var updateFleetVendorContactPersonsLogo = async (id, data) => {
861
+ return apiPatch(ENDPOINTS.update_vendor_contact_person_logo(id), data);
862
+ };
863
+ var deleteFleetVendorContactPersonsLogo = async (id) => {
864
+ return apiDelete(ENDPOINTS.delete_vendor_contact_person_logo(id));
865
+ };
866
+ var createFleetVendorReview = async (data) => {
867
+ return apiPost(ENDPOINTS.create_review, data);
868
+ };
869
+ var findFleetVendorReview = async (data) => {
870
+ return apiPost(ENDPOINTS.find_review, data);
871
+ };
872
+ var updateFleetVendorReview = async (id, data) => {
873
+ return apiPatch(ENDPOINTS.update_review(id), data);
874
+ };
875
+ var deleteFleetVendorReview = async (id) => {
876
+ return apiDelete(ENDPOINTS.remove_review(id));
877
+ };
878
+ var createFleetVendorDocument = async (data) => {
879
+ return apiPost(ENDPOINTS.create_document, data);
880
+ };
881
+ var findFleetVendorDocument = async (data) => {
882
+ return apiPost(ENDPOINTS.find_document, data);
883
+ };
884
+ var updateFleetVendorDocument = async (id, data) => {
885
+ return apiPatch(ENDPOINTS.update_document(id), data);
886
+ };
887
+ var deleteFleetVendorDocument = async (id) => {
888
+ return apiDelete(ENDPOINTS.remove_document(id));
889
+ };
890
+ var create_file = async (data) => {
891
+ return apiPost(ENDPOINTS.create_file, data);
892
+ };
893
+ var remove_file = async (id) => {
894
+ return apiDelete(ENDPOINTS.remove_file(id));
895
+ };
896
+ export {
897
+ FleetVendorAddressQuerySchema,
898
+ FleetVendorAddressSchema,
899
+ FleetVendorBankAccountQuerySchema,
900
+ FleetVendorBankAccountSchema,
901
+ FleetVendorContactPersonsLogoSchema,
902
+ FleetVendorContactPersonsQuerySchema,
903
+ FleetVendorContactPersonsSchema,
904
+ FleetVendorDocumentFileSchema,
905
+ FleetVendorDocumentQuerySchema,
906
+ FleetVendorDocumentSchema,
907
+ FleetVendorLogoSchema,
908
+ FleetVendorQuerySchema,
909
+ FleetVendorReviewQuerySchema,
910
+ FleetVendorReviewSchema,
911
+ FleetVendorSchema,
912
+ createFleetVendor,
913
+ createFleetVendorAddress,
914
+ createFleetVendorBankAccount,
915
+ createFleetVendorContactPersons,
916
+ createFleetVendorDocument,
917
+ createFleetVendorReview,
918
+ create_file,
919
+ deleteFleetVendor,
920
+ deleteFleetVendorAddress,
921
+ deleteFleetVendorBankAccount,
922
+ deleteFleetVendorContactPersons,
923
+ deleteFleetVendorContactPersonsLogo,
924
+ deleteFleetVendorDocument,
925
+ deleteFleetVendorLogo,
926
+ deleteFleetVendorReview,
927
+ findFleetVendor,
928
+ findFleetVendorAddress,
929
+ findFleetVendorBankAccount,
930
+ findFleetVendorContactPersons,
931
+ findFleetVendorDocument,
932
+ findFleetVendorReview,
933
+ newFleetVendorAddressPayload,
934
+ newFleetVendorBankAccountPayload,
935
+ newFleetVendorContactPersonsPayload,
936
+ newFleetVendorDocumentPayload,
937
+ newFleetVendorPayload,
938
+ newFleetVendorReviewPayload,
939
+ presigned_url_file,
940
+ remove_file,
941
+ toFleetVendorAddressPayload,
942
+ toFleetVendorBankAccountPayload,
943
+ toFleetVendorContactPersonsPayload,
944
+ toFleetVendorDocumentPayload,
945
+ toFleetVendorPayload,
946
+ toFleetVendorReviewPayload,
947
+ updateFleetVendor,
948
+ updateFleetVendorAddress,
949
+ updateFleetVendorBankAccount,
950
+ updateFleetVendorContactPersons,
951
+ updateFleetVendorContactPersonsLogo,
952
+ updateFleetVendorDocument,
953
+ updateFleetVendorLogo,
954
+ updateFleetVendorReview,
955
+ vendor_contact_person_logo_presigned_url,
956
+ vendor_logo_presigned_url
957
+ };