vms-nest-prisma-api-document 14.0.0 → 16.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/BaseResponse.d.ts +16 -1
- package/dist/services/account/analytics/user_login_analytics_service.d.ts +3 -3
- package/dist/services/account/analytics/user_login_analytics_service.js +11 -0
- package/dist/services/account/analytics/user_page_analytics_service.d.ts +1 -1
- package/dist/services/account/analytics/user_page_analytics_service.js +11 -0
- package/dist/services/account/bookmark_service.js +11 -0
- package/dist/services/account/ticket_service.js +11 -0
- package/dist/services/fleet/fuel_management/fleet_fuel_daily_summary_service.d.ts +16 -16
- package/dist/services/fleet/fuel_management/fleet_fuel_daily_summary_service.js +11 -0
- package/dist/services/fleet/fuel_management/fleet_fuel_refill_service.d.ts +64 -66
- package/dist/services/fleet/fuel_management/fleet_fuel_refill_service.js +19 -14
- package/dist/services/fleet/fuel_management/fleet_fuel_removal_service.d.ts +29 -29
- package/dist/services/fleet/fuel_management/fleet_fuel_removal_service.js +11 -0
- package/dist/services/gps/features/geofence/gps_geofence_service.d.ts +16 -16
- package/dist/services/gps/features/geofence/gps_geofence_service.js +11 -0
- package/dist/services/gps/features/geofence/gps_geofence_transaction_service.d.ts +15 -15
- package/dist/services/gps/features/geofence/gps_geofence_transaction_service.js +11 -0
- package/dist/services/gps/features/geofence/gps_geofence_transaction_summary_service.d.ts +10 -10
- package/dist/services/gps/features/geofence/gps_geofence_transaction_summary_service.js +11 -0
- package/dist/services/gps/features/geofence/trip_geofence_to_geofence_service.d.ts +6 -6
- package/dist/services/gps/features/geofence/trip_geofence_to_geofence_service.js +11 -0
- package/dist/services/gps/features/gps_live_track_share_link_service.d.ts +22 -22
- package/dist/services/gps/features/gps_live_track_share_link_service.js +11 -0
- package/dist/services/gps/features/gps_track_history_share_link_service.d.ts +15 -15
- package/dist/services/gps/features/gps_track_history_share_link_service.js +11 -0
- package/dist/services/gps/features/user_notification_preferences.service.d.ts +11 -11
- package/dist/services/gps/features/user_notification_preferences.service.js +11 -0
- package/dist/services/gps/features/user_report_preferences.service.d.ts +8 -8
- package/dist/services/gps/features/user_report_preferences.service.js +13 -2
- package/dist/services/gps/reports/gps_reports_mongo_service.d.ts +46 -46
- package/dist/services/gps/reports/gps_reports_mongo_service.js +11 -0
- package/dist/services/main/devices/master_device_service.js +11 -0
- package/dist/services/main/drivers/master_driver_service.js +11 -0
- package/dist/services/main/sims/master_sim_service.js +11 -0
- package/dist/services/main/users/user_admin_service.js +11 -0
- package/dist/services/main/users/user_organisation_service.js +11 -0
- package/dist/services/main/users/user_service.js +11 -0
- package/dist/services/main/vehicle/childs/vehicle_odometer_history.js +11 -0
- package/dist/services/main/vehicle/master_vehicle_service.js +11 -0
- package/dist/services/master/device/master_device_manufacturer_service.js +11 -0
- package/dist/services/master/device/master_device_model_service.js +11 -0
- package/dist/services/master/device/master_device_type_service.js +11 -0
- package/dist/services/master/expense/master_expense_name_service.js +11 -0
- package/dist/services/master/expense/master_expense_type_service.js +11 -0
- package/dist/services/master/expense/master_fuel_company_service.js +11 -0
- package/dist/services/master/expense/master_vendor_document_type_service.js +11 -0
- package/dist/services/master/expense/master_vendor_type_service.js +11 -0
- package/dist/services/master/fleet/master_fleet_incident_severity_service.js +11 -0
- package/dist/services/master/fleet/master_fleet_incident_status_service.js +11 -0
- package/dist/services/master/fleet/master_fleet_incident_type_service.js +11 -0
- package/dist/services/master/fleet/master_fleet_insurance_claim_status_service.js +11 -0
- package/dist/services/master/fleet/master_fleet_service_task_service.js +11 -0
- package/dist/services/master/main/master_main_country_service.js +11 -0
- package/dist/services/master/main/master_main_currency_service.js +11 -0
- package/dist/services/master/main/master_main_date_format_service.js +11 -0
- package/dist/services/master/main/master_main_eway_bill_provider_service.d.ts +2 -2
- package/dist/services/master/main/master_main_eway_bill_provider_service.js +11 -0
- package/dist/services/master/main/master_main_fasttag_bank_service.d.ts +2 -2
- package/dist/services/master/main/master_main_fasttag_bank_service.js +11 -0
- package/dist/services/master/main/master_main_industry_service.js +11 -0
- package/dist/services/master/main/master_main_landmark_service.d.ts +6 -6
- package/dist/services/master/main/master_main_landmark_service.js +11 -0
- package/dist/services/master/main/master_main_language_service.js +11 -0
- package/dist/services/master/main/master_main_sim_provider_service.js +11 -0
- package/dist/services/master/main/master_main_state_service.js +11 -0
- package/dist/services/master/main/master_main_timezone_service.js +11 -0
- package/dist/services/master/main/master_main_unit_distance_service.js +11 -0
- package/dist/services/master/main/master_main_unit_mileage_service.js +11 -0
- package/dist/services/master/main/master_main_unit_volume_service.js +11 -0
- package/dist/services/master/organisation/organisation_branch_service.js +11 -0
- package/dist/services/master/organisation/organisation_color_service.js +11 -0
- package/dist/services/master/organisation/organisation_group_service.js +11 -0
- package/dist/services/master/organisation/organisation_sub_company_service.js +11 -0
- package/dist/services/master/organisation/organisation_tag_service.js +11 -0
- package/dist/services/master/spare_part/master_spare_part_category_service.js +11 -0
- package/dist/services/master/spare_part/master_spare_part_sub_category_service.js +11 -0
- package/dist/services/master/spare_part/master_spare_part_unit_service.js +11 -0
- package/dist/services/master/trip/master_trip_party_type_service.js +11 -0
- package/dist/services/master/tyre/master_tyre_grade_service.js +11 -0
- package/dist/services/master/tyre/master_tyre_make_service.js +11 -0
- package/dist/services/master/tyre/master_tyre_model_service.js +11 -0
- package/dist/services/master/user/master_user_role_service.js +11 -0
- package/dist/services/master/user/master_user_status_service.js +11 -0
- package/dist/services/master/vehicle/master_vehicle_associated_to_service.js +11 -0
- package/dist/services/master/vehicle/master_vehicle_document_type_service.js +11 -0
- package/dist/services/master/vehicle/master_vehicle_fuel_removal_reason_service.d.ts +2 -2
- package/dist/services/master/vehicle/master_vehicle_fuel_removal_reason_service.js +11 -0
- package/dist/services/master/vehicle/master_vehicle_fuel_type_service.js +11 -0
- package/dist/services/master/vehicle/master_vehicle_fuel_unit_service.js +11 -0
- package/dist/services/master/vehicle/master_vehicle_make_service.js +11 -0
- package/dist/services/master/vehicle/master_vehicle_model_service.js +11 -0
- package/dist/services/master/vehicle/master_vehicle_ownership_type_service.js +11 -0
- package/dist/services/master/vehicle/master_vehicle_status_type_service.js +11 -0
- package/dist/services/master/vehicle/master_vehicle_sub_model_service.js +11 -0
- package/dist/services/master/vehicle/master_vehicle_type_service.js +11 -0
- package/dist/services/website/contact_us_detail_service.d.ts +1 -1
- package/dist/services/website/contact_us_detail_service.js +11 -0
- package/dist/services/website/faq_service.js +11 -0
- package/dist/services/website/static_pages_service.d.ts +1 -1
- package/dist/services/website/static_pages_service.js +11 -0
- package/dist/zod_utils/zod_base_schema.d.ts +36 -4
- package/dist/zod_utils/zod_base_schema.js +12 -0
- package/package.json +1 -1
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { FileType, Status } from './Enums.js';
|
|
2
|
+
|
|
1
3
|
interface PageData {
|
|
2
4
|
total_count: number;
|
|
3
5
|
page_count: number;
|
|
@@ -45,6 +47,19 @@ interface AWSPresignedUrl {
|
|
|
45
47
|
file_url: string;
|
|
46
48
|
file_key: string;
|
|
47
49
|
}
|
|
50
|
+
interface BaseCommionFile extends Record<string, unknown> {
|
|
51
|
+
usage_type?: string;
|
|
52
|
+
file_type: FileType;
|
|
53
|
+
file_url?: string;
|
|
54
|
+
file_key?: string;
|
|
55
|
+
file_name?: string;
|
|
56
|
+
file_description?: string;
|
|
57
|
+
file_size?: number;
|
|
58
|
+
file_metadata?: Record<string, unknown>;
|
|
59
|
+
status: Status;
|
|
60
|
+
added_date_time: string;
|
|
61
|
+
modified_date_time: string;
|
|
62
|
+
}
|
|
48
63
|
declare const r_log: (data?: {}) => {};
|
|
49
64
|
|
|
50
|
-
export { type AWSPresignedUrl, type BR, type FBR, type PageData, type SBR, type SummaryData, r_log };
|
|
65
|
+
export { type AWSPresignedUrl, type BR, type BaseCommionFile, type FBR, type PageData, type SBR, type SummaryData, r_log };
|
|
@@ -22,15 +22,15 @@ declare const UserLoginAnalyticsSchema: z.ZodObject<{
|
|
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
|
23
23
|
user_id: string;
|
|
24
24
|
organisation_id: string;
|
|
25
|
-
login_from: LoginFrom;
|
|
26
25
|
country_id: string;
|
|
26
|
+
login_from: LoginFrom;
|
|
27
27
|
os_details: Record<string, any>;
|
|
28
28
|
ip_details: Record<string, any>;
|
|
29
29
|
}, {
|
|
30
30
|
user_id: string;
|
|
31
31
|
organisation_id: string;
|
|
32
|
-
login_from: LoginFrom;
|
|
33
32
|
country_id: string;
|
|
33
|
+
login_from: LoginFrom;
|
|
34
34
|
os_details?: Record<string, any> | undefined;
|
|
35
35
|
ip_details?: Record<string, any> | undefined;
|
|
36
36
|
}>;
|
|
@@ -48,11 +48,11 @@ declare const UserLoginAnalyticsQuerySchema: z.ZodObject<{
|
|
|
48
48
|
organisation_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
49
49
|
country_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
50
50
|
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
login_from: LoginFrom;
|
|
51
52
|
search: string;
|
|
52
53
|
paging: PAGING;
|
|
53
54
|
page_count: number;
|
|
54
55
|
page_index: number;
|
|
55
|
-
login_from: LoginFrom;
|
|
56
56
|
date_format_id: string;
|
|
57
57
|
time_zone_id: string;
|
|
58
58
|
user_ids: string[];
|
|
@@ -181,6 +181,17 @@ var OrderBySchema = z2.array(
|
|
|
181
181
|
direction: enumMandatory("Order Direction", OrderBy, "asc" /* asc */)
|
|
182
182
|
})
|
|
183
183
|
);
|
|
184
|
+
var BaseFileSchema = z2.object({
|
|
185
|
+
usage_type: stringOptional("Usage Type", 0, 100),
|
|
186
|
+
file_type: enumMandatory("File Type", FileType, "Image" /* Image */),
|
|
187
|
+
file_url: stringOptional("File URL", 0, 300),
|
|
188
|
+
file_key: stringOptional("File Key", 0, 300),
|
|
189
|
+
file_name: stringOptional("File Name", 0, 300),
|
|
190
|
+
file_description: stringOptional("File Description", 0, 2e3),
|
|
191
|
+
file_size: numberOptional("File Size"),
|
|
192
|
+
file_metadata: dynamicJsonSchema("File Metadata", {}),
|
|
193
|
+
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
194
|
+
});
|
|
184
195
|
var BaseQuerySchema = z2.object({
|
|
185
196
|
search: stringOptional("Search", 0, 255, ""),
|
|
186
197
|
status: enumArrayOptional("Status", Status, getAllEnums(Status), 0, 10, true),
|
|
@@ -43,11 +43,11 @@ declare const UserPageAnalyticsQuerySchema: z.ZodObject<{
|
|
|
43
43
|
user_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
44
44
|
organisation_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
45
45
|
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
login_from: LoginFrom;
|
|
46
47
|
search: string;
|
|
47
48
|
paging: PAGING;
|
|
48
49
|
page_count: number;
|
|
49
50
|
page_index: number;
|
|
50
|
-
login_from: LoginFrom;
|
|
51
51
|
date_format_id: string;
|
|
52
52
|
time_zone_id: string;
|
|
53
53
|
user_ids: string[];
|
|
@@ -181,6 +181,17 @@ var OrderBySchema = z2.array(
|
|
|
181
181
|
direction: enumMandatory("Order Direction", OrderBy, "asc" /* asc */)
|
|
182
182
|
})
|
|
183
183
|
);
|
|
184
|
+
var BaseFileSchema = z2.object({
|
|
185
|
+
usage_type: stringOptional("Usage Type", 0, 100),
|
|
186
|
+
file_type: enumMandatory("File Type", FileType, "Image" /* Image */),
|
|
187
|
+
file_url: stringOptional("File URL", 0, 300),
|
|
188
|
+
file_key: stringOptional("File Key", 0, 300),
|
|
189
|
+
file_name: stringOptional("File Name", 0, 300),
|
|
190
|
+
file_description: stringOptional("File Description", 0, 2e3),
|
|
191
|
+
file_size: numberOptional("File Size"),
|
|
192
|
+
file_metadata: dynamicJsonSchema("File Metadata", {}),
|
|
193
|
+
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
194
|
+
});
|
|
184
195
|
var BaseQuerySchema = z2.object({
|
|
185
196
|
search: stringOptional("Search", 0, 255, ""),
|
|
186
197
|
status: enumArrayOptional("Status", Status, getAllEnums(Status), 0, 10, true),
|
|
@@ -194,6 +194,17 @@ var OrderBySchema = z2.array(
|
|
|
194
194
|
direction: enumMandatory("Order Direction", OrderBy, "asc" /* asc */)
|
|
195
195
|
})
|
|
196
196
|
);
|
|
197
|
+
var BaseFileSchema = z2.object({
|
|
198
|
+
usage_type: stringOptional("Usage Type", 0, 100),
|
|
199
|
+
file_type: enumMandatory("File Type", FileType, "Image" /* Image */),
|
|
200
|
+
file_url: stringOptional("File URL", 0, 300),
|
|
201
|
+
file_key: stringOptional("File Key", 0, 300),
|
|
202
|
+
file_name: stringOptional("File Name", 0, 300),
|
|
203
|
+
file_description: stringOptional("File Description", 0, 2e3),
|
|
204
|
+
file_size: numberOptional("File Size"),
|
|
205
|
+
file_metadata: dynamicJsonSchema("File Metadata", {}),
|
|
206
|
+
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
207
|
+
});
|
|
197
208
|
var BaseQuerySchema = z2.object({
|
|
198
209
|
search: stringOptional("Search", 0, 255, ""),
|
|
199
210
|
status: enumArrayOptional("Status", Status, getAllEnums(Status), 0, 10, true),
|
|
@@ -214,6 +214,17 @@ var OrderBySchema = z2.array(
|
|
|
214
214
|
direction: enumMandatory("Order Direction", OrderBy, "asc" /* asc */)
|
|
215
215
|
})
|
|
216
216
|
);
|
|
217
|
+
var BaseFileSchema = z2.object({
|
|
218
|
+
usage_type: stringOptional("Usage Type", 0, 100),
|
|
219
|
+
file_type: enumMandatory("File Type", FileType, "Image" /* Image */),
|
|
220
|
+
file_url: stringOptional("File URL", 0, 300),
|
|
221
|
+
file_key: stringOptional("File Key", 0, 300),
|
|
222
|
+
file_name: stringOptional("File Name", 0, 300),
|
|
223
|
+
file_description: stringOptional("File Description", 0, 2e3),
|
|
224
|
+
file_size: numberOptional("File Size"),
|
|
225
|
+
file_metadata: dynamicJsonSchema("File Metadata", {}),
|
|
226
|
+
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
227
|
+
});
|
|
217
228
|
var BaseQuerySchema = z2.object({
|
|
218
229
|
search: stringOptional("Search", 0, 255, ""),
|
|
219
230
|
status: enumArrayOptional("Status", Status, getAllEnums(Status), 0, 10, true),
|
|
@@ -62,22 +62,22 @@ declare const FleetFuelDailySummarySchema: z.ZodObject<{
|
|
|
62
62
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
63
63
|
}, "strip", z.ZodTypeAny, {
|
|
64
64
|
date: string;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
user_id: string;
|
|
68
|
-
vehicle_id: string;
|
|
69
|
-
driver_id: string;
|
|
70
|
-
device_id: string;
|
|
65
|
+
start_fuel_liters: number;
|
|
66
|
+
end_fuel_liters: number;
|
|
71
67
|
total_km: number;
|
|
72
68
|
consumed_fuel_liters: number;
|
|
73
69
|
refills_count: number;
|
|
74
|
-
start_fuel_liters: number;
|
|
75
|
-
end_fuel_liters: number;
|
|
76
70
|
refill_liters: number;
|
|
77
71
|
removals_count: number;
|
|
78
72
|
removal_liters: number;
|
|
79
73
|
mileage_kmpl: number;
|
|
80
74
|
liters_per_100km: number;
|
|
75
|
+
status: Status;
|
|
76
|
+
organisation_id: string;
|
|
77
|
+
user_id: string;
|
|
78
|
+
vehicle_id: string;
|
|
79
|
+
driver_id: string;
|
|
80
|
+
device_id: string;
|
|
81
81
|
}, {
|
|
82
82
|
date: string;
|
|
83
83
|
status: Status;
|
|
@@ -86,11 +86,11 @@ declare const FleetFuelDailySummarySchema: z.ZodObject<{
|
|
|
86
86
|
vehicle_id: string;
|
|
87
87
|
driver_id: string;
|
|
88
88
|
device_id: string;
|
|
89
|
+
start_fuel_liters?: unknown;
|
|
90
|
+
end_fuel_liters?: unknown;
|
|
89
91
|
total_km?: unknown;
|
|
90
92
|
consumed_fuel_liters?: unknown;
|
|
91
93
|
refills_count?: unknown;
|
|
92
|
-
start_fuel_liters?: unknown;
|
|
93
|
-
end_fuel_liters?: unknown;
|
|
94
94
|
refill_liters?: unknown;
|
|
95
95
|
removals_count?: unknown;
|
|
96
96
|
removal_liters?: unknown;
|
|
@@ -140,7 +140,6 @@ declare const FleetFuelDailySummaryQuerySchema: z.ZodObject<{
|
|
|
140
140
|
day_summary: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
141
141
|
}, "strip", z.ZodTypeAny, {
|
|
142
142
|
status: Status[];
|
|
143
|
-
time_zone_id: string;
|
|
144
143
|
search: string;
|
|
145
144
|
paging: PAGING;
|
|
146
145
|
page_count: number;
|
|
@@ -160,6 +159,7 @@ declare const FleetFuelDailySummaryQuerySchema: z.ZodObject<{
|
|
|
160
159
|
}[];
|
|
161
160
|
include_master_data: YesNo;
|
|
162
161
|
date_format_id: string;
|
|
162
|
+
time_zone_id: string;
|
|
163
163
|
organisation_ids: string[];
|
|
164
164
|
user_ids: string[];
|
|
165
165
|
vehicle_ids: string[];
|
|
@@ -170,8 +170,8 @@ declare const FleetFuelDailySummaryQuerySchema: z.ZodObject<{
|
|
|
170
170
|
vehicle_summary: YesNo;
|
|
171
171
|
day_summary: YesNo;
|
|
172
172
|
}, {
|
|
173
|
-
time_zone_id: string;
|
|
174
173
|
date_format_id: string;
|
|
174
|
+
time_zone_id: string;
|
|
175
175
|
from_date: string;
|
|
176
176
|
to_date: string;
|
|
177
177
|
status?: Status[] | undefined;
|
|
@@ -239,7 +239,6 @@ declare const FleetFuelDailyMonthlySummaryQuerySchema: z.ZodObject<{
|
|
|
239
239
|
to_date: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
240
240
|
}, "strip", z.ZodTypeAny, {
|
|
241
241
|
status: Status[];
|
|
242
|
-
time_zone_id: string;
|
|
243
242
|
search: string;
|
|
244
243
|
paging: PAGING;
|
|
245
244
|
page_count: number;
|
|
@@ -259,13 +258,14 @@ declare const FleetFuelDailyMonthlySummaryQuerySchema: z.ZodObject<{
|
|
|
259
258
|
}[];
|
|
260
259
|
include_master_data: YesNo;
|
|
261
260
|
date_format_id: string;
|
|
261
|
+
time_zone_id: string;
|
|
262
262
|
organisation_ids: string[];
|
|
263
263
|
vehicle_ids: string[];
|
|
264
264
|
from_date: string;
|
|
265
265
|
to_date: string;
|
|
266
266
|
}, {
|
|
267
|
-
time_zone_id: string;
|
|
268
267
|
date_format_id: string;
|
|
268
|
+
time_zone_id: string;
|
|
269
269
|
from_date: string;
|
|
270
270
|
to_date: string;
|
|
271
271
|
status?: Status[] | undefined;
|
|
@@ -327,7 +327,6 @@ declare const AllVehiclesFuelDailySummaryQuerySchema: z.ZodObject<{
|
|
|
327
327
|
}, "strip", z.ZodTypeAny, {
|
|
328
328
|
date: string;
|
|
329
329
|
status: Status[];
|
|
330
|
-
time_zone_id: string;
|
|
331
330
|
search: string;
|
|
332
331
|
paging: PAGING;
|
|
333
332
|
page_count: number;
|
|
@@ -347,11 +346,12 @@ declare const AllVehiclesFuelDailySummaryQuerySchema: z.ZodObject<{
|
|
|
347
346
|
}[];
|
|
348
347
|
include_master_data: YesNo;
|
|
349
348
|
date_format_id: string;
|
|
349
|
+
time_zone_id: string;
|
|
350
350
|
organisation_utrack_id: string;
|
|
351
351
|
}, {
|
|
352
352
|
date: string;
|
|
353
|
-
time_zone_id: string;
|
|
354
353
|
date_format_id: string;
|
|
354
|
+
time_zone_id: string;
|
|
355
355
|
organisation_utrack_id: string;
|
|
356
356
|
status?: Status[] | undefined;
|
|
357
357
|
search?: string | undefined;
|
|
@@ -239,6 +239,17 @@ var OrderBySchema = z2.array(
|
|
|
239
239
|
direction: enumMandatory("Order Direction", OrderBy, "asc" /* asc */)
|
|
240
240
|
})
|
|
241
241
|
);
|
|
242
|
+
var BaseFileSchema = z2.object({
|
|
243
|
+
usage_type: stringOptional("Usage Type", 0, 100),
|
|
244
|
+
file_type: enumMandatory("File Type", FileType, "Image" /* Image */),
|
|
245
|
+
file_url: stringOptional("File URL", 0, 300),
|
|
246
|
+
file_key: stringOptional("File Key", 0, 300),
|
|
247
|
+
file_name: stringOptional("File Name", 0, 300),
|
|
248
|
+
file_description: stringOptional("File Description", 0, 2e3),
|
|
249
|
+
file_size: numberOptional("File Size"),
|
|
250
|
+
file_metadata: dynamicJsonSchema("File Metadata", {}),
|
|
251
|
+
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
252
|
+
});
|
|
242
253
|
var BaseQuerySchema = z2.object({
|
|
243
254
|
search: stringOptional("Search", 0, 255, ""),
|
|
244
255
|
status: enumArrayOptional("Status", Status, getAllEnums(Status), 0, 10, true),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GPSFuelApproveStatus, RefillEntrySource, RefillMethod, PaymentMode, PaymentStatus, YesNo, Status, FileType, PAGING, LoadParents, LoadChild, LoadChildCount, OrderBy } from '../../../core/Enums.js';
|
|
2
|
-
import { FBR, SBR, BR, AWSPresignedUrl } from '../../../core/BaseResponse.js';
|
|
2
|
+
import { BaseCommionFile, FBR, SBR, BR, AWSPresignedUrl } from '../../../core/BaseResponse.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { FilePresignedUrlDTO } from '../../../zod_utils/zod_base_schema.js';
|
|
5
5
|
import { U as UserOrganisation, a as User, M as MasterVehicle, b as MasterDriver, c as MasterDevice, d as MasterVehicleFuelType, e as MasterVehicleFuelUnit } from '../../../user_organisation_service-djKCoZTQ.js';
|
|
@@ -82,26 +82,13 @@ interface FleetFuelRefill extends Record<string, unknown> {
|
|
|
82
82
|
FleetFuelRefillFile?: number;
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
interface FleetFuelRefillFile extends
|
|
85
|
+
interface FleetFuelRefillFile extends BaseCommionFile {
|
|
86
86
|
fleet_fuel_refill_file_id: string;
|
|
87
|
-
file_type: FileType;
|
|
88
|
-
file_url?: string;
|
|
89
|
-
file_key?: string;
|
|
90
|
-
file_name?: string;
|
|
91
|
-
file_description?: string;
|
|
92
|
-
file_size?: number;
|
|
93
|
-
file_metadata?: Record<string, unknown>;
|
|
94
|
-
status: Status;
|
|
95
|
-
added_date_time: string;
|
|
96
|
-
modified_date_time: string;
|
|
97
|
-
organisation_id: string;
|
|
98
|
-
UserOrganisation?: UserOrganisation;
|
|
99
87
|
fleet_fuel_refill_id: string;
|
|
100
|
-
|
|
88
|
+
organisation_id: string;
|
|
101
89
|
}
|
|
102
90
|
declare const FleetFuelRefillFileSchema: z.ZodObject<{
|
|
103
|
-
|
|
104
|
-
fleet_fuel_refill_id: z.ZodEffects<z.ZodString, string, string>;
|
|
91
|
+
usage_type: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
105
92
|
file_type: z.ZodType<FileType, z.ZodTypeDef, FileType>;
|
|
106
93
|
file_url: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
107
94
|
file_key: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
@@ -110,10 +97,13 @@ declare const FleetFuelRefillFileSchema: z.ZodObject<{
|
|
|
110
97
|
file_size: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
111
98
|
file_metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
112
99
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
100
|
+
} & {
|
|
101
|
+
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
102
|
+
fleet_fuel_refill_id: z.ZodEffects<z.ZodString, string, string>;
|
|
113
103
|
}, "strip", z.ZodTypeAny, {
|
|
114
|
-
fleet_fuel_refill_id: string;
|
|
115
104
|
status: Status;
|
|
116
105
|
organisation_id: string;
|
|
106
|
+
usage_type: string;
|
|
117
107
|
file_type: FileType;
|
|
118
108
|
file_url: string;
|
|
119
109
|
file_key: string;
|
|
@@ -121,11 +111,13 @@ declare const FleetFuelRefillFileSchema: z.ZodObject<{
|
|
|
121
111
|
file_description: string;
|
|
122
112
|
file_size: number;
|
|
123
113
|
file_metadata: Record<string, any>;
|
|
124
|
-
}, {
|
|
125
114
|
fleet_fuel_refill_id: string;
|
|
115
|
+
}, {
|
|
126
116
|
status: Status;
|
|
127
117
|
organisation_id: string;
|
|
128
118
|
file_type: FileType;
|
|
119
|
+
fleet_fuel_refill_id: string;
|
|
120
|
+
usage_type?: string | undefined;
|
|
129
121
|
file_url?: string | undefined;
|
|
130
122
|
file_key?: string | undefined;
|
|
131
123
|
file_name?: string | undefined;
|
|
@@ -175,9 +167,8 @@ declare const FleetFuelRefillSchema: z.ZodObject<{
|
|
|
175
167
|
is_previous_entries_missed: z.ZodType<YesNo, z.ZodTypeDef, YesNo>;
|
|
176
168
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
177
169
|
time_zone_id: z.ZodEffects<z.ZodString, string, string>;
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
fleet_fuel_refill_id: z.ZodEffects<z.ZodString, string, string>;
|
|
170
|
+
FleetFuelRefillFile: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
171
|
+
usage_type: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
181
172
|
file_type: z.ZodType<FileType, z.ZodTypeDef, FileType>;
|
|
182
173
|
file_url: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
183
174
|
file_key: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
@@ -186,10 +177,13 @@ declare const FleetFuelRefillSchema: z.ZodObject<{
|
|
|
186
177
|
file_size: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
187
178
|
file_metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
188
179
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
180
|
+
} & {
|
|
181
|
+
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
182
|
+
fleet_fuel_refill_id: z.ZodEffects<z.ZodString, string, string>;
|
|
189
183
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
190
|
-
fleet_fuel_refill_id: string;
|
|
191
184
|
status: Status;
|
|
192
185
|
organisation_id: string;
|
|
186
|
+
usage_type: string;
|
|
193
187
|
file_type: FileType;
|
|
194
188
|
file_url: string;
|
|
195
189
|
file_key: string;
|
|
@@ -197,11 +191,13 @@ declare const FleetFuelRefillSchema: z.ZodObject<{
|
|
|
197
191
|
file_description: string;
|
|
198
192
|
file_size: number;
|
|
199
193
|
file_metadata: Record<string, any>;
|
|
200
|
-
}, {
|
|
201
194
|
fleet_fuel_refill_id: string;
|
|
195
|
+
}, {
|
|
202
196
|
status: Status;
|
|
203
197
|
organisation_id: string;
|
|
204
198
|
file_type: FileType;
|
|
199
|
+
fleet_fuel_refill_id: string;
|
|
200
|
+
usage_type?: string | undefined;
|
|
205
201
|
file_url?: string | undefined;
|
|
206
202
|
file_key?: string | undefined;
|
|
207
203
|
file_name?: string | undefined;
|
|
@@ -210,6 +206,17 @@ declare const FleetFuelRefillSchema: z.ZodObject<{
|
|
|
210
206
|
file_metadata?: Record<string, any> | undefined;
|
|
211
207
|
}>, "many">>>;
|
|
212
208
|
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
status: Status;
|
|
210
|
+
organisation_id: string;
|
|
211
|
+
user_id: string;
|
|
212
|
+
vehicle_id: string;
|
|
213
|
+
driver_id: string;
|
|
214
|
+
device_id: string;
|
|
215
|
+
time_zone_id: string;
|
|
216
|
+
vehicle_fuel_type_id: string;
|
|
217
|
+
vehicle_fuel_unit_id: string;
|
|
218
|
+
odometer_reading: number;
|
|
219
|
+
google_location: string;
|
|
213
220
|
date_time: string;
|
|
214
221
|
admin_verify_status: GPSFuelApproveStatus;
|
|
215
222
|
transporter_verify_status: GPSFuelApproveStatus;
|
|
@@ -225,26 +232,15 @@ declare const FleetFuelRefillSchema: z.ZodObject<{
|
|
|
225
232
|
payment_reference_number: string;
|
|
226
233
|
fuel_card_number: string;
|
|
227
234
|
payment_notes: string;
|
|
228
|
-
google_location: string;
|
|
229
|
-
odometer_reading: number;
|
|
230
235
|
tank_size: number;
|
|
231
236
|
is_full_tank: YesNo;
|
|
232
237
|
is_previous_entries_missed: YesNo;
|
|
233
|
-
status: Status;
|
|
234
|
-
organisation_id: string;
|
|
235
|
-
user_id: string;
|
|
236
|
-
vehicle_id: string;
|
|
237
|
-
driver_id: string;
|
|
238
|
-
device_id: string;
|
|
239
238
|
vendor_id: string;
|
|
240
239
|
fuel_station_id: string;
|
|
241
|
-
|
|
242
|
-
vehicle_fuel_unit_id: string;
|
|
243
|
-
time_zone_id: string;
|
|
244
|
-
refill_files: {
|
|
245
|
-
fleet_fuel_refill_id: string;
|
|
240
|
+
FleetFuelRefillFile: {
|
|
246
241
|
status: Status;
|
|
247
242
|
organisation_id: string;
|
|
243
|
+
usage_type: string;
|
|
248
244
|
file_type: FileType;
|
|
249
245
|
file_url: string;
|
|
250
246
|
file_key: string;
|
|
@@ -252,7 +248,10 @@ declare const FleetFuelRefillSchema: z.ZodObject<{
|
|
|
252
248
|
file_description: string;
|
|
253
249
|
file_size: number;
|
|
254
250
|
file_metadata: Record<string, any>;
|
|
251
|
+
fleet_fuel_refill_id: string;
|
|
255
252
|
}[];
|
|
253
|
+
latitude?: number | undefined;
|
|
254
|
+
longitude?: number | undefined;
|
|
256
255
|
before_refill_quantity?: number | undefined;
|
|
257
256
|
after_refill_quantity?: number | undefined;
|
|
258
257
|
refill_quantity?: number | undefined;
|
|
@@ -260,9 +259,16 @@ declare const FleetFuelRefillSchema: z.ZodObject<{
|
|
|
260
259
|
diff_refill_quantity?: number | undefined;
|
|
261
260
|
cost_per_unit?: number | undefined;
|
|
262
261
|
total_cost?: number | undefined;
|
|
263
|
-
latitude?: number | undefined;
|
|
264
|
-
longitude?: number | undefined;
|
|
265
262
|
}, {
|
|
263
|
+
status: Status;
|
|
264
|
+
organisation_id: string;
|
|
265
|
+
user_id: string;
|
|
266
|
+
vehicle_id: string;
|
|
267
|
+
driver_id: string;
|
|
268
|
+
device_id: string;
|
|
269
|
+
time_zone_id: string;
|
|
270
|
+
vehicle_fuel_type_id: string;
|
|
271
|
+
vehicle_fuel_unit_id: string;
|
|
266
272
|
date_time: string;
|
|
267
273
|
admin_verify_status: GPSFuelApproveStatus;
|
|
268
274
|
transporter_verify_status: GPSFuelApproveStatus;
|
|
@@ -270,17 +276,12 @@ declare const FleetFuelRefillSchema: z.ZodObject<{
|
|
|
270
276
|
payment_status: PaymentStatus;
|
|
271
277
|
is_full_tank: YesNo;
|
|
272
278
|
is_previous_entries_missed: YesNo;
|
|
273
|
-
status: Status;
|
|
274
|
-
organisation_id: string;
|
|
275
|
-
user_id: string;
|
|
276
|
-
vehicle_id: string;
|
|
277
|
-
driver_id: string;
|
|
278
|
-
device_id: string;
|
|
279
279
|
vendor_id: string;
|
|
280
280
|
fuel_station_id: string;
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
281
|
+
odometer_reading?: unknown;
|
|
282
|
+
latitude?: unknown;
|
|
283
|
+
longitude?: unknown;
|
|
284
|
+
google_location?: string | undefined;
|
|
284
285
|
before_refill_quantity?: unknown;
|
|
285
286
|
after_refill_quantity?: unknown;
|
|
286
287
|
refill_quantity?: unknown;
|
|
@@ -298,16 +299,13 @@ declare const FleetFuelRefillSchema: z.ZodObject<{
|
|
|
298
299
|
payment_reference_number?: string | undefined;
|
|
299
300
|
fuel_card_number?: string | undefined;
|
|
300
301
|
payment_notes?: string | undefined;
|
|
301
|
-
latitude?: unknown;
|
|
302
|
-
longitude?: unknown;
|
|
303
|
-
google_location?: string | undefined;
|
|
304
|
-
odometer_reading?: unknown;
|
|
305
302
|
tank_size?: unknown;
|
|
306
|
-
|
|
307
|
-
fleet_fuel_refill_id: string;
|
|
303
|
+
FleetFuelRefillFile?: {
|
|
308
304
|
status: Status;
|
|
309
305
|
organisation_id: string;
|
|
310
306
|
file_type: FileType;
|
|
307
|
+
fleet_fuel_refill_id: string;
|
|
308
|
+
usage_type?: string | undefined;
|
|
311
309
|
file_url?: string | undefined;
|
|
312
310
|
file_key?: string | undefined;
|
|
313
311
|
file_name?: string | undefined;
|
|
@@ -364,11 +362,7 @@ declare const FleetFuelRefillQuerySchema: z.ZodObject<{
|
|
|
364
362
|
from_date: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
365
363
|
to_date: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
366
364
|
}, "strip", z.ZodTypeAny, {
|
|
367
|
-
admin_verify_status: GPSFuelApproveStatus[];
|
|
368
|
-
transporter_verify_status: GPSFuelApproveStatus[];
|
|
369
|
-
entry_source: RefillEntrySource[];
|
|
370
365
|
status: Status[];
|
|
371
|
-
time_zone_id: string;
|
|
372
366
|
search: string;
|
|
373
367
|
paging: PAGING;
|
|
374
368
|
page_count: number;
|
|
@@ -388,26 +382,27 @@ declare const FleetFuelRefillQuerySchema: z.ZodObject<{
|
|
|
388
382
|
}[];
|
|
389
383
|
include_master_data: YesNo;
|
|
390
384
|
date_format_id: string;
|
|
385
|
+
time_zone_id: string;
|
|
391
386
|
organisation_ids: string[];
|
|
392
387
|
user_ids: string[];
|
|
393
388
|
vehicle_ids: string[];
|
|
394
389
|
driver_ids: string[];
|
|
395
390
|
device_ids: string[];
|
|
391
|
+
from_date: string;
|
|
392
|
+
to_date: string;
|
|
393
|
+
vehicle_fuel_type_ids: string[];
|
|
394
|
+
admin_verify_status: GPSFuelApproveStatus[];
|
|
395
|
+
transporter_verify_status: GPSFuelApproveStatus[];
|
|
396
|
+
entry_source: RefillEntrySource[];
|
|
396
397
|
vendor_ids: string[];
|
|
397
398
|
fuel_station_ids: string[];
|
|
398
|
-
vehicle_fuel_type_ids: string[];
|
|
399
399
|
vehicle_fuel_unit_ids: string[];
|
|
400
400
|
fleet_fuel_refill_ids: string[];
|
|
401
|
-
from_date: string;
|
|
402
|
-
to_date: string;
|
|
403
401
|
}, {
|
|
404
|
-
time_zone_id: string;
|
|
405
402
|
date_format_id: string;
|
|
403
|
+
time_zone_id: string;
|
|
406
404
|
from_date: string;
|
|
407
405
|
to_date: string;
|
|
408
|
-
admin_verify_status?: GPSFuelApproveStatus[] | undefined;
|
|
409
|
-
transporter_verify_status?: GPSFuelApproveStatus[] | undefined;
|
|
410
|
-
entry_source?: RefillEntrySource[] | undefined;
|
|
411
406
|
status?: Status[] | undefined;
|
|
412
407
|
search?: string | undefined;
|
|
413
408
|
paging?: PAGING | undefined;
|
|
@@ -432,9 +427,12 @@ declare const FleetFuelRefillQuerySchema: z.ZodObject<{
|
|
|
432
427
|
vehicle_ids?: string[] | undefined;
|
|
433
428
|
driver_ids?: string[] | undefined;
|
|
434
429
|
device_ids?: string[] | undefined;
|
|
430
|
+
vehicle_fuel_type_ids?: string[] | undefined;
|
|
431
|
+
admin_verify_status?: GPSFuelApproveStatus[] | undefined;
|
|
432
|
+
transporter_verify_status?: GPSFuelApproveStatus[] | undefined;
|
|
433
|
+
entry_source?: RefillEntrySource[] | undefined;
|
|
435
434
|
vendor_ids?: string[] | undefined;
|
|
436
435
|
fuel_station_ids?: string[] | undefined;
|
|
437
|
-
vehicle_fuel_type_ids?: string[] | undefined;
|
|
438
436
|
vehicle_fuel_unit_ids?: string[] | undefined;
|
|
439
437
|
fleet_fuel_refill_ids?: string[] | undefined;
|
|
440
438
|
}>;
|
|
@@ -290,6 +290,17 @@ var OrderBySchema = z2.array(
|
|
|
290
290
|
direction: enumMandatory("Order Direction", OrderBy, "asc" /* asc */)
|
|
291
291
|
})
|
|
292
292
|
);
|
|
293
|
+
var BaseFileSchema = z2.object({
|
|
294
|
+
usage_type: stringOptional("Usage Type", 0, 100),
|
|
295
|
+
file_type: enumMandatory("File Type", FileType, "Image" /* Image */),
|
|
296
|
+
file_url: stringOptional("File URL", 0, 300),
|
|
297
|
+
file_key: stringOptional("File Key", 0, 300),
|
|
298
|
+
file_name: stringOptional("File Name", 0, 300),
|
|
299
|
+
file_description: stringOptional("File Description", 0, 2e3),
|
|
300
|
+
file_size: numberOptional("File Size"),
|
|
301
|
+
file_metadata: dynamicJsonSchema("File Metadata", {}),
|
|
302
|
+
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
303
|
+
});
|
|
293
304
|
var BaseQuerySchema = z2.object({
|
|
294
305
|
search: stringOptional("Search", 0, 255, ""),
|
|
295
306
|
status: enumArrayOptional("Status", Status, getAllEnums(Status), 0, 10, true),
|
|
@@ -340,19 +351,11 @@ var ENDPOINTS = {
|
|
|
340
351
|
create_file: `${URL}/create_file`,
|
|
341
352
|
remove_file: (id) => `${URL}/remove_file/${id}`
|
|
342
353
|
};
|
|
343
|
-
var FleetFuelRefillFileSchema =
|
|
344
|
-
organisation_id:
|
|
354
|
+
var FleetFuelRefillFileSchema = BaseFileSchema.extend({
|
|
355
|
+
organisation_id: single_select_optional("UserOrganisation"),
|
|
345
356
|
// ✅ Single-Selection -> UserOrganisation
|
|
346
|
-
fleet_fuel_refill_id:
|
|
357
|
+
fleet_fuel_refill_id: single_select_optional("FleetFuelRefill")
|
|
347
358
|
// ✅ Single-Selection -> FleetFuelRefill
|
|
348
|
-
file_type: enumMandatory("File Type", FileType, "Image" /* Image */),
|
|
349
|
-
file_url: stringOptional("File URL", 0, 300),
|
|
350
|
-
file_key: stringOptional("File Key", 0, 300),
|
|
351
|
-
file_name: stringOptional("File Name", 0, 300),
|
|
352
|
-
file_description: stringOptional("File Description", 0, 2e3),
|
|
353
|
-
file_size: numberOptional("File Size"),
|
|
354
|
-
file_metadata: dynamicJsonSchema("File Metadata", {}),
|
|
355
|
-
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
356
359
|
});
|
|
357
360
|
var FleetFuelRefillSchema = z3.object({
|
|
358
361
|
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
@@ -438,7 +441,7 @@ var FleetFuelRefillSchema = z3.object({
|
|
|
438
441
|
// Other
|
|
439
442
|
status: enumMandatory("Status", Status, "Active" /* Active */),
|
|
440
443
|
time_zone_id: single_select_mandatory("MasterMainTimeZone"),
|
|
441
|
-
|
|
444
|
+
FleetFuelRefillFile: nestedArrayOfObjectsOptional(
|
|
442
445
|
"Refill Files",
|
|
443
446
|
FleetFuelRefillFileSchema,
|
|
444
447
|
[]
|
|
@@ -525,9 +528,11 @@ var toFleetFuelRefillPayload = (row) => ({
|
|
|
525
528
|
status: row.status,
|
|
526
529
|
time_zone_id: "",
|
|
527
530
|
// Needs to be provided manually
|
|
528
|
-
|
|
531
|
+
FleetFuelRefillFile: row.FleetFuelRefillFile?.map((file) => ({
|
|
529
532
|
organisation_id: file.organisation_id ?? "",
|
|
530
533
|
fleet_fuel_refill_id: file.fleet_fuel_refill_id ?? "",
|
|
534
|
+
fleet_fuel_refill_file_id: file.fleet_fuel_refill_file_id ?? "",
|
|
535
|
+
usage_type: file.usage_type || "",
|
|
531
536
|
file_type: file.file_type,
|
|
532
537
|
file_url: file.file_url || "",
|
|
533
538
|
file_key: file.file_key || "",
|
|
@@ -579,7 +584,7 @@ var newFleetFuelRefillPayload = () => ({
|
|
|
579
584
|
is_previous_entries_missed: "No" /* No */,
|
|
580
585
|
status: "Active" /* Active */,
|
|
581
586
|
time_zone_id: "",
|
|
582
|
-
|
|
587
|
+
FleetFuelRefillFile: []
|
|
583
588
|
});
|
|
584
589
|
var findFleetFuelRefill = async (data) => {
|
|
585
590
|
return apiPost(ENDPOINTS.find, data);
|