@htilabs/platform-common-models 0.1.0-beta.3 → 0.2.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/index.cjs +437 -153
- package/dist/constants/index.cjs.map +1 -1
- package/dist/constants/index.d.cts +1 -1
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +414 -153
- package/dist/constants/index.js.map +1 -1
- package/dist/index.cjs +610 -154
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +579 -154
- package/dist/index.js.map +1 -1
- package/dist/models/index.cjs +306 -1
- package/dist/models/index.cjs.map +1 -1
- package/dist/models/index.d.cts +99 -11
- package/dist/models/index.d.ts +99 -11
- package/dist/models/index.js +304 -1
- package/dist/models/index.js.map +1 -1
- package/dist/{index-Cww9rH3H.d.cts → platform-auth-C-G2qeGM.d.cts} +167 -56
- package/dist/{index-Cww9rH3H.d.ts → platform-auth-C-G2qeGM.d.ts} +167 -56
- package/dist/{scoring-rule-liZlPytD.d.cts → platform-role-AHv1l5Og.d.cts} +177 -1
- package/dist/{scoring-rule-liZlPytD.d.ts → platform-role-AHv1l5Og.d.ts} +177 -1
- package/dist/schemas/index.cjs +539 -153
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.js +533 -153
- package/dist/schemas/index.js.map +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +45 -1
- package/dist/types/index.d.ts +45 -1
- package/package.json +1 -1
- package/src/constants/ic.ts +254 -153
- package/src/constants/index.ts +1 -0
- package/src/constants/platform-auth.ts +189 -0
- package/src/models/index.ts +18 -1
- package/src/models/platformFunctionModel.ts +33 -0
- package/src/models/platformRoleModel.ts +33 -0
- package/src/schemas/index.ts +16 -0
- package/src/schemas/platform-function.ts +97 -0
- package/src/schemas/platform-role.ts +100 -0
- package/src/types/index.ts +14 -0
- package/src/types/platform-auth.ts +49 -0
package/dist/models/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/models/formModel.ts","../../src/schemas/form.ts","../../src/models/sectionModel.ts","../../src/schemas/section.ts","../../src/models/questionModel.ts","../../src/schemas/question.ts","../../src/models/scoringRuleModel.ts","../../src/schemas/scoring-rule.ts","../../src/models/index.ts"],"sourcesContent":["/**\n * @htilabs/platform-common-models — Form Model\n *\n * Factory for creating Form model bound to a specific connection.\n * Follows the platform-common-services pattern with buildSchema/compileModel.\n */\n\nimport type { Connection, Model, HydratedDocument } from \"mongoose\";\nimport { buildFormSchema, type Form } from \"../schemas/form.js\";\n\nexport type FormDoc = HydratedDocument<Form>;\n\n/**\n * Build the Form schema.\n * @returns Mongoose Schema for Form\n */\nexport { buildFormSchema as buildSchema };\n\n/**\n * Compile the Form model on a specific connection.\n * @param connection - Mongoose connection to bind the model to\n * @param schema - Optional pre-built schema (uses buildFormSchema() if not provided)\n * @returns Mongoose Model for Form\n */\nexport function compileModel(\n connection: Connection,\n schema = buildFormSchema(),\n): Model<Form> {\n return connection.model<Form>(\"Form\", schema);\n}\n","/**\n * @htilabs/platform-common-models — Form Schema\n *\n * Versioned form definitions for screening, intake, and assessment forms.\n * Forms contain ordered references to sections with display metadata.\n */\n\nimport { Schema } from \"mongoose\";\nimport type { InferRawDocType } from \"mongoose\";\n\n// ─── Form Section Reference Sub-Schema ───────────────────────────────────────\n\nexport const formSectionRefSchema = new Schema(\n {\n sectionId: { type: String, required: true },\n sectionVersion: { type: String, required: true },\n index: { type: Number, required: true },\n isStep: { type: Boolean, default: false },\n wizardStep: { type: Number },\n label: { type: String },\n presetsType: { type: String },\n },\n { _id: false },\n);\n\nexport type FormSectionRef = InferRawDocType<typeof formSectionRefSchema>;\n\n// ─── Form Schema ─────────────────────────────────────────────────────────────\n\nexport const formSchemaDefinition = {\n _schemaVersion: {\n type: Number,\n required: true,\n default: 1,\n },\n\n // Audit fields\n createdUser: {\n type: Schema.Types.ObjectId,\n required: true,\n index: true,\n },\n updatedUser: {\n type: Schema.Types.ObjectId,\n index: true,\n },\n\n // Versioning\n key: {\n type: String,\n required: true,\n },\n version: {\n type: String,\n required: true,\n },\n\n // Form info\n name: {\n type: String,\n required: true,\n },\n description: {\n type: String,\n },\n formType: {\n type: String,\n index: true,\n },\n appScope: {\n type: [String],\n enum: [\"thread\", \"pave\", \"both\"],\n default: [],\n },\n\n // Ordered sections\n sections: {\n type: [formSectionRefSchema],\n default: [],\n },\n\n // Lifecycle\n status: {\n type: String,\n required: true,\n enum: [\"draft\", \"active\", \"deprecated\"],\n default: \"draft\",\n index: true,\n },\n supersedes: {\n type: String,\n },\n};\n\nexport const formSchemaOptions = {\n timestamps: {\n createdAt: \"createdTime\",\n updatedAt: \"updatedTime\",\n },\n collection: \"forms\",\n};\n\n/**\n * Build the Form schema.\n * @returns Mongoose Schema for Form\n */\nexport function buildFormSchema(): Schema {\n const schema = new Schema(formSchemaDefinition, formSchemaOptions);\n\n // Compound unique: only one version of a given key\n schema.index({ key: 1, version: 1 }, { unique: true });\n\n // Partial unique: only one \"active\" document per key\n schema.index(\n { key: 1 },\n { unique: true, partialFilterExpression: { status: \"active\" } },\n );\n\n return schema;\n}\n\n// Pre-built schema for type inference\nconst _formSchema = buildFormSchema();\n\nexport type Form = InferRawDocType<typeof _formSchema>;\n","/**\n * @htilabs/platform-common-models — Section Model\n *\n * Factory for creating Section model bound to a specific connection.\n * Follows the platform-common-services pattern with buildSchema/compileModel.\n */\n\nimport type { Connection, Model, HydratedDocument } from \"mongoose\";\nimport { buildSectionSchema, type Section } from \"../schemas/section.js\";\n\nexport type SectionDoc = HydratedDocument<Section>;\n\n/**\n * Build the Section schema.\n * @returns Mongoose Schema for Section\n */\nexport { buildSectionSchema as buildSchema };\n\n/**\n * Compile the Section model on a specific connection.\n * @param connection - Mongoose connection to bind the model to\n * @param schema - Optional pre-built schema (uses buildSectionSchema() if not provided)\n * @returns Mongoose Model for Section\n */\nexport function compileModel(\n connection: Connection,\n schema = buildSectionSchema(),\n): Model<Section> {\n return connection.model<Section>(\"Section\", schema);\n}\n","/**\n * @htilabs/platform-common-models — Section Schema\n *\n * Logical grouping of questions within a form.\n * Sections contain ordered references to questions with display metadata.\n */\n\nimport { Schema } from \"mongoose\";\nimport type { InferRawDocType } from \"mongoose\";\n\n// ─── Section Question Reference Sub-Schema ───────────────────────────────────\n\nexport const sectionQuestionRefSchema = new Schema(\n {\n questionId: { type: String, required: true },\n questionVersion: { type: String, required: true },\n index: { type: Number, required: true },\n },\n { _id: false },\n);\n\nexport type SectionQuestionRef = InferRawDocType<\n typeof sectionQuestionRefSchema\n>;\n\n// ─── Guidance Sub-Schema ─────────────────────────────────────────────────────\n\nexport const guidanceSchema = new Schema(\n {\n type: {\n type: String,\n required: true,\n enum: [\"tip\", \"warning\", \"prompt\"],\n },\n text: { type: String, required: true },\n },\n { _id: false },\n);\n\nexport type Guidance = InferRawDocType<typeof guidanceSchema>;\n\n// ─── Section Schema ──────────────────────────────────────────────────────────\n\nexport const sectionSchemaDefinition = {\n _schemaVersion: {\n type: Number,\n required: true,\n default: 1,\n },\n\n // Audit fields\n createdUser: {\n type: Schema.Types.ObjectId,\n required: true,\n index: true,\n },\n updatedUser: {\n type: Schema.Types.ObjectId,\n index: true,\n },\n\n // Versioning\n key: {\n type: String,\n required: true,\n },\n version: {\n type: String,\n required: true,\n },\n\n // Section info\n name: {\n type: String,\n required: true,\n },\n directions: {\n type: String,\n },\n\n // Typed guidance items\n guidance: {\n type: [guidanceSchema],\n default: [],\n },\n\n // Ordered question refs\n questions: {\n type: [sectionQuestionRefSchema],\n default: [],\n },\n\n // Template visibility\n templateScope: {\n type: [String],\n default: undefined,\n },\n collapsible: {\n type: Boolean,\n default: false,\n },\n defaultCollapsed: {\n type: Boolean,\n default: false,\n },\n\n // Lifecycle\n status: {\n type: String,\n required: true,\n enum: [\"draft\", \"active\", \"deprecated\"],\n default: \"draft\",\n index: true,\n },\n supersedes: {\n type: String,\n },\n\n // PAVE-aligned optional fields\n rephrasing: {\n type: String,\n },\n script: {\n type: String,\n },\n};\n\nexport const sectionSchemaOptions = {\n timestamps: {\n createdAt: \"createdTime\",\n updatedAt: \"updatedTime\",\n },\n collection: \"sections\",\n};\n\n/**\n * Build the Section schema.\n * @returns Mongoose Schema for Section\n */\nexport function buildSectionSchema(): Schema {\n const schema = new Schema(sectionSchemaDefinition, sectionSchemaOptions);\n\n // Compound unique: only one version of a given key\n schema.index({ key: 1, version: 1 }, { unique: true });\n\n // Partial unique: only one \"active\" document per key\n schema.index(\n { key: 1 },\n { unique: true, partialFilterExpression: { status: \"active\" } },\n );\n\n return schema;\n}\n\n// Pre-built schema for type inference\nconst _sectionSchema = buildSectionSchema();\n\nexport type Section = InferRawDocType<typeof _sectionSchema>;\n","/**\n * @htilabs/platform-common-models — Question Model\n *\n * Factory for creating Question model bound to a specific connection.\n * Follows the platform-common-services pattern with buildSchema/compileModel.\n */\n\nimport type { Connection, Model, HydratedDocument } from \"mongoose\";\nimport { buildQuestionSchema, type Question } from \"../schemas/question.js\";\n\nexport type QuestionDoc = HydratedDocument<Question>;\n\n/**\n * Build the Question schema.\n * @returns Mongoose Schema for Question\n */\nexport { buildQuestionSchema as buildSchema };\n\n/**\n * Compile the Question model on a specific connection.\n * @param connection - Mongoose connection to bind the model to\n * @param schema - Optional pre-built schema (uses buildQuestionSchema() if not provided)\n * @returns Mongoose Model for Question\n */\nexport function compileModel(\n connection: Connection,\n schema = buildQuestionSchema(),\n): Model<Question> {\n return connection.model<Question>(\"Question\", schema);\n}\n","/**\n * @htilabs/platform-common-models — Question Schema\n *\n * Individual form fields with validation, choices, visibility rules, and scoring.\n * Questions support static and dynamic choices, conditional visibility, and IC code mapping.\n */\n\nimport { Schema } from \"mongoose\";\nimport type { InferRawDocType } from \"mongoose\";\n\n// ─── Choice Sub-Schema ───────────────────────────────────────────────────────\n\nexport const choiceSchema = new Schema(\n {\n val: { type: Schema.Types.Mixed, required: true },\n text: { type: String, required: true },\n tip: { type: String },\n trigger: { type: [String] },\n },\n { _id: false },\n);\n\nexport type Choice = InferRawDocType<typeof choiceSchema>;\n\n// ─── Visibility Rule Sub-Schema ──────────────────────────────────────────────\n\nexport const visibilityRuleSchema = new Schema(\n {\n dependsOn: { type: String, required: true },\n condition: {\n type: String,\n required: true,\n enum: [\"equals\", \"not_equals\", \"any_of\", \"in_range\"],\n },\n values: { type: [Schema.Types.Mixed], required: true },\n source: {\n type: String,\n enum: [\"form\", \"session\"],\n default: \"form\",\n },\n },\n { _id: false },\n);\n\nexport type VisibilityRule = InferRawDocType<typeof visibilityRuleSchema>;\n\n// ─── Layout Sub-Schema ───────────────────────────────────────────────────────\n\nexport const layoutSchema = new Schema(\n {\n columns: { type: Number, default: 1, min: 1, max: 4 },\n collapsible: { type: Boolean, default: false },\n groupKey: { type: String },\n },\n { _id: false },\n);\n\nexport type Layout = InferRawDocType<typeof layoutSchema>;\n\n// ─── Question Schema ─────────────────────────────────────────────────────────\n\nexport const questionSchemaDefinition = {\n _schemaVersion: {\n type: Number,\n required: true,\n default: 1,\n },\n\n // Audit fields\n createdUser: {\n type: Schema.Types.ObjectId,\n required: true,\n index: true,\n },\n updatedUser: {\n type: Schema.Types.ObjectId,\n index: true,\n },\n\n // Versioning\n key: {\n type: String,\n required: true,\n },\n version: {\n type: String,\n required: true,\n },\n\n // Question definition\n index: {\n type: Number,\n required: true,\n },\n text: {\n type: String,\n required: true,\n },\n format: {\n type: String,\n required: true,\n },\n sectionId: {\n type: String,\n required: true,\n },\n required: {\n type: Boolean,\n default: false,\n },\n allowMultiple: {\n type: Boolean,\n default: false,\n },\n\n // Nesting\n isNested: {\n type: Boolean,\n default: false,\n },\n nested: {\n type: [String],\n default: [],\n },\n\n // Trigger logic\n isTriggered: {\n type: Boolean,\n default: false,\n },\n triggersWhenAnswered: {\n type: [String],\n default: [],\n },\n\n // Display\n header: { type: String },\n directions: { type: String },\n tip: { type: String },\n\n // Dynamic choices\n hasDynamicChoices: {\n type: Boolean,\n default: false,\n },\n dynamicChoiceSet: { type: String },\n group: { type: String },\n\n // Static choices\n choices: {\n type: [choiceSchema],\n default: [],\n },\n\n // UI rendering hints\n componentProps: {\n type: Schema.Types.Mixed,\n },\n\n // Autofill\n autofillRules: {\n type: Schema.Types.Mixed,\n default: [],\n },\n\n // Classification\n formType: {\n type: [String],\n enum: [\"screening\", \"intake\", \"assessment\", \"demographics\"],\n default: [],\n },\n icCode: {\n type: String,\n },\n\n // Lifecycle\n status: {\n type: String,\n required: true,\n enum: [\"draft\", \"active\", \"deprecated\"],\n default: \"draft\",\n index: true,\n },\n supersedes: {\n type: String,\n },\n\n // Entity mapping (dual-write bridge)\n targetEntity: {\n type: String,\n enum: [\n \"caseSession\",\n \"protectedPerson\",\n \"perpetratorPerson\",\n \"personnelPerson\",\n \"caseRecord\",\n \"serviceInstance\",\n ],\n },\n targetField: {\n type: String,\n },\n\n // Conditional visibility\n visibilityRule: {\n type: visibilityRuleSchema,\n },\n\n // Layout hints\n layout: {\n type: layoutSchema,\n },\n microcopy: {\n type: String,\n },\n sensitivity: {\n type: String,\n enum: [\"standard\", \"sensitive\", \"highly_sensitive\"],\n },\n\n // Scoring group\n scoringGroup: {\n type: String,\n },\n\n // PAVE-aligned optional fields\n groups: {\n type: [String],\n default: undefined,\n },\n rephrasingSelector: {\n type: Schema.Types.Mixed,\n },\n textSelector: {\n type: Schema.Types.Mixed,\n },\n tipSelector: {\n type: Schema.Types.Mixed,\n },\n sortChoices: {\n type: Boolean,\n },\n isAllRequired: {\n type: Boolean,\n },\n itemLabel: {\n type: String,\n },\n prompts: {\n type: [String],\n default: undefined,\n },\n rephrasing: {\n type: String,\n },\n dynamicChoiceTrigger: {\n type: String,\n },\n};\n\nexport const questionSchemaOptions = {\n timestamps: {\n createdAt: \"createdTime\",\n updatedAt: \"updatedTime\",\n },\n collection: \"questions\",\n};\n\n/**\n * Build the Question schema.\n * @returns Mongoose Schema for Question\n */\nexport function buildQuestionSchema(): Schema {\n const schema = new Schema(questionSchemaDefinition, questionSchemaOptions);\n\n // Compound unique: only one version of a given key\n schema.index({ key: 1, version: 1 }, { unique: true });\n\n // Partial unique: only one \"active\" document per key\n schema.index(\n { key: 1 },\n { unique: true, partialFilterExpression: { status: \"active\" } },\n );\n\n // Lookup by section + order\n schema.index({ sectionId: 1, index: 1 });\n\n // IC code lookup (sparse — many questions won't have an IC code)\n schema.index({ icCode: 1 }, { sparse: true });\n\n return schema;\n}\n\n// Pre-built schema for type inference\nconst _questionSchema = buildQuestionSchema();\n\nexport type Question = InferRawDocType<typeof _questionSchema>;\n","/**\n * @htilabs/platform-common-models — ScoringRule Model\n *\n * Factory for creating ScoringRule model bound to a specific connection.\n * Follows the platform-common-services pattern with buildSchema/compileModel.\n */\n\nimport type { Connection, Model, HydratedDocument } from \"mongoose\";\nimport {\n buildScoringRuleSchema,\n type ScoringRule,\n} from \"../schemas/scoring-rule.js\";\n\nexport type ScoringRuleDoc = HydratedDocument<ScoringRule>;\n\n/**\n * Build the ScoringRule schema.\n * @returns Mongoose Schema for ScoringRule\n */\nexport { buildScoringRuleSchema as buildSchema };\n\n/**\n * Compile the ScoringRule model on a specific connection.\n * @param connection - Mongoose connection to bind the model to\n * @param schema - Optional pre-built schema (uses buildScoringRuleSchema() if not provided)\n * @returns Mongoose Model for ScoringRule\n */\nexport function compileModel(\n connection: Connection,\n schema = buildScoringRuleSchema(),\n): Model<ScoringRule> {\n return connection.model<ScoringRule>(\"ScoringRule\", schema);\n}\n","/**\n * @htilabs/platform-common-models — Scoring Rule Schema\n *\n * Evaluation rules for screening and assessment instruments.\n * Defines conditions to evaluate, score thresholds, and risk level recommendations.\n */\n\nimport { Schema } from \"mongoose\";\nimport type { InferRawDocType } from \"mongoose\";\n\n// ─── Scoring Condition Sub-Schema ────────────────────────────────────────────\n\nexport const scoringConditionSchema = new Schema(\n {\n questionKey: { type: String, required: true },\n operator: {\n type: String,\n required: true,\n enum: [\"eq\", \"ne\", \"in\", \"not_in\", \"gt\", \"gte\", \"lt\", \"lte\"],\n },\n value: { type: Schema.Types.Mixed, required: true },\n weight: { type: Number, required: true },\n },\n { _id: false },\n);\n\nexport type ScoringCondition = InferRawDocType<typeof scoringConditionSchema>;\n\n// ─── Scoring Threshold Sub-Schema ────────────────────────────────────────────\n\nexport const scoringThresholdSchema = new Schema(\n {\n minScore: { type: Number, required: true },\n maxScore: { type: Number, required: true },\n riskLevel: { type: String, required: true },\n label: { type: String, required: true },\n },\n { _id: false },\n);\n\nexport type ScoringThreshold = InferRawDocType<typeof scoringThresholdSchema>;\n\n// ─── Scoring Recommendation Sub-Schema ───────────────────────────────────────\n\nexport const scoringRecommendationSchema = new Schema(\n {\n riskLevel: { type: String, required: true },\n action: { type: String, required: true },\n description: { type: String, required: true },\n },\n { _id: false },\n);\n\nexport type ScoringRecommendation = InferRawDocType<\n typeof scoringRecommendationSchema\n>;\n\n// ─── Scoring Rule Schema ─────────────────────────────────────────────────────\n\nexport const scoringRuleSchemaDefinition = {\n _schemaVersion: {\n type: Number,\n required: true,\n default: 1,\n },\n\n // Audit fields\n createdUser: {\n type: Schema.Types.ObjectId,\n required: true,\n index: true,\n },\n updatedUser: {\n type: Schema.Types.ObjectId,\n index: true,\n },\n\n // Reference to Form (cross-db string, not ObjectId)\n formId: {\n type: String,\n required: true,\n },\n formVersion: {\n type: String,\n required: true,\n },\n\n // Rule info\n name: {\n type: String,\n required: true,\n },\n version: {\n type: String,\n required: true,\n },\n appScope: {\n type: [String],\n enum: [\"thread\", \"pave\", \"both\"],\n default: [],\n },\n\n // Lifecycle\n status: {\n type: String,\n required: true,\n enum: [\"draft\", \"active\", \"deprecated\"],\n default: \"draft\",\n index: true,\n },\n effectiveDate: {\n type: Date,\n },\n deprecatedDate: {\n type: Date,\n },\n replacedBy: {\n type: String,\n },\n\n // Scoring logic\n conditions: {\n type: [scoringConditionSchema],\n default: [],\n },\n thresholds: {\n type: [scoringThresholdSchema],\n default: [],\n },\n recommendations: {\n type: [scoringRecommendationSchema],\n default: [],\n },\n};\n\nexport const scoringRuleSchemaOptions = {\n timestamps: {\n createdAt: \"createdTime\",\n updatedAt: \"updatedTime\",\n },\n collection: \"scoringrules\",\n};\n\n/**\n * Build the ScoringRule schema.\n * @returns Mongoose Schema for ScoringRule\n */\nexport function buildScoringRuleSchema(): Schema {\n const schema = new Schema(\n scoringRuleSchemaDefinition,\n scoringRuleSchemaOptions,\n );\n\n // Compound unique: one rule name per form version\n schema.index(\n { formId: 1, formVersion: 1, version: 1, name: 1 },\n { unique: true },\n );\n\n // Lookup active rules for a form\n schema.index({ formId: 1, formVersion: 1, status: 1 });\n\n return schema;\n}\n\n// Pre-built schema for type inference\nconst _scoringRuleSchema = buildScoringRuleSchema();\n\nexport type ScoringRule = InferRawDocType<typeof _scoringRuleSchema>;\n","/**\n * @htilabs/platform-common-models — Models\n *\n * Mongoose model factories for platform models.\n * Each model exports buildSchema() and compileModel(connection) functions.\n *\n * Usage:\n * ```typescript\n * import { createPlatformModels } from '@htilabs/platform-common-models/models';\n * import mongoose from 'mongoose';\n *\n * const platformDb = mongoose.createConnection(PLATFORM_DB_URI);\n * const { FormModel, SectionModel, QuestionModel, ScoringRuleModel } = createPlatformModels(platformDb);\n * ```\n */\n\nimport type { Connection, Model } from \"mongoose\";\n\n// Individual model factories\nimport * as formModel from \"./formModel.js\";\nimport * as sectionModel from \"./sectionModel.js\";\nimport * as questionModel from \"./questionModel.js\";\nimport * as scoringRuleModel from \"./scoringRuleModel.js\";\n\n// Re-export individual model factories\nexport { formModel, sectionModel, questionModel, scoringRuleModel };\n\n// Re-export types\nexport type { FormDoc } from \"./formModel.js\";\nexport type { SectionDoc } from \"./sectionModel.js\";\nexport type { QuestionDoc } from \"./questionModel.js\";\nexport type { ScoringRuleDoc } from \"./scoringRuleModel.js\";\n\n// Re-export schema types\nexport type { Form } from \"../schemas/form.js\";\nexport type { Section } from \"../schemas/section.js\";\nexport type { Question } from \"../schemas/question.js\";\nexport type { ScoringRule } from \"../schemas/scoring-rule.js\";\n\n/**\n * Platform models interface returned by createPlatformModels.\n */\nexport interface PlatformModels {\n FormModel: Model<import(\"../schemas/form.js\").Form>;\n SectionModel: Model<import(\"../schemas/section.js\").Section>;\n QuestionModel: Model<import(\"../schemas/question.js\").Question>;\n ScoringRuleModel: Model<import(\"../schemas/scoring-rule.js\").ScoringRule>;\n}\n\n/**\n * Create all platform models bound to a single connection.\n * Convenience function for apps that need all form-related models.\n *\n * @param connection - Mongoose connection to bind all models to\n * @returns Object with all compiled models\n *\n * @example\n * ```typescript\n * const platformDb = mongoose.createConnection(PLATFORM_DB_URI);\n * const { FormModel, SectionModel, QuestionModel, ScoringRuleModel } = createPlatformModels(platformDb);\n *\n * const forms = await FormModel.find({ status: 'active' });\n * ```\n */\nexport function createPlatformModels(connection: Connection): PlatformModels {\n return {\n FormModel: formModel.compileModel(connection),\n SectionModel: sectionModel.compileModel(connection),\n QuestionModel: questionModel.compileModel(connection),\n ScoringRuleModel: scoringRuleModel.compileModel(connection),\n };\n}\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACOA,SAAS,cAAc;AAKhB,IAAM,uBAAuB,IAAI;AAAA,EACtC;AAAA,IACE,WAAW,EAAE,MAAM,QAAQ,UAAU,KAAK;AAAA,IAC1C,gBAAgB,EAAE,MAAM,QAAQ,UAAU,KAAK;AAAA,IAC/C,OAAO,EAAE,MAAM,QAAQ,UAAU,KAAK;AAAA,IACtC,QAAQ,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,IACxC,YAAY,EAAE,MAAM,OAAO;AAAA,IAC3B,OAAO,EAAE,MAAM,OAAO;AAAA,IACtB,aAAa,EAAE,MAAM,OAAO;AAAA,EAC9B;AAAA,EACA,EAAE,KAAK,MAAM;AACf;AAMO,IAAM,uBAAuB;AAAA,EAClC,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,UAAU;AAAA,IAC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,YAAwC;AAC3E,SAAO;AAAA,IACL,WAAqB,aAAa,UAAU;AAAA,IAC5C,cAA2BC,cAAa,UAAU;AAAA,IAClD,eAA6BA,cAAa,UAAU;AAAA,IACpD,kBAAmCA,cAAa,UAAU;AAAA,EAC5D;AACF;","names":["compileModel","Schema","compileModel","compileModel","Schema","compileModel","compileModel","Schema","compileModel","compileModel"]}
|
|
1
|
+
{"version":3,"sources":["../../src/models/formModel.ts","../../src/schemas/form.ts","../../src/models/sectionModel.ts","../../src/schemas/section.ts","../../src/models/questionModel.ts","../../src/schemas/question.ts","../../src/models/scoringRuleModel.ts","../../src/schemas/scoring-rule.ts","../../src/models/platformFunctionModel.ts","../../src/schemas/platform-function.ts","../../src/constants/platform-auth.ts","../../src/models/platformRoleModel.ts","../../src/schemas/platform-role.ts","../../src/models/index.ts"],"sourcesContent":["/**\n * @htilabs/platform-common-models — Form Model\n *\n * Factory for creating Form model bound to a specific connection.\n * Follows the platform-common-services pattern with buildSchema/compileModel.\n */\n\nimport type { Connection, Model, HydratedDocument } from \"mongoose\";\nimport { buildFormSchema, type Form } from \"../schemas/form.js\";\n\nexport type FormDoc = HydratedDocument<Form>;\n\n/**\n * Build the Form schema.\n * @returns Mongoose Schema for Form\n */\nexport { buildFormSchema as buildSchema };\n\n/**\n * Compile the Form model on a specific connection.\n * @param connection - Mongoose connection to bind the model to\n * @param schema - Optional pre-built schema (uses buildFormSchema() if not provided)\n * @returns Mongoose Model for Form\n */\nexport function compileModel(\n connection: Connection,\n schema = buildFormSchema(),\n): Model<Form> {\n return connection.model<Form>(\"Form\", schema);\n}\n","/**\n * @htilabs/platform-common-models — Form Schema\n *\n * Versioned form definitions for screening, intake, and assessment forms.\n * Forms contain ordered references to sections with display metadata.\n */\n\nimport { Schema } from \"mongoose\";\nimport type { InferRawDocType } from \"mongoose\";\n\n// ─── Form Section Reference Sub-Schema ───────────────────────────────────────\n\nexport const formSectionRefSchema = new Schema(\n {\n sectionId: { type: String, required: true },\n sectionVersion: { type: String, required: true },\n index: { type: Number, required: true },\n isStep: { type: Boolean, default: false },\n wizardStep: { type: Number },\n label: { type: String },\n presetsType: { type: String },\n },\n { _id: false },\n);\n\nexport type FormSectionRef = InferRawDocType<typeof formSectionRefSchema>;\n\n// ─── Form Schema ─────────────────────────────────────────────────────────────\n\nexport const formSchemaDefinition = {\n _schemaVersion: {\n type: Number,\n required: true,\n default: 1,\n },\n\n // Audit fields\n createdUser: {\n type: Schema.Types.ObjectId,\n required: true,\n index: true,\n },\n updatedUser: {\n type: Schema.Types.ObjectId,\n index: true,\n },\n\n // Versioning\n key: {\n type: String,\n required: true,\n },\n version: {\n type: String,\n required: true,\n },\n\n // Form info\n name: {\n type: String,\n required: true,\n },\n description: {\n type: String,\n },\n formType: {\n type: String,\n index: true,\n },\n appScope: {\n type: [String],\n enum: [\"thread\", \"pave\", \"both\"],\n default: [],\n },\n\n // Ordered sections\n sections: {\n type: [formSectionRefSchema],\n default: [],\n },\n\n // Lifecycle\n status: {\n type: String,\n required: true,\n enum: [\"draft\", \"active\", \"deprecated\"],\n default: \"draft\",\n index: true,\n },\n supersedes: {\n type: String,\n },\n};\n\nexport const formSchemaOptions = {\n timestamps: {\n createdAt: \"createdTime\",\n updatedAt: \"updatedTime\",\n },\n collection: \"forms\",\n};\n\n/**\n * Build the Form schema.\n * @returns Mongoose Schema for Form\n */\nexport function buildFormSchema(): Schema {\n const schema = new Schema(formSchemaDefinition, formSchemaOptions);\n\n // Compound unique: only one version of a given key\n schema.index({ key: 1, version: 1 }, { unique: true });\n\n // Partial unique: only one \"active\" document per key\n schema.index(\n { key: 1 },\n { unique: true, partialFilterExpression: { status: \"active\" } },\n );\n\n return schema;\n}\n\n// Pre-built schema for type inference\nconst _formSchema = buildFormSchema();\n\nexport type Form = InferRawDocType<typeof _formSchema>;\n","/**\n * @htilabs/platform-common-models — Section Model\n *\n * Factory for creating Section model bound to a specific connection.\n * Follows the platform-common-services pattern with buildSchema/compileModel.\n */\n\nimport type { Connection, Model, HydratedDocument } from \"mongoose\";\nimport { buildSectionSchema, type Section } from \"../schemas/section.js\";\n\nexport type SectionDoc = HydratedDocument<Section>;\n\n/**\n * Build the Section schema.\n * @returns Mongoose Schema for Section\n */\nexport { buildSectionSchema as buildSchema };\n\n/**\n * Compile the Section model on a specific connection.\n * @param connection - Mongoose connection to bind the model to\n * @param schema - Optional pre-built schema (uses buildSectionSchema() if not provided)\n * @returns Mongoose Model for Section\n */\nexport function compileModel(\n connection: Connection,\n schema = buildSectionSchema(),\n): Model<Section> {\n return connection.model<Section>(\"Section\", schema);\n}\n","/**\n * @htilabs/platform-common-models — Section Schema\n *\n * Logical grouping of questions within a form.\n * Sections contain ordered references to questions with display metadata.\n */\n\nimport { Schema } from \"mongoose\";\nimport type { InferRawDocType } from \"mongoose\";\n\n// ─── Section Question Reference Sub-Schema ───────────────────────────────────\n\nexport const sectionQuestionRefSchema = new Schema(\n {\n questionId: { type: String, required: true },\n questionVersion: { type: String, required: true },\n index: { type: Number, required: true },\n },\n { _id: false },\n);\n\nexport type SectionQuestionRef = InferRawDocType<\n typeof sectionQuestionRefSchema\n>;\n\n// ─── Guidance Sub-Schema ─────────────────────────────────────────────────────\n\nexport const guidanceSchema = new Schema(\n {\n type: {\n type: String,\n required: true,\n enum: [\"tip\", \"warning\", \"prompt\"],\n },\n text: { type: String, required: true },\n },\n { _id: false },\n);\n\nexport type Guidance = InferRawDocType<typeof guidanceSchema>;\n\n// ─── Section Schema ──────────────────────────────────────────────────────────\n\nexport const sectionSchemaDefinition = {\n _schemaVersion: {\n type: Number,\n required: true,\n default: 1,\n },\n\n // Audit fields\n createdUser: {\n type: Schema.Types.ObjectId,\n required: true,\n index: true,\n },\n updatedUser: {\n type: Schema.Types.ObjectId,\n index: true,\n },\n\n // Versioning\n key: {\n type: String,\n required: true,\n },\n version: {\n type: String,\n required: true,\n },\n\n // Section info\n name: {\n type: String,\n required: true,\n },\n directions: {\n type: String,\n },\n\n // Typed guidance items\n guidance: {\n type: [guidanceSchema],\n default: [],\n },\n\n // Ordered question refs\n questions: {\n type: [sectionQuestionRefSchema],\n default: [],\n },\n\n // Template visibility\n templateScope: {\n type: [String],\n default: undefined,\n },\n collapsible: {\n type: Boolean,\n default: false,\n },\n defaultCollapsed: {\n type: Boolean,\n default: false,\n },\n\n // Lifecycle\n status: {\n type: String,\n required: true,\n enum: [\"draft\", \"active\", \"deprecated\"],\n default: \"draft\",\n index: true,\n },\n supersedes: {\n type: String,\n },\n\n // PAVE-aligned optional fields\n rephrasing: {\n type: String,\n },\n script: {\n type: String,\n },\n};\n\nexport const sectionSchemaOptions = {\n timestamps: {\n createdAt: \"createdTime\",\n updatedAt: \"updatedTime\",\n },\n collection: \"sections\",\n};\n\n/**\n * Build the Section schema.\n * @returns Mongoose Schema for Section\n */\nexport function buildSectionSchema(): Schema {\n const schema = new Schema(sectionSchemaDefinition, sectionSchemaOptions);\n\n // Compound unique: only one version of a given key\n schema.index({ key: 1, version: 1 }, { unique: true });\n\n // Partial unique: only one \"active\" document per key\n schema.index(\n { key: 1 },\n { unique: true, partialFilterExpression: { status: \"active\" } },\n );\n\n return schema;\n}\n\n// Pre-built schema for type inference\nconst _sectionSchema = buildSectionSchema();\n\nexport type Section = InferRawDocType<typeof _sectionSchema>;\n","/**\n * @htilabs/platform-common-models — Question Model\n *\n * Factory for creating Question model bound to a specific connection.\n * Follows the platform-common-services pattern with buildSchema/compileModel.\n */\n\nimport type { Connection, Model, HydratedDocument } from \"mongoose\";\nimport { buildQuestionSchema, type Question } from \"../schemas/question.js\";\n\nexport type QuestionDoc = HydratedDocument<Question>;\n\n/**\n * Build the Question schema.\n * @returns Mongoose Schema for Question\n */\nexport { buildQuestionSchema as buildSchema };\n\n/**\n * Compile the Question model on a specific connection.\n * @param connection - Mongoose connection to bind the model to\n * @param schema - Optional pre-built schema (uses buildQuestionSchema() if not provided)\n * @returns Mongoose Model for Question\n */\nexport function compileModel(\n connection: Connection,\n schema = buildQuestionSchema(),\n): Model<Question> {\n return connection.model<Question>(\"Question\", schema);\n}\n","/**\n * @htilabs/platform-common-models — Question Schema\n *\n * Individual form fields with validation, choices, visibility rules, and scoring.\n * Questions support static and dynamic choices, conditional visibility, and IC code mapping.\n */\n\nimport { Schema } from \"mongoose\";\nimport type { InferRawDocType } from \"mongoose\";\n\n// ─── Choice Sub-Schema ───────────────────────────────────────────────────────\n\nexport const choiceSchema = new Schema(\n {\n val: { type: Schema.Types.Mixed, required: true },\n text: { type: String, required: true },\n tip: { type: String },\n trigger: { type: [String] },\n },\n { _id: false },\n);\n\nexport type Choice = InferRawDocType<typeof choiceSchema>;\n\n// ─── Visibility Rule Sub-Schema ──────────────────────────────────────────────\n\nexport const visibilityRuleSchema = new Schema(\n {\n dependsOn: { type: String, required: true },\n condition: {\n type: String,\n required: true,\n enum: [\"equals\", \"not_equals\", \"any_of\", \"in_range\"],\n },\n values: { type: [Schema.Types.Mixed], required: true },\n source: {\n type: String,\n enum: [\"form\", \"session\"],\n default: \"form\",\n },\n },\n { _id: false },\n);\n\nexport type VisibilityRule = InferRawDocType<typeof visibilityRuleSchema>;\n\n// ─── Layout Sub-Schema ───────────────────────────────────────────────────────\n\nexport const layoutSchema = new Schema(\n {\n columns: { type: Number, default: 1, min: 1, max: 4 },\n collapsible: { type: Boolean, default: false },\n groupKey: { type: String },\n },\n { _id: false },\n);\n\nexport type Layout = InferRawDocType<typeof layoutSchema>;\n\n// ─── Question Schema ─────────────────────────────────────────────────────────\n\nexport const questionSchemaDefinition = {\n _schemaVersion: {\n type: Number,\n required: true,\n default: 1,\n },\n\n // Audit fields\n createdUser: {\n type: Schema.Types.ObjectId,\n required: true,\n index: true,\n },\n updatedUser: {\n type: Schema.Types.ObjectId,\n index: true,\n },\n\n // Versioning\n key: {\n type: String,\n required: true,\n },\n version: {\n type: String,\n required: true,\n },\n\n // Question definition\n index: {\n type: Number,\n required: true,\n },\n text: {\n type: String,\n required: true,\n },\n format: {\n type: String,\n required: true,\n },\n sectionId: {\n type: String,\n required: true,\n },\n required: {\n type: Boolean,\n default: false,\n },\n allowMultiple: {\n type: Boolean,\n default: false,\n },\n\n // Nesting\n isNested: {\n type: Boolean,\n default: false,\n },\n nested: {\n type: [String],\n default: [],\n },\n\n // Trigger logic\n isTriggered: {\n type: Boolean,\n default: false,\n },\n triggersWhenAnswered: {\n type: [String],\n default: [],\n },\n\n // Display\n header: { type: String },\n directions: { type: String },\n tip: { type: String },\n\n // Dynamic choices\n hasDynamicChoices: {\n type: Boolean,\n default: false,\n },\n dynamicChoiceSet: { type: String },\n group: { type: String },\n\n // Static choices\n choices: {\n type: [choiceSchema],\n default: [],\n },\n\n // UI rendering hints\n componentProps: {\n type: Schema.Types.Mixed,\n },\n\n // Autofill\n autofillRules: {\n type: Schema.Types.Mixed,\n default: [],\n },\n\n // Classification\n formType: {\n type: [String],\n enum: [\"screening\", \"intake\", \"assessment\", \"demographics\"],\n default: [],\n },\n icCode: {\n type: String,\n },\n\n // Lifecycle\n status: {\n type: String,\n required: true,\n enum: [\"draft\", \"active\", \"deprecated\"],\n default: \"draft\",\n index: true,\n },\n supersedes: {\n type: String,\n },\n\n // Entity mapping (dual-write bridge)\n targetEntity: {\n type: String,\n enum: [\n \"caseSession\",\n \"protectedPerson\",\n \"perpetratorPerson\",\n \"personnelPerson\",\n \"caseRecord\",\n \"serviceInstance\",\n ],\n },\n targetField: {\n type: String,\n },\n\n // Conditional visibility\n visibilityRule: {\n type: visibilityRuleSchema,\n },\n\n // Layout hints\n layout: {\n type: layoutSchema,\n },\n microcopy: {\n type: String,\n },\n sensitivity: {\n type: String,\n enum: [\"standard\", \"sensitive\", \"highly_sensitive\"],\n },\n\n // Scoring group\n scoringGroup: {\n type: String,\n },\n\n // PAVE-aligned optional fields\n groups: {\n type: [String],\n default: undefined,\n },\n rephrasingSelector: {\n type: Schema.Types.Mixed,\n },\n textSelector: {\n type: Schema.Types.Mixed,\n },\n tipSelector: {\n type: Schema.Types.Mixed,\n },\n sortChoices: {\n type: Boolean,\n },\n isAllRequired: {\n type: Boolean,\n },\n itemLabel: {\n type: String,\n },\n prompts: {\n type: [String],\n default: undefined,\n },\n rephrasing: {\n type: String,\n },\n dynamicChoiceTrigger: {\n type: String,\n },\n};\n\nexport const questionSchemaOptions = {\n timestamps: {\n createdAt: \"createdTime\",\n updatedAt: \"updatedTime\",\n },\n collection: \"questions\",\n};\n\n/**\n * Build the Question schema.\n * @returns Mongoose Schema for Question\n */\nexport function buildQuestionSchema(): Schema {\n const schema = new Schema(questionSchemaDefinition, questionSchemaOptions);\n\n // Compound unique: only one version of a given key\n schema.index({ key: 1, version: 1 }, { unique: true });\n\n // Partial unique: only one \"active\" document per key\n schema.index(\n { key: 1 },\n { unique: true, partialFilterExpression: { status: \"active\" } },\n );\n\n // Lookup by section + order\n schema.index({ sectionId: 1, index: 1 });\n\n // IC code lookup (sparse — many questions won't have an IC code)\n schema.index({ icCode: 1 }, { sparse: true });\n\n return schema;\n}\n\n// Pre-built schema for type inference\nconst _questionSchema = buildQuestionSchema();\n\nexport type Question = InferRawDocType<typeof _questionSchema>;\n","/**\n * @htilabs/platform-common-models — ScoringRule Model\n *\n * Factory for creating ScoringRule model bound to a specific connection.\n * Follows the platform-common-services pattern with buildSchema/compileModel.\n */\n\nimport type { Connection, Model, HydratedDocument } from \"mongoose\";\nimport {\n buildScoringRuleSchema,\n type ScoringRule,\n} from \"../schemas/scoring-rule.js\";\n\nexport type ScoringRuleDoc = HydratedDocument<ScoringRule>;\n\n/**\n * Build the ScoringRule schema.\n * @returns Mongoose Schema for ScoringRule\n */\nexport { buildScoringRuleSchema as buildSchema };\n\n/**\n * Compile the ScoringRule model on a specific connection.\n * @param connection - Mongoose connection to bind the model to\n * @param schema - Optional pre-built schema (uses buildScoringRuleSchema() if not provided)\n * @returns Mongoose Model for ScoringRule\n */\nexport function compileModel(\n connection: Connection,\n schema = buildScoringRuleSchema(),\n): Model<ScoringRule> {\n return connection.model<ScoringRule>(\"ScoringRule\", schema);\n}\n","/**\n * @htilabs/platform-common-models — Scoring Rule Schema\n *\n * Evaluation rules for screening and assessment instruments.\n * Defines conditions to evaluate, score thresholds, and risk level recommendations.\n */\n\nimport { Schema } from \"mongoose\";\nimport type { InferRawDocType } from \"mongoose\";\n\n// ─── Scoring Condition Sub-Schema ────────────────────────────────────────────\n\nexport const scoringConditionSchema = new Schema(\n {\n questionKey: { type: String, required: true },\n operator: {\n type: String,\n required: true,\n enum: [\"eq\", \"ne\", \"in\", \"not_in\", \"gt\", \"gte\", \"lt\", \"lte\"],\n },\n value: { type: Schema.Types.Mixed, required: true },\n weight: { type: Number, required: true },\n },\n { _id: false },\n);\n\nexport type ScoringCondition = InferRawDocType<typeof scoringConditionSchema>;\n\n// ─── Scoring Threshold Sub-Schema ────────────────────────────────────────────\n\nexport const scoringThresholdSchema = new Schema(\n {\n minScore: { type: Number, required: true },\n maxScore: { type: Number, required: true },\n riskLevel: { type: String, required: true },\n label: { type: String, required: true },\n },\n { _id: false },\n);\n\nexport type ScoringThreshold = InferRawDocType<typeof scoringThresholdSchema>;\n\n// ─── Scoring Recommendation Sub-Schema ───────────────────────────────────────\n\nexport const scoringRecommendationSchema = new Schema(\n {\n riskLevel: { type: String, required: true },\n action: { type: String, required: true },\n description: { type: String, required: true },\n },\n { _id: false },\n);\n\nexport type ScoringRecommendation = InferRawDocType<\n typeof scoringRecommendationSchema\n>;\n\n// ─── Scoring Rule Schema ─────────────────────────────────────────────────────\n\nexport const scoringRuleSchemaDefinition = {\n _schemaVersion: {\n type: Number,\n required: true,\n default: 1,\n },\n\n // Audit fields\n createdUser: {\n type: Schema.Types.ObjectId,\n required: true,\n index: true,\n },\n updatedUser: {\n type: Schema.Types.ObjectId,\n index: true,\n },\n\n // Reference to Form (cross-db string, not ObjectId)\n formId: {\n type: String,\n required: true,\n },\n formVersion: {\n type: String,\n required: true,\n },\n\n // Rule info\n name: {\n type: String,\n required: true,\n },\n version: {\n type: String,\n required: true,\n },\n appScope: {\n type: [String],\n enum: [\"thread\", \"pave\", \"both\"],\n default: [],\n },\n\n // Lifecycle\n status: {\n type: String,\n required: true,\n enum: [\"draft\", \"active\", \"deprecated\"],\n default: \"draft\",\n index: true,\n },\n effectiveDate: {\n type: Date,\n },\n deprecatedDate: {\n type: Date,\n },\n replacedBy: {\n type: String,\n },\n\n // Scoring logic\n conditions: {\n type: [scoringConditionSchema],\n default: [],\n },\n thresholds: {\n type: [scoringThresholdSchema],\n default: [],\n },\n recommendations: {\n type: [scoringRecommendationSchema],\n default: [],\n },\n};\n\nexport const scoringRuleSchemaOptions = {\n timestamps: {\n createdAt: \"createdTime\",\n updatedAt: \"updatedTime\",\n },\n collection: \"scoringrules\",\n};\n\n/**\n * Build the ScoringRule schema.\n * @returns Mongoose Schema for ScoringRule\n */\nexport function buildScoringRuleSchema(): Schema {\n const schema = new Schema(\n scoringRuleSchemaDefinition,\n scoringRuleSchemaOptions,\n );\n\n // Compound unique: one rule name per form version\n schema.index(\n { formId: 1, formVersion: 1, version: 1, name: 1 },\n { unique: true },\n );\n\n // Lookup active rules for a form\n schema.index({ formId: 1, formVersion: 1, status: 1 });\n\n return schema;\n}\n\n// Pre-built schema for type inference\nconst _scoringRuleSchema = buildScoringRuleSchema();\n\nexport type ScoringRule = InferRawDocType<typeof _scoringRuleSchema>;\n","/**\n * @htilabs/platform-common-models — PlatformFunction Model\n *\n * Factory for creating PlatformFunction model bound to a specific connection.\n * Follows the platform-common-services pattern with buildSchema/compileModel.\n */\n\nimport type { Connection, Model, HydratedDocument } from \"mongoose\";\nimport {\n buildPlatformFunctionSchema,\n type PlatformFunction,\n} from \"../schemas/platform-function.js\";\n\nexport type PlatformFunctionDoc = HydratedDocument<PlatformFunction>;\n\n/**\n * Build the PlatformFunction schema.\n * @returns Mongoose Schema for PlatformFunction\n */\nexport { buildPlatformFunctionSchema as buildSchema };\n\n/**\n * Compile the PlatformFunction model on a specific connection.\n * @param connection - Mongoose connection to bind the model to\n * @param schema - Optional pre-built schema (uses buildPlatformFunctionSchema() if not provided)\n * @returns Mongoose Model for PlatformFunction\n */\nexport function compileModel(\n connection: Connection,\n schema = buildPlatformFunctionSchema(),\n): Model<PlatformFunction> {\n return connection.model<PlatformFunction>(\"PlatformFunction\", schema);\n}\n","/**\n * @htilabs/platform-common-models — Platform Function Schema\n *\n * Mongoose schema for the `platformFunctions` collection.\n * Each document represents a discrete action that can be performed\n * within the platform, with tool scope and admin/user relevance flags.\n */\n\nimport { Schema } from \"mongoose\";\nimport type { InferRawDocType } from \"mongoose\";\nimport {\n PLATFORM_TOOL_VALUES,\n FUNCTION_STATUS_VALUES,\n} from \"../constants/platform-auth.js\";\n\n// ─── Schema Definition ──────────────────────────────────────────────\n\nexport const platformFunctionSchemaDefinition = {\n code: {\n type: String,\n required: true,\n },\n label: {\n type: String,\n required: true,\n },\n description: {\n type: String,\n default: \"\",\n },\n category: {\n type: String,\n default: \"\",\n },\n tools: {\n type: [String],\n enum: [...PLATFORM_TOOL_VALUES],\n default: [],\n },\n isAdminRelevant: {\n type: Boolean,\n default: false,\n },\n isUserRelevant: {\n type: Boolean,\n default: false,\n },\n isHtiOnly: {\n type: Boolean,\n default: false,\n },\n status: {\n type: String,\n enum: [...FUNCTION_STATUS_VALUES],\n default: \"Not started\",\n },\n sortOrder: {\n type: Number,\n default: 0,\n },\n};\n\nexport const platformFunctionSchemaOptions = {\n timestamps: {\n createdAt: \"createdTime\",\n updatedAt: \"updatedTime\",\n },\n collection: \"platformFunctions\",\n};\n\n// ─── Schema Builder ─────────────────────────────────────────────────\n\n/**\n * Build the PlatformFunction schema.\n * @returns Mongoose Schema for PlatformFunction\n */\nexport function buildPlatformFunctionSchema(): Schema {\n const schema = new Schema(\n platformFunctionSchemaDefinition,\n platformFunctionSchemaOptions,\n );\n\n // Unique index on function code\n schema.index({ code: 1 }, { unique: true });\n\n // Lookup indexes\n schema.index({ tools: 1 });\n schema.index({ category: 1 });\n schema.index({ sortOrder: 1 });\n\n return schema;\n}\n\n// ─── Type Inference ─────────────────────────────────────────────────\n\nconst _platformFunctionSchema = buildPlatformFunctionSchema();\nexport type PlatformFunction = InferRawDocType<typeof _platformFunctionSchema>;\n","/**\n * @htilabs/platform-common-models — Platform Authorization Constants\n *\n * Enums and labels for the platform role/function permission model.\n * Includes permission states, share view levels, tool codes, role levels,\n * and function implementation statuses.\n *\n * Source: PLATFORM_AUTH_SPEC.md Sections 5 + 6\n */\n\n// ─── Permission State (4-state role→function mapping) ──────────────\n\nexport const PERMISSION_STATE = {\n /** Role can always perform this function (mandatory, cannot disable). */\n ALWAYS: \"ALWAYS\",\n /** Default On — user can opt off. */\n PREF_YES: \"PREF_YES\",\n /** Default Off — user can opt in. */\n PREF_NO: \"PREF_NO\",\n /** Role is explicitly barred from this function. */\n NEVER: \"NEVER\",\n} as const;\n\nexport type PermissionStateValue =\n (typeof PERMISSION_STATE)[keyof typeof PERMISSION_STATE];\n\nexport const PERMISSION_STATE_VALUES = [\n PERMISSION_STATE.ALWAYS,\n PERMISSION_STATE.PREF_YES,\n PERMISSION_STATE.PREF_NO,\n PERMISSION_STATE.NEVER,\n] as const;\n\nexport const PERMISSION_STATE_LABELS: Record<PermissionStateValue, string> = {\n [PERMISSION_STATE.ALWAYS]: \"Always\",\n [PERMISSION_STATE.PREF_YES]: \"Default On\",\n [PERMISSION_STATE.PREF_NO]: \"Default Off\",\n [PERMISSION_STATE.NEVER]: \"Never\",\n};\n\n/** UI display metadata for permission states (colors, icons). */\nexport const PERMISSION_STATE_DISPLAY: Record<\n PermissionStateValue,\n { label: string; color: string; bgColor: string; icon: string }\n> = {\n [PERMISSION_STATE.ALWAYS]: {\n label: \"Always\",\n color: \"#2e7d32\",\n bgColor: \"#e8f5e9\",\n icon: \"\\u{1F512}\",\n },\n [PERMISSION_STATE.PREF_YES]: {\n label: \"Default On\",\n color: \"#1565c0\",\n bgColor: \"#e3f2fd\",\n icon: \"\\u{1F513}\",\n },\n [PERMISSION_STATE.PREF_NO]: {\n label: \"Default Off\",\n color: \"#e65100\",\n bgColor: \"#fff3e0\",\n icon: \"\\u{1F513}\",\n },\n [PERMISSION_STATE.NEVER]: {\n label: \"Never\",\n color: \"#c62828\",\n bgColor: \"#ffebee\",\n icon: \"\\u{1F512}\",\n },\n};\n\n// ─── Share View (data visibility for shared records) ───────────────\n\nexport const SHARE_VIEW = {\n /** System metadata only (partial access). */\n SYS_INFO: \"sys_info\",\n /** Full case/record content. */\n ALL: \"all\",\n /** No data access. */\n NONE: \"none\",\n} as const;\n\nexport type ShareViewValue = (typeof SHARE_VIEW)[keyof typeof SHARE_VIEW];\n\nexport const SHARE_VIEW_VALUES = [\n SHARE_VIEW.SYS_INFO,\n SHARE_VIEW.ALL,\n SHARE_VIEW.NONE,\n] as const;\n\nexport const SHARE_VIEW_LABELS: Record<ShareViewValue, string> = {\n [SHARE_VIEW.SYS_INFO]: \"System Info Only\",\n [SHARE_VIEW.ALL]: \"Full Content\",\n [SHARE_VIEW.NONE]: \"No Data Access\",\n};\n\n// ─── Platform Tool Codes ───────────────────────────────────────────\n\nexport const PLATFORM_TOOL = {\n PAVE: \"PAVE\",\n ECHO: \"ECHO\",\n LEADS: \"LEADS\",\n THREAD: \"THREAD\",\n TRAIL: \"TRAIL\",\n PLATFORM: \"PLATFORM\",\n} as const;\n\nexport type PlatformToolValue =\n (typeof PLATFORM_TOOL)[keyof typeof PLATFORM_TOOL];\n\nexport const PLATFORM_TOOL_VALUES = [\n PLATFORM_TOOL.PAVE,\n PLATFORM_TOOL.ECHO,\n PLATFORM_TOOL.LEADS,\n PLATFORM_TOOL.THREAD,\n PLATFORM_TOOL.TRAIL,\n PLATFORM_TOOL.PLATFORM,\n] as const;\n\nexport const PLATFORM_TOOL_LABELS: Record<PlatformToolValue, string> = {\n [PLATFORM_TOOL.PAVE]: \"PAVE\",\n [PLATFORM_TOOL.ECHO]: \"Echo\",\n [PLATFORM_TOOL.LEADS]: \"LEADS\",\n [PLATFORM_TOOL.THREAD]: \"Thread\",\n [PLATFORM_TOOL.TRAIL]: \"Trail\",\n [PLATFORM_TOOL.PLATFORM]: \"Platform\",\n};\n\n// ─── Role Level (hierarchy tiers) ──────────────────────────────────\n\nexport const ROLE_LEVEL = {\n /** User-facing roles (staff, volunteers, practitioners). */\n OPERATIONAL: \"operational\",\n /** Agency-level admin roles. */\n AGENCY: \"agency\",\n /** Team-level admin roles. */\n TEAM: \"team\",\n /** HTI-wide platform admin. */\n PLATFORM: \"platform\",\n /** External governance/oversight roles. */\n OVERSIGHT: \"oversight\",\n} as const;\n\nexport type RoleLevelValue = (typeof ROLE_LEVEL)[keyof typeof ROLE_LEVEL];\n\nexport const ROLE_LEVEL_VALUES = [\n ROLE_LEVEL.OPERATIONAL,\n ROLE_LEVEL.AGENCY,\n ROLE_LEVEL.TEAM,\n ROLE_LEVEL.PLATFORM,\n ROLE_LEVEL.OVERSIGHT,\n] as const;\n\nexport const ROLE_LEVEL_LABELS: Record<RoleLevelValue, string> = {\n [ROLE_LEVEL.OPERATIONAL]: \"Operational\",\n [ROLE_LEVEL.AGENCY]: \"Agency\",\n [ROLE_LEVEL.TEAM]: \"Team\",\n [ROLE_LEVEL.PLATFORM]: \"Platform\",\n [ROLE_LEVEL.OVERSIGHT]: \"Oversight\",\n};\n\n// ─── Function Implementation Status ────────────────────────────────\n\nexport const FUNCTION_STATUS = {\n NOT_STARTED: \"Not started\",\n DEFINED_NEW: \"Defined; new function\",\n DEFINED_EXISTING: \"Defined; existing PAVE function\",\n FUNCTIONAL: \"Functional on all apps\",\n FUTURE: \"Future function (not v1)\",\n} as const;\n\nexport type FunctionStatusValue =\n (typeof FUNCTION_STATUS)[keyof typeof FUNCTION_STATUS];\n\nexport const FUNCTION_STATUS_VALUES = [\n FUNCTION_STATUS.NOT_STARTED,\n FUNCTION_STATUS.DEFINED_NEW,\n FUNCTION_STATUS.DEFINED_EXISTING,\n FUNCTION_STATUS.FUNCTIONAL,\n FUNCTION_STATUS.FUTURE,\n] as const;\n\nexport const FUNCTION_STATUS_LABELS: Record<FunctionStatusValue, string> = {\n [FUNCTION_STATUS.NOT_STARTED]: \"Not Started\",\n [FUNCTION_STATUS.DEFINED_NEW]: \"Defined (New)\",\n [FUNCTION_STATUS.DEFINED_EXISTING]: \"Defined (Existing PAVE)\",\n [FUNCTION_STATUS.FUNCTIONAL]: \"Functional\",\n [FUNCTION_STATUS.FUTURE]: \"Future (Not v1)\",\n};\n","/**\n * @htilabs/platform-common-models — PlatformRole Model\n *\n * Factory for creating PlatformRole model bound to a specific connection.\n * Follows the platform-common-services pattern with buildSchema/compileModel.\n */\n\nimport type { Connection, Model, HydratedDocument } from \"mongoose\";\nimport {\n buildPlatformRoleSchema,\n type PlatformRole,\n} from \"../schemas/platform-role.js\";\n\nexport type PlatformRoleDoc = HydratedDocument<PlatformRole>;\n\n/**\n * Build the PlatformRole schema.\n * @returns Mongoose Schema for PlatformRole\n */\nexport { buildPlatformRoleSchema as buildSchema };\n\n/**\n * Compile the PlatformRole model on a specific connection.\n * @param connection - Mongoose connection to bind the model to\n * @param schema - Optional pre-built schema (uses buildPlatformRoleSchema() if not provided)\n * @returns Mongoose Model for PlatformRole\n */\nexport function compileModel(\n connection: Connection,\n schema = buildPlatformRoleSchema(),\n): Model<PlatformRole> {\n return connection.model<PlatformRole>(\"PlatformRole\", schema);\n}\n","/**\n * @htilabs/platform-common-models — Platform Role Schema\n *\n * Mongoose schema for the `platformRoles` collection.\n * Each document represents a role that bundles function permissions,\n * tool scope, and share visibility settings.\n */\n\nimport { Schema } from \"mongoose\";\nimport type { InferRawDocType } from \"mongoose\";\nimport {\n PLATFORM_TOOL_VALUES,\n ROLE_LEVEL_VALUES,\n SHARE_VIEW_VALUES,\n} from \"../constants/platform-auth.js\";\n\n// ─── Schema Definition ──────────────────────────────────────────────\n\nexport const platformRoleSchemaDefinition = {\n code: {\n type: String,\n required: true,\n },\n label: {\n type: String,\n required: true,\n },\n description: {\n type: String,\n default: \"\",\n },\n level: {\n type: String,\n enum: [...ROLE_LEVEL_VALUES],\n required: true,\n },\n tools: {\n type: [String],\n enum: [...PLATFORM_TOOL_VALUES],\n default: [],\n },\n shareView: {\n type: String,\n enum: [...SHARE_VIEW_VALUES, null],\n default: null,\n },\n trainingRequirements: {\n type: String,\n default: null,\n },\n isHtiOnly: {\n type: Boolean,\n default: false,\n },\n /** Dynamic map of functionCode → PermissionStateValue. */\n functions: {\n type: Schema.Types.Mixed,\n default: {},\n },\n sortOrder: {\n type: Number,\n default: 0,\n },\n};\n\nexport const platformRoleSchemaOptions = {\n timestamps: {\n createdAt: \"createdTime\",\n updatedAt: \"updatedTime\",\n },\n collection: \"platformRoles\",\n};\n\n// ─── Schema Builder ─────────────────────────────────────────────────\n\n/**\n * Build the PlatformRole schema.\n * @returns Mongoose Schema for PlatformRole\n */\nexport function buildPlatformRoleSchema(): Schema {\n const schema = new Schema(\n platformRoleSchemaDefinition,\n platformRoleSchemaOptions,\n );\n\n // Unique index on role code\n schema.index({ code: 1 }, { unique: true });\n\n // Lookup indexes\n schema.index({ level: 1 });\n schema.index({ tools: 1 });\n schema.index({ isHtiOnly: 1 });\n\n return schema;\n}\n\n// ─── Type Inference ─────────────────────────────────────────────────\n\nconst _platformRoleSchema = buildPlatformRoleSchema();\nexport type PlatformRole = InferRawDocType<typeof _platformRoleSchema>;\n","/**\n * @htilabs/platform-common-models — Models\n *\n * Mongoose model factories for platform models.\n * Each model exports buildSchema() and compileModel(connection) functions.\n *\n * Usage:\n * ```typescript\n * import { createPlatformModels } from '@htilabs/platform-common-models/models';\n * import mongoose from 'mongoose';\n *\n * const platformDb = mongoose.createConnection(PLATFORM_DB_URI);\n * const { FormModel, SectionModel, QuestionModel, ScoringRuleModel } = createPlatformModels(platformDb);\n * ```\n */\n\nimport type { Connection, Model } from \"mongoose\";\n\n// Individual model factories\nimport * as formModel from \"./formModel.js\";\nimport * as sectionModel from \"./sectionModel.js\";\nimport * as questionModel from \"./questionModel.js\";\nimport * as scoringRuleModel from \"./scoringRuleModel.js\";\nimport * as platformFunctionModel from \"./platformFunctionModel.js\";\nimport * as platformRoleModel from \"./platformRoleModel.js\";\n\n// Re-export individual model factories\nexport {\n formModel,\n sectionModel,\n questionModel,\n scoringRuleModel,\n platformFunctionModel,\n platformRoleModel,\n};\n\n// Re-export types\nexport type { FormDoc } from \"./formModel.js\";\nexport type { SectionDoc } from \"./sectionModel.js\";\nexport type { QuestionDoc } from \"./questionModel.js\";\nexport type { ScoringRuleDoc } from \"./scoringRuleModel.js\";\nexport type { PlatformFunctionDoc } from \"./platformFunctionModel.js\";\nexport type { PlatformRoleDoc } from \"./platformRoleModel.js\";\n\n// Re-export schema types\nexport type { Form } from \"../schemas/form.js\";\nexport type { Section } from \"../schemas/section.js\";\nexport type { Question } from \"../schemas/question.js\";\nexport type { ScoringRule } from \"../schemas/scoring-rule.js\";\nexport type { PlatformFunction } from \"../schemas/platform-function.js\";\nexport type { PlatformRole } from \"../schemas/platform-role.js\";\n\n/**\n * Platform models interface returned by createPlatformModels.\n */\nexport interface PlatformModels {\n FormModel: Model<import(\"../schemas/form.js\").Form>;\n SectionModel: Model<import(\"../schemas/section.js\").Section>;\n QuestionModel: Model<import(\"../schemas/question.js\").Question>;\n ScoringRuleModel: Model<import(\"../schemas/scoring-rule.js\").ScoringRule>;\n PlatformFunctionModel: Model<import(\"../schemas/platform-function.js\").PlatformFunction>;\n PlatformRoleModel: Model<import(\"../schemas/platform-role.js\").PlatformRole>;\n}\n\n/**\n * Create all platform models bound to a single connection.\n * Convenience function for apps that need all form-related models.\n *\n * @param connection - Mongoose connection to bind all models to\n * @returns Object with all compiled models\n *\n * @example\n * ```typescript\n * const platformDb = mongoose.createConnection(PLATFORM_DB_URI);\n * const { FormModel, SectionModel, QuestionModel, ScoringRuleModel } = createPlatformModels(platformDb);\n *\n * const forms = await FormModel.find({ status: 'active' });\n * ```\n */\nexport function createPlatformModels(connection: Connection): PlatformModels {\n return {\n FormModel: formModel.compileModel(connection),\n SectionModel: sectionModel.compileModel(connection),\n QuestionModel: questionModel.compileModel(connection),\n ScoringRuleModel: scoringRuleModel.compileModel(connection),\n PlatformFunctionModel: platformFunctionModel.compileModel(connection),\n PlatformRoleModel: platformRoleModel.compileModel(connection),\n };\n}\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACOA,SAAS,cAAc;AAKhB,IAAM,uBAAuB,IAAI;AAAA,EACtC;AAAA,IACE,WAAW,EAAE,MAAM,QAAQ,UAAU,KAAK;AAAA,IAC1C,gBAAgB,EAAE,MAAM,QAAQ,UAAU,KAAK;AAAA,IAC/C,OAAO,EAAE,MAAM,QAAQ,UAAU,KAAK;AAAA,IACtC,QAAQ,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,IACxC,YAAY,EAAE,MAAM,OAAO;AAAA,IAC3B,OAAO,EAAE,MAAM,OAAO;AAAA,IACtB,aAAa,EAAE,MAAM,OAAO;AAAA,EAC9B;AAAA,EACA,EAAE,KAAK,MAAM;AACf;AAMO,IAAM,uBAAuB;AAAA,EAClC,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,UAAU;AAAA,IACV,SAAS;AAAA,EACX;AAAA;AAAA,EAGA,aAAa;AAAA,IACX,MAAM,OAAO,MAAM;AAAA,IACnB,UAAU;AAAA,IACV,OAAO;AAAA,EACT;AAAA,EACA,aAAa;AAAA,IACX,MAAM,OAAO,MAAM;AAAA,IACnB,OAAO;AAAA,EACT;AAAA;AAAA,EAGA,KAAK;AAAA,IACH,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA;AAAA,EAGA,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA,aAAa;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,UAAU;AAAA,IACR,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAAA,EACA,UAAU;AAAA,IACR,MAAM,CAAC,MAAM;AAAA,IACb,MAAM,CAAC,UAAU,QAAQ,MAAM;AA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D,eAA6BA,cAAa,UAAU;AAAA,IACpD,kBAAmCA,cAAa,UAAU;AAAA,IAC1D,uBAA6CA,cAAa,UAAU;AAAA,IACpE,mBAAqCA,cAAa,UAAU;AAAA,EAC9D;AACF;","names":["compileModel","Schema","compileModel","compileModel","Schema","compileModel","compileModel","Schema","compileModel","compileModel","Schema","Schema","compileModel","compileModel","Schema","Schema","compileModel","compileModel"]}
|
|
@@ -700,6 +700,20 @@ declare const CVC_93_CHILD_WELFARE_INVOLVEMENT: {
|
|
|
700
700
|
type CVC93Value = (typeof CVC_93_CHILD_WELFARE_INVOLVEMENT)[keyof typeof CVC_93_CHILD_WELFARE_INVOLVEMENT];
|
|
701
701
|
declare const CVC_93_VALUES: readonly ["current", "previous", "never", "unknown"];
|
|
702
702
|
declare const CVC_93_LABELS: Record<CVC93Value, string>;
|
|
703
|
+
declare const CVC_196_CHILD_WELFARE_EPISODE_TYPE: {
|
|
704
|
+
readonly FOSTER_CARE_PLACEMENT: "foster_care_placement";
|
|
705
|
+
readonly GROUP_HOME_PLACEMENT: "group_home_placement";
|
|
706
|
+
readonly KINSHIP_GUARDIANSHIP_PLACEMENT: "kinship_guardianship_placement";
|
|
707
|
+
readonly RESIDENTIAL_TREATMENT_PLACEMENT: "residential_treatment_placement";
|
|
708
|
+
readonly IN_CUSTODY: "in_custody";
|
|
709
|
+
readonly CASE_OPEN: "case_open";
|
|
710
|
+
readonly DATA_NOT_COLLECTED: "DNC";
|
|
711
|
+
readonly UNKNOWN: "UNK";
|
|
712
|
+
readonly ANONYMOUS: "ANON";
|
|
713
|
+
};
|
|
714
|
+
type CVC196Value = (typeof CVC_196_CHILD_WELFARE_EPISODE_TYPE)[keyof typeof CVC_196_CHILD_WELFARE_EPISODE_TYPE];
|
|
715
|
+
declare const CVC_196_VALUES: readonly ["foster_care_placement", "group_home_placement", "kinship_guardianship_placement", "residential_treatment_placement", "in_custody", "case_open", "DNC", "UNK", "ANON"];
|
|
716
|
+
declare const CVC_196_LABELS: Record<CVC196Value, string>;
|
|
703
717
|
declare const CVC_95_JUVENILE_JUSTICE_INVOLVEMENT: {
|
|
704
718
|
readonly CURRENT: "current";
|
|
705
719
|
readonly PREVIOUS: "previous";
|
|
@@ -1173,6 +1187,7 @@ declare const CVC_115_VALUES: readonly ["mental_illness", "alcohol_abuse", "drug
|
|
|
1173
1187
|
declare const CVC_115_LABELS: Record<CVC115Value, string>;
|
|
1174
1188
|
/**
|
|
1175
1189
|
* CVC-171 Categories (non-selectable accordion headers)
|
|
1190
|
+
* Based on HMIS 4.02 (Income) and 4.03 (Non-Cash Benefits) structure.
|
|
1176
1191
|
*/
|
|
1177
1192
|
declare const CVC_171_CATEGORY: {
|
|
1178
1193
|
readonly INCOME: "income";
|
|
@@ -1181,44 +1196,51 @@ declare const CVC_171_CATEGORY: {
|
|
|
1181
1196
|
type CVC171Category = (typeof CVC_171_CATEGORY)[keyof typeof CVC_171_CATEGORY];
|
|
1182
1197
|
declare const CVC_171_CATEGORY_LABELS: Record<CVC171Category, string>;
|
|
1183
1198
|
/**
|
|
1184
|
-
* CVC-171 Income/Benefits Values
|
|
1199
|
+
* CVC-171 Income/Benefits Values - CANONICAL CODEBOOK CODES
|
|
1200
|
+
* Aligned with ic-cvc-codebook CVC-171 entries.
|
|
1201
|
+
* See: platform-dev.cvc_entries where cvcKey = "CVC-171"
|
|
1185
1202
|
*/
|
|
1186
1203
|
declare const CVC_171_INCOME_BENEFITS: {
|
|
1187
|
-
readonly
|
|
1188
|
-
readonly
|
|
1189
|
-
readonly
|
|
1190
|
-
readonly
|
|
1191
|
-
readonly
|
|
1192
|
-
readonly
|
|
1193
|
-
readonly
|
|
1194
|
-
readonly
|
|
1195
|
-
readonly
|
|
1196
|
-
readonly
|
|
1197
|
-
readonly
|
|
1198
|
-
readonly
|
|
1199
|
-
readonly
|
|
1200
|
-
readonly
|
|
1201
|
-
readonly
|
|
1202
|
-
readonly
|
|
1203
|
-
readonly
|
|
1204
|
-
readonly
|
|
1205
|
-
readonly
|
|
1206
|
-
readonly
|
|
1207
|
-
readonly
|
|
1208
|
-
readonly
|
|
1209
|
-
readonly
|
|
1210
|
-
readonly
|
|
1211
|
-
readonly
|
|
1212
|
-
readonly
|
|
1213
|
-
readonly
|
|
1214
|
-
readonly
|
|
1215
|
-
readonly
|
|
1216
|
-
readonly
|
|
1204
|
+
readonly EMP: "EMP";
|
|
1205
|
+
readonly PENSION_JOB: "PENSION_JOB";
|
|
1206
|
+
readonly PRIV_DIS: "PRIV_DIS";
|
|
1207
|
+
readonly SSA: "SSA";
|
|
1208
|
+
readonly SSI: "SSI";
|
|
1209
|
+
readonly SSDI: "SSDI";
|
|
1210
|
+
readonly SSA_RET: "SSA_RET";
|
|
1211
|
+
readonly VA: "VA";
|
|
1212
|
+
readonly VA_SCD: "VA_SCD";
|
|
1213
|
+
readonly VA_NSC_PEN: "VA_NSC_PEN";
|
|
1214
|
+
readonly UI: "UI";
|
|
1215
|
+
readonly WC: "WC";
|
|
1216
|
+
readonly TANF: "TANF";
|
|
1217
|
+
readonly GA: "GA";
|
|
1218
|
+
readonly CSUP: "CSUP";
|
|
1219
|
+
readonly ALIM: "ALIM";
|
|
1220
|
+
readonly OTH_INCOME: "OTH_INCOME";
|
|
1221
|
+
readonly SNAP: "SNAP";
|
|
1222
|
+
readonly WIC: "WIC";
|
|
1223
|
+
readonly TANF_CC: "TANF_CC";
|
|
1224
|
+
readonly TANF_TRANS: "TANF_TRANS";
|
|
1225
|
+
readonly TANF_OTHER_SVC: "TANF_OTHER_SVC";
|
|
1226
|
+
readonly HSGA: "HSGA";
|
|
1227
|
+
readonly MCD: "MCD";
|
|
1228
|
+
readonly MCR: "MCR";
|
|
1229
|
+
readonly CCSUB: "CCSUB";
|
|
1230
|
+
readonly EDU: "EDU";
|
|
1231
|
+
readonly OTH_BENEFIT: "OTH_BENEFIT";
|
|
1232
|
+
readonly UNK: "UNK";
|
|
1233
|
+
readonly DNC: "DNC";
|
|
1234
|
+
readonly ANON: "ANON";
|
|
1217
1235
|
};
|
|
1218
1236
|
type CVC171Value = (typeof CVC_171_INCOME_BENEFITS)[keyof typeof CVC_171_INCOME_BENEFITS];
|
|
1237
|
+
/**
|
|
1238
|
+
* Labels matching canonical codebook entries exactly.
|
|
1239
|
+
*/
|
|
1219
1240
|
declare const CVC_171_LABELS: Record<CVC171Value, string>;
|
|
1220
1241
|
/**
|
|
1221
1242
|
* Maps each value to its category (INCOME or BENEFITS)
|
|
1243
|
+
* Based on HMIS 4.02 (Income and Sources) vs 4.03 (Non-Cash Benefits).
|
|
1222
1244
|
*/
|
|
1223
1245
|
declare const CVC_171_VALUE_TO_CATEGORY: Record<CVC171Value, CVC171Category>;
|
|
1224
1246
|
/** UI option type for hierarchical picker */
|
|
@@ -1231,6 +1253,7 @@ interface CVC171Option {
|
|
|
1231
1253
|
/**
|
|
1232
1254
|
* Parent-to-children mapping for hierarchical picker.
|
|
1233
1255
|
* Parents are selectable and children appear indented below.
|
|
1256
|
+
* Based on codebook level hierarchy (level 1 parents, level 0 children).
|
|
1234
1257
|
*/
|
|
1235
1258
|
declare const CVC_171_PARENT_CHILDREN: Record<string, string[]>;
|
|
1236
1259
|
/**
|
|
@@ -1244,29 +1267,29 @@ declare const CVC_171_CHILD_TO_PARENT: Record<string, string>;
|
|
|
1244
1267
|
*/
|
|
1245
1268
|
declare const CVC_171_SELECTABLE_OPTIONS: readonly CVC171Option[];
|
|
1246
1269
|
declare const CVC_171_INCOME_SOURCES: {
|
|
1247
|
-
readonly WAGES_SALARY: "
|
|
1248
|
-
readonly SELF_EMPLOYMENT: "
|
|
1249
|
-
readonly TIPS_COMMISSIONS: "
|
|
1250
|
-
readonly SSI: "
|
|
1251
|
-
readonly SSDI: "
|
|
1252
|
-
readonly SSA: "
|
|
1253
|
-
readonly TANF: "
|
|
1254
|
-
readonly UNEMPLOYMENT: "
|
|
1255
|
-
readonly VETERANS_BENEFITS: "
|
|
1256
|
-
readonly PENSION: "
|
|
1257
|
-
readonly WORKERS_COMP: "
|
|
1258
|
-
readonly SNAP: "
|
|
1259
|
-
readonly WIC: "
|
|
1260
|
-
readonly HOUSING_ASSISTANCE: "
|
|
1261
|
-
readonly MEDICAID: "
|
|
1262
|
-
readonly MEDICARE: "
|
|
1263
|
-
readonly CHILD_SUPPORT: "
|
|
1264
|
-
readonly ALIMONY: "
|
|
1265
|
-
readonly FAMILY_FRIENDS: "
|
|
1266
|
-
readonly OTHER: "
|
|
1267
|
-
readonly NONE: "
|
|
1268
|
-
readonly UNKNOWN: "
|
|
1269
|
-
readonly DECLINED: "
|
|
1270
|
+
readonly WAGES_SALARY: "EMP";
|
|
1271
|
+
readonly SELF_EMPLOYMENT: "EMP";
|
|
1272
|
+
readonly TIPS_COMMISSIONS: "EMP";
|
|
1273
|
+
readonly SSI: "SSI";
|
|
1274
|
+
readonly SSDI: "SSDI";
|
|
1275
|
+
readonly SSA: "SSA";
|
|
1276
|
+
readonly TANF: "TANF";
|
|
1277
|
+
readonly UNEMPLOYMENT: "UI";
|
|
1278
|
+
readonly VETERANS_BENEFITS: "VA";
|
|
1279
|
+
readonly PENSION: "PENSION_JOB";
|
|
1280
|
+
readonly WORKERS_COMP: "WC";
|
|
1281
|
+
readonly SNAP: "SNAP";
|
|
1282
|
+
readonly WIC: "WIC";
|
|
1283
|
+
readonly HOUSING_ASSISTANCE: "HSGA";
|
|
1284
|
+
readonly MEDICAID: "MCD";
|
|
1285
|
+
readonly MEDICARE: "MCR";
|
|
1286
|
+
readonly CHILD_SUPPORT: "CSUP";
|
|
1287
|
+
readonly ALIMONY: "ALIM";
|
|
1288
|
+
readonly FAMILY_FRIENDS: "OTH_INCOME";
|
|
1289
|
+
readonly OTHER: "OTH_INCOME";
|
|
1290
|
+
readonly NONE: "DNC";
|
|
1291
|
+
readonly UNKNOWN: "UNK";
|
|
1292
|
+
readonly DECLINED: "ANON";
|
|
1270
1293
|
};
|
|
1271
1294
|
declare const CVC_171_VALUES: CVC171Value[];
|
|
1272
1295
|
declare const CVC_179_EMPLOYMENT_STATUS: {
|
|
@@ -1328,7 +1351,7 @@ declare const CVC_179_HIERARCHICAL_VALUES: {
|
|
|
1328
1351
|
readonly UNKNOWN: "unknown";
|
|
1329
1352
|
readonly CLIENT_DOESNT_KNOW: "client_doesnt_know";
|
|
1330
1353
|
readonly DATA_NOT_COLLECTED: "data_not_collected";
|
|
1331
|
-
readonly
|
|
1354
|
+
readonly DECLINED_TO_ANSWER: "declined_to_answer";
|
|
1332
1355
|
readonly ANONYMOUS: "anonymous";
|
|
1333
1356
|
};
|
|
1334
1357
|
type CVC179HierarchicalValue = (typeof CVC_179_HIERARCHICAL_VALUES)[keyof typeof CVC_179_HIERARCHICAL_VALUES];
|
|
@@ -1691,5 +1714,93 @@ type CVC136Option = {
|
|
|
1691
1714
|
categoryLabel: string;
|
|
1692
1715
|
};
|
|
1693
1716
|
declare const CVC_136_OPTIONS: readonly CVC136Option[];
|
|
1717
|
+
declare const CVC_67_HMIS_SEX: {
|
|
1718
|
+
readonly MALE: "male";
|
|
1719
|
+
readonly FEMALE: "female";
|
|
1720
|
+
readonly CLIENT_PREFERS_NOT_TO_ANSWER: "client_prefers_not_to_answer";
|
|
1721
|
+
readonly CLIENT_DOESNT_KNOW: "client_doesn_t_know";
|
|
1722
|
+
readonly DATA_NOT_COLLECTED: "data_not_collected";
|
|
1723
|
+
};
|
|
1724
|
+
type CVC67Value = (typeof CVC_67_HMIS_SEX)[keyof typeof CVC_67_HMIS_SEX];
|
|
1725
|
+
declare const CVC_67_LABELS: Record<CVC67Value, string>;
|
|
1726
|
+
declare const CVC_67_SELECTABLE_VALUES: CVC67Value[];
|
|
1727
|
+
declare const CVC_67_MISSINGNESS_VALUES: CVC67Value[];
|
|
1728
|
+
|
|
1729
|
+
/**
|
|
1730
|
+
* @htilabs/platform-common-models — Platform Authorization Constants
|
|
1731
|
+
*
|
|
1732
|
+
* Enums and labels for the platform role/function permission model.
|
|
1733
|
+
* Includes permission states, share view levels, tool codes, role levels,
|
|
1734
|
+
* and function implementation statuses.
|
|
1735
|
+
*
|
|
1736
|
+
* Source: PLATFORM_AUTH_SPEC.md Sections 5 + 6
|
|
1737
|
+
*/
|
|
1738
|
+
declare const PERMISSION_STATE: {
|
|
1739
|
+
/** Role can always perform this function (mandatory, cannot disable). */
|
|
1740
|
+
readonly ALWAYS: "ALWAYS";
|
|
1741
|
+
/** Default On — user can opt off. */
|
|
1742
|
+
readonly PREF_YES: "PREF_YES";
|
|
1743
|
+
/** Default Off — user can opt in. */
|
|
1744
|
+
readonly PREF_NO: "PREF_NO";
|
|
1745
|
+
/** Role is explicitly barred from this function. */
|
|
1746
|
+
readonly NEVER: "NEVER";
|
|
1747
|
+
};
|
|
1748
|
+
type PermissionStateValue = (typeof PERMISSION_STATE)[keyof typeof PERMISSION_STATE];
|
|
1749
|
+
declare const PERMISSION_STATE_VALUES: readonly ["ALWAYS", "PREF_YES", "PREF_NO", "NEVER"];
|
|
1750
|
+
declare const PERMISSION_STATE_LABELS: Record<PermissionStateValue, string>;
|
|
1751
|
+
/** UI display metadata for permission states (colors, icons). */
|
|
1752
|
+
declare const PERMISSION_STATE_DISPLAY: Record<PermissionStateValue, {
|
|
1753
|
+
label: string;
|
|
1754
|
+
color: string;
|
|
1755
|
+
bgColor: string;
|
|
1756
|
+
icon: string;
|
|
1757
|
+
}>;
|
|
1758
|
+
declare const SHARE_VIEW: {
|
|
1759
|
+
/** System metadata only (partial access). */
|
|
1760
|
+
readonly SYS_INFO: "sys_info";
|
|
1761
|
+
/** Full case/record content. */
|
|
1762
|
+
readonly ALL: "all";
|
|
1763
|
+
/** No data access. */
|
|
1764
|
+
readonly NONE: "none";
|
|
1765
|
+
};
|
|
1766
|
+
type ShareViewValue = (typeof SHARE_VIEW)[keyof typeof SHARE_VIEW];
|
|
1767
|
+
declare const SHARE_VIEW_VALUES: readonly ["sys_info", "all", "none"];
|
|
1768
|
+
declare const SHARE_VIEW_LABELS: Record<ShareViewValue, string>;
|
|
1769
|
+
declare const PLATFORM_TOOL: {
|
|
1770
|
+
readonly PAVE: "PAVE";
|
|
1771
|
+
readonly ECHO: "ECHO";
|
|
1772
|
+
readonly LEADS: "LEADS";
|
|
1773
|
+
readonly THREAD: "THREAD";
|
|
1774
|
+
readonly TRAIL: "TRAIL";
|
|
1775
|
+
readonly PLATFORM: "PLATFORM";
|
|
1776
|
+
};
|
|
1777
|
+
type PlatformToolValue = (typeof PLATFORM_TOOL)[keyof typeof PLATFORM_TOOL];
|
|
1778
|
+
declare const PLATFORM_TOOL_VALUES: readonly ["PAVE", "ECHO", "LEADS", "THREAD", "TRAIL", "PLATFORM"];
|
|
1779
|
+
declare const PLATFORM_TOOL_LABELS: Record<PlatformToolValue, string>;
|
|
1780
|
+
declare const ROLE_LEVEL: {
|
|
1781
|
+
/** User-facing roles (staff, volunteers, practitioners). */
|
|
1782
|
+
readonly OPERATIONAL: "operational";
|
|
1783
|
+
/** Agency-level admin roles. */
|
|
1784
|
+
readonly AGENCY: "agency";
|
|
1785
|
+
/** Team-level admin roles. */
|
|
1786
|
+
readonly TEAM: "team";
|
|
1787
|
+
/** HTI-wide platform admin. */
|
|
1788
|
+
readonly PLATFORM: "platform";
|
|
1789
|
+
/** External governance/oversight roles. */
|
|
1790
|
+
readonly OVERSIGHT: "oversight";
|
|
1791
|
+
};
|
|
1792
|
+
type RoleLevelValue = (typeof ROLE_LEVEL)[keyof typeof ROLE_LEVEL];
|
|
1793
|
+
declare const ROLE_LEVEL_VALUES: readonly ["operational", "agency", "team", "platform", "oversight"];
|
|
1794
|
+
declare const ROLE_LEVEL_LABELS: Record<RoleLevelValue, string>;
|
|
1795
|
+
declare const FUNCTION_STATUS: {
|
|
1796
|
+
readonly NOT_STARTED: "Not started";
|
|
1797
|
+
readonly DEFINED_NEW: "Defined; new function";
|
|
1798
|
+
readonly DEFINED_EXISTING: "Defined; existing PAVE function";
|
|
1799
|
+
readonly FUNCTIONAL: "Functional on all apps";
|
|
1800
|
+
readonly FUTURE: "Future function (not v1)";
|
|
1801
|
+
};
|
|
1802
|
+
type FunctionStatusValue = (typeof FUNCTION_STATUS)[keyof typeof FUNCTION_STATUS];
|
|
1803
|
+
declare const FUNCTION_STATUS_VALUES: readonly ["Not started", "Defined; new function", "Defined; existing PAVE function", "Functional on all apps", "Future function (not v1)"];
|
|
1804
|
+
declare const FUNCTION_STATUS_LABELS: Record<FunctionStatusValue, string>;
|
|
1694
1805
|
|
|
1695
|
-
export { type CVC181Value as $, ACCOMMODATION_LABELS as A, BIRTH_LOCATION as B, CALLER_IS_VICTIM_ROLES as C, type CVC145Option as D, type CVC145Value as E, type CVC147Value as F, type CVC148Value as G, type CVC150Value as H, type CVC151Value as I, type CVC152Value as J, type CVC153Value as K, type CVC156Value as L, type CVC157Value as M, type CVC158Value as N, type CVC159Category as O, type CVC159Option as P, type CVC159Value as Q, type CVC15Value as R, type CVC16Value as S, type CVC171Category as T, type CVC171Option as U, type CVC171Value as V, type CVC179HierarchicalCategory as W, type CVC179HierarchicalValue as X, type CVC179Value as Y, type CVC17Value as Z, type CVC180Value as _, ACCOMMODATION_OPTIONS as a, CVC_153_LABELS as a$, type CVC1Value as a0, type CVC72Value as a1, type CVC76Value as a2, type CVC93Value as a3, type CVC95Value as a4, type CVC96Value as a5, type CVC97Value as a6, type CVC98Value as a7, type CVC99Value as a8, CVC_100_LABELS as a9, CVC_136_OPTIONS as aA, CVC_136_TYPE_TO_CATEGORY as aB, CVC_136_VALUES as aC, CVC_145_CATEGORY as aD, CVC_145_CATEGORY_LABELS as aE, CVC_145_CATEGORY_ORDER as aF, CVC_145_LABELS as aG, CVC_145_OPTIONS as aH, CVC_145_RELATIONSHIP_DYNAMICS as aI, CVC_145_SELECTABLE_OPTIONS as aJ, CVC_145_TYPE_TO_CATEGORY as aK, CVC_145_VALUES as aL, CVC_147_LABELS as aM, CVC_147_PRONOUNS as aN, CVC_147_VALUES as aO, CVC_148_LABELS as aP, CVC_148_TRIBES as aQ, CVC_148_VALUES as aR, CVC_150_EYE_COLOR as aS, CVC_150_LABELS as aT, CVC_150_VALUES as aU, CVC_151_HAIR_COLOR as aV, CVC_151_LABELS as aW, CVC_151_VALUES as aX, CVC_152_HAS_TATTOOS as aY, CVC_152_LABELS as aZ, CVC_152_VALUES as a_, CVC_100_LIVES_RURAL as aa, CVC_100_VALUES as ab, CVC_115_LABELS as ac, CVC_115_SERVICE_PLANNING as ad, CVC_115_VALUES as ae, CVC_120_LABELS as af, CVC_120_MILITARY_BRANCH as ag, CVC_120_VALUES as ah, CVC_121_LABELS as ai, CVC_121_MILITARY_STATUS as aj, CVC_121_VALUES as ak, CVC_122_LABELS as al, CVC_122_PRIMARY_LANGUAGE as am, CVC_122_VALUES as an, CVC_126_CATEGORY as ao, CVC_126_CATEGORY_LABELS as ap, CVC_126_LABELS as aq, CVC_126_OPTIONS as ar, CVC_126_PERSON_RELATIONSHIP as as, CVC_126_PROTECTED_CATEGORIES as at, CVC_126_TYPE_TO_CATEGORY as au, CVC_126_VALUES as av, CVC_136_ALERT_INDICATOR as aw, CVC_136_CATEGORY_LABELS as ax, CVC_136_INDICATOR_CATEGORY as ay, CVC_136_LABELS as az, AGE_BIN_REPORTING as b, CVC_1_UNSTRUCTURED_NAME_TYPES as b$, CVC_153_SMT_TYPE as b0, CVC_153_VALUES as b1, CVC_156_LABELS as b2, CVC_156_MARITAL_STATUS as b3, CVC_156_VALUES as b4, CVC_157_LABELS as b5, CVC_157_RELATIONSHIP_STATUS as b6, CVC_157_VALUES as b7, CVC_158_CUSTODY_STATUS as b8, CVC_158_LABELS as b9, CVC_179_CHILD_TO_PARENT as bA, CVC_179_EMPLOYMENT_STATUS as bB, CVC_179_HIERARCHICAL_CATEGORY as bC, CVC_179_HIERARCHICAL_CATEGORY_LABELS as bD, CVC_179_HIERARCHICAL_CATEGORY_ORDER as bE, CVC_179_HIERARCHICAL_LABELS as bF, CVC_179_HIERARCHICAL_VALUES as bG, CVC_179_LABELS as bH, CVC_179_PARENT_CHILDREN as bI, CVC_179_PRIMARY_CATEGORY as bJ, CVC_179_SELECTABLE_OPTIONS as bK, CVC_179_VALUES as bL, CVC_179_VALUE_TO_CATEGORY as bM, CVC_17_CORE_GENDER_IDENTITY as bN, CVC_17_LABELS as bO, CVC_17_LEVEL_1_OPTIONS as bP, CVC_17_LEVEL_2_TRANSGENDER_OPTIONS as bQ, CVC_17_TRANSGENDER_VALUES as bR, CVC_180_EDUCATION_LEVEL as bS, CVC_180_LABELS as bT, CVC_180_ORDINAL as bU, CVC_180_VALUES as bV, CVC_181_COUNTRIES as bW, CVC_181_LABELS as bX, CVC_1_LABELS as bY, CVC_1_NAME_TYPE as bZ, CVC_1_STRUCTURED_NAME_TYPES as b_, CVC_158_VALUES as ba, CVC_159_CATEGORY as bb, CVC_159_CATEGORY_LABELS as bc, CVC_159_CATEGORY_ORDER as bd, CVC_159_LABELS as be, CVC_159_OPTIONS as bf, CVC_159_RELATIONSHIP_TIES as bg, CVC_159_SELECTABLE_OPTIONS as bh, CVC_159_TYPE_TO_CATEGORY as bi, CVC_159_VALUES as bj, CVC_15_CORE_SEX as bk, CVC_15_LABELS as bl, CVC_15_SELECTABLE_VALUES as bm, CVC_16_CORE_ORIENTATION as bn, CVC_16_LABELS as bo, CVC_16_LGBTQ_VALUES as bp, CVC_171_CATEGORY as bq, CVC_171_CATEGORY_LABELS as br, CVC_171_CHILD_TO_PARENT as bs, CVC_171_INCOME_BENEFITS as bt, CVC_171_INCOME_SOURCES as bu, CVC_171_LABELS as bv, CVC_171_PARENT_CHILDREN as bw, CVC_171_SELECTABLE_OPTIONS as bx, CVC_171_VALUES as by, CVC_171_VALUE_TO_CATEGORY as bz, AGE_BIN_REPORTING_IS_MINOR as c, IC_22_LABELS as c$, CVC_1_VALUES as c0, CVC_72_HT_TYPE as c1, CVC_72_LABELS as c2, CVC_72_VALUES as c3, CVC_76_LABELS as c4, CVC_76_RACE_ETHNICITY as c5, CVC_76_VALUES as c6, CVC_93_CHILD_WELFARE_INVOLVEMENT as c7, CVC_93_LABELS as c8, CVC_93_VALUES as c9, type FormTypeValue as cA, type IC13Category as cB, type IC13PriorityGroup as cC, type IC13Value as cD, type IC22Value as cE, type IC23Value as cF, type IC24Value as cG, type IC25Value as cH, type IC49ReferralOutcomeValue as cI, type IC49ReferralVerificationValue as cJ, type IC49Value as cK, type IC4Value as cL, type IC56ChannelValue as cM, type IC56Value as cN, type IC57Value as cO, type IC58ExternalCategory as cP, type IC58Value as cQ, type IC59Value as cR, type IC5Value as cS, IC_13_CATEGORIES as cT, IC_13_CATEGORY_ORDER as cU, IC_13_LABELS as cV, IC_13_PRIORITY_GROUPS as cW, IC_13_RELATIONSHIP_ABBREV as cX, IC_13_RELATIONSHIP_TYPE as cY, IC_13_REVERSE_CONTEXT_LABELS as cZ, IC_22_CORE_SEX as c_, CVC_95_JUVENILE_JUSTICE_INVOLVEMENT as ca, CVC_95_LABELS as cb, CVC_95_VALUES as cc, CVC_96_HOMELESS_STATUS as cd, CVC_96_LABELS as ce, CVC_96_VALUES as cf, CVC_97_IMMIGRANT_REFUGEE as cg, CVC_97_LABELS as ch, CVC_97_VALUES as ci, CVC_98_LABELS as cj, CVC_98_US_VETERAN as ck, CVC_98_VALUES as cl, CVC_99_ENGLISH_PROFICIENCY as cm, CVC_99_LABELS as cn, CVC_99_VALUES as co, DATA_QUALITY as cp, DATA_QUALITY_DESCRIPTIONS as cq, DATA_QUALITY_LABELS as cr, DATA_QUALITY_VALUES as cs, DEFAULT_PARTICIPATION_ROLE_BY_CATEGORY as ct, type DataQualityValue as cu, FORM_STATUS as cv, FORM_STATUS_LABELS as cw, FORM_TYPE as cx, FORM_TYPE_LABELS as cy, type FormStatusValue as cz, AGE_BIN_REPORTING_LABELS as d, type QuestionFormatValue as d$, IC_23_CORE_GENDER_IDENTITY as d0, IC_23_LABELS as d1, IC_24_LABELS as d2, IC_24_RACE as d3, IC_25_ETHNICITY as d4, IC_25_LABELS as d5, IC_48_SERVICE_CATEGORIES as d6, IC_49_DESCRIPTIONS as d7, IC_49_LABELS as d8, IC_49_REFERRAL_OUTCOME as d9, INCIDENT_PARTICIPATION_ROLE as dA, INCIDENT_PARTICIPATION_ROLE_LABELS as dB, INCIDENT_PARTICIPATION_ROLE_VALUES as dC, INTERACTION_TYPES as dD, INTERACTION_TYPE_LABELS as dE, INVOLVEMENT_ROLE_TO_PERSON_TYPE as dF, type IncidentInvolvementRoleValue as dG, type IncidentParticipationRoleValue as dH, type InteractionTypeValue as dI, MINOR_ADULT_STATUS as dJ, MINOR_ADULT_STATUS_LABELS as dK, type MinorAdultStatusValue as dL, type OrgTypeGroup as dM, PARTICIPATION_ROLE_CATEGORIES as dN, PERSON_DISPLAY_CATEGORY as dO, PERSON_DISPLAY_CATEGORY_LABELS as dP, PERSON_ROLES as dQ, PERSON_TYPE as dR, PERSON_TYPE_VALUES as dS, type PersonDisplayCategoryValue as dT, type PersonRoleValue as dU, type PersonTypeValue as dV, QUESTION_FORMAT as dW, QUESTION_FORMAT_LABELS as dX, QUICK_START_CONFIG as dY, QUICK_START_LABELS as dZ, QUICK_START_TEMPLATES as d_, IC_49_REFERRAL_OUTCOME_LABELS as da, IC_49_REFERRAL_VERIFICATION as db, IC_49_REFERRAL_VERIFICATION_LABELS as dc, IC_49_SERVICE_MECHANISM as dd, IC_4_AGE_TYPE as de, IC_4_LABELS as df, IC_56_DESCRIPTIONS as dg, IC_56_LABELS as dh, IC_56_OPTIONS as di, IC_56_SERVICE_DELIVERY_CHANNEL as dj, IC_57_LABELS as dk, IC_57_SERVICE_AUDIENCE as dl, IC_58_EXTERNAL_TIERED as dm, IC_58_LABELS as dn, IC_58_ORG_TYPE_GROUPS as dp, IC_58_PRIMARY_BRANCHES as dq, IC_58_REFERRAL_ENTITY as dr, IC_59_LABELS as ds, IC_59_SERVICE_STATE as dt, IC_5_FULL_LABELS as du, IC_5_LABELS as dv, IC_5_VICTIMIZATION as dw, INCIDENT_INVOLVEMENT_ROLE as dx, INCIDENT_INVOLVEMENT_ROLE_LABELS as dy, INCIDENT_INVOLVEMENT_ROLE_TO_PERSON_ROLE as dz, APPARENT_AGE as e, type QuickStartTemplateId as e0, RECORD_STATES as e1, RECORD_STATE_LABELS as e2, RELATIONSHIP_CONCERNS as e3, RELATIONSHIP_CONCERNS_LABELS as e4, RELATIONSHIP_CONCERNS_VALUES as e5, RELATIONSHIP_DYNAMICS as e6, RELATIONSHIP_DYNAMICS_LABELS as e7, RELATIONSHIP_DYNAMICS_VALUES as e8, type RecordStateValue as e9, isTransgenderGenderIdentity as eA, sortRelationshipsByPriority as eB, type ReferralBranch as ea, type RelationshipConcernValue as eb, type RelationshipDynamicValue as ec, SESSION_STATES as ed, SESSION_STATE_LABELS as ee, SUBMISSION_STATES as ef, SUBMISSION_STATE_LABELS as eg, type ServiceCategory as eh, type ServiceCategoryChild as ei, type SessionStateValue as ej, type SubmissionStateValue as ek, THREAD_INVOLVEMENT_ROLES as el, USER_STATUS as em, USER_STATUS_LABELS as en, type UserStatusValue as eo, VALID_INTERACTION_TYPES as ep, VALID_RECORD_STATES as eq, deriveAgeBinFromAge as er, getDisplayCategoryForRole as es, getPersonTypeForRole as et, getRelationshipCategory as eu, isIC56Missingness as ev, isIC56ValidChannel as ew, isLgbtqOrientation as ex, isProtectedRelationship as ey, isStructuredNameType as ez, APPARENT_AGE_LABELS as f, APP_SCOPE as g, type AccommodationValue as h, type AgeBinReportingValue as i, type AppScopeValue as j, type ApparentAgeValue as k, BIRTH_LOCATION_LABELS as l, BIRTH_LOCATION_VALUES as m, type BirthLocationValue as n, type CVC100Value as o, type CVC115Value as p, type CVC120Value as q, type CVC121Value as r, type CVC122Value as s, type CVC126Category as t, type CVC126Option as u, type CVC126Value as v, type CVC136Category as w, type CVC136Option as x, type CVC136Value as y, type CVC145Category as z };
|
|
1806
|
+
export { type CVC181Value as $, ACCOMMODATION_LABELS as A, BIRTH_LOCATION as B, CALLER_IS_VICTIM_ROLES as C, type CVC145Option as D, type CVC145Value as E, type CVC147Value as F, type CVC148Value as G, type CVC150Value as H, type CVC151Value as I, type CVC152Value as J, type CVC153Value as K, type CVC156Value as L, type CVC157Value as M, type CVC158Value as N, type CVC159Category as O, type CVC159Option as P, type CVC159Value as Q, type CVC15Value as R, type CVC16Value as S, type CVC171Category as T, type CVC171Option as U, type CVC171Value as V, type CVC179HierarchicalCategory as W, type CVC179HierarchicalValue as X, type CVC179Value as Y, type CVC17Value as Z, type CVC180Value as _, ACCOMMODATION_OPTIONS as a, CVC_152_LABELS as a$, type CVC196Value as a0, type CVC1Value as a1, type CVC67Value as a2, type CVC72Value as a3, type CVC76Value as a4, type CVC93Value as a5, type CVC95Value as a6, type CVC96Value as a7, type CVC97Value as a8, type CVC98Value as a9, CVC_136_INDICATOR_CATEGORY as aA, CVC_136_LABELS as aB, CVC_136_OPTIONS as aC, CVC_136_TYPE_TO_CATEGORY as aD, CVC_136_VALUES as aE, CVC_145_CATEGORY as aF, CVC_145_CATEGORY_LABELS as aG, CVC_145_CATEGORY_ORDER as aH, CVC_145_LABELS as aI, CVC_145_OPTIONS as aJ, CVC_145_RELATIONSHIP_DYNAMICS as aK, CVC_145_SELECTABLE_OPTIONS as aL, CVC_145_TYPE_TO_CATEGORY as aM, CVC_145_VALUES as aN, CVC_147_LABELS as aO, CVC_147_PRONOUNS as aP, CVC_147_VALUES as aQ, CVC_148_LABELS as aR, CVC_148_TRIBES as aS, CVC_148_VALUES as aT, CVC_150_EYE_COLOR as aU, CVC_150_LABELS as aV, CVC_150_VALUES as aW, CVC_151_HAIR_COLOR as aX, CVC_151_LABELS as aY, CVC_151_VALUES as aZ, CVC_152_HAS_TATTOOS as a_, type CVC99Value as aa, CVC_100_LABELS as ab, CVC_100_LIVES_RURAL as ac, CVC_100_VALUES as ad, CVC_115_LABELS as ae, CVC_115_SERVICE_PLANNING as af, CVC_115_VALUES as ag, CVC_120_LABELS as ah, CVC_120_MILITARY_BRANCH as ai, CVC_120_VALUES as aj, CVC_121_LABELS as ak, CVC_121_MILITARY_STATUS as al, CVC_121_VALUES as am, CVC_122_LABELS as an, CVC_122_PRIMARY_LANGUAGE as ao, CVC_122_VALUES as ap, CVC_126_CATEGORY as aq, CVC_126_CATEGORY_LABELS as ar, CVC_126_LABELS as as, CVC_126_OPTIONS as at, CVC_126_PERSON_RELATIONSHIP as au, CVC_126_PROTECTED_CATEGORIES as av, CVC_126_TYPE_TO_CATEGORY as aw, CVC_126_VALUES as ax, CVC_136_ALERT_INDICATOR as ay, CVC_136_CATEGORY_LABELS as az, AGE_BIN_REPORTING as b, CVC_196_LABELS as b$, CVC_152_VALUES as b0, CVC_153_LABELS as b1, CVC_153_SMT_TYPE as b2, CVC_153_VALUES as b3, CVC_156_LABELS as b4, CVC_156_MARITAL_STATUS as b5, CVC_156_VALUES as b6, CVC_157_LABELS as b7, CVC_157_RELATIONSHIP_STATUS as b8, CVC_157_VALUES as b9, CVC_171_VALUES as bA, CVC_171_VALUE_TO_CATEGORY as bB, CVC_179_CHILD_TO_PARENT as bC, CVC_179_EMPLOYMENT_STATUS as bD, CVC_179_HIERARCHICAL_CATEGORY as bE, CVC_179_HIERARCHICAL_CATEGORY_LABELS as bF, CVC_179_HIERARCHICAL_CATEGORY_ORDER as bG, CVC_179_HIERARCHICAL_LABELS as bH, CVC_179_HIERARCHICAL_VALUES as bI, CVC_179_LABELS as bJ, CVC_179_PARENT_CHILDREN as bK, CVC_179_PRIMARY_CATEGORY as bL, CVC_179_SELECTABLE_OPTIONS as bM, CVC_179_VALUES as bN, CVC_179_VALUE_TO_CATEGORY as bO, CVC_17_CORE_GENDER_IDENTITY as bP, CVC_17_LABELS as bQ, CVC_17_LEVEL_1_OPTIONS as bR, CVC_17_LEVEL_2_TRANSGENDER_OPTIONS as bS, CVC_17_TRANSGENDER_VALUES as bT, CVC_180_EDUCATION_LEVEL as bU, CVC_180_LABELS as bV, CVC_180_ORDINAL as bW, CVC_180_VALUES as bX, CVC_181_COUNTRIES as bY, CVC_181_LABELS as bZ, CVC_196_CHILD_WELFARE_EPISODE_TYPE as b_, CVC_158_CUSTODY_STATUS as ba, CVC_158_LABELS as bb, CVC_158_VALUES as bc, CVC_159_CATEGORY as bd, CVC_159_CATEGORY_LABELS as be, CVC_159_CATEGORY_ORDER as bf, CVC_159_LABELS as bg, CVC_159_OPTIONS as bh, CVC_159_RELATIONSHIP_TIES as bi, CVC_159_SELECTABLE_OPTIONS as bj, CVC_159_TYPE_TO_CATEGORY as bk, CVC_159_VALUES as bl, CVC_15_CORE_SEX as bm, CVC_15_LABELS as bn, CVC_15_SELECTABLE_VALUES as bo, CVC_16_CORE_ORIENTATION as bp, CVC_16_LABELS as bq, CVC_16_LGBTQ_VALUES as br, CVC_171_CATEGORY as bs, CVC_171_CATEGORY_LABELS as bt, CVC_171_CHILD_TO_PARENT as bu, CVC_171_INCOME_BENEFITS as bv, CVC_171_INCOME_SOURCES as bw, CVC_171_LABELS as bx, CVC_171_PARENT_CHILDREN as by, CVC_171_SELECTABLE_OPTIONS as bz, AGE_BIN_REPORTING_IS_MINOR as c, type IC57Value as c$, CVC_196_VALUES as c0, CVC_1_LABELS as c1, CVC_1_NAME_TYPE as c2, CVC_1_STRUCTURED_NAME_TYPES as c3, CVC_1_UNSTRUCTURED_NAME_TYPES as c4, CVC_1_VALUES as c5, CVC_67_HMIS_SEX as c6, CVC_67_LABELS as c7, CVC_67_MISSINGNESS_VALUES as c8, CVC_67_SELECTABLE_VALUES as c9, DATA_QUALITY_LABELS as cA, DATA_QUALITY_VALUES as cB, DEFAULT_PARTICIPATION_ROLE_BY_CATEGORY as cC, type DataQualityValue as cD, FORM_STATUS as cE, FORM_STATUS_LABELS as cF, FORM_TYPE as cG, FORM_TYPE_LABELS as cH, FUNCTION_STATUS as cI, FUNCTION_STATUS_LABELS as cJ, FUNCTION_STATUS_VALUES as cK, type FormStatusValue as cL, type FormTypeValue as cM, type FunctionStatusValue as cN, type IC13Category as cO, type IC13PriorityGroup as cP, type IC13Value as cQ, type IC22Value as cR, type IC23Value as cS, type IC24Value as cT, type IC25Value as cU, type IC49ReferralOutcomeValue as cV, type IC49ReferralVerificationValue as cW, type IC49Value as cX, type IC4Value as cY, type IC56ChannelValue as cZ, type IC56Value as c_, CVC_72_HT_TYPE as ca, CVC_72_LABELS as cb, CVC_72_VALUES as cc, CVC_76_LABELS as cd, CVC_76_RACE_ETHNICITY as ce, CVC_76_VALUES as cf, CVC_93_CHILD_WELFARE_INVOLVEMENT as cg, CVC_93_LABELS as ch, CVC_93_VALUES as ci, CVC_95_JUVENILE_JUSTICE_INVOLVEMENT as cj, CVC_95_LABELS as ck, CVC_95_VALUES as cl, CVC_96_HOMELESS_STATUS as cm, CVC_96_LABELS as cn, CVC_96_VALUES as co, CVC_97_IMMIGRANT_REFUGEE as cp, CVC_97_LABELS as cq, CVC_97_VALUES as cr, CVC_98_LABELS as cs, CVC_98_US_VETERAN as ct, CVC_98_VALUES as cu, CVC_99_ENGLISH_PROFICIENCY as cv, CVC_99_LABELS as cw, CVC_99_VALUES as cx, DATA_QUALITY as cy, DATA_QUALITY_DESCRIPTIONS as cz, AGE_BIN_REPORTING_LABELS as d, PERMISSION_STATE as d$, type IC58ExternalCategory as d0, type IC58Value as d1, type IC59Value as d2, type IC5Value as d3, IC_13_CATEGORIES as d4, IC_13_CATEGORY_ORDER as d5, IC_13_LABELS as d6, IC_13_PRIORITY_GROUPS as d7, IC_13_RELATIONSHIP_ABBREV as d8, IC_13_RELATIONSHIP_TYPE as d9, IC_58_EXTERNAL_TIERED as dA, IC_58_LABELS as dB, IC_58_ORG_TYPE_GROUPS as dC, IC_58_PRIMARY_BRANCHES as dD, IC_58_REFERRAL_ENTITY as dE, IC_59_LABELS as dF, IC_59_SERVICE_STATE as dG, IC_5_FULL_LABELS as dH, IC_5_LABELS as dI, IC_5_VICTIMIZATION as dJ, INCIDENT_INVOLVEMENT_ROLE as dK, INCIDENT_INVOLVEMENT_ROLE_LABELS as dL, INCIDENT_INVOLVEMENT_ROLE_TO_PERSON_ROLE as dM, INCIDENT_PARTICIPATION_ROLE as dN, INCIDENT_PARTICIPATION_ROLE_LABELS as dO, INCIDENT_PARTICIPATION_ROLE_VALUES as dP, INTERACTION_TYPES as dQ, INTERACTION_TYPE_LABELS as dR, INVOLVEMENT_ROLE_TO_PERSON_TYPE as dS, type IncidentInvolvementRoleValue as dT, type IncidentParticipationRoleValue as dU, type InteractionTypeValue as dV, MINOR_ADULT_STATUS as dW, MINOR_ADULT_STATUS_LABELS as dX, type MinorAdultStatusValue as dY, type OrgTypeGroup as dZ, PARTICIPATION_ROLE_CATEGORIES as d_, IC_13_REVERSE_CONTEXT_LABELS as da, IC_22_CORE_SEX as db, IC_22_LABELS as dc, IC_23_CORE_GENDER_IDENTITY as dd, IC_23_LABELS as de, IC_24_LABELS as df, IC_24_RACE as dg, IC_25_ETHNICITY as dh, IC_25_LABELS as di, IC_48_SERVICE_CATEGORIES as dj, IC_49_DESCRIPTIONS as dk, IC_49_LABELS as dl, IC_49_REFERRAL_OUTCOME as dm, IC_49_REFERRAL_OUTCOME_LABELS as dn, IC_49_REFERRAL_VERIFICATION as dp, IC_49_REFERRAL_VERIFICATION_LABELS as dq, IC_49_SERVICE_MECHANISM as dr, IC_4_AGE_TYPE as ds, IC_4_LABELS as dt, IC_56_DESCRIPTIONS as du, IC_56_LABELS as dv, IC_56_OPTIONS as dw, IC_56_SERVICE_DELIVERY_CHANNEL as dx, IC_57_LABELS as dy, IC_57_SERVICE_AUDIENCE as dz, APPARENT_AGE as e, isLgbtqOrientation as e$, PERMISSION_STATE_DISPLAY as e0, PERMISSION_STATE_LABELS as e1, PERMISSION_STATE_VALUES as e2, PERSON_DISPLAY_CATEGORY as e3, PERSON_DISPLAY_CATEGORY_LABELS as e4, PERSON_ROLES as e5, PERSON_TYPE as e6, PERSON_TYPE_VALUES as e7, PLATFORM_TOOL as e8, PLATFORM_TOOL_LABELS as e9, type RelationshipConcernValue as eA, type RelationshipDynamicValue as eB, type RoleLevelValue as eC, SESSION_STATES as eD, SESSION_STATE_LABELS as eE, SHARE_VIEW as eF, SHARE_VIEW_LABELS as eG, SHARE_VIEW_VALUES as eH, SUBMISSION_STATES as eI, SUBMISSION_STATE_LABELS as eJ, type ServiceCategory as eK, type ServiceCategoryChild as eL, type SessionStateValue as eM, type ShareViewValue as eN, type SubmissionStateValue as eO, THREAD_INVOLVEMENT_ROLES as eP, USER_STATUS as eQ, USER_STATUS_LABELS as eR, type UserStatusValue as eS, VALID_INTERACTION_TYPES as eT, VALID_RECORD_STATES as eU, deriveAgeBinFromAge as eV, getDisplayCategoryForRole as eW, getPersonTypeForRole as eX, getRelationshipCategory as eY, isIC56Missingness as eZ, isIC56ValidChannel as e_, PLATFORM_TOOL_VALUES as ea, type PermissionStateValue as eb, type PersonDisplayCategoryValue as ec, type PersonRoleValue as ed, type PersonTypeValue as ee, type PlatformToolValue as ef, QUESTION_FORMAT as eg, QUESTION_FORMAT_LABELS as eh, QUICK_START_CONFIG as ei, QUICK_START_LABELS as ej, QUICK_START_TEMPLATES as ek, type QuestionFormatValue as el, type QuickStartTemplateId as em, RECORD_STATES as en, RECORD_STATE_LABELS as eo, RELATIONSHIP_CONCERNS as ep, RELATIONSHIP_CONCERNS_LABELS as eq, RELATIONSHIP_CONCERNS_VALUES as er, RELATIONSHIP_DYNAMICS as es, RELATIONSHIP_DYNAMICS_LABELS as et, RELATIONSHIP_DYNAMICS_VALUES as eu, ROLE_LEVEL as ev, ROLE_LEVEL_LABELS as ew, ROLE_LEVEL_VALUES as ex, type RecordStateValue as ey, type ReferralBranch as ez, APPARENT_AGE_LABELS as f, isProtectedRelationship as f0, isStructuredNameType as f1, isTransgenderGenderIdentity as f2, sortRelationshipsByPriority as f3, APP_SCOPE as g, type AccommodationValue as h, type AgeBinReportingValue as i, type AppScopeValue as j, type ApparentAgeValue as k, BIRTH_LOCATION_LABELS as l, BIRTH_LOCATION_VALUES as m, type BirthLocationValue as n, type CVC100Value as o, type CVC115Value as p, type CVC120Value as q, type CVC121Value as r, type CVC122Value as s, type CVC126Category as t, type CVC126Option as u, type CVC126Value as v, type CVC136Category as w, type CVC136Option as x, type CVC136Value as y, type CVC145Category as z };
|