vms-nest-prisma-api-document 24.0.0 → 26.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 +28 -12
- package/dist/core/Enums.js +34 -14
- package/dist/services/account/analytics/user_login_analytics_service.d.ts +3 -3
- package/dist/services/account/analytics/user_page_analytics_service.d.ts +1 -1
- package/dist/services/account/bookmark_service.d.ts +9 -9
- package/dist/services/{gps/features/user_notification_preferences.service.d.ts → account/notification_preferences.service.d.ts} +78 -46
- package/dist/services/{gps/features/user_notification_preferences.service.js → account/notification_preferences.service.js} +80 -63
- package/dist/services/{gps/features/user_report_preferences.service.d.ts → account/report_preferences.service.d.ts} +70 -59
- package/dist/services/{gps/features/user_report_preferences.service.js → account/report_preferences.service.js} +64 -31
- package/dist/services/account/ticket_service.d.ts +40 -32
- package/dist/services/account/ticket_service.js +27 -23
- package/dist/services/fleet/fuel_management/fleet_fuel_daily_summary_service.d.ts +17 -17
- package/dist/services/fleet/fuel_management/fleet_fuel_refill_service.d.ts +45 -45
- package/dist/services/fleet/fuel_management/fleet_fuel_removal_service.d.ts +30 -30
- package/dist/services/gps/features/geofence/gps_geofence_service.d.ts +28 -28
- package/dist/services/gps/features/geofence/gps_geofence_transaction_service.d.ts +16 -16
- package/dist/services/gps/features/geofence/gps_geofence_transaction_summary_service.d.ts +11 -11
- package/dist/services/gps/features/geofence/trip_geofence_to_geofence_service.d.ts +7 -7
- package/dist/services/gps/features/gps_live_track_share_link_service.d.ts +79 -64
- package/dist/services/gps/features/gps_live_track_share_link_service.js +62 -84
- package/dist/services/gps/features/gps_track_history_share_link_service.d.ts +69 -47
- package/dist/services/gps/features/gps_track_history_share_link_service.js +68 -44
- package/dist/services/gps/reports/gps_reports_mongo_service.d.ts +46 -46
- package/dist/services/main/devices/master_device_service.d.ts +1 -1
- package/dist/services/main/drivers/master_driver_service.d.ts +1 -1
- package/dist/services/main/sims/master_sim_service.d.ts +1 -1
- package/dist/services/main/users/auth_service.d.ts +1 -1
- package/dist/services/main/users/user_organisation_service.d.ts +1 -1
- package/dist/services/main/users/user_organisation_service.js +73 -63
- package/dist/services/main/users/user_service.d.ts +1 -1
- package/dist/services/main/vehicle/childs/vehicle_odometer_history.d.ts +1 -1
- package/dist/services/main/vehicle/master_vehicle_service.d.ts +1 -1
- package/dist/services/master/device/master_device_manufacturer_service.d.ts +1 -1
- package/dist/services/master/device/master_device_model_service.d.ts +1 -1
- package/dist/services/master/device/master_device_type_service.d.ts +1 -1
- package/dist/services/master/expense/master_expense_name_service.d.ts +1 -1
- package/dist/services/master/expense/master_expense_type_service.d.ts +1 -1
- package/dist/services/master/expense/master_fuel_company_service.d.ts +1 -1
- package/dist/services/master/expense/master_vendor_document_type_service.d.ts +1 -1
- package/dist/services/master/expense/master_vendor_type_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_incident_severity_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_incident_status_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_incident_type_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_insurance_claim_status_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_service_task_service.d.ts +1 -1
- package/dist/services/master/main/master_main_country_service.d.ts +1 -1
- package/dist/services/master/main/master_main_currency_service.d.ts +1 -1
- package/dist/services/master/main/master_main_date_format_service.d.ts +1 -1
- package/dist/services/master/main/master_main_eway_bill_provider_service.d.ts +2 -2
- package/dist/services/master/main/master_main_fasttag_bank_service.d.ts +2 -2
- package/dist/services/master/main/master_main_industry_service.d.ts +1 -1
- package/dist/services/master/main/master_main_landmark_service.d.ts +6 -6
- package/dist/services/master/main/master_main_language_service.d.ts +1 -1
- package/dist/services/master/main/master_main_state_service.d.ts +1 -1
- package/dist/services/master/main/master_main_timezone_service.d.ts +1 -1
- package/dist/services/master/main/master_main_unit_distance_service.d.ts +1 -1
- package/dist/services/master/main/master_main_unit_mileage_service.d.ts +1 -1
- package/dist/services/master/main/master_main_unit_volume_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_branch_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_color_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_group_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_sub_company_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_tag_service.d.ts +1 -1
- package/dist/services/master/spare_part/master_spare_part_category_service.d.ts +1 -1
- package/dist/services/master/spare_part/master_spare_part_sub_category_service.d.ts +1 -1
- package/dist/services/master/spare_part/master_spare_part_unit_service.d.ts +1 -1
- package/dist/services/master/trip/master_trip_party_type_service.d.ts +1 -1
- package/dist/services/master/tyre/master_tyre_grade_service.d.ts +1 -1
- package/dist/services/master/tyre/master_tyre_make_service.d.ts +1 -1
- package/dist/services/master/tyre/master_tyre_model_service.d.ts +1 -1
- package/dist/services/master/user/master_user_role_service.d.ts +1 -1
- package/dist/services/master/user/master_user_status_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_associated_to_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_document_type_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_fuel_removal_reason_service.d.ts +3 -3
- package/dist/services/master/vehicle/master_vehicle_fuel_type_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_fuel_unit_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_make_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_model_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_ownership_type_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_status_type_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_sub_model_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_type_service.d.ts +1 -1
- package/dist/{user_organisation_service-C-FbPQmd.d.ts → user_organisation_service-DL7cDTcV.d.ts} +115 -89
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Status, PAGING, LoadParents, LoadChild, LoadChildCount, OrderBy, YesNo } from '../../../../core/Enums.js';
|
|
2
2
|
import { FBR, SBR } from '../../../../core/BaseResponse.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { U as UserOrganisation, M as MasterVehicle, b as MasterDriver } from '../../../../user_organisation_service-
|
|
4
|
+
import { U as UserOrganisation, M as MasterVehicle, b as MasterDriver } from '../../../../user_organisation_service-DL7cDTcV.js';
|
|
5
5
|
import '../../../../zod_utils/zod_base_schema.js';
|
|
6
6
|
import '../../../master/main/master_main_sim_provider_service.js';
|
|
7
7
|
|
|
@@ -57,9 +57,9 @@ declare const TripGeofenceToGeofenceSchema: z.ZodObject<{
|
|
|
57
57
|
}, "strip", z.ZodTypeAny, {
|
|
58
58
|
status: Status;
|
|
59
59
|
organisation_id: string;
|
|
60
|
-
time_zone_id: string;
|
|
61
|
-
driver_id: string;
|
|
62
60
|
vehicle_id: string;
|
|
61
|
+
driver_id: string;
|
|
62
|
+
time_zone_id: string;
|
|
63
63
|
duration_seconds: number;
|
|
64
64
|
from_geofence_exit_date_time: string;
|
|
65
65
|
to_geofence_enter_date_time: string;
|
|
@@ -73,9 +73,9 @@ declare const TripGeofenceToGeofenceSchema: z.ZodObject<{
|
|
|
73
73
|
}, {
|
|
74
74
|
status: Status;
|
|
75
75
|
organisation_id: string;
|
|
76
|
-
time_zone_id: string;
|
|
77
|
-
driver_id: string;
|
|
78
76
|
vehicle_id: string;
|
|
77
|
+
driver_id: string;
|
|
78
|
+
time_zone_id: string;
|
|
79
79
|
from_geofence_exit_date_time: string;
|
|
80
80
|
to_geofence_enter_date_time: string;
|
|
81
81
|
from_geofence_id: string;
|
|
@@ -128,6 +128,7 @@ declare const TripGeofenceToGeofenceQuerySchema: z.ZodObject<{
|
|
|
128
128
|
to_date: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
129
129
|
}, "strip", z.ZodTypeAny, {
|
|
130
130
|
status: Status[];
|
|
131
|
+
time_zone_id: string;
|
|
131
132
|
search: string;
|
|
132
133
|
paging: PAGING;
|
|
133
134
|
page_count: number;
|
|
@@ -147,7 +148,6 @@ declare const TripGeofenceToGeofenceQuerySchema: z.ZodObject<{
|
|
|
147
148
|
}[];
|
|
148
149
|
include_master_data: YesNo;
|
|
149
150
|
date_format_id: string;
|
|
150
|
-
time_zone_id: string;
|
|
151
151
|
organisation_ids: string[];
|
|
152
152
|
vehicle_ids: string[];
|
|
153
153
|
driver_ids: string[];
|
|
@@ -156,8 +156,8 @@ declare const TripGeofenceToGeofenceQuerySchema: z.ZodObject<{
|
|
|
156
156
|
from_geofence_ids: string[];
|
|
157
157
|
to_geofence_ids: string[];
|
|
158
158
|
}, {
|
|
159
|
-
date_format_id: string;
|
|
160
159
|
time_zone_id: string;
|
|
160
|
+
date_format_id: string;
|
|
161
161
|
from_date: string;
|
|
162
162
|
to_date: string;
|
|
163
163
|
status?: Status[] | undefined;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { LinkType, LinkStatus, Status,
|
|
1
|
+
import { LinkType, LinkStatus, Status, NotificationChannel, PAGING, LoadParents, LoadChild, LoadChildCount, OrderBy, YesNo } from '../../../core/Enums.js';
|
|
2
2
|
import { FBR, SBR } from '../../../core/BaseResponse.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { U as UserOrganisation, M as MasterVehicle } from '../../../user_organisation_service-
|
|
4
|
+
import { U as UserOrganisation, M as MasterVehicle } from '../../../user_organisation_service-DL7cDTcV.js';
|
|
5
|
+
import { MasterMainLandmark } from '../../master/main/master_main_landmark_service.js';
|
|
5
6
|
import '../../../zod_utils/zod_base_schema.js';
|
|
6
7
|
import '../../master/main/master_main_sim_provider_service.js';
|
|
7
8
|
|
|
@@ -10,7 +11,11 @@ interface GPSLiveTrackShareLink extends Record<string, unknown> {
|
|
|
10
11
|
link_type: LinkType;
|
|
11
12
|
latitude?: number;
|
|
12
13
|
longitude?: number;
|
|
13
|
-
|
|
14
|
+
google_location?: string;
|
|
15
|
+
landmark_id?: string;
|
|
16
|
+
MasterMainLandmark?: MasterMainLandmark;
|
|
17
|
+
landmark_location?: string;
|
|
18
|
+
landmark_distance?: number;
|
|
14
19
|
expiry_date_time: string;
|
|
15
20
|
link_status: LinkStatus;
|
|
16
21
|
status: Status;
|
|
@@ -20,13 +25,19 @@ interface GPSLiveTrackShareLink extends Record<string, unknown> {
|
|
|
20
25
|
UserOrganisation?: UserOrganisation;
|
|
21
26
|
vehicle_id: string;
|
|
22
27
|
MasterVehicle?: MasterVehicle;
|
|
23
|
-
|
|
28
|
+
vehicle_number?: string;
|
|
29
|
+
vehicle_type?: string;
|
|
24
30
|
GPSLiveTrackShareLinkNotifications?: GPSLiveTrackShareLinkNotification[];
|
|
31
|
+
_count?: {
|
|
32
|
+
GPSLiveTrackShareLinkNotification?: number;
|
|
33
|
+
};
|
|
25
34
|
}
|
|
26
35
|
interface GPSLiveTrackShareLinkNotification extends Record<string, unknown> {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
36
|
+
gps_live_track_share_link_notification_id: string;
|
|
37
|
+
notification_channels: NotificationChannel[];
|
|
38
|
+
mobile_numbers?: string;
|
|
39
|
+
email_ids?: string;
|
|
40
|
+
cc_email_ids?: string;
|
|
30
41
|
status: Status;
|
|
31
42
|
added_date_time: string;
|
|
32
43
|
modified_date_time: string;
|
|
@@ -34,92 +45,97 @@ interface GPSLiveTrackShareLinkNotification extends Record<string, unknown> {
|
|
|
34
45
|
UserOrganisation?: UserOrganisation;
|
|
35
46
|
gps_live_track_share_link_id: string;
|
|
36
47
|
GPSLiveTrackShareLink?: GPSLiveTrackShareLink;
|
|
48
|
+
_count?: {};
|
|
37
49
|
}
|
|
38
|
-
declare const
|
|
50
|
+
declare const GPSLiveTrackShareLinkNotificationSchema: z.ZodObject<{
|
|
39
51
|
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
40
52
|
gps_live_track_share_link_id: z.ZodEffects<z.ZodString, string, string>;
|
|
41
|
-
|
|
42
|
-
|
|
53
|
+
notification_channels: z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof NotificationChannel>, "many">>;
|
|
54
|
+
mobile_numbers: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
55
|
+
email_ids: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
56
|
+
cc_email_ids: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
43
57
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
44
58
|
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
gps_live_track_share_link_id: string;
|
|
45
60
|
status: Status;
|
|
46
61
|
organisation_id: string;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
62
|
+
notification_channels: NotificationChannel[];
|
|
63
|
+
mobile_numbers: string;
|
|
64
|
+
email_ids: string;
|
|
65
|
+
cc_email_ids: string;
|
|
50
66
|
}, {
|
|
67
|
+
gps_live_track_share_link_id: string;
|
|
51
68
|
status: Status;
|
|
52
69
|
organisation_id: string;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
70
|
+
notification_channels?: NotificationChannel[] | undefined;
|
|
71
|
+
mobile_numbers?: string | undefined;
|
|
72
|
+
email_ids?: string | undefined;
|
|
73
|
+
cc_email_ids?: string | undefined;
|
|
56
74
|
}>;
|
|
57
|
-
type
|
|
75
|
+
type GPSLiveTrackShareLinkNotificationDTO = z.infer<typeof GPSLiveTrackShareLinkNotificationSchema>;
|
|
58
76
|
declare const GPSLiveTrackShareLinkSchema: z.ZodObject<{
|
|
59
77
|
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
60
78
|
vehicle_id: z.ZodEffects<z.ZodString, string, string>;
|
|
61
79
|
link_type: z.ZodType<LinkType, z.ZodTypeDef, LinkType>;
|
|
62
|
-
latitude: z.ZodOptional<z.ZodEffects<z.ZodDefault<z.ZodNumber>, number, unknown>>;
|
|
63
|
-
longitude: z.ZodOptional<z.ZodEffects<z.ZodDefault<z.ZodNumber>, number, unknown>>;
|
|
64
|
-
location: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
65
80
|
expire_milliseconds: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
66
|
-
trip_id: z.ZodEffects<z.ZodString, string, string>;
|
|
67
81
|
link_status: z.ZodType<LinkStatus, z.ZodTypeDef, LinkStatus>;
|
|
68
82
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
69
|
-
|
|
83
|
+
GPSLiveTrackShareLinkNotification: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
70
84
|
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
71
85
|
gps_live_track_share_link_id: z.ZodEffects<z.ZodString, string, string>;
|
|
72
|
-
|
|
73
|
-
|
|
86
|
+
notification_channels: z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof NotificationChannel>, "many">>;
|
|
87
|
+
mobile_numbers: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
88
|
+
email_ids: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
89
|
+
cc_email_ids: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
74
90
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
75
91
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
92
|
+
gps_live_track_share_link_id: string;
|
|
76
93
|
status: Status;
|
|
77
94
|
organisation_id: string;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
95
|
+
notification_channels: NotificationChannel[];
|
|
96
|
+
mobile_numbers: string;
|
|
97
|
+
email_ids: string;
|
|
98
|
+
cc_email_ids: string;
|
|
81
99
|
}, {
|
|
100
|
+
gps_live_track_share_link_id: string;
|
|
82
101
|
status: Status;
|
|
83
102
|
organisation_id: string;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
103
|
+
notification_channels?: NotificationChannel[] | undefined;
|
|
104
|
+
mobile_numbers?: string | undefined;
|
|
105
|
+
email_ids?: string | undefined;
|
|
106
|
+
cc_email_ids?: string | undefined;
|
|
87
107
|
}>, "many">>>;
|
|
88
108
|
}, "strip", z.ZodTypeAny, {
|
|
109
|
+
link_type: LinkType;
|
|
110
|
+
link_status: LinkStatus;
|
|
89
111
|
status: Status;
|
|
90
112
|
organisation_id: string;
|
|
91
113
|
vehicle_id: string;
|
|
92
|
-
link_type: LinkType;
|
|
93
|
-
location: string;
|
|
94
|
-
link_status: LinkStatus;
|
|
95
|
-
trip_id: string;
|
|
96
114
|
expire_milliseconds: number;
|
|
97
|
-
|
|
115
|
+
GPSLiveTrackShareLinkNotification: {
|
|
116
|
+
gps_live_track_share_link_id: string;
|
|
98
117
|
status: Status;
|
|
99
118
|
organisation_id: string;
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
119
|
+
notification_channels: NotificationChannel[];
|
|
120
|
+
mobile_numbers: string;
|
|
121
|
+
email_ids: string;
|
|
122
|
+
cc_email_ids: string;
|
|
103
123
|
}[];
|
|
104
|
-
latitude?: number | undefined;
|
|
105
|
-
longitude?: number | undefined;
|
|
106
124
|
}, {
|
|
125
|
+
link_type: LinkType;
|
|
126
|
+
link_status: LinkStatus;
|
|
107
127
|
status: Status;
|
|
108
128
|
organisation_id: string;
|
|
109
129
|
vehicle_id: string;
|
|
110
|
-
link_type: LinkType;
|
|
111
|
-
link_status: LinkStatus;
|
|
112
|
-
trip_id: string;
|
|
113
|
-
latitude?: unknown;
|
|
114
|
-
longitude?: unknown;
|
|
115
|
-
location?: string | undefined;
|
|
116
130
|
expire_milliseconds?: unknown;
|
|
117
|
-
|
|
131
|
+
GPSLiveTrackShareLinkNotification?: {
|
|
132
|
+
gps_live_track_share_link_id: string;
|
|
118
133
|
status: Status;
|
|
119
134
|
organisation_id: string;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
135
|
+
notification_channels?: NotificationChannel[] | undefined;
|
|
136
|
+
mobile_numbers?: string | undefined;
|
|
137
|
+
email_ids?: string | undefined;
|
|
138
|
+
cc_email_ids?: string | undefined;
|
|
123
139
|
}[] | undefined;
|
|
124
140
|
}>;
|
|
125
141
|
type GPSLiveTrackShareLinkDTO = z.infer<typeof GPSLiveTrackShareLinkSchema>;
|
|
@@ -172,12 +188,13 @@ declare const GPSLiveTrackShareLinkQuerySchema: z.ZodObject<{
|
|
|
172
188
|
} & {
|
|
173
189
|
organisation_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
174
190
|
vehicle_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
175
|
-
trip_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
176
191
|
link_type: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof LinkType>, "many">>>;
|
|
177
192
|
link_status: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof LinkStatus>, "many">>>;
|
|
193
|
+
gps_live_track_share_link_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
178
194
|
}, "strip", z.ZodTypeAny, {
|
|
195
|
+
link_type: LinkType[];
|
|
196
|
+
link_status: LinkStatus[];
|
|
179
197
|
status: Status[];
|
|
180
|
-
vehicle_ids: string[];
|
|
181
198
|
search: string;
|
|
182
199
|
paging: PAGING;
|
|
183
200
|
page_count: number;
|
|
@@ -199,14 +216,14 @@ declare const GPSLiveTrackShareLinkQuerySchema: z.ZodObject<{
|
|
|
199
216
|
date_format_id: string;
|
|
200
217
|
time_zone_id: string;
|
|
201
218
|
organisation_ids: string[];
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
trip_ids: string[];
|
|
219
|
+
vehicle_ids: string[];
|
|
220
|
+
gps_live_track_share_link_ids: string[];
|
|
205
221
|
}, {
|
|
206
222
|
date_format_id: string;
|
|
207
223
|
time_zone_id: string;
|
|
224
|
+
link_type?: LinkType[] | undefined;
|
|
225
|
+
link_status?: LinkStatus[] | undefined;
|
|
208
226
|
status?: Status[] | undefined;
|
|
209
|
-
vehicle_ids?: string[] | undefined;
|
|
210
227
|
search?: string | undefined;
|
|
211
228
|
paging?: PAGING | undefined;
|
|
212
229
|
page_count?: unknown;
|
|
@@ -226,19 +243,17 @@ declare const GPSLiveTrackShareLinkQuerySchema: z.ZodObject<{
|
|
|
226
243
|
}[] | undefined;
|
|
227
244
|
include_master_data?: YesNo | undefined;
|
|
228
245
|
organisation_ids?: string[] | undefined;
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
trip_ids?: string[] | undefined;
|
|
246
|
+
vehicle_ids?: string[] | undefined;
|
|
247
|
+
gps_live_track_share_link_ids?: string[] | undefined;
|
|
232
248
|
}>;
|
|
233
249
|
type GPSLiveTrackShareLinkQueryDTO = z.infer<typeof GPSLiveTrackShareLinkQuerySchema>;
|
|
234
250
|
declare const toGPSLiveTrackShareLinkPayload: (data: GPSLiveTrackShareLink) => GPSLiveTrackShareLinkDTO;
|
|
235
251
|
declare const newGPSLiveTrackShareLinkPayload: () => GPSLiveTrackShareLinkDTO;
|
|
236
|
-
declare const
|
|
252
|
+
declare const findGPSLiveTrackShareLink: (data: GPSLiveTrackShareLinkQueryDTO) => Promise<FBR<GPSLiveTrackShareLink[]>>;
|
|
237
253
|
declare const createGPSLiveTrackShareLink: (data: GPSLiveTrackShareLinkDTO) => Promise<SBR>;
|
|
238
|
-
declare const deleteGPSLiveTrackShareLink: (id: string) => Promise<SBR>;
|
|
239
254
|
declare const extendGPSLiveTrackLinkTime: (id: string, data: GPSLiveTrackShareLinkTimeDTO) => Promise<SBR>;
|
|
240
255
|
declare const updateGPSLiveTrackLinkStatus: (id: string, data: GPSLiveTrackShareLinkStatusDTO) => Promise<SBR>;
|
|
241
|
-
declare const
|
|
242
|
-
declare const
|
|
256
|
+
declare const deleteGPSLiveTrackShareLink: (id: string) => Promise<SBR>;
|
|
257
|
+
declare const createGPSLiveTrackShareLinkNotification: (data: GPSLiveTrackShareLinkNotificationDTO) => Promise<SBR>;
|
|
243
258
|
|
|
244
|
-
export { type GPSLiveTrackShareLink, type GPSLiveTrackShareLinkDTO, type GPSLiveTrackShareLinkNotification, type
|
|
259
|
+
export { type GPSLiveTrackShareLink, type GPSLiveTrackShareLinkDTO, type GPSLiveTrackShareLinkNotification, type GPSLiveTrackShareLinkNotificationDTO, GPSLiveTrackShareLinkNotificationSchema, type GPSLiveTrackShareLinkQueryDTO, GPSLiveTrackShareLinkQuerySchema, GPSLiveTrackShareLinkSchema, type GPSLiveTrackShareLinkStatusDTO, GPSLiveTrackShareLinkStatusSchema, type GPSLiveTrackShareLinkTimeDTO, GPSLiveTrackShareLinkTimeSchema, createGPSLiveTrackShareLink, createGPSLiveTrackShareLinkNotification, deleteGPSLiveTrackShareLink, extendGPSLiveTrackLinkTime, findGPSLiveTrackShareLink, newGPSLiveTrackShareLinkPayload, toGPSLiveTrackShareLinkPayload, updateGPSLiveTrackLinkStatus };
|
|
@@ -75,20 +75,6 @@ var numberOptional = (fieldName, min = 0, max = 1e9, defaultValue = 0) => {
|
|
|
75
75
|
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)
|
|
76
76
|
);
|
|
77
77
|
};
|
|
78
|
-
var doubleOptionalLatLng = (fieldName, defaultValue = 0) => {
|
|
79
|
-
return z.preprocess(
|
|
80
|
-
(val) => {
|
|
81
|
-
if (typeof val === "string") {
|
|
82
|
-
val = parseFloat(val);
|
|
83
|
-
}
|
|
84
|
-
if (typeof val === "number") {
|
|
85
|
-
return parseFloat(val.toFixed(6));
|
|
86
|
-
}
|
|
87
|
-
return val;
|
|
88
|
-
},
|
|
89
|
-
z.number({ invalid_type_error: `${fieldName} must be a number.` }).min(-180, `${fieldName} must be at least -180.`).max(180, `${fieldName} must be at most 180.`).default(defaultValue)
|
|
90
|
-
).optional();
|
|
91
|
-
};
|
|
92
78
|
var enumMandatory = (fieldName, enumType, defaultValue) => {
|
|
93
79
|
return z.union([
|
|
94
80
|
z.nativeEnum(enumType, {
|
|
@@ -112,9 +98,25 @@ var enumOptional = (fieldName, enumType, defaultValue) => {
|
|
|
112
98
|
).join(", ")}.`
|
|
113
99
|
}).optional().default(() => defaultValue);
|
|
114
100
|
};
|
|
101
|
+
var handleNullOrUndefinedEnumArray = (value, defaultValue) => Array.isArray(value) ? value : defaultValue;
|
|
115
102
|
var getAllEnums = (enumType) => {
|
|
116
103
|
return Object.values(enumType);
|
|
117
104
|
};
|
|
105
|
+
var enumArrayMandatory = (fieldName, enumType, defaultValue = getAllEnums(enumType), min = 1, max = 100, unique = false) => {
|
|
106
|
+
const schema = z.array(z.nativeEnum(enumType), {
|
|
107
|
+
invalid_type_error: `${fieldName} must be an array containing only the following values: ${Object.values(
|
|
108
|
+
enumType
|
|
109
|
+
).join(", ")}.`
|
|
110
|
+
}).min(min, `${fieldName} must contain at least ${min} items.`).max(max, `${fieldName} must contain at most ${max} items.`);
|
|
111
|
+
if (unique) {
|
|
112
|
+
schema.refine(
|
|
113
|
+
(arr) => new Set(arr).size === arr.length,
|
|
114
|
+
`${fieldName} must contain unique values.`
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
schema.transform((val) => handleNullOrUndefinedEnumArray(val, []));
|
|
118
|
+
return schema.default(() => defaultValue);
|
|
119
|
+
};
|
|
118
120
|
var enumArrayOptional = (fieldName, enumType, defaultValue = getAllEnums(enumType), min = 0, max = 100, unique = false) => {
|
|
119
121
|
const schema = z.array(z.nativeEnum(enumType), {
|
|
120
122
|
invalid_type_error: `${fieldName} must be an array containing only the following values: ${Object.values(
|
|
@@ -222,13 +224,13 @@ var YesNo = /* @__PURE__ */ ((YesNo2) => {
|
|
|
222
224
|
YesNo2["No"] = "No";
|
|
223
225
|
return YesNo2;
|
|
224
226
|
})(YesNo || {});
|
|
225
|
-
var
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
return
|
|
231
|
-
})(
|
|
227
|
+
var NotificationChannel = /* @__PURE__ */ ((NotificationChannel2) => {
|
|
228
|
+
NotificationChannel2["Push"] = "Push";
|
|
229
|
+
NotificationChannel2["WhatsApp"] = "WhatsApp";
|
|
230
|
+
NotificationChannel2["SMS"] = "SMS";
|
|
231
|
+
NotificationChannel2["Email"] = "Email";
|
|
232
|
+
return NotificationChannel2;
|
|
233
|
+
})(NotificationChannel || {});
|
|
232
234
|
var LinkType = /* @__PURE__ */ ((LinkType2) => {
|
|
233
235
|
LinkType2["CurrentLocation"] = "CurrentLocation";
|
|
234
236
|
LinkType2["LiveLocation"] = "LiveLocation";
|
|
@@ -305,36 +307,36 @@ var MongoBaseQuerySchema = z2.object({
|
|
|
305
307
|
var URL = "gps/features/gps_live_track_share_link";
|
|
306
308
|
var ENDPOINTS = {
|
|
307
309
|
find: `${URL}/search`,
|
|
310
|
+
create_notification: `${URL}/create_notification`,
|
|
308
311
|
create: URL,
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
updateTripStatus: (id) => `${URL}/update_live_track_trip_link_status/${id}`,
|
|
313
|
-
createNotification: `${URL}/create_notifications`
|
|
312
|
+
extend_live_track_link_time: (id) => `${URL}/extend_live_track_link_time/${id}`,
|
|
313
|
+
update_live_track_link_status: (id) => `${URL}/update_live_track_link_status/${id}`,
|
|
314
|
+
delete: (id) => `${URL}/${id}`
|
|
314
315
|
};
|
|
315
|
-
var
|
|
316
|
-
organisation_id: single_select_optional("
|
|
317
|
-
|
|
318
|
-
|
|
316
|
+
var GPSLiveTrackShareLinkNotificationSchema = z3.object({
|
|
317
|
+
organisation_id: single_select_optional("UserOrganisation"),
|
|
318
|
+
// ✅ Single-Selection -> UserOrganisation
|
|
319
|
+
gps_live_track_share_link_id: single_select_optional("GPSLiveTrackShareLink"),
|
|
320
|
+
notification_channels: enumArrayMandatory(
|
|
321
|
+
"Notification Channels",
|
|
322
|
+
NotificationChannel,
|
|
323
|
+
getAllEnums(NotificationChannel)
|
|
319
324
|
),
|
|
320
|
-
|
|
321
|
-
|
|
325
|
+
mobile_numbers: stringOptional("Mobile Numbers", 0, 300),
|
|
326
|
+
email_ids: stringOptional("Email IDs", 0, 300),
|
|
327
|
+
cc_email_ids: stringOptional("CC email IDs", 0, 300),
|
|
322
328
|
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
323
329
|
});
|
|
324
330
|
var GPSLiveTrackShareLinkSchema = z3.object({
|
|
325
|
-
organisation_id: single_select_mandatory("
|
|
331
|
+
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
326
332
|
vehicle_id: single_select_mandatory("Vehicle ID"),
|
|
327
|
-
link_type: enumMandatory("Link Type", LinkType, "
|
|
328
|
-
latitude: doubleOptionalLatLng("Latitude"),
|
|
329
|
-
longitude: doubleOptionalLatLng("Longitude"),
|
|
330
|
-
location: stringOptional("Location", 0, 500),
|
|
333
|
+
link_type: enumMandatory("Link Type", LinkType, "CurrentLocation" /* CurrentLocation */),
|
|
331
334
|
expire_milliseconds: numberOptional("Expire Milliseconds"),
|
|
332
|
-
trip_id: single_select_optional("Trip ID"),
|
|
333
335
|
link_status: enumMandatory("Link Status", LinkStatus, "Active" /* Active */),
|
|
334
336
|
status: enumMandatory("Status", Status, "Active" /* Active */),
|
|
335
|
-
|
|
336
|
-
"
|
|
337
|
-
|
|
337
|
+
GPSLiveTrackShareLinkNotification: nestedArrayOfObjectsOptional(
|
|
338
|
+
"GPSLiveTrackShareLinkNotification",
|
|
339
|
+
GPSLiveTrackShareLinkNotificationSchema,
|
|
338
340
|
[]
|
|
339
341
|
)
|
|
340
342
|
});
|
|
@@ -345,91 +347,67 @@ var GPSLiveTrackShareLinkStatusSchema = z3.object({
|
|
|
345
347
|
link_status: enumMandatory("Link Status", LinkStatus, "Active" /* Active */)
|
|
346
348
|
});
|
|
347
349
|
var GPSLiveTrackShareLinkQuerySchema = BaseQuerySchema.extend({
|
|
348
|
-
organisation_ids: multi_select_optional("
|
|
350
|
+
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
349
351
|
// ✅ Multi-selection -> UserOrganisation
|
|
350
|
-
vehicle_ids: multi_select_optional("
|
|
352
|
+
vehicle_ids: multi_select_optional("MasterVehicle"),
|
|
351
353
|
// ✅ Multi-selection -> MasterVehicle
|
|
352
|
-
trip_ids: multi_select_optional("Trip IDs"),
|
|
353
|
-
// ✅ Multi-selection -> Trip
|
|
354
354
|
link_type: enumArrayOptional("Link Type", LinkType, getAllEnums(LinkType)),
|
|
355
355
|
link_status: enumArrayOptional(
|
|
356
356
|
"Link Status",
|
|
357
357
|
LinkStatus,
|
|
358
358
|
getAllEnums(LinkStatus)
|
|
359
|
-
)
|
|
359
|
+
),
|
|
360
|
+
gps_live_track_share_link_ids: multi_select_optional("GPSLiveTrackShareLink")
|
|
361
|
+
// ✅ Multi-selection -> GPSLiveTrackShareLink
|
|
360
362
|
});
|
|
361
363
|
var toGPSLiveTrackShareLinkPayload = (data) => ({
|
|
362
364
|
organisation_id: data.organisation_id,
|
|
363
365
|
vehicle_id: data.vehicle_id,
|
|
364
366
|
link_type: data.link_type,
|
|
365
|
-
latitude: data.latitude,
|
|
366
|
-
longitude: data.longitude,
|
|
367
|
-
location: data.location || "",
|
|
368
367
|
expire_milliseconds: 0,
|
|
369
|
-
trip_id: data.trip_id || "",
|
|
370
368
|
link_status: data.link_status,
|
|
371
369
|
status: data.status,
|
|
372
|
-
|
|
370
|
+
GPSLiveTrackShareLinkNotification: []
|
|
373
371
|
});
|
|
374
372
|
var newGPSLiveTrackShareLinkPayload = () => ({
|
|
375
373
|
organisation_id: "",
|
|
376
374
|
vehicle_id: "",
|
|
377
375
|
link_type: "CurrentLocation" /* CurrentLocation */,
|
|
378
|
-
latitude: void 0,
|
|
379
|
-
longitude: void 0,
|
|
380
|
-
location: "",
|
|
381
376
|
expire_milliseconds: 0,
|
|
382
|
-
trip_id: "",
|
|
383
377
|
link_status: "Active" /* Active */,
|
|
384
378
|
status: "Active" /* Active */,
|
|
385
|
-
|
|
379
|
+
GPSLiveTrackShareLinkNotification: []
|
|
386
380
|
});
|
|
387
|
-
var
|
|
388
|
-
return apiPost(
|
|
389
|
-
ENDPOINTS.find,
|
|
390
|
-
data
|
|
391
|
-
);
|
|
381
|
+
var findGPSLiveTrackShareLink = async (data) => {
|
|
382
|
+
return apiPost(ENDPOINTS.find, data);
|
|
392
383
|
};
|
|
393
384
|
var createGPSLiveTrackShareLink = async (data) => {
|
|
394
385
|
return apiPost(ENDPOINTS.create, data);
|
|
395
386
|
};
|
|
396
|
-
var deleteGPSLiveTrackShareLink = async (id) => {
|
|
397
|
-
return apiDelete(ENDPOINTS.delete(id));
|
|
398
|
-
};
|
|
399
387
|
var extendGPSLiveTrackLinkTime = async (id, data) => {
|
|
400
|
-
return apiPatch(
|
|
401
|
-
ENDPOINTS.extend(id),
|
|
402
|
-
data
|
|
403
|
-
);
|
|
388
|
+
return apiPatch(ENDPOINTS.extend_live_track_link_time(id), data);
|
|
404
389
|
};
|
|
405
390
|
var updateGPSLiveTrackLinkStatus = async (id, data) => {
|
|
406
|
-
return apiPatch(
|
|
407
|
-
ENDPOINTS.updateLinkStatus(id),
|
|
408
|
-
data
|
|
409
|
-
);
|
|
391
|
+
return apiPatch(ENDPOINTS.update_live_track_link_status(id), data);
|
|
410
392
|
};
|
|
411
|
-
var
|
|
412
|
-
return
|
|
393
|
+
var deleteGPSLiveTrackShareLink = async (id) => {
|
|
394
|
+
return apiDelete(ENDPOINTS.delete(id));
|
|
413
395
|
};
|
|
414
|
-
var
|
|
415
|
-
return apiPost(
|
|
416
|
-
ENDPOINTS.createNotification,
|
|
417
|
-
data
|
|
418
|
-
);
|
|
396
|
+
var createGPSLiveTrackShareLinkNotification = async (data) => {
|
|
397
|
+
return apiPost(ENDPOINTS.create_notification, data);
|
|
419
398
|
};
|
|
420
399
|
export {
|
|
421
|
-
|
|
400
|
+
GPSLiveTrackShareLinkNotificationSchema,
|
|
422
401
|
GPSLiveTrackShareLinkQuerySchema,
|
|
423
402
|
GPSLiveTrackShareLinkSchema,
|
|
424
403
|
GPSLiveTrackShareLinkStatusSchema,
|
|
425
404
|
GPSLiveTrackShareLinkTimeSchema,
|
|
426
|
-
createGPSLiveTrackNotification,
|
|
427
405
|
createGPSLiveTrackShareLink,
|
|
406
|
+
createGPSLiveTrackShareLinkNotification,
|
|
428
407
|
deleteGPSLiveTrackShareLink,
|
|
429
408
|
extendGPSLiveTrackLinkTime,
|
|
430
|
-
|
|
409
|
+
findGPSLiveTrackShareLink,
|
|
431
410
|
newGPSLiveTrackShareLinkPayload,
|
|
432
411
|
toGPSLiveTrackShareLinkPayload,
|
|
433
|
-
updateGPSLiveTrackLinkStatus
|
|
434
|
-
updateGPSLiveTrackTripStatus
|
|
412
|
+
updateGPSLiveTrackLinkStatus
|
|
435
413
|
};
|