@eeplatform/core 1.2.1 → 1.4.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 +111 -1
- package/dist/index.js +1124 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1141 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2534,6 +2534,7 @@ declare function useBuildingUnitRepo(): {
|
|
|
2534
2534
|
}, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2535
2535
|
getByBuilding: (building: string | ObjectId) => Promise<TBuildingUnit | null>;
|
|
2536
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>>;
|
|
2537
2538
|
};
|
|
2538
2539
|
|
|
2539
2540
|
declare function useBuildingController(): {
|
|
@@ -2552,6 +2553,115 @@ declare function useBuildingUnitController(): {
|
|
|
2552
2553
|
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2553
2554
|
};
|
|
2554
2555
|
|
|
2556
|
+
type TAsset = {
|
|
2557
|
+
_id?: ObjectId;
|
|
2558
|
+
school: ObjectId;
|
|
2559
|
+
asset_type: "supply" | "furniture-equipment" | "fixed-asset";
|
|
2560
|
+
name: string;
|
|
2561
|
+
category: string;
|
|
2562
|
+
type: string;
|
|
2563
|
+
unit: 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 schemaAsset: Joi.ObjectSchema<any>;
|
|
2588
|
+
declare const schemaAssetUpdateOption: Joi.ObjectSchema<any>;
|
|
2589
|
+
declare function MAsset(value: TAsset): TAsset;
|
|
2590
|
+
|
|
2591
|
+
declare function useAssetRepo(): {
|
|
2592
|
+
createIndex: () => Promise<void>;
|
|
2593
|
+
add: (value: TAsset) => Promise<ObjectId>;
|
|
2594
|
+
updateById: (_id: string | ObjectId, value: Partial<Pick<TAsset, "name" | "brand" | "category" | "type" | "unit" | "qty">>, session?: ClientSession) => Promise<string>;
|
|
2595
|
+
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
2596
|
+
getById: (_id: string | ObjectId) => Promise<TAsset>;
|
|
2597
|
+
getAll: ({ page, search, limit, status, school, sort, asset_type, }?: {
|
|
2598
|
+
page?: number | undefined;
|
|
2599
|
+
search?: string | undefined;
|
|
2600
|
+
limit?: number | undefined;
|
|
2601
|
+
status?: string | undefined;
|
|
2602
|
+
school?: string | ObjectId | undefined;
|
|
2603
|
+
sort?: Record<string, any> | undefined;
|
|
2604
|
+
asset_type: string;
|
|
2605
|
+
}) => Promise<{}>;
|
|
2606
|
+
getCategories: (school: string | ObjectId, asset_type: string) => Promise<{}>;
|
|
2607
|
+
getTypes: (school: string | ObjectId, asset_type: string) => Promise<{}>;
|
|
2608
|
+
getUnitsBySchool: (school: string | ObjectId) => Promise<{}>;
|
|
2609
|
+
};
|
|
2610
|
+
|
|
2611
|
+
declare function useAssetController(): {
|
|
2612
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2613
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2614
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2615
|
+
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2616
|
+
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2617
|
+
getCategories: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2618
|
+
getTypes: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2619
|
+
getUnitsBySchool: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2620
|
+
};
|
|
2621
|
+
|
|
2622
|
+
type TStockCard = {
|
|
2623
|
+
_id?: ObjectId;
|
|
2624
|
+
school: ObjectId;
|
|
2625
|
+
item: ObjectId;
|
|
2626
|
+
balance: number;
|
|
2627
|
+
qty: number;
|
|
2628
|
+
unitCost?: number;
|
|
2629
|
+
totalCost?: number;
|
|
2630
|
+
status: string;
|
|
2631
|
+
condition: string;
|
|
2632
|
+
supplier?: string;
|
|
2633
|
+
location?: ObjectId;
|
|
2634
|
+
locationName?: string;
|
|
2635
|
+
reason?: string;
|
|
2636
|
+
remarks?: string;
|
|
2637
|
+
createdAt?: Date | string;
|
|
2638
|
+
updatedAt?: Date | string;
|
|
2639
|
+
deletedAt?: Date | string;
|
|
2640
|
+
};
|
|
2641
|
+
declare const schemaStockCard: Joi.ObjectSchema<any>;
|
|
2642
|
+
declare function MStockCard(value: TStockCard): TStockCard;
|
|
2643
|
+
|
|
2644
|
+
declare function useStockCardRepository(): {
|
|
2645
|
+
createIndex: () => Promise<void>;
|
|
2646
|
+
add: (value: TStockCard, session?: ClientSession) => Promise<ObjectId>;
|
|
2647
|
+
getById: (_id: string | ObjectId) => Promise<{}>;
|
|
2648
|
+
getAll: ({ page, limit, school, sort, id }?: {
|
|
2649
|
+
page?: number | undefined;
|
|
2650
|
+
limit?: number | undefined;
|
|
2651
|
+
school?: string | ObjectId | undefined;
|
|
2652
|
+
sort?: Record<string, any> | undefined;
|
|
2653
|
+
id: string | ObjectId;
|
|
2654
|
+
}) => Promise<{}>;
|
|
2655
|
+
getSuppliers: (school: string | ObjectId) => Promise<{}>;
|
|
2656
|
+
};
|
|
2657
|
+
|
|
2658
|
+
declare function useStockCardController(): {
|
|
2659
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2660
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2661
|
+
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2662
|
+
getSuppliers: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2663
|
+
};
|
|
2664
|
+
|
|
2555
2665
|
declare const MONGO_URI: string;
|
|
2556
2666
|
declare const MONGO_DB: string;
|
|
2557
2667
|
declare const PORT: number;
|
|
@@ -2588,4 +2698,4 @@ declare const PAYPAL_API_URL: string;
|
|
|
2588
2698
|
declare const XENDIT_SECRET_KEY: string;
|
|
2589
2699
|
declare const XENDIT_BASE_URL: string;
|
|
2590
2700
|
|
|
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 };
|
|
2701
|
+
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, MAsset, MBuilding, MBuildingUnit, MDivision, MEntity, MFile, MMember, MONGO_DB, MONGO_URI, MOrder, MOrg, MPaymentMethod, MPromoCode, MRegion, MRole, MSchool, MStockCard, 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, TAsset, 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, TStockCard, TSubscription, TToken, TUser, TUserRole, TVerification, TVerificationMetadata, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, XENDIT_BASE_URL, XENDIT_SECRET_KEY, addressSchema, isDev, schema, schemaAsset, schemaAssetUpdateOption, schemaBuilding, schemaBuildingUnit, schemaDivision, schemaRegion, schemaSchool, schemaStockCard, schemaUpdateOptions, useAddressController, useAddressRepo, useAssetController, useAssetRepo, 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, useStockCardController, useStockCardRepository, useSubscriptionController, useSubscriptionRepo, useSubscriptionService, useTokenRepo, useUserController, useUserRepo, useUserService, useVerificationController, useVerificationRepo, useVerificationService, useXenditService, validateCardPayment, validateDirectDebit, validateEWalletPayment };
|