vms-nest-prisma-api-document 24.0.0 → 25.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/Enums.d.ts +28 -12
- package/dist/core/Enums.js +34 -14
- package/dist/services/account/bookmark_service.d.ts +1 -1
- package/dist/services/{gps/features/user_notification_preferences.service.d.ts → account/notification_preferences.service.d.ts} +82 -50
- package/dist/services/{gps/features/user_notification_preferences.service.js → account/notification_preferences.service.js} +80 -63
- package/dist/services/{gps/features/user_report_preferences.service.d.ts → account/report_preferences.service.d.ts} +64 -53
- package/dist/services/{gps/features/user_report_preferences.service.js → account/report_preferences.service.js} +52 -19
- package/dist/services/account/ticket_service.d.ts +39 -31
- package/dist/services/account/ticket_service.js +27 -23
- 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 +1 -1
- package/dist/services/gps/features/geofence/gps_geofence_service.d.ts +28 -28
- package/dist/services/gps/features/geofence/gps_geofence_transaction_service.d.ts +16 -16
- package/dist/services/gps/features/geofence/gps_geofence_transaction_summary_service.d.ts +11 -11
- package/dist/services/gps/features/geofence/trip_geofence_to_geofence_service.d.ts +7 -7
- package/dist/services/gps/features/gps_live_track_share_link_service.d.ts +79 -64
- package/dist/services/gps/features/gps_live_track_share_link_service.js +62 -84
- package/dist/services/gps/features/gps_track_history_share_link_service.d.ts +69 -47
- package/dist/services/gps/features/gps_track_history_share_link_service.js +68 -44
- package/dist/services/gps/reports/gps_reports_mongo_service.d.ts +46 -46
- package/dist/services/main/devices/master_device_service.d.ts +1 -1
- package/dist/services/main/drivers/master_driver_service.d.ts +1 -1
- package/dist/services/main/sims/master_sim_service.d.ts +1 -1
- package/dist/services/main/users/auth_service.d.ts +1 -1
- package/dist/services/main/users/user_organisation_service.d.ts +1 -1
- package/dist/services/main/users/user_organisation_service.js +73 -63
- package/dist/services/main/users/user_service.d.ts +1 -1
- package/dist/services/main/vehicle/childs/vehicle_odometer_history.d.ts +1 -1
- package/dist/services/main/vehicle/master_vehicle_service.d.ts +1 -1
- package/dist/services/master/device/master_device_manufacturer_service.d.ts +1 -1
- package/dist/services/master/device/master_device_model_service.d.ts +1 -1
- package/dist/services/master/device/master_device_type_service.d.ts +1 -1
- package/dist/services/master/expense/master_expense_name_service.d.ts +1 -1
- package/dist/services/master/expense/master_expense_type_service.d.ts +1 -1
- package/dist/services/master/expense/master_fuel_company_service.d.ts +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 +4 -4
- 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/{user_organisation_service-C-FbPQmd.d.ts → user_organisation_service-B5QmuUSK.d.ts} +90 -64
- package/package.json +1 -1
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { OnOff, ReportType, ReportList, YesNo, Status, PAGING, LoadParents, LoadChild, LoadChildCount, OrderBy } from '
|
|
2
|
-
import { FBR, SBR } from '
|
|
1
|
+
import { OnOff, ReportType, ReportList, ReportChannel, YesNo, Status, PAGING, LoadParents, LoadChild, LoadChildCount, OrderBy } from '../../core/Enums.js';
|
|
2
|
+
import { FBR, SBR } from '../../core/BaseResponse.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { U as UserOrganisation, M as MasterVehicle } from '
|
|
5
|
-
import '
|
|
6
|
-
import '
|
|
4
|
+
import { U as UserOrganisation, M as MasterVehicle } from '../../user_organisation_service-B5QmuUSK.js';
|
|
5
|
+
import '../../zod_utils/zod_base_schema.js';
|
|
6
|
+
import '../master/main/master_main_sim_provider_service.js';
|
|
7
7
|
|
|
8
|
-
interface
|
|
8
|
+
interface OrganisationReportsPreference extends Record<string, unknown> {
|
|
9
9
|
report_preference_id: string;
|
|
10
10
|
report_name: string;
|
|
11
11
|
report_status: OnOff;
|
|
12
12
|
report_types: ReportType[];
|
|
13
13
|
report_list: ReportList[];
|
|
14
|
-
|
|
14
|
+
report_channels: ReportChannel[];
|
|
15
|
+
mobile_numbers?: string;
|
|
16
|
+
email_ids?: string;
|
|
15
17
|
cc_email_ids?: string;
|
|
16
18
|
all_vehicles: YesNo;
|
|
17
19
|
status: Status;
|
|
@@ -19,15 +21,15 @@ interface UserReportsPreferences extends Record<string, unknown> {
|
|
|
19
21
|
modified_date_time: string;
|
|
20
22
|
organisation_id: string;
|
|
21
23
|
UserOrganisation?: UserOrganisation;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
OrganisationReportsPreferenceVehicleLink: OrganisationReportsPreferenceVehicleLink[];
|
|
25
|
+
OrganisationReportsAutomationMail: OrganisationReportsAutomationMail[];
|
|
24
26
|
_count?: {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
OrganisationReportsPreferenceVehicleLink: number;
|
|
28
|
+
OrganisationReportsAutomationMail: number;
|
|
27
29
|
};
|
|
28
30
|
}
|
|
29
|
-
interface
|
|
30
|
-
|
|
31
|
+
interface OrganisationReportsPreferenceVehicleLink extends Record<string, unknown> {
|
|
32
|
+
report_preference_vehicle_id: string;
|
|
31
33
|
status: Status;
|
|
32
34
|
added_date_time: string;
|
|
33
35
|
modified_date_time: string;
|
|
@@ -36,15 +38,15 @@ interface UserReportsPreferencesVehicleLink extends Record<string, unknown> {
|
|
|
36
38
|
vehicle_number?: string;
|
|
37
39
|
vehicle_type?: string;
|
|
38
40
|
report_preference_id: string;
|
|
39
|
-
|
|
41
|
+
OrganisationReportsPreference?: OrganisationReportsPreference;
|
|
40
42
|
}
|
|
41
|
-
interface
|
|
42
|
-
|
|
43
|
+
interface OrganisationReportsAutomationMail extends Record<string, unknown> {
|
|
44
|
+
report_automation_mail_id: string;
|
|
43
45
|
report_name: string;
|
|
44
46
|
report_type: ReportType;
|
|
45
|
-
from_date
|
|
46
|
-
to_date
|
|
47
|
-
date
|
|
47
|
+
from_date?: string;
|
|
48
|
+
to_date?: string;
|
|
49
|
+
date?: string;
|
|
48
50
|
all_vehicles: YesNo;
|
|
49
51
|
status: Status;
|
|
50
52
|
added_date_time: string;
|
|
@@ -52,14 +54,14 @@ interface UserReportsAutomationMail extends Record<string, unknown> {
|
|
|
52
54
|
organisation_id: string;
|
|
53
55
|
UserOrganisation?: UserOrganisation;
|
|
54
56
|
report_preference_id: string;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
OrganisationReportsPreference?: OrganisationReportsPreference;
|
|
58
|
+
OrganisationReportsAutomationMailVehicleLink: OrganisationReportsAutomationMailVehicleLink[];
|
|
57
59
|
_count?: {
|
|
58
|
-
|
|
60
|
+
OrganisationReportsAutomationMailVehicleLink: number;
|
|
59
61
|
};
|
|
60
62
|
}
|
|
61
|
-
interface
|
|
62
|
-
|
|
63
|
+
interface OrganisationReportsAutomationMailVehicleLink extends Record<string, unknown> {
|
|
64
|
+
report_automation_mail_vehicle_id: string;
|
|
63
65
|
status: Status;
|
|
64
66
|
added_date_time: string;
|
|
65
67
|
modified_date_time: string;
|
|
@@ -68,9 +70,9 @@ interface UserReportsAutomationVehicleLink extends Record<string, unknown> {
|
|
|
68
70
|
vehicle_number?: string;
|
|
69
71
|
vehicle_type?: string;
|
|
70
72
|
automation_mail_id: string;
|
|
71
|
-
|
|
73
|
+
OrganisationReportsAutomationMail?: OrganisationReportsAutomationMail;
|
|
72
74
|
}
|
|
73
|
-
declare const
|
|
75
|
+
declare const OrganisationReportsAutomationMailQuerySchema: z.ZodObject<{
|
|
74
76
|
search: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
75
77
|
status: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Status>, "many">>>;
|
|
76
78
|
paging: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof PAGING>>>;
|
|
@@ -103,11 +105,9 @@ declare const UserReportsAutomationMailQuerySchema: z.ZodObject<{
|
|
|
103
105
|
} & {
|
|
104
106
|
organisation_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
105
107
|
report_preference_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
106
|
-
|
|
107
|
-
all_vehicles: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof YesNo>, "many">>>;
|
|
108
|
+
report_automation_mail_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
108
109
|
report_type: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ReportType>, "many">>>;
|
|
109
110
|
}, "strip", z.ZodTypeAny, {
|
|
110
|
-
all_vehicles: YesNo[];
|
|
111
111
|
status: Status[];
|
|
112
112
|
search: string;
|
|
113
113
|
paging: PAGING;
|
|
@@ -132,11 +132,10 @@ declare const UserReportsAutomationMailQuerySchema: z.ZodObject<{
|
|
|
132
132
|
organisation_ids: string[];
|
|
133
133
|
report_type: ReportType[];
|
|
134
134
|
report_preference_ids: string[];
|
|
135
|
-
|
|
135
|
+
report_automation_mail_ids: string[];
|
|
136
136
|
}, {
|
|
137
137
|
date_format_id: string;
|
|
138
138
|
time_zone_id: string;
|
|
139
|
-
all_vehicles?: YesNo[] | undefined;
|
|
140
139
|
status?: Status[] | undefined;
|
|
141
140
|
search?: string | undefined;
|
|
142
141
|
paging?: PAGING | undefined;
|
|
@@ -159,45 +158,51 @@ declare const UserReportsAutomationMailQuerySchema: z.ZodObject<{
|
|
|
159
158
|
organisation_ids?: string[] | undefined;
|
|
160
159
|
report_type?: ReportType[] | undefined;
|
|
161
160
|
report_preference_ids?: string[] | undefined;
|
|
162
|
-
|
|
161
|
+
report_automation_mail_ids?: string[] | undefined;
|
|
163
162
|
}>;
|
|
164
|
-
type
|
|
165
|
-
declare const
|
|
163
|
+
type OrganisationReportsAutomationMailQueryDTO = z.infer<typeof OrganisationReportsAutomationMailQuerySchema>;
|
|
164
|
+
declare const OrganisationReportsPreferenceSchema: z.ZodObject<{
|
|
166
165
|
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
167
166
|
report_name: z.ZodEffects<z.ZodString, string, string>;
|
|
168
167
|
report_status: z.ZodType<OnOff, z.ZodTypeDef, OnOff>;
|
|
169
168
|
report_types: z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof ReportType>, "many">>;
|
|
170
169
|
report_list: z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof ReportList>, "many">>;
|
|
170
|
+
report_channels: z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof ReportChannel>, "many">>;
|
|
171
|
+
mobile_numbers: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
171
172
|
email_ids: z.ZodEffects<z.ZodString, string, string>;
|
|
172
173
|
cc_email_ids: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
173
174
|
all_vehicles: z.ZodType<YesNo, z.ZodTypeDef, YesNo>;
|
|
174
175
|
vehicle_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
175
176
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
176
177
|
}, "strip", z.ZodTypeAny, {
|
|
177
|
-
email_ids: string;
|
|
178
|
-
cc_email_ids: string;
|
|
179
|
-
all_vehicles: YesNo;
|
|
180
178
|
status: Status;
|
|
181
179
|
organisation_id: string;
|
|
182
180
|
vehicle_ids: string[];
|
|
181
|
+
all_vehicles: YesNo;
|
|
182
|
+
mobile_numbers: string;
|
|
183
|
+
email_ids: string;
|
|
184
|
+
cc_email_ids: string;
|
|
183
185
|
report_name: string;
|
|
184
186
|
report_status: OnOff;
|
|
185
187
|
report_types: ReportType[];
|
|
186
188
|
report_list: ReportList[];
|
|
189
|
+
report_channels: ReportChannel[];
|
|
187
190
|
}, {
|
|
188
|
-
email_ids: string;
|
|
189
|
-
all_vehicles: YesNo;
|
|
190
191
|
status: Status;
|
|
191
192
|
organisation_id: string;
|
|
193
|
+
all_vehicles: YesNo;
|
|
194
|
+
email_ids: string;
|
|
192
195
|
report_name: string;
|
|
193
196
|
report_status: OnOff;
|
|
194
|
-
cc_email_ids?: string | undefined;
|
|
195
197
|
vehicle_ids?: string[] | undefined;
|
|
198
|
+
mobile_numbers?: string | undefined;
|
|
199
|
+
cc_email_ids?: string | undefined;
|
|
196
200
|
report_types?: ReportType[] | undefined;
|
|
197
201
|
report_list?: ReportList[] | undefined;
|
|
202
|
+
report_channels?: ReportChannel[] | undefined;
|
|
198
203
|
}>;
|
|
199
|
-
type
|
|
200
|
-
declare const
|
|
204
|
+
type OrganisationReportsPreferenceDTO = z.infer<typeof OrganisationReportsPreferenceSchema>;
|
|
205
|
+
declare const OrganisationReportsPreferenceQuerySchema: z.ZodObject<{
|
|
201
206
|
search: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
202
207
|
status: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Status>, "many">>>;
|
|
203
208
|
paging: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof PAGING>>>;
|
|
@@ -231,9 +236,10 @@ declare const UserReportPreferencesQuerySchema: z.ZodObject<{
|
|
|
231
236
|
organisation_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
232
237
|
report_preference_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
233
238
|
report_status: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof OnOff>, "many">>>;
|
|
234
|
-
|
|
239
|
+
report_types: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ReportType>, "many">>>;
|
|
240
|
+
report_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ReportList>, "many">>>;
|
|
241
|
+
report_channels: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ReportChannel>, "many">>>;
|
|
235
242
|
}, "strip", z.ZodTypeAny, {
|
|
236
|
-
all_vehicles: YesNo[];
|
|
237
243
|
status: Status[];
|
|
238
244
|
search: string;
|
|
239
245
|
paging: PAGING;
|
|
@@ -257,11 +263,13 @@ declare const UserReportPreferencesQuerySchema: z.ZodObject<{
|
|
|
257
263
|
time_zone_id: string;
|
|
258
264
|
organisation_ids: string[];
|
|
259
265
|
report_status: OnOff[];
|
|
266
|
+
report_types: ReportType[];
|
|
267
|
+
report_list: ReportList[];
|
|
268
|
+
report_channels: ReportChannel[];
|
|
260
269
|
report_preference_ids: string[];
|
|
261
270
|
}, {
|
|
262
271
|
date_format_id: string;
|
|
263
272
|
time_zone_id: string;
|
|
264
|
-
all_vehicles?: YesNo[] | undefined;
|
|
265
273
|
status?: Status[] | undefined;
|
|
266
274
|
search?: string | undefined;
|
|
267
275
|
paging?: PAGING | undefined;
|
|
@@ -283,15 +291,18 @@ declare const UserReportPreferencesQuerySchema: z.ZodObject<{
|
|
|
283
291
|
include_master_data?: YesNo | undefined;
|
|
284
292
|
organisation_ids?: string[] | undefined;
|
|
285
293
|
report_status?: OnOff[] | undefined;
|
|
294
|
+
report_types?: ReportType[] | undefined;
|
|
295
|
+
report_list?: ReportList[] | undefined;
|
|
296
|
+
report_channels?: ReportChannel[] | undefined;
|
|
286
297
|
report_preference_ids?: string[] | undefined;
|
|
287
298
|
}>;
|
|
288
|
-
type
|
|
289
|
-
declare const toUserReportsPreferencesPayload: (data:
|
|
290
|
-
declare const newUserReportsPreferencesPayload: () =>
|
|
291
|
-
declare const findUserReportsPreferences: (data:
|
|
292
|
-
declare const createUserReportsPreferences: (data:
|
|
293
|
-
declare const updateUserReportsPreferences: (id: string, data:
|
|
299
|
+
type OrganisationReportsPreferenceQueryDTO = z.infer<typeof OrganisationReportsPreferenceQuerySchema>;
|
|
300
|
+
declare const toUserReportsPreferencesPayload: (data: OrganisationReportsPreference) => OrganisationReportsPreferenceDTO;
|
|
301
|
+
declare const newUserReportsPreferencesPayload: () => OrganisationReportsPreferenceDTO;
|
|
302
|
+
declare const findUserReportsPreferences: (data: OrganisationReportsPreferenceQueryDTO) => Promise<FBR<OrganisationReportsPreference[]>>;
|
|
303
|
+
declare const createUserReportsPreferences: (data: OrganisationReportsPreferenceDTO) => Promise<SBR>;
|
|
304
|
+
declare const updateUserReportsPreferences: (id: string, data: OrganisationReportsPreferenceDTO) => Promise<SBR>;
|
|
294
305
|
declare const deleteUserReportsPreferences: (id: string) => Promise<SBR>;
|
|
295
|
-
declare const findUserReportsAutomationMail: (data:
|
|
306
|
+
declare const findUserReportsAutomationMail: (data: OrganisationReportsAutomationMailQueryDTO) => Promise<FBR<OrganisationReportsAutomationMail[]>>;
|
|
296
307
|
|
|
297
|
-
export { type
|
|
308
|
+
export { type OrganisationReportsAutomationMail, type OrganisationReportsAutomationMailQueryDTO, OrganisationReportsAutomationMailQuerySchema, type OrganisationReportsAutomationMailVehicleLink, type OrganisationReportsPreference, type OrganisationReportsPreferenceDTO, type OrganisationReportsPreferenceQueryDTO, OrganisationReportsPreferenceQuerySchema, OrganisationReportsPreferenceSchema, type OrganisationReportsPreferenceVehicleLink, createUserReportsPreferences, deleteUserReportsPreferences, findUserReportsAutomationMail, findUserReportsPreferences, newUserReportsPreferencesPayload, toUserReportsPreferencesPayload, updateUserReportsPreferences };
|
|
@@ -22,7 +22,7 @@ var apiDelete = async (url) => {
|
|
|
22
22
|
return response.data;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
// src/services/
|
|
25
|
+
// src/services/account/report_preferences.service.ts
|
|
26
26
|
import { z as z3 } from "zod";
|
|
27
27
|
|
|
28
28
|
// src/zod_utils/zod_utils.ts
|
|
@@ -219,6 +219,12 @@ var ReportList = /* @__PURE__ */ ((ReportList2) => {
|
|
|
219
219
|
ReportList2["FuelRemovalReport"] = "FuelRemovalReport";
|
|
220
220
|
return ReportList2;
|
|
221
221
|
})(ReportList || {});
|
|
222
|
+
var ReportChannel = /* @__PURE__ */ ((ReportChannel2) => {
|
|
223
|
+
ReportChannel2["WhatsApp"] = "WhatsApp";
|
|
224
|
+
ReportChannel2["SMS"] = "SMS";
|
|
225
|
+
ReportChannel2["Email"] = "Email";
|
|
226
|
+
return ReportChannel2;
|
|
227
|
+
})(ReportChannel || {});
|
|
222
228
|
var ReportType = /* @__PURE__ */ ((ReportType2) => {
|
|
223
229
|
ReportType2["Daily"] = "Daily";
|
|
224
230
|
ReportType2["Weekly"] = "Weekly";
|
|
@@ -284,9 +290,9 @@ var MongoBaseQuerySchema = z2.object({
|
|
|
284
290
|
// ✅ Single-selection -> MasterMainTimeZone
|
|
285
291
|
});
|
|
286
292
|
|
|
287
|
-
// src/services/
|
|
288
|
-
var URL = "
|
|
289
|
-
var URL_AUTOMATION_MAIL = "
|
|
293
|
+
// src/services/account/report_preferences.service.ts
|
|
294
|
+
var URL = "account/report_preferences";
|
|
295
|
+
var URL_AUTOMATION_MAIL = "account/report_preferences_automation_mail";
|
|
290
296
|
var ENDPOINTS = {
|
|
291
297
|
find: `${URL}/search`,
|
|
292
298
|
find_automation_mail: `${URL_AUTOMATION_MAIL}/search`,
|
|
@@ -294,21 +300,24 @@ var ENDPOINTS = {
|
|
|
294
300
|
update: (id) => `${URL}/${id}`,
|
|
295
301
|
delete: (id) => `${URL}/${id}`
|
|
296
302
|
};
|
|
297
|
-
var
|
|
303
|
+
var OrganisationReportsAutomationMailQuerySchema = BaseQuerySchema.extend({
|
|
298
304
|
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
299
305
|
// ✅ Multi-Selection -> UserOrganisation
|
|
300
|
-
report_preference_ids: multi_select_optional(
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
// ✅ Multi-Selection ->
|
|
304
|
-
|
|
306
|
+
report_preference_ids: multi_select_optional(
|
|
307
|
+
"OrganisationReportsPreference"
|
|
308
|
+
),
|
|
309
|
+
// ✅ Multi-Selection -> OrganisationReportsPreference
|
|
310
|
+
report_automation_mail_ids: multi_select_optional(
|
|
311
|
+
"OrganisationReportsAutomationMail"
|
|
312
|
+
),
|
|
313
|
+
// ✅ Multi-Selection -> OrganisationReportsAutomationMail
|
|
305
314
|
report_type: enumArrayOptional(
|
|
306
315
|
"Report Type",
|
|
307
316
|
ReportType,
|
|
308
317
|
getAllEnums(ReportType)
|
|
309
318
|
)
|
|
310
319
|
});
|
|
311
|
-
var
|
|
320
|
+
var OrganisationReportsPreferenceSchema = z3.object({
|
|
312
321
|
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
313
322
|
report_name: stringMandatory("Report Name", 3, 100),
|
|
314
323
|
report_status: enumMandatory("Report Status", OnOff, "On" /* On */),
|
|
@@ -322,6 +331,12 @@ var UserReportPreferencesSchema = z3.object({
|
|
|
322
331
|
ReportList,
|
|
323
332
|
getAllEnums(ReportList)
|
|
324
333
|
),
|
|
334
|
+
report_channels: enumArrayMandatory(
|
|
335
|
+
"Report Channels",
|
|
336
|
+
ReportChannel,
|
|
337
|
+
getAllEnums(ReportChannel)
|
|
338
|
+
),
|
|
339
|
+
mobile_numbers: stringOptional("Mobile Numbers", 0, 300),
|
|
325
340
|
email_ids: stringMandatory("Email IDs", 3, 300),
|
|
326
341
|
cc_email_ids: stringOptional("CC email IDs", 0, 300),
|
|
327
342
|
all_vehicles: enumMandatory("All Vehicles", YesNo, "No" /* No */),
|
|
@@ -329,13 +344,27 @@ var UserReportPreferencesSchema = z3.object({
|
|
|
329
344
|
// Multi selection -> MasterVehicle
|
|
330
345
|
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
331
346
|
});
|
|
332
|
-
var
|
|
347
|
+
var OrganisationReportsPreferenceQuerySchema = BaseQuerySchema.extend({
|
|
333
348
|
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
334
349
|
// ✅ Multi-Selection -> UserOrganisation
|
|
335
|
-
report_preference_ids: multi_select_optional("
|
|
336
|
-
// ✅ Multi-Selection ->
|
|
350
|
+
report_preference_ids: multi_select_optional("OrganisationReportsPreference"),
|
|
351
|
+
// ✅ Multi-Selection -> OrganisationReportsPreference
|
|
337
352
|
report_status: enumArrayOptional("Report Status", OnOff, getAllEnums(OnOff)),
|
|
338
|
-
|
|
353
|
+
report_types: enumArrayOptional(
|
|
354
|
+
"Report Type",
|
|
355
|
+
ReportType,
|
|
356
|
+
getAllEnums(ReportType)
|
|
357
|
+
),
|
|
358
|
+
report_list: enumArrayOptional(
|
|
359
|
+
"Report List",
|
|
360
|
+
ReportList,
|
|
361
|
+
getAllEnums(ReportList)
|
|
362
|
+
),
|
|
363
|
+
report_channels: enumArrayOptional(
|
|
364
|
+
"Report Channel",
|
|
365
|
+
ReportChannel,
|
|
366
|
+
getAllEnums(ReportChannel)
|
|
367
|
+
)
|
|
339
368
|
});
|
|
340
369
|
var toUserReportsPreferencesPayload = (data) => ({
|
|
341
370
|
organisation_id: data.organisation_id,
|
|
@@ -343,10 +372,12 @@ var toUserReportsPreferencesPayload = (data) => ({
|
|
|
343
372
|
report_status: data.report_status,
|
|
344
373
|
report_types: data.report_types,
|
|
345
374
|
report_list: data.report_list,
|
|
375
|
+
report_channels: data.report_channels || [],
|
|
376
|
+
mobile_numbers: data.mobile_numbers || "",
|
|
346
377
|
email_ids: data.email_ids || "",
|
|
347
378
|
cc_email_ids: data.cc_email_ids || "",
|
|
348
379
|
all_vehicles: data.all_vehicles,
|
|
349
|
-
vehicle_ids: data.
|
|
380
|
+
vehicle_ids: data.OrganisationReportsPreferenceVehicleLink?.map((v) => v.vehicle_id) ?? [],
|
|
350
381
|
status: "Active" /* Active */
|
|
351
382
|
});
|
|
352
383
|
var newUserReportsPreferencesPayload = () => ({
|
|
@@ -355,6 +386,8 @@ var newUserReportsPreferencesPayload = () => ({
|
|
|
355
386
|
report_status: "On" /* On */,
|
|
356
387
|
report_types: [],
|
|
357
388
|
report_list: [],
|
|
389
|
+
report_channels: [],
|
|
390
|
+
mobile_numbers: "",
|
|
358
391
|
email_ids: "",
|
|
359
392
|
cc_email_ids: "",
|
|
360
393
|
all_vehicles: "Yes" /* Yes */,
|
|
@@ -377,9 +410,9 @@ var findUserReportsAutomationMail = async (data) => {
|
|
|
377
410
|
return apiPost(ENDPOINTS.find_automation_mail, data);
|
|
378
411
|
};
|
|
379
412
|
export {
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
413
|
+
OrganisationReportsAutomationMailQuerySchema,
|
|
414
|
+
OrganisationReportsPreferenceQuerySchema,
|
|
415
|
+
OrganisationReportsPreferenceSchema,
|
|
383
416
|
createUserReportsPreferences,
|
|
384
417
|
deleteUserReportsPreferences,
|
|
385
418
|
findUserReportsAutomationMail,
|
|
@@ -1,27 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FBR, SBR } from '../../core/BaseResponse.js';
|
|
1
|
+
import { TicketStatus, Status, FileType, PAGING, LoadParents, LoadChild, LoadChildCount, OrderBy, YesNo } from '../../core/Enums.js';
|
|
2
|
+
import { BaseCommionFile, FBR, SBR, BR, AWSPresignedUrl } from '../../core/BaseResponse.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import {
|
|
4
|
+
import { FilePresignedUrlDTO } from '../../zod_utils/zod_base_schema.js';
|
|
5
|
+
import { U as UserOrganisation, a as User } from '../../user_organisation_service-B5QmuUSK.js';
|
|
5
6
|
import { UserAdmin } from '../main/users/user_admin_service.js';
|
|
6
|
-
import '../../zod_utils/zod_base_schema.js';
|
|
7
7
|
import '../master/main/master_main_sim_provider_service.js';
|
|
8
8
|
|
|
9
|
-
interface TicketFile extends Record<string, unknown> {
|
|
10
|
-
ticket_file_id: string;
|
|
11
|
-
file_type: FileType;
|
|
12
|
-
file_url?: string;
|
|
13
|
-
file_key?: string;
|
|
14
|
-
file_description?: string;
|
|
15
|
-
file_size?: number;
|
|
16
|
-
file_metadata?: Record<string, unknown>;
|
|
17
|
-
status: Status;
|
|
18
|
-
added_date_time: string;
|
|
19
|
-
modified_date_time: string;
|
|
20
|
-
organisation_id: string;
|
|
21
|
-
UserOrganisation?: UserOrganisation;
|
|
22
|
-
ticket_id: string;
|
|
23
|
-
Ticket?: Ticket;
|
|
24
|
-
}
|
|
25
9
|
interface Ticket extends Record<string, unknown> {
|
|
26
10
|
ticket_id: string;
|
|
27
11
|
subject: string;
|
|
@@ -38,23 +22,36 @@ interface Ticket extends Record<string, unknown> {
|
|
|
38
22
|
admin_id?: string;
|
|
39
23
|
UserAdmin?: UserAdmin;
|
|
40
24
|
TicketFile?: TicketFile[];
|
|
25
|
+
_count?: {
|
|
26
|
+
TicketFile?: number;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
interface TicketFile extends BaseCommionFile {
|
|
30
|
+
ticket_file_id: string;
|
|
31
|
+
ticket_id: string;
|
|
32
|
+
organisation_id: string;
|
|
41
33
|
}
|
|
42
34
|
declare const TicketFileSchema: z.ZodObject<{
|
|
43
|
-
|
|
44
|
-
ticket_id: z.ZodEffects<z.ZodString, string, string>;
|
|
35
|
+
usage_type: z.ZodEffects<z.ZodString, string, string>;
|
|
45
36
|
file_type: z.ZodType<FileType, z.ZodTypeDef, FileType>;
|
|
46
37
|
file_url: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
47
38
|
file_key: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
39
|
+
file_name: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
48
40
|
file_description: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
49
41
|
file_size: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
50
42
|
file_metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
51
43
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
44
|
+
} & {
|
|
45
|
+
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
46
|
+
ticket_id: z.ZodEffects<z.ZodString, string, string>;
|
|
52
47
|
}, "strip", z.ZodTypeAny, {
|
|
53
48
|
status: Status;
|
|
54
49
|
organisation_id: string;
|
|
50
|
+
usage_type: string;
|
|
55
51
|
file_type: FileType;
|
|
56
52
|
file_url: string;
|
|
57
53
|
file_key: string;
|
|
54
|
+
file_name: string;
|
|
58
55
|
file_description: string;
|
|
59
56
|
file_size: number;
|
|
60
57
|
file_metadata: Record<string, any>;
|
|
@@ -62,10 +59,12 @@ declare const TicketFileSchema: z.ZodObject<{
|
|
|
62
59
|
}, {
|
|
63
60
|
status: Status;
|
|
64
61
|
organisation_id: string;
|
|
62
|
+
usage_type: string;
|
|
65
63
|
file_type: FileType;
|
|
66
64
|
ticket_id: string;
|
|
67
65
|
file_url?: string | undefined;
|
|
68
66
|
file_key?: string | undefined;
|
|
67
|
+
file_name?: string | undefined;
|
|
69
68
|
file_description?: string | undefined;
|
|
70
69
|
file_size?: unknown;
|
|
71
70
|
file_metadata?: Record<string, any> | undefined;
|
|
@@ -79,22 +78,27 @@ declare const TicketSchema: z.ZodObject<{
|
|
|
79
78
|
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
80
79
|
user_id: z.ZodEffects<z.ZodString, string, string>;
|
|
81
80
|
admin_id: z.ZodEffects<z.ZodString, string, string>;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
ticket_id: z.ZodEffects<z.ZodString, string, string>;
|
|
81
|
+
TicketFile: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
82
|
+
usage_type: z.ZodEffects<z.ZodString, string, string>;
|
|
85
83
|
file_type: z.ZodType<FileType, z.ZodTypeDef, FileType>;
|
|
86
84
|
file_url: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
87
85
|
file_key: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
86
|
+
file_name: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
88
87
|
file_description: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
89
88
|
file_size: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
90
89
|
file_metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
91
90
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
91
|
+
} & {
|
|
92
|
+
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
93
|
+
ticket_id: z.ZodEffects<z.ZodString, string, string>;
|
|
92
94
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
93
95
|
status: Status;
|
|
94
96
|
organisation_id: string;
|
|
97
|
+
usage_type: string;
|
|
95
98
|
file_type: FileType;
|
|
96
99
|
file_url: string;
|
|
97
100
|
file_key: string;
|
|
101
|
+
file_name: string;
|
|
98
102
|
file_description: string;
|
|
99
103
|
file_size: number;
|
|
100
104
|
file_metadata: Record<string, any>;
|
|
@@ -102,10 +106,12 @@ declare const TicketSchema: z.ZodObject<{
|
|
|
102
106
|
}, {
|
|
103
107
|
status: Status;
|
|
104
108
|
organisation_id: string;
|
|
109
|
+
usage_type: string;
|
|
105
110
|
file_type: FileType;
|
|
106
111
|
ticket_id: string;
|
|
107
112
|
file_url?: string | undefined;
|
|
108
113
|
file_key?: string | undefined;
|
|
114
|
+
file_name?: string | undefined;
|
|
109
115
|
file_description?: string | undefined;
|
|
110
116
|
file_size?: unknown;
|
|
111
117
|
file_metadata?: Record<string, any> | undefined;
|
|
@@ -120,12 +126,14 @@ declare const TicketSchema: z.ZodObject<{
|
|
|
120
126
|
subject: string;
|
|
121
127
|
admin_message: string;
|
|
122
128
|
ticket_status: TicketStatus;
|
|
123
|
-
|
|
129
|
+
TicketFile: {
|
|
124
130
|
status: Status;
|
|
125
131
|
organisation_id: string;
|
|
132
|
+
usage_type: string;
|
|
126
133
|
file_type: FileType;
|
|
127
134
|
file_url: string;
|
|
128
135
|
file_key: string;
|
|
136
|
+
file_name: string;
|
|
129
137
|
file_description: string;
|
|
130
138
|
file_size: number;
|
|
131
139
|
file_metadata: Record<string, any>;
|
|
@@ -140,13 +148,15 @@ declare const TicketSchema: z.ZodObject<{
|
|
|
140
148
|
ticket_status: TicketStatus;
|
|
141
149
|
description?: string | undefined;
|
|
142
150
|
admin_message?: string | undefined;
|
|
143
|
-
|
|
151
|
+
TicketFile?: {
|
|
144
152
|
status: Status;
|
|
145
153
|
organisation_id: string;
|
|
154
|
+
usage_type: string;
|
|
146
155
|
file_type: FileType;
|
|
147
156
|
ticket_id: string;
|
|
148
157
|
file_url?: string | undefined;
|
|
149
158
|
file_key?: string | undefined;
|
|
159
|
+
file_name?: string | undefined;
|
|
150
160
|
file_description?: string | undefined;
|
|
151
161
|
file_size?: unknown;
|
|
152
162
|
file_metadata?: Record<string, any> | undefined;
|
|
@@ -251,10 +261,8 @@ declare const findTickets: (data: TicketQueryDTO) => Promise<FBR<Ticket[]>>;
|
|
|
251
261
|
declare const createTicket: (data: TicketDTO) => Promise<SBR>;
|
|
252
262
|
declare const updateTicket: (id: string, data: TicketDTO) => Promise<SBR>;
|
|
253
263
|
declare const deleteTicket: (id: string) => Promise<SBR>;
|
|
254
|
-
declare const
|
|
255
|
-
url: string;
|
|
256
|
-
}>>;
|
|
264
|
+
declare const getTicketFilePresignedUrl: (data: FilePresignedUrlDTO) => Promise<BR<AWSPresignedUrl>>;
|
|
257
265
|
declare const createTicketFile: (data: TicketFileDTO) => Promise<SBR>;
|
|
258
266
|
declare const removeTicketFile: (id: string) => Promise<SBR>;
|
|
259
267
|
|
|
260
|
-
export { type Ticket, type TicketDTO, type TicketFile, type TicketFileDTO, TicketFileSchema, type TicketQueryDTO, TicketQuerySchema, TicketSchema, createTicket, createTicketFile, deleteTicket, findTickets,
|
|
268
|
+
export { type Ticket, type TicketDTO, type TicketFile, type TicketFileDTO, TicketFileSchema, type TicketQueryDTO, TicketQuerySchema, TicketSchema, createTicket, createTicketFile, deleteTicket, findTickets, getTicketFilePresignedUrl, newTicketPayload, removeTicketFile, toTicketPayload, updateTicket };
|
|
@@ -9,10 +9,6 @@ var getAxiosInstance = () => {
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
// src/core/apiCall.ts
|
|
12
|
-
var apiGet = async (url, params) => {
|
|
13
|
-
const response = await getAxiosInstance().get(url, { params });
|
|
14
|
-
return response.data;
|
|
15
|
-
};
|
|
16
12
|
var apiPost = async (url, data) => {
|
|
17
13
|
const response = await getAxiosInstance().post(url, data);
|
|
18
14
|
return response.data;
|
|
@@ -274,20 +270,15 @@ var ENDPOINTS = {
|
|
|
274
270
|
update: (id) => `${URL}/${id}`,
|
|
275
271
|
delete: (id) => `${URL}/${id}`,
|
|
276
272
|
cache: `${URL}/cache`,
|
|
277
|
-
|
|
273
|
+
presigned_url: `${URL}/presigned_url`,
|
|
278
274
|
createFile: `${URL}/create_file`,
|
|
279
275
|
removeFile: (id) => `${URL}/remove_file/${id}`
|
|
280
276
|
};
|
|
281
|
-
var TicketFileSchema =
|
|
282
|
-
organisation_id:
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
file_key: stringOptional("File Key", 0, 300),
|
|
287
|
-
file_description: stringOptional("File Description", 0, 2e3),
|
|
288
|
-
file_size: numberOptional("File Size"),
|
|
289
|
-
file_metadata: dynamicJsonSchema("File Metadata", {}),
|
|
290
|
-
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
277
|
+
var TicketFileSchema = BaseFileSchema.extend({
|
|
278
|
+
organisation_id: single_select_optional("UserOrganisation"),
|
|
279
|
+
// ✅ Single-Selection -> UserOrganisation
|
|
280
|
+
ticket_id: single_select_optional("Ticket")
|
|
281
|
+
// ✅ Single-Selection -> Ticket
|
|
291
282
|
});
|
|
292
283
|
var TicketSchema = z3.object({
|
|
293
284
|
subject: stringMandatory("Subject", 3, 100),
|
|
@@ -301,8 +292,8 @@ var TicketSchema = z3.object({
|
|
|
301
292
|
organisation_id: single_select_mandatory("User Organisation"),
|
|
302
293
|
user_id: single_select_mandatory("User"),
|
|
303
294
|
admin_id: single_select_optional("User Admin"),
|
|
304
|
-
|
|
305
|
-
"
|
|
295
|
+
TicketFile: nestedArrayOfObjectsOptional(
|
|
296
|
+
"TicketFile",
|
|
306
297
|
TicketFileSchema,
|
|
307
298
|
[]
|
|
308
299
|
),
|
|
@@ -330,8 +321,21 @@ var toTicketPayload = (ticket) => ({
|
|
|
330
321
|
organisation_id: ticket.organisation_id,
|
|
331
322
|
user_id: ticket.user_id,
|
|
332
323
|
admin_id: ticket.admin_id ?? "",
|
|
333
|
-
|
|
334
|
-
|
|
324
|
+
status: ticket.status,
|
|
325
|
+
TicketFile: ticket.TicketFile?.map((file) => ({
|
|
326
|
+
organisation_id: file.organisation_id ?? "",
|
|
327
|
+
ticket_id: file.ticket_id ?? "",
|
|
328
|
+
ticket_file_id: file.ticket_file_id ?? "",
|
|
329
|
+
usage_type: file.usage_type,
|
|
330
|
+
file_type: file.file_type,
|
|
331
|
+
file_url: file.file_url || "",
|
|
332
|
+
file_key: file.file_key || "",
|
|
333
|
+
file_name: file.file_name || "",
|
|
334
|
+
file_description: file.file_description || "",
|
|
335
|
+
file_size: file.file_size ?? 0,
|
|
336
|
+
file_metadata: file.file_metadata ?? {},
|
|
337
|
+
status: file.status
|
|
338
|
+
})) ?? []
|
|
335
339
|
});
|
|
336
340
|
var newTicketPayload = () => ({
|
|
337
341
|
organisation_id: "",
|
|
@@ -341,7 +345,7 @@ var newTicketPayload = () => ({
|
|
|
341
345
|
description: "",
|
|
342
346
|
admin_message: "",
|
|
343
347
|
ticket_status: "Open" /* Open */,
|
|
344
|
-
|
|
348
|
+
TicketFile: [],
|
|
345
349
|
status: "Active" /* Active */
|
|
346
350
|
});
|
|
347
351
|
var findTickets = async (data) => {
|
|
@@ -356,8 +360,8 @@ var updateTicket = async (id, data) => {
|
|
|
356
360
|
var deleteTicket = async (id) => {
|
|
357
361
|
return apiDelete(ENDPOINTS.delete(id));
|
|
358
362
|
};
|
|
359
|
-
var
|
|
360
|
-
return
|
|
363
|
+
var getTicketFilePresignedUrl = async (data) => {
|
|
364
|
+
return apiPost(ENDPOINTS.presigned_url, data);
|
|
361
365
|
};
|
|
362
366
|
var createTicketFile = async (data) => {
|
|
363
367
|
return apiPost(ENDPOINTS.createFile, data);
|
|
@@ -373,7 +377,7 @@ export {
|
|
|
373
377
|
createTicketFile,
|
|
374
378
|
deleteTicket,
|
|
375
379
|
findTickets,
|
|
376
|
-
|
|
380
|
+
getTicketFilePresignedUrl,
|
|
377
381
|
newTicketPayload,
|
|
378
382
|
removeTicketFile,
|
|
379
383
|
toTicketPayload,
|