vms-nest-prisma-api-document 6.0.9 → 6.0.11

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.
Files changed (80) hide show
  1. package/dist/services/account/bookmark_service.d.ts +11 -11
  2. package/dist/services/account/notification_service.d.ts +87 -66
  3. package/dist/services/account/notification_service.js +94 -71
  4. package/dist/services/account/ticket_service.d.ts +3 -3
  5. package/dist/services/fleet/fuel_management/fleet_fuel_daily_summary_service.d.ts +1 -1
  6. package/dist/services/fleet/fuel_management/fleet_fuel_refill_service.d.ts +50 -50
  7. package/dist/services/fleet/fuel_management/fleet_fuel_refill_service.js +4 -18
  8. package/dist/services/fleet/fuel_management/fleet_fuel_removal_service.d.ts +30 -30
  9. package/dist/services/fleet/fuel_management/fleet_fuel_removal_service.js +11 -25
  10. package/dist/services/gps/features/geofence/gps_geofence_data_service.d.ts +1 -1
  11. package/dist/services/gps/features/geofence/gps_geofence_transaction_service.d.ts +1 -1
  12. package/dist/services/gps/features/geofence/gps_geofence_transaction_summary_service.d.ts +1 -1
  13. package/dist/services/gps/features/geofence/trip_geofence_to_geofence_service.d.ts +1 -1
  14. package/dist/services/gps/features/gps_live_track_share_link_service.d.ts +1 -1
  15. package/dist/services/gps/features/gps_track_history_share_link_service.d.ts +1 -1
  16. package/dist/services/main/devices/master_device_service.d.ts +1 -1
  17. package/dist/services/main/drivers/master_driver_service.d.ts +1 -1
  18. package/dist/services/main/sims/master_sim_service.d.ts +1 -1
  19. package/dist/services/main/users/auth_service.d.ts +1 -1
  20. package/dist/services/main/users/user_organisation_service.d.ts +1 -1
  21. package/dist/services/main/users/user_service.d.ts +1 -1
  22. package/dist/services/main/vehicle/childs/vehicle_odometer_history.d.ts +1 -1
  23. package/dist/services/main/vehicle/master_vehicle_service.d.ts +1 -1
  24. package/dist/services/master/device/master_device_manufacturer_service.d.ts +1 -1
  25. package/dist/services/master/device/master_device_model_service.d.ts +1 -1
  26. package/dist/services/master/device/master_device_type_service.d.ts +1 -1
  27. package/dist/services/master/expense/master_expense_name_service.d.ts +1 -1
  28. package/dist/services/master/expense/master_expense_type_service.d.ts +1 -1
  29. package/dist/services/master/expense/master_fuel_company_service.d.ts +6 -6
  30. package/dist/services/master/expense/master_vendor_document_type_service.d.ts +3 -3
  31. package/dist/services/master/expense/master_vendor_type_service.d.ts +1 -1
  32. package/dist/services/master/fleet/master_fleet_incident_severity_service.d.ts +1 -1
  33. package/dist/services/master/fleet/master_fleet_incident_status_service.d.ts +1 -1
  34. package/dist/services/master/fleet/master_fleet_incident_type_service.d.ts +1 -1
  35. package/dist/services/master/fleet/master_fleet_insurance_claim_status_service.d.ts +1 -1
  36. package/dist/services/master/fleet/master_fleet_service_task_service.d.ts +1 -1
  37. package/dist/services/master/main/master_main_country_service.d.ts +1 -1
  38. package/dist/services/master/main/master_main_currency_service.d.ts +1 -1
  39. package/dist/services/master/main/master_main_date_format_service.d.ts +1 -1
  40. package/dist/services/master/main/master_main_eway_bill_provider_service.d.ts +2 -2
  41. package/dist/services/master/main/master_main_fasttag_bank_service.d.ts +2 -2
  42. package/dist/services/master/main/master_main_industry_service.d.ts +1 -1
  43. package/dist/services/master/main/master_main_landmark_service.d.ts +1 -1
  44. package/dist/services/master/main/master_main_language_service.d.ts +1 -1
  45. package/dist/services/master/main/master_main_state_service.d.ts +1 -1
  46. package/dist/services/master/main/master_main_timezone_service.d.ts +1 -1
  47. package/dist/services/master/main/master_main_unit_distance_service.d.ts +1 -1
  48. package/dist/services/master/main/master_main_unit_mileage_service.d.ts +1 -1
  49. package/dist/services/master/main/master_main_unit_volume_service.d.ts +1 -1
  50. package/dist/services/master/organisation/organisation_branch_service.d.ts +1 -1
  51. package/dist/services/master/organisation/organisation_color_service.d.ts +1 -1
  52. package/dist/services/master/organisation/organisation_group_service.d.ts +1 -1
  53. package/dist/services/master/organisation/organisation_sub_company_service.d.ts +1 -1
  54. package/dist/services/master/organisation/organisation_tag_service.d.ts +1 -1
  55. package/dist/services/master/spare_part/master_spare_part_category_service.d.ts +1 -1
  56. package/dist/services/master/spare_part/master_spare_part_sub_category_service.d.ts +1 -1
  57. package/dist/services/master/spare_part/master_spare_part_unit_service.d.ts +1 -1
  58. package/dist/services/master/trip/master_trip_party_type_service.d.ts +1 -1
  59. package/dist/services/master/tyre/master_tyre_grade_service.d.ts +1 -1
  60. package/dist/services/master/tyre/master_tyre_make_service.d.ts +1 -1
  61. package/dist/services/master/tyre/master_tyre_model_service.d.ts +1 -1
  62. package/dist/services/master/user/master_user_role_service.d.ts +1 -1
  63. package/dist/services/master/user/master_user_status_service.d.ts +1 -1
  64. package/dist/services/master/vehicle/master_vehicle_associated_to_service.d.ts +3 -3
  65. package/dist/services/master/vehicle/master_vehicle_document_type_service.d.ts +3 -3
  66. package/dist/services/master/vehicle/master_vehicle_fuel_removal_reason_service.d.ts +3 -3
  67. package/dist/services/master/vehicle/master_vehicle_fuel_type_service.d.ts +1 -1
  68. package/dist/services/master/vehicle/master_vehicle_fuel_unit_service.d.ts +1 -1
  69. package/dist/services/master/vehicle/master_vehicle_make_service.d.ts +1 -1
  70. package/dist/services/master/vehicle/master_vehicle_model_service.d.ts +1 -1
  71. package/dist/services/master/vehicle/master_vehicle_ownership_type_service.d.ts +1 -1
  72. package/dist/services/master/vehicle/master_vehicle_status_type_service.d.ts +1 -1
  73. package/dist/services/master/vehicle/master_vehicle_sub_model_service.d.ts +1 -1
  74. package/dist/services/master/vehicle/master_vehicle_type_service.d.ts +1 -1
  75. package/dist/services/website/contact_us_detail_service.d.ts +1 -1
  76. package/dist/services/website/faq_service.d.ts +1 -1
  77. package/package.json +1 -1
  78. package/dist/services/account/alert_service.d.ts +0 -271
  79. package/dist/services/account/alert_service.js +0 -413
  80. package/dist/{user_organisation_service-BCKBv8_Z.d.ts → user_organisation_service-Cx3ffrVp.d.ts} +4 -4
@@ -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-BCKBv8_Z.js';
4
+ import { U as UserOrganisation, a as User } from '../../user_organisation_service-Cx3ffrVp.js';
5
5
  import '../../zod_utils/zod_base_schema.js';
6
6
  import '../master/main/master_main_sim_provider_service.js';
7
7
 
@@ -40,12 +40,9 @@ declare const BookMarkSchema: z.ZodObject<{
40
40
  sub_item_url: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
41
41
  status: z.ZodType<Status, z.ZodTypeDef, Status>;
42
42
  }, "strip", z.ZodTypeAny, {
43
- status: Status;
44
- organisation_id: string;
45
- user_id: string;
46
- group_name: string;
47
43
  module_name: string;
48
44
  menu_type: MenuType;
45
+ group_name: string;
49
46
  group_name_language: string;
50
47
  group_icon: string;
51
48
  group_url: string;
@@ -53,16 +50,19 @@ declare const BookMarkSchema: z.ZodObject<{
53
50
  sub_item_name_language: string;
54
51
  sub_item_icon: string;
55
52
  sub_item_url: string;
56
- }, {
57
53
  status: Status;
58
54
  organisation_id: string;
59
55
  user_id: string;
60
- group_name: string;
56
+ }, {
61
57
  module_name: string;
62
58
  menu_type: MenuType;
59
+ group_name: string;
63
60
  group_name_language: string;
64
61
  group_icon: string;
65
62
  group_url: string;
63
+ status: Status;
64
+ organisation_id: string;
65
+ user_id: string;
66
66
  sub_item_name?: string | undefined;
67
67
  sub_item_name_language?: string | undefined;
68
68
  sub_item_icon?: string | undefined;
@@ -105,8 +105,8 @@ declare const BookMarkQuerySchema: z.ZodObject<{
105
105
  bookmark_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
106
106
  menu_type: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof MenuType>, "many">>>;
107
107
  }, "strip", z.ZodTypeAny, {
108
+ menu_type: MenuType[];
108
109
  status: Status[];
109
- user_ids: string[];
110
110
  search: string;
111
111
  paging: PAGING;
112
112
  page_count: number;
@@ -128,13 +128,13 @@ declare const BookMarkQuerySchema: z.ZodObject<{
128
128
  date_format_id: string;
129
129
  time_zone_id: string;
130
130
  organisation_ids: string[];
131
- menu_type: MenuType[];
131
+ user_ids: string[];
132
132
  bookmark_ids: string[];
133
133
  }, {
134
134
  date_format_id: string;
135
135
  time_zone_id: string;
136
+ menu_type?: MenuType[] | undefined;
136
137
  status?: Status[] | undefined;
137
- user_ids?: string[] | undefined;
138
138
  search?: string | undefined;
139
139
  paging?: PAGING | undefined;
140
140
  page_count?: unknown;
@@ -154,7 +154,7 @@ declare const BookMarkQuerySchema: z.ZodObject<{
154
154
  }[] | undefined;
155
155
  include_master_data?: YesNo | undefined;
156
156
  organisation_ids?: string[] | undefined;
157
- menu_type?: MenuType[] | undefined;
157
+ user_ids?: string[] | undefined;
158
158
  bookmark_ids?: string[] | undefined;
159
159
  }>;
160
160
  type BookMarkQueryDTO = z.infer<typeof BookMarkQuerySchema>;
@@ -1,76 +1,91 @@
1
- import { YesNo, Status, PAGING, LoadParents, LoadChild, LoadChildCount, OrderBy } from '../../core/Enums.js';
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 { Alert } from './alert_service.js';
5
- import { U as UserOrganisation, a as User } from '../../user_organisation_service-BCKBv8_Z.js';
4
+ import { U as UserOrganisation, a as User, M as MasterVehicle, b as MasterDriver } from '../../user_organisation_service-Cx3ffrVp.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
- is_push_sent?: YesNo;
14
- is_sms_sent?: YesNo;
15
- is_whatsapp_sent?: YesNo;
16
- is_email_sent?: YesNo;
17
- mobile_numbers?: string;
18
- emails?: string;
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?: UserOrganisation;
24
- alert_id: string;
25
- Alert?: Alert;
26
- NotificationUserLink?: NotificationUserLink[];
27
- }
28
- interface NotificationUserLink extends Record<string, unknown> {
29
- alert_user_link_id: string;
30
- notification_id: string;
31
- Notification?: Notification;
32
- user_id: string;
33
- User?: User;
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
- is_push_sent: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
39
- is_sms_sent: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
40
- is_whatsapp_sent: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
41
- is_email_sent: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
42
- mobile_numbers: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
43
- emails: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
44
- alert_id: z.ZodEffects<z.ZodString, string, string>;
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
- notification_title: string;
50
- notification_message: string;
51
- is_push_sent: YesNo;
52
- is_sms_sent: YesNo;
53
- is_whatsapp_sent: YesNo;
54
- is_email_sent: YesNo;
55
- mobile_numbers: string;
56
- emails: string;
57
58
  status: Status;
58
59
  organisation_id: string;
59
- alert_id: string;
60
- user_ids: string[];
61
- }, {
60
+ user_id: string;
61
+ driver_id: string;
62
+ vehicle_id: string;
63
+ gps_geofence_id: string;
62
64
  notification_title: string;
63
65
  notification_message: string;
66
+ notification_html_message: string;
67
+ notification_key_1: string;
68
+ notification_key_2: string;
69
+ notification_key_3: string;
70
+ notification_key_4: string;
71
+ notification_key_5: string;
72
+ notification_key_6: string;
73
+ }, {
64
74
  status: Status;
65
75
  organisation_id: string;
66
- alert_id: string;
67
- is_push_sent?: YesNo | undefined;
68
- is_sms_sent?: YesNo | undefined;
69
- is_whatsapp_sent?: YesNo | undefined;
70
- is_email_sent?: YesNo | undefined;
71
- mobile_numbers?: string | undefined;
72
- emails?: string | undefined;
73
- user_ids?: string[] | undefined;
76
+ user_id: string;
77
+ driver_id: string;
78
+ vehicle_id: string;
79
+ gps_geofence_id: string;
80
+ notification_title: string;
81
+ notification_message: string;
82
+ notification_html_message?: string | undefined;
83
+ notification_key_1?: string | undefined;
84
+ notification_key_2?: string | undefined;
85
+ notification_key_3?: string | undefined;
86
+ notification_key_4?: string | undefined;
87
+ notification_key_5?: string | undefined;
88
+ notification_key_6?: string | undefined;
74
89
  }>;
75
90
  type NotificationDTO = z.infer<typeof NotificationSchema>;
76
91
  declare const NotificationQuerySchema: z.ZodObject<{
@@ -104,18 +119,16 @@ 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
- is_push_sent: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof YesNo>, "many">>>;
111
- is_sms_sent: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof YesNo>, "many">>>;
112
- is_whatsapp_sent: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof YesNo>, "many">>>;
113
- is_email_sent: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof YesNo>, "many">>>;
123
+ organisation_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
124
+ user_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
125
+ vehicle_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
126
+ driver_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
127
+ gps_geofence_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
128
+ module: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Module>, "many">>>;
129
+ alert_type: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof AlertType>, "many">>>;
130
+ alert_sub_type: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof AlertSubType>, "many">>>;
114
131
  }, "strip", z.ZodTypeAny, {
115
- is_push_sent: YesNo[];
116
- is_sms_sent: YesNo[];
117
- is_whatsapp_sent: YesNo[];
118
- is_email_sent: YesNo[];
119
132
  status: Status[];
120
133
  search: string;
121
134
  paging: PAGING;
@@ -137,16 +150,18 @@ declare const NotificationQuerySchema: z.ZodObject<{
137
150
  include_master_data: YesNo;
138
151
  date_format_id: string;
139
152
  time_zone_id: string;
140
- alert_ids: string[];
141
153
  organisation_ids: string[];
154
+ user_ids: string[];
155
+ vehicle_ids: string[];
156
+ driver_ids: string[];
157
+ module: Module.ABC[];
158
+ alert_type: AlertType.ABC[];
159
+ alert_sub_type: AlertSubType.ABC[];
142
160
  notification_ids: string[];
161
+ gps_geofence_ids: string[];
143
162
  }, {
144
163
  date_format_id: string;
145
164
  time_zone_id: string;
146
- is_push_sent?: YesNo[] | undefined;
147
- is_sms_sent?: YesNo[] | undefined;
148
- is_whatsapp_sent?: YesNo[] | undefined;
149
- is_email_sent?: YesNo[] | undefined;
150
165
  status?: Status[] | undefined;
151
166
  search?: string | undefined;
152
167
  paging?: PAGING | undefined;
@@ -166,16 +181,22 @@ declare const NotificationQuerySchema: z.ZodObject<{
166
181
  direction: OrderBy;
167
182
  }[] | undefined;
168
183
  include_master_data?: YesNo | undefined;
169
- alert_ids?: string[] | undefined;
170
184
  organisation_ids?: string[] | undefined;
185
+ user_ids?: string[] | undefined;
186
+ vehicle_ids?: string[] | undefined;
187
+ driver_ids?: string[] | undefined;
188
+ module?: Module.ABC[] | undefined;
189
+ alert_type?: AlertType.ABC[] | undefined;
190
+ alert_sub_type?: AlertSubType.ABC[] | undefined;
171
191
  notification_ids?: string[] | undefined;
192
+ gps_geofence_ids?: string[] | undefined;
172
193
  }>;
173
194
  type NotificationQueryDTO = z.infer<typeof NotificationQuerySchema>;
174
- declare const toNotificationPayload: (notification: Notification) => NotificationDTO;
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, type NotificationUserLink, createNotification, deleteNotification, findNotifications, newNotificationPayload, toNotificationPayload, updateNotification };
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__ */ ((YesNo2) => {
179
- YesNo2["Yes"] = "Yes";
180
- YesNo2["No"] = "No";
181
- return YesNo2;
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
- is_push_sent: enumOptional("Is Push Sent", YesNo, "No" /* No */),
243
- is_sms_sent: enumOptional("Is SMS Sent", YesNo, "No" /* No */),
244
- is_whatsapp_sent: enumOptional("Is WhatsApp Sent", YesNo, "No" /* No */),
245
- is_email_sent: enumOptional("Is Email Sent", YesNo, "No" /* No */),
246
- mobile_numbers: stringOptional("Mobile Numbers", 0, 300),
247
- emails: stringOptional("Emails", 0, 300),
248
- alert_id: single_select_mandatory("Alert"),
249
- organisation_id: single_select_mandatory("Organisation"),
250
- user_ids: multi_select_optional("User"),
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
- is_push_sent: enumArrayOptional(
258
- "Is Push Sent",
259
- YesNo,
260
- getAllEnums(YesNo),
261
- 0,
262
- 10,
263
- true
264
- ),
265
- is_sms_sent: enumArrayOptional(
266
- "Is SMS Sent",
267
- YesNo,
268
- getAllEnums(YesNo),
269
- 0,
270
- 10,
271
- true
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
- is_email_sent: enumArrayOptional(
282
- "Is Email Sent",
283
- YesNo,
284
- getAllEnums(YesNo),
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 = (notification) => ({
291
- notification_title: notification.notification_title,
292
- notification_message: notification.notification_message,
293
- is_push_sent: notification.is_push_sent ?? "No" /* No */,
294
- is_sms_sent: notification.is_sms_sent ?? "No" /* No */,
295
- is_whatsapp_sent: notification.is_whatsapp_sent ?? "No" /* No */,
296
- is_email_sent: notification.is_email_sent ?? "No" /* No */,
297
- mobile_numbers: notification.mobile_numbers ?? "",
298
- emails: notification.emails ?? "",
299
- alert_id: notification.alert_id,
300
- organisation_id: notification.organisation_id,
301
- user_ids: [],
302
- status: notification.status
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
- is_push_sent: "No" /* No */,
308
- is_sms_sent: "No" /* No */,
309
- is_whatsapp_sent: "No" /* No */,
310
- is_email_sent: "No" /* No */,
311
- mobile_numbers: "",
312
- emails: "",
313
- alert_id: "",
314
- organisation_id: "",
315
- user_ids: [],
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-BCKBv8_Z.js';
4
+ import { U as UserOrganisation, a as User } from '../../user_organisation_service-Cx3ffrVp.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-BCKBv8_Z.js';
4
+ import { U as UserOrganisation, a as User, M as MasterVehicle, b as MasterDriver, c as MasterDevice } from '../../../user_organisation_service-Cx3ffrVp.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';