@wildo-ai/saas-models 1.1.4 → 1.1.5
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 +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 +1 -1
- package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-versions.shared.resources-config.schemas.js +2 -2
- package/dist/esm/applications/application-versions.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/applications/applications-context.schemas.d.ts +236 -18
- package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.js +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/applications/applications.shared.schemas.d.ts +3 -2
- package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.schemas.js +40 -5
- package/dist/esm/applications/applications.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts +1 -2
- package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-account.shared.resources-config.schemas.js +1 -2
- package/dist/esm/billing/billing-account.shared.resources-config.schemas.js.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.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts +87 -5
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.js +91 -5
- package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.d.ts +24 -4
- package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.js +24 -8
- 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.resources-config.schemas.js +32 -2
- package/dist/esm/billing/price.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -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 +1 -1
- package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.resources-config.schemas.js +32 -2
- package/dist/esm/billing/product.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/product.shared.schemas.d.ts +1 -0
- package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.schemas.js +3 -0
- 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.resources-config.schemas.js +33 -3
- package/dist/esm/billing/promotions.shared.resources-config.schemas.js.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.resources-config.schemas.js +22 -2
- package/dist/esm/billing/referral.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/referral.shared.schemas.d.ts +1 -0
- package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.schemas.js +3 -0
- package/dist/esm/billing/referral.shared.schemas.js.map +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +23 -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 +48 -2
- package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/subscription.shared.schemas.d.ts +1 -0
- package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/subscription.shared.schemas.js +3 -0
- package/dist/esm/billing/subscription.shared.schemas.js.map +1 -1
- package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts +49 -0
- package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts.map +1 -0
- package/dist/esm/billing/usage-flush-evidence.shared.schemas.js +48 -0
- package/dist/esm/billing/usage-flush-evidence.shared.schemas.js.map +1 -0
- 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 +1 -0
- package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.schemas.js +3 -0
- 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 +7 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -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 +14 -3
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +21 -7
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts +450 -0
- package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js +723 -0
- package/dist/esm/compliance/audit-trails/audit-export-projection.shared.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 +2 -2
- 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 +8 -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 +15 -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 +610 -16
- 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 +769 -38
- 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 +29 -0
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
- package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts +463 -0
- package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js +526 -0
- package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts +539 -15
- package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/documents/governed-documents.shared.schemas.js +402 -14
- package/dist/esm/compliance/documents/governed-documents.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts +18 -0
- package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js +89 -0
- package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts +47 -0
- package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js +73 -0
- package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts +21 -0
- package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js +39 -1
- package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.d.ts +33 -0
- package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js +30 -0
- package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js.map +1 -0
- package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts +6 -5
- package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/client-storage.shared.schemas.js +15 -5
- package/dist/esm/compliance/privacy/client-storage.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts +127 -0
- package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js +94 -0
- package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts +125 -0
- package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/consent-purposes.shared.js +136 -0
- package/dist/esm/compliance/privacy/consent-purposes.shared.js.map +1 -0
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts +91 -0
- package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js +123 -0
- package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js.map +1 -0
- 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.map +1 -1
- 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 +68 -25
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js +74 -22
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js.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 +9 -17
- package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/privacy.shared.schemas.js +74 -31
- package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
- 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-lane-evidence.shared.schemas.d.ts +47 -0
- package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js +98 -0
- package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts +368 -35
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js +403 -17
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js.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.map +1 -1
- package/dist/esm/compliance/review-cadence.shared.schemas.d.ts +56 -0
- package/dist/esm/compliance/review-cadence.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/review-cadence.shared.schemas.js +71 -0
- package/dist/esm/compliance/review-cadence.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/risk-posture.shared.schemas.d.ts +161 -0
- package/dist/esm/compliance/risk-posture.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/risk-posture.shared.schemas.js +166 -0
- package/dist/esm/compliance/risk-posture.shared.schemas.js.map +1 -0
- package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts +4 -3
- package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.js +4 -3
- package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
- package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +222 -9
- package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/app-configuration-shared.shared.schemas.js +232 -9
- package/dist/esm/config/app-configuration-shared.shared.schemas.js.map +1 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.d.ts +75 -3
- package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.js +93 -4
- package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
- package/dist/esm/config/brand-assets.shared.schemas.d.ts +5 -4
- package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/brand-assets.shared.schemas.js +14 -4
- package/dist/esm/config/brand-assets.shared.schemas.js.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +463 -19
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.js +535 -28
- package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +24 -24
- 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.map +1 -1
- package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
- package/dist/esm/config/frontend/navigation.shared.schemas.d.ts +21 -17
- package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/navigation.shared.schemas.js +58 -40
- package/dist/esm/config/frontend/navigation.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts +90 -133
- package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/onboarding.shared.schemas.js +148 -100
- package/dist/esm/config/frontend/onboarding.shared.schemas.js.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 +140 -43
- 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 +141 -42
- 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.definitions.js +1 -1
- package/dist/esm/errors/errors.shared.definitions.js.map +1 -1
- package/dist/esm/errors/errors.shared.schemas.d.ts +29 -40
- package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.schemas.js +37 -54
- package/dist/esm/errors/errors.shared.schemas.js.map +1 -1
- package/dist/esm/errors/errors.shared.utils.d.ts +24 -0
- package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.utils.js +39 -0
- package/dist/esm/errors/errors.shared.utils.js.map +1 -1
- package/dist/esm/errors/thrown-value-description.shared.utils.d.ts +27 -0
- package/dist/esm/errors/thrown-value-description.shared.utils.d.ts.map +1 -0
- package/dist/esm/errors/thrown-value-description.shared.utils.js +67 -0
- package/dist/esm/errors/thrown-value-description.shared.utils.js.map +1 -0
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +48 -73
- 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 +103 -9
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
- package/dist/esm/external-data.exports.d.ts +1 -0
- package/dist/esm/external-data.exports.d.ts.map +1 -1
- package/dist/esm/external-data.exports.js +1 -0
- package/dist/esm/external-data.exports.js.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 +11 -12
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +11 -12
- 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 +5 -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 +5 -3
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
- package/dist/esm/external-providers/engine-capability-surface.shared.d.ts +77 -0
- package/dist/esm/external-providers/engine-capability-surface.shared.d.ts.map +1 -0
- package/dist/esm/external-providers/engine-capability-surface.shared.js +173 -0
- package/dist/esm/external-providers/engine-capability-surface.shared.js.map +1 -0
- package/dist/esm/external-providers/external-providers.shared.schemas.d.ts +2 -0
- package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/external-providers.shared.schemas.js +21 -0
- package/dist/esm/external-providers/external-providers.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +129 -9
- 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 +114 -0
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js +148 -0
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -1
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +54 -3
- 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 +58 -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 +12 -3
- package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-provider-public-config.shared.js +14 -5
- package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -1
- package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts +30 -0
- package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js +32 -0
- package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts +86 -0
- package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js +85 -0
- package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +14 -13
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-capability.shared.schemas.js +10 -10
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -1
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts +7 -5
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js +7 -5
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts +8 -5
- package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-metadata.shared.schemas.js +5 -2
- package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -1
- 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 +2 -0
- 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 +30 -3
- package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/features/connected-feature.example.d.ts +64 -0
- package/dist/esm/features/connected-feature.example.d.ts.map +1 -0
- package/dist/esm/features/connected-feature.example.js +86 -0
- package/dist/esm/features/connected-feature.example.js.map +1 -0
- package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
- package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
- package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
- 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 +53 -0
- package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/scope-features.shared.schemas.js +37 -0
- package/dist/esm/features/scope-features.shared.schemas.js.map +1 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts +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 +34 -52
- 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.map +1 -1
- package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -1
- package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
- package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
- package/dist/esm/files/files.shared.resources-config.schemas.d.ts +3 -3
- package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/files/files.shared.resources-config.schemas.js +3 -3
- package/dist/esm/files/files.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
- 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 +152 -129
- package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/actors.shared.schemas.js +99 -2
- package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts +6 -0
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agents.shared.schemas.d.ts +3 -3
- package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agents.shared.schemas.js +11 -5
- package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts +13 -0
- package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts +45 -0
- package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts.map +1 -0
- package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.js +51 -0
- package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.js.map +1 -0
- 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 +31 -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 +61 -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 +2 -2
- 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 +16 -8
- 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 +23 -11
- 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 +0 -189
- package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js +14 -50
- package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts +0 -3
- package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js +0 -1
- package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js.map +1 -1
- 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.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 +1 -67
- 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 +1 -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 +0 -1
- package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts +121 -0
- package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/human-decision.shared.schemas.js +252 -0
- package/dist/esm/flows-actors/human-decision.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js +4 -2
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts +24 -0
- package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js +80 -0
- package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts +123 -0
- package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/provider-call-records.shared.schemas.js +181 -0
- package/dist/esm/flows-actors/provider-call-records.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts +58 -81
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.js +75 -38
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.js.map +1 -1
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts +106 -1
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -1
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js +117 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -1
- package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts +106 -24
- package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-flow.shared.schemas.js +152 -14
- package/dist/esm/guidance/guidance-flow.shared.schemas.js.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.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 +0 -6
- package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.schemas.js +0 -19
- package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
- package/dist/esm/guidance/milestone-builders.shared.d.ts +4 -2
- package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
- package/dist/esm/guidance/milestone-builders.shared.js +4 -2
- package/dist/esm/guidance/milestone-builders.shared.js.map +1 -1
- package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts +66 -4
- package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/milestone-definition.shared.schemas.js +50 -0
- package/dist/esm/guidance/milestone-definition.shared.schemas.js.map +1 -1
- package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts +71 -0
- package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts.map +1 -0
- package/dist/esm/guidance/progression-presentation.shared.schemas.js +72 -0
- package/dist/esm/guidance/progression-presentation.shared.schemas.js.map +1 -0
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts +2 -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 +4 -0
- package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.js +5 -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-id.shared.utils.js +2 -1
- package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts +181 -412
- 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 +249 -199
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
- package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts +107 -0
- package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts.map +1 -0
- package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js +108 -0
- package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js.map +1 -0
- package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts +38 -0
- package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts.map +1 -0
- package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js +42 -0
- package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js.map +1 -0
- package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
- package/dist/esm/index.d.ts +41 -4
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +71 -16
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -0
- package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.js.map +1 -0
- package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -0
- package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +1 -0
- package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts +130 -0
- package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts.map +1 -0
- package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js +104 -0
- package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js.map +1 -0
- package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -0
- package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -0
- package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/decisions.meta-workflows.shared.schemas.d.ts +64 -0
- package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -0
- package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/decisions.meta-workflows.shared.schemas.js +47 -0
- package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -0
- package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts +544 -0
- package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts.map +1 -0
- package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js +638 -0
- package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js.map +1 -0
- package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/portable-primitives.meta-workflows.shared.schemas.d.ts +15 -8
- package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -0
- package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/portable-primitives.meta-workflows.shared.schemas.js +15 -8
- package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +1 -0
- package/dist/esm/meta-workflows.exports.d.ts +21 -25
- package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
- package/dist/esm/meta-workflows.exports.js +21 -25
- package/dist/esm/meta-workflows.exports.js.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-submission.shared.enums.d.ts +16 -0
- package/dist/esm/notifications/email/email-submission.shared.enums.d.ts.map +1 -0
- package/dist/esm/notifications/email/email-submission.shared.enums.js +17 -0
- package/dist/esm/notifications/email/email-submission.shared.enums.js.map +1 -0
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +36 -0
- 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 +50 -3
- 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.map +1 -1
- 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.resources-config.schemas.js +4 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts +2 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js +3 -2
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js.map +1 -1
- 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 +44 -3
- 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.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js +12 -33
- package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.d.ts +19 -8
- package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.js +19 -8
- package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts +145 -0
- package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts.map +1 -0
- package/dist/esm/organizations/application-owner-organization.shared.schemas.js +146 -0
- package/dist/esm/organizations/application-owner-organization.shared.schemas.js.map +1 -0
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts +2 -0
- 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 +26 -3
- 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 +1 -1
- package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js +18 -14
- package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-members.shared.schemas.d.ts +1 -1
- package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-members.shared.schemas.js +9 -1
- package/dist/esm/organizations/organization-members.shared.schemas.js.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.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 +2 -1
- package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.schemas.js +3 -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 +3 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.js +4 -2
- 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 +29 -2
- package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.shared.js +27 -0
- package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
- package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts +2 -0
- package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js +3 -0
- package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-units.shared.schemas.d.ts +17 -5
- package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-units.shared.schemas.js +65 -5
- package/dist/esm/organizations/organization-units.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts +51 -7
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +151 -7
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organizations.shared.schemas.d.ts +18 -83
- package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.schemas.js +37 -19
- package/dist/esm/organizations/organizations.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
- package/dist/esm/provider-registration-runtime.exports.d.ts +1 -0
- package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
- package/dist/esm/provider-registration-runtime.exports.js +1 -0
- package/dist/esm/provider-registration-runtime.exports.js.map +1 -1
- package/dist/esm/public-runtime/index.d.ts +39 -10
- package/dist/esm/public-runtime/index.d.ts.map +1 -1
- package/dist/esm/public-runtime/index.js +39 -10
- package/dist/esm/public-runtime/index.js.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts +7 -8
- package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.js +30 -6
- package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.d.ts +388 -2
- package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.js +315 -11
- package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
- package/dist/esm/queue/jobs.shared.utils.d.ts +6 -4
- package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.utils.js +5 -4
- package/dist/esm/queue/jobs.shared.utils.js.map +1 -1
- package/dist/esm/queue/queues.shared.schemas.d.ts +20 -8
- package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/queues.shared.schemas.js +23 -18
- package/dist/esm/queue/queues.shared.schemas.js.map +1 -1
- package/dist/esm/queue/queues.shared.utils.d.ts +4 -2
- package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
- package/dist/esm/queue/queues.shared.utils.js +4 -2
- package/dist/esm/queue/queues.shared.utils.js.map +1 -1
- package/dist/esm/rag/rag-retrieval-health.shared.d.ts +27 -0
- package/dist/esm/rag/rag-retrieval-health.shared.d.ts.map +1 -0
- package/dist/esm/rag/rag-retrieval-health.shared.js +29 -0
- package/dist/esm/rag/rag-retrieval-health.shared.js.map +1 -0
- package/dist/esm/requests/header-keys.shared.d.ts +6 -0
- package/dist/esm/requests/header-keys.shared.d.ts.map +1 -1
- package/dist/esm/requests/header-keys.shared.js +7 -0
- package/dist/esm/requests/header-keys.shared.js.map +1 -1
- package/dist/esm/requests/idempotency-key.shared.d.ts +76 -0
- package/dist/esm/requests/idempotency-key.shared.d.ts.map +1 -0
- package/dist/esm/requests/idempotency-key.shared.js +112 -0
- package/dist/esm/requests/idempotency-key.shared.js.map +1 -0
- package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-documentation.js +218 -17
- package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts +87 -0
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.js +102 -0
- package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.d.ts +200 -24
- package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.js +219 -5
- package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
- package/dist/esm/resources/child-operations.shared.schemas.d.ts +56 -5
- package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/child-operations.shared.schemas.js +97 -5
- package/dist/esm/resources/child-operations.shared.schemas.js.map +1 -1
- package/dist/esm/resources/context-policy.shared.schemas.d.ts +20 -0
- package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/context-policy.shared.schemas.js +3 -0
- package/dist/esm/resources/context-policy.shared.schemas.js.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.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.js +498 -29
- package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.d.ts +623 -45
- package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.js +315 -22
- 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 +377 -69
- 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.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 +19 -0
- package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.js +28 -0
- package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.d.ts +256 -10
- package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.js +209 -9
- package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources.shared.utils.d.ts +3 -2
- package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.utils.js +38 -6
- 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 +44 -12
- package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/composition-cascade-deletability.validation.js +46 -23
- package/dist/esm/resources/utils/composition-cascade-deletability.validation.js.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/dependent-lifecycle-classification.validation.d.ts +61 -0
- package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts.map +1 -0
- package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js +79 -0
- package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js.map +1 -0
- 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.map +1 -1
- package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -1
- package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts +60 -0
- package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts.map +1 -0
- package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js +80 -0
- package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js.map +1 -0
- package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts +21 -0
- package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts.map +1 -0
- package/dist/esm/resources/utils/populated-file-fields.shared.utils.js +159 -0
- package/dist/esm/resources/utils/populated-file-fields.shared.utils.js.map +1 -0
- 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-naming.utils.d.ts +15 -0
- package/dist/esm/resources/utils/resources-config-naming.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-naming.utils.js +56 -11
- package/dist/esm/resources/utils/resources-config-naming.utils.js.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts +51 -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.dtos-builder.utils.js +210 -51
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.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 +34 -0
- package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js +45 -1
- package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js.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.map +1 -1
- 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 +29 -0
- package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/shared-persistence-collection.utils.js +30 -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/resources/utils/templatable-file-fields.shared.utils.js +49 -11
- package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +4 -1
- 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.map +1 -1
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +4 -1
- 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 +128 -16
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +160 -6
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.d.ts +324 -9
- package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.js +411 -8
- package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.utils.d.ts +87 -4
- package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.utils.js +95 -6
- package/dist/esm/security/authentications/authentication.shared.utils.js.map +1 -1
- package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts +23 -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 +23 -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 +7 -1
- package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js +7 -1
- package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts +74 -0
- package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts.map +1 -0
- package/dist/esm/security/authentications/password-blocklist.shared.utils.js +122 -0
- package/dist/esm/security/authentications/password-blocklist.shared.utils.js.map +1 -0
- 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 +88 -2
- package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/registration.shared.dto.schemas.js +149 -2
- 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 +57 -11
- package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js +44 -11
- package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js.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.resources-config.schemas.js +20 -7
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts +16 -2
- 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 +32 -2
- 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.resources-config.schemas.js +7 -1
- package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js.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.resources-config.schemas.js +4 -1
- package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js.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-outbox.shared.resources-config.schemas.d.ts +27 -0
- package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js +109 -0
- package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts +66 -0
- package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js +107 -0
- package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js.map +1 -0
- 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 +19 -0
- 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.resources-config.schemas.js +50 -13
- package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts +18 -6
- package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js +133 -4
- package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts +26 -0
- 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 +46 -17
- 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 +0 -40
- 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 +100 -26
- 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 +9 -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.resources-config.schemas.js +9 -1
- package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +6 -2
- 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 +76 -4
- 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 +5 -4
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js +5 -4
- 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 +4 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js +8 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts +44 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js +52 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.defaults.js +6 -0
- package/dist/esm/security/authorizations/roles.shared.defaults.js.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.d.ts +14 -0
- package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.js +19 -0
- package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.utils.js +2 -0
- package/dist/esm/security/authorizations/roles.shared.utils.js.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +4 -1
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts +5 -2
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js +13 -42
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +201 -14
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +237 -49
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts +6 -3
- 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 +74 -4
- 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 +5 -2
- 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 +105 -3
- 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.map +1 -1
- 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.map +1 -1
- 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/security/outbound-target-control.shared.schemas.d.ts +67 -0
- package/dist/esm/security/outbound-target-control.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/outbound-target-control.shared.schemas.js +69 -0
- package/dist/esm/security/outbound-target-control.shared.schemas.js.map +1 -0
- package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts +159 -0
- package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts.map +1 -0
- package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js +164 -0
- package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js.map +1 -0
- package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts +209 -0
- package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts.map +1 -0
- package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js +150 -0
- package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js.map +1 -0
- package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts +79 -0
- package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts.map +1 -0
- package/dist/esm/systems-of-record/system-of-record-env.shared.js +116 -0
- package/dist/esm/systems-of-record/system-of-record-env.shared.js.map +1 -0
- package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts +145 -0
- package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts.map +1 -0
- package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js +146 -0
- package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js.map +1 -0
- package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts +478 -0
- package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts.map +1 -0
- package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js +619 -0
- package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js.map +1 -0
- package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts +31 -0
- package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js +232 -0
- package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts +127 -0
- package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts.map +1 -0
- package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js +204 -0
- package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js.map +1 -0
- package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
- package/dist/esm/testing/resource-config-builders.js +10 -4
- package/dist/esm/testing/resource-config-builders.js.map +1 -1
- package/dist/esm/testing.d.ts.map +1 -1
- package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts +2 -1
- package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js +2 -1
- package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js.map +1 -1
- package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts +139 -24
- package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js +255 -0
- package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/anonymous-users.shared.schema.d.ts +5 -3
- package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
- package/dist/esm/users/anonymous-users.shared.schema.js +18 -1
- package/dist/esm/users/anonymous-users.shared.schema.js.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts +2 -1
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js +23 -0
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.schemas.d.ts +2 -1
- package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-consent-decision.shared.utils.d.ts +127 -0
- package/dist/esm/users/user-consent-decision.shared.utils.d.ts.map +1 -0
- package/dist/esm/users/user-consent-decision.shared.utils.js +189 -0
- package/dist/esm/users/user-consent-decision.shared.utils.js.map +1 -0
- 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 +1 -0
- 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 +1 -0
- package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-identity-links.shared.schemas.js +30 -0
- package/dist/esm/users/user-identity-links.shared.schemas.js.map +1 -1
- package/dist/esm/users/user-preferences-reset.shared.utils.d.ts +6 -6
- package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
- package/dist/esm/users/user-preferences-reset.shared.utils.js +6 -6
- package/dist/esm/users/user-preferences-reset.shared.utils.js.map +1 -1
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +74 -29
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.js +99 -0
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.js +25 -9
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.js.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-preferences.shared.resources-config.schemas.js +12 -1
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js.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 +1 -0
- 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 +2 -2
- 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 +1 -0
- package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.resources-config.schemas.js +2 -2
- package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/users.shared.schemas.d.ts +11 -9
- package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.schemas.js +68 -9
- package/dist/esm/users/users.shared.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +14 -35
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.d.ts +0 -19
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.d.ts.map +0 -1
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.js +0 -35
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.js.map +0 -1
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts +0 -213
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts.map +0 -1
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.js +0 -287
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.js.map +0 -1
- package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts +0 -236
- package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts.map +0 -1
- package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.js +0 -212
- package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.js.map +0 -1
- package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +0 -1
- package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.js.map +0 -1
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts +0 -17
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts.map +0 -1
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js +0 -31
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js.map +0 -1
- package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +0 -1
- package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +0 -1
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +0 -1
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +0 -1
- package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts +0 -28
- package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts.map +0 -1
- package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.js +0 -28
- package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.js.map +0 -1
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +0 -1
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +0 -1
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts +0 -100
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts.map +0 -1
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js +0 -232
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js.map +0 -1
- package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.d.ts +0 -29
- package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.d.ts.map +0 -1
- package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.js +0 -58
- package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.js.map +0 -1
- package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +0 -1
- package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +0 -1
- package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts +0 -81
- package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts.map +0 -1
- package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.js +0 -82
- package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.js.map +0 -1
- package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.d.ts +0 -2
- package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.d.ts.map +0 -1
- package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.js +0 -1
- package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.js.map +0 -1
- /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/actions.meta-workflows.shared.schemas.d.ts +0 -0
- /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/actions.meta-workflows.shared.schemas.js +0 -0
- /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/catalog.meta-workflows.shared.schemas.d.ts +0 -0
- /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/catalog.meta-workflows.shared.schemas.js +0 -0
- /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/context-selection.meta-workflows.shared.schemas.d.ts +0 -0
- /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/context-selection.meta-workflows.shared.schemas.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.shared.schemas.js","sourceRoot":"","sources":["../../../src/resources/resources.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,qBAAqB,EACrB,+BAA+B,EAE/B,kBAAkB,GACnB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,2BAA2B,EAC3B,uCAAuC,GAExC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AAKxF;;;;GAIG;AACH,MAAM,CAAN,IAAY,0BAKX;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B,CAAC,gBAAgB,EAAE,QAAQ,EAAE,KAAK,IAAI,EAAE;gBACvF,qEAAqE;gBACrE,kEAAkE;gBAClE,qEAAqE;gBACrE,wDAAwD;gBACxD,IAAI,CAAC;oBACH,MAAM,WAAW,GACf,MAAM,iBAAiB,CAAC,0BAA0B,CAAC,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;oBAChG,OAAO,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;gBACpC,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CACnB,4CAA4C,UAAU,CAAC,eAAe,IAAI,SAAS,IAAI,SAAS,kBAAkB,EAClH,KAAK,CACN,CAAC;oBACF,OAAO,SAAS,CAAC;gBACnB,CAAC;YACH,CAAC,CAAC,CAAC;YAEH,wEAAwE;YACxE,0EAA0E;YAC1E,MAAM,QAAQ,GAAG,oBAAoB,CAAC,UAAU,EAAE,EAAE,GAAG,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;YACnF,OAAO,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC;QAC5D,CAAC;KACF,CAAC;SACD,cAAc,EAAE;SAChB,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AACjC,CAAC","sourcesContent":["/**\n * Operations Shared Schemas\n *\n * Reusable operation schemas for bulk actions and common operations\n */\n\nimport { z } from 'zod';\nimport type { DecoratedPrimitiveZodType } from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation,\n OPERATIONS_WITHOUT_REQUEST_BODY,\n ResourceType,\n ResourceTypeSchema,\n} from './resources.shared.core.definitions';\nimport { RelationshipContextPolicySchema } from './context-policy.shared.schemas';\nimport {\n ChildLifecycleMode,\n ChildLifecycleStrategy,\n ChildOperationsConfigSchema,\n ResourceRelationshipDiscriminatorSchema,\n type ChildOperationsConfig_Parsed,\n} from './child-operations.shared.schemas';\nimport { RelationshipDisplayConfigSchema } from './relationship-display.shared.schemas';\nimport { SchemaInfer } from './utils/schema-type-inference.utils';\n\nexport type { ResourceType } from './resources.shared.core.definitions';\n\n/**\n * @wildo_source:part:start saas.models.resource-operation-display-risk facet:layer:shared facet:family:resource-config\n *\n * Operation bar risk level and UI density (summary vs detail).\n */\nexport enum ResourceOperationRiskLevel {\n LOW = 'low',\n MEDIUM = 'medium',\n HIGH = 'high',\n CRITICAL = 'critical'\n}\n\n/**\n * The **frontend surface** of a resource operation — whether (and how) the\n * operation is presented in the UI. This is a per-app, per-operation DISPLAY\n * axis, orthogonal to authorization (roles remain the only security authority).\n *\n * Three mutually-exclusive surfaces:\n *\n * - `ADDRESSABLE` — the operation has a **URL-routable** view (a deep-linkable\n * page that lives in the navigation area; row-click resolves a route). Has an\n * action button.\n * - `EMBEDDED` — the operation has a view that is **not URL-addressable**: it has\n * no route of its own and is rendered **within a host**, however that host\n * surfaces it — as an overlay/drill-in when invoked standalone, or inline when\n * embedded in a composite view or a nested relationship view. Has an action\n * button. (This is what `notAddressable()` produces.) Named for the host\n * relationship, NOT one presentation: do not assume it always renders as an overlay.\n * - `API_ONLY` — the operation is **headless**: callable from frontend code as a\n * typed API, but has NO rendered interface at all (no page, no embedded view, no\n * action button). For operations driven by the system / a workflow / signup rather\n * than a user form (e.g. auto-created profiles, engine-authored state).\n *\n * `ADDRESSABLE` vs `EMBEDDED` is the URL-routability axis (both have a real view);\n * `API_ONLY` is the has-no-interface axis. The button-visibility axis\n * (`ActionVisibility`) is a further orthogonal refinement that only applies to the\n * two view surfaces.\n *\n * Authored on the frontend preset per operation via `addressable()` /\n * `notAddressable()` / `apiOnly()`; an operation may also declare a\n * `defaultFrontendPosture` so the framework defaults its surface when no app\n * preset surfaces it.\n *\n * Imported from `@wildo-ai/saas-models`.\n */\nexport enum ResourceOperationFrontendSurface {\n /** URL-routable view (deep-linkable page in the navigation area). */\n ADDRESSABLE = 'addressable',\n /** Non-addressable view rendered within a host — overlay/drill-in when standalone, inline when embedded in a composite or nested relationship view. */\n EMBEDDED = 'embedded',\n /** Headless — callable from code as an API, with no rendered interface at all. */\n API_ONLY = 'api_only',\n}\n\n/**\n * Display mode for resource operation action bars — controls operation bar density.\n * SUMMARY = compact row actions (icon-only, in list/table rows).\n *\n * Note: \"summary\" here is about *UI density*, not API data shape (see DataMode.SUMMARY)\n * or FK rendering (see ForeignKeyDisplayMode.SUMMARY).\n */\nexport enum ResourceOperationDisplayMode {\n /** In a list/table row — compact, icon-only, includes \"View Details\" */\n SUMMARY = 'summary',\n /** In a full read/detail view — can show inline labels */\n DETAIL = 'detail',\n}\n/** @wildo_source:part:end saas.models.resource-operation-display-risk */\n\n/**\n * @wildo_source:part:start saas.models.resource-primary-scope facet:layer:shared facet:family:resource-config\n *\n * Primary execution scope (org, user self, app, anonymous) + anonymous transposition policy.\n */\nexport enum ResourcePrimaryScope {\n USER_SELF = 'user_self',\n ORGANIZATIONS = 'organizations',\n APPLICATION = 'applications',\n ANONYMOUS = 'anonymous',\n}\n\n/**\n * W7.3a: Controls how anonymous resources are handled during transposition\n * (when an anonymous user registers/logs in as an authenticated user).\n *\n * A `MERGE` member — \"delegate to a custom service hook\" — was declared here until 2026-09-08 and\n * REMOVED because it never had one. `transposeOwnership` logged a warning and fell through to\n * `ADD`, so a resource selecting it got plain reassignment and no application merge logic ever ran.\n * It was selectable, validated, and silent: the shape this framework treats as a defect rather than\n * a gap. Nothing selected it, so removing it needed no migration.\n *\n * Identity merge is not foreclosed, but it is not a member of this enum: it needs a per-resource\n * hook that resolves conflicts an application defines, and a cross-resource transaction the\n * framework does not have (see the note in `users.shared.resources-config.schemas.ts`). Re-add a\n * member here when that primitive exists, not before.\n */\nexport enum ResourceTranspositionPolicy {\n /** Simply reassign ownership (anonymousUserId → userId). No conflict check. Default. */\n ADD = 'ADD',\n /** Delete the authenticated user's existing records of this type, then reassign anonymous ones. */\n REPLACE = 'REPLACE',\n /** Skip transposition entirely — anonymous records are not carried over. */\n DISCARD = 'DISCARD',\n}\n/** @wildo_source:part:end saas.models.resource-primary-scope */\n\n// ============================================================================\n// Primary Scope Field Mappings (Single Source of Truth)\n// ============================================================================\n\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from './resources.shared.core.definitions';\n\n/**\n * Map from ResourcePrimaryScope to the CoreResourceType it represents.\n * This is the foundation - other mappings derive from this.\n */\nexport const PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE: Record<ResourcePrimaryScope, CoreResourceType> = {\n [ResourcePrimaryScope.ORGANIZATIONS]: CoreResourceType.ORGANIZATIONS,\n [ResourcePrimaryScope.USER_SELF]: CoreResourceType.USERS,\n [ResourcePrimaryScope.APPLICATION]: CoreResourceType.APPLICATION,\n [ResourcePrimaryScope.ANONYMOUS]: CoreResourceType.ANONYMOUS_USERS,\n};\n\n/**\n * Map from ResourcePrimaryScope to its field identifier.\n * Uses coreResourceShared_FieldIdentifier as the source of truth for field names.\n */\nexport const PRIMARY_SCOPE_TO_FIELD_IDENTIFIER: Record<ResourcePrimaryScope, string> = {\n [ResourcePrimaryScope.ORGANIZATIONS]: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATIONS],\n [ResourcePrimaryScope.USER_SELF]: coreResourceShared_FieldIdentifier[CoreResourceType.USERS],\n [ResourcePrimaryScope.APPLICATION]: coreResourceShared_FieldIdentifier[CoreResourceType.APPLICATION],\n [ResourcePrimaryScope.ANONYMOUS]: coreResourceShared_FieldIdentifier[CoreResourceType.ANONYMOUS_USERS],\n};\n\n/**\n * Primary scope field identifiers - auto-populated from execution context.\n * These fields should be excluded from CREATE/UPDATE DTOs because they are\n * automatically injected by the backend based on the authenticated user's context.\n *\n * Derived from PRIMARY_SCOPE_TO_FIELD_IDENTIFIER values.\n */\nexport const PRIMARY_SCOPE_FIELD_IDENTIFIERS = Object.values(PRIMARY_SCOPE_TO_FIELD_IDENTIFIER) as readonly string[];\nexport type PrimaryScopeFieldIdentifier = (typeof PRIMARY_SCOPE_FIELD_IDENTIFIERS)[number];\n\n/**\n * Field identifiers the framework AUTO-POPULATES on a write and therefore omits\n * from every client-shaped CREATE/UPDATE request DTO — the primary-scope FKs\n * (`organizationId` / `applicationId` / `userId` / `anonymousUserId`, injected\n * from the execution context) PLUS the audit FK `createdByUserId` (stamped by\n * the repository from the initiator). A client is never allowed to author these;\n * the auto-derivation strips them by NAME (see\n * `resources-config-operations.dtos-builder.utils.ts` — `applyCreate/UpdateOmissionsToSchema`).\n *\n * Single source of truth: the DTO builder consumes this for its omit list, and\n * `deriveTrustedSystemWritePreservedFields` consumes it to know which\n * name-stripped fields a TRUSTED in-process system write (via\n * `SystemAccessBackendService.createAsSystem` / `updateAsSystem`) must re-attach.\n * Keeping both consumers on one const prevents the two lists from drifting.\n *\n * NOTE: intentionally EXCLUDES `_id` / `createdAt` / `updatedAt` / `deletedAt` —\n * those are timestamp/PK fields handled by `createOrUpdateMandatoryDiscardFields`\n * (force-removed before validation), never re-attached by a trusted write.\n */\nexport const CONTEXT_AUTO_POPULATED_FIELD_IDENTIFIERS: readonly string[] = [\n 'createdByUserId',\n ...PRIMARY_SCOPE_FIELD_IDENTIFIERS,\n];\n\n/**\n * Map from field identifier to ResourcePrimaryScope.\n * Built by inverting PRIMARY_SCOPE_TO_FIELD_IDENTIFIER.\n */\nexport const FIELD_IDENTIFIER_TO_PRIMARY_SCOPE: Record<string, ResourcePrimaryScope> = Object.fromEntries(\n Object.entries(PRIMARY_SCOPE_TO_FIELD_IDENTIFIER).map(([scope, field]) => [field, scope as ResourcePrimaryScope])\n);\n\n/**\n * Map from ResourcePrimaryScope to the CoreResourceType(s) it represents.\n * Returns as array for compatibility (though each scope maps to a single type).\n */\nexport const PRIMARY_SCOPE_TO_RESOURCE_TYPES: Record<ResourcePrimaryScope, CoreResourceType[]> = {\n [ResourcePrimaryScope.ORGANIZATIONS]: [PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE[ResourcePrimaryScope.ORGANIZATIONS]],\n [ResourcePrimaryScope.USER_SELF]: [PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE[ResourcePrimaryScope.USER_SELF]],\n [ResourcePrimaryScope.APPLICATION]: [PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE[ResourcePrimaryScope.APPLICATION]],\n [ResourcePrimaryScope.ANONYMOUS]: [PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE[ResourcePrimaryScope.ANONYMOUS]],\n};\n\n/**\n * Get the field identifier for a primary scope.\n */\nexport function getPrimaryScopeFieldIdentifier(primaryScope: ResourcePrimaryScope): string {\n return PRIMARY_SCOPE_TO_FIELD_IDENTIFIER[primaryScope];\n}\n\n// ============================================================================\n// Billing Scope → Resource Type Mapping\n// ============================================================================\n\n/**\n * The 2 scopes that have billing polymorphic variants.\n * APPLICATION scope is intentionally absent — it has no billing variants;\n * scope-agnostic billing resources (Products, Prices, etc.) are not per-scope.\n */\nexport const BILLING_SCOPES: readonly ResourcePrimaryScope[] = [\n ResourcePrimaryScope.ORGANIZATIONS,\n ResourcePrimaryScope.USER_SELF,\n] as const;\n\n/**\n * Per-scope billing resource types.\n * Maps each billing scope to the set of polymorphic resource type variants\n * that belong to it. Used to selectively exclude disabled scopes while\n * keeping enabled scopes and scope-agnostic resources (Products, Prices, etc.).\n */\nexport const BILLING_SCOPE_RESOURCE_TYPES: Readonly<Partial<Record<ResourcePrimaryScope, ReadonlySet<CoreResourceType>>>> = {\n [ResourcePrimaryScope.ORGANIZATIONS]: new Set([\n CoreResourceType.ORGANIZATION_BILLING_ACCOUNTS,\n CoreResourceType.ORGANIZATION_SUBSCRIPTIONS,\n CoreResourceType.ORGANIZATION_INVOICE_REFS,\n CoreResourceType.ORGANIZATION_USAGE_RECORDS,\n CoreResourceType.ORGANIZATION_CREDIT_POOLS,\n ]),\n [ResourcePrimaryScope.USER_SELF]: new Set([\n CoreResourceType.USER_BILLING_ACCOUNTS,\n CoreResourceType.USER_SUBSCRIPTIONS,\n CoreResourceType.USER_INVOICE_REFS,\n CoreResourceType.USER_USAGE_RECORDS,\n CoreResourceType.USER_CREDIT_POOLS,\n ]),\n};\n\n/**\n * Get the primary scope for a field identifier.\n * Returns undefined if the field is not a primary scope field.\n */\nexport function getPrimaryScopeFromFieldIdentifier(fieldIdentifier: string): ResourcePrimaryScope | undefined {\n return FIELD_IDENTIFIER_TO_PRIMARY_SCOPE[fieldIdentifier];\n}\n\n/**\n * Check if a field identifier is a primary scope field.\n */\nexport function isPrimaryScopeFieldIdentifier(fieldIdentifier: string): fieldIdentifier is PrimaryScopeFieldIdentifier {\n return PRIMARY_SCOPE_FIELD_IDENTIFIERS.includes(fieldIdentifier as PrimaryScopeFieldIdentifier);\n}\n\n/**\n * @wildo_source:part:start saas.models.resource-relationship-cardinality facet:layer:shared facet:family:resource-config\n *\n * Cardinality literals plus helpers (`isOneToOneCardinality`, `isArrayCardinality`).\n */\nexport enum ResourceRelationshipCardinality {\n ONE = 'one',\n ZERO_OR_ONE = 'zero_or_one',\n ONE_OR_MANY = 'one_or_many',\n MANY = 'many',\n}\n\n/**\n * Check if a cardinality represents a 1:1 relationship (single object).\n * Both `ONE` (mandatory) and `ZERO_OR_ONE` (optional) are single-object cardinalities.\n *\n * Use this utility instead of checking `=== ONE` directly, to avoid\n * the common bug of missing `ZERO_OR_ONE` (optional 1:1) handling.\n *\n * Determines:\n * - DTO shape: single optional object (not array)\n * - Nested field naming: singular (e.g., \"profile\" not \"profiles\")\n * - Fetch strategy: READ (not LIST)\n * - URL path: singular entity path\n */\nexport function isOneToOneCardinality(cardinality: ResourceRelationshipCardinality): boolean {\n return cardinality === ResourceRelationshipCardinality.ONE ||\n cardinality === ResourceRelationshipCardinality.ZERO_OR_ONE;\n}\n\n/**\n * Check if a cardinality represents a 1:N relationship (array/collection).\n * Both `MANY` (zero or more) and `ONE_OR_MANY` (at least one) are array cardinalities.\n *\n * Use this utility instead of checking `=== MANY` directly, to avoid\n * the common bug of missing `ONE_OR_MANY` (mandatory at-least-one) handling.\n *\n * Determines:\n * - DTO shape: array of objects\n * - Nested field naming: plural (e.g., \"tasks\" not \"task\")\n * - Fetch strategy: LIST\n * - URL path: collection path\n */\nexport function isArrayCardinality(cardinality: ResourceRelationshipCardinality): boolean {\n return cardinality === ResourceRelationshipCardinality.MANY ||\n cardinality === ResourceRelationshipCardinality.ONE_OR_MANY;\n}\n/** @wildo_source:part:end saas.models.resource-relationship-cardinality */\n\n/**\n * @wildo_source:part:start saas.models.resource-operation-variant-runtime facet:layer:shared facet:family:resource-config\n *\n * How an operation variant is invoked and executed (API, cron, repository-only, …).\n */\nexport enum ResourceOperationVariantType {\n API_CALL = \"api_call\",\n API_CALL_WITH_CALLBACK = \"api_call_with_callback\",\n CRON_JOB = \"cron_job\",\n BATCH_JOB = \"batch_job\",\n INTERNAL_CALL = \"internal_call\",\n REPOSITORY_ONLY = \"repository_only\",\n}\n\nexport enum ResourceOperation_ServiceRuntimeMode {\n INLINE = \"inline\",\n INLINE_NOT_AWAITABLE = \"inline_not_awaitable\",\n BACKGROUND_JOB = \"background_job\",\n QUEUED = \"queued\",\n QUEUED_NOT_AWAITABLE = \"queued_not_awaitable\",\n NONE = \"none\",\n}\n\nexport enum ResourceOperation_CustomServiceImplementationMode {\n OVERRIDE_ALL = \"override_all\",\n PREFIX_CORE_OPERARTIONS = \"prefix_core_operations\",\n POSTFIX_CORE_OPERARTIONS = \"postfix_core_operations\",\n REPLACE_CORE_OPERARTIONS = \"between_core_operations\",\n AFTER_USER_NOTIFICATIONS = \"after_user_notifications\",\n AT_THE_END = \"at_the_end\",\n}\n\nexport enum ResourceParentResourceRequirement {\n MANDATORY = \"mandatory\",\n OPTIONAL = \"optional\",\n}\n\nexport enum ResourceOperation_InputPolicy {\n DEFAULT = \"default\",\n CUSTOM = \"custom\",\n}\n\nexport enum ResourceOperation_OutputPolicy {\n DEFAULT = \"default\",\n CUSTOM = \"custom\",\n SUMMARY = \"summary\",\n CONTEXT = \"context\",\n}\n/** @wildo_source:part:end saas.models.resource-operation-variant-runtime */\n\n\n\n/**\n * @wildo_source:part:start saas.models.resource-relationship-access-scope facet:layer:shared facet:family:resource-config\n *\n * Route/service access strategy for a relationship (nested vs standalone URLs).\n */\n/*\n accessScopeStrategy defines how a related resource should be accessed in service, controller, and route generation:\nREQUIRES_CONTEXT: the resource must be accessed within the context of its parent (e.g. nested route, scoped service)\nOPTIONAL_CONTEXT: the resource can be accessed either within its parent context or independently.\nSTANDALONE: the resource must be accessed independently, even if a parent relationship exists.\n */\nexport enum ResourceRelationshipAccessScopeStrategy {\n REQUIRES_CONTEXT = \"requires_context\",\n OPTIONAL_CONTEXT = \"optional_context\",\n STANDALONE = \"standalone\",\n}\n/** @wildo_source:part:end saas.models.resource-relationship-access-scope */\n\n/**\n * @wildo_source:part:start saas.models.relationship-nature-and-models facet:layer:shared facet:family:resource-config\n *\n * High-level semantic kind of relationship.\n *\n * This is the primary shared meaning. Resolver/runtime layers may later derive\n * engine-facing handling from it, but the declaration should start here rather\n * than from low-level DTO or lifecycle toggles.\n *\n * Developer-facing interpretation:\n *\n * - `COMPOSITION`\n * The parent owns an aggregate boundary around the child. The relationship is\n * about parent-managed nested resources. Child lifecycle is typically\n * dependent on the parent, and nested create/update/delete is the natural UX.\n *\n * - `REFERENCE`\n * The current resource points to another independent resource. The default UX\n * is \"select existing / clear / navigate\". A future \"quick create\" shortcut\n * may exist, but it still means \"create independent resource, then set the\n * reference\" rather than aggregate-managed nested creation.\n *\n * - `ASSOCIATION`\n * The current resource is linked to peer resources through membership/link\n * semantics. The default UX is \"link / unlink / replace peer set\". A future\n * \"quick create\" shortcut may exist, but it still means \"create independent\n * peer, then link it\" rather than treating the peer as an owned child.\n *\n * Important rule:\n * - \"quick create\" is a frontend workflow capability layered on top of a\n * relationship, not a fourth relationship nature.\n */\nexport enum RelationshipNature {\n COMPOSITION = 'composition',\n REFERENCE = 'reference',\n ASSOCIATION = 'association',\n}\n\n/**\n * Parent-surface DTO model implied by relationship semantics.\n *\n * This tells the framework what kind of shape the parent-facing interaction\n * should expose:\n * - `NESTED_RESOURCE` → full nested child payloads\n * - `REFERENCE_HANDLE` → handle/pointer semantics to an independent resource\n * - `ASSOCIATION_HANDLE` → peer membership/link semantics\n */\nexport enum RelationshipDtoModel {\n NESTED_RESOURCE = 'nested_resource',\n REFERENCE_HANDLE = 'reference_handle',\n ASSOCIATION_HANDLE = 'association_handle',\n}\n\n/**\n * Parent-driven mutation semantics for the relationship.\n *\n * Interpretation:\n * - `AGGREGATE_MANAGED` → parent can orchestrate nested child CRUD\n * - `REFERENCE_MANAGED` → parent mutates only the reference handle/pointer\n * - `ASSOCIATION_MANAGED` → parent mutates membership/link state to peers\n * - `NONE` → no parent-driven relationship-object mutation contract\n */\nexport enum RelationshipMutationModel {\n AGGREGATE_MANAGED = 'aggregate_managed',\n REFERENCE_MANAGED = 'reference_managed',\n ASSOCIATION_MANAGED = 'association_managed',\n NONE = 'none',\n}\n\n/**\n * Lifecycle dependency semantics between the parent and the related element.\n *\n * This is about dependency, not frontend chrome:\n * - `DEPENDENT` → child lifecycle follows parent ownership\n * - `INDEPENDENT` → related resource lives independently\n * - `LINK_ONLY` → only the relationship membership/link is owned here\n */\nexport enum RelationshipLifecycleModel {\n DEPENDENT = 'dependent',\n INDEPENDENT = 'independent',\n LINK_ONLY = 'link_only',\n}\n\n/**\n * Shared read intent for the relationship.\n *\n * Important: this is NOT the same semantic plane as `DataMode`,\n * `ContextPolicy_ObjectMode`, or `childOperations.nested.onRead`.\n * It is the high-level engine-facing read intent that later resolver steps may\n * project into those operational surfaces where the meaning is truly identical.\n *\n * Interpretation:\n * - `EMBEDDED` → read as an owned nested child/children\n * - `REFERENCE_ONLY` → read as a pointer/reference surface\n * - `ASSOCIATION_EMBEDDED` → read as associated peers, while preserving peer\n * semantics rather than collapsing them into composition\n */\nexport enum RelationshipReadModel {\n EMBEDDED = 'embedded',\n REFERENCE_ONLY = 'reference_only',\n ASSOCIATION_EMBEDDED = 'association_embedded',\n}\n/** @wildo_source:part:end saas.models.relationship-nature-and-models */\n\n/**\n * @wildo_source:part:start saas.models.relationship-handling-settings facet:layer:shared facet:family:resource-config\n *\n * Explicit semantic read contract for a relationship.\n *\n * This answers the semantic question \"how should this relationship read?\" and\n * intentionally stays separate from the low-level nested projection in\n * `childOperations.nested.onRead`, which still carries payload-shaping details\n * like `dataMode`, list behavior, limits, and sort order.\n */\nexport const RelationshipHandlingReadSettingsSchema = z.object({\n model: z.enum(RelationshipReadModel),\n});\nexport type RelationshipHandlingReadSettings = z.infer<typeof RelationshipHandlingReadSettingsSchema>;\n\n/**\n * Narrow mutation refinements under the semantic handling contract.\n *\n * These are still low-level operational hints, not a replacement for\n * `nature` or the top-level handling models.\n */\nexport const RelationshipHandlingMutationSettingsSchema = z.object({\n allowParentCreate: z.boolean().optional(),\n allowParentUpdate: z.boolean().optional(),\n allowParentDelete: z.boolean().optional(),\n maxDepth: z.number().int().min(0).optional(),\n});\nexport type RelationshipHandlingMutationSettings = z.infer<typeof RelationshipHandlingMutationSettingsSchema>;\n\n/**\n * Narrow lifecycle refinements under the semantic handling contract.\n */\nexport const RelationshipHandlingLifecycleOnParentDeleteSettingsSchema = z.object({\n enabled: z.boolean().optional(),\n /**\n * Execution TIMING of the cascade: `IMMEDIATE` inside the parent's own transaction, or `LAZY`\n * deferred onto the background queue.\n *\n * ⚠️ **The two axes are NOT fully orthogonal — one combination refuses.** `LAZY` is implemented for\n * the `DELETE` strategy only. Declaring `LAZY` beside `IMPERSONALIZE_AND_RETAIN` type-checks,\n * configures, boots, and THROWS when a parent is actually deleted, because an asynchronous\n * retain-and-scrub does not exist yet and the alternatives are both unacceptable (hard-deleting the\n * child loses data the strategy exists to keep; skipping the scrub leaves personal data behind).\n *\n * | | `IMMEDIATE` | `LAZY` |\n * |---|---|---|\n * | `DELETE` | teardown inside the parent's transaction | deferred to the queue |\n * | `IMPERSONALIZE_AND_RETAIN` | scrub + keep, direct children only | **refuses at cascade time** |\n *\n * What `LAZY` changes, and what it does not: the teardown is re-derived from the parent's CURRENT\n * configuration when the job runs and goes through the same path `IMMEDIATE` uses, so grandchild\n * recursion, file teardown and retrieval-chunk removal all still happen. It moves WHEN the teardown\n * happens, never whether it happens — and if the job cannot be enqueued the parent's delete fails\n * rather than silently orphaning the children.\n *\n * Omitted ⇒ `IMMEDIATE`.\n */\n mode: z.enum(ChildLifecycleMode).optional(),\n /**\n * What the cascade DOES to the child — hard-delete vs impersonalize-and-retain (scrub the personal\n * fields, keep the row for a legal/audit obligation). Carried on the derived semantic contract so a\n * consumer reading `handling.lifecycle.onParentDelete` can tell the two apart; omitting it here\n * would merge two semantically distinct teardowns, which is exactly what splitting this axis from\n * `mode` exists to prevent.\n */\n strategy: z.enum(ChildLifecycleStrategy).optional(),\n maxDepth: z.number().int().min(0).optional(),\n});\nexport type RelationshipHandlingLifecycleOnParentDeleteSettings = z.infer<typeof RelationshipHandlingLifecycleOnParentDeleteSettingsSchema>;\n\nexport const RelationshipHandlingLifecycleSettingsSchema = z.object({\n onParentDelete: RelationshipHandlingLifecycleOnParentDeleteSettingsSchema.optional(),\n});\nexport type RelationshipHandlingLifecycleSettings = z.infer<typeof RelationshipHandlingLifecycleSettingsSchema>;\n/** @wildo_source:part:end saas.models.relationship-handling-settings */\n\n/**\n * Explicit multi-target relationship actions.\n *\n * These actions are intentionally narrower than generic nested CRUD replay:\n * - `SET` / `CLEAR` target reference relationships from the current resource as child\n * - `CREATE` targets composition relationships from the current resource as parent\n * - `LINK` / `UNLINK` target peer associations while keeping junction-row\n * persistence an internal implementation detail\n * - `REPLACE` atomically expresses the desired peer set for association-backed\n * form controls without forcing the client to orchestrate unlink/link diffs\n */\nexport enum ResourceRelationshipBulkAction {\n SET = 'set',\n CLEAR = 'clear',\n CREATE = 'create',\n LINK = 'link',\n UNLINK = 'unlink',\n REPLACE = 'replace',\n}\n\nexport const ResourceRelationshipBulkOperationIdentifierPrefix = {\n [ResourceRelationshipBulkAction.SET]: 'bulk_set_',\n [ResourceRelationshipBulkAction.CLEAR]: 'bulk_clear_',\n [ResourceRelationshipBulkAction.CREATE]: 'bulk_create_',\n [ResourceRelationshipBulkAction.LINK]: 'bulk_link_',\n [ResourceRelationshipBulkAction.UNLINK]: 'bulk_unlink_',\n [ResourceRelationshipBulkAction.REPLACE]: 'bulk_replace_',\n} as const;\n\nexport const ResourceRelationshipBulkSetActionRequestSchema = z.object({\n relationshipField: z.string().min(1),\n action: z.literal(ResourceRelationshipBulkAction.SET),\n targetId: z.string().min(1),\n});\nexport type ResourceRelationshipBulkSetActionRequest = z.infer<typeof ResourceRelationshipBulkSetActionRequestSchema>;\n\nexport const ResourceRelationshipBulkClearActionRequestSchema = z.object({\n relationshipField: z.string().min(1),\n action: z.literal(ResourceRelationshipBulkAction.CLEAR),\n});\nexport type ResourceRelationshipBulkClearActionRequest = z.infer<typeof ResourceRelationshipBulkClearActionRequestSchema>;\n\nexport const ResourceRelationshipBulkCreateActionRequestSchema = z.object({\n relationshipField: z.string().min(1),\n action: z.literal(ResourceRelationshipBulkAction.CREATE),\n data: z.record(z.string(), z.any()).refine(\n (data) => Object.keys(data).length > 0,\n 'data must not be empty'\n ),\n});\nexport type ResourceRelationshipBulkCreateActionRequest = z.infer<typeof ResourceRelationshipBulkCreateActionRequestSchema>;\n\nexport const ResourceRelationshipBulkLinkActionRequestSchema = z.object({\n relationshipField: z.string().min(1),\n action: z.literal(ResourceRelationshipBulkAction.LINK),\n peerIds: z.array(z.string().min(1)).min(1),\n});\nexport type ResourceRelationshipBulkLinkActionRequest = z.infer<typeof ResourceRelationshipBulkLinkActionRequestSchema>;\n\nexport const ResourceRelationshipBulkUnlinkActionRequestSchema = z.object({\n relationshipField: z.string().min(1),\n action: z.literal(ResourceRelationshipBulkAction.UNLINK),\n peerIds: z.array(z.string().min(1)).min(1),\n});\nexport type ResourceRelationshipBulkUnlinkActionRequest = z.infer<typeof ResourceRelationshipBulkUnlinkActionRequestSchema>;\n\nexport const ResourceRelationshipBulkReplaceActionRequestSchema = z.object({\n relationshipField: z.string().min(1),\n action: z.literal(ResourceRelationshipBulkAction.REPLACE),\n peerIds: z.array(z.string().min(1)),\n});\nexport type ResourceRelationshipBulkReplaceActionRequest = z.infer<typeof ResourceRelationshipBulkReplaceActionRequestSchema>;\n\nexport const ResourceRelationshipBulkActionRequestSchema = z.discriminatedUnion('action', [\n ResourceRelationshipBulkSetActionRequestSchema,\n ResourceRelationshipBulkClearActionRequestSchema,\n ResourceRelationshipBulkCreateActionRequestSchema,\n ResourceRelationshipBulkLinkActionRequestSchema,\n ResourceRelationshipBulkUnlinkActionRequestSchema,\n ResourceRelationshipBulkReplaceActionRequestSchema,\n]);\nexport type ResourceRelationshipBulkActionRequest = z.infer<typeof ResourceRelationshipBulkActionRequestSchema>;\n\nconst ResourceRelationshipBulkFilterSelectorSchema = z.object({\n filter: z.record(z.string(), z.any()).refine(\n (filter) => Object.keys(filter).length > 0,\n 'filter must not be empty'\n ),\n _ids: z.undefined().optional(),\n});\n\nconst ResourceRelationshipBulkIdsSelectorSchema = z.object({\n _ids: z.array(z.string().min(1)).min(1),\n filter: z.undefined().optional(),\n});\n\n/**\n * Public request selector for explicit bulk relationship operations.\n *\n * Unlike the legacy bulk DTO base, this selector intentionally supports either:\n * - `_ids` for UI-driven selection over a finite checked list\n * - `filter` for backend/automation-driven targeting over a query\n *\n * The exposed operation surface stays one-selector / one-action / one-payload.\n */\nexport const ResourceRelationshipBulkOperationSelectorSchema = z.union([\n ResourceRelationshipBulkIdsSelectorSchema,\n ResourceRelationshipBulkFilterSelectorSchema,\n]);\nexport type ResourceRelationshipBulkOperationSelector = z.infer<typeof ResourceRelationshipBulkOperationSelectorSchema>;\n\nexport const ResourceRelationshipBulkSetOperationRequestSchema =\n ResourceRelationshipBulkOperationSelectorSchema.and(\n z.object({\n targetId: z.string().min(1),\n })\n );\nexport type ResourceRelationshipBulkSetOperationRequest = z.infer<typeof ResourceRelationshipBulkSetOperationRequestSchema>;\n\nexport const ResourceRelationshipBulkClearOperationRequestSchema =\n ResourceRelationshipBulkOperationSelectorSchema;\nexport type ResourceRelationshipBulkClearOperationRequest = z.infer<typeof ResourceRelationshipBulkClearOperationRequestSchema>;\n\nexport const ResourceRelationshipBulkCreateOperationRequestSchema =\n ResourceRelationshipBulkOperationSelectorSchema.and(\n z.object({\n data: z.record(z.string(), z.any()).refine(\n (data) => Object.keys(data).length > 0,\n 'data must not be empty'\n ),\n })\n );\nexport type ResourceRelationshipBulkCreateOperationRequest = z.infer<typeof ResourceRelationshipBulkCreateOperationRequestSchema>;\n\nexport const ResourceRelationshipBulkLinkOperationRequestSchema =\n ResourceRelationshipBulkOperationSelectorSchema.and(\n z.object({\n peerIds: z.array(z.string().min(1)).min(1),\n })\n );\nexport type ResourceRelationshipBulkLinkOperationRequest = z.infer<typeof ResourceRelationshipBulkLinkOperationRequestSchema>;\n\nexport const ResourceRelationshipBulkUnlinkOperationRequestSchema =\n ResourceRelationshipBulkOperationSelectorSchema.and(\n z.object({\n peerIds: z.array(z.string().min(1)).min(1),\n })\n );\nexport type ResourceRelationshipBulkUnlinkOperationRequest = z.infer<typeof ResourceRelationshipBulkUnlinkOperationRequestSchema>;\n\nexport const ResourceRelationshipBulkReplaceOperationRequestSchema =\n ResourceRelationshipBulkOperationSelectorSchema.and(\n z.object({\n peerIds: z.array(z.string().min(1)),\n })\n );\nexport type ResourceRelationshipBulkReplaceOperationRequest = z.infer<typeof ResourceRelationshipBulkReplaceOperationRequestSchema>;\n\nexport const ResourceRelationshipBulkActionResultSchema = z.object({\n relationshipField: z.string().min(1),\n action: z.enum(ResourceRelationshipBulkAction),\n matchedTargetIds: z.array(z.string()),\n affectedCount: z.number().int().min(0),\n results: z.array(z.any()),\n});\nexport type ResourceRelationshipBulkActionResult = z.infer<typeof ResourceRelationshipBulkActionResultSchema>;\n\n/**\n * @wildo_source:part:start saas.models.relationship-handling-contract facet:layer:shared facet:family:resource-config\n *\n * Fully resolved relationship handling contract.\n *\n * This describes the engine-facing semantic handling after `nature` has been\n * resolved. The `read` block is the semantic source of truth, while\n * `childOperations.nested.onRead` remains the low-level operational projection\n * for payload shaping.\n */\nexport const RelationshipHandlingContractSchema = z.object({\n dtoModelMode: z.enum(RelationshipDtoModel),\n mutationModelMode: z.enum(RelationshipMutationModel),\n lifecycleModelMode: z.enum(RelationshipLifecycleModel),\n readModelMode: z.enum(RelationshipReadModel),\n read: RelationshipHandlingReadSettingsSchema,\n mutation: RelationshipHandlingMutationSettingsSchema.optional(),\n lifecycle: RelationshipHandlingLifecycleSettingsSchema.optional(),\n});\nexport type RelationshipHandlingContract = z.infer<typeof RelationshipHandlingContractSchema>;\n/** @wildo_source:part:end saas.models.relationship-handling-contract */\n\nexport const RelationshipPersistenceForeignKeyContractSchema = z.object({\n fieldIdentifier: z.string().min(1),\n /**\n * The resource that OWNS the FK column (the \"holder\") — the side whose\n * documents/rows physically carry `fieldIdentifier`.\n *\n * Resolved from cardinality topology (the collection side of a 1:N carries\n * the FK; 1:1 falls back to the parent-first child convention =\n * `resourceType2`; self-references hold their own FK). Declaration order is\n * NOT a holder signal: parent-first `(ORGANIZATIONS, TODOS, ONE, MANY)` and\n * child-first `(TODOS, USERS, MANY, ONE)` are both valid authoring shapes,\n * and a positional `resourceType2` read materializes the FK onto the\n * referenced TARGET of every child-first relationship (e.g. `users` growing\n * a required `assignedToUserId`/`postedByUserId` column) instead of the\n * holder. Storage adapters MUST gate FK materialization/validation on\n * `holderResourceType === <resource under build>`, never on positional\n * `resourceType1`/`resourceType2` checks.\n */\n holderResourceType: ResourceTypeSchema,\n isArray: z.boolean(),\n materializeField: z.boolean(),\n required: z.boolean(),\n unique: z.boolean(),\n});\nexport type RelationshipPersistenceForeignKeyContract = z.infer<typeof RelationshipPersistenceForeignKeyContractSchema>;\n\nexport const RelationshipPersistenceContractSchema = z.object({\n foreignKey: RelationshipPersistenceForeignKeyContractSchema.optional(),\n});\nexport type RelationshipPersistenceContract = z.infer<typeof RelationshipPersistenceContractSchema>;\n\nexport const ResourceRelationshipBaseSchema = z.object({\n resourceType1: ResourceTypeSchema,\n resourceType2: ResourceTypeSchema,\n});\nexport type ResourceRelationshipBase = z.infer<typeof ResourceRelationshipBaseSchema>;\n\n/**\n * @wildo_source:part:start saas.models.scope-membership facet:layer:shared facet:family:resource-config\n *\n * Write-time scope confinement of a REFERENCE foreign key — the STRUCTURE half.\n *\n * A lateral `REFERENCE` FK to a target that is NOT itself tenant-scoped — a `users` id on an\n * org-scoped row, another `organizations` id — carries no `organizationId` column to compare, so the\n * ordinary write-integrity tenant check can only confirm the target EXISTS, never that it belongs to\n * the writer's tenant. That admits a cross-tenant reference (assign a todo to a user from another org).\n * Declaring `scopeMembership` closes it: the referenced target must have a row in a junction linking it\n * to the writing row's scope — enforced on CREATE and UPDATE, refused with `404` (identical to the\n * existing cross-tenant refusal, so nothing leaks).\n *\n * **This type carries STRUCTURE ONLY — which junction, and which columns.** It is a fact about the data\n * shape, uniform across every write. The POLICY half (status / role / field tightening, or disabling)\n * varies per operation VARIANT and therefore lives on the operation config as `referenceConstraints`\n * (see {@link ReferenceScopeConstraintSchema}) — beside the caller-side `roles`, where authorization\n * already lives. Keeping them apart is what stops a relationship from growing its own per-variant\n * authorization table duplicating the operation/variant structure.\n *\n * Fully OPT-IN: a relationship without `scopeMembership` keeps its existing existence-only behavior.\n */\nexport const ScopeMembershipStructureSchema = z.object({\n /**\n * The writing row's scope field whose value the target must be a member of. Defaults to the\n * resource's primary-scope FK (e.g. `organizationId`). Set only when the confining scope is a\n * non-primary field.\n */\n scopeField: z.string().optional(),\n /**\n * The junction resource linking scope → target (e.g. `organizationMembers`, `organizationPartnerships`).\n * Omit to auto-resolve from the registry's `(target, scope)` M:N scope-junction map — which works when\n * the junction's two sides are DIFFERENT resource types (organizations ↔ users). Name it explicitly for\n * a SELF-REFERENTIAL junction (organizations ↔ organizations), which the map does not infer.\n */\n junction: ResourceTypeSchema.optional(),\n /**\n * The junction column holding the SCOPE id (the writer's tenant), e.g. `organizationId`.\n *\n * Needed only when convention cannot pick it: for a self-referential junction both columns have the\n * same resource type, so the guard takes the column NAMED LIKE the writing row's scope field as the\n * scope side and the other same-typed column as the target side. Set this (with\n * {@link junctionTargetField}) when the junction names its columns differently\n * (e.g. `sourceOrganizationId` / `targetOrganizationId`).\n */\n junctionScopeField: z.string().optional(),\n /**\n * The junction column holding the TARGET id (the referenced row), e.g. `partnerOrganizationId`.\n * See {@link junctionScopeField} — set both or neither.\n */\n junctionTargetField: z.string().optional(),\n});\nexport type ScopeMembershipStructure = z.infer<typeof ScopeMembershipStructureSchema>;\n\n/**\n * Relationship `scopeMembership` value: `true` for the simple case (junction auto-resolved from the\n * registry's M:N scope-junction map), or a {@link ScopeMembershipStructureSchema} when the junction or\n * its columns must be named (self-referential junctions, non-primary scope fields).\n *\n * Policy — status, roles, junction-field and target-row constraints, or disabling — is NOT here; it is\n * per-variant and lives on the operation config's `referenceConstraints`.\n */\nexport const ScopeMembershipSchema = z.union([z.literal(true), ScopeMembershipStructureSchema]);\nexport type ScopeMembership = z.infer<typeof ScopeMembershipSchema>;\n\n/**\n * Write-time scope confinement of a REFERENCE foreign key — the POLICY half, declared PER OPERATION\n * VARIANT on the operation config (`referenceConstraints`), keyed by foreign-key field.\n *\n * The relationship's {@link ScopeMembershipSchema} already guarantees the baseline: the referenced\n * target must be linked to the writing row's scope through the junction. This type TIGHTENS that\n * baseline for one variant — the ordinary \"assign\" accepts any member while a \"make reviewer\" variant\n * requires an `ORG_ADMIN`; a plain \"share\" accepts any partnership while \"share with write access\"\n * requires a typed one. It sits beside the operation's own `roles`, which gate the CALLER; these gate\n * the TARGET.\n *\n * Absent for a foreign key ⇒ the relationship's baseline membership applies unchanged. `false` ⇒\n * enforcement is DISABLED for that foreign key on that variant.\n *\n * Note on rigor: the baseline membership check is TENANT ISOLATION and is enforced strictly. The\n * refinements below are ACCESS MANAGEMENT — `requiredRoles` reuses the shared hierarchy matcher\n * (`userRolesSatisfyRequiredRoles`), which is deliberately permissive about app-custom roles it cannot\n * expand rather than fail-closed on them.\n */\nexport const ReferenceScopeConstraintSchema = z.object({\n /**\n * Junction-row `status` values that qualify (e.g. `['ACTIVE']`). Omit ⇒ any status qualifies (mere\n * membership — still refuses a cross-tenant reference). Use to reject e.g. a `SUSPENDED` member.\n */\n qualifyingStatuses: z.array(z.string()).optional(),\n /**\n * Hierarchy-aware role requirement on the qualifying junction row's `roles` (e.g. the referenced user\n * must be an `ORG_ADMIN` of the row's organization). Matched with the SAME hierarchy walk the\n * operation role gate uses — a member holding an ancestor role (e.g. `ORG_OWNER`) satisfies a\n * requirement of `ORG_ADMIN`. Omit ⇒ no role constraint.\n */\n requiredRoles: z.object({\n scope: z.enum(ResourcePrimaryScope),\n roles: z.array(z.string()).min(1),\n }).optional(),\n /**\n * Equality constraints on the qualifying JUNCTION row beyond status (e.g. a typed partnership:\n * `{ partnershipType: 'collaboration' }`). All entries must match. Omit ⇒ no field constraint.\n */\n qualifyingFields: z.record(z.string(), z.unknown()).optional(),\n /**\n * Equality constraints on the referenced TARGET ROW itself (not the junction) — e.g. the assignee must\n * be a user of a given type `{ userTypes: 'agent' }`, or a partner org of a given type\n * `{ type: 'enterprise' }`. Applied to the target row the guard already reads. Omit ⇒ none.\n */\n targetConstraints: z.record(z.string(), z.unknown()).optional(),\n});\nexport type ReferenceScopeConstraint = z.infer<typeof ReferenceScopeConstraintSchema>;\n\n/**\n * An operation variant's per-foreign-key reference policy: `foreignKeyField → constraint | false`.\n *\n * `false` WAIVES the scope-membership requirement for that foreign key on this variant (a break-glass\n * verb that must write a not-yet-member reference). It waives that and nothing else: the target must\n * still EXIST, and an ORG-SCOPED target must still share the write's tenant.\n *\n * ⚠️ **On an ORG-LESS target the junction IS the tenant signal.** `users` and `organizations` carry no\n * tenant column to fall back on, so waiving membership there reduces the check to existence and a\n * cross-tenant id becomes admissible. That is occasionally the intent (an incident override), but it is\n * never incidental — reach for a narrower policy first (a wider `qualifyingStatuses`, or a second\n * junction that models the exception) and use `false` only when the variant genuinely means\n * \"any existing row, tenant notwithstanding\".\n */\nexport const ReferenceConstraintsSchema = z.record(\n z.string(),\n z.union([z.literal(false), ReferenceScopeConstraintSchema]),\n);\nexport type ReferenceConstraints = z.infer<typeof ReferenceConstraintsSchema>;\n/** @wildo_source:part:end saas.models.scope-membership */\n\n/**\n * @wildo_source:part:start saas.models.resource-relationship-schema facet:layer:shared facet:family:resource-config\n *\n * Serializable relationship declaration fields validated at registry build.\n */\nexport const ResourceRelationshipSchema = z.object({\n cardinality1: z.enum(ResourceRelationshipCardinality),\n cardinality2: z.enum(ResourceRelationshipCardinality),\n resourceType1: ResourceTypeSchema,\n resourceType2: ResourceTypeSchema,\n accessScopeStrategy: z.enum(ResourceRelationshipAccessScopeStrategy).default(ResourceRelationshipAccessScopeStrategy.REQUIRES_CONTEXT),\n parentResourceRequirement: z.enum(ResourceParentResourceRequirement).default(ResourceParentResourceRequirement.MANDATORY),\n jointResourceType : ResourceTypeSchema.optional(),\n isPrimaryScope : z.boolean().optional().default(false),\n primaryScope : z.enum(ResourcePrimaryScope).optional(),\n /**\n * Opt-in flag for relationships that form cycles in the resource graph.\n * When `true`, schema-level cycle detection (at registration) allows this edge.\n * Applies to all cycle types: direct self-reference (A→A), M:N self-reference\n * (A↔A via junction), and edges participating in transitive cycles (A→B→C→A).\n *\n * Default `false` — cycles are rejected at registration unless every edge\n * in the cycle has `allowCycle: true`.\n */\n allowCycle : z.boolean().optional().default(false),\n isDisabled : z.boolean().optional().default(false),\n\n // Context policy for this relationship - controls how related resources are fetched\n contextPolicy: RelationshipContextPolicySchema.optional(),\n\n /**\n * High-level shared meaning of the relationship.\n *\n * Greenfield direction:\n * - `nature` remains the primary semantic field app developers author.\n * - `read` is the explicit semantic read intent when the default read meaning\n * derived from low-level nested projection is not precise enough.\n * - The framework derives its internal handling contract from that semantic\n * declaration plus structural topology.\n *\n */\n nature: z.enum(RelationshipNature),\n\n /**\n * Explicit semantic read contract for this relationship.\n *\n * This is the authored read intent. It does NOT replace\n * `childOperations.nested.onRead`, which still carries the low-level nested\n * response projection details when embedding is operationally enabled.\n */\n read: RelationshipHandlingReadSettingsSchema.optional(),\n\n /**\n * Child operations configuration for this relationship.\n * Handles BACKEND concerns: lifecycle cascade and nested DTO aggregation.\n *\n * - lifecycle.onParentDelete: Delete children when parent is deleted\n * - nested.onRead: Include children in parent READ response\n * - nested.onCreate/onUpdate: Allow child mutations in parent requests\n */\n childOperations: ChildOperationsConfigSchema.optional(),\n\n /**\n * Static discriminator filter for conditional relationships.\n * When specified, this relationship only applies when the PARENT resource's\n * discriminator field matches one of the specified values.\n *\n * This field is part of the Zod schema (serializable). For arbitrary function-based\n * conditions, use the `condition` field on the `ResourceRelationship` TypeScript type\n * (which extends this schema via intersection).\n *\n * Runtime evaluation uses the shared\n * `Resources_SharedUtils.matchesRelationshipDiscriminator()` helper, which\n * applies `String()` coercion:\n * `values.includes(String(parent[discriminatorField]))`.\n *\n * @see ResourceRelationshipDiscriminatorSchema — for the full schema definition\n * @see ResourceRelationship — for the full type including the `condition` function\n *\n * @example Recurring todos have occurrences, one-time todos don't:\n * { discriminatorField: 'recurringType', values: ['RECURRING'] }\n */\n discriminator: ResourceRelationshipDiscriminatorSchema.optional(),\n\n /**\n * Frontend relationship presentation configuration.\n *\n * This remains on the frontend/UI plane:\n * - read composition in parent/child views\n * - narrow interaction hints such as `interaction.allowQuickCreate`\n *\n * It must NOT redefine the core meaning of the relationship. In particular,\n * `display.interaction.allowQuickCreate` is only a workflow shortcut hint:\n * - for `REFERENCE`: \"create independent resource, then set reference\"\n * - for `ASSOCIATION`: \"create independent peer, then link/replace\"\n * - for `COMPOSITION`: usually ignored because nested creation is already the\n * native aggregate workflow\n *\n * Labels remain managed by the i18n mechanism.\n */\n display: RelationshipDisplayConfigSchema.optional(),\n\n /**\n * Foreign key field name for this relationship.\n *\n * When omitted: Inferred from parent's resourceFieldIdentifier via allResourceFieldIdentifiers map.\n * When specified: Used for disambiguation when multiple FKs point to same resource type,\n * or when FK field name differs from standard naming convention.\n *\n * Examples:\n * - Standard: ORGANIZATIONS → TODOS uses organizationId (inferred)\n * - Disambiguation: TODOS → USERS via assignedToUserId vs createdByUserId (explicit)\n * - M:N self-reference: TODOS → TODOS via junction table uses todoId/targetTodoId (explicit)\n */\n foreignKeyField: z.string().optional(),\n\n /**\n * Scope-via-junction tag (scope-required reference search).\n *\n * Set ONLY on the synthetic `S → T` edge the M:N expansion adds so a target\n * `T` (e.g. `users`) becomes addressable under a scope `S` (e.g.\n * `organizations`) for SEARCH/LIST — e.g.\n * `GET /organizations/{organizationId}/users/search`. Names the junction `J`\n * (e.g. `organizationMembers`) the scope is resolved through. `T` carries NO\n * real foreign-key column for `S`, so the backend contextual filter scopes via\n * a junction subquery (`T._id ∈ { J.targetFk : J.scopeFk = S_id }`) and\n * authorization keys off `S`-membership instead of `T`'s own primary scope.\n * Absent on every normal relationship.\n *\n * NOTE: this is a READ/SEARCH-side tag on a synthetic scope-anchored edge. To constrain a WRITE — a\n * real reference FK must point at a member of the writer's scope — declare {@link scopeMembership},\n * NOT this field.\n */\n scopeViaJunction: ResourceTypeSchema.optional(),\n\n /**\n * Write-time SCOPE CONFINEMENT for this reference FK — the STRUCTURE half (see\n * {@link ScopeMembershipSchema}).\n *\n * Opt-in and additive: absent ⇒ unchanged existence-only behavior. `scopeMembership: true` requires\n * the referenced target to be linked to the writing row's scope through the auto-resolved junction;\n * the object form names the junction / columns when convention cannot (self-referential junctions).\n * Enforced on CREATE and UPDATE by the adapter-neutral write-integrity authority; a non-member /\n * cross-tenant reference is refused with `404`, leaking nothing.\n *\n * POLICY (status, roles, junction-field / target-row constraints, or disabling) is NOT declared here —\n * it varies per operation variant and lives on the operation config as `referenceConstraints`\n * (see {@link ReferenceScopeConstraintSchema}), beside the caller-side `roles`.\n */\n scopeMembership: ScopeMembershipSchema.optional(),\n\n /**\n * Restricts which core operations' URLs this relationship contributes to.\n *\n * When set, the URL builder emits this parent edge ONLY for the listed core\n * operations (e.g. `[SEARCH, LIST]`). Used by the scope-via-junction edge so it\n * produces `/{scope}/{target}/search|list` without leaking onto\n * READ/CREATE/UPDATE/DELETE routes — a peer-under-scope path is a read-only\n * access pattern. Absent ⇒ the edge contributes to every operation's URLs.\n */\n urlOperationScope: z.array(z.enum(CoreResourceOperation)).optional(),\n});\n/** @wildo_source:part:end saas.models.resource-relationship-schema */\n\n/**\n * @wildo_source:part:start saas.models.resource-relationship-resolved-semantics facet:layer:shared facet:family:resource-config\n *\n * Condition function, resolved semantics contract (factory output shape).\n */\n/**\n * Function-based condition for conditional relationships.\n * Evaluated at runtime with the PARENT resource data.\n * Return `true` to include the relationship, `false` to exclude it.\n *\n * Unlike the static `discriminator` (which is a simple field+values match),\n * this allows arbitrary logic: cross-field checks, computed conditions, etc.\n *\n * When both `discriminator` and `condition` are present on a relationship,\n * they are combined with AND semantics — the relationship is active only when\n * both pass.\n *\n * Error handling is selected by the runtime caller through\n * `Resources_SharedUtils.isRelationshipActiveForParent()`:\n * - Backend callers propagate condition errors normally.\n * - Frontend callers may fail safe and exclude the relationship.\n *\n * @param parentResource - The parent resource's data object.\n * @returns `true` to include the relationship, `false` to exclude it.\n */\nexport type ResourceRelationshipConditionFn = (parentResource: Record<string, any>) => boolean;\n\nexport type ResolvedRelationshipNatureCalculationMode = 'explicit';\nexport type ResolvedRelationshipReadCalculationMode =\n | 'explicit'\n | 'legacy_nested_read_fallback'\n | 'default_reference_only';\n\n/**\n * Internal relationship contract built once from the developer-authored\n * declaration and then reused by runtime consumers.\n */\nexport interface ResolvedRelationshipSemantics {\n nature: RelationshipNature;\n natureCalculationMode: ResolvedRelationshipNatureCalculationMode;\n /**\n * Documents whether the semantic read intent came from explicit authored\n * `read`, from the legacy `childOperations.nested.onRead` compatibility seam,\n * or from the default non-embedded fallback when neither is authored.\n */\n readCalculationMode: ResolvedRelationshipReadCalculationMode;\n handling: RelationshipHandlingContract;\n persistence: RelationshipPersistenceContract;\n childOperations?: ChildOperationsConfig_Parsed;\n}\n/** @wildo_source:part:end saas.models.resource-relationship-resolved-semantics */\n\n/**\n * @wildo_source:part:start saas.models.resource-relationship-declaration facet:layer:shared facet:family:resource-config\n *\n * Developer-authored relationship declaration.\n *\n * The `condition` function cannot be represented in a Zod schema (functions aren't\n * serializable), so we extend via a TypeScript intersection type. This means:\n * - The Zod schema (`ResourceRelationshipSchema`) defines all serializable fields,\n * including the static `discriminator` object.\n * - This intersection adds the optional `condition` function on top.\n * - The `createResourcesRelationship()` factory accepts both and returns this type.\n * - `nature` + optional `read` form the authored semantic surface; the\n * framework compiles that into `resolvedSemantics.handling`.\n *\n * ## Conditional Relationship Architecture\n *\n * Relationships may optionally carry two kinds of runtime filters:\n *\n * 1. **`discriminator`** (static) — A simple field+values match on the parent resource.\n * Defined as `{ discriminatorField: string, values: string[] }`.\n * Example: \"this relationship only applies when `recurringType === 'RECURRING'`\".\n *\n * 2. **`condition`** (dynamic) — An arbitrary function evaluated with the parent\n * resource data. Use for cross-field logic, computed conditions, etc.\n *\n * Both are evaluated against the PARENT resource, never the child. When both are\n * present, they use AND semantics (both must pass for the relationship to be active).\n *\n * ## Where Conditions Are Evaluated at Runtime\n *\n * | Layer | Evaluates discriminator/condition? | Against which resource? |\n * |-------------------------------|------------------------------------|-------------------------|\n * | **Factory** (startup) | No — stores them inline | N/A |\n * | **DTO Builder** (startup) | No — generates DTOs for ALL rels | N/A |\n * | **URL Builder** (startup) | No — synthetic parents clear them | N/A |\n * | **ResourceContext** (backend) | Yes, via shared activation helper | parentResource |\n * | **ServicesRegistryHandler** | Yes, via shared activation helper | parentResult/state |\n * | **ContainerNested** (frontend)| Yes, via shared activation helper | parentData |\n *\n * The key design insight is that conditions are a RUNTIME concern. At startup\n * (factory/DTO/URL), all relationships are processed unconditionally — conditions\n * are evaluated only when actual parent data is available.\n *\n * Runtime registry rows also carry `resolvedSemantics` (see `ResourceRelationship`).\n */\nexport type ResourceRelationshipDeclaration = z.infer<typeof ResourceRelationshipSchema> & {\n condition?: ResourceRelationshipConditionFn;\n};\n\n/**\n * Internal runtime relationship shape.\n *\n * This mirrors the resource-configuration pattern: app developers author the\n * declaration shape, and the factory compiles/stores the internal semantics\n * once so runtime consumers reuse the resolved form instead of rebuilding it.\n */\nexport type ResourceRelationship = ResourceRelationshipDeclaration & {\n resolvedSemantics: ResolvedRelationshipSemantics;\n};\n/** @wildo_source:part:end saas.models.resource-relationship-declaration */\n\n// --------------------------------\n// Default Operation Response Patterns\n// --------------------------------\n\n/**\n * Default response patterns for resource operations based on best practices\n */\n\nexport const DefaultDeleteResponseSchema = z.object({\n id: z.string(),\n deletedAt: z.date().optional()\n});\nexport type DefaultDeleteResponse = z.infer<typeof DefaultDeleteResponseSchema>;\n\nexport const DefaultBulkDeleteResponseSchema = z.object({\n deletedIds: z.array(z.string()),\n deletedCount: z.number(),\n deletedAt: z.date().optional()\n});\nexport type DefaultBulkDeleteResponse = z.infer<typeof DefaultBulkDeleteResponseSchema>;\n\nexport const DefaultUpdateManyResponseSchema = z.object({\n updatedCount: z.number(),\n updatedIds: z.array(z.string()).optional(),\n updatedAt: z.date().optional()\n});\nexport type DefaultUpdateManyResponse = z.infer<typeof DefaultUpdateManyResponseSchema>;\n\nexport const DefaultCountResponseSchema = z.object({\n count: z.number().int().min(0),\n});\nexport type DefaultCountResponse = z.infer<typeof DefaultCountResponseSchema>;\n\n// Standard result with count for create many operations - generic function\nexport interface DefaultCreateManyResponse<T> {\n items: T[];\n createdCount: number;\n createdAt?: Date;\n}\n\nexport const DefaultCreateManyResponseSchema = <T extends z.ZodTypeAny>(itemSchema: T): z.ZodType<DefaultCreateManyResponse<SchemaInfer<T>>> => z.object({\n items: z.array(itemSchema),\n createdCount: z.number(),\n createdAt: z.date().optional()\n});\n\n/**\n * Generic success envelope for explicit custom action-style operations.\n *\n * This schema is intentionally transport-oriented. It can be attached through\n * explicit `customResponseDto` / `responseDto` config when a custom operation\n * returns a generic success envelope instead of a resource DTO.\n */\nexport const DefaultActionResponseSchema = z.object({\n success: z.boolean(),\n message: z.string().optional(),\n executedAt: z.date(),\n result: z.any().optional()\n});\nexport type DefaultActionResponse = z.infer<typeof DefaultActionResponseSchema>;\n\n/**\n * Fields that are always discarded from create/update payloads at runtime.\n * These are auto-generated or system-managed fields.\n *\n * Note: _id is also handled by the isPrimaryKey decorator at the schema level,\n * but is kept here as a runtime safety net for backward compatibility.\n */\nexport const createOrUpdateMandatoryDiscardFields: readonly string[] = [\n '_id', // Also handled by isPrimaryKey decorator\n 'createdAt',\n 'updatedAt',\n 'deletedAt',\n '_version_db_doc',\n]\n\n// Utility to get default response schema based on operation\nexport function getDefaultResponseSchemaForOperation<T extends z.ZodTypeAny>(\n operation: string,\n mainSchema: T\n): z.ZodTypeAny {\n switch (operation) {\n case CoreResourceOperation.READ:\n case CoreResourceOperation.CREATE:\n case CoreResourceOperation.UPDATE:\n return mainSchema;\n\n case CoreResourceOperation.DELETE:\n return DefaultDeleteResponseSchema;\n\n case CoreResourceOperation.DELETE_MANY:\n return DefaultBulkDeleteResponseSchema;\n\n case CoreResourceOperation.UPDATE_MANY:\n return DefaultUpdateManyResponseSchema;\n\n case CoreResourceOperation.CREATE_MANY:\n return DefaultCreateManyResponseSchema(mainSchema);\n\n case CoreResourceOperation.LIST:\n // List operations should use pagination wrapper - handled separately\n return mainSchema;\n case CoreResourceOperation.COUNT:\n return DefaultCountResponseSchema;\n case CoreResourceOperation.SEARCH:\n return mainSchema;\n\n default:\n // For custom operations, default to mainSchema\n return mainSchema;\n }\n}\n\n/**\n * Core operations whose service-layer OUTPUT is validated against their declared RESPONSE\n * envelope (a framework `Default*ResponseSchema`), NOT against the resource object. For these,\n * the DTO builder sets `internalDto` to the response envelope (`responseDtoInternal`) instead of\n * `enhancedMainSchema` — otherwise output validation parses the envelope value against the resource\n * schema and throws `service_resource_transformation_failed` (HTTP 500).\n *\n * ⚠️ KEY ON THE OPERATION'S OWN `operationIdentifier`, NOT `resourceOperationLike` /\n * `effectiveOperation`. `resourceOperationLike` is a ROUTING / HTTP-verb / authorization hint — a\n * CUSTOM operation may borrow `DELETE`/`COUNT` semantics for its URL and permissions while returning\n * its own object shape (via `REPLACE_CORE_OPERATIONS` or a `customResponseDto`, e.g. SIEM\n * `PURGE_ALL` → `{ purgedCount, … }`). Only\n * the genuine core operation carries `operationIdentifier === CoreResourceOperation.DELETE` etc.;\n * custom ops carry a custom identifier. Keying on `operationIdentifier` is what stops the composer\n * wrapping a custom op's object as `{ id: <object> }`.\n *\n * Membership rationale:\n * - `DELETE` / `DELETE_MANY` — the service+repository layer returns the deleted id(s) as a bare\n * scalar; {@link composeDefaultOperationResponse} lifts that into the envelope.\n * - `COUNT` — the service already returns `{ count }`, so no composition is needed, but its\n * `internalDto` must still be the `{ count }` envelope rather than the resource object.\n *\n * Deliberately EXCLUDED: bulk mutations (`CREATE_MANY` / `UPDATE_MANY`). At runtime they return an\n * ARRAY of resource items that the transform/serializer validate PER-ITEM against the resource\n * schema (see the `isBulkOperation` branch in `getDefaultResponseSchemaForOperation` /\n * `buildEnhancedResponseDto`) — they are object-shaped per item, not a count envelope, so they\n * must keep `enhancedMainSchema`.\n *\n * Keep this set, {@link composeDefaultOperationResponse}, and the `internalDto` routing in the DTO\n * builder in lockstep.\n */\nexport const OUTPUT_ENVELOPE_OPERATIONS: readonly string[] = [\n CoreResourceOperation.DELETE,\n CoreResourceOperation.DELETE_MANY,\n CoreResourceOperation.COUNT,\n];\n\n/** True when this is a genuine core envelope operation (see {@link OUTPUT_ENVELOPE_OPERATIONS}).\n * Pass the operation's OWN `operationIdentifier`, never `resourceOperationLike`/`effectiveOperation`\n * (a custom op borrowing the verb has a custom identifier and returns its own shape). */\nexport function isOutputEnvelopeOperation(operationIdentifier: string): boolean {\n return OUTPUT_ENVELOPE_OPERATIONS.includes(operationIdentifier);\n}\n\n/**\n * Value-level twin of {@link getDefaultResponseSchemaForOperation}: composes an operation's\n * DECLARED default response value from the raw service/repository output, so the value that flows\n * into output validation (`transformOutput`) and response serialization matches the declared\n * schema. This is the single, GENERAL seam for \"the runtime returns a lower-level value than the\n * declared response envelope\" — callers invoke it uniformly instead of special-casing operations.\n *\n * ⚠️ Pass the operation's OWN `operationIdentifier`, NOT `resourceOperationLike`/`effectiveOperation`\n * (see {@link OUTPUT_ENVELOPE_OPERATIONS}). And callers MUST skip composition when the operation\n * declares its own `customResponseDto` (`hasCustomResponseDto`) — that op returns its custom shape\n * directly, exactly as `buildEnhancedResponseDto` lets a custom `responseDto` win over the default.\n * Both guards together keep this a true identity for every operation that already returns its final\n * shape, so ONLY genuine core `DELETE`/`DELETE_MANY` are ever transformed.\n *\n * Identity for every operation whose service output already IS its declared shape: `READ` /\n * `CREATE` / `UPDATE` (resource object), `CREATE_MANY` / `UPDATE_MANY` (array of items, validated\n * per-item), `COUNT` (`{ count }`), `LIST` / `SEARCH` (`{ data, pagination }`), and every custom\n * operation (its own DTO value). The only non-identity cases are the core deletes, whose repository\n * layer returns the deleted id(s) as a bare scalar (`delete(): Promise<string>` — the `_id`, or\n * `''` when nothing matched; `deleteMany(): Promise<string[]>`):\n * - `DELETE` → `{ id }` (`DefaultDeleteResponseSchema`)\n * - `DELETE_MANY` → `{ deletedIds, deletedCount }` (`DefaultBulkDeleteResponseSchema`)\n *\n * `DELETE` always wraps as `{ id }`. If a singular `DELETE` is invoked with a filter it delegates to\n * `deleteMany` and returns a `string[]` (a misuse that should target `DELETE_MANY`); that becomes\n * `{ id: string[] }` and downstream `internalDto` validation surfaces the anomaly rather than\n * silently coercing it. Likewise a non-array `DELETE_MANY` output passes through to fail validation.\n * Keep this switch in lockstep with {@link getDefaultResponseSchemaForOperation} and\n * {@link OUTPUT_ENVELOPE_OPERATIONS}.\n */\nexport function composeDefaultOperationResponse(operationIdentifier: string, serviceOutput: unknown): unknown {\n switch (operationIdentifier) {\n case CoreResourceOperation.DELETE:\n return { id: serviceOutput };\n case CoreResourceOperation.DELETE_MANY:\n return Array.isArray(serviceOutput)\n ? { deletedIds: serviceOutput, deletedCount: serviceOutput.length }\n : serviceOutput;\n default:\n return serviceOutput;\n }\n}\n\n// Utility to determine if operation should have request DTO\nexport function operationShouldHaveRequestDto(operation: string): boolean {\n return !OPERATIONS_WITHOUT_REQUEST_BODY.includes(operation as CoreResourceOperation);\n}\n\n// ============================================================================\n// Resource ID Types and Enums\n// ============================================================================\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 *\n * @see DATABASE_AGNOSTIC_REPOSITORY_ANALYSIS.md Section 28\n */\n\n/**\n * Abstract resource ID type - string that can be either ObjectId or UUID format\n */\nexport type ResourceId = string;\n\n/**\n * Supported ID format types\n */\nexport enum ResourceIdFormat {\n /** MongoDB ObjectId - 24 character hexadecimal string */\n OBJECT_ID = 'OBJECT_ID',\n /** PostgreSQL UUID - 36 character UUID with dashes */\n UUID = 'UUID',\n /**\n * The synthesized id of an `HTTP_API`-backed resource: encoded (or charset-safe verbatim) remote\n * key components, produced ONLY by the codec authority in\n * `http-api-binding/http-api-binding-id.shared.utils.ts` — never minted. Lexical shape: the\n * charset law `^[A-Za-z0-9._~-]+$`. Deliberately NOT added to `detectIdFormat` /\n * `isValidResourceId` (the strict two-format world stays strict for platform-backed rows —\n * paper A: never loosen a shared validator silently); it participates only where the RESOURCE\n * is known to be HTTP_API-backed (`ResourceIdBackendService.getFormatForResource`).\n */\n HTTP_API_SYNTHESIZED = 'HTTP_API_SYNTHESIZED',\n /**\n * The synthesized id of an `INTROSPECTION`-backed resource: the key of a row DERIVED from the\n * application's own structure, never minted and never stored.\n *\n * A distinct member from {@link HTTP_API_SYNTHESIZED} even though both admit the same charset,\n * because they answer different questions and will diverge: an HTTP-API id encodes a REMOTE\n * entity's key through a codec that can round-trip it, while an introspected id is whatever the\n * companion behavior's projection already calls the row — a module name, a composed structural\n * key. Merging them would put one name on two origins, and the next reader could not tell which\n * validator's rules a given id was admitted under.\n *\n * Like its sibling it is deliberately absent from `detectIdFormat` / `isValidResourceId`: the\n * strict two-format world stays strict for platform-backed rows, and this widening applies only\n * where the RESOURCE is known to be INTROSPECTION-backed.\n */\n INTROSPECTION_SYNTHESIZED = 'INTROSPECTION_SYNTHESIZED',\n}\n\n/**\n * Descriptor for a **scope-required reference search** through an M:N junction.\n *\n * When a foreign key targets resource `T` and the holder resource's primary\n * scope is `S`, and `T ↔ S` is a MANY-to-MANY relationship via junction `J`,\n * a reference people-picker for that FK must search `T` **scoped to the caller's\n * current `S`** through `J` (rather than enumerating every `T` globally) — see\n * `.claude/plans/fk-filter-reference-search.md`. This descriptor names the\n * junction and the two foreign-key columns the junction carries to each peer.\n *\n * The junction's FK columns are resolved by convention as each peer's\n * `resourceFieldIdentifier` (e.g. `organizationMembers` carries `userId` for the\n * USERS peer and `organizationId` for the ORGANIZATIONS peer).\n */\nexport interface ManyToManyScopeJunction {\n /** The junction resource that joins the two peers (e.g. `organizationMembers`). */\n junctionResourceType: string;\n /** The junction's FK column referencing the search TARGET `T` (e.g. `userId`). */\n targetFkField: string;\n /** The junction's FK column referencing the SCOPE `S` (e.g. `organizationId`). */\n scopeFkField: string;\n}\n\n/**\n * Lookup keyed by `${targetResourceType}|${scopeResourceType}` →\n * {@link ManyToManyScopeJunction}. Both orderings of every M:N are recorded, so\n * either peer can be the search target with the other as the scope. Built once\n * at registry init via `Resources_SharedUtils.buildManyToManyScopeJunctionMap`.\n */\nexport type ManyToManyScopeJunctionMap = ReadonlyMap<string, ManyToManyScopeJunction>;\n\n// ── Label forwarding — server-resolved, never-stale, via a virtual field ──────\n//\n// Reuses TWO existing framework capabilities instead of inventing a bespoke\n// projection:\n// 1. The relational-join SHAPE of `SearchableRelationDescriptor`\n// (`resources-config.shared.schemas.ts`) — same authored vocabulary, resolved\n// in the OPPOSITE direction (values → related rows, not query → ids).\n// 2. The VIRTUAL-FIELD pipeline (`isVirtual().isSummaryField()`,\n// `VirtualFieldsBackendService`) — the framework's idiomatic \"compute a value\n// onto the response DTO\" mechanism. It already runs on READ/LIST/SEARCH, is\n// included in the summary schema, and survives the response DTO, so the\n// frontend just references the field name in `getFrontendResourceLabel`.\n\n/**\n * @wildo_source:part:start saas.models.resource-config.forwarded-label facet:layer:shared facet:family:resource-config\n *\n * A **label-forwarding descriptor** — declares how a junction (or any) resource\n * row labels itself using fields from a RELATED resource, resolved SERVER-SIDE\n * and projected onto the response DTO via {@link forwardedLabel}.\n *\n * Reuses the join vocabulary of `SearchableRelationDescriptor` (from\n * `@wildo-ai/saas-models`), resolved in the read direction. WHY a\n * descriptor and not denormalization: the human-meaningful label lives on a\n * RELATED resource and is MUTABLE there (a user's first/last name on\n * `USER_PROFILES`); copying it onto the junction would go stale and demand a sync\n * hook on every mutation path. Resolving the related resource's own fields at read\n * time is single-source-of-truth, never stale, and reaches a resource DIFFERENT\n * from the foreign key's declared target (the name lives on `USER_PROFILES`, not\n * on `users`, the FK target — joined on the shared `userId`).\n *\n * TENANT SAFETY (by construction): the descriptor only resolves related rows for\n * `localField` values that appear on rows the caller can ALREADY see (its own\n * already-scoped page), so the related read is a bounded SYSTEM read that can\n * never widen visibility — the same contract `SearchableRelationDescriptor`\n * relies on, mirrored for reads. The viewer therefore needs no read access to the\n * related row itself (e.g. another member's `user_profile`).\n *\n * @remarks Resolution requires the related resource to be MongoDB-backed. If the\n * related resource is PostgreSQL-backed the read is skipped and the label degrades\n * to `fallback` — parity is a future enhancement, mirroring the same adapter gap\n * on `SearchableRelationDescriptor`. Import from `@wildo-ai/saas-models`.\n *\n * @example\n * // organizationMembers labels itself by the linked user's name. firstName/\n * // lastName live on USER_PROFILES (mutable, deliberately NOT denormalized);\n * // both members and profiles carry the same `userId`, so join on it.\n * instanceLabel: forwardedLabel({\n * localField: 'userId',\n * relatedResource: CoreResourceType.USER_PROFILES,\n * relatedJoinField: 'userId',\n * fields: ['firstName', 'lastName'],\n * fallbackField: 'userEmail', // shown when the profile/name is unavailable\n * })\n */\nexport type LabelRelationDescriptor = {\n /** Field on THIS resource holding the join value (e.g. `userId`). */\n localField: string;\n /** The related resource whose fields are rendered into the label (e.g. `USER_PROFILES`). */\n relatedResource: ResourceType;\n /**\n * Field on the related resource matched against {@link localField}'s value.\n * Defaults to the related primary key (`_id`) — set it explicitly when joining\n * on a shared key other than the primary key (e.g. members and profiles both\n * carry `userId`).\n */\n relatedJoinField?: string;\n /**\n * Related fields to render, in order. Required: unlike search (which can default\n * to the related resource's own `searchableFields`), a label must declare what\n * to show. Resolving the related resource's OWN label as a default is a possible\n * future enhancement (it needs server-side label resolution that does not exist\n * in this path today).\n */\n fields: string[];\n /** Join separator between rendered field values. Default `' '` (single space). */\n separator?: string;\n /**\n * OWN-field on THIS resource used as the fallback label when the related row is\n * missing or every rendered field is empty — preferred over the static\n * {@link fallback}. Use an immutable own identifier (e.g. a denormalized\n * `userEmail`) so a row without a resolvable related label still shows a human\n * value instead of degrading to a raw id. Must be on the summary row (a summary\n * field) to be available to the resolver.\n */\n fallbackField?: string;\n /**\n * Static label of last resort, when the related row is missing/empty AND\n * {@link fallbackField} is unset or also empty. Default `''` (empty).\n */\n fallback?: string;\n};\n/** @wildo_source:part:end saas.models.resource-config.forwarded-label */\n\n/**\n * Stringify one forwarded field value, locale-aware where a localized\n * representation exists. Strings pass through verbatim (the canonical\n * label case — names, emails). `Date`/`number` use `Intl` with the optional\n * request locale. Enum-value LABEL translation is intentionally NOT done here:\n * resolving an app's enum labels is a frontend/display concern with no\n * server-side resolver in this path; forwarded labels are identity/text by\n * design. The `locale` param is the extension point if that ever changes.\n */\nfunction stringifyForwardedValue(value: unknown, locale?: string): string {\n if (value === null || value === undefined) {\n return '';\n }\n if (value instanceof Date) {\n return new Intl.DateTimeFormat(locale).format(value);\n }\n if (typeof value === 'number') {\n return new Intl.NumberFormat(locale).format(value);\n }\n return String(value);\n}\n\n/**\n * Pure renderer for a {@link LabelRelationDescriptor}: join the descriptor's\n * `fields` (in declared order, skipping empty values) from a resolved related\n * row, using `separator`, falling back to `fallback` when the row is absent or\n * the result is empty. Exported so it is unit-testable independently of the\n * virtual-field runtime.\n */\nexport function renderForwardedLabel(\n relatedRow: Record<string, unknown> | undefined | null,\n descriptor: LabelRelationDescriptor,\n options?: { locale?: string },\n): string {\n const fallback = descriptor.fallback ?? '';\n if (!relatedRow) {\n return fallback;\n }\n const separator = descriptor.separator ?? ' ';\n const rendered = descriptor.fields\n .map((field) => stringifyForwardedValue(relatedRow[field], options?.locale))\n .filter((part) => part.trim().length > 0)\n .join(separator)\n .trim();\n return rendered.length > 0 ? rendered : fallback;\n}\n\n/**\n * Request-scoped dedup cache for forwarded-label related reads. Keyed by the\n * `executionContext` object (one per request), so concurrent per-row virtual-field\n * computations across a single LIST/SEARCH page that resolve the SAME related key\n * share one in-flight read. This matches the framework's existing batch standard\n * (`populateListForSummary`: dedup + parallel, one read per UNIQUE key), without a\n * separate batch pre-pass. The `WeakMap` lets a finished request's cache be GC'd.\n */\nconst labelForwardingRequestCache = new WeakMap<\n object,\n Map<string, Promise<Record<string, unknown> | undefined>>\n>();\n\nfunction resolveRelatedRowDeduped(\n executionContext: unknown,\n cacheKey: string,\n loader: () => Promise<Record<string, unknown> | undefined>,\n): Promise<Record<string, unknown> | undefined> {\n // No usable request key (e.g. a direct unit invocation) → resolve uncached.\n if (executionContext === null || typeof executionContext !== 'object') {\n return loader();\n }\n let perRequest = labelForwardingRequestCache.get(executionContext as object);\n if (!perRequest) {\n perRequest = new Map();\n labelForwardingRequestCache.set(executionContext as object, perRequest);\n }\n let inFlight = perRequest.get(cacheKey);\n if (!inFlight) {\n inFlight = loader();\n perRequest.set(cacheKey, inFlight);\n }\n return inFlight;\n}\n\n/**\n * Build a VIRTUAL summary field that labels a row from a related resource per a\n * {@link LabelRelationDescriptor}. Drop it into a resource's main schema; the\n * frontend then references the field name in `getFrontendResourceLabel` (a plain,\n * synchronous field ref — no async resolver).\n *\n * The returned field is `isVirtual` (computed, never persisted; excluded from\n * request DTOs), `isSummaryField` (included in the SUMMARY DTO, so it is present\n * in LIST/collection rows, not only on READ), and `isHidden({ display: true })`\n * (it IS the row/title label, so it must never ALSO auto-render as a standalone\n * card field or table column — `detectSummaryFields` skips display-hidden fields;\n * the value still reaches the frontend label, which reads the field by name). At\n * read time the framework's\n * `VirtualFieldsBackendService` invokes the `calculate` below with the backend\n * `utils`. `calculate`:\n * 1. reads the join value from `currentObject[localField]`;\n * 2. resolves the related row via the related repository's system read\n * `findFieldValuesByJoinField` (the read-direction sibling of the search\n * join's `findSearchMatchTargetIds`), deduped per request (see\n * {@link resolveRelatedRowDeduped});\n * 3. renders the label via {@link renderForwardedLabel}.\n * Failure modes (missing value, unavailable repo, absent/empty related row) degrade\n * to the fallback chain — `descriptor.fallbackField`'s own-field value first, else\n * `descriptor.fallback`; `calculate` never throws.\n *\n * @remarks `dependencies: [localField]` is consumed by the repository DTO builder\n * (`repository-dto-builder.utils.ts`), which adds the dependency to the read\n * projection — so `calculate` receives the join value even when `localField` is\n * not itself a summary field. (On `organizationMembers`, `userId` is independently\n * a summary field too.)\n */\nexport function forwardedLabel(\n descriptor: LabelRelationDescriptor,\n): DecoratedPrimitiveZodType<z.ZodOptional<z.ZodString>> {\n const joinField = descriptor.relatedJoinField ?? '_id';\n\n return z\n .string()\n .optional()\n .isVirtual({\n dependencies: [descriptor.localField],\n calculate: async ({ currentObject, executionContext, utils }) => {\n const row = currentObject as Record<string, unknown> | undefined;\n\n // Fallback chain: prefer an own-field identifier (e.g. an immutable\n // `userEmail`) over the static string, so an unresolvable related label\n // degrades to a human value rather than a raw id. Applied on EVERY\n // non-resolution path (no join value, no repo, missing/empty related row).\n const resolveFallback = (): string => {\n if (descriptor.fallbackField) {\n const own = row?.[descriptor.fallbackField];\n if (own !== null && own !== undefined && String(own).trim().length > 0) {\n return String(own);\n }\n }\n return descriptor.fallback ?? '';\n };\n\n const rawValue = row?.[descriptor.localField];\n if (rawValue === null || rawValue === undefined || rawValue === '') {\n return resolveFallback();\n }\n const joinValue = String(rawValue);\n\n const relatedRepository = utils?.repositories?.getRepository?.(descriptor.relatedResource);\n if (!relatedRepository || typeof relatedRepository.findFieldValuesByJoinField !== 'function') {\n return resolveFallback();\n }\n\n const cacheKey = `${descriptor.relatedResource}|${joinField}|${joinValue}`;\n const relatedRow = await resolveRelatedRowDeduped(executionContext, cacheKey, async () => {\n // Fail-safe: a related-read error resolves to \"no row\" (→ fallback),\n // never a throw. Resolving (rather than rejecting) also keeps the\n // per-request dedup cache from storing a rejected promise that would\n // re-throw for every other row sharing this join value.\n try {\n const rowsByValue: Map<string, Record<string, unknown>> =\n await relatedRepository.findFieldValuesByJoinField(joinField, [joinValue], descriptor.fields);\n return rowsByValue.get(joinValue);\n } catch (error) {\n utils?.logger?.warn?.(\n `[forwardedLabel] related read failed for ${descriptor.relatedResource}.${joinField}=${joinValue}; using fallback`,\n error,\n );\n return undefined;\n }\n });\n\n // Render the related fields; if nothing renders, run the fallback chain\n // (own-field → static) — pass an empty static fallback to detect \"empty\".\n const rendered = renderForwardedLabel(relatedRow, { ...descriptor, fallback: '' });\n return rendered.length > 0 ? rendered : resolveFallback();\n },\n })\n .isSummaryField()\n .isHidden({ display: true });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"resources.shared.schemas.js","sourceRoot":"","sources":["../../../../src/resources/resources.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,qBAAqB,EACrB,+BAA+B,EAE/B,kBAAkB,GACnB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,2BAA2B,EAC3B,uCAAuC,GAExC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AAKxF;;;;GAIG;AACH,MAAM,CAAN,IAAY,0B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G,CAAC","sourcesContent":["/**\n * Operations Shared Schemas\n *\n * Reusable operation schemas for bulk actions and common operations\n */\n\nimport { z } from 'zod';\nimport type { DecoratedPrimitiveZodType } from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation,\n OPERATIONS_WITHOUT_REQUEST_BODY,\n ResourceType,\n ResourceTypeSchema,\n} from './resources.shared.core.definitions';\nimport { RelationshipContextPolicySchema } from './context-policy.shared.schemas';\nimport {\n ChildLifecycleMode,\n ChildLifecycleStrategy,\n ChildOperationsConfigSchema,\n ResourceRelationshipDiscriminatorSchema,\n type ChildOperationsConfig_Parsed,\n} from './child-operations.shared.schemas';\nimport { RelationshipDisplayConfigSchema } from './relationship-display.shared.schemas';\nimport { SchemaInfer } from './utils/schema-type-inference.utils';\n\nexport type { ResourceType } from './resources.shared.core.definitions';\n\n/**\n * @wildo_source:part:start saas.models.resource-operation-display-risk facet:layer:shared facet:family:resource-config\n *\n * Operation bar risk level and UI density (summary vs detail).\n */\nexport enum ResourceOperationRiskLevel {\n LOW = 'low',\n MEDIUM = 'medium',\n HIGH = 'high',\n CRITICAL = 'critical'\n}\n\n/**\n * Can this operation's effect be UNDONE by a later operation?\n *\n * ## Why this is not `riskLevel`, and what the conflation cost\n *\n * Risk answers *how much does this matter*. Reversibility answers *can I take it back*. They are\n * independent, and the framework had only the first — so the danger zone, which is the one surface\n * that exists to mark the point of no return, derived its membership from risk alone:\n * `isRiskyOperation(riskLevel) ? DANGER_ZONE : PRIMARY`.\n *\n * Measured 2026-09-19 over the framework's own resource definitions: 150 operation variants declare HIGH or CRITICAL,\n * and the owning verbs are **48 DELETE — and then 29 UPDATE_MANY, 14 CREATE, 9 UPDATE**, plus\n * `RESTORE`, `APPROVE`, `GRANT_OWNERSHIP`, `VERIFY_DOMAIN`, `CLAIM_DOMAIN` and `GENERATE_TOKEN`.\n * So a CREATE sat under a red button in a section headed \"Danger Zone\", and so did `RESTORE` —\n * an operation whose entire purpose is to UNDO a deletion.\n *\n * What a reader met on Administration → Entitlements was the pane's primary verb, **Edit**, rendered\n * as a red destructive button beneath \"This action may cause significant disruption and be difficult\n * to reverse\" — a sentence two of the three buttons beside it also carried, so it described none of\n * them. When everything is red, nothing is.\n *\n * ## The default is DERIVED, so almost nothing has to be authored\n *\n * `resolveOperationReversibility` reads this declaration when present and otherwise derives it from\n * `resourceOperationLike`: a DELETE-like operation is irreversible, everything else is reversible.\n * That covers the 53 DELETE / DELETE_MANY variants without touching them, and leaves an explicit\n * declaration for the handful of custom verbs whose name does not carry the answer — rotating a\n * secret, purging a queue, resetting a ledger.\n *\n * Declaring it is cheap and REVERSIBLE is never wrong to omit: the danger zone is now conjunctive\n * (risky AND irreversible), so an un-annotated custom verb keeps its red *variant* from its risk\n * level and simply stops being filed under a heading that promises permanence.\n */\nexport enum ResourceOperationReversibility {\n /**\n * A later operation can restore the prior state — update it back, re-enable it, restore it from\n * the deletion window. The act may still be serious; serious is what `riskLevel` is for.\n */\n REVERSIBLE = 'reversible',\n\n /**\n * Nothing in the product can undo it: the row is purged, the secret is replaced and the old one is\n * gone, the ledger is reset with no backup. This is what a danger zone exists to mark, and the\n * only thing that belongs in one.\n */\n IRREVERSIBLE = 'irreversible',\n}\n\n/**\n * The **frontend surface** of a resource operation — whether (and how) the\n * operation is presented in the UI. This is a per-app, per-operation DISPLAY\n * axis, orthogonal to authorization (roles remain the only security authority).\n *\n * Three mutually-exclusive surfaces:\n *\n * - `ADDRESSABLE` — the operation has a **URL-routable** view (a deep-linkable\n * page that lives in the navigation area; row-click resolves a route). Has an\n * action button.\n * - `EMBEDDED` — the operation has a view that is **not URL-addressable**: it has\n * no route of its own and is rendered **within a host**, however that host\n * surfaces it — as an overlay/drill-in when invoked standalone, or inline when\n * embedded in a composite view or a nested relationship view. Has an action\n * button. (This is what `notAddressable()` produces.) Named for the host\n * relationship, NOT one presentation: do not assume it always renders as an overlay.\n * - `API_ONLY` — the operation is **headless**: callable from frontend code as a\n * typed API, but has NO rendered interface at all (no page, no embedded view, no\n * action button). For operations driven by the system / a workflow / signup rather\n * than a user form (e.g. auto-created profiles, engine-authored state).\n *\n * `ADDRESSABLE` vs `EMBEDDED` is the URL-routability axis (both have a real view);\n * `API_ONLY` is the has-no-interface axis. The button-visibility axis\n * (`ActionVisibility`) is a further orthogonal refinement that only applies to the\n * two view surfaces.\n *\n * Authored on the frontend preset per operation via `addressable()` /\n * `notAddressable()` / `apiOnly()`; an operation may also declare a\n * `defaultFrontendPosture` so the framework defaults its surface when no app\n * preset surfaces it.\n *\n * Imported from `@wildo-ai/saas-models`.\n */\nexport enum ResourceOperationFrontendSurface {\n /** URL-routable view (deep-linkable page in the navigation area). */\n ADDRESSABLE = 'addressable',\n /** Non-addressable view rendered within a host — overlay/drill-in when standalone, inline when embedded in a composite or nested relationship view. */\n EMBEDDED = 'embedded',\n /** Headless — callable from code as an API, with no rendered interface at all. */\n API_ONLY = 'api_only',\n}\n\n/**\n * Display mode for resource operation action bars — controls operation bar density.\n * SUMMARY = compact row actions (icon-only, in list/table rows).\n *\n * Note: \"summary\" here is about *UI density*, not API data shape (see DataMode.SUMMARY)\n * or FK rendering (see ForeignKeyDisplayMode.SUMMARY).\n */\nexport enum ResourceOperationDisplayMode {\n /** In a list/table row — compact, icon-only, includes \"View Details\" */\n SUMMARY = 'summary',\n /** In a full read/detail view — can show inline labels */\n DETAIL = 'detail',\n}\n/** @wildo_source:part:end saas.models.resource-operation-display-risk */\n\n/**\n * @wildo_source:part:start saas.models.resource-primary-scope facet:layer:shared facet:family:resource-config\n *\n * Primary execution scope (org, user self, app, anonymous) + anonymous transposition policy.\n */\nexport enum ResourcePrimaryScope {\n USER_SELF = 'user_self',\n ORGANIZATIONS = 'organizations',\n APPLICATION = 'applications',\n ANONYMOUS = 'anonymous',\n}\n\n/**\n * W7.3a: Controls how anonymous resources are handled during transposition\n * (when an anonymous user registers/logs in as an authenticated user).\n *\n * A `MERGE` member — \"delegate to a custom service hook\" — was declared here until 2026-09-08 and\n * REMOVED because it never had one. `transposeOwnership` logged a warning and fell through to\n * `ADD`, so a resource selecting it got plain reassignment and no application merge logic ever ran.\n * It was selectable, validated, and silent: the shape this framework treats as a defect rather than\n * a gap. Nothing selected it, so removing it needed no migration.\n *\n * Identity merge is not foreclosed, but it is not a member of this enum: it needs a per-resource\n * hook that resolves conflicts an application defines, and a cross-resource transaction the\n * framework does not have (see the note in `users.shared.resources-config.schemas.ts`). Re-add a\n * member here when that primitive exists, not before.\n */\nexport enum ResourceTranspositionPolicy {\n /** Simply reassign ownership (anonymousUserId → userId). No conflict check. Default. */\n ADD = 'ADD',\n /** Delete the authenticated user's existing records of this type, then reassign anonymous ones. */\n REPLACE = 'REPLACE',\n /** Skip transposition entirely — anonymous records are not carried over. */\n DISCARD = 'DISCARD',\n}\n/** @wildo_source:part:end saas.models.resource-primary-scope */\n\n// ============================================================================\n// Primary Scope Field Mappings (Single Source of Truth)\n// ============================================================================\n\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from './resources.shared.core.definitions';\n\n/**\n * Map from ResourcePrimaryScope to the CoreResourceType it represents.\n * This is the foundation - other mappings derive from this.\n */\nexport const PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE: Record<ResourcePrimaryScope, CoreResourceType> = {\n [ResourcePrimaryScope.ORGANIZATIONS]: CoreResourceType.ORGANIZATIONS,\n [ResourcePrimaryScope.USER_SELF]: CoreResourceType.USERS,\n [ResourcePrimaryScope.APPLICATION]: CoreResourceType.APPLICATION,\n [ResourcePrimaryScope.ANONYMOUS]: CoreResourceType.ANONYMOUS_USERS,\n};\n\n/**\n * Map from ResourcePrimaryScope to its field identifier.\n * Uses coreResourceShared_FieldIdentifier as the source of truth for field names.\n */\nexport const PRIMARY_SCOPE_TO_FIELD_IDENTIFIER: Record<ResourcePrimaryScope, string> = {\n [ResourcePrimaryScope.ORGANIZATIONS]: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATIONS],\n [ResourcePrimaryScope.USER_SELF]: coreResourceShared_FieldIdentifier[CoreResourceType.USERS],\n [ResourcePrimaryScope.APPLICATION]: coreResourceShared_FieldIdentifier[CoreResourceType.APPLICATION],\n [ResourcePrimaryScope.ANONYMOUS]: coreResourceShared_FieldIdentifier[CoreResourceType.ANONYMOUS_USERS],\n};\n\n/**\n * Primary scope field identifiers - auto-populated from execution context.\n * These fields should be excluded from CREATE/UPDATE DTOs because they are\n * automatically injected by the backend based on the authenticated user's context.\n *\n * Derived from PRIMARY_SCOPE_TO_FIELD_IDENTIFIER values.\n */\nexport const PRIMARY_SCOPE_FIELD_IDENTIFIERS = Object.values(PRIMARY_SCOPE_TO_FIELD_IDENTIFIER) as readonly string[];\nexport type PrimaryScopeFieldIdentifier = (typeof PRIMARY_SCOPE_FIELD_IDENTIFIERS)[number];\n\n/**\n * Field identifiers the framework AUTO-POPULATES on a write and therefore omits\n * from every client-shaped CREATE/UPDATE request DTO — the primary-scope FKs\n * (`organizationId` / `applicationId` / `userId` / `anonymousUserId`, injected\n * from the execution context) PLUS the audit FK `createdByUserId` (stamped by\n * the repository from the initiator). A client is never allowed to author these;\n * the auto-derivation strips them by NAME (see\n * `resources-config-operations.dtos-builder.utils.ts` — `applyCreate/UpdateOmissionsToSchema`).\n *\n * Single source of truth: the DTO builder consumes this for its omit list, and\n * `deriveTrustedSystemWritePreservedFields` consumes it to know which\n * name-stripped fields a TRUSTED in-process system write (via\n * `SystemAccessBackendService.createAsSystem` / `updateAsSystem`) must re-attach.\n * Keeping both consumers on one const prevents the two lists from drifting.\n *\n * NOTE: intentionally EXCLUDES `_id` / `createdAt` / `updatedAt` / `deletedAt` —\n * those are timestamp/PK fields handled by `createOrUpdateMandatoryDiscardFields`\n * (force-removed before validation), never re-attached by a trusted write.\n */\nexport const CONTEXT_AUTO_POPULATED_FIELD_IDENTIFIERS: readonly string[] = [\n 'createdByUserId',\n ...PRIMARY_SCOPE_FIELD_IDENTIFIERS,\n];\n\n/**\n * Map from field identifier to ResourcePrimaryScope.\n * Built by inverting PRIMARY_SCOPE_TO_FIELD_IDENTIFIER.\n */\nexport const FIELD_IDENTIFIER_TO_PRIMARY_SCOPE: Record<string, ResourcePrimaryScope> = Object.fromEntries(\n Object.entries(PRIMARY_SCOPE_TO_FIELD_IDENTIFIER).map(([scope, field]) => [field, scope as ResourcePrimaryScope])\n);\n\n/**\n * Map from ResourcePrimaryScope to the CoreResourceType(s) it represents.\n * Returns as array for compatibility (though each scope maps to a single type).\n */\nexport const PRIMARY_SCOPE_TO_RESOURCE_TYPES: Record<ResourcePrimaryScope, CoreResourceType[]> = {\n [ResourcePrimaryScope.ORGANIZATIONS]: [PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE[ResourcePrimaryScope.ORGANIZATIONS]],\n [ResourcePrimaryScope.USER_SELF]: [PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE[ResourcePrimaryScope.USER_SELF]],\n [ResourcePrimaryScope.APPLICATION]: [PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE[ResourcePrimaryScope.APPLICATION]],\n [ResourcePrimaryScope.ANONYMOUS]: [PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE[ResourcePrimaryScope.ANONYMOUS]],\n};\n\n/**\n * Get the field identifier for a primary scope.\n */\nexport function getPrimaryScopeFieldIdentifier(primaryScope: ResourcePrimaryScope): string {\n return PRIMARY_SCOPE_TO_FIELD_IDENTIFIER[primaryScope];\n}\n\n// ============================================================================\n// Billing Scope → Resource Type Mapping\n// ============================================================================\n\n/**\n * The 2 scopes that have billing polymorphic variants.\n * APPLICATION scope is intentionally absent — it has no billing variants;\n * scope-agnostic billing resources (Products, Prices, etc.) are not per-scope.\n */\nexport const BILLING_SCOPES: readonly ResourcePrimaryScope[] = [\n ResourcePrimaryScope.ORGANIZATIONS,\n ResourcePrimaryScope.USER_SELF,\n] as const;\n\n/**\n * Per-scope billing resource types.\n * Maps each billing scope to the set of polymorphic resource type variants\n * that belong to it. Used to selectively exclude disabled scopes while\n * keeping enabled scopes and scope-agnostic resources (Products, Prices, etc.).\n */\nexport const BILLING_SCOPE_RESOURCE_TYPES: Readonly<Partial<Record<ResourcePrimaryScope, ReadonlySet<CoreResourceType>>>> = {\n [ResourcePrimaryScope.ORGANIZATIONS]: new Set([\n CoreResourceType.ORGANIZATION_BILLING_ACCOUNTS,\n CoreResourceType.ORGANIZATION_SUBSCRIPTIONS,\n CoreResourceType.ORGANIZATION_INVOICE_REFS,\n CoreResourceType.ORGANIZATION_USAGE_RECORDS,\n CoreResourceType.ORGANIZATION_CREDIT_POOLS,\n ]),\n [ResourcePrimaryScope.USER_SELF]: new Set([\n CoreResourceType.USER_BILLING_ACCOUNTS,\n CoreResourceType.USER_SUBSCRIPTIONS,\n CoreResourceType.USER_INVOICE_REFS,\n CoreResourceType.USER_USAGE_RECORDS,\n CoreResourceType.USER_CREDIT_POOLS,\n ]),\n};\n\n/**\n * Get the primary scope for a field identifier.\n * Returns undefined if the field is not a primary scope field.\n */\nexport function getPrimaryScopeFromFieldIdentifier(fieldIdentifier: string): ResourcePrimaryScope | undefined {\n return FIELD_IDENTIFIER_TO_PRIMARY_SCOPE[fieldIdentifier];\n}\n\n/**\n * Check if a field identifier is a primary scope field.\n */\nexport function isPrimaryScopeFieldIdentifier(fieldIdentifier: string): fieldIdentifier is PrimaryScopeFieldIdentifier {\n return PRIMARY_SCOPE_FIELD_IDENTIFIERS.includes(fieldIdentifier as PrimaryScopeFieldIdentifier);\n}\n\n/**\n * @wildo_source:part:start saas.models.resource-relationship-cardinality facet:layer:shared facet:family:resource-config\n *\n * Cardinality literals plus helpers (`isOneToOneCardinality`, `isArrayCardinality`).\n */\nexport enum ResourceRelationshipCardinality {\n ONE = 'one',\n ZERO_OR_ONE = 'zero_or_one',\n ONE_OR_MANY = 'one_or_many',\n MANY = 'many',\n}\n\n/**\n * Check if a cardinality represents a 1:1 relationship (single object).\n * Both `ONE` (mandatory) and `ZERO_OR_ONE` (optional) are single-object cardinalities.\n *\n * Use this utility instead of checking `=== ONE` directly, to avoid\n * the common bug of missing `ZERO_OR_ONE` (optional 1:1) handling.\n *\n * Determines:\n * - DTO shape: single optional object (not array)\n * - Nested field naming: singular (e.g., \"profile\" not \"profiles\")\n * - Fetch strategy: READ (not LIST)\n * - URL path: singular entity path\n */\nexport function isOneToOneCardinality(cardinality: ResourceRelationshipCardinality): boolean {\n return cardinality === ResourceRelationshipCardinality.ONE ||\n cardinality === ResourceRelationshipCardinality.ZERO_OR_ONE;\n}\n\n/**\n * Check if a cardinality represents a 1:N relationship (array/collection).\n * Both `MANY` (zero or more) and `ONE_OR_MANY` (at least one) are array cardinalities.\n *\n * Use this utility instead of checking `=== MANY` directly, to avoid\n * the common bug of missing `ONE_OR_MANY` (mandatory at-least-one) handling.\n *\n * Determines:\n * - DTO shape: array of objects\n * - Nested field naming: plural (e.g., \"tasks\" not \"task\")\n * - Fetch strategy: LIST\n * - URL path: collection path\n */\nexport function isArrayCardinality(cardinality: ResourceRelationshipCardinality): boolean {\n return cardinality === ResourceRelationshipCardinality.MANY ||\n cardinality === ResourceRelationshipCardinality.ONE_OR_MANY;\n}\n/** @wildo_source:part:end saas.models.resource-relationship-cardinality */\n\n/**\n * @wildo_source:part:start saas.models.resource-operation-variant-runtime facet:layer:shared facet:family:resource-config\n *\n * How an operation variant is invoked and executed (API, cron, repository-only, …).\n */\nexport enum ResourceOperationVariantType {\n API_CALL = \"api_call\",\n API_CALL_WITH_CALLBACK = \"api_call_with_callback\",\n CRON_JOB = \"cron_job\",\n BATCH_JOB = \"batch_job\",\n INTERNAL_CALL = \"internal_call\",\n REPOSITORY_ONLY = \"repository_only\",\n}\n\nexport enum ResourceOperation_ServiceRuntimeMode {\n INLINE = \"inline\",\n INLINE_NOT_AWAITABLE = \"inline_not_awaitable\",\n BACKGROUND_JOB = \"background_job\",\n QUEUED = \"queued\",\n QUEUED_NOT_AWAITABLE = \"queued_not_awaitable\",\n NONE = \"none\",\n}\n\nexport enum ResourceOperation_CustomServiceImplementationMode {\n OVERRIDE_ALL = \"override_all\",\n /**\n * Runs OUTSIDE any database transaction, after preflight and before the transactional core (#535).\n *\n * The one phase that may perform an external effect whose outcome must feed the core write — a payment provider\n * call, for example — because the transactional core's callback can be retried by the database driver and must\n * never repeat such an effect. Single-owner; requires `transactionalCore: true`; refused inside a caller-owned\n * transaction. It returns either a patch merged into the core input plus a continuation the core phases read, or\n * `ALREADY_COMPLETED`, which skips core persistence, managed post-commit effects and token consumption, applies the\n * synchronous terminal result transforms, and answers the stored state.\n */\n BEFORE_TRANSACTIONAL_CORE = \"before_transactional_core\",\n PREFIX_CORE_OPERARTIONS = \"prefix_core_operations\",\n POSTFIX_CORE_OPERARTIONS = \"postfix_core_operations\",\n REPLACE_CORE_OPERARTIONS = \"between_core_operations\",\n AFTER_USER_NOTIFICATIONS = \"after_user_notifications\",\n AT_THE_END = \"at_the_end\",\n}\n\n/** @wildo_source:part:start saas.backend.custom-operation.transactional-core facet:layer:shared facet:family:resource-operation */\n/**\n * Who delivers an operation occurrence's post-commit effects: its resource-operation audit row and its notifications\n * (resource-room broadcast and configured notifications).\n *\n * The framework delivers them after commit on a best-effort basis: a crash between the commit and the effects loses\n * them. An operation whose effects must survive that crash declares `IMPLEMENTATION_OUTBOX` on its custom\n * implementation. The implementation then writes the effects to its own outbox inside the operation's transaction, and\n * the framework does not deliver them itself, so each is delivered once, by the outbox (#535).\n *\n * Reserved for engine-owned writers whose outbox an engine relay delivers. There is no application-facing delivery\n * surface: an application declaring `IMPLEMENTATION_OUTBOX` would suppress its own audit rows and notifications with\n * nothing to deliver them.\n */\nexport enum ResourceOperation_PostCommitEffectOwnership {\n /** The framework emits the audit row and dispatches notifications after commit. The default. */\n FRAMEWORK = \"framework\",\n /**\n * The custom implementation owns them: it captures their inputs inside the transactional core and enqueues them in\n * that same transaction. The framework suppresses its own emission for the occurrence. Resource post-operation hooks\n * still run and are told the ownership, so a hook whose work the outbox owns can stand down.\n *\n * Requires `transactionalCore: true`, because the enqueue must commit with the change. Refused for an operation that\n * generates a consumable token, because a replayed notification would need the token's secret persisted.\n */\n IMPLEMENTATION_OUTBOX = \"implementation_outbox\",\n}\n/** @wildo_source:part:end saas.backend.custom-operation.transactional-core */\n\nexport enum ResourceParentResourceRequirement {\n MANDATORY = \"mandatory\",\n OPTIONAL = \"optional\",\n}\n\nexport enum ResourceOperation_InputPolicy {\n DEFAULT = \"default\",\n CUSTOM = \"custom\",\n}\n\nexport enum ResourceOperation_OutputPolicy {\n DEFAULT = \"default\",\n CUSTOM = \"custom\",\n SUMMARY = \"summary\",\n CONTEXT = \"context\",\n}\n/** @wildo_source:part:end saas.models.resource-operation-variant-runtime */\n\n\n\n/**\n * @wildo_source:part:start saas.models.resource-relationship-access-scope facet:layer:shared facet:family:resource-config\n *\n * Route/service access strategy for a relationship (nested vs standalone URLs).\n */\n/*\n accessScopeStrategy defines how a related resource should be accessed in service, controller, and route generation:\nREQUIRES_CONTEXT: the resource must be accessed within the context of its parent (e.g. nested route, scoped service)\nOPTIONAL_CONTEXT: the resource can be accessed either within its parent context or independently.\nSTANDALONE: the resource must be accessed independently, even if a parent relationship exists.\n */\nexport enum ResourceRelationshipAccessScopeStrategy {\n REQUIRES_CONTEXT = \"requires_context\",\n OPTIONAL_CONTEXT = \"optional_context\",\n STANDALONE = \"standalone\",\n}\n/** @wildo_source:part:end saas.models.resource-relationship-access-scope */\n\n/**\n * @wildo_source:part:start saas.models.relationship-nature-and-models facet:layer:shared facet:family:resource-config\n *\n * High-level semantic kind of relationship.\n *\n * This is the primary shared meaning. Resolver/runtime layers may later derive\n * engine-facing handling from it, but the declaration should start here rather\n * than from low-level DTO or lifecycle toggles.\n *\n * Developer-facing interpretation:\n *\n * - `COMPOSITION`\n * The parent owns an aggregate boundary around the child. The relationship is\n * about parent-managed nested resources. Child lifecycle is typically\n * dependent on the parent, and nested create/update/delete is the natural UX.\n *\n * - `REFERENCE`\n * The current resource points to another independent resource. The default UX\n * is \"select existing / clear / navigate\". A future \"quick create\" shortcut\n * may exist, but it still means \"create independent resource, then set the\n * reference\" rather than aggregate-managed nested creation.\n *\n * - `ASSOCIATION`\n * The current resource is linked to peer resources through membership/link\n * semantics. The default UX is \"link / unlink / replace peer set\". A future\n * \"quick create\" shortcut may exist, but it still means \"create independent\n * peer, then link it\" rather than treating the peer as an owned child.\n *\n * Important rule:\n * - \"quick create\" is a frontend workflow capability layered on top of a\n * relationship, not a fourth relationship nature.\n */\nexport enum RelationshipNature {\n COMPOSITION = 'composition',\n REFERENCE = 'reference',\n ASSOCIATION = 'association',\n}\n\n/**\n * Parent-surface DTO model implied by relationship semantics.\n *\n * This tells the framework what kind of shape the parent-facing interaction\n * should expose:\n * - `NESTED_RESOURCE` → full nested child payloads\n * - `REFERENCE_HANDLE` → handle/pointer semantics to an independent resource\n * - `ASSOCIATION_HANDLE` → peer membership/link semantics\n */\nexport enum RelationshipDtoModel {\n NESTED_RESOURCE = 'nested_resource',\n REFERENCE_HANDLE = 'reference_handle',\n ASSOCIATION_HANDLE = 'association_handle',\n}\n\n/**\n * Parent-driven mutation semantics for the relationship.\n *\n * Interpretation:\n * - `AGGREGATE_MANAGED` → parent can orchestrate nested child CRUD\n * - `REFERENCE_MANAGED` → parent mutates only the reference handle/pointer\n * - `ASSOCIATION_MANAGED` → parent mutates membership/link state to peers\n * - `NONE` → no parent-driven relationship-object mutation contract\n */\nexport enum RelationshipMutationModel {\n AGGREGATE_MANAGED = 'aggregate_managed',\n REFERENCE_MANAGED = 'reference_managed',\n ASSOCIATION_MANAGED = 'association_managed',\n NONE = 'none',\n}\n\n/**\n * Lifecycle dependency semantics between the parent and the related element.\n *\n * This is about dependency, not frontend chrome:\n * - `DEPENDENT` → child lifecycle follows parent ownership\n * - `INDEPENDENT` → related resource lives independently\n * - `LINK_ONLY` → only the relationship membership/link is owned here\n */\nexport enum RelationshipLifecycleModel {\n DEPENDENT = 'dependent',\n INDEPENDENT = 'independent',\n LINK_ONLY = 'link_only',\n}\n\n/**\n * Shared read intent for the relationship.\n *\n * Important: this is NOT the same semantic plane as `DataMode`,\n * `ContextPolicy_ObjectMode`, or `childOperations.nested.onRead`.\n * It is the high-level engine-facing read intent that later resolver steps may\n * project into those operational surfaces where the meaning is truly identical.\n *\n * Interpretation:\n * - `EMBEDDED` → read as an owned nested child/children\n * - `REFERENCE_ONLY` → read as a pointer/reference surface\n * - `ASSOCIATION_EMBEDDED` → read as associated peers, while preserving peer\n * semantics rather than collapsing them into composition\n */\nexport enum RelationshipReadModel {\n EMBEDDED = 'embedded',\n REFERENCE_ONLY = 'reference_only',\n ASSOCIATION_EMBEDDED = 'association_embedded',\n}\n/** @wildo_source:part:end saas.models.relationship-nature-and-models */\n\n/**\n * @wildo_source:part:start saas.models.relationship-handling-settings facet:layer:shared facet:family:resource-config\n *\n * Explicit semantic read contract for a relationship.\n *\n * This answers the semantic question \"how should this relationship read?\" and\n * intentionally stays separate from the low-level nested projection in\n * `childOperations.nested.onRead`, which still carries payload-shaping details\n * like `dataMode`, list behavior, limits, and sort order.\n */\nexport const RelationshipHandlingReadSettingsSchema = z.object({\n model: z.enum(RelationshipReadModel),\n});\nexport type RelationshipHandlingReadSettings = z.infer<typeof RelationshipHandlingReadSettingsSchema>;\n\n/**\n * Narrow mutation refinements under the semantic handling contract.\n *\n * These are still low-level operational hints, not a replacement for\n * `nature` or the top-level handling models.\n */\nexport const RelationshipHandlingMutationSettingsSchema = z.object({\n allowParentCreate: z.boolean().optional(),\n allowParentUpdate: z.boolean().optional(),\n allowParentDelete: z.boolean().optional(),\n maxDepth: z.number().int().min(0).optional(),\n});\nexport type RelationshipHandlingMutationSettings = z.infer<typeof RelationshipHandlingMutationSettingsSchema>;\n\n/**\n * Narrow lifecycle refinements under the semantic handling contract.\n */\nexport const RelationshipHandlingLifecycleOnParentDeleteSettingsSchema = z.object({\n enabled: z.boolean().optional(),\n /**\n * Execution TIMING of the cascade: `IMMEDIATE` inside the parent's own transaction, or `LAZY`\n * deferred onto the background queue.\n *\n * ⚠️ **The two axes are NOT fully orthogonal — one combination refuses.** `LAZY` is implemented for\n * the `DELETE` strategy only. Declaring `LAZY` beside `IMPERSONALIZE_AND_RETAIN` type-checks,\n * configures, boots, and THROWS when a parent is actually deleted, because an asynchronous\n * retain-and-scrub does not exist yet and the alternatives are both unacceptable (hard-deleting the\n * child loses data the strategy exists to keep; skipping the scrub leaves personal data behind).\n *\n * | | `IMMEDIATE` | `LAZY` |\n * |---|---|---|\n * | `DELETE` | teardown inside the parent's transaction | deferred to the queue |\n * | `IMPERSONALIZE_AND_RETAIN` | scrub + keep, direct children only | **refuses at cascade time** |\n *\n * What `LAZY` changes, and what it does not: the teardown is re-derived from the parent's CURRENT\n * configuration when the job runs and goes through the same path `IMMEDIATE` uses, so grandchild\n * recursion, file teardown and retrieval-chunk removal all still happen. It moves WHEN the teardown\n * happens, never whether it happens — and if the job cannot be enqueued the parent's delete fails\n * rather than silently orphaning the children.\n *\n * Omitted ⇒ `IMMEDIATE`.\n */\n mode: z.enum(ChildLifecycleMode).optional(),\n /**\n * What the cascade DOES to the child — hard-delete vs impersonalize-and-retain (scrub the personal\n * fields, keep the row for a legal/audit obligation). Carried on the derived semantic contract so a\n * consumer reading `handling.lifecycle.onParentDelete` can tell the two apart; omitting it here\n * would merge two semantically distinct teardowns, which is exactly what splitting this axis from\n * `mode` exists to prevent.\n */\n strategy: z.enum(ChildLifecycleStrategy).optional(),\n maxDepth: z.number().int().min(0).optional(),\n});\nexport type RelationshipHandlingLifecycleOnParentDeleteSettings = z.infer<typeof RelationshipHandlingLifecycleOnParentDeleteSettingsSchema>;\n\nexport const RelationshipHandlingLifecycleSettingsSchema = z.object({\n onParentDelete: RelationshipHandlingLifecycleOnParentDeleteSettingsSchema.optional(),\n});\nexport type RelationshipHandlingLifecycleSettings = z.infer<typeof RelationshipHandlingLifecycleSettingsSchema>;\n/** @wildo_source:part:end saas.models.relationship-handling-settings */\n\n/**\n * Explicit multi-target relationship actions.\n *\n * These actions are intentionally narrower than generic nested CRUD replay:\n * - `SET` / `CLEAR` target reference relationships from the current resource as child\n * - `CREATE` targets composition relationships from the current resource as parent\n * - `LINK` / `UNLINK` target peer associations while keeping junction-row\n * persistence an internal implementation detail\n * - `REPLACE` atomically expresses the desired peer set for association-backed\n * form controls without forcing the client to orchestrate unlink/link diffs\n */\nexport enum ResourceRelationshipBulkAction {\n SET = 'set',\n CLEAR = 'clear',\n CREATE = 'create',\n LINK = 'link',\n UNLINK = 'unlink',\n REPLACE = 'replace',\n}\n\nexport const ResourceRelationshipBulkOperationIdentifierPrefix = {\n [ResourceRelationshipBulkAction.SET]: 'bulk_set_',\n [ResourceRelationshipBulkAction.CLEAR]: 'bulk_clear_',\n [ResourceRelationshipBulkAction.CREATE]: 'bulk_create_',\n [ResourceRelationshipBulkAction.LINK]: 'bulk_link_',\n [ResourceRelationshipBulkAction.UNLINK]: 'bulk_unlink_',\n [ResourceRelationshipBulkAction.REPLACE]: 'bulk_replace_',\n} as const;\n\nexport const ResourceRelationshipBulkSetActionRequestSchema = z.object({\n relationshipField: z.string().min(1),\n action: z.literal(ResourceRelationshipBulkAction.SET),\n targetId: z.string().min(1),\n});\nexport type ResourceRelationshipBulkSetActionRequest = z.infer<typeof ResourceRelationshipBulkSetActionRequestSchema>;\n\nexport const ResourceRelationshipBulkClearActionRequestSchema = z.object({\n relationshipField: z.string().min(1),\n action: z.literal(ResourceRelationshipBulkAction.CLEAR),\n});\nexport type ResourceRelationshipBulkClearActionRequest = z.infer<typeof ResourceRelationshipBulkClearActionRequestSchema>;\n\nexport const ResourceRelationshipBulkCreateActionRequestSchema = z.object({\n relationshipField: z.string().min(1),\n action: z.literal(ResourceRelationshipBulkAction.CREATE),\n data: z.record(z.string(), z.any()).refine(\n (data) => Object.keys(data).length > 0,\n 'data must not be empty'\n ),\n});\nexport type ResourceRelationshipBulkCreateActionRequest = z.infer<typeof ResourceRelationshipBulkCreateActionRequestSchema>;\n\nexport const ResourceRelationshipBulkLinkActionRequestSchema = z.object({\n relationshipField: z.string().min(1),\n action: z.literal(ResourceRelationshipBulkAction.LINK),\n peerIds: z.array(z.string().min(1)).min(1),\n});\nexport type ResourceRelationshipBulkLinkActionRequest = z.infer<typeof ResourceRelationshipBulkLinkActionRequestSchema>;\n\nexport const ResourceRelationshipBulkUnlinkActionRequestSchema = z.object({\n relationshipField: z.string().min(1),\n action: z.literal(ResourceRelationshipBulkAction.UNLINK),\n peerIds: z.array(z.string().min(1)).min(1),\n});\nexport type ResourceRelationshipBulkUnlinkActionRequest = z.infer<typeof ResourceRelationshipBulkUnlinkActionRequestSchema>;\n\nexport const ResourceRelationshipBulkReplaceActionRequestSchema = z.object({\n relationshipField: z.string().min(1),\n action: z.literal(ResourceRelationshipBulkAction.REPLACE),\n peerIds: z.array(z.string().min(1)),\n});\nexport type ResourceRelationshipBulkReplaceActionRequest = z.infer<typeof ResourceRelationshipBulkReplaceActionRequestSchema>;\n\nexport const ResourceRelationshipBulkActionRequestSchema = z.discriminatedUnion('action', [\n ResourceRelationshipBulkSetActionRequestSchema,\n ResourceRelationshipBulkClearActionRequestSchema,\n ResourceRelationshipBulkCreateActionRequestSchema,\n ResourceRelationshipBulkLinkActionRequestSchema,\n ResourceRelationshipBulkUnlinkActionRequestSchema,\n ResourceRelationshipBulkReplaceActionRequestSchema,\n]);\nexport type ResourceRelationshipBulkActionRequest = z.infer<typeof ResourceRelationshipBulkActionRequestSchema>;\n\nconst ResourceRelationshipBulkFilterSelectorSchema = z.object({\n filter: z.record(z.string(), z.any()).refine(\n (filter) => Object.keys(filter).length > 0,\n 'filter must not be empty'\n ),\n _ids: z.undefined().optional(),\n});\n\nconst ResourceRelationshipBulkIdsSelectorSchema = z.object({\n _ids: z.array(z.string().min(1)).min(1),\n filter: z.undefined().optional(),\n});\n\n/**\n * Public request selector for explicit bulk relationship operations.\n *\n * Unlike the legacy bulk DTO base, this selector intentionally supports either:\n * - `_ids` for UI-driven selection over a finite checked list\n * - `filter` for backend/automation-driven targeting over a query\n *\n * The exposed operation surface stays one-selector / one-action / one-payload.\n */\nexport const ResourceRelationshipBulkOperationSelectorSchema = z.union([\n ResourceRelationshipBulkIdsSelectorSchema,\n ResourceRelationshipBulkFilterSelectorSchema,\n]);\nexport type ResourceRelationshipBulkOperationSelector = z.infer<typeof ResourceRelationshipBulkOperationSelectorSchema>;\n\nexport const ResourceRelationshipBulkSetOperationRequestSchema =\n ResourceRelationshipBulkOperationSelectorSchema.and(\n z.object({\n targetId: z.string().min(1),\n })\n );\nexport type ResourceRelationshipBulkSetOperationRequest = z.infer<typeof ResourceRelationshipBulkSetOperationRequestSchema>;\n\nexport const ResourceRelationshipBulkClearOperationRequestSchema =\n ResourceRelationshipBulkOperationSelectorSchema;\nexport type ResourceRelationshipBulkClearOperationRequest = z.infer<typeof ResourceRelationshipBulkClearOperationRequestSchema>;\n\nexport const ResourceRelationshipBulkCreateOperationRequestSchema =\n ResourceRelationshipBulkOperationSelectorSchema.and(\n z.object({\n data: z.record(z.string(), z.any()).refine(\n (data) => Object.keys(data).length > 0,\n 'data must not be empty'\n ),\n })\n );\nexport type ResourceRelationshipBulkCreateOperationRequest = z.infer<typeof ResourceRelationshipBulkCreateOperationRequestSchema>;\n\nexport const ResourceRelationshipBulkLinkOperationRequestSchema =\n ResourceRelationshipBulkOperationSelectorSchema.and(\n z.object({\n peerIds: z.array(z.string().min(1)).min(1),\n })\n );\nexport type ResourceRelationshipBulkLinkOperationRequest = z.infer<typeof ResourceRelationshipBulkLinkOperationRequestSchema>;\n\nexport const ResourceRelationshipBulkUnlinkOperationRequestSchema =\n ResourceRelationshipBulkOperationSelectorSchema.and(\n z.object({\n peerIds: z.array(z.string().min(1)).min(1),\n })\n );\nexport type ResourceRelationshipBulkUnlinkOperationRequest = z.infer<typeof ResourceRelationshipBulkUnlinkOperationRequestSchema>;\n\nexport const ResourceRelationshipBulkReplaceOperationRequestSchema =\n ResourceRelationshipBulkOperationSelectorSchema.and(\n z.object({\n peerIds: z.array(z.string().min(1)),\n })\n );\nexport type ResourceRelationshipBulkReplaceOperationRequest = z.infer<typeof ResourceRelationshipBulkReplaceOperationRequestSchema>;\n\nexport const ResourceRelationshipBulkActionResultSchema = z.object({\n relationshipField: z.string().min(1),\n action: z.enum(ResourceRelationshipBulkAction),\n matchedTargetIds: z.array(z.string()),\n affectedCount: z.number().int().min(0),\n results: z.array(z.any()),\n});\nexport type ResourceRelationshipBulkActionResult = z.infer<typeof ResourceRelationshipBulkActionResultSchema>;\n\n/**\n * @wildo_source:part:start saas.models.relationship-handling-contract facet:layer:shared facet:family:resource-config\n *\n * Fully resolved relationship handling contract.\n *\n * This describes the engine-facing semantic handling after `nature` has been\n * resolved. The `read` block is the semantic source of truth, while\n * `childOperations.nested.onRead` remains the low-level operational projection\n * for payload shaping.\n */\nexport const RelationshipHandlingContractSchema = z.object({\n dtoModelMode: z.enum(RelationshipDtoModel),\n mutationModelMode: z.enum(RelationshipMutationModel),\n lifecycleModelMode: z.enum(RelationshipLifecycleModel),\n readModelMode: z.enum(RelationshipReadModel),\n read: RelationshipHandlingReadSettingsSchema,\n mutation: RelationshipHandlingMutationSettingsSchema.optional(),\n lifecycle: RelationshipHandlingLifecycleSettingsSchema.optional(),\n});\nexport type RelationshipHandlingContract = z.infer<typeof RelationshipHandlingContractSchema>;\n/** @wildo_source:part:end saas.models.relationship-handling-contract */\n\nexport const RelationshipPersistenceForeignKeyContractSchema = z.object({\n fieldIdentifier: z.string().min(1),\n /**\n * The resource that OWNS the FK column (the \"holder\") — the side whose\n * documents/rows physically carry `fieldIdentifier`.\n *\n * Resolved from cardinality topology (the collection side of a 1:N carries\n * the FK; 1:1 falls back to the parent-first child convention =\n * `resourceType2`; self-references hold their own FK). Declaration order is\n * NOT a holder signal: parent-first `(ORGANIZATIONS, TODOS, ONE, MANY)` and\n * child-first `(TODOS, USERS, MANY, ONE)` are both valid authoring shapes,\n * and a positional `resourceType2` read materializes the FK onto the\n * referenced TARGET of every child-first relationship (e.g. `users` growing\n * a required `assignedToUserId`/`postedByUserId` column) instead of the\n * holder. Storage adapters MUST gate FK materialization/validation on\n * `holderResourceType === <resource under build>`, never on positional\n * `resourceType1`/`resourceType2` checks.\n */\n holderResourceType: ResourceTypeSchema,\n isArray: z.boolean(),\n materializeField: z.boolean(),\n required: z.boolean(),\n unique: z.boolean(),\n});\nexport type RelationshipPersistenceForeignKeyContract = z.infer<typeof RelationshipPersistenceForeignKeyContractSchema>;\n\nexport const RelationshipPersistenceContractSchema = z.object({\n foreignKey: RelationshipPersistenceForeignKeyContractSchema.optional(),\n});\nexport type RelationshipPersistenceContract = z.infer<typeof RelationshipPersistenceContractSchema>;\n\nexport const ResourceRelationshipBaseSchema = z.object({\n resourceType1: ResourceTypeSchema,\n resourceType2: ResourceTypeSchema,\n});\nexport type ResourceRelationshipBase = z.infer<typeof ResourceRelationshipBaseSchema>;\n\n/**\n * @wildo_source:part:start saas.models.scope-membership facet:layer:shared facet:family:resource-config\n *\n * Write-time scope confinement of a REFERENCE foreign key — the STRUCTURE half.\n *\n * A lateral `REFERENCE` FK to a target that is NOT itself tenant-scoped — a `users` id on an\n * org-scoped row, another `organizations` id — carries no `organizationId` column to compare, so the\n * ordinary write-integrity tenant check can only confirm the target EXISTS, never that it belongs to\n * the writer's tenant. That admits a cross-tenant reference (assign a todo to a user from another org).\n * Declaring `scopeMembership` closes it: the referenced target must have a row in a junction linking it\n * to the writing row's scope — enforced on CREATE and UPDATE, refused with `404` (identical to the\n * existing cross-tenant refusal, so nothing leaks).\n *\n * **This type carries STRUCTURE ONLY — which junction, and which columns.** It is a fact about the data\n * shape, uniform across every write. The POLICY half (status / role / field tightening, or disabling)\n * varies per operation VARIANT and therefore lives on the operation config as `referenceConstraints`\n * (see {@link ReferenceScopeConstraintSchema}) — beside the caller-side `roles`, where authorization\n * already lives. Keeping them apart is what stops a relationship from growing its own per-variant\n * authorization table duplicating the operation/variant structure.\n *\n * Fully OPT-IN: a relationship without `scopeMembership` keeps its existing existence-only behavior.\n */\nexport const ScopeMembershipStructureSchema = z.object({\n /**\n * The writing row's scope field whose value the target must be a member of. Defaults to the\n * resource's primary-scope FK (e.g. `organizationId`). Set only when the confining scope is a\n * non-primary field.\n */\n scopeField: z.string().optional(),\n /**\n * The junction resource linking scope → target (e.g. `organizationMembers`, `organizationPartnerships`).\n * Omit to auto-resolve from the registry's `(target, scope)` M:N scope-junction map — which works when\n * the junction's two sides are DIFFERENT resource types (organizations ↔ users). Name it explicitly for\n * a SELF-REFERENTIAL junction (organizations ↔ organizations), which the map does not infer.\n */\n junction: ResourceTypeSchema.optional(),\n /**\n * The junction column holding the SCOPE id (the writer's tenant), e.g. `organizationId`.\n *\n * Needed only when convention cannot pick it: for a self-referential junction both columns have the\n * same resource type, so the guard takes the column NAMED LIKE the writing row's scope field as the\n * scope side and the other same-typed column as the target side. Set this (with\n * {@link junctionTargetField}) when the junction names its columns differently\n * (e.g. `sourceOrganizationId` / `targetOrganizationId`).\n */\n junctionScopeField: z.string().optional(),\n /**\n * The junction column holding the TARGET id (the referenced row), e.g. `partnerOrganizationId`.\n * See {@link junctionScopeField} — set both or neither.\n */\n junctionTargetField: z.string().optional(),\n});\nexport type ScopeMembershipStructure = z.infer<typeof ScopeMembershipStructureSchema>;\n\n/**\n * Relationship `scopeMembership` value: `true` for the simple case (junction auto-resolved from the\n * registry's M:N scope-junction map), or a {@link ScopeMembershipStructureSchema} when the junction or\n * its columns must be named (self-referential junctions, non-primary scope fields).\n *\n * Policy — status, roles, junction-field and target-row constraints, or disabling — is NOT here; it is\n * per-variant and lives on the operation config's `referenceConstraints`.\n */\nexport const ScopeMembershipSchema = z.union([z.literal(true), ScopeMembershipStructureSchema]);\nexport type ScopeMembership = z.infer<typeof ScopeMembershipSchema>;\n\n/**\n * Write-time scope confinement of a REFERENCE foreign key — the POLICY half, declared PER OPERATION\n * VARIANT on the operation config (`referenceConstraints`), keyed by foreign-key field.\n *\n * The relationship's {@link ScopeMembershipSchema} already guarantees the baseline: the referenced\n * target must be linked to the writing row's scope through the junction. This type TIGHTENS that\n * baseline for one variant — the ordinary \"assign\" accepts any member while a \"make reviewer\" variant\n * requires an `ORG_ADMIN`; a plain \"share\" accepts any partnership while \"share with write access\"\n * requires a typed one. It sits beside the operation's own `roles`, which gate the CALLER; these gate\n * the TARGET.\n *\n * Absent for a foreign key ⇒ the relationship's baseline membership applies unchanged. `false` ⇒\n * enforcement is DISABLED for that foreign key on that variant.\n *\n * Both membership and role refinements are enforced by the backend. `requiredRoles` resolves\n * against the live application role definitions in the declared scope; unknown held roles do not\n * confer authority. Frontend visibility decisions are not an authorization substitute.\n */\nexport const ReferenceScopeConstraintSchema = z.object({\n /**\n * Junction-row `status` values that qualify (e.g. `['ACTIVE']`). Omit ⇒ any status qualifies (mere\n * membership — still refuses a cross-tenant reference). Use to reject e.g. a `SUSPENDED` member.\n */\n qualifyingStatuses: z.array(z.string()).optional(),\n /**\n * Hierarchy-aware role requirement on the qualifying junction row's `roles` (e.g. the referenced user\n * must be an `ORG_ADMIN` of the row's organization). Matched with the SAME hierarchy walk the\n * operation role gate uses — a member holding an ancestor role (e.g. `ORG_OWNER`) satisfies a\n * requirement of `ORG_ADMIN`. Omit ⇒ no role constraint.\n */\n requiredRoles: z.object({\n scope: z.enum(ResourcePrimaryScope),\n roles: z.array(z.string()).min(1),\n }).optional(),\n /**\n * Equality constraints on the qualifying JUNCTION row beyond status (e.g. a typed partnership:\n * `{ partnershipType: 'collaboration' }`). All entries must match. Omit ⇒ no field constraint.\n */\n qualifyingFields: z.record(z.string(), z.unknown()).optional(),\n /**\n * Equality constraints on the referenced TARGET ROW itself (not the junction) — e.g. the assignee must\n * be a user of a given type `{ userTypes: 'agent' }`, or a partner org of a given type\n * `{ type: 'enterprise' }`. Applied to the target row the guard already reads. Omit ⇒ none.\n */\n targetConstraints: z.record(z.string(), z.unknown()).optional(),\n});\nexport type ReferenceScopeConstraint = z.infer<typeof ReferenceScopeConstraintSchema>;\n\n/**\n * An operation variant's per-foreign-key reference policy: `foreignKeyField → constraint | false`.\n *\n * `false` WAIVES the scope-membership requirement for that foreign key on this variant (a break-glass\n * verb that must write a not-yet-member reference). It waives that and nothing else: the target must\n * still EXIST, and an ORG-SCOPED target must still share the write's tenant.\n *\n * ⚠️ **On an ORG-LESS target the junction IS the tenant signal.** `users` and `organizations` carry no\n * tenant column to fall back on, so waiving membership there reduces the check to existence and a\n * cross-tenant id becomes admissible. That is occasionally the intent (an incident override), but it is\n * never incidental — reach for a narrower policy first (a wider `qualifyingStatuses`, or a second\n * junction that models the exception) and use `false` only when the variant genuinely means\n * \"any existing row, tenant notwithstanding\".\n */\nexport const ReferenceConstraintsSchema = z.record(\n z.string(),\n z.union([z.literal(false), ReferenceScopeConstraintSchema]),\n);\nexport type ReferenceConstraints = z.infer<typeof ReferenceConstraintsSchema>;\n/** @wildo_source:part:end saas.models.scope-membership */\n\n/**\n * @wildo_source:part:start saas.models.resource-relationship-schema facet:layer:shared facet:family:resource-config\n *\n * Serializable relationship declaration fields validated at registry build.\n */\nexport const ResourceRelationshipSchema = z.object({\n cardinality1: z.enum(ResourceRelationshipCardinality),\n cardinality2: z.enum(ResourceRelationshipCardinality),\n resourceType1: ResourceTypeSchema,\n resourceType2: ResourceTypeSchema,\n accessScopeStrategy: z.enum(ResourceRelationshipAccessScopeStrategy).default(ResourceRelationshipAccessScopeStrategy.REQUIRES_CONTEXT),\n parentResourceRequirement: z.enum(ResourceParentResourceRequirement).default(ResourceParentResourceRequirement.MANDATORY),\n jointResourceType : ResourceTypeSchema.optional(),\n isPrimaryScope : z.boolean().optional().default(false),\n primaryScope : z.enum(ResourcePrimaryScope).optional(),\n /**\n * Opt-in flag for relationships that form cycles in the resource graph.\n * When `true`, schema-level cycle detection (at registration) allows this edge.\n * Applies to all cycle types: direct self-reference (A→A), M:N self-reference\n * (A↔A via junction), and edges participating in transitive cycles (A→B→C→A).\n *\n * Default `false` — cycles are rejected at registration unless every edge\n * in the cycle has `allowCycle: true`.\n */\n allowCycle : z.boolean().optional().default(false),\n isDisabled : z.boolean().optional().default(false),\n\n // Context policy for this relationship - controls how related resources are fetched\n contextPolicy: RelationshipContextPolicySchema.optional(),\n\n /**\n * High-level shared meaning of the relationship.\n *\n * Greenfield direction:\n * - `nature` remains the primary semantic field app developers author.\n * - `read` is the explicit semantic read intent when the default read meaning\n * derived from low-level nested projection is not precise enough.\n * - The framework derives its internal handling contract from that semantic\n * declaration plus structural topology.\n *\n */\n nature: z.enum(RelationshipNature),\n\n /**\n * Explicit semantic read contract for this relationship.\n *\n * This is the authored read intent. It does NOT replace\n * `childOperations.nested.onRead`, which still carries the low-level nested\n * response projection details when embedding is operationally enabled.\n */\n read: RelationshipHandlingReadSettingsSchema.optional(),\n\n /**\n * Child operations configuration for this relationship.\n * Handles BACKEND concerns: lifecycle cascade and nested DTO aggregation.\n *\n * - lifecycle.onParentDelete: Delete children when parent is deleted\n * - nested.onRead: Include children in parent READ response\n * - nested.onCreate/onUpdate: Allow child mutations in parent requests\n */\n childOperations: ChildOperationsConfigSchema.optional(),\n\n /**\n * Static discriminator filter for conditional relationships.\n * When specified, this relationship only applies when the PARENT resource's\n * discriminator field matches one of the specified values.\n *\n * This field is part of the Zod schema (serializable). For arbitrary function-based\n * conditions, use the `condition` field on the `ResourceRelationship` TypeScript type\n * (which extends this schema via intersection).\n *\n * Runtime evaluation uses the shared\n * `Resources_SharedUtils.matchesRelationshipDiscriminator()` helper, which\n * applies `String()` coercion:\n * `values.includes(String(parent[discriminatorField]))`.\n *\n * @see ResourceRelationshipDiscriminatorSchema — for the full schema definition\n * @see ResourceRelationship — for the full type including the `condition` function\n *\n * @example Recurring todos have occurrences, one-time todos don't:\n * { discriminatorField: 'recurringType', values: ['RECURRING'] }\n */\n discriminator: ResourceRelationshipDiscriminatorSchema.optional(),\n\n /**\n * Frontend relationship presentation configuration.\n *\n * This remains on the frontend/UI plane:\n * - read composition in parent/child views\n * - narrow interaction hints such as `interaction.allowQuickCreate`\n *\n * It must NOT redefine the core meaning of the relationship. In particular,\n * `display.interaction.allowQuickCreate` is only a workflow shortcut hint:\n * - for `REFERENCE`: \"create independent resource, then set reference\"\n * - for `ASSOCIATION`: \"create independent peer, then link/replace\"\n * - for `COMPOSITION`: usually ignored because nested creation is already the\n * native aggregate workflow\n *\n * Labels remain managed by the i18n mechanism.\n */\n display: RelationshipDisplayConfigSchema.optional(),\n\n /**\n * Foreign key field name for this relationship.\n *\n * When omitted: Inferred from parent's resourceFieldIdentifier via allResourceFieldIdentifiers map.\n * When specified: Used for disambiguation when multiple FKs point to same resource type,\n * or when FK field name differs from standard naming convention.\n *\n * Examples:\n * - Standard: ORGANIZATIONS → TODOS uses organizationId (inferred)\n * - Disambiguation: TODOS → USERS via assignedToUserId vs createdByUserId (explicit)\n * - M:N self-reference: TODOS → TODOS via junction table uses todoId/targetTodoId (explicit)\n */\n foreignKeyField: z.string().optional(),\n\n /**\n * Scope-via-junction tag (scope-required reference search).\n *\n * Set ONLY on the synthetic `S → T` edge the M:N expansion adds so a target\n * `T` (e.g. `users`) becomes addressable under a scope `S` (e.g.\n * `organizations`) for SEARCH/LIST — e.g.\n * `GET /organizations/{organizationId}/users/search`. Names the junction `J`\n * (e.g. `organizationMembers`) the scope is resolved through. `T` carries NO\n * real foreign-key column for `S`, so the backend contextual filter scopes via\n * a junction subquery (`T._id ∈ { J.targetFk : J.scopeFk = S_id }`) and\n * authorization keys off `S`-membership instead of `T`'s own primary scope.\n * Absent on every normal relationship.\n *\n * NOTE: this is a READ/SEARCH-side tag on a synthetic scope-anchored edge. To constrain a WRITE — a\n * real reference FK must point at a member of the writer's scope — declare {@link scopeMembership},\n * NOT this field.\n */\n scopeViaJunction: ResourceTypeSchema.optional(),\n\n /**\n * Write-time SCOPE CONFINEMENT for this reference FK — the STRUCTURE half (see\n * {@link ScopeMembershipSchema}).\n *\n * Opt-in and additive: absent ⇒ unchanged existence-only behavior. `scopeMembership: true` requires\n * the referenced target to be linked to the writing row's scope through the auto-resolved junction;\n * the object form names the junction / columns when convention cannot (self-referential junctions).\n * Enforced on CREATE and UPDATE by the adapter-neutral write-integrity authority; a non-member /\n * cross-tenant reference is refused with `404`, leaking nothing.\n *\n * POLICY (status, roles, junction-field / target-row constraints, or disabling) is NOT declared here —\n * it varies per operation variant and lives on the operation config as `referenceConstraints`\n * (see {@link ReferenceScopeConstraintSchema}), beside the caller-side `roles`.\n */\n scopeMembership: ScopeMembershipSchema.optional(),\n\n /**\n * Restricts which core operations' URLs this relationship contributes to.\n *\n * When set, the URL builder emits this parent edge ONLY for the listed core\n * operations (e.g. `[SEARCH, LIST]`). Used by the scope-via-junction edge so it\n * produces `/{scope}/{target}/search|list` without leaking onto\n * READ/CREATE/UPDATE/DELETE routes — a peer-under-scope path is a read-only\n * access pattern. Absent ⇒ the edge contributes to every operation's URLs.\n */\n urlOperationScope: z.array(z.enum(CoreResourceOperation)).optional(),\n});\n/** @wildo_source:part:end saas.models.resource-relationship-schema */\n\n/**\n * @wildo_source:part:start saas.models.resource-relationship-resolved-semantics facet:layer:shared facet:family:resource-config\n *\n * Condition function, resolved semantics contract (factory output shape).\n */\n/**\n * Function-based condition for conditional relationships.\n * Evaluated at runtime with the PARENT resource data.\n * Return `true` to include the relationship, `false` to exclude it.\n *\n * Unlike the static `discriminator` (which is a simple field+values match),\n * this allows arbitrary logic: cross-field checks, computed conditions, etc.\n *\n * When both `discriminator` and `condition` are present on a relationship,\n * they are combined with AND semantics — the relationship is active only when\n * both pass.\n *\n * Error handling is selected by the runtime caller through\n * `Resources_SharedUtils.isRelationshipActiveForParent()`:\n * - Backend callers propagate condition errors normally.\n * - Frontend callers may fail safe and exclude the relationship.\n *\n * @param parentResource - The parent resource's data object.\n * @returns `true` to include the relationship, `false` to exclude it.\n */\nexport type ResourceRelationshipConditionFn = (parentResource: Record<string, any>) => boolean;\n\nexport type ResolvedRelationshipNatureCalculationMode = 'explicit';\nexport type ResolvedRelationshipReadCalculationMode =\n | 'explicit'\n | 'legacy_nested_read_fallback'\n | 'default_reference_only';\n\n/**\n * Internal relationship contract built once from the developer-authored\n * declaration and then reused by runtime consumers.\n */\nexport interface ResolvedRelationshipSemantics {\n nature: RelationshipNature;\n natureCalculationMode: ResolvedRelationshipNatureCalculationMode;\n /**\n * Documents whether the semantic read intent came from explicit authored\n * `read`, from the legacy `childOperations.nested.onRead` compatibility seam,\n * or from the default non-embedded fallback when neither is authored.\n */\n readCalculationMode: ResolvedRelationshipReadCalculationMode;\n handling: RelationshipHandlingContract;\n persistence: RelationshipPersistenceContract;\n childOperations?: ChildOperationsConfig_Parsed;\n}\n/** @wildo_source:part:end saas.models.resource-relationship-resolved-semantics */\n\n/**\n * @wildo_source:part:start saas.models.resource-relationship-declaration facet:layer:shared facet:family:resource-config\n *\n * Developer-authored relationship declaration.\n *\n * The `condition` function cannot be represented in a Zod schema (functions aren't\n * serializable), so we extend via a TypeScript intersection type. This means:\n * - The Zod schema (`ResourceRelationshipSchema`) defines all serializable fields,\n * including the static `discriminator` object.\n * - This intersection adds the optional `condition` function on top.\n * - The `createResourcesRelationship()` factory accepts both and returns this type.\n * - `nature` + optional `read` form the authored semantic surface; the\n * framework compiles that into `resolvedSemantics.handling`.\n *\n * ## Conditional Relationship Architecture\n *\n * Relationships may optionally carry two kinds of runtime filters:\n *\n * 1. **`discriminator`** (static) — A simple field+values match on the parent resource.\n * Defined as `{ discriminatorField: string, values: string[] }`.\n * Example: \"this relationship only applies when `recurringType === 'RECURRING'`\".\n *\n * 2. **`condition`** (dynamic) — An arbitrary function evaluated with the parent\n * resource data. Use for cross-field logic, computed conditions, etc.\n *\n * Both are evaluated against the PARENT resource, never the child. When both are\n * present, they use AND semantics (both must pass for the relationship to be active).\n *\n * ## Where Conditions Are Evaluated at Runtime\n *\n * | Layer | Evaluates discriminator/condition? | Against which resource? |\n * |-------------------------------|------------------------------------|-------------------------|\n * | **Factory** (startup) | No — stores them inline | N/A |\n * | **DTO Builder** (startup) | No — generates DTOs for ALL rels | N/A |\n * | **URL Builder** (startup) | No — synthetic parents clear them | N/A |\n * | **ResourceContext** (backend) | Yes, via shared activation helper | parentResource |\n * | **ServicesRegistryHandler** | Yes, via shared activation helper | parentResult/state |\n * | **ContainerNested** (frontend)| Yes, via shared activation helper | parentData |\n *\n * The key design insight is that conditions are a RUNTIME concern. At startup\n * (factory/DTO/URL), all relationships are processed unconditionally — conditions\n * are evaluated only when actual parent data is available.\n *\n * Runtime registry rows also carry `resolvedSemantics` (see `ResourceRelationship`).\n */\nexport type ResourceRelationshipDeclaration = z.infer<typeof ResourceRelationshipSchema> & {\n condition?: ResourceRelationshipConditionFn;\n};\n\n/**\n * Internal runtime relationship shape.\n *\n * This mirrors the resource-configuration pattern: app developers author the\n * declaration shape, and the factory compiles/stores the internal semantics\n * once so runtime consumers reuse the resolved form instead of rebuilding it.\n */\nexport type ResourceRelationship = ResourceRelationshipDeclaration & {\n resolvedSemantics: ResolvedRelationshipSemantics;\n};\n/** @wildo_source:part:end saas.models.resource-relationship-declaration */\n\n// --------------------------------\n// Default Operation Response Patterns\n// --------------------------------\n\n/**\n * Default response patterns for resource operations based on best practices\n */\n\nexport const DefaultDeleteResponseSchema = z.object({\n id: z.string(),\n deletedAt: z.date().optional()\n});\nexport type DefaultDeleteResponse = z.infer<typeof DefaultDeleteResponseSchema>;\n\nexport const DefaultBulkDeleteResponseSchema = z.object({\n deletedIds: z.array(z.string()),\n deletedCount: z.number(),\n deletedAt: z.date().optional()\n});\nexport type DefaultBulkDeleteResponse = z.infer<typeof DefaultBulkDeleteResponseSchema>;\n\nexport const DefaultUpdateManyResponseSchema = z.object({\n updatedCount: z.number(),\n updatedIds: z.array(z.string()).optional(),\n updatedAt: z.date().optional()\n});\nexport type DefaultUpdateManyResponse = z.infer<typeof DefaultUpdateManyResponseSchema>;\n\nexport const DefaultCountResponseSchema = z.object({\n count: z.number().int().min(0),\n});\nexport type DefaultCountResponse = z.infer<typeof DefaultCountResponseSchema>;\n\n// Standard result with count for create many operations - generic function\nexport interface DefaultCreateManyResponse<T> {\n items: T[];\n createdCount: number;\n createdAt?: Date;\n}\n\nexport const DefaultCreateManyResponseSchema = <T extends z.ZodTypeAny>(itemSchema: T): z.ZodType<DefaultCreateManyResponse<SchemaInfer<T>>> => z.object({\n items: z.array(itemSchema),\n createdCount: z.number(),\n createdAt: z.date().optional()\n});\n\n/**\n * Generic success envelope for explicit custom action-style operations.\n *\n * This schema is intentionally transport-oriented. It can be attached through\n * explicit `customResponseDto` / `responseDto` config when a custom operation\n * returns a generic success envelope instead of a resource DTO.\n */\nexport const DefaultActionResponseSchema = z.object({\n success: z.boolean(),\n message: z.string().optional(),\n executedAt: z.date(),\n result: z.any().optional()\n});\nexport type DefaultActionResponse = z.infer<typeof DefaultActionResponseSchema>;\n\n/**\n * Fields that are always discarded from create/update payloads at runtime.\n * These are auto-generated or system-managed fields.\n *\n * Note: _id is also handled by the isPrimaryKey decorator at the schema level,\n * but is kept here as a runtime safety net for backward compatibility.\n */\nexport const createOrUpdateMandatoryDiscardFields: readonly string[] = [\n '_id', // Also handled by isPrimaryKey decorator\n 'createdAt',\n 'updatedAt',\n 'deletedAt',\n '_version_db_doc',\n]\n\n// Utility to get default response schema based on operation\nexport function getDefaultResponseSchemaForOperation<T extends z.ZodTypeAny>(\n operation: string,\n mainSchema: T\n): z.ZodTypeAny {\n switch (operation) {\n case CoreResourceOperation.READ:\n case CoreResourceOperation.CREATE:\n case CoreResourceOperation.UPDATE:\n return mainSchema;\n\n case CoreResourceOperation.DELETE:\n return DefaultDeleteResponseSchema;\n\n case CoreResourceOperation.DELETE_MANY:\n return DefaultBulkDeleteResponseSchema;\n\n case CoreResourceOperation.UPDATE_MANY:\n return DefaultUpdateManyResponseSchema;\n\n case CoreResourceOperation.CREATE_MANY:\n return DefaultCreateManyResponseSchema(mainSchema);\n\n case CoreResourceOperation.LIST:\n // List operations should use pagination wrapper - handled separately\n return mainSchema;\n case CoreResourceOperation.COUNT:\n return DefaultCountResponseSchema;\n case CoreResourceOperation.SEARCH:\n return mainSchema;\n\n default:\n // For custom operations, default to mainSchema\n return mainSchema;\n }\n}\n\n/**\n * Core operations whose service-layer OUTPUT is validated against their declared RESPONSE\n * envelope (a framework `Default*ResponseSchema`), NOT against the resource object. For these,\n * the DTO builder sets `internalDto` to the response envelope (`responseDtoInternal`) instead of\n * `enhancedMainSchema` — otherwise output validation parses the envelope value against the resource\n * schema and throws `service_resource_transformation_failed` (HTTP 500).\n *\n * ⚠️ KEY ON THE OPERATION'S OWN `operationIdentifier`, NOT `resourceOperationLike` /\n * `effectiveOperation`. `resourceOperationLike` is a ROUTING / HTTP-verb / authorization hint — a\n * CUSTOM operation may borrow `DELETE`/`COUNT` semantics for its URL and permissions while returning\n * its own object shape (via `REPLACE_CORE_OPERATIONS` or a `customResponseDto`, e.g. SIEM\n * `PURGE_ALL` → `{ purgedCount, … }`). Only\n * the genuine core operation carries `operationIdentifier === CoreResourceOperation.DELETE` etc.;\n * custom ops carry a custom identifier. Keying on `operationIdentifier` is what stops the composer\n * wrapping a custom op's object as `{ id: <object> }`.\n *\n * Membership rationale:\n * - `DELETE` / `DELETE_MANY` — the service+repository layer returns the deleted id(s) as a bare\n * scalar; {@link composeDefaultOperationResponse} lifts that into the envelope.\n * - `COUNT` — the service already returns `{ count }`, so no composition is needed, but its\n * `internalDto` must still be the `{ count }` envelope rather than the resource object.\n *\n * Deliberately EXCLUDED: bulk mutations (`CREATE_MANY` / `UPDATE_MANY`). At runtime they return an\n * ARRAY of resource items that the transform/serializer validate PER-ITEM against the resource\n * schema (see the `isBulkOperation` branch in `getDefaultResponseSchemaForOperation` /\n * `buildEnhancedResponseDto`) — they are object-shaped per item, not a count envelope, so they\n * must keep `enhancedMainSchema`.\n *\n * Keep this set, {@link composeDefaultOperationResponse}, and the `internalDto` routing in the DTO\n * builder in lockstep.\n */\nexport const OUTPUT_ENVELOPE_OPERATIONS: readonly string[] = [\n CoreResourceOperation.DELETE,\n CoreResourceOperation.DELETE_MANY,\n CoreResourceOperation.COUNT,\n];\n\n/** True when this is a genuine core envelope operation (see {@link OUTPUT_ENVELOPE_OPERATIONS}).\n * Pass the operation's OWN `operationIdentifier`, never `resourceOperationLike`/`effectiveOperation`\n * (a custom op borrowing the verb has a custom identifier and returns its own shape). */\nexport function isOutputEnvelopeOperation(operationIdentifier: string): boolean {\n return OUTPUT_ENVELOPE_OPERATIONS.includes(operationIdentifier);\n}\n\n/**\n * Does this operation answer with an ARRAY OF ROWS, each validated against the row schema?\n *\n * The literal bulk verbs (`CREATE_MANY`, `UPDATE_MANY`) do, and so does a BULK VARIANT of `CREATE`\n * or `UPDATE` — `haveBulkOperation: true` mints the bulk route as a variant of the single verb, so\n * its effective verb reads `UPDATE` and only `isBulkOperation` separates it (the same axis issue\n * #404 added for DELETE). The response DTO builder already declares exactly this — a bulk\n * create/update's `responseDto` is the per-item row schema — but the three places that VALIDATE\n * the response each re-derived the rule from the verb alone: the service's output parse, the\n * controller serializer, and the frontend client. So a bulk \"Unassign\" of two todos wrote both rows\n * and then answered a degraded body, which the client refused. They all ask this now.\n *\n * Only an array is read per item: a one-row bulk selection travels the single-row path and answers\n * one row, which the same row schema accepts as it stands.\n */\nexport function respondsWithPerItemRowArray(operation: {\n operationIdentifier?: unknown;\n resourceOperationLike?: unknown;\n isBulkOperation?: boolean;\n}): boolean {\n const effectiveOperation = operation.resourceOperationLike ?? operation.operationIdentifier;\n if (effectiveOperation === CoreResourceOperation.CREATE_MANY || effectiveOperation === CoreResourceOperation.UPDATE_MANY) {\n return true;\n }\n return operation.isBulkOperation === true\n && (effectiveOperation === CoreResourceOperation.CREATE || effectiveOperation === CoreResourceOperation.UPDATE);\n}\n\n/**\n * Value-level twin of {@link getDefaultResponseSchemaForOperation}: composes an operation's\n * DECLARED default response value from the raw service/repository output, so the value that flows\n * into output validation (`transformOutput`) and response serialization matches the declared\n * schema. This is the single, GENERAL seam for \"the runtime returns a lower-level value than the\n * declared response envelope\" — callers invoke it uniformly instead of special-casing operations.\n *\n * ⚠️ Pass the operation's OWN `operationIdentifier`, NOT `resourceOperationLike`/`effectiveOperation`\n * (see {@link OUTPUT_ENVELOPE_OPERATIONS}). And callers MUST skip composition when the operation\n * declares its own `customResponseDto` (`hasCustomResponseDto`) — that op returns its custom shape\n * directly, exactly as `buildEnhancedResponseDto` lets a custom `responseDto` win over the default.\n * Both guards together keep this a true identity for every operation that already returns its final\n * shape, so ONLY genuine core `DELETE`/`DELETE_MANY` are ever transformed.\n *\n * Identity for every operation whose service output already IS its declared shape: `READ` /\n * `CREATE` / `UPDATE` (resource object), `CREATE_MANY` / `UPDATE_MANY` (array of items, validated\n * per-item), `COUNT` (`{ count }`), `LIST` / `SEARCH` (`{ data, pagination }`), and every custom\n * operation (its own DTO value). The only non-identity cases are the core deletes, whose repository\n * layer returns the deleted id(s) as a bare scalar (`delete(): Promise<string>` — the `_id`, or\n * `''` when nothing matched; `deleteMany(): Promise<string[]>`):\n * - `DELETE` → `{ id }` (`DefaultDeleteResponseSchema`)\n * - `DELETE_MANY` → `{ deletedIds, deletedCount }` (`DefaultBulkDeleteResponseSchema`)\n *\n * `DELETE` always wraps as `{ id }`. If a singular `DELETE` is invoked with a filter it delegates to\n * `deleteMany` and returns a `string[]` (a misuse that should target `DELETE_MANY`); that becomes\n * `{ id: string[] }` and downstream `internalDto` validation surfaces the anomaly rather than\n * silently coercing it. Likewise a non-array `DELETE_MANY` output passes through to fail validation.\n * Keep this switch in lockstep with {@link getDefaultResponseSchemaForOperation} and\n * {@link OUTPUT_ENVELOPE_OPERATIONS}.\n */\nexport function composeDefaultOperationResponse(\n operationIdentifier: string,\n serviceOutput: unknown,\n isBulkOperation: boolean = false,\n): unknown {\n switch (operationIdentifier) {\n case CoreResourceOperation.DELETE:\n /**\n * A BULK DELETE variant lands HERE, not on `DELETE_MANY` (issue #404).\n *\n * `haveBulkOperation: true` mints the bulk route as a VARIANT of DELETE, so its\n * `operationIdentifier` IS `DELETE` and only `isBulkOperation` distinguishes it. The DTO\n * builder already knows that — `resources-config-operations.dtos-builder.utils.ts` returns\n * `DefaultBulkDeleteResponseSchema` for `isBulkOperation && (DELETE | DELETE_MANY)` — so this\n * switch keying on the NAME alone composed `{ id }` for a response the operation had declared\n * as `{ deletedIds, deletedCount }`, and output validation refused it with\n * `expected array at \"deletedIds\"` AFTER the rows were already deleted.\n *\n * That is precisely the lockstep this function's own contract demands (\"Keep this switch in\n * lockstep with `getDefaultResponseSchemaForOperation`\"), broken on the one axis the name\n * cannot express.\n */\n return isBulkOperation ? composeBulkDeleteEnvelope(serviceOutput) : { id: serviceOutput };\n case CoreResourceOperation.DELETE_MANY:\n return composeBulkDeleteEnvelope(serviceOutput);\n default:\n return serviceOutput;\n }\n}\n\n/**\n * Lift a delete's raw repository output into `DefaultBulkDeleteResponseSchema`.\n *\n * The repository returns `string[]` from `deleteMany` and a bare `string` from `delete` (`''` when\n * nothing matched). A bulk variant can produce EITHER: the controller normalises a single-element\n * `_ids` selector to a scalar before the service sees it, so a bulk delete naming one row reaches\n * the singular path and returns a string. Both must become the same declared envelope, or the\n * response shape would depend on how many rows the caller happened to name.\n *\n * A non-array, non-string output is passed through unchanged so a genuinely malformed value still\n * fails validation loudly rather than being coerced into a plausible-looking empty envelope.\n */\nfunction composeBulkDeleteEnvelope(serviceOutput: unknown): unknown {\n if (Array.isArray(serviceOutput)) {\n return { deletedIds: serviceOutput, deletedCount: serviceOutput.length };\n }\n if (typeof serviceOutput === 'string') {\n // `''` is the repository's \"nothing matched\", which is an EMPTY result and not a deleted id.\n const deletedIds = serviceOutput.length > 0 ? [serviceOutput] : [];\n return { deletedIds, deletedCount: deletedIds.length };\n }\n return serviceOutput;\n}\n\n/**\n * Marker key identifying a DEGRADED operation response.\n *\n * Deliberately a fixed, namespaced key rather than a class or a symbol: this value crosses the\n * service → controller → serializer boundary and is JSON-encoded on the way to a webhook delivery\n * log, so it has to survive `JSON.parse(JSON.stringify(...))` and a structural type guard.\n */\nexport const DEGRADED_OPERATION_RESPONSE_MARKER = '__wildoDegradedResponse' as const;\n\n/**\n * A write that COMMITTED and could not be described.\n *\n * ## Why this exists (issue #577)\n *\n * `transformOutput` validates a write's result against the operation's `internalDto`. When that\n * parse fails the write may already be durable — and the engine's answer was `INTERNAL` / HTTP 500.\n * Measured on the MCP plane: `todoLists__create` created the row, answered `-32603`, and the agent\n * did what an agent does with a failure — retried, and created another one.\n *\n * **Reporting failure for a write that persisted is the one available answer that is false**, and it\n * is the answer that manufactures duplicates. The industry position is consistent on this: a `5xx`\n * means *the outcome is unknown*, which is precisely why callers retry it, so emitting one for a\n * known success guarantees the duplicate it is trying to avoid.\n * spec-cite: N/A — that is this repository's reading of the retry literature, not a quotation.\n *\n * ## Why a reduced body is CONFORMANT, not a fudge\n *\n * A `201 Created` response body representing the new resource is explicitly OPTIONAL; what the\n * specification asks for is a `Location` header identifying the created resource. So answering\n * \"it worked, here is its identity\" without the full representation is the standard's own shape.\n * spec-cite: RFC 9110 §15.3.2 (201 Created) — https://www.rfc-editor.org/rfc/rfc9110#section-15.3.2\n *\n * The neighbouring status exists for the same reason: a successful request need not carry a\n * representation at all.\n * spec-cite: RFC 9110 §15.3.5 (204 No Content) — https://www.rfc-editor.org/rfc/rfc9110#section-15.3.5\n *\n * ## The rule this encodes, which is ONE rule applied at two sites\n *\n * **A response must tell the truth about whether the write persisted.** The two `transformOutput`\n * call sites differ in the world, not in plumbing, so the same rule produces different answers:\n *\n * | site | state | truthful answer |\n * |---|---|---|\n * | inside the transactional core | the transaction is still open — a throw ROLLS BACK | throw: \"failed\" is TRUE |\n * | after a non-transactional write | the row is durable and nothing can undo it | degrade: \"failed\" would be FALSE |\n *\n * Forcing both to the same OBSERVABLE outcome was considered and rejected: it would either discard a\n * genuinely successful write, or report success for one that was rolled back.\n *\n * ## What this is NOT\n *\n * It is not the fix for retry-duplication in general. **Any** error after commit — a crashed process,\n * a dropped connection, a timeout — produces the same duplicate, and the mechanism the industry uses\n * for that is an IDEMPOTENCY KEY on the request, so a retry replays the first outcome instead of\n * performing a second write. This type narrows the window; it does not close the class.\n * spec-cite: N/A — describes Stripe's documented idempotency-key behaviour in this repository's own\n * words rather than quoting it (https://docs.stripe.com/api/idempotent_requests).\n *\n * ## Safety property\n *\n * The degraded body carries the resource IDENTITY and nothing else. That matters because the\n * response-DTO parse is what strips `.isBackendOnly()` fields and masks write-only secrets — a\n * degraded body BYPASSES that parse, so it must be constructed from a closed set of safe values\n * rather than from the row. Never widen it to carry row content.\n */\nexport interface DegradedOperationResponse {\n readonly [DEGRADED_OPERATION_RESPONSE_MARKER]: true;\n /** The created/updated row's identity, when one could be recovered. Never any other row content. */\n readonly resourceId?: string;\n /** Stable, client-branchable reason. Not a message: the human text is server-side, in the log. */\n readonly reason: 'response_description_failed';\n}\n\n/** Structural guard — see {@link DEGRADED_OPERATION_RESPONSE_MARKER} for why it is not a class. */\nexport function isDegradedOperationResponse(value: unknown): value is DegradedOperationResponse {\n return (\n !!value\n && typeof value === 'object'\n && (value as Record<string, unknown>)[DEGRADED_OPERATION_RESPONSE_MARKER] === true\n );\n}\n\n/**\n * Build the degraded response for a committed write whose description failed.\n *\n * `resourceId` is recovered best-effort from the raw row: absent it, the caller still learns the\n * write succeeded, which is the load-bearing half. Only `_id`/`id` are read — see the safety\n * property on {@link DegradedOperationResponse}.\n */\nexport function composeDegradedOperationResponse(serviceOutput: unknown): DegradedOperationResponse {\n const row = (serviceOutput && typeof serviceOutput === 'object' && !Array.isArray(serviceOutput))\n ? serviceOutput as Record<string, unknown>\n : undefined;\n const candidate = row?._id ?? row?.id;\n return {\n [DEGRADED_OPERATION_RESPONSE_MARKER]: true,\n ...(typeof candidate === 'string' && candidate.length > 0 ? { resourceId: candidate } : {}),\n reason: 'response_description_failed',\n };\n}\n\n\n// Utility to determine if operation should have request DTO\nexport function operationShouldHaveRequestDto(operation: string): boolean {\n return !OPERATIONS_WITHOUT_REQUEST_BODY.includes(operation as CoreResourceOperation);\n}\n\n// ============================================================================\n// Resource ID Types and Enums\n// ============================================================================\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 *\n * @see DATABASE_AGNOSTIC_REPOSITORY_ANALYSIS.md Section 28\n */\n\n/**\n * Abstract resource ID type - string that can be either ObjectId or UUID format\n */\nexport type ResourceId = string;\n\n/**\n * Supported ID format types\n */\nexport enum ResourceIdFormat {\n /** MongoDB ObjectId - 24 character hexadecimal string */\n OBJECT_ID = 'OBJECT_ID',\n /** PostgreSQL UUID - 36 character UUID with dashes */\n UUID = 'UUID',\n /**\n * The synthesized id of an `HTTP_API`-backed resource: encoded (or charset-safe verbatim) remote\n * key components, produced ONLY by the codec authority in\n * `http-api-binding/http-api-binding-id.shared.utils.ts` — never minted. Lexical shape: the\n * charset law `^[A-Za-z0-9._~-]+$`. Deliberately NOT added to `detectIdFormat` /\n * `isValidResourceId` (the strict two-format world stays strict for platform-backed rows —\n * paper A: never loosen a shared validator silently); it participates only where the RESOURCE\n * is known to be HTTP_API-backed (`ResourceIdBackendService.getFormatForResource`).\n */\n HTTP_API_SYNTHESIZED = 'HTTP_API_SYNTHESIZED',\n /**\n * The synthesized id of an `INTROSPECTION`-backed resource: the key of a row DERIVED from the\n * application's own structure, never minted and never stored.\n *\n * A distinct member from {@link HTTP_API_SYNTHESIZED} even though both admit the same charset,\n * because they answer different questions and will diverge: an HTTP-API id encodes a REMOTE\n * entity's key through a codec that can round-trip it, while an introspected id is whatever the\n * companion behavior's projection already calls the row — a module name, a composed structural\n * key. Merging them would put one name on two origins, and the next reader could not tell which\n * validator's rules a given id was admitted under.\n *\n * Like its sibling it is deliberately absent from `detectIdFormat` / `isValidResourceId`: the\n * strict two-format world stays strict for platform-backed rows, and this widening applies only\n * where the RESOURCE is known to be INTROSPECTION-backed.\n */\n INTROSPECTION_SYNTHESIZED = 'INTROSPECTION_SYNTHESIZED',\n}\n\n/**\n * Descriptor for a **scope-required reference search** through an M:N junction.\n *\n * When a foreign key targets resource `T` and the holder resource's primary\n * scope is `S`, and `T ↔ S` is a MANY-to-MANY relationship via junction `J`,\n * a reference people-picker for that FK must search `T` **scoped to the caller's\n * current `S`** through `J` (rather than enumerating every `T` globally) — see\n * `.claude/plans/fk-filter-reference-search.md`. This descriptor names the\n * junction and the two foreign-key columns the junction carries to each peer.\n *\n * The junction's FK columns are resolved by convention as each peer's\n * `resourceFieldIdentifier` (e.g. `organizationMembers` carries `userId` for the\n * USERS peer and `organizationId` for the ORGANIZATIONS peer).\n */\nexport interface ManyToManyScopeJunction {\n /** The junction resource that joins the two peers (e.g. `organizationMembers`). */\n junctionResourceType: string;\n /** The junction's FK column referencing the search TARGET `T` (e.g. `userId`). */\n targetFkField: string;\n /** The junction's FK column referencing the SCOPE `S` (e.g. `organizationId`). */\n scopeFkField: string;\n}\n\n/**\n * Lookup keyed by `${targetResourceType}|${scopeResourceType}` →\n * {@link ManyToManyScopeJunction}. Both orderings of every M:N are recorded, so\n * either peer can be the search target with the other as the scope. Built once\n * at registry init via `Resources_SharedUtils.buildManyToManyScopeJunctionMap`.\n */\nexport type ManyToManyScopeJunctionMap = ReadonlyMap<string, ManyToManyScopeJunction>;\n\n// ── Label forwarding — server-resolved, never-stale, via a virtual field ──────\n//\n// Reuses TWO existing framework capabilities instead of inventing a bespoke\n// projection:\n// 1. The relational-join SHAPE of `SearchableRelationDescriptor`\n// (`resources-config.shared.schemas.ts`) — same authored vocabulary, resolved\n// in the OPPOSITE direction (values → related rows, not query → ids).\n// 2. The VIRTUAL-FIELD pipeline (`isVirtual().isSummaryField()`,\n// `VirtualFieldsBackendService`) — the framework's idiomatic \"compute a value\n// onto the response DTO\" mechanism. It already runs on READ/LIST/SEARCH, is\n// included in the summary schema, and survives the response DTO, so the\n// frontend just references the field name in `getFrontendResourceLabel`.\n\n/**\n * @wildo_source:part:start saas.models.resource-config.forwarded-label facet:layer:shared facet:family:resource-config\n *\n * A **label-forwarding descriptor** — declares how a junction (or any) resource\n * row labels itself using fields from a RELATED resource, resolved SERVER-SIDE\n * and projected onto the response DTO via {@link forwardedLabel}.\n *\n * Reuses the join vocabulary of `SearchableRelationDescriptor` (from\n * `@wildo-ai/saas-models`), resolved in the read direction. WHY a\n * descriptor and not denormalization: the human-meaningful label lives on a\n * RELATED resource and is MUTABLE there (a user's first/last name on\n * `USER_PROFILES`); copying it onto the junction would go stale and demand a sync\n * hook on every mutation path. Resolving the related resource's own fields at read\n * time is single-source-of-truth, never stale, and reaches a resource DIFFERENT\n * from the foreign key's declared target (the name lives on `USER_PROFILES`, not\n * on `users`, the FK target — joined on the shared `userId`).\n *\n * TENANT SAFETY (by construction): the descriptor only resolves related rows for\n * `localField` values that appear on rows the caller can ALREADY see (its own\n * already-scoped page), so the related read is a bounded SYSTEM read that can\n * never widen visibility — the same contract `SearchableRelationDescriptor`\n * relies on, mirrored for reads. The viewer therefore needs no read access to the\n * related row itself (e.g. another member's `user_profile`).\n *\n * @remarks Both persistence adapters resolve it: the MongoDB and PostgreSQL resource\n * repositories each implement `findFieldValuesByJoinField` with the same contract\n * (the PostgreSQL half landed with #1100; until then a PostgreSQL-backed related\n * resource silently degraded every label to `fallback`). Import from\n * `@wildo-ai/saas-models`.\n *\n * @example\n * // organizationMembers labels itself by the linked user's name. firstName/\n * // lastName live on USER_PROFILES (mutable, deliberately NOT denormalized);\n * // both members and profiles carry the same `userId`, so join on it.\n * instanceLabel: forwardedLabel({\n * localField: 'userId',\n * relatedResource: CoreResourceType.USER_PROFILES,\n * relatedJoinField: 'userId',\n * fields: ['firstName', 'lastName'],\n * fallbackField: 'userEmail', // shown when the profile/name is unavailable\n * })\n */\nexport type LabelRelationDescriptor = {\n /** Field on THIS resource holding the join value (e.g. `userId`). */\n localField: string;\n /** The related resource whose fields are rendered into the label (e.g. `USER_PROFILES`). */\n relatedResource: ResourceType;\n /**\n * Field on the related resource matched against {@link localField}'s value.\n * Defaults to the related primary key (`_id`) — set it explicitly when joining\n * on a shared key other than the primary key (e.g. members and profiles both\n * carry `userId`).\n */\n relatedJoinField?: string;\n /**\n * Related fields to render, in order. Required: unlike search (which can default\n * to the related resource's own `searchableFields`), a label must declare what\n * to show. Resolving the related resource's OWN label as a default is a possible\n * future enhancement (it needs server-side label resolution that does not exist\n * in this path today).\n */\n fields: string[];\n /** Join separator between rendered field values. Default `' '` (single space). */\n separator?: string;\n /**\n * OWN-field on THIS resource used as the fallback label when the related row is\n * missing or every rendered field is empty — preferred over the static\n * {@link fallback}. Use an immutable own identifier (e.g. a denormalized\n * `userEmail`) so a row without a resolvable related label still shows a human\n * value instead of degrading to a raw id. Must be on the summary row (a summary\n * field) to be available to the resolver.\n */\n fallbackField?: string;\n /**\n * Static label of last resort, when the related row is missing/empty AND\n * {@link fallbackField} is unset or also empty. Default `''` (empty).\n */\n fallback?: string;\n};\n/** @wildo_source:part:end saas.models.resource-config.forwarded-label */\n\n/**\n * Stringify one forwarded field value, locale-aware where a localized\n * representation exists. Strings pass through verbatim (the canonical\n * label case — names, emails). `Date`/`number` use `Intl` with the optional\n * request locale. Enum-value LABEL translation is intentionally NOT done here:\n * resolving an app's enum labels is a frontend/display concern with no\n * server-side resolver in this path; forwarded labels are identity/text by\n * design. The `locale` param is the extension point if that ever changes.\n */\nfunction stringifyForwardedValue(value: unknown, locale?: string): string {\n if (value === null || value === undefined) {\n return '';\n }\n if (value instanceof Date) {\n return new Intl.DateTimeFormat(locale).format(value);\n }\n if (typeof value === 'number') {\n return new Intl.NumberFormat(locale).format(value);\n }\n return String(value);\n}\n\n/**\n * Pure renderer for a {@link LabelRelationDescriptor}: join the descriptor's\n * `fields` (in declared order, skipping empty values) from a resolved related\n * row, using `separator`, falling back to `fallback` when the row is absent or\n * the result is empty. Exported so it is unit-testable independently of the\n * virtual-field runtime.\n */\nexport function renderForwardedLabel(\n relatedRow: Record<string, unknown> | undefined | null,\n descriptor: LabelRelationDescriptor,\n options?: { locale?: string },\n): string {\n const fallback = descriptor.fallback ?? '';\n if (!relatedRow) {\n return fallback;\n }\n const separator = descriptor.separator ?? ' ';\n const rendered = descriptor.fields\n .map((field) => stringifyForwardedValue(relatedRow[field], options?.locale))\n .filter((part) => part.trim().length > 0)\n .join(separator)\n .trim();\n return rendered.length > 0 ? rendered : fallback;\n}\n\n/**\n * Request-scoped dedup cache for forwarded-label related reads. Keyed by the\n * `executionContext` object (one per request), so concurrent per-row virtual-field\n * computations across a single LIST/SEARCH page that resolve the SAME related key\n * share one in-flight read. This matches the framework's existing batch standard\n * (`populateListForSummary`: dedup + parallel, one read per UNIQUE key), without a\n * separate batch pre-pass. The `WeakMap` lets a finished request's cache be GC'd.\n */\nconst labelForwardingRequestCache = new WeakMap<\n object,\n Map<string, Promise<Record<string, unknown> | undefined>>\n>();\n\nfunction resolveRelatedRowDeduped(\n executionContext: unknown,\n cacheKey: string,\n loader: () => Promise<Record<string, unknown> | undefined>,\n): Promise<Record<string, unknown> | undefined> {\n // No usable request key (e.g. a direct unit invocation) → resolve uncached.\n if (executionContext === null || typeof executionContext !== 'object') {\n return loader();\n }\n let perRequest = labelForwardingRequestCache.get(executionContext as object);\n if (!perRequest) {\n perRequest = new Map();\n labelForwardingRequestCache.set(executionContext as object, perRequest);\n }\n let inFlight = perRequest.get(cacheKey);\n if (!inFlight) {\n inFlight = loader();\n perRequest.set(cacheKey, inFlight);\n }\n return inFlight;\n}\n\n/**\n * Build a VIRTUAL summary field that labels a row from a related resource per a\n * {@link LabelRelationDescriptor}. Drop it into a resource's main schema; the\n * frontend then references the field name in `getFrontendResourceLabel` (a plain,\n * synchronous field ref — no async resolver).\n *\n * The returned field is `isVirtual` (computed, never persisted; excluded from\n * request DTOs), `isSummaryField` (included in the SUMMARY DTO, so it is present\n * in LIST/collection rows, not only on READ), and `isHidden({ display: true })`\n * (it IS the row/title label, so it must never ALSO auto-render as a standalone\n * card field or table column — `detectSummaryFields` skips display-hidden fields;\n * the value still reaches the frontend label, which reads the field by name). At\n * read time the framework's\n * `VirtualFieldsBackendService` invokes the `calculate` below with the backend\n * `utils`. `calculate`:\n * 1. reads the join value from `currentObject[localField]`;\n * 2. resolves the related row via the related repository's system read\n * `findFieldValuesByJoinField` (the read-direction sibling of the search\n * join's `findSearchMatchTargetIds`), deduped per request (see\n * {@link resolveRelatedRowDeduped});\n * 3. renders the label via {@link renderForwardedLabel}.\n * Failure modes (missing value, unavailable repo, absent/empty related row) degrade\n * to the fallback chain — `descriptor.fallbackField`'s own-field value first, else\n * `descriptor.fallback`; `calculate` never throws.\n *\n * @remarks `dependencies: [localField]` is consumed by the repository DTO builder\n * (`repository-dto-builder.utils.ts`), which adds the dependency to the read\n * projection — so `calculate` receives the join value even when `localField` is\n * not itself a summary field. (On `organizationMembers`, `userId` is independently\n * a summary field too.)\n */\nexport function forwardedLabel(\n descriptor: LabelRelationDescriptor,\n): DecoratedPrimitiveZodType<z.ZodOptional<z.ZodString>> {\n const joinField = descriptor.relatedJoinField ?? '_id';\n\n return z\n .string()\n .optional()\n .isVirtual({\n dependencies: [descriptor.localField],\n calculate: async ({ currentObject, executionContext, utils }) => {\n const row = currentObject as Record<string, unknown> | undefined;\n\n // Fallback chain: prefer an own-field identifier (e.g. an immutable\n // `userEmail`) over the static string, so an unresolvable related label\n // degrades to a human value rather than a raw id. Applied on EVERY\n // non-resolution path (no join value, no repo, missing/empty related row).\n const resolveFallback = (): string => {\n if (descriptor.fallbackField) {\n const own = row?.[descriptor.fallbackField];\n if (own !== null && own !== undefined && String(own).trim().length > 0) {\n return String(own);\n }\n }\n return descriptor.fallback ?? '';\n };\n\n const rawValue = row?.[descriptor.localField];\n if (rawValue === null || rawValue === undefined || rawValue === '') {\n return resolveFallback();\n }\n const joinValue = String(rawValue);\n\n const relatedRepository = utils?.repositories?.getRepository?.(descriptor.relatedResource);\n if (!relatedRepository || typeof relatedRepository.findFieldValuesByJoinField !== 'function') {\n return resolveFallback();\n }\n\n const cacheKey = `${descriptor.relatedResource}|${joinField}|${joinValue}`;\n const relatedRow = await resolveRelatedRowDeduped(executionContext, cacheKey, async () => {\n // Fail-safe: a related-read error resolves to \"no row\" (→ fallback),\n // never a throw. Resolving (rather than rejecting) also keeps the\n // per-request dedup cache from storing a rejected promise that would\n // re-throw for every other row sharing this join value.\n try {\n const rowsByValue: Map<string, Record<string, unknown>> =\n await relatedRepository.findFieldValuesByJoinField(joinField, [joinValue], descriptor.fields);\n return rowsByValue.get(joinValue);\n } catch (error) {\n utils?.logger?.warn?.(\n `[forwardedLabel] related read failed for ${descriptor.relatedResource}.${joinField}=${joinValue}; using fallback`,\n error,\n );\n return undefined;\n }\n });\n\n // Render the related fields; if nothing renders, run the fallback chain\n // (own-field → static) — pass an empty static fallback to detect \"empty\".\n const rendered = renderForwardedLabel(relatedRow, { ...descriptor, fallback: '' });\n return rendered.length > 0 ? rendered : resolveFallback();\n },\n })\n .isSummaryField()\n .isHidden({ display: true });\n}\n\n/**\n * Can a later operation undo this one? The declaration first, then a derivation from the verb.\n *\n * ## The derivation, and why it is total rather than a list\n *\n * A DELETE-like operation is irreversible; everything else is reversible until it says otherwise.\n * That reads the operation's OWN statement of which core verb it resembles\n * (`resourceOperationLike`), so it covers every DELETE variant in the catalogue — 53 at the time of\n * writing — with no annotation, and covers one added tomorrow the same way. A hand-kept list of\n * irreversible operation names is the shape `.claude/rules/invariant-call-site-enumeration.md`\n * exists to refuse: correct on the day it is written, silently incomplete afterwards.\n *\n * ## Why the fallback is REVERSIBLE rather than fail-closed\n *\n * Fail-closed would mean \"assume irreversible when unsure\", which sounds safer and is not: it puts\n * every unannotated custom verb straight back into the danger zone, which is the state this\n * replaces — a section so full that a reader stops reading it. The costs are asymmetric in the\n * other direction. An irreversible act mis-filed as reversible keeps its destructive COLOUR (that\n * comes from `riskLevel`) and its confirmation, and is merely not grouped under a heading promising\n * permanence. A reversible act mis-filed as irreversible devalues the heading for everything\n * genuinely in it.\n *\n * The residual is real: a genuinely irreversible CUSTOM verb nobody annotates is under-marked.\n * Eleven were declared when this landed — `ROTATE` ×4, `RESET_FEATURES` ×2, `ROTATE_TOKEN`,\n * `REVOKE_TOKEN`, `PURGE_ALL`, `PURGE_OLD`, `RESET_TO_DEFAULTS` — each carrying its reason at the\n * site.\n *\n * ## Why it lives HERE and not beside the operation-variant type\n *\n * It was written in `resources-config.shared.schemas.ts` first, next to the field it resolves, and\n * that broke thirteen test files with `z.enum(undefined)`. Every prior use of `CoreResourceOperation`\n * in that module is a TYPE position, so its import was elided at emit; one runtime comparison made\n * the import real, added a module edge and closed a cycle. This module already imports\n * `CoreResourceOperation` at runtime, so the resolver adds no edge at all.\n *\n * The parameter is STRUCTURAL rather than `Pick<ResourceConfiguration_OperationVariant_Base, …>`\n * for the same reason — naming that type would import the module this one is imported BY.\n */\nexport interface ResourceOperation_ReversibilityInput {\n reversibility?: ResourceOperationReversibility;\n resourceOperationLike?: CoreResourceOperation;\n /** A literal core operation carries its verb HERE and no `resourceOperationLike`. */\n operationIdentifier?: unknown;\n}\n\n/**\n * The default is derived from the EFFECTIVE verb — `resourceOperationLike`, else the operation's own\n * identifier — and a delete of one row or of many is irreversible.\n *\n * It read `resourceOperationLike === DELETE` alone, while this file said the default \"covers the 53\n * DELETE / DELETE_MANY variants\". A literal core DELETE carries no `resourceOperationLike` (the\n * factory copies it from the variant, where a core operation has none), so the plain Delete of every\n * resource derived REVERSIBLE — and the danger zone, which admits what is risky AND irreversible,\n * never received it. A delete-many-like custom verb (a purge) was missed the same way, and a\n * confirmation told a purge nothing about permanence.\n */\nexport function resolveOperationReversibility(\n variant: ResourceOperation_ReversibilityInput,\n): ResourceOperationReversibility {\n if (variant.reversibility) return variant.reversibility;\n const effective = variant.resourceOperationLike ?? variant.operationIdentifier;\n return effective === CoreResourceOperation.DELETE || effective === CoreResourceOperation.DELETE_MANY\n ? ResourceOperationReversibility.IRREVERSIBLE\n : ResourceOperationReversibility.REVERSIBLE;\n}\n\n/** True when nothing in the product can undo this operation. See {@link resolveOperationReversibility}. */\nexport function isIrreversibleOperation(variant: ResourceOperation_ReversibilityInput): boolean {\n return resolveOperationReversibility(variant) === ResourceOperationReversibility.IRREVERSIBLE;\n}\n"]}
|
|
@@ -216,7 +216,8 @@ export declare class Resources_SharedUtils {
|
|
|
216
216
|
* `resourceFieldIdentifier`, whose stem need not be the singular of the resource type
|
|
217
217
|
* (`userSelfPreferencesId` → `userSelfPreferences`, while `singularize('userSelfPreferences')`
|
|
218
218
|
* is `userSelfPreference`), and `toResourceName` re-pluralizes that stem for 1:many
|
|
219
|
-
* (`organizationInvoiceRef` → `
|
|
219
|
+
* (`organizationInvoiceRef` → `organizationInvoiceRefs`; it said `…Reves` until #580 narrowed the
|
|
220
|
+
* pluralizer's `f → ves` rule to its real exceptions). Measured over the core registry on
|
|
220
221
|
* 2026-09-10: of its 111 relationships **37 carry an enabled `contextPolicy`, and the two
|
|
221
222
|
* derivations disagreed on 11 of those 37** — every one of those fields was populated by the
|
|
222
223
|
* backend and then silently Zod-stripped on the way out the controller, with no error and no log
|
|
@@ -583,8 +584,8 @@ export declare class Resources_SharedUtils {
|
|
|
583
584
|
static resolveRelationshipLifecycleOnParentDeleteConfig(relationship: ResourceRelationship): {
|
|
584
585
|
enabled: boolean;
|
|
585
586
|
mode: ChildLifecycleMode;
|
|
586
|
-
strategy: ChildLifecycleStrategy;
|
|
587
587
|
maxDepth: number;
|
|
588
|
+
strategy?: ChildLifecycleStrategy;
|
|
588
589
|
};
|
|
589
590
|
/**
|
|
590
591
|
* Resolve the effective lifecycle-on-parent-create projection — the eager
|