@goweekdays/core 2.12.0 → 2.12.2

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @goweekdays/core
2
2
 
3
+ ## 2.12.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 62e9908: Job profile: add service and rename cityState→city
8
+
9
+ ## 2.12.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 1279d60: Add job-status-config & options; refactor attrs
14
+
3
15
  ## 2.12.0
4
16
 
5
17
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -1159,6 +1159,37 @@ declare function usePermissionGroupController(): {
1159
1159
  updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1160
1160
  };
1161
1161
 
1162
+ type TOption = {
1163
+ _id?: ObjectId;
1164
+ name: string;
1165
+ createdAt?: Date;
1166
+ };
1167
+ declare const schemaOption: Joi.StringSchema<string>;
1168
+ declare function modelOption(value: TOption): {
1169
+ _id: ObjectId | undefined;
1170
+ name: string;
1171
+ createdAt: Date;
1172
+ };
1173
+
1174
+ declare function useOptionRepo(namespace_collection: string): {
1175
+ createIndexes: () => Promise<string>;
1176
+ delCachedData: () => void;
1177
+ add: (value: TOption, session?: ClientSession) => Promise<bson.ObjectId>;
1178
+ getAll: ({ search, page, limit }?: {
1179
+ search?: string | undefined;
1180
+ page?: number | undefined;
1181
+ limit?: number | undefined;
1182
+ }) => Promise<Record<string, any>>;
1183
+ getByName: (name: string) => Promise<TOption | null>;
1184
+ };
1185
+
1186
+ declare function useOptionCtrl(): {
1187
+ getCountries: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1188
+ getJobTitles: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1189
+ getCurrencies: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1190
+ getAllCities: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1191
+ };
1192
+
1162
1193
  type TJobPost = {
1163
1194
  _id?: ObjectId;
1164
1195
  org: ObjectId | string;
@@ -1191,9 +1222,6 @@ declare function useJobPostController(): {
1191
1222
  updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1192
1223
  deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1193
1224
  updateStatusById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1194
- getLocations: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1195
- getJobTitles: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1196
- getCurrencies: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1197
1225
  };
1198
1226
 
1199
1227
  declare function useJobPostRepo(): {
@@ -1276,6 +1304,45 @@ declare function useLedgerBillingController(): {
1276
1304
  getSummary: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1277
1305
  };
1278
1306
 
1307
+ type TJobStatusSetup = {
1308
+ id: ObjectId | string;
1309
+ allowedFrom: string[];
1310
+ allowedTo: string[];
1311
+ roles?: ObjectId[];
1312
+ createdAt?: Date | string;
1313
+ updatedAt?: Date | string;
1314
+ };
1315
+ type TJobStatusTrans = {
1316
+ _id?: ObjectId;
1317
+ org: ObjectId | string;
1318
+ statusTransitions: TJobStatusSetup[];
1319
+ createdAt?: Date | string;
1320
+ updatedAt?: Date | string;
1321
+ };
1322
+ declare const schemaJobStatusSetup: Joi.ObjectSchema<any>;
1323
+ declare const schemaJobStatusSetupUpdate: Joi.ObjectSchema<any>;
1324
+ declare const schemaJobStatusTrans: Joi.ObjectSchema<any>;
1325
+ declare function modelJobStatusTrans(data: TJobStatusTrans): TJobStatusTrans;
1326
+ declare function modelJobStatusSetup(data: TJobStatusSetup): TJobStatusSetup;
1327
+ declare const DEFAULT_JOB_STATUS_SETUP: TJobStatusSetup[];
1328
+
1329
+ declare function useJobStatusConfigRepo(): {
1330
+ createIndexes: () => Promise<string>;
1331
+ delCachedData: () => void;
1332
+ add: (value: TJobStatusTrans, session?: ClientSession) => Promise<string>;
1333
+ getById: (id: ObjectId | string) => Promise<mongodb.WithId<bson.Document> | TJobStatusTrans | null>;
1334
+ addStatusSetup: (_id: ObjectId | string, options: TJobStatusSetup) => Promise<string>;
1335
+ updateStatusSetupById: (_id: ObjectId | string, statusId: ObjectId | string, options: Partial<TJobStatusSetup>) => Promise<string>;
1336
+ deleteStatusSetupById: (_id: ObjectId | string, statusId: ObjectId | string) => Promise<string>;
1337
+ };
1338
+
1339
+ declare function useJobStatusConfigController(): {
1340
+ getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1341
+ addStatusSetup: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1342
+ updateStatusSetupById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1343
+ deleteStatusSetupById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
1344
+ };
1345
+
1279
1346
  type TJobApplicationMetadata = {
1280
1347
  resume?: string;
1281
1348
  resumeUrl?: string;
@@ -1338,7 +1405,7 @@ type TJobProfileWorkExp = {
1338
1405
  jobTitle: string;
1339
1406
  company: string;
1340
1407
  country: string;
1341
- cityState?: string;
1408
+ city?: string;
1342
1409
  fromMonth: string;
1343
1410
  fromYear: string;
1344
1411
  toMonth?: string;
@@ -1439,7 +1506,7 @@ type TJobProfile = {
1439
1506
  verifiedEmail?: boolean;
1440
1507
  country: string;
1441
1508
  streetAddress?: string;
1442
- cityState: string;
1509
+ city: string;
1443
1510
  postalCode?: string;
1444
1511
  relocate: boolean;
1445
1512
  summary?: string;
@@ -1516,7 +1583,7 @@ declare function useJobProfileRepo(): {
1516
1583
  contact?: string;
1517
1584
  showContact?: boolean;
1518
1585
  country?: string;
1519
- cityState?: string;
1586
+ city?: string;
1520
1587
  streetAddress?: string;
1521
1588
  postalCode?: string;
1522
1589
  relocate?: boolean;
@@ -1607,4 +1674,4 @@ declare const XENDIT_BASE_URL: string;
1607
1674
  declare const DOMAIN: string;
1608
1675
  declare const APP_ORG: string;
1609
1676
 
1610
- 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, TJobApplication, TJobApplicationMetadata, TJobPost, TJobProfile, TJobProfileAward, TJobProfileCert, TJobProfileEdu, TJobProfileGroup, TJobProfileLang, TJobProfileMilitaryExp, TJobProfilePatent, TJobProfilePublication, TJobProfileSkill, TJobProfileWorkExp, TLedgerBill, TMember, TOrg, TPermission, TPermissionGroup, TPlan, TPromo, TRole, TSubscribe, TSubscription, TSubscriptionTransaction, TUser, TVerification, TVerificationMetadata, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, XENDIT_BASE_URL, XENDIT_SECRET_KEY, currencies, isDev, jobApplicationStatuses, ledgerBillStatuses, ledgerBillTypes, modelApp, modelJobApplication, modelJobPost, modelJobProfile, modelJobProfileCert, modelJobProfileEdu, modelJobProfileLang, modelJobProfileSkill, modelJobProfileWorkExp, modelLedgerBill, modelMember, modelOrg, modelPermission, modelPermissionGroup, modelPlan, modelPromo, modelRole, modelSubscription, modelSubscriptionTransaction, modelUser, modelVerification, schemaApp, schemaAppUpdate, schemaAward, schemaBuilding, schemaBuildingUnit, schemaCertification, schemaEducation, schemaGroup, schemaInviteMember, schemaJobApplication, schemaJobPost, schemaJobPostUpdate, schemaJobProfile, schemaJobProfileAdditionalInfo, schemaJobProfileCert, schemaJobProfileCertDel, schemaJobProfileContactInfo, schemaJobProfileEdu, schemaJobProfileEduDel, schemaJobProfileLang, schemaJobProfileLangDel, schemaJobProfilePersonalInfo, schemaJobProfileSkill, schemaJobProfileSkillDel, schemaJobProfileSummary, schemaJobProfileWorkExp, schemaJobProfileWorkExpDel, schemaLanguage, schemaLedgerBill, schemaLedgerBillingSummary, schemaMember, schemaMemberRole, schemaMemberStatus, schemaMilitaryExp, schemaOrg, schemaOrgAdd, schemaOrgPilot, schemaOrgUpdate, schemaPatent, schemaPermission, schemaPermissionGroup, schemaPermissionGroupUpdate, schemaPermissionUpdate, schemaPlan, schemaPromo, schemaPublication, schemaRole, schemaRoleUpdate, schemaSkill, schemaSubscribe, schemaSubscription, schemaSubscriptionCompute, schemaSubscriptionPromoCode, schemaSubscriptionSeats, schemaSubscriptionTransaction, schemaSubscriptionUpdate, schemaUpdateOptions, schemaUser, schemaVerification, schemaVerificationOrgInvite, schemaWorkExp, transactionSchema, useAppController, useAppRepo, useAppService, useAuthController, useAuthService, useBuildingController, useBuildingRepo, useBuildingService, useBuildingUnitController, useBuildingUnitRepo, useBuildingUnitService, useCounterModel, useCounterRepo, useFileController, useFileRepo, useFileService, useGitHubService, useJobApplicationController, useJobApplicationRepo, useJobPostController, useJobPostRepo, useJobPostService, useJobProfileCtrl, useJobProfileRepo, useLedgerBillingController, useLedgerBillingRepo, useMemberController, useMemberRepo, useOrgController, useOrgRepo, useOrgService, usePaypalService, usePermissionController, usePermissionGroupController, usePermissionGroupRepo, usePermissionGroupService, usePermissionRepo, usePermissionService, usePlanController, usePlanRepo, usePlanService, usePromoController, usePromoRepo, usePromoUsageRepo, useRoleController, useRoleRepo, useRoleService, useSubscriptionController, useSubscriptionRepo, useSubscriptionService, useSubscriptionTransactionController, useSubscriptionTransactionRepo, useUserController, useUserRepo, useUserService, useUtilController, useVerificationController, useVerificationRepo, useVerificationService };
1677
+ export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, APP_ORG, DEFAULT_JOB_STATUS_SETUP, 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, TJobApplication, TJobApplicationMetadata, TJobPost, TJobProfile, TJobProfileAward, TJobProfileCert, TJobProfileEdu, TJobProfileGroup, TJobProfileLang, TJobProfileMilitaryExp, TJobProfilePatent, TJobProfilePublication, TJobProfileSkill, TJobProfileWorkExp, TJobStatusSetup, TJobStatusTrans, TLedgerBill, TMember, TOption, TOrg, TPermission, TPermissionGroup, TPlan, TPromo, TRole, TSubscribe, TSubscription, TSubscriptionTransaction, TUser, TVerification, TVerificationMetadata, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, XENDIT_BASE_URL, XENDIT_SECRET_KEY, currencies, isDev, jobApplicationStatuses, ledgerBillStatuses, ledgerBillTypes, modelApp, modelJobApplication, modelJobPost, modelJobProfile, modelJobProfileCert, modelJobProfileEdu, modelJobProfileLang, modelJobProfileSkill, modelJobProfileWorkExp, modelJobStatusSetup, modelJobStatusTrans, modelLedgerBill, modelMember, modelOption, modelOrg, modelPermission, modelPermissionGroup, modelPlan, modelPromo, modelRole, modelSubscription, modelSubscriptionTransaction, modelUser, modelVerification, schemaApp, schemaAppUpdate, schemaAward, schemaBuilding, schemaBuildingUnit, schemaCertification, schemaEducation, schemaGroup, schemaInviteMember, schemaJobApplication, schemaJobPost, schemaJobPostUpdate, schemaJobProfile, schemaJobProfileAdditionalInfo, schemaJobProfileCert, schemaJobProfileCertDel, schemaJobProfileContactInfo, schemaJobProfileEdu, schemaJobProfileEduDel, schemaJobProfileLang, schemaJobProfileLangDel, schemaJobProfilePersonalInfo, schemaJobProfileSkill, schemaJobProfileSkillDel, schemaJobProfileSummary, schemaJobProfileWorkExp, schemaJobProfileWorkExpDel, schemaJobStatusSetup, schemaJobStatusSetupUpdate, schemaJobStatusTrans, schemaLanguage, schemaLedgerBill, schemaLedgerBillingSummary, schemaMember, schemaMemberRole, schemaMemberStatus, schemaMilitaryExp, schemaOption, schemaOrg, schemaOrgAdd, schemaOrgPilot, schemaOrgUpdate, schemaPatent, schemaPermission, schemaPermissionGroup, schemaPermissionGroupUpdate, schemaPermissionUpdate, schemaPlan, schemaPromo, schemaPublication, schemaRole, schemaRoleUpdate, schemaSkill, schemaSubscribe, schemaSubscription, schemaSubscriptionCompute, schemaSubscriptionPromoCode, schemaSubscriptionSeats, schemaSubscriptionTransaction, schemaSubscriptionUpdate, schemaUpdateOptions, schemaUser, schemaVerification, schemaVerificationOrgInvite, schemaWorkExp, transactionSchema, useAppController, useAppRepo, useAppService, useAuthController, useAuthService, useBuildingController, useBuildingRepo, useBuildingService, useBuildingUnitController, useBuildingUnitRepo, useBuildingUnitService, useCounterModel, useCounterRepo, useFileController, useFileRepo, useFileService, useGitHubService, useJobApplicationController, useJobApplicationRepo, useJobPostController, useJobPostRepo, useJobPostService, useJobProfileCtrl, useJobProfileRepo, useJobStatusConfigController, useJobStatusConfigRepo, useLedgerBillingController, useLedgerBillingRepo, useMemberController, useMemberRepo, useOptionCtrl, useOptionRepo, useOrgController, useOrgRepo, useOrgService, usePaypalService, usePermissionController, usePermissionGroupController, usePermissionGroupRepo, usePermissionGroupService, usePermissionRepo, usePermissionService, usePlanController, usePlanRepo, usePlanService, usePromoController, usePromoRepo, usePromoUsageRepo, useRoleController, useRoleRepo, useRoleService, useSubscriptionController, useSubscriptionRepo, useSubscriptionService, useSubscriptionTransactionController, useSubscriptionTransactionRepo, useUserController, useUserRepo, useUserService, useUtilController, useVerificationController, useVerificationRepo, useVerificationService };