@htilabs/platform-common-models 0.39.0 → 0.41.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/README.md +86 -0
- package/dist/age/index.cjs +136 -0
- package/dist/age/index.cjs.map +1 -0
- package/dist/age/index.d.cts +136 -0
- package/dist/age/index.d.ts +136 -0
- package/dist/age/index.js +105 -0
- package/dist/age/index.js.map +1 -0
- package/dist/index.cjs +159 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +150 -0
- package/dist/index.js.map +1 -1
- package/dist/share-rules/index.cjs +822 -0
- package/dist/share-rules/index.cjs.map +1 -0
- package/dist/share-rules/index.d.cts +804 -0
- package/dist/share-rules/index.d.ts +804 -0
- package/dist/share-rules/index.js +736 -0
- package/dist/share-rules/index.js.map +1 -0
- package/dist/sharing-ceiling/index.cjs +51 -0
- package/dist/sharing-ceiling/index.cjs.map +1 -1
- package/dist/sharing-ceiling/index.d.cts +87 -1
- package/dist/sharing-ceiling/index.d.ts +87 -1
- package/dist/sharing-ceiling/index.js +47 -0
- package/dist/sharing-ceiling/index.js.map +1 -1
- package/package.json +12 -1
- package/src/age/__tests__/ageFromDob.test.ts +192 -0
- package/src/age/ageFromDob.ts +269 -0
- package/src/age/index.ts +8 -0
- package/src/index.ts +4 -0
- package/src/shareRules/__tests__/caseShareLane.test.ts +259 -0
- package/src/shareRules/__tests__/magicLinkAddresses.test.ts +107 -0
- package/src/shareRules/__tests__/platformApps.test.ts +133 -0
- package/src/shareRules/__tests__/releaseTerms.test.ts +358 -0
- package/src/shareRules/__tests__/senderRoiPosture.test.ts +284 -0
- package/src/shareRules/__tests__/sharingMethods.test.ts +105 -0
- package/src/shareRules/caseShareLane.ts +289 -0
- package/src/shareRules/index.ts +31 -0
- package/src/shareRules/magicLinkAddresses.ts +185 -0
- package/src/shareRules/platformApps.ts +168 -0
- package/src/shareRules/releaseTerms.ts +359 -0
- package/src/shareRules/reportPurposes.ts +50 -0
- package/src/shareRules/senderRoiPosture.ts +296 -0
- package/src/shareRules/sharingMethods.ts +204 -0
- package/src/sharingCeiling/__tests__/threadLift.test.ts +353 -0
- package/src/sharingCeiling/coverage.ts +63 -0
- package/src/sharingCeiling/defaults.ts +106 -0
- package/src/sharingCeiling/index.ts +7 -0
package/dist/index.d.cts
CHANGED
|
@@ -10,8 +10,9 @@ export { AccommodationTypeKey, AccommodationTypeKeys, ActionStepCompletionStatus
|
|
|
10
10
|
export { CvcRegistryService, CvcRegistryServiceOptions, EntryLoader, ICvcEntry, ICvcRegistry, RegistryLoader, RegistryScope, applyEntryOverrides, cascadeExclusions, cvcVersionsToRecord, resolveRegistryWithInheritance } from './services/index.cjs';
|
|
11
11
|
export { C as CreateInformationScopeResolverInput, I as INFORMATION_SCOPE_POLICY_VERSION_ROW_NOTE, a as INFORMATION_SCOPE_READABLE_VERSIONS, b as INFORMATION_SCOPE_SYSTEM_INFO, c as INFORMATION_SCOPE_VERSION, d as InformationScopeResolver, S as ScopeApp, e as ScopeApps, f as ScopeCodeReading, g as ScopeKindBranch, h as ScopeMigration, i as ScopeMigrationRule, j as ScopePersonKind, k as ScopeReadOptions, l as ScopeReading, m as ScopeReadingRule, n as ScopeReadingSubject, o as ScopeRetainedReading, p as ScopeRow, q as ScopeRowStatus, r as ScopeRowType, s as ScopeShareOptions, t as ScopeShareReason, u as ScopeShareVerdict, v as ScopeSpecialDataType, w as ScopeSubjectKind, x as StoredScopeList, y as createInformationScopeResolver, z as isScopeInstrumentRow, A as isScopeRestRow, B as isSelectableScopeRow, D as kindForPerson } from './informationScopeResolver-BzYu97DE.cjs';
|
|
12
12
|
export { CoreInformationScopeSot, CoreInformationScopeSotEntry, CoreInformationScopeSotMigrationLine, scopeMigrationsFromSot, scopeRowsFromSot } from './information-scope/index.cjs';
|
|
13
|
+
export { CalendarDate, CalendarDateLike, DOB_MIN_YEAR, DobLike, PartialDob, PartialDobLike, ageFromDob, ageInputFromStoredDob, calendarDateOf, normalizeDob } from './age/index.cjs';
|
|
13
14
|
export { AuthzFunctionRow, AuthzRoleOverrides, AuthzRoleRow, AuthzStateMap, AuthzTeamPolicy, AuthzTier1StateMap, CORE_FUNCTION_DEFAULT_BOUNDS, CORE_FUNCTION_DEFAULT_BOUNDS_SOT_VERSION, ResolveEffectiveFunctionsInput, VIEWING_LEVEL_FUNCTIONS, ViewingLevel, codebookDefaultBound, isCanonEvaluableFunction, resolveEffectiveFunctions, resolveEffectiveViewingLevel, selectActingTeamId, viewingLevelFromFunctions } from './authz/index.cjs';
|
|
14
|
-
export { EffectiveSharingCeiling, EffectiveSharingCeilingInputs, HTI_SHARE_PLATFORM_PURPOSE_ENABLED, HTI_SHARE_PLATFORM_STARTER, HTI_SHARE_PLATFORM_STARTER_SOURCE, INFORMATION_SCOPE_FIELD_HOME_ROWS, SHARING_CEILING_DEFAULT_ROW_KEY, SHARING_CEILING_EXTERNAL_ROW_KEY, SHARING_CEILING_SCOPE_VERSION, SharingCeilingAllowed, SharingCeilingCellLike, SharingCeilingRung, SharingCeilingScope, SharingPlatformStarter, SharingPurposeLists, SharingScopeEdits, ceilingCoverage, effectiveCeiling, hasOwnScopeContent, isCeilingCoverageRow, isSharingPurposeDisabled, maskSelectionToCeiling, rowsExpandedByCeiling, rowsOutsideCeiling, rowsOverCeiling, scopeRowWithinCeiling, sharingCeilingCellList, sharingCeilingRowKey, sharingScopeEditsFromCells } from './sharing-ceiling/index.cjs';
|
|
15
|
+
export { AccountSharePurposePolicy, EffectiveSharingCeiling, EffectiveSharingCeilingInputs, HTI_SHARE_PLATFORM_PURPOSE_ENABLED, HTI_SHARE_PLATFORM_STARTER, HTI_SHARE_PLATFORM_STARTER_SOURCE, INFORMATION_SCOPE_FIELD_HOME_ROWS, SHARING_CEILING_DEFAULT_ROW_KEY, SHARING_CEILING_EXTERNAL_ROW_KEY, SHARING_CEILING_SCOPE_VERSION, ShareDefaultScopeOptions, SharingCeilingAllowed, SharingCeilingCellLike, SharingCeilingRung, SharingCeilingScope, SharingPlatformStarter, SharingPurposeLists, SharingScopeCeiling, SharingScopeEdits, accountSharePurposePolicy, ceilingCoverage, effectiveCeiling, hasOwnScopeContent, intersectSharingCeilingLists, isCeilingCoverageRow, isPermittedByCeiling, isSharingPurposeDisabled, maskSelectionToCeiling, rowsExpandedByCeiling, rowsOutsideCeiling, rowsOverCeiling, scopeRowWithinCeiling, shareDefaultScopeFor, sharingCeilingCellList, sharingCeilingRowKey, sharingScopeEditsFromCells } from './sharing-ceiling/index.cjs';
|
|
15
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';
|
|
16
17
|
export { accommodationTypeSot, actionStepCompletionStatusSot, actionStepTypeSot, activityTypeSot, adminRolesSot, administeringJurisdictionSot, ageBinReportingSot, announcementAudienceScopeSot, announcementResponseTypeSot, assertionDomainSot, assertionStatusSot, basisQuickPicksSot, carCorrectionReasonSot, caseShareStateSot, checkInActivitySot, checkInPhaseSot, childBehavioralConcernsSot, childChangeTypeSot, childCustodyArrangementSot, citizenshipSot, collectionContextSot, contactInfoTypesSot, contactInfoUseTypeSot, contactLinkTypeSot, contactSafetyStatusSot, coreDhStateSot, coreFunctionsSot, coreIndicatorsSot, coreInformationScopeSot, coreReferralOutcomeSot, countriesSot, createdBySystemSot, criminalOrgCategorySot, daIncidentArchiveReasonSot, daIncidentConfidenceSot, daIncidentDayApproxSot, daIncidentSeveritySot, determinationHelperCategoriesSot, determinationLevelSot, disabilitySubtypeSot, discretionLevelSot, emergencyContactCallReasonSot, emergencyContactPermissionsSot, emergencyExitCascadeSot, employmentStatusSot, enrollmentApplicationStatusSot, exitProcessChecklistItemSot, exitReasonsSot, exploitationTypeSot, eyeColorSot, facialHairSot, facilitatorEntityTypeSot, facilitatorLabelUsedInSourceSot, facilitatorSubroleSot, frequencyCadenceSot, funderSot, genderIdentitySot, 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, raceEthnicitySot, radiusBucketSot, recencyBandSot, referenceLinkTypeSot, referralEntityCategorySot, referralOriginSot, relationshipConcernSot, relationshipDynamicsSot, relationshipStatusCurrentSot, relationshipTiesSot, returnedToAbuserStatusSot, riskCategorySot, riskIdentificationMilestoneSot, riskSeverityBandSot, roiMethodSot, roiScopeSot, roiStatusSot, roleContextSot, romanticRelationshipChangeTypeSot, rsvpResponseSot, serviceAudienceSot, serviceCategoriesSot, 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, verificationMethodSot, verificationStatusSot, victimAbuseTypesSot, victimStatusFamilySot, visaTypeSot, whyNotsSot } from './cvcs/index.cjs';
|
|
17
18
|
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';
|
package/dist/index.d.ts
CHANGED
|
@@ -10,8 +10,9 @@ export { AccommodationTypeKey, AccommodationTypeKeys, ActionStepCompletionStatus
|
|
|
10
10
|
export { CvcRegistryService, CvcRegistryServiceOptions, EntryLoader, ICvcEntry, ICvcRegistry, RegistryLoader, RegistryScope, applyEntryOverrides, cascadeExclusions, cvcVersionsToRecord, resolveRegistryWithInheritance } from './services/index.js';
|
|
11
11
|
export { C as CreateInformationScopeResolverInput, I as INFORMATION_SCOPE_POLICY_VERSION_ROW_NOTE, a as INFORMATION_SCOPE_READABLE_VERSIONS, b as INFORMATION_SCOPE_SYSTEM_INFO, c as INFORMATION_SCOPE_VERSION, d as InformationScopeResolver, S as ScopeApp, e as ScopeApps, f as ScopeCodeReading, g as ScopeKindBranch, h as ScopeMigration, i as ScopeMigrationRule, j as ScopePersonKind, k as ScopeReadOptions, l as ScopeReading, m as ScopeReadingRule, n as ScopeReadingSubject, o as ScopeRetainedReading, p as ScopeRow, q as ScopeRowStatus, r as ScopeRowType, s as ScopeShareOptions, t as ScopeShareReason, u as ScopeShareVerdict, v as ScopeSpecialDataType, w as ScopeSubjectKind, x as StoredScopeList, y as createInformationScopeResolver, z as isScopeInstrumentRow, A as isScopeRestRow, B as isSelectableScopeRow, D as kindForPerson } from './informationScopeResolver-BzYu97DE.js';
|
|
12
12
|
export { CoreInformationScopeSot, CoreInformationScopeSotEntry, CoreInformationScopeSotMigrationLine, scopeMigrationsFromSot, scopeRowsFromSot } from './information-scope/index.js';
|
|
13
|
+
export { CalendarDate, CalendarDateLike, DOB_MIN_YEAR, DobLike, PartialDob, PartialDobLike, ageFromDob, ageInputFromStoredDob, calendarDateOf, normalizeDob } from './age/index.js';
|
|
13
14
|
export { AuthzFunctionRow, AuthzRoleOverrides, AuthzRoleRow, AuthzStateMap, AuthzTeamPolicy, AuthzTier1StateMap, CORE_FUNCTION_DEFAULT_BOUNDS, CORE_FUNCTION_DEFAULT_BOUNDS_SOT_VERSION, ResolveEffectiveFunctionsInput, VIEWING_LEVEL_FUNCTIONS, ViewingLevel, codebookDefaultBound, isCanonEvaluableFunction, resolveEffectiveFunctions, resolveEffectiveViewingLevel, selectActingTeamId, viewingLevelFromFunctions } from './authz/index.js';
|
|
14
|
-
export { EffectiveSharingCeiling, EffectiveSharingCeilingInputs, HTI_SHARE_PLATFORM_PURPOSE_ENABLED, HTI_SHARE_PLATFORM_STARTER, HTI_SHARE_PLATFORM_STARTER_SOURCE, INFORMATION_SCOPE_FIELD_HOME_ROWS, SHARING_CEILING_DEFAULT_ROW_KEY, SHARING_CEILING_EXTERNAL_ROW_KEY, SHARING_CEILING_SCOPE_VERSION, SharingCeilingAllowed, SharingCeilingCellLike, SharingCeilingRung, SharingCeilingScope, SharingPlatformStarter, SharingPurposeLists, SharingScopeEdits, ceilingCoverage, effectiveCeiling, hasOwnScopeContent, isCeilingCoverageRow, isSharingPurposeDisabled, maskSelectionToCeiling, rowsExpandedByCeiling, rowsOutsideCeiling, rowsOverCeiling, scopeRowWithinCeiling, sharingCeilingCellList, sharingCeilingRowKey, sharingScopeEditsFromCells } from './sharing-ceiling/index.js';
|
|
15
|
+
export { AccountSharePurposePolicy, EffectiveSharingCeiling, EffectiveSharingCeilingInputs, HTI_SHARE_PLATFORM_PURPOSE_ENABLED, HTI_SHARE_PLATFORM_STARTER, HTI_SHARE_PLATFORM_STARTER_SOURCE, INFORMATION_SCOPE_FIELD_HOME_ROWS, SHARING_CEILING_DEFAULT_ROW_KEY, SHARING_CEILING_EXTERNAL_ROW_KEY, SHARING_CEILING_SCOPE_VERSION, ShareDefaultScopeOptions, SharingCeilingAllowed, SharingCeilingCellLike, SharingCeilingRung, SharingCeilingScope, SharingPlatformStarter, SharingPurposeLists, SharingScopeCeiling, SharingScopeEdits, accountSharePurposePolicy, ceilingCoverage, effectiveCeiling, hasOwnScopeContent, intersectSharingCeilingLists, isCeilingCoverageRow, isPermittedByCeiling, isSharingPurposeDisabled, maskSelectionToCeiling, rowsExpandedByCeiling, rowsOutsideCeiling, rowsOverCeiling, scopeRowWithinCeiling, shareDefaultScopeFor, sharingCeilingCellList, sharingCeilingRowKey, sharingScopeEditsFromCells } from './sharing-ceiling/index.js';
|
|
15
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';
|
|
16
17
|
export { accommodationTypeSot, actionStepCompletionStatusSot, actionStepTypeSot, activityTypeSot, adminRolesSot, administeringJurisdictionSot, ageBinReportingSot, announcementAudienceScopeSot, announcementResponseTypeSot, assertionDomainSot, assertionStatusSot, basisQuickPicksSot, carCorrectionReasonSot, caseShareStateSot, checkInActivitySot, checkInPhaseSot, childBehavioralConcernsSot, childChangeTypeSot, childCustodyArrangementSot, citizenshipSot, collectionContextSot, contactInfoTypesSot, contactInfoUseTypeSot, contactLinkTypeSot, contactSafetyStatusSot, coreDhStateSot, coreFunctionsSot, coreIndicatorsSot, coreInformationScopeSot, coreReferralOutcomeSot, countriesSot, createdBySystemSot, criminalOrgCategorySot, daIncidentArchiveReasonSot, daIncidentConfidenceSot, daIncidentDayApproxSot, daIncidentSeveritySot, determinationHelperCategoriesSot, determinationLevelSot, disabilitySubtypeSot, discretionLevelSot, emergencyContactCallReasonSot, emergencyContactPermissionsSot, emergencyExitCascadeSot, employmentStatusSot, enrollmentApplicationStatusSot, exitProcessChecklistItemSot, exitReasonsSot, exploitationTypeSot, eyeColorSot, facialHairSot, facilitatorEntityTypeSot, facilitatorLabelUsedInSourceSot, facilitatorSubroleSot, frequencyCadenceSot, funderSot, genderIdentitySot, 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, raceEthnicitySot, radiusBucketSot, recencyBandSot, referenceLinkTypeSot, referralEntityCategorySot, referralOriginSot, relationshipConcernSot, relationshipDynamicsSot, relationshipStatusCurrentSot, relationshipTiesSot, returnedToAbuserStatusSot, riskCategorySot, riskIdentificationMilestoneSot, riskSeverityBandSot, roiMethodSot, roiScopeSot, roiStatusSot, roleContextSot, romanticRelationshipChangeTypeSot, rsvpResponseSot, serviceAudienceSot, serviceCategoriesSot, 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, verificationMethodSot, verificationStatusSot, victimAbuseTypesSot, victimStatusFamilySot, visaTypeSot, whyNotsSot } from './cvcs/index.js';
|
|
17
18
|
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';
|
package/dist/index.js
CHANGED
|
@@ -14867,6 +14867,104 @@ function scopeMigrationsFromSot(sot) {
|
|
|
14867
14867
|
});
|
|
14868
14868
|
}
|
|
14869
14869
|
|
|
14870
|
+
// src/age/ageFromDob.ts
|
|
14871
|
+
var DOB_MIN_YEAR = 1850;
|
|
14872
|
+
function toNullableNumber(v) {
|
|
14873
|
+
if (v == null) return null;
|
|
14874
|
+
if (typeof v === "string" && v.trim() === "") return null;
|
|
14875
|
+
const n = typeof v === "number" ? v : Number(v);
|
|
14876
|
+
return Number.isFinite(n) ? n : null;
|
|
14877
|
+
}
|
|
14878
|
+
function toNullableMonth(v) {
|
|
14879
|
+
const n = toNullableNumber(v);
|
|
14880
|
+
return n != null && n >= 1 && n <= 12 ? n : null;
|
|
14881
|
+
}
|
|
14882
|
+
function toNullableDay(v) {
|
|
14883
|
+
const n = toNullableNumber(v);
|
|
14884
|
+
return n != null && n >= 1 && n <= 31 ? n : null;
|
|
14885
|
+
}
|
|
14886
|
+
function toNullableYear(v) {
|
|
14887
|
+
const n = toNullableNumber(v);
|
|
14888
|
+
return n != null && Number.isInteger(n) && n > 0 ? n : null;
|
|
14889
|
+
}
|
|
14890
|
+
function isDate(v) {
|
|
14891
|
+
return v instanceof Date || Object.prototype.toString.call(v) === "[object Date]";
|
|
14892
|
+
}
|
|
14893
|
+
function calendarDateOf(date) {
|
|
14894
|
+
if (Number.isNaN(date.getTime())) return null;
|
|
14895
|
+
const utcMidnight = date.getUTCHours() === 0 && date.getUTCMinutes() === 0 && date.getUTCSeconds() === 0 && date.getUTCMilliseconds() === 0;
|
|
14896
|
+
return utcMidnight ? { y: date.getUTCFullYear(), m: date.getUTCMonth() + 1, d: date.getUTCDate() } : { y: date.getFullYear(), m: date.getMonth() + 1, d: date.getDate() };
|
|
14897
|
+
}
|
|
14898
|
+
function ageInputFromStoredDob(stored) {
|
|
14899
|
+
return { y: stored?.dobYear ?? null, m: stored?.dobMonth ?? null, d: stored?.dobDay ?? null };
|
|
14900
|
+
}
|
|
14901
|
+
function normalizeDob(dobLike) {
|
|
14902
|
+
if (dobLike == null) return null;
|
|
14903
|
+
if (isDate(dobLike)) return calendarDateOf(dobLike);
|
|
14904
|
+
if (typeof dobLike === "object") {
|
|
14905
|
+
const m = toNullableMonth(dobLike.m);
|
|
14906
|
+
const d = toNullableDay(dobLike.d);
|
|
14907
|
+
const y = toNullableYear(dobLike.y);
|
|
14908
|
+
if (m == null && d == null && y == null) return null;
|
|
14909
|
+
return { m, d, y };
|
|
14910
|
+
}
|
|
14911
|
+
if (typeof dobLike === "string") {
|
|
14912
|
+
const s = dobLike.trim();
|
|
14913
|
+
if (!s) return null;
|
|
14914
|
+
const iso = /^(\d{4})-(\d{1,2})-(\d{1,2})/.exec(s);
|
|
14915
|
+
if (iso) {
|
|
14916
|
+
return {
|
|
14917
|
+
y: toNullableYear(iso[1]),
|
|
14918
|
+
m: toNullableMonth(iso[2]),
|
|
14919
|
+
d: toNullableDay(iso[3])
|
|
14920
|
+
};
|
|
14921
|
+
}
|
|
14922
|
+
const isoPartial = /^(\d{4})(?:-(\d{1,2}))?$/.exec(s);
|
|
14923
|
+
if (isoPartial) {
|
|
14924
|
+
const y = toNullableYear(isoPartial[1]);
|
|
14925
|
+
return y == null ? null : { y, m: toNullableMonth(isoPartial[2]), d: null };
|
|
14926
|
+
}
|
|
14927
|
+
const slash = /^(\d{0,2})\/(\d{0,2})\/(\d{0,4})$/.exec(s);
|
|
14928
|
+
if (slash) {
|
|
14929
|
+
const m = toNullableMonth(slash[1]);
|
|
14930
|
+
const d = toNullableDay(slash[2]);
|
|
14931
|
+
const y = toNullableYear(slash[3]);
|
|
14932
|
+
if (m == null && d == null && y == null) return null;
|
|
14933
|
+
return { m, d, y };
|
|
14934
|
+
}
|
|
14935
|
+
return null;
|
|
14936
|
+
}
|
|
14937
|
+
return null;
|
|
14938
|
+
}
|
|
14939
|
+
function ageFromDob(dob, today) {
|
|
14940
|
+
const parts = normalizeDob(dob);
|
|
14941
|
+
if (!parts || parts.y == null) return null;
|
|
14942
|
+
const t = isDate(today) ? calendarDateOf(today) : today;
|
|
14943
|
+
if (t == null || !Number.isInteger(t.y) || toNullableMonth(t.m) == null || toNullableDay(t.d) == null) {
|
|
14944
|
+
return null;
|
|
14945
|
+
}
|
|
14946
|
+
const todayY = t.y;
|
|
14947
|
+
const todayM = t.m;
|
|
14948
|
+
const todayD = t.d;
|
|
14949
|
+
if (parts.y < DOB_MIN_YEAR) return null;
|
|
14950
|
+
if (parts.y > todayY) return null;
|
|
14951
|
+
if (parts.y === todayY && parts.m != null) {
|
|
14952
|
+
if (parts.m > todayM) return null;
|
|
14953
|
+
if (parts.m === todayM && parts.d != null && parts.d > todayD) return null;
|
|
14954
|
+
}
|
|
14955
|
+
let birthdayPassed;
|
|
14956
|
+
if (parts.m == null) {
|
|
14957
|
+
birthdayPassed = false;
|
|
14958
|
+
} else if (parts.m < todayM) {
|
|
14959
|
+
birthdayPassed = true;
|
|
14960
|
+
} else if (parts.m > todayM) {
|
|
14961
|
+
birthdayPassed = false;
|
|
14962
|
+
} else {
|
|
14963
|
+
birthdayPassed = parts.d == null ? false : parts.d <= todayD;
|
|
14964
|
+
}
|
|
14965
|
+
return Math.max(0, todayY - parts.y - (birthdayPassed ? 0 : 1));
|
|
14966
|
+
}
|
|
14967
|
+
|
|
14870
14968
|
// src/generated/coreFunctionsEvaluable.ts
|
|
14871
14969
|
var CORE_FUNCTIONS_EVALUABLE_KEYS = [
|
|
14872
14970
|
"agency_info_manage",
|
|
@@ -15617,6 +15715,49 @@ function maskSelectionToCeiling(scope, selection, allowed) {
|
|
|
15617
15715
|
for (const code of outside) sel = subtractRow(scope, sel, code);
|
|
15618
15716
|
return withSystemInfo(sel.filter((c) => facts.isLive(c)));
|
|
15619
15717
|
}
|
|
15718
|
+
function isPermittedByCeiling(scope, ceiling, code) {
|
|
15719
|
+
if (ceiling === null || ceiling.allowed === null) return true;
|
|
15720
|
+
if (scope.ancestorsOf(code).includes("system")) {
|
|
15721
|
+
return true;
|
|
15722
|
+
}
|
|
15723
|
+
if (scope.row(code) === void 0) return false;
|
|
15724
|
+
return scopeRowWithinCeiling(scope, ceiling.allowed, code);
|
|
15725
|
+
}
|
|
15726
|
+
function intersectSharingCeilingLists(scope, a, b) {
|
|
15727
|
+
const left = [...a];
|
|
15728
|
+
const right = [...b];
|
|
15729
|
+
const within = (list, code) => scopeRowWithinCeiling(scope, list, code);
|
|
15730
|
+
return [
|
|
15731
|
+
.../* @__PURE__ */ new Set([
|
|
15732
|
+
...left.filter((code) => within(right, code)),
|
|
15733
|
+
...right.filter((code) => within(left, code))
|
|
15734
|
+
])
|
|
15735
|
+
];
|
|
15736
|
+
}
|
|
15737
|
+
|
|
15738
|
+
// src/sharingCeiling/defaults.ts
|
|
15739
|
+
function shareDefaultScopeFor(edits, purpose, opts = {}) {
|
|
15740
|
+
const off = isSharingPurposeDisabled(purpose, opts.purposeOverrides ?? null);
|
|
15741
|
+
if (off || edits === null || edits === void 0) {
|
|
15742
|
+
return { off, accountDefault: [] };
|
|
15743
|
+
}
|
|
15744
|
+
const starter = opts.starter ?? HTI_SHARE_PLATFORM_STARTER;
|
|
15745
|
+
const authored = edits[SHARING_CEILING_DEFAULT_ROW_KEY]?.[purpose];
|
|
15746
|
+
if (Array.isArray(authored)) {
|
|
15747
|
+
return {
|
|
15748
|
+
off,
|
|
15749
|
+
accountDefault: authored.filter(
|
|
15750
|
+
(v) => typeof v === "string"
|
|
15751
|
+
)
|
|
15752
|
+
};
|
|
15753
|
+
}
|
|
15754
|
+
const platform = starter.scopeByPurpose[purpose];
|
|
15755
|
+
return {
|
|
15756
|
+
off,
|
|
15757
|
+
accountDefault: Array.isArray(platform) ? platform.filter((v) => typeof v === "string") : []
|
|
15758
|
+
};
|
|
15759
|
+
}
|
|
15760
|
+
var accountSharePurposePolicy = shareDefaultScopeFor;
|
|
15620
15761
|
|
|
15621
15762
|
// src/validation/cvc.ts
|
|
15622
15763
|
import { z } from "zod";
|
|
@@ -68473,6 +68614,7 @@ export {
|
|
|
68473
68614
|
DEFAULT_BOUND_STATE_LABELS,
|
|
68474
68615
|
DEFAULT_BOUND_STATE_VALUES,
|
|
68475
68616
|
DEFAULT_PARTICIPATION_ROLE_BY_CATEGORY,
|
|
68617
|
+
DOB_MIN_YEAR,
|
|
68476
68618
|
DaIncidentArchiveReasonKeys,
|
|
68477
68619
|
DaIncidentConfidenceKeys,
|
|
68478
68620
|
DaIncidentDayApproxKeys,
|
|
@@ -68782,6 +68924,7 @@ export {
|
|
|
68782
68924
|
WHY_NOT_REPORTING_AXES,
|
|
68783
68925
|
WhyNotKeys,
|
|
68784
68926
|
accommodationType_v1_0_0_default as accommodationTypeSot,
|
|
68927
|
+
accountSharePurposePolicy,
|
|
68785
68928
|
actionStepCompletionStatus_v1_0_0_default as actionStepCompletionStatusSot,
|
|
68786
68929
|
actionStepType_v1_0_0_default as actionStepTypeSot,
|
|
68787
68930
|
activityType_v1_0_0_default as activityTypeSot,
|
|
@@ -68793,6 +68936,8 @@ export {
|
|
|
68793
68936
|
adminRoles_v2_0_0_default as adminRolesSot,
|
|
68794
68937
|
administeringJurisdiction_v1_0_0_default as administeringJurisdictionSot,
|
|
68795
68938
|
ageBinReporting_v1_0_0_default as ageBinReportingSot,
|
|
68939
|
+
ageFromDob,
|
|
68940
|
+
ageInputFromStoredDob,
|
|
68796
68941
|
agencyOrgTypeSchemaDefinition,
|
|
68797
68942
|
announcementAudienceScope_v1_0_0_default as announcementAudienceScopeSot,
|
|
68798
68943
|
announcementResponseType_v1_0_0_default as announcementResponseTypeSot,
|
|
@@ -68811,6 +68956,7 @@ export {
|
|
|
68811
68956
|
buildQuestionSchema,
|
|
68812
68957
|
buildScoringRuleSchema,
|
|
68813
68958
|
buildSectionSchema,
|
|
68959
|
+
calendarDateOf,
|
|
68814
68960
|
canonicalCoreIndicator,
|
|
68815
68961
|
canonicalIncidentParticipationRole,
|
|
68816
68962
|
canonicalServiceState,
|
|
@@ -68921,6 +69067,7 @@ export {
|
|
|
68921
69067
|
incidentParticipationRoles_v1_1_0_default as incidentParticipationRolesSot,
|
|
68922
69068
|
incomeBenefitsSources_v1_1_0_default as incomeBenefitsSourcesSot,
|
|
68923
69069
|
inferenceType_v1_0_0_default as inferenceTypeSot,
|
|
69070
|
+
intersectSharingCeilingLists,
|
|
68924
69071
|
investigativeRequestType_v1_0_0_default as investigativeRequestTypeSot,
|
|
68925
69072
|
isAgencyTypeKey,
|
|
68926
69073
|
isCanonEvaluableFunction,
|
|
@@ -68937,6 +69084,7 @@ export {
|
|
|
68937
69084
|
isLiveOrganizationProgram,
|
|
68938
69085
|
isNeverPickableServiceMechanism,
|
|
68939
69086
|
isOrgTypeKey,
|
|
69087
|
+
isPermittedByCeiling,
|
|
68940
69088
|
isProgramReviewStatus,
|
|
68941
69089
|
isProtectedRelationship,
|
|
68942
69090
|
isReportAuthorityOrgType,
|
|
@@ -68970,6 +69118,7 @@ export {
|
|
|
68970
69118
|
nameType_v1_0_0_default as nameTypeSot,
|
|
68971
69119
|
needsAssessmentChangeType_v1_0_0_default as needsAssessmentChangeTypeSot,
|
|
68972
69120
|
needsResidentialAgain_v1_0_0_default as needsResidentialAgainSot,
|
|
69121
|
+
normalizeDob,
|
|
68973
69122
|
normalizeServiceMechanismKeys,
|
|
68974
69123
|
normalizeServiceStampId,
|
|
68975
69124
|
normalizeServiceStamps,
|
|
@@ -69079,6 +69228,7 @@ export {
|
|
|
69079
69228
|
severityFollowUp_v1_0_0_default as severityFollowUpSot,
|
|
69080
69229
|
sexProviderSubrole_v1_0_0_default as sexProviderSubroleSot,
|
|
69081
69230
|
shareCadence_v1_0_0_default as shareCadenceSot,
|
|
69231
|
+
shareDefaultScopeFor,
|
|
69082
69232
|
sharePurpose_v1_0_0_default as sharePurposeSot,
|
|
69083
69233
|
shareResponseReason_v1_0_0_default as shareResponseReasonSot,
|
|
69084
69234
|
sharingCeilingCellList,
|