@eeplatform/core 1.0.2 → 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,17 @@
1
1
  # @eeplatform/core
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f30cbad: Building management initial release
8
+
9
+ ## 1.0.3
10
+
11
+ ### Patch Changes
12
+
13
+ - 7a92d16: Update dependencies
14
+
3
15
  ## 1.0.2
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -277,12 +277,11 @@ declare function useAuthService(): {
277
277
  email: string;
278
278
  password: string;
279
279
  }) => Promise<{
280
- accessToken: string;
281
- refreshToken: string;
282
- id: bson.ObjectId | undefined;
280
+ sid: string;
281
+ user: string;
283
282
  }>;
284
283
  refreshToken: (token: string) => Promise<string>;
285
- logout: (token: string) => Promise<string>;
284
+ logout: (sid: string) => Promise<string>;
286
285
  };
287
286
 
288
287
  declare function useAuthController(): {
@@ -2301,6 +2300,10 @@ declare function useRegionRepo(): {
2301
2300
  getByName: (name: string) => Promise<TRegion>;
2302
2301
  };
2303
2302
 
2303
+ declare function useRegionService(): {
2304
+ add: (value: TRegion) => Promise<string>;
2305
+ };
2306
+
2304
2307
  declare function useRegionController(): {
2305
2308
  createRegion: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2306
2309
  getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
@@ -2346,6 +2349,10 @@ declare function useDivisionRepo(): {
2346
2349
  getByName: (name: string) => Promise<TDivision>;
2347
2350
  };
2348
2351
 
2352
+ declare function useDivisionService(): {
2353
+ add: (value: TDivision) => Promise<string>;
2354
+ };
2355
+
2349
2356
  declare function useDivisionController(): {
2350
2357
  createDivision: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2351
2358
  getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
@@ -2417,6 +2424,111 @@ declare function useSchoolController(): {
2417
2424
  approveSchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
2418
2425
  };
2419
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
+
2420
2532
  declare const MONGO_URI: string;
2421
2533
  declare const MONGO_DB: string;
2422
2534
  declare const PORT: number;
@@ -2453,4 +2565,4 @@ declare const PAYPAL_API_URL: string;
2453
2565
  declare const XENDIT_SECRET_KEY: string;
2454
2566
  declare const XENDIT_BASE_URL: string;
2455
2567
 
2456
- 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 };