vms-nest-prisma-api-document 90.0.0 → 105.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/services/account/analytics/user_login_analytics_service.d.ts +3 -3
- package/dist/services/account/analytics/user_page_analytics_service.d.ts +1 -1
- package/dist/services/account/bookmark_service.d.ts +1 -1
- package/dist/services/account/notification_preferences.service.d.ts +1 -1
- package/dist/services/account/report_preferences.service.d.ts +1 -1
- package/dist/services/account/ticket_service.d.ts +1 -1
- package/dist/services/fleet/fuel_management/fleet_fuel_daily_summary_service.d.ts +1 -1
- package/dist/services/fleet/fuel_management/fleet_fuel_refill_service.d.ts +1 -1
- package/dist/services/fleet/fuel_management/fleet_fuel_removal_service.d.ts +1 -1
- package/dist/services/gps/features/geofence/gps_geofence_service.d.ts +1 -1
- package/dist/services/gps/features/geofence/gps_geofence_transaction_service.d.ts +1 -1
- package/dist/services/gps/features/geofence/gps_geofence_transaction_summary_service.d.ts +1 -1
- package/dist/services/gps/features/geofence/trip_geofence_to_geofence_service.d.ts +1 -1
- package/dist/services/gps/features/gps_live_track_share_link_service.d.ts +5 -5
- package/dist/services/gps/features/gps_track_history_share_link_service.d.ts +8 -8
- package/dist/services/gps/reports/gps_reports_mongo_service.d.ts +46 -46
- package/dist/services/main/devices/master_device_service.d.ts +1 -1
- package/dist/services/main/drivers/master_driver_service.d.ts +1 -1
- package/dist/services/main/sims/master_sim_service.d.ts +1 -1
- package/dist/services/main/users/auth_service.d.ts +9 -15
- package/dist/services/main/users/auth_service.js +3 -5
- package/dist/services/main/users/user_organisation_service.d.ts +1 -1
- package/dist/services/main/users/user_service.d.ts +1 -1
- package/dist/services/main/vehicle/childs/vehicle_odometer_history.d.ts +1 -1
- package/dist/services/main/vehicle/master_vehicle_service.d.ts +1 -1
- package/dist/services/main/vehicle/master_vehicle_service.js +12 -0
- package/dist/services/master/bus/master_class_service.d.ts +131 -0
- package/dist/services/master/bus/master_class_service.js +312 -0
- package/dist/services/master/bus/master_program_service.d.ts +131 -0
- package/dist/services/master/bus/master_program_service.js +312 -0
- package/dist/services/master/bus/master_relationship_service.d.ts +131 -0
- package/dist/services/master/bus/master_relationship_service.js +312 -0
- package/dist/services/master/bus/master_section_service.d.ts +131 -0
- package/dist/services/master/bus/master_section_service.js +312 -0
- package/dist/services/master/bus/master_semester_service.d.ts +131 -0
- package/dist/services/master/bus/master_semester_service.js +312 -0
- package/dist/services/master/bus/master_stream_service.d.ts +131 -0
- package/dist/services/master/bus/master_stream_service.js +312 -0
- package/dist/services/master/bus/master_year_service.d.ts +131 -0
- package/dist/services/master/bus/master_year_service.js +312 -0
- package/dist/services/master/device/master_device_manufacturer_service.d.ts +1 -1
- package/dist/services/master/device/master_device_model_service.d.ts +1 -1
- package/dist/services/master/device/master_device_type_service.d.ts +1 -1
- package/dist/services/master/expense/master_expense_name_service.d.ts +1 -1
- package/dist/services/master/expense/master_expense_type_service.d.ts +1 -1
- package/dist/services/master/expense/master_fuel_company_service.d.ts +6 -6
- package/dist/services/master/expense/master_vendor_document_type_service.d.ts +3 -3
- package/dist/services/master/expense/master_vendor_type_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_incident_severity_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_incident_status_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_incident_type_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_insurance_claim_status_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_service_task_service.d.ts +1 -1
- package/dist/services/master/main/master_main_country_service.d.ts +1 -1
- package/dist/services/master/main/master_main_currency_service.d.ts +1 -1
- package/dist/services/master/main/master_main_date_format_service.d.ts +1 -1
- package/dist/services/master/main/master_main_industry_service.d.ts +1 -1
- package/dist/services/master/main/master_main_landmark_service.d.ts +1 -1
- package/dist/services/master/main/master_main_language_service.d.ts +1 -1
- package/dist/services/master/main/master_main_state_service.d.ts +1 -1
- package/dist/services/master/main/master_main_timezone_service.d.ts +1 -1
- package/dist/services/master/main/master_main_unit_distance_service.d.ts +1 -1
- package/dist/services/master/main/master_main_unit_mileage_service.d.ts +1 -1
- package/dist/services/master/main/master_main_unit_volume_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_branch_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_color_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_group_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_sub_company_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_tag_service.d.ts +1 -1
- package/dist/services/master/spare_part/master_spare_part_category_service.d.ts +1 -1
- package/dist/services/master/spare_part/master_spare_part_sub_category_service.d.ts +1 -1
- package/dist/services/master/spare_part/master_spare_part_unit_service.d.ts +1 -1
- package/dist/services/master/trip/master_trip_party_type_service.d.ts +1 -1
- package/dist/services/master/tyre/master_tyre_grade_service.d.ts +1 -1
- package/dist/services/master/tyre/master_tyre_make_service.d.ts +1 -1
- package/dist/services/master/tyre/master_tyre_model_service.d.ts +1 -1
- package/dist/services/master/user/master_user_role_service.d.ts +1 -1
- package/dist/services/master/user/master_user_status_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_associated_to_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_document_type_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_fuel_removal_reason_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_fuel_type_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_fuel_unit_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_make_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_model_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_ownership_type_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_status_type_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_sub_model_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_type_service.d.ts +1 -1
- package/dist/services/website/contact_us_detail_service.d.ts +1 -1
- package/dist/services/website/faq_service.d.ts +1 -1
- package/dist/{user_organisation_service-Cpaz0P99.d.ts → user_organisation_service-Dkh1nIGX.d.ts} +19 -0
- package/package.json +1 -1
|
@@ -66,9 +66,7 @@ var ChangePasswordSchema = z2.object({
|
|
|
66
66
|
var LoginUserSchema = z2.object({
|
|
67
67
|
identifier: stringMandatory("Identifier", 3, 100),
|
|
68
68
|
password: stringMandatory("Password", 3, 20),
|
|
69
|
-
|
|
70
|
-
p256dh: stringOptional("p256dh", 0, 255),
|
|
71
|
-
auth: stringOptional("auth", 0, 255),
|
|
69
|
+
fcm_token: stringOptional("fcm_token", 0, 1e4),
|
|
72
70
|
platform: enumOptional("Login From", LoginFrom, "Web" /* Web */),
|
|
73
71
|
user_agent: stringOptional("user_agent", 0, 500),
|
|
74
72
|
ip_address: stringOptional("ip_address", 0, 45),
|
|
@@ -81,8 +79,8 @@ var LoginUserSchema = z2.object({
|
|
|
81
79
|
app_version: stringOptional("app_version", 0, 40)
|
|
82
80
|
});
|
|
83
81
|
var LogoutSchema = z2.object({
|
|
84
|
-
|
|
85
|
-
device_id:
|
|
82
|
+
fcm_token: stringOptional("fcm_token", 0, 1e4),
|
|
83
|
+
device_id: stringOptional("device_id", 0, 120)
|
|
86
84
|
});
|
|
87
85
|
var LoginAdminSchema = z2.object({
|
|
88
86
|
email: stringMandatory("Email", 3, 100),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../../core/Enums.js';
|
|
2
2
|
import '../../../core/BaseResponse.js';
|
|
3
3
|
import 'zod';
|
|
4
|
-
export { U as UserOrganisation, kl as UserOrganisationDTO, kn as UserOrganisationQueryDTO, km as UserOrganisationQuerySchema, kk as UserOrganisationSchema, kj as UserOrganisationSimple, kr as createUserOrganisation, kt as deleteUserOrganisation, kq as findUserOrganisations, ku as getUserOrganisationCache, kv as getUserOrganisationCacheSimple, kw as getUserOrganisationPresignedUrl, kp as newUserOrganisationPayload, ko as toUserOrganisationPayload, ks as updateUserOrganisation } from '../../../user_organisation_service-
|
|
4
|
+
export { U as UserOrganisation, kl as UserOrganisationDTO, kn as UserOrganisationQueryDTO, km as UserOrganisationQuerySchema, kk as UserOrganisationSchema, kj as UserOrganisationSimple, kr as createUserOrganisation, kt as deleteUserOrganisation, kq as findUserOrganisations, ku as getUserOrganisationCache, kv as getUserOrganisationCacheSimple, kw as getUserOrganisationPresignedUrl, kp as newUserOrganisationPayload, ko as toUserOrganisationPayload, ks as updateUserOrganisation } from '../../../user_organisation_service-Dkh1nIGX.js';
|
|
5
5
|
import '../../../zod_utils/zod_base_schema.js';
|
|
6
6
|
import '../../master/main/master_main_sim_provider_service.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../../core/Enums.js';
|
|
2
2
|
import '../../../core/BaseResponse.js';
|
|
3
3
|
import 'zod';
|
|
4
|
-
export { h0 as CreateUserDTO, g$ as CreateUserSchema, a as User, h8 as UserDefaultDateFormatDTO, h7 as UserDefaultDateFormatSchema, h4 as UserDefaultLanguageDTO, h3 as UserDefaultLanguageSchema, h6 as UserDefaultTimeZoneDTO, h5 as UserDefaultTimeZoneSchema, h2 as UserQueryDTO, h1 as UserQuerySchema, g_ as UserVehicleLink, hc as createUser, he as deleteUser, hb as findUsers, hf as getUserCache, hg as getUserCacheSimple, hh as getUserPresignedUrl, h9 as newUserPayload, ha as toUserPayload, hd as updateUser, hk as updateUserDefaultDateformat, hi as updateUserDefaultLanguage, hj as updateUserDefaultTimezone } from '../../../user_organisation_service-
|
|
4
|
+
export { h0 as CreateUserDTO, g$ as CreateUserSchema, a as User, h8 as UserDefaultDateFormatDTO, h7 as UserDefaultDateFormatSchema, h4 as UserDefaultLanguageDTO, h3 as UserDefaultLanguageSchema, h6 as UserDefaultTimeZoneDTO, h5 as UserDefaultTimeZoneSchema, h2 as UserQueryDTO, h1 as UserQuerySchema, g_ as UserVehicleLink, hc as createUser, he as deleteUser, hb as findUsers, hf as getUserCache, hg as getUserCacheSimple, hh as getUserPresignedUrl, h9 as newUserPayload, ha as toUserPayload, hd as updateUser, hk as updateUserDefaultDateformat, hi as updateUserDefaultLanguage, hj as updateUserDefaultTimezone } from '../../../user_organisation_service-Dkh1nIGX.js';
|
|
5
5
|
import '../../../zod_utils/zod_base_schema.js';
|
|
6
6
|
import '../../master/main/master_main_sim_provider_service.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OdometerSource, 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, M as MasterVehicle } from '../../../../user_organisation_service-
|
|
4
|
+
import { U as UserOrganisation, M as MasterVehicle } from '../../../../user_organisation_service-Dkh1nIGX.js';
|
|
5
5
|
import '../../../../zod_utils/zod_base_schema.js';
|
|
6
6
|
import '../../../master/main/master_main_sim_provider_service.js';
|
|
7
7
|
|
|
@@ -2,5 +2,5 @@ import '../../../core/Enums.js';
|
|
|
2
2
|
import '../../../core/BaseResponse.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '../../../zod_utils/zod_base_schema.js';
|
|
5
|
-
export { M as MasterVehicle, fn as MasterVehicleDropdown, fC as SimpleFindQueryDTO, fB as SimpleFindQuerySchema, fu as VehicleDTO, fo as VehicleDetailBody, fE as VehicleDetailBodyDTO, fD as VehicleDetailBodySchema, fr as VehicleDetailGPS, fK as VehicleDetailGPSAnalyticsDTO, fJ as VehicleDetailGPSAnalyticsSchema, fI as VehicleDetailGPSDataDTO, fH as VehicleDetailGPSDataSchema, fG as VehicleDetailGPSMainDTO, fF as VehicleDetailGPSMainSchema, fp as VehicleDetailLifeCycle, fM as VehicleDetailLifeCycleDto, fL as VehicleDetailLifeCycleSchema, fq as VehicleDetailPurchase, fO as VehicleDetailPurchaseDTO, fN as VehicleDetailPurchaseSchema, fs as VehicleDetailTrip, fQ as VehicleDetailTripDTO, fP as VehicleDetailTripSchema, fw as VehicleDeviceLinkDTO, fv as VehicleDeviceLinkSchema, fy as VehicleDeviceUnlinkDTO, fx as VehicleDeviceUnlinkSchema, fA as VehicleDriverLinkDTO, fz as VehicleDriverLinkSchema, fU as VehicleGPSQueryDTO, fT as VehicleGPSQuerySchema, fS as VehicleQueryDTO, fR as VehicleQuerySchema, ft as VehicleSchema, g2 as createVehicle, g4 as deleteVehicle, g1 as findVehicleGPSDetails, f$ as findVehicles, g0 as findVehiclesLiveDashboard, gj as getDeviceLinkHistoryByDevice, gi as getDeviceLinkHistoryByVehicle, gf as getDriverLinkHistoryByDriver, ge as getDriverLinkHistoryByVehicle, gk as getVehicleCache, gn as getVehicleParentCache, gl as getVehicleSimpleCache, gm as getVehicleSimpleDropdownCustom, gg as linkDeviceToVehicle, gc as linkDriverToVehicle, fW as newVehiclePayload, f_ as toVehicleDetailLifeCyclePayload, fZ as toVehicleDetailPurchasePayload, fY as toVehicleDetailsBodyPayload, fX as toVehicleDetailsGPSPayload, fV as toVehiclePayload, gh as unlinkDeviceFromVehicle, gd as unlinkDriverFromVehicle, g3 as updateVehicle, g5 as updateVehicleBodyDetails, ga as updateVehicleGPSDetailsAnalytics, g9 as updateVehicleGPSDetailsData, g8 as updateVehicleGPSDetailsMain, g6 as updateVehicleLifeCycleDetails, g7 as updateVehiclePurchaseDetails, gb as updateVehicleTripDetails } from '../../../user_organisation_service-
|
|
5
|
+
export { M as MasterVehicle, fn as MasterVehicleDropdown, fC as SimpleFindQueryDTO, fB as SimpleFindQuerySchema, fu as VehicleDTO, fo as VehicleDetailBody, fE as VehicleDetailBodyDTO, fD as VehicleDetailBodySchema, fr as VehicleDetailGPS, fK as VehicleDetailGPSAnalyticsDTO, fJ as VehicleDetailGPSAnalyticsSchema, fI as VehicleDetailGPSDataDTO, fH as VehicleDetailGPSDataSchema, fG as VehicleDetailGPSMainDTO, fF as VehicleDetailGPSMainSchema, fp as VehicleDetailLifeCycle, fM as VehicleDetailLifeCycleDto, fL as VehicleDetailLifeCycleSchema, fq as VehicleDetailPurchase, fO as VehicleDetailPurchaseDTO, fN as VehicleDetailPurchaseSchema, fs as VehicleDetailTrip, fQ as VehicleDetailTripDTO, fP as VehicleDetailTripSchema, fw as VehicleDeviceLinkDTO, fv as VehicleDeviceLinkSchema, fy as VehicleDeviceUnlinkDTO, fx as VehicleDeviceUnlinkSchema, fA as VehicleDriverLinkDTO, fz as VehicleDriverLinkSchema, fU as VehicleGPSQueryDTO, fT as VehicleGPSQuerySchema, fS as VehicleQueryDTO, fR as VehicleQuerySchema, ft as VehicleSchema, g2 as createVehicle, g4 as deleteVehicle, g1 as findVehicleGPSDetails, f$ as findVehicles, g0 as findVehiclesLiveDashboard, gj as getDeviceLinkHistoryByDevice, gi as getDeviceLinkHistoryByVehicle, gf as getDriverLinkHistoryByDriver, ge as getDriverLinkHistoryByVehicle, gk as getVehicleCache, gn as getVehicleParentCache, gl as getVehicleSimpleCache, gm as getVehicleSimpleDropdownCustom, gg as linkDeviceToVehicle, gc as linkDriverToVehicle, fW as newVehiclePayload, f_ as toVehicleDetailLifeCyclePayload, fZ as toVehicleDetailPurchasePayload, fY as toVehicleDetailsBodyPayload, fX as toVehicleDetailsGPSPayload, fV as toVehiclePayload, gh as unlinkDeviceFromVehicle, gd as unlinkDriverFromVehicle, g3 as updateVehicle, g5 as updateVehicleBodyDetails, ga as updateVehicleGPSDetailsAnalytics, g9 as updateVehicleGPSDetailsData, g8 as updateVehicleGPSDetailsMain, g6 as updateVehicleLifeCycleDetails, g7 as updateVehiclePurchaseDetails, gb as updateVehicleTripDetails } from '../../../user_organisation_service-Dkh1nIGX.js';
|
|
6
6
|
import '../../master/main/master_main_sim_provider_service.js';
|
|
@@ -495,6 +495,12 @@ var VehicleDetailBodySchema = z3.object({
|
|
|
495
495
|
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
496
496
|
});
|
|
497
497
|
var VehicleDetailGPSMainSchema = z3.object({
|
|
498
|
+
temperature: enumOptional("Temperature", YesNo, "No" /* No */),
|
|
499
|
+
duel_temperature: enumOptional("Dual Temperature", YesNo, "No" /* No */),
|
|
500
|
+
fuel: enumOptional("Fuel", YesNo, "No" /* No */),
|
|
501
|
+
fuel_bluetooth: enumOptional("Fuel Bluetooth", YesNo, "No" /* No */),
|
|
502
|
+
fuel_tank_size: numberOptional("Fuel Tank Size"),
|
|
503
|
+
over_speed_kmph: numberOptional("Over Speed KMPH"),
|
|
498
504
|
gps_lock_relay: enumOptional("GPS Lock Relay", YesNo, "No" /* No */),
|
|
499
505
|
gps_door_locker: enumOptional("GPS Door Locker", YesNo, "No" /* No */),
|
|
500
506
|
door_sensor: enumOptional("Door Sensor", YesNo, "No" /* No */),
|
|
@@ -779,6 +785,12 @@ var newVehiclePayload = () => ({
|
|
|
779
785
|
vehicle_tank_2_fuel_quantity: 0
|
|
780
786
|
});
|
|
781
787
|
var toVehicleDetailsGPSPayload = (vehicleGPS) => ({
|
|
788
|
+
temperature: vehicleGPS?.temperature ?? "No" /* No */,
|
|
789
|
+
duel_temperature: vehicleGPS?.duel_temperature ?? "No" /* No */,
|
|
790
|
+
fuel: vehicleGPS?.fuel ?? "No" /* No */,
|
|
791
|
+
fuel_bluetooth: vehicleGPS?.fuel_bluetooth ?? "No" /* No */,
|
|
792
|
+
fuel_tank_size: vehicleGPS?.fuel_tank_size ?? 0,
|
|
793
|
+
over_speed_kmph: vehicleGPS?.over_speed_kmph ?? 0,
|
|
782
794
|
gps_lock_relay: vehicleGPS?.gps_lock_relay ?? "No" /* No */,
|
|
783
795
|
gps_door_locker: vehicleGPS?.gps_door_locker ?? "No" /* No */,
|
|
784
796
|
door_sensor: vehicleGPS?.door_sensor ?? "No" /* No */,
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { Status, PAGING, LoadParents, LoadChild, LoadChildCount, OrderBy, YesNo } from '../../../core/Enums.js';
|
|
2
|
+
import { FBR, SBR } from '../../../core/BaseResponse.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { U as UserOrganisation, a as User } from '../../../user_organisation_service-Dkh1nIGX.js';
|
|
5
|
+
import '../../../zod_utils/zod_base_schema.js';
|
|
6
|
+
import '../main/master_main_sim_provider_service.js';
|
|
7
|
+
|
|
8
|
+
interface MasterClass extends Record<string, unknown> {
|
|
9
|
+
class_id: string;
|
|
10
|
+
class_name: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
status: Status;
|
|
13
|
+
added_date_time: string;
|
|
14
|
+
modified_date_time: string;
|
|
15
|
+
organisation_id?: string;
|
|
16
|
+
UserOrganisation?: UserOrganisation;
|
|
17
|
+
Student: User[];
|
|
18
|
+
_count?: {
|
|
19
|
+
Student: number;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
declare const MasterClassSchema: z.ZodObject<{
|
|
23
|
+
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
24
|
+
class_name: z.ZodEffects<z.ZodString, string, string>;
|
|
25
|
+
description: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
26
|
+
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
class_name: string;
|
|
29
|
+
description: string;
|
|
30
|
+
status: Status;
|
|
31
|
+
organisation_id: string;
|
|
32
|
+
}, {
|
|
33
|
+
class_name: string;
|
|
34
|
+
status: Status;
|
|
35
|
+
organisation_id: string;
|
|
36
|
+
description?: string | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
type MasterClassDTO = z.infer<typeof MasterClassSchema>;
|
|
39
|
+
declare const MasterClassQuerySchema: z.ZodObject<{
|
|
40
|
+
search: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
41
|
+
status: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Status>, "many">>>;
|
|
42
|
+
paging: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof PAGING>>>;
|
|
43
|
+
page_count: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
44
|
+
page_index: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
45
|
+
load_parents: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadParents>>>;
|
|
46
|
+
load_parents_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
47
|
+
load_child: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadChild>>>;
|
|
48
|
+
load_child_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
49
|
+
load_child_count: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadChildCount>>>;
|
|
50
|
+
load_child_count_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
51
|
+
include_details: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
52
|
+
where_relations: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
53
|
+
order_by: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
54
|
+
name: z.ZodEffects<z.ZodString, string, string>;
|
|
55
|
+
field: z.ZodEffects<z.ZodString, string, string>;
|
|
56
|
+
direction: z.ZodType<OrderBy, z.ZodTypeDef, OrderBy>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
name: string;
|
|
59
|
+
field: string;
|
|
60
|
+
direction: OrderBy;
|
|
61
|
+
}, {
|
|
62
|
+
name: string;
|
|
63
|
+
field: string;
|
|
64
|
+
direction: OrderBy;
|
|
65
|
+
}>, "many">>>;
|
|
66
|
+
include_master_data: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
67
|
+
date_format_id: z.ZodEffects<z.ZodString, string, string>;
|
|
68
|
+
time_zone_id: z.ZodEffects<z.ZodString, string, string>;
|
|
69
|
+
} & {
|
|
70
|
+
organisation_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
71
|
+
class_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
status: Status[];
|
|
74
|
+
search: string;
|
|
75
|
+
paging: PAGING;
|
|
76
|
+
page_count: number;
|
|
77
|
+
page_index: number;
|
|
78
|
+
load_parents: LoadParents;
|
|
79
|
+
load_parents_list: string[];
|
|
80
|
+
load_child: LoadChild;
|
|
81
|
+
load_child_list: string[];
|
|
82
|
+
load_child_count: LoadChildCount;
|
|
83
|
+
load_child_count_list: string[];
|
|
84
|
+
include_details: Record<string, any>;
|
|
85
|
+
where_relations: Record<string, any>;
|
|
86
|
+
order_by: {
|
|
87
|
+
name: string;
|
|
88
|
+
field: string;
|
|
89
|
+
direction: OrderBy;
|
|
90
|
+
}[];
|
|
91
|
+
include_master_data: YesNo;
|
|
92
|
+
date_format_id: string;
|
|
93
|
+
time_zone_id: string;
|
|
94
|
+
organisation_ids: string[];
|
|
95
|
+
class_ids: string[];
|
|
96
|
+
}, {
|
|
97
|
+
date_format_id: string;
|
|
98
|
+
time_zone_id: string;
|
|
99
|
+
status?: Status[] | undefined;
|
|
100
|
+
search?: string | undefined;
|
|
101
|
+
paging?: PAGING | undefined;
|
|
102
|
+
page_count?: unknown;
|
|
103
|
+
page_index?: unknown;
|
|
104
|
+
load_parents?: LoadParents | undefined;
|
|
105
|
+
load_parents_list?: string[] | undefined;
|
|
106
|
+
load_child?: LoadChild | undefined;
|
|
107
|
+
load_child_list?: string[] | undefined;
|
|
108
|
+
load_child_count?: LoadChildCount | undefined;
|
|
109
|
+
load_child_count_list?: string[] | undefined;
|
|
110
|
+
include_details?: Record<string, any> | undefined;
|
|
111
|
+
where_relations?: Record<string, any> | undefined;
|
|
112
|
+
order_by?: {
|
|
113
|
+
name: string;
|
|
114
|
+
field: string;
|
|
115
|
+
direction: OrderBy;
|
|
116
|
+
}[] | undefined;
|
|
117
|
+
include_master_data?: YesNo | undefined;
|
|
118
|
+
organisation_ids?: string[] | undefined;
|
|
119
|
+
class_ids?: string[] | undefined;
|
|
120
|
+
}>;
|
|
121
|
+
type MasterClassQueryDTO = z.infer<typeof MasterClassQuerySchema>;
|
|
122
|
+
declare const toMasterClassPayload: (row: MasterClass) => MasterClassDTO;
|
|
123
|
+
declare const newMasterClassPayload: () => MasterClassDTO;
|
|
124
|
+
declare const findMasterClass: (data: MasterClassQueryDTO) => Promise<FBR<MasterClass[]>>;
|
|
125
|
+
declare const createMasterClass: (data: MasterClassDTO) => Promise<SBR>;
|
|
126
|
+
declare const updateMasterClass: (id: string, data: MasterClassDTO) => Promise<SBR>;
|
|
127
|
+
declare const deleteMasterClass: (id: string) => Promise<SBR>;
|
|
128
|
+
declare const getMasterClassCache: (organisation_id: string) => Promise<FBR<MasterClass[]>>;
|
|
129
|
+
declare const getMasterClassCacheCount: (organisation_id: string) => Promise<FBR<MasterClass>>;
|
|
130
|
+
|
|
131
|
+
export { type MasterClass, type MasterClassDTO, type MasterClassQueryDTO, MasterClassQuerySchema, MasterClassSchema, createMasterClass, deleteMasterClass, findMasterClass, getMasterClassCache, getMasterClassCacheCount, newMasterClassPayload, toMasterClassPayload, updateMasterClass };
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
// src/core/sdk-config.ts
|
|
2
|
+
var KEY = "__vms_axios_instance__";
|
|
3
|
+
var getAxiosInstance = () => {
|
|
4
|
+
const instance = globalThis[KEY];
|
|
5
|
+
if (!instance) {
|
|
6
|
+
throw new Error("\u274C Axios instance not configured. Call setAxiosInstance() first.");
|
|
7
|
+
}
|
|
8
|
+
return instance;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// src/core/apiCall.ts
|
|
12
|
+
var apiGet = async (url, params) => {
|
|
13
|
+
const response = await getAxiosInstance().get(url, { params });
|
|
14
|
+
return response.data;
|
|
15
|
+
};
|
|
16
|
+
var apiPost = async (url, data) => {
|
|
17
|
+
const response = await getAxiosInstance().post(url, data);
|
|
18
|
+
return response.data;
|
|
19
|
+
};
|
|
20
|
+
var apiPatch = async (url, data) => {
|
|
21
|
+
const response = await getAxiosInstance().patch(url, data);
|
|
22
|
+
return response.data;
|
|
23
|
+
};
|
|
24
|
+
var apiDelete = async (url) => {
|
|
25
|
+
const response = await getAxiosInstance().delete(url);
|
|
26
|
+
return response.data;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// src/services/master/bus/master_class_service.ts
|
|
30
|
+
import { z as z3 } from "zod";
|
|
31
|
+
|
|
32
|
+
// src/zod_utils/zod_utils.ts
|
|
33
|
+
import { z } from "zod";
|
|
34
|
+
|
|
35
|
+
// src/core/BaseResponse.ts
|
|
36
|
+
var r_log = (data = {}) => {
|
|
37
|
+
return data;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// src/zod_utils/zod_utils.ts
|
|
41
|
+
var handleNullOrUndefined = (value) => typeof value === "string" ? value : "";
|
|
42
|
+
var stringMandatory = (fieldName, min = 1, max = 100) => {
|
|
43
|
+
const schema = z.string().trim().min(min, `${fieldName} must be at least ${min} characters.`).max(max, `${fieldName} must be at most ${max} characters.`).nonempty(`${fieldName} is required.`).transform(handleNullOrUndefined);
|
|
44
|
+
return schema;
|
|
45
|
+
};
|
|
46
|
+
var stringOptional = (fieldName, min = 0, max = 255, defaultValue = "") => {
|
|
47
|
+
const schema = z.string().trim().min(min, `${fieldName} must be at least ${min} characters.`).max(max, `${fieldName} must be at most ${max} characters.`).transform(handleNullOrUndefined).default(defaultValue);
|
|
48
|
+
return schema;
|
|
49
|
+
};
|
|
50
|
+
var stringArrayOptional = (fieldName, min = 0, max = 100, defaultValue = [], unique = false) => {
|
|
51
|
+
const schema = z.array(z.string().trim(), {
|
|
52
|
+
invalid_type_error: `${fieldName} must be an array of strings.`
|
|
53
|
+
}).min(min, `${fieldName} must contain at least ${min} items.`).max(max, `${fieldName} must contain at most ${max} items.`);
|
|
54
|
+
if (unique) {
|
|
55
|
+
schema.refine(
|
|
56
|
+
(arr) => new Set(arr).size === arr.length,
|
|
57
|
+
`${fieldName} must contain unique values.`
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
return schema.optional().default(defaultValue);
|
|
61
|
+
};
|
|
62
|
+
var numberOptional = (fieldName, min = 0, max = 1e14, defaultValue = 0) => {
|
|
63
|
+
return z.preprocess(
|
|
64
|
+
(val) => typeof val === "string" && val.trim() !== "" ? Number(val) : val,
|
|
65
|
+
z.number({ invalid_type_error: `${fieldName} must be a number.` }).min(min, `${fieldName} must be at least ${min}.`).max(max, `${fieldName} must be at most ${max}.`).optional().default(defaultValue)
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
var enumMandatory = (fieldName, enumType, defaultValue) => {
|
|
69
|
+
return z.union([
|
|
70
|
+
z.nativeEnum(enumType, {
|
|
71
|
+
invalid_type_error: `${fieldName} should be one of the following values: ${Object.values(
|
|
72
|
+
enumType
|
|
73
|
+
).join(", ")}.`
|
|
74
|
+
}),
|
|
75
|
+
z.string().refine((val) => Object.values(enumType).includes(val), {
|
|
76
|
+
message: `${fieldName} should be one of the following values: ${Object.values(
|
|
77
|
+
enumType
|
|
78
|
+
).join(", ")}.`
|
|
79
|
+
})
|
|
80
|
+
]).default(defaultValue).refine((val) => val !== "", {
|
|
81
|
+
message: `Please select ${fieldName}.`
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
var enumOptional = (fieldName, enumType, defaultValue) => {
|
|
85
|
+
return z.nativeEnum(enumType, {
|
|
86
|
+
invalid_type_error: `${fieldName} must be an array containing only the following values: ${Object.values(
|
|
87
|
+
enumType
|
|
88
|
+
).join(", ")}.`
|
|
89
|
+
}).optional().default(() => defaultValue);
|
|
90
|
+
};
|
|
91
|
+
var getAllEnums = (enumType) => {
|
|
92
|
+
return Object.values(enumType);
|
|
93
|
+
};
|
|
94
|
+
var enumArrayOptional = (fieldName, enumType, defaultValue = getAllEnums(enumType), min = 0, max = 100, unique = false) => {
|
|
95
|
+
const schema = z.array(z.nativeEnum(enumType), {
|
|
96
|
+
invalid_type_error: `${fieldName} must be an array containing only the following values: ${Object.values(
|
|
97
|
+
enumType
|
|
98
|
+
).join(", ")}.`
|
|
99
|
+
}).min(min, `${fieldName} must contain at least ${min} items.`).max(max, `${fieldName} must contain at most ${max} items.`);
|
|
100
|
+
if (unique) {
|
|
101
|
+
schema.refine(
|
|
102
|
+
(arr) => new Set(arr).size === arr.length,
|
|
103
|
+
`${fieldName} must contain unique values.`
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
return schema.optional().default(() => defaultValue);
|
|
107
|
+
};
|
|
108
|
+
var dynamicJsonSchema = (fieldName, defaultValue = {}) => z.record(z.any()).optional().default(() => defaultValue);
|
|
109
|
+
var single_select_mandatory = (fieldName) => {
|
|
110
|
+
const schema = z.string().trim().nonempty(`Please select ${fieldName}.`).transform(handleNullOrUndefined);
|
|
111
|
+
return schema;
|
|
112
|
+
};
|
|
113
|
+
var single_select_optional = (fieldName) => {
|
|
114
|
+
r_log(fieldName);
|
|
115
|
+
const schema = z.string().trim().transform(handleNullOrUndefined);
|
|
116
|
+
return schema;
|
|
117
|
+
};
|
|
118
|
+
var multi_select_optional = (fieldName, max = 1e3, defaultValue = []) => {
|
|
119
|
+
const schema = z.array(
|
|
120
|
+
z.string({
|
|
121
|
+
invalid_type_error: `${fieldName} must be an array of strings.`
|
|
122
|
+
})
|
|
123
|
+
).max(
|
|
124
|
+
max,
|
|
125
|
+
`Please select at most ${max} ${fieldName}${max > 1 ? "s" : ""}.`
|
|
126
|
+
);
|
|
127
|
+
return schema.optional().default(defaultValue);
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
// src/zod_utils/zod_base_schema.ts
|
|
131
|
+
import { z as z2 } from "zod";
|
|
132
|
+
|
|
133
|
+
// src/core/Enums.ts
|
|
134
|
+
var PAGING = /* @__PURE__ */ ((PAGING2) => {
|
|
135
|
+
PAGING2["Yes"] = "Yes";
|
|
136
|
+
PAGING2["No"] = "No";
|
|
137
|
+
return PAGING2;
|
|
138
|
+
})(PAGING || {});
|
|
139
|
+
var LoadParents = /* @__PURE__ */ ((LoadParents2) => {
|
|
140
|
+
LoadParents2["Yes"] = "Yes";
|
|
141
|
+
LoadParents2["No"] = "No";
|
|
142
|
+
LoadParents2["Custom"] = "Custom";
|
|
143
|
+
return LoadParents2;
|
|
144
|
+
})(LoadParents || {});
|
|
145
|
+
var LoadChild = /* @__PURE__ */ ((LoadChild2) => {
|
|
146
|
+
LoadChild2["No"] = "No";
|
|
147
|
+
LoadChild2["Yes"] = "Yes";
|
|
148
|
+
LoadChild2["Count"] = "Count";
|
|
149
|
+
LoadChild2["Custom"] = "Custom";
|
|
150
|
+
LoadChild2["Direct"] = "Direct";
|
|
151
|
+
return LoadChild2;
|
|
152
|
+
})(LoadChild || {});
|
|
153
|
+
var LoadChildCount = /* @__PURE__ */ ((LoadChildCount2) => {
|
|
154
|
+
LoadChildCount2["No"] = "No";
|
|
155
|
+
LoadChildCount2["Yes"] = "Yes";
|
|
156
|
+
LoadChildCount2["Custom"] = "Custom";
|
|
157
|
+
return LoadChildCount2;
|
|
158
|
+
})(LoadChildCount || {});
|
|
159
|
+
var OrderBy = /* @__PURE__ */ ((OrderBy2) => {
|
|
160
|
+
OrderBy2["asc"] = "asc";
|
|
161
|
+
OrderBy2["desc"] = "desc";
|
|
162
|
+
return OrderBy2;
|
|
163
|
+
})(OrderBy || {});
|
|
164
|
+
var LoginFrom = /* @__PURE__ */ ((LoginFrom2) => {
|
|
165
|
+
LoginFrom2["Web"] = "Web";
|
|
166
|
+
LoginFrom2["Android"] = "Android";
|
|
167
|
+
LoginFrom2["IPhone"] = "IPhone";
|
|
168
|
+
LoginFrom2["AndroidPWA"] = "AndroidPWA";
|
|
169
|
+
LoginFrom2["iOSPWA"] = "iOSPWA";
|
|
170
|
+
return LoginFrom2;
|
|
171
|
+
})(LoginFrom || {});
|
|
172
|
+
var Status = /* @__PURE__ */ ((Status2) => {
|
|
173
|
+
Status2["Active"] = "Active";
|
|
174
|
+
Status2["Inactive"] = "Inactive";
|
|
175
|
+
return Status2;
|
|
176
|
+
})(Status || {});
|
|
177
|
+
var FileType = /* @__PURE__ */ ((FileType2) => {
|
|
178
|
+
FileType2["NoFile"] = "NoFile";
|
|
179
|
+
FileType2["Image"] = "Image";
|
|
180
|
+
FileType2["Video"] = "Video";
|
|
181
|
+
FileType2["PDF"] = "PDF";
|
|
182
|
+
return FileType2;
|
|
183
|
+
})(FileType || {});
|
|
184
|
+
var YesNo = /* @__PURE__ */ ((YesNo2) => {
|
|
185
|
+
YesNo2["Yes"] = "Yes";
|
|
186
|
+
YesNo2["No"] = "No";
|
|
187
|
+
return YesNo2;
|
|
188
|
+
})(YesNo || {});
|
|
189
|
+
|
|
190
|
+
// src/zod_utils/zod_base_schema.ts
|
|
191
|
+
var OrderBySchema = z2.array(
|
|
192
|
+
z2.object({
|
|
193
|
+
name: stringMandatory("Order Field Name", 0, 255),
|
|
194
|
+
field: stringMandatory("Order Field Name", 0, 255),
|
|
195
|
+
direction: enumMandatory("Order Direction", OrderBy, "asc" /* asc */)
|
|
196
|
+
})
|
|
197
|
+
);
|
|
198
|
+
var BaseFileSchema = z2.object({
|
|
199
|
+
usage_type: stringMandatory("Usage Type", 3, 100),
|
|
200
|
+
file_type: enumMandatory("File Type", FileType, "Image" /* Image */),
|
|
201
|
+
file_url: stringOptional("File URL", 0, 300),
|
|
202
|
+
file_key: stringOptional("File Key", 0, 300),
|
|
203
|
+
file_name: stringOptional("File Name", 0, 300),
|
|
204
|
+
file_description: stringOptional("File Description", 0, 2e3),
|
|
205
|
+
file_size: numberOptional("File Size"),
|
|
206
|
+
file_metadata: dynamicJsonSchema("File Metadata", {}),
|
|
207
|
+
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
208
|
+
});
|
|
209
|
+
var BaseQuerySchema = z2.object({
|
|
210
|
+
search: stringOptional("Search", 0, 255, ""),
|
|
211
|
+
status: enumArrayOptional("Status", Status, getAllEnums(Status), 0, 10, true),
|
|
212
|
+
paging: enumOptional("Paging", PAGING, "Yes" /* Yes */),
|
|
213
|
+
page_count: numberOptional("Page Count", 0, 1e3, 100),
|
|
214
|
+
page_index: numberOptional("Page Index", 0, 1e3, 0),
|
|
215
|
+
load_parents: enumOptional("Load Parents", LoadParents, "No" /* No */),
|
|
216
|
+
load_parents_list: stringArrayOptional("Load Parents List"),
|
|
217
|
+
load_child: enumOptional("Load Child", LoadChild, "No" /* No */),
|
|
218
|
+
load_child_list: stringArrayOptional("Load Child List"),
|
|
219
|
+
load_child_count: enumOptional(
|
|
220
|
+
"Load Child",
|
|
221
|
+
LoadChildCount,
|
|
222
|
+
"No" /* No */
|
|
223
|
+
),
|
|
224
|
+
load_child_count_list: stringArrayOptional("Load Child List"),
|
|
225
|
+
include_details: dynamicJsonSchema("Include Details", {}),
|
|
226
|
+
where_relations: dynamicJsonSchema("Where Relations", {}),
|
|
227
|
+
order_by: OrderBySchema.optional().default([]),
|
|
228
|
+
include_master_data: enumOptional("Include Master Data", YesNo, "No" /* No */),
|
|
229
|
+
date_format_id: single_select_optional("MasterMainDateFormat"),
|
|
230
|
+
time_zone_id: single_select_optional("MasterMainTimeZone")
|
|
231
|
+
});
|
|
232
|
+
var FilePresignedUrlSchema = z2.object({
|
|
233
|
+
file_name: stringMandatory("File Name", 1, 255),
|
|
234
|
+
file_type: enumMandatory("File Type", FileType, "Image" /* Image */)
|
|
235
|
+
});
|
|
236
|
+
var MongoBaseQuerySchema = z2.object({
|
|
237
|
+
search: stringOptional("Search", 0, 255, ""),
|
|
238
|
+
paging: enumOptional("Paging", PAGING, "Yes" /* Yes */),
|
|
239
|
+
page_count: numberOptional("Page Count", 0, 1e3, 100),
|
|
240
|
+
page_index: numberOptional("Page Index", 0, 1e3, 0),
|
|
241
|
+
login_from: enumMandatory("Login From", LoginFrom, "Web" /* Web */),
|
|
242
|
+
date_format_id: single_select_optional("MasterMainDateFormat"),
|
|
243
|
+
// ✅ Single-selection -> MasterMainDateFormat
|
|
244
|
+
time_zone_id: single_select_optional("MasterMainTimeZone")
|
|
245
|
+
// ✅ Single-selection -> MasterMainTimeZone
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
// src/services/master/bus/master_class_service.ts
|
|
249
|
+
var URL = "master/bus/class";
|
|
250
|
+
var ENDPOINTS = {
|
|
251
|
+
find: `${URL}/search`,
|
|
252
|
+
create: URL,
|
|
253
|
+
update: (id) => `${URL}/${id}`,
|
|
254
|
+
delete: (id) => `${URL}/${id}`,
|
|
255
|
+
cache: (organisation_id) => `${URL}/cache/${organisation_id}`,
|
|
256
|
+
cache_count: (organisation_id) => `${URL}/cache_count/${organisation_id}`
|
|
257
|
+
};
|
|
258
|
+
var MasterClassSchema = z3.object({
|
|
259
|
+
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
260
|
+
// ✅ Single-Selection -> UserOrganisation
|
|
261
|
+
class_name: stringMandatory("Class Name", 3, 100),
|
|
262
|
+
description: stringOptional("Description", 0, 300),
|
|
263
|
+
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
264
|
+
});
|
|
265
|
+
var MasterClassQuerySchema = BaseQuerySchema.extend({
|
|
266
|
+
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
267
|
+
// ✅ Multi-selection -> UserOrganisation
|
|
268
|
+
class_ids: multi_select_optional("MasterClass")
|
|
269
|
+
// ✅ Multi-selection -> MasterClass
|
|
270
|
+
});
|
|
271
|
+
var toMasterClassPayload = (row) => ({
|
|
272
|
+
organisation_id: row.organisation_id ?? "",
|
|
273
|
+
class_name: row.class_name,
|
|
274
|
+
description: row.description || "",
|
|
275
|
+
status: row.status
|
|
276
|
+
});
|
|
277
|
+
var newMasterClassPayload = () => ({
|
|
278
|
+
organisation_id: "",
|
|
279
|
+
class_name: "",
|
|
280
|
+
description: "",
|
|
281
|
+
status: "Active" /* Active */
|
|
282
|
+
});
|
|
283
|
+
var findMasterClass = async (data) => {
|
|
284
|
+
return apiPost(ENDPOINTS.find, data);
|
|
285
|
+
};
|
|
286
|
+
var createMasterClass = async (data) => {
|
|
287
|
+
return apiPost(ENDPOINTS.create, data);
|
|
288
|
+
};
|
|
289
|
+
var updateMasterClass = async (id, data) => {
|
|
290
|
+
return apiPatch(ENDPOINTS.update(id), data);
|
|
291
|
+
};
|
|
292
|
+
var deleteMasterClass = async (id) => {
|
|
293
|
+
return apiDelete(ENDPOINTS.delete(id));
|
|
294
|
+
};
|
|
295
|
+
var getMasterClassCache = async (organisation_id) => {
|
|
296
|
+
return apiGet(ENDPOINTS.cache(organisation_id));
|
|
297
|
+
};
|
|
298
|
+
var getMasterClassCacheCount = async (organisation_id) => {
|
|
299
|
+
return apiGet(ENDPOINTS.cache_count(organisation_id));
|
|
300
|
+
};
|
|
301
|
+
export {
|
|
302
|
+
MasterClassQuerySchema,
|
|
303
|
+
MasterClassSchema,
|
|
304
|
+
createMasterClass,
|
|
305
|
+
deleteMasterClass,
|
|
306
|
+
findMasterClass,
|
|
307
|
+
getMasterClassCache,
|
|
308
|
+
getMasterClassCacheCount,
|
|
309
|
+
newMasterClassPayload,
|
|
310
|
+
toMasterClassPayload,
|
|
311
|
+
updateMasterClass
|
|
312
|
+
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { Status, PAGING, LoadParents, LoadChild, LoadChildCount, OrderBy, YesNo } from '../../../core/Enums.js';
|
|
2
|
+
import { FBR, SBR } from '../../../core/BaseResponse.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { U as UserOrganisation, a as User } from '../../../user_organisation_service-Dkh1nIGX.js';
|
|
5
|
+
import '../../../zod_utils/zod_base_schema.js';
|
|
6
|
+
import '../main/master_main_sim_provider_service.js';
|
|
7
|
+
|
|
8
|
+
interface MasterProgram extends Record<string, unknown> {
|
|
9
|
+
program_id: string;
|
|
10
|
+
program_name: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
status: Status;
|
|
13
|
+
added_date_time: string;
|
|
14
|
+
modified_date_time: string;
|
|
15
|
+
organisation_id?: string;
|
|
16
|
+
UserOrganisation?: UserOrganisation;
|
|
17
|
+
Student: User[];
|
|
18
|
+
_count?: {
|
|
19
|
+
Student: number;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
declare const MasterProgramSchema: z.ZodObject<{
|
|
23
|
+
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
24
|
+
program_name: z.ZodEffects<z.ZodString, string, string>;
|
|
25
|
+
description: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
26
|
+
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
description: string;
|
|
29
|
+
status: Status;
|
|
30
|
+
organisation_id: string;
|
|
31
|
+
program_name: string;
|
|
32
|
+
}, {
|
|
33
|
+
status: Status;
|
|
34
|
+
organisation_id: string;
|
|
35
|
+
program_name: string;
|
|
36
|
+
description?: string | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
type MasterProgramDTO = z.infer<typeof MasterProgramSchema>;
|
|
39
|
+
declare const MasterProgramQuerySchema: z.ZodObject<{
|
|
40
|
+
search: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
41
|
+
status: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Status>, "many">>>;
|
|
42
|
+
paging: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof PAGING>>>;
|
|
43
|
+
page_count: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
44
|
+
page_index: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
45
|
+
load_parents: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadParents>>>;
|
|
46
|
+
load_parents_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
47
|
+
load_child: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadChild>>>;
|
|
48
|
+
load_child_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
49
|
+
load_child_count: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadChildCount>>>;
|
|
50
|
+
load_child_count_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
51
|
+
include_details: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
52
|
+
where_relations: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
53
|
+
order_by: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
54
|
+
name: z.ZodEffects<z.ZodString, string, string>;
|
|
55
|
+
field: z.ZodEffects<z.ZodString, string, string>;
|
|
56
|
+
direction: z.ZodType<OrderBy, z.ZodTypeDef, OrderBy>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
name: string;
|
|
59
|
+
field: string;
|
|
60
|
+
direction: OrderBy;
|
|
61
|
+
}, {
|
|
62
|
+
name: string;
|
|
63
|
+
field: string;
|
|
64
|
+
direction: OrderBy;
|
|
65
|
+
}>, "many">>>;
|
|
66
|
+
include_master_data: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
67
|
+
date_format_id: z.ZodEffects<z.ZodString, string, string>;
|
|
68
|
+
time_zone_id: z.ZodEffects<z.ZodString, string, string>;
|
|
69
|
+
} & {
|
|
70
|
+
organisation_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
71
|
+
program_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
status: Status[];
|
|
74
|
+
search: string;
|
|
75
|
+
paging: PAGING;
|
|
76
|
+
page_count: number;
|
|
77
|
+
page_index: number;
|
|
78
|
+
load_parents: LoadParents;
|
|
79
|
+
load_parents_list: string[];
|
|
80
|
+
load_child: LoadChild;
|
|
81
|
+
load_child_list: string[];
|
|
82
|
+
load_child_count: LoadChildCount;
|
|
83
|
+
load_child_count_list: string[];
|
|
84
|
+
include_details: Record<string, any>;
|
|
85
|
+
where_relations: Record<string, any>;
|
|
86
|
+
order_by: {
|
|
87
|
+
name: string;
|
|
88
|
+
field: string;
|
|
89
|
+
direction: OrderBy;
|
|
90
|
+
}[];
|
|
91
|
+
include_master_data: YesNo;
|
|
92
|
+
date_format_id: string;
|
|
93
|
+
time_zone_id: string;
|
|
94
|
+
organisation_ids: string[];
|
|
95
|
+
program_ids: string[];
|
|
96
|
+
}, {
|
|
97
|
+
date_format_id: string;
|
|
98
|
+
time_zone_id: string;
|
|
99
|
+
status?: Status[] | undefined;
|
|
100
|
+
search?: string | undefined;
|
|
101
|
+
paging?: PAGING | undefined;
|
|
102
|
+
page_count?: unknown;
|
|
103
|
+
page_index?: unknown;
|
|
104
|
+
load_parents?: LoadParents | undefined;
|
|
105
|
+
load_parents_list?: string[] | undefined;
|
|
106
|
+
load_child?: LoadChild | undefined;
|
|
107
|
+
load_child_list?: string[] | undefined;
|
|
108
|
+
load_child_count?: LoadChildCount | undefined;
|
|
109
|
+
load_child_count_list?: string[] | undefined;
|
|
110
|
+
include_details?: Record<string, any> | undefined;
|
|
111
|
+
where_relations?: Record<string, any> | undefined;
|
|
112
|
+
order_by?: {
|
|
113
|
+
name: string;
|
|
114
|
+
field: string;
|
|
115
|
+
direction: OrderBy;
|
|
116
|
+
}[] | undefined;
|
|
117
|
+
include_master_data?: YesNo | undefined;
|
|
118
|
+
organisation_ids?: string[] | undefined;
|
|
119
|
+
program_ids?: string[] | undefined;
|
|
120
|
+
}>;
|
|
121
|
+
type MasterProgramQueryDTO = z.infer<typeof MasterProgramQuerySchema>;
|
|
122
|
+
declare const toMasterProgramPayload: (row: MasterProgram) => MasterProgramDTO;
|
|
123
|
+
declare const newMasterProgramPayload: () => MasterProgramDTO;
|
|
124
|
+
declare const findMasterProgram: (data: MasterProgramQueryDTO) => Promise<FBR<MasterProgram[]>>;
|
|
125
|
+
declare const createMasterProgram: (data: MasterProgramDTO) => Promise<SBR>;
|
|
126
|
+
declare const updateMasterProgram: (id: string, data: MasterProgramDTO) => Promise<SBR>;
|
|
127
|
+
declare const deleteMasterProgram: (id: string) => Promise<SBR>;
|
|
128
|
+
declare const getMasterProgramCache: (organisation_id: string) => Promise<FBR<MasterProgram[]>>;
|
|
129
|
+
declare const getMasterProgramCacheCount: (organisation_id: string) => Promise<FBR<MasterProgram>>;
|
|
130
|
+
|
|
131
|
+
export { type MasterProgram, type MasterProgramDTO, type MasterProgramQueryDTO, MasterProgramQuerySchema, MasterProgramSchema, createMasterProgram, deleteMasterProgram, findMasterProgram, getMasterProgramCache, getMasterProgramCacheCount, newMasterProgramPayload, toMasterProgramPayload, updateMasterProgram };
|