@eeplatform/core 1.0.3 → 1.2.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 +12 -0
- package/dist/index.d.ts +138 -1
- package/dist/index.js +1113 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1120 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
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,135 @@ 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 const schemaUpdateOptions: Joi.ObjectSchema<any>;
|
|
2460
|
+
declare function MBuilding(value: TBuilding): {
|
|
2461
|
+
_id: ObjectId | undefined;
|
|
2462
|
+
school: ObjectId;
|
|
2463
|
+
serial: string;
|
|
2464
|
+
name: string;
|
|
2465
|
+
levels: number;
|
|
2466
|
+
status: string;
|
|
2467
|
+
createdAt: string | Date;
|
|
2468
|
+
updatedAt: string | Date;
|
|
2469
|
+
deletedAt: string | Date;
|
|
2470
|
+
};
|
|
2471
|
+
declare function MBuildingUnit(value: TBuildingUnit): {
|
|
2472
|
+
_id: ObjectId | undefined;
|
|
2473
|
+
school: ObjectId;
|
|
2474
|
+
name: string;
|
|
2475
|
+
building: ObjectId;
|
|
2476
|
+
buildingName: string;
|
|
2477
|
+
level: number;
|
|
2478
|
+
category: string;
|
|
2479
|
+
type: string;
|
|
2480
|
+
seating_capacity: number;
|
|
2481
|
+
standing_capacity: number;
|
|
2482
|
+
description: string;
|
|
2483
|
+
unit_of_measurement: string;
|
|
2484
|
+
area: number;
|
|
2485
|
+
status: string;
|
|
2486
|
+
createdAt: string | Date;
|
|
2487
|
+
updatedAt: string | Date;
|
|
2488
|
+
deletedAt: string | Date;
|
|
2489
|
+
};
|
|
2490
|
+
|
|
2491
|
+
declare function useBuildingRepo(): {
|
|
2492
|
+
createIndex: () => Promise<void>;
|
|
2493
|
+
createTextIndex: () => Promise<void>;
|
|
2494
|
+
add: (value: TBuilding, session?: ClientSession) => Promise<ObjectId>;
|
|
2495
|
+
getAll: ({ search, page, limit, sort, school, status, }?: {
|
|
2496
|
+
search?: string | undefined;
|
|
2497
|
+
page?: number | undefined;
|
|
2498
|
+
limit?: number | undefined;
|
|
2499
|
+
sort?: {} | undefined;
|
|
2500
|
+
school?: string | undefined;
|
|
2501
|
+
status?: string | undefined;
|
|
2502
|
+
}) => Promise<Record<string, any>>;
|
|
2503
|
+
getById: (_id: string | ObjectId) => Promise<TBuilding | null>;
|
|
2504
|
+
updateById: (_id: ObjectId | string, value: {
|
|
2505
|
+
name: string;
|
|
2506
|
+
serial: string;
|
|
2507
|
+
levels: number;
|
|
2508
|
+
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2509
|
+
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2510
|
+
};
|
|
2511
|
+
|
|
2512
|
+
declare function useBuildingUnitRepo(): {
|
|
2513
|
+
createIndex: () => Promise<void>;
|
|
2514
|
+
add: (value: TBuildingUnit, session?: ClientSession) => Promise<ObjectId>;
|
|
2515
|
+
getAll: ({ search, page, limit, sort, school, building, status, }?: {
|
|
2516
|
+
search?: string | undefined;
|
|
2517
|
+
page?: number | undefined;
|
|
2518
|
+
limit?: number | undefined;
|
|
2519
|
+
sort?: {} | undefined;
|
|
2520
|
+
school?: string | undefined;
|
|
2521
|
+
building?: string | undefined;
|
|
2522
|
+
status?: string | undefined;
|
|
2523
|
+
}) => Promise<Record<string, any>>;
|
|
2524
|
+
getById: (_id: string | ObjectId) => Promise<TBuildingUnit>;
|
|
2525
|
+
getByBuildingLevel: (building: string | ObjectId, level: number) => Promise<TBuildingUnit | null>;
|
|
2526
|
+
updateById: (_id: string | ObjectId, value: {
|
|
2527
|
+
name?: string | undefined;
|
|
2528
|
+
building?: string | undefined;
|
|
2529
|
+
level?: number | undefined;
|
|
2530
|
+
category?: string | undefined;
|
|
2531
|
+
type?: string | undefined;
|
|
2532
|
+
seating_capacity?: number | undefined;
|
|
2533
|
+
standing_capacity?: number | undefined;
|
|
2534
|
+
area?: number | undefined;
|
|
2535
|
+
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2536
|
+
getByBuilding: (building: string | ObjectId) => Promise<TBuildingUnit | null>;
|
|
2537
|
+
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<string>;
|
|
2538
|
+
};
|
|
2539
|
+
|
|
2540
|
+
declare function useBuildingController(): {
|
|
2541
|
+
createBuilding: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2542
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2543
|
+
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2544
|
+
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2545
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2546
|
+
};
|
|
2547
|
+
|
|
2548
|
+
declare function useBuildingUnitController(): {
|
|
2549
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2550
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2551
|
+
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2552
|
+
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2553
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2554
|
+
};
|
|
2555
|
+
|
|
2419
2556
|
declare const MONGO_URI: string;
|
|
2420
2557
|
declare const MONGO_DB: string;
|
|
2421
2558
|
declare const PORT: number;
|
|
@@ -2452,4 +2589,4 @@ declare const PAYPAL_API_URL: string;
|
|
|
2452
2589
|
declare const XENDIT_SECRET_KEY: string;
|
|
2453
2590
|
declare const XENDIT_BASE_URL: string;
|
|
2454
2591
|
|
|
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 };
|
|
2592
|
+
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 };
|