vms-nest-prisma-api-document 1.2.1 → 1.3.3

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 (107) hide show
  1. package/dist/core/BaseRequest.js +2 -28
  2. package/dist/core/BaseResponse.js +2 -27
  3. package/dist/core/Enums.js +2 -93
  4. package/dist/core/apiCall.js +2 -32
  5. package/dist/core/sdk-config.js +2 -28
  6. package/dist/index.js +0 -1
  7. package/dist/services/account/alert_service.js +58 -84
  8. package/dist/services/account/analytics/user_login_analytics_service.d.ts +3 -3
  9. package/dist/services/account/analytics/user_login_analytics_service.js +21 -49
  10. package/dist/services/account/analytics/user_page_analytics_service.d.ts +1 -1
  11. package/dist/services/account/analytics/user_page_analytics_service.js +14 -47
  12. package/dist/services/account/bookmark_service.js +33 -59
  13. package/dist/services/account/notification_service.js +39 -64
  14. package/dist/services/account/ticket_service.js +44 -70
  15. package/dist/services/gps/features/fuel/gps_fuel_vehicle_daily_summary_service.d.ts +12 -12
  16. package/dist/services/gps/features/fuel/gps_fuel_vehicle_daily_summary_service.js +44 -71
  17. package/dist/services/gps/features/fuel/gps_fuel_vehicle_refill_service.d.ts +27 -27
  18. package/dist/services/gps/features/fuel/gps_fuel_vehicle_refill_service.js +52 -73
  19. package/dist/services/gps/features/fuel/gps_fuel_vehicle_removal_service.d.ts +22 -22
  20. package/dist/services/gps/features/fuel/gps_fuel_vehicle_removal_service.js +52 -73
  21. package/dist/services/gps/features/geofence/gps_geofence_data_service.d.ts +10 -10
  22. package/dist/services/gps/features/geofence/gps_geofence_data_service.js +38 -61
  23. package/dist/services/gps/features/geofence/gps_geofence_transaction_service.d.ts +9 -9
  24. package/dist/services/gps/features/geofence/gps_geofence_transaction_service.js +28 -54
  25. package/dist/services/gps/features/geofence/gps_geofence_transaction_summary_service.d.ts +4 -4
  26. package/dist/services/gps/features/geofence/gps_geofence_transaction_summary_service.js +31 -57
  27. package/dist/services/gps/features/geofence/trip_geofence_to_geofence_service.d.ts +2 -2
  28. package/dist/services/gps/features/geofence/trip_geofence_to_geofence_service.js +45 -70
  29. package/dist/services/gps/features/gps_live_track_share_link_service.js +47 -74
  30. package/dist/services/gps/features/gps_track_history_share_link_service.js +35 -62
  31. package/dist/services/gps/reports/gps_models/DashboardSummaryReport.js +0 -18
  32. package/dist/services/gps/reports/gps_models/FuelConsumptionMonthly.js +0 -18
  33. package/dist/services/gps/reports/gps_models/GPSOverSpeedViolation.js +0 -18
  34. package/dist/services/gps/reports/gps_models/GpsAnalytics.js +0 -18
  35. package/dist/services/gps/reports/gps_models/GpsPacket.js +0 -18
  36. package/dist/services/gps/reports/gps_models/GpsSensor.js +0 -18
  37. package/dist/services/gps/reports/gps_models/HourlyKmAnalysis.js +0 -18
  38. package/dist/services/gps/reports/gps_models/KilometerMonthly.js +0 -18
  39. package/dist/services/gps/reports/gps_models/Last24HoursKmReport.js +0 -18
  40. package/dist/services/gps/reports/gps_models/OverSpeedViolationMonthly.js +0 -18
  41. package/dist/services/gps/reports/gps_reports_mongo_service.js +70 -111
  42. package/dist/services/gps/reports/gps_reports_postgre_service.js +0 -1
  43. package/dist/services/main/devices/master_device_service.js +38 -69
  44. package/dist/services/main/drivers/master_driver_service.js +43 -73
  45. package/dist/services/main/sims/master_sim_service.js +27 -54
  46. package/dist/services/main/users/auth_service.js +15 -47
  47. package/dist/services/main/users/user_admin_service.js +21 -52
  48. package/dist/services/main/users/user_organisation_service.js +59 -88
  49. package/dist/services/main/users/user_service.js +98 -142
  50. package/dist/services/main/vehicle/childs/vehicle_odometer_history.js +24 -52
  51. package/dist/services/main/vehicle/master_vehicle_service.js +227 -282
  52. package/dist/services/master/device/master_device_manufacturer_service.js +16 -48
  53. package/dist/services/master/device/master_device_model_service.js +19 -50
  54. package/dist/services/master/device/master_device_type_service.js +22 -53
  55. package/dist/services/master/expense/master_expense_name_service.js +20 -49
  56. package/dist/services/master/expense/master_expense_type_service.js +17 -47
  57. package/dist/services/master/expense/master_vendor_type_service.js +19 -48
  58. package/dist/services/master/fleet/master_fleet_incident_severity_service.js +17 -47
  59. package/dist/services/master/fleet/master_fleet_incident_status_service.js +17 -47
  60. package/dist/services/master/fleet/master_fleet_incident_type_service.js +17 -47
  61. package/dist/services/master/fleet/master_fleet_insurance_claim_status_service.js +17 -47
  62. package/dist/services/master/fleet/master_fleet_service_task_service.js +17 -47
  63. package/dist/services/master/main/master_main_country_service.js +16 -48
  64. package/dist/services/master/main/master_main_currency_service.js +20 -49
  65. package/dist/services/master/main/master_main_date_format_service.js +15 -46
  66. package/dist/services/master/main/master_main_eway_bill_provider_service.d.ts +2 -2
  67. package/dist/services/master/main/master_main_eway_bill_provider_service.js +16 -46
  68. package/dist/services/master/main/master_main_fasttag_bank_service.d.ts +2 -2
  69. package/dist/services/master/main/master_main_fasttag_bank_service.js +16 -46
  70. package/dist/services/master/main/master_main_industry_service.js +16 -46
  71. package/dist/services/master/main/master_main_landmark_service.js +28 -55
  72. package/dist/services/master/main/master_main_language_service.js +15 -46
  73. package/dist/services/master/main/master_main_sim_provider_service.js +15 -46
  74. package/dist/services/master/main/master_main_state_service.js +19 -48
  75. package/dist/services/master/main/master_main_timezone_service.js +22 -51
  76. package/dist/services/master/main/master_main_unit_distance_service.js +15 -46
  77. package/dist/services/master/main/master_main_unit_mileage_service.js +15 -46
  78. package/dist/services/master/main/master_main_unit_volume_service.js +15 -46
  79. package/dist/services/master/organisation/organisation_branch_service.js +19 -51
  80. package/dist/services/master/organisation/organisation_color_service.js +18 -50
  81. package/dist/services/master/organisation/organisation_group_service.js +19 -51
  82. package/dist/services/master/organisation/organisation_sub_company_service.js +21 -52
  83. package/dist/services/master/organisation/organisation_tag_service.js +17 -49
  84. package/dist/services/master/spare_part/master_spare_part_category_service.js +18 -51
  85. package/dist/services/master/spare_part/master_spare_part_sub_category_service.js +20 -50
  86. package/dist/services/master/spare_part/master_spare_part_unit_service.js +18 -48
  87. package/dist/services/master/trip/master_trip_party_type_service.js +17 -47
  88. package/dist/services/master/tyre/master_tyre_grade_service.js +17 -47
  89. package/dist/services/master/tyre/master_tyre_make_service.js +17 -50
  90. package/dist/services/master/tyre/master_tyre_model_service.js +19 -49
  91. package/dist/services/master/user/master_user_role_service.js +17 -47
  92. package/dist/services/master/user/master_user_status_service.js +17 -47
  93. package/dist/services/master/vehicle/master_vehicle_fuel_type_service.js +17 -47
  94. package/dist/services/master/vehicle/master_vehicle_make_service.js +17 -49
  95. package/dist/services/master/vehicle/master_vehicle_model_service.js +19 -49
  96. package/dist/services/master/vehicle/master_vehicle_ownership_type_service.js +17 -47
  97. package/dist/services/master/vehicle/master_vehicle_status_type_service.js +17 -47
  98. package/dist/services/master/vehicle/master_vehicle_sub_model_service.js +21 -51
  99. package/dist/services/master/vehicle/master_vehicle_type_service.js +17 -49
  100. package/dist/services/website/contact_us_detail_service.d.ts +1 -1
  101. package/dist/services/website/contact_us_detail_service.js +23 -53
  102. package/dist/services/website/faq_service.d.ts +1 -1
  103. package/dist/services/website/faq_service.js +16 -46
  104. package/dist/services/website/static_pages_service.js +17 -47
  105. package/dist/zod/zod_base_schema.js +20 -47
  106. package/dist/zod/zod_utils.js +49 -108
  107. package/package.json +2 -2
@@ -1,29 +1,4 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
1
  // src/core/BaseRequest.ts
21
- var BaseRequest_exports = {};
22
- __export(BaseRequest_exports, {
23
- DefaultBaseFindParams: () => DefaultBaseFindParams,
24
- withDefaults: () => withDefaults
25
- });
26
- module.exports = __toCommonJS(BaseRequest_exports);
27
2
  var DefaultBaseFindParams = {
28
3
  search: "",
29
4
  status: "Active,Inactive",
@@ -36,8 +11,7 @@ var DefaultBaseFindParams = {
36
11
  var withDefaults = (defaults, overrides = {}) => {
37
12
  return { ...defaults, ...overrides };
38
13
  };
39
- // Annotate the CommonJS export names for ESM import in node:
40
- 0 && (module.exports = {
14
+ export {
41
15
  DefaultBaseFindParams,
42
16
  withDefaults
43
- });
17
+ };
@@ -1,32 +1,7 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
1
  // src/core/BaseResponse.ts
21
- var BaseResponse_exports = {};
22
- __export(BaseResponse_exports, {
23
- r_log: () => r_log
24
- });
25
- module.exports = __toCommonJS(BaseResponse_exports);
26
2
  var r_log = (data = {}) => {
27
3
  return data;
28
4
  };
29
- // Annotate the CommonJS export names for ESM import in node:
30
- 0 && (module.exports = {
5
+ export {
31
6
  r_log
32
- });
7
+ };
@@ -1,94 +1,4 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
1
  // src/core/Enums.ts
21
- var Enums_exports = {};
22
- __export(Enums_exports, {
23
- AdminRole: () => AdminRole,
24
- AlertSubType: () => AlertSubType,
25
- AlertType: () => AlertType,
26
- BillingStatus: () => BillingStatus,
27
- BooleanType: () => BooleanType,
28
- DeviceStatus: () => DeviceStatus,
29
- DeviceType: () => DeviceType,
30
- DocumentStatus: () => DocumentStatus,
31
- DocumentType: () => DocumentType,
32
- DocumentValidityStatus: () => DocumentValidityStatus,
33
- DoorSensorStatus: () => DoorSensorStatus,
34
- ExpenseCategory: () => ExpenseCategory,
35
- FileType: () => FileType,
36
- FleetSize: () => FleetSize,
37
- GPSFuelApproveStatus: () => GPSFuelApproveStatus,
38
- GPSSource: () => GPSSource,
39
- GPSType: () => GPSType,
40
- GeofencePurposeType: () => GeofencePurposeType,
41
- GeofenceStatusType: () => GeofenceStatusType,
42
- GeofenceType: () => GeofenceType,
43
- InspectionActionStatus: () => InspectionActionStatus,
44
- InspectionStatus: () => InspectionStatus,
45
- InspectionType: () => InspectionType,
46
- Is12AM: () => Is12AM,
47
- IssueSeverity: () => IssueSeverity,
48
- IssueSource: () => IssueSource,
49
- IssueStatus: () => IssueStatus,
50
- JobCardStatus: () => JobCardStatus,
51
- LifeExpiry: () => LifeExpiry,
52
- LinkStatus: () => LinkStatus,
53
- LinkType: () => LinkType,
54
- LoadChild: () => LoadChild,
55
- LoadChildCount: () => LoadChildCount,
56
- LoadParents: () => LoadParents,
57
- LoginFrom: () => LoginFrom,
58
- MenuType: () => MenuType,
59
- Module: () => Module,
60
- NightDriving: () => NightDriving,
61
- NotificationType: () => NotificationType,
62
- OdometerSource: () => OdometerSource,
63
- OrderBy: () => OrderBy,
64
- OverSpeed: () => OverSpeed,
65
- PAGING: () => PAGING,
66
- PaymentStatus: () => PaymentStatus,
67
- Priority: () => Priority,
68
- PurchaseOrderStatus: () => PurchaseOrderStatus,
69
- PurchaseType: () => PurchaseType,
70
- PurchaseVehicleType: () => PurchaseVehicleType,
71
- RecurrenceInterval: () => RecurrenceInterval,
72
- ReminderSource: () => ReminderSource,
73
- ReminderStatus: () => ReminderStatus,
74
- ReminderTriggerType: () => ReminderTriggerType,
75
- RequestType: () => RequestType,
76
- RetreadingMethod: () => RetreadingMethod,
77
- ScheduleStatus: () => ScheduleStatus,
78
- ScheduleType: () => ScheduleType,
79
- ServiceType: () => ServiceType,
80
- SimStatus: () => SimStatus,
81
- Status: () => Status,
82
- StockType: () => StockType,
83
- SubModule: () => SubModule,
84
- TicketStatus: () => TicketStatus,
85
- TimeSlot: () => TimeSlot,
86
- TrackHistoryLinkStatus: () => TrackHistoryLinkStatus,
87
- TyreStatus: () => TyreStatus,
88
- VerifyStatus: () => VerifyStatus,
89
- YesNo: () => YesNo
90
- });
91
- module.exports = __toCommonJS(Enums_exports);
92
2
  var PAGING = /* @__PURE__ */ ((PAGING2) => {
93
3
  PAGING2["Yes"] = "Yes";
94
4
  PAGING2["No"] = "No";
@@ -624,8 +534,7 @@ var Is12AM = /* @__PURE__ */ ((Is12AM2) => {
624
534
  Is12AM2["No"] = "No";
625
535
  return Is12AM2;
626
536
  })(Is12AM || {});
627
- // Annotate the CommonJS export names for ESM import in node:
628
- 0 && (module.exports = {
537
+ export {
629
538
  AdminRole,
630
539
  AlertSubType,
631
540
  AlertType,
@@ -693,4 +602,4 @@ var Is12AM = /* @__PURE__ */ ((Is12AM2) => {
693
602
  TyreStatus,
694
603
  VerifyStatus,
695
604
  YesNo
696
- });
605
+ };
@@ -1,32 +1,3 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/core/apiCall.ts
21
- var apiCall_exports = {};
22
- __export(apiCall_exports, {
23
- apiDelete: () => apiDelete,
24
- apiGet: () => apiGet,
25
- apiPatch: () => apiPatch,
26
- apiPost: () => apiPost
27
- });
28
- module.exports = __toCommonJS(apiCall_exports);
29
-
30
1
  // src/core/sdk-config.ts
31
2
  var axiosInstance;
32
3
  var getAxiosInstance = () => {
@@ -53,10 +24,9 @@ var apiDelete = async (url) => {
53
24
  const response = await getAxiosInstance().delete(url);
54
25
  return response.data;
55
26
  };
56
- // Annotate the CommonJS export names for ESM import in node:
57
- 0 && (module.exports = {
27
+ export {
58
28
  apiDelete,
59
29
  apiGet,
60
30
  apiPatch,
61
31
  apiPost
62
- });
32
+ };
@@ -1,29 +1,4 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
1
  // src/core/sdk-config.ts
21
- var sdk_config_exports = {};
22
- __export(sdk_config_exports, {
23
- getAxiosInstance: () => getAxiosInstance,
24
- setAxiosInstance: () => setAxiosInstance
25
- });
26
- module.exports = __toCommonJS(sdk_config_exports);
27
2
  var axiosInstance;
28
3
  var setAxiosInstance = (instance) => {
29
4
  axiosInstance = instance;
@@ -34,8 +9,7 @@ var getAxiosInstance = () => {
34
9
  }
35
10
  return axiosInstance;
36
11
  };
37
- // Annotate the CommonJS export names for ESM import in node:
38
- 0 && (module.exports = {
12
+ export {
39
13
  getAxiosInstance,
40
14
  setAxiosInstance
41
- });
15
+ };
package/dist/index.js CHANGED
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,36 +1,3 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/services/account/alert_service.ts
21
- var alert_service_exports = {};
22
- __export(alert_service_exports, {
23
- AlertQuerySchema: () => AlertQuerySchema,
24
- AlertSchema: () => AlertSchema,
25
- createAlert: () => createAlert,
26
- deleteAlert: () => deleteAlert,
27
- findAlerts: () => findAlerts,
28
- newAlertPayload: () => newAlertPayload,
29
- toAlertPayload: () => toAlertPayload,
30
- updateAlert: () => updateAlert
31
- });
32
- module.exports = __toCommonJS(alert_service_exports);
33
-
34
1
  // src/core/sdk-config.ts
35
2
  var axiosInstance;
36
3
  var getAxiosInstance = () => {
@@ -55,9 +22,17 @@ var apiDelete = async (url) => {
55
22
  };
56
23
 
57
24
  // src/services/account/alert_service.ts
58
- var import_zod = require("zod");
59
- var import_zod_utils = require("zod/zod_utils");
60
- var import_zod_base_schema = require("zod/zod_base_schema");
25
+ import { z } from "zod";
26
+ import {
27
+ enumMandatory,
28
+ stringOptional,
29
+ enumOptional,
30
+ single_select_mandatory,
31
+ multi_select_optional,
32
+ enumArrayOptional,
33
+ getAllEnums
34
+ } from "zod/zod_utils";
35
+ import { BaseQuerySchema } from "zod/zod_base_schema";
61
36
 
62
37
  // src/core/Enums.ts
63
38
  var Status = /* @__PURE__ */ ((Status2) => {
@@ -95,82 +70,82 @@ var ENDPOINTS = {
95
70
  update: (id) => `${URL}/${id}`,
96
71
  delete: (id) => `${URL}/${id}`
97
72
  };
98
- var AlertSchema = import_zod.z.object({
99
- module: (0, import_zod_utils.enumMandatory)("Module", Module, "ABC" /* ABC */),
100
- sub_module: (0, import_zod_utils.enumMandatory)("Sub Module", SubModule, "ABC" /* ABC */),
101
- alert_type: (0, import_zod_utils.enumMandatory)("Alert Type", AlertType, "ABC" /* ABC */),
102
- alert_sub_type: (0, import_zod_utils.enumMandatory)(
73
+ var AlertSchema = z.object({
74
+ module: enumMandatory("Module", Module, "ABC" /* ABC */),
75
+ sub_module: enumMandatory("Sub Module", SubModule, "ABC" /* ABC */),
76
+ alert_type: enumMandatory("Alert Type", AlertType, "ABC" /* ABC */),
77
+ alert_sub_type: enumMandatory(
103
78
  "Alert Sub Type",
104
79
  AlertSubType,
105
80
  "ABC" /* ABC */
106
81
  ),
107
- alert_key_1: (0, import_zod_utils.stringOptional)("Alert Key 1", 0, 50),
108
- alert_key_2: (0, import_zod_utils.stringOptional)("Alert Key 2", 0, 50),
109
- alert_key_3: (0, import_zod_utils.stringOptional)("Alert Key 3", 0, 50),
110
- alert_key_4: (0, import_zod_utils.stringOptional)("Alert Key 4", 0, 50),
111
- is_edit: (0, import_zod_utils.enumOptional)("Is Edit", YesNo, "No" /* No */),
112
- is_push: (0, import_zod_utils.enumOptional)("Is Push", YesNo, "No" /* No */),
113
- is_sms: (0, import_zod_utils.enumOptional)("Is SMS", YesNo, "No" /* No */),
114
- is_whatsapp: (0, import_zod_utils.enumOptional)("Is WhatsApp", YesNo, "No" /* No */),
115
- is_email: (0, import_zod_utils.enumOptional)("Is Email", YesNo, "No" /* No */),
116
- mobile_numbers: (0, import_zod_utils.stringOptional)("Mobile Numbers", 0, 300),
117
- emails: (0, import_zod_utils.stringOptional)("Emails", 0, 300),
118
- all_vehicles: (0, import_zod_utils.enumOptional)("All Vehicles", YesNo, "No" /* No */),
119
- all_trips: (0, import_zod_utils.enumOptional)("All Trips", YesNo, "No" /* No */),
120
- all_geofences: (0, import_zod_utils.enumOptional)("All Geofences", YesNo, "No" /* No */),
121
- all_drivers: (0, import_zod_utils.enumOptional)("All Drivers", YesNo, "No" /* No */),
122
- organisation_id: (0, import_zod_utils.single_select_mandatory)("UserOrganisation"),
123
- user_id: (0, import_zod_utils.single_select_mandatory)("User"),
124
- status: (0, import_zod_utils.enumMandatory)("Status", Status, "Active" /* Active */),
125
- vehicle_ids: (0, import_zod_utils.multi_select_optional)("Vehicle"),
126
- user_ids: (0, import_zod_utils.multi_select_optional)("User"),
127
- driver_ids: (0, import_zod_utils.multi_select_optional)("Driver"),
128
- gps_geofence_ids: (0, import_zod_utils.multi_select_optional)("GPS Geofence Data")
82
+ alert_key_1: stringOptional("Alert Key 1", 0, 50),
83
+ alert_key_2: stringOptional("Alert Key 2", 0, 50),
84
+ alert_key_3: stringOptional("Alert Key 3", 0, 50),
85
+ alert_key_4: stringOptional("Alert Key 4", 0, 50),
86
+ is_edit: enumOptional("Is Edit", YesNo, "No" /* No */),
87
+ is_push: enumOptional("Is Push", YesNo, "No" /* No */),
88
+ is_sms: enumOptional("Is SMS", YesNo, "No" /* No */),
89
+ is_whatsapp: enumOptional("Is WhatsApp", YesNo, "No" /* No */),
90
+ is_email: enumOptional("Is Email", YesNo, "No" /* No */),
91
+ mobile_numbers: stringOptional("Mobile Numbers", 0, 300),
92
+ emails: stringOptional("Emails", 0, 300),
93
+ all_vehicles: enumOptional("All Vehicles", YesNo, "No" /* No */),
94
+ all_trips: enumOptional("All Trips", YesNo, "No" /* No */),
95
+ all_geofences: enumOptional("All Geofences", YesNo, "No" /* No */),
96
+ all_drivers: enumOptional("All Drivers", YesNo, "No" /* No */),
97
+ organisation_id: single_select_mandatory("UserOrganisation"),
98
+ user_id: single_select_mandatory("User"),
99
+ status: enumMandatory("Status", Status, "Active" /* Active */),
100
+ vehicle_ids: multi_select_optional("Vehicle"),
101
+ user_ids: multi_select_optional("User"),
102
+ driver_ids: multi_select_optional("Driver"),
103
+ gps_geofence_ids: multi_select_optional("GPS Geofence Data")
129
104
  });
130
- var AlertQuerySchema = import_zod_base_schema.BaseQuerySchema.extend({
131
- organisation_ids: (0, import_zod_utils.multi_select_optional)("Organisation"),
132
- user_ids: (0, import_zod_utils.multi_select_optional)("User"),
133
- alert_ids: (0, import_zod_utils.multi_select_optional)("Alert"),
134
- module: (0, import_zod_utils.enumArrayOptional)("Module", Module, (0, import_zod_utils.getAllEnums)(Module), 0, 10, true),
135
- sub_module: (0, import_zod_utils.enumArrayOptional)(
105
+ var AlertQuerySchema = BaseQuerySchema.extend({
106
+ organisation_ids: multi_select_optional("Organisation"),
107
+ user_ids: multi_select_optional("User"),
108
+ alert_ids: multi_select_optional("Alert"),
109
+ module: enumArrayOptional("Module", Module, getAllEnums(Module), 0, 10, true),
110
+ sub_module: enumArrayOptional(
136
111
  "Sub Module",
137
112
  SubModule,
138
- (0, import_zod_utils.getAllEnums)(SubModule),
113
+ getAllEnums(SubModule),
139
114
  0,
140
115
  10,
141
116
  true
142
117
  ),
143
- alert_type: (0, import_zod_utils.enumArrayOptional)(
118
+ alert_type: enumArrayOptional(
144
119
  "Alert Type",
145
120
  AlertType,
146
- (0, import_zod_utils.getAllEnums)(AlertType),
121
+ getAllEnums(AlertType),
147
122
  0,
148
123
  10,
149
124
  true
150
125
  ),
151
- alert_sub_type: (0, import_zod_utils.enumArrayOptional)(
126
+ alert_sub_type: enumArrayOptional(
152
127
  "Alert Sub Type",
153
128
  AlertSubType,
154
- (0, import_zod_utils.getAllEnums)(AlertSubType),
129
+ getAllEnums(AlertSubType),
155
130
  0,
156
131
  10,
157
132
  true
158
133
  ),
159
- is_edit: (0, import_zod_utils.enumArrayOptional)("Is Edit", YesNo, (0, import_zod_utils.getAllEnums)(YesNo), 0, 10, true),
160
- is_push: (0, import_zod_utils.enumArrayOptional)("Is Push", YesNo, (0, import_zod_utils.getAllEnums)(YesNo), 0, 10, true),
161
- is_sms: (0, import_zod_utils.enumArrayOptional)("Is SMS", YesNo, (0, import_zod_utils.getAllEnums)(YesNo), 0, 10, true),
162
- is_whatsapp: (0, import_zod_utils.enumArrayOptional)(
134
+ is_edit: enumArrayOptional("Is Edit", YesNo, getAllEnums(YesNo), 0, 10, true),
135
+ is_push: enumArrayOptional("Is Push", YesNo, getAllEnums(YesNo), 0, 10, true),
136
+ is_sms: enumArrayOptional("Is SMS", YesNo, getAllEnums(YesNo), 0, 10, true),
137
+ is_whatsapp: enumArrayOptional(
163
138
  "Is Whatsapp",
164
139
  YesNo,
165
- (0, import_zod_utils.getAllEnums)(YesNo),
140
+ getAllEnums(YesNo),
166
141
  0,
167
142
  10,
168
143
  true
169
144
  ),
170
- is_email: (0, import_zod_utils.enumArrayOptional)(
145
+ is_email: enumArrayOptional(
171
146
  "Is Email",
172
147
  YesNo,
173
- (0, import_zod_utils.getAllEnums)(YesNo),
148
+ getAllEnums(YesNo),
174
149
  0,
175
150
  10,
176
151
  true
@@ -244,8 +219,7 @@ var updateAlert = async (id, data) => {
244
219
  var deleteAlert = async (id) => {
245
220
  return apiDelete(ENDPOINTS.delete(id));
246
221
  };
247
- // Annotate the CommonJS export names for ESM import in node:
248
- 0 && (module.exports = {
222
+ export {
249
223
  AlertQuerySchema,
250
224
  AlertSchema,
251
225
  createAlert,
@@ -254,4 +228,4 @@ var deleteAlert = async (id) => {
254
228
  newAlertPayload,
255
229
  toAlertPayload,
256
230
  updateAlert
257
- });
231
+ };
@@ -22,15 +22,15 @@ declare const UserLoginAnalyticsSchema: z.ZodObject<{
22
22
  }, "strip", z.ZodTypeAny, {
23
23
  user_id: string;
24
24
  organisation_id: string;
25
- country_id: string;
26
25
  login_from: LoginFrom;
26
+ country_id: string;
27
27
  os_details: Record<string, any>;
28
28
  ip_details: Record<string, any>;
29
29
  }, {
30
30
  user_id: string;
31
31
  organisation_id: string;
32
- country_id: string;
33
32
  login_from: LoginFrom;
33
+ country_id: string;
34
34
  os_details?: Record<string, any> | undefined;
35
35
  ip_details?: Record<string, any> | undefined;
36
36
  }>;
@@ -48,11 +48,11 @@ declare const UserLoginAnalyticsQuerySchema: z.ZodObject<{
48
48
  organisation_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
49
49
  country_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
50
50
  }, "strip", z.ZodTypeAny, {
51
- login_from: LoginFrom;
52
51
  search: string;
53
52
  paging: PAGING;
54
53
  page_count: number;
55
54
  page_index: number;
55
+ login_from: LoginFrom;
56
56
  date_format_id: string;
57
57
  time_zone_id: string;
58
58
  user_ids: string[];
@@ -1,35 +1,3 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/services/account/analytics/user_login_analytics_service.ts
21
- var user_login_analytics_service_exports = {};
22
- __export(user_login_analytics_service_exports, {
23
- UserLoginAnalyticsQuerySchema: () => UserLoginAnalyticsQuerySchema,
24
- UserLoginAnalyticsSchema: () => UserLoginAnalyticsSchema,
25
- createUserLoginAnalytics: () => createUserLoginAnalytics,
26
- deleteUserLoginAnalytics: () => deleteUserLoginAnalytics,
27
- findUserLoginAnalytics: () => findUserLoginAnalytics,
28
- newUserLoginAnalyticsPayload: () => newUserLoginAnalyticsPayload,
29
- toUserLoginAnalyticsPayload: () => toUserLoginAnalyticsPayload
30
- });
31
- module.exports = __toCommonJS(user_login_analytics_service_exports);
32
-
33
1
  // src/core/sdk-config.ts
34
2
  var axiosInstance;
35
3
  var getAxiosInstance = () => {
@@ -50,9 +18,14 @@ var apiDelete = async (url) => {
50
18
  };
51
19
 
52
20
  // src/services/account/analytics/user_login_analytics_service.ts
53
- var import_zod = require("zod");
54
- var import_zod_utils = require("zod/zod_utils");
55
- var import_zod_base_schema = require("zod/zod_base_schema");
21
+ import { z } from "zod";
22
+ import {
23
+ stringMandatory,
24
+ multi_select_optional,
25
+ enumMandatory,
26
+ dynamicJsonSchema
27
+ } from "zod/zod_utils";
28
+ import { MongoBaseQuerySchema } from "zod/zod_base_schema";
56
29
 
57
30
  // src/core/Enums.ts
58
31
  var LoginFrom = /* @__PURE__ */ ((LoginFrom2) => {
@@ -69,19 +42,19 @@ var ENDPOINTS = {
69
42
  create: URL,
70
43
  delete: (id) => `${URL}/${id}`
71
44
  };
72
- var UserLoginAnalyticsSchema = import_zod.z.object({
73
- user_id: (0, import_zod_utils.stringMandatory)("User", 3, 100),
74
- organisation_id: (0, import_zod_utils.stringMandatory)("Organisation", 3, 100),
75
- login_from: (0, import_zod_utils.enumMandatory)("Status", LoginFrom, "Web" /* Web */),
76
- os_details: (0, import_zod_utils.dynamicJsonSchema)("OS Details", {}),
77
- ip_details: (0, import_zod_utils.dynamicJsonSchema)("IP Details", {}),
78
- country_id: (0, import_zod_utils.stringMandatory)("Country", 2, 100)
45
+ var UserLoginAnalyticsSchema = z.object({
46
+ user_id: stringMandatory("User", 3, 100),
47
+ organisation_id: stringMandatory("Organisation", 3, 100),
48
+ login_from: enumMandatory("Status", LoginFrom, "Web" /* Web */),
49
+ os_details: dynamicJsonSchema("OS Details", {}),
50
+ ip_details: dynamicJsonSchema("IP Details", {}),
51
+ country_id: stringMandatory("Country", 2, 100)
79
52
  // ✅ Country ID
80
53
  });
81
- var UserLoginAnalyticsQuerySchema = import_zod_base_schema.MongoBaseQuerySchema.extend({
82
- user_ids: (0, import_zod_utils.multi_select_optional)("User"),
83
- organisation_ids: (0, import_zod_utils.multi_select_optional)("Organisation"),
84
- country_ids: (0, import_zod_utils.multi_select_optional)("Country")
54
+ var UserLoginAnalyticsQuerySchema = MongoBaseQuerySchema.extend({
55
+ user_ids: multi_select_optional("User"),
56
+ organisation_ids: multi_select_optional("Organisation"),
57
+ country_ids: multi_select_optional("Country")
85
58
  });
86
59
  var toUserLoginAnalyticsPayload = (analytics) => ({
87
60
  user_id: analytics.user_id,
@@ -111,8 +84,7 @@ var createUserLoginAnalytics = async (data) => {
111
84
  var deleteUserLoginAnalytics = async (id) => {
112
85
  return apiDelete(ENDPOINTS.delete(id));
113
86
  };
114
- // Annotate the CommonJS export names for ESM import in node:
115
- 0 && (module.exports = {
87
+ export {
116
88
  UserLoginAnalyticsQuerySchema,
117
89
  UserLoginAnalyticsSchema,
118
90
  createUserLoginAnalytics,
@@ -120,4 +92,4 @@ var deleteUserLoginAnalytics = async (id) => {
120
92
  findUserLoginAnalytics,
121
93
  newUserLoginAnalyticsPayload,
122
94
  toUserLoginAnalyticsPayload
123
- });
95
+ };
@@ -43,11 +43,11 @@ declare const UserPageAnalyticsQuerySchema: z.ZodObject<{
43
43
  user_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
44
44
  organisation_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
45
45
  }, "strip", z.ZodTypeAny, {
46
- login_from: LoginFrom;
47
46
  search: string;
48
47
  paging: PAGING;
49
48
  page_count: number;
50
49
  page_index: number;
50
+ login_from: LoginFrom;
51
51
  date_format_id: string;
52
52
  time_zone_id: string;
53
53
  user_ids: string[];