vms-nest-prisma-api-document 215.0.0 → 218.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 (100) hide show
  1. package/dist/core/Enums.d.ts +50 -1
  2. package/dist/core/Enums.js +59 -0
  3. package/dist/services/account/bookmark_service.d.ts +1 -1
  4. package/dist/services/account/notification_preferences.service.d.ts +1 -1
  5. package/dist/services/account/report_preferences.service.d.ts +1 -1
  6. package/dist/services/account/ticket_service.d.ts +1 -1
  7. package/dist/services/fleet/bus_mangement/bus_stop.d.ts +23 -23
  8. package/dist/services/fleet/bus_mangement/calender.d.ts +7 -7
  9. package/dist/services/fleet/bus_mangement/master_route.d.ts +1 -1
  10. package/dist/services/fleet/bus_mangement/notice_board.d.ts +1 -1
  11. package/dist/services/fleet/bus_mangement/student.d.ts +24 -24
  12. package/dist/services/fleet/fuel_management/fleet_fuel_daily_summary_service.d.ts +1 -1
  13. package/dist/services/fleet/fuel_management/fleet_fuel_refill_service.d.ts +1 -2
  14. package/dist/services/fleet/fuel_management/fleet_fuel_removal_service.d.ts +1 -2
  15. package/dist/services/fleet/incident_management/incident_management_service.d.ts +597 -0
  16. package/dist/services/fleet/incident_management/incident_management_service.js +734 -0
  17. package/dist/services/fleet/issue_management/issue_management_service.d.ts +498 -0
  18. package/dist/services/fleet/issue_management/issue_management_service.js +562 -0
  19. package/dist/services/fleet/vendor_management/fleet_vendor_fuel_station.d.ts +6 -0
  20. package/dist/services/fleet/vendor_management/fleet_vendor_fuel_station.js +506 -0
  21. package/dist/services/fleet/vendor_management/fleet_vendor_service.d.ts +6 -0
  22. package/dist/services/fleet/vendor_management/fleet_vendor_service.js +968 -0
  23. package/dist/services/fleet/vendor_management/fleet_vendor_service_center.d.ts +6 -0
  24. package/dist/services/fleet/vendor_management/fleet_vendor_service_center.js +450 -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 +1 -1
  30. package/dist/services/gps/features/gps_track_history_share_link_service.d.ts +1 -1
  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 +1 -1
  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/main/vehicle/master_vehicle_service.js +108 -47
  41. package/dist/services/master/bus/master_class_service.d.ts +1 -1
  42. package/dist/services/master/bus/master_program_service.d.ts +1 -1
  43. package/dist/services/master/bus/master_relationship_service.d.ts +1 -1
  44. package/dist/services/master/bus/master_section_service.d.ts +1 -1
  45. package/dist/services/master/bus/master_semester_service.d.ts +1 -1
  46. package/dist/services/master/bus/master_stream_service.d.ts +1 -1
  47. package/dist/services/master/bus/master_year_service.d.ts +1 -1
  48. package/dist/services/master/device/master_device_manufacturer_service.d.ts +1 -1
  49. package/dist/services/master/device/master_device_model_service.d.ts +1 -1
  50. package/dist/services/master/device/master_device_type_service.d.ts +1 -1
  51. package/dist/services/master/expense/master_expense_name_service.d.ts +7 -7
  52. package/dist/services/master/expense/master_expense_type_service.d.ts +3 -3
  53. package/dist/services/master/expense/master_fuel_company_service.d.ts +4 -140
  54. package/dist/services/master/expense/master_vendor_document_type_service.d.ts +4 -124
  55. package/dist/services/master/expense/master_vendor_tag_service.d.ts +6 -0
  56. package/dist/services/master/expense/master_vendor_tag_service.js +307 -0
  57. package/dist/services/master/expense/master_vendor_type_service.d.ts +4 -124
  58. package/dist/services/master/fleet/master_fleet_incident_severity_service.d.ts +2 -2
  59. package/dist/services/master/fleet/master_fleet_incident_status_service.d.ts +2 -2
  60. package/dist/services/master/fleet/master_fleet_incident_type_service.d.ts +4 -4
  61. package/dist/services/master/fleet/master_fleet_insurance_claim_status_service.d.ts +2 -2
  62. package/dist/services/master/fleet/master_fleet_service_task_service.d.ts +3 -3
  63. package/dist/services/master/main/master_main_country_service.d.ts +1 -1
  64. package/dist/services/master/main/master_main_currency_service.d.ts +1 -1
  65. package/dist/services/master/main/master_main_date_format_service.d.ts +1 -1
  66. package/dist/services/master/main/master_main_industry_service.d.ts +1 -1
  67. package/dist/services/master/main/master_main_landmark_service.d.ts +4 -158
  68. package/dist/services/master/main/master_main_language_service.d.ts +1 -1
  69. package/dist/services/master/main/master_main_state_service.d.ts +1 -1
  70. package/dist/services/master/main/master_main_timezone_service.d.ts +1 -1
  71. package/dist/services/master/main/master_main_unit_distance_service.d.ts +1 -1
  72. package/dist/services/master/main/master_main_unit_mileage_service.d.ts +1 -1
  73. package/dist/services/master/main/master_main_unit_volume_service.d.ts +1 -1
  74. package/dist/services/master/organisation/organisation_branch_service.d.ts +1 -1
  75. package/dist/services/master/organisation/organisation_color_service.d.ts +1 -1
  76. package/dist/services/master/organisation/organisation_group_service.d.ts +1 -1
  77. package/dist/services/master/organisation/organisation_sub_company_service.d.ts +1 -1
  78. package/dist/services/master/organisation/organisation_tag_service.d.ts +1 -1
  79. package/dist/services/master/spare_part/master_spare_part_category_service.d.ts +1 -1
  80. package/dist/services/master/spare_part/master_spare_part_sub_category_service.d.ts +1 -1
  81. package/dist/services/master/spare_part/master_spare_part_unit_service.d.ts +1 -1
  82. package/dist/services/master/trip/master_trip_party_type_service.d.ts +1 -1
  83. package/dist/services/master/tyre/master_tyre_grade_service.d.ts +1 -1
  84. package/dist/services/master/tyre/master_tyre_make_service.d.ts +1 -1
  85. package/dist/services/master/tyre/master_tyre_model_service.d.ts +1 -1
  86. package/dist/services/master/user/master_user_role_service.d.ts +1 -1
  87. package/dist/services/master/user/master_user_status_service.d.ts +1 -1
  88. package/dist/services/master/vehicle/master_vehicle_associated_to_service.d.ts +1 -1
  89. package/dist/services/master/vehicle/master_vehicle_document_type_service.d.ts +1 -1
  90. package/dist/services/master/vehicle/master_vehicle_fuel_removal_reason_service.d.ts +1 -1
  91. package/dist/services/master/vehicle/master_vehicle_fuel_type_service.d.ts +1 -1
  92. package/dist/services/master/vehicle/master_vehicle_fuel_unit_service.d.ts +1 -1
  93. package/dist/services/master/vehicle/master_vehicle_make_service.d.ts +1 -1
  94. package/dist/services/master/vehicle/master_vehicle_model_service.d.ts +1 -1
  95. package/dist/services/master/vehicle/master_vehicle_ownership_type_service.d.ts +1 -1
  96. package/dist/services/master/vehicle/master_vehicle_status_type_service.d.ts +1 -1
  97. package/dist/services/master/vehicle/master_vehicle_sub_model_service.d.ts +1 -1
  98. package/dist/services/master/vehicle/master_vehicle_type_service.d.ts +1 -1
  99. package/dist/{user_organisation_service-Dn5ij2oU.d.ts → user_organisation_service-BE5iA8UK.d.ts} +4869 -2320
  100. package/package.json +1 -1
@@ -0,0 +1,968 @@
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
+ vendor_document_file_presigned_url: `${URL}/vendor_document_file_presigned_url`,
319
+ update_vendor_logo: (id) => `${URL}/update_vendor_logo/${id}`,
320
+ delete_vendor_logo: (id) => `${URL}/delete_vendor_logo/${id}`,
321
+ find: `${URL}/search`,
322
+ create: `${URL}`,
323
+ update: (id) => `${URL}/${id}`,
324
+ delete: (id) => `${URL}/${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
+ // File
348
+ create_file: `${URL}/create_file`,
349
+ remove_file: (id) => `${URL}/remove_file/${id}`,
350
+ // Document
351
+ create_document: `${URL}/document`,
352
+ find_document: `${URL}/document/search`,
353
+ update_document: (id) => `${URL}/document/${id}`,
354
+ remove_document: (id) => `${URL}/document/${id}`,
355
+ // Cache
356
+ cache_simple: (organisation_id) => `${URL}/cache_simple/${organisation_id}`
357
+ };
358
+ var FleetVendorLogoSchema = z3.object({
359
+ logo_url: stringMandatory("Logo URL", 0, 300),
360
+ logo_key: stringMandatory("Logo Key", 0, 300),
361
+ logo_name: stringMandatory("Logo Name", 0, 300)
362
+ });
363
+ var FleetVendorSchema = z3.object({
364
+ organisation_id: single_select_mandatory("UserOrganisation"),
365
+ // ✅ Single-Selection -> UserOrganisation
366
+ vendor_name: stringMandatory("Vendor Name", 3, 100),
367
+ vendor_code: stringOptional("Vendor Name", 0, 100),
368
+ business_mobile: stringOptional("Business Mobile", 0, 15),
369
+ business_email: stringOptional("Business Email", 0, 100),
370
+ // Logo
371
+ logo_url: stringOptional("Logo URL", 0, 300),
372
+ logo_key: stringOptional("Logo Key", 0, 300),
373
+ logo_name: stringOptional("Logo Name", 0, 300),
374
+ // Business Details
375
+ organisation_name: stringOptional("Organisation Name", 0, 150),
376
+ gst_number: stringOptional("GST Number", 0, 15),
377
+ pan_number: stringOptional("PAN Number", 0, 10),
378
+ tax_id_number: stringOptional("Tax ID Number", 0, 30),
379
+ vat_number: stringOptional("VAT Number", 0, 30),
380
+ business_registration_number: stringOptional(
381
+ "Business Registration Number",
382
+ 0,
383
+ 50
384
+ ),
385
+ // Financial Details
386
+ payment_terms: stringOptional("Payment Terms", 0, 2e3),
387
+ financial_notes: stringOptional("Financial Notes", 0, 2e3),
388
+ // Additional Information
389
+ additional_details_1: stringOptional("Additional Details 1", 0, 2e3),
390
+ additional_details_2: stringOptional("Additional Details 2", 0, 2e3),
391
+ additional_details_3: stringOptional("Additional Details 3", 0, 2e3),
392
+ status: enumMandatory("Status", Status, "Active" /* Active */),
393
+ vendor_type_ids: multi_select_optional("MasterVendorType"),
394
+ // Multi selection -> MasterVendorType
395
+ vendor_tag_ids: multi_select_optional("MasterVendorTag")
396
+ // Multi selection -> MasterVendorTag
397
+ });
398
+ var FleetVendorQuerySchema = BaseQuerySchema.extend({
399
+ vendor_ids: multi_select_optional("FleetVendor"),
400
+ // ✅ Multi-Selection -> FleetVendor
401
+ organisation_ids: multi_select_optional("UserOrganisation")
402
+ // ✅ Multi-Selection -> UserOrganisation
403
+ });
404
+ var FleetVendorAddressSchema = z3.object({
405
+ organisation_id: single_select_mandatory("UserOrganisation"),
406
+ // ✅ Single-Selection -> UserOrganisation
407
+ vendor_id: single_select_mandatory("FleetVendor"),
408
+ // ✅ Single-Selection -> FleetVendor
409
+ vendor_address_label: enumMandatory(
410
+ "Fleet Vendor Address Label",
411
+ FleetVendorAddressLabel,
412
+ "OTHER" /* OTHER */
413
+ ),
414
+ // Address Details
415
+ address_line1: stringOptional("Address Line 1", 0, 150),
416
+ address_line2: stringOptional("Address Line 2", 0, 150),
417
+ locality_landmark: stringOptional("Locality / Landmark", 0, 150),
418
+ neighborhood: stringOptional("Neighborhood", 0, 100),
419
+ town_city: stringOptional("Town / City", 0, 100),
420
+ district_county: stringOptional("District / County", 0, 100),
421
+ state_province_region: stringOptional("State / Province / Region", 0, 100),
422
+ postal_code: stringOptional("Postal Code", 0, 20),
423
+ country: stringOptional("Country", 0, 100),
424
+ country_code: stringOptional("Country Code", 0, 5),
425
+ // Location Details
426
+ latitude: doubleOptionalLatLng("Latitude"),
427
+ longitude: doubleOptionalLatLng("Longitude"),
428
+ google_location: stringOptional("Google Location", 0, 500),
429
+ is_default: enumMandatory("Is Default", YesNo, "No" /* No */),
430
+ notes: stringOptional("Notes", 0, 2e3),
431
+ status: enumMandatory("Status", Status, "Active" /* Active */)
432
+ });
433
+ var FleetVendorAddressQuerySchema = BaseQuerySchema.extend({
434
+ vendor_address_ids: multi_select_optional("FleetVendorAddress"),
435
+ // ✅ Multi-Selection -> FleetVendorAddress
436
+ organisation_ids: multi_select_optional("UserOrganisation"),
437
+ // ✅ Multi-Selection -> UserOrganisation
438
+ vendor_ids: multi_select_optional("FleetVendor"),
439
+ // ✅ Multi-Selection -> FleetVendor
440
+ vendor_address_label: enumArrayOptional(
441
+ "Vendor Address Label",
442
+ FleetVendorAddressLabel,
443
+ getAllEnums(FleetVendorAddressLabel)
444
+ ),
445
+ is_default: enumArrayOptional("Is Default", YesNo, getAllEnums(YesNo))
446
+ });
447
+ var FleetVendorBankAccountSchema = z3.object({
448
+ organisation_id: single_select_mandatory("UserOrganisation"),
449
+ // ✅ Single-Selection -> UserOrganisation
450
+ vendor_id: single_select_mandatory("FleetVendor"),
451
+ // ✅ Single-Selection -> FleetVendor
452
+ bank_name: stringOptional("Bank Name", 0, 100),
453
+ bank_branch_name: stringOptional("Bank Branch Name", 0, 100),
454
+ bank_account_name: stringOptional("Bank Account Name", 0, 100),
455
+ bank_account_number: stringOptional("Bank Account Number", 0, 34),
456
+ ifsc_code: stringOptional("IFSC Code", 0, 20),
457
+ swift_code: stringOptional("Swift Code", 0, 20),
458
+ iban_number: stringOptional("IBAN Number", 0, 34),
459
+ upi_id: stringOptional("UPI ID", 0, 100),
460
+ is_primary: enumMandatory("Is Primary", YesNo, "No" /* No */),
461
+ notes: stringOptional("Notes", 0, 2e3),
462
+ status: enumMandatory("Status", Status, "Active" /* Active */)
463
+ });
464
+ var FleetVendorBankAccountQuerySchema = BaseQuerySchema.extend({
465
+ vendor_bank_account_ids: multi_select_optional("FleetVendorBankAccount"),
466
+ // ✅ Multi-Selection -> FleetVendorBankAccount
467
+ organisation_ids: multi_select_optional("UserOrganisation"),
468
+ // ✅ Multi-Selection -> UserOrganisation
469
+ vendor_ids: multi_select_optional("FleetVendor"),
470
+ // ✅ Multi-Selection -> FleetVendor
471
+ is_primary: enumArrayOptional("Is Primary", YesNo, getAllEnums(YesNo))
472
+ });
473
+ var FleetVendorContactPersonsLogoSchema = z3.object({
474
+ image_url: stringMandatory("Image URL", 0, 300),
475
+ image_key: stringMandatory("Image Key", 0, 300),
476
+ image_name: stringMandatory("Image Name", 0, 300)
477
+ });
478
+ var FleetVendorContactPersonsSchema = z3.object({
479
+ organisation_id: single_select_mandatory("UserOrganisation"),
480
+ // ✅ Single-Selection -> UserOrganisation
481
+ vendor_id: single_select_mandatory("FleetVendor"),
482
+ // ✅ Single-Selection -> FleetVendor
483
+ // Image
484
+ image_url: stringOptional("Image URL", 0, 300),
485
+ image_key: stringOptional("Image Key", 0, 300),
486
+ image_name: stringOptional("Image Name", 0, 300),
487
+ // Primary Details
488
+ name: stringMandatory("Name", 3, 100),
489
+ mobile: stringOptional("Mobile", 0, 15),
490
+ alternative_mobile: stringOptional("Alternative Mobile", 0, 15),
491
+ email: stringOptional("Email", 0, 100),
492
+ designation: stringOptional("Designation", 0, 50),
493
+ // Additional Details
494
+ branch_name: stringOptional("Branch Name", 0, 100),
495
+ preferred_language: stringOptional("Preferred Language", 0, 10),
496
+ is_primary: enumMandatory("Is Primary", YesNo, "No" /* No */),
497
+ is_active_contact: enumMandatory("Is Active Contact", YesNo, "Yes" /* Yes */),
498
+ notes: stringOptional("Notes", 0, 2e3),
499
+ status: enumMandatory("Status", Status, "Active" /* Active */)
500
+ });
501
+ var FleetVendorContactPersonsQuerySchema = BaseQuerySchema.extend({
502
+ contact_person_ids: multi_select_optional("FleetVendorContactPersons"),
503
+ // ✅ Multi-Selection -> FleetVendorContactPersons
504
+ organisation_ids: multi_select_optional("UserOrganisation"),
505
+ // ✅ Multi-Selection -> UserOrganisation
506
+ vendor_ids: multi_select_optional("FleetVendor"),
507
+ // ✅ Multi-Selection -> FleetVendor
508
+ is_primary: enumArrayOptional("Is Primary", YesNo, getAllEnums(YesNo)),
509
+ is_active_contact: enumArrayOptional(
510
+ "Is Active Contact",
511
+ YesNo,
512
+ getAllEnums(YesNo)
513
+ )
514
+ });
515
+ var FleetVendorReviewSchema = z3.object({
516
+ organisation_id: single_select_mandatory("UserOrganisation"),
517
+ // ✅ Single-Selection -> UserOrganisation
518
+ vendor_id: single_select_mandatory("FleetVendor"),
519
+ // ✅ Single-Selection -> FleetVendor
520
+ user_id: single_select_optional("User"),
521
+ // ✅ Single-Selection -> User
522
+ rating: numberMandatory("Rating"),
523
+ comment: stringOptional("Comment", 0, 2e3),
524
+ status: enumMandatory("Status", Status, "Active" /* Active */)
525
+ });
526
+ var FleetVendorReviewQuerySchema = BaseQuerySchema.extend({
527
+ vendor_review_ids: multi_select_optional("FleetVendorReview"),
528
+ // ✅ Multi-Selection -> FleetVendorReview
529
+ organisation_ids: multi_select_optional("UserOrganisation"),
530
+ // ✅ Multi-Selection -> UserOrganisation
531
+ vendor_ids: multi_select_optional("FleetVendor"),
532
+ // ✅ Multi-Selection -> FleetVendor
533
+ user_ids: multi_select_optional("User")
534
+ // ✅ Multi-Selection -> User
535
+ });
536
+ var FleetVendorDocumentFileSchema = BaseFileSchema.extend({
537
+ organisation_id: single_select_optional("UserOrganisation"),
538
+ // ✅ Single-Selection -> UserOrganisation
539
+ fleet_vendor_document_id: single_select_optional("FleetVendorDocument")
540
+ // ✅ Single-Selection -> FleetVendorDocument
541
+ });
542
+ var FleetVendorDocumentSchema = z3.object({
543
+ organisation_id: single_select_mandatory("UserOrganisation"),
544
+ // ✅ Single-Selection -> UserOrganisation
545
+ user_id: single_select_optional("User"),
546
+ // ✅ Single-Selection -> User
547
+ vendor_id: single_select_mandatory("FleetVendor"),
548
+ // ✅ Single-Selection -> FleetVendor
549
+ document_type_id: single_select_mandatory("MasterVendorDocumentType"),
550
+ // ✅ Single-Selection -> MasterVendorDocumentType
551
+ document_name: stringOptional("Document Name", 0, 150),
552
+ document_number: stringOptional("Document Number", 0, 150),
553
+ issuing_authority: stringOptional("Issuing Authority", 0, 150),
554
+ issue_date: dateOptional("Issue Date"),
555
+ expiry_date: dateOptional("Expiry Date"),
556
+ remarks: stringOptional("Remarks", 0, 150),
557
+ FleetVendorDocumentFileSchema: nestedArrayOfObjectsOptional(
558
+ "FleetVendorDocumentFileSchema",
559
+ FleetVendorDocumentFileSchema,
560
+ []
561
+ ),
562
+ status: enumMandatory("Status", Status, "Active" /* Active */)
563
+ });
564
+ var FleetVendorDocumentQuerySchema = BaseQuerySchema.extend({
565
+ fleet_vendor_document_ids: multi_select_optional("FleetVendorDocument"),
566
+ // ✅ Multi-selection -> FleetVendorDocument
567
+ organisation_ids: multi_select_optional("UserOrganisation"),
568
+ // ✅ Multi-selection -> UserOrganisation
569
+ user_ids: multi_select_optional("User"),
570
+ // ✅ Multi-selection -> User
571
+ vendor_ids: multi_select_optional("FleetVendor"),
572
+ // ✅ Multi-selection -> FleetVendor
573
+ document_type_ids: multi_select_optional("MasterVendorDocumentType")
574
+ // ✅ Multi-selection -> MasterVendorDocumentType
575
+ });
576
+ var toFleetVendorPayload = (vendor) => ({
577
+ vendor_name: vendor.vendor_name || "",
578
+ vendor_code: vendor.vendor_code || "",
579
+ business_mobile: vendor.business_mobile || "",
580
+ business_email: vendor.business_email || "",
581
+ logo_url: vendor.logo_url || "",
582
+ logo_key: vendor.logo_key || "",
583
+ logo_name: vendor.logo_name || "",
584
+ // Business Details
585
+ organisation_name: vendor.organisation_name || "",
586
+ gst_number: vendor.gst_number || "",
587
+ pan_number: vendor.pan_number || "",
588
+ tax_id_number: vendor.tax_id_number || "",
589
+ vat_number: vendor.vat_number || "",
590
+ business_registration_number: vendor.business_email || "",
591
+ // Financial Details
592
+ payment_terms: vendor.payment_terms || "",
593
+ financial_notes: vendor.financial_notes || "",
594
+ // Additional Information
595
+ additional_details_1: vendor.additional_details_1 || "",
596
+ additional_details_2: vendor.additional_details_2 || "",
597
+ additional_details_3: vendor.additional_details_3 || "",
598
+ // Relations
599
+ organisation_id: vendor.organisation_id || "",
600
+ vendor_type_ids: vendor.FleetVendorTypeLink?.map((v) => v.vendor_type_id) || [],
601
+ vendor_tag_ids: vendor.FleetVendorTagLink?.map((v) => v.vendor_tag_id) || [],
602
+ status: "Active" /* Active */
603
+ });
604
+ var newFleetVendorPayload = () => ({
605
+ vendor_name: "",
606
+ vendor_code: "",
607
+ business_mobile: "",
608
+ business_email: "",
609
+ logo_url: "",
610
+ logo_key: "",
611
+ logo_name: "",
612
+ organisation_name: "",
613
+ gst_number: "",
614
+ pan_number: "",
615
+ tax_id_number: "",
616
+ vat_number: "",
617
+ business_registration_number: "",
618
+ payment_terms: "",
619
+ financial_notes: "",
620
+ additional_details_1: "",
621
+ additional_details_2: "",
622
+ additional_details_3: "",
623
+ organisation_id: "",
624
+ vendor_type_ids: [],
625
+ vendor_tag_ids: [],
626
+ status: "Active" /* Active */
627
+ });
628
+ var toFleetVendorAddressPayload = (vendorAddress) => ({
629
+ vendor_address_label: vendorAddress.vendor_address_label || "HQ" /* HQ */,
630
+ // Address Details
631
+ address_line1: vendorAddress.address_line1 || "",
632
+ address_line2: vendorAddress.address_line2 || "",
633
+ locality_landmark: vendorAddress.locality_landmark || "",
634
+ neighborhood: vendorAddress.neighborhood || "",
635
+ town_city: vendorAddress.town_city || "",
636
+ district_county: vendorAddress.district_county || "",
637
+ state_province_region: vendorAddress.state_province_region || "",
638
+ postal_code: vendorAddress.postal_code || "",
639
+ country: vendorAddress.country || "",
640
+ country_code: vendorAddress.country_code || "",
641
+ // Location Details
642
+ latitude: vendorAddress.latitude || 0,
643
+ longitude: vendorAddress.longitude || 0,
644
+ google_location: vendorAddress.google_location || "",
645
+ organisation_id: vendorAddress.organisation_id || "",
646
+ vendor_id: vendorAddress.vendor_id || "",
647
+ is_default: vendorAddress.is_default || "No" /* No */,
648
+ notes: vendorAddress.notes || "",
649
+ status: "Active" /* Active */
650
+ });
651
+ var newFleetVendorAddressPayload = () => ({
652
+ vendor_address_label: "HQ" /* HQ */,
653
+ address_line1: "",
654
+ address_line2: "",
655
+ locality_landmark: "",
656
+ neighborhood: "",
657
+ town_city: "",
658
+ district_county: "",
659
+ state_province_region: "",
660
+ postal_code: "",
661
+ country: "",
662
+ country_code: "",
663
+ latitude: 0,
664
+ longitude: 0,
665
+ google_location: "",
666
+ organisation_id: "",
667
+ vendor_id: "",
668
+ is_default: "No" /* No */,
669
+ notes: "",
670
+ status: "Active" /* Active */
671
+ });
672
+ var toFleetVendorBankAccountPayload = (vendorBankAccount) => ({
673
+ bank_name: vendorBankAccount.bank_name || "",
674
+ bank_branch_name: vendorBankAccount.bank_branch_name || "",
675
+ bank_account_name: vendorBankAccount.bank_account_name || "",
676
+ bank_account_number: vendorBankAccount.bank_account_number || "",
677
+ ifsc_code: vendorBankAccount.ifsc_code || "",
678
+ swift_code: vendorBankAccount.swift_code || "",
679
+ iban_number: vendorBankAccount.iban_number || "",
680
+ upi_id: vendorBankAccount.upi_id || "",
681
+ is_primary: vendorBankAccount.is_primary || "No" /* No */,
682
+ notes: vendorBankAccount.notes || "",
683
+ // Relations
684
+ organisation_id: vendorBankAccount.organisation_id || "",
685
+ vendor_id: vendorBankAccount.vendor_id || "",
686
+ status: "Active" /* Active */
687
+ });
688
+ var newFleetVendorBankAccountPayload = () => ({
689
+ bank_name: "",
690
+ bank_branch_name: "",
691
+ bank_account_name: "",
692
+ bank_account_number: "",
693
+ ifsc_code: "",
694
+ swift_code: "",
695
+ iban_number: "",
696
+ upi_id: "",
697
+ is_primary: "No" /* No */,
698
+ notes: "",
699
+ vendor_id: "",
700
+ organisation_id: "",
701
+ status: "Active" /* Active */
702
+ });
703
+ var toFleetVendorContactPersonsPayload = (vendorContactPersons) => ({
704
+ // Image
705
+ image_url: vendorContactPersons.image_url || "",
706
+ image_key: vendorContactPersons.image_key || "",
707
+ image_name: vendorContactPersons.image_name || "",
708
+ // Primary Details
709
+ name: vendorContactPersons.name || "",
710
+ mobile: vendorContactPersons.mobile || "",
711
+ alternative_mobile: vendorContactPersons.alternative_mobile || "",
712
+ email: vendorContactPersons.email || "",
713
+ designation: vendorContactPersons.designation || "",
714
+ // Additional Details
715
+ branch_name: vendorContactPersons.branch_name || "",
716
+ preferred_language: vendorContactPersons.preferred_language || "",
717
+ is_primary: vendorContactPersons.is_primary || "No" /* No */,
718
+ is_active_contact: vendorContactPersons.is_active_contact || "Yes" /* Yes */,
719
+ notes: vendorContactPersons.notes || "",
720
+ organisation_id: vendorContactPersons.organisation_id || "",
721
+ vendor_id: vendorContactPersons.vendor_id || "",
722
+ status: "Active" /* Active */
723
+ });
724
+ var newFleetVendorContactPersonsPayload = () => ({
725
+ image_url: "",
726
+ image_key: "",
727
+ image_name: "",
728
+ name: "",
729
+ mobile: "",
730
+ alternative_mobile: "",
731
+ email: "",
732
+ designation: "",
733
+ branch_name: "",
734
+ preferred_language: "",
735
+ is_primary: "No" /* No */,
736
+ is_active_contact: "Yes" /* Yes */,
737
+ notes: "",
738
+ organisation_id: "",
739
+ vendor_id: "",
740
+ status: "Active" /* Active */
741
+ });
742
+ var toFleetVendorReviewPayload = (vendorReview) => ({
743
+ rating: vendorReview.rating || 0,
744
+ comment: vendorReview.comment || "",
745
+ // Relations
746
+ organisation_id: vendorReview.organisation_id || "",
747
+ vendor_id: vendorReview.vendor_id || "",
748
+ user_id: vendorReview.user_id || "",
749
+ status: "Active" /* Active */
750
+ });
751
+ var newFleetVendorReviewPayload = () => ({
752
+ rating: 0,
753
+ comment: "",
754
+ organisation_id: "",
755
+ vendor_id: "",
756
+ user_id: "",
757
+ status: "Active" /* Active */
758
+ });
759
+ var toFleetVendorDocumentPayload = (vendorDocument) => ({
760
+ // Document Details
761
+ document_name: vendorDocument.document_name || "",
762
+ document_number: vendorDocument.document_number || "",
763
+ issuing_authority: vendorDocument.issuing_authority || "",
764
+ issue_date: vendorDocument.issue_date || "",
765
+ expiry_date: vendorDocument.expiry_date || "",
766
+ remarks: vendorDocument.remarks || "",
767
+ // Relations
768
+ organisation_id: vendorDocument.organisation_id || "",
769
+ vendor_id: vendorDocument.vendor_id || "",
770
+ user_id: vendorDocument.user_id || "",
771
+ document_type_id: vendorDocument.document_type_id || "",
772
+ status: "Active" /* Active */,
773
+ FleetVendorDocumentFileSchema: vendorDocument.FleetVendorDocumentFile?.map((file) => ({
774
+ fleet_vendor_document_file_id: file.fleet_vendor_document_file_id ?? "",
775
+ usage_type: file.usage_type,
776
+ file_type: file.file_type,
777
+ file_url: file.file_url || "",
778
+ file_key: file.file_key || "",
779
+ file_name: file.file_name || "",
780
+ file_description: file.file_description || "",
781
+ file_size: file.file_size || 0,
782
+ file_metadata: file.file_metadata ?? {},
783
+ status: file.status,
784
+ added_date_time: file.added_date_time,
785
+ modified_date_time: file.modified_date_time,
786
+ organisation_id: file.organisation_id ?? "",
787
+ fleet_vendor_document_id: file.fleet_vendor_document_id ?? ""
788
+ })) ?? []
789
+ });
790
+ var newFleetVendorDocumentPayload = () => ({
791
+ document_name: "",
792
+ document_number: "",
793
+ issuing_authority: "",
794
+ issue_date: "",
795
+ expiry_date: "",
796
+ remarks: "",
797
+ organisation_id: "",
798
+ vendor_id: "",
799
+ user_id: "",
800
+ document_type_id: "",
801
+ status: "Active" /* Active */,
802
+ FleetVendorDocumentFileSchema: []
803
+ });
804
+ var vendor_logo_presigned_url = async (fileName) => {
805
+ return apiGet(ENDPOINTS.vendor_logo_presigned_url(fileName));
806
+ };
807
+ var vendor_contact_person_logo_presigned_url = async (fileName) => {
808
+ return apiGet(ENDPOINTS.vendor_contact_person_logo_presigned_url(fileName));
809
+ };
810
+ var get_vendor_document_file_presigned_url = async (data) => {
811
+ return apiPost(ENDPOINTS.vendor_document_file_presigned_url, data);
812
+ };
813
+ var updateFleetVendorLogo = async (id, data) => {
814
+ return apiPatch(ENDPOINTS.update_vendor_logo(id), data);
815
+ };
816
+ var deleteFleetVendorLogo = async (id) => {
817
+ return apiDelete(ENDPOINTS.delete_vendor_logo(id));
818
+ };
819
+ var findFleetVendor = async (data) => {
820
+ return apiPost(ENDPOINTS.find, data);
821
+ };
822
+ var createFleetVendor = async (data) => {
823
+ return apiPost(ENDPOINTS.create, data);
824
+ };
825
+ var updateFleetVendor = async (id, data) => {
826
+ return apiPatch(ENDPOINTS.update(id), data);
827
+ };
828
+ var deleteFleetVendor = async (id) => {
829
+ return apiDelete(ENDPOINTS.delete(id));
830
+ };
831
+ var createFleetVendorAddress = async (data) => {
832
+ return apiPost(ENDPOINTS.create_address, data);
833
+ };
834
+ var findFleetVendorAddress = async (data) => {
835
+ return apiPost(ENDPOINTS.find_address, data);
836
+ };
837
+ var updateFleetVendorAddress = async (id, data) => {
838
+ return apiPatch(ENDPOINTS.update_address(id), data);
839
+ };
840
+ var deleteFleetVendorAddress = async (id) => {
841
+ return apiDelete(ENDPOINTS.remove_address(id));
842
+ };
843
+ var createFleetVendorBankAccount = async (data) => {
844
+ return apiPost(ENDPOINTS.create_bank_account, data);
845
+ };
846
+ var findFleetVendorBankAccount = async (data) => {
847
+ return apiPost(ENDPOINTS.find_bank_account, data);
848
+ };
849
+ var updateFleetVendorBankAccount = async (id, data) => {
850
+ return apiPatch(ENDPOINTS.update_bank_account(id), data);
851
+ };
852
+ var deleteFleetVendorBankAccount = async (id) => {
853
+ return apiDelete(ENDPOINTS.remove_bank_account(id));
854
+ };
855
+ var createFleetVendorContactPersons = async (data) => {
856
+ return apiPost(ENDPOINTS.create_contact_person, data);
857
+ };
858
+ var findFleetVendorContactPersons = async (data) => {
859
+ return apiPost(ENDPOINTS.find_contact_person, data);
860
+ };
861
+ var updateFleetVendorContactPersons = async (id, data) => {
862
+ return apiPatch(ENDPOINTS.update_contact_person(id), data);
863
+ };
864
+ var deleteFleetVendorContactPersons = async (id) => {
865
+ return apiDelete(ENDPOINTS.remove_contact_person(id));
866
+ };
867
+ var updateFleetVendorContactPersonsLogo = async (id, data) => {
868
+ return apiPatch(ENDPOINTS.update_vendor_contact_person_logo(id), data);
869
+ };
870
+ var deleteFleetVendorContactPersonsLogo = async (id) => {
871
+ return apiDelete(ENDPOINTS.delete_vendor_contact_person_logo(id));
872
+ };
873
+ var createFleetVendorReview = async (data) => {
874
+ return apiPost(ENDPOINTS.create_review, data);
875
+ };
876
+ var findFleetVendorReview = async (data) => {
877
+ return apiPost(ENDPOINTS.find_review, data);
878
+ };
879
+ var updateFleetVendorReview = async (id, data) => {
880
+ return apiPatch(ENDPOINTS.update_review(id), data);
881
+ };
882
+ var deleteFleetVendorReview = async (id) => {
883
+ return apiDelete(ENDPOINTS.remove_review(id));
884
+ };
885
+ var create_file = async (data) => {
886
+ return apiPost(ENDPOINTS.create_file, data);
887
+ };
888
+ var remove_file = async (id) => {
889
+ return apiDelete(ENDPOINTS.remove_file(id));
890
+ };
891
+ var createFleetVendorDocument = async (data) => {
892
+ return apiPost(ENDPOINTS.create_document, data);
893
+ };
894
+ var findFleetVendorDocument = async (data) => {
895
+ return apiPost(ENDPOINTS.find_document, data);
896
+ };
897
+ var updateFleetVendorDocument = async (id, data) => {
898
+ return apiPatch(ENDPOINTS.update_document(id), data);
899
+ };
900
+ var deleteFleetVendorDocument = async (id) => {
901
+ return apiDelete(ENDPOINTS.remove_document(id));
902
+ };
903
+ var getFleetVendorCacheSimple = async (organisation_id) => {
904
+ return apiGet(ENDPOINTS.cache_simple(organisation_id));
905
+ };
906
+ export {
907
+ FleetVendorAddressQuerySchema,
908
+ FleetVendorAddressSchema,
909
+ FleetVendorBankAccountQuerySchema,
910
+ FleetVendorBankAccountSchema,
911
+ FleetVendorContactPersonsLogoSchema,
912
+ FleetVendorContactPersonsQuerySchema,
913
+ FleetVendorContactPersonsSchema,
914
+ FleetVendorDocumentFileSchema,
915
+ FleetVendorDocumentQuerySchema,
916
+ FleetVendorDocumentSchema,
917
+ FleetVendorLogoSchema,
918
+ FleetVendorQuerySchema,
919
+ FleetVendorReviewQuerySchema,
920
+ FleetVendorReviewSchema,
921
+ FleetVendorSchema,
922
+ createFleetVendor,
923
+ createFleetVendorAddress,
924
+ createFleetVendorBankAccount,
925
+ createFleetVendorContactPersons,
926
+ createFleetVendorDocument,
927
+ createFleetVendorReview,
928
+ create_file,
929
+ deleteFleetVendor,
930
+ deleteFleetVendorAddress,
931
+ deleteFleetVendorBankAccount,
932
+ deleteFleetVendorContactPersons,
933
+ deleteFleetVendorContactPersonsLogo,
934
+ deleteFleetVendorDocument,
935
+ deleteFleetVendorLogo,
936
+ deleteFleetVendorReview,
937
+ findFleetVendor,
938
+ findFleetVendorAddress,
939
+ findFleetVendorBankAccount,
940
+ findFleetVendorContactPersons,
941
+ findFleetVendorDocument,
942
+ findFleetVendorReview,
943
+ getFleetVendorCacheSimple,
944
+ get_vendor_document_file_presigned_url,
945
+ newFleetVendorAddressPayload,
946
+ newFleetVendorBankAccountPayload,
947
+ newFleetVendorContactPersonsPayload,
948
+ newFleetVendorDocumentPayload,
949
+ newFleetVendorPayload,
950
+ newFleetVendorReviewPayload,
951
+ remove_file,
952
+ toFleetVendorAddressPayload,
953
+ toFleetVendorBankAccountPayload,
954
+ toFleetVendorContactPersonsPayload,
955
+ toFleetVendorDocumentPayload,
956
+ toFleetVendorPayload,
957
+ toFleetVendorReviewPayload,
958
+ updateFleetVendor,
959
+ updateFleetVendorAddress,
960
+ updateFleetVendorBankAccount,
961
+ updateFleetVendorContactPersons,
962
+ updateFleetVendorContactPersonsLogo,
963
+ updateFleetVendorDocument,
964
+ updateFleetVendorLogo,
965
+ updateFleetVendorReview,
966
+ vendor_contact_person_logo_presigned_url,
967
+ vendor_logo_presigned_url
968
+ };