@goweekdays/core 2.6.1 → 2.8.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 +86 -2
- package/dist/index.js +1887 -1035
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2011 -1158
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -391,7 +391,8 @@ declare function useOrgRepo(): {
|
|
|
391
391
|
value: string;
|
|
392
392
|
}, session?: ClientSession) => Promise<string>;
|
|
393
393
|
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
394
|
-
getByName: (name: string) => Promise<TOrg>;
|
|
394
|
+
getByName: (name: string) => Promise<TOrg | null>;
|
|
395
|
+
getByEmail: (email: string) => Promise<TOrg | null>;
|
|
395
396
|
updateById: (_id: string | ObjectId, options: Pick<TOrg, "name" | "description" | "email" | "contact">) => Promise<void>;
|
|
396
397
|
};
|
|
397
398
|
|
|
@@ -402,6 +403,7 @@ declare function useOrgService(): {
|
|
|
402
403
|
org: string;
|
|
403
404
|
paypalOrderLink: any;
|
|
404
405
|
}>;
|
|
406
|
+
addWithVerification: (id: string) => Promise<string>;
|
|
405
407
|
};
|
|
406
408
|
|
|
407
409
|
declare function useOrgController(): {
|
|
@@ -643,6 +645,10 @@ type TVerificationMetadata = {
|
|
|
643
645
|
referralCode?: string;
|
|
644
646
|
org?: string | ObjectId;
|
|
645
647
|
orgName?: string;
|
|
648
|
+
contact?: string;
|
|
649
|
+
seats?: number;
|
|
650
|
+
createdBy?: string | ObjectId;
|
|
651
|
+
amount?: number;
|
|
646
652
|
};
|
|
647
653
|
type TVerification = {
|
|
648
654
|
_id?: ObjectId;
|
|
@@ -716,6 +722,11 @@ declare function useVerificationService(): {
|
|
|
716
722
|
}) => Promise<bson.ObjectId>;
|
|
717
723
|
cancelInviteMember: (id: string) => Promise<string>;
|
|
718
724
|
forgetPassword: (email: string) => Promise<string>;
|
|
725
|
+
orgSetupFee: (value: TOrg & {
|
|
726
|
+
seats: number;
|
|
727
|
+
}) => Promise<{
|
|
728
|
+
paypalOrderLink: any;
|
|
729
|
+
}>;
|
|
719
730
|
};
|
|
720
731
|
|
|
721
732
|
declare function useVerificationController(): {
|
|
@@ -728,6 +739,7 @@ declare function useVerificationController(): {
|
|
|
728
739
|
signUp: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
729
740
|
cancelInviteMember: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
730
741
|
forgetPassword: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
742
|
+
orgSetupFee: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
731
743
|
};
|
|
732
744
|
|
|
733
745
|
type TPlan = {
|
|
@@ -997,6 +1009,78 @@ declare function usePermissionGroupController(): {
|
|
|
997
1009
|
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
998
1010
|
};
|
|
999
1011
|
|
|
1012
|
+
type TJobPost = {
|
|
1013
|
+
_id?: ObjectId;
|
|
1014
|
+
org: ObjectId | string;
|
|
1015
|
+
title: string;
|
|
1016
|
+
setup: string;
|
|
1017
|
+
location: string;
|
|
1018
|
+
type: string;
|
|
1019
|
+
description: string;
|
|
1020
|
+
status?: string;
|
|
1021
|
+
createdAt?: Date;
|
|
1022
|
+
updatedAt?: Date;
|
|
1023
|
+
deletedAt?: Date;
|
|
1024
|
+
};
|
|
1025
|
+
declare const schemaJobPost: Joi.ObjectSchema<any>;
|
|
1026
|
+
declare function modelJobPost(value: TJobPost): TJobPost;
|
|
1027
|
+
|
|
1028
|
+
declare function useJobPostController(): {
|
|
1029
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1030
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1031
|
+
};
|
|
1032
|
+
|
|
1033
|
+
declare function useJobPostRepo(): {
|
|
1034
|
+
createIndexes: () => Promise<string>;
|
|
1035
|
+
add: (value: TJobPost, session?: ClientSession) => Promise<ObjectId>;
|
|
1036
|
+
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<string>;
|
|
1037
|
+
};
|
|
1038
|
+
|
|
1039
|
+
declare function useJobPostService(): {
|
|
1040
|
+
deleteById: (id: string) => Promise<string>;
|
|
1041
|
+
};
|
|
1042
|
+
|
|
1043
|
+
type TLedgerBill = {
|
|
1044
|
+
_id?: ObjectId;
|
|
1045
|
+
org: string | ObjectId;
|
|
1046
|
+
type: "setup-fee" | "subscription";
|
|
1047
|
+
description: string;
|
|
1048
|
+
amount: number;
|
|
1049
|
+
currency: string;
|
|
1050
|
+
status: "pending" | "paid" | "overdue";
|
|
1051
|
+
billingFrom?: string | Date;
|
|
1052
|
+
billingTo?: string | Date;
|
|
1053
|
+
paidAt?: string | Date;
|
|
1054
|
+
dueDate?: string | Date;
|
|
1055
|
+
createdAt?: string | Date;
|
|
1056
|
+
};
|
|
1057
|
+
declare const ledgerBillTypes: string[];
|
|
1058
|
+
declare const ledgerBillStatuses: string[];
|
|
1059
|
+
declare const schemaLedgerBill: Joi.ObjectSchema<any>;
|
|
1060
|
+
declare const schemaLedgerBillingSummary: Joi.ObjectSchema<any>;
|
|
1061
|
+
declare function modelLedgerBill(value: TLedgerBill): TLedgerBill;
|
|
1062
|
+
|
|
1063
|
+
declare function useLedgerBillingRepo(): {
|
|
1064
|
+
delCachedData: () => void;
|
|
1065
|
+
createIndexes: () => Promise<string>;
|
|
1066
|
+
add: (value: TLedgerBill, session?: ClientSession) => Promise<ObjectId>;
|
|
1067
|
+
getAll: ({ org, search, page, limit, status, }?: {
|
|
1068
|
+
org?: string | undefined;
|
|
1069
|
+
search?: string | undefined;
|
|
1070
|
+
page?: number | undefined;
|
|
1071
|
+
limit?: number | undefined;
|
|
1072
|
+
status?: string | undefined;
|
|
1073
|
+
}) => Promise<Record<string, any>>;
|
|
1074
|
+
getById: (_id: string | ObjectId) => Promise<TLedgerBill | null>;
|
|
1075
|
+
getSummary: (status: string, org: string | ObjectId) => Promise<bson.Document>;
|
|
1076
|
+
};
|
|
1077
|
+
|
|
1078
|
+
declare function useLedgerBillingController(): {
|
|
1079
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1080
|
+
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1081
|
+
getSummary: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1082
|
+
};
|
|
1083
|
+
|
|
1000
1084
|
declare const MONGO_URI: string;
|
|
1001
1085
|
declare const MONGO_DB: string;
|
|
1002
1086
|
declare const PORT: number;
|
|
@@ -1036,4 +1120,4 @@ declare const XENDIT_BASE_URL: string;
|
|
|
1036
1120
|
declare const DOMAIN: string;
|
|
1037
1121
|
declare const APP_ORG: string;
|
|
1038
1122
|
|
|
1039
|
-
export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, APP_ORG, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, DOMAIN, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MBuilding, MBuildingUnit, MFile, MONGO_DB, MONGO_URI, PAYPAL_API_URL, PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PAYPAL_WEBHOOK_ID, 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, TApp, TBuilding, TBuildingUnit, TCounter, TFile, TMember, TOrg, TPermission, TPermissionGroup, TPlan, TPromo, TRole, TSubscription, TSubscriptionTransaction, TUser, TVerification, TVerificationMetadata, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, XENDIT_BASE_URL, XENDIT_SECRET_KEY, currencies, isDev, modelApp, modelMember, modelOrg, modelPermission, modelPermissionGroup, modelPlan, modelPromo, modelRole, modelSubscription, modelSubscriptionTransaction, modelUser, modelVerification, schemaApp, schemaAppUpdate, schemaBuilding, schemaBuildingUnit, schemaInviteMember, schemaMember, schemaMemberRole, schemaMemberStatus, schemaOrg, schemaOrgAdd, schemaOrgUpdate, schemaPermission, schemaPermissionGroup, schemaPermissionGroupUpdate, schemaPermissionUpdate, schemaPlan, schemaPromo, schemaRole, schemaRoleUpdate, schemaSubscription, schemaSubscriptionSeats, schemaSubscriptionTransaction, schemaSubscriptionUpdate, schemaUpdateOptions, schemaUser, schemaVerification, transactionSchema, useAppController, useAppRepo, useAppService, useAuthController, useAuthService, useBuildingController, useBuildingRepo, useBuildingService, useBuildingUnitController, useBuildingUnitRepo, useBuildingUnitService, useCounterModel, useCounterRepo, useFileController, useFileRepo, useFileService, useGitHubService, useMemberController, useMemberRepo, useOrgController, useOrgRepo, useOrgService, usePermissionController, usePermissionGroupController, usePermissionGroupRepo, usePermissionGroupService, usePermissionRepo, usePermissionService, usePlanController, usePlanRepo, usePlanService, usePromoRepo, useRoleController, useRoleRepo, useRoleService, useSubscriptionController, useSubscriptionRepo, useSubscriptionTransactionController, useSubscriptionTransactionRepo, useUserController, useUserRepo, useUserService, useUtilController, useVerificationController, useVerificationRepo, useVerificationService };
|
|
1123
|
+
export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, APP_ORG, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, DOMAIN, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MBuilding, MBuildingUnit, MFile, MONGO_DB, MONGO_URI, PAYPAL_API_URL, PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PAYPAL_WEBHOOK_ID, 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, TApp, TBuilding, TBuildingUnit, TCounter, TFile, TJobPost, TLedgerBill, TMember, TOrg, TPermission, TPermissionGroup, TPlan, TPromo, TRole, TSubscription, TSubscriptionTransaction, TUser, TVerification, TVerificationMetadata, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, XENDIT_BASE_URL, XENDIT_SECRET_KEY, currencies, isDev, ledgerBillStatuses, ledgerBillTypes, modelApp, modelJobPost, modelLedgerBill, modelMember, modelOrg, modelPermission, modelPermissionGroup, modelPlan, modelPromo, modelRole, modelSubscription, modelSubscriptionTransaction, modelUser, modelVerification, schemaApp, schemaAppUpdate, schemaBuilding, schemaBuildingUnit, schemaInviteMember, schemaJobPost, schemaLedgerBill, schemaLedgerBillingSummary, schemaMember, schemaMemberRole, schemaMemberStatus, schemaOrg, schemaOrgAdd, schemaOrgUpdate, schemaPermission, schemaPermissionGroup, schemaPermissionGroupUpdate, schemaPermissionUpdate, schemaPlan, schemaPromo, schemaRole, schemaRoleUpdate, schemaSubscription, schemaSubscriptionSeats, schemaSubscriptionTransaction, schemaSubscriptionUpdate, schemaUpdateOptions, schemaUser, schemaVerification, transactionSchema, useAppController, useAppRepo, useAppService, useAuthController, useAuthService, useBuildingController, useBuildingRepo, useBuildingService, useBuildingUnitController, useBuildingUnitRepo, useBuildingUnitService, useCounterModel, useCounterRepo, useFileController, useFileRepo, useFileService, useGitHubService, useJobPostController, useJobPostRepo, useJobPostService, useLedgerBillingController, useLedgerBillingRepo, useMemberController, useMemberRepo, useOrgController, useOrgRepo, useOrgService, usePermissionController, usePermissionGroupController, usePermissionGroupRepo, usePermissionGroupService, usePermissionRepo, usePermissionService, usePlanController, usePlanRepo, usePlanService, usePromoRepo, useRoleController, useRoleRepo, useRoleService, useSubscriptionController, useSubscriptionRepo, useSubscriptionTransactionController, useSubscriptionTransactionRepo, useUserController, useUserRepo, useUserService, useUtilController, useVerificationController, useVerificationRepo, useVerificationService };
|