@wildo-ai/saas-models 1.1.2 → 1.1.4
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/esm/__tests__/setup.d.ts.map +1 -1
- package/dist/esm/_inspect.d.ts.map +1 -1
- package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-subject.shared.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications-context.schemas.d.ts +14 -10
- package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.js +4 -3
- package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.d.ts +0 -4
- package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.js +59 -17
- package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts +77 -21
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.js +85 -23
- package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.d.ts +4 -3
- package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.js +45 -0
- package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
- package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.schemas.js +7 -1
- package/dist/esm/billing/price.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product-behavior-policy.shared.schemas.js +52 -11
- package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-definition.shared.schemas.d.ts +2 -2
- package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts +2 -2
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.schemas.d.ts +2 -2
- package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.schemas.js +7 -3
- package/dist/esm/billing/product.shared.schemas.js.map +1 -1
- package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.js +15 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.schemas.d.ts +7 -3
- package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.schemas.js +22 -3
- package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
- package/dist/esm/charts/aggregation-query.shared.schemas.d.ts.map +1 -1
- package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +71 -2
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.js +20 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
- package/dist/esm/companion/shared-library-companion.shared.definitions.d.ts.map +1 -1
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +85 -0
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +157 -0
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +23 -0
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +56 -0
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +658 -26
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +873 -27
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +104 -3
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
- package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts +54 -26
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js +132 -3
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts +17 -0
- package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/privacy.shared.schemas.js +27 -4
- package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts +82 -29
- package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.js +95 -29
- package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.js +12 -5
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts +21 -0
- package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.js +20 -0
- package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
- package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +7 -5
- package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.d.ts +8 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.js +29 -0
- package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
- package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +95 -17
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.js +86 -8
- package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +26 -26
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts +139 -3
- package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
- package/dist/esm/config/frontend/chart-registration-alignment.shared.js +151 -4
- package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
- package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
- package/dist/esm/config-authoring.entry.d.ts.map +1 -1
- package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +34 -0
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js +34 -0
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
- package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +45 -12
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
- package/dist/esm/external-data.exports.d.ts.map +1 -1
- package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +110 -58
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +183 -15
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts +15 -3
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js +32 -5
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
- package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +87 -7
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts +59 -0
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js +61 -0
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts +97 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js +41 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -0
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +205 -2
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +85 -1
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts +175 -0
- package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -0
- package/dist/esm/external-providers/frontend-provider-public-config.shared.js +207 -0
- package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -0
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +5 -28
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-capability.shared.schemas.js +4 -2
- package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts +28 -8
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js +15 -4
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts +165 -0
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js +39 -0
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts +338 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js +332 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts +178 -9
- package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-metadata.shared.schemas.js +181 -9
- package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts +7 -5
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.js +7 -5
- package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts +40 -0
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.js +80 -0
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -0
- package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/features/application-features.shared.resources-config.schemas.js +12 -0
- package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
- package/dist/esm/features/core-feature-definitions.shared.js +7 -1
- package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
- package/dist/esm/features/feature-builders.shared.d.ts +32 -0
- package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
- package/dist/esm/features/feature-builders.shared.js +32 -0
- package/dist/esm/features/feature-builders.shared.js.map +1 -1
- package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
- package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.js +12 -0
- package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts +73 -0
- package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -0
- package/dist/esm/files/file-remote-reference-link.shared.schemas.js +62 -0
- package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -0
- package/dist/esm/files/file-upload-grant.shared.schemas.d.ts +14 -2
- package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
- package/dist/esm/files/file-upload-grant.shared.schemas.js +44 -5
- package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
- package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/files/files.shared.schemas.d.ts +15 -8
- package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
- package/dist/esm/files/files.shared.schemas.js +15 -8
- package/dist/esm/files/files.shared.schemas.js.map +1 -1
- package/dist/esm/files/files.shared.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/actors.shared.schemas.js +3 -2
- package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agents.shared.schemas.d.ts +54 -5
- package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts +0 -3
- package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/deliberation.shared.schemas.js +0 -5
- package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts +14 -0
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js +40 -3
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +19 -0
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js +33 -0
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts +14 -9
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js +14 -9
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js +3 -2
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows.shared.schemas.js +3 -2
- package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts +130 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js +153 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts +0 -3
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js +1 -4
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts +0 -16
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js +1 -17
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts +3 -3
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js +3 -3
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts +2 -8
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js +4 -15
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts +112 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js +113 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -0
- package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.utils.js +1 -0
- package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
- package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
- package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts +8 -0
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.d.ts +46 -0
- package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.js +49 -0
- package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts +320 -50
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js +137 -36
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
- package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
- package/dist/esm/index.d.ts +15 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +15 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
- package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +11 -2
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/email/email-template.shared.enums.d.ts +15 -0
- package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-template.shared.enums.js +15 -0
- package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js +19 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts +30 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js +65 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.d.ts +6 -4
- package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.js +6 -4
- package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.d.ts +167 -5
- package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.js +191 -6
- package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.d.ts +158 -0
- package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.js +200 -1
- package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js +13 -0
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.js +22 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts +26 -0
- package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.schemas.js +25 -0
- package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.d.ts +25 -0
- package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.js +42 -17
- package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts +3 -2
- package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.shared.js +9 -2
- package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
- package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +18 -3
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts +13 -0
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js +13 -0
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
- package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
- package/dist/esm/public-runtime/index.d.ts +71 -2
- package/dist/esm/public-runtime/index.d.ts.map +1 -1
- package/dist/esm/public-runtime/index.js +62 -1
- package/dist/esm/public-runtime/index.js.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts +6 -5
- package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.js +6 -5
- package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.d.ts +16 -3
- package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.js +16 -3
- package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
- package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
- package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-documentation.d.ts +137 -0
- package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -0
- package/dist/esm/requests/manual-controllers-routes-documentation.js +1255 -0
- package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -0
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts +114 -0
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.js +129 -0
- package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.d.ts +11 -1
- package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.js +11 -1
- package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.d.ts +28 -3
- package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.js +52 -0
- package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
- package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.d.ts +1 -0
- package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.js +203 -25
- package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.d.ts +297 -68
- package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources-registry.shared.core.definitions.js +151 -5
- package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
- package/dist/esm/resources/resources-relationships.shared.factory.js +15 -0
- package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.d.ts +54 -0
- package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.js +69 -0
- package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.d.ts +11 -2
- package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.js +34 -3
- package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources.shared.utils.d.ts +32 -7
- package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.utils.js +32 -7
- package/dist/esm/resources/resources.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts +51 -0
- package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -0
- package/dist/esm/resources/utils/field-value-disclosure.utils.js +53 -0
- package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -0
- package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-summary.utils.d.ts +16 -2
- package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-summary.utils.js +19 -5
- package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
- package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/shared-persistence-collection.utils.js +11 -0
- package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
- package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.shared.definitions.d.ts +25 -0
- package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
- package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +38 -0
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +38 -0
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +5 -12
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +0 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.d.ts +84 -5
- package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.js +83 -3
- package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts +1 -0
- package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/registration.shared.dto.schemas.js +11 -0
- package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts +15 -0
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js +21 -4
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts +61 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +238 -6
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts +37 -27
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js +134 -12
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +2 -6
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js +32 -8
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts +45 -2
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js +45 -2
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts +35 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js +257 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts +143 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js +219 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js +27 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts +75 -7
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js +69 -8
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +31 -0
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js +198 -0
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts +31 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js +191 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +307 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +530 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -0
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts +4 -1
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js +29 -0
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts +4 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js +29 -0
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts +6 -0
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js +31 -0
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts +13 -0
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js +24 -3
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -1
- package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
- package/dist/esm/testing.d.ts.map +1 -1
- package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +4 -4
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +4 -4
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self.shared.resources-config.schemas.js +33 -3
- package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/users.shared.resources-config.schemas.d.ts +17 -1
- package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.resources-config.schemas.js +136 -5
- package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/users.shared.schemas.d.ts +60 -13
- package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.schemas.js +56 -9
- package/dist/esm/users/users.shared.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.shared.utils.js","sourceRoot":"","sources":["../../../../src/resources/resources.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,2BAA2B,EAE3B,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,4BAA4B,EAAE,MAAM,sDAAsD,CAAC;AACpG,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAqB,MAAM,qCAAqC,CAAC;AAC/F,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,kCAAkC,EAClC,sCAAsC,EACtC,qCAAqC,EAIrC,yBAAyB,EACzB,kBAAkB,EAClB,8BAA8B,EAC9B,iDAAiD,EACjD,qBAAqB,EACrB,iCAAiC,EAEjC,gBAAgB,EAChB,q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,YAAY,CAAC,aAAa,CAAC,EAAE,CAAC;gBACvF,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QAED,IAAI,YAAY,CAAC,SAAS,EAAE,CAAC;YAC3B,IAAI,CAAC;gBACH,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,CAAC;oBAC5C,OAAO,KAAK,CAAC;gBACf,CAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;oBACnC,OAAO,KAAK,CAAC;gBACf,CAAC;gBACD,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,kCAAkC,CACvC,aAAkB,EAClB,cAAoC,EACpC,OAAiD;QAEjD,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC,YAAY,EAAE,EAAE,CAC3C,IAAI,CAAC,6BAA6B,CAAC,YAAY,EAAE,cAAc,EAAE,OAAO,CAAC,CAC1E,CAAC;IACJ,CAAC","sourcesContent":["/**\n * Resources Shared Utils\n *\n * Cross-layer resource helpers shared by backend, frontend, and shared-model\n * consumers. This includes ID helpers plus runtime relationship activation\n * evaluation.\n */\n\nimport {\n ChildOperationsConfigSchema,\n type ChildOperationsConfig_Parsed,\n ChildLifecycleMode,\n ChildLifecycleStrategy,\n} from './child-operations.shared.schemas';\nimport { HTTP_API_RESOURCE_ID_CHARSET } from '../http-api-binding/http-api-binding-id.shared.utils';\nimport { ResourcesConfigNamingUtils } from './utils/resources-config-naming.utils';\nimport { CoreResourceOperation, type ResourceType } from './resources.shared.core.definitions';\nimport {\n RelationshipDtoModel,\n RelationshipLifecycleModel,\n RelationshipHandlingContractSchema,\n RelationshipHandlingReadSettingsSchema,\n RelationshipPersistenceContractSchema,\n type RelationshipHandlingReadSettings,\n type RelationshipHandlingContract,\n type RelationshipPersistenceContract,\n RelationshipMutationModel,\n RelationshipNature,\n ResourceRelationshipBulkAction,\n ResourceRelationshipBulkOperationIdentifierPrefix,\n RelationshipReadModel,\n ResourceParentResourceRequirement,\n type ResolvedRelationshipReadCalculationMode,\n ResourceIdFormat,\n isOneToOneCardinality,\n isArrayCardinality,\n type ResolvedRelationshipNatureCalculationMode,\n type ResolvedRelationshipSemantics,\n type ResourceRelationship,\n type ResourceRelationshipDeclaration,\n type ResourceRelationshipCardinality,\n type ResourcePrimaryScope,\n PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE,\n type ManyToManyScopeJunction,\n type ManyToManyScopeJunctionMap,\n} from './resources.shared.schemas';\nimport { ErrorType } from '../errors/errors.shared.schemas';\nimport type { PolymorphicFkVariant } from '@wildo-ai/zod-decorators';\nimport { getDiscriminatedPolymorphicForeignKey, getZodObjectShape, isForeignKeyField } from '@wildo-ai/zod-decorators';\nimport type { z } from 'zod';\n\nexport type RelationshipActivationConditionErrorMode = 'throw' | 'exclude';\nexport type RelationshipActivationMissingParentMode = 'include' | 'exclude';\n\nexport interface RelationshipActivationEvaluationOptions {\n /**\n * Behavior when the evaluator is asked to resolve a conditional relationship\n * without parent data.\n *\n * - `exclude`: fail closed until parent data is available\n * - `include`: treat the missing parent as non-blocking\n */\n onMissingParentResource?: RelationshipActivationMissingParentMode;\n\n /**\n * Behavior when a function-based relationship condition throws.\n *\n * Backend callers typically use `throw` so bugs propagate normally.\n * Frontend callers may use `exclude` to fail safe without crashing the UI.\n */\n onConditionError?: RelationshipActivationConditionErrorMode;\n}\n\nexport interface ResolvedRelationshipForeignKeyIdentity {\n parentResourceType: ResourceType;\n childResourceType: ResourceType;\n fieldIdentifier: string;\n isExplicit: boolean;\n}\n\nexport interface ResolvedRelationshipObjectIdentity {\n relatedResourceType: ResourceType;\n relationshipIdentifierField: string;\n objectFieldName: string;\n isExplicit: boolean;\n}\n\nexport type RelationshipResourcePerspective = 'resourceType1' | 'resourceType2';\n\n/**\n * Database-agnostic Resource ID utilities\n *\n * Supports both MongoDB ObjectId (24-char hex) and PostgreSQL UUID formats.\n * Used across the entire stack for ID validation and format detection.\n */\nexport class Resources_SharedUtils {\n private static readonly GENERATED_FILE_REGENERATE_OPERATION_PREFIX = 'pdfTemplates:regenerate:';\n /**\n * Namespace for the derived export companion of a LIST/SEARCH operation. Prefixed, like its\n * sibling above, so a derived identifier can never collide with an authored custom operation and a\n * reader can tell at a glance that nobody wrote it by hand.\n */\n private static readonly GENERATED_COLLECTION_EXPORT_OPERATION_PREFIX = 'collectionExport:';\n\n private static createConfigurationError(message: string): Error {\n const error = new Error(message);\n (error as { type?: ErrorType }).type = ErrorType.CONFIGURATION;\n return error;\n }\n\n private static areResolvedRelationshipSemanticsEquivalent(\n left: ResolvedRelationshipSemantics,\n right: ResolvedRelationshipSemantics\n ): boolean {\n return JSON.stringify(left) === JSON.stringify(right);\n }\n\n private static hasValidResolvedRelationshipSemantics(\n semantics: unknown\n ): semantics is ResolvedRelationshipSemantics {\n if (!semantics || typeof semantics !== 'object') {\n return false;\n }\n\n const candidate = semantics as Partial<ResolvedRelationshipSemantics>;\n\n return (\n typeof candidate.natureCalculationMode === 'string' &&\n (\n candidate.readCalculationMode === 'explicit' ||\n candidate.readCalculationMode === 'legacy_nested_read_fallback' ||\n candidate.readCalculationMode === 'default_reference_only'\n ) &&\n Object.values(RelationshipNature).includes(candidate.nature as RelationshipNature) &&\n candidate.natureCalculationMode === 'explicit' &&\n RelationshipHandlingContractSchema.safeParse(candidate.handling).success &&\n RelationshipPersistenceContractSchema.safeParse(candidate.persistence).success &&\n (\n candidate.childOperations === undefined ||\n ChildOperationsConfigSchema.safeParse(candidate.childOperations).success\n )\n );\n }\n\n\n // ============================================================================\n // Validation Patterns\n // ============================================================================\n\n /**\n * MongoDB ObjectId pattern: exactly 24 hexadecimal characters\n */\n private static readonly OBJECT_ID_PATTERN = /^[a-fA-F0-9]{24}$/;\n\n /**\n * UUID pattern: 8-4-4-4-12 format with dashes\n * Accepts any UUID version (v1, v4, etc.)\n */\n private static readonly UUID_PATTERN = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;\n\n /**\n * UUID v4 pattern: stricter validation for version 4 UUIDs\n * Position 13 must be '4', position 17 must be '8', '9', 'a', or 'b'\n */\n private static readonly UUID_V4_PATTERN = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/;\n\n // ============================================================================\n // Validation Functions\n // ============================================================================\n\n /**\n * Validates if a string is a valid MongoDB ObjectId format\n * @param id - String to validate\n * @returns true if the string is a valid 24-character hexadecimal ObjectId\n * \n * @example\n * Resources_SharedUtils.isObjectId('507f1f77bcf86cd799439011') // true\n * Resources_SharedUtils.isObjectId('invalid') // false\n * Resources_SharedUtils.isObjectId('550e8400-e29b-41d4-a716-446655440000') // false (this is UUID)\n */\n static isObjectId(id: string): boolean {\n if (typeof id !== 'string') return false;\n return Resources_SharedUtils.OBJECT_ID_PATTERN.test(id);\n }\n\n /**\n * Validates if a string is a valid UUID format (any version)\n * @param id - String to validate\n * @returns true if the string is a valid UUID with dashes\n * \n * @example\n * Resources_SharedUtils.isUUID('550e8400-e29b-41d4-a716-446655440000') // true\n * Resources_SharedUtils.isUUID('507f1f77bcf86cd799439011') // false (this is ObjectId)\n * Resources_SharedUtils.isUUID('not-a-uuid') // false\n */\n static isUUID(id: string): boolean {\n if (typeof id !== 'string') return false;\n return Resources_SharedUtils.UUID_PATTERN.test(id);\n }\n\n /**\n * Validates if a string is a valid UUID v4 format (strict)\n * @param id - String to validate\n * @returns true if the string is a valid UUID version 4\n * \n * @example\n * Resources_SharedUtils.isUUIDv4('550e8400-e29b-41d4-a716-446655440000') // true\n * Resources_SharedUtils.isUUIDv4('550e8400-e29b-11d4-a716-446655440000') // false (this is UUID v1)\n */\n static isUUIDv4(id: string): boolean {\n if (typeof id !== 'string') return false;\n return Resources_SharedUtils.UUID_V4_PATTERN.test(id);\n }\n\n /**\n * Detects the format of a resource ID\n * @param id - String to analyze\n * @returns The detected format, or null if the string is not a valid resource ID\n * \n * @example\n * Resources_SharedUtils.detectIdFormat('507f1f77bcf86cd799439011') // ResourceIdFormat.OBJECT_ID\n * Resources_SharedUtils.detectIdFormat('550e8400-e29b-41d4-a716-446655440000') // ResourceIdFormat.UUID\n * Resources_SharedUtils.detectIdFormat('invalid') // null\n */\n static detectIdFormat(id: string): ResourceIdFormat | null {\n if (Resources_SharedUtils.isObjectId(id)) return ResourceIdFormat.OBJECT_ID;\n if (Resources_SharedUtils.isUUID(id)) return ResourceIdFormat.UUID;\n return null;\n }\n\n /**\n * Validates if a string is a valid resource ID in any supported format\n * @param id - String to validate\n * @returns true if the string is either a valid ObjectId or UUID\n * \n * @example\n * Resources_SharedUtils.isValidResourceId('507f1f77bcf86cd799439011') // true (ObjectId)\n * Resources_SharedUtils.isValidResourceId('550e8400-e29b-41d4-a716-446655440000') // true (UUID)\n * Resources_SharedUtils.isValidResourceId('invalid') // false\n */\n static isValidResourceId(id: string): boolean {\n return Resources_SharedUtils.detectIdFormat(id) !== null;\n }\n\n /**\n * Validates if a string is a valid resource ID for a specific format\n * @param id - String to validate\n * @param format - Expected format\n * @returns true if the string matches the expected format\n * \n * @example\n * Resources_SharedUtils.isValidResourceIdForFormat('507f1f77bcf86cd799439011', ResourceIdFormat.OBJECT_ID) // true\n * Resources_SharedUtils.isValidResourceIdForFormat('507f1f77bcf86cd799439011', ResourceIdFormat.UUID) // false\n */\n static isValidResourceIdForFormat(id: string, format: ResourceIdFormat): boolean {\n switch (format) {\n case ResourceIdFormat.OBJECT_ID:\n return Resources_SharedUtils.isObjectId(id);\n case ResourceIdFormat.UUID:\n return Resources_SharedUtils.isUUID(id);\n case ResourceIdFormat.HTTP_API_SYNTHESIZED:\n return Resources_SharedUtils.isHttpApiSynthesizedId(id);\n case ResourceIdFormat.INTROSPECTION_SYNTHESIZED:\n return Resources_SharedUtils.isIntrospectionSynthesizedId(id);\n default:\n return false;\n }\n }\n\n /**\n * Lexical shape of an `HTTP_API`-backed resource's synthesized id — the codec charset law.\n *\n * Deliberately NOT consulted by {@link detectIdFormat} / {@link isValidResourceId}: every\n * ObjectId and UUID also matches this charset, so lexical detection cannot distinguish the\n * formats, and widening the generic validators would silently relax id validation for every\n * PLATFORM-backed resource. This predicate participates only where the resource is already\n * known to be HTTP_API-backed (`ResourceIdBackendService.getFormatForResource` resolves that\n * from the registry). Canonicality (one row, one id) is enforced by the codec's decode, not\n * here — this is shape admission, not decode.\n */\n static isHttpApiSynthesizedId(id: string): boolean {\n if (typeof id !== 'string') return false;\n return HTTP_API_RESOURCE_ID_CHARSET.test(id);\n }\n\n /**\n * Lexical shape of an `INTROSPECTION`-backed resource's id.\n *\n * The SAME charset law as its HTTP-API sibling — URL-unreserved characters — reused rather than\n * restated so the two cannot drift into disagreeing about what a URL-safe key is. The predicates\n * stay separate because the FORMATS are separate: a caller asks \"is this a valid id for THIS\n * resource\", and answering through the sibling's name would make the next reader think an\n * introspected row had been through the HTTP-API codec.\n *\n * Carries the same exclusion: not consulted by {@link isValidResourceId}, so no platform-backed\n * row is loosened by its existence.\n */\n static isIntrospectionSynthesizedId(id: string): boolean {\n if (typeof id !== 'string') return false;\n return HTTP_API_RESOURCE_ID_CHARSET.test(id);\n }\n\n /**\n * Asserts that a value is a valid resource ID, throwing an error if not\n * @param id - Value to validate\n * @param fieldName - Name of the field for error messages\n * @throws Error if the value is not a valid resource ID\n * \n * @example\n * Resources_SharedUtils.assertValidResourceId('507f1f77bcf86cd799439011', 'userId') // passes\n * Resources_SharedUtils.assertValidResourceId('invalid', 'userId') // throws Error\n */\n static assertValidResourceId(id: unknown, fieldName: string = 'id'): asserts id is string {\n if (typeof id !== 'string') {\n throw new Error(`${fieldName} must be a string, got ${typeof id}`);\n }\n if (!Resources_SharedUtils.isValidResourceId(id)) {\n throw new Error(`${fieldName} must be a valid resource ID (MongoDB ObjectId or UUID), got: ${id}`);\n }\n }\n\n // ============================================================================\n // Relationship Activation\n // ============================================================================\n\n /**\n * Resolve the relationship identifier field used to expose nested/context\n * object names to framework consumers.\n *\n * Naming follows the FK-anchor / FK-target distinction:\n *\n * - `foreignKeyField` lives on `resourceType2` (the FK-anchor side) and\n * semantically identifies `resourceType1` (the FK-target side).\n * `'assignedToUserId'` on a `tasks` row identifies the assigned-to user;\n * `'userId'` on an `organizationMembers` row identifies the user it\n * belongs to.\n *\n * - When the caller is naming the **FK-target side** (i.e.\n * `relatedResourceType === resourceType1`), the FK is the semantic name\n * carrier — e.g. `'assignedToUser'` falls out of `'assignedToUserId'`.\n * Using the FK preserves multi-edge differentiation when several FKs\n * point to the same parent type (createdBy / assignedTo / reviewer all\n * resolve to distinct field names).\n *\n * - When the caller is naming the **FK-anchor side** (i.e.\n * `relatedResourceType === resourceType2`), the FK is *not* a name for\n * this side — it names the OTHER side. Using it produces a wrong\n * parent-flavoured name on the child field (e.g. `userId` would yield\n * `'users'` instead of `'organizationMembers'`). The correct name is\n * derived from the related resource type itself.\n *\n * - Self-references (`resourceType1 === resourceType2`) always use the FK\n * for semantic differentiation (`parentDocumentId` → `'parentDocument'`\n * vs `childDocumentId` → `'childDocument'`).\n *\n * Population (`fetchChildResourcesWithPolicy` /\n * `populateForContext`) keys child collections directly off\n * `resourceType2` with optional singularization for 1:1 — which is\n * structurally equivalent to the FK-anchor-side branch below. Keeping the\n * two sites aligned is what unblocks context-mode response fields like\n * `organizationMembers`, `userSelfProfile`, `userSelfPreference` from being\n * silently Zod-stripped on the way out the controller.\n */\n static resolveRelationshipObjectIdentity(\n relationship: Pick<\n ResourceRelationship,\n 'foreignKeyField' | 'resourceType1' | 'resourceType2'\n >,\n relatedResourceType: ResourceType,\n cardinality: ResourceRelationshipCardinality,\n allResourceFieldIdentifiers: Partial<Record<ResourceType, string>> | Record<string, string>\n ): ResolvedRelationshipObjectIdentity {\n const isSelfReference = relationship.resourceType1 === relationship.resourceType2;\n const isNamingFkTargetSide = relatedResourceType === relationship.resourceType1;\n const useForeignKeyForNaming = isSelfReference || isNamingFkTargetSide;\n\n const relationshipIdentifierField = (useForeignKeyForNaming && relationship.foreignKeyField)\n || allResourceFieldIdentifiers[relatedResourceType]\n || ResourcesConfigNamingUtils.toResourceFieldIdentifier(relatedResourceType);\n\n return {\n relatedResourceType,\n relationshipIdentifierField,\n objectFieldName: isOneToOneCardinality(cardinality)\n ? ResourcesConfigNamingUtils.extractBaseName(relationshipIdentifierField)\n : ResourcesConfigNamingUtils.toResourceName(relationshipIdentifierField),\n isExplicit: useForeignKeyForNaming && Boolean(relationship.foreignKeyField),\n };\n }\n\n /**\n * Resolve the relationship object identity from the perspective of one of the\n * relationship's two resource types.\n *\n * This is the caller-facing field name the current resource would use when it\n * refers to the relationship as an object/collection (`user`, `products`,\n * `productConsumptions`, ...).\n */\n static resolveRelationshipObjectIdentityForResource(\n relationship: Pick<\n ResourceRelationship,\n 'resourceType1' | 'resourceType2' | 'cardinality1' | 'cardinality2' | 'foreignKeyField'\n >,\n currentResourceType: ResourceType,\n allResourceFieldIdentifiers: Partial<Record<ResourceType, string>> | Record<string, string>\n ): ResolvedRelationshipObjectIdentity {\n if (relationship.resourceType1 === currentResourceType) {\n return this.resolveRelationshipObjectIdentity(\n relationship,\n relationship.resourceType2,\n relationship.cardinality2,\n allResourceFieldIdentifiers\n );\n }\n\n if (relationship.resourceType2 === currentResourceType) {\n return this.resolveRelationshipObjectIdentity(\n relationship,\n relationship.resourceType1,\n relationship.cardinality1,\n allResourceFieldIdentifiers\n );\n }\n\n throw new Error(\n `Cannot resolve relationship object identity for resource \"${currentResourceType}\". ` +\n `The relationship ${relationship.resourceType1} -> ${relationship.resourceType2} does not include that resource type.`\n );\n }\n\n static getRelationshipPerspectiveForResource(\n relationship: Pick<ResourceRelationship, 'resourceType1' | 'resourceType2'>,\n currentResourceType: ResourceType\n ): RelationshipResourcePerspective | undefined {\n if (relationship.resourceType1 === currentResourceType && relationship.resourceType2 === currentResourceType) {\n return undefined;\n }\n if (relationship.resourceType1 === currentResourceType) {\n return 'resourceType1';\n }\n if (relationship.resourceType2 === currentResourceType) {\n return 'resourceType2';\n }\n return undefined;\n }\n\n /**\n * Resolve which resource a foreign-key relationship REFERENCES (the target),\n * vs which resource HOLDS the FK column (the holder).\n *\n * The registry's `fieldIdentifierToResourceType` must map a foreign-key field\n * to the resource it **references** (`assignedToUserId → users`,\n * `createdByUserId → users`) so reference pickers, FK display links, and\n * `resolveResourceTypeForForeignKey` all resolve the referenced resource — NOT\n * the resource that stores the column.\n *\n * `resourceType1` / `resourceType2` order is author-declaration dependent and\n * is therefore NOT a reliable target signal: a child-first declaration like\n * `createResourcesRelationship(TODOS, USERS, MANY, ONE, { foreignKeyField:\n * 'assignedToUserId' })` stores `rt1 = todos` (the HOLDER), `rt2 = users` (the\n * target). Mapping the FK to `resourceType1` (the historical behavior) yields\n * `assignedToUserId → todos`, which sends a user-reference picker to search\n * todos and links FK values to the wrong resource.\n *\n * Ground truth = **schema membership**: the FK column is declared on exactly\n * one of the two resources (the holder); the other side is the referenced\n * target. The loop that builds the map only processes explicit\n * `foreignKeyField`s, which are always real columns on their holder's schema,\n * so membership resolves every real case (N:1, 1:N, 1:1) regardless of\n * declaration order. `allResourceFieldIdentifiers` standard-id equality is a\n * belt-and-suspenders fallback for callers that cannot introspect schemas.\n *\n * @param relationship the FK relationship (must carry `foreignKeyField`)\n * @param context.allResourceFieldIdentifiers resourceType → its standard id field\n * @param context.schemaDeclaresField `(resourceType, field) => true` iff the\n * resource's OWN main schema declares `field` as a column (it HOLDS the FK)\n */\n static resolveForeignKeyReferencedResourceType(\n relationship: Pick<ResourceRelationship, 'resourceType1' | 'resourceType2' | 'foreignKeyField'>,\n context: {\n allResourceFieldIdentifiers: Record<string, string>;\n schemaDeclaresField: (resourceType: string, fieldName: string) => boolean;\n },\n ): { referencedResourceType: string; holderResourceType: string } {\n const rt1 = relationship.resourceType1;\n const rt2 = relationship.resourceType2;\n const fk = relationship.foreignKeyField;\n\n if (fk) {\n const rt1Holds = context.schemaDeclaresField(rt1, fk);\n const rt2Holds = context.schemaDeclaresField(rt2, fk);\n if (rt1Holds && !rt2Holds) return { holderResourceType: rt1, referencedResourceType: rt2 };\n if (rt2Holds && !rt1Holds) return { holderResourceType: rt2, referencedResourceType: rt1 };\n\n // Fallback — the FK equals a side's standard id (a standard FK pointing at it).\n if (context.allResourceFieldIdentifiers[rt2] === fk) return { holderResourceType: rt1, referencedResourceType: rt2 };\n if (context.allResourceFieldIdentifiers[rt1] === fk) return { holderResourceType: rt2, referencedResourceType: rt1 };\n }\n\n // Last resort (no fk / genuinely ambiguous): preserve the legacy rt1 target.\n return { holderResourceType: rt2, referencedResourceType: rt1 };\n }\n\n /**\n * Build the registry's `fieldIdentifierToResourceType` reverse map — THE ONE\n * implementation.\n *\n * This logic existed as two hand-kept copies (the backend registry service\n * and the frontend resources repository) plus was about to grow a third for\n * the app-creation FK-resolution verification check — exactly the\n * security-predicate-drift shape `two-buildcontextualfilter-implementations`\n * records. Every consumer now routes through here; a semantic change to FK\n * resolution lands once.\n *\n * Semantics (unchanged from the two copies it replaces):\n * 1. Seed from standard field identifiers (`userId → USERS`), tracking\n * identifiers SHARED by several resource types (USERS / USER_SELF).\n * 2. Enrich with every relationship's explicit `foreignKeyField`, mapped to\n * the resource it REFERENCES (resolved structurally via schema\n * membership — declaration-order independent, see\n * {@link resolveForeignKeyReferencedResourceType}). Shared-identifier\n * convergence and per-record discriminated polymorphic FKs are tolerated;\n * a genuine same-name-different-target clash is reported through\n * `onForeignKeyCollision` (log, never throw — an authoring slip must not\n * crash registry boot) and the FIRST mapping is kept.\n * 3. Canonical-priority pass for shared identifiers\n * (`coreResourceShared_FieldIdentifierPriority`), so the winner is policy,\n * not iteration order.\n */\n static buildFieldIdentifierToResourceTypeMap(input: {\n allResourceFieldIdentifiers: Record<string, string>;\n allResourceRelationships: ReadonlyArray<ResourceRelationship>;\n /** resourceType → its materialized main schema (used for holder resolution + polymorphic tolerance). */\n getMainSchema: (resourceType: string) => z.ZodTypeAny | undefined;\n /** resourceType → canonical priority for SHARED standard identifiers. */\n fieldIdentifierPriority: Record<string, string>;\n onForeignKeyCollision?: (collision: { foreignKeyField: string; existingType: string; referencedResourceType: string }) => void;\n }): Record<string, string> {\n const fieldIdentifierToResourceType: Record<string, string> = {};\n const sharedFieldIdentifiers = new Map<string, Set<string>>();\n for (const [resourceType, fieldIdentifier] of Object.entries(input.allResourceFieldIdentifiers)) {\n const existing = fieldIdentifierToResourceType[fieldIdentifier];\n if (existing && existing !== resourceType) {\n if (!sharedFieldIdentifiers.has(fieldIdentifier)) {\n sharedFieldIdentifiers.set(fieldIdentifier, new Set([existing]));\n }\n sharedFieldIdentifiers.get(fieldIdentifier)!.add(resourceType);\n }\n fieldIdentifierToResourceType[fieldIdentifier] = resourceType;\n }\n\n const schemaDeclaresField = (resourceType: string, fieldName: string): boolean => {\n const schema = input.getMainSchema(resourceType);\n if (!schema) return false;\n return Object.prototype.hasOwnProperty.call(getZodObjectShape(schema) ?? {}, fieldName);\n };\n for (const rel of input.allResourceRelationships) {\n if (!rel.foreignKeyField) continue;\n const { referencedResourceType, holderResourceType } = Resources_SharedUtils.resolveForeignKeyReferencedResourceType(\n rel,\n { allResourceFieldIdentifiers: input.allResourceFieldIdentifiers, schemaDeclaresField },\n );\n const existingType = fieldIdentifierToResourceType[rel.foreignKeyField];\n if (existingType && existingType !== referencedResourceType) {\n const sharedTypes = sharedFieldIdentifiers.get(rel.foreignKeyField);\n if (sharedTypes && (sharedTypes.has(referencedResourceType) || sharedTypes.has(existingType))) {\n continue;\n }\n const holderSchema = input.getMainSchema(holderResourceType);\n const holderFkSchema = holderSchema ? (getZodObjectShape(holderSchema) ?? {})[rel.foreignKeyField] : undefined;\n if (holderFkSchema && getDiscriminatedPolymorphicForeignKey(holderFkSchema)) {\n continue;\n }\n input.onForeignKeyCollision?.({ foreignKeyField: rel.foreignKeyField, existingType, referencedResourceType });\n continue;\n }\n fieldIdentifierToResourceType[rel.foreignKeyField] = referencedResourceType;\n }\n\n for (const [fieldId, canonicalType] of Object.entries(input.fieldIdentifierPriority)) {\n if (sharedFieldIdentifiers.has(fieldId)) {\n fieldIdentifierToResourceType[fieldId] = canonicalType;\n }\n }\n return fieldIdentifierToResourceType;\n }\n\n /**\n * The FK-resolution SWEEP: every schema field carrying `.isForeignKey()` that\n * the map above cannot resolve to a resource type.\n *\n * This is the exact eager check the frontend registry runs at\n * initialization (where an unresolved field is `frontend_fk_resolution_failed`\n * and, in development, refuses the whole app). Exposed here so the\n * app-creation verification lane can run the SAME sweep headless — after a\n * compose or a coding mutation — instead of the defect surfacing in the\n * builder's browser (wonder-crm, 2026-08-27: three composed resources carried\n * a decorated `createdByUserId` with no relationship edge; typecheck and the\n * backend boot were both green).\n */\n static collectUnresolvableForeignKeyFields(input: {\n /** resourceType → materialized main schema. */\n mainSchemasByResourceType: Record<string, z.ZodTypeAny | undefined>;\n fieldIdentifierToResourceType: Record<string, string>;\n }): Array<{ resourceType: string; fieldName: string }> {\n const unresolved: Array<{ resourceType: string; fieldName: string }> = [];\n for (const [resourceType, schema] of Object.entries(input.mainSchemasByResourceType)) {\n if (!schema) continue;\n const shape = getZodObjectShape(schema);\n if (!shape) continue;\n for (const [fieldName, fieldSchema] of Object.entries(shape)) {\n if (!isForeignKeyField(fieldSchema as z.ZodTypeAny)) continue;\n if (!input.fieldIdentifierToResourceType[fieldName]) {\n unresolved.push({ resourceType, fieldName });\n }\n }\n }\n return unresolved;\n }\n\n /**\n * Resolve which side of a foreign-key relationship HOLDS the FK column, from\n * cardinality topology alone — no registry / schema access required.\n *\n * The FK column physically lives on the collection side of a 1:N / N:1\n * relationship: each of the \"many\" rows carries one reference to its \"one\"\n * counterpart. Declaration order is an authoring convenience — parent-first\n * `(ORGANIZATIONS, TODOS, ONE, MANY)` and child-first\n * `(TODOS, USERS, MANY, ONE, { foreignKeyField: 'assignedToUserId' })` are\n * both valid — so positional `resourceType2` reads are NOT a holder signal\n * (see {@link resolveForeignKeyReferencedResourceType}, the schema-membership\n * variant of the same invariant used where registry schemas are available).\n *\n * Resolution rules:\n * - self-reference (`resourceType1 === resourceType2`) → the resource holds\n * its own FK (tree parent ids, self-referencing junction arrays);\n * - exactly one collection side (`MANY` / `ONE_OR_MANY`) → that side holds;\n * - 1:1 (no collection side) → `resourceType2`, per the parent-first child\n * convention (`resourceType1` = parent, `resourceType2` = child carrying\n * the unique FK — e.g. context-addressed composition singletons);\n * - both sides collections (M:N) only carries a `foreignKeyField`\n * self-referentially (guarded at declaration time), which the\n * self-reference rule already covers; the defensive fallback stays\n * `resourceType2`.\n */\n static resolveForeignKeyHolderResourceType(\n relationship: Pick<\n ResourceRelationshipDeclaration,\n 'resourceType1' | 'resourceType2' | 'cardinality1' | 'cardinality2'\n >\n ): ResourceType {\n if (relationship.resourceType1 === relationship.resourceType2) {\n return relationship.resourceType1;\n }\n\n const side1IsCollection = isArrayCardinality(relationship.cardinality1);\n const side2IsCollection = isArrayCardinality(relationship.cardinality2);\n\n if (side1IsCollection && !side2IsCollection) {\n return relationship.resourceType1;\n }\n if (side2IsCollection && !side1IsCollection) {\n return relationship.resourceType2;\n }\n\n return relationship.resourceType2;\n }\n\n /**\n * Collect the candidate referenced resource types for a SHARED foreign-key\n * field on a given holder — every resource the holder's `foreignKeyField` can\n * point at, gathered from the registered relationships.\n *\n * Used to enumerate the branches of a per-record discriminated polymorphic FK\n * (e.g. referrals' `referrerBillingAccountId` → [`userBillingAccounts`,\n * `organizationBillingAccounts`]). The holder DECLARES the FK column, so the\n * referenced side of each matching relationship is the side that is NOT the\n * holder.\n */\n static getForeignKeyCandidateReferencedTypes(\n foreignKeyField: string,\n holderResourceType: string,\n relationships: ReadonlyArray<Pick<ResourceRelationship, 'resourceType1' | 'resourceType2' | 'foreignKeyField'>>,\n ): string[] {\n const referenced: string[] = [];\n for (const rel of relationships) {\n if (rel.foreignKeyField !== foreignKeyField) continue;\n if (rel.resourceType1 === holderResourceType) referenced.push(rel.resourceType2);\n else if (rel.resourceType2 === holderResourceType) referenced.push(rel.resourceType1);\n }\n return referenced;\n }\n\n /**\n * Resolve the concrete branch a per-record DISCRIMINATED polymorphic FK points\n * at, for a specific holder record.\n *\n * A flat resource (e.g. `referrals`) may hold ONE shared FK column\n * (`referrerBillingAccountId`) that targets a polymorphic branch GROUP\n * (`billingAccounts` → `userBillingAccounts` | `organizationBillingAccounts`).\n * Which branch a given record points at is decided by a sibling discriminator\n * field on the SAME record (`referrerScopeType`).\n *\n * Resolution rides the scope axis the polymorphic system is already built on\n * — there is NO bespoke value→target map:\n * 1. Read the discriminator value off the record.\n * 2. Find the {@link PolymorphicFkVariant} whose `discriminatorValue` matches —\n * this yields the variant's scope-root `parentResourceType` (e.g.\n * `'organizations'`).\n * 3. Return the candidate branch whose `resourcePrimaryScope`, mapped back to\n * its scope root via `PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE`, equals that\n * `parentResourceType`.\n *\n * Returns `undefined` (caller degrades to the registry's non-authoritative\n * representative) when the discriminator value is absent/unknown or no\n * candidate branch matches the variant's scope.\n *\n * @param context.record the holder record (must carry the discriminator field)\n * @param context.discriminatorField sibling field naming the branch selector\n * @param context.variants the FK's polymorphic variants (each with `discriminatorValue`)\n * @param context.candidateReferencedTypes branches from\n * {@link getForeignKeyCandidateReferencedTypes}\n * @param context.getResourcePrimaryScope `(rt) => its primary scope` (registry lookup)\n */\n static resolveDiscriminatedPolymorphicForeignKeyTarget(context: {\n record: Record<string, unknown>;\n discriminatorField: string;\n variants: ReadonlyArray<PolymorphicFkVariant>;\n candidateReferencedTypes: ReadonlyArray<string>;\n getResourcePrimaryScope: (resourceType: string) => ResourcePrimaryScope | undefined;\n }): string | undefined {\n const rawValue = context.record[context.discriminatorField];\n if (rawValue === undefined || rawValue === null) return undefined;\n const discriminatorValue = String(rawValue);\n\n const variant = context.variants.find(v => v.discriminatorValue === discriminatorValue);\n if (!variant) return undefined;\n\n return context.candidateReferencedTypes.find(referencedType => {\n const scope = context.getResourcePrimaryScope(referencedType);\n if (scope === undefined) return false;\n return (PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE[scope] as string) === variant.parentResourceType;\n });\n }\n\n /**\n * Stable key for {@link ManyToManyScopeJunctionMap}: a `(target, scope)` pair.\n * Uses a `|` separator, which cannot appear in resource-type identifiers, so\n * `(a, b|c)` and `(a|b, c)` can never collide.\n */\n static manyToManyScopeJunctionKey(targetResourceType: string, scopeResourceType: string): string {\n return `${targetResourceType}|${scopeResourceType}`;\n }\n\n /**\n * Derive the {@link ManyToManyScopeJunctionMap} from the registered\n * relationships — the registry signal that powers inference-based scope-required\n * reference search (see `.claude/plans/fk-filter-reference-search.md`).\n *\n * For every MANY-to-MANY relationship (one carrying a `jointResourceType` whose\n * two sides are the PEERS, not the junction itself), both orderings are\n * recorded: either peer may be the search TARGET with the other as the SCOPE.\n * The junction's per-peer FK columns are resolved by convention as each peer's\n * `resourceFieldIdentifier` (e.g. `organizationMembers` carries `userId` /\n * `organizationId`).\n *\n * Robust to being called on raw OR post-expansion relationships: synthetic\n * `peer → junction` edges (which also carry `jointResourceType`) are excluded\n * because one of their sides IS the junction.\n *\n * Q4 (fail-closed): if two DISTINCT junctions relate the same `(target, scope)`\n * pair, throws a configuration error — a scope-required search cannot\n * deterministically choose a junction. No such case exists in core today\n * (`organizations ↔ users via organizationMembers` is the only M:N).\n *\n * @param relationships the registered relationships (compiled or raw)\n * @param allResourceFieldIdentifiers `resourceType → its standard id field`\n */\n static buildManyToManyScopeJunctionMap(\n relationships: ReadonlyArray<Pick<ResourceRelationship, 'resourceType1' | 'resourceType2' | 'jointResourceType'>>,\n allResourceFieldIdentifiers: Record<string, string>,\n ): ManyToManyScopeJunctionMap {\n const map = new Map<string, ManyToManyScopeJunction>();\n\n const record = (target: string, scope: string, junction: string, targetFk: string, scopeFk: string): void => {\n const key = this.manyToManyScopeJunctionKey(target, scope);\n const existing = map.get(key);\n if (existing && existing.junctionResourceType !== junction) {\n throw this.createConfigurationError(\n `Ambiguous M:N scope junction for target '${target}' scoped by '${scope}': both ` +\n `'${existing.junctionResourceType}' and '${junction}' join them. A scope-required ` +\n `reference search cannot deterministically choose a junction — declare a single M:N ` +\n `between these resources.`,\n );\n }\n map.set(key, { junctionResourceType: junction, targetFkField: targetFk, scopeFkField: scopeFk });\n };\n\n for (const rel of relationships) {\n const junction = rel.jointResourceType;\n if (!junction) continue; // only M:N relationships carry a junction\n const peerA = rel.resourceType1;\n const peerB = rel.resourceType2;\n if (peerA === junction || peerB === junction) continue; // skip synthetic peer→junction edges\n if (peerA === peerB) continue; // self-ref M:N is modeled explicitly, not here\n const peerAFk = allResourceFieldIdentifiers[peerA];\n const peerBFk = allResourceFieldIdentifiers[peerB];\n if (!peerAFk || !peerBFk) continue; // junction FK columns unresolvable → skip defensively\n\n record(peerA, peerB, junction, peerAFk, peerBFk);\n record(peerB, peerA, junction, peerBFk, peerAFk);\n }\n\n return map;\n }\n\n /**\n * Resolve the M:N scope junction to use for a **scope-required reference\n * search** of `targetResourceType`, given the scope parameters available in\n * the current context (e.g. a people-picker on a task filter has the caller's\n * `organizationId` injected by the app scope).\n *\n * Returns the junction for the first `(target, scope)` entry whose\n * `scopeFkField` is present in `availableContextFields` — i.e. \"search this\n * target scoped through the junction to the scope the caller is already in\".\n * Returns `undefined` when the target has no M:N junction reachable from the\n * available context, meaning the picker should do a plain unscoped target\n * search. This is the registry-inference that drives scope-required reference\n * search on the frontend (see `.claude/plans/fk-filter-reference-search.md`) —\n * no per-field declaration needed.\n */\n static findScopeJunctionForTargetInContext(\n manyToManyScopeJunctions: ManyToManyScopeJunctionMap,\n targetResourceType: string,\n availableContextFields: ReadonlySet<string>,\n ): ManyToManyScopeJunction | undefined {\n for (const [key, junction] of manyToManyScopeJunctions) {\n const separatorIndex = key.indexOf('|');\n const entryTarget = separatorIndex === -1 ? key : key.slice(0, separatorIndex);\n if (entryTarget !== targetResourceType) continue;\n if (availableContextFields.has(junction.scopeFkField)) {\n return junction;\n }\n }\n return undefined;\n }\n\n /**\n * Build the generated custom-operation identifier used to expose explicit bulk\n * relationship actions at the resource-operation layer.\n */\n static buildRelationshipBulkOperationIdentifier(\n action: ResourceRelationshipBulkAction,\n relationshipField: string\n ): string {\n return `${ResourceRelationshipBulkOperationIdentifierPrefix[action]}${relationshipField}`;\n }\n\n /**\n * Parse a generated bulk relationship operation identifier back into its\n * semantic parts so backend dispatch can route it to the shared executor.\n */\n static parseRelationshipBulkOperationIdentifier(\n operationIdentifier: string\n ): { action: ResourceRelationshipBulkAction; relationshipField: string } | undefined {\n if (operationIdentifier.startsWith(ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.SET])) {\n return {\n action: ResourceRelationshipBulkAction.SET,\n relationshipField: operationIdentifier.slice(\n ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.SET].length\n ),\n };\n }\n\n if (operationIdentifier.startsWith(ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.CLEAR])) {\n return {\n action: ResourceRelationshipBulkAction.CLEAR,\n relationshipField: operationIdentifier.slice(\n ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.CLEAR].length\n ),\n };\n }\n\n if (operationIdentifier.startsWith(ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.CREATE])) {\n return {\n action: ResourceRelationshipBulkAction.CREATE,\n relationshipField: operationIdentifier.slice(\n ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.CREATE].length\n ),\n };\n }\n\n if (operationIdentifier.startsWith(ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.LINK])) {\n return {\n action: ResourceRelationshipBulkAction.LINK,\n relationshipField: operationIdentifier.slice(\n ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.LINK].length\n ),\n };\n }\n\n if (operationIdentifier.startsWith(ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.UNLINK])) {\n return {\n action: ResourceRelationshipBulkAction.UNLINK,\n relationshipField: operationIdentifier.slice(\n ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.UNLINK].length\n ),\n };\n }\n\n if (operationIdentifier.startsWith(ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.REPLACE])) {\n return {\n action: ResourceRelationshipBulkAction.REPLACE,\n relationshipField: operationIdentifier.slice(\n ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.REPLACE].length\n ),\n };\n }\n\n return undefined;\n }\n\n static buildGeneratedFileRegenerateOperationIdentifier(fieldName: string): string {\n if (!fieldName.trim()) {\n throw Resources_SharedUtils.createConfigurationError('Generated file regenerate operation requires a non-empty fieldName');\n }\n return `${Resources_SharedUtils.GENERATED_FILE_REGENERATE_OPERATION_PREFIX}${fieldName}`;\n }\n\n static parseGeneratedFileRegenerateOperationIdentifier(\n operationIdentifier: string\n ): { fieldName: string } | undefined {\n if (!operationIdentifier.startsWith(Resources_SharedUtils.GENERATED_FILE_REGENERATE_OPERATION_PREFIX)) {\n return undefined;\n }\n\n const fieldName = operationIdentifier.slice(\n Resources_SharedUtils.GENERATED_FILE_REGENERATE_OPERATION_PREFIX.length,\n );\n return fieldName.trim() ? { fieldName } : undefined;\n }\n\n /**\n * Identifier of the export companion of `sourceOperationIdentifier`\n * (e.g. `collectionExport:list`, `collectionExport:mySearchVariant`).\n */\n static buildGeneratedCollectionExportOperationIdentifier(sourceOperationIdentifier: string): string {\n if (!sourceOperationIdentifier.trim()) {\n throw Resources_SharedUtils.createConfigurationError(\n 'Generated collection export operation requires a non-empty source operation identifier',\n );\n }\n return `${Resources_SharedUtils.GENERATED_COLLECTION_EXPORT_OPERATION_PREFIX}${sourceOperationIdentifier}`;\n }\n\n static parseGeneratedCollectionExportOperationIdentifier(\n operationIdentifier: string\n ): { sourceOperationIdentifier: string } | undefined {\n if (!operationIdentifier.startsWith(Resources_SharedUtils.GENERATED_COLLECTION_EXPORT_OPERATION_PREFIX)) {\n return undefined;\n }\n\n const sourceOperationIdentifier = operationIdentifier.slice(\n Resources_SharedUtils.GENERATED_COLLECTION_EXPORT_OPERATION_PREFIX.length,\n );\n return sourceOperationIdentifier.trim() ? { sourceOperationIdentifier } : undefined;\n }\n\n /**\n * Resolve the FK field identity for a relationship.\n *\n * Priority:\n * 1. explicit `foreignKeyField`\n * 2. parent resource default field identifier from `allResourceFieldIdentifiers`\n *\n * This keeps FK resolution semantics shared across backend and frontend\n * consumers instead of letting each layer improvise its own fallback.\n */\n static resolveRelationshipForeignKeyIdentity(\n relationship: Pick<ResourceRelationship, 'resourceType1' | 'resourceType2' | 'foreignKeyField'>,\n allResourceFieldIdentifiers: Partial<Record<ResourceType, string>> | Record<string, string>\n ): ResolvedRelationshipForeignKeyIdentity {\n if (relationship.foreignKeyField) {\n return {\n parentResourceType: relationship.resourceType1,\n childResourceType: relationship.resourceType2,\n fieldIdentifier: relationship.foreignKeyField,\n isExplicit: true,\n };\n }\n\n const fieldIdentifier = allResourceFieldIdentifiers[relationship.resourceType1];\n if (!fieldIdentifier) {\n throw new Error(\n `Cannot resolve FK field for relationship ${relationship.resourceType1} -> ${relationship.resourceType2}. ` +\n `No explicit foreignKeyField was provided and resource type \"${relationship.resourceType1}\" has no registered default field identifier.`\n );\n }\n\n return {\n parentResourceType: relationship.resourceType1,\n childResourceType: relationship.resourceType2,\n fieldIdentifier,\n isExplicit: false,\n };\n }\n\n /**\n * Non-throwing FK resolution helper for validation and optional consumers.\n */\n static tryResolveRelationshipForeignKeyIdentity(\n relationship: Pick<ResourceRelationship, 'resourceType1' | 'resourceType2' | 'foreignKeyField'>,\n allResourceFieldIdentifiers: Partial<Record<ResourceType, string>> | Record<string, string>\n ): ResolvedRelationshipForeignKeyIdentity | undefined {\n try {\n return this.resolveRelationshipForeignKeyIdentity(relationship, allResourceFieldIdentifiers);\n } catch {\n return undefined;\n }\n }\n\n /**\n * Resolve explicit bulk relationship affordances from the perspective of the\n * currently selected resource type.\n *\n * This is intentionally narrower than generic nested CRUD:\n * - child-side REFERENCE => `set` / `clear`\n * - parent-side COMPOSITION => `create`\n * - peer-side ASSOCIATION => `link` / `unlink` / `replace`\n *\n * Important for future UX documentation:\n * - these actions express the semantic difference between pointer management\n * (`REFERENCE`), aggregate-owned nested creation (`COMPOSITION`), and peer\n * membership management (`ASSOCIATION`)\n * - a frontend shortcut such as \"quick create\" does not add a new action kind;\n * it simply orchestrates \"create independent resource, then run the normal\n * reference/association action\"\n */\n static resolveAllowedBulkRelationshipActionsForResource(\n relationship: ResourceRelationship,\n currentResourceType: ResourceType\n ): ResourceRelationshipBulkAction[] {\n if (relationship.isDisabled === true) {\n return [];\n }\n\n const perspective = this.getRelationshipPerspectiveForResource(relationship, currentResourceType);\n if (!perspective) {\n return [];\n }\n\n const semantics = this.requireResolvedRelationshipSemantics(relationship);\n\n // REFERENCE: mutate the pointer from the child side.\n if (\n semantics.nature === RelationshipNature.REFERENCE &&\n perspective === 'resourceType2'\n ) {\n return [\n ResourceRelationshipBulkAction.SET,\n ResourceRelationshipBulkAction.CLEAR,\n ];\n }\n\n // COMPOSITION: create owned nested children from the parent side.\n if (\n semantics.nature === RelationshipNature.COMPOSITION &&\n perspective === 'resourceType1' &&\n this.resolveRelationshipNestedMutationConfig(relationship, CoreResourceOperation.CREATE)\n ) {\n return [ResourceRelationshipBulkAction.CREATE];\n }\n\n // ASSOCIATION: manage peer membership while keeping junction persistence\n // internal to the framework.\n if (\n semantics.nature === RelationshipNature.ASSOCIATION &&\n relationship.jointResourceType\n ) {\n return [\n ResourceRelationshipBulkAction.LINK,\n ResourceRelationshipBulkAction.UNLINK,\n ResourceRelationshipBulkAction.REPLACE,\n ];\n }\n\n return [];\n }\n\n /**\n * Resolve the semantic nature of a relationship.\n *\n * Greenfield API: relationship declarations must define `nature` explicitly.\n * The resolver refuses to derive semantic meaning from low-level fields.\n */\n static resolveRelationshipNature(\n relationship: Pick<ResourceRelationshipDeclaration, 'nature'>\n ): { nature: RelationshipNature; source: ResolvedRelationshipNatureCalculationMode } {\n if (!relationship.nature) {\n throw this.createConfigurationError(\n 'Relationship declarations must define nature explicitly. ' +\n 'Greenfield relationship semantics no longer infer meaning from jointResourceType or childOperations.'\n );\n }\n\n return {\n nature: relationship.nature,\n source: 'explicit',\n };\n }\n\n private static deriveLegacyRelationshipReadModel(\n nature: RelationshipNature,\n childOperations?: ChildOperationsConfig_Parsed\n ): RelationshipReadModel {\n switch (nature) {\n case RelationshipNature.COMPOSITION:\n return childOperations?.nested?.onRead\n ? RelationshipReadModel.EMBEDDED\n : RelationshipReadModel.REFERENCE_ONLY;\n case RelationshipNature.ASSOCIATION:\n return childOperations?.nested?.onRead\n ? RelationshipReadModel.ASSOCIATION_EMBEDDED\n : RelationshipReadModel.REFERENCE_ONLY;\n case RelationshipNature.REFERENCE:\n default:\n return RelationshipReadModel.REFERENCE_ONLY;\n }\n }\n\n private static resolveRelationshipReadCalculation(params: {\n nature: RelationshipNature;\n childOperations?: ChildOperationsConfig_Parsed;\n explicitRead?: RelationshipHandlingReadSettings;\n }): {\n model: RelationshipReadModel;\n source: ResolvedRelationshipReadCalculationMode;\n } {\n if (params.explicitRead) {\n return {\n model: params.explicitRead.model,\n source: 'explicit',\n };\n }\n\n if (params.childOperations?.nested?.onRead) {\n return {\n model: this.deriveLegacyRelationshipReadModel(params.nature, params.childOperations),\n source: 'legacy_nested_read_fallback',\n };\n }\n\n return {\n model: RelationshipReadModel.REFERENCE_ONLY,\n source: 'default_reference_only',\n };\n }\n\n /**\n * Resolve the internal semantic contract and the current operational\n * projection used by DTO/backend consumers.\n *\n * App developers author relationship topology and `nature`. This method is\n * where the framework derives the deeper internal handling contract and the\n * effective low-level `childOperations` shape consumed today.\n */\n static resolveRelationshipSemantics(\n relationship: Pick<\n ResourceRelationshipDeclaration,\n 'resourceType1' | 'resourceType2' | 'nature' | 'jointResourceType' | 'childOperations' | 'read' | 'foreignKeyField' | 'parentResourceRequirement' | 'cardinality1' | 'cardinality2'\n >,\n allResourceFieldIdentifiers?: Partial<Record<ResourceType, string>> | Record<string, string>\n ): ResolvedRelationshipSemantics {\n const resolvedNature = this.resolveRelationshipNature(relationship);\n const parsedChildOperations = relationship.childOperations\n ? ChildOperationsConfigSchema.parse(relationship.childOperations)\n : undefined;\n const explicitRead = relationship.read\n ? RelationshipHandlingReadSettingsSchema.parse(relationship.read)\n : undefined;\n\n this.assertRelationshipSemanticsCoherence(\n relationship,\n resolvedNature.nature,\n parsedChildOperations,\n explicitRead\n );\n\n const resolvedReadCalculation = this.resolveRelationshipReadCalculation({\n nature: resolvedNature.nature,\n childOperations: parsedChildOperations,\n explicitRead,\n });\n const handling = this.deriveRelationshipHandlingContract(\n resolvedNature.nature,\n parsedChildOperations,\n resolvedReadCalculation.model\n );\n const persistence = this.deriveRelationshipPersistenceContract(relationship, allResourceFieldIdentifiers);\n\n return {\n nature: resolvedNature.nature,\n natureCalculationMode: resolvedNature.source,\n readCalculationMode: resolvedReadCalculation.source,\n handling,\n persistence,\n childOperations: parsedChildOperations,\n };\n }\n\n /**\n * Resolve the effective nested mutation projection for the given operation.\n *\n * `handling` is the semantic gate; `childOperations` remains the current\n * detailed operational projection while Step 3/4 finishes converging.\n */\n static resolveRelationshipNestedMutationConfig(\n relationship: ResourceRelationship,\n operation: CoreResourceOperation\n ) {\n const semantics = this.requireResolvedRelationshipSemantics(relationship);\n\n if (\n semantics.handling.dtoModelMode === RelationshipDtoModel.REFERENCE_HANDLE ||\n semantics.handling.mutationModelMode === RelationshipMutationModel.NONE\n ) {\n return undefined;\n }\n\n return (\n operation === CoreResourceOperation.CREATE ||\n operation === CoreResourceOperation.CREATE_MANY\n )\n ? semantics.childOperations?.nested?.onCreate\n : semantics.childOperations?.nested?.onUpdate;\n }\n\n /**\n * Resolve the effective nested read projection.\n *\n * The semantic read contract is the gate. The detailed data-mode config still\n * comes from the current operational projection.\n */\n static resolveRelationshipNestedReadConfig(relationship: ResourceRelationship) {\n const semantics = this.requireResolvedRelationshipSemantics(relationship);\n\n if (\n semantics.handling.dtoModelMode === RelationshipDtoModel.REFERENCE_HANDLE ||\n semantics.handling.read.model === RelationshipReadModel.REFERENCE_ONLY\n ) {\n return undefined;\n }\n\n return semantics.childOperations?.nested?.onRead;\n }\n\n /**\n * Resolve the effective lifecycle-on-parent-delete projection.\n *\n * `lifecycleModelMode` is the semantic gate; the detailed delete policy still\n * comes from the current operational projection.\n */\n static resolveRelationshipLifecycleOnParentDeleteConfig(\n relationship: ResourceRelationship\n ) {\n const semantics = this.requireResolvedRelationshipSemantics(relationship);\n\n if (semantics.handling.lifecycleModelMode === RelationshipLifecycleModel.INDEPENDENT) {\n return undefined;\n }\n\n return semantics.childOperations?.lifecycle?.onParentDelete;\n }\n\n /**\n * Resolve the effective lifecycle-on-parent-create projection — the eager\n * composition-child seeding policy. Mirror of\n * {@link resolveRelationshipLifecycleOnParentDeleteConfig}: `lifecycleModelMode`\n * is the semantic gate (INDEPENDENT / aggregation → no eager seed), and the\n * detailed create policy comes from the operational\n * `childOperations.lifecycle.onParentCreate` projection.\n */\n static resolveRelationshipLifecycleOnParentCreateConfig(\n relationship: ResourceRelationship\n ) {\n const semantics = this.requireResolvedRelationshipSemantics(relationship);\n\n if (semantics.handling.lifecycleModelMode === RelationshipLifecycleModel.INDEPENDENT) {\n return undefined;\n }\n\n return semantics.childOperations?.lifecycle?.onParentCreate;\n }\n\n /**\n * Compile the developer-authored declaration into the runtime relationship\n * shape used by the framework.\n */\n static compileRelationshipDeclaration(\n relationship: ResourceRelationshipDeclaration,\n allResourceFieldIdentifiers?: Partial<Record<ResourceType, string>> | Record<string, string>\n ): ResourceRelationship {\n return {\n ...relationship,\n resolvedSemantics: this.resolveRelationshipSemantics(relationship, allResourceFieldIdentifiers),\n };\n }\n\n /**\n * Ensure a relationship is in the compiled runtime shape.\n *\n * This is the startup normalization bridge for places that aggregate\n * relationships from multiple sources before they are stored on registries or\n * resource configurations.\n */\n static ensureCompiledRelationship(\n relationship: ResourceRelationship | ResourceRelationshipDeclaration,\n allResourceFieldIdentifiers?: Partial<Record<ResourceType, string>> | Record<string, string>\n ): ResourceRelationship {\n const compiledRelationship = this.compileRelationshipDeclaration(relationship, allResourceFieldIdentifiers);\n\n if (\n 'resolvedSemantics' in relationship &&\n this.hasValidResolvedRelationshipSemantics(relationship.resolvedSemantics) &&\n this.areResolvedRelationshipSemanticsEquivalent(\n relationship.resolvedSemantics,\n compiledRelationship.resolvedSemantics\n )\n ) {\n return relationship;\n }\n\n if (\n !allResourceFieldIdentifiers &&\n 'resolvedSemantics' in relationship &&\n this.hasValidResolvedRelationshipSemantics(relationship.resolvedSemantics) &&\n relationship.resolvedSemantics.persistence.foreignKey &&\n !compiledRelationship.resolvedSemantics.persistence.foreignKey\n ) {\n return {\n ...compiledRelationship,\n resolvedSemantics: {\n ...compiledRelationship.resolvedSemantics,\n persistence: relationship.resolvedSemantics.persistence,\n },\n };\n }\n\n return compiledRelationship;\n }\n\n static ensureCompiledRelationships(\n relationships: readonly (ResourceRelationship | ResourceRelationshipDeclaration)[],\n allResourceFieldIdentifiers?: Partial<Record<ResourceType, string>> | Record<string, string>\n ): ResourceRelationship[] {\n return relationships.map((relationship) =>\n this.ensureCompiledRelationship(relationship, allResourceFieldIdentifiers)\n );\n }\n\n static ensureCompiledRelationshipBuckets<\n TResourceRelationships extends {\n parentRelationships: readonly (ResourceRelationship | ResourceRelationshipDeclaration)[];\n childRelationships: readonly (ResourceRelationship | ResourceRelationshipDeclaration)[];\n selfRelationships: readonly (ResourceRelationship | ResourceRelationshipDeclaration)[];\n }\n >(\n resourceRelationships: TResourceRelationships,\n allResourceFieldIdentifiers?: Partial<Record<ResourceType, string>> | Record<string, string>\n ): {\n parentRelationships: ResourceRelationship[];\n childRelationships: ResourceRelationship[];\n selfRelationships: ResourceRelationship[];\n } {\n return {\n parentRelationships: this.ensureCompiledRelationships(\n resourceRelationships.parentRelationships ?? [],\n allResourceFieldIdentifiers\n ),\n childRelationships: this.ensureCompiledRelationships(\n resourceRelationships.childRelationships ?? [],\n allResourceFieldIdentifiers\n ),\n selfRelationships: this.ensureCompiledRelationships(\n resourceRelationships.selfRelationships ?? [],\n allResourceFieldIdentifiers\n ),\n };\n }\n\n /**\n * Strict runtime reader for already-compiled relationships.\n *\n * Use this in hot runtime/startup paths once the relationship graph has passed\n * through the shared compilation boundary.\n */\n static requireResolvedRelationshipSemantics(\n relationship: ResourceRelationship\n ): ResolvedRelationshipSemantics {\n if (!this.hasValidResolvedRelationshipSemantics(relationship.resolvedSemantics)) {\n throw new Error(\n 'Expected ResourceRelationship to carry valid resolvedSemantics. ' +\n 'Make sure the relationship graph passed through the shared startup compilation step.'\n );\n }\n\n return relationship.resolvedSemantics;\n }\n\n /**\n * Read the stored runtime semantics when present. This keeps current call\n * sites resilient while Step 3 finishes converging on fully compiled edges.\n */\n static getResolvedRelationshipSemantics(\n relationship: Pick<\n ResourceRelationship | ResourceRelationshipDeclaration,\n 'resourceType1' | 'resourceType2' | 'nature' | 'jointResourceType' | 'childOperations' | 'read' | 'foreignKeyField' | 'parentResourceRequirement' | 'cardinality1' | 'cardinality2'\n > & Partial<Pick<ResourceRelationship, 'resolvedSemantics'>>\n ): ResolvedRelationshipSemantics {\n return this.hasValidResolvedRelationshipSemantics(relationship.resolvedSemantics)\n ? relationship.resolvedSemantics\n : this.resolveRelationshipSemantics(relationship);\n }\n\n /**\n * Derive the engine-facing handling contract from the authored relationship\n * semantics plus low-level nested/lifecycle settings.\n *\n * Keep the semantic layers distinct:\n * - `RelationshipNature` answers what the relationship means\n * - the explicit read contract answers the semantic read intent when authored\n * - the returned contract answers what kind of DTO/mutation/read/lifecycle\n * handling the engine should expose\n *\n * Documentation rule:\n * - `REFERENCE` = independent-resource pointer semantics\n * - `ASSOCIATION` = peer membership/link semantics\n * - `COMPOSITION` = aggregate-managed nested child semantics\n *\n * A frontend capability like `display.interaction.allowQuickCreate` must stay\n * OUTSIDE this contract:\n * - reference quick create = create independent resource, then set reference\n * - association quick create = create independent peer, then link/replace\n * - composition already owns native nested creation and does not need this\n * shortcut to explain its meaning\n */\n private static deriveRelationshipHandlingContract(\n nature: RelationshipNature,\n childOperations?: ChildOperationsConfig_Parsed,\n resolvedReadModel?: RelationshipReadModel\n ): RelationshipHandlingContract {\n const baseContract: RelationshipHandlingContract = {\n dtoModelMode: RelationshipDtoModel.REFERENCE_HANDLE,\n mutationModelMode: RelationshipMutationModel.NONE,\n lifecycleModelMode: RelationshipLifecycleModel.INDEPENDENT,\n readModelMode: resolvedReadModel,\n read: {\n model: resolvedReadModel,\n },\n };\n\n switch (nature) {\n case RelationshipNature.COMPOSITION:\n baseContract.dtoModelMode = RelationshipDtoModel.NESTED_RESOURCE;\n baseContract.mutationModelMode = RelationshipMutationModel.AGGREGATE_MANAGED;\n baseContract.lifecycleModelMode = RelationshipLifecycleModel.DEPENDENT;\n break;\n case RelationshipNature.ASSOCIATION:\n baseContract.dtoModelMode = RelationshipDtoModel.ASSOCIATION_HANDLE;\n baseContract.mutationModelMode = RelationshipMutationModel.ASSOCIATION_MANAGED;\n baseContract.lifecycleModelMode = RelationshipLifecycleModel.LINK_ONLY;\n break;\n case RelationshipNature.REFERENCE:\n default:\n break;\n }\n\n const createConfig = childOperations?.nested?.onCreate;\n const updateConfig = childOperations?.nested?.onUpdate;\n const lifecycleOnDelete = childOperations?.lifecycle?.onParentDelete;\n\n if (createConfig || updateConfig) {\n baseContract.mutation = {\n allowParentCreate: Boolean(createConfig),\n allowParentUpdate: Boolean(updateConfig),\n allowParentDelete: Boolean(updateConfig?.allowDelete),\n maxDepth: Math.max(createConfig?.maxDepth ?? 0, updateConfig?.maxDepth ?? 0),\n };\n }\n\n if (lifecycleOnDelete) {\n baseContract.lifecycle = {\n onParentDelete: {\n enabled: lifecycleOnDelete.enabled,\n mode: lifecycleOnDelete.mode ?? ChildLifecycleMode.IMMEDIATE,\n // Project the teardown STRATEGY too — without it the derived semantic contract cannot\n // distinguish a hard-delete cascade from an impersonalize-and-retain one.\n strategy: lifecycleOnDelete.strategy ?? ChildLifecycleStrategy.DELETE,\n maxDepth: lifecycleOnDelete.maxDepth,\n },\n };\n }\n\n return baseContract;\n }\n\n /**\n * Derive runtime persistence behavior from the authored relationship topology.\n *\n * The declaration remains small: developers author cardinality, parent\n * requirement, nature, and the FK field when disambiguation is needed. The\n * framework compiles the persistence consequence here so storage adapters do\n * not reinterpret relationship meaning independently.\n *\n * The contract is expressed from the HOLDER's perspective\n * ({@link resolveForeignKeyHolderResourceType} — the side whose rows carry\n * the FK column, resolved from cardinality, never from declaration order):\n * - `holderResourceType` tells storage adapters WHICH resource the contract\n * applies to — an adapter building any other resource of the relationship\n * must not materialize or validate this FK there;\n * - `required` means the holder's FK column is non-nullable (the referenced\n * parent is mandatory for every holder row);\n * - `unique` means at most one holder row per referenced row, which is true\n * exactly when the relationship is a genuine 1:1 — BOTH sides\n * single-valued. Keying uniqueness off `cardinality2` alone (the previous\n * derivation) assumed parent-first declaration order: for child-first\n * N:1 references (`(TODOS, USERS, MANY, ONE)`) and self-referencing trees\n * (`(UNITS, UNITS, ONE, MANY)`) a single positional cardinality is ONE\n * while the relationship is not 1:1, which would emit a bogus unique\n * index on a shared FK.\n */\n private static deriveRelationshipPersistenceContract(\n relationship: Pick<\n ResourceRelationshipDeclaration,\n 'resourceType1' | 'resourceType2' | 'foreignKeyField' | 'parentResourceRequirement' | 'cardinality1' | 'cardinality2'\n >,\n allResourceFieldIdentifiers?: Partial<Record<ResourceType, string>> | Record<string, string>\n ): RelationshipPersistenceContract {\n const foreignKeyIdentity = allResourceFieldIdentifiers\n ? this.tryResolveRelationshipForeignKeyIdentity(relationship, allResourceFieldIdentifiers)\n : relationship.foreignKeyField\n ? {\n fieldIdentifier: relationship.foreignKeyField,\n }\n : undefined;\n\n if (!foreignKeyIdentity) {\n return {};\n }\n\n const isArrayForeignKey = foreignKeyIdentity.fieldIdentifier.endsWith('Ids');\n const holderResourceType = this.resolveForeignKeyHolderResourceType(relationship);\n const isTrueOneToOne =\n isOneToOneCardinality(relationship.cardinality1) &&\n isOneToOneCardinality(relationship.cardinality2);\n\n return {\n foreignKey: {\n fieldIdentifier: foreignKeyIdentity.fieldIdentifier,\n holderResourceType,\n isArray: isArrayForeignKey,\n materializeField: true,\n required: relationship.parentResourceRequirement !== ResourceParentResourceRequirement.OPTIONAL,\n unique: !isArrayForeignKey && isTrueOneToOne,\n },\n };\n }\n\n private static assertRelationshipSemanticsCoherence(\n relationship: Pick<ResourceRelationship, 'jointResourceType' | 'nature' | 'childOperations' | 'read'>,\n resolvedNature: RelationshipNature,\n childOperations?: ChildOperationsConfig_Parsed,\n explicitRead?: RelationshipHandlingReadSettings\n ): void {\n const legacyReadModel = this.deriveLegacyRelationshipReadModel(\n resolvedNature,\n childOperations\n );\n\n if (resolvedNature === RelationshipNature.ASSOCIATION && !relationship.jointResourceType) {\n throw new Error(\n 'Association semantics require jointResourceType. ' +\n 'Step 3 resolver refuses to treat non-junction relationships as ASSOCIATION.'\n );\n }\n\n if (relationship.jointResourceType && relationship.nature && resolvedNature !== RelationshipNature.ASSOCIATION) {\n throw new Error(\n 'Junction-backed relationships must resolve to ASSOCIATION semantics.'\n );\n }\n\n if (resolvedNature === RelationshipNature.ASSOCIATION && childOperations) {\n const hasAssociationNestedWrite =\n Boolean(childOperations.nested?.onCreate || childOperations.nested?.onUpdate);\n const hasAssociationNestedRead =\n Boolean(childOperations.nested?.onRead);\n\n if (hasAssociationNestedWrite || hasAssociationNestedRead) {\n throw new Error(\n 'ASSOCIATION relationships cannot project nested read or mutation DTOs from the association declaration. ' +\n 'Declare explicit junction resource operations/views instead of using association-level childOperations.nested.'\n );\n }\n }\n\n if (resolvedNature === RelationshipNature.REFERENCE && childOperations) {\n const hasReferenceLifecycle =\n childOperations.lifecycle?.onParentDelete?.enabled === true;\n const hasReferenceNestedWrite =\n Boolean(childOperations.nested?.onCreate || childOperations.nested?.onUpdate);\n const hasReferenceNestedRead =\n Boolean(childOperations.nested?.onRead);\n\n if (hasReferenceLifecycle || hasReferenceNestedWrite || hasReferenceNestedRead) {\n throw new Error(\n 'REFERENCE relationships cannot project to nested CRUD/read embedding or dependent lifecycle. ' +\n 'Use COMPOSITION/ASSOCIATION semantics or remove the low-level childOperations settings.'\n );\n }\n }\n\n if (explicitRead) {\n if (\n explicitRead.model === RelationshipReadModel.EMBEDDED &&\n resolvedNature !== RelationshipNature.COMPOSITION\n ) {\n throw new Error(\n 'EMBEDDED read semantics require nature=COMPOSITION.'\n );\n }\n\n if (\n explicitRead.model === RelationshipReadModel.ASSOCIATION_EMBEDDED &&\n resolvedNature !== RelationshipNature.ASSOCIATION\n ) {\n throw new Error(\n 'ASSOCIATION_EMBEDDED read semantics require nature=ASSOCIATION.'\n );\n }\n\n if (\n childOperations?.nested?.onRead &&\n explicitRead.model !== legacyReadModel\n ) {\n throw new Error(\n 'Explicit relationship read semantics contradict childOperations.nested.onRead. ' +\n 'Align the authored read contract with the nested read projection or remove one of them.'\n );\n }\n }\n }\n\n /**\n * M:N expansion is only safe when the declaration maps to one unambiguous edge\n * per synthetic relationship. A self-referencing junction needs distinct source\n * and target edge identities, which the current single-declaration model does\n * not encode.\n */\n static assertSupportedManyToManySyntheticExpansion(\n relationship: Pick<ResourceRelationship, 'resourceType1' | 'resourceType2' | 'jointResourceType'>\n ): void {\n if (relationship.jointResourceType && relationship.resourceType1 === relationship.resourceType2) {\n throw new Error(\n 'Self-referencing MANY-to-MANY relationships cannot be expanded from a single declaration. ' +\n 'Declare explicit junction-resource relationships so source and target edge identity stay explicit.'\n );\n }\n }\n\n /**\n * Returns true when a discriminator is structurally usable at runtime.\n *\n * A usable discriminator needs both a field name and at least one allowed\n * value. Truthy-but-empty discriminator objects should not be treated as\n * activation constraints.\n */\n static hasUsableRelationshipDiscriminator(\n discriminator?: ResourceRelationship['discriminator']\n ): boolean {\n return Boolean(\n discriminator?.discriminatorField &&\n discriminator.values &&\n discriminator.values.length > 0\n );\n }\n\n /**\n * Returns true when the relationship carries any runtime activation gate.\n *\n * Relationships without a usable discriminator (field + non-empty values) or\n * a condition are unconditionally active.\n */\n static hasRelationshipActivationConstraint(\n relationship: Pick<ResourceRelationship, 'discriminator' | 'condition'>\n ): boolean {\n return Boolean(\n this.hasUsableRelationshipDiscriminator(relationship.discriminator) ||\n relationship.condition\n );\n }\n\n /**\n * Check whether parent data matches a relationship discriminator.\n *\n * Discriminator values are string-based in the schema, so runtime values are\n * coerced with `String()` before comparison. Missing/empty discriminators do\n * not match.\n */\n static matchesRelationshipDiscriminator<T extends Record<string, any>>(\n resource: T,\n discriminator?: ResourceRelationship['discriminator']\n ): boolean {\n if (!this.hasUsableRelationshipDiscriminator(discriminator)) {\n return false;\n }\n\n const fieldValue = resource[discriminator.discriminatorField];\n return discriminator.values.includes(String(fieldValue));\n }\n\n /**\n * Resolve whether a relationship is active for a given parent resource.\n *\n * Evaluation order is semantic, not caller-specific:\n * 1. discriminator\n * 2. condition\n * 3. unconditional pass\n *\n * This keeps backend and frontend consumers aligned while still letting them\n * choose how to handle missing parent data or thrown condition functions.\n */\n static isRelationshipActiveForParent(\n relationship: Pick<ResourceRelationship, 'discriminator' | 'condition'>,\n parentResource?: Record<string, any>,\n options: RelationshipActivationEvaluationOptions = {}\n ): boolean {\n const {\n onMissingParentResource = 'exclude',\n onConditionError = 'throw',\n } = options;\n\n const hasConstraint = this.hasRelationshipActivationConstraint(relationship);\n if (!parentResource) {\n return hasConstraint ? onMissingParentResource === 'include' : true;\n }\n\n if (this.hasUsableRelationshipDiscriminator(relationship.discriminator)) {\n if (!this.matchesRelationshipDiscriminator(parentResource, relationship.discriminator)) {\n return false;\n }\n }\n\n if (relationship.condition) {\n try {\n if (!relationship.condition(parentResource)) {\n return false;\n }\n } catch (error) {\n if (onConditionError === 'exclude') {\n return false;\n }\n throw error;\n }\n }\n\n return true;\n }\n\n /**\n * Filter relationships to the subset that is active for a given parent.\n */\n static filterRelationshipsActiveForParent<T extends Pick<ResourceRelationship, 'discriminator' | 'condition'>>(\n relationships: T[],\n parentResource?: Record<string, any>,\n options?: RelationshipActivationEvaluationOptions\n ): T[] {\n return relationships.filter((relationship) =>\n this.isRelationshipActiveForParent(relationship, parentResource, options)\n );\n }\n\n}\n\n\n"]}
|
|
1
|
+
{"version":3,"file":"resources.shared.utils.js","sourceRoot":"","sources":["../../../src/resources/resources.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,2BAA2B,EAE3B,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,4BAA4B,EAAE,MAAM,sDAAsD,CAAC;AACpG,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAqB,MAAM,qCAAqC,CAAC;AAC/F,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,kCAAkC,EAClC,sCAAsC,EACtC,qCAAqC,EAIrC,yBAAyB,EACzB,kBAAkB,EAClB,8BAA8B,EAC9B,iDAAiD,EACjD,qBAAqB,EACrB,iCAAiC,EAEjC,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAOlB,mCAAmC,GAGpC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,qCAAqC,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAyCvH;;;;;GAKG;AACH,MAAM,OAAO,qBAAqB;IACxB,MAAM,CAAU,0CAA0C,GAAG,0BAA0B,CAAC;IAChG;;;;OAIG;IACK,MAAM,CAAU,4CAA4C,GAAG,mBAAmB,CAAC;IAEnF,MAAM,CAAC,wBAAwB,CAAC,OAAe;QACrD,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;QAChC,KAA8B,CAAC,IAAI,GAAG,SAAS,CA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G;IACH,MAAM,CAAC,kCAAkC,CACvC,aAAkB,EAClB,cAAoC,EACpC,OAAiD;QAEjD,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC,YAAY,EAAE,EAAE,CAC3C,IAAI,CAAC,6BAA6B,CAAC,YAAY,EAAE,cAAc,EAAE,OAAO,CAAC,CAC1E,CAAC;IACJ,CAAC","sourcesContent":["/**\n * Resources Shared Utils\n *\n * Cross-layer resource helpers shared by backend, frontend, and shared-model\n * consumers. This includes ID helpers plus runtime relationship activation\n * evaluation.\n */\n\nimport {\n ChildOperationsConfigSchema,\n type ChildOperationsConfig_Parsed,\n ChildLifecycleMode,\n ChildLifecycleStrategy,\n} from './child-operations.shared.schemas';\nimport { HTTP_API_RESOURCE_ID_CHARSET } from '../http-api-binding/http-api-binding-id.shared.utils';\nimport { ResourcesConfigNamingUtils } from './utils/resources-config-naming.utils';\nimport { CoreResourceOperation, type ResourceType } from './resources.shared.core.definitions';\nimport {\n RelationshipDtoModel,\n RelationshipLifecycleModel,\n RelationshipHandlingContractSchema,\n RelationshipHandlingReadSettingsSchema,\n RelationshipPersistenceContractSchema,\n type RelationshipHandlingReadSettings,\n type RelationshipHandlingContract,\n type RelationshipPersistenceContract,\n RelationshipMutationModel,\n RelationshipNature,\n ResourceRelationshipBulkAction,\n ResourceRelationshipBulkOperationIdentifierPrefix,\n RelationshipReadModel,\n ResourceParentResourceRequirement,\n type ResolvedRelationshipReadCalculationMode,\n ResourceIdFormat,\n isOneToOneCardinality,\n isArrayCardinality,\n type ResolvedRelationshipNatureCalculationMode,\n type ResolvedRelationshipSemantics,\n type ResourceRelationship,\n type ResourceRelationshipDeclaration,\n type ResourceRelationshipCardinality,\n type ResourcePrimaryScope,\n PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE,\n type ManyToManyScopeJunction,\n type ManyToManyScopeJunctionMap,\n} from './resources.shared.schemas';\nimport { ErrorType } from '../errors/errors.shared.schemas';\nimport type { PolymorphicFkVariant } from '@wildo-ai/zod-decorators';\nimport { getDiscriminatedPolymorphicForeignKey, getZodObjectShape, isForeignKeyField } from '@wildo-ai/zod-decorators';\nimport type { z } from 'zod';\n\nexport type RelationshipActivationConditionErrorMode = 'throw' | 'exclude';\nexport type RelationshipActivationMissingParentMode = 'include' | 'exclude';\n\nexport interface RelationshipActivationEvaluationOptions {\n /**\n * Behavior when the evaluator is asked to resolve a conditional relationship\n * without parent data.\n *\n * - `exclude`: fail closed until parent data is available\n * - `include`: treat the missing parent as non-blocking\n */\n onMissingParentResource?: RelationshipActivationMissingParentMode;\n\n /**\n * Behavior when a function-based relationship condition throws.\n *\n * Backend callers typically use `throw` so bugs propagate normally.\n * Frontend callers may use `exclude` to fail safe without crashing the UI.\n */\n onConditionError?: RelationshipActivationConditionErrorMode;\n}\n\nexport interface ResolvedRelationshipForeignKeyIdentity {\n parentResourceType: ResourceType;\n childResourceType: ResourceType;\n fieldIdentifier: string;\n isExplicit: boolean;\n}\n\nexport interface ResolvedRelationshipObjectIdentity {\n relatedResourceType: ResourceType;\n relationshipIdentifierField: string;\n objectFieldName: string;\n isExplicit: boolean;\n}\n\nexport type RelationshipResourcePerspective = 'resourceType1' | 'resourceType2';\n\n/**\n * Database-agnostic Resource ID utilities\n *\n * Supports both MongoDB ObjectId (24-char hex) and PostgreSQL UUID formats.\n * Used across the entire stack for ID validation and format detection.\n */\nexport class Resources_SharedUtils {\n private static readonly GENERATED_FILE_REGENERATE_OPERATION_PREFIX = 'pdfTemplates:regenerate:';\n /**\n * Namespace for the derived export companion of a LIST/SEARCH operation. Prefixed, like its\n * sibling above, so a derived identifier can never collide with an authored custom operation and a\n * reader can tell at a glance that nobody wrote it by hand.\n */\n private static readonly GENERATED_COLLECTION_EXPORT_OPERATION_PREFIX = 'collectionExport:';\n\n private static createConfigurationError(message: string): Error {\n const error = new Error(message);\n (error as { type?: ErrorType }).type = ErrorType.CONFIGURATION;\n return error;\n }\n\n private static areResolvedRelationshipSemanticsEquivalent(\n left: ResolvedRelationshipSemantics,\n right: ResolvedRelationshipSemantics\n ): boolean {\n return JSON.stringify(left) === JSON.stringify(right);\n }\n\n private static hasValidResolvedRelationshipSemantics(\n semantics: unknown\n ): semantics is ResolvedRelationshipSemantics {\n if (!semantics || typeof semantics !== 'object') {\n return false;\n }\n\n const candidate = semantics as Partial<ResolvedRelationshipSemantics>;\n\n return (\n typeof candidate.natureCalculationMode === 'string' &&\n (\n candidate.readCalculationMode === 'explicit' ||\n candidate.readCalculationMode === 'legacy_nested_read_fallback' ||\n candidate.readCalculationMode === 'default_reference_only'\n ) &&\n Object.values(RelationshipNature).includes(candidate.nature as RelationshipNature) &&\n candidate.natureCalculationMode === 'explicit' &&\n RelationshipHandlingContractSchema.safeParse(candidate.handling).success &&\n RelationshipPersistenceContractSchema.safeParse(candidate.persistence).success &&\n (\n candidate.childOperations === undefined ||\n ChildOperationsConfigSchema.safeParse(candidate.childOperations).success\n )\n );\n }\n\n\n // ============================================================================\n // Validation Patterns\n // ============================================================================\n\n /**\n * MongoDB ObjectId pattern: exactly 24 hexadecimal characters\n */\n private static readonly OBJECT_ID_PATTERN = /^[a-fA-F0-9]{24}$/;\n\n /**\n * UUID pattern: 8-4-4-4-12 format with dashes\n * Accepts any UUID version (v1, v4, etc.)\n */\n private static readonly UUID_PATTERN = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;\n\n /**\n * UUID v4 pattern: stricter validation for version 4 UUIDs\n * Position 13 must be '4', position 17 must be '8', '9', 'a', or 'b'\n */\n private static readonly UUID_V4_PATTERN = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/;\n\n // ============================================================================\n // Validation Functions\n // ============================================================================\n\n /**\n * Validates if a string is a valid MongoDB ObjectId format\n * @param id - String to validate\n * @returns true if the string is a valid 24-character hexadecimal ObjectId\n * \n * @example\n * Resources_SharedUtils.isObjectId('507f1f77bcf86cd799439011') // true\n * Resources_SharedUtils.isObjectId('invalid') // false\n * Resources_SharedUtils.isObjectId('550e8400-e29b-41d4-a716-446655440000') // false (this is UUID)\n */\n static isObjectId(id: string): boolean {\n if (typeof id !== 'string') return false;\n return Resources_SharedUtils.OBJECT_ID_PATTERN.test(id);\n }\n\n /**\n * Validates if a string is a valid UUID format (any version)\n * @param id - String to validate\n * @returns true if the string is a valid UUID with dashes\n * \n * @example\n * Resources_SharedUtils.isUUID('550e8400-e29b-41d4-a716-446655440000') // true\n * Resources_SharedUtils.isUUID('507f1f77bcf86cd799439011') // false (this is ObjectId)\n * Resources_SharedUtils.isUUID('not-a-uuid') // false\n */\n static isUUID(id: string): boolean {\n if (typeof id !== 'string') return false;\n return Resources_SharedUtils.UUID_PATTERN.test(id);\n }\n\n /**\n * Validates if a string is a valid UUID v4 format (strict)\n * @param id - String to validate\n * @returns true if the string is a valid UUID version 4\n * \n * @example\n * Resources_SharedUtils.isUUIDv4('550e8400-e29b-41d4-a716-446655440000') // true\n * Resources_SharedUtils.isUUIDv4('550e8400-e29b-11d4-a716-446655440000') // false (this is UUID v1)\n */\n static isUUIDv4(id: string): boolean {\n if (typeof id !== 'string') return false;\n return Resources_SharedUtils.UUID_V4_PATTERN.test(id);\n }\n\n /**\n * Detects the format of a resource ID\n * @param id - String to analyze\n * @returns The detected format, or null if the string is not a valid resource ID\n * \n * @example\n * Resources_SharedUtils.detectIdFormat('507f1f77bcf86cd799439011') // ResourceIdFormat.OBJECT_ID\n * Resources_SharedUtils.detectIdFormat('550e8400-e29b-41d4-a716-446655440000') // ResourceIdFormat.UUID\n * Resources_SharedUtils.detectIdFormat('invalid') // null\n */\n static detectIdFormat(id: string): ResourceIdFormat | null {\n if (Resources_SharedUtils.isObjectId(id)) return ResourceIdFormat.OBJECT_ID;\n if (Resources_SharedUtils.isUUID(id)) return ResourceIdFormat.UUID;\n return null;\n }\n\n /**\n * Validates if a string is a valid resource ID in any supported format\n * @param id - String to validate\n * @returns true if the string is either a valid ObjectId or UUID\n * \n * @example\n * Resources_SharedUtils.isValidResourceId('507f1f77bcf86cd799439011') // true (ObjectId)\n * Resources_SharedUtils.isValidResourceId('550e8400-e29b-41d4-a716-446655440000') // true (UUID)\n * Resources_SharedUtils.isValidResourceId('invalid') // false\n */\n static isValidResourceId(id: string): boolean {\n return Resources_SharedUtils.detectIdFormat(id) !== null;\n }\n\n /**\n * Validates if a string is a valid resource ID for a specific format\n * @param id - String to validate\n * @param format - Expected format\n * @returns true if the string matches the expected format\n * \n * @example\n * Resources_SharedUtils.isValidResourceIdForFormat('507f1f77bcf86cd799439011', ResourceIdFormat.OBJECT_ID) // true\n * Resources_SharedUtils.isValidResourceIdForFormat('507f1f77bcf86cd799439011', ResourceIdFormat.UUID) // false\n */\n static isValidResourceIdForFormat(id: string, format: ResourceIdFormat): boolean {\n switch (format) {\n case ResourceIdFormat.OBJECT_ID:\n return Resources_SharedUtils.isObjectId(id);\n case ResourceIdFormat.UUID:\n return Resources_SharedUtils.isUUID(id);\n case ResourceIdFormat.HTTP_API_SYNTHESIZED:\n return Resources_SharedUtils.isHttpApiSynthesizedId(id);\n case ResourceIdFormat.INTROSPECTION_SYNTHESIZED:\n return Resources_SharedUtils.isIntrospectionSynthesizedId(id);\n default:\n return false;\n }\n }\n\n /**\n * Lexical shape of an `HTTP_API`-backed resource's synthesized id — the codec charset law.\n *\n * Deliberately NOT consulted by {@link detectIdFormat} / {@link isValidResourceId}: every\n * ObjectId and UUID also matches this charset, so lexical detection cannot distinguish the\n * formats, and widening the generic validators would silently relax id validation for every\n * PLATFORM-backed resource. This predicate participates only where the resource is already\n * known to be HTTP_API-backed (`ResourceIdBackendService.getFormatForResource` resolves that\n * from the registry). Canonicality (one row, one id) is enforced by the codec's decode, not\n * here — this is shape admission, not decode.\n */\n static isHttpApiSynthesizedId(id: string): boolean {\n if (typeof id !== 'string') return false;\n return HTTP_API_RESOURCE_ID_CHARSET.test(id);\n }\n\n /**\n * Lexical shape of an `INTROSPECTION`-backed resource's id.\n *\n * The SAME charset law as its HTTP-API sibling — URL-unreserved characters — reused rather than\n * restated so the two cannot drift into disagreeing about what a URL-safe key is. The predicates\n * stay separate because the FORMATS are separate: a caller asks \"is this a valid id for THIS\n * resource\", and answering through the sibling's name would make the next reader think an\n * introspected row had been through the HTTP-API codec.\n *\n * Carries the same exclusion: not consulted by {@link isValidResourceId}, so no platform-backed\n * row is loosened by its existence.\n */\n static isIntrospectionSynthesizedId(id: string): boolean {\n if (typeof id !== 'string') return false;\n return HTTP_API_RESOURCE_ID_CHARSET.test(id);\n }\n\n /**\n * Asserts that a value is a valid resource ID, throwing an error if not\n * @param id - Value to validate\n * @param fieldName - Name of the field for error messages\n * @throws Error if the value is not a valid resource ID\n * \n * @example\n * Resources_SharedUtils.assertValidResourceId('507f1f77bcf86cd799439011', 'userId') // passes\n * Resources_SharedUtils.assertValidResourceId('invalid', 'userId') // throws Error\n */\n static assertValidResourceId(id: unknown, fieldName: string = 'id'): asserts id is string {\n if (typeof id !== 'string') {\n throw new Error(`${fieldName} must be a string, got ${typeof id}`);\n }\n if (!Resources_SharedUtils.isValidResourceId(id)) {\n throw new Error(`${fieldName} must be a valid resource ID (MongoDB ObjectId or UUID), got: ${id}`);\n }\n }\n\n // ============================================================================\n // Relationship Activation\n // ============================================================================\n\n /**\n * Resolve the relationship identifier field used to expose nested/context\n * object names to framework consumers.\n *\n * Naming follows the FK-anchor / FK-target distinction:\n *\n * - `foreignKeyField` lives on `resourceType2` (the FK-anchor side) and\n * semantically identifies `resourceType1` (the FK-target side).\n * `'assignedToUserId'` on a `tasks` row identifies the assigned-to user;\n * `'userId'` on an `organizationMembers` row identifies the user it\n * belongs to.\n *\n * - When the caller is naming the **FK-target side** (i.e.\n * `relatedResourceType === resourceType1`), the FK is the semantic name\n * carrier — e.g. `'assignedToUser'` falls out of `'assignedToUserId'`.\n * Using the FK preserves multi-edge differentiation when several FKs\n * point to the same parent type (createdBy / assignedTo / reviewer all\n * resolve to distinct field names).\n *\n * - When the caller is naming the **FK-anchor side** (i.e.\n * `relatedResourceType === resourceType2`), the FK is *not* a name for\n * this side — it names the OTHER side. Using it produces a wrong\n * parent-flavoured name on the child field (e.g. `userId` would yield\n * `'users'` instead of `'organizationMembers'`). The correct name is\n * derived from the related resource type itself.\n *\n * - Self-references (`resourceType1 === resourceType2`) always use the FK\n * for semantic differentiation (`parentDocumentId` → `'parentDocument'`\n * vs `childDocumentId` → `'childDocument'`).\n *\n * **This function is the ONE authority for a CONTEXT projection's field name.**\n * `ResourcesConfigOperations_DtosBuilderUtils.addRelationshipPlaceholders` declares the\n * placeholder with it, and `ResourcePopulationBackendService.populateForContext` writes the\n * populated value with it. Do not re-derive a context field name anywhere else.\n *\n * Population used to derive its own — `singularize(resourceType2)` for 1:1, `resourceType2`\n * verbatim for 1:many — and this comment asserted the two were \"structurally equivalent\".\n * **They are not, and the false claim stood here while the defect it describes was live.**\n * The FK-anchor-side branch below derives from the related resource's AUTHORED\n * `resourceFieldIdentifier`, whose stem need not be the singular of the resource type\n * (`userSelfPreferencesId` → `userSelfPreferences`, while `singularize('userSelfPreferences')`\n * is `userSelfPreference`), and `toResourceName` re-pluralizes that stem for 1:many\n * (`organizationInvoiceRef` → `organizationInvoiceReves`). Measured over the core registry on\n * 2026-09-10: of its 111 relationships **37 carry an enabled `contextPolicy`, and the two\n * derivations disagreed on 11 of those 37** — every one of those fields was populated by the\n * backend and then silently Zod-stripped on the way out the controller, with no error and no log\n * on any surface. That is what left every date in every generated application formatted at the\n * i18n floor: the member's own regional preferences never reached the client (issue #563).\n *\n * Pinned by `engine/saas-models/src/resources/__tests__/context-projection-field-name-agreement.test.ts`\n * and by `saas-backend-lib`'s `resource-population.context-field-name.test.ts`. What those pin,\n * precisely: that the DTO declares THIS function's name, that the producer writes THIS\n * function's name, and that the live core registry still contains a relationship where the\n * retired local derivation would disagree. They do NOT enumerate every generated DTO.\n *\n * ⚠️ A THIRD derivation of the same name exists and is NOT covered — the API-reference /\n * OpenAPI path builds its DTOs from `createResourceConfiguration_Initialization`, which passes\n * an EMPTY registry map, so this function falls through to\n * `toResourceFieldIdentifier(relatedResourceType)` and produces the singular fallback. The\n * published reference therefore says `userSelfPreference` where the runtime says\n * `userSelfPreferences`. Pre-existing (the divergence long predates #563) and tracked\n * separately; do not assume the generated reference agrees with the runtime.\n */\n static resolveRelationshipObjectIdentity(\n relationship: Pick<\n ResourceRelationship,\n 'foreignKeyField' | 'resourceType1' | 'resourceType2'\n >,\n relatedResourceType: ResourceType,\n cardinality: ResourceRelationshipCardinality,\n allResourceFieldIdentifiers: Partial<Record<ResourceType, string>> | Record<string, string>\n ): ResolvedRelationshipObjectIdentity {\n const isSelfReference = relationship.resourceType1 === relationship.resourceType2;\n const isNamingFkTargetSide = relatedResourceType === relationship.resourceType1;\n const useForeignKeyForNaming = isSelfReference || isNamingFkTargetSide;\n\n const relationshipIdentifierField = (useForeignKeyForNaming && relationship.foreignKeyField)\n || allResourceFieldIdentifiers[relatedResourceType]\n || ResourcesConfigNamingUtils.toResourceFieldIdentifier(relatedResourceType);\n\n return {\n relatedResourceType,\n relationshipIdentifierField,\n objectFieldName: isOneToOneCardinality(cardinality)\n ? ResourcesConfigNamingUtils.extractBaseName(relationshipIdentifierField)\n : ResourcesConfigNamingUtils.toResourceName(relationshipIdentifierField),\n isExplicit: useForeignKeyForNaming && Boolean(relationship.foreignKeyField),\n };\n }\n\n /**\n * Resolve the relationship object identity from the perspective of one of the\n * relationship's two resource types.\n *\n * This is the caller-facing field name the current resource would use when it\n * refers to the relationship as an object/collection (`user`, `products`,\n * `productConsumptions`, ...).\n */\n static resolveRelationshipObjectIdentityForResource(\n relationship: Pick<\n ResourceRelationship,\n 'resourceType1' | 'resourceType2' | 'cardinality1' | 'cardinality2' | 'foreignKeyField'\n >,\n currentResourceType: ResourceType,\n allResourceFieldIdentifiers: Partial<Record<ResourceType, string>> | Record<string, string>\n ): ResolvedRelationshipObjectIdentity {\n if (relationship.resourceType1 === currentResourceType) {\n return this.resolveRelationshipObjectIdentity(\n relationship,\n relationship.resourceType2,\n relationship.cardinality2,\n allResourceFieldIdentifiers\n );\n }\n\n if (relationship.resourceType2 === currentResourceType) {\n return this.resolveRelationshipObjectIdentity(\n relationship,\n relationship.resourceType1,\n relationship.cardinality1,\n allResourceFieldIdentifiers\n );\n }\n\n throw new Error(\n `Cannot resolve relationship object identity for resource \"${currentResourceType}\". ` +\n `The relationship ${relationship.resourceType1} -> ${relationship.resourceType2} does not include that resource type.`\n );\n }\n\n static getRelationshipPerspectiveForResource(\n relationship: Pick<ResourceRelationship, 'resourceType1' | 'resourceType2'>,\n currentResourceType: ResourceType\n ): RelationshipResourcePerspective | undefined {\n if (relationship.resourceType1 === currentResourceType && relationship.resourceType2 === currentResourceType) {\n return undefined;\n }\n if (relationship.resourceType1 === currentResourceType) {\n return 'resourceType1';\n }\n if (relationship.resourceType2 === currentResourceType) {\n return 'resourceType2';\n }\n return undefined;\n }\n\n /**\n * Resolve which resource a foreign-key relationship REFERENCES (the target),\n * vs which resource HOLDS the FK column (the holder).\n *\n * The registry's `fieldIdentifierToResourceType` must map a foreign-key field\n * to the resource it **references** (`assignedToUserId → users`,\n * `createdByUserId → users`) so reference pickers, FK display links, and\n * `resolveResourceTypeForForeignKey` all resolve the referenced resource — NOT\n * the resource that stores the column.\n *\n * `resourceType1` / `resourceType2` order is author-declaration dependent and\n * is therefore NOT a reliable target signal: a child-first declaration like\n * `createResourcesRelationship(TODOS, USERS, MANY, ONE, { foreignKeyField:\n * 'assignedToUserId' })` stores `rt1 = todos` (the HOLDER), `rt2 = users` (the\n * target). Mapping the FK to `resourceType1` (the historical behavior) yields\n * `assignedToUserId → todos`, which sends a user-reference picker to search\n * todos and links FK values to the wrong resource.\n *\n * Ground truth = **schema membership**: the FK column is declared on exactly\n * one of the two resources (the holder); the other side is the referenced\n * target. The loop that builds the map only processes explicit\n * `foreignKeyField`s, which are always real columns on their holder's schema,\n * so membership resolves every real case (N:1, 1:N, 1:1) regardless of\n * declaration order. `allResourceFieldIdentifiers` standard-id equality is a\n * belt-and-suspenders fallback for callers that cannot introspect schemas.\n *\n * @param relationship the FK relationship (must carry `foreignKeyField`)\n * @param context.allResourceFieldIdentifiers resourceType → its standard id field\n * @param context.schemaDeclaresField `(resourceType, field) => true` iff the\n * resource's OWN main schema declares `field` as a column (it HOLDS the FK)\n */\n static resolveForeignKeyReferencedResourceType(\n relationship: Pick<ResourceRelationship, 'resourceType1' | 'resourceType2' | 'foreignKeyField'>,\n context: {\n allResourceFieldIdentifiers: Record<string, string>;\n schemaDeclaresField: (resourceType: string, fieldName: string) => boolean;\n },\n ): { referencedResourceType: string; holderResourceType: string } {\n const rt1 = relationship.resourceType1;\n const rt2 = relationship.resourceType2;\n const fk = relationship.foreignKeyField;\n\n if (fk) {\n const rt1Holds = context.schemaDeclaresField(rt1, fk);\n const rt2Holds = context.schemaDeclaresField(rt2, fk);\n if (rt1Holds && !rt2Holds) return { holderResourceType: rt1, referencedResourceType: rt2 };\n if (rt2Holds && !rt1Holds) return { holderResourceType: rt2, referencedResourceType: rt1 };\n\n // Fallback — the FK equals a side's standard id (a standard FK pointing at it).\n if (context.allResourceFieldIdentifiers[rt2] === fk) return { holderResourceType: rt1, referencedResourceType: rt2 };\n if (context.allResourceFieldIdentifiers[rt1] === fk) return { holderResourceType: rt2, referencedResourceType: rt1 };\n }\n\n // Last resort (no fk / genuinely ambiguous): preserve the legacy rt1 target.\n return { holderResourceType: rt2, referencedResourceType: rt1 };\n }\n\n /**\n * Build the registry's `fieldIdentifierToResourceType` reverse map — THE ONE\n * implementation.\n *\n * This logic existed as two hand-kept copies (the backend registry service\n * and the frontend resources repository) plus was about to grow a third for\n * the app-creation FK-resolution verification check — exactly the\n * security-predicate-drift shape `two-buildcontextualfilter-implementations`\n * records. Every consumer now routes through here; a semantic change to FK\n * resolution lands once.\n *\n * Semantics (unchanged from the two copies it replaces):\n * 1. Seed from standard field identifiers (`userId → USERS`), tracking\n * identifiers SHARED by several resource types (USERS / USER_SELF).\n * 2. Enrich with every relationship's explicit `foreignKeyField`, mapped to\n * the resource it REFERENCES (resolved structurally via schema\n * membership — declaration-order independent, see\n * {@link resolveForeignKeyReferencedResourceType}). Shared-identifier\n * convergence and per-record discriminated polymorphic FKs are tolerated;\n * a genuine same-name-different-target clash is reported through\n * `onForeignKeyCollision` (log, never throw — an authoring slip must not\n * crash registry boot) and the FIRST mapping is kept.\n * 3. Canonical-priority pass for shared identifiers\n * (`coreResourceShared_FieldIdentifierPriority`), so the winner is policy,\n * not iteration order.\n */\n static buildFieldIdentifierToResourceTypeMap(input: {\n allResourceFieldIdentifiers: Record<string, string>;\n allResourceRelationships: ReadonlyArray<ResourceRelationship>;\n /** resourceType → its materialized main schema (used for holder resolution + polymorphic tolerance). */\n getMainSchema: (resourceType: string) => z.ZodTypeAny | undefined;\n /** resourceType → canonical priority for SHARED standard identifiers. */\n fieldIdentifierPriority: Record<string, string>;\n onForeignKeyCollision?: (collision: { foreignKeyField: string; existingType: string; referencedResourceType: string }) => void;\n }): Record<string, string> {\n const fieldIdentifierToResourceType: Record<string, string> = {};\n const sharedFieldIdentifiers = new Map<string, Set<string>>();\n for (const [resourceType, fieldIdentifier] of Object.entries(input.allResourceFieldIdentifiers)) {\n const existing = fieldIdentifierToResourceType[fieldIdentifier];\n if (existing && existing !== resourceType) {\n if (!sharedFieldIdentifiers.has(fieldIdentifier)) {\n sharedFieldIdentifiers.set(fieldIdentifier, new Set([existing]));\n }\n sharedFieldIdentifiers.get(fieldIdentifier)!.add(resourceType);\n }\n fieldIdentifierToResourceType[fieldIdentifier] = resourceType;\n }\n\n const schemaDeclaresField = (resourceType: string, fieldName: string): boolean => {\n const schema = input.getMainSchema(resourceType);\n if (!schema) return false;\n return Object.prototype.hasOwnProperty.call(getZodObjectShape(schema) ?? {}, fieldName);\n };\n for (const rel of input.allResourceRelationships) {\n if (!rel.foreignKeyField) continue;\n const { referencedResourceType, holderResourceType } = Resources_SharedUtils.resolveForeignKeyReferencedResourceType(\n rel,\n { allResourceFieldIdentifiers: input.allResourceFieldIdentifiers, schemaDeclaresField },\n );\n const existingType = fieldIdentifierToResourceType[rel.foreignKeyField];\n if (existingType && existingType !== referencedResourceType) {\n const sharedTypes = sharedFieldIdentifiers.get(rel.foreignKeyField);\n if (sharedTypes && (sharedTypes.has(referencedResourceType) || sharedTypes.has(existingType))) {\n continue;\n }\n const holderSchema = input.getMainSchema(holderResourceType);\n const holderFkSchema = holderSchema ? (getZodObjectShape(holderSchema) ?? {})[rel.foreignKeyField] : undefined;\n if (holderFkSchema && getDiscriminatedPolymorphicForeignKey(holderFkSchema)) {\n continue;\n }\n input.onForeignKeyCollision?.({ foreignKeyField: rel.foreignKeyField, existingType, referencedResourceType });\n continue;\n }\n fieldIdentifierToResourceType[rel.foreignKeyField] = referencedResourceType;\n }\n\n for (const [fieldId, canonicalType] of Object.entries(input.fieldIdentifierPriority)) {\n if (sharedFieldIdentifiers.has(fieldId)) {\n fieldIdentifierToResourceType[fieldId] = canonicalType;\n }\n }\n return fieldIdentifierToResourceType;\n }\n\n /**\n * The FK-resolution SWEEP: every schema field carrying `.isForeignKey()` that\n * the map above cannot resolve to a resource type.\n *\n * This is the exact eager check the frontend registry runs at\n * initialization (where an unresolved field is `frontend_fk_resolution_failed`\n * and, in development, refuses the whole app). Exposed here so the\n * app-creation verification lane can run the SAME sweep headless — after a\n * compose or a coding mutation — instead of the defect surfacing in the\n * builder's browser (wonder-crm, 2026-08-27: three composed resources carried\n * a decorated `createdByUserId` with no relationship edge; typecheck and the\n * backend boot were both green).\n */\n static collectUnresolvableForeignKeyFields(input: {\n /** resourceType → materialized main schema. */\n mainSchemasByResourceType: Record<string, z.ZodTypeAny | undefined>;\n fieldIdentifierToResourceType: Record<string, string>;\n }): Array<{ resourceType: string; fieldName: string }> {\n const unresolved: Array<{ resourceType: string; fieldName: string }> = [];\n for (const [resourceType, schema] of Object.entries(input.mainSchemasByResourceType)) {\n if (!schema) continue;\n const shape = getZodObjectShape(schema);\n if (!shape) continue;\n for (const [fieldName, fieldSchema] of Object.entries(shape)) {\n if (!isForeignKeyField(fieldSchema as z.ZodTypeAny)) continue;\n if (!input.fieldIdentifierToResourceType[fieldName]) {\n unresolved.push({ resourceType, fieldName });\n }\n }\n }\n return unresolved;\n }\n\n /**\n * Resolve which side of a foreign-key relationship HOLDS the FK column, from\n * cardinality topology alone — no registry / schema access required.\n *\n * The FK column physically lives on the collection side of a 1:N / N:1\n * relationship: each of the \"many\" rows carries one reference to its \"one\"\n * counterpart. Declaration order is an authoring convenience — parent-first\n * `(ORGANIZATIONS, TODOS, ONE, MANY)` and child-first\n * `(TODOS, USERS, MANY, ONE, { foreignKeyField: 'assignedToUserId' })` are\n * both valid — so positional `resourceType2` reads are NOT a holder signal\n * (see {@link resolveForeignKeyReferencedResourceType}, the schema-membership\n * variant of the same invariant used where registry schemas are available).\n *\n * Resolution rules:\n * - self-reference (`resourceType1 === resourceType2`) → the resource holds\n * its own FK (tree parent ids, self-referencing junction arrays);\n * - exactly one collection side (`MANY` / `ONE_OR_MANY`) → that side holds;\n * - 1:1 (no collection side) → `resourceType2`, per the parent-first child\n * convention (`resourceType1` = parent, `resourceType2` = child carrying\n * the unique FK — e.g. context-addressed composition singletons);\n * - both sides collections (M:N) only carries a `foreignKeyField`\n * self-referentially (guarded at declaration time), which the\n * self-reference rule already covers; the defensive fallback stays\n * `resourceType2`.\n */\n static resolveForeignKeyHolderResourceType(\n relationship: Pick<\n ResourceRelationshipDeclaration,\n 'resourceType1' | 'resourceType2' | 'cardinality1' | 'cardinality2'\n >\n ): ResourceType {\n if (relationship.resourceType1 === relationship.resourceType2) {\n return relationship.resourceType1;\n }\n\n const side1IsCollection = isArrayCardinality(relationship.cardinality1);\n const side2IsCollection = isArrayCardinality(relationship.cardinality2);\n\n if (side1IsCollection && !side2IsCollection) {\n return relationship.resourceType1;\n }\n if (side2IsCollection && !side1IsCollection) {\n return relationship.resourceType2;\n }\n\n return relationship.resourceType2;\n }\n\n /**\n * Collect the candidate referenced resource types for a SHARED foreign-key\n * field on a given holder — every resource the holder's `foreignKeyField` can\n * point at, gathered from the registered relationships.\n *\n * Used to enumerate the branches of a per-record discriminated polymorphic FK\n * (e.g. referrals' `referrerBillingAccountId` → [`userBillingAccounts`,\n * `organizationBillingAccounts`]). The holder DECLARES the FK column, so the\n * referenced side of each matching relationship is the side that is NOT the\n * holder.\n */\n static getForeignKeyCandidateReferencedTypes(\n foreignKeyField: string,\n holderResourceType: string,\n relationships: ReadonlyArray<Pick<ResourceRelationship, 'resourceType1' | 'resourceType2' | 'foreignKeyField'>>,\n ): string[] {\n const referenced: string[] = [];\n for (const rel of relationships) {\n if (rel.foreignKeyField !== foreignKeyField) continue;\n if (rel.resourceType1 === holderResourceType) referenced.push(rel.resourceType2);\n else if (rel.resourceType2 === holderResourceType) referenced.push(rel.resourceType1);\n }\n return referenced;\n }\n\n /**\n * Resolve the concrete branch a per-record DISCRIMINATED polymorphic FK points\n * at, for a specific holder record.\n *\n * A flat resource (e.g. `referrals`) may hold ONE shared FK column\n * (`referrerBillingAccountId`) that targets a polymorphic branch GROUP\n * (`billingAccounts` → `userBillingAccounts` | `organizationBillingAccounts`).\n * Which branch a given record points at is decided by a sibling discriminator\n * field on the SAME record (`referrerScopeType`).\n *\n * Resolution rides the scope axis the polymorphic system is already built on\n * — there is NO bespoke value→target map:\n * 1. Read the discriminator value off the record.\n * 2. Find the {@link PolymorphicFkVariant} whose `discriminatorValue` matches —\n * this yields the variant's scope-root `parentResourceType` (e.g.\n * `'organizations'`).\n * 3. Return the candidate branch whose `resourcePrimaryScope`, mapped back to\n * its scope root via `PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE`, equals that\n * `parentResourceType`.\n *\n * Returns `undefined` (caller degrades to the registry's non-authoritative\n * representative) when the discriminator value is absent/unknown or no\n * candidate branch matches the variant's scope.\n *\n * @param context.record the holder record (must carry the discriminator field)\n * @param context.discriminatorField sibling field naming the branch selector\n * @param context.variants the FK's polymorphic variants (each with `discriminatorValue`)\n * @param context.candidateReferencedTypes branches from\n * {@link getForeignKeyCandidateReferencedTypes}\n * @param context.getResourcePrimaryScope `(rt) => its primary scope` (registry lookup)\n */\n static resolveDiscriminatedPolymorphicForeignKeyTarget(context: {\n record: Record<string, unknown>;\n discriminatorField: string;\n variants: ReadonlyArray<PolymorphicFkVariant>;\n candidateReferencedTypes: ReadonlyArray<string>;\n getResourcePrimaryScope: (resourceType: string) => ResourcePrimaryScope | undefined;\n }): string | undefined {\n const rawValue = context.record[context.discriminatorField];\n if (rawValue === undefined || rawValue === null) return undefined;\n const discriminatorValue = String(rawValue);\n\n const variant = context.variants.find(v => v.discriminatorValue === discriminatorValue);\n if (!variant) return undefined;\n\n return context.candidateReferencedTypes.find(referencedType => {\n const scope = context.getResourcePrimaryScope(referencedType);\n if (scope === undefined) return false;\n return (PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE[scope] as string) === variant.parentResourceType;\n });\n }\n\n /**\n * Stable key for {@link ManyToManyScopeJunctionMap}: a `(target, scope)` pair.\n * Uses a `|` separator, which cannot appear in resource-type identifiers, so\n * `(a, b|c)` and `(a|b, c)` can never collide.\n */\n static manyToManyScopeJunctionKey(targetResourceType: string, scopeResourceType: string): string {\n return `${targetResourceType}|${scopeResourceType}`;\n }\n\n /**\n * Derive the {@link ManyToManyScopeJunctionMap} from the registered\n * relationships — the registry signal that powers inference-based scope-required\n * reference search (see `.claude/plans/fk-filter-reference-search.md`).\n *\n * For every MANY-to-MANY relationship (one carrying a `jointResourceType` whose\n * two sides are the PEERS, not the junction itself), both orderings are\n * recorded: either peer may be the search TARGET with the other as the SCOPE.\n * The junction's per-peer FK columns are resolved by convention as each peer's\n * `resourceFieldIdentifier` (e.g. `organizationMembers` carries `userId` /\n * `organizationId`).\n *\n * Robust to being called on raw OR post-expansion relationships: synthetic\n * `peer → junction` edges (which also carry `jointResourceType`) are excluded\n * because one of their sides IS the junction.\n *\n * Q4 (fail-closed): if two DISTINCT junctions relate the same `(target, scope)`\n * pair, throws a configuration error — a scope-required search cannot\n * deterministically choose a junction. No such case exists in core today\n * (`organizations ↔ users via organizationMembers` is the only M:N).\n *\n * @param relationships the registered relationships (compiled or raw)\n * @param allResourceFieldIdentifiers `resourceType → its standard id field`\n */\n static buildManyToManyScopeJunctionMap(\n relationships: ReadonlyArray<Pick<ResourceRelationship, 'resourceType1' | 'resourceType2' | 'jointResourceType'>>,\n allResourceFieldIdentifiers: Record<string, string>,\n ): ManyToManyScopeJunctionMap {\n const map = new Map<string, ManyToManyScopeJunction>();\n\n const record = (target: string, scope: string, junction: string, targetFk: string, scopeFk: string): void => {\n const key = this.manyToManyScopeJunctionKey(target, scope);\n const existing = map.get(key);\n if (existing && existing.junctionResourceType !== junction) {\n throw this.createConfigurationError(\n `Ambiguous M:N scope junction for target '${target}' scoped by '${scope}': both ` +\n `'${existing.junctionResourceType}' and '${junction}' join them. A scope-required ` +\n `reference search cannot deterministically choose a junction — declare a single M:N ` +\n `between these resources.`,\n );\n }\n map.set(key, { junctionResourceType: junction, targetFkField: targetFk, scopeFkField: scopeFk });\n };\n\n for (const rel of relationships) {\n const junction = rel.jointResourceType;\n if (!junction) continue; // only M:N relationships carry a junction\n const peerA = rel.resourceType1;\n const peerB = rel.resourceType2;\n if (peerA === junction || peerB === junction) continue; // skip synthetic peer→junction edges\n if (peerA === peerB) continue; // self-ref M:N is modeled explicitly, not here\n const peerAFk = allResourceFieldIdentifiers[peerA];\n const peerBFk = allResourceFieldIdentifiers[peerB];\n if (!peerAFk || !peerBFk) continue; // junction FK columns unresolvable → skip defensively\n\n record(peerA, peerB, junction, peerAFk, peerBFk);\n record(peerB, peerA, junction, peerBFk, peerAFk);\n }\n\n return map;\n }\n\n /**\n * Resolve the M:N scope junction to use for a **scope-required reference\n * search** of `targetResourceType`, given the scope parameters available in\n * the current context (e.g. a people-picker on a task filter has the caller's\n * `organizationId` injected by the app scope).\n *\n * Returns the junction for the first `(target, scope)` entry whose\n * `scopeFkField` is present in `availableContextFields` — i.e. \"search this\n * target scoped through the junction to the scope the caller is already in\".\n * Returns `undefined` when the target has no M:N junction reachable from the\n * available context, meaning the picker should do a plain unscoped target\n * search. This is the registry-inference that drives scope-required reference\n * search on the frontend (see `.claude/plans/fk-filter-reference-search.md`) —\n * no per-field declaration needed.\n */\n static findScopeJunctionForTargetInContext(\n manyToManyScopeJunctions: ManyToManyScopeJunctionMap,\n targetResourceType: string,\n availableContextFields: ReadonlySet<string>,\n ): ManyToManyScopeJunction | undefined {\n for (const [key, junction] of manyToManyScopeJunctions) {\n const separatorIndex = key.indexOf('|');\n const entryTarget = separatorIndex === -1 ? key : key.slice(0, separatorIndex);\n if (entryTarget !== targetResourceType) continue;\n if (availableContextFields.has(junction.scopeFkField)) {\n return junction;\n }\n }\n return undefined;\n }\n\n /**\n * Build the generated custom-operation identifier used to expose explicit bulk\n * relationship actions at the resource-operation layer.\n */\n static buildRelationshipBulkOperationIdentifier(\n action: ResourceRelationshipBulkAction,\n relationshipField: string\n ): string {\n return `${ResourceRelationshipBulkOperationIdentifierPrefix[action]}${relationshipField}`;\n }\n\n /**\n * Parse a generated bulk relationship operation identifier back into its\n * semantic parts so backend dispatch can route it to the shared executor.\n */\n static parseRelationshipBulkOperationIdentifier(\n operationIdentifier: string\n ): { action: ResourceRelationshipBulkAction; relationshipField: string } | undefined {\n if (operationIdentifier.startsWith(ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.SET])) {\n return {\n action: ResourceRelationshipBulkAction.SET,\n relationshipField: operationIdentifier.slice(\n ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.SET].length\n ),\n };\n }\n\n if (operationIdentifier.startsWith(ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.CLEAR])) {\n return {\n action: ResourceRelationshipBulkAction.CLEAR,\n relationshipField: operationIdentifier.slice(\n ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.CLEAR].length\n ),\n };\n }\n\n if (operationIdentifier.startsWith(ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.CREATE])) {\n return {\n action: ResourceRelationshipBulkAction.CREATE,\n relationshipField: operationIdentifier.slice(\n ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.CREATE].length\n ),\n };\n }\n\n if (operationIdentifier.startsWith(ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.LINK])) {\n return {\n action: ResourceRelationshipBulkAction.LINK,\n relationshipField: operationIdentifier.slice(\n ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.LINK].length\n ),\n };\n }\n\n if (operationIdentifier.startsWith(ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.UNLINK])) {\n return {\n action: ResourceRelationshipBulkAction.UNLINK,\n relationshipField: operationIdentifier.slice(\n ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.UNLINK].length\n ),\n };\n }\n\n if (operationIdentifier.startsWith(ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.REPLACE])) {\n return {\n action: ResourceRelationshipBulkAction.REPLACE,\n relationshipField: operationIdentifier.slice(\n ResourceRelationshipBulkOperationIdentifierPrefix[ResourceRelationshipBulkAction.REPLACE].length\n ),\n };\n }\n\n return undefined;\n }\n\n static buildGeneratedFileRegenerateOperationIdentifier(fieldName: string): string {\n if (!fieldName.trim()) {\n throw Resources_SharedUtils.createConfigurationError('Generated file regenerate operation requires a non-empty fieldName');\n }\n return `${Resources_SharedUtils.GENERATED_FILE_REGENERATE_OPERATION_PREFIX}${fieldName}`;\n }\n\n static parseGeneratedFileRegenerateOperationIdentifier(\n operationIdentifier: string\n ): { fieldName: string } | undefined {\n if (!operationIdentifier.startsWith(Resources_SharedUtils.GENERATED_FILE_REGENERATE_OPERATION_PREFIX)) {\n return undefined;\n }\n\n const fieldName = operationIdentifier.slice(\n Resources_SharedUtils.GENERATED_FILE_REGENERATE_OPERATION_PREFIX.length,\n );\n return fieldName.trim() ? { fieldName } : undefined;\n }\n\n /**\n * Identifier of the export companion of `sourceOperationIdentifier`\n * (e.g. `collectionExport:list`, `collectionExport:mySearchVariant`).\n */\n static buildGeneratedCollectionExportOperationIdentifier(sourceOperationIdentifier: string): string {\n if (!sourceOperationIdentifier.trim()) {\n throw Resources_SharedUtils.createConfigurationError(\n 'Generated collection export operation requires a non-empty source operation identifier',\n );\n }\n return `${Resources_SharedUtils.GENERATED_COLLECTION_EXPORT_OPERATION_PREFIX}${sourceOperationIdentifier}`;\n }\n\n static parseGeneratedCollectionExportOperationIdentifier(\n operationIdentifier: string\n ): { sourceOperationIdentifier: string } | undefined {\n if (!operationIdentifier.startsWith(Resources_SharedUtils.GENERATED_COLLECTION_EXPORT_OPERATION_PREFIX)) {\n return undefined;\n }\n\n const sourceOperationIdentifier = operationIdentifier.slice(\n Resources_SharedUtils.GENERATED_COLLECTION_EXPORT_OPERATION_PREFIX.length,\n );\n return sourceOperationIdentifier.trim() ? { sourceOperationIdentifier } : undefined;\n }\n\n /**\n * Resolve the FK field identity for a relationship.\n *\n * Priority:\n * 1. explicit `foreignKeyField`\n * 2. parent resource default field identifier from `allResourceFieldIdentifiers`\n *\n * This keeps FK resolution semantics shared across backend and frontend\n * consumers instead of letting each layer improvise its own fallback.\n */\n static resolveRelationshipForeignKeyIdentity(\n relationship: Pick<ResourceRelationship, 'resourceType1' | 'resourceType2' | 'foreignKeyField'>,\n allResourceFieldIdentifiers: Partial<Record<ResourceType, string>> | Record<string, string>\n ): ResolvedRelationshipForeignKeyIdentity {\n if (relationship.foreignKeyField) {\n return {\n parentResourceType: relationship.resourceType1,\n childResourceType: relationship.resourceType2,\n fieldIdentifier: relationship.foreignKeyField,\n isExplicit: true,\n };\n }\n\n const fieldIdentifier = allResourceFieldIdentifiers[relationship.resourceType1];\n if (!fieldIdentifier) {\n throw new Error(\n `Cannot resolve FK field for relationship ${relationship.resourceType1} -> ${relationship.resourceType2}. ` +\n `No explicit foreignKeyField was provided and resource type \"${relationship.resourceType1}\" has no registered default field identifier.`\n );\n }\n\n return {\n parentResourceType: relationship.resourceType1,\n childResourceType: relationship.resourceType2,\n fieldIdentifier,\n isExplicit: false,\n };\n }\n\n /**\n * Non-throwing FK resolution helper for validation and optional consumers.\n */\n static tryResolveRelationshipForeignKeyIdentity(\n relationship: Pick<ResourceRelationship, 'resourceType1' | 'resourceType2' | 'foreignKeyField'>,\n allResourceFieldIdentifiers: Partial<Record<ResourceType, string>> | Record<string, string>\n ): ResolvedRelationshipForeignKeyIdentity | undefined {\n try {\n return this.resolveRelationshipForeignKeyIdentity(relationship, allResourceFieldIdentifiers);\n } catch {\n return undefined;\n }\n }\n\n /**\n * Resolve explicit bulk relationship affordances from the perspective of the\n * currently selected resource type.\n *\n * This is intentionally narrower than generic nested CRUD:\n * - child-side REFERENCE => `set` / `clear`\n * - parent-side COMPOSITION => `create`\n * - peer-side ASSOCIATION => `link` / `unlink` / `replace`\n *\n * Important for future UX documentation:\n * - these actions express the semantic difference between pointer management\n * (`REFERENCE`), aggregate-owned nested creation (`COMPOSITION`), and peer\n * membership management (`ASSOCIATION`)\n * - a frontend shortcut such as \"quick create\" does not add a new action kind;\n * it simply orchestrates \"create independent resource, then run the normal\n * reference/association action\"\n */\n static resolveAllowedBulkRelationshipActionsForResource(\n relationship: ResourceRelationship,\n currentResourceType: ResourceType\n ): ResourceRelationshipBulkAction[] {\n if (relationship.isDisabled === true) {\n return [];\n }\n\n const perspective = this.getRelationshipPerspectiveForResource(relationship, currentResourceType);\n if (!perspective) {\n return [];\n }\n\n const semantics = this.requireResolvedRelationshipSemantics(relationship);\n\n // REFERENCE: mutate the pointer from the child side.\n if (\n semantics.nature === RelationshipNature.REFERENCE &&\n perspective === 'resourceType2'\n ) {\n return [\n ResourceRelationshipBulkAction.SET,\n ResourceRelationshipBulkAction.CLEAR,\n ];\n }\n\n // COMPOSITION: create owned nested children from the parent side.\n if (\n semantics.nature === RelationshipNature.COMPOSITION &&\n perspective === 'resourceType1' &&\n this.resolveRelationshipNestedMutationConfig(relationship, CoreResourceOperation.CREATE)\n ) {\n return [ResourceRelationshipBulkAction.CREATE];\n }\n\n // ASSOCIATION: manage peer membership while keeping junction persistence\n // internal to the framework.\n if (\n semantics.nature === RelationshipNature.ASSOCIATION &&\n relationship.jointResourceType\n ) {\n return [\n ResourceRelationshipBulkAction.LINK,\n ResourceRelationshipBulkAction.UNLINK,\n ResourceRelationshipBulkAction.REPLACE,\n ];\n }\n\n return [];\n }\n\n /**\n * Resolve the semantic nature of a relationship.\n *\n * Greenfield API: relationship declarations must define `nature` explicitly.\n * The resolver refuses to derive semantic meaning from low-level fields.\n */\n static resolveRelationshipNature(\n relationship: Pick<ResourceRelationshipDeclaration, 'nature'>\n ): { nature: RelationshipNature; source: ResolvedRelationshipNatureCalculationMode } {\n if (!relationship.nature) {\n throw this.createConfigurationError(\n 'Relationship declarations must define nature explicitly. ' +\n 'Greenfield relationship semantics no longer infer meaning from jointResourceType or childOperations.'\n );\n }\n\n return {\n nature: relationship.nature,\n source: 'explicit',\n };\n }\n\n private static deriveLegacyRelationshipReadModel(\n nature: RelationshipNature,\n childOperations?: ChildOperationsConfig_Parsed\n ): RelationshipReadModel {\n switch (nature) {\n case RelationshipNature.COMPOSITION:\n return childOperations?.nested?.onRead\n ? RelationshipReadModel.EMBEDDED\n : RelationshipReadModel.REFERENCE_ONLY;\n case RelationshipNature.ASSOCIATION:\n return childOperations?.nested?.onRead\n ? RelationshipReadModel.ASSOCIATION_EMBEDDED\n : RelationshipReadModel.REFERENCE_ONLY;\n case RelationshipNature.REFERENCE:\n default:\n return RelationshipReadModel.REFERENCE_ONLY;\n }\n }\n\n private static resolveRelationshipReadCalculation(params: {\n nature: RelationshipNature;\n childOperations?: ChildOperationsConfig_Parsed;\n explicitRead?: RelationshipHandlingReadSettings;\n }): {\n model: RelationshipReadModel;\n source: ResolvedRelationshipReadCalculationMode;\n } {\n if (params.explicitRead) {\n return {\n model: params.explicitRead.model,\n source: 'explicit',\n };\n }\n\n if (params.childOperations?.nested?.onRead) {\n return {\n model: this.deriveLegacyRelationshipReadModel(params.nature, params.childOperations),\n source: 'legacy_nested_read_fallback',\n };\n }\n\n return {\n model: RelationshipReadModel.REFERENCE_ONLY,\n source: 'default_reference_only',\n };\n }\n\n /**\n * Resolve the internal semantic contract and the current operational\n * projection used by DTO/backend consumers.\n *\n * App developers author relationship topology and `nature`. This method is\n * where the framework derives the deeper internal handling contract and the\n * effective low-level `childOperations` shape consumed today.\n */\n static resolveRelationshipSemantics(\n relationship: Pick<\n ResourceRelationshipDeclaration,\n 'resourceType1' | 'resourceType2' | 'nature' | 'jointResourceType' | 'childOperations' | 'read' | 'foreignKeyField' | 'parentResourceRequirement' | 'cardinality1' | 'cardinality2'\n >,\n allResourceFieldIdentifiers?: Partial<Record<ResourceType, string>> | Record<string, string>\n ): ResolvedRelationshipSemantics {\n const resolvedNature = this.resolveRelationshipNature(relationship);\n const parsedChildOperations = relationship.childOperations\n ? ChildOperationsConfigSchema.parse(relationship.childOperations)\n : undefined;\n const explicitRead = relationship.read\n ? RelationshipHandlingReadSettingsSchema.parse(relationship.read)\n : undefined;\n\n this.assertRelationshipSemanticsCoherence(\n relationship,\n resolvedNature.nature,\n parsedChildOperations,\n explicitRead\n );\n\n const resolvedReadCalculation = this.resolveRelationshipReadCalculation({\n nature: resolvedNature.nature,\n childOperations: parsedChildOperations,\n explicitRead,\n });\n const handling = this.deriveRelationshipHandlingContract(\n resolvedNature.nature,\n parsedChildOperations,\n resolvedReadCalculation.model\n );\n const persistence = this.deriveRelationshipPersistenceContract(relationship, allResourceFieldIdentifiers);\n\n return {\n nature: resolvedNature.nature,\n natureCalculationMode: resolvedNature.source,\n readCalculationMode: resolvedReadCalculation.source,\n handling,\n persistence,\n childOperations: parsedChildOperations,\n };\n }\n\n /**\n * Resolve the effective nested mutation projection for the given operation.\n *\n * `handling` is the semantic gate; `childOperations` remains the current\n * detailed operational projection while Step 3/4 finishes converging.\n */\n static resolveRelationshipNestedMutationConfig(\n relationship: ResourceRelationship,\n operation: CoreResourceOperation\n ) {\n const semantics = this.requireResolvedRelationshipSemantics(relationship);\n\n if (\n semantics.handling.dtoModelMode === RelationshipDtoModel.REFERENCE_HANDLE ||\n semantics.handling.mutationModelMode === RelationshipMutationModel.NONE\n ) {\n return undefined;\n }\n\n return (\n operation === CoreResourceOperation.CREATE ||\n operation === CoreResourceOperation.CREATE_MANY\n )\n ? semantics.childOperations?.nested?.onCreate\n : semantics.childOperations?.nested?.onUpdate;\n }\n\n /**\n * Resolve the effective nested read projection.\n *\n * The semantic read contract is the gate. The detailed data-mode config still\n * comes from the current operational projection.\n */\n static resolveRelationshipNestedReadConfig(relationship: ResourceRelationship) {\n const semantics = this.requireResolvedRelationshipSemantics(relationship);\n\n if (\n semantics.handling.dtoModelMode === RelationshipDtoModel.REFERENCE_HANDLE ||\n semantics.handling.read.model === RelationshipReadModel.REFERENCE_ONLY\n ) {\n return undefined;\n }\n\n return semantics.childOperations?.nested?.onRead;\n }\n\n /**\n * Resolve the effective lifecycle-on-parent-delete projection.\n *\n * `lifecycleModelMode` is the semantic gate; the detailed delete policy still\n * comes from the current operational projection.\n */\n static resolveRelationshipLifecycleOnParentDeleteConfig(\n relationship: ResourceRelationship\n ) {\n const semantics = this.requireResolvedRelationshipSemantics(relationship);\n\n if (semantics.handling.lifecycleModelMode === RelationshipLifecycleModel.INDEPENDENT) {\n return undefined;\n }\n\n return semantics.childOperations?.lifecycle?.onParentDelete;\n }\n\n /**\n * Resolve the effective lifecycle-on-parent-create projection — the eager\n * composition-child seeding policy. Mirror of\n * {@link resolveRelationshipLifecycleOnParentDeleteConfig}: `lifecycleModelMode`\n * is the semantic gate (INDEPENDENT / aggregation → no eager seed), and the\n * detailed create policy comes from the operational\n * `childOperations.lifecycle.onParentCreate` projection.\n */\n static resolveRelationshipLifecycleOnParentCreateConfig(\n relationship: ResourceRelationship\n ) {\n const semantics = this.requireResolvedRelationshipSemantics(relationship);\n\n if (semantics.handling.lifecycleModelMode === RelationshipLifecycleModel.INDEPENDENT) {\n return undefined;\n }\n\n return semantics.childOperations?.lifecycle?.onParentCreate;\n }\n\n /**\n * Compile the developer-authored declaration into the runtime relationship\n * shape used by the framework.\n */\n static compileRelationshipDeclaration(\n relationship: ResourceRelationshipDeclaration,\n allResourceFieldIdentifiers?: Partial<Record<ResourceType, string>> | Record<string, string>\n ): ResourceRelationship {\n return {\n ...relationship,\n resolvedSemantics: this.resolveRelationshipSemantics(relationship, allResourceFieldIdentifiers),\n };\n }\n\n /**\n * Ensure a relationship is in the compiled runtime shape.\n *\n * This is the startup normalization bridge for places that aggregate\n * relationships from multiple sources before they are stored on registries or\n * resource configurations.\n */\n static ensureCompiledRelationship(\n relationship: ResourceRelationship | ResourceRelationshipDeclaration,\n allResourceFieldIdentifiers?: Partial<Record<ResourceType, string>> | Record<string, string>\n ): ResourceRelationship {\n const compiledRelationship = this.compileRelationshipDeclaration(relationship, allResourceFieldIdentifiers);\n\n if (\n 'resolvedSemantics' in relationship &&\n this.hasValidResolvedRelationshipSemantics(relationship.resolvedSemantics) &&\n this.areResolvedRelationshipSemanticsEquivalent(\n relationship.resolvedSemantics,\n compiledRelationship.resolvedSemantics\n )\n ) {\n return relationship;\n }\n\n if (\n !allResourceFieldIdentifiers &&\n 'resolvedSemantics' in relationship &&\n this.hasValidResolvedRelationshipSemantics(relationship.resolvedSemantics) &&\n relationship.resolvedSemantics.persistence.foreignKey &&\n !compiledRelationship.resolvedSemantics.persistence.foreignKey\n ) {\n return {\n ...compiledRelationship,\n resolvedSemantics: {\n ...compiledRelationship.resolvedSemantics,\n persistence: relationship.resolvedSemantics.persistence,\n },\n };\n }\n\n return compiledRelationship;\n }\n\n static ensureCompiledRelationships(\n relationships: readonly (ResourceRelationship | ResourceRelationshipDeclaration)[],\n allResourceFieldIdentifiers?: Partial<Record<ResourceType, string>> | Record<string, string>\n ): ResourceRelationship[] {\n return relationships.map((relationship) =>\n this.ensureCompiledRelationship(relationship, allResourceFieldIdentifiers)\n );\n }\n\n static ensureCompiledRelationshipBuckets<\n TResourceRelationships extends {\n parentRelationships: readonly (ResourceRelationship | ResourceRelationshipDeclaration)[];\n childRelationships: readonly (ResourceRelationship | ResourceRelationshipDeclaration)[];\n selfRelationships: readonly (ResourceRelationship | ResourceRelationshipDeclaration)[];\n }\n >(\n resourceRelationships: TResourceRelationships,\n allResourceFieldIdentifiers?: Partial<Record<ResourceType, string>> | Record<string, string>\n ): {\n parentRelationships: ResourceRelationship[];\n childRelationships: ResourceRelationship[];\n selfRelationships: ResourceRelationship[];\n } {\n return {\n parentRelationships: this.ensureCompiledRelationships(\n resourceRelationships.parentRelationships ?? [],\n allResourceFieldIdentifiers\n ),\n childRelationships: this.ensureCompiledRelationships(\n resourceRelationships.childRelationships ?? [],\n allResourceFieldIdentifiers\n ),\n selfRelationships: this.ensureCompiledRelationships(\n resourceRelationships.selfRelationships ?? [],\n allResourceFieldIdentifiers\n ),\n };\n }\n\n /**\n * Strict runtime reader for already-compiled relationships.\n *\n * Use this in hot runtime/startup paths once the relationship graph has passed\n * through the shared compilation boundary.\n */\n static requireResolvedRelationshipSemantics(\n relationship: ResourceRelationship\n ): ResolvedRelationshipSemantics {\n if (!this.hasValidResolvedRelationshipSemantics(relationship.resolvedSemantics)) {\n throw new Error(\n 'Expected ResourceRelationship to carry valid resolvedSemantics. ' +\n 'Make sure the relationship graph passed through the shared startup compilation step.'\n );\n }\n\n return relationship.resolvedSemantics;\n }\n\n /**\n * Read the stored runtime semantics when present. This keeps current call\n * sites resilient while Step 3 finishes converging on fully compiled edges.\n */\n static getResolvedRelationshipSemantics(\n relationship: Pick<\n ResourceRelationship | ResourceRelationshipDeclaration,\n 'resourceType1' | 'resourceType2' | 'nature' | 'jointResourceType' | 'childOperations' | 'read' | 'foreignKeyField' | 'parentResourceRequirement' | 'cardinality1' | 'cardinality2'\n > & Partial<Pick<ResourceRelationship, 'resolvedSemantics'>>\n ): ResolvedRelationshipSemantics {\n return this.hasValidResolvedRelationshipSemantics(relationship.resolvedSemantics)\n ? relationship.resolvedSemantics\n : this.resolveRelationshipSemantics(relationship);\n }\n\n /**\n * Derive the engine-facing handling contract from the authored relationship\n * semantics plus low-level nested/lifecycle settings.\n *\n * Keep the semantic layers distinct:\n * - `RelationshipNature` answers what the relationship means\n * - the explicit read contract answers the semantic read intent when authored\n * - the returned contract answers what kind of DTO/mutation/read/lifecycle\n * handling the engine should expose\n *\n * Documentation rule:\n * - `REFERENCE` = independent-resource pointer semantics\n * - `ASSOCIATION` = peer membership/link semantics\n * - `COMPOSITION` = aggregate-managed nested child semantics\n *\n * A frontend capability like `display.interaction.allowQuickCreate` must stay\n * OUTSIDE this contract:\n * - reference quick create = create independent resource, then set reference\n * - association quick create = create independent peer, then link/replace\n * - composition already owns native nested creation and does not need this\n * shortcut to explain its meaning\n */\n private static deriveRelationshipHandlingContract(\n nature: RelationshipNature,\n childOperations?: ChildOperationsConfig_Parsed,\n resolvedReadModel?: RelationshipReadModel\n ): RelationshipHandlingContract {\n const baseContract: RelationshipHandlingContract = {\n dtoModelMode: RelationshipDtoModel.REFERENCE_HANDLE,\n mutationModelMode: RelationshipMutationModel.NONE,\n lifecycleModelMode: RelationshipLifecycleModel.INDEPENDENT,\n readModelMode: resolvedReadModel,\n read: {\n model: resolvedReadModel,\n },\n };\n\n switch (nature) {\n case RelationshipNature.COMPOSITION:\n baseContract.dtoModelMode = RelationshipDtoModel.NESTED_RESOURCE;\n baseContract.mutationModelMode = RelationshipMutationModel.AGGREGATE_MANAGED;\n baseContract.lifecycleModelMode = RelationshipLifecycleModel.DEPENDENT;\n break;\n case RelationshipNature.ASSOCIATION:\n baseContract.dtoModelMode = RelationshipDtoModel.ASSOCIATION_HANDLE;\n baseContract.mutationModelMode = RelationshipMutationModel.ASSOCIATION_MANAGED;\n baseContract.lifecycleModelMode = RelationshipLifecycleModel.LINK_ONLY;\n break;\n case RelationshipNature.REFERENCE:\n default:\n break;\n }\n\n const createConfig = childOperations?.nested?.onCreate;\n const updateConfig = childOperations?.nested?.onUpdate;\n const lifecycleOnDelete = childOperations?.lifecycle?.onParentDelete;\n\n if (createConfig || updateConfig) {\n baseContract.mutation = {\n allowParentCreate: Boolean(createConfig),\n allowParentUpdate: Boolean(updateConfig),\n allowParentDelete: Boolean(updateConfig?.allowDelete),\n maxDepth: Math.max(createConfig?.maxDepth ?? 0, updateConfig?.maxDepth ?? 0),\n };\n }\n\n if (lifecycleOnDelete) {\n baseContract.lifecycle = {\n onParentDelete: {\n enabled: lifecycleOnDelete.enabled,\n mode: lifecycleOnDelete.mode ?? ChildLifecycleMode.IMMEDIATE,\n // Project the teardown STRATEGY too — without it the derived semantic contract cannot\n // distinguish a hard-delete cascade from an impersonalize-and-retain one.\n strategy: lifecycleOnDelete.strategy ?? ChildLifecycleStrategy.DELETE,\n maxDepth: lifecycleOnDelete.maxDepth,\n },\n };\n }\n\n return baseContract;\n }\n\n /**\n * Derive runtime persistence behavior from the authored relationship topology.\n *\n * The declaration remains small: developers author cardinality, parent\n * requirement, nature, and the FK field when disambiguation is needed. The\n * framework compiles the persistence consequence here so storage adapters do\n * not reinterpret relationship meaning independently.\n *\n * The contract is expressed from the HOLDER's perspective\n * ({@link resolveForeignKeyHolderResourceType} — the side whose rows carry\n * the FK column, resolved from cardinality, never from declaration order):\n * - `holderResourceType` tells storage adapters WHICH resource the contract\n * applies to — an adapter building any other resource of the relationship\n * must not materialize or validate this FK there;\n * - `required` means the holder's FK column is non-nullable (the referenced\n * parent is mandatory for every holder row);\n * - `unique` means at most one holder row per referenced row, which is true\n * exactly when the relationship is a genuine 1:1 — BOTH sides\n * single-valued. Keying uniqueness off `cardinality2` alone (the previous\n * derivation) assumed parent-first declaration order: for child-first\n * N:1 references (`(TODOS, USERS, MANY, ONE)`) and self-referencing trees\n * (`(UNITS, UNITS, ONE, MANY)`) a single positional cardinality is ONE\n * while the relationship is not 1:1, which would emit a bogus unique\n * index on a shared FK.\n */\n private static deriveRelationshipPersistenceContract(\n relationship: Pick<\n ResourceRelationshipDeclaration,\n 'resourceType1' | 'resourceType2' | 'foreignKeyField' | 'parentResourceRequirement' | 'cardinality1' | 'cardinality2'\n >,\n allResourceFieldIdentifiers?: Partial<Record<ResourceType, string>> | Record<string, string>\n ): RelationshipPersistenceContract {\n const foreignKeyIdentity = allResourceFieldIdentifiers\n ? this.tryResolveRelationshipForeignKeyIdentity(relationship, allResourceFieldIdentifiers)\n : relationship.foreignKeyField\n ? {\n fieldIdentifier: relationship.foreignKeyField,\n }\n : undefined;\n\n if (!foreignKeyIdentity) {\n return {};\n }\n\n const isArrayForeignKey = foreignKeyIdentity.fieldIdentifier.endsWith('Ids');\n const holderResourceType = this.resolveForeignKeyHolderResourceType(relationship);\n const isTrueOneToOne =\n isOneToOneCardinality(relationship.cardinality1) &&\n isOneToOneCardinality(relationship.cardinality2);\n\n return {\n foreignKey: {\n fieldIdentifier: foreignKeyIdentity.fieldIdentifier,\n holderResourceType,\n isArray: isArrayForeignKey,\n materializeField: true,\n required: relationship.parentResourceRequirement !== ResourceParentResourceRequirement.OPTIONAL,\n unique: !isArrayForeignKey && isTrueOneToOne,\n },\n };\n }\n\n private static assertRelationshipSemanticsCoherence(\n relationship: Pick<ResourceRelationship, 'jointResourceType' | 'nature' | 'childOperations' | 'read'>,\n resolvedNature: RelationshipNature,\n childOperations?: ChildOperationsConfig_Parsed,\n explicitRead?: RelationshipHandlingReadSettings\n ): void {\n const legacyReadModel = this.deriveLegacyRelationshipReadModel(\n resolvedNature,\n childOperations\n );\n\n if (resolvedNature === RelationshipNature.ASSOCIATION && !relationship.jointResourceType) {\n throw new Error(\n 'Association semantics require jointResourceType. ' +\n 'Step 3 resolver refuses to treat non-junction relationships as ASSOCIATION.'\n );\n }\n\n if (relationship.jointResourceType && relationship.nature && resolvedNature !== RelationshipNature.ASSOCIATION) {\n throw new Error(\n 'Junction-backed relationships must resolve to ASSOCIATION semantics.'\n );\n }\n\n if (resolvedNature === RelationshipNature.ASSOCIATION && childOperations) {\n const hasAssociationNestedWrite =\n Boolean(childOperations.nested?.onCreate || childOperations.nested?.onUpdate);\n const hasAssociationNestedRead =\n Boolean(childOperations.nested?.onRead);\n\n if (hasAssociationNestedWrite || hasAssociationNestedRead) {\n throw new Error(\n 'ASSOCIATION relationships cannot project nested read or mutation DTOs from the association declaration. ' +\n 'Declare explicit junction resource operations/views instead of using association-level childOperations.nested.'\n );\n }\n }\n\n if (resolvedNature === RelationshipNature.REFERENCE && childOperations) {\n const hasReferenceLifecycle =\n childOperations.lifecycle?.onParentDelete?.enabled === true;\n const hasReferenceNestedWrite =\n Boolean(childOperations.nested?.onCreate || childOperations.nested?.onUpdate);\n const hasReferenceNestedRead =\n Boolean(childOperations.nested?.onRead);\n\n if (hasReferenceLifecycle || hasReferenceNestedWrite || hasReferenceNestedRead) {\n throw new Error(\n 'REFERENCE relationships cannot project to nested CRUD/read embedding or dependent lifecycle. ' +\n 'Use COMPOSITION/ASSOCIATION semantics or remove the low-level childOperations settings.'\n );\n }\n }\n\n if (explicitRead) {\n if (\n explicitRead.model === RelationshipReadModel.EMBEDDED &&\n resolvedNature !== RelationshipNature.COMPOSITION\n ) {\n throw new Error(\n 'EMBEDDED read semantics require nature=COMPOSITION.'\n );\n }\n\n if (\n explicitRead.model === RelationshipReadModel.ASSOCIATION_EMBEDDED &&\n resolvedNature !== RelationshipNature.ASSOCIATION\n ) {\n throw new Error(\n 'ASSOCIATION_EMBEDDED read semantics require nature=ASSOCIATION.'\n );\n }\n\n if (\n childOperations?.nested?.onRead &&\n explicitRead.model !== legacyReadModel\n ) {\n throw new Error(\n 'Explicit relationship read semantics contradict childOperations.nested.onRead. ' +\n 'Align the authored read contract with the nested read projection or remove one of them.'\n );\n }\n }\n }\n\n /**\n * M:N expansion is only safe when the declaration maps to one unambiguous edge\n * per synthetic relationship. A self-referencing junction needs distinct source\n * and target edge identities, which the current single-declaration model does\n * not encode.\n */\n static assertSupportedManyToManySyntheticExpansion(\n relationship: Pick<ResourceRelationship, 'resourceType1' | 'resourceType2' | 'jointResourceType'>\n ): void {\n if (relationship.jointResourceType && relationship.resourceType1 === relationship.resourceType2) {\n throw new Error(\n 'Self-referencing MANY-to-MANY relationships cannot be expanded from a single declaration. ' +\n 'Declare explicit junction-resource relationships so source and target edge identity stay explicit.'\n );\n }\n }\n\n /**\n * Returns true when a discriminator is structurally usable at runtime.\n *\n * A usable discriminator needs both a field name and at least one allowed\n * value. Truthy-but-empty discriminator objects should not be treated as\n * activation constraints.\n */\n static hasUsableRelationshipDiscriminator(\n discriminator?: ResourceRelationship['discriminator']\n ): boolean {\n return Boolean(\n discriminator?.discriminatorField &&\n discriminator.values &&\n discriminator.values.length > 0\n );\n }\n\n /**\n * Returns true when the relationship carries any runtime activation gate.\n *\n * Relationships without a usable discriminator (field + non-empty values) or\n * a condition are unconditionally active.\n */\n static hasRelationshipActivationConstraint(\n relationship: Pick<ResourceRelationship, 'discriminator' | 'condition'>\n ): boolean {\n return Boolean(\n this.hasUsableRelationshipDiscriminator(relationship.discriminator) ||\n relationship.condition\n );\n }\n\n /**\n * Check whether parent data matches a relationship discriminator.\n *\n * Discriminator values are string-based in the schema, so runtime values are\n * coerced with `String()` before comparison. Missing/empty discriminators do\n * not match.\n */\n static matchesRelationshipDiscriminator<T extends Record<string, any>>(\n resource: T,\n discriminator?: ResourceRelationship['discriminator']\n ): boolean {\n if (!this.hasUsableRelationshipDiscriminator(discriminator)) {\n return false;\n }\n\n const fieldValue = resource[discriminator.discriminatorField];\n return discriminator.values.includes(String(fieldValue));\n }\n\n /**\n * Resolve whether a relationship is active for a given parent resource.\n *\n * Evaluation order is semantic, not caller-specific:\n * 1. discriminator\n * 2. condition\n * 3. unconditional pass\n *\n * This keeps backend and frontend consumers aligned while still letting them\n * choose how to handle missing parent data or thrown condition functions.\n */\n static isRelationshipActiveForParent(\n relationship: Pick<ResourceRelationship, 'discriminator' | 'condition'>,\n parentResource?: Record<string, any>,\n options: RelationshipActivationEvaluationOptions = {}\n ): boolean {\n const {\n onMissingParentResource = 'exclude',\n onConditionError = 'throw',\n } = options;\n\n const hasConstraint = this.hasRelationshipActivationConstraint(relationship);\n if (!parentResource) {\n return hasConstraint ? onMissingParentResource === 'include' : true;\n }\n\n if (this.hasUsableRelationshipDiscriminator(relationship.discriminator)) {\n if (!this.matchesRelationshipDiscriminator(parentResource, relationship.discriminator)) {\n return false;\n }\n }\n\n if (relationship.condition) {\n try {\n if (!relationship.condition(parentResource)) {\n return false;\n }\n } catch (error) {\n if (onConditionError === 'exclude') {\n return false;\n }\n throw error;\n }\n }\n\n return true;\n }\n\n /**\n * Filter relationships to the subset that is active for a given parent.\n */\n static filterRelationshipsActiveForParent<T extends Pick<ResourceRelationship, 'discriminator' | 'condition'>>(\n relationships: T[],\n parentResource?: Record<string, any>,\n options?: RelationshipActivationEvaluationOptions\n ): T[] {\n return relationships.filter((relationship) =>\n this.isRelationshipActiveForParent(relationship, parentResource, options)\n );\n }\n\n}\n\n\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-export.shared.utils.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"collection-export.shared.utils.d.ts","sourceRoot":"","sources":["../../../../src/resources/utils/collection-export.shared.utils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAAE,8BAA8B,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAEtH,wCAAwC;AACxC,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,MAAM,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAGpG,CAAC;AAEF,uCAAuC;AACvC,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,MAAM,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAGtG,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,oCAAoC,WAAW,CAAC;AAC7D,eAAO,MAAM,uCAAuC,aAAa,CAAC;AAElE,oEAAoE;AACpE,eAAO,MAAM,kCAAkC,6BAA6B,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iCAAiC,CAAC,WAAW,EAAE,CAAC,CAAC,UAAU,GAAG,SAAS,GAAG,MAAM,EAAE,GAAG,SAAS,CA4B7G;AAoCD;;;;;;GAMG;AACH,wBAAgB,sCAAsC,CACpD,SAAS,EAAE,OAAO,EAClB,OAAO,EAAE,SAAS,8BAA8B,EAAE,GACjD,8BAA8B,GAAG,SAAS,CAM5C;AAED,iGAAiG;AACjG,wBAAgB,wCAAwC,CACtD,SAAS,EAAE,OAAO,EAClB,OAAO,EAAE,SAAS,gCAAgC,EAAE,GACnD,gCAAgC,GAAG,SAAS,CAM9C;AAED,oFAAoF;AACpF,MAAM,WAAW,iCAAiC;IAChD,MAAM,EAAE,8BAA8B,CAAC;IACvC,QAAQ,EAAE,gCAAgC,CAAC;CAC5C;AAED;;;;;;;GAOG;AACH,wBAAgB,8BAA8B,CAC5C,YAAY,EAAE,8BAA8B,GAC3C,iCAAiC,EAAE,CAQrC;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,8BAA8B,EACtC,GAAG,EAAE,IAAI,GACR,MAAM,CAGR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composition-cascade-deletability.validation.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"composition-cascade-deletability.validation.d.ts","sourceRoot":"","sources":["../../../../src/resources/utils/composition-cascade-deletability.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EAGrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM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+1 @@
|
|
|
1
|
-
{"version":3,"file":"composition-seedability.validation.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"composition-seedability.validation.d.ts","sourceRoot":"","sources":["../../../../src/resources/utils/composition-seedability.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,oBAAoB,EAErB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAGpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,0EAA0E;AAC1E,MAAM,WAAW,mCAAmC;IAClD,kBAAkB,EAAE,YAAY,CAAC;IACjC,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC;IACzB,qBAAqB,EAAE;QACrB,mBAAmB,EAAE,oBAAoB,EAAE,CAAC;KAC7C,CAAC;CACH;AAED,MAAM,WAAW,+BAA+B;IAC9C,iBAAiB,EAAE,YAAY,CAAC;IAChC,kBAAkB,EAAE,YAAY,CAAC;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,gFAAgF;IAChF,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CACjB;AAMD;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,CAC5C,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,mCAAmC,CAAC,GAC1E,+BAA+B,EAAE,CAoEnC"}
|
package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-addressed-composition-singleton.shared.utils.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"context-addressed-composition-singleton.shared.utils.d.ts","sourceRoot":"","sources":["../../../../src/resources/utils/context-addressed-composition-singleton.shared.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2CAA2C,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EAKL,KAAK,oBAAoB,EACzB,KAAK,YAAY,EAClB,MAAM,6BAA6B,CAAC;AAGrC,MAAM,WAAW,yDAAyD;IACxE,YAAY,EAAE,oBAAoB,CAAC;IACnC,kBAAkB,EAAE,YAAY,CAAC;IACjC,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,kDAAkD,CAChE,YAAY,EAAE,oBAAoB,GACjC,OAAO,CAeT;AAED,wBAAgB,6DAA6D,CAC3E,qBAAqB,EAAE,2CAA2C,GACjE,yDAAyD,EAAE,CAQ7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"duplicate-relationship-registration.validation.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"duplicate-relationship-registration.validation.d.ts","sourceRoot":"","sources":["../../../../src/resources/utils/duplicate-relationship-registration.validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEtF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqFG;AAEH,0EAA0E;AAC1E,MAAM,WAAW,iCAAiC;IAChD,kBAAkB,EAAE,YAAY,CAAC;IACjC,iBAAiB,EAAE,YAAY,CAAC;IAChC,4FAA4F;IAC5F,WAAW,EAAE,MAAM,CAAC;IACpB,6FAA6F;IAC7F,YAAY,EAAE,oBAAoB,CAAC;IACnC,OAAO,EAAE,MAAM,CAAC;CACjB;AAqDD;;;;;;;;;;;GAWG;AACH,wBAAgB,sCAAsC,CACpD,aAAa,EAAE,SAAS,oBAAoB,EAAE,GAC7C,iCAAiC,EAAE,CAgErC"}
|