@goweekdays/core 2.9.0 → 2.10.1
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 +13 -0
- package/dist/index.d.ts +35 -11
- package/dist/index.js +1319 -284
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1427 -367
- package/dist/index.mjs.map +1 -1
- package/dist/public/handlebars/org-created.hbs +13 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @goweekdays/core
|
|
2
2
|
|
|
3
|
+
## 2.10.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 23e67be: Add salary fields to job post model
|
|
8
|
+
- 08763a4: Add job post attribute management and endpoints
|
|
9
|
+
|
|
10
|
+
## 2.10.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- d140abc: Add promo usage tracking
|
|
15
|
+
|
|
3
16
|
## 2.9.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -343,6 +343,7 @@ declare function useMemberRepo(): {
|
|
|
343
343
|
}, session?: ClientSession) => Promise<string>;
|
|
344
344
|
updateStatusById: (_id: string | ObjectId, status: string, session?: ClientSession) => Promise<string>;
|
|
345
345
|
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<string>;
|
|
346
|
+
updateStatusByOrg: (org: string | ObjectId, status: string, session?: ClientSession) => Promise<string>;
|
|
346
347
|
};
|
|
347
348
|
|
|
348
349
|
declare function useMemberController(): {
|
|
@@ -365,6 +366,7 @@ type TOrg = {
|
|
|
365
366
|
email: string;
|
|
366
367
|
contact?: string;
|
|
367
368
|
createdBy: string | ObjectId;
|
|
369
|
+
promoCode?: string;
|
|
368
370
|
status?: string;
|
|
369
371
|
createdAt?: string | Date;
|
|
370
372
|
updatedAt?: string | Date;
|
|
@@ -420,8 +422,7 @@ declare function useOrgController(): {
|
|
|
420
422
|
type TPromo = {
|
|
421
423
|
_id?: ObjectId;
|
|
422
424
|
code: string;
|
|
423
|
-
|
|
424
|
-
type: "flat" | "fixed" | "tiered";
|
|
425
|
+
type: "flat" | "fixed" | "volume";
|
|
425
426
|
flatRate?: number;
|
|
426
427
|
fixedRate?: number;
|
|
427
428
|
tiers?: Array<{
|
|
@@ -430,11 +431,12 @@ type TPromo = {
|
|
|
430
431
|
rate: number;
|
|
431
432
|
}>;
|
|
432
433
|
currency: string;
|
|
433
|
-
startDate
|
|
434
|
+
startDate?: Date | string;
|
|
434
435
|
endDate?: Date | string;
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
436
|
+
apps?: string[];
|
|
437
|
+
seats?: number;
|
|
438
|
+
usage?: number;
|
|
439
|
+
status?: "active" | "inactive" | "expired";
|
|
438
440
|
createdAt?: Date | string;
|
|
439
441
|
updatedAt?: Date | string;
|
|
440
442
|
deletedAt?: Date | string;
|
|
@@ -453,9 +455,19 @@ declare function usePromoRepo(): {
|
|
|
453
455
|
}) => Promise<TPaginate<TPromo>>;
|
|
454
456
|
getByCode: (code: string) => Promise<TPromo | null>;
|
|
455
457
|
getById: (_id: string | ObjectId) => Promise<TPromo | null>;
|
|
458
|
+
updateById: (_id: string | ObjectId, options: Pick<TPromo, "code" | "apps" | "type" | "flatRate" | "fixedRate" | "tiers" | "currency" | "startDate" | "endDate" | "seats" | "usage">) => Promise<string>;
|
|
456
459
|
deleteById: (_id: string | ObjectId) => Promise<string>;
|
|
457
460
|
};
|
|
458
461
|
|
|
462
|
+
declare function usePromoController(): {
|
|
463
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
464
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
465
|
+
getByCode: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
466
|
+
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
467
|
+
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
468
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
469
|
+
};
|
|
470
|
+
|
|
459
471
|
type TRole = {
|
|
460
472
|
_id?: ObjectId;
|
|
461
473
|
id?: string | ObjectId;
|
|
@@ -1064,15 +1076,20 @@ declare function usePermissionGroupController(): {
|
|
|
1064
1076
|
type TJobPost = {
|
|
1065
1077
|
_id?: ObjectId;
|
|
1066
1078
|
org: ObjectId | string;
|
|
1079
|
+
orgName?: string;
|
|
1067
1080
|
title: string;
|
|
1068
1081
|
setup: string;
|
|
1069
1082
|
location: string;
|
|
1070
1083
|
type: string;
|
|
1084
|
+
minSalary?: number;
|
|
1085
|
+
maxSalary?: number;
|
|
1086
|
+
currency?: string;
|
|
1087
|
+
payPeriod?: string;
|
|
1071
1088
|
description: string;
|
|
1072
1089
|
status?: string;
|
|
1073
|
-
createdAt?: Date;
|
|
1074
|
-
updatedAt?: Date;
|
|
1075
|
-
deletedAt?: Date;
|
|
1090
|
+
createdAt?: Date | string;
|
|
1091
|
+
updatedAt?: Date | string;
|
|
1092
|
+
deletedAt?: Date | string;
|
|
1076
1093
|
};
|
|
1077
1094
|
declare const schemaJobPost: Joi.ObjectSchema<any>;
|
|
1078
1095
|
declare const schemaJobPostUpdate: Joi.ObjectSchema<any>;
|
|
@@ -1085,6 +1102,10 @@ declare function useJobPostController(): {
|
|
|
1085
1102
|
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1086
1103
|
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1087
1104
|
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1105
|
+
updateStatusById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1106
|
+
getLocations: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1107
|
+
getJobTitles: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1108
|
+
getCurrencies: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
1088
1109
|
};
|
|
1089
1110
|
|
|
1090
1111
|
declare function useJobPostRepo(): {
|
|
@@ -1096,7 +1117,7 @@ declare function useJobPostRepo(): {
|
|
|
1096
1117
|
limit?: number | undefined;
|
|
1097
1118
|
status?: string | undefined;
|
|
1098
1119
|
}) => Promise<Record<string, any>>;
|
|
1099
|
-
getJobPostsByOrg: ({ search, page, limit, org, status
|
|
1120
|
+
getJobPostsByOrg: ({ search, page, limit, org, status }?: {
|
|
1100
1121
|
org: string | ObjectId;
|
|
1101
1122
|
page: number;
|
|
1102
1123
|
limit?: number | undefined;
|
|
@@ -1113,10 +1134,13 @@ declare function useJobPostRepo(): {
|
|
|
1113
1134
|
getById: (_id: string | ObjectId) => Promise<TJobPost>;
|
|
1114
1135
|
updateById: (_id: string | ObjectId, options: Pick<TJobPost, "title" | "setup" | "location" | "type" | "description">) => Promise<string>;
|
|
1115
1136
|
deleteById: (_id: string | ObjectId, session?: ClientSession) => Promise<string>;
|
|
1137
|
+
updateStatusById: (_id: string | ObjectId, status: string) => Promise<string>;
|
|
1116
1138
|
};
|
|
1117
1139
|
|
|
1118
1140
|
declare function useJobPostService(): {
|
|
1141
|
+
add: (value: TJobPost) => Promise<string>;
|
|
1119
1142
|
deleteById: (id: string) => Promise<string>;
|
|
1143
|
+
updateStatusById: (id: string, newStatus: string) => Promise<string>;
|
|
1120
1144
|
};
|
|
1121
1145
|
|
|
1122
1146
|
type TLedgerBill = {
|
|
@@ -1203,4 +1227,4 @@ declare const XENDIT_BASE_URL: string;
|
|
|
1203
1227
|
declare const DOMAIN: string;
|
|
1204
1228
|
declare const APP_ORG: string;
|
|
1205
1229
|
|
|
1206
|
-
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, PaypalWebhookHeaders, 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, schemaJobPostUpdate, 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, usePaypalService, usePermissionController, usePermissionGroupController, usePermissionGroupRepo, usePermissionGroupService, usePermissionRepo, usePermissionService, usePlanController, usePlanRepo, usePlanService, usePromoRepo, useRoleController, useRoleRepo, useRoleService, useSubscriptionController, useSubscriptionRepo, useSubscriptionService, useSubscriptionTransactionController, useSubscriptionTransactionRepo, useUserController, useUserRepo, useUserService, useUtilController, useVerificationController, useVerificationRepo, useVerificationService };
|
|
1230
|
+
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, PaypalWebhookHeaders, 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, schemaJobPostUpdate, 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, usePaypalService, usePermissionController, usePermissionGroupController, usePermissionGroupRepo, usePermissionGroupService, usePermissionRepo, usePermissionService, usePlanController, usePlanRepo, usePlanService, usePromoController, usePromoRepo, useRoleController, useRoleRepo, useRoleService, useSubscriptionController, useSubscriptionRepo, useSubscriptionService, useSubscriptionTransactionController, useSubscriptionTransactionRepo, useUserController, useUserRepo, useUserService, useUtilController, useVerificationController, useVerificationRepo, useVerificationService };
|