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.
Files changed (81) hide show
  1. package/dist/core/Enums.d.ts +28 -12
  2. package/dist/core/Enums.js +34 -14
  3. package/dist/services/account/bookmark_service.d.ts +1 -1
  4. package/dist/services/{gps/features/user_notification_preferences.service.d.ts → account/notification_preferences.service.d.ts} +82 -50
  5. package/dist/services/{gps/features/user_notification_preferences.service.js → account/notification_preferences.service.js} +80 -63
  6. package/dist/services/{gps/features/user_report_preferences.service.d.ts → account/report_preferences.service.d.ts} +64 -53
  7. package/dist/services/{gps/features/user_report_preferences.service.js → account/report_preferences.service.js} +52 -19
  8. package/dist/services/account/ticket_service.d.ts +39 -31
  9. package/dist/services/account/ticket_service.js +27 -23
  10. package/dist/services/fleet/fuel_management/fleet_fuel_daily_summary_service.d.ts +1 -1
  11. package/dist/services/fleet/fuel_management/fleet_fuel_refill_service.d.ts +1 -1
  12. package/dist/services/fleet/fuel_management/fleet_fuel_removal_service.d.ts +1 -1
  13. package/dist/services/gps/features/geofence/gps_geofence_service.d.ts +28 -28
  14. package/dist/services/gps/features/geofence/gps_geofence_transaction_service.d.ts +16 -16
  15. package/dist/services/gps/features/geofence/gps_geofence_transaction_summary_service.d.ts +11 -11
  16. package/dist/services/gps/features/geofence/trip_geofence_to_geofence_service.d.ts +7 -7
  17. package/dist/services/gps/features/gps_live_track_share_link_service.d.ts +79 -64
  18. package/dist/services/gps/features/gps_live_track_share_link_service.js +62 -84
  19. package/dist/services/gps/features/gps_track_history_share_link_service.d.ts +69 -47
  20. package/dist/services/gps/features/gps_track_history_share_link_service.js +68 -44
  21. package/dist/services/gps/reports/gps_reports_mongo_service.d.ts +46 -46
  22. package/dist/services/main/devices/master_device_service.d.ts +1 -1
  23. package/dist/services/main/drivers/master_driver_service.d.ts +1 -1
  24. package/dist/services/main/sims/master_sim_service.d.ts +1 -1
  25. package/dist/services/main/users/auth_service.d.ts +1 -1
  26. package/dist/services/main/users/user_organisation_service.d.ts +1 -1
  27. package/dist/services/main/users/user_organisation_service.js +73 -63
  28. package/dist/services/main/users/user_service.d.ts +1 -1
  29. package/dist/services/main/vehicle/childs/vehicle_odometer_history.d.ts +1 -1
  30. package/dist/services/main/vehicle/master_vehicle_service.d.ts +1 -1
  31. package/dist/services/master/device/master_device_manufacturer_service.d.ts +1 -1
  32. package/dist/services/master/device/master_device_model_service.d.ts +1 -1
  33. package/dist/services/master/device/master_device_type_service.d.ts +1 -1
  34. package/dist/services/master/expense/master_expense_name_service.d.ts +1 -1
  35. package/dist/services/master/expense/master_expense_type_service.d.ts +1 -1
  36. package/dist/services/master/expense/master_fuel_company_service.d.ts +6 -6
  37. package/dist/services/master/expense/master_vendor_document_type_service.d.ts +3 -3
  38. package/dist/services/master/expense/master_vendor_type_service.d.ts +1 -1
  39. package/dist/services/master/fleet/master_fleet_incident_severity_service.d.ts +1 -1
  40. package/dist/services/master/fleet/master_fleet_incident_status_service.d.ts +1 -1
  41. package/dist/services/master/fleet/master_fleet_incident_type_service.d.ts +1 -1
  42. package/dist/services/master/fleet/master_fleet_insurance_claim_status_service.d.ts +1 -1
  43. package/dist/services/master/fleet/master_fleet_service_task_service.d.ts +1 -1
  44. package/dist/services/master/main/master_main_country_service.d.ts +1 -1
  45. package/dist/services/master/main/master_main_currency_service.d.ts +1 -1
  46. package/dist/services/master/main/master_main_date_format_service.d.ts +1 -1
  47. package/dist/services/master/main/master_main_industry_service.d.ts +1 -1
  48. package/dist/services/master/main/master_main_landmark_service.d.ts +4 -4
  49. package/dist/services/master/main/master_main_language_service.d.ts +1 -1
  50. package/dist/services/master/main/master_main_state_service.d.ts +1 -1
  51. package/dist/services/master/main/master_main_timezone_service.d.ts +1 -1
  52. package/dist/services/master/main/master_main_unit_distance_service.d.ts +1 -1
  53. package/dist/services/master/main/master_main_unit_mileage_service.d.ts +1 -1
  54. package/dist/services/master/main/master_main_unit_volume_service.d.ts +1 -1
  55. package/dist/services/master/organisation/organisation_branch_service.d.ts +1 -1
  56. package/dist/services/master/organisation/organisation_color_service.d.ts +1 -1
  57. package/dist/services/master/organisation/organisation_group_service.d.ts +1 -1
  58. package/dist/services/master/organisation/organisation_sub_company_service.d.ts +1 -1
  59. package/dist/services/master/organisation/organisation_tag_service.d.ts +1 -1
  60. package/dist/services/master/spare_part/master_spare_part_category_service.d.ts +1 -1
  61. package/dist/services/master/spare_part/master_spare_part_sub_category_service.d.ts +1 -1
  62. package/dist/services/master/spare_part/master_spare_part_unit_service.d.ts +1 -1
  63. package/dist/services/master/trip/master_trip_party_type_service.d.ts +1 -1
  64. package/dist/services/master/tyre/master_tyre_grade_service.d.ts +1 -1
  65. package/dist/services/master/tyre/master_tyre_make_service.d.ts +1 -1
  66. package/dist/services/master/tyre/master_tyre_model_service.d.ts +1 -1
  67. package/dist/services/master/user/master_user_role_service.d.ts +1 -1
  68. package/dist/services/master/user/master_user_status_service.d.ts +1 -1
  69. package/dist/services/master/vehicle/master_vehicle_associated_to_service.d.ts +1 -1
  70. package/dist/services/master/vehicle/master_vehicle_document_type_service.d.ts +1 -1
  71. package/dist/services/master/vehicle/master_vehicle_fuel_removal_reason_service.d.ts +1 -1
  72. package/dist/services/master/vehicle/master_vehicle_fuel_type_service.d.ts +1 -1
  73. package/dist/services/master/vehicle/master_vehicle_fuel_unit_service.d.ts +1 -1
  74. package/dist/services/master/vehicle/master_vehicle_make_service.d.ts +1 -1
  75. package/dist/services/master/vehicle/master_vehicle_model_service.d.ts +1 -1
  76. package/dist/services/master/vehicle/master_vehicle_ownership_type_service.d.ts +1 -1
  77. package/dist/services/master/vehicle/master_vehicle_status_type_service.d.ts +1 -1
  78. package/dist/services/master/vehicle/master_vehicle_sub_model_service.d.ts +1 -1
  79. package/dist/services/master/vehicle/master_vehicle_type_service.d.ts +1 -1
  80. package/dist/{user_organisation_service-C-FbPQmd.d.ts → user_organisation_service-B5QmuUSK.d.ts} +90 -64
  81. package/package.json +1 -1
@@ -136,12 +136,6 @@ declare enum DeviceType {
136
136
  IPhone = "IPhone",
137
137
  Web = "Web"
138
138
  }
139
- declare enum NotificationType {
140
- Whatsapp = "Whatsapp",
141
- Message = "Message",
142
- Email = "Email",
143
- Push = "Push"
144
- }
145
139
  declare enum ReportList {
146
140
  AllVehiclesFullAnalysisReport = "AllVehiclesFullAnalysisReport",
147
141
  AllDriversPerformanceReport = "AllDriversPerformanceReport",
@@ -157,6 +151,33 @@ declare enum ReportList {
157
151
  FuelRefillReport = "FuelRefillReport",
158
152
  FuelRemovalReport = "FuelRemovalReport"
159
153
  }
154
+ declare enum NotificationList {
155
+ VehicleMoving = "VehicleMoving",
156
+ VehicleStopped = "VehicleStopped",
157
+ IgnitionOn = "IgnitionOn",
158
+ IgnitionOff = "IgnitionOff",
159
+ GeofenceEnter = "GeofenceEnter",
160
+ GeofenceExit = "GeofenceExit",
161
+ FuelSuddenIncrease = "FuelSuddenIncrease",
162
+ FuelSuddenDecrease = "FuelSuddenDecrease",
163
+ OverSpeed = "OverSpeed"
164
+ }
165
+ declare enum NotificationChannel {
166
+ Push = "Push",
167
+ WhatsApp = "WhatsApp",
168
+ SMS = "SMS",
169
+ Email = "Email"
170
+ }
171
+ declare enum ReportChannel {
172
+ WhatsApp = "WhatsApp",
173
+ SMS = "SMS",
174
+ Email = "Email"
175
+ }
176
+ declare enum ReportType {
177
+ Daily = "Daily",
178
+ Weekly = "Weekly",
179
+ Monthly = "Monthly"
180
+ }
160
181
  declare enum NotificationPreference {
161
182
  VehicleMoving = "VehicleMoving",
162
183
  VehicleStopped = "VehicleStopped",
@@ -173,11 +194,6 @@ declare enum NotificationPreference {
173
194
  OverSpeed110 = "OverSpeed110",
174
195
  OverSpeed120 = "OverSpeed120"
175
196
  }
176
- declare enum ReportType {
177
- Daily = "Daily",
178
- Weekly = "Weekly",
179
- Monthly = "Monthly"
180
- }
181
197
  declare enum GeofenceType {
182
198
  Polygon = "Polygon",
183
199
  Circle = "Circle"
@@ -628,4 +644,4 @@ declare enum PaymentMode {
628
644
  Other = "Other"
629
645
  }
630
646
 
631
- export { AdminRole, AlertSubType, AlertType, BillingStatus, BooleanType, DeviceStatus, DeviceType, DocumentStatus, DocumentType, DocumentValidityStatus, DoorSensorStatus, ExpenseCategory, FileType, FleetSize, GPSFuelApproveStatus, GPSSource, GPSType, GeofencePurposeType, GeofenceStatusType, GeofenceType, InspectionActionStatus, InspectionStatus, InspectionType, Is12AM, IssueSeverity, IssueSource, IssueStatus, JobCardStatus, LifeExpiry, LinkStatus, LinkType, LoadChild, LoadChildCount, LoadParents, LoginFrom, MenuType, Module, NightDriving, NotificationPreference, NotificationType, OdometerSource, OnOff, OrderBy, OverSpeed, PAGING, PaymentMode, PaymentStatus, Priority, PurchaseOrderStatus, PurchaseType, PurchaseVehicleType, RecurrenceInterval, RefillEntrySource, RefillMethod, ReminderSource, ReminderStatus, ReminderTriggerType, ReportList, ReportType, RequestType, RetreadingMethod, ScheduleStatus, ScheduleType, ServiceType, SimStatus, Status, StockType, TicketStatus, TimeSlot, TrackHistoryLinkStatus, TyreStatus, VerifyStatus, YesNo };
647
+ export { AdminRole, AlertSubType, AlertType, BillingStatus, BooleanType, DeviceStatus, DeviceType, DocumentStatus, DocumentType, DocumentValidityStatus, DoorSensorStatus, ExpenseCategory, FileType, FleetSize, GPSFuelApproveStatus, GPSSource, GPSType, GeofencePurposeType, GeofenceStatusType, GeofenceType, InspectionActionStatus, InspectionStatus, InspectionType, Is12AM, IssueSeverity, IssueSource, IssueStatus, JobCardStatus, LifeExpiry, LinkStatus, LinkType, LoadChild, LoadChildCount, LoadParents, LoginFrom, MenuType, Module, NightDriving, NotificationChannel, NotificationList, NotificationPreference, OdometerSource, OnOff, OrderBy, OverSpeed, PAGING, PaymentMode, PaymentStatus, Priority, PurchaseOrderStatus, PurchaseType, PurchaseVehicleType, RecurrenceInterval, RefillEntrySource, RefillMethod, ReminderSource, ReminderStatus, ReminderTriggerType, ReportChannel, ReportList, ReportType, RequestType, RetreadingMethod, ScheduleStatus, ScheduleType, ServiceType, SimStatus, Status, StockType, TicketStatus, TimeSlot, TrackHistoryLinkStatus, TyreStatus, VerifyStatus, YesNo };
@@ -163,13 +163,6 @@ var DeviceType = /* @__PURE__ */ ((DeviceType2) => {
163
163
  DeviceType2["Web"] = "Web";
164
164
  return DeviceType2;
165
165
  })(DeviceType || {});
166
- var NotificationType = /* @__PURE__ */ ((NotificationType2) => {
167
- NotificationType2["Whatsapp"] = "Whatsapp";
168
- NotificationType2["Message"] = "Message";
169
- NotificationType2["Email"] = "Email";
170
- NotificationType2["Push"] = "Push";
171
- return NotificationType2;
172
- })(NotificationType || {});
173
166
  var ReportList = /* @__PURE__ */ ((ReportList2) => {
174
167
  ReportList2["AllVehiclesFullAnalysisReport"] = "AllVehiclesFullAnalysisReport";
175
168
  ReportList2["AllDriversPerformanceReport"] = "AllDriversPerformanceReport";
@@ -186,6 +179,37 @@ var ReportList = /* @__PURE__ */ ((ReportList2) => {
186
179
  ReportList2["FuelRemovalReport"] = "FuelRemovalReport";
187
180
  return ReportList2;
188
181
  })(ReportList || {});
182
+ var NotificationList = /* @__PURE__ */ ((NotificationList2) => {
183
+ NotificationList2["VehicleMoving"] = "VehicleMoving";
184
+ NotificationList2["VehicleStopped"] = "VehicleStopped";
185
+ NotificationList2["IgnitionOn"] = "IgnitionOn";
186
+ NotificationList2["IgnitionOff"] = "IgnitionOff";
187
+ NotificationList2["GeofenceEnter"] = "GeofenceEnter";
188
+ NotificationList2["GeofenceExit"] = "GeofenceExit";
189
+ NotificationList2["FuelSuddenIncrease"] = "FuelSuddenIncrease";
190
+ NotificationList2["FuelSuddenDecrease"] = "FuelSuddenDecrease";
191
+ NotificationList2["OverSpeed"] = "OverSpeed";
192
+ return NotificationList2;
193
+ })(NotificationList || {});
194
+ var NotificationChannel = /* @__PURE__ */ ((NotificationChannel2) => {
195
+ NotificationChannel2["Push"] = "Push";
196
+ NotificationChannel2["WhatsApp"] = "WhatsApp";
197
+ NotificationChannel2["SMS"] = "SMS";
198
+ NotificationChannel2["Email"] = "Email";
199
+ return NotificationChannel2;
200
+ })(NotificationChannel || {});
201
+ var ReportChannel = /* @__PURE__ */ ((ReportChannel2) => {
202
+ ReportChannel2["WhatsApp"] = "WhatsApp";
203
+ ReportChannel2["SMS"] = "SMS";
204
+ ReportChannel2["Email"] = "Email";
205
+ return ReportChannel2;
206
+ })(ReportChannel || {});
207
+ var ReportType = /* @__PURE__ */ ((ReportType2) => {
208
+ ReportType2["Daily"] = "Daily";
209
+ ReportType2["Weekly"] = "Weekly";
210
+ ReportType2["Monthly"] = "Monthly";
211
+ return ReportType2;
212
+ })(ReportType || {});
189
213
  var NotificationPreference = /* @__PURE__ */ ((NotificationPreference2) => {
190
214
  NotificationPreference2["VehicleMoving"] = "VehicleMoving";
191
215
  NotificationPreference2["VehicleStopped"] = "VehicleStopped";
@@ -203,12 +227,6 @@ var NotificationPreference = /* @__PURE__ */ ((NotificationPreference2) => {
203
227
  NotificationPreference2["OverSpeed120"] = "OverSpeed120";
204
228
  return NotificationPreference2;
205
229
  })(NotificationPreference || {});
206
- var ReportType = /* @__PURE__ */ ((ReportType2) => {
207
- ReportType2["Daily"] = "Daily";
208
- ReportType2["Weekly"] = "Weekly";
209
- ReportType2["Monthly"] = "Monthly";
210
- return ReportType2;
211
- })(ReportType || {});
212
230
  var GeofenceType = /* @__PURE__ */ ((GeofenceType2) => {
213
231
  GeofenceType2["Polygon"] = "Polygon";
214
232
  GeofenceType2["Circle"] = "Circle";
@@ -740,8 +758,9 @@ export {
740
758
  MenuType,
741
759
  Module,
742
760
  NightDriving,
761
+ NotificationChannel,
762
+ NotificationList,
743
763
  NotificationPreference,
744
- NotificationType,
745
764
  OdometerSource,
746
765
  OnOff,
747
766
  OrderBy,
@@ -759,6 +778,7 @@ export {
759
778
  ReminderSource,
760
779
  ReminderStatus,
761
780
  ReminderTriggerType,
781
+ ReportChannel,
762
782
  ReportList,
763
783
  ReportType,
764
784
  RequestType,
@@ -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-C-FbPQmd.js';
4
+ import { U as UserOrganisation, a as User } from '../../user_organisation_service-B5QmuUSK.js';
5
5
  import '../../zod_utils/zod_base_schema.js';
6
6
  import '../master/main/master_main_sim_provider_service.js';
7
7
 
@@ -1,97 +1,126 @@
1
- import { OnOff, NotificationType, NotificationPreference, YesNo, Status, PAGING, LoadParents, LoadChild, LoadChildCount, OrderBy } from '../../../core/Enums.js';
2
- import { FBR, SBR } from '../../../core/BaseResponse.js';
1
+ import { OnOff, NotificationChannel, YesNo, NotificationList, 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, a as User, M as MasterVehicle } from '../../../user_organisation_service-C-FbPQmd.js';
5
- import '../../../zod_utils/zod_base_schema.js';
6
- import '../../master/main/master_main_sim_provider_service.js';
4
+ import { U as UserOrganisation, M as MasterVehicle, a as User } from '../../user_organisation_service-B5QmuUSK.js';
5
+ import { GPSGeofence } from '../gps/features/geofence/gps_geofence_service.js';
6
+ import '../../zod_utils/zod_base_schema.js';
7
+ import '../master/main/master_main_sim_provider_service.js';
7
8
 
8
- interface UserNotificationPreferences extends Record<string, unknown> {
9
+ interface OrganisationNotificationPreference extends Record<string, unknown> {
9
10
  notification_preference_id: string;
10
11
  notification_name: string;
11
12
  notification_status: OnOff;
12
- notification_types: NotificationType[];
13
- notification_list: NotificationPreference[];
13
+ notification_channels: NotificationChannel[];
14
14
  mobile_numbers?: string;
15
15
  email_ids?: string;
16
16
  cc_email_ids?: string;
17
+ all_users: YesNo;
18
+ notification_list: NotificationList[];
19
+ over_speed_limit?: number;
20
+ all_geofences: YesNo;
17
21
  all_vehicles: YesNo;
18
22
  status: Status;
19
23
  added_date_time: string;
20
24
  modified_date_time: string;
21
25
  organisation_id: string;
22
26
  UserOrganisation?: UserOrganisation;
23
- UserNotificationPreferenceUserLink: UserNotificationPreferenceUserLink[];
24
- UserNotificationPreferenceVehicleLink: UserNotificationPreferenceVehicleLink[];
27
+ OrganisationNotificationPreferenceVehicleLink: OrganisationNotificationPreferenceVehicleLink[];
28
+ OrganisationNotificationPreferenceGeofenceLink: OrganisationNotificationPreferenceGeofenceLink[];
29
+ OrganisationNotificationPreferenceUserLink: OrganisationNotificationPreferenceUserLink[];
25
30
  _count?: {
26
- UserNotificationPreferenceUserLink: number;
27
- UserNotificationPreferenceVehicleLink: number;
31
+ OrganisationNotificationPreferenceVehicleLink: number;
32
+ OrganisationNotificationPreferenceGeofenceLink: number;
33
+ OrganisationNotificationPreferenceUserLink: number;
28
34
  };
29
35
  }
30
- interface UserNotificationPreferenceVehicleLink extends Record<string, unknown> {
31
- notification_vehicle_id: string;
36
+ interface OrganisationNotificationPreferenceVehicleLink extends Record<string, unknown> {
37
+ notification_preference_geofence_id: string;
32
38
  status: Status;
33
39
  added_date_time: string;
34
40
  modified_date_time: string;
41
+ notification_preference_id: string;
42
+ OrganisationNotificationPreference?: OrganisationNotificationPreference;
35
43
  vehicle_id: string;
36
44
  MasterVehicle?: MasterVehicle;
37
45
  vehicle_number?: string;
38
46
  vehicle_type?: string;
47
+ }
48
+ interface OrganisationNotificationPreferenceGeofenceLink extends Record<string, unknown> {
49
+ notification_preference_geofence_id: string;
50
+ status: Status;
51
+ added_date_time: string;
52
+ modified_date_time: string;
39
53
  notification_preference_id: string;
40
- UserNotificationPreferences?: UserNotificationPreferences;
54
+ OrganisationNotificationPreference?: OrganisationNotificationPreference;
55
+ gps_geofence_id: string;
56
+ GPSGeofence?: GPSGeofence;
57
+ geofence_details?: string;
41
58
  }
42
- interface UserNotificationPreferenceUserLink extends Record<string, unknown> {
43
- notification_user_id: string;
59
+ interface OrganisationNotificationPreferenceUserLink extends Record<string, unknown> {
60
+ notification_preference_user_id: string;
44
61
  status: Status;
45
62
  added_date_time: string;
46
63
  modified_date_time: string;
64
+ notification_preference_id: string;
65
+ OrganisationNotificationPreference?: OrganisationNotificationPreference;
47
66
  user_id: string;
48
67
  User?: User;
49
68
  user_details?: string;
50
- notification_preference_id: string;
51
- UserNotificationPreferences?: UserNotificationPreferences;
52
69
  }
53
- declare const UserNotificationPreferencesSchema: z.ZodObject<{
70
+ declare const OrganisationNotificationPreferenceSchema: z.ZodObject<{
54
71
  organisation_id: z.ZodEffects<z.ZodString, string, string>;
55
72
  notification_name: z.ZodEffects<z.ZodString, string, string>;
56
73
  notification_status: z.ZodType<OnOff, z.ZodTypeDef, OnOff>;
57
- notification_list: z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof NotificationPreference>, "many">>;
58
- notification_types: z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof NotificationType>, "many">>;
74
+ notification_channels: z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof NotificationChannel>, "many">>;
59
75
  mobile_numbers: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
60
76
  email_ids: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
61
77
  cc_email_ids: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
78
+ all_users: z.ZodType<YesNo, z.ZodTypeDef, YesNo>;
62
79
  user_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
80
+ notification_list: z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof NotificationList>, "many">>;
81
+ over_speed_limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
82
+ all_geofences: z.ZodType<YesNo, z.ZodTypeDef, YesNo>;
83
+ gps_geofence_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
63
84
  all_vehicles: z.ZodType<YesNo, z.ZodTypeDef, YesNo>;
64
85
  vehicle_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
65
86
  status: z.ZodType<Status, z.ZodTypeDef, Status>;
66
87
  }, "strip", z.ZodTypeAny, {
88
+ status: Status;
89
+ organisation_id: string;
90
+ user_ids: string[];
91
+ vehicle_ids: string[];
92
+ all_vehicles: YesNo;
93
+ gps_geofence_ids: string[];
67
94
  notification_name: string;
68
95
  notification_status: OnOff;
69
- notification_types: NotificationType[];
70
- notification_list: NotificationPreference[];
96
+ notification_channels: NotificationChannel[];
71
97
  mobile_numbers: string;
72
98
  email_ids: string;
73
99
  cc_email_ids: string;
74
- all_vehicles: YesNo;
100
+ all_users: YesNo;
101
+ notification_list: NotificationList[];
102
+ over_speed_limit: number;
103
+ all_geofences: YesNo;
104
+ }, {
75
105
  status: Status;
76
106
  organisation_id: string;
77
- user_ids: string[];
78
- vehicle_ids: string[];
79
- }, {
107
+ all_vehicles: YesNo;
80
108
  notification_name: string;
81
109
  notification_status: OnOff;
82
- all_vehicles: YesNo;
83
- status: Status;
84
- organisation_id: string;
85
- notification_types?: NotificationType[] | undefined;
86
- notification_list?: NotificationPreference[] | undefined;
110
+ all_users: YesNo;
111
+ all_geofences: YesNo;
112
+ user_ids?: string[] | undefined;
113
+ vehicle_ids?: string[] | undefined;
114
+ gps_geofence_ids?: string[] | undefined;
115
+ notification_channels?: NotificationChannel[] | undefined;
87
116
  mobile_numbers?: string | undefined;
88
117
  email_ids?: string | undefined;
89
118
  cc_email_ids?: string | undefined;
90
- user_ids?: string[] | undefined;
91
- vehicle_ids?: string[] | undefined;
119
+ notification_list?: NotificationList[] | undefined;
120
+ over_speed_limit?: unknown;
92
121
  }>;
93
- type UserNotificationPreferencesDTO = z.infer<typeof UserNotificationPreferencesSchema>;
94
- declare const UserNotificationPreferencesQuerySchema: z.ZodObject<{
122
+ type OrganisationNotificationPreferenceDTO = z.infer<typeof OrganisationNotificationPreferenceSchema>;
123
+ declare const OrganisationNotificationPreferenceQuerySchema: z.ZodObject<{
95
124
  search: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
96
125
  status: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Status>, "many">>>;
97
126
  paging: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof PAGING>>>;
@@ -125,10 +154,9 @@ declare const UserNotificationPreferencesQuerySchema: z.ZodObject<{
125
154
  organisation_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
126
155
  notification_preference_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
127
156
  notification_status: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof OnOff>, "many">>>;
128
- all_vehicles: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof YesNo>, "many">>>;
157
+ notification_channels: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof NotificationChannel>, "many">>>;
158
+ notification_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof NotificationList>, "many">>>;
129
159
  }, "strip", z.ZodTypeAny, {
130
- notification_status: OnOff[];
131
- all_vehicles: YesNo[];
132
160
  status: Status[];
133
161
  search: string;
134
162
  paging: PAGING;
@@ -151,12 +179,13 @@ declare const UserNotificationPreferencesQuerySchema: z.ZodObject<{
151
179
  date_format_id: string;
152
180
  time_zone_id: string;
153
181
  organisation_ids: string[];
182
+ notification_status: OnOff[];
183
+ notification_channels: NotificationChannel[];
184
+ notification_list: NotificationList[];
154
185
  notification_preference_ids: string[];
155
186
  }, {
156
187
  date_format_id: string;
157
188
  time_zone_id: string;
158
- notification_status?: OnOff[] | undefined;
159
- all_vehicles?: YesNo[] | undefined;
160
189
  status?: Status[] | undefined;
161
190
  search?: string | undefined;
162
191
  paging?: PAGING | undefined;
@@ -177,14 +206,17 @@ declare const UserNotificationPreferencesQuerySchema: z.ZodObject<{
177
206
  }[] | undefined;
178
207
  include_master_data?: YesNo | undefined;
179
208
  organisation_ids?: string[] | undefined;
209
+ notification_status?: OnOff[] | undefined;
210
+ notification_channels?: NotificationChannel[] | undefined;
211
+ notification_list?: NotificationList[] | undefined;
180
212
  notification_preference_ids?: string[] | undefined;
181
213
  }>;
182
- type UserNotificationPreferencesQueryDTO = z.infer<typeof UserNotificationPreferencesQuerySchema>;
183
- declare const toUserNotificationPreferencesPayload: (data: UserNotificationPreferences) => UserNotificationPreferencesDTO;
184
- declare const newUserNotificationPreferencesPayload: () => UserNotificationPreferencesDTO;
185
- declare const findUserNotificationPreferences: (data: UserNotificationPreferencesQueryDTO) => Promise<FBR<UserNotificationPreferences[]>>;
186
- declare const createUserNotificationPreferences: (data: UserNotificationPreferencesDTO) => Promise<SBR>;
187
- declare const updateUserNotificationPreferences: (id: string, data: UserNotificationPreferencesDTO) => Promise<SBR>;
188
- declare const deleteUserNotificationPreferences: (id: string) => Promise<SBR>;
214
+ type OrganisationNotificationPreferenceQueryDTO = z.infer<typeof OrganisationNotificationPreferenceQuerySchema>;
215
+ declare const toOrganisationNotificationPreferencePayload: (data: OrganisationNotificationPreference) => OrganisationNotificationPreferenceDTO;
216
+ declare const newOrganisationNotificationPreferencePayload: () => OrganisationNotificationPreferenceDTO;
217
+ declare const findOrganisationNotificationPreference: (data: OrganisationNotificationPreferenceQueryDTO) => Promise<FBR<OrganisationNotificationPreference[]>>;
218
+ declare const createOrganisationNotificationPreference: (data: OrganisationNotificationPreferenceDTO) => Promise<SBR>;
219
+ declare const updateOrganisationNotificationPreference: (id: string, data: OrganisationNotificationPreferenceDTO) => Promise<SBR>;
220
+ declare const deleteOrganisationNotificationPreference: (id: string) => Promise<SBR>;
189
221
 
190
- export { type UserNotificationPreferenceUserLink, type UserNotificationPreferenceVehicleLink, type UserNotificationPreferences, type UserNotificationPreferencesDTO, type UserNotificationPreferencesQueryDTO, UserNotificationPreferencesQuerySchema, UserNotificationPreferencesSchema, createUserNotificationPreferences, deleteUserNotificationPreferences, findUserNotificationPreferences, newUserNotificationPreferencesPayload, toUserNotificationPreferencesPayload, updateUserNotificationPreferences };
222
+ export { type OrganisationNotificationPreference, type OrganisationNotificationPreferenceDTO, type OrganisationNotificationPreferenceGeofenceLink, type OrganisationNotificationPreferenceQueryDTO, OrganisationNotificationPreferenceQuerySchema, OrganisationNotificationPreferenceSchema, type OrganisationNotificationPreferenceUserLink, type OrganisationNotificationPreferenceVehicleLink, createOrganisationNotificationPreference, deleteOrganisationNotificationPreference, findOrganisationNotificationPreference, newOrganisationNotificationPreferencePayload, toOrganisationNotificationPreferencePayload, updateOrganisationNotificationPreference };
@@ -22,7 +22,7 @@ var apiDelete = async (url) => {
22
22
  return response.data;
23
23
  };
24
24
 
25
- // src/services/gps/features/user_notification_preferences.service.ts
25
+ // src/services/account/notification_preferences.service.ts
26
26
  import { z as z3 } from "zod";
27
27
 
28
28
  // src/zod_utils/zod_utils.ts
@@ -203,30 +203,25 @@ var OnOff = /* @__PURE__ */ ((OnOff2) => {
203
203
  OnOff2["Off"] = "Off";
204
204
  return OnOff2;
205
205
  })(OnOff || {});
206
- var NotificationType = /* @__PURE__ */ ((NotificationType2) => {
207
- NotificationType2["Whatsapp"] = "Whatsapp";
208
- NotificationType2["Message"] = "Message";
209
- NotificationType2["Email"] = "Email";
210
- NotificationType2["Push"] = "Push";
211
- return NotificationType2;
212
- })(NotificationType || {});
213
- var NotificationPreference = /* @__PURE__ */ ((NotificationPreference2) => {
214
- NotificationPreference2["VehicleMoving"] = "VehicleMoving";
215
- NotificationPreference2["VehicleStopped"] = "VehicleStopped";
216
- NotificationPreference2["IgnitionOn"] = "IgnitionOn";
217
- NotificationPreference2["IgnitionOff"] = "IgnitionOff";
218
- NotificationPreference2["GeofenceEnter"] = "GeofenceEnter";
219
- NotificationPreference2["GeofenceExit"] = "GeofenceExit";
220
- NotificationPreference2["FuelSuddenIncrease"] = "FuelSuddenIncrease";
221
- NotificationPreference2["FuelSuddenDecrease"] = "FuelSuddenDecrease";
222
- NotificationPreference2["OverSpeed70"] = "OverSpeed70";
223
- NotificationPreference2["OverSpeed80"] = "OverSpeed80";
224
- NotificationPreference2["OverSpeed90"] = "OverSpeed90";
225
- NotificationPreference2["OverSpeed100"] = "OverSpeed100";
226
- NotificationPreference2["OverSpeed110"] = "OverSpeed110";
227
- NotificationPreference2["OverSpeed120"] = "OverSpeed120";
228
- return NotificationPreference2;
229
- })(NotificationPreference || {});
206
+ var NotificationList = /* @__PURE__ */ ((NotificationList2) => {
207
+ NotificationList2["VehicleMoving"] = "VehicleMoving";
208
+ NotificationList2["VehicleStopped"] = "VehicleStopped";
209
+ NotificationList2["IgnitionOn"] = "IgnitionOn";
210
+ NotificationList2["IgnitionOff"] = "IgnitionOff";
211
+ NotificationList2["GeofenceEnter"] = "GeofenceEnter";
212
+ NotificationList2["GeofenceExit"] = "GeofenceExit";
213
+ NotificationList2["FuelSuddenIncrease"] = "FuelSuddenIncrease";
214
+ NotificationList2["FuelSuddenDecrease"] = "FuelSuddenDecrease";
215
+ NotificationList2["OverSpeed"] = "OverSpeed";
216
+ return NotificationList2;
217
+ })(NotificationList || {});
218
+ var NotificationChannel = /* @__PURE__ */ ((NotificationChannel2) => {
219
+ NotificationChannel2["Push"] = "Push";
220
+ NotificationChannel2["WhatsApp"] = "WhatsApp";
221
+ NotificationChannel2["SMS"] = "SMS";
222
+ NotificationChannel2["Email"] = "Email";
223
+ return NotificationChannel2;
224
+ })(NotificationChannel || {});
230
225
 
231
226
  // src/zod_utils/zod_base_schema.ts
232
227
  var OrderBySchema = z2.array(
@@ -286,99 +281,121 @@ var MongoBaseQuerySchema = z2.object({
286
281
  // ✅ Single-selection -> MasterMainTimeZone
287
282
  });
288
283
 
289
- // src/services/gps/features/user_notification_preferences.service.ts
290
- var URL = "gps/features/user_notification_preferences";
284
+ // src/services/account/notification_preferences.service.ts
285
+ var URL = "account/notification_preferences";
291
286
  var ENDPOINTS = {
292
287
  find: `${URL}/search`,
293
288
  create: URL,
294
289
  update: (id) => `${URL}/${id}`,
295
290
  delete: (id) => `${URL}/${id}`
296
291
  };
297
- var UserNotificationPreferencesSchema = z3.object({
292
+ var OrganisationNotificationPreferenceSchema = z3.object({
298
293
  organisation_id: single_select_mandatory("UserOrganisation"),
299
294
  notification_name: stringMandatory("Notification Name", 3, 100),
300
295
  notification_status: enumMandatory("Notification Status", OnOff, "On" /* On */),
301
- notification_list: enumArrayMandatory(
302
- "Notification List",
303
- NotificationPreference,
304
- getAllEnums(NotificationPreference)
305
- ),
306
- notification_types: enumArrayMandatory(
307
- "Notification Type",
308
- NotificationType,
309
- getAllEnums(NotificationType)
296
+ notification_channels: enumArrayMandatory(
297
+ "Notification Channels",
298
+ NotificationChannel,
299
+ getAllEnums(NotificationChannel)
310
300
  ),
311
301
  mobile_numbers: stringOptional("Mobile Numbers", 0, 300),
312
302
  email_ids: stringOptional("Email IDs", 0, 300),
313
303
  cc_email_ids: stringOptional("CC email IDs", 0, 300),
304
+ all_users: enumMandatory("All Users", YesNo, "No" /* No */),
314
305
  user_ids: multi_select_optional("User"),
315
306
  // Multi selection -> User
307
+ notification_list: enumArrayMandatory(
308
+ "Notification List",
309
+ NotificationList,
310
+ getAllEnums(NotificationList)
311
+ ),
312
+ over_speed_limit: numberOptional("Over Speed Limit"),
313
+ all_geofences: enumMandatory("All Geofences", YesNo, "No" /* No */),
314
+ gps_geofence_ids: multi_select_optional("GPSGeofence"),
315
+ // Multi selection -> GPSGeofence
316
316
  all_vehicles: enumMandatory("All Vehicles", YesNo, "No" /* No */),
317
317
  vehicle_ids: multi_select_optional("MasterVehicle"),
318
318
  // Multi selection -> MasterVehicle
319
319
  status: enumMandatory("Status", Status, "Active" /* Active */)
320
320
  });
321
- var UserNotificationPreferencesQuerySchema = BaseQuerySchema.extend({
321
+ var OrganisationNotificationPreferenceQuerySchema = BaseQuerySchema.extend({
322
322
  organisation_ids: multi_select_optional("UserOrganisation"),
323
323
  // ✅ Multi-Selection -> UserOrganisation
324
324
  notification_preference_ids: multi_select_optional(
325
- "UserNotificationPreferences"
325
+ "OrganisationNotificationPreference"
326
326
  ),
327
- // ✅ Multi-Selection -> UserNotificationPreferences
327
+ // ✅ Multi-Selection -> OrganisationNotificationPreference
328
328
  notification_status: enumArrayOptional(
329
329
  "Notification Status",
330
330
  OnOff,
331
331
  getAllEnums(OnOff)
332
332
  ),
333
- all_vehicles: enumArrayOptional("All Vehicles", YesNo, getAllEnums(YesNo))
333
+ notification_channels: enumArrayOptional(
334
+ "Notification Channels",
335
+ NotificationChannel,
336
+ getAllEnums(NotificationChannel)
337
+ ),
338
+ notification_list: enumArrayOptional(
339
+ "Notification List",
340
+ NotificationList,
341
+ getAllEnums(NotificationList)
342
+ )
334
343
  });
335
- var toUserNotificationPreferencesPayload = (data) => ({
344
+ var toOrganisationNotificationPreferencePayload = (data) => ({
336
345
  organisation_id: data.organisation_id,
337
346
  notification_name: data.notification_name,
338
347
  notification_status: data.notification_status,
339
- notification_types: data.notification_types ?? [],
340
- notification_list: data.notification_list ?? [],
348
+ notification_channels: data.notification_channels ?? [],
341
349
  mobile_numbers: data.mobile_numbers ?? "",
342
350
  email_ids: data.email_ids ?? "",
343
351
  cc_email_ids: data.cc_email_ids ?? "",
352
+ all_users: data.all_users,
353
+ notification_list: data.notification_list ?? [],
354
+ over_speed_limit: data.over_speed_limit ?? 60,
355
+ all_geofences: data.all_geofences,
344
356
  all_vehicles: data.all_vehicles,
345
357
  status: data.status,
346
- vehicle_ids: data.UserNotificationPreferenceVehicleLink?.map((v) => v.vehicle_id) ?? [],
347
- user_ids: data.UserNotificationPreferenceUserLink?.map((v) => v.user_id) ?? []
358
+ user_ids: data.OrganisationNotificationPreferenceUserLink?.map((v) => v.user_id) ?? [],
359
+ gps_geofence_ids: data.OrganisationNotificationPreferenceGeofenceLink?.map((v) => v.gps_geofence_id) ?? [],
360
+ vehicle_ids: data.OrganisationNotificationPreferenceVehicleLink?.map((v) => v.vehicle_id) ?? []
348
361
  });
349
- var newUserNotificationPreferencesPayload = () => ({
362
+ var newOrganisationNotificationPreferencePayload = () => ({
350
363
  organisation_id: "",
351
364
  notification_name: "",
352
365
  notification_status: "On" /* On */,
353
- notification_types: [],
354
- notification_list: [],
366
+ notification_channels: [],
355
367
  mobile_numbers: "",
356
368
  email_ids: "",
357
369
  cc_email_ids: "",
370
+ all_users: "Yes" /* Yes */,
371
+ notification_list: [],
372
+ over_speed_limit: 0,
373
+ all_geofences: "Yes" /* Yes */,
358
374
  all_vehicles: "Yes" /* Yes */,
359
- vehicle_ids: [],
375
+ status: "Active" /* Active */,
360
376
  user_ids: [],
361
- status: "Active" /* Active */
377
+ gps_geofence_ids: [],
378
+ vehicle_ids: []
362
379
  });
363
- var findUserNotificationPreferences = async (data) => {
380
+ var findOrganisationNotificationPreference = async (data) => {
364
381
  return apiPost(ENDPOINTS.find, data);
365
382
  };
366
- var createUserNotificationPreferences = async (data) => {
383
+ var createOrganisationNotificationPreference = async (data) => {
367
384
  return apiPost(ENDPOINTS.create, data);
368
385
  };
369
- var updateUserNotificationPreferences = async (id, data) => {
386
+ var updateOrganisationNotificationPreference = async (id, data) => {
370
387
  return apiPatch(ENDPOINTS.update(id), data);
371
388
  };
372
- var deleteUserNotificationPreferences = async (id) => {
389
+ var deleteOrganisationNotificationPreference = async (id) => {
373
390
  return apiDelete(ENDPOINTS.delete(id));
374
391
  };
375
392
  export {
376
- UserNotificationPreferencesQuerySchema,
377
- UserNotificationPreferencesSchema,
378
- createUserNotificationPreferences,
379
- deleteUserNotificationPreferences,
380
- findUserNotificationPreferences,
381
- newUserNotificationPreferencesPayload,
382
- toUserNotificationPreferencesPayload,
383
- updateUserNotificationPreferences
393
+ OrganisationNotificationPreferenceQuerySchema,
394
+ OrganisationNotificationPreferenceSchema,
395
+ createOrganisationNotificationPreference,
396
+ deleteOrganisationNotificationPreference,
397
+ findOrganisationNotificationPreference,
398
+ newOrganisationNotificationPreferencePayload,
399
+ toOrganisationNotificationPreferencePayload,
400
+ updateOrganisationNotificationPreference
384
401
  };