@htilabs/platform-common-models 0.65.0 → 0.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -14,6 +14,7 @@ export { CalendarDate, CalendarDateLike, DOB_MIN_YEAR, DobLike, PartialDob, Part
14
14
  export { AuthzFunctionRow, AuthzRoleOverrides, AuthzRoleRow, AuthzStateMap, AuthzTeamPolicy, AuthzTier1StateMap, CORE_FUNCTION_DEFAULT_BOUNDS, CORE_FUNCTION_DEFAULT_BOUNDS_SOT_VERSION, CORE_FUNCTION_NOTES, CORE_FUNCTION_NOTES_SOT_VERSION, CaseViewingAccess, CoreFunctionNotes, FunctionDoorInput, FunctionDoorState, FunctionLabelLookup, FunctionRefusal, GoverningViewingPolicy, RecordViewingDecision, RecordViewingReason, ResolveEffectiveFunctionsInput, StoredViewingWhitelist, VIEWING_LEVEL_FUNCTIONS, VIEWING_POLICY_SPECIES, VIEWING_POLICY_VOCABULARIES, ViewingContext, ViewingLevel, ViewingPolicyGoverning, ViewingPolicyNone, ViewingPolicyQuery, ViewingPolicyRef, ViewingPolicyScopeResolver, ViewingPolicyScopeVocab, ViewingPolicyUnavailable, ViewingPolicyUnavailableReason, ViewingPolicyVocabulary, ViewingRecord, ViewingScopeResolver, ViewingSurface, canonicalRoleCode, caseSurfacesAsStub, caseSurfacesOn, caseViewingAccess, codebookDefaultBound, coreFunctionNotes, explainFunctionRefusal, functionDoor, isCanonEvaluableFunction, recordViewing, resolveEffectiveFunctions, resolveEffectiveViewingLevel, resolveViewingPolicy, selectActingTeamId, teamViewingLevelFromPolicy, unavailableViewingPolicy, viewingComponentOpen, viewingLevelFromFunctions, viewingPolicyVocabulary, viewingRowVisible, viewingWhitelistFromPolicy } from './authz/index.cjs';
15
15
  export { AccountSharePurposePolicy, EffectiveSharingCeiling, EffectiveSharingCeilingInputs, FiredShare, HTI_SHARE_PLATFORM_PURPOSE_ENABLED, HTI_SHARE_PLATFORM_REQUIRED_BY_PURPOSE, HTI_SHARE_PLATFORM_STARTER, HTI_SHARE_PLATFORM_STARTER_SOURCE, INFORMATION_SCOPE_FIELD_HOME_ROWS, SHARE_EVENT, SHARE_LEVEL_LABEL, SHARE_PLATFORM_STATE_LABEL, SHARE_POSTURE_RANK, SHARE_REPORTING_PURPOSES, SHARE_TRIGGER_EVENTS, SHARING_CEILING_DEFAULT_ROW_KEY, SHARING_CEILING_EXTERNAL_ROW_KEY, SHARING_CEILING_SCOPE_VERSION, ShareAttachmentIndex, ShareCategoryEntry, ShareDefaultScopeOptions, ShareEvent, ShareLevel, ShareListener, ShareNamedPolicy, SharePlatformDefault, SharePlatformState, SharePolicyAssignment, SharePolicyDoc, SharePosture, ShareRecipient, ShareResolution, ShareResolveInput, ShareTeamRowLike, ShareTriggerEventCode, SharingCeilingAllowed, SharingCeilingCellLike, SharingCeilingRung, SharingCeilingScope, SharingPlatformStarter, SharingPurposeLists, SharingScopeCeiling, SharingScopeEdits, accountSharePurposePolicy, attachmentIndexFromPolicies, ceilingCoverage, derivePlatformDefault, effectiveCeiling, fireShareEvent, firedShareKey, hasOwnScopeContent, intersectSharingCeilingLists, isCeilingCoverageRow, isPermittedByCeiling, isSharingPurposeDisabled, liveCategories, maskSelectionToCeiling, matchTeamRow, platformDefaultFor, policyIsShareListener, resolveShare, rowsExpandedByCeiling, rowsOutsideCeiling, rowsOverCeiling, scopeListCovers, scopeListStrictlyCovers, scopeRowWithinCeiling, shareDefaultScopeFor, shareListenersFor, shareRowCeiling, shareTriggerLabel, sharingCeilingCellList, sharingCeilingRowKey, sharingScopeEditsFromCells, systemCategoryOf } from './sharing-ceiling/index.cjs';
16
16
  export { A as AgencyOrgTypeFieldsInput, a as AgencyOrgTypeFieldsSchema, b as AgencyTypeKeyInput, c as AgencyTypeKeySchema, C as CvcCode, d as CvcCodeSchema, e as CvcDomain, f as CvcEntrySchema, g as CvcEnvelope, h as CvcEnvelopeSchema, i as CvcKey, j as CvcKeySchema, O as OrgTypeFieldsSchema, k as OrgTypeSelectableKeyInput, l as OrgTypeSelectableKeySchema, S as ServiceCategoryEntry, m as ServiceCategoryEntrySchema, n as SetOrgTypeInput, o as SetOrgTypeInputSchema, T as TeamApp, p as TeamAppSchema, q as TeamDirectoryFieldsInput, r as TeamDirectoryFieldsSchema, s as orgTypeFieldsShape, w as withOrgTypeFields } from './agency-8ufZJJDH.cjs';
17
+ export { O as ORG_KEY_PATTERN, i as isOrgKey, m as mintOrgKey } from './orgRecord-B4-ELaZ_.cjs';
17
18
  export { CodebookCatalog, CodebookCatalogEntry, accommodationTypeSot, actionStepCompletionStatusSot, actionStepTypeSot, activityTypeSot, adminRolesSot, administeringJurisdictionSot, ageBinReportingSot, announcementAudienceScopeSot, announcementResponseTypeSot, assertionDomainSot, assertionStatusSot, basisQuickPicksSot, birthCountryReportingSot, carCorrectionReasonSot, caseShareStateSot, checkInActivitySot, checkInPhaseSot, childBehavioralConcernsSot, childChangeTypeSot, childCustodyArrangementSot, citizenshipSot, codebookCodesOf, collectionContextSot, contactInfoTypesSot, contactInfoUseTypeSot, contactLinkTypeSot, contactSafetyStatusSot, coreDhStateSot, coreFunctionsSot, coreIndicatorsSot, coreInformationScopeSot, coreReferralOutcomeSot, countriesSot, createdBySystemSot, criminalOrgCategorySot, daIncidentArchiveReasonSot, daIncidentConfidenceSot, daIncidentDayApproxSot, daIncidentSeveritySot, determinationHelperCategoriesSot, determinationLevelSot, disabilityReportingSot, disabilitySubtypeSot, discretionLevelSot, emergencyContactCallReasonSot, emergencyContactPermissionsSot, emergencyExitCascadeSot, employmentStatusSot, englishProficiencySot, enrollmentApplicationStatusSot, exitProcessChecklistItemSot, exitReasonsSot, exploitationTypeSot, eyeColorSot, facialHairSot, facilitatorEntityTypeSot, facilitatorLabelUsedInSourceSot, facilitatorSubroleSot, frequencyCadenceSot, funderSot, genderIdentitySot, genderReportingSot, generalDisabilitySot, goalCategorySot, goalPrioritySot, goalStatusSot, goalWithdrawalReasonSot, hairColorSot, hasTattoosSot, highestEducationLevelCompletedSot, hivStatusSot, hmisCurrentLivingSituationSot, hmisProjectTypeSot, hmisRelationshipToHohSot, hmisSexSot, homelessStatusSot, hopeScaleCaptureContextSot, hopeScaleResponseOptionsSot, hopeScaleTierSot, housingSubsidyTypesSot, htTypeSot, identificationStatusSot, immigrationLegalStatusChangeTypeSot, incarcerationEpisodeTypeSot, incidentInvolvementRolesSot, incidentParticipationRolesSot, incomeBenefitsSourcesSot, inferenceTypeSot, investigativeRequestTypeSot, juvenileJusticeEpisodeTypeSot, juvenileJusticeInvolvementStatusSot, languagesSot, leReportStatusSot, legalActionTypeSot, livingSituationSot, locationTypeSot, maritalStatusLegalSot, mentalHealthStatusSot, messageReportReasonSot, midStayEventTypeSot, milestoneTypeSot, militaryBranchSot, militaryStatusSot, minorAdultStatusSot, nameTypeSot, needsAssessmentChangeTypeSot, needsResidentialAgainSot, offenderStatusFamilySot, offenderStatusSot, orientationIdentitySot, personRelationshipsSot, petExitReasonSot, petRelationshipBasisSot, poPetitionBasisSot, poStatusSot, poViolationStatusSot, preferredContactMethodSot, primaryLanguageSot, programEnrollmentChangeTypeSot, programSpecificCodeSot, pronounsSot, proofOfIdTypeSot, provenanceSourceIdSot, qualityFlagsSot, raceEthnicityReportingSot, raceEthnicitySot, radiusBucketSot, recencyBandSot, recordRemovalReasonSot, referenceLinkTypeSot, referralEntityCategorySot, referralOriginSot, relationshipConcernSot, relationshipDynamicsSot, relationshipStatusCurrentSot, relationshipTiesSot, resolveCodebookCode, resolveCodebookGateAnswer, returnedToAbuserStatusSot, riskCategorySot, riskIdentificationMilestoneSot, riskSeverityBandSot, roiMethodSot, roiScopeSot, roiStatusSot, roleContextSot, romanticRelationshipChangeTypeSot, rsvpResponseSot, serviceAudienceSot, serviceCategoriesSot, serviceDeliveryChangeTypeSot, serviceDeliveryChannelSot, serviceMechanismsSot, servicePlanClosureReasonSot, servicePlanReviewSnoozeReasonSot, serviceSourceSot, serviceStatesSot, sessionNoteVisibilitySot, sessionStateSot, sessionTemplateSot, severityFollowUpSot, sexProviderSubroleSot, shareCadenceSot, sharePurposeSot, shareResponseReasonSot, signatureMethodSot, signatureTypeSot, smtBodyLocationSot, smtNameRelationSot, smtSignificanceFlagsSot, smtTypeSot, sourceCategorySot, sourceInstrumentSot, sourceSubtypeSot, sourceSystemSot, specialNeedsDisabilitiesSot, subjectTypeSot, substanceUseStatusSot, suggestionSourceSot, supportStrengthSot, supportTopicSot, threadStatusSot, threadTypeSot, timeScopeSot, traffickingRelevantRoleSot, tribesSot, userRolesSot, vehicleBodyTypeSot, vehicleColorSot, verificationMethodSot, verificationStatusSot, veteranStatusSot, victimAbuseTypesSot, victimStatusFamilySot, visaTypeSot, whyNotsSot } from './cvcs/index.cjs';
18
19
  export { P as PROGRAM_REVIEW_STATUS, a as PROGRAM_REVIEW_STATUS_VALUES, b as ProgramReviewStatus, i as isLiveOrganizationProgram, c as isProgramReviewStatus } from './vocabulary-Cxhi9EGt.cjs';
19
20
  import 'mongoose';
package/dist/index.d.ts CHANGED
@@ -14,6 +14,7 @@ export { CalendarDate, CalendarDateLike, DOB_MIN_YEAR, DobLike, PartialDob, Part
14
14
  export { AuthzFunctionRow, AuthzRoleOverrides, AuthzRoleRow, AuthzStateMap, AuthzTeamPolicy, AuthzTier1StateMap, CORE_FUNCTION_DEFAULT_BOUNDS, CORE_FUNCTION_DEFAULT_BOUNDS_SOT_VERSION, CORE_FUNCTION_NOTES, CORE_FUNCTION_NOTES_SOT_VERSION, CaseViewingAccess, CoreFunctionNotes, FunctionDoorInput, FunctionDoorState, FunctionLabelLookup, FunctionRefusal, GoverningViewingPolicy, RecordViewingDecision, RecordViewingReason, ResolveEffectiveFunctionsInput, StoredViewingWhitelist, VIEWING_LEVEL_FUNCTIONS, VIEWING_POLICY_SPECIES, VIEWING_POLICY_VOCABULARIES, ViewingContext, ViewingLevel, ViewingPolicyGoverning, ViewingPolicyNone, ViewingPolicyQuery, ViewingPolicyRef, ViewingPolicyScopeResolver, ViewingPolicyScopeVocab, ViewingPolicyUnavailable, ViewingPolicyUnavailableReason, ViewingPolicyVocabulary, ViewingRecord, ViewingScopeResolver, ViewingSurface, canonicalRoleCode, caseSurfacesAsStub, caseSurfacesOn, caseViewingAccess, codebookDefaultBound, coreFunctionNotes, explainFunctionRefusal, functionDoor, isCanonEvaluableFunction, recordViewing, resolveEffectiveFunctions, resolveEffectiveViewingLevel, resolveViewingPolicy, selectActingTeamId, teamViewingLevelFromPolicy, unavailableViewingPolicy, viewingComponentOpen, viewingLevelFromFunctions, viewingPolicyVocabulary, viewingRowVisible, viewingWhitelistFromPolicy } from './authz/index.js';
15
15
  export { AccountSharePurposePolicy, EffectiveSharingCeiling, EffectiveSharingCeilingInputs, FiredShare, HTI_SHARE_PLATFORM_PURPOSE_ENABLED, HTI_SHARE_PLATFORM_REQUIRED_BY_PURPOSE, HTI_SHARE_PLATFORM_STARTER, HTI_SHARE_PLATFORM_STARTER_SOURCE, INFORMATION_SCOPE_FIELD_HOME_ROWS, SHARE_EVENT, SHARE_LEVEL_LABEL, SHARE_PLATFORM_STATE_LABEL, SHARE_POSTURE_RANK, SHARE_REPORTING_PURPOSES, SHARE_TRIGGER_EVENTS, SHARING_CEILING_DEFAULT_ROW_KEY, SHARING_CEILING_EXTERNAL_ROW_KEY, SHARING_CEILING_SCOPE_VERSION, ShareAttachmentIndex, ShareCategoryEntry, ShareDefaultScopeOptions, ShareEvent, ShareLevel, ShareListener, ShareNamedPolicy, SharePlatformDefault, SharePlatformState, SharePolicyAssignment, SharePolicyDoc, SharePosture, ShareRecipient, ShareResolution, ShareResolveInput, ShareTeamRowLike, ShareTriggerEventCode, SharingCeilingAllowed, SharingCeilingCellLike, SharingCeilingRung, SharingCeilingScope, SharingPlatformStarter, SharingPurposeLists, SharingScopeCeiling, SharingScopeEdits, accountSharePurposePolicy, attachmentIndexFromPolicies, ceilingCoverage, derivePlatformDefault, effectiveCeiling, fireShareEvent, firedShareKey, hasOwnScopeContent, intersectSharingCeilingLists, isCeilingCoverageRow, isPermittedByCeiling, isSharingPurposeDisabled, liveCategories, maskSelectionToCeiling, matchTeamRow, platformDefaultFor, policyIsShareListener, resolveShare, rowsExpandedByCeiling, rowsOutsideCeiling, rowsOverCeiling, scopeListCovers, scopeListStrictlyCovers, scopeRowWithinCeiling, shareDefaultScopeFor, shareListenersFor, shareRowCeiling, shareTriggerLabel, sharingCeilingCellList, sharingCeilingRowKey, sharingScopeEditsFromCells, systemCategoryOf } from './sharing-ceiling/index.js';
16
16
  export { A as AgencyOrgTypeFieldsInput, a as AgencyOrgTypeFieldsSchema, b as AgencyTypeKeyInput, c as AgencyTypeKeySchema, C as CvcCode, d as CvcCodeSchema, e as CvcDomain, f as CvcEntrySchema, g as CvcEnvelope, h as CvcEnvelopeSchema, i as CvcKey, j as CvcKeySchema, O as OrgTypeFieldsSchema, k as OrgTypeSelectableKeyInput, l as OrgTypeSelectableKeySchema, S as ServiceCategoryEntry, m as ServiceCategoryEntrySchema, n as SetOrgTypeInput, o as SetOrgTypeInputSchema, T as TeamApp, p as TeamAppSchema, q as TeamDirectoryFieldsInput, r as TeamDirectoryFieldsSchema, s as orgTypeFieldsShape, w as withOrgTypeFields } from './agency-CnVTwLeV.js';
17
+ export { O as ORG_KEY_PATTERN, i as isOrgKey, m as mintOrgKey } from './orgRecord-h3Z-V23F.js';
17
18
  export { CodebookCatalog, CodebookCatalogEntry, accommodationTypeSot, actionStepCompletionStatusSot, actionStepTypeSot, activityTypeSot, adminRolesSot, administeringJurisdictionSot, ageBinReportingSot, announcementAudienceScopeSot, announcementResponseTypeSot, assertionDomainSot, assertionStatusSot, basisQuickPicksSot, birthCountryReportingSot, carCorrectionReasonSot, caseShareStateSot, checkInActivitySot, checkInPhaseSot, childBehavioralConcernsSot, childChangeTypeSot, childCustodyArrangementSot, citizenshipSot, codebookCodesOf, collectionContextSot, contactInfoTypesSot, contactInfoUseTypeSot, contactLinkTypeSot, contactSafetyStatusSot, coreDhStateSot, coreFunctionsSot, coreIndicatorsSot, coreInformationScopeSot, coreReferralOutcomeSot, countriesSot, createdBySystemSot, criminalOrgCategorySot, daIncidentArchiveReasonSot, daIncidentConfidenceSot, daIncidentDayApproxSot, daIncidentSeveritySot, determinationHelperCategoriesSot, determinationLevelSot, disabilityReportingSot, disabilitySubtypeSot, discretionLevelSot, emergencyContactCallReasonSot, emergencyContactPermissionsSot, emergencyExitCascadeSot, employmentStatusSot, englishProficiencySot, enrollmentApplicationStatusSot, exitProcessChecklistItemSot, exitReasonsSot, exploitationTypeSot, eyeColorSot, facialHairSot, facilitatorEntityTypeSot, facilitatorLabelUsedInSourceSot, facilitatorSubroleSot, frequencyCadenceSot, funderSot, genderIdentitySot, genderReportingSot, generalDisabilitySot, goalCategorySot, goalPrioritySot, goalStatusSot, goalWithdrawalReasonSot, hairColorSot, hasTattoosSot, highestEducationLevelCompletedSot, hivStatusSot, hmisCurrentLivingSituationSot, hmisProjectTypeSot, hmisRelationshipToHohSot, hmisSexSot, homelessStatusSot, hopeScaleCaptureContextSot, hopeScaleResponseOptionsSot, hopeScaleTierSot, housingSubsidyTypesSot, htTypeSot, identificationStatusSot, immigrationLegalStatusChangeTypeSot, incarcerationEpisodeTypeSot, incidentInvolvementRolesSot, incidentParticipationRolesSot, incomeBenefitsSourcesSot, inferenceTypeSot, investigativeRequestTypeSot, juvenileJusticeEpisodeTypeSot, juvenileJusticeInvolvementStatusSot, languagesSot, leReportStatusSot, legalActionTypeSot, livingSituationSot, locationTypeSot, maritalStatusLegalSot, mentalHealthStatusSot, messageReportReasonSot, midStayEventTypeSot, milestoneTypeSot, militaryBranchSot, militaryStatusSot, minorAdultStatusSot, nameTypeSot, needsAssessmentChangeTypeSot, needsResidentialAgainSot, offenderStatusFamilySot, offenderStatusSot, orientationIdentitySot, personRelationshipsSot, petExitReasonSot, petRelationshipBasisSot, poPetitionBasisSot, poStatusSot, poViolationStatusSot, preferredContactMethodSot, primaryLanguageSot, programEnrollmentChangeTypeSot, programSpecificCodeSot, pronounsSot, proofOfIdTypeSot, provenanceSourceIdSot, qualityFlagsSot, raceEthnicityReportingSot, raceEthnicitySot, radiusBucketSot, recencyBandSot, recordRemovalReasonSot, referenceLinkTypeSot, referralEntityCategorySot, referralOriginSot, relationshipConcernSot, relationshipDynamicsSot, relationshipStatusCurrentSot, relationshipTiesSot, resolveCodebookCode, resolveCodebookGateAnswer, returnedToAbuserStatusSot, riskCategorySot, riskIdentificationMilestoneSot, riskSeverityBandSot, roiMethodSot, roiScopeSot, roiStatusSot, roleContextSot, romanticRelationshipChangeTypeSot, rsvpResponseSot, serviceAudienceSot, serviceCategoriesSot, serviceDeliveryChangeTypeSot, serviceDeliveryChannelSot, serviceMechanismsSot, servicePlanClosureReasonSot, servicePlanReviewSnoozeReasonSot, serviceSourceSot, serviceStatesSot, sessionNoteVisibilitySot, sessionStateSot, sessionTemplateSot, severityFollowUpSot, sexProviderSubroleSot, shareCadenceSot, sharePurposeSot, shareResponseReasonSot, signatureMethodSot, signatureTypeSot, smtBodyLocationSot, smtNameRelationSot, smtSignificanceFlagsSot, smtTypeSot, sourceCategorySot, sourceInstrumentSot, sourceSubtypeSot, sourceSystemSot, specialNeedsDisabilitiesSot, subjectTypeSot, substanceUseStatusSot, suggestionSourceSot, supportStrengthSot, supportTopicSot, threadStatusSot, threadTypeSot, timeScopeSot, traffickingRelevantRoleSot, tribesSot, userRolesSot, vehicleBodyTypeSot, vehicleColorSot, verificationMethodSot, verificationStatusSot, veteranStatusSot, victimAbuseTypesSot, victimStatusFamilySot, visaTypeSot, whyNotsSot } from './cvcs/index.js';
18
19
  export { P as PROGRAM_REVIEW_STATUS, a as PROGRAM_REVIEW_STATUS_VALUES, b as ProgramReviewStatus, i as isLiveOrganizationProgram, c as isProgramReviewStatus } from './vocabulary-Cxhi9EGt.js';
19
20
  import 'mongoose';
package/dist/index.js CHANGED
@@ -17824,6 +17824,13 @@ var ORG_KEY_PATTERN = /^[a-z0-9][a-z0-9_-]{0,119}$/;
17824
17824
  function isOrgKey(value) {
17825
17825
  return typeof value === "string" && ORG_KEY_PATTERN.test(value);
17826
17826
  }
17827
+ function mintOrgKey(id) {
17828
+ const hex = (typeof id === "string" ? id : id.toHexString()).trim().toLowerCase();
17829
+ if (!/^[0-9a-f]{24}$/.test(hex)) {
17830
+ throw new Error("mintOrgKey: needs the organization's 24-hex _id");
17831
+ }
17832
+ return `org-${hex}`;
17833
+ }
17827
17834
  var line = (max) => z.string().trim().min(1).max(max).nullable();
17828
17835
  var ORG_VSP_TWO_STEP_MESSAGE = "vspPrivateNonprofit is step 2 of the HMIS VSP two-step and requires vsp: true";
17829
17836
  var OrgIdentityWriteSchema = z.object({
@@ -73856,6 +73863,7 @@ export {
73856
73863
  ORG_KEY_INDEX_NAME,
73857
73864
  ORG_KEY_INDEX_OPTIONS,
73858
73865
  ORG_KEY_INDEX_SPEC,
73866
+ ORG_KEY_PATTERN,
73859
73867
  ORG_TYPE_FIELD_NAMES,
73860
73868
  ORG_TYPE_HEADING_KEYS,
73861
73869
  ORG_TYPE_KEYS,
@@ -74209,6 +74217,7 @@ export {
74209
74217
  isLgbtqOrientation,
74210
74218
  isLiveOrganizationProgram,
74211
74219
  isNeverPickableServiceMechanism,
74220
+ isOrgKey,
74212
74221
  isOrgTypeKey,
74213
74222
  isPermittedByCeiling,
74214
74223
  isProgramReviewStatus,
@@ -74242,6 +74251,7 @@ export {
74242
74251
  militaryBranch_v1_0_0_default as militaryBranchSot,
74243
74252
  militaryStatus_v1_0_0_default as militaryStatusSot,
74244
74253
  minorAdultStatus_v1_0_0_default as minorAdultStatusSot,
74254
+ mintOrgKey,
74245
74255
  mirrorOrgTypeFields,
74246
74256
  nameType_v1_0_0_default as nameTypeSot,
74247
74257
  needsAssessmentChangeType_v1_0_0_default as needsAssessmentChangeTypeSot,