vms-nest-prisma-api-document 6.0.9 → 6.0.10
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/services/account/bookmark_service.d.ts +3 -3
- package/dist/services/account/notification_service.d.ts +86 -65
- package/dist/services/account/notification_service.js +94 -71
- package/dist/services/account/ticket_service.d.ts +3 -3
- package/dist/services/fleet/fuel_management/fleet_fuel_daily_summary_service.d.ts +19 -19
- package/dist/services/fleet/fuel_management/fleet_fuel_refill_service.d.ts +41 -41
- package/dist/services/fleet/fuel_management/fleet_fuel_removal_service.d.ts +61 -61
- package/dist/services/fleet/fuel_management/fleet_fuel_removal_service.js +9 -9
- package/dist/services/gps/features/geofence/gps_geofence_data_service.d.ts +1 -1
- package/dist/services/gps/features/geofence/gps_geofence_transaction_service.d.ts +1 -1
- package/dist/services/gps/features/geofence/gps_geofence_transaction_summary_service.d.ts +1 -1
- package/dist/services/gps/features/geofence/trip_geofence_to_geofence_service.d.ts +1 -1
- package/dist/services/gps/features/gps_live_track_share_link_service.d.ts +1 -1
- package/dist/services/gps/features/gps_track_history_share_link_service.d.ts +1 -1
- package/dist/services/gps/reports/gps_reports_mongo_service.d.ts +43 -43
- 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_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 +6 -6
- package/dist/services/master/expense/master_vendor_document_type_service.d.ts +3 -3
- 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_industry_service.d.ts +1 -1
- package/dist/services/master/main/master_main_landmark_service.d.ts +7 -7
- 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 +5 -5
- 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 +4 -4
- 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/package.json +1 -1
- package/dist/services/account/alert_service.d.ts +0 -271
- package/dist/services/account/alert_service.js +0 -413
- package/dist/{user_organisation_service-BCKBv8_Z.d.ts → user_organisation_service-0KXI1FiI.d.ts} +19 -19
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MenuType, 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, a as User } from '../../user_organisation_service-
|
|
4
|
+
import { U as UserOrganisation, a as User } from '../../user_organisation_service-0KXI1FiI.js';
|
|
5
5
|
import '../../zod_utils/zod_base_schema.js';
|
|
6
6
|
import '../master/main/master_main_sim_provider_service.js';
|
|
7
7
|
|
|
@@ -106,7 +106,6 @@ declare const BookMarkQuerySchema: z.ZodObject<{
|
|
|
106
106
|
menu_type: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof MenuType>, "many">>>;
|
|
107
107
|
}, "strip", z.ZodTypeAny, {
|
|
108
108
|
status: Status[];
|
|
109
|
-
user_ids: string[];
|
|
110
109
|
search: string;
|
|
111
110
|
paging: PAGING;
|
|
112
111
|
page_count: number;
|
|
@@ -128,13 +127,13 @@ declare const BookMarkQuerySchema: z.ZodObject<{
|
|
|
128
127
|
date_format_id: string;
|
|
129
128
|
time_zone_id: string;
|
|
130
129
|
organisation_ids: string[];
|
|
130
|
+
user_ids: string[];
|
|
131
131
|
menu_type: MenuType[];
|
|
132
132
|
bookmark_ids: string[];
|
|
133
133
|
}, {
|
|
134
134
|
date_format_id: string;
|
|
135
135
|
time_zone_id: string;
|
|
136
136
|
status?: Status[] | undefined;
|
|
137
|
-
user_ids?: string[] | undefined;
|
|
138
137
|
search?: string | undefined;
|
|
139
138
|
paging?: PAGING | undefined;
|
|
140
139
|
page_count?: unknown;
|
|
@@ -154,6 +153,7 @@ declare const BookMarkQuerySchema: z.ZodObject<{
|
|
|
154
153
|
}[] | undefined;
|
|
155
154
|
include_master_data?: YesNo | undefined;
|
|
156
155
|
organisation_ids?: string[] | undefined;
|
|
156
|
+
user_ids?: string[] | undefined;
|
|
157
157
|
menu_type?: MenuType[] | undefined;
|
|
158
158
|
bookmark_ids?: string[] | undefined;
|
|
159
159
|
}>;
|
|
@@ -1,76 +1,91 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Module, AlertType, AlertSubType, 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 {
|
|
5
|
-
import {
|
|
4
|
+
import { U as UserOrganisation, a as User, M as MasterVehicle, b as MasterDriver } from '../../user_organisation_service-0KXI1FiI.js';
|
|
5
|
+
import { GPSGeofenceData } from '../gps/features/geofence/gps_geofence_data_service.js';
|
|
6
6
|
import '../../zod_utils/zod_base_schema.js';
|
|
7
7
|
import '../master/main/master_main_sim_provider_service.js';
|
|
8
8
|
|
|
9
9
|
interface Notification extends Record<string, unknown> {
|
|
10
10
|
notification_id: string;
|
|
11
|
+
module: Module;
|
|
12
|
+
alert_type: AlertType;
|
|
13
|
+
alert_sub_type: AlertSubType;
|
|
11
14
|
notification_title: string;
|
|
12
15
|
notification_message: string;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
notification_html_message: string;
|
|
17
|
+
notification_key_1?: string;
|
|
18
|
+
notification_key_2?: string;
|
|
19
|
+
notification_key_3?: string;
|
|
20
|
+
notification_key_4?: string;
|
|
21
|
+
notification_key_5?: string;
|
|
22
|
+
notification_key_6?: string;
|
|
19
23
|
status: Status;
|
|
20
24
|
added_date_time: string;
|
|
21
25
|
modified_date_time: string;
|
|
22
26
|
organisation_id: string;
|
|
23
|
-
UserOrganisation
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
UserOrganisation: UserOrganisation;
|
|
28
|
+
user_id?: string;
|
|
29
|
+
User?: User | null;
|
|
30
|
+
user_details?: string;
|
|
31
|
+
vehicle_id?: string;
|
|
32
|
+
MasterVehicle?: MasterVehicle | null;
|
|
33
|
+
vehicle_number?: string;
|
|
34
|
+
vehicle_type?: string;
|
|
35
|
+
driver_id?: string;
|
|
36
|
+
MasterDriver?: MasterDriver | null;
|
|
37
|
+
driver_details?: string;
|
|
38
|
+
gps_geofence_id?: string;
|
|
39
|
+
GPSGeofenceData?: GPSGeofenceData | null;
|
|
34
40
|
}
|
|
35
41
|
declare const NotificationSchema: z.ZodObject<{
|
|
42
|
+
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
43
|
+
user_id: z.ZodEffects<z.ZodString, string, string>;
|
|
44
|
+
vehicle_id: z.ZodEffects<z.ZodString, string, string>;
|
|
45
|
+
driver_id: z.ZodEffects<z.ZodString, string, string>;
|
|
46
|
+
gps_geofence_id: z.ZodEffects<z.ZodString, string, string>;
|
|
36
47
|
notification_title: z.ZodEffects<z.ZodString, string, string>;
|
|
37
48
|
notification_message: z.ZodEffects<z.ZodString, string, string>;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
46
|
-
user_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
49
|
+
notification_html_message: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
50
|
+
notification_key_1: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
51
|
+
notification_key_2: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
52
|
+
notification_key_3: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
53
|
+
notification_key_4: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
54
|
+
notification_key_5: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
55
|
+
notification_key_6: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
47
56
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
48
57
|
}, "strip", z.ZodTypeAny, {
|
|
49
58
|
notification_title: string;
|
|
50
59
|
notification_message: string;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
notification_html_message: string;
|
|
61
|
+
notification_key_1: string;
|
|
62
|
+
notification_key_2: string;
|
|
63
|
+
notification_key_3: string;
|
|
64
|
+
notification_key_4: string;
|
|
65
|
+
notification_key_5: string;
|
|
66
|
+
notification_key_6: string;
|
|
57
67
|
status: Status;
|
|
58
68
|
organisation_id: string;
|
|
59
|
-
|
|
60
|
-
|
|
69
|
+
user_id: string;
|
|
70
|
+
vehicle_id: string;
|
|
71
|
+
driver_id: string;
|
|
72
|
+
gps_geofence_id: string;
|
|
61
73
|
}, {
|
|
62
74
|
notification_title: string;
|
|
63
75
|
notification_message: string;
|
|
64
76
|
status: Status;
|
|
65
77
|
organisation_id: string;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
78
|
+
user_id: string;
|
|
79
|
+
vehicle_id: string;
|
|
80
|
+
driver_id: string;
|
|
81
|
+
gps_geofence_id: string;
|
|
82
|
+
notification_html_message?: string | undefined;
|
|
83
|
+
notification_key_1?: string | undefined;
|
|
84
|
+
notification_key_2?: string | undefined;
|
|
85
|
+
notification_key_3?: string | undefined;
|
|
86
|
+
notification_key_4?: string | undefined;
|
|
87
|
+
notification_key_5?: string | undefined;
|
|
88
|
+
notification_key_6?: string | undefined;
|
|
74
89
|
}>;
|
|
75
90
|
type NotificationDTO = z.infer<typeof NotificationSchema>;
|
|
76
91
|
declare const NotificationQuerySchema: z.ZodObject<{
|
|
@@ -104,18 +119,19 @@ declare const NotificationQuerySchema: z.ZodObject<{
|
|
|
104
119
|
date_format_id: z.ZodEffects<z.ZodString, string, string>;
|
|
105
120
|
time_zone_id: z.ZodEffects<z.ZodString, string, string>;
|
|
106
121
|
} & {
|
|
107
|
-
alert_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
108
|
-
organisation_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
109
122
|
notification_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
123
|
+
organisation_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
124
|
+
user_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
125
|
+
vehicle_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
126
|
+
driver_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
127
|
+
gps_geofence_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
128
|
+
module: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Module>, "many">>>;
|
|
129
|
+
alert_type: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof AlertType>, "many">>>;
|
|
130
|
+
alert_sub_type: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof AlertSubType>, "many">>>;
|
|
114
131
|
}, "strip", z.ZodTypeAny, {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
is_email_sent: YesNo[];
|
|
132
|
+
module: Module.ABC[];
|
|
133
|
+
alert_type: AlertType.ABC[];
|
|
134
|
+
alert_sub_type: AlertSubType.ABC[];
|
|
119
135
|
status: Status[];
|
|
120
136
|
search: string;
|
|
121
137
|
paging: PAGING;
|
|
@@ -137,16 +153,18 @@ declare const NotificationQuerySchema: z.ZodObject<{
|
|
|
137
153
|
include_master_data: YesNo;
|
|
138
154
|
date_format_id: string;
|
|
139
155
|
time_zone_id: string;
|
|
140
|
-
alert_ids: string[];
|
|
141
|
-
organisation_ids: string[];
|
|
142
156
|
notification_ids: string[];
|
|
157
|
+
organisation_ids: string[];
|
|
158
|
+
user_ids: string[];
|
|
159
|
+
vehicle_ids: string[];
|
|
160
|
+
driver_ids: string[];
|
|
161
|
+
gps_geofence_ids: string[];
|
|
143
162
|
}, {
|
|
144
163
|
date_format_id: string;
|
|
145
164
|
time_zone_id: string;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
is_email_sent?: YesNo[] | undefined;
|
|
165
|
+
module?: Module.ABC[] | undefined;
|
|
166
|
+
alert_type?: AlertType.ABC[] | undefined;
|
|
167
|
+
alert_sub_type?: AlertSubType.ABC[] | undefined;
|
|
150
168
|
status?: Status[] | undefined;
|
|
151
169
|
search?: string | undefined;
|
|
152
170
|
paging?: PAGING | undefined;
|
|
@@ -166,16 +184,19 @@ declare const NotificationQuerySchema: z.ZodObject<{
|
|
|
166
184
|
direction: OrderBy;
|
|
167
185
|
}[] | undefined;
|
|
168
186
|
include_master_data?: YesNo | undefined;
|
|
169
|
-
alert_ids?: string[] | undefined;
|
|
170
|
-
organisation_ids?: string[] | undefined;
|
|
171
187
|
notification_ids?: string[] | undefined;
|
|
188
|
+
organisation_ids?: string[] | undefined;
|
|
189
|
+
user_ids?: string[] | undefined;
|
|
190
|
+
vehicle_ids?: string[] | undefined;
|
|
191
|
+
driver_ids?: string[] | undefined;
|
|
192
|
+
gps_geofence_ids?: string[] | undefined;
|
|
172
193
|
}>;
|
|
173
194
|
type NotificationQueryDTO = z.infer<typeof NotificationQuerySchema>;
|
|
174
|
-
declare const toNotificationPayload: (
|
|
195
|
+
declare const toNotificationPayload: (n: Notification) => NotificationDTO;
|
|
175
196
|
declare const newNotificationPayload: () => NotificationDTO;
|
|
176
197
|
declare const findNotifications: (data: NotificationQueryDTO) => Promise<FBR<Notification[]>>;
|
|
177
198
|
declare const createNotification: (data: NotificationDTO) => Promise<SBR>;
|
|
178
199
|
declare const updateNotification: (id: string, data: NotificationDTO) => Promise<SBR>;
|
|
179
200
|
declare const deleteNotification: (id: string) => Promise<SBR>;
|
|
180
201
|
|
|
181
|
-
export { type Notification, type NotificationDTO, type NotificationQueryDTO, NotificationQuerySchema, NotificationSchema,
|
|
202
|
+
export { type Notification, type NotificationDTO, type NotificationQueryDTO, NotificationQuerySchema, NotificationSchema, createNotification, deleteNotification, findNotifications, newNotificationPayload, toNotificationPayload, updateNotification };
|
|
@@ -175,11 +175,23 @@ var FileType = /* @__PURE__ */ ((FileType2) => {
|
|
|
175
175
|
FileType2["PDF"] = "PDF";
|
|
176
176
|
return FileType2;
|
|
177
177
|
})(FileType || {});
|
|
178
|
-
var YesNo = /* @__PURE__ */ ((
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
return
|
|
178
|
+
var YesNo = /* @__PURE__ */ ((YesNo3) => {
|
|
179
|
+
YesNo3["Yes"] = "Yes";
|
|
180
|
+
YesNo3["No"] = "No";
|
|
181
|
+
return YesNo3;
|
|
182
182
|
})(YesNo || {});
|
|
183
|
+
var Module = /* @__PURE__ */ ((Module2) => {
|
|
184
|
+
Module2["ABC"] = "ABC";
|
|
185
|
+
return Module2;
|
|
186
|
+
})(Module || {});
|
|
187
|
+
var AlertType = /* @__PURE__ */ ((AlertType2) => {
|
|
188
|
+
AlertType2["ABC"] = "ABC";
|
|
189
|
+
return AlertType2;
|
|
190
|
+
})(AlertType || {});
|
|
191
|
+
var AlertSubType = /* @__PURE__ */ ((AlertSubType2) => {
|
|
192
|
+
AlertSubType2["ABC"] = "ABC";
|
|
193
|
+
return AlertSubType2;
|
|
194
|
+
})(AlertSubType || {});
|
|
183
195
|
|
|
184
196
|
// src/zod_utils/zod_base_schema.ts
|
|
185
197
|
var OrderBySchema = z2.array(
|
|
@@ -237,89 +249,100 @@ var ENDPOINTS = {
|
|
|
237
249
|
delete: (id) => `${URL}/${id}`
|
|
238
250
|
};
|
|
239
251
|
var NotificationSchema = z3.object({
|
|
252
|
+
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
253
|
+
// ✅ Single-Selection -> UserOrganisation
|
|
254
|
+
user_id: single_select_optional("User"),
|
|
255
|
+
// ✅ Single-Selection -> User
|
|
256
|
+
vehicle_id: single_select_optional("MasterVehicle"),
|
|
257
|
+
// ✅ Single-Selection -> MasterVehicle
|
|
258
|
+
driver_id: single_select_optional("MasterDriver"),
|
|
259
|
+
// ✅ Single-Selection -> MasterDriver
|
|
260
|
+
gps_geofence_id: single_select_optional("GPSGeofenceData"),
|
|
261
|
+
// ✅ Single-Selection -> GPSGeofenceData
|
|
240
262
|
notification_title: stringMandatory("Notification Title", 3, 100),
|
|
241
263
|
notification_message: stringMandatory("Notification Message", 3, 500),
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
264
|
+
notification_html_message: stringOptional(
|
|
265
|
+
"Notification HTML Message",
|
|
266
|
+
0,
|
|
267
|
+
500
|
|
268
|
+
),
|
|
269
|
+
notification_key_1: stringOptional("Notification Key 1", 0, 100),
|
|
270
|
+
notification_key_2: stringOptional("Notification Key 2", 0, 100),
|
|
271
|
+
notification_key_3: stringOptional("Notification Key 3", 0, 100),
|
|
272
|
+
notification_key_4: stringOptional("Notification Key 4", 0, 100),
|
|
273
|
+
notification_key_5: stringOptional("Notification Key 5", 0, 100),
|
|
274
|
+
notification_key_6: stringOptional("Notification Key 6", 0, 100),
|
|
251
275
|
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
252
276
|
});
|
|
253
277
|
var NotificationQuerySchema = BaseQuerySchema.extend({
|
|
254
|
-
alert_ids: multi_select_optional("Alert"),
|
|
255
|
-
organisation_ids: multi_select_optional("Organisation"),
|
|
256
278
|
notification_ids: multi_select_optional("Notification"),
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
),
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
is_whatsapp_sent: enumArrayOptional(
|
|
274
|
-
"Is Whatsapp Sent",
|
|
275
|
-
YesNo,
|
|
276
|
-
getAllEnums(YesNo),
|
|
277
|
-
0,
|
|
278
|
-
10,
|
|
279
|
-
true
|
|
279
|
+
// ✅ Multi-selection -> Notification
|
|
280
|
+
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
281
|
+
// ✅ Multi-Selection -> UserOrganisation
|
|
282
|
+
user_ids: multi_select_optional("User"),
|
|
283
|
+
// ✅ Multi-selection -> User
|
|
284
|
+
vehicle_ids: multi_select_optional("MasterVehicle"),
|
|
285
|
+
// ✅ Multi-selection -> MasterVehicle
|
|
286
|
+
driver_ids: multi_select_optional("MasterDriver"),
|
|
287
|
+
// ✅ Multi-selection -> MasterDriver
|
|
288
|
+
gps_geofence_ids: multi_select_optional("GPSGeofenceData"),
|
|
289
|
+
// ✅ Multi-selection -> GPSGeofenceData
|
|
290
|
+
module: enumArrayOptional("Module", Module, getAllEnums(Module)),
|
|
291
|
+
alert_type: enumArrayOptional(
|
|
292
|
+
"Alert Type",
|
|
293
|
+
AlertType,
|
|
294
|
+
getAllEnums(AlertType)
|
|
280
295
|
),
|
|
281
|
-
|
|
282
|
-
"
|
|
283
|
-
|
|
284
|
-
getAllEnums(
|
|
285
|
-
0,
|
|
286
|
-
10,
|
|
287
|
-
true
|
|
296
|
+
alert_sub_type: enumArrayOptional(
|
|
297
|
+
"Alert Sub Type",
|
|
298
|
+
AlertSubType,
|
|
299
|
+
getAllEnums(AlertSubType)
|
|
288
300
|
)
|
|
289
301
|
});
|
|
290
|
-
var toNotificationPayload = (
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
302
|
+
var toNotificationPayload = (n) => ({
|
|
303
|
+
// relations (single-selects)
|
|
304
|
+
organisation_id: n.organisation_id,
|
|
305
|
+
user_id: n.user_id ?? "",
|
|
306
|
+
vehicle_id: n.vehicle_id ?? "",
|
|
307
|
+
driver_id: n.driver_id ?? "",
|
|
308
|
+
gps_geofence_id: n.gps_geofence_id ?? "",
|
|
309
|
+
// content
|
|
310
|
+
notification_title: n.notification_title,
|
|
311
|
+
notification_message: n.notification_message,
|
|
312
|
+
notification_html_message: n.notification_html_message ?? "",
|
|
313
|
+
// keys
|
|
314
|
+
notification_key_1: n.notification_key_1 ?? "",
|
|
315
|
+
notification_key_2: n.notification_key_2 ?? "",
|
|
316
|
+
notification_key_3: n.notification_key_3 ?? "",
|
|
317
|
+
notification_key_4: n.notification_key_4 ?? "",
|
|
318
|
+
notification_key_5: n.notification_key_5 ?? "",
|
|
319
|
+
notification_key_6: n.notification_key_6 ?? "",
|
|
320
|
+
// metadata
|
|
321
|
+
status: n.status
|
|
303
322
|
});
|
|
304
323
|
var newNotificationPayload = () => ({
|
|
324
|
+
// relations (single-selects)
|
|
325
|
+
organisation_id: "",
|
|
326
|
+
user_id: "",
|
|
327
|
+
vehicle_id: "",
|
|
328
|
+
driver_id: "",
|
|
329
|
+
gps_geofence_id: "",
|
|
330
|
+
// content
|
|
305
331
|
notification_title: "",
|
|
306
332
|
notification_message: "",
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
333
|
+
notification_html_message: "",
|
|
334
|
+
// keys
|
|
335
|
+
notification_key_1: "",
|
|
336
|
+
notification_key_2: "",
|
|
337
|
+
notification_key_3: "",
|
|
338
|
+
notification_key_4: "",
|
|
339
|
+
notification_key_5: "",
|
|
340
|
+
notification_key_6: "",
|
|
341
|
+
// metadata
|
|
316
342
|
status: "Active" /* Active */
|
|
317
343
|
});
|
|
318
344
|
var findNotifications = async (data) => {
|
|
319
|
-
return apiPost(
|
|
320
|
-
ENDPOINTS.find,
|
|
321
|
-
data
|
|
322
|
-
);
|
|
345
|
+
return apiPost(ENDPOINTS.find, data);
|
|
323
346
|
};
|
|
324
347
|
var createNotification = async (data) => {
|
|
325
348
|
return apiPost(ENDPOINTS.create, data);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FileType, Status, TicketStatus, 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, a as User } from '../../user_organisation_service-
|
|
4
|
+
import { U as UserOrganisation, a as User } from '../../user_organisation_service-0KXI1FiI.js';
|
|
5
5
|
import { UserAdmin } from '../main/users/user_admin_service.js';
|
|
6
6
|
import '../../zod_utils/zod_base_schema.js';
|
|
7
7
|
import '../master/main/master_main_sim_provider_service.js';
|
|
@@ -191,7 +191,6 @@ declare const TicketQuerySchema: z.ZodObject<{
|
|
|
191
191
|
ticket_status: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof TicketStatus>, "many">>>;
|
|
192
192
|
}, "strip", z.ZodTypeAny, {
|
|
193
193
|
status: Status[];
|
|
194
|
-
user_ids: string[];
|
|
195
194
|
search: string;
|
|
196
195
|
paging: PAGING;
|
|
197
196
|
page_count: number;
|
|
@@ -213,6 +212,7 @@ declare const TicketQuerySchema: z.ZodObject<{
|
|
|
213
212
|
date_format_id: string;
|
|
214
213
|
time_zone_id: string;
|
|
215
214
|
organisation_ids: string[];
|
|
215
|
+
user_ids: string[];
|
|
216
216
|
admin_ids: string[];
|
|
217
217
|
ticket_status: TicketStatus[];
|
|
218
218
|
ticket_ids: string[];
|
|
@@ -220,7 +220,6 @@ declare const TicketQuerySchema: z.ZodObject<{
|
|
|
220
220
|
date_format_id: string;
|
|
221
221
|
time_zone_id: string;
|
|
222
222
|
status?: Status[] | undefined;
|
|
223
|
-
user_ids?: string[] | undefined;
|
|
224
223
|
search?: string | undefined;
|
|
225
224
|
paging?: PAGING | undefined;
|
|
226
225
|
page_count?: unknown;
|
|
@@ -240,6 +239,7 @@ declare const TicketQuerySchema: z.ZodObject<{
|
|
|
240
239
|
}[] | undefined;
|
|
241
240
|
include_master_data?: YesNo | undefined;
|
|
242
241
|
organisation_ids?: string[] | undefined;
|
|
242
|
+
user_ids?: string[] | undefined;
|
|
243
243
|
admin_ids?: string[] | undefined;
|
|
244
244
|
ticket_status?: TicketStatus[] | undefined;
|
|
245
245
|
ticket_ids?: string[] | undefined;
|
|
@@ -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, a as User, M as MasterVehicle, b as MasterDriver, c as MasterDevice } from '../../../user_organisation_service-
|
|
4
|
+
import { U as UserOrganisation, a as User, M as MasterVehicle, b as MasterDriver, c as MasterDevice } from '../../../user_organisation_service-0KXI1FiI.js';
|
|
5
5
|
import { FuelConsumptionMonthly } from '../../gps/reports/gps_models/FuelConsumptionMonthly.js';
|
|
6
6
|
import '../../../zod_utils/zod_base_schema.js';
|
|
7
7
|
import '../../master/main/master_main_sim_provider_service.js';
|
|
@@ -61,36 +61,36 @@ declare const FleetFuelDailySummarySchema: z.ZodObject<{
|
|
|
61
61
|
liters_per_100km: z.ZodEffects<z.ZodDefault<z.ZodNumber>, number, unknown>;
|
|
62
62
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
63
63
|
}, "strip", z.ZodTypeAny, {
|
|
64
|
-
status: Status;
|
|
65
|
-
organisation_id: string;
|
|
66
|
-
user_id: string;
|
|
67
|
-
vehicle_id: string;
|
|
68
|
-
driver_id: string;
|
|
69
|
-
device_id: string;
|
|
70
64
|
date: string;
|
|
65
|
+
start_fuel_liters: number;
|
|
66
|
+
end_fuel_liters: number;
|
|
71
67
|
total_km: number;
|
|
72
68
|
consumed_fuel_liters: number;
|
|
73
69
|
refills_count: number;
|
|
74
|
-
start_fuel_liters: number;
|
|
75
|
-
end_fuel_liters: number;
|
|
76
70
|
refill_liters: number;
|
|
77
71
|
removals_count: number;
|
|
78
72
|
removal_liters: number;
|
|
79
73
|
mileage_kmpl: number;
|
|
80
74
|
liters_per_100km: number;
|
|
81
|
-
}, {
|
|
82
75
|
status: Status;
|
|
83
76
|
organisation_id: string;
|
|
84
77
|
user_id: string;
|
|
85
78
|
vehicle_id: string;
|
|
86
79
|
driver_id: string;
|
|
87
80
|
device_id: string;
|
|
81
|
+
}, {
|
|
88
82
|
date: string;
|
|
83
|
+
status: Status;
|
|
84
|
+
organisation_id: string;
|
|
85
|
+
user_id: string;
|
|
86
|
+
vehicle_id: string;
|
|
87
|
+
driver_id: string;
|
|
88
|
+
device_id: string;
|
|
89
|
+
start_fuel_liters?: unknown;
|
|
90
|
+
end_fuel_liters?: unknown;
|
|
89
91
|
total_km?: unknown;
|
|
90
92
|
consumed_fuel_liters?: unknown;
|
|
91
93
|
refills_count?: unknown;
|
|
92
|
-
start_fuel_liters?: unknown;
|
|
93
|
-
end_fuel_liters?: unknown;
|
|
94
94
|
refill_liters?: unknown;
|
|
95
95
|
removals_count?: unknown;
|
|
96
96
|
removal_liters?: unknown;
|
|
@@ -140,7 +140,6 @@ declare const FleetFuelDailySummaryQuerySchema: z.ZodObject<{
|
|
|
140
140
|
day_summary: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
141
141
|
}, "strip", z.ZodTypeAny, {
|
|
142
142
|
status: Status[];
|
|
143
|
-
time_zone_id: string;
|
|
144
143
|
search: string;
|
|
145
144
|
paging: PAGING;
|
|
146
145
|
page_count: number;
|
|
@@ -160,6 +159,7 @@ declare const FleetFuelDailySummaryQuerySchema: z.ZodObject<{
|
|
|
160
159
|
}[];
|
|
161
160
|
include_master_data: YesNo;
|
|
162
161
|
date_format_id: string;
|
|
162
|
+
time_zone_id: string;
|
|
163
163
|
organisation_ids: string[];
|
|
164
164
|
user_ids: string[];
|
|
165
165
|
vehicle_ids: string[];
|
|
@@ -170,8 +170,8 @@ declare const FleetFuelDailySummaryQuerySchema: z.ZodObject<{
|
|
|
170
170
|
vehicle_summary: YesNo;
|
|
171
171
|
day_summary: YesNo;
|
|
172
172
|
}, {
|
|
173
|
-
time_zone_id: string;
|
|
174
173
|
date_format_id: string;
|
|
174
|
+
time_zone_id: string;
|
|
175
175
|
from_date: string;
|
|
176
176
|
to_date: string;
|
|
177
177
|
status?: Status[] | undefined;
|
|
@@ -239,7 +239,6 @@ declare const FleetFuelDailyMonthlySummaryQuerySchema: z.ZodObject<{
|
|
|
239
239
|
to_date: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
240
240
|
}, "strip", z.ZodTypeAny, {
|
|
241
241
|
status: Status[];
|
|
242
|
-
time_zone_id: string;
|
|
243
242
|
search: string;
|
|
244
243
|
paging: PAGING;
|
|
245
244
|
page_count: number;
|
|
@@ -259,13 +258,14 @@ declare const FleetFuelDailyMonthlySummaryQuerySchema: z.ZodObject<{
|
|
|
259
258
|
}[];
|
|
260
259
|
include_master_data: YesNo;
|
|
261
260
|
date_format_id: string;
|
|
261
|
+
time_zone_id: string;
|
|
262
262
|
organisation_ids: string[];
|
|
263
263
|
vehicle_ids: string[];
|
|
264
264
|
from_date: string;
|
|
265
265
|
to_date: string;
|
|
266
266
|
}, {
|
|
267
|
-
time_zone_id: string;
|
|
268
267
|
date_format_id: string;
|
|
268
|
+
time_zone_id: string;
|
|
269
269
|
from_date: string;
|
|
270
270
|
to_date: string;
|
|
271
271
|
status?: Status[] | undefined;
|
|
@@ -325,9 +325,8 @@ declare const AllVehiclesFuelDailySummaryQuerySchema: z.ZodObject<{
|
|
|
325
325
|
date: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
326
326
|
organisation_utrack_id: z.ZodEffects<z.ZodString, string, string>;
|
|
327
327
|
}, "strip", z.ZodTypeAny, {
|
|
328
|
-
status: Status[];
|
|
329
328
|
date: string;
|
|
330
|
-
|
|
329
|
+
status: Status[];
|
|
331
330
|
search: string;
|
|
332
331
|
paging: PAGING;
|
|
333
332
|
page_count: number;
|
|
@@ -347,11 +346,12 @@ declare const AllVehiclesFuelDailySummaryQuerySchema: z.ZodObject<{
|
|
|
347
346
|
}[];
|
|
348
347
|
include_master_data: YesNo;
|
|
349
348
|
date_format_id: string;
|
|
349
|
+
time_zone_id: string;
|
|
350
350
|
organisation_utrack_id: string;
|
|
351
351
|
}, {
|
|
352
352
|
date: string;
|
|
353
|
-
time_zone_id: string;
|
|
354
353
|
date_format_id: string;
|
|
354
|
+
time_zone_id: string;
|
|
355
355
|
organisation_utrack_id: string;
|
|
356
356
|
status?: Status[] | undefined;
|
|
357
357
|
search?: string | undefined;
|