@eeplatform/core 1.2.0 → 1.3.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 +92 -4
- package/dist/index.js +454 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +463 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2489,8 +2489,7 @@ declare function MBuildingUnit(value: TBuildingUnit): {
|
|
|
2489
2489
|
};
|
|
2490
2490
|
|
|
2491
2491
|
declare function useBuildingRepo(): {
|
|
2492
|
-
|
|
2493
|
-
createTextIndex: () => Promise<void>;
|
|
2492
|
+
createIndexes: () => Promise<void>;
|
|
2494
2493
|
add: (value: TBuilding, session?: ClientSession) => Promise<ObjectId>;
|
|
2495
2494
|
getAll: ({ search, page, limit, sort, school, status, }?: {
|
|
2496
2495
|
search?: string | undefined;
|
|
@@ -2510,7 +2509,7 @@ declare function useBuildingRepo(): {
|
|
|
2510
2509
|
};
|
|
2511
2510
|
|
|
2512
2511
|
declare function useBuildingUnitRepo(): {
|
|
2513
|
-
|
|
2512
|
+
createIndexes: () => Promise<void>;
|
|
2514
2513
|
add: (value: TBuildingUnit, session?: ClientSession) => Promise<ObjectId>;
|
|
2515
2514
|
getAll: ({ search, page, limit, sort, school, building, status, }?: {
|
|
2516
2515
|
search?: string | undefined;
|
|
@@ -2535,6 +2534,7 @@ declare function useBuildingUnitRepo(): {
|
|
|
2535
2534
|
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2536
2535
|
getByBuilding: (building: string | ObjectId) => Promise<TBuildingUnit | null>;
|
|
2537
2536
|
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<string>;
|
|
2537
|
+
updateByBuildingId: (building: string | ObjectId, value: Partial<Pick<TBuildingUnit, "buildingName">>, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2538
2538
|
};
|
|
2539
2539
|
|
|
2540
2540
|
declare function useBuildingController(): {
|
|
@@ -2553,6 +2553,94 @@ declare function useBuildingUnitController(): {
|
|
|
2553
2553
|
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2554
2554
|
};
|
|
2555
2555
|
|
|
2556
|
+
type TInventory = {
|
|
2557
|
+
_id?: ObjectId;
|
|
2558
|
+
school: ObjectId;
|
|
2559
|
+
name: string;
|
|
2560
|
+
category: string;
|
|
2561
|
+
type: string;
|
|
2562
|
+
unit_of_measurement_category: string;
|
|
2563
|
+
unit_of_measurement_type: string;
|
|
2564
|
+
status?: string;
|
|
2565
|
+
qty?: number;
|
|
2566
|
+
brand?: string;
|
|
2567
|
+
createdAt?: string | Date;
|
|
2568
|
+
updatedAt?: string | Date;
|
|
2569
|
+
deletedAt?: string | Date;
|
|
2570
|
+
condition?: {
|
|
2571
|
+
good: number;
|
|
2572
|
+
disposal: number;
|
|
2573
|
+
lost: number;
|
|
2574
|
+
damaged: number;
|
|
2575
|
+
};
|
|
2576
|
+
metadata?: {
|
|
2577
|
+
title?: string;
|
|
2578
|
+
isbn?: string;
|
|
2579
|
+
author?: string;
|
|
2580
|
+
edition?: string;
|
|
2581
|
+
subject?: string;
|
|
2582
|
+
grade_level?: number;
|
|
2583
|
+
publisher?: string;
|
|
2584
|
+
language?: string;
|
|
2585
|
+
};
|
|
2586
|
+
};
|
|
2587
|
+
declare const schemaInventory: Joi.ObjectSchema<any>;
|
|
2588
|
+
declare const schemaInventoryUpdateOption: Joi.ObjectSchema<any>;
|
|
2589
|
+
declare function MInventory(value: TInventory): {
|
|
2590
|
+
_id: ObjectId;
|
|
2591
|
+
school: ObjectId;
|
|
2592
|
+
name: string;
|
|
2593
|
+
category: string;
|
|
2594
|
+
type: string;
|
|
2595
|
+
brand: string;
|
|
2596
|
+
qty: number;
|
|
2597
|
+
condition: {
|
|
2598
|
+
good: number;
|
|
2599
|
+
disposal: number;
|
|
2600
|
+
lost: number;
|
|
2601
|
+
damaged: number;
|
|
2602
|
+
};
|
|
2603
|
+
unit_of_measurement_category: string;
|
|
2604
|
+
unit_of_measurement_type: string;
|
|
2605
|
+
status: string;
|
|
2606
|
+
createdAt: Date;
|
|
2607
|
+
updatedAt: string | Date;
|
|
2608
|
+
deletedAt: string | Date;
|
|
2609
|
+
metadata: {
|
|
2610
|
+
title?: string | undefined;
|
|
2611
|
+
isbn?: string | undefined;
|
|
2612
|
+
author?: string | undefined;
|
|
2613
|
+
edition?: string | undefined;
|
|
2614
|
+
subject?: string | undefined;
|
|
2615
|
+
grade_level?: number | undefined;
|
|
2616
|
+
publisher?: string | undefined;
|
|
2617
|
+
language?: string | undefined;
|
|
2618
|
+
};
|
|
2619
|
+
};
|
|
2620
|
+
|
|
2621
|
+
declare function useInventoryRepo(): {
|
|
2622
|
+
createIndex: () => Promise<void>;
|
|
2623
|
+
add: (value: TInventory) => Promise<ObjectId>;
|
|
2624
|
+
updateById: (_id: string | ObjectId, value: Partial<Pick<TInventory, "name" | "brand" | "category" | "type" | "unit_of_measurement_category" | "unit_of_measurement_type">>) => Promise<string>;
|
|
2625
|
+
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
2626
|
+
getById: (_id: string | ObjectId) => Promise<{}>;
|
|
2627
|
+
getAll: ({ page, search, limit, status, school, sort, }?: {
|
|
2628
|
+
page?: number | undefined;
|
|
2629
|
+
search?: string | undefined;
|
|
2630
|
+
limit?: number | undefined;
|
|
2631
|
+
status?: string | undefined;
|
|
2632
|
+
school?: string | ObjectId | undefined;
|
|
2633
|
+
sort?: Record<string, any> | undefined;
|
|
2634
|
+
}) => Promise<{}>;
|
|
2635
|
+
};
|
|
2636
|
+
|
|
2637
|
+
declare function useInventoryController(): {
|
|
2638
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2639
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2640
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2641
|
+
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2642
|
+
};
|
|
2643
|
+
|
|
2556
2644
|
declare const MONGO_URI: string;
|
|
2557
2645
|
declare const MONGO_DB: string;
|
|
2558
2646
|
declare const PORT: number;
|
|
@@ -2589,4 +2677,4 @@ declare const PAYPAL_API_URL: string;
|
|
|
2589
2677
|
declare const XENDIT_SECRET_KEY: string;
|
|
2590
2678
|
declare const XENDIT_BASE_URL: string;
|
|
2591
2679
|
|
|
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 };
|
|
2680
|
+
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, MInventory, 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, TInventory, 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, schemaInventory, schemaInventoryUpdateOption, schemaRegion, schemaSchool, schemaUpdateOptions, useAddressController, useAddressRepo, useAuthController, useAuthService, useBuildingController, useBuildingRepo, useBuildingUnitController, useBuildingUnitRepo, useCounterModel, useCounterRepo, useDivisionController, useDivisionRepo, useDivisionService, useEntityController, useEntityRepo, useFileController, useFileRepo, useFileService, useInventoryController, useInventoryRepo, 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 };
|