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,271 +0,0 @@
|
|
|
1
|
-
import { Module, SubModule, AlertType, AlertSubType, YesNo, Status, PAGING, LoadParents, LoadChild, LoadChildCount, OrderBy } from '../../core/Enums.js';
|
|
2
|
-
import { FBR, SBR } from '../../core/BaseResponse.js';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import { U as UserOrganisation, a as User, M as MasterVehicle, b as MasterDriver } from '../../user_organisation_service-BCKBv8_Z.js';
|
|
5
|
-
import '../../zod_utils/zod_base_schema.js';
|
|
6
|
-
import '../master/main/master_main_sim_provider_service.js';
|
|
7
|
-
|
|
8
|
-
interface Alert extends Record<string, unknown> {
|
|
9
|
-
alert_id: string;
|
|
10
|
-
module: Module;
|
|
11
|
-
sub_module: SubModule;
|
|
12
|
-
alert_type: AlertType;
|
|
13
|
-
alert_sub_type: AlertSubType;
|
|
14
|
-
alert_key_1?: string;
|
|
15
|
-
alert_key_2?: string;
|
|
16
|
-
alert_key_3?: string;
|
|
17
|
-
alert_key_4?: string;
|
|
18
|
-
is_edit?: YesNo;
|
|
19
|
-
is_push?: YesNo;
|
|
20
|
-
is_sms?: YesNo;
|
|
21
|
-
is_whatsapp?: YesNo;
|
|
22
|
-
is_email?: YesNo;
|
|
23
|
-
mobile_numbers?: string;
|
|
24
|
-
emails?: string;
|
|
25
|
-
all_vehicles?: YesNo;
|
|
26
|
-
all_trips?: YesNo;
|
|
27
|
-
all_geofences?: YesNo;
|
|
28
|
-
all_drivers?: YesNo;
|
|
29
|
-
status: Status;
|
|
30
|
-
added_date_time: string;
|
|
31
|
-
modified_date_time: string;
|
|
32
|
-
organisation_id: string;
|
|
33
|
-
UserOrganisation?: UserOrganisation;
|
|
34
|
-
user_id: string;
|
|
35
|
-
User?: User;
|
|
36
|
-
AlertUserLink?: AlertUserLink[];
|
|
37
|
-
AlertGeofenceLink?: AlertGeofenceLink[];
|
|
38
|
-
AlertVehicleLink?: AlertVehicleLink[];
|
|
39
|
-
AlertDriverLink?: AlertDriverLink[];
|
|
40
|
-
}
|
|
41
|
-
interface AlertUserLink extends Record<string, unknown> {
|
|
42
|
-
alert_user_link_id: string;
|
|
43
|
-
alert_id: string;
|
|
44
|
-
Alert?: Alert;
|
|
45
|
-
user_id: string;
|
|
46
|
-
User?: User;
|
|
47
|
-
}
|
|
48
|
-
interface AlertGeofenceLink extends Record<string, unknown> {
|
|
49
|
-
alert_geofence_link_id: string;
|
|
50
|
-
alert_id: string;
|
|
51
|
-
Alert?: Alert;
|
|
52
|
-
gps_geofence_id: string;
|
|
53
|
-
}
|
|
54
|
-
interface AlertVehicleLink extends Record<string, unknown> {
|
|
55
|
-
alert_vehicle_link_id: string;
|
|
56
|
-
alert_id: string;
|
|
57
|
-
Alert?: Alert;
|
|
58
|
-
vehicle_id: string;
|
|
59
|
-
MasterVehicle?: MasterVehicle;
|
|
60
|
-
}
|
|
61
|
-
interface AlertDriverLink extends Record<string, unknown> {
|
|
62
|
-
alert_driver_link_id: string;
|
|
63
|
-
alert_id: string;
|
|
64
|
-
Alert?: Alert;
|
|
65
|
-
driver_id: string;
|
|
66
|
-
MasterDriver?: MasterDriver;
|
|
67
|
-
}
|
|
68
|
-
declare const AlertSchema: z.ZodObject<{
|
|
69
|
-
module: z.ZodType<Module.ABC, z.ZodTypeDef, Module.ABC>;
|
|
70
|
-
sub_module: z.ZodType<SubModule.ABC, z.ZodTypeDef, SubModule.ABC>;
|
|
71
|
-
alert_type: z.ZodType<AlertType.ABC, z.ZodTypeDef, AlertType.ABC>;
|
|
72
|
-
alert_sub_type: z.ZodType<AlertSubType.ABC, z.ZodTypeDef, AlertSubType.ABC>;
|
|
73
|
-
alert_key_1: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
74
|
-
alert_key_2: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
75
|
-
alert_key_3: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
76
|
-
alert_key_4: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
77
|
-
is_edit: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
78
|
-
is_push: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
79
|
-
is_sms: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
80
|
-
is_whatsapp: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
81
|
-
is_email: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
82
|
-
mobile_numbers: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
83
|
-
emails: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
84
|
-
all_vehicles: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
85
|
-
all_trips: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
86
|
-
all_geofences: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
87
|
-
all_drivers: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
88
|
-
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
89
|
-
user_id: z.ZodEffects<z.ZodString, string, string>;
|
|
90
|
-
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
91
|
-
vehicle_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
92
|
-
user_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
93
|
-
driver_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
94
|
-
gps_geofence_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
95
|
-
}, "strip", z.ZodTypeAny, {
|
|
96
|
-
mobile_numbers: string;
|
|
97
|
-
emails: string;
|
|
98
|
-
status: Status;
|
|
99
|
-
organisation_id: string;
|
|
100
|
-
user_id: string;
|
|
101
|
-
user_ids: string[];
|
|
102
|
-
vehicle_ids: string[];
|
|
103
|
-
driver_ids: string[];
|
|
104
|
-
module: Module;
|
|
105
|
-
sub_module: SubModule;
|
|
106
|
-
alert_type: AlertType;
|
|
107
|
-
alert_sub_type: AlertSubType;
|
|
108
|
-
alert_key_1: string;
|
|
109
|
-
alert_key_2: string;
|
|
110
|
-
alert_key_3: string;
|
|
111
|
-
alert_key_4: string;
|
|
112
|
-
is_edit: YesNo;
|
|
113
|
-
is_push: YesNo;
|
|
114
|
-
is_sms: YesNo;
|
|
115
|
-
is_whatsapp: YesNo;
|
|
116
|
-
is_email: YesNo;
|
|
117
|
-
all_vehicles: YesNo;
|
|
118
|
-
all_trips: YesNo;
|
|
119
|
-
all_geofences: YesNo;
|
|
120
|
-
all_drivers: YesNo;
|
|
121
|
-
gps_geofence_ids: string[];
|
|
122
|
-
}, {
|
|
123
|
-
status: Status;
|
|
124
|
-
organisation_id: string;
|
|
125
|
-
user_id: string;
|
|
126
|
-
module: Module;
|
|
127
|
-
sub_module: SubModule;
|
|
128
|
-
alert_type: AlertType;
|
|
129
|
-
alert_sub_type: AlertSubType;
|
|
130
|
-
mobile_numbers?: string | undefined;
|
|
131
|
-
emails?: string | undefined;
|
|
132
|
-
user_ids?: string[] | undefined;
|
|
133
|
-
vehicle_ids?: string[] | undefined;
|
|
134
|
-
driver_ids?: string[] | undefined;
|
|
135
|
-
alert_key_1?: string | undefined;
|
|
136
|
-
alert_key_2?: string | undefined;
|
|
137
|
-
alert_key_3?: string | undefined;
|
|
138
|
-
alert_key_4?: string | undefined;
|
|
139
|
-
is_edit?: YesNo | undefined;
|
|
140
|
-
is_push?: YesNo | undefined;
|
|
141
|
-
is_sms?: YesNo | undefined;
|
|
142
|
-
is_whatsapp?: YesNo | undefined;
|
|
143
|
-
is_email?: YesNo | undefined;
|
|
144
|
-
all_vehicles?: YesNo | undefined;
|
|
145
|
-
all_trips?: YesNo | undefined;
|
|
146
|
-
all_geofences?: YesNo | undefined;
|
|
147
|
-
all_drivers?: YesNo | undefined;
|
|
148
|
-
gps_geofence_ids?: string[] | undefined;
|
|
149
|
-
}>;
|
|
150
|
-
type AlertDTO = z.infer<typeof AlertSchema>;
|
|
151
|
-
declare const AlertQuerySchema: z.ZodObject<{
|
|
152
|
-
search: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
153
|
-
status: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Status>, "many">>>;
|
|
154
|
-
paging: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof PAGING>>>;
|
|
155
|
-
page_count: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
156
|
-
page_index: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
157
|
-
load_parents: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadParents>>>;
|
|
158
|
-
load_parents_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
159
|
-
load_child: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadChild>>>;
|
|
160
|
-
load_child_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
161
|
-
load_child_count: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadChildCount>>>;
|
|
162
|
-
load_child_count_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
163
|
-
include_details: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
164
|
-
where_relations: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
165
|
-
order_by: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
166
|
-
name: z.ZodEffects<z.ZodString, string, string>;
|
|
167
|
-
field: z.ZodEffects<z.ZodString, string, string>;
|
|
168
|
-
direction: z.ZodType<OrderBy, z.ZodTypeDef, OrderBy>;
|
|
169
|
-
}, "strip", z.ZodTypeAny, {
|
|
170
|
-
name: string;
|
|
171
|
-
field: string;
|
|
172
|
-
direction: OrderBy;
|
|
173
|
-
}, {
|
|
174
|
-
name: string;
|
|
175
|
-
field: string;
|
|
176
|
-
direction: OrderBy;
|
|
177
|
-
}>, "many">>>;
|
|
178
|
-
include_master_data: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
179
|
-
date_format_id: z.ZodEffects<z.ZodString, string, string>;
|
|
180
|
-
time_zone_id: z.ZodEffects<z.ZodString, string, string>;
|
|
181
|
-
} & {
|
|
182
|
-
organisation_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
183
|
-
user_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
184
|
-
alert_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
185
|
-
module: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Module>, "many">>>;
|
|
186
|
-
sub_module: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof SubModule>, "many">>>;
|
|
187
|
-
alert_type: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof AlertType>, "many">>>;
|
|
188
|
-
alert_sub_type: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof AlertSubType>, "many">>>;
|
|
189
|
-
is_edit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof YesNo>, "many">>>;
|
|
190
|
-
is_push: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof YesNo>, "many">>>;
|
|
191
|
-
is_sms: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof YesNo>, "many">>>;
|
|
192
|
-
is_whatsapp: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof YesNo>, "many">>>;
|
|
193
|
-
is_email: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof YesNo>, "many">>>;
|
|
194
|
-
}, "strip", z.ZodTypeAny, {
|
|
195
|
-
status: Status[];
|
|
196
|
-
user_ids: string[];
|
|
197
|
-
search: string;
|
|
198
|
-
paging: PAGING;
|
|
199
|
-
page_count: number;
|
|
200
|
-
page_index: number;
|
|
201
|
-
load_parents: LoadParents;
|
|
202
|
-
load_parents_list: string[];
|
|
203
|
-
load_child: LoadChild;
|
|
204
|
-
load_child_list: string[];
|
|
205
|
-
load_child_count: LoadChildCount;
|
|
206
|
-
load_child_count_list: string[];
|
|
207
|
-
include_details: Record<string, any>;
|
|
208
|
-
where_relations: Record<string, any>;
|
|
209
|
-
order_by: {
|
|
210
|
-
name: string;
|
|
211
|
-
field: string;
|
|
212
|
-
direction: OrderBy;
|
|
213
|
-
}[];
|
|
214
|
-
include_master_data: YesNo;
|
|
215
|
-
date_format_id: string;
|
|
216
|
-
time_zone_id: string;
|
|
217
|
-
alert_ids: string[];
|
|
218
|
-
organisation_ids: string[];
|
|
219
|
-
module: Module.ABC[];
|
|
220
|
-
sub_module: SubModule.ABC[];
|
|
221
|
-
alert_type: AlertType.ABC[];
|
|
222
|
-
alert_sub_type: AlertSubType.ABC[];
|
|
223
|
-
is_edit: YesNo[];
|
|
224
|
-
is_push: YesNo[];
|
|
225
|
-
is_sms: YesNo[];
|
|
226
|
-
is_whatsapp: YesNo[];
|
|
227
|
-
is_email: YesNo[];
|
|
228
|
-
}, {
|
|
229
|
-
date_format_id: string;
|
|
230
|
-
time_zone_id: string;
|
|
231
|
-
status?: Status[] | undefined;
|
|
232
|
-
user_ids?: string[] | undefined;
|
|
233
|
-
search?: string | undefined;
|
|
234
|
-
paging?: PAGING | undefined;
|
|
235
|
-
page_count?: unknown;
|
|
236
|
-
page_index?: unknown;
|
|
237
|
-
load_parents?: LoadParents | undefined;
|
|
238
|
-
load_parents_list?: string[] | undefined;
|
|
239
|
-
load_child?: LoadChild | undefined;
|
|
240
|
-
load_child_list?: string[] | undefined;
|
|
241
|
-
load_child_count?: LoadChildCount | undefined;
|
|
242
|
-
load_child_count_list?: string[] | undefined;
|
|
243
|
-
include_details?: Record<string, any> | undefined;
|
|
244
|
-
where_relations?: Record<string, any> | undefined;
|
|
245
|
-
order_by?: {
|
|
246
|
-
name: string;
|
|
247
|
-
field: string;
|
|
248
|
-
direction: OrderBy;
|
|
249
|
-
}[] | undefined;
|
|
250
|
-
include_master_data?: YesNo | undefined;
|
|
251
|
-
alert_ids?: string[] | undefined;
|
|
252
|
-
organisation_ids?: string[] | undefined;
|
|
253
|
-
module?: Module.ABC[] | undefined;
|
|
254
|
-
sub_module?: SubModule.ABC[] | undefined;
|
|
255
|
-
alert_type?: AlertType.ABC[] | undefined;
|
|
256
|
-
alert_sub_type?: AlertSubType.ABC[] | undefined;
|
|
257
|
-
is_edit?: YesNo[] | undefined;
|
|
258
|
-
is_push?: YesNo[] | undefined;
|
|
259
|
-
is_sms?: YesNo[] | undefined;
|
|
260
|
-
is_whatsapp?: YesNo[] | undefined;
|
|
261
|
-
is_email?: YesNo[] | undefined;
|
|
262
|
-
}>;
|
|
263
|
-
type AlertQueryDTO = z.infer<typeof AlertQuerySchema>;
|
|
264
|
-
declare const toAlertPayload: (alert: Alert) => AlertDTO;
|
|
265
|
-
declare const newAlertPayload: () => AlertDTO;
|
|
266
|
-
declare const findAlerts: (data: AlertQueryDTO) => Promise<FBR<Alert[]>>;
|
|
267
|
-
declare const createAlert: (data: AlertDTO) => Promise<SBR>;
|
|
268
|
-
declare const updateAlert: (id: string, data: AlertDTO) => Promise<SBR>;
|
|
269
|
-
declare const deleteAlert: (id: string) => Promise<SBR>;
|
|
270
|
-
|
|
271
|
-
export { type Alert, type AlertDTO, type AlertDriverLink, type AlertGeofenceLink, type AlertQueryDTO, AlertQuerySchema, AlertSchema, type AlertUserLink, type AlertVehicleLink, createAlert, deleteAlert, findAlerts, newAlertPayload, toAlertPayload, updateAlert };
|
|
@@ -1,413 +0,0 @@
|
|
|
1
|
-
// src/core/sdk-config.ts
|
|
2
|
-
var KEY = "__vms_axios_instance__";
|
|
3
|
-
var getAxiosInstance = () => {
|
|
4
|
-
const instance = globalThis[KEY];
|
|
5
|
-
if (!instance) {
|
|
6
|
-
throw new Error("\u274C Axios instance not configured. Call setAxiosInstance() first.");
|
|
7
|
-
}
|
|
8
|
-
return instance;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
// src/core/apiCall.ts
|
|
12
|
-
var apiPost = async (url, data) => {
|
|
13
|
-
const response = await getAxiosInstance().post(url, data);
|
|
14
|
-
return response.data;
|
|
15
|
-
};
|
|
16
|
-
var apiPatch = async (url, data) => {
|
|
17
|
-
const response = await getAxiosInstance().patch(url, data);
|
|
18
|
-
return response.data;
|
|
19
|
-
};
|
|
20
|
-
var apiDelete = async (url) => {
|
|
21
|
-
const response = await getAxiosInstance().delete(url);
|
|
22
|
-
return response.data;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
// src/services/account/alert_service.ts
|
|
26
|
-
import { z as z3 } from "zod";
|
|
27
|
-
|
|
28
|
-
// src/zod_utils/zod_utils.ts
|
|
29
|
-
import { z } from "zod";
|
|
30
|
-
|
|
31
|
-
// src/core/BaseResponse.ts
|
|
32
|
-
var r_log = (data = {}) => {
|
|
33
|
-
return data;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
// src/zod_utils/zod_utils.ts
|
|
37
|
-
var handleNullOrUndefined = (value) => typeof value === "string" ? value : "";
|
|
38
|
-
var stringMandatory = (fieldName, min = 1, max = 100) => {
|
|
39
|
-
const schema = z.string().trim().min(min, `${fieldName} must be at least ${min} characters.`).max(max, `${fieldName} must be at most ${max} characters.`).nonempty(`${fieldName} is required.`).transform(handleNullOrUndefined);
|
|
40
|
-
return schema;
|
|
41
|
-
};
|
|
42
|
-
var stringOptional = (fieldName, min = 0, max = 255, defaultValue = "") => {
|
|
43
|
-
const schema = z.string().trim().min(min, `${fieldName} must be at least ${min} characters.`).max(max, `${fieldName} must be at most ${max} characters.`).transform(handleNullOrUndefined).default(defaultValue);
|
|
44
|
-
return schema;
|
|
45
|
-
};
|
|
46
|
-
var stringArrayOptional = (fieldName, min = 0, max = 100, defaultValue = [], unique = false) => {
|
|
47
|
-
const schema = z.array(z.string().trim(), {
|
|
48
|
-
invalid_type_error: `${fieldName} must be an array of strings.`
|
|
49
|
-
}).min(min, `${fieldName} must contain at least ${min} items.`).max(max, `${fieldName} must contain at most ${max} items.`);
|
|
50
|
-
if (unique) {
|
|
51
|
-
schema.refine(
|
|
52
|
-
(arr) => new Set(arr).size === arr.length,
|
|
53
|
-
`${fieldName} must contain unique values.`
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
return schema.optional().default(defaultValue);
|
|
57
|
-
};
|
|
58
|
-
var numberOptional = (fieldName, min = 0, max = 1e9, defaultValue = 0) => {
|
|
59
|
-
return z.preprocess(
|
|
60
|
-
(val) => typeof val === "string" && val.trim() !== "" ? Number(val) : val,
|
|
61
|
-
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)
|
|
62
|
-
);
|
|
63
|
-
};
|
|
64
|
-
var enumMandatory = (fieldName, enumType, defaultValue) => {
|
|
65
|
-
return z.union([
|
|
66
|
-
z.nativeEnum(enumType, {
|
|
67
|
-
invalid_type_error: `${fieldName} should be one of the following values: ${Object.values(
|
|
68
|
-
enumType
|
|
69
|
-
).join(", ")}.`
|
|
70
|
-
}),
|
|
71
|
-
z.string().refine((val) => Object.values(enumType).includes(val), {
|
|
72
|
-
message: `${fieldName} should be one of the following values: ${Object.values(
|
|
73
|
-
enumType
|
|
74
|
-
).join(", ")}.`
|
|
75
|
-
})
|
|
76
|
-
]).default(defaultValue).refine((val) => val !== "", {
|
|
77
|
-
message: `Please select ${fieldName}.`
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
|
-
var enumOptional = (fieldName, enumType, defaultValue) => {
|
|
81
|
-
return z.nativeEnum(enumType, {
|
|
82
|
-
invalid_type_error: `${fieldName} must be an array containing only the following values: ${Object.values(
|
|
83
|
-
enumType
|
|
84
|
-
).join(", ")}.`
|
|
85
|
-
}).optional().default(() => defaultValue);
|
|
86
|
-
};
|
|
87
|
-
var getAllEnums = (enumType) => {
|
|
88
|
-
return Object.values(enumType);
|
|
89
|
-
};
|
|
90
|
-
var enumArrayOptional = (fieldName, enumType, defaultValue = getAllEnums(enumType), min = 0, max = 100, unique = false) => {
|
|
91
|
-
const schema = z.array(z.nativeEnum(enumType), {
|
|
92
|
-
invalid_type_error: `${fieldName} must be an array containing only the following values: ${Object.values(
|
|
93
|
-
enumType
|
|
94
|
-
).join(", ")}.`
|
|
95
|
-
}).min(min, `${fieldName} must contain at least ${min} items.`).max(max, `${fieldName} must contain at most ${max} items.`);
|
|
96
|
-
if (unique) {
|
|
97
|
-
schema.refine(
|
|
98
|
-
(arr) => new Set(arr).size === arr.length,
|
|
99
|
-
`${fieldName} must contain unique values.`
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
return schema.optional().default(() => defaultValue);
|
|
103
|
-
};
|
|
104
|
-
var dynamicJsonSchema = (fieldName, defaultValue = {}) => z.record(z.any()).optional().default(() => defaultValue);
|
|
105
|
-
var single_select_mandatory = (fieldName) => {
|
|
106
|
-
const schema = z.string().trim().nonempty(`Please select ${fieldName}.`).transform(handleNullOrUndefined);
|
|
107
|
-
return schema;
|
|
108
|
-
};
|
|
109
|
-
var single_select_optional = (fieldName) => {
|
|
110
|
-
r_log(fieldName);
|
|
111
|
-
const schema = z.string().trim().transform(handleNullOrUndefined);
|
|
112
|
-
return schema;
|
|
113
|
-
};
|
|
114
|
-
var multi_select_optional = (fieldName, max = 1e3, defaultValue = []) => {
|
|
115
|
-
const schema = z.array(
|
|
116
|
-
z.string({
|
|
117
|
-
invalid_type_error: `${fieldName} must be an array of strings.`
|
|
118
|
-
})
|
|
119
|
-
).max(
|
|
120
|
-
max,
|
|
121
|
-
`Please select at most ${max} ${fieldName}${max > 1 ? "s" : ""}.`
|
|
122
|
-
);
|
|
123
|
-
return schema.optional().default(defaultValue);
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
// src/zod_utils/zod_base_schema.ts
|
|
127
|
-
import { z as z2 } from "zod";
|
|
128
|
-
|
|
129
|
-
// src/core/Enums.ts
|
|
130
|
-
var PAGING = /* @__PURE__ */ ((PAGING2) => {
|
|
131
|
-
PAGING2["Yes"] = "Yes";
|
|
132
|
-
PAGING2["No"] = "No";
|
|
133
|
-
return PAGING2;
|
|
134
|
-
})(PAGING || {});
|
|
135
|
-
var LoadParents = /* @__PURE__ */ ((LoadParents2) => {
|
|
136
|
-
LoadParents2["Yes"] = "Yes";
|
|
137
|
-
LoadParents2["No"] = "No";
|
|
138
|
-
LoadParents2["Custom"] = "Custom";
|
|
139
|
-
return LoadParents2;
|
|
140
|
-
})(LoadParents || {});
|
|
141
|
-
var LoadChild = /* @__PURE__ */ ((LoadChild2) => {
|
|
142
|
-
LoadChild2["No"] = "No";
|
|
143
|
-
LoadChild2["Yes"] = "Yes";
|
|
144
|
-
LoadChild2["Count"] = "Count";
|
|
145
|
-
LoadChild2["Custom"] = "Custom";
|
|
146
|
-
LoadChild2["Direct"] = "Direct";
|
|
147
|
-
return LoadChild2;
|
|
148
|
-
})(LoadChild || {});
|
|
149
|
-
var LoadChildCount = /* @__PURE__ */ ((LoadChildCount2) => {
|
|
150
|
-
LoadChildCount2["No"] = "No";
|
|
151
|
-
LoadChildCount2["Yes"] = "Yes";
|
|
152
|
-
LoadChildCount2["Custom"] = "Custom";
|
|
153
|
-
return LoadChildCount2;
|
|
154
|
-
})(LoadChildCount || {});
|
|
155
|
-
var OrderBy = /* @__PURE__ */ ((OrderBy2) => {
|
|
156
|
-
OrderBy2["asc"] = "asc";
|
|
157
|
-
OrderBy2["desc"] = "desc";
|
|
158
|
-
return OrderBy2;
|
|
159
|
-
})(OrderBy || {});
|
|
160
|
-
var LoginFrom = /* @__PURE__ */ ((LoginFrom2) => {
|
|
161
|
-
LoginFrom2["Web"] = "Web";
|
|
162
|
-
LoginFrom2["Android"] = "Android";
|
|
163
|
-
LoginFrom2["IPhone"] = "IPhone";
|
|
164
|
-
return LoginFrom2;
|
|
165
|
-
})(LoginFrom || {});
|
|
166
|
-
var Status = /* @__PURE__ */ ((Status2) => {
|
|
167
|
-
Status2["Active"] = "Active";
|
|
168
|
-
Status2["Inactive"] = "Inactive";
|
|
169
|
-
return Status2;
|
|
170
|
-
})(Status || {});
|
|
171
|
-
var FileType = /* @__PURE__ */ ((FileType2) => {
|
|
172
|
-
FileType2["NoFile"] = "NoFile";
|
|
173
|
-
FileType2["Image"] = "Image";
|
|
174
|
-
FileType2["Video"] = "Video";
|
|
175
|
-
FileType2["PDF"] = "PDF";
|
|
176
|
-
return FileType2;
|
|
177
|
-
})(FileType || {});
|
|
178
|
-
var YesNo = /* @__PURE__ */ ((YesNo2) => {
|
|
179
|
-
YesNo2["Yes"] = "Yes";
|
|
180
|
-
YesNo2["No"] = "No";
|
|
181
|
-
return YesNo2;
|
|
182
|
-
})(YesNo || {});
|
|
183
|
-
var Module = /* @__PURE__ */ ((Module2) => {
|
|
184
|
-
Module2["ABC"] = "ABC";
|
|
185
|
-
return Module2;
|
|
186
|
-
})(Module || {});
|
|
187
|
-
var SubModule = /* @__PURE__ */ ((SubModule2) => {
|
|
188
|
-
SubModule2["ABC"] = "ABC";
|
|
189
|
-
return SubModule2;
|
|
190
|
-
})(SubModule || {});
|
|
191
|
-
var AlertType = /* @__PURE__ */ ((AlertType2) => {
|
|
192
|
-
AlertType2["ABC"] = "ABC";
|
|
193
|
-
return AlertType2;
|
|
194
|
-
})(AlertType || {});
|
|
195
|
-
var AlertSubType = /* @__PURE__ */ ((AlertSubType2) => {
|
|
196
|
-
AlertSubType2["ABC"] = "ABC";
|
|
197
|
-
return AlertSubType2;
|
|
198
|
-
})(AlertSubType || {});
|
|
199
|
-
|
|
200
|
-
// src/zod_utils/zod_base_schema.ts
|
|
201
|
-
var OrderBySchema = z2.array(
|
|
202
|
-
z2.object({
|
|
203
|
-
name: stringMandatory("Order Field Name", 0, 255),
|
|
204
|
-
field: stringMandatory("Order Field Name", 0, 255),
|
|
205
|
-
direction: enumMandatory("Order Direction", OrderBy, "asc" /* asc */)
|
|
206
|
-
})
|
|
207
|
-
);
|
|
208
|
-
var BaseQuerySchema = z2.object({
|
|
209
|
-
search: stringOptional("Search", 0, 255, ""),
|
|
210
|
-
status: enumArrayOptional("Status", Status, getAllEnums(Status), 0, 10, true),
|
|
211
|
-
paging: enumOptional("Paging", PAGING, "Yes" /* Yes */),
|
|
212
|
-
page_count: numberOptional("Page Count", 0, 1e3, 100),
|
|
213
|
-
page_index: numberOptional("Page Index", 0, 1e3, 0),
|
|
214
|
-
load_parents: enumOptional("Load Parents", LoadParents, "No" /* No */),
|
|
215
|
-
load_parents_list: stringArrayOptional("Load Parents List"),
|
|
216
|
-
load_child: enumOptional("Load Child", LoadChild, "No" /* No */),
|
|
217
|
-
load_child_list: stringArrayOptional("Load Child List"),
|
|
218
|
-
load_child_count: enumOptional(
|
|
219
|
-
"Load Child",
|
|
220
|
-
LoadChildCount,
|
|
221
|
-
"No" /* No */
|
|
222
|
-
),
|
|
223
|
-
load_child_count_list: stringArrayOptional("Load Child List"),
|
|
224
|
-
include_details: dynamicJsonSchema("Include Details", {}),
|
|
225
|
-
where_relations: dynamicJsonSchema("Where Relations", {}),
|
|
226
|
-
order_by: OrderBySchema.optional().default([]),
|
|
227
|
-
include_master_data: enumOptional("Include Master Data", YesNo, "No" /* No */),
|
|
228
|
-
date_format_id: single_select_optional("MasterMainDateFormat"),
|
|
229
|
-
time_zone_id: single_select_optional("MasterMainTimeZone")
|
|
230
|
-
});
|
|
231
|
-
var FilePresignedUrlSchema = z2.object({
|
|
232
|
-
file_name: stringMandatory("File Name", 1, 255),
|
|
233
|
-
file_type: enumMandatory("File Type", FileType, "Image" /* Image */)
|
|
234
|
-
});
|
|
235
|
-
var MongoBaseQuerySchema = z2.object({
|
|
236
|
-
search: stringOptional("Search", 0, 255, ""),
|
|
237
|
-
paging: enumOptional("Paging", PAGING, "Yes" /* Yes */),
|
|
238
|
-
page_count: numberOptional("Page Count", 0, 1e3, 100),
|
|
239
|
-
page_index: numberOptional("Page Index", 0, 1e3, 0),
|
|
240
|
-
login_from: enumMandatory("Login From", LoginFrom, "Web" /* Web */),
|
|
241
|
-
date_format_id: single_select_optional("MasterMainDateFormat"),
|
|
242
|
-
// ✅ Single-selection -> MasterMainDateFormat
|
|
243
|
-
time_zone_id: single_select_optional("MasterMainTimeZone")
|
|
244
|
-
// ✅ Single-selection -> MasterMainTimeZone
|
|
245
|
-
});
|
|
246
|
-
|
|
247
|
-
// src/services/account/alert_service.ts
|
|
248
|
-
var URL = "account/alerts";
|
|
249
|
-
var ENDPOINTS = {
|
|
250
|
-
find: `${URL}/search`,
|
|
251
|
-
create: URL,
|
|
252
|
-
update: (id) => `${URL}/${id}`,
|
|
253
|
-
delete: (id) => `${URL}/${id}`
|
|
254
|
-
};
|
|
255
|
-
var AlertSchema = z3.object({
|
|
256
|
-
module: enumMandatory("Module", Module, "ABC" /* ABC */),
|
|
257
|
-
sub_module: enumMandatory("Sub Module", SubModule, "ABC" /* ABC */),
|
|
258
|
-
alert_type: enumMandatory("Alert Type", AlertType, "ABC" /* ABC */),
|
|
259
|
-
alert_sub_type: enumMandatory(
|
|
260
|
-
"Alert Sub Type",
|
|
261
|
-
AlertSubType,
|
|
262
|
-
"ABC" /* ABC */
|
|
263
|
-
),
|
|
264
|
-
alert_key_1: stringOptional("Alert Key 1", 0, 50),
|
|
265
|
-
alert_key_2: stringOptional("Alert Key 2", 0, 50),
|
|
266
|
-
alert_key_3: stringOptional("Alert Key 3", 0, 50),
|
|
267
|
-
alert_key_4: stringOptional("Alert Key 4", 0, 50),
|
|
268
|
-
is_edit: enumOptional("Is Edit", YesNo, "No" /* No */),
|
|
269
|
-
is_push: enumOptional("Is Push", YesNo, "No" /* No */),
|
|
270
|
-
is_sms: enumOptional("Is SMS", YesNo, "No" /* No */),
|
|
271
|
-
is_whatsapp: enumOptional("Is WhatsApp", YesNo, "No" /* No */),
|
|
272
|
-
is_email: enumOptional("Is Email", YesNo, "No" /* No */),
|
|
273
|
-
mobile_numbers: stringOptional("Mobile Numbers", 0, 300),
|
|
274
|
-
emails: stringOptional("Emails", 0, 300),
|
|
275
|
-
all_vehicles: enumOptional("All Vehicles", YesNo, "No" /* No */),
|
|
276
|
-
all_trips: enumOptional("All Trips", YesNo, "No" /* No */),
|
|
277
|
-
all_geofences: enumOptional("All Geofences", YesNo, "No" /* No */),
|
|
278
|
-
all_drivers: enumOptional("All Drivers", YesNo, "No" /* No */),
|
|
279
|
-
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
280
|
-
user_id: single_select_mandatory("User"),
|
|
281
|
-
status: enumMandatory("Status", Status, "Active" /* Active */),
|
|
282
|
-
vehicle_ids: multi_select_optional("Vehicle"),
|
|
283
|
-
user_ids: multi_select_optional("User"),
|
|
284
|
-
driver_ids: multi_select_optional("Driver"),
|
|
285
|
-
gps_geofence_ids: multi_select_optional("GPS Geofence Data")
|
|
286
|
-
});
|
|
287
|
-
var AlertQuerySchema = BaseQuerySchema.extend({
|
|
288
|
-
organisation_ids: multi_select_optional("Organisation"),
|
|
289
|
-
user_ids: multi_select_optional("User"),
|
|
290
|
-
alert_ids: multi_select_optional("Alert"),
|
|
291
|
-
module: enumArrayOptional("Module", Module, getAllEnums(Module), 0, 10, true),
|
|
292
|
-
sub_module: enumArrayOptional(
|
|
293
|
-
"Sub Module",
|
|
294
|
-
SubModule,
|
|
295
|
-
getAllEnums(SubModule),
|
|
296
|
-
0,
|
|
297
|
-
10,
|
|
298
|
-
true
|
|
299
|
-
),
|
|
300
|
-
alert_type: enumArrayOptional(
|
|
301
|
-
"Alert Type",
|
|
302
|
-
AlertType,
|
|
303
|
-
getAllEnums(AlertType),
|
|
304
|
-
0,
|
|
305
|
-
10,
|
|
306
|
-
true
|
|
307
|
-
),
|
|
308
|
-
alert_sub_type: enumArrayOptional(
|
|
309
|
-
"Alert Sub Type",
|
|
310
|
-
AlertSubType,
|
|
311
|
-
getAllEnums(AlertSubType),
|
|
312
|
-
0,
|
|
313
|
-
10,
|
|
314
|
-
true
|
|
315
|
-
),
|
|
316
|
-
is_edit: enumArrayOptional("Is Edit", YesNo, getAllEnums(YesNo), 0, 10, true),
|
|
317
|
-
is_push: enumArrayOptional("Is Push", YesNo, getAllEnums(YesNo), 0, 10, true),
|
|
318
|
-
is_sms: enumArrayOptional("Is SMS", YesNo, getAllEnums(YesNo), 0, 10, true),
|
|
319
|
-
is_whatsapp: enumArrayOptional(
|
|
320
|
-
"Is Whatsapp",
|
|
321
|
-
YesNo,
|
|
322
|
-
getAllEnums(YesNo),
|
|
323
|
-
0,
|
|
324
|
-
10,
|
|
325
|
-
true
|
|
326
|
-
),
|
|
327
|
-
is_email: enumArrayOptional(
|
|
328
|
-
"Is Email",
|
|
329
|
-
YesNo,
|
|
330
|
-
getAllEnums(YesNo),
|
|
331
|
-
0,
|
|
332
|
-
10,
|
|
333
|
-
true
|
|
334
|
-
)
|
|
335
|
-
});
|
|
336
|
-
var toAlertPayload = (alert) => ({
|
|
337
|
-
module: alert.module,
|
|
338
|
-
sub_module: alert.sub_module,
|
|
339
|
-
alert_type: alert.alert_type,
|
|
340
|
-
alert_sub_type: alert.alert_sub_type,
|
|
341
|
-
alert_key_1: alert.alert_key_1 ?? "",
|
|
342
|
-
alert_key_2: alert.alert_key_2 ?? "",
|
|
343
|
-
alert_key_3: alert.alert_key_3 ?? "",
|
|
344
|
-
alert_key_4: alert.alert_key_4 ?? "",
|
|
345
|
-
is_edit: alert.is_edit ?? "No" /* No */,
|
|
346
|
-
is_push: alert.is_push ?? "No" /* No */,
|
|
347
|
-
is_sms: alert.is_sms ?? "No" /* No */,
|
|
348
|
-
is_whatsapp: alert.is_whatsapp ?? "No" /* No */,
|
|
349
|
-
is_email: alert.is_email ?? "No" /* No */,
|
|
350
|
-
mobile_numbers: alert.mobile_numbers ?? "",
|
|
351
|
-
emails: alert.emails ?? "",
|
|
352
|
-
all_vehicles: alert.all_vehicles ?? "No" /* No */,
|
|
353
|
-
all_trips: alert.all_trips ?? "No" /* No */,
|
|
354
|
-
all_geofences: alert.all_geofences ?? "No" /* No */,
|
|
355
|
-
all_drivers: alert.all_drivers ?? "No" /* No */,
|
|
356
|
-
user_id: alert.user_id,
|
|
357
|
-
organisation_id: alert.organisation_id,
|
|
358
|
-
status: alert.status,
|
|
359
|
-
vehicle_ids: [],
|
|
360
|
-
user_ids: [],
|
|
361
|
-
driver_ids: [],
|
|
362
|
-
gps_geofence_ids: []
|
|
363
|
-
});
|
|
364
|
-
var newAlertPayload = () => ({
|
|
365
|
-
module: "ABC" /* ABC */,
|
|
366
|
-
sub_module: "ABC" /* ABC */,
|
|
367
|
-
alert_type: "ABC" /* ABC */,
|
|
368
|
-
alert_sub_type: "ABC" /* ABC */,
|
|
369
|
-
alert_key_1: "",
|
|
370
|
-
alert_key_2: "",
|
|
371
|
-
alert_key_3: "",
|
|
372
|
-
alert_key_4: "",
|
|
373
|
-
is_edit: "No" /* No */,
|
|
374
|
-
is_push: "No" /* No */,
|
|
375
|
-
is_sms: "No" /* No */,
|
|
376
|
-
is_whatsapp: "No" /* No */,
|
|
377
|
-
is_email: "No" /* No */,
|
|
378
|
-
mobile_numbers: "",
|
|
379
|
-
emails: "",
|
|
380
|
-
all_vehicles: "No" /* No */,
|
|
381
|
-
all_trips: "No" /* No */,
|
|
382
|
-
all_geofences: "No" /* No */,
|
|
383
|
-
all_drivers: "No" /* No */,
|
|
384
|
-
user_id: "",
|
|
385
|
-
organisation_id: "",
|
|
386
|
-
status: "Active" /* Active */,
|
|
387
|
-
vehicle_ids: [],
|
|
388
|
-
user_ids: [],
|
|
389
|
-
driver_ids: [],
|
|
390
|
-
gps_geofence_ids: []
|
|
391
|
-
});
|
|
392
|
-
var findAlerts = async (data) => {
|
|
393
|
-
return apiPost(ENDPOINTS.find, data);
|
|
394
|
-
};
|
|
395
|
-
var createAlert = async (data) => {
|
|
396
|
-
return apiPost(ENDPOINTS.create, data);
|
|
397
|
-
};
|
|
398
|
-
var updateAlert = async (id, data) => {
|
|
399
|
-
return apiPatch(ENDPOINTS.update(id), data);
|
|
400
|
-
};
|
|
401
|
-
var deleteAlert = async (id) => {
|
|
402
|
-
return apiDelete(ENDPOINTS.delete(id));
|
|
403
|
-
};
|
|
404
|
-
export {
|
|
405
|
-
AlertQuerySchema,
|
|
406
|
-
AlertSchema,
|
|
407
|
-
createAlert,
|
|
408
|
-
deleteAlert,
|
|
409
|
-
findAlerts,
|
|
410
|
-
newAlertPayload,
|
|
411
|
-
toAlertPayload,
|
|
412
|
-
updateAlert
|
|
413
|
-
};
|