@thejob/schema 2.1.2 → 2.1.3
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/dist/index.cjs +36 -0
- package/dist/index.d.cts +34 -1
- package/dist/index.d.ts +34 -1
- package/dist/index.js +34 -0
- package/package.json +1 -1
- package/src/user/user.constant.ts +23 -0
- package/src/user/user.schema.ts +27 -0
package/dist/index.cjs
CHANGED
|
@@ -80,6 +80,7 @@ __export(index_exports, {
|
|
|
80
80
|
MIN_SALARY_LOWER_BOUND: () => MIN_SALARY_LOWER_BOUND,
|
|
81
81
|
MIN_SALARY_UPPER_BOUND: () => MIN_SALARY_UPPER_BOUND,
|
|
82
82
|
MailingListSchema: () => MailingListSchema,
|
|
83
|
+
NotificationChannel: () => NotificationChannel,
|
|
83
84
|
PREFILL_MIRRORED_KEYS: () => PREFILL_MIRRORED_KEYS,
|
|
84
85
|
PRIVATE_PROFILE_FIELDS: () => PRIVATE_PROFILE_FIELDS,
|
|
85
86
|
PageSchema: () => PageSchema,
|
|
@@ -121,6 +122,7 @@ __export(index_exports, {
|
|
|
121
122
|
SupportedJobSearchUrgencies: () => SupportedJobSearchUrgencies,
|
|
122
123
|
SupportedJobStatuses: () => SupportedJobStatuses,
|
|
123
124
|
SupportedJobSubCategories: () => SupportedJobSubCategories,
|
|
125
|
+
SupportedNotificationChannels: () => SupportedNotificationChannels,
|
|
124
126
|
SupportedPageStatuses: () => SupportedPageStatuses,
|
|
125
127
|
SupportedPageTypes: () => SupportedPageTypes,
|
|
126
128
|
SupportedPostStatuses: () => SupportedPostStatuses,
|
|
@@ -2155,6 +2157,14 @@ var JobAlertFrequency = /* @__PURE__ */ ((JobAlertFrequency2) => {
|
|
|
2155
2157
|
return JobAlertFrequency2;
|
|
2156
2158
|
})(JobAlertFrequency || {});
|
|
2157
2159
|
var SupportedJobAlertFrequencies = Object.values(JobAlertFrequency);
|
|
2160
|
+
var NotificationChannel = /* @__PURE__ */ ((NotificationChannel2) => {
|
|
2161
|
+
NotificationChannel2["GroupActivity"] = "groupActivity";
|
|
2162
|
+
NotificationChannel2["JobActivity"] = "jobActivity";
|
|
2163
|
+
NotificationChannel2["ApplicationUpdates"] = "applicationUpdates";
|
|
2164
|
+
NotificationChannel2["ProductUpdates"] = "productUpdates";
|
|
2165
|
+
return NotificationChannel2;
|
|
2166
|
+
})(NotificationChannel || {});
|
|
2167
|
+
var SupportedNotificationChannels = Object.values(NotificationChannel);
|
|
2158
2168
|
var SupportedSalaryCurrencies = ["USD", "EUR", "GBP", "SEK", "INR"];
|
|
2159
2169
|
var MIN_SALARY_LOWER_BOUND = 0;
|
|
2160
2170
|
var MIN_SALARY_UPPER_BOUND = 1e6;
|
|
@@ -2680,6 +2690,30 @@ var UserSchema = (0, import_yup36.object)({
|
|
|
2680
2690
|
*/
|
|
2681
2691
|
jobAlertFrequency: (0, import_yup36.string)().oneOf(SupportedJobAlertFrequencies).optional().label("Job alert frequency")
|
|
2682
2692
|
}).default({ subscribed: false }).label("Marketing Consent"),
|
|
2693
|
+
/**
|
|
2694
|
+
* Per-channel toggles for NOTIFICATION email — mail about activity on the
|
|
2695
|
+
* user's own account (a group invite, a job of theirs expiring).
|
|
2696
|
+
*
|
|
2697
|
+
* Deliberately separate from `marketingConsent`, which they must NOT be
|
|
2698
|
+
* collapsed into: the two have different legal footing, which the
|
|
2699
|
+
* email-service footer rules already encode. Notifications are opt-OUT
|
|
2700
|
+
* (default `true`) because a user who declined marketing still needs to hear
|
|
2701
|
+
* that their group invite arrived; marketing stays opt-IN. `productUpdates`
|
|
2702
|
+
* is the exception — it is promotional in character, so it defaults off.
|
|
2703
|
+
*
|
|
2704
|
+
* Transactional mail (magic-link, verification) ignores this object entirely.
|
|
2705
|
+
*/
|
|
2706
|
+
notificationPrefs: (0, import_yup36.object)({
|
|
2707
|
+
groupActivity: (0, import_yup36.boolean)().default(true).label("Group activity email"),
|
|
2708
|
+
jobActivity: (0, import_yup36.boolean)().default(true).label("Job activity email"),
|
|
2709
|
+
applicationUpdates: (0, import_yup36.boolean)().default(true).label("Application update email"),
|
|
2710
|
+
productUpdates: (0, import_yup36.boolean)().default(false).label("Product update email")
|
|
2711
|
+
}).default({
|
|
2712
|
+
groupActivity: true,
|
|
2713
|
+
jobActivity: true,
|
|
2714
|
+
applicationUpdates: true,
|
|
2715
|
+
productUpdates: false
|
|
2716
|
+
}).label("Notification Preferences"),
|
|
2683
2717
|
/**
|
|
2684
2718
|
* Vector embedding of the user's profile for semantic/hybrid search.
|
|
2685
2719
|
* Generated from a structured summary of skills, experience, education, etc.
|
|
@@ -2766,6 +2800,7 @@ var StudentCompletenessSchema = UserCompletenessSchema.omit([
|
|
|
2766
2800
|
MIN_SALARY_LOWER_BOUND,
|
|
2767
2801
|
MIN_SALARY_UPPER_BOUND,
|
|
2768
2802
|
MailingListSchema,
|
|
2803
|
+
NotificationChannel,
|
|
2769
2804
|
PREFILL_MIRRORED_KEYS,
|
|
2770
2805
|
PRIVATE_PROFILE_FIELDS,
|
|
2771
2806
|
PageSchema,
|
|
@@ -2807,6 +2842,7 @@ var StudentCompletenessSchema = UserCompletenessSchema.omit([
|
|
|
2807
2842
|
SupportedJobSearchUrgencies,
|
|
2808
2843
|
SupportedJobStatuses,
|
|
2809
2844
|
SupportedJobSubCategories,
|
|
2845
|
+
SupportedNotificationChannels,
|
|
2810
2846
|
SupportedPageStatuses,
|
|
2811
2847
|
SupportedPageTypes,
|
|
2812
2848
|
SupportedPostStatuses,
|
package/dist/index.d.cts
CHANGED
|
@@ -1689,6 +1689,27 @@ declare enum JobAlertFrequency {
|
|
|
1689
1689
|
Weekly = "weekly"
|
|
1690
1690
|
}
|
|
1691
1691
|
declare const SupportedJobAlertFrequencies: JobAlertFrequency[];
|
|
1692
|
+
/**
|
|
1693
|
+
* Channels of NOTIFICATION email — mail about activity on the user's own
|
|
1694
|
+
* account (a group invite, a job of theirs expiring). Distinct from marketing:
|
|
1695
|
+
* notifications are opt-OUT (default on, see `notificationPrefs`), marketing is
|
|
1696
|
+
* opt-IN (`marketingConsent.subscribed`). Transactional mail (magic-link,
|
|
1697
|
+
* verification) is governed by neither and always sends.
|
|
1698
|
+
*
|
|
1699
|
+
* Deliberately coarse: four channels a user will actually reason about, rather
|
|
1700
|
+
* than one toggle per email template.
|
|
1701
|
+
*/
|
|
1702
|
+
declare enum NotificationChannel {
|
|
1703
|
+
/** Group invites, join requests, membership approved/rejected. */
|
|
1704
|
+
GroupActivity = "groupActivity",
|
|
1705
|
+
/** Activity on jobs the user posted, e.g. a listing expiring. */
|
|
1706
|
+
JobActivity = "jobActivity",
|
|
1707
|
+
/** Status changes on jobs the user applied to. */
|
|
1708
|
+
ApplicationUpdates = "applicationUpdates",
|
|
1709
|
+
/** Product announcements and feature news. */
|
|
1710
|
+
ProductUpdates = "productUpdates"
|
|
1711
|
+
}
|
|
1712
|
+
declare const SupportedNotificationChannels: NotificationChannel[];
|
|
1692
1713
|
/** ISO-4217 currency codes accepted for the salary preference (extend as needed). */
|
|
1693
1714
|
declare const SupportedSalaryCurrencies: readonly ["USD", "EUR", "GBP", "SEK", "INR"];
|
|
1694
1715
|
type SupportedSalaryCurrency = (typeof SupportedSalaryCurrencies)[number];
|
|
@@ -1823,6 +1844,12 @@ declare const UserSchema: yup.ObjectSchema<{
|
|
|
1823
1844
|
jobAlertFrequency?: JobAlertFrequency | undefined;
|
|
1824
1845
|
subscribed: boolean;
|
|
1825
1846
|
};
|
|
1847
|
+
notificationPrefs: {
|
|
1848
|
+
groupActivity: boolean;
|
|
1849
|
+
jobActivity: boolean;
|
|
1850
|
+
applicationUpdates: boolean;
|
|
1851
|
+
productUpdates: boolean;
|
|
1852
|
+
};
|
|
1826
1853
|
embedding: {
|
|
1827
1854
|
vector?: number[] | undefined;
|
|
1828
1855
|
model?: string | undefined;
|
|
@@ -2022,6 +2049,12 @@ declare const UserSchema: yup.ObjectSchema<{
|
|
|
2022
2049
|
marketingConsent: {
|
|
2023
2050
|
subscribed: boolean;
|
|
2024
2051
|
};
|
|
2052
|
+
notificationPrefs: {
|
|
2053
|
+
groupActivity: boolean;
|
|
2054
|
+
jobActivity: boolean;
|
|
2055
|
+
applicationUpdates: boolean;
|
|
2056
|
+
productUpdates: boolean;
|
|
2057
|
+
};
|
|
2025
2058
|
embedding: {
|
|
2026
2059
|
vector: undefined;
|
|
2027
2060
|
model: undefined;
|
|
@@ -2910,4 +2943,4 @@ declare const StudentCompletenessSchema: yup.ObjectSchema<{
|
|
|
2910
2943
|
};
|
|
2911
2944
|
}, "">;
|
|
2912
2945
|
|
|
2913
|
-
export { AnswerChoiceType, ApplicationReceivePreference, CampaignSchema, CampaignStatus, ChoiceQuestionSchema, Common, CompensationType, CompletenessScoreSchema, ContactTypes, CoordinatorPageLinkSchema, DISPLAY_DATE_FORMAT, DISPLAY_DATE_FORMAT_SHORT, DateStringSchema, DbDefaultSchema, DefaultPaginatedResponse, DefaultPaginationOptions, DefaultUserRoles, DurationSchema, EMPTY_STRING, EducationLevel, EducationSchema, EmployeeCount, EmploymentType, ExperienceLevel, FEEDBACK_MESSAGE_MAX, FeedbackSchema, FeedbackStatus, FeedbackType, GeneraDetailFields, GroupManagedBy, GroupMembershipSchema, GroupMembershipStatus, GroupSchema, GroupStatus, GroupTranslationSchema, GroupVisibility, InputQuestionSchema, JOB_TAXONOMY, JobAlertFrequency, JobCategory, JobIndustry, JobSchema, JobSearchUrgency, JobStatus, JobSubCategory, ListFilterSchema, LocationSchema, MIN_SALARY_LOWER_BOUND, MIN_SALARY_UPPER_BOUND, MailingListSchema, PREFILL_MIRRORED_KEYS, PRIVATE_PROFILE_FIELDS, PageSchema, PageStatus, PageType, type PaginatedResponse, PaginationSchema, PostSchema, PostStatus, type PrefillMirroredKey, type PrivateProfileField, ProficiencyLevel, QuestionSchema, QuestionType, ReadAndAcknowledgeQuestionSchema, RecruiterPageLinkSchema, ReferralSource, ReportReason, ReportSchema, ResourceType, SITEMAP_FORMAT, SYSTEM_DATE_FORMAT, SkillSchema, SocialAccount, SocialAccountSchema, StudentCompletenessSchema, StudyType, SupportedAnswerChoiceTypes, SupportedApplicationReceivePreferences, SupportedCampaignStatuses, SupportedCompensationTypes, SupportedContactTypes, SupportedEducationLevels, SupportedEmployeeCounts, SupportedEmploymentTypes, SupportedExperienceLevels, SupportedFeedbackStatuses, SupportedFeedbackTypes, SupportedJobAlertFrequencies, SupportedJobCategories, SupportedJobIndustries, SupportedJobSearchUrgencies, SupportedJobStatuses, SupportedJobSubCategories, SupportedPageStatuses, SupportedPageTypes, SupportedPostStatuses, SupportedProficiencyLevels, SupportedQuestionTypes, SupportedReferralSources, SupportedReportReasons, SupportedResourceTypes, SupportedSalaryCurrencies, type SupportedSalaryCurrency, SupportedSocialAccounts, SupportedStudyTypes, SupportedUserProfileVisibilities, SupportedUserRoles, SupportedUserStatuses, SupportedWorkModes, TAXONOMY_LABELS, type TChoiceQuestionSchema, type TDurationSchema, type TInputQuestionSchema, type TJobSchema, type TPostSchema, type TQuestionSchema, type TReadAndAcknowledgeQuestionSchema, type TUserIdAndCreatedAtSchema, TermsAcceptedSchema, UserAdditionalInfoSchema, UserCertificationSchema, UserCompletenessSchema, UserCoordinatorProfileSchema, UserDetailType, UserGeneralDetailSchema, UserIdAndCreatedAtSchema, UserInterestSchema, UserJobPreferencesSchema, UserLanguageSchema, type UserProfileOverview, UserProfileVisibility, UserProjectSchema, UserRecruiterProfileSchema, UserRole, UserSchema, UserSkillSchema, UserStatus, WorkExperienceSchema, WorkMode, categoryOfIndustry, categoryOfSubCategory, dateString, deriveIndustry, getSchemaByQuestion, industriesOfCategory, industryOfSubCategory, subCategoriesOfIndustry };
|
|
2946
|
+
export { AnswerChoiceType, ApplicationReceivePreference, CampaignSchema, CampaignStatus, ChoiceQuestionSchema, Common, CompensationType, CompletenessScoreSchema, ContactTypes, CoordinatorPageLinkSchema, DISPLAY_DATE_FORMAT, DISPLAY_DATE_FORMAT_SHORT, DateStringSchema, DbDefaultSchema, DefaultPaginatedResponse, DefaultPaginationOptions, DefaultUserRoles, DurationSchema, EMPTY_STRING, EducationLevel, EducationSchema, EmployeeCount, EmploymentType, ExperienceLevel, FEEDBACK_MESSAGE_MAX, FeedbackSchema, FeedbackStatus, FeedbackType, GeneraDetailFields, GroupManagedBy, GroupMembershipSchema, GroupMembershipStatus, GroupSchema, GroupStatus, GroupTranslationSchema, GroupVisibility, InputQuestionSchema, JOB_TAXONOMY, JobAlertFrequency, JobCategory, JobIndustry, JobSchema, JobSearchUrgency, JobStatus, JobSubCategory, ListFilterSchema, LocationSchema, MIN_SALARY_LOWER_BOUND, MIN_SALARY_UPPER_BOUND, MailingListSchema, NotificationChannel, PREFILL_MIRRORED_KEYS, PRIVATE_PROFILE_FIELDS, PageSchema, PageStatus, PageType, type PaginatedResponse, PaginationSchema, PostSchema, PostStatus, type PrefillMirroredKey, type PrivateProfileField, ProficiencyLevel, QuestionSchema, QuestionType, ReadAndAcknowledgeQuestionSchema, RecruiterPageLinkSchema, ReferralSource, ReportReason, ReportSchema, ResourceType, SITEMAP_FORMAT, SYSTEM_DATE_FORMAT, SkillSchema, SocialAccount, SocialAccountSchema, StudentCompletenessSchema, StudyType, SupportedAnswerChoiceTypes, SupportedApplicationReceivePreferences, SupportedCampaignStatuses, SupportedCompensationTypes, SupportedContactTypes, SupportedEducationLevels, SupportedEmployeeCounts, SupportedEmploymentTypes, SupportedExperienceLevels, SupportedFeedbackStatuses, SupportedFeedbackTypes, SupportedJobAlertFrequencies, SupportedJobCategories, SupportedJobIndustries, SupportedJobSearchUrgencies, SupportedJobStatuses, SupportedJobSubCategories, SupportedNotificationChannels, SupportedPageStatuses, SupportedPageTypes, SupportedPostStatuses, SupportedProficiencyLevels, SupportedQuestionTypes, SupportedReferralSources, SupportedReportReasons, SupportedResourceTypes, SupportedSalaryCurrencies, type SupportedSalaryCurrency, SupportedSocialAccounts, SupportedStudyTypes, SupportedUserProfileVisibilities, SupportedUserRoles, SupportedUserStatuses, SupportedWorkModes, TAXONOMY_LABELS, type TChoiceQuestionSchema, type TDurationSchema, type TInputQuestionSchema, type TJobSchema, type TPostSchema, type TQuestionSchema, type TReadAndAcknowledgeQuestionSchema, type TUserIdAndCreatedAtSchema, TermsAcceptedSchema, UserAdditionalInfoSchema, UserCertificationSchema, UserCompletenessSchema, UserCoordinatorProfileSchema, UserDetailType, UserGeneralDetailSchema, UserIdAndCreatedAtSchema, UserInterestSchema, UserJobPreferencesSchema, UserLanguageSchema, type UserProfileOverview, UserProfileVisibility, UserProjectSchema, UserRecruiterProfileSchema, UserRole, UserSchema, UserSkillSchema, UserStatus, WorkExperienceSchema, WorkMode, categoryOfIndustry, categoryOfSubCategory, dateString, deriveIndustry, getSchemaByQuestion, industriesOfCategory, industryOfSubCategory, subCategoriesOfIndustry };
|
package/dist/index.d.ts
CHANGED
|
@@ -1689,6 +1689,27 @@ declare enum JobAlertFrequency {
|
|
|
1689
1689
|
Weekly = "weekly"
|
|
1690
1690
|
}
|
|
1691
1691
|
declare const SupportedJobAlertFrequencies: JobAlertFrequency[];
|
|
1692
|
+
/**
|
|
1693
|
+
* Channels of NOTIFICATION email — mail about activity on the user's own
|
|
1694
|
+
* account (a group invite, a job of theirs expiring). Distinct from marketing:
|
|
1695
|
+
* notifications are opt-OUT (default on, see `notificationPrefs`), marketing is
|
|
1696
|
+
* opt-IN (`marketingConsent.subscribed`). Transactional mail (magic-link,
|
|
1697
|
+
* verification) is governed by neither and always sends.
|
|
1698
|
+
*
|
|
1699
|
+
* Deliberately coarse: four channels a user will actually reason about, rather
|
|
1700
|
+
* than one toggle per email template.
|
|
1701
|
+
*/
|
|
1702
|
+
declare enum NotificationChannel {
|
|
1703
|
+
/** Group invites, join requests, membership approved/rejected. */
|
|
1704
|
+
GroupActivity = "groupActivity",
|
|
1705
|
+
/** Activity on jobs the user posted, e.g. a listing expiring. */
|
|
1706
|
+
JobActivity = "jobActivity",
|
|
1707
|
+
/** Status changes on jobs the user applied to. */
|
|
1708
|
+
ApplicationUpdates = "applicationUpdates",
|
|
1709
|
+
/** Product announcements and feature news. */
|
|
1710
|
+
ProductUpdates = "productUpdates"
|
|
1711
|
+
}
|
|
1712
|
+
declare const SupportedNotificationChannels: NotificationChannel[];
|
|
1692
1713
|
/** ISO-4217 currency codes accepted for the salary preference (extend as needed). */
|
|
1693
1714
|
declare const SupportedSalaryCurrencies: readonly ["USD", "EUR", "GBP", "SEK", "INR"];
|
|
1694
1715
|
type SupportedSalaryCurrency = (typeof SupportedSalaryCurrencies)[number];
|
|
@@ -1823,6 +1844,12 @@ declare const UserSchema: yup.ObjectSchema<{
|
|
|
1823
1844
|
jobAlertFrequency?: JobAlertFrequency | undefined;
|
|
1824
1845
|
subscribed: boolean;
|
|
1825
1846
|
};
|
|
1847
|
+
notificationPrefs: {
|
|
1848
|
+
groupActivity: boolean;
|
|
1849
|
+
jobActivity: boolean;
|
|
1850
|
+
applicationUpdates: boolean;
|
|
1851
|
+
productUpdates: boolean;
|
|
1852
|
+
};
|
|
1826
1853
|
embedding: {
|
|
1827
1854
|
vector?: number[] | undefined;
|
|
1828
1855
|
model?: string | undefined;
|
|
@@ -2022,6 +2049,12 @@ declare const UserSchema: yup.ObjectSchema<{
|
|
|
2022
2049
|
marketingConsent: {
|
|
2023
2050
|
subscribed: boolean;
|
|
2024
2051
|
};
|
|
2052
|
+
notificationPrefs: {
|
|
2053
|
+
groupActivity: boolean;
|
|
2054
|
+
jobActivity: boolean;
|
|
2055
|
+
applicationUpdates: boolean;
|
|
2056
|
+
productUpdates: boolean;
|
|
2057
|
+
};
|
|
2025
2058
|
embedding: {
|
|
2026
2059
|
vector: undefined;
|
|
2027
2060
|
model: undefined;
|
|
@@ -2910,4 +2943,4 @@ declare const StudentCompletenessSchema: yup.ObjectSchema<{
|
|
|
2910
2943
|
};
|
|
2911
2944
|
}, "">;
|
|
2912
2945
|
|
|
2913
|
-
export { AnswerChoiceType, ApplicationReceivePreference, CampaignSchema, CampaignStatus, ChoiceQuestionSchema, Common, CompensationType, CompletenessScoreSchema, ContactTypes, CoordinatorPageLinkSchema, DISPLAY_DATE_FORMAT, DISPLAY_DATE_FORMAT_SHORT, DateStringSchema, DbDefaultSchema, DefaultPaginatedResponse, DefaultPaginationOptions, DefaultUserRoles, DurationSchema, EMPTY_STRING, EducationLevel, EducationSchema, EmployeeCount, EmploymentType, ExperienceLevel, FEEDBACK_MESSAGE_MAX, FeedbackSchema, FeedbackStatus, FeedbackType, GeneraDetailFields, GroupManagedBy, GroupMembershipSchema, GroupMembershipStatus, GroupSchema, GroupStatus, GroupTranslationSchema, GroupVisibility, InputQuestionSchema, JOB_TAXONOMY, JobAlertFrequency, JobCategory, JobIndustry, JobSchema, JobSearchUrgency, JobStatus, JobSubCategory, ListFilterSchema, LocationSchema, MIN_SALARY_LOWER_BOUND, MIN_SALARY_UPPER_BOUND, MailingListSchema, PREFILL_MIRRORED_KEYS, PRIVATE_PROFILE_FIELDS, PageSchema, PageStatus, PageType, type PaginatedResponse, PaginationSchema, PostSchema, PostStatus, type PrefillMirroredKey, type PrivateProfileField, ProficiencyLevel, QuestionSchema, QuestionType, ReadAndAcknowledgeQuestionSchema, RecruiterPageLinkSchema, ReferralSource, ReportReason, ReportSchema, ResourceType, SITEMAP_FORMAT, SYSTEM_DATE_FORMAT, SkillSchema, SocialAccount, SocialAccountSchema, StudentCompletenessSchema, StudyType, SupportedAnswerChoiceTypes, SupportedApplicationReceivePreferences, SupportedCampaignStatuses, SupportedCompensationTypes, SupportedContactTypes, SupportedEducationLevels, SupportedEmployeeCounts, SupportedEmploymentTypes, SupportedExperienceLevels, SupportedFeedbackStatuses, SupportedFeedbackTypes, SupportedJobAlertFrequencies, SupportedJobCategories, SupportedJobIndustries, SupportedJobSearchUrgencies, SupportedJobStatuses, SupportedJobSubCategories, SupportedPageStatuses, SupportedPageTypes, SupportedPostStatuses, SupportedProficiencyLevels, SupportedQuestionTypes, SupportedReferralSources, SupportedReportReasons, SupportedResourceTypes, SupportedSalaryCurrencies, type SupportedSalaryCurrency, SupportedSocialAccounts, SupportedStudyTypes, SupportedUserProfileVisibilities, SupportedUserRoles, SupportedUserStatuses, SupportedWorkModes, TAXONOMY_LABELS, type TChoiceQuestionSchema, type TDurationSchema, type TInputQuestionSchema, type TJobSchema, type TPostSchema, type TQuestionSchema, type TReadAndAcknowledgeQuestionSchema, type TUserIdAndCreatedAtSchema, TermsAcceptedSchema, UserAdditionalInfoSchema, UserCertificationSchema, UserCompletenessSchema, UserCoordinatorProfileSchema, UserDetailType, UserGeneralDetailSchema, UserIdAndCreatedAtSchema, UserInterestSchema, UserJobPreferencesSchema, UserLanguageSchema, type UserProfileOverview, UserProfileVisibility, UserProjectSchema, UserRecruiterProfileSchema, UserRole, UserSchema, UserSkillSchema, UserStatus, WorkExperienceSchema, WorkMode, categoryOfIndustry, categoryOfSubCategory, dateString, deriveIndustry, getSchemaByQuestion, industriesOfCategory, industryOfSubCategory, subCategoriesOfIndustry };
|
|
2946
|
+
export { AnswerChoiceType, ApplicationReceivePreference, CampaignSchema, CampaignStatus, ChoiceQuestionSchema, Common, CompensationType, CompletenessScoreSchema, ContactTypes, CoordinatorPageLinkSchema, DISPLAY_DATE_FORMAT, DISPLAY_DATE_FORMAT_SHORT, DateStringSchema, DbDefaultSchema, DefaultPaginatedResponse, DefaultPaginationOptions, DefaultUserRoles, DurationSchema, EMPTY_STRING, EducationLevel, EducationSchema, EmployeeCount, EmploymentType, ExperienceLevel, FEEDBACK_MESSAGE_MAX, FeedbackSchema, FeedbackStatus, FeedbackType, GeneraDetailFields, GroupManagedBy, GroupMembershipSchema, GroupMembershipStatus, GroupSchema, GroupStatus, GroupTranslationSchema, GroupVisibility, InputQuestionSchema, JOB_TAXONOMY, JobAlertFrequency, JobCategory, JobIndustry, JobSchema, JobSearchUrgency, JobStatus, JobSubCategory, ListFilterSchema, LocationSchema, MIN_SALARY_LOWER_BOUND, MIN_SALARY_UPPER_BOUND, MailingListSchema, NotificationChannel, PREFILL_MIRRORED_KEYS, PRIVATE_PROFILE_FIELDS, PageSchema, PageStatus, PageType, type PaginatedResponse, PaginationSchema, PostSchema, PostStatus, type PrefillMirroredKey, type PrivateProfileField, ProficiencyLevel, QuestionSchema, QuestionType, ReadAndAcknowledgeQuestionSchema, RecruiterPageLinkSchema, ReferralSource, ReportReason, ReportSchema, ResourceType, SITEMAP_FORMAT, SYSTEM_DATE_FORMAT, SkillSchema, SocialAccount, SocialAccountSchema, StudentCompletenessSchema, StudyType, SupportedAnswerChoiceTypes, SupportedApplicationReceivePreferences, SupportedCampaignStatuses, SupportedCompensationTypes, SupportedContactTypes, SupportedEducationLevels, SupportedEmployeeCounts, SupportedEmploymentTypes, SupportedExperienceLevels, SupportedFeedbackStatuses, SupportedFeedbackTypes, SupportedJobAlertFrequencies, SupportedJobCategories, SupportedJobIndustries, SupportedJobSearchUrgencies, SupportedJobStatuses, SupportedJobSubCategories, SupportedNotificationChannels, SupportedPageStatuses, SupportedPageTypes, SupportedPostStatuses, SupportedProficiencyLevels, SupportedQuestionTypes, SupportedReferralSources, SupportedReportReasons, SupportedResourceTypes, SupportedSalaryCurrencies, type SupportedSalaryCurrency, SupportedSocialAccounts, SupportedStudyTypes, SupportedUserProfileVisibilities, SupportedUserRoles, SupportedUserStatuses, SupportedWorkModes, TAXONOMY_LABELS, type TChoiceQuestionSchema, type TDurationSchema, type TInputQuestionSchema, type TJobSchema, type TPostSchema, type TQuestionSchema, type TReadAndAcknowledgeQuestionSchema, type TUserIdAndCreatedAtSchema, TermsAcceptedSchema, UserAdditionalInfoSchema, UserCertificationSchema, UserCompletenessSchema, UserCoordinatorProfileSchema, UserDetailType, UserGeneralDetailSchema, UserIdAndCreatedAtSchema, UserInterestSchema, UserJobPreferencesSchema, UserLanguageSchema, type UserProfileOverview, UserProfileVisibility, UserProjectSchema, UserRecruiterProfileSchema, UserRole, UserSchema, UserSkillSchema, UserStatus, WorkExperienceSchema, WorkMode, categoryOfIndustry, categoryOfSubCategory, dateString, deriveIndustry, getSchemaByQuestion, industriesOfCategory, industryOfSubCategory, subCategoriesOfIndustry };
|
package/dist/index.js
CHANGED
|
@@ -1985,6 +1985,14 @@ var JobAlertFrequency = /* @__PURE__ */ ((JobAlertFrequency2) => {
|
|
|
1985
1985
|
return JobAlertFrequency2;
|
|
1986
1986
|
})(JobAlertFrequency || {});
|
|
1987
1987
|
var SupportedJobAlertFrequencies = Object.values(JobAlertFrequency);
|
|
1988
|
+
var NotificationChannel = /* @__PURE__ */ ((NotificationChannel2) => {
|
|
1989
|
+
NotificationChannel2["GroupActivity"] = "groupActivity";
|
|
1990
|
+
NotificationChannel2["JobActivity"] = "jobActivity";
|
|
1991
|
+
NotificationChannel2["ApplicationUpdates"] = "applicationUpdates";
|
|
1992
|
+
NotificationChannel2["ProductUpdates"] = "productUpdates";
|
|
1993
|
+
return NotificationChannel2;
|
|
1994
|
+
})(NotificationChannel || {});
|
|
1995
|
+
var SupportedNotificationChannels = Object.values(NotificationChannel);
|
|
1988
1996
|
var SupportedSalaryCurrencies = ["USD", "EUR", "GBP", "SEK", "INR"];
|
|
1989
1997
|
var MIN_SALARY_LOWER_BOUND = 0;
|
|
1990
1998
|
var MIN_SALARY_UPPER_BOUND = 1e6;
|
|
@@ -2510,6 +2518,30 @@ var UserSchema = object33({
|
|
|
2510
2518
|
*/
|
|
2511
2519
|
jobAlertFrequency: string31().oneOf(SupportedJobAlertFrequencies).optional().label("Job alert frequency")
|
|
2512
2520
|
}).default({ subscribed: false }).label("Marketing Consent"),
|
|
2521
|
+
/**
|
|
2522
|
+
* Per-channel toggles for NOTIFICATION email — mail about activity on the
|
|
2523
|
+
* user's own account (a group invite, a job of theirs expiring).
|
|
2524
|
+
*
|
|
2525
|
+
* Deliberately separate from `marketingConsent`, which they must NOT be
|
|
2526
|
+
* collapsed into: the two have different legal footing, which the
|
|
2527
|
+
* email-service footer rules already encode. Notifications are opt-OUT
|
|
2528
|
+
* (default `true`) because a user who declined marketing still needs to hear
|
|
2529
|
+
* that their group invite arrived; marketing stays opt-IN. `productUpdates`
|
|
2530
|
+
* is the exception — it is promotional in character, so it defaults off.
|
|
2531
|
+
*
|
|
2532
|
+
* Transactional mail (magic-link, verification) ignores this object entirely.
|
|
2533
|
+
*/
|
|
2534
|
+
notificationPrefs: object33({
|
|
2535
|
+
groupActivity: boolean15().default(true).label("Group activity email"),
|
|
2536
|
+
jobActivity: boolean15().default(true).label("Job activity email"),
|
|
2537
|
+
applicationUpdates: boolean15().default(true).label("Application update email"),
|
|
2538
|
+
productUpdates: boolean15().default(false).label("Product update email")
|
|
2539
|
+
}).default({
|
|
2540
|
+
groupActivity: true,
|
|
2541
|
+
jobActivity: true,
|
|
2542
|
+
applicationUpdates: true,
|
|
2543
|
+
productUpdates: false
|
|
2544
|
+
}).label("Notification Preferences"),
|
|
2513
2545
|
/**
|
|
2514
2546
|
* Vector embedding of the user's profile for semantic/hybrid search.
|
|
2515
2547
|
* Generated from a structured summary of skills, experience, education, etc.
|
|
@@ -2595,6 +2627,7 @@ export {
|
|
|
2595
2627
|
MIN_SALARY_LOWER_BOUND,
|
|
2596
2628
|
MIN_SALARY_UPPER_BOUND,
|
|
2597
2629
|
MailingListSchema,
|
|
2630
|
+
NotificationChannel,
|
|
2598
2631
|
PREFILL_MIRRORED_KEYS,
|
|
2599
2632
|
PRIVATE_PROFILE_FIELDS,
|
|
2600
2633
|
PageSchema,
|
|
@@ -2636,6 +2669,7 @@ export {
|
|
|
2636
2669
|
SupportedJobSearchUrgencies,
|
|
2637
2670
|
SupportedJobStatuses,
|
|
2638
2671
|
SupportedJobSubCategories,
|
|
2672
|
+
SupportedNotificationChannels,
|
|
2639
2673
|
SupportedPageStatuses,
|
|
2640
2674
|
SupportedPageTypes,
|
|
2641
2675
|
SupportedPostStatuses,
|
package/package.json
CHANGED
|
@@ -97,6 +97,29 @@ export enum JobAlertFrequency {
|
|
|
97
97
|
|
|
98
98
|
export const SupportedJobAlertFrequencies = Object.values(JobAlertFrequency);
|
|
99
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Channels of NOTIFICATION email — mail about activity on the user's own
|
|
102
|
+
* account (a group invite, a job of theirs expiring). Distinct from marketing:
|
|
103
|
+
* notifications are opt-OUT (default on, see `notificationPrefs`), marketing is
|
|
104
|
+
* opt-IN (`marketingConsent.subscribed`). Transactional mail (magic-link,
|
|
105
|
+
* verification) is governed by neither and always sends.
|
|
106
|
+
*
|
|
107
|
+
* Deliberately coarse: four channels a user will actually reason about, rather
|
|
108
|
+
* than one toggle per email template.
|
|
109
|
+
*/
|
|
110
|
+
export enum NotificationChannel {
|
|
111
|
+
/** Group invites, join requests, membership approved/rejected. */
|
|
112
|
+
GroupActivity = "groupActivity",
|
|
113
|
+
/** Activity on jobs the user posted, e.g. a listing expiring. */
|
|
114
|
+
JobActivity = "jobActivity",
|
|
115
|
+
/** Status changes on jobs the user applied to. */
|
|
116
|
+
ApplicationUpdates = "applicationUpdates",
|
|
117
|
+
/** Product announcements and feature news. */
|
|
118
|
+
ProductUpdates = "productUpdates",
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export const SupportedNotificationChannels = Object.values(NotificationChannel);
|
|
122
|
+
|
|
100
123
|
/** ISO-4217 currency codes accepted for the salary preference (extend as needed). */
|
|
101
124
|
export const SupportedSalaryCurrencies = ["USD", "EUR", "GBP", "SEK", "INR"] as const;
|
|
102
125
|
export type SupportedSalaryCurrency = (typeof SupportedSalaryCurrencies)[number];
|
package/src/user/user.schema.ts
CHANGED
|
@@ -141,6 +141,33 @@ export const UserSchema = object({
|
|
|
141
141
|
.default({ subscribed: false })
|
|
142
142
|
.label("Marketing Consent"),
|
|
143
143
|
|
|
144
|
+
/**
|
|
145
|
+
* Per-channel toggles for NOTIFICATION email — mail about activity on the
|
|
146
|
+
* user's own account (a group invite, a job of theirs expiring).
|
|
147
|
+
*
|
|
148
|
+
* Deliberately separate from `marketingConsent`, which they must NOT be
|
|
149
|
+
* collapsed into: the two have different legal footing, which the
|
|
150
|
+
* email-service footer rules already encode. Notifications are opt-OUT
|
|
151
|
+
* (default `true`) because a user who declined marketing still needs to hear
|
|
152
|
+
* that their group invite arrived; marketing stays opt-IN. `productUpdates`
|
|
153
|
+
* is the exception — it is promotional in character, so it defaults off.
|
|
154
|
+
*
|
|
155
|
+
* Transactional mail (magic-link, verification) ignores this object entirely.
|
|
156
|
+
*/
|
|
157
|
+
notificationPrefs: object({
|
|
158
|
+
groupActivity: boolean().default(true).label("Group activity email"),
|
|
159
|
+
jobActivity: boolean().default(true).label("Job activity email"),
|
|
160
|
+
applicationUpdates: boolean().default(true).label("Application update email"),
|
|
161
|
+
productUpdates: boolean().default(false).label("Product update email"),
|
|
162
|
+
})
|
|
163
|
+
.default({
|
|
164
|
+
groupActivity: true,
|
|
165
|
+
jobActivity: true,
|
|
166
|
+
applicationUpdates: true,
|
|
167
|
+
productUpdates: false,
|
|
168
|
+
})
|
|
169
|
+
.label("Notification Preferences"),
|
|
170
|
+
|
|
144
171
|
/**
|
|
145
172
|
* Vector embedding of the user's profile for semantic/hybrid search.
|
|
146
173
|
* Generated from a structured summary of skills, experience, education, etc.
|