vms-nest-api-document 35.0.0 → 37.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/Enums.d.ts +5 -1
- package/dist/core/Enums.js +6 -0
- package/dist/services/core/cronjobs.service.d.ts +12 -12
- package/dist/services/core/external_api_push.service.d.ts +10 -10
- package/dist/services/core/external_api_share.service.d.ts +17 -17
- package/dist/services/core/external_api_sync.service.d.ts +282 -0
- package/dist/services/core/external_api_sync.service.js +410 -0
- package/dist/services/gps/features/gps_lock_digital_door_log_service.d.ts +2 -2
- package/dist/services/gps/features/gps_lock_relay_log_service.d.ts +2 -2
- package/dist/services/gps/reports/gps_reports_mongo_service.d.ts +18 -18
- package/dist/services/main/device/master_data_check_service.d.ts +3 -3
- package/dist/services/main/device/master_device_service.d.ts +6 -6
- package/dist/services/main/device/master_traccar_server_service.d.ts +2 -2
- package/package.json +1 -1
package/dist/core/Enums.d.ts
CHANGED
|
@@ -38,6 +38,10 @@ declare enum Status {
|
|
|
38
38
|
Active = "Active",
|
|
39
39
|
Inactive = "Inactive"
|
|
40
40
|
}
|
|
41
|
+
declare enum APISyncRunType {
|
|
42
|
+
Scheduled = "Scheduled",
|
|
43
|
+
Manual = "Manual"
|
|
44
|
+
}
|
|
41
45
|
declare enum InvoiceStatus {
|
|
42
46
|
InvoiceGenerated = "InvoiceGenerated",
|
|
43
47
|
InvoiceDue = "InvoiceDue",
|
|
@@ -878,4 +882,4 @@ declare enum APIAuthType {
|
|
|
878
882
|
BASIC_AUTH = "BASIC_AUTH"
|
|
879
883
|
}
|
|
880
884
|
|
|
881
|
-
export { APIAuthType, AdminRole, AlertSubType, AlertType, ApprovalStatus, AttendanceMethod, BankAccountType, BillingStatus, BloodGroup, BooleanType, BusLeg, BusStopType, DayRunRunningStatus, DayRunStatus, DayRunStopStatus, DeviceStatus, DeviceType, DocumentStatus, DocumentType, DocumentValidityStatus, DoorSensorStatus, DriverType, ExecutionStatus, ExpenseCategory, ExpiryType, FileType, FleetSize, FleetVendorAddressLabel, FuelTankType, GPSFuelApproveStatus, GPSSource, GPSType, GPSVehicleCategory, Gender, GeofencePurposeType, GeofenceStatusType, GeofenceType, HolidayType, IncidentRoadType, IncidentTime, IncidentVisibility, IncidentWeather, InspectionActionStatus, InspectionPriority, InspectionScheduleStatus, InspectionStatus, InspectionType, InvoiceStatus, Is12AM, IssueSeverity, IssueSource, IssueStatus, JobCardStatus, LifeExpiry, LinkStatus, LinkType, LoadChild, LoadChildCount, LoadParents, LoanInterestType, LoginFrom, MenuType, Module, NightDriving, NotificationChannel, NotificationList, NotificationPreference, OdometerSource, OnOff, OrderBy, OverSpeed, PAGING, PaymentMode, PaymentStatus, Priority, PurchaseOrderStatus, PurchaseType, PurchaseVehicleType, RecurrenceInterval, RefillEntrySource, RefillMethod, ReminderSource, ReminderStatus, ReminderTriggerType, ReminderType, ReportChannel, ReportList, ReportType, RequestType, RetreadingMethod, RunType, ScheduleStatus, ScheduleType, ServiceScheduleStatus, ServiceStatus, ServiceType, ShareChannel, SimStatus, Status, SteeringType, StockType, StudentLeaveType, StudentLegStatus, TicketStatus, TimeSlot, TrackHistoryLinkStatus, TransportPlanType, TyreStatus, VehicleLifeStatus, VerifyStatus, WheelDriveType, YesNo };
|
|
885
|
+
export { APIAuthType, APISyncRunType, AdminRole, AlertSubType, AlertType, ApprovalStatus, AttendanceMethod, BankAccountType, BillingStatus, BloodGroup, BooleanType, BusLeg, BusStopType, DayRunRunningStatus, DayRunStatus, DayRunStopStatus, DeviceStatus, DeviceType, DocumentStatus, DocumentType, DocumentValidityStatus, DoorSensorStatus, DriverType, ExecutionStatus, ExpenseCategory, ExpiryType, FileType, FleetSize, FleetVendorAddressLabel, FuelTankType, GPSFuelApproveStatus, GPSSource, GPSType, GPSVehicleCategory, Gender, GeofencePurposeType, GeofenceStatusType, GeofenceType, HolidayType, IncidentRoadType, IncidentTime, IncidentVisibility, IncidentWeather, InspectionActionStatus, InspectionPriority, InspectionScheduleStatus, InspectionStatus, InspectionType, InvoiceStatus, Is12AM, IssueSeverity, IssueSource, IssueStatus, JobCardStatus, LifeExpiry, LinkStatus, LinkType, LoadChild, LoadChildCount, LoadParents, LoanInterestType, LoginFrom, MenuType, Module, NightDriving, NotificationChannel, NotificationList, NotificationPreference, OdometerSource, OnOff, OrderBy, OverSpeed, PAGING, PaymentMode, PaymentStatus, Priority, PurchaseOrderStatus, PurchaseType, PurchaseVehicleType, RecurrenceInterval, RefillEntrySource, RefillMethod, ReminderSource, ReminderStatus, ReminderTriggerType, ReminderType, ReportChannel, ReportList, ReportType, RequestType, RetreadingMethod, RunType, ScheduleStatus, ScheduleType, ServiceScheduleStatus, ServiceStatus, ServiceType, ShareChannel, SimStatus, Status, SteeringType, StockType, StudentLeaveType, StudentLegStatus, TicketStatus, TimeSlot, TrackHistoryLinkStatus, TransportPlanType, TyreStatus, VehicleLifeStatus, VerifyStatus, WheelDriveType, YesNo };
|
package/dist/core/Enums.js
CHANGED
|
@@ -47,6 +47,11 @@ var Status = /* @__PURE__ */ ((Status2) => {
|
|
|
47
47
|
Status2["Inactive"] = "Inactive";
|
|
48
48
|
return Status2;
|
|
49
49
|
})(Status || {});
|
|
50
|
+
var APISyncRunType = /* @__PURE__ */ ((APISyncRunType2) => {
|
|
51
|
+
APISyncRunType2["Scheduled"] = "Scheduled";
|
|
52
|
+
APISyncRunType2["Manual"] = "Manual";
|
|
53
|
+
return APISyncRunType2;
|
|
54
|
+
})(APISyncRunType || {});
|
|
50
55
|
var InvoiceStatus = /* @__PURE__ */ ((InvoiceStatus2) => {
|
|
51
56
|
InvoiceStatus2["InvoiceGenerated"] = "InvoiceGenerated";
|
|
52
57
|
InvoiceStatus2["InvoiceDue"] = "InvoiceDue";
|
|
@@ -992,6 +997,7 @@ var APIAuthType = /* @__PURE__ */ ((APIAuthType2) => {
|
|
|
992
997
|
})(APIAuthType || {});
|
|
993
998
|
export {
|
|
994
999
|
APIAuthType,
|
|
1000
|
+
APISyncRunType,
|
|
995
1001
|
AdminRole,
|
|
996
1002
|
AlertSubType,
|
|
997
1003
|
AlertType,
|
|
@@ -86,10 +86,8 @@ declare const CronMonitorQuerySchema: z.ZodObject<{
|
|
|
86
86
|
run_type: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof RunType>, "many">>>;
|
|
87
87
|
execution_status: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ExecutionStatus>, "many">>>;
|
|
88
88
|
}, "strip", z.ZodTypeAny, {
|
|
89
|
-
run_type: RunType[];
|
|
90
|
-
execution_status: ExecutionStatus[];
|
|
91
|
-
status: Status[];
|
|
92
89
|
is_enabled: YesNo[];
|
|
90
|
+
status: Status[];
|
|
93
91
|
search: string;
|
|
94
92
|
paging: PAGING;
|
|
95
93
|
page_count: number;
|
|
@@ -110,13 +108,13 @@ declare const CronMonitorQuerySchema: z.ZodObject<{
|
|
|
110
108
|
include_master_data: YesNo;
|
|
111
109
|
date_format_id: string;
|
|
112
110
|
time_zone_id: string;
|
|
111
|
+
run_type: RunType[];
|
|
112
|
+
execution_status: ExecutionStatus[];
|
|
113
113
|
}, {
|
|
114
114
|
date_format_id: string;
|
|
115
115
|
time_zone_id: string;
|
|
116
|
-
run_type?: RunType[] | undefined;
|
|
117
|
-
execution_status?: ExecutionStatus[] | undefined;
|
|
118
|
-
status?: Status[] | undefined;
|
|
119
116
|
is_enabled?: YesNo[] | undefined;
|
|
117
|
+
status?: Status[] | undefined;
|
|
120
118
|
search?: string | undefined;
|
|
121
119
|
paging?: PAGING | undefined;
|
|
122
120
|
page_count?: unknown;
|
|
@@ -135,6 +133,8 @@ declare const CronMonitorQuerySchema: z.ZodObject<{
|
|
|
135
133
|
direction: OrderBy;
|
|
136
134
|
}[] | undefined;
|
|
137
135
|
include_master_data?: YesNo | undefined;
|
|
136
|
+
run_type?: RunType[] | undefined;
|
|
137
|
+
execution_status?: ExecutionStatus[] | undefined;
|
|
138
138
|
}>;
|
|
139
139
|
type CronMonitorQueryDTO = z.infer<typeof CronMonitorQuerySchema>;
|
|
140
140
|
declare const CronJobLogQuerySchema: z.ZodObject<{
|
|
@@ -173,9 +173,6 @@ declare const CronJobLogQuerySchema: z.ZodObject<{
|
|
|
173
173
|
execution_status: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ExecutionStatus>, "many">>>;
|
|
174
174
|
is_latest_run: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof YesNo>, "many">>>;
|
|
175
175
|
}, "strip", z.ZodTypeAny, {
|
|
176
|
-
run_type: RunType[];
|
|
177
|
-
execution_status: ExecutionStatus[];
|
|
178
|
-
is_latest_run: YesNo[];
|
|
179
176
|
status: Status[];
|
|
180
177
|
search: string;
|
|
181
178
|
paging: PAGING;
|
|
@@ -197,13 +194,13 @@ declare const CronJobLogQuerySchema: z.ZodObject<{
|
|
|
197
194
|
include_master_data: YesNo;
|
|
198
195
|
date_format_id: string;
|
|
199
196
|
time_zone_id: string;
|
|
197
|
+
run_type: RunType[];
|
|
198
|
+
execution_status: ExecutionStatus[];
|
|
199
|
+
is_latest_run: YesNo[];
|
|
200
200
|
cron_job_ids: string[];
|
|
201
201
|
}, {
|
|
202
202
|
date_format_id: string;
|
|
203
203
|
time_zone_id: string;
|
|
204
|
-
run_type?: RunType[] | undefined;
|
|
205
|
-
execution_status?: ExecutionStatus[] | undefined;
|
|
206
|
-
is_latest_run?: YesNo[] | undefined;
|
|
207
204
|
status?: Status[] | undefined;
|
|
208
205
|
search?: string | undefined;
|
|
209
206
|
paging?: PAGING | undefined;
|
|
@@ -223,6 +220,9 @@ declare const CronJobLogQuerySchema: z.ZodObject<{
|
|
|
223
220
|
direction: OrderBy;
|
|
224
221
|
}[] | undefined;
|
|
225
222
|
include_master_data?: YesNo | undefined;
|
|
223
|
+
run_type?: RunType[] | undefined;
|
|
224
|
+
execution_status?: ExecutionStatus[] | undefined;
|
|
225
|
+
is_latest_run?: YesNo[] | undefined;
|
|
226
226
|
cron_job_ids?: string[] | undefined;
|
|
227
227
|
}>;
|
|
228
228
|
type CronJobLogQueryDTO = z.infer<typeof CronJobLogQuerySchema>;
|
|
@@ -85,22 +85,22 @@ declare const ApiDataPushManagementSchema: z.ZodObject<{
|
|
|
85
85
|
frequency_seconds: z.ZodEffects<z.ZodNumber, number, unknown>;
|
|
86
86
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
87
87
|
}, "strip", z.ZodTypeAny, {
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
api_name: string;
|
|
89
|
+
vendor_name: string;
|
|
90
90
|
description: string;
|
|
91
|
+
is_enabled: YesNo;
|
|
92
|
+
all_vehicles: YesNo;
|
|
93
|
+
status: Status;
|
|
91
94
|
organisation_ids: string[];
|
|
92
95
|
vehicle_ids: string[];
|
|
93
|
-
vendor_name: string;
|
|
94
|
-
all_vehicles: YesNo;
|
|
95
|
-
api_name: string;
|
|
96
96
|
frequency_seconds: number;
|
|
97
97
|
}, {
|
|
98
|
-
|
|
98
|
+
api_name: string;
|
|
99
99
|
vendor_name: string;
|
|
100
100
|
all_vehicles: YesNo;
|
|
101
|
-
|
|
102
|
-
is_enabled?: YesNo | undefined;
|
|
101
|
+
status: Status;
|
|
103
102
|
description?: string | undefined;
|
|
103
|
+
is_enabled?: YesNo | undefined;
|
|
104
104
|
organisation_ids?: string[] | undefined;
|
|
105
105
|
vehicle_ids?: string[] | undefined;
|
|
106
106
|
frequency_seconds?: unknown;
|
|
@@ -140,8 +140,8 @@ declare const ApiDataPushManagementQuerySchema: z.ZodObject<{
|
|
|
140
140
|
api_data_push_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
141
141
|
is_enabled: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof YesNo>, "many">>>;
|
|
142
142
|
}, "strip", z.ZodTypeAny, {
|
|
143
|
-
status: Status[];
|
|
144
143
|
is_enabled: YesNo[];
|
|
144
|
+
status: Status[];
|
|
145
145
|
search: string;
|
|
146
146
|
paging: PAGING;
|
|
147
147
|
page_count: number;
|
|
@@ -166,8 +166,8 @@ declare const ApiDataPushManagementQuerySchema: z.ZodObject<{
|
|
|
166
166
|
}, {
|
|
167
167
|
date_format_id: string;
|
|
168
168
|
time_zone_id: string;
|
|
169
|
-
status?: Status[] | undefined;
|
|
170
169
|
is_enabled?: YesNo[] | undefined;
|
|
170
|
+
status?: Status[] | undefined;
|
|
171
171
|
search?: string | undefined;
|
|
172
172
|
paging?: PAGING | undefined;
|
|
173
173
|
page_count?: unknown;
|
|
@@ -95,35 +95,35 @@ declare const ApiDataShareManagementSchema: z.ZodObject<{
|
|
|
95
95
|
allowed_ips: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
96
96
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
97
97
|
}, "strip", z.ZodTypeAny, {
|
|
98
|
-
|
|
99
|
-
is_enabled: YesNo;
|
|
100
|
-
description: string;
|
|
101
|
-
organisation_ids: string[];
|
|
102
|
-
vehicle_ids: string[];
|
|
98
|
+
api_name: string;
|
|
103
99
|
vendor_name: string;
|
|
100
|
+
description: string;
|
|
101
|
+
is_enabled: YesNo;
|
|
104
102
|
all_vehicles: YesNo;
|
|
105
|
-
api_name: string;
|
|
106
103
|
auth_type: APIAuthType;
|
|
107
104
|
api_keys: string[];
|
|
108
105
|
usernames: string[];
|
|
109
106
|
passwords: string[];
|
|
110
107
|
rate_limit_rpm: number;
|
|
111
108
|
allowed_ips: string[];
|
|
112
|
-
}, {
|
|
113
109
|
status: Status;
|
|
110
|
+
organisation_ids: string[];
|
|
111
|
+
vehicle_ids: string[];
|
|
112
|
+
}, {
|
|
113
|
+
api_name: string;
|
|
114
114
|
vendor_name: string;
|
|
115
115
|
all_vehicles: YesNo;
|
|
116
|
-
api_name: string;
|
|
117
116
|
api_keys: string[];
|
|
118
117
|
usernames: string[];
|
|
119
118
|
passwords: string[];
|
|
120
119
|
allowed_ips: string[];
|
|
121
|
-
|
|
120
|
+
status: Status;
|
|
122
121
|
description?: string | undefined;
|
|
123
|
-
|
|
124
|
-
vehicle_ids?: string[] | undefined;
|
|
122
|
+
is_enabled?: YesNo | undefined;
|
|
125
123
|
auth_type?: APIAuthType | undefined;
|
|
126
124
|
rate_limit_rpm?: unknown;
|
|
125
|
+
organisation_ids?: string[] | undefined;
|
|
126
|
+
vehicle_ids?: string[] | undefined;
|
|
127
127
|
}>;
|
|
128
128
|
type ApiDataShareManagementDTO = z.infer<typeof ApiDataShareManagementSchema>;
|
|
129
129
|
declare const ApiDataShareManagementQuerySchema: z.ZodObject<{
|
|
@@ -161,8 +161,9 @@ declare const ApiDataShareManagementQuerySchema: z.ZodObject<{
|
|
|
161
161
|
is_enabled: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof YesNo>, "many">>>;
|
|
162
162
|
auth_type: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof APIAuthType>, "many">>>;
|
|
163
163
|
}, "strip", z.ZodTypeAny, {
|
|
164
|
-
status: Status[];
|
|
165
164
|
is_enabled: YesNo[];
|
|
165
|
+
auth_type: APIAuthType[];
|
|
166
|
+
status: Status[];
|
|
166
167
|
search: string;
|
|
167
168
|
paging: PAGING;
|
|
168
169
|
page_count: number;
|
|
@@ -183,13 +184,13 @@ declare const ApiDataShareManagementQuerySchema: z.ZodObject<{
|
|
|
183
184
|
include_master_data: YesNo;
|
|
184
185
|
date_format_id: string;
|
|
185
186
|
time_zone_id: string;
|
|
186
|
-
auth_type: APIAuthType[];
|
|
187
187
|
api_data_share_ids: string[];
|
|
188
188
|
}, {
|
|
189
189
|
date_format_id: string;
|
|
190
190
|
time_zone_id: string;
|
|
191
|
-
status?: Status[] | undefined;
|
|
192
191
|
is_enabled?: YesNo[] | undefined;
|
|
192
|
+
auth_type?: APIAuthType[] | undefined;
|
|
193
|
+
status?: Status[] | undefined;
|
|
193
194
|
search?: string | undefined;
|
|
194
195
|
paging?: PAGING | undefined;
|
|
195
196
|
page_count?: unknown;
|
|
@@ -208,7 +209,6 @@ declare const ApiDataShareManagementQuerySchema: z.ZodObject<{
|
|
|
208
209
|
direction: OrderBy;
|
|
209
210
|
}[] | undefined;
|
|
210
211
|
include_master_data?: YesNo | undefined;
|
|
211
|
-
auth_type?: APIAuthType[] | undefined;
|
|
212
212
|
api_data_share_ids?: string[] | undefined;
|
|
213
213
|
}>;
|
|
214
214
|
type ApiDataShareManagementQueryDTO = z.infer<typeof ApiDataShareManagementQuerySchema>;
|
|
@@ -248,6 +248,7 @@ declare const ApiDataShareHitLogQuerySchema: z.ZodObject<{
|
|
|
248
248
|
is_auth_success: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof YesNo>, "many">>>;
|
|
249
249
|
}, "strip", z.ZodTypeAny, {
|
|
250
250
|
status: Status[];
|
|
251
|
+
is_auth_success: YesNo[];
|
|
251
252
|
search: string;
|
|
252
253
|
paging: PAGING;
|
|
253
254
|
page_count: number;
|
|
@@ -268,13 +269,13 @@ declare const ApiDataShareHitLogQuerySchema: z.ZodObject<{
|
|
|
268
269
|
include_master_data: YesNo;
|
|
269
270
|
date_format_id: string;
|
|
270
271
|
time_zone_id: string;
|
|
271
|
-
is_auth_success: YesNo[];
|
|
272
272
|
api_data_share_ids: string[];
|
|
273
273
|
api_data_share_hit_log_ids: string[];
|
|
274
274
|
}, {
|
|
275
275
|
date_format_id: string;
|
|
276
276
|
time_zone_id: string;
|
|
277
277
|
status?: Status[] | undefined;
|
|
278
|
+
is_auth_success?: YesNo[] | undefined;
|
|
278
279
|
search?: string | undefined;
|
|
279
280
|
paging?: PAGING | undefined;
|
|
280
281
|
page_count?: unknown;
|
|
@@ -293,7 +294,6 @@ declare const ApiDataShareHitLogQuerySchema: z.ZodObject<{
|
|
|
293
294
|
direction: OrderBy;
|
|
294
295
|
}[] | undefined;
|
|
295
296
|
include_master_data?: YesNo | undefined;
|
|
296
|
-
is_auth_success?: YesNo[] | undefined;
|
|
297
297
|
api_data_share_ids?: string[] | undefined;
|
|
298
298
|
api_data_share_hit_log_ids?: string[] | undefined;
|
|
299
299
|
}>;
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { YesNo, Status, APISyncRunType, PAGING, LoadParents, LoadChild, LoadChildCount, OrderBy } from '../../core/Enums.js';
|
|
2
|
+
import { SBR, FBR } from '../../core/BaseResponse.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { U as UserOrganisation } from '../../user_organisation_service-BLPWtOc6.js';
|
|
5
|
+
import '../../zod_utils/zod_base_schema.js';
|
|
6
|
+
import '../gps/reports/gps_models/FuelConsumptionMonthly.js';
|
|
7
|
+
|
|
8
|
+
interface ApiDataSyncManagement extends Record<string, unknown> {
|
|
9
|
+
api_data_sync_id: string;
|
|
10
|
+
api_name: string;
|
|
11
|
+
vendor_name: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
is_enabled: YesNo;
|
|
14
|
+
frequency_seconds: number;
|
|
15
|
+
last_run_date_time?: string;
|
|
16
|
+
last_run_date_time_f?: string;
|
|
17
|
+
last_run_status?: YesNo;
|
|
18
|
+
last_run_message?: string;
|
|
19
|
+
status: Status;
|
|
20
|
+
added_date_time: string;
|
|
21
|
+
modified_date_time: string;
|
|
22
|
+
ApiDataSyncRunLog?: ApiDataSyncRunLog[];
|
|
23
|
+
ApiDataSyncManagementUserOrganisationLink?: ApiDataSyncManagementUserOrganisationLink[];
|
|
24
|
+
_count?: {
|
|
25
|
+
ApiDataSyncRunLog?: number;
|
|
26
|
+
ApiDataSyncManagementUserOrganisationLink?: number;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
interface ApiDataSyncManagementUserOrganisationLink extends Record<string, unknown> {
|
|
30
|
+
api_data_sync_user_organisation_link_id: string;
|
|
31
|
+
status: Status;
|
|
32
|
+
added_date_time: string;
|
|
33
|
+
modified_date_time: string;
|
|
34
|
+
api_data_sync_id: string;
|
|
35
|
+
ApiDataSyncManagement?: ApiDataSyncManagement;
|
|
36
|
+
organisation_id: string;
|
|
37
|
+
UserOrganisation?: UserOrganisation;
|
|
38
|
+
organisation_name?: string;
|
|
39
|
+
organisation_code?: string;
|
|
40
|
+
organisation_logo_url?: string;
|
|
41
|
+
}
|
|
42
|
+
interface ApiDataSyncRunLog extends Record<string, unknown> {
|
|
43
|
+
api_data_sync_run_log_id: string;
|
|
44
|
+
api_data_sync_id: string;
|
|
45
|
+
ApiDataSyncManagement?: ApiDataSyncManagement;
|
|
46
|
+
api_name?: string;
|
|
47
|
+
vendor_name?: string;
|
|
48
|
+
run_type: APISyncRunType;
|
|
49
|
+
run_date_time: string;
|
|
50
|
+
run_date_time_f?: string;
|
|
51
|
+
run_status: YesNo;
|
|
52
|
+
run_message?: string;
|
|
53
|
+
status: Status;
|
|
54
|
+
added_date_time: string;
|
|
55
|
+
modified_date_time: string;
|
|
56
|
+
}
|
|
57
|
+
interface ExternalApiSyncReport extends Record<string, unknown> {
|
|
58
|
+
api_name: string;
|
|
59
|
+
vendor_name: string;
|
|
60
|
+
success_count: number;
|
|
61
|
+
failed_count: number;
|
|
62
|
+
total_count: number;
|
|
63
|
+
}
|
|
64
|
+
declare const ApiDataSyncManagementSchema: z.ZodObject<{
|
|
65
|
+
api_name: z.ZodEffects<z.ZodString, string, string>;
|
|
66
|
+
vendor_name: z.ZodEffects<z.ZodString, string, string>;
|
|
67
|
+
description: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
68
|
+
organisation_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
69
|
+
is_enabled: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
70
|
+
frequency_seconds: z.ZodEffects<z.ZodNumber, number, unknown>;
|
|
71
|
+
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
api_name: string;
|
|
74
|
+
vendor_name: string;
|
|
75
|
+
description: string;
|
|
76
|
+
is_enabled: YesNo;
|
|
77
|
+
status: Status;
|
|
78
|
+
organisation_ids: string[];
|
|
79
|
+
frequency_seconds: number;
|
|
80
|
+
}, {
|
|
81
|
+
api_name: string;
|
|
82
|
+
vendor_name: string;
|
|
83
|
+
status: Status;
|
|
84
|
+
description?: string | undefined;
|
|
85
|
+
is_enabled?: YesNo | undefined;
|
|
86
|
+
organisation_ids?: string[] | undefined;
|
|
87
|
+
frequency_seconds?: unknown;
|
|
88
|
+
}>;
|
|
89
|
+
type ApiDataSyncManagementDTO = z.infer<typeof ApiDataSyncManagementSchema>;
|
|
90
|
+
declare const ApiDataSyncManagementQuerySchema: z.ZodObject<{
|
|
91
|
+
search: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
92
|
+
status: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Status>, "many">>>;
|
|
93
|
+
paging: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof PAGING>>>;
|
|
94
|
+
page_count: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
95
|
+
page_index: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
96
|
+
load_parents: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadParents>>>;
|
|
97
|
+
load_parents_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
98
|
+
load_child: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadChild>>>;
|
|
99
|
+
load_child_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
100
|
+
load_child_count: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadChildCount>>>;
|
|
101
|
+
load_child_count_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
102
|
+
include_details: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
103
|
+
where_relations: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
104
|
+
order_by: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
105
|
+
name: z.ZodEffects<z.ZodString, string, string>;
|
|
106
|
+
field: z.ZodEffects<z.ZodString, string, string>;
|
|
107
|
+
direction: z.ZodType<OrderBy, z.ZodTypeDef, OrderBy>;
|
|
108
|
+
}, "strip", z.ZodTypeAny, {
|
|
109
|
+
name: string;
|
|
110
|
+
field: string;
|
|
111
|
+
direction: OrderBy;
|
|
112
|
+
}, {
|
|
113
|
+
name: string;
|
|
114
|
+
field: string;
|
|
115
|
+
direction: OrderBy;
|
|
116
|
+
}>, "many">>>;
|
|
117
|
+
include_master_data: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
118
|
+
date_format_id: z.ZodEffects<z.ZodString, string, string>;
|
|
119
|
+
time_zone_id: z.ZodEffects<z.ZodString, string, string>;
|
|
120
|
+
} & {
|
|
121
|
+
api_data_sync_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
122
|
+
is_enabled: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof YesNo>, "many">>>;
|
|
123
|
+
}, "strip", z.ZodTypeAny, {
|
|
124
|
+
is_enabled: YesNo[];
|
|
125
|
+
status: Status[];
|
|
126
|
+
search: string;
|
|
127
|
+
paging: PAGING;
|
|
128
|
+
page_count: number;
|
|
129
|
+
page_index: number;
|
|
130
|
+
load_parents: LoadParents;
|
|
131
|
+
load_parents_list: string[];
|
|
132
|
+
load_child: LoadChild;
|
|
133
|
+
load_child_list: string[];
|
|
134
|
+
load_child_count: LoadChildCount;
|
|
135
|
+
load_child_count_list: string[];
|
|
136
|
+
include_details: Record<string, any>;
|
|
137
|
+
where_relations: Record<string, any>;
|
|
138
|
+
order_by: {
|
|
139
|
+
name: string;
|
|
140
|
+
field: string;
|
|
141
|
+
direction: OrderBy;
|
|
142
|
+
}[];
|
|
143
|
+
include_master_data: YesNo;
|
|
144
|
+
date_format_id: string;
|
|
145
|
+
time_zone_id: string;
|
|
146
|
+
api_data_sync_ids: string[];
|
|
147
|
+
}, {
|
|
148
|
+
date_format_id: string;
|
|
149
|
+
time_zone_id: string;
|
|
150
|
+
is_enabled?: YesNo[] | undefined;
|
|
151
|
+
status?: Status[] | undefined;
|
|
152
|
+
search?: string | undefined;
|
|
153
|
+
paging?: PAGING | undefined;
|
|
154
|
+
page_count?: unknown;
|
|
155
|
+
page_index?: unknown;
|
|
156
|
+
load_parents?: LoadParents | undefined;
|
|
157
|
+
load_parents_list?: string[] | undefined;
|
|
158
|
+
load_child?: LoadChild | undefined;
|
|
159
|
+
load_child_list?: string[] | undefined;
|
|
160
|
+
load_child_count?: LoadChildCount | undefined;
|
|
161
|
+
load_child_count_list?: string[] | undefined;
|
|
162
|
+
include_details?: Record<string, any> | undefined;
|
|
163
|
+
where_relations?: Record<string, any> | undefined;
|
|
164
|
+
order_by?: {
|
|
165
|
+
name: string;
|
|
166
|
+
field: string;
|
|
167
|
+
direction: OrderBy;
|
|
168
|
+
}[] | undefined;
|
|
169
|
+
include_master_data?: YesNo | undefined;
|
|
170
|
+
api_data_sync_ids?: string[] | undefined;
|
|
171
|
+
}>;
|
|
172
|
+
type ApiDataSyncManagementQueryDTO = z.infer<typeof ApiDataSyncManagementQuerySchema>;
|
|
173
|
+
declare const ApiDataSyncRunLogQuerySchema: z.ZodObject<{
|
|
174
|
+
search: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
175
|
+
status: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Status>, "many">>>;
|
|
176
|
+
paging: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof PAGING>>>;
|
|
177
|
+
page_count: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
178
|
+
page_index: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
179
|
+
load_parents: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadParents>>>;
|
|
180
|
+
load_parents_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
181
|
+
load_child: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadChild>>>;
|
|
182
|
+
load_child_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
183
|
+
load_child_count: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadChildCount>>>;
|
|
184
|
+
load_child_count_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
185
|
+
include_details: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
186
|
+
where_relations: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
187
|
+
order_by: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
188
|
+
name: z.ZodEffects<z.ZodString, string, string>;
|
|
189
|
+
field: z.ZodEffects<z.ZodString, string, string>;
|
|
190
|
+
direction: z.ZodType<OrderBy, z.ZodTypeDef, OrderBy>;
|
|
191
|
+
}, "strip", z.ZodTypeAny, {
|
|
192
|
+
name: string;
|
|
193
|
+
field: string;
|
|
194
|
+
direction: OrderBy;
|
|
195
|
+
}, {
|
|
196
|
+
name: string;
|
|
197
|
+
field: string;
|
|
198
|
+
direction: OrderBy;
|
|
199
|
+
}>, "many">>>;
|
|
200
|
+
include_master_data: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
201
|
+
date_format_id: z.ZodEffects<z.ZodString, string, string>;
|
|
202
|
+
time_zone_id: z.ZodEffects<z.ZodString, string, string>;
|
|
203
|
+
} & {
|
|
204
|
+
api_data_sync_run_log_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
205
|
+
api_data_sync_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
206
|
+
run_type: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof APISyncRunType>, "many">>>;
|
|
207
|
+
run_status: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof YesNo>, "many">>>;
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
status: Status[];
|
|
210
|
+
search: string;
|
|
211
|
+
paging: PAGING;
|
|
212
|
+
page_count: number;
|
|
213
|
+
page_index: number;
|
|
214
|
+
load_parents: LoadParents;
|
|
215
|
+
load_parents_list: string[];
|
|
216
|
+
load_child: LoadChild;
|
|
217
|
+
load_child_list: string[];
|
|
218
|
+
load_child_count: LoadChildCount;
|
|
219
|
+
load_child_count_list: string[];
|
|
220
|
+
include_details: Record<string, any>;
|
|
221
|
+
where_relations: Record<string, any>;
|
|
222
|
+
order_by: {
|
|
223
|
+
name: string;
|
|
224
|
+
field: string;
|
|
225
|
+
direction: OrderBy;
|
|
226
|
+
}[];
|
|
227
|
+
include_master_data: YesNo;
|
|
228
|
+
date_format_id: string;
|
|
229
|
+
time_zone_id: string;
|
|
230
|
+
run_type: APISyncRunType[];
|
|
231
|
+
run_status: YesNo[];
|
|
232
|
+
api_data_sync_ids: string[];
|
|
233
|
+
api_data_sync_run_log_ids: string[];
|
|
234
|
+
}, {
|
|
235
|
+
date_format_id: string;
|
|
236
|
+
time_zone_id: string;
|
|
237
|
+
status?: Status[] | undefined;
|
|
238
|
+
search?: string | undefined;
|
|
239
|
+
paging?: PAGING | undefined;
|
|
240
|
+
page_count?: unknown;
|
|
241
|
+
page_index?: unknown;
|
|
242
|
+
load_parents?: LoadParents | undefined;
|
|
243
|
+
load_parents_list?: string[] | undefined;
|
|
244
|
+
load_child?: LoadChild | undefined;
|
|
245
|
+
load_child_list?: string[] | undefined;
|
|
246
|
+
load_child_count?: LoadChildCount | undefined;
|
|
247
|
+
load_child_count_list?: string[] | undefined;
|
|
248
|
+
include_details?: Record<string, any> | undefined;
|
|
249
|
+
where_relations?: Record<string, any> | undefined;
|
|
250
|
+
order_by?: {
|
|
251
|
+
name: string;
|
|
252
|
+
field: string;
|
|
253
|
+
direction: OrderBy;
|
|
254
|
+
}[] | undefined;
|
|
255
|
+
include_master_data?: YesNo | undefined;
|
|
256
|
+
run_type?: APISyncRunType[] | undefined;
|
|
257
|
+
run_status?: YesNo[] | undefined;
|
|
258
|
+
api_data_sync_ids?: string[] | undefined;
|
|
259
|
+
api_data_sync_run_log_ids?: string[] | undefined;
|
|
260
|
+
}>;
|
|
261
|
+
type ApiDataSyncRunLogQueryDTO = z.infer<typeof ApiDataSyncRunLogQuerySchema>;
|
|
262
|
+
declare const ExternalApiSyncReportSchema: z.ZodObject<{
|
|
263
|
+
date: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>, string, string>;
|
|
264
|
+
}, "strip", z.ZodTypeAny, {
|
|
265
|
+
date: string;
|
|
266
|
+
}, {
|
|
267
|
+
date: string;
|
|
268
|
+
}>;
|
|
269
|
+
type ExternalApiSyncReportDTO = z.infer<typeof ExternalApiSyncReportSchema>;
|
|
270
|
+
declare const toApiDataSyncManagementPayload: (row: ApiDataSyncManagement) => ApiDataSyncManagementDTO;
|
|
271
|
+
declare const newApiDataSyncManagementPayload: () => ApiDataSyncManagementDTO;
|
|
272
|
+
declare const findApiDataSyncManagement: (data: ApiDataSyncManagementQueryDTO) => Promise<FBR<ApiDataSyncManagement[]>>;
|
|
273
|
+
declare const createApiDataSyncManagement: (data: ApiDataSyncManagementDTO) => Promise<SBR>;
|
|
274
|
+
declare const updateApiDataSyncManagement: (id: string, data: ApiDataSyncManagementDTO) => Promise<SBR>;
|
|
275
|
+
declare const deleteApiDataSyncManagement: (id: string) => Promise<SBR>;
|
|
276
|
+
declare const findApiDataSyncRunLog: (data: ApiDataSyncRunLogQueryDTO) => Promise<FBR<ApiDataSyncRunLog[]>>;
|
|
277
|
+
declare const syncNowApiDataSyncManagement: (id: string) => Promise<SBR>;
|
|
278
|
+
declare const getExternalApiSyncDailyReport: (data: ExternalApiSyncReportDTO) => Promise<FBR<ExternalApiSyncReport[]>>;
|
|
279
|
+
declare const getExternalApiSyncMonthlyReport: (data: ExternalApiSyncReportDTO) => Promise<FBR<ExternalApiSyncReport[]>>;
|
|
280
|
+
declare const resetExternalApiSyncCache: () => Promise<SBR>;
|
|
281
|
+
|
|
282
|
+
export { type ApiDataSyncManagement, type ApiDataSyncManagementDTO, type ApiDataSyncManagementQueryDTO, ApiDataSyncManagementQuerySchema, ApiDataSyncManagementSchema, type ApiDataSyncManagementUserOrganisationLink, type ApiDataSyncRunLog, type ApiDataSyncRunLogQueryDTO, ApiDataSyncRunLogQuerySchema, type ExternalApiSyncReport, type ExternalApiSyncReportDTO, ExternalApiSyncReportSchema, createApiDataSyncManagement, deleteApiDataSyncManagement, findApiDataSyncManagement, findApiDataSyncRunLog, getExternalApiSyncDailyReport, getExternalApiSyncMonthlyReport, newApiDataSyncManagementPayload, resetExternalApiSyncCache, syncNowApiDataSyncManagement, toApiDataSyncManagementPayload, updateApiDataSyncManagement };
|
|
@@ -0,0 +1,410 @@
|
|
|
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/core/external_api_sync.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 enumMandatory = (fieldName, enumType, defaultValue) => {
|
|
83
|
+
return z.union([
|
|
84
|
+
z.nativeEnum(enumType, {
|
|
85
|
+
invalid_type_error: `${fieldName} should be one of the following values: ${Object.values(
|
|
86
|
+
enumType
|
|
87
|
+
).join(", ")}.`
|
|
88
|
+
}),
|
|
89
|
+
z.string().refine((val) => Object.values(enumType).includes(val), {
|
|
90
|
+
message: `${fieldName} should be one of the following values: ${Object.values(
|
|
91
|
+
enumType
|
|
92
|
+
).join(", ")}.`
|
|
93
|
+
})
|
|
94
|
+
]).default(defaultValue).refine((val) => val !== "", {
|
|
95
|
+
message: `Please select ${fieldName}.`
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
var enumOptional = (fieldName, enumType, defaultValue) => {
|
|
99
|
+
return z.nativeEnum(enumType, {
|
|
100
|
+
invalid_type_error: `${fieldName} must be an array containing only the following values: ${Object.values(
|
|
101
|
+
enumType
|
|
102
|
+
).join(", ")}.`
|
|
103
|
+
}).optional().default(() => defaultValue);
|
|
104
|
+
};
|
|
105
|
+
var getAllEnums = (enumType) => {
|
|
106
|
+
return Object.values(enumType);
|
|
107
|
+
};
|
|
108
|
+
var enumArrayOptional = (fieldName, enumType, defaultValue = getAllEnums(enumType), min = 0, max = 100, unique = false) => {
|
|
109
|
+
const schema = z.array(z.nativeEnum(enumType), {
|
|
110
|
+
invalid_type_error: `${fieldName} must be an array containing only the following values: ${Object.values(
|
|
111
|
+
enumType
|
|
112
|
+
).join(", ")}.`
|
|
113
|
+
}).min(min, `${fieldName} must contain at least ${min} items.`).max(max, `${fieldName} must contain at most ${max} items.`);
|
|
114
|
+
if (unique) {
|
|
115
|
+
schema.refine(
|
|
116
|
+
(arr) => new Set(arr).size === arr.length,
|
|
117
|
+
`${fieldName} must contain unique values.`
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
return schema.optional().default(() => defaultValue);
|
|
121
|
+
};
|
|
122
|
+
var handleNullOrUndefinedDate = (value, defaultValue) => {
|
|
123
|
+
if (typeof value === "string" && !isNaN(Date.parse(value))) {
|
|
124
|
+
return value;
|
|
125
|
+
}
|
|
126
|
+
return defaultValue;
|
|
127
|
+
};
|
|
128
|
+
var dateMandatory = (fieldName, minDate, maxDate, defaultValue = (/* @__PURE__ */ new Date()).toISOString()) => {
|
|
129
|
+
const schema = z.string().refine((val) => val !== "" && val !== null && val !== void 0, {
|
|
130
|
+
message: `Please select ${fieldName}.`
|
|
131
|
+
}).refine((val) => !isNaN(Date.parse(val)), {
|
|
132
|
+
message: `${fieldName} must be a valid ISO date.`
|
|
133
|
+
}).refine((val) => !minDate || new Date(val) >= new Date(minDate), {
|
|
134
|
+
message: `${fieldName} must be after ${minDate}.`
|
|
135
|
+
}).refine((val) => !maxDate || new Date(val) <= new Date(maxDate), {
|
|
136
|
+
message: `${fieldName} must be before ${maxDate}.`
|
|
137
|
+
}).transform((val) => handleNullOrUndefinedDate(val, defaultValue));
|
|
138
|
+
return schema;
|
|
139
|
+
};
|
|
140
|
+
var dynamicJsonSchema = (fieldName, defaultValue = {}) => z.record(z.any()).optional().default(() => defaultValue);
|
|
141
|
+
var single_select_optional = (fieldName) => {
|
|
142
|
+
r_log(fieldName);
|
|
143
|
+
const schema = z.string().trim().transform(handleNullOrUndefined);
|
|
144
|
+
return schema;
|
|
145
|
+
};
|
|
146
|
+
var multi_select_optional = (fieldName, max = 1e3, defaultValue = []) => {
|
|
147
|
+
const schema = z.array(
|
|
148
|
+
z.string({
|
|
149
|
+
invalid_type_error: `${fieldName} must be an array of strings.`
|
|
150
|
+
})
|
|
151
|
+
).max(
|
|
152
|
+
max,
|
|
153
|
+
`Please select at most ${max} ${fieldName}${max > 1 ? "s" : ""}.`
|
|
154
|
+
);
|
|
155
|
+
return schema.optional().default(defaultValue);
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
// src/zod_utils/zod_base_schema.ts
|
|
159
|
+
import { z as z2 } from "zod";
|
|
160
|
+
|
|
161
|
+
// src/core/Enums.ts
|
|
162
|
+
var PAGING = /* @__PURE__ */ ((PAGING2) => {
|
|
163
|
+
PAGING2["Yes"] = "Yes";
|
|
164
|
+
PAGING2["No"] = "No";
|
|
165
|
+
return PAGING2;
|
|
166
|
+
})(PAGING || {});
|
|
167
|
+
var LoadParents = /* @__PURE__ */ ((LoadParents2) => {
|
|
168
|
+
LoadParents2["Yes"] = "Yes";
|
|
169
|
+
LoadParents2["No"] = "No";
|
|
170
|
+
LoadParents2["Custom"] = "Custom";
|
|
171
|
+
return LoadParents2;
|
|
172
|
+
})(LoadParents || {});
|
|
173
|
+
var LoadChild = /* @__PURE__ */ ((LoadChild2) => {
|
|
174
|
+
LoadChild2["No"] = "No";
|
|
175
|
+
LoadChild2["Yes"] = "Yes";
|
|
176
|
+
LoadChild2["Count"] = "Count";
|
|
177
|
+
LoadChild2["Custom"] = "Custom";
|
|
178
|
+
LoadChild2["Direct"] = "Direct";
|
|
179
|
+
return LoadChild2;
|
|
180
|
+
})(LoadChild || {});
|
|
181
|
+
var LoadChildCount = /* @__PURE__ */ ((LoadChildCount2) => {
|
|
182
|
+
LoadChildCount2["No"] = "No";
|
|
183
|
+
LoadChildCount2["Yes"] = "Yes";
|
|
184
|
+
LoadChildCount2["Custom"] = "Custom";
|
|
185
|
+
return LoadChildCount2;
|
|
186
|
+
})(LoadChildCount || {});
|
|
187
|
+
var OrderBy = /* @__PURE__ */ ((OrderBy2) => {
|
|
188
|
+
OrderBy2["asc"] = "asc";
|
|
189
|
+
OrderBy2["desc"] = "desc";
|
|
190
|
+
return OrderBy2;
|
|
191
|
+
})(OrderBy || {});
|
|
192
|
+
var LoginFrom = /* @__PURE__ */ ((LoginFrom2) => {
|
|
193
|
+
LoginFrom2["Web"] = "Web";
|
|
194
|
+
LoginFrom2["Android"] = "Android";
|
|
195
|
+
LoginFrom2["IPhone"] = "IPhone";
|
|
196
|
+
LoginFrom2["AndroidPWA"] = "AndroidPWA";
|
|
197
|
+
LoginFrom2["iOSPWA"] = "iOSPWA";
|
|
198
|
+
return LoginFrom2;
|
|
199
|
+
})(LoginFrom || {});
|
|
200
|
+
var Status = /* @__PURE__ */ ((Status2) => {
|
|
201
|
+
Status2["Active"] = "Active";
|
|
202
|
+
Status2["Inactive"] = "Inactive";
|
|
203
|
+
return Status2;
|
|
204
|
+
})(Status || {});
|
|
205
|
+
var APISyncRunType = /* @__PURE__ */ ((APISyncRunType2) => {
|
|
206
|
+
APISyncRunType2["Scheduled"] = "Scheduled";
|
|
207
|
+
APISyncRunType2["Manual"] = "Manual";
|
|
208
|
+
return APISyncRunType2;
|
|
209
|
+
})(APISyncRunType || {});
|
|
210
|
+
var FileType = /* @__PURE__ */ ((FileType2) => {
|
|
211
|
+
FileType2["NoFile"] = "NoFile";
|
|
212
|
+
FileType2["Image"] = "Image";
|
|
213
|
+
FileType2["Video"] = "Video";
|
|
214
|
+
FileType2["PDF"] = "PDF";
|
|
215
|
+
FileType2["Excel"] = "Excel";
|
|
216
|
+
return FileType2;
|
|
217
|
+
})(FileType || {});
|
|
218
|
+
var YesNo = /* @__PURE__ */ ((YesNo2) => {
|
|
219
|
+
YesNo2["Yes"] = "Yes";
|
|
220
|
+
YesNo2["No"] = "No";
|
|
221
|
+
return YesNo2;
|
|
222
|
+
})(YesNo || {});
|
|
223
|
+
|
|
224
|
+
// src/zod_utils/zod_base_schema.ts
|
|
225
|
+
var OrderBySchema = z2.array(
|
|
226
|
+
z2.object({
|
|
227
|
+
name: stringMandatory("Order Field Name", 0, 255),
|
|
228
|
+
field: stringMandatory("Order Field Name", 0, 255),
|
|
229
|
+
direction: enumMandatory("Order Direction", OrderBy, "asc" /* asc */)
|
|
230
|
+
})
|
|
231
|
+
);
|
|
232
|
+
var BaseFileSchema = z2.object({
|
|
233
|
+
usage_type: stringMandatory("Usage Type", 3, 100),
|
|
234
|
+
file_type: enumMandatory("File Type", FileType, "Image" /* Image */),
|
|
235
|
+
file_url: stringOptional("File URL", 0, 300),
|
|
236
|
+
file_key: stringOptional("File Key", 0, 300),
|
|
237
|
+
file_name: stringOptional("File Name", 0, 300),
|
|
238
|
+
file_description: stringOptional("File Description", 0, 2e3),
|
|
239
|
+
file_size: numberOptional("File Size"),
|
|
240
|
+
file_metadata: dynamicJsonSchema("File Metadata", {}),
|
|
241
|
+
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
242
|
+
});
|
|
243
|
+
var BaseQuerySchema = z2.object({
|
|
244
|
+
search: stringOptional("Search", 0, 255, ""),
|
|
245
|
+
status: enumArrayOptional("Status", Status, getAllEnums(Status), 0, 10, true),
|
|
246
|
+
paging: enumOptional("Paging", PAGING, "Yes" /* Yes */),
|
|
247
|
+
page_count: numberOptional("Page Count", 0, 1e3, 100),
|
|
248
|
+
page_index: numberOptional("Page Index", 0, 1e3, 0),
|
|
249
|
+
load_parents: enumOptional("Load Parents", LoadParents, "No" /* No */),
|
|
250
|
+
load_parents_list: stringArrayOptional("Load Parents List"),
|
|
251
|
+
load_child: enumOptional("Load Child", LoadChild, "No" /* No */),
|
|
252
|
+
load_child_list: stringArrayOptional("Load Child List"),
|
|
253
|
+
load_child_count: enumOptional(
|
|
254
|
+
"Load Child",
|
|
255
|
+
LoadChildCount,
|
|
256
|
+
"No" /* No */
|
|
257
|
+
),
|
|
258
|
+
load_child_count_list: stringArrayOptional("Load Child List"),
|
|
259
|
+
include_details: dynamicJsonSchema("Include Details", {}),
|
|
260
|
+
where_relations: dynamicJsonSchema("Where Relations", {}),
|
|
261
|
+
order_by: OrderBySchema.optional().default([]),
|
|
262
|
+
include_master_data: enumOptional("Include Master Data", YesNo, "No" /* No */),
|
|
263
|
+
date_format_id: single_select_optional("MasterMainDateFormat"),
|
|
264
|
+
time_zone_id: single_select_optional("MasterMainTimeZone")
|
|
265
|
+
});
|
|
266
|
+
var FilePresignedUrlSchema = z2.object({
|
|
267
|
+
file_name: stringMandatory("File Name", 1, 255),
|
|
268
|
+
file_type: enumMandatory("File Type", FileType, "Image" /* Image */)
|
|
269
|
+
});
|
|
270
|
+
var MongoBaseQuerySchema = z2.object({
|
|
271
|
+
search: stringOptional("Search", 0, 255, ""),
|
|
272
|
+
paging: enumOptional("Paging", PAGING, "Yes" /* Yes */),
|
|
273
|
+
page_count: numberOptional("Page Count", 0, 1e3, 100),
|
|
274
|
+
page_index: numberOptional("Page Index", 0, 1e3, 0),
|
|
275
|
+
login_from: enumMandatory("Login From", LoginFrom, "Web" /* Web */),
|
|
276
|
+
date_format_id: single_select_optional("MasterMainDateFormat"),
|
|
277
|
+
// ✅ Single-selection -> MasterMainDateFormat
|
|
278
|
+
time_zone_id: single_select_optional("MasterMainTimeZone")
|
|
279
|
+
// ✅ Single-selection -> MasterMainTimeZone
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
// src/services/core/external_api_sync.service.ts
|
|
283
|
+
var URL = "external_api_sync";
|
|
284
|
+
var ENDPOINTS = {
|
|
285
|
+
// ApiDataSyncManagement APIs
|
|
286
|
+
find: `${URL}/search`,
|
|
287
|
+
create: URL,
|
|
288
|
+
update: (id) => `${URL}/${id}`,
|
|
289
|
+
delete: (id) => `${URL}/${id}`,
|
|
290
|
+
// Run Log APIs
|
|
291
|
+
run_log_find: `${URL}/data_sync_run_log/search`,
|
|
292
|
+
// Manual Sync
|
|
293
|
+
sync_now: (id) => `${URL}/${id}/sync_now`,
|
|
294
|
+
// Reports
|
|
295
|
+
daily_report: `${URL}/report/daily`,
|
|
296
|
+
monthly_report: `${URL}/report/monthly`,
|
|
297
|
+
// Cache APIs
|
|
298
|
+
reset_cache: `${URL}/reset_cache`
|
|
299
|
+
};
|
|
300
|
+
var ApiDataSyncManagementSchema = z3.object({
|
|
301
|
+
// Main Field Details
|
|
302
|
+
api_name: stringMandatory("API Name", 3, 100),
|
|
303
|
+
vendor_name: stringMandatory("Vendor Name", 3, 100),
|
|
304
|
+
description: stringOptional("Description", 0, 500),
|
|
305
|
+
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
306
|
+
// Multi selection -> UserOrganisation
|
|
307
|
+
// Control
|
|
308
|
+
is_enabled: enumOptional("Is Enabled", YesNo, "Yes" /* Yes */),
|
|
309
|
+
// Frequency
|
|
310
|
+
frequency_seconds: numberMandatory("Frequency Seconds"),
|
|
311
|
+
// Metadata
|
|
312
|
+
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
313
|
+
});
|
|
314
|
+
var ApiDataSyncManagementQuerySchema = BaseQuerySchema.extend({
|
|
315
|
+
// Self Table
|
|
316
|
+
api_data_sync_ids: multi_select_optional("ApiDataSyncManagement"),
|
|
317
|
+
// Multi-selection -> ApiDataSyncManagement
|
|
318
|
+
// Enums
|
|
319
|
+
is_enabled: enumArrayOptional("Is Enabled", YesNo, getAllEnums(YesNo))
|
|
320
|
+
});
|
|
321
|
+
var ApiDataSyncRunLogQuerySchema = BaseQuerySchema.extend({
|
|
322
|
+
// Self Table
|
|
323
|
+
api_data_sync_run_log_ids: multi_select_optional("ApiDataSyncRunLog"),
|
|
324
|
+
// Multi-selection -> ApiDataSyncRunLog
|
|
325
|
+
// Relations - Parent
|
|
326
|
+
api_data_sync_ids: multi_select_optional("ApiDataSyncManagement"),
|
|
327
|
+
// Multi-selection -> ApiDataSyncManagement
|
|
328
|
+
// Enums
|
|
329
|
+
run_type: enumArrayOptional(
|
|
330
|
+
"Run Type",
|
|
331
|
+
APISyncRunType,
|
|
332
|
+
getAllEnums(APISyncRunType)
|
|
333
|
+
),
|
|
334
|
+
run_status: enumArrayOptional("Run Status", YesNo, getAllEnums(YesNo))
|
|
335
|
+
});
|
|
336
|
+
var ExternalApiSyncReportSchema = z3.object({
|
|
337
|
+
date: dateMandatory("Date")
|
|
338
|
+
});
|
|
339
|
+
var toApiDataSyncManagementPayload = (row) => ({
|
|
340
|
+
// Main Field Details
|
|
341
|
+
api_name: row.api_name || "",
|
|
342
|
+
vendor_name: row.vendor_name || "",
|
|
343
|
+
description: row.description || "",
|
|
344
|
+
// Organisations
|
|
345
|
+
organisation_ids: row.ApiDataSyncManagementUserOrganisationLink?.map((link) => link.organisation_id) || [],
|
|
346
|
+
// Control
|
|
347
|
+
is_enabled: row.is_enabled || "Yes" /* Yes */,
|
|
348
|
+
// Frequency
|
|
349
|
+
frequency_seconds: row.frequency_seconds || 60,
|
|
350
|
+
// Metadata
|
|
351
|
+
status: row.status || "Active" /* Active */
|
|
352
|
+
});
|
|
353
|
+
var newApiDataSyncManagementPayload = () => ({
|
|
354
|
+
// Main Field Details
|
|
355
|
+
api_name: "",
|
|
356
|
+
vendor_name: "",
|
|
357
|
+
description: "",
|
|
358
|
+
// Organisations
|
|
359
|
+
organisation_ids: [],
|
|
360
|
+
// Control
|
|
361
|
+
is_enabled: "Yes" /* Yes */,
|
|
362
|
+
// Frequency
|
|
363
|
+
frequency_seconds: 60,
|
|
364
|
+
// Metadata
|
|
365
|
+
status: "Active" /* Active */
|
|
366
|
+
});
|
|
367
|
+
var findApiDataSyncManagement = async (data) => {
|
|
368
|
+
return apiPost(ENDPOINTS.find, data);
|
|
369
|
+
};
|
|
370
|
+
var createApiDataSyncManagement = async (data) => {
|
|
371
|
+
return apiPost(ENDPOINTS.create, data);
|
|
372
|
+
};
|
|
373
|
+
var updateApiDataSyncManagement = async (id, data) => {
|
|
374
|
+
return apiPatch(ENDPOINTS.update(id), data);
|
|
375
|
+
};
|
|
376
|
+
var deleteApiDataSyncManagement = async (id) => {
|
|
377
|
+
return apiDelete(ENDPOINTS.delete(id));
|
|
378
|
+
};
|
|
379
|
+
var findApiDataSyncRunLog = async (data) => {
|
|
380
|
+
return apiPost(ENDPOINTS.run_log_find, data);
|
|
381
|
+
};
|
|
382
|
+
var syncNowApiDataSyncManagement = async (id) => {
|
|
383
|
+
return apiPost(ENDPOINTS.sync_now(id), {});
|
|
384
|
+
};
|
|
385
|
+
var getExternalApiSyncDailyReport = async (data) => {
|
|
386
|
+
return apiPost(ENDPOINTS.daily_report, data);
|
|
387
|
+
};
|
|
388
|
+
var getExternalApiSyncMonthlyReport = async (data) => {
|
|
389
|
+
return apiPost(ENDPOINTS.monthly_report, data);
|
|
390
|
+
};
|
|
391
|
+
var resetExternalApiSyncCache = async () => {
|
|
392
|
+
return apiGet(ENDPOINTS.reset_cache);
|
|
393
|
+
};
|
|
394
|
+
export {
|
|
395
|
+
ApiDataSyncManagementQuerySchema,
|
|
396
|
+
ApiDataSyncManagementSchema,
|
|
397
|
+
ApiDataSyncRunLogQuerySchema,
|
|
398
|
+
ExternalApiSyncReportSchema,
|
|
399
|
+
createApiDataSyncManagement,
|
|
400
|
+
deleteApiDataSyncManagement,
|
|
401
|
+
findApiDataSyncManagement,
|
|
402
|
+
findApiDataSyncRunLog,
|
|
403
|
+
getExternalApiSyncDailyReport,
|
|
404
|
+
getExternalApiSyncMonthlyReport,
|
|
405
|
+
newApiDataSyncManagementPayload,
|
|
406
|
+
resetExternalApiSyncCache,
|
|
407
|
+
syncNowApiDataSyncManagement,
|
|
408
|
+
toApiDataSyncManagementPayload,
|
|
409
|
+
updateApiDataSyncManagement
|
|
410
|
+
};
|
|
@@ -126,11 +126,11 @@ declare const GPSLockDigitalDoorLogQuerySchema: z.ZodObject<{
|
|
|
126
126
|
include_master_data: YesNo;
|
|
127
127
|
date_format_id: string;
|
|
128
128
|
time_zone_id: string;
|
|
129
|
-
gps_lock_digital_door_log_ids: string[];
|
|
130
129
|
organisation_ids: string[];
|
|
131
130
|
user_ids: string[];
|
|
132
131
|
vehicle_ids: string[];
|
|
133
132
|
driver_ids: string[];
|
|
133
|
+
gps_lock_digital_door_log_ids: string[];
|
|
134
134
|
}, {
|
|
135
135
|
date_format_id: string;
|
|
136
136
|
time_zone_id: string;
|
|
@@ -155,11 +155,11 @@ declare const GPSLockDigitalDoorLogQuerySchema: z.ZodObject<{
|
|
|
155
155
|
direction: OrderBy;
|
|
156
156
|
}[] | undefined;
|
|
157
157
|
include_master_data?: YesNo | undefined;
|
|
158
|
-
gps_lock_digital_door_log_ids?: string[] | undefined;
|
|
159
158
|
organisation_ids?: string[] | undefined;
|
|
160
159
|
user_ids?: string[] | undefined;
|
|
161
160
|
vehicle_ids?: string[] | undefined;
|
|
162
161
|
driver_ids?: string[] | undefined;
|
|
162
|
+
gps_lock_digital_door_log_ids?: string[] | undefined;
|
|
163
163
|
}>;
|
|
164
164
|
type GPSLockDigitalDoorLogQueryDTO = z.infer<typeof GPSLockDigitalDoorLogQuerySchema>;
|
|
165
165
|
declare const toGPSLockDigitalDoorLogPayload: (row: GPSLockDigitalDoorLog) => GPSLockDigitalDoorLogDTO;
|
|
@@ -126,11 +126,11 @@ declare const GPSLockRelayLogQuerySchema: z.ZodObject<{
|
|
|
126
126
|
include_master_data: YesNo;
|
|
127
127
|
date_format_id: string;
|
|
128
128
|
time_zone_id: string;
|
|
129
|
+
gps_lock_relay_log_ids: string[];
|
|
129
130
|
organisation_ids: string[];
|
|
130
131
|
user_ids: string[];
|
|
131
132
|
vehicle_ids: string[];
|
|
132
133
|
driver_ids: string[];
|
|
133
|
-
gps_lock_relay_log_ids: string[];
|
|
134
134
|
}, {
|
|
135
135
|
date_format_id: string;
|
|
136
136
|
time_zone_id: string;
|
|
@@ -155,11 +155,11 @@ declare const GPSLockRelayLogQuerySchema: z.ZodObject<{
|
|
|
155
155
|
direction: OrderBy;
|
|
156
156
|
}[] | undefined;
|
|
157
157
|
include_master_data?: YesNo | undefined;
|
|
158
|
+
gps_lock_relay_log_ids?: string[] | undefined;
|
|
158
159
|
organisation_ids?: string[] | undefined;
|
|
159
160
|
user_ids?: string[] | undefined;
|
|
160
161
|
vehicle_ids?: string[] | undefined;
|
|
161
162
|
driver_ids?: string[] | undefined;
|
|
162
|
-
gps_lock_relay_log_ids?: string[] | undefined;
|
|
163
163
|
}>;
|
|
164
164
|
type GPSLockRelayLogQueryDTO = z.infer<typeof GPSLockRelayLogQuerySchema>;
|
|
165
165
|
declare const toGPSLockRelayLogPayload: (row: GPSLockRelayLog) => GPSLockRelayLogDTO;
|
|
@@ -36,13 +36,14 @@ declare const MultipleVehicleReportSchema: z.ZodObject<{
|
|
|
36
36
|
vehicle_summary: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
37
37
|
driver_summary: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
38
38
|
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
night_driving: NightDriving;
|
|
39
40
|
search: string;
|
|
40
41
|
paging: PAGING;
|
|
41
42
|
page_count: number;
|
|
42
43
|
page_index: number;
|
|
43
|
-
login_from: LoginFrom;
|
|
44
44
|
date_format_id: string;
|
|
45
45
|
time_zone_id: string;
|
|
46
|
+
login_from: LoginFrom;
|
|
46
47
|
organisation_id: string;
|
|
47
48
|
db_instance: string;
|
|
48
49
|
db_group: string;
|
|
@@ -50,7 +51,6 @@ declare const MultipleVehicleReportSchema: z.ZodObject<{
|
|
|
50
51
|
from_date: string;
|
|
51
52
|
to_date: string;
|
|
52
53
|
time_slot: TimeSlot;
|
|
53
|
-
night_driving: NightDriving;
|
|
54
54
|
over_speed: OverSpeed;
|
|
55
55
|
utilization_km: number;
|
|
56
56
|
raw_data: YesNo;
|
|
@@ -58,21 +58,21 @@ declare const MultipleVehicleReportSchema: z.ZodObject<{
|
|
|
58
58
|
vehicle_summary: YesNo;
|
|
59
59
|
driver_summary: YesNo;
|
|
60
60
|
}, {
|
|
61
|
-
login_from: LoginFrom;
|
|
62
61
|
date_format_id: string;
|
|
63
62
|
time_zone_id: string;
|
|
63
|
+
login_from: LoginFrom;
|
|
64
64
|
organisation_id: string;
|
|
65
65
|
db_instance: string;
|
|
66
66
|
db_group: string;
|
|
67
67
|
from_date: string;
|
|
68
68
|
to_date: string;
|
|
69
|
+
night_driving?: NightDriving | undefined;
|
|
69
70
|
search?: string | undefined;
|
|
70
71
|
paging?: PAGING | undefined;
|
|
71
72
|
page_count?: unknown;
|
|
72
73
|
page_index?: unknown;
|
|
73
74
|
vehicle_ids?: string[] | undefined;
|
|
74
75
|
time_slot?: TimeSlot | undefined;
|
|
75
|
-
night_driving?: NightDriving | undefined;
|
|
76
76
|
over_speed?: OverSpeed | undefined;
|
|
77
77
|
utilization_km?: unknown;
|
|
78
78
|
raw_data?: YesNo | undefined;
|
|
@@ -105,20 +105,20 @@ declare const MultipleDriverReportSchema: z.ZodObject<{
|
|
|
105
105
|
vehicle_summary: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
106
106
|
driver_summary: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
107
107
|
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
night_driving: NightDriving;
|
|
108
109
|
search: string;
|
|
109
110
|
paging: PAGING;
|
|
110
111
|
page_count: number;
|
|
111
112
|
page_index: number;
|
|
112
|
-
login_from: LoginFrom;
|
|
113
113
|
date_format_id: string;
|
|
114
114
|
time_zone_id: string;
|
|
115
|
+
login_from: LoginFrom;
|
|
115
116
|
organisation_id: string;
|
|
116
117
|
db_instance: string;
|
|
117
118
|
db_group: string;
|
|
118
119
|
from_date: string;
|
|
119
120
|
to_date: string;
|
|
120
121
|
time_slot: TimeSlot;
|
|
121
|
-
night_driving: NightDriving;
|
|
122
122
|
over_speed: OverSpeed;
|
|
123
123
|
utilization_km: number;
|
|
124
124
|
raw_data: YesNo;
|
|
@@ -127,20 +127,20 @@ declare const MultipleDriverReportSchema: z.ZodObject<{
|
|
|
127
127
|
driver_summary: YesNo;
|
|
128
128
|
driver_ids: string[];
|
|
129
129
|
}, {
|
|
130
|
-
login_from: LoginFrom;
|
|
131
130
|
date_format_id: string;
|
|
132
131
|
time_zone_id: string;
|
|
132
|
+
login_from: LoginFrom;
|
|
133
133
|
organisation_id: string;
|
|
134
134
|
db_instance: string;
|
|
135
135
|
db_group: string;
|
|
136
136
|
from_date: string;
|
|
137
137
|
to_date: string;
|
|
138
|
+
night_driving?: NightDriving | undefined;
|
|
138
139
|
search?: string | undefined;
|
|
139
140
|
paging?: PAGING | undefined;
|
|
140
141
|
page_count?: unknown;
|
|
141
142
|
page_index?: unknown;
|
|
142
143
|
time_slot?: TimeSlot | undefined;
|
|
143
|
-
night_driving?: NightDriving | undefined;
|
|
144
144
|
over_speed?: OverSpeed | undefined;
|
|
145
145
|
utilization_km?: unknown;
|
|
146
146
|
raw_data?: YesNo | undefined;
|
|
@@ -173,9 +173,9 @@ declare const SimpleReportSchema: z.ZodObject<{
|
|
|
173
173
|
paging: PAGING;
|
|
174
174
|
page_count: number;
|
|
175
175
|
page_index: number;
|
|
176
|
-
login_from: LoginFrom;
|
|
177
176
|
date_format_id: string;
|
|
178
177
|
time_zone_id: string;
|
|
178
|
+
login_from: LoginFrom;
|
|
179
179
|
organisation_id: string;
|
|
180
180
|
db_instance: string;
|
|
181
181
|
db_group: string;
|
|
@@ -186,9 +186,9 @@ declare const SimpleReportSchema: z.ZodObject<{
|
|
|
186
186
|
interval_seconds: number;
|
|
187
187
|
boolean_type: BooleanType;
|
|
188
188
|
}, {
|
|
189
|
-
login_from: LoginFrom;
|
|
190
189
|
date_format_id: string;
|
|
191
190
|
time_zone_id: string;
|
|
191
|
+
login_from: LoginFrom;
|
|
192
192
|
organisation_id: string;
|
|
193
193
|
db_instance: string;
|
|
194
194
|
db_group: string;
|
|
@@ -224,9 +224,9 @@ declare const MultipleVehicleLast24HoursReportSchema: z.ZodObject<{
|
|
|
224
224
|
paging: PAGING;
|
|
225
225
|
page_count: number;
|
|
226
226
|
page_index: number;
|
|
227
|
-
login_from: LoginFrom;
|
|
228
227
|
date_format_id: string;
|
|
229
228
|
time_zone_id: string;
|
|
229
|
+
login_from: LoginFrom;
|
|
230
230
|
organisation_id: string;
|
|
231
231
|
db_instance: string;
|
|
232
232
|
db_group: string;
|
|
@@ -234,9 +234,9 @@ declare const MultipleVehicleLast24HoursReportSchema: z.ZodObject<{
|
|
|
234
234
|
utilization_km: number;
|
|
235
235
|
is12am: Is12AM;
|
|
236
236
|
}, {
|
|
237
|
-
login_from: LoginFrom;
|
|
238
237
|
date_format_id: string;
|
|
239
238
|
time_zone_id: string;
|
|
239
|
+
login_from: LoginFrom;
|
|
240
240
|
organisation_id: string;
|
|
241
241
|
db_instance: string;
|
|
242
242
|
db_group: string;
|
|
@@ -270,9 +270,9 @@ declare const SingleVehicleReportSchema: z.ZodObject<{
|
|
|
270
270
|
paging: PAGING;
|
|
271
271
|
page_count: number;
|
|
272
272
|
page_index: number;
|
|
273
|
-
login_from: LoginFrom;
|
|
274
273
|
date_format_id: string;
|
|
275
274
|
time_zone_id: string;
|
|
275
|
+
login_from: LoginFrom;
|
|
276
276
|
organisation_id: string;
|
|
277
277
|
db_instance: string;
|
|
278
278
|
db_group: string;
|
|
@@ -281,9 +281,9 @@ declare const SingleVehicleReportSchema: z.ZodObject<{
|
|
|
281
281
|
from_date_time: string;
|
|
282
282
|
to_date_time: string;
|
|
283
283
|
}, {
|
|
284
|
-
login_from: LoginFrom;
|
|
285
284
|
date_format_id: string;
|
|
286
285
|
time_zone_id: string;
|
|
286
|
+
login_from: LoginFrom;
|
|
287
287
|
organisation_id: string;
|
|
288
288
|
db_instance: string;
|
|
289
289
|
db_group: string;
|
|
@@ -315,17 +315,17 @@ declare const VehicleDashboardSummaryQuerySchema: z.ZodObject<{
|
|
|
315
315
|
paging: PAGING;
|
|
316
316
|
page_count: number;
|
|
317
317
|
page_index: number;
|
|
318
|
-
login_from: LoginFrom;
|
|
319
318
|
date_format_id: string;
|
|
320
319
|
time_zone_id: string;
|
|
320
|
+
login_from: LoginFrom;
|
|
321
321
|
organisation_id: string;
|
|
322
322
|
db_instance: string;
|
|
323
323
|
db_group: string;
|
|
324
324
|
vehicle_id: string;
|
|
325
325
|
}, {
|
|
326
|
-
login_from: LoginFrom;
|
|
327
326
|
date_format_id: string;
|
|
328
327
|
time_zone_id: string;
|
|
328
|
+
login_from: LoginFrom;
|
|
329
329
|
organisation_id: string;
|
|
330
330
|
db_instance: string;
|
|
331
331
|
db_group: string;
|
|
@@ -362,9 +362,9 @@ declare const AlertReportSchema: z.ZodObject<{
|
|
|
362
362
|
paging: PAGING;
|
|
363
363
|
page_count: number;
|
|
364
364
|
page_index: number;
|
|
365
|
-
login_from: LoginFrom;
|
|
366
365
|
date_format_id: string;
|
|
367
366
|
time_zone_id: string;
|
|
367
|
+
login_from: LoginFrom;
|
|
368
368
|
organisation_id: string;
|
|
369
369
|
db_instance: string;
|
|
370
370
|
db_group: string;
|
|
@@ -378,9 +378,9 @@ declare const AlertReportSchema: z.ZodObject<{
|
|
|
378
378
|
alert_types: AlertType[];
|
|
379
379
|
alert_sub_types: AlertSubType[];
|
|
380
380
|
}, {
|
|
381
|
-
login_from: LoginFrom;
|
|
382
381
|
date_format_id: string;
|
|
383
382
|
time_zone_id: string;
|
|
383
|
+
login_from: LoginFrom;
|
|
384
384
|
organisation_id: string;
|
|
385
385
|
db_instance: string;
|
|
386
386
|
db_group: string;
|
|
@@ -99,9 +99,8 @@ declare const MasterDataCheckQuerySchema: z.ZodObject<{
|
|
|
99
99
|
master_traccar_server_id: z.ZodEffects<z.ZodString, string, string>;
|
|
100
100
|
search: z.ZodEffects<z.ZodString, string, string>;
|
|
101
101
|
}, "strip", z.ZodTypeAny, {
|
|
102
|
-
master_traccar_server_id: string;
|
|
103
|
-
status: Status[];
|
|
104
102
|
search: string;
|
|
103
|
+
status: Status[];
|
|
105
104
|
paging: PAGING;
|
|
106
105
|
page_count: number;
|
|
107
106
|
page_index: number;
|
|
@@ -121,11 +120,12 @@ declare const MasterDataCheckQuerySchema: z.ZodObject<{
|
|
|
121
120
|
include_master_data: YesNo;
|
|
122
121
|
date_format_id: string;
|
|
123
122
|
time_zone_id: string;
|
|
124
|
-
}, {
|
|
125
123
|
master_traccar_server_id: string;
|
|
124
|
+
}, {
|
|
126
125
|
search: string;
|
|
127
126
|
date_format_id: string;
|
|
128
127
|
time_zone_id: string;
|
|
128
|
+
master_traccar_server_id: string;
|
|
129
129
|
status?: Status[] | undefined;
|
|
130
130
|
paging?: PAGING | undefined;
|
|
131
131
|
page_count?: unknown;
|
|
@@ -32,13 +32,13 @@ declare const MasterDeviceSchema: z.ZodObject<{
|
|
|
32
32
|
description: z.ZodEffects<z.ZodString, string, string>;
|
|
33
33
|
imei: z.ZodEffects<z.ZodString, string, string>;
|
|
34
34
|
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
master_traccar_server_id: string;
|
|
35
36
|
description: string;
|
|
36
37
|
imei: string;
|
|
37
|
-
master_traccar_server_id: string;
|
|
38
38
|
}, {
|
|
39
|
+
master_traccar_server_id: string;
|
|
39
40
|
description: string;
|
|
40
41
|
imei: string;
|
|
41
|
-
master_traccar_server_id: string;
|
|
42
42
|
}>;
|
|
43
43
|
type MasterDeviceDTO = z.infer<typeof MasterDeviceSchema>;
|
|
44
44
|
declare const MasterDeviceQuerySchema: z.ZodObject<{
|
|
@@ -74,9 +74,8 @@ declare const MasterDeviceQuerySchema: z.ZodObject<{
|
|
|
74
74
|
} & {
|
|
75
75
|
master_traccar_server_id: z.ZodEffects<z.ZodString, string, string>;
|
|
76
76
|
}, "strip", z.ZodTypeAny, {
|
|
77
|
-
master_traccar_server_id: string;
|
|
78
|
-
status: Status[];
|
|
79
77
|
search: string;
|
|
78
|
+
status: Status[];
|
|
80
79
|
paging: PAGING;
|
|
81
80
|
page_count: number;
|
|
82
81
|
page_index: number;
|
|
@@ -96,12 +95,13 @@ declare const MasterDeviceQuerySchema: z.ZodObject<{
|
|
|
96
95
|
include_master_data: YesNo;
|
|
97
96
|
date_format_id: string;
|
|
98
97
|
time_zone_id: string;
|
|
99
|
-
}, {
|
|
100
98
|
master_traccar_server_id: string;
|
|
99
|
+
}, {
|
|
101
100
|
date_format_id: string;
|
|
102
101
|
time_zone_id: string;
|
|
103
|
-
|
|
102
|
+
master_traccar_server_id: string;
|
|
104
103
|
search?: string | undefined;
|
|
104
|
+
status?: Status[] | undefined;
|
|
105
105
|
paging?: PAGING | undefined;
|
|
106
106
|
page_count?: unknown;
|
|
107
107
|
page_index?: unknown;
|
|
@@ -97,8 +97,8 @@ declare const MasterTraccarServerQuerySchema: z.ZodObject<{
|
|
|
97
97
|
} & {
|
|
98
98
|
master_traccar_server_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
99
99
|
}, "strip", z.ZodTypeAny, {
|
|
100
|
-
status: Status[];
|
|
101
100
|
search: string;
|
|
101
|
+
status: Status[];
|
|
102
102
|
paging: PAGING;
|
|
103
103
|
page_count: number;
|
|
104
104
|
page_index: number;
|
|
@@ -122,8 +122,8 @@ declare const MasterTraccarServerQuerySchema: z.ZodObject<{
|
|
|
122
122
|
}, {
|
|
123
123
|
date_format_id: string;
|
|
124
124
|
time_zone_id: string;
|
|
125
|
-
status?: Status[] | undefined;
|
|
126
125
|
search?: string | undefined;
|
|
126
|
+
status?: Status[] | undefined;
|
|
127
127
|
paging?: PAGING | undefined;
|
|
128
128
|
page_count?: unknown;
|
|
129
129
|
page_index?: unknown;
|