@thejob/schema 2.5.0 → 2.6.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/dist/index.cjs CHANGED
@@ -32,10 +32,14 @@ var index_exports = {};
32
32
  __export(index_exports, {
33
33
  AnswerChoiceType: () => AnswerChoiceType,
34
34
  ApplicationReceivePreference: () => ApplicationReceivePreference,
35
+ AuditFilterSchema: () => AuditFilterSchema,
36
+ AuditSchema: () => AuditSchema,
35
37
  BillingPeriod: () => BillingPeriod,
36
38
  BillingSubscriptionSchema: () => BillingSubscriptionSchema,
37
39
  BillingTransactionSchema: () => BillingTransactionSchema,
38
40
  CAMPAIGN_MAX_RECIPIENTS_CEILING: () => CAMPAIGN_MAX_RECIPIENTS_CEILING,
41
+ CONCEPT_ID_PATTERN: () => CONCEPT_ID_PATTERN,
42
+ CONCEPT_TYPE_PATTERN: () => CONCEPT_TYPE_PATTERN,
39
43
  CONSUME_MAX_UNITS: () => CONSUME_MAX_UNITS,
40
44
  CampaignDataSourceSchema: () => CampaignDataSourceSchema,
41
45
  CampaignEndKind: () => CampaignEndKind,
@@ -51,6 +55,11 @@ __export(index_exports, {
51
55
  Common: () => Common,
52
56
  CompensationType: () => CompensationType,
53
57
  CompletenessScoreSchema: () => CompletenessScoreSchema,
58
+ ConceptFilterSchema: () => ConceptFilterSchema,
59
+ ConceptMembershipSchema: () => ConceptMembershipSchema,
60
+ ConceptProposalFilterSchema: () => ConceptProposalFilterSchema,
61
+ ConceptProposalSchema: () => ConceptProposalSchema,
62
+ ConceptSchema: () => ConceptSchema,
54
63
  ContactTypes: () => ContactTypes,
55
64
  CoordinatorPageLinkSchema: () => CoordinatorPageLinkSchema,
56
65
  CountryFilterSchema: () => CountryFilterSchema,
@@ -116,6 +125,7 @@ __export(index_exports, {
116
125
  MailingListFilterSchema: () => MailingListFilterSchema,
117
126
  MailingListSchema: () => MailingListSchema,
118
127
  MoneySchema: () => MoneySchema,
128
+ NormalizeContextSchema: () => NormalizeContextSchema,
119
129
  NotificationType: () => NotificationType,
120
130
  OccurrenceStatus: () => OccurrenceStatus,
121
131
  PREFILL_MIRRORED_KEYS: () => PREFILL_MIRRORED_KEYS,
@@ -135,6 +145,8 @@ __export(index_exports, {
135
145
  PostSchema: () => PostSchema,
136
146
  PostStatus: () => PostStatus,
137
147
  ProficiencyLevel: () => ProficiencyLevel,
148
+ ProposalCandidateSchema: () => ProposalCandidateSchema,
149
+ ProposalMessageSchema: () => ProposalMessageSchema,
138
150
  PushSubscriptionSchema: () => PushSubscriptionSchema,
139
151
  QuestionSchema: () => QuestionSchema,
140
152
  QuestionType: () => QuestionType,
@@ -142,9 +154,15 @@ __export(index_exports, {
142
154
  ReadAndAcknowledgeQuestionSchema: () => ReadAndAcknowledgeQuestionSchema,
143
155
  RecruiterPageLinkSchema: () => RecruiterPageLinkSchema,
144
156
  ReferralSource: () => ReferralSource,
157
+ ReleaseFilterSchema: () => ReleaseFilterSchema,
158
+ ReleaseSchema: () => ReleaseSchema,
145
159
  ReportReason: () => ReportReason,
146
160
  ReportSchema: () => ReportSchema,
161
+ ResolverSettingsSchema: () => ResolverSettingsSchema,
162
+ ResolverVerificationSchema: () => ResolverVerificationSchema,
147
163
  ResourceType: () => ResourceType,
164
+ SCHEDULE_MAX_HOURS: () => SCHEDULE_MAX_HOURS,
165
+ SCHEDULE_MIN_HOURS: () => SCHEDULE_MIN_HOURS,
148
166
  SITEMAP_FORMAT: () => SITEMAP_FORMAT,
149
167
  SYSTEM_DATE_FORMAT: () => SYSTEM_DATE_FORMAT,
150
168
  SavedSearchSchema: () => SavedSearchSchema,
@@ -159,14 +177,17 @@ __export(index_exports, {
159
177
  StudentCompletenessSchema: () => StudentCompletenessSchema,
160
178
  StudyType: () => StudyType,
161
179
  SubscriptionStatus: () => SubscriptionStatus,
180
+ SuggestedHomeSchema: () => SuggestedHomeSchema,
162
181
  SupportedAnswerChoiceTypes: () => SupportedAnswerChoiceTypes,
163
182
  SupportedApplicationReceivePreferences: () => SupportedApplicationReceivePreferences,
183
+ SupportedAuditStatuses: () => SupportedAuditStatuses,
164
184
  SupportedBillingPeriods: () => SupportedBillingPeriods,
165
185
  SupportedCampaignEndKinds: () => SupportedCampaignEndKinds,
166
186
  SupportedCampaignIntervalUnits: () => SupportedCampaignIntervalUnits,
167
187
  SupportedCampaignStatuses: () => SupportedCampaignStatuses,
168
188
  SupportedCampaignTriggerKinds: () => SupportedCampaignTriggerKinds,
169
189
  SupportedCompensationTypes: () => SupportedCompensationTypes,
190
+ SupportedConceptSources: () => SupportedConceptSources,
170
191
  SupportedContactTypes: () => SupportedContactTypes,
171
192
  SupportedEducationLevels: () => SupportedEducationLevels,
172
193
  SupportedEmployeeCounts: () => SupportedEmployeeCounts,
@@ -191,6 +212,7 @@ __export(index_exports, {
191
212
  SupportedJobSearchUrgencies: () => SupportedJobSearchUrgencies,
192
213
  SupportedJobStatuses: () => SupportedJobStatuses,
193
214
  SupportedJobSubCategories: () => SupportedJobSubCategories,
215
+ SupportedMatchTypes: () => SupportedMatchTypes,
194
216
  SupportedNotificationTypes: () => SupportedNotificationTypes,
195
217
  SupportedOccurrenceStatuses: () => SupportedOccurrenceStatuses,
196
218
  SupportedPaddleEnvironments: () => SupportedPaddleEnvironments,
@@ -200,11 +222,19 @@ __export(index_exports, {
200
222
  SupportedPlanKinds: () => SupportedPlanKinds,
201
223
  SupportedPlanStatuses: () => SupportedPlanStatuses,
202
224
  SupportedPostStatuses: () => SupportedPostStatuses,
225
+ SupportedPrefilterRules: () => SupportedPrefilterRules,
203
226
  SupportedProficiencyLevels: () => SupportedProficiencyLevels,
227
+ SupportedProposalFilters: () => SupportedProposalFilters,
228
+ SupportedProposalKinds: () => SupportedProposalKinds,
229
+ SupportedProposalMessageRoles: () => SupportedProposalMessageRoles,
230
+ SupportedProposalStatuses: () => SupportedProposalStatuses,
204
231
  SupportedQuestionTypes: () => SupportedQuestionTypes,
205
232
  SupportedQuotaPeriods: () => SupportedQuotaPeriods,
206
233
  SupportedReferralSources: () => SupportedReferralSources,
234
+ SupportedReleaseKinds: () => SupportedReleaseKinds,
235
+ SupportedReleaseStatuses: () => SupportedReleaseStatuses,
207
236
  SupportedReportReasons: () => SupportedReportReasons,
237
+ SupportedResolverVerdicts: () => SupportedResolverVerdicts,
208
238
  SupportedResourceTypes: () => SupportedResourceTypes,
209
239
  SupportedSalaryCurrencies: () => SupportedSalaryCurrencies,
210
240
  SupportedSavedSearchStatuses: () => SupportedSavedSearchStatuses,
@@ -212,19 +242,31 @@ __export(index_exports, {
212
242
  SupportedSocialAccounts: () => SupportedSocialAccounts,
213
243
  SupportedStudyTypes: () => SupportedStudyTypes,
214
244
  SupportedSubscriptionStatuses: () => SupportedSubscriptionStatuses,
245
+ SupportedTaxonomyJobKinds: () => SupportedTaxonomyJobKinds,
246
+ SupportedTaxonomyJobStates: () => SupportedTaxonomyJobStates,
247
+ SupportedTaxonomyNodeKinds: () => SupportedTaxonomyNodeKinds,
248
+ SupportedTaxonomySources: () => SupportedTaxonomySources,
215
249
  SupportedTemplateVariableBindingKinds: () => SupportedTemplateVariableBindingKinds,
216
250
  SupportedTransactionStatuses: () => SupportedTransactionStatuses,
251
+ SupportedUnmatchedReasons: () => SupportedUnmatchedReasons,
252
+ SupportedUnmatchedResolutions: () => SupportedUnmatchedResolutions,
217
253
  SupportedUserProfileVisibilities: () => SupportedUserProfileVisibilities,
218
254
  SupportedUserRoles: () => SupportedUserRoles,
219
255
  SupportedUserStatuses: () => SupportedUserStatuses,
220
256
  SupportedWorkModes: () => SupportedWorkModes,
221
257
  TAXONOMY_LABELS: () => TAXONOMY_LABELS,
258
+ TAXONOMY_NODE_ID_PATTERN: () => TAXONOMY_NODE_ID_PATTERN,
259
+ TaxonomyNodeFilterSchema: () => TaxonomyNodeFilterSchema,
260
+ TaxonomyNodeSchema: () => TaxonomyNodeSchema,
261
+ TaxonomyScheduleSchema: () => TaxonomyScheduleSchema,
222
262
  TemplateVariableBindingKind: () => TemplateVariableBindingKind,
223
263
  TemplateVariableBindingSchema: () => TemplateVariableBindingSchema,
224
264
  TerminalCampaignStatuses: () => TerminalCampaignStatuses,
225
265
  TerminalGeoSyncStatuses: () => TerminalGeoSyncStatuses,
226
266
  TermsAcceptedSchema: () => TermsAcceptedSchema,
227
267
  TransactionStatus: () => TransactionStatus,
268
+ UnmatchedFilterSchema: () => UnmatchedFilterSchema,
269
+ UnmatchedTermSchema: () => UnmatchedTermSchema,
228
270
  UserAdditionalInfoSchema: () => UserAdditionalInfoSchema,
229
271
  UserCertificationSchema: () => UserCertificationSchema,
230
272
  UserCompletenessSchema: () => UserCompletenessSchema,
@@ -243,6 +285,9 @@ __export(index_exports, {
243
285
  UserSchema: () => UserSchema,
244
286
  UserSkillSchema: () => UserSkillSchema,
245
287
  UserStatus: () => UserStatus,
288
+ VOCABULARY_ID_PATTERN: () => VOCABULARY_ID_PATTERN,
289
+ VocabularySchema: () => VocabularySchema,
290
+ VocabularyTypeSchema: () => VocabularyTypeSchema,
246
291
  WorkExperienceSchema: () => WorkExperienceSchema,
247
292
  WorkMode: () => WorkMode,
248
293
  canTransitionCampaign: () => canTransitionCampaign,
@@ -4096,55 +4141,443 @@ var EntitlementConsumeSchema = (0, import_yup40.object)({
4096
4141
  idempotencyKey: (0, import_yup40.string)().trim().required().min(8).max(128).label("Idempotency Key")
4097
4142
  }).label("Entitlement Consume");
4098
4143
 
4144
+ // src/taxonomy/taxonomy.schema.ts
4145
+ var import_yup41 = require("yup");
4146
+
4147
+ // src/taxonomy/taxonomy.constant.ts
4148
+ var SupportedConceptSources = ["seed", "manual", "import"];
4149
+ var SupportedTaxonomySources = ["seed", "manual"];
4150
+ var SupportedTaxonomyNodeKinds = ["category", "subcategory", "group"];
4151
+ var SupportedPrefilterRules = [
4152
+ "spoken_language",
4153
+ "no_letters",
4154
+ "url_or_email",
4155
+ "fragment"
4156
+ ];
4157
+ var SupportedUnmatchedResolutions = ["pending", "added", "rejected"];
4158
+ var SupportedUnmatchedReasons = ["ambiguous"];
4159
+ var SupportedProposalKinds = ["concept", "alias", "placement"];
4160
+ var SupportedProposalFilters = [...SupportedProposalKinds, "uncategorized"];
4161
+ var SupportedProposalStatuses = ["draft", "approved", "discarded"];
4162
+ var SupportedProposalMessageRoles = ["operator", "model"];
4163
+ var SupportedResolverVerdicts = [
4164
+ "same",
4165
+ "narrower",
4166
+ "broader",
4167
+ "related",
4168
+ "new_concept",
4169
+ "out_of_scope"
4170
+ ];
4171
+ var SupportedAuditStatuses = ["pending", "correct", "wrong"];
4172
+ var SupportedReleaseKinds = ["seed", "manual", "review", "auto"];
4173
+ var SupportedReleaseStatuses = ["open", "rolled_back"];
4174
+ var SupportedMatchTypes = ["exact", "canonical", "fuzzy", "none"];
4175
+ var SupportedTaxonomyJobKinds = [
4176
+ "describe-concepts",
4177
+ "retype-concepts",
4178
+ "generate-aliases",
4179
+ "alias-backfill",
4180
+ "close-gaps",
4181
+ "propose-placements",
4182
+ "place-unplaced",
4183
+ "calibrate-placement",
4184
+ "reseed",
4185
+ "reindex",
4186
+ "calibrate-resolver",
4187
+ "golden",
4188
+ "resolve-backlog"
4189
+ ];
4190
+ var SupportedTaxonomyJobStates = ["running", "succeeded", "failed", "cancelled"];
4191
+ var CONCEPT_ID_PATTERN = /^[a-z][a-z0-9-]*_[a-z0-9-]+$/;
4192
+ var VOCABULARY_ID_PATTERN = /^[a-z][a-z0-9-]{0,31}$/;
4193
+ var TAXONOMY_NODE_ID_PATTERN = /^[A-Za-z0-9_]{1,64}$/;
4194
+ var CONCEPT_TYPE_PATTERN = /^[a-z][a-z0-9_]{0,63}$/;
4195
+ var SCHEDULE_MIN_HOURS = 1;
4196
+ var SCHEDULE_MAX_HOURS = 24 * 30;
4197
+
4198
+ // src/taxonomy/taxonomy.schema.ts
4199
+ var conceptId = () => (0, import_yup41.string)().matches(CONCEPT_ID_PATTERN, "conceptId must look like <vocabulary>_<slug>");
4200
+ var vocabularyId = () => (0, import_yup41.string)().matches(VOCABULARY_ID_PATTERN, "vocabulary must match [a-z][a-z0-9-]{0,31}");
4201
+ var nodeId = () => (0, import_yup41.string)().matches(TAXONOMY_NODE_ID_PATTERN, "node ids look like CAT_01_TECH");
4202
+ var strings = () => (0, import_yup41.array)((0, import_yup41.string)().trim().min(1).required());
4203
+ var VocabularyTypeSchema = (0, import_yup41.object)({
4204
+ id: (0, import_yup41.string)().matches(CONCEPT_TYPE_PATTERN, "type ids match [a-z][a-z0-9_]*").required().label("Type ID"),
4205
+ /** Shown to the model when it classifies a concept; include examples. */
4206
+ description: (0, import_yup41.string)().defined().label("Description")
4207
+ }).label("Vocabulary Type");
4208
+ var VocabularySchema = (0, import_yup41.object)({
4209
+ vocabularyId: vocabularyId().required().label("Vocabulary ID"),
4210
+ name: (0, import_yup41.string)().trim().min(1).required().label("Name"),
4211
+ /** What one concept is called in prompts and messages: "skill", "role". */
4212
+ noun: (0, import_yup41.string)().trim().min(1).required().label("Noun"),
4213
+ nounPlural: (0, import_yup41.string)().trim().min(1).required().label("Noun (plural)"),
4214
+ /** What belongs in this vocabulary, for prompts. */
4215
+ description: (0, import_yup41.string)().trim().min(1).required().label("Description"),
4216
+ /** Where its terms are written, for the "swap it in" test: "a job posting". */
4217
+ appearsIn: (0, import_yup41.string)().trim().min(1).required().label("Appears In"),
4218
+ /** Things that are NOT concepts of this vocabulary, for prompts. */
4219
+ outOfScope: (0, import_yup41.string)().trim().min(1).required().label("Out of Scope"),
4220
+ types: (0, import_yup41.array)(VocabularyTypeSchema.required()).min(1).required().test(
4221
+ "unique-type-ids",
4222
+ "type ids must be unique",
4223
+ (types) => !types || new Set(types.map((t) => t.id)).size === types.length
4224
+ ).label("Types"),
4225
+ /** The type a concept gets when nothing more specific is known. One of `types`. */
4226
+ defaultType: (0, import_yup41.string)().required().test("default-type-listed", "defaultType must be one of the type ids", function(value) {
4227
+ const types = this.parent.types ?? [];
4228
+ return types.some((t) => t.id === value);
4229
+ }).label("Default Type"),
4230
+ prefilter: (0, import_yup41.array)((0, import_yup41.string)().oneOf(SupportedPrefilterRules).required()).default([]).label("Prefilter"),
4231
+ /**
4232
+ * Words that qualify a term without changing what it names ("fluent",
4233
+ * "native"), dropped from its canonical lookup form in THIS vocabulary only.
4234
+ */
4235
+ qualifiers: strings().optional().label("Qualifiers"),
4236
+ /** Extra instructions per model task; each is optional. */
4237
+ guidance: (0, import_yup41.object)({
4238
+ describe: (0, import_yup41.string)().optional(),
4239
+ classify: (0, import_yup41.string)().optional(),
4240
+ aliases: (0, import_yup41.string)().optional(),
4241
+ verify: (0, import_yup41.string)().optional(),
4242
+ place: (0, import_yup41.string)().optional()
4243
+ }).label("Guidance"),
4244
+ source: (0, import_yup41.string)().oneOf(SupportedTaxonomySources).required().label("Source"),
4245
+ createdAt: (0, import_yup41.number)().required().label("Created At"),
4246
+ updatedAt: (0, import_yup41.number)().required().label("Updated At")
4247
+ }).label("Vocabulary");
4248
+ var TaxonomyNodeSchema = (0, import_yup41.object)({
4249
+ nodeId: nodeId().required().label("Node ID"),
4250
+ vocabulary: vocabularyId().required().label("Vocabulary"),
4251
+ kind: (0, import_yup41.string)().oneOf(SupportedTaxonomyNodeKinds).required().label("Kind"),
4252
+ name: (0, import_yup41.string)().trim().min(1).required().label("Name"),
4253
+ /** Groups carry a description; categories and subcategories usually do not. */
4254
+ description: (0, import_yup41.string)().optional().label("Description"),
4255
+ aliases: strings().default([]).label("Aliases"),
4256
+ /** null for categories (the roots). */
4257
+ parentId: (0, import_yup41.string)().nullable().defined().label("Parent ID"),
4258
+ /** Ancestor ids from the root down to and including this node. */
4259
+ path: (0, import_yup41.array)((0, import_yup41.string)().required()).default([]).label("Path"),
4260
+ source: (0, import_yup41.string)().oneOf(SupportedTaxonomySources).optional().label("Source"),
4261
+ createdAt: (0, import_yup41.number)().required().label("Created At"),
4262
+ updatedAt: (0, import_yup41.number)().required().label("Updated At")
4263
+ }).label("Taxonomy Node");
4264
+ var ConceptMembershipSchema = (0, import_yup41.object)({
4265
+ categoryId: (0, import_yup41.string)().required().label("Category ID"),
4266
+ categoryName: (0, import_yup41.string)().required().label("Category Name"),
4267
+ subcategoryId: (0, import_yup41.string)().required().label("Subcategory ID"),
4268
+ subcategoryName: (0, import_yup41.string)().required().label("Subcategory Name"),
4269
+ groupId: (0, import_yup41.string)().required().label("Group ID"),
4270
+ groupName: (0, import_yup41.string)().required().label("Group Name"),
4271
+ /** The source record this membership came from; '' when written by hand. */
4272
+ sourceId: (0, import_yup41.string)().default("").label("Source ID")
4273
+ }).label("Concept Membership");
4274
+ var ConceptSchema = (0, import_yup41.object)({
4275
+ /** `<vocabulary>_<slug>`, e.g. `skills_power-bi`. Primary key. */
4276
+ conceptId: conceptId().required().label("Concept ID"),
4277
+ vocabulary: vocabularyId().required().label("Vocabulary"),
4278
+ name: (0, import_yup41.string)().trim().min(1).max(200).required().label("Name"),
4279
+ /** One of the vocabulary's type ids; checked against the vocabulary by the service. */
4280
+ type: (0, import_yup41.string)().trim().matches(CONCEPT_TYPE_PATTERN, "type must be a type id").required().label("Type"),
4281
+ description: (0, import_yup41.string)().trim().max(2e3).default("").label("Description"),
4282
+ aliases: strings().default([]).label("Aliases"),
4283
+ memberships: (0, import_yup41.array)(ConceptMembershipSchema.required()).default([]).label("Memberships"),
4284
+ /** Always concepts of the same vocabulary. */
4285
+ relatedConceptIds: strings().default([]).label("Related Concepts"),
4286
+ source: (0, import_yup41.string)().oneOf(SupportedConceptSources).required().label("Source"),
4287
+ createdAt: (0, import_yup41.number)().required().label("Created At"),
4288
+ updatedAt: (0, import_yup41.number)().required().label("Updated At"),
4289
+ /** Resume marker of `retype-concepts`: set once the type was examined. */
4290
+ retypedAt: (0, import_yup41.number)().optional().label("Retyped At"),
4291
+ /** Resume marker of `generate-aliases`: set even when no alias was added. */
4292
+ aliasedAt: (0, import_yup41.number)().optional().label("Aliased At"),
4293
+ /** Set while `description` is a stand-in; removed once a real one is written. */
4294
+ descriptionPending: (0, import_yup41.boolean)().isTrue().optional().label("Description Pending")
4295
+ }).label("Concept");
4296
+ var UnmatchedTermSchema = (0, import_yup41.object)({
4297
+ vocabulary: vocabularyId().required().label("Vocabulary"),
4298
+ /** The raw input as first received. */
4299
+ term: (0, import_yup41.string)().required().label("Term"),
4300
+ /** The dedupe key, so "React JS" and "react.js" share a row. */
4301
+ normalizedTerm: (0, import_yup41.string)().required().label("Normalized Term"),
4302
+ count: (0, import_yup41.number)().integer().min(0).required().label("Count"),
4303
+ firstSeenAt: (0, import_yup41.number)().required().label("First Seen At"),
4304
+ lastSeenAt: (0, import_yup41.number)().required().label("Last Seen At"),
4305
+ /** Which callers sent it, capped. */
4306
+ sources: (0, import_yup41.array)(
4307
+ (0, import_yup41.object)({
4308
+ service: (0, import_yup41.string)().required(),
4309
+ context: (0, import_yup41.string)().optional()
4310
+ }).required()
4311
+ ).default([]).label("Sources"),
4312
+ resolution: (0, import_yup41.string)().oneOf(SupportedUnmatchedResolutions).required().label("Resolution"),
4313
+ resolvedConceptId: (0, import_yup41.string)().optional().label("Resolved Concept"),
4314
+ /** `ambiguous`: the concept exists; the caller gave no context that picked one. */
4315
+ reason: (0, import_yup41.string)().oneOf(SupportedUnmatchedReasons).optional().label("Reason"),
4316
+ /** The concepts an ambiguous term could mean. */
4317
+ candidates: (0, import_yup41.array)((0, import_yup41.string)().required()).optional().label("Candidates"),
4318
+ /** Who rejected it when it was not a human: `prefilter:<rule>` or `model`. */
4319
+ rejectedBy: (0, import_yup41.string)().optional().label("Rejected By")
4320
+ }).label("Unmatched Term");
4321
+ var ProposalCandidateSchema = (0, import_yup41.object)({
4322
+ groupId: (0, import_yup41.string)().required(),
4323
+ groupName: (0, import_yup41.string)().required(),
4324
+ subcategoryId: (0, import_yup41.string)().required(),
4325
+ subcategoryName: (0, import_yup41.string)().required(),
4326
+ categoryId: (0, import_yup41.string)().required(),
4327
+ categoryName: (0, import_yup41.string)().required(),
4328
+ score: (0, import_yup41.number)().required(),
4329
+ nearestMembers: (0, import_yup41.array)((0, import_yup41.string)().required()).default([])
4330
+ }).label("Proposal Candidate");
4331
+ var ProposalMessageSchema = (0, import_yup41.object)({
4332
+ role: (0, import_yup41.string)().oneOf(SupportedProposalMessageRoles).required(),
4333
+ /** The operator's instruction, or the model's note on what it changed and why. */
4334
+ content: (0, import_yup41.string)().defined(),
4335
+ /** Which model answered. Absent on operator turns. */
4336
+ model: (0, import_yup41.string)().optional(),
4337
+ at: (0, import_yup41.number)().required()
4338
+ }).label("Proposal Message");
4339
+ var SuggestedHomeSchema = (0, import_yup41.object)({
4340
+ categoryName: (0, import_yup41.string)().defined(),
4341
+ subcategoryName: (0, import_yup41.string)().defined(),
4342
+ groupName: (0, import_yup41.string)().defined()
4343
+ }).label("Suggested Home");
4344
+ var ResolverVerificationSchema = (0, import_yup41.object)({
4345
+ verdict: (0, import_yup41.string)().oneOf(SupportedResolverVerdicts).required(),
4346
+ /** The shown concept the verdict is about; null for `new_concept` / `out_of_scope`. */
4347
+ conceptId: (0, import_yup41.string)().nullable().defined(),
4348
+ evidence: (0, import_yup41.string)().defined(),
4349
+ /** What the judge took the term to mean, abbreviations expanded. */
4350
+ means: (0, import_yup41.string)().optional(),
4351
+ /** For `same`: did the independent confirm step agree? */
4352
+ consistent: (0, import_yup41.boolean)().optional(),
4353
+ confirm: (0, import_yup41.object)({
4354
+ answer: (0, import_yup41.string)().oneOf(["yes", "no"]).required(),
4355
+ evidence: (0, import_yup41.string)().defined()
4356
+ }).optional().default(void 0)
4357
+ }).label("Resolver Verification");
4358
+ var ConceptProposalSchema = (0, import_yup41.object)({
4359
+ proposalId: (0, import_yup41.string)().required().label("Proposal ID"),
4360
+ vocabulary: vocabularyId().required().label("Vocabulary"),
4361
+ /** The miss this closes; `normalizedTerm` links back to its unmatched row. */
4362
+ term: (0, import_yup41.string)().required().label("Term"),
4363
+ normalizedTerm: (0, import_yup41.string)().required().label("Normalized Term"),
4364
+ /** Demand at proposal time, so the queue ranks without a join. */
4365
+ count: (0, import_yup41.number)().integer().min(0).required().label("Count"),
4366
+ /** Other misses folded into this draft because they name the same new concept. */
4367
+ mergedTerms: (0, import_yup41.array)(
4368
+ (0, import_yup41.object)({
4369
+ term: (0, import_yup41.string)().required(),
4370
+ normalizedTerm: (0, import_yup41.string)().required(),
4371
+ count: (0, import_yup41.number)().integer().min(0).required()
4372
+ }).required()
4373
+ ).optional().label("Merged Terms"),
4374
+ /** Absent on drafts that predate the field: read as `concept`. */
4375
+ kind: (0, import_yup41.string)().oneOf(SupportedProposalKinds).optional().label("Kind"),
4376
+ /** For `alias`: the concept the term names. For `placement`: the concept to place. */
4377
+ targetConceptId: (0, import_yup41.string)().optional().label("Target Concept"),
4378
+ targetName: (0, import_yup41.string)().optional().label("Target Name"),
4379
+ // The draft concept, editable until approved. Empty strings are valid here:
4380
+ // an alias draft carries no draft concept of its own.
4381
+ name: (0, import_yup41.string)().defined().label("Name"),
4382
+ type: (0, import_yup41.string)().defined().label("Type"),
4383
+ description: (0, import_yup41.string)().defined().label("Description"),
4384
+ aliases: (0, import_yup41.array)((0, import_yup41.string)().required()).default([]).label("Aliases"),
4385
+ /** Empty when no group fits: approved that way, the concept goes live uncategorized. */
4386
+ memberships: (0, import_yup41.array)(ConceptMembershipSchema.required()).default([]).label("Memberships"),
4387
+ suggestedHome: SuggestedHomeSchema.nullable().optional().default(void 0).label("Suggested Home"),
4388
+ /** Resolved to concepts that exist; names that matched nothing are dropped. */
4389
+ relatedConceptIds: (0, import_yup41.array)((0, import_yup41.string)().required()).default([]).label("Related Concepts"),
4390
+ /** Every placement candidate considered, best first. */
4391
+ candidates: (0, import_yup41.array)(ProposalCandidateSchema.required()).default([]).label("Candidates"),
4392
+ needsReview: (0, import_yup41.boolean)().required().label("Needs Review"),
4393
+ reason: (0, import_yup41.string)().optional().label("Reason"),
4394
+ verification: ResolverVerificationSchema.optional().default(void 0).label("Verification"),
4395
+ /** What the auto-accept gate decided for an alias verdict. */
4396
+ autoAccept: (0, import_yup41.object)({
4397
+ accepted: (0, import_yup41.boolean)().required(),
4398
+ reason: (0, import_yup41.string)().optional(),
4399
+ tier: (0, import_yup41.string)().optional(),
4400
+ calibrationId: (0, import_yup41.string)().optional(),
4401
+ releaseId: (0, import_yup41.string)().optional()
4402
+ }).optional().default(void 0).label("Auto Accept"),
4403
+ /** Which model drafted it. */
4404
+ model: (0, import_yup41.string)().defined().label("Model"),
4405
+ /** The refinement conversation, oldest first. */
4406
+ messages: (0, import_yup41.array)(ProposalMessageSchema.required()).default([]).label("Messages"),
4407
+ status: (0, import_yup41.string)().oneOf(SupportedProposalStatuses).required().label("Status"),
4408
+ /** Set when approved: the concept this became. */
4409
+ resolvedConceptId: (0, import_yup41.string)().optional().label("Resolved Concept"),
4410
+ createdAt: (0, import_yup41.number)().required().label("Created At"),
4411
+ updatedAt: (0, import_yup41.number)().required().label("Updated At")
4412
+ }).label("Concept Proposal");
4413
+ var ReleaseSchema = (0, import_yup41.object)({
4414
+ releaseId: (0, import_yup41.string)().required().label("Release ID"),
4415
+ kind: (0, import_yup41.string)().oneOf(SupportedReleaseKinds).required().label("Kind"),
4416
+ status: (0, import_yup41.string)().oneOf(SupportedReleaseStatuses).required().label("Status"),
4417
+ createdBy: (0, import_yup41.string)().required().label("Created By"),
4418
+ createdAt: (0, import_yup41.number)().required().label("Created At"),
4419
+ note: (0, import_yup41.string)().optional().label("Note"),
4420
+ rolledBackAt: (0, import_yup41.number)().optional().label("Rolled Back At"),
4421
+ rolledBackBy: (0, import_yup41.string)().optional().label("Rolled Back By")
4422
+ }).label("Release");
4423
+ var AuditSchema = (0, import_yup41.object)({
4424
+ auditId: (0, import_yup41.string)().required().label("Audit ID"),
4425
+ releaseId: (0, import_yup41.string)().required().label("Release ID"),
4426
+ key: (0, import_yup41.string)().required().label("Key"),
4427
+ term: (0, import_yup41.string)().required().label("Term"),
4428
+ conceptId: (0, import_yup41.string)().required().label("Concept ID"),
4429
+ tier: (0, import_yup41.string)().optional().label("Tier"),
4430
+ status: (0, import_yup41.string)().oneOf(SupportedAuditStatuses).required().label("Status"),
4431
+ createdAt: (0, import_yup41.number)().required().label("Created At"),
4432
+ resolvedAt: (0, import_yup41.number)().optional().label("Resolved At"),
4433
+ resolvedBy: (0, import_yup41.string)().optional().label("Resolved By")
4434
+ }).label("Audit");
4435
+ var ResolverSettingsSchema = (0, import_yup41.object)({
4436
+ autoAccept: (0, import_yup41.object)({
4437
+ /** Stop switch for WRITING auto keys. Off until a calibration passes. */
4438
+ enabled: (0, import_yup41.boolean)().required(),
4439
+ /** Minimum calibrated precision (Wilson 95% lower bound) for a tier to auto-accept. */
4440
+ target: (0, import_yup41.number)().min(0.5).lessThan(1).required(),
4441
+ maxPerRun: (0, import_yup41.number)().integer().min(0).required(),
4442
+ maxPerDay: (0, import_yup41.number)().integer().min(0).required(),
4443
+ /** Share of each auto release sampled into the audit queue (0..1). */
4444
+ auditRate: (0, import_yup41.number)().min(0).max(1).required()
4445
+ }).label("Auto Accept"),
4446
+ /** Stop switch for SERVING auto keys: false hides them from lookups at once. */
4447
+ serveAutoKeys: (0, import_yup41.boolean)().required().label("Serve Auto Keys"),
4448
+ /** Minimum Meilisearch ranking score (0..1) for a fuzzy hit to be considered. */
4449
+ fuzzyMinScore: (0, import_yup41.number)().min(0).max(1).required().label("Fuzzy Min Score"),
4450
+ /** Per-client limit on public search, per minute per replica. 0 disables it. */
4451
+ searchRateLimitPerMin: (0, import_yup41.number)().integer().min(0).required().label("Search Rate Limit"),
4452
+ /** Master switch for scheduled maintenance jobs. */
4453
+ scheduledJobs: (0, import_yup41.boolean)().required().label("Scheduled Jobs"),
4454
+ updatedAt: (0, import_yup41.number)().optional().label("Updated At"),
4455
+ updatedBy: (0, import_yup41.string)().optional().label("Updated By"),
4456
+ /** Why auto-accept was last switched off automatically. */
4457
+ trippedReason: (0, import_yup41.string)().optional().label("Tripped Reason")
4458
+ }).label("Resolver Settings");
4459
+ var TaxonomyScheduleSchema = (0, import_yup41.object)({
4460
+ kind: (0, import_yup41.string)().oneOf(SupportedTaxonomyJobKinds).required().label("Job"),
4461
+ enabled: (0, import_yup41.boolean)().required().label("Enabled"),
4462
+ everyHours: (0, import_yup41.number)().min(SCHEDULE_MIN_HOURS).max(SCHEDULE_MAX_HOURS).required().label("Every (hours)"),
4463
+ /** Last time the scheduler fired this job. */
4464
+ lastRunAt: (0, import_yup41.number)().optional().label("Last Run At"),
4465
+ updatedAt: (0, import_yup41.number)().required().label("Updated At")
4466
+ }).label("Taxonomy Schedule");
4467
+ var NormalizeContextSchema = (0, import_yup41.object)({
4468
+ /** The title of the record the terms come from. */
4469
+ title: (0, import_yup41.string)().max(200).optional(),
4470
+ /** Backbone node ids (category, subcategory or group). */
4471
+ categoryIds: (0, import_yup41.array)(nodeId().required()).max(10).optional(),
4472
+ /** Other terms from the same record, in the same vocabulary. */
4473
+ siblings: (0, import_yup41.array)((0, import_yup41.string)().max(200).required()).max(50).optional()
4474
+ }).label("Normalize Context");
4475
+
4476
+ // src/taxonomy/taxonomy-filter.schema.ts
4477
+ var import_yup42 = require("yup");
4478
+ var ConceptFilterShape = (0, import_yup42.object)({
4479
+ /** Type ids. Open: which types exist is the vocabulary's data. */
4480
+ type: tokens("Type"),
4481
+ /** Category node ids the concept is placed under (`memberships.categoryId`). */
4482
+ categoryId: tokens("Category"),
4483
+ /** True: only live concepts with no backbone home (the uncategorized backlog). */
4484
+ unplaced: (0, import_yup42.boolean)().optional().label("Unplaced")
4485
+ }).label("Concept Filter");
4486
+ var ConceptFilterSchema = rejectUnknownKeys(
4487
+ ConceptFilterShape,
4488
+ () => Object.keys(ConceptFilterShape.fields)
4489
+ );
4490
+ var TaxonomyNodeFilterShape = (0, import_yup42.object)({
4491
+ kind: enumFacet(SupportedTaxonomyNodeKinds, "Kind"),
4492
+ /** Parent node ids: a node's children. */
4493
+ parentId: tokens("Parent")
4494
+ }).label("Taxonomy Node Filter");
4495
+ var TaxonomyNodeFilterSchema = rejectUnknownKeys(
4496
+ TaxonomyNodeFilterShape,
4497
+ () => Object.keys(TaxonomyNodeFilterShape.fields)
4498
+ );
4499
+ var UnmatchedFilterShape = (0, import_yup42.object)({
4500
+ resolution: enumFacet(SupportedUnmatchedResolutions, "Resolution"),
4501
+ reason: enumFacet(SupportedUnmatchedReasons, "Reason")
4502
+ }).label("Unmatched Filter");
4503
+ var UnmatchedFilterSchema = rejectUnknownKeys(
4504
+ UnmatchedFilterShape,
4505
+ () => Object.keys(UnmatchedFilterShape.fields)
4506
+ );
4507
+ var ConceptProposalFilterShape = (0, import_yup42.object)({
4508
+ status: enumFacet(SupportedProposalStatuses, "Status"),
4509
+ /** A kind, or `uncategorized`: concept and placement drafts with no home yet. */
4510
+ kind: enumFacet(SupportedProposalFilters, "Kind")
4511
+ }).label("Concept Proposal Filter");
4512
+ var ConceptProposalFilterSchema = rejectUnknownKeys(
4513
+ ConceptProposalFilterShape,
4514
+ () => Object.keys(ConceptProposalFilterShape.fields)
4515
+ );
4516
+ var ReleaseFilterShape = (0, import_yup42.object)({
4517
+ kind: enumFacet(SupportedReleaseKinds, "Kind"),
4518
+ status: enumFacet(SupportedReleaseStatuses, "Status")
4519
+ }).label("Release Filter");
4520
+ var ReleaseFilterSchema = rejectUnknownKeys(
4521
+ ReleaseFilterShape,
4522
+ () => Object.keys(ReleaseFilterShape.fields)
4523
+ );
4524
+ var AuditFilterShape = (0, import_yup42.object)({
4525
+ status: enumFacet(SupportedAuditStatuses, "Status")
4526
+ }).label("Audit Filter");
4527
+ var AuditFilterSchema = rejectUnknownKeys(
4528
+ AuditFilterShape,
4529
+ () => Object.keys(AuditFilterShape.fields)
4530
+ );
4531
+
4099
4532
  // src/user/user.schema.ts
4100
- var import_yup53 = require("yup");
4533
+ var import_yup55 = require("yup");
4101
4534
 
4102
4535
  // src/user/work-experience.schema.ts
4103
- var import_yup41 = require("yup");
4104
- var WorkExperienceSchema = (0, import_yup41.object)().shape({
4536
+ var import_yup43 = require("yup");
4537
+ var WorkExperienceSchema = (0, import_yup43.object)().shape({
4105
4538
  company: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Company"),
4106
- designation: (0, import_yup41.string)().trim().required().label("Designation"),
4539
+ designation: (0, import_yup43.string)().trim().required().label("Designation"),
4107
4540
  duration: DurationSchema({
4108
4541
  format: "YYYY-MM",
4109
4542
  startLabel: "Start Date",
4110
4543
  endLabel: "End Date"
4111
4544
  }).required().label("Duration"),
4112
- description: (0, import_yup41.string)().trim().max(3e3).optional().label("Description"),
4545
+ description: (0, import_yup43.string)().trim().max(3e3).optional().label("Description"),
4113
4546
  location: LocationSchema.required().label("Location"),
4114
- isRemote: (0, import_yup41.boolean)().oneOf([true, false]).default(false).label("Is Remote")
4547
+ isRemote: (0, import_yup43.boolean)().oneOf([true, false]).default(false).label("Is Remote")
4115
4548
  }).noUnknown().strict().label("Work Experience");
4116
4549
 
4117
4550
  // src/user/education.schema.ts
4118
- var import_yup42 = require("yup");
4119
- var EducationSchema = (0, import_yup42.object)({
4551
+ var import_yup44 = require("yup");
4552
+ var EducationSchema = (0, import_yup44.object)({
4120
4553
  institute: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Institute"),
4121
- course: (0, import_yup42.string)().trim().required().label("Course"),
4122
- fieldOfStudy: (0, import_yup42.string)().trim().required().label("Field of Study"),
4554
+ course: (0, import_yup44.string)().trim().required().label("Course"),
4555
+ fieldOfStudy: (0, import_yup44.string)().trim().required().label("Field of Study"),
4123
4556
  duration: DurationSchema({
4124
4557
  format: "YYYY-MM",
4125
4558
  startLabel: "Start Date",
4126
4559
  endLabel: "End Date"
4127
4560
  }).required().label("Duration"),
4128
- description: (0, import_yup42.string)().trim().max(3e3).optional().label("Description"),
4129
- isDistanceLearning: (0, import_yup42.boolean)().default(false).label("Is Distance Learning"),
4561
+ description: (0, import_yup44.string)().trim().max(3e3).optional().label("Description"),
4562
+ isDistanceLearning: (0, import_yup44.boolean)().default(false).label("Is Distance Learning"),
4130
4563
  location: LocationSchema.required().label("Location"),
4131
- studyType: (0, import_yup42.string)().oneOf(SupportedStudyTypes).trim().max(50).required().label("Study Type")
4564
+ studyType: (0, import_yup44.string)().oneOf(SupportedStudyTypes).trim().max(50).required().label("Study Type")
4132
4565
  }).noUnknown().strict().label("Education");
4133
4566
 
4134
4567
  // src/user/user-skill.schema.ts
4135
- var import_yup43 = require("yup");
4136
- var UserSkillSchema = (0, import_yup43.object)({
4137
- name: (0, import_yup43.string)().required().label("Name"),
4138
- proficiencyLevel: (0, import_yup43.string)().oneOf(SupportedProficiencyLevels).required().label("Proficiency Level"),
4568
+ var import_yup45 = require("yup");
4569
+ var UserSkillSchema = (0, import_yup45.object)({
4570
+ name: (0, import_yup45.string)().required().label("Name"),
4571
+ proficiencyLevel: (0, import_yup45.string)().oneOf(SupportedProficiencyLevels).required().label("Proficiency Level"),
4139
4572
  lastUsed: dateString().format("YYYY-MM").nullable().optional().label("Last Used")
4140
4573
  }).noUnknown().strict().label("Skill");
4141
4574
 
4142
4575
  // src/user/project.schema.ts
4143
- var import_yup44 = require("yup");
4144
- var UserProjectSchema = (0, import_yup44.object)({
4145
- name: (0, import_yup44.string)().trim().max(50).required().label("Name"),
4146
- url: (0, import_yup44.string)().optional().label("URL"),
4147
- description: (0, import_yup44.string)().trim().min(100).max(3e3).required().label("Description"),
4576
+ var import_yup46 = require("yup");
4577
+ var UserProjectSchema = (0, import_yup46.object)({
4578
+ name: (0, import_yup46.string)().trim().max(50).required().label("Name"),
4579
+ url: (0, import_yup46.string)().optional().label("URL"),
4580
+ description: (0, import_yup46.string)().trim().min(100).max(3e3).required().label("Description"),
4148
4581
  duration: DurationSchema({
4149
4582
  format: "YYYY-MM",
4150
4583
  startLabel: "Start Date",
@@ -4153,68 +4586,68 @@ var UserProjectSchema = (0, import_yup44.object)({
4153
4586
  }).noUnknown().strict().label("Project");
4154
4587
 
4155
4588
  // src/user/user-certification.schema.ts
4156
- var import_yup45 = require("yup");
4157
- var UserCertificationSchema = (0, import_yup45.object)({
4158
- name: (0, import_yup45.string)().trim().max(100).required().label("Name"),
4589
+ var import_yup47 = require("yup");
4590
+ var UserCertificationSchema = (0, import_yup47.object)({
4591
+ name: (0, import_yup47.string)().trim().max(100).required().label("Name"),
4159
4592
  // TODO: Add validation for authority
4160
- authority: (0, import_yup45.string)().trim().max(100).required().label("Authority"),
4161
- licenseNumber: (0, import_yup45.string)().trim().max(50).optional().label("License Number"),
4593
+ authority: (0, import_yup47.string)().trim().max(100).required().label("Authority"),
4594
+ licenseNumber: (0, import_yup47.string)().trim().max(50).optional().label("License Number"),
4162
4595
  duration: DurationSchema({
4163
4596
  format: "YYYY-MM",
4164
4597
  startLabel: "Start Date",
4165
4598
  endLabel: "End Date"
4166
4599
  }).optional().nullable().label("Duration"),
4167
- url: (0, import_yup45.string)().optional().label("URL")
4600
+ url: (0, import_yup47.string)().optional().label("URL")
4168
4601
  }).noUnknown().strict().label("Certification");
4169
4602
 
4170
4603
  // src/user/user-interest.schema.ts
4171
- var import_yup46 = require("yup");
4172
- var UserInterestSchema = (0, import_yup46.object)({
4604
+ var import_yup48 = require("yup");
4605
+ var UserInterestSchema = (0, import_yup48.object)({
4173
4606
  /** The taxonomy entry's id. */
4174
- id: (0, import_yup46.string)().trim().required().label("Interest Id"),
4607
+ id: (0, import_yup48.string)().trim().required().label("Interest Id"),
4175
4608
  /** Display name, e.g. "Cloud Computing". */
4176
- name: (0, import_yup46.string)().trim().required().label("Interest"),
4609
+ name: (0, import_yup48.string)().trim().required().label("Interest"),
4177
4610
  /** Material-symbols icon name, e.g. "cloud". */
4178
- logo: (0, import_yup46.string)().trim().required().label("Interest Logo")
4611
+ logo: (0, import_yup48.string)().trim().required().label("Interest Logo")
4179
4612
  }).required().label("Interest");
4180
4613
 
4181
4614
  // src/user/user-language.schema.ts
4182
- var import_yup47 = require("yup");
4183
- var UserLanguageSchema = (0, import_yup47.object)({
4184
- name: (0, import_yup47.string)().trim().required().label("Name"),
4185
- proficiencyLevel: (0, import_yup47.string)().oneOf(SupportedProficiencyLevels).trim().max(50).required().label("Proficiency Level")
4615
+ var import_yup49 = require("yup");
4616
+ var UserLanguageSchema = (0, import_yup49.object)({
4617
+ name: (0, import_yup49.string)().trim().required().label("Name"),
4618
+ proficiencyLevel: (0, import_yup49.string)().oneOf(SupportedProficiencyLevels).trim().max(50).required().label("Proficiency Level")
4186
4619
  }).noUnknown().strict().label("Language");
4187
4620
 
4188
4621
  // src/user/user-additional-info.schema.ts
4189
- var import_yup48 = require("yup");
4190
- var UserAdditionalInfoSchema = (0, import_yup48.object)({
4191
- title: (0, import_yup48.string)().trim().max(60).required().label("Title"),
4192
- description: (0, import_yup48.string)().trim().max(1e3).required().label("Description")
4622
+ var import_yup50 = require("yup");
4623
+ var UserAdditionalInfoSchema = (0, import_yup50.object)({
4624
+ title: (0, import_yup50.string)().trim().max(60).required().label("Title"),
4625
+ description: (0, import_yup50.string)().trim().max(1e3).required().label("Description")
4193
4626
  }).noUnknown().strict().label("User Additional Info");
4194
4627
 
4195
4628
  // src/user/general-detail.schema.ts
4196
- var import_yup49 = require("yup");
4197
- var UserGeneralDetailSchema = (0, import_yup49.object)({
4198
- id: (0, import_yup49.string)().optional().label("ID"),
4199
- name: (0, import_yup49.object)().shape({
4200
- first: (0, import_yup49.string)().trim().max(50).required().label("First Name"),
4201
- last: (0, import_yup49.string)().trim().max(50).optional().label("Last Name")
4629
+ var import_yup51 = require("yup");
4630
+ var UserGeneralDetailSchema = (0, import_yup51.object)({
4631
+ id: (0, import_yup51.string)().optional().label("ID"),
4632
+ name: (0, import_yup51.object)().shape({
4633
+ first: (0, import_yup51.string)().trim().max(50).required().label("First Name"),
4634
+ last: (0, import_yup51.string)().trim().max(50).optional().label("Last Name")
4202
4635
  }).required().label("Name"),
4203
- headline: (0, import_yup49.string)().trim().max(200).optional().label("Headline"),
4204
- image: (0, import_yup49.string)().optional().label("Image"),
4636
+ headline: (0, import_yup51.string)().trim().max(200).optional().label("Headline"),
4637
+ image: (0, import_yup51.string)().optional().label("Image"),
4205
4638
  // The DISPLAYED avatar (`image`) is a flattened export with any status frame
4206
4639
  // ("#OpenToWork", …) already burned into the pixels. `imageOriginal` keeps the
4207
4640
  // un-framed source the user uploaded, so the image builder can reopen it and
4208
4641
  // apply a DIFFERENT frame instead of stacking a second one on top of the first.
4209
4642
  // Optional and absent on every pre-existing user: treat a missing value as
4210
4643
  // "only the flattened image is available".
4211
- imageOriginal: (0, import_yup49.string)().optional().label("Original Image"),
4212
- aboutMe: (0, import_yup49.string)().trim().max(3e3).optional().label("About Me"),
4213
- email: (0, import_yup49.string)().required().label("Email"),
4214
- mobile: (0, import_yup49.string)().nullable().optional().label("Mobile"),
4215
- emailVerified: (0, import_yup49.string)().nullable().optional().label("Email Verified"),
4216
- mobileVerified: (0, import_yup49.string)().nullable().optional().label("Mobile Verified"),
4217
- experienceLevel: (0, import_yup49.string)().oneOf(SupportedExperienceLevels).required().label("Experience level"),
4644
+ imageOriginal: (0, import_yup51.string)().optional().label("Original Image"),
4645
+ aboutMe: (0, import_yup51.string)().trim().max(3e3).optional().label("About Me"),
4646
+ email: (0, import_yup51.string)().required().label("Email"),
4647
+ mobile: (0, import_yup51.string)().nullable().optional().label("Mobile"),
4648
+ emailVerified: (0, import_yup51.string)().nullable().optional().label("Email Verified"),
4649
+ mobileVerified: (0, import_yup51.string)().nullable().optional().label("Mobile Verified"),
4650
+ experienceLevel: (0, import_yup51.string)().oneOf(SupportedExperienceLevels).required().label("Experience level"),
4218
4651
  /**
4219
4652
  * The user's HIGHEST qualification, e.g. `bachelor`.
4220
4653
  *
@@ -4233,7 +4666,7 @@ var UserGeneralDetailSchema = (0, import_yup49.object)({
4233
4666
  * UNCONSTRAINED on education rather than filtering the user out — the same
4234
4667
  * opt-out reasoning `notificationPrefs` uses.
4235
4668
  */
4236
- educationLevel: (0, import_yup49.string)().oneOf(SupportedEducationLevels).optional().label("Education level"),
4669
+ educationLevel: (0, import_yup51.string)().oneOf(SupportedEducationLevels).optional().label("Education level"),
4237
4670
  location: LocationSchema.required().label("Location"),
4238
4671
  /**
4239
4672
  * Where the account was created, captured once and never rewritten.
@@ -4249,38 +4682,38 @@ var UserGeneralDetailSchema = (0, import_yup49.object)({
4249
4682
  * - `location` derived from the user's self-entered profile location
4250
4683
  * - `default` assumed (no signal available); presumption, not evidence
4251
4684
  */
4252
- signupContext: (0, import_yup49.object)().shape({
4685
+ signupContext: (0, import_yup51.object)().shape({
4253
4686
  // ISO 3166-1 alpha-2, uppercase — the shape `cf-ipcountry` returns, so
4254
4687
  // measured and inferred values are directly comparable.
4255
- country: (0, import_yup49.string)().trim().uppercase().length(2).required().label("Signup Country"),
4256
- locale: (0, import_yup49.string)().trim().required().label("Signup Locale"),
4257
- source: (0, import_yup49.string)().oneOf(SupportedSignupContextSources).required().label("Signup Context Source"),
4258
- at: (0, import_yup49.number)().required().label("Signup Context At")
4688
+ country: (0, import_yup51.string)().trim().uppercase().length(2).required().label("Signup Country"),
4689
+ locale: (0, import_yup51.string)().trim().required().label("Signup Locale"),
4690
+ source: (0, import_yup51.string)().oneOf(SupportedSignupContextSources).required().label("Signup Context Source"),
4691
+ at: (0, import_yup51.number)().required().label("Signup Context At")
4259
4692
  }).optional().default(void 0).label("Signup Context"),
4260
- profileVisibility: (0, import_yup49.string)().oneOf(SupportedUserProfileVisibilities).default("public" /* Public */).label("Profile Visibility")
4693
+ profileVisibility: (0, import_yup51.string)().oneOf(SupportedUserProfileVisibilities).default("public" /* Public */).label("Profile Visibility")
4261
4694
  }).noUnknown().strict().label("General Detail");
4262
4695
 
4263
4696
  // src/user/user-job-preferences.schema.ts
4264
- var import_yup50 = require("yup");
4265
- var UserJobPreferencesSchema = (0, import_yup50.object)({
4697
+ var import_yup52 = require("yup");
4698
+ var UserJobPreferencesSchema = (0, import_yup52.object)({
4266
4699
  /**
4267
4700
  * Whether the job seeker is openly signalling availability. Surfaces the
4268
4701
  * "Open to work" badge on the public profile and boosts visibility in
4269
4702
  * recruiter search. Defaults to `false` - users must opt in.
4270
4703
  */
4271
- openToWork: (0, import_yup50.boolean)().default(false).label("Open to Work"),
4704
+ openToWork: (0, import_yup52.boolean)().default(false).label("Open to Work"),
4272
4705
  /**
4273
4706
  * How urgently the user is looking for their next job. Drives match scoring
4274
4707
  * and can downgrade the visibility of expired or low-relevance postings for
4275
4708
  * users in `passively_browsing` mode.
4276
4709
  */
4277
- jobSearchUrgency: (0, import_yup50.string)().oneOf(SupportedJobSearchUrgencies).required().label("Job Search Urgency"),
4710
+ jobSearchUrgency: (0, import_yup52.string)().oneOf(SupportedJobSearchUrgencies).required().label("Job Search Urgency"),
4278
4711
  /**
4279
4712
  * Locations the user wants to work in. Stores the full `LocationSchema`
4280
4713
  * shape (country, city, state, geo, etc.) as returned by the locations
4281
4714
  * autocomplete API.
4282
4715
  */
4283
- jobLocations: (0, import_yup50.array)().of(LocationSchema.required().label("Job Location")).min(1, "Pick at least one preferred location.").required().label("Job Locations"),
4716
+ jobLocations: (0, import_yup52.array)().of(LocationSchema.required().label("Job Location")).min(1, "Pick at least one preferred location.").required().label("Job Locations"),
4284
4717
  /**
4285
4718
  * Seniority levels the user wants jobs to be matched against. Multi-select
4286
4719
  * (up to 2) for borderline candidates.
@@ -4291,7 +4724,7 @@ var UserJobPreferencesSchema = (0, import_yup50.object)({
4291
4724
  * Both reuse the same `ExperienceLevel` taxonomy from `common.constant.ts`
4292
4725
  * so search/match logic doesn't have to translate between two vocabularies.
4293
4726
  */
4294
- targetExperienceLevels: (0, import_yup50.array)().of((0, import_yup50.string)().oneOf(SupportedExperienceLevels).required()).min(1, "Pick at least one experience level.").max(2, "You can select at most 2 experience levels.").required().label("Target Experience Levels"),
4727
+ targetExperienceLevels: (0, import_yup52.array)().of((0, import_yup52.string)().oneOf(SupportedExperienceLevels).required()).min(1, "Pick at least one experience level.").max(2, "You can select at most 2 experience levels.").required().label("Target Experience Levels"),
4295
4728
  /**
4296
4729
  * Specializations the user is searching for - free-form titles.
4297
4730
  *
@@ -4300,19 +4733,19 @@ var UserJobPreferencesSchema = (0, import_yup50.object)({
4300
4733
  * surfaces a curated "Popular Roles" picker for discovery, but the user
4301
4734
  * can ultimately add any title; matching/normalization happens downstream.
4302
4735
  */
4303
- jobRoles: (0, import_yup50.array)().of((0, import_yup50.string)().trim().max(120).required()).min(1, "Pick at least one role.").required().label("Job Roles"),
4736
+ jobRoles: (0, import_yup52.array)().of((0, import_yup52.string)().trim().max(120).required()).min(1, "Pick at least one role.").required().label("Job Roles"),
4304
4737
  /**
4305
4738
  * Minimum acceptable annual base salary, in `minSalaryCurrency`.
4306
4739
  * Stored as an integer in the currency's major unit (e.g. dollars, not cents).
4307
4740
  * Defaults to 0 ("any salary") rather than being optional - every job-seeker
4308
4741
  * has a floor, even if it's zero.
4309
4742
  */
4310
- minSalary: (0, import_yup50.number)().integer().min(MIN_SALARY_LOWER_BOUND).max(MIN_SALARY_UPPER_BOUND).default(0).required().label("Minimum Salary"),
4311
- minSalaryCurrency: (0, import_yup50.string)().oneOf(SupportedSalaryCurrencies).default("USD").required().label("Minimum Salary Currency"),
4743
+ minSalary: (0, import_yup52.number)().integer().min(MIN_SALARY_LOWER_BOUND).max(MIN_SALARY_UPPER_BOUND).default(0).required().label("Minimum Salary"),
4744
+ minSalaryCurrency: (0, import_yup52.string)().oneOf(SupportedSalaryCurrencies).default("USD").required().label("Minimum Salary Currency"),
4312
4745
  /**
4313
4746
  * Marketing-attribution capture from the final onboarding step.
4314
4747
  */
4315
- referralSource: (0, import_yup50.string)().oneOf(SupportedReferralSources).required().label("Referral Source"),
4748
+ referralSource: (0, import_yup52.string)().oneOf(SupportedReferralSources).required().label("Referral Source"),
4316
4749
  /**
4317
4750
  * Resumes the user has uploaded. Embedded directly on the user document
4318
4751
  * (capped at 5) - they're cheap to denormalize, every wizard step that
@@ -4326,25 +4759,25 @@ var UserJobPreferencesSchema = (0, import_yup50.object)({
4326
4759
  * AI resume-builder flow - onboarding uploads land here, AI-built resumes
4327
4760
  * live in their own collection.
4328
4761
  */
4329
- resumes: (0, import_yup50.array)().of(
4330
- (0, import_yup50.object)({
4762
+ resumes: (0, import_yup52.array)().of(
4763
+ (0, import_yup52.object)({
4331
4764
  // Stable id assigned on upload - used to address a specific entry
4332
4765
  // for delete / set-primary operations without exposing the GCS URL
4333
4766
  // as a route key.
4334
- id: (0, import_yup50.string)().required().label("ID"),
4335
- url: (0, import_yup50.string)().required().label("Resume URL"),
4336
- filename: (0, import_yup50.string)().trim().max(255).optional().label("Filename"),
4337
- sizeBytes: (0, import_yup50.number)().integer().min(0).optional().label("Size (bytes)"),
4338
- mimeType: (0, import_yup50.string)().trim().max(120).optional().label("MIME Type"),
4339
- uploadedAt: (0, import_yup50.date)().required().label("Uploaded At"),
4340
- isPrimary: (0, import_yup50.boolean)().default(false).label("Is Primary")
4767
+ id: (0, import_yup52.string)().required().label("ID"),
4768
+ url: (0, import_yup52.string)().required().label("Resume URL"),
4769
+ filename: (0, import_yup52.string)().trim().max(255).optional().label("Filename"),
4770
+ sizeBytes: (0, import_yup52.number)().integer().min(0).optional().label("Size (bytes)"),
4771
+ mimeType: (0, import_yup52.string)().trim().max(120).optional().label("MIME Type"),
4772
+ uploadedAt: (0, import_yup52.date)().required().label("Uploaded At"),
4773
+ isPrimary: (0, import_yup52.boolean)().default(false).label("Is Primary")
4341
4774
  }).noUnknown().strict().label("Resume")
4342
4775
  ).max(5, "You can keep at most 5 resumes on file.").default([]).label("Resumes"),
4343
4776
  /**
4344
4777
  * Set when the user finishes the wizard's last step. Acts as the gate the
4345
4778
  * onboarding hook checks to redirect users who haven't completed setup.
4346
4779
  */
4347
- onboardingCompletedAt: (0, import_yup50.date)().nullable().optional().label("Onboarding Completed At"),
4780
+ onboardingCompletedAt: (0, import_yup52.date)().nullable().optional().label("Onboarding Completed At"),
4348
4781
  /**
4349
4782
  * Parser-suggested values for wizard fields, written by the resume-upload
4350
4783
  * flow. Every parser-derived field lands here - including profile-shaped
@@ -4364,92 +4797,92 @@ var UserJobPreferencesSchema = (0, import_yup50.object)({
4364
4797
  * APIs. If `user.<field>` is empty there, the correct behavior is empty,
4365
4798
  * because the user has not confirmed it yet.
4366
4799
  */
4367
- pendingPrefill: (0, import_yup50.object)({
4368
- headline: (0, import_yup50.string)().trim().optional().label("Pending Headline"),
4369
- aboutMe: (0, import_yup50.string)().trim().optional().label("Pending About Me"),
4370
- mobile: (0, import_yup50.string)().trim().optional().label("Pending Mobile"),
4800
+ pendingPrefill: (0, import_yup52.object)({
4801
+ headline: (0, import_yup52.string)().trim().optional().label("Pending Headline"),
4802
+ aboutMe: (0, import_yup52.string)().trim().optional().label("Pending About Me"),
4803
+ mobile: (0, import_yup52.string)().trim().optional().label("Pending Mobile"),
4371
4804
  location: LocationSchema.optional().default(void 0).label("Pending Location"),
4372
- experienceLevel: (0, import_yup50.string)().oneOf(SupportedExperienceLevels).optional().label("Pending Experience Level"),
4373
- socialAccounts: (0, import_yup50.array)().of(SocialAccountSchema.required()).optional().label("Pending Social Accounts"),
4374
- workExperiences: (0, import_yup50.array)().of(WorkExperienceSchema.required()).optional().label("Pending Work Experiences"),
4375
- educations: (0, import_yup50.array)().of(EducationSchema.required()).optional().label("Pending Educations")
4805
+ experienceLevel: (0, import_yup52.string)().oneOf(SupportedExperienceLevels).optional().label("Pending Experience Level"),
4806
+ socialAccounts: (0, import_yup52.array)().of(SocialAccountSchema.required()).optional().label("Pending Social Accounts"),
4807
+ workExperiences: (0, import_yup52.array)().of(WorkExperienceSchema.required()).optional().label("Pending Work Experiences"),
4808
+ educations: (0, import_yup52.array)().of(EducationSchema.required()).optional().label("Pending Educations")
4376
4809
  }).nullable().optional().default(void 0).label("Pending Prefill")
4377
4810
  }).noUnknown().strict().label("User Job Preferences Schema");
4378
4811
 
4379
4812
  // src/user/user-recruiter-profile.schema.ts
4380
- var import_yup51 = require("yup");
4381
- var RecruiterPageLinkSchema = (0, import_yup51.object)({
4813
+ var import_yup53 = require("yup");
4814
+ var RecruiterPageLinkSchema = (0, import_yup53.object)({
4382
4815
  page: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Company Page"),
4383
- jobTitle: (0, import_yup51.string)().trim().max(100).optional().label("Job Title")
4816
+ jobTitle: (0, import_yup53.string)().trim().max(100).optional().label("Job Title")
4384
4817
  }).noUnknown().strict().label("Recruiter Page Link");
4385
- var UserRecruiterProfileSchema = (0, import_yup51.object)({
4386
- recruiterProfile: (0, import_yup51.object)({
4387
- hiringFor: (0, import_yup51.array)().of(RecruiterPageLinkSchema).default([]).label("Hiring For")
4818
+ var UserRecruiterProfileSchema = (0, import_yup53.object)({
4819
+ recruiterProfile: (0, import_yup53.object)({
4820
+ hiringFor: (0, import_yup53.array)().of(RecruiterPageLinkSchema).default([]).label("Hiring For")
4388
4821
  }).optional().default(void 0).label("Recruiter Profile")
4389
4822
  }).noUnknown().strict().label("User Recruiter Profile");
4390
4823
 
4391
4824
  // src/user/user-coordinator-profile.schema.ts
4392
- var import_yup52 = require("yup");
4393
- var CoordinatorPageLinkSchema = (0, import_yup52.object)({
4825
+ var import_yup54 = require("yup");
4826
+ var CoordinatorPageLinkSchema = (0, import_yup54.object)({
4394
4827
  page: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Institute Page"),
4395
- jobTitle: (0, import_yup52.string)().trim().max(100).optional().label("Job Title")
4828
+ jobTitle: (0, import_yup54.string)().trim().max(100).optional().label("Job Title")
4396
4829
  }).noUnknown().strict().label("Coordinator Page Link");
4397
- var UserCoordinatorProfileSchema = (0, import_yup52.object)({
4398
- coordinatorProfile: (0, import_yup52.object)({
4399
- coordinatesAt: (0, import_yup52.array)().of(CoordinatorPageLinkSchema).default([]).label("Coordinates At")
4830
+ var UserCoordinatorProfileSchema = (0, import_yup54.object)({
4831
+ coordinatorProfile: (0, import_yup54.object)({
4832
+ coordinatesAt: (0, import_yup54.array)().of(CoordinatorPageLinkSchema).default([]).label("Coordinates At")
4400
4833
  }).optional().default(void 0).label("Coordinator Profile")
4401
4834
  }).noUnknown().strict().label("User Coordinator Profile");
4402
4835
 
4403
4836
  // src/user/user.schema.ts
4404
- var UserSchema = (0, import_yup53.object)({
4837
+ var UserSchema = (0, import_yup55.object)({
4405
4838
  /**
4406
4839
  * Related auth account id from auth Server (e.g. Better auth https://auth.thejob.dev)
4407
4840
  */
4408
- authAccountId: (0, import_yup53.string)().required().label("Auth Account ID"),
4841
+ authAccountId: (0, import_yup55.string)().required().label("Auth Account ID"),
4409
4842
  /**
4410
4843
  * Social media information about the user (e.g. LinkedIn, GitHub, etc.)
4411
4844
  */
4412
- socialAccounts: (0, import_yup53.array)().of(SocialAccountSchema).default([]).label("Social Accounts"),
4845
+ socialAccounts: (0, import_yup55.array)().of(SocialAccountSchema).default([]).label("Social Accounts"),
4413
4846
  /**
4414
4847
  * Work experience information about the user
4415
4848
  */
4416
- workExperiences: (0, import_yup53.array)().of(WorkExperienceSchema).required().default([]).label("Work Experiences"),
4849
+ workExperiences: (0, import_yup55.array)().of(WorkExperienceSchema).required().default([]).label("Work Experiences"),
4417
4850
  /**
4418
4851
  * Education information about the user
4419
4852
  */
4420
- educations: (0, import_yup53.array)().of(EducationSchema).required().default([]).label("Educations"),
4853
+ educations: (0, import_yup55.array)().of(EducationSchema).required().default([]).label("Educations"),
4421
4854
  /**
4422
4855
  * Skills information about the user
4423
4856
  */
4424
- skills: (0, import_yup53.array)().of(UserSkillSchema).required().default([]).label("Skills"),
4857
+ skills: (0, import_yup55.array)().of(UserSkillSchema).required().default([]).label("Skills"),
4425
4858
  /**
4426
4859
  * Projects information about the user
4427
4860
  */
4428
- projects: (0, import_yup53.array)().of(UserProjectSchema).default([]).label("Projects"),
4861
+ projects: (0, import_yup55.array)().of(UserProjectSchema).default([]).label("Projects"),
4429
4862
  /**
4430
4863
  * Certifications information about the user
4431
4864
  */
4432
- certifications: (0, import_yup53.array)().of(UserCertificationSchema).default([]).label("Certifications"),
4865
+ certifications: (0, import_yup55.array)().of(UserCertificationSchema).default([]).label("Certifications"),
4433
4866
  /**
4434
4867
  * Interests information about the user.
4435
4868
  */
4436
- interests: (0, import_yup53.array)().of(UserInterestSchema).optional().default([]).label("Interests"),
4869
+ interests: (0, import_yup55.array)().of(UserInterestSchema).optional().default([]).label("Interests"),
4437
4870
  /**
4438
4871
  * Languages information about the user
4439
4872
  */
4440
- languages: (0, import_yup53.array)().of(UserLanguageSchema).required().default([]).label("Languages"),
4873
+ languages: (0, import_yup55.array)().of(UserLanguageSchema).required().default([]).label("Languages"),
4441
4874
  /**
4442
4875
  * Additional information about the user
4443
4876
  */
4444
- additionalInfo: (0, import_yup53.array)().of(UserAdditionalInfoSchema).default([]).label("Additional Information"),
4877
+ additionalInfo: (0, import_yup55.array)().of(UserAdditionalInfoSchema).default([]).label("Additional Information"),
4445
4878
  /**
4446
4879
  * Status of the user account
4447
4880
  */
4448
- status: (0, import_yup53.string)().oneOf(SupportedUserStatuses).required().label("Status"),
4881
+ status: (0, import_yup55.string)().oneOf(SupportedUserStatuses).required().label("Status"),
4449
4882
  /**
4450
4883
  * Roles assigned to the user
4451
4884
  */
4452
- roles: (0, import_yup53.array)().of((0, import_yup53.string)().oneOf(SupportedUserRoles)).required().default(DefaultUserRoles).label("Roles"),
4885
+ roles: (0, import_yup55.array)().of((0, import_yup55.string)().oneOf(SupportedUserRoles)).required().default(DefaultUserRoles).label("Roles"),
4453
4886
  /**
4454
4887
  * Explicit consent to receive marketing email (newsletters, job alerts by
4455
4888
  * broadcast, product updates). Marketing sends are HARD-GATED on
@@ -4461,18 +4894,18 @@ var UserSchema = (0, import_yup53.object)({
4461
4894
  * unsubscribe sets `subscribed=false` so consent and the email-service
4462
4895
  * suppression list stay consistent. Defaults to NOT subscribed (opt-in).
4463
4896
  */
4464
- marketingConsent: (0, import_yup53.object)({
4465
- subscribed: (0, import_yup53.boolean)().default(false).label("Subscribed to marketing email"),
4897
+ marketingConsent: (0, import_yup55.object)({
4898
+ subscribed: (0, import_yup55.boolean)().default(false).label("Subscribed to marketing email"),
4466
4899
  /** Epoch ms of the last consent change (opt-in or opt-out). */
4467
- updatedAt: (0, import_yup53.number)().optional().label("Consent updated at"),
4900
+ updatedAt: (0, import_yup55.number)().optional().label("Consent updated at"),
4468
4901
  /** Where the consent change originated, e.g. `onboarding`, `unsubscribe`, `settings`. */
4469
- source: (0, import_yup53.string)().optional().label("Consent source"),
4902
+ source: (0, import_yup55.string)().optional().label("Consent source"),
4470
4903
  /**
4471
4904
  * How often the user receives job-alert emails. `off` disables job alerts
4472
4905
  * only; other marketing stays governed by `subscribed`. Unset means the
4473
4906
  * user has not chosen a cadence yet.
4474
4907
  */
4475
- jobAlertFrequency: (0, import_yup53.string)().oneOf(SupportedJobAlertFrequencies).optional().label("Job alert frequency")
4908
+ jobAlertFrequency: (0, import_yup55.string)().oneOf(SupportedJobAlertFrequencies).optional().label("Job alert frequency")
4476
4909
  }).default({ subscribed: false }).label("Marketing Consent"),
4477
4910
  /**
4478
4911
  * Per-channel toggles for NOTIFICATION email — mail about activity on the
@@ -4487,11 +4920,11 @@ var UserSchema = (0, import_yup53.object)({
4487
4920
  *
4488
4921
  * Transactional mail (magic-link, verification) ignores this object entirely.
4489
4922
  */
4490
- notificationPrefs: (0, import_yup53.object)({
4491
- groupActivity: (0, import_yup53.boolean)().default(true).label("Group activity email"),
4492
- jobActivity: (0, import_yup53.boolean)().default(true).label("Job activity email"),
4493
- applicationUpdates: (0, import_yup53.boolean)().default(true).label("Application update email"),
4494
- productUpdates: (0, import_yup53.boolean)().default(false).label("Product update email")
4923
+ notificationPrefs: (0, import_yup55.object)({
4924
+ groupActivity: (0, import_yup55.boolean)().default(true).label("Group activity email"),
4925
+ jobActivity: (0, import_yup55.boolean)().default(true).label("Job activity email"),
4926
+ applicationUpdates: (0, import_yup55.boolean)().default(true).label("Application update email"),
4927
+ productUpdates: (0, import_yup55.boolean)().default(false).label("Product update email")
4495
4928
  }).default({
4496
4929
  groupActivity: true,
4497
4930
  jobActivity: true,
@@ -4518,21 +4951,21 @@ var UserSchema = (0, import_yup53.object)({
4518
4951
  * subscription (see `PushSubscriptionSchema`). This flag is the user's
4519
4952
  * intent, the subscription is the browser grant, and both are required.
4520
4953
  */
4521
- pushConsent: (0, import_yup53.object)({
4522
- subscribed: (0, import_yup53.boolean)().default(false).label("Subscribed to push notifications"),
4954
+ pushConsent: (0, import_yup55.object)({
4955
+ subscribed: (0, import_yup55.boolean)().default(false).label("Subscribed to push notifications"),
4523
4956
  /** Epoch ms of the last consent change (opt-in or opt-out). */
4524
- updatedAt: (0, import_yup53.number)().optional().label("Push consent updated at"),
4957
+ updatedAt: (0, import_yup55.number)().optional().label("Push consent updated at"),
4525
4958
  /** Where the change originated, e.g. `onboarding`, `settings`, `prompt`. */
4526
- source: (0, import_yup53.string)().optional().label("Push consent source")
4959
+ source: (0, import_yup55.string)().optional().label("Push consent source")
4527
4960
  }).default({ subscribed: false }).label("Push Consent"),
4528
4961
  /**
4529
4962
  * Vector embedding of the user's profile for semantic/hybrid search.
4530
4963
  * Generated from a structured summary of skills, experience, education, etc.
4531
4964
  * Only generated for public profiles with sufficient completeness (≥60%).
4532
4965
  */
4533
- embedding: (0, import_yup53.object)({
4534
- vector: (0, import_yup53.array)((0, import_yup53.number)().required()).optional().label("Embedding vector"),
4535
- model: (0, import_yup53.string)().optional().label("Embedding model")
4966
+ embedding: (0, import_yup55.object)({
4967
+ vector: (0, import_yup55.array)((0, import_yup55.number)().required()).optional().label("Embedding vector"),
4968
+ model: (0, import_yup55.string)().optional().label("Embedding model")
4536
4969
  }).nullable().optional().label("Embedding"),
4537
4970
  /**
4538
4971
  * Epoch ms the account was created, assigned by the storing service.
@@ -4547,12 +4980,12 @@ var UserSchema = (0, import_yup53.object)({
4547
4980
  * `updatedAt` is deliberately NOT added alongside it: nothing derives from it
4548
4981
  * yet, and an optional field is only safe to add when something needs it.
4549
4982
  */
4550
- createdAt: (0, import_yup53.number)().optional().label("Created At")
4983
+ createdAt: (0, import_yup55.number)().optional().label("Created At")
4551
4984
  }).concat(UserGeneralDetailSchema).concat(UserJobPreferencesSchema).concat(UserRecruiterProfileSchema).concat(UserCoordinatorProfileSchema).noUnknown().strict().label("User Schema");
4552
4985
 
4553
4986
  // src/user/push-subscription.schema.ts
4554
- var import_yup54 = require("yup");
4555
- var PushSubscriptionSchema = (0, import_yup54.object)({
4987
+ var import_yup56 = require("yup");
4988
+ var PushSubscriptionSchema = (0, import_yup56.object)({
4556
4989
  /**
4557
4990
  * The user this subscription belongs to, by the `shortId` every service
4558
4991
  * keys a user on, matching `UserSchema.shortId`.
@@ -4566,7 +4999,7 @@ var PushSubscriptionSchema = (0, import_yup54.object)({
4566
4999
  * `shortId` of its OWN (see `PushSubscriptionRecord`); one field cannot be
4567
5000
  * both the row's id and its owner's.
4568
5001
  */
4569
- userShortId: (0, import_yup54.string)().required().label("User Short ID"),
5002
+ userShortId: (0, import_yup56.string)().required().label("User Short ID"),
4570
5003
  /**
4571
5004
  * The push service URL the browser issued. Vendor-specific (FCM, Mozilla,
4572
5005
  * Apple) and effectively unbounded in length, so it carries no length cap.
@@ -4575,16 +5008,16 @@ var PushSubscriptionSchema = (0, import_yup54.object)({
4575
5008
  * browser sends back unchanged, and what a 404/410 response identifies as
4576
5009
  * dead. Upserts and deletes both key on it.
4577
5010
  */
4578
- endpoint: (0, import_yup54.string)().required().label("Push Endpoint"),
5011
+ endpoint: (0, import_yup56.string)().required().label("Push Endpoint"),
4579
5012
  /**
4580
5013
  * Encryption material from the browser. Web Push payloads are encrypted to
4581
5014
  * these keys, so a row missing either one cannot be delivered to at all.
4582
5015
  */
4583
- keys: (0, import_yup54.object)({
5016
+ keys: (0, import_yup56.object)({
4584
5017
  /** Client public key, base64url. */
4585
- p256dh: (0, import_yup54.string)().required().label("P256DH Key"),
5018
+ p256dh: (0, import_yup56.string)().required().label("P256DH Key"),
4586
5019
  /** Client auth secret, base64url. */
4587
- auth: (0, import_yup54.string)().required().label("Auth Secret")
5020
+ auth: (0, import_yup56.string)().required().label("Auth Secret")
4588
5021
  }).required().label("Push Keys"),
4589
5022
  /**
4590
5023
  * Epoch ms the push service says the subscription expires, when it says
@@ -4592,22 +5025,22 @@ var PushSubscriptionSchema = (0, import_yup54.object)({
4592
5025
  * informational and never the basis for pruning. A 404/410 on send is the
4593
5026
  * only reliable death signal.
4594
5027
  */
4595
- expirationTime: (0, import_yup54.number)().nullable().optional().label("Expiration Time"),
5028
+ expirationTime: (0, import_yup56.number)().nullable().optional().label("Expiration Time"),
4596
5029
  /**
4597
5030
  * The subscribing browser's user agent, kept so a user can recognise their
4598
5031
  * own devices in a "where you receive notifications" list. Display only:
4599
5032
  * never parsed, and never used to decide delivery.
4600
5033
  */
4601
- userAgent: (0, import_yup54.string)().optional().label("User Agent"),
5034
+ userAgent: (0, import_yup56.string)().optional().label("User Agent"),
4602
5035
  /** Epoch ms the subscription was first registered. */
4603
- createdAt: (0, import_yup54.number)().optional().label("Created At"),
5036
+ createdAt: (0, import_yup56.number)().optional().label("Created At"),
4604
5037
  /**
4605
5038
  * Epoch ms this subscription was last confirmed live, refreshed when the
4606
5039
  * browser re-registers it. A subscription that stops being refreshed is a
4607
5040
  * device that stopped visiting, which is useful for pruning rows that never
4608
5041
  * fail loudly enough to be caught by a 410.
4609
5042
  */
4610
- lastSeenAt: (0, import_yup54.number)().optional().label("Last Seen At"),
5043
+ lastSeenAt: (0, import_yup56.number)().optional().label("Last Seen At"),
4611
5044
  /**
4612
5045
  * Epoch ms the owner explicitly signed out on this device, or absent.
4613
5046
  *
@@ -4617,12 +5050,12 @@ var PushSubscriptionSchema = (0, import_yup54.object)({
4617
5050
  * so that a MISSING row keeps one meaning to the browser ("stop, this device
4618
5051
  * was removed"), which it acts on by dropping its own subscription.
4619
5052
  */
4620
- signedOutAt: (0, import_yup54.number)().nullable().optional().label("Signed Out At")
5053
+ signedOutAt: (0, import_yup56.number)().nullable().optional().label("Signed Out At")
4621
5054
  }).noUnknown().strict().label("Push Subscription Schema");
4622
5055
 
4623
5056
  // src/user/user-completeness.schema.ts
4624
- var import_yup55 = require("yup");
4625
- var UserCompletenessSchema = (0, import_yup55.object)({
5057
+ var import_yup57 = require("yup");
5058
+ var UserCompletenessSchema = (0, import_yup57.object)({
4626
5059
  additionalInfo: CompletenessScoreSchema(0).label("Additional Info"),
4627
5060
  // Optional
4628
5061
  certifications: CompletenessScoreSchema(0).label("Certifications"),
@@ -4647,10 +5080,14 @@ var StudentCompletenessSchema = UserCompletenessSchema.omit([
4647
5080
  0 && (module.exports = {
4648
5081
  AnswerChoiceType,
4649
5082
  ApplicationReceivePreference,
5083
+ AuditFilterSchema,
5084
+ AuditSchema,
4650
5085
  BillingPeriod,
4651
5086
  BillingSubscriptionSchema,
4652
5087
  BillingTransactionSchema,
4653
5088
  CAMPAIGN_MAX_RECIPIENTS_CEILING,
5089
+ CONCEPT_ID_PATTERN,
5090
+ CONCEPT_TYPE_PATTERN,
4654
5091
  CONSUME_MAX_UNITS,
4655
5092
  CampaignDataSourceSchema,
4656
5093
  CampaignEndKind,
@@ -4666,6 +5103,11 @@ var StudentCompletenessSchema = UserCompletenessSchema.omit([
4666
5103
  Common,
4667
5104
  CompensationType,
4668
5105
  CompletenessScoreSchema,
5106
+ ConceptFilterSchema,
5107
+ ConceptMembershipSchema,
5108
+ ConceptProposalFilterSchema,
5109
+ ConceptProposalSchema,
5110
+ ConceptSchema,
4669
5111
  ContactTypes,
4670
5112
  CoordinatorPageLinkSchema,
4671
5113
  CountryFilterSchema,
@@ -4731,6 +5173,7 @@ var StudentCompletenessSchema = UserCompletenessSchema.omit([
4731
5173
  MailingListFilterSchema,
4732
5174
  MailingListSchema,
4733
5175
  MoneySchema,
5176
+ NormalizeContextSchema,
4734
5177
  NotificationType,
4735
5178
  OccurrenceStatus,
4736
5179
  PREFILL_MIRRORED_KEYS,
@@ -4750,6 +5193,8 @@ var StudentCompletenessSchema = UserCompletenessSchema.omit([
4750
5193
  PostSchema,
4751
5194
  PostStatus,
4752
5195
  ProficiencyLevel,
5196
+ ProposalCandidateSchema,
5197
+ ProposalMessageSchema,
4753
5198
  PushSubscriptionSchema,
4754
5199
  QuestionSchema,
4755
5200
  QuestionType,
@@ -4757,9 +5202,15 @@ var StudentCompletenessSchema = UserCompletenessSchema.omit([
4757
5202
  ReadAndAcknowledgeQuestionSchema,
4758
5203
  RecruiterPageLinkSchema,
4759
5204
  ReferralSource,
5205
+ ReleaseFilterSchema,
5206
+ ReleaseSchema,
4760
5207
  ReportReason,
4761
5208
  ReportSchema,
5209
+ ResolverSettingsSchema,
5210
+ ResolverVerificationSchema,
4762
5211
  ResourceType,
5212
+ SCHEDULE_MAX_HOURS,
5213
+ SCHEDULE_MIN_HOURS,
4763
5214
  SITEMAP_FORMAT,
4764
5215
  SYSTEM_DATE_FORMAT,
4765
5216
  SavedSearchSchema,
@@ -4774,14 +5225,17 @@ var StudentCompletenessSchema = UserCompletenessSchema.omit([
4774
5225
  StudentCompletenessSchema,
4775
5226
  StudyType,
4776
5227
  SubscriptionStatus,
5228
+ SuggestedHomeSchema,
4777
5229
  SupportedAnswerChoiceTypes,
4778
5230
  SupportedApplicationReceivePreferences,
5231
+ SupportedAuditStatuses,
4779
5232
  SupportedBillingPeriods,
4780
5233
  SupportedCampaignEndKinds,
4781
5234
  SupportedCampaignIntervalUnits,
4782
5235
  SupportedCampaignStatuses,
4783
5236
  SupportedCampaignTriggerKinds,
4784
5237
  SupportedCompensationTypes,
5238
+ SupportedConceptSources,
4785
5239
  SupportedContactTypes,
4786
5240
  SupportedEducationLevels,
4787
5241
  SupportedEmployeeCounts,
@@ -4806,6 +5260,7 @@ var StudentCompletenessSchema = UserCompletenessSchema.omit([
4806
5260
  SupportedJobSearchUrgencies,
4807
5261
  SupportedJobStatuses,
4808
5262
  SupportedJobSubCategories,
5263
+ SupportedMatchTypes,
4809
5264
  SupportedNotificationTypes,
4810
5265
  SupportedOccurrenceStatuses,
4811
5266
  SupportedPaddleEnvironments,
@@ -4815,11 +5270,19 @@ var StudentCompletenessSchema = UserCompletenessSchema.omit([
4815
5270
  SupportedPlanKinds,
4816
5271
  SupportedPlanStatuses,
4817
5272
  SupportedPostStatuses,
5273
+ SupportedPrefilterRules,
4818
5274
  SupportedProficiencyLevels,
5275
+ SupportedProposalFilters,
5276
+ SupportedProposalKinds,
5277
+ SupportedProposalMessageRoles,
5278
+ SupportedProposalStatuses,
4819
5279
  SupportedQuestionTypes,
4820
5280
  SupportedQuotaPeriods,
4821
5281
  SupportedReferralSources,
5282
+ SupportedReleaseKinds,
5283
+ SupportedReleaseStatuses,
4822
5284
  SupportedReportReasons,
5285
+ SupportedResolverVerdicts,
4823
5286
  SupportedResourceTypes,
4824
5287
  SupportedSalaryCurrencies,
4825
5288
  SupportedSavedSearchStatuses,
@@ -4827,19 +5290,31 @@ var StudentCompletenessSchema = UserCompletenessSchema.omit([
4827
5290
  SupportedSocialAccounts,
4828
5291
  SupportedStudyTypes,
4829
5292
  SupportedSubscriptionStatuses,
5293
+ SupportedTaxonomyJobKinds,
5294
+ SupportedTaxonomyJobStates,
5295
+ SupportedTaxonomyNodeKinds,
5296
+ SupportedTaxonomySources,
4830
5297
  SupportedTemplateVariableBindingKinds,
4831
5298
  SupportedTransactionStatuses,
5299
+ SupportedUnmatchedReasons,
5300
+ SupportedUnmatchedResolutions,
4832
5301
  SupportedUserProfileVisibilities,
4833
5302
  SupportedUserRoles,
4834
5303
  SupportedUserStatuses,
4835
5304
  SupportedWorkModes,
4836
5305
  TAXONOMY_LABELS,
5306
+ TAXONOMY_NODE_ID_PATTERN,
5307
+ TaxonomyNodeFilterSchema,
5308
+ TaxonomyNodeSchema,
5309
+ TaxonomyScheduleSchema,
4837
5310
  TemplateVariableBindingKind,
4838
5311
  TemplateVariableBindingSchema,
4839
5312
  TerminalCampaignStatuses,
4840
5313
  TerminalGeoSyncStatuses,
4841
5314
  TermsAcceptedSchema,
4842
5315
  TransactionStatus,
5316
+ UnmatchedFilterSchema,
5317
+ UnmatchedTermSchema,
4843
5318
  UserAdditionalInfoSchema,
4844
5319
  UserCertificationSchema,
4845
5320
  UserCompletenessSchema,
@@ -4858,6 +5333,9 @@ var StudentCompletenessSchema = UserCompletenessSchema.omit([
4858
5333
  UserSchema,
4859
5334
  UserSkillSchema,
4860
5335
  UserStatus,
5336
+ VOCABULARY_ID_PATTERN,
5337
+ VocabularySchema,
5338
+ VocabularyTypeSchema,
4861
5339
  WorkExperienceSchema,
4862
5340
  WorkMode,
4863
5341
  canTransitionCampaign,