@htilabs/platform-common-models 0.40.0 → 0.42.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.
Files changed (40) hide show
  1. package/README.md +149 -0
  2. package/dist/index.cjs +677 -0
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +1 -1
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.js +658 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/share-rules/index.cjs +822 -0
  9. package/dist/share-rules/index.cjs.map +1 -0
  10. package/dist/share-rules/index.d.cts +804 -0
  11. package/dist/share-rules/index.d.ts +804 -0
  12. package/dist/share-rules/index.js +736 -0
  13. package/dist/share-rules/index.js.map +1 -0
  14. package/dist/sharing-ceiling/index.cjs +679 -2
  15. package/dist/sharing-ceiling/index.cjs.map +1 -1
  16. package/dist/sharing-ceiling/index.d.cts +461 -1
  17. package/dist/sharing-ceiling/index.d.ts +461 -1
  18. package/dist/sharing-ceiling/index.js +659 -1
  19. package/dist/sharing-ceiling/index.js.map +1 -1
  20. package/package.json +6 -1
  21. package/src/shareRules/__tests__/caseShareLane.test.ts +259 -0
  22. package/src/shareRules/__tests__/magicLinkAddresses.test.ts +107 -0
  23. package/src/shareRules/__tests__/platformApps.test.ts +133 -0
  24. package/src/shareRules/__tests__/releaseTerms.test.ts +358 -0
  25. package/src/shareRules/__tests__/senderRoiPosture.test.ts +284 -0
  26. package/src/shareRules/__tests__/sharingMethods.test.ts +105 -0
  27. package/src/shareRules/caseShareLane.ts +289 -0
  28. package/src/shareRules/index.ts +31 -0
  29. package/src/shareRules/magicLinkAddresses.ts +185 -0
  30. package/src/shareRules/platformApps.ts +168 -0
  31. package/src/shareRules/releaseTerms.ts +359 -0
  32. package/src/shareRules/reportPurposes.ts +50 -0
  33. package/src/shareRules/senderRoiPosture.ts +296 -0
  34. package/src/shareRules/sharingMethods.ts +204 -0
  35. package/src/sharingCeiling/__tests__/resolveShare.test.ts +1305 -0
  36. package/src/sharingCeiling/__tests__/threadLift.test.ts +353 -0
  37. package/src/sharingCeiling/coverage.ts +63 -0
  38. package/src/sharingCeiling/defaults.ts +106 -0
  39. package/src/sharingCeiling/index.ts +13 -1
  40. package/src/sharingCeiling/resolve.ts +1278 -0
package/dist/index.d.cts CHANGED
@@ -12,7 +12,7 @@ export { C as CreateInformationScopeResolverInput, I as INFORMATION_SCOPE_POLICY
12
12
  export { CoreInformationScopeSot, CoreInformationScopeSotEntry, CoreInformationScopeSotMigrationLine, scopeMigrationsFromSot, scopeRowsFromSot } from './information-scope/index.cjs';
13
13
  export { CalendarDate, CalendarDateLike, DOB_MIN_YEAR, DobLike, PartialDob, PartialDobLike, ageFromDob, ageInputFromStoredDob, calendarDateOf, normalizeDob } from './age/index.cjs';
14
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';
15
- 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_REQUIRED_BY_PURPOSE, HTI_SHARE_PLATFORM_STARTER, HTI_SHARE_PLATFORM_STARTER_SOURCE, INFORMATION_SCOPE_FIELD_HOME_ROWS, SHARE_LEVEL_LABEL, SHARE_PLATFORM_STATE_LABEL, SHARE_POSTURE_RANK, SHARE_REPORTING_PURPOSES, SHARING_CEILING_DEFAULT_ROW_KEY, SHARING_CEILING_EXTERNAL_ROW_KEY, SHARING_CEILING_SCOPE_VERSION, ShareAttachmentIndex, ShareCategoryEntry, ShareDefaultScopeOptions, ShareLevel, ShareNamedPolicy, SharePlatformDefault, SharePlatformState, SharePolicyAssignment, SharePolicyDoc, SharePosture, ShareRecipient, ShareResolution, ShareResolveInput, ShareTeamRowLike, SharingCeilingAllowed, SharingCeilingCellLike, SharingCeilingRung, SharingCeilingScope, SharingPlatformStarter, SharingPurposeLists, SharingScopeCeiling, SharingScopeEdits, accountSharePurposePolicy, attachmentIndexFromPolicies, ceilingCoverage, derivePlatformDefault, effectiveCeiling, hasOwnScopeContent, intersectSharingCeilingLists, isCeilingCoverageRow, isPermittedByCeiling, isSharingPurposeDisabled, liveCategories, maskSelectionToCeiling, matchTeamRow, platformDefaultFor, resolveShare, rowsExpandedByCeiling, rowsOutsideCeiling, rowsOverCeiling, scopeListCovers, scopeListStrictlyCovers, scopeRowWithinCeiling, shareDefaultScopeFor, shareRowCeiling, 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
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';
18
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
@@ -12,7 +12,7 @@ export { C as CreateInformationScopeResolverInput, I as INFORMATION_SCOPE_POLICY
12
12
  export { CoreInformationScopeSot, CoreInformationScopeSotEntry, CoreInformationScopeSotMigrationLine, scopeMigrationsFromSot, scopeRowsFromSot } from './information-scope/index.js';
13
13
  export { CalendarDate, CalendarDateLike, DOB_MIN_YEAR, DobLike, PartialDob, PartialDobLike, ageFromDob, ageInputFromStoredDob, calendarDateOf, normalizeDob } from './age/index.js';
14
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';
15
- 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_REQUIRED_BY_PURPOSE, HTI_SHARE_PLATFORM_STARTER, HTI_SHARE_PLATFORM_STARTER_SOURCE, INFORMATION_SCOPE_FIELD_HOME_ROWS, SHARE_LEVEL_LABEL, SHARE_PLATFORM_STATE_LABEL, SHARE_POSTURE_RANK, SHARE_REPORTING_PURPOSES, SHARING_CEILING_DEFAULT_ROW_KEY, SHARING_CEILING_EXTERNAL_ROW_KEY, SHARING_CEILING_SCOPE_VERSION, ShareAttachmentIndex, ShareCategoryEntry, ShareDefaultScopeOptions, ShareLevel, ShareNamedPolicy, SharePlatformDefault, SharePlatformState, SharePolicyAssignment, SharePolicyDoc, SharePosture, ShareRecipient, ShareResolution, ShareResolveInput, ShareTeamRowLike, SharingCeilingAllowed, SharingCeilingCellLike, SharingCeilingRung, SharingCeilingScope, SharingPlatformStarter, SharingPurposeLists, SharingScopeCeiling, SharingScopeEdits, accountSharePurposePolicy, attachmentIndexFromPolicies, ceilingCoverage, derivePlatformDefault, effectiveCeiling, hasOwnScopeContent, intersectSharingCeilingLists, isCeilingCoverageRow, isPermittedByCeiling, isSharingPurposeDisabled, liveCategories, maskSelectionToCeiling, matchTeamRow, platformDefaultFor, resolveShare, rowsExpandedByCeiling, rowsOutsideCeiling, rowsOverCeiling, scopeListCovers, scopeListStrictlyCovers, scopeRowWithinCeiling, shareDefaultScopeFor, shareRowCeiling, 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
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';
18
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';