vms-nest-prisma-api-document 6.0.8 → 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 +89 -68
- 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 +1 -1
- package/dist/services/fleet/fuel_management/fleet_fuel_refill_service.d.ts +1 -1
- package/dist/services/fleet/fuel_management/fleet_fuel_removal_service.d.ts +13 -13
- 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/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_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 +1 -1
- 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 +1 -1
- 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/services/website/faq_service.d.ts +1 -1
- package/dist/services/website/static_pages_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-YM6HzaB8.d.ts → user_organisation_service-0KXI1FiI.d.ts} +17 -17
|
@@ -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
|
-
alert_id: string;
|
|
50
|
-
mobile_numbers: string;
|
|
51
|
-
emails: string;
|
|
52
|
-
status: Status;
|
|
53
|
-
organisation_id: string;
|
|
54
|
-
user_ids: string[];
|
|
55
58
|
notification_title: string;
|
|
56
59
|
notification_message: string;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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;
|
|
63
67
|
status: Status;
|
|
64
68
|
organisation_id: string;
|
|
69
|
+
user_id: string;
|
|
70
|
+
vehicle_id: string;
|
|
71
|
+
driver_id: string;
|
|
72
|
+
gps_geofence_id: string;
|
|
73
|
+
}, {
|
|
65
74
|
notification_title: string;
|
|
66
75
|
notification_message: string;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
76
|
+
status: Status;
|
|
77
|
+
organisation_id: string;
|
|
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,14 +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, {
|
|
132
|
+
module: Module.ABC[];
|
|
133
|
+
alert_type: AlertType.ABC[];
|
|
134
|
+
alert_sub_type: AlertSubType.ABC[];
|
|
115
135
|
status: Status[];
|
|
116
136
|
search: string;
|
|
117
137
|
paging: PAGING;
|
|
@@ -133,16 +153,18 @@ declare const NotificationQuerySchema: z.ZodObject<{
|
|
|
133
153
|
include_master_data: YesNo;
|
|
134
154
|
date_format_id: string;
|
|
135
155
|
time_zone_id: string;
|
|
136
|
-
organisation_ids: string[];
|
|
137
|
-
alert_ids: string[];
|
|
138
|
-
is_push_sent: YesNo[];
|
|
139
|
-
is_sms_sent: YesNo[];
|
|
140
|
-
is_whatsapp_sent: YesNo[];
|
|
141
|
-
is_email_sent: YesNo[];
|
|
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;
|
|
165
|
+
module?: Module.ABC[] | undefined;
|
|
166
|
+
alert_type?: AlertType.ABC[] | undefined;
|
|
167
|
+
alert_sub_type?: AlertSubType.ABC[] | undefined;
|
|
146
168
|
status?: Status[] | undefined;
|
|
147
169
|
search?: string | undefined;
|
|
148
170
|
paging?: PAGING | undefined;
|
|
@@ -162,20 +184,19 @@ declare const NotificationQuerySchema: z.ZodObject<{
|
|
|
162
184
|
direction: OrderBy;
|
|
163
185
|
}[] | undefined;
|
|
164
186
|
include_master_data?: YesNo | undefined;
|
|
165
|
-
organisation_ids?: string[] | undefined;
|
|
166
|
-
alert_ids?: string[] | undefined;
|
|
167
|
-
is_push_sent?: YesNo[] | undefined;
|
|
168
|
-
is_sms_sent?: YesNo[] | undefined;
|
|
169
|
-
is_whatsapp_sent?: YesNo[] | undefined;
|
|
170
|
-
is_email_sent?: YesNo[] | 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';
|
|
@@ -2,7 +2,7 @@ import { YesNo, PaymentMode, PaymentStatus, RefillMethod, RefillEntrySource, GPS
|
|
|
2
2
|
import { FBR, SBR, BR, AWSPresignedUrl } from '../../../core/BaseResponse.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { FilePresignedUrlDTO } from '../../../zod_utils/zod_base_schema.js';
|
|
5
|
-
import { U as UserOrganisation, a as User, M as MasterVehicle, b as MasterDriver, c as MasterDevice, d as MasterVehicleFuelType } from '../../../user_organisation_service-
|
|
5
|
+
import { U as UserOrganisation, a as User, M as MasterVehicle, b as MasterDriver, c as MasterDevice, d as MasterVehicleFuelType } from '../../../user_organisation_service-0KXI1FiI.js';
|
|
6
6
|
import { MasterMainLandmark } from '../../master/main/master_main_landmark_service.js';
|
|
7
7
|
import { MasterVehicleFuelUnit } from '../../master/vehicle/master_vehicle_fuel_unit_service.js';
|
|
8
8
|
import '../../master/main/master_main_sim_provider_service.js';
|
|
@@ -2,7 +2,7 @@ import { RefillEntrySource, GPSFuelApproveStatus, Status, FileType, PAGING, Load
|
|
|
2
2
|
import { FBR, SBR, BR, AWSPresignedUrl } from '../../../core/BaseResponse.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { FilePresignedUrlDTO } from '../../../zod_utils/zod_base_schema.js';
|
|
5
|
-
import { U as UserOrganisation, a as User, M as MasterVehicle, b as MasterDriver, c as MasterDevice, d as MasterVehicleFuelType } from '../../../user_organisation_service-
|
|
5
|
+
import { U as UserOrganisation, a as User, M as MasterVehicle, b as MasterDriver, c as MasterDevice, d as MasterVehicleFuelType } from '../../../user_organisation_service-0KXI1FiI.js';
|
|
6
6
|
import { MasterMainLandmark } from '../../master/main/master_main_landmark_service.js';
|
|
7
7
|
import { MasterVehicleFuelUnit } from '../../master/vehicle/master_vehicle_fuel_unit_service.js';
|
|
8
8
|
import { MasterVehicleFuelRemovalReason } from '../../master/vehicle/master_vehicle_fuel_removal_reason_service.js';
|
|
@@ -12,9 +12,9 @@ interface FleetFuelRemoval extends Record<string, unknown> {
|
|
|
12
12
|
fleet_fuel_removal_id: string;
|
|
13
13
|
before_removal_quantity: number;
|
|
14
14
|
after_removal_quantity: number;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
removal_quantity: number;
|
|
16
|
+
verified_removal_quantity: number;
|
|
17
|
+
diff_removal_quantity: number;
|
|
18
18
|
odometer_reading?: number;
|
|
19
19
|
date_time: string;
|
|
20
20
|
date_time_f?: string;
|
|
@@ -127,9 +127,9 @@ declare const FleetFuelRemovalSchema: z.ZodObject<{
|
|
|
127
127
|
fuel_removal_reason_id: z.ZodEffects<z.ZodString, string, string>;
|
|
128
128
|
before_removal_quantity: z.ZodEffects<z.ZodDefault<z.ZodNumber>, number, unknown>;
|
|
129
129
|
after_removal_quantity: z.ZodEffects<z.ZodDefault<z.ZodNumber>, number, unknown>;
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
removal_quantity: z.ZodEffects<z.ZodDefault<z.ZodNumber>, number, unknown>;
|
|
131
|
+
verified_removal_quantity: z.ZodEffects<z.ZodDefault<z.ZodNumber>, number, unknown>;
|
|
132
|
+
diff_removal_quantity: z.ZodOptional<z.ZodEffects<z.ZodDefault<z.ZodNumber>, number, unknown>>;
|
|
133
133
|
odometer_reading: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
134
134
|
date_time: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
135
135
|
removal_details: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
@@ -200,8 +200,8 @@ declare const FleetFuelRemovalSchema: z.ZodObject<{
|
|
|
200
200
|
fuel_removal_reason_id: string;
|
|
201
201
|
before_removal_quantity: number;
|
|
202
202
|
after_removal_quantity: number;
|
|
203
|
-
|
|
204
|
-
|
|
203
|
+
removal_quantity: number;
|
|
204
|
+
verified_removal_quantity: number;
|
|
205
205
|
removal_details: string;
|
|
206
206
|
removal_files: {
|
|
207
207
|
status: Status;
|
|
@@ -219,7 +219,7 @@ declare const FleetFuelRemovalSchema: z.ZodObject<{
|
|
|
219
219
|
longitude?: number | undefined;
|
|
220
220
|
cost_per_unit?: number | undefined;
|
|
221
221
|
total_cost?: number | undefined;
|
|
222
|
-
|
|
222
|
+
diff_removal_quantity?: number | undefined;
|
|
223
223
|
}, {
|
|
224
224
|
status: Status;
|
|
225
225
|
organisation_id: string;
|
|
@@ -245,9 +245,9 @@ declare const FleetFuelRemovalSchema: z.ZodObject<{
|
|
|
245
245
|
source_notes?: string | undefined;
|
|
246
246
|
before_removal_quantity?: unknown;
|
|
247
247
|
after_removal_quantity?: unknown;
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
248
|
+
removal_quantity?: unknown;
|
|
249
|
+
verified_removal_quantity?: unknown;
|
|
250
|
+
diff_removal_quantity?: unknown;
|
|
251
251
|
removal_details?: string | undefined;
|
|
252
252
|
removal_files?: {
|
|
253
253
|
status: Status;
|
|
@@ -364,9 +364,9 @@ var FleetFuelRemovalSchema = z3.object({
|
|
|
364
364
|
// Removal Quantity
|
|
365
365
|
before_removal_quantity: doubleMandatory("Before Remove Quantity"),
|
|
366
366
|
after_removal_quantity: doubleMandatory("After Remove Quantity"),
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
367
|
+
removal_quantity: doubleMandatory("Removal Quantity"),
|
|
368
|
+
verified_removal_quantity: doubleMandatory("Verified Removal Quantity"),
|
|
369
|
+
diff_removal_quantity: doubleOptional("Difference Removal Quantity"),
|
|
370
370
|
odometer_reading: numberOptional("Odometer Reading"),
|
|
371
371
|
// Event Time
|
|
372
372
|
date_time: dateMandatory("Date Time"),
|
|
@@ -453,9 +453,9 @@ var toFleetFuelRemovalPayload = (row) => ({
|
|
|
453
453
|
fuel_removal_reason_id: row.fuel_removal_reason_id || "",
|
|
454
454
|
before_removal_quantity: row.before_removal_quantity,
|
|
455
455
|
after_removal_quantity: row.after_removal_quantity,
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
456
|
+
removal_quantity: row.removal_quantity,
|
|
457
|
+
verified_removal_quantity: row.verified_removal_quantity,
|
|
458
|
+
diff_removal_quantity: row.diff_removal_quantity ?? 0,
|
|
459
459
|
odometer_reading: row.odometer_reading ?? 0,
|
|
460
460
|
date_time: row.date_time,
|
|
461
461
|
removal_details: row.removal_details || "",
|
|
@@ -499,9 +499,9 @@ var newFleetFuelRemovalPayload = () => ({
|
|
|
499
499
|
// Quantities
|
|
500
500
|
before_removal_quantity: 0,
|
|
501
501
|
after_removal_quantity: 0,
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
502
|
+
removal_quantity: 0,
|
|
503
|
+
verified_removal_quantity: 0,
|
|
504
|
+
diff_removal_quantity: 0,
|
|
505
505
|
odometer_reading: 0,
|
|
506
506
|
// Event Time
|
|
507
507
|
date_time: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GeofenceType, GeofencePurposeType, 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 } from '../../../../user_organisation_service-
|
|
4
|
+
import { U as UserOrganisation } 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
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GeofenceStatusType, 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-0KXI1FiI.js';
|
|
5
5
|
import { GPSGeofenceData } from './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';
|