@eeplatform/core 1.1.0 → 1.2.1
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 +12 -0
- package/dist/index.d.ts +28 -5
- package/dist/index.js +386 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +382 -36
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2456,6 +2456,7 @@ type TBuildingUnit = {
|
|
|
2456
2456
|
deletedAt?: Date | string;
|
|
2457
2457
|
};
|
|
2458
2458
|
declare const schemaBuildingUnit: Joi.ObjectSchema<any>;
|
|
2459
|
+
declare const schemaUpdateOptions: Joi.ObjectSchema<any>;
|
|
2459
2460
|
declare function MBuilding(value: TBuilding): {
|
|
2460
2461
|
_id: ObjectId | undefined;
|
|
2461
2462
|
school: ObjectId;
|
|
@@ -2488,8 +2489,7 @@ declare function MBuildingUnit(value: TBuildingUnit): {
|
|
|
2488
2489
|
};
|
|
2489
2490
|
|
|
2490
2491
|
declare function useBuildingRepo(): {
|
|
2491
|
-
|
|
2492
|
-
createTextIndex: () => Promise<void>;
|
|
2492
|
+
createIndexes: () => Promise<void>;
|
|
2493
2493
|
add: (value: TBuilding, session?: ClientSession) => Promise<ObjectId>;
|
|
2494
2494
|
getAll: ({ search, page, limit, sort, school, status, }?: {
|
|
2495
2495
|
search?: string | undefined;
|
|
@@ -2499,11 +2499,17 @@ declare function useBuildingRepo(): {
|
|
|
2499
2499
|
school?: string | undefined;
|
|
2500
2500
|
status?: string | undefined;
|
|
2501
2501
|
}) => Promise<Record<string, any>>;
|
|
2502
|
-
getById: (_id: string | ObjectId) => Promise<TBuilding>;
|
|
2502
|
+
getById: (_id: string | ObjectId) => Promise<TBuilding | null>;
|
|
2503
|
+
updateById: (_id: ObjectId | string, value: {
|
|
2504
|
+
name: string;
|
|
2505
|
+
serial: string;
|
|
2506
|
+
levels: number;
|
|
2507
|
+
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2508
|
+
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2503
2509
|
};
|
|
2504
2510
|
|
|
2505
2511
|
declare function useBuildingUnitRepo(): {
|
|
2506
|
-
|
|
2512
|
+
createIndexes: () => Promise<void>;
|
|
2507
2513
|
add: (value: TBuildingUnit, session?: ClientSession) => Promise<ObjectId>;
|
|
2508
2514
|
getAll: ({ search, page, limit, sort, school, building, status, }?: {
|
|
2509
2515
|
search?: string | undefined;
|
|
@@ -2515,18 +2521,35 @@ declare function useBuildingUnitRepo(): {
|
|
|
2515
2521
|
status?: string | undefined;
|
|
2516
2522
|
}) => Promise<Record<string, any>>;
|
|
2517
2523
|
getById: (_id: string | ObjectId) => Promise<TBuildingUnit>;
|
|
2524
|
+
getByBuildingLevel: (building: string | ObjectId, level: number) => Promise<TBuildingUnit | null>;
|
|
2525
|
+
updateById: (_id: string | ObjectId, value: {
|
|
2526
|
+
name?: string | undefined;
|
|
2527
|
+
building?: string | undefined;
|
|
2528
|
+
level?: number | undefined;
|
|
2529
|
+
category?: string | undefined;
|
|
2530
|
+
type?: string | undefined;
|
|
2531
|
+
seating_capacity?: number | undefined;
|
|
2532
|
+
standing_capacity?: number | undefined;
|
|
2533
|
+
area?: number | undefined;
|
|
2534
|
+
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2535
|
+
getByBuilding: (building: string | ObjectId) => Promise<TBuildingUnit | null>;
|
|
2536
|
+
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<string>;
|
|
2518
2537
|
};
|
|
2519
2538
|
|
|
2520
2539
|
declare function useBuildingController(): {
|
|
2521
2540
|
createBuilding: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2522
2541
|
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2523
2542
|
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2543
|
+
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2544
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2524
2545
|
};
|
|
2525
2546
|
|
|
2526
2547
|
declare function useBuildingUnitController(): {
|
|
2527
2548
|
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2528
2549
|
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2529
2550
|
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2551
|
+
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2552
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2530
2553
|
};
|
|
2531
2554
|
|
|
2532
2555
|
declare const MONGO_URI: string;
|
|
@@ -2565,4 +2588,4 @@ declare const PAYPAL_API_URL: string;
|
|
|
2565
2588
|
declare const XENDIT_SECRET_KEY: string;
|
|
2566
2589
|
declare const XENDIT_BASE_URL: string;
|
|
2567
2590
|
|
|
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 };
|
|
2591
|
+
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, schemaUpdateOptions, 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 };
|