@goweekdays/core 0.0.3 → 0.0.4
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 +6 -0
- package/dist/index.d.ts +53 -2
- package/dist/index.js +18396 -3819
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18420 -3819
- package/dist/index.mjs.map +1 -1
- package/dist/public/handlebars/forget-password.hbs +12 -11
- package/package.json +2 -1
- package/tsconfig.json +102 -10
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ type TKeyValuePair<K extends string | number | symbol = string, V = any> = {
|
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
declare function useVerificationService(): {
|
|
60
|
-
createForgetPassword: (email: string) => Promise<
|
|
60
|
+
createForgetPassword: (email: string) => Promise<string>;
|
|
61
61
|
createUserInvite: ({ email, metadata, }: {
|
|
62
62
|
email: string;
|
|
63
63
|
metadata: TKeyValuePair;
|
|
@@ -810,6 +810,54 @@ declare function useCommentController(): {
|
|
|
810
810
|
getComments: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
811
811
|
};
|
|
812
812
|
|
|
813
|
+
type TSubscription = {
|
|
814
|
+
_id?: ObjectId;
|
|
815
|
+
user: ObjectId | string;
|
|
816
|
+
subscriptionId: string;
|
|
817
|
+
status?: string;
|
|
818
|
+
createdAt?: string;
|
|
819
|
+
updatedAt?: string;
|
|
820
|
+
deletedAt?: string;
|
|
821
|
+
};
|
|
822
|
+
declare function MSubscription(value: TSubscription): TSubscription;
|
|
823
|
+
|
|
824
|
+
declare function useSubscriptionRepo(): {
|
|
825
|
+
createIndex: () => Promise<void>;
|
|
826
|
+
createUniqueIndex: () => Promise<void>;
|
|
827
|
+
add: (value: TSubscription) => Promise<ObjectId>;
|
|
828
|
+
getById: (_id: string | ObjectId) => Promise<TSubscription | null>;
|
|
829
|
+
getBySubscriptionId: (subscriptionId: string) => Promise<TSubscription | null>;
|
|
830
|
+
getByUserId: (user: string | ObjectId) => Promise<TSubscription | null>;
|
|
831
|
+
getSubscriptions: ({ search, page, limit, sort, status, }?: {
|
|
832
|
+
search?: string | undefined;
|
|
833
|
+
page?: number | undefined;
|
|
834
|
+
limit?: number | undefined;
|
|
835
|
+
sort?: {} | undefined;
|
|
836
|
+
status?: string | undefined;
|
|
837
|
+
}) => Promise<{
|
|
838
|
+
items: any[];
|
|
839
|
+
pages: number;
|
|
840
|
+
pageRange: string;
|
|
841
|
+
}>;
|
|
842
|
+
updateStatus: (_id: string | ObjectId, status: string) => Promise<string>;
|
|
843
|
+
};
|
|
844
|
+
|
|
845
|
+
declare function useSubscriptionService(): {
|
|
846
|
+
getByUserId: (id: string) => Promise<TSubscription>;
|
|
847
|
+
getSubscriptionStatus: (subscriptionId: string) => Promise<any>;
|
|
848
|
+
cancelSubscription: (subscriptionId: string) => Promise<{
|
|
849
|
+
message: string;
|
|
850
|
+
}>;
|
|
851
|
+
};
|
|
852
|
+
|
|
853
|
+
declare function useSubscriptionController(): {
|
|
854
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
855
|
+
getByUserId: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
856
|
+
getSubscriptions: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
857
|
+
getSubscriptionStatus: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
858
|
+
cancelSubscription: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
859
|
+
};
|
|
860
|
+
|
|
813
861
|
declare const MONGO_URI: string;
|
|
814
862
|
declare const MONGO_DB: string;
|
|
815
863
|
declare const PORT: number;
|
|
@@ -840,5 +888,8 @@ declare const SPACES_SECRET_KEY: string;
|
|
|
840
888
|
declare const SPACES_ENDPOINT: string;
|
|
841
889
|
declare const SPACES_REGION: string;
|
|
842
890
|
declare const SPACES_BUCKET: string;
|
|
891
|
+
declare const PAYPAL_CLIENT_ID: string;
|
|
892
|
+
declare const PAYPAL_CLIENT_SECRET: string;
|
|
893
|
+
declare const PAYPAL_API_URL: string;
|
|
843
894
|
|
|
844
|
-
export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MCapBldgAct, MComment, MEntity, MFile, MONGO_DB, MONGO_URI, MRole, MToken, MUser, MUserRole, MVerification, MWorkflow, 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, TAttachment, TCapBldgAct, TCapBldgActAssmtCriteria, TCapBldgActBasicInfo, TCapBldgActInitRevEval, TComment, TEntity, TFile, TMiniRole, TRole, TToken, TUser, TUserRole, TVerification, TVerificationMetadata, TWorkflow, TWorkflowStep, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, isDev, useAuthController, useAuthService, useCapBldgActController, useCapBldgActRepo, useCapBldgActService, useCommentController, useCommentRepo, useCommentService, useEntityController, useEntityRepo, useEntityService, useFileController, useFileRepo, useFileService, useRoleController, useRoleRepo, useRoleService, useTokenRepo, useUserController, useUserRepo, useUserService, useVerificationController, useVerificationRepo, useVerificationService, useWorkflowController, useWorkflowRepo, useWorkflowService };
|
|
895
|
+
export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MCapBldgAct, MComment, MEntity, MFile, MONGO_DB, MONGO_URI, MRole, MSubscription, MToken, MUser, MUserRole, MVerification, MWorkflow, 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, TAttachment, TCapBldgAct, TCapBldgActAssmtCriteria, TCapBldgActBasicInfo, TCapBldgActInitRevEval, TComment, TEntity, TFile, TMiniRole, TRole, TSubscription, TToken, TUser, TUserRole, TVerification, TVerificationMetadata, TWorkflow, TWorkflowStep, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, isDev, useAuthController, useAuthService, useCapBldgActController, useCapBldgActRepo, useCapBldgActService, useCommentController, useCommentRepo, useCommentService, useEntityController, useEntityRepo, useEntityService, useFileController, useFileRepo, useFileService, useRoleController, useRoleRepo, useRoleService, useSubscriptionController, useSubscriptionRepo, useSubscriptionService, useTokenRepo, useUserController, useUserRepo, useUserService, useVerificationController, useVerificationRepo, useVerificationService, useWorkflowController, useWorkflowRepo, useWorkflowService };
|