@eeplatform/core 1.0.3 → 1.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @eeplatform/core
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f30cbad: Building management initial release
8
+
3
9
  ## 1.0.3
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -2300,6 +2300,10 @@ declare function useRegionRepo(): {
2300
2300
  getByName: (name: string) => Promise<TRegion>;
2301
2301
  };
2302
2302
 
2303
+ declare function useRegionService(): {
2304
+ add: (value: TRegion) => Promise<string>;
2305
+ };
2306
+
2303
2307
  declare function useRegionController(): {
2304
2308
  createRegion: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2305
2309
  getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
@@ -2345,6 +2349,10 @@ declare function useDivisionRepo(): {
2345
2349
  getByName: (name: string) => Promise<TDivision>;
2346
2350
  };
2347
2351
 
2352
+ declare function useDivisionService(): {
2353
+ add: (value: TDivision) => Promise<string>;
2354
+ };
2355
+
2348
2356
  declare function useDivisionController(): {
2349
2357
  createDivision: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2350
2358
  getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
@@ -2416,6 +2424,111 @@ declare function useSchoolController(): {
2416
2424
  approveSchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2417
2425
  };
2418
2426
 
2427
+ type TBuilding = {
2428
+ _id?: ObjectId;
2429
+ school: ObjectId;
2430
+ serial?: string;
2431
+ name: string;
2432
+ levels: number;
2433
+ createdAt?: Date | string;
2434
+ updatedAt?: Date | string;
2435
+ deletedAt?: Date | string;
2436
+ status?: string;
2437
+ };
2438
+ declare const schemaBuilding: Joi.ObjectSchema<any>;
2439
+ type TBuildingUnit = {
2440
+ _id?: ObjectId;
2441
+ school: ObjectId | string;
2442
+ name?: string;
2443
+ building: ObjectId | string;
2444
+ buildingName?: string;
2445
+ level: number;
2446
+ category: string;
2447
+ type: string;
2448
+ seating_capacity: number;
2449
+ standing_capacity: number;
2450
+ description?: string;
2451
+ unit_of_measurement: string;
2452
+ area: number;
2453
+ status: string;
2454
+ createdAt?: Date | string;
2455
+ updatedAt?: Date | string;
2456
+ deletedAt?: Date | string;
2457
+ };
2458
+ declare const schemaBuildingUnit: Joi.ObjectSchema<any>;
2459
+ declare function MBuilding(value: TBuilding): {
2460
+ _id: ObjectId | undefined;
2461
+ school: ObjectId;
2462
+ serial: string;
2463
+ name: string;
2464
+ levels: number;
2465
+ status: string;
2466
+ createdAt: string | Date;
2467
+ updatedAt: string | Date;
2468
+ deletedAt: string | Date;
2469
+ };
2470
+ declare function MBuildingUnit(value: TBuildingUnit): {
2471
+ _id: ObjectId | undefined;
2472
+ school: ObjectId;
2473
+ name: string;
2474
+ building: ObjectId;
2475
+ buildingName: string;
2476
+ level: number;
2477
+ category: string;
2478
+ type: string;
2479
+ seating_capacity: number;
2480
+ standing_capacity: number;
2481
+ description: string;
2482
+ unit_of_measurement: string;
2483
+ area: number;
2484
+ status: string;
2485
+ createdAt: string | Date;
2486
+ updatedAt: string | Date;
2487
+ deletedAt: string | Date;
2488
+ };
2489
+
2490
+ declare function useBuildingRepo(): {
2491
+ createIndex: () => Promise<void>;
2492
+ createTextIndex: () => Promise<void>;
2493
+ add: (value: TBuilding, session?: ClientSession) => Promise<ObjectId>;
2494
+ getAll: ({ search, page, limit, sort, school, status, }?: {
2495
+ search?: string | undefined;
2496
+ page?: number | undefined;
2497
+ limit?: number | undefined;
2498
+ sort?: {} | undefined;
2499
+ school?: string | undefined;
2500
+ status?: string | undefined;
2501
+ }) => Promise<Record<string, any>>;
2502
+ getById: (_id: string | ObjectId) => Promise<TBuilding>;
2503
+ };
2504
+
2505
+ declare function useBuildingUnitRepo(): {
2506
+ createIndex: () => Promise<void>;
2507
+ add: (value: TBuildingUnit, session?: ClientSession) => Promise<ObjectId>;
2508
+ getAll: ({ search, page, limit, sort, school, building, status, }?: {
2509
+ search?: string | undefined;
2510
+ page?: number | undefined;
2511
+ limit?: number | undefined;
2512
+ sort?: {} | undefined;
2513
+ school?: string | undefined;
2514
+ building?: string | undefined;
2515
+ status?: string | undefined;
2516
+ }) => Promise<Record<string, any>>;
2517
+ getById: (_id: string | ObjectId) => Promise<TBuildingUnit>;
2518
+ };
2519
+
2520
+ declare function useBuildingController(): {
2521
+ createBuilding: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2522
+ getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2523
+ getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2524
+ };
2525
+
2526
+ declare function useBuildingUnitController(): {
2527
+ add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2528
+ getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2529
+ getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2530
+ };
2531
+
2419
2532
  declare const MONGO_URI: string;
2420
2533
  declare const MONGO_DB: string;
2421
2534
  declare const PORT: number;
@@ -2452,4 +2565,4 @@ declare const PAYPAL_API_URL: string;
2452
2565
  declare const XENDIT_SECRET_KEY: string;
2453
2566
  declare const XENDIT_BASE_URL: string;
2454
2567
 
2455
- export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, CardPayment, CardPaymentSchema, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, DirectDebit, DirectDebitSchema, EWalletPayment, EWalletPaymentSchema, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MAddress, MDivision, MEntity, MFile, MMember, MONGO_DB, MONGO_URI, MOrder, MOrg, MPaymentMethod, MPromoCode, MRegion, MRole, MSchool, MSubscription, MToken, MUser, MUserRole, MVerification, PAYPAL_API_URL, PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PORT, REDIS_HOST, REDIS_PASSWORD, REDIS_PORT, REFRESH_TOKEN_EXPIRY, REFRESH_TOKEN_SECRET, SECRET_KEY, SPACES_ACCESS_KEY, SPACES_BUCKET, SPACES_ENDPOINT, SPACES_REGION, SPACES_SECRET_KEY, TAddress, TBillingRecipient, TCounter, TDivision, TEntity, TFile, TInvoice, TMember, TMiniRole, TOrder, TOrderMetadata, TOrg, TPayment, TPaymentMethod$1 as TPaymentMethod, TPaymentMethodType, TPrice, TPriceType, TPromoCode, TPromoTier, TRegion, TRole, TSchool, TSubscription, TToken, TUser, TUserRole, TVerification, TVerificationMetadata, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, XENDIT_BASE_URL, XENDIT_SECRET_KEY, addressSchema, isDev, schema, schemaDivision, schemaRegion, schemaSchool, useAddressController, useAddressRepo, useAuthController, useAuthService, useCounterModel, useCounterRepo, useDivisionController, useDivisionRepo, useEntityController, useEntityRepo, useFileController, useFileRepo, useFileService, useInvoiceController, useInvoiceModel, useInvoiceRepo, useInvoiceService, useMemberController, useMemberRepo, useOrderController, useOrderRepo, useOrgController, useOrgRepo, useOrgService, usePaymentController, usePaymentMethodController, usePaymentMethodRepo, usePaymentMethodService, usePaymentModel, usePaymentRepo, usePaypalService, usePriceController, usePriceModel, usePriceRepo, usePromoCodeController, usePromoCodeRepo, useRegionController, useRegionRepo, useRoleController, useRoleRepo, useSchoolController, useSchoolRepo, useSchoolService, useSubscriptionController, useSubscriptionRepo, useSubscriptionService, useTokenRepo, useUserController, useUserRepo, useUserService, useVerificationController, useVerificationRepo, useVerificationService, useXenditService, validateCardPayment, validateDirectDebit, validateEWalletPayment };
2568
+ export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, CardPayment, CardPaymentSchema, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, DirectDebit, DirectDebitSchema, EWalletPayment, EWalletPaymentSchema, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MAddress, MBuilding, MBuildingUnit, MDivision, MEntity, MFile, MMember, MONGO_DB, MONGO_URI, MOrder, MOrg, MPaymentMethod, MPromoCode, MRegion, MRole, MSchool, MSubscription, MToken, MUser, MUserRole, MVerification, PAYPAL_API_URL, PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PORT, REDIS_HOST, REDIS_PASSWORD, REDIS_PORT, REFRESH_TOKEN_EXPIRY, REFRESH_TOKEN_SECRET, SECRET_KEY, SPACES_ACCESS_KEY, SPACES_BUCKET, SPACES_ENDPOINT, SPACES_REGION, SPACES_SECRET_KEY, TAddress, TBillingRecipient, TBuilding, TBuildingUnit, TCounter, TDivision, TEntity, TFile, TInvoice, TMember, TMiniRole, TOrder, TOrderMetadata, TOrg, TPayment, TPaymentMethod$1 as TPaymentMethod, TPaymentMethodType, TPrice, TPriceType, TPromoCode, TPromoTier, TRegion, TRole, TSchool, TSubscription, TToken, TUser, TUserRole, TVerification, TVerificationMetadata, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, XENDIT_BASE_URL, XENDIT_SECRET_KEY, addressSchema, isDev, schema, schemaBuilding, schemaBuildingUnit, schemaDivision, schemaRegion, schemaSchool, useAddressController, useAddressRepo, useAuthController, useAuthService, useBuildingController, useBuildingRepo, useBuildingUnitController, useBuildingUnitRepo, useCounterModel, useCounterRepo, useDivisionController, useDivisionRepo, useDivisionService, useEntityController, useEntityRepo, useFileController, useFileRepo, useFileService, useInvoiceController, useInvoiceModel, useInvoiceRepo, useInvoiceService, useMemberController, useMemberRepo, useOrderController, useOrderRepo, useOrgController, useOrgRepo, useOrgService, usePaymentController, usePaymentMethodController, usePaymentMethodRepo, usePaymentMethodService, usePaymentModel, usePaymentRepo, usePaypalService, usePriceController, usePriceModel, usePriceRepo, usePromoCodeController, usePromoCodeRepo, useRegionController, useRegionRepo, useRegionService, useRoleController, useRoleRepo, useSchoolController, useSchoolRepo, useSchoolService, useSubscriptionController, useSubscriptionRepo, useSubscriptionService, useTokenRepo, useUserController, useUserRepo, useUserService, useVerificationController, useVerificationRepo, useVerificationService, useXenditService, validateCardPayment, validateDirectDebit, validateEWalletPayment };