@wildo-ai/saas-models 1.1.5 → 1.1.6
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/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-versions.shared.resources-config.schemas.js +2 -1
- package/dist/esm/applications/application-versions.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/applications/applications-context.schemas.d.ts +176 -2
- package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.js +3 -2
- package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/applications/applications.shared.schemas.d.ts +7 -5
- package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.schemas.js +6 -4
- package/dist/esm/applications/applications.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts +10 -1
- 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 +49 -15
- package/dist/esm/billing/billing-account.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/billing-account.shared.schemas.js +2 -2
- package/dist/esm/billing/billing-account.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.d.ts +25 -0
- package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.js +19 -0
- package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts +27 -5
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.js +30 -4
- package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.d.ts +37 -11
- package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.js +31 -19
- package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
- package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts +2 -0
- package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js +18 -7
- package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/credit-pool.shared.schemas.d.ts +2 -0
- package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/credit-pool.shared.schemas.js +7 -1
- package/dist/esm/billing/credit-pool.shared.schemas.js.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js +6 -6
- package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.schemas.js +1 -1
- package/dist/esm/billing/invoice-ref.shared.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 +5 -3
- package/dist/esm/billing/price.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts +11 -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 +39 -23
- package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-definition.shared.schemas.d.ts +30 -2
- package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product-definition.shared.schemas.js +35 -0
- package/dist/esm/billing/product-definition.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts +6 -3
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.schemas.d.ts +7 -3
- package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.schemas.js +22 -7
- package/dist/esm/billing/product.shared.schemas.js.map +1 -1
- package/dist/esm/billing/promotions.shared.resources-config.schemas.js +8 -8
- package/dist/esm/billing/promotions.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/public-pricing-catalog.shared.atoms.d.ts +135 -0
- package/dist/esm/billing/public-pricing-catalog.shared.atoms.d.ts.map +1 -0
- package/dist/esm/billing/public-pricing-catalog.shared.atoms.js +112 -0
- package/dist/esm/billing/public-pricing-catalog.shared.atoms.js.map +1 -0
- package/dist/esm/billing/public-pricing-catalog.shared.d.ts +30 -0
- package/dist/esm/billing/public-pricing-catalog.shared.d.ts.map +1 -0
- package/dist/esm/billing/public-pricing-catalog.shared.js +53 -0
- package/dist/esm/billing/public-pricing-catalog.shared.js.map +1 -0
- package/dist/esm/billing/referral-reward.shared.schemas.d.ts +51 -0
- package/dist/esm/billing/referral-reward.shared.schemas.d.ts.map +1 -0
- package/dist/esm/billing/referral-reward.shared.schemas.js +92 -0
- package/dist/esm/billing/referral-reward.shared.schemas.js.map +1 -0
- package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts +54 -33
- package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.resources-config.schemas.js +56 -2
- package/dist/esm/billing/referral.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/referral.shared.schemas.d.ts +22 -37
- package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.schemas.js +24 -44
- package/dist/esm/billing/referral.shared.schemas.js.map +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +9 -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 +55 -22
- package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/subscription.shared.schemas.d.ts +80 -5
- package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/subscription.shared.schemas.js +85 -25
- package/dist/esm/billing/subscription.shared.schemas.js.map +1 -1
- package/dist/esm/billing/usage-record.shared.schemas.js +5 -5
- package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +143 -2
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.js +84 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +14 -1
- 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 +4 -0
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.d.ts +70 -0
- package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.js +87 -0
- package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts +34 -0
- package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js +137 -3
- package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts +7 -0
- package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts +28 -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-logs.shared.resources-config.schemas.js +29 -8
- package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +29 -6
- 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 +38 -9
- 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 +1822 -146
- 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 +1777 -87
- 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 +10 -0
- 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 +148 -7
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
- package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts +2 -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 +2 -0
- package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts +0 -8
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +0 -1
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.js.map +0 -1
- package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts +17 -8
- package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js +43 -20
- package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts +38 -0
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js +39 -0
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.d.ts +35 -0
- package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.js +82 -0
- package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.js.map +1 -0
- package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.d.ts +37 -0
- package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.js +223 -0
- package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/legal-holds.shared.schemas.d.ts +222 -0
- package/dist/esm/compliance/privacy/legal-holds.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/legal-holds.shared.schemas.js +331 -0
- package/dist/esm/compliance/privacy/legal-holds.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts +37 -3
- 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 +33 -4
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.d.ts +52 -0
- package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.js +116 -0
- package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.d.ts +11 -0
- package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.js +11 -0
- package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/retention-binding.shared.utils.d.ts +93 -0
- package/dist/esm/compliance/privacy/retention-binding.shared.utils.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/retention-binding.shared.utils.js +149 -0
- package/dist/esm/compliance/privacy/retention-binding.shared.utils.js.map +1 -0
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.d.ts +43 -0
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.js +106 -0
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts +209 -0
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.js +226 -0
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts +129 -5
- package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.js +128 -4
- package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.d.ts +53 -0
- package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.js +74 -0
- package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.js.map +1 -0
- package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.d.ts +311 -0
- package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.js +355 -0
- package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts +178 -39
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js +145 -35
- 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-render.shared.utils.js +26 -0
- package/dist/esm/compliance/privacy/subject-export-render.shared.utils.js.map +1 -1
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts +9 -0
- 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/config/app-configuration-shared.shared.schemas.d.ts +109 -1
- package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/app-configuration-shared.shared.schemas.js +57 -0
- package/dist/esm/config/app-configuration-shared.shared.schemas.js.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +69 -0
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.js +93 -0
- package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +16 -16
- package/dist/esm/config/frontend/navigation.shared.schemas.d.ts +160 -61
- package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/navigation.shared.schemas.js +297 -65
- package/dist/esm/config/frontend/navigation.shared.schemas.js.map +1 -1
- package/dist/esm/errors/caught-error-description.shared.utils.d.ts +69 -0
- package/dist/esm/errors/caught-error-description.shared.utils.d.ts.map +1 -0
- package/dist/esm/errors/caught-error-description.shared.utils.js +77 -0
- package/dist/esm/errors/caught-error-description.shared.utils.js.map +1 -0
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +76 -3
- 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 +76 -2
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
- package/dist/esm/errors/errors.shared.schemas.d.ts +20 -1
- package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.schemas.js +16 -9
- package/dist/esm/errors/errors.shared.schemas.js.map +1 -1
- package/dist/esm/errors/errors.shared.utils.d.ts +0 -24
- package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.utils.js +0 -39
- package/dist/esm/errors/errors.shared.utils.js.map +1 -1
- package/dist/esm/errors/thrown-value-description.shared.utils.d.ts +6 -7
- package/dist/esm/errors/thrown-value-description.shared.utils.d.ts.map +1 -1
- package/dist/esm/errors/thrown-value-description.shared.utils.js +6 -7
- package/dist/esm/errors/thrown-value-description.shared.utils.js.map +1 -1
- package/dist/esm/external-data/external-data-pipeline-description.shared.d.ts +70 -0
- package/dist/esm/external-data/external-data-pipeline-description.shared.d.ts.map +1 -0
- package/dist/esm/external-data/external-data-pipeline-description.shared.js +92 -0
- package/dist/esm/external-data/external-data-pipeline-description.shared.js.map +1 -0
- package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.d.ts +154 -0
- package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.d.ts.map +1 -0
- package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.js +161 -0
- package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.js.map +1 -0
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +1071 -23
- 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 +1065 -17
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
- package/dist/esm/external-data/external-data-provenance.shared.d.ts +71 -0
- package/dist/esm/external-data/external-data-provenance.shared.d.ts.map +1 -0
- package/dist/esm/external-data/external-data-provenance.shared.js +88 -0
- package/dist/esm/external-data/external-data-provenance.shared.js.map +1 -0
- package/dist/esm/external-data.exports.d.ts +5 -0
- package/dist/esm/external-data.exports.d.ts.map +1 -1
- package/dist/esm/external-data.exports.js +11 -0
- package/dist/esm/external-data.exports.js.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +17 -2
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +22 -4
- 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.map +1 -1
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js +3 -0
- 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.map +1 -1
- package/dist/esm/external-providers/engine-capability-surface.shared.js +2 -0
- package/dist/esm/external-providers/engine-capability-surface.shared.js.map +1 -1
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +152 -1
- 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 +4 -3
- 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 +4 -3
- 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 +45 -0
- 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 +14 -0
- 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 +188 -4
- 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 +76 -9
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts +175 -33
- 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 +247 -42
- package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -1
- package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.d.ts +53 -0
- package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.js +41 -0
- package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.d.ts +150 -0
- package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.js +22 -0
- package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.js.map +1 -0
- package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.d.ts +42 -0
- package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.js +49 -0
- package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts +53 -0
- package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js +56 -0
- package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +34 -0
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-capability.shared.schemas.js +34 -0
- 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 +341 -4
- 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 +270 -20
- 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 +6 -2
- 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 +6 -2
- 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 +174 -1
- 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 +125 -0
- 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 +3 -3
- package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.d.ts +42 -0
- package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.js +57 -0
- package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts +6 -0
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.js +6 -0
- package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.d.ts +58 -0
- package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.js +35 -0
- package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-shared-connections.shared.schemas.d.ts +115 -0
- package/dist/esm/external-providers/provider-shared-connections.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-shared-connections.shared.schemas.js +137 -0
- package/dist/esm/external-providers/provider-shared-connections.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-usage-cost.shared.d.ts +73 -0
- package/dist/esm/external-providers/provider-usage-cost.shared.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-usage-cost.shared.js +171 -0
- package/dist/esm/external-providers/provider-usage-cost.shared.js.map +1 -0
- package/dist/esm/external-providers/provider-usage-pricing.example.d.ts +12 -0
- package/dist/esm/external-providers/provider-usage-pricing.example.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-usage-pricing.example.js +40 -0
- package/dist/esm/external-providers/provider-usage-pricing.example.js.map +1 -0
- package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts +68 -32
- package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.js +63 -52
- package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.js.map +1 -1
- package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts +5 -5
- 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 +13 -5
- package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/features/connected-feature.example.d.ts.map +1 -1
- package/dist/esm/features/connected-feature.example.js +2 -1
- package/dist/esm/features/connected-feature.example.js.map +1 -1
- package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
- package/dist/esm/features/core-feature-definitions.shared.js +2 -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 +2 -11
- package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/feature-definition.shared.schemas.js +0 -12
- package/dist/esm/features/feature-definition.shared.schemas.js.map +1 -1
- package/dist/esm/features/scope-features.shared.schemas.d.ts +31 -17
- package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/scope-features.shared.schemas.js +27 -5
- package/dist/esm/features/scope-features.shared.schemas.js.map +1 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts +5 -5
- package/dist/esm/flows-actors/actors.shared.schemas.d.ts +127 -11
- package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/actors.shared.schemas.js +32 -1
- package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts +16 -0
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.js +7 -0
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.d.ts +68 -0
- package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.js +276 -0
- package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.d.ts +468 -0
- package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.js +472 -0
- package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/autonomous-agents.shared.schemas.d.ts +118 -0
- package/dist/esm/flows-actors/autonomous-agents.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/autonomous-agents.shared.schemas.js +144 -0
- package/dist/esm/flows-actors/autonomous-agents.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts +142 -8
- 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 +209 -11
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +37 -2
- 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 +30 -2
- 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 -11
- 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 +12 -5
- 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 +45 -6
- 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 +31 -5
- package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js +30 -30
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts +15 -7
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows.shared.schemas.d.ts +15 -0
- package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts +506 -0
- package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/human-decision.shared.schemas.js +502 -0
- package/dist/esm/flows-actors/human-decision.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.d.ts +46 -0
- package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.js +65 -0
- package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/flows-actors/model-call-attributions.shared.schemas.d.ts +120 -0
- package/dist/esm/flows-actors/model-call-attributions.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/model-call-attributions.shared.schemas.js +165 -0
- package/dist/esm/flows-actors/model-call-attributions.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.d.ts +45 -0
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.js +127 -0
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.d.ts +83 -0
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.js +97 -0
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/model-cost-summary.shared.schemas.d.ts +136 -0
- package/dist/esm/flows-actors/model-cost-summary.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/model-cost-summary.shared.schemas.js +90 -0
- package/dist/esm/flows-actors/model-cost-summary.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts +5 -1
- package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js +19 -4
- package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts +13 -15
- package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/provider-call-records.shared.schemas.js +30 -17
- package/dist/esm/flows-actors/provider-call-records.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/review-deadlines.shared.schemas.d.ts +268 -0
- package/dist/esm/flows-actors/review-deadlines.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/review-deadlines.shared.schemas.js +576 -0
- package/dist/esm/flows-actors/review-deadlines.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts +30 -0
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/work-attribution.shared.schemas.d.ts +129 -0
- package/dist/esm/flows-actors/work-attribution.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/work-attribution.shared.schemas.js +141 -0
- package/dist/esm/flows-actors/work-attribution.shared.schemas.js.map +1 -0
- package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts +22 -1
- package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts.map +1 -1
- package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js +23 -0
- package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js.map +1 -1
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts +61 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -1
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js +61 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.schemas.js +11 -10
- package/dist/esm/guidance/guidance-state.shared.schemas.js.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.schemas.js +6 -6
- package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.js +8 -7
- package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js +1 -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 +550 -30
- 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 +498 -34
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
- package/dist/esm/http-api-binding/http-api-erasure-stance.shared.d.ts +62 -0
- package/dist/esm/http-api-binding/http-api-erasure-stance.shared.d.ts.map +1 -0
- package/dist/esm/http-api-binding/http-api-erasure-stance.shared.js +66 -0
- package/dist/esm/http-api-binding/http-api-erasure-stance.shared.js.map +1 -0
- package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.d.ts +133 -0
- package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.d.ts.map +1 -0
- package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.js +191 -0
- package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.js.map +1 -0
- package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts +37 -6
- package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts.map +1 -1
- package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js +37 -6
- package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js.map +1 -1
- package/dist/esm/i18n/application-config-vocabulary.shared.d.ts +36 -0
- package/dist/esm/i18n/application-config-vocabulary.shared.d.ts.map +1 -0
- package/dist/esm/i18n/application-config-vocabulary.shared.js +39 -0
- package/dist/esm/i18n/application-config-vocabulary.shared.js.map +1 -0
- package/dist/esm/i18n/engine-open-vocabulary-values.shared.d.ts +11 -0
- package/dist/esm/i18n/engine-open-vocabulary-values.shared.d.ts.map +1 -0
- package/dist/esm/i18n/engine-open-vocabulary-values.shared.js +14 -0
- package/dist/esm/i18n/engine-open-vocabulary-values.shared.js.map +1 -0
- package/dist/esm/i18n/engine-open-vocabulary.shared.d.ts +20 -0
- package/dist/esm/i18n/engine-open-vocabulary.shared.d.ts.map +1 -0
- package/dist/esm/i18n/engine-open-vocabulary.shared.js +21 -0
- package/dist/esm/i18n/engine-open-vocabulary.shared.js.map +1 -0
- package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.d.ts +94 -0
- package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.js +206 -0
- package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/inbound/conversation-threads.shared.schemas.d.ts +169 -0
- package/dist/esm/inbound/conversation-threads.shared.schemas.d.ts.map +1 -0
- package/dist/esm/inbound/conversation-threads.shared.schemas.js +231 -0
- package/dist/esm/inbound/conversation-threads.shared.schemas.js.map +1 -0
- package/dist/esm/inbound/inbound-channels.shared.schemas.d.ts +195 -0
- package/dist/esm/inbound/inbound-channels.shared.schemas.d.ts.map +1 -0
- package/dist/esm/inbound/inbound-channels.shared.schemas.js +244 -0
- package/dist/esm/inbound/inbound-channels.shared.schemas.js.map +1 -0
- package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.d.ts +36 -0
- package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.js +169 -0
- package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/inbound/inbound-delivery.shared.schemas.d.ts +404 -0
- package/dist/esm/inbound/inbound-delivery.shared.schemas.d.ts.map +1 -0
- package/dist/esm/inbound/inbound-delivery.shared.schemas.js +449 -0
- package/dist/esm/inbound/inbound-delivery.shared.schemas.js.map +1 -0
- package/dist/esm/inbound/inbound-endpoint-env.shared.d.ts +46 -0
- package/dist/esm/inbound/inbound-endpoint-env.shared.d.ts.map +1 -0
- package/dist/esm/inbound/inbound-endpoint-env.shared.js +57 -0
- package/dist/esm/inbound/inbound-endpoint-env.shared.js.map +1 -0
- package/dist/esm/index.d.ts +58 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +67 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts +28 -0
- package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js +29 -0
- package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts +95 -1
- package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js +121 -0
- package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/meta-workflows.exports.d.ts +0 -1
- package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
- package/dist/esm/meta-workflows.exports.js +0 -1
- package/dist/esm/meta-workflows.exports.js.map +1 -1
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +7 -1
- 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 +35 -0
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.d.ts +131 -0
- package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.js +258 -0
- package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.d.ts +448 -0
- package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.d.ts.map +1 -0
- package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.js +530 -0
- package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.js.map +1 -0
- 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 -3
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts +16 -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 +46 -16
- 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 +19 -12
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js +77 -12
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.d.ts +35 -3
- package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.js +43 -3
- package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.d.ts +66 -399
- package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.js +111 -58
- package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts +5 -5
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js +6 -6
- 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 +3 -0
- 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 +60 -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 +3 -0
- package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-members.shared.schemas.js +30 -0
- package/dist/esm/organizations/organization-members.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.js +9 -9
- package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.schemas.js +4 -4
- package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts +0 -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 +5 -5
- package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.js +15 -10
- package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.js +1 -1
- package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-members.shared.schemas.js +2 -1
- package/dist/esm/organizations/organization-unit-members.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts +63 -1
- package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing-decision.shared.js +106 -5
- package/dist/esm/organizations/organization-unit-narrowing-decision.shared.js.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.shared.js +9 -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.map +1 -1
- package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js +7 -2
- package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts +3 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +12 -8
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organizations.shared.schemas.d.ts +7 -2
- package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.schemas.js +51 -1
- package/dist/esm/organizations/organizations.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.d.ts +58 -0
- package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.js +188 -0
- package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.d.ts +122 -0
- package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.d.ts.map +1 -0
- package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.js +136 -0
- package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.js.map +1 -0
- package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.d.ts +36 -0
- package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.js +155 -0
- package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.d.ts +229 -0
- package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.d.ts.map +1 -0
- package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.js +290 -0
- package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.js.map +1 -0
- package/dist/esm/organizations/service-provider-client-controls.shared.schemas.d.ts +48 -0
- package/dist/esm/organizations/service-provider-client-controls.shared.schemas.d.ts.map +1 -0
- package/dist/esm/organizations/service-provider-client-controls.shared.schemas.js +50 -0
- package/dist/esm/organizations/service-provider-client-controls.shared.schemas.js.map +1 -0
- package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.d.ts +97 -0
- package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.js +572 -0
- package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/organizations/service-provider-relationships.shared.schemas.d.ts +590 -0
- package/dist/esm/organizations/service-provider-relationships.shared.schemas.d.ts.map +1 -0
- package/dist/esm/organizations/service-provider-relationships.shared.schemas.js +869 -0
- package/dist/esm/organizations/service-provider-relationships.shared.schemas.js.map +1 -0
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts +36 -6
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js +57 -16
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
- package/dist/esm/provider-registration-runtime.exports.d.ts +0 -1
- package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
- package/dist/esm/provider-registration-runtime.exports.js +0 -1
- package/dist/esm/provider-registration-runtime.exports.js.map +1 -1
- package/dist/esm/public-runtime/index.d.ts +30 -11
- package/dist/esm/public-runtime/index.d.ts.map +1 -1
- package/dist/esm/public-runtime/index.js +30 -11
- package/dist/esm/public-runtime/index.js.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.d.ts +36 -8
- package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.js +12 -0
- package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
- 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/manual-controllers-routes-documentation.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-documentation.js +147 -8
- package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts +51 -23
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.js +64 -0
- package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.d.ts +78 -13
- package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.js +91 -18
- package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
- package/dist/esm/resources/embedded-resource-mark.shared.utils.d.ts +21 -0
- package/dist/esm/resources/embedded-resource-mark.shared.utils.d.ts.map +1 -0
- package/dist/esm/resources/embedded-resource-mark.shared.utils.js +22 -0
- package/dist/esm/resources/embedded-resource-mark.shared.utils.js.map +1 -0
- package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.js +812 -32
- package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.d.ts +244 -48
- package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.js +151 -17
- 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 +353 -12
- package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.d.ts +45 -0
- package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.js +92 -0
- package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.d.ts +2 -17
- package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.js +24 -20
- package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources.shared.utils.d.ts +16 -8
- package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.utils.js +16 -8
- package/dist/esm/resources/resources.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/collection-export.shared.utils.d.ts +2 -2
- package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/collection-export.shared.utils.js +4 -2
- package/dist/esm/resources/utils/collection-export.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.d.ts +103 -0
- package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.d.ts.map +1 -0
- package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.js +275 -0
- package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.js.map +1 -0
- package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.d.ts +51 -0
- package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.d.ts.map +1 -0
- package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.js +28 -0
- package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.js.map +1 -0
- package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/populated-file-fields.shared.utils.js +30 -19
- package/dist/esm/resources/utils/populated-file-fields.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.d.ts +2 -0
- package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.d.ts.map +1 -0
- package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.js +33 -0
- package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.js.map +1 -0
- package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts +15 -0
- package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.factory.js +6 -1
- package/dist/esm/resources/utils/resource-polymorphism.factory.js.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.schemas.js +30 -4
- package/dist/esm/resources/utils/resource-polymorphism.schemas.js.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts +46 -0
- 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 +205 -22
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.map +1 -1
- package/dist/esm/resources/utils/resources-serialization.utils.d.ts +19 -2
- package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-serialization.utils.js +4 -0
- package/dist/esm/resources/utils/resources-serialization.utils.js.map +1 -1
- package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/shared-persistence-collection.utils.js +15 -9
- package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
- package/dist/esm/resources/work-unit.shared.schemas.d.ts +20 -0
- package/dist/esm/resources/work-unit.shared.schemas.d.ts.map +1 -0
- package/dist/esm/resources/work-unit.shared.schemas.js +19 -0
- package/dist/esm/resources/work-unit.shared.schemas.js.map +1 -0
- package/dist/esm/runtime/execution-context.shared.schemas.d.ts +48 -1
- package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
- package/dist/esm/runtime/execution-context.shared.schemas.js +101 -9
- package/dist/esm/runtime/execution-context.shared.schemas.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +37 -20
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +61 -48
- 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 +26 -0
- package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys.shared.schemas.js +39 -5
- package/dist/esm/security/api-keys/api-keys.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +5 -3
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +6 -0
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js +2 -2
- 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 +11 -0
- 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 +19 -8
- 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 +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js +5 -5
- 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.js +11 -11
- 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 +2 -0
- package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js +9 -0
- package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.d.ts +169 -0
- package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.js +162 -0
- package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.js.map +1 -0
- 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 +10 -8
- package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js +8 -8
- 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.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +17 -16
- 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.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js +28 -25
- 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 +17 -6
- 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 +90 -38
- 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 +0 -24
- 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 +79 -68
- 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 +8 -1
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js +7 -0
- 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.js +1 -1
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js +7 -7
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.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 +56 -0
- package/dist/esm/security/authorizations/roles.shared.defaults.js.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.d.ts +77 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.js +90 -0
- package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
- package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.d.ts +86 -0
- package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.js +40 -0
- package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.js.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +2 -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 +2 -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 +2 -1
- 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 +2 -1
- 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 +46 -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 +81 -21
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -1
- package/dist/esm/security/credential-rotation-grace.shared.utils.d.ts +69 -0
- package/dist/esm/security/credential-rotation-grace.shared.utils.d.ts.map +1 -0
- package/dist/esm/security/credential-rotation-grace.shared.utils.js +77 -0
- package/dist/esm/security/credential-rotation-grace.shared.utils.js.map +1 -0
- 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 +28 -8
- 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 +3 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js +89 -14
- 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 +1 -0
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js +25 -4
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
- package/dist/esm/security/outbound-target-control.shared.schemas.d.ts +7 -1
- package/dist/esm/security/outbound-target-control.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/outbound-target-control.shared.schemas.js +6 -0
- package/dist/esm/security/outbound-target-control.shared.schemas.js.map +1 -1
- package/dist/esm/security/submission-challenge/submission-challenge.shared.d.ts +143 -0
- package/dist/esm/security/submission-challenge/submission-challenge.shared.d.ts.map +1 -0
- package/dist/esm/security/submission-challenge/submission-challenge.shared.js +123 -0
- package/dist/esm/security/submission-challenge/submission-challenge.shared.js.map +1 -0
- package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.d.ts +384 -0
- package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.d.ts.map +1 -0
- package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.js +327 -0
- package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.js.map +1 -0
- package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts +121 -8
- package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js +83 -4
- package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts +266 -8
- package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js +291 -7
- package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts +313 -3
- package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js +369 -3
- package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js +2 -1
- package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts +5 -3
- 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 +19 -10
- package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js +6 -0
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-preferences-reset.shared.utils.js +2 -2
- 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 +0 -3
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +0 -3
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self.shared.resources-config.schemas.js +1 -1
- 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.map +1 -1
- package/dist/esm/users/users.shared.resources-config.schemas.js +82 -20
- package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/users.shared.schemas.d.ts +12 -9
- package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.schemas.js +49 -18
- package/dist/esm/users/users.shared.schemas.js.map +1 -1
- package/package.json +4 -4
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.js +0 -7
- package/dist/tsconfig.build.tsbuildinfo +0 -1
|
@@ -6,11 +6,28 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { ResourceConfiguration_OperationPath } from '../resources-config.shared.schemas';
|
|
8
8
|
import { ExecutionContext_ExecutionType, ExecutionContext_InitiatorIds, ExecutionContext_RoleInfo, ExecutionContext_RelationshipContext } from '../../runtime/execution-context.shared.schemas';
|
|
9
|
+
import type { AuditAgentActor } from '../../compliance/audit-trails/audit-actor.shared.schemas';
|
|
10
|
+
/**
|
|
11
|
+
* The ATTRIBUTION evidence an execution context carries beside its authority — who the trail says
|
|
12
|
+
* acted, never what the execution may do. Serialized with the context so a queued job's audit rows
|
|
13
|
+
* name the same principal, agent and delegating client as the request that enqueued it.
|
|
14
|
+
*
|
|
15
|
+
* Evidence only: the reconstructing side passes these to the context's evidence parameters, never
|
|
16
|
+
* into `initiatorIds`, and no authorization decision reads them.
|
|
17
|
+
*/
|
|
18
|
+
export interface SerializedExecutionContextAttribution {
|
|
19
|
+
/** The on-behalf-of principal of an internally-authorized execution (`ExecutionContext.auditActorUserId`). */
|
|
20
|
+
auditActorUserId?: string;
|
|
21
|
+
/** The agent that caused the work, when an agent's tool enqueued it (`ExecutionContext.agentActor`). */
|
|
22
|
+
agentActor?: AuditAgentActor;
|
|
23
|
+
/** The external OAuth client a person delegated to (`ExecutionContext.delegatingClientId`). */
|
|
24
|
+
delegatingClientId?: string;
|
|
25
|
+
}
|
|
9
26
|
/**
|
|
10
27
|
* Serialized execution context data structure.
|
|
11
28
|
* This is the plain object representation used in queue messages.
|
|
12
29
|
*/
|
|
13
|
-
export interface SerializedExecutionContextData {
|
|
30
|
+
export interface SerializedExecutionContextData extends SerializedExecutionContextAttribution {
|
|
14
31
|
executionType: ExecutionContext_ExecutionType;
|
|
15
32
|
initiatorIds: ExecutionContext_InitiatorIds | null;
|
|
16
33
|
initiatorRoles: ExecutionContext_RoleInfo[];
|
|
@@ -128,7 +145,7 @@ export declare class ResourceSerializationUtils {
|
|
|
128
145
|
initiatorRoles: ExecutionContext_RoleInfo[];
|
|
129
146
|
getContextResourceIds: () => ReadonlyMap<string, string | string[]>;
|
|
130
147
|
relationshipContexts: ExecutionContext_RelationshipContext[];
|
|
131
|
-
}): string;
|
|
148
|
+
} & SerializedExecutionContextAttribution): string;
|
|
132
149
|
/**
|
|
133
150
|
* Deserialize to raw data.
|
|
134
151
|
* Note: ExecutionContext reconstruction is backend-only and requires
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources-serialization.utils.d.ts","sourceRoot":"","sources":["../../../../../src/resources/utils/resources-serialization.utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mCAAmC,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,EAC7B,yBAAyB,EACzB,oCAAoC,EACrC,MAAM,gDAAgD,CAAC;
|
|
1
|
+
{"version":3,"file":"resources-serialization.utils.d.ts","sourceRoot":"","sources":["../../../../../src/resources/utils/resources-serialization.utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mCAAmC,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,EAC7B,yBAAyB,EACzB,oCAAoC,EACrC,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0DAA0D,CAAC;AAEhG;;;;;;;GAOG;AACH,MAAM,WAAW,qCAAqC;IACpD,8GAA8G;IAC9G,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wGAAwG;IACxG,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,+FAA+F;IAC/F,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,8BAA+B,SAAQ,qCAAqC;IAC3F,aAAa,EAAE,8BAA8B,CAAC;IAC9C,YAAY,EAAE,6BAA6B,GAAG,IAAI,CAAC;IACnD,cAAc,EAAE,yBAAyB,EAAE,CAAC;IAC5C,+BAA+B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IACnE,oBAAoB,CAAC,EAAE,oCAAoC,EAAE,CAAC;CAC/D;AAED;;;GAGG;AACH,qBAAa,0BAA0B;IAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2DG;IACH,MAAM,CAAC,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO;IAIpE;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM;IAIlE;;;;;;OAMG;IACH,MAAM,CAAC,sBAAsB,CAAC,aAAa,EAAE,mCAAmC,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,MAAM;IAWnG;;;;;OAKG;IACH,MAAM,CAAC,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,mCAAmC,CAAC,GAAG,EAAE,GAAG,CAAC;IAI5F;;;;;;;;;OASG;IACH,MAAM,CAAC,yBAAyB,CAAC,GAAG,EAAE;QACpC,aAAa,EAAE,8BAA8B,CAAC;QAC9C,YAAY,EAAE,6BAA6B,GAAG,IAAI,CAAC;QACnD,cAAc,EAAE,yBAAyB,EAAE,CAAC;QAC5C,qBAAqB,EAAE,MAAM,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;QACpE,oBAAoB,EAAE,oCAAoC,EAAE,CAAC;KAC9D,GAAG,qCAAqC,GAAG,MAAM;IAoBlD;;;;;;;OAOG;IACH,MAAM,CAAC,+BAA+B,CAAC,IAAI,EAAE,MAAM,GAAG,8BAA8B;IAIpF;;;;;;OAMG;IACH,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,6BAA6B,GAAG,IAAI;CAS3F"}
|
|
@@ -136,6 +136,10 @@ export class ResourceSerializationUtils {
|
|
|
136
136
|
initiatorRoles: ctx.initiatorRoles,
|
|
137
137
|
contextResourcesFieldIdentifier: contextResourcesObj,
|
|
138
138
|
relationshipContexts: ctx.relationshipContexts,
|
|
139
|
+
// Attribution evidence — absent keys stay absent so a context with none serializes exactly as before.
|
|
140
|
+
...(ctx.auditActorUserId !== undefined ? { auditActorUserId: ctx.auditActorUserId } : {}),
|
|
141
|
+
...(ctx.agentActor !== undefined ? { agentActor: ctx.agentActor } : {}),
|
|
142
|
+
...(ctx.delegatingClientId !== undefined ? { delegatingClientId: ctx.delegatingClientId } : {}),
|
|
139
143
|
});
|
|
140
144
|
}
|
|
141
145
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources-serialization.utils.js","sourceRoot":"","sources":["../../../../../src/resources/utils/resources-serialization.utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAsBH;;;GAGG;AACH,MAAM,OAAO,0BAA0B;IAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2DG;IACH,MAAM,CAAC,sBAAsB,CAAC,IAAY,EAAE,KAAc;QACxD,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;IAC9D,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,mBAAmB,CAAC,KAAc,EAAE,KAAc;QACvD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,0BAA0B,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,sBAAsB,CAAC,aAA4D;QACxF,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,kBAAkB,EAAE,aAAa,CAAC,kBAAkB;YACpD,mBAAmB,EAAE,aAAa,CAAC,mBAAmB;YACtD,WAAW,EAAE,aAAa,CAAC,WAAW;YACtC,UAAU,EAAE,aAAa,CAAC,UAAU;YACpC,kBAAkB,EAAE,aAAa,CAAC,kBAAkB;YACpD,eAAe,EAAE,aAAa,CAAC,eAAe;SAC/C,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,wBAAwB,CAAC,IAAY;QAC1C,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,yBAAyB,CAAC,GAMhC;QACC,qDAAqD;QACrD,MAAM,mBAAmB,GAAsC,EAAE,CAAC;QAClE,GAAG,CAAC,qBAAqB,EAAE,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;YACjD,mBAAmB,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,aAAa,EAAE,GAAG,CAAC,aAAa;YAChC,YAAY,EAAE,GAAG,CAAC,YAAY;YAC9B,cAAc,EAAE,GAAG,CAAC,cAAc;YAClC,+BAA+B,EAAE,mBAAmB;YACpD,oBAAoB,EAAE,GAAG,CAAC,oBAAoB;SAC/C,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,+BAA+B,CAAC,IAAY;QACjD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,mBAAmB,CAAC,IAAwB;QACjD,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;QACvB,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC9B,OAAO,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC;QACnC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF","sourcesContent":["/**\n * Resource Serialization Utilities\n * \n * Utilities for serializing/deserializing operation paths and execution contexts\n * for queue/RPC transport. Uses plain JSON serialization.\n */\n\nimport { ResourceConfiguration_OperationPath } from '../resources-config.shared.schemas';\nimport { \n ExecutionContext_ExecutionType,\n ExecutionContext_InitiatorIds,\n ExecutionContext_RoleInfo,\n ExecutionContext_RelationshipContext,\n} from '../../runtime/execution-context.shared.schemas';\n\n/**\n * Serialized execution context data structure.\n * This is the plain object representation used in queue messages.\n */\nexport interface SerializedExecutionContextData {\n executionType: ExecutionContext_ExecutionType;\n initiatorIds: ExecutionContext_InitiatorIds | null;\n initiatorRoles: ExecutionContext_RoleInfo[];\n contextResourcesFieldIdentifier: Record<string, string | string[]>;\n relationshipContexts?: ExecutionContext_RelationshipContext[];\n}\n\n/**\n * Serialization utilities for queue/RPC transport.\n * Uses JSON.stringify/parse - no Zod schemas needed.\n */\nexport class ResourceSerializationUtils {\n\n /**\n * JSON replacer that makes `bigint` values serializable.\n *\n * RELATIONSHIP TO THE PRIMARY MECHANISM: since `installBigIntJsonEncoding`\n * (`@wildo-ai/zod-decorators`) installs `BigInt.prototype.toJSON` at bootstrap,\n * a bare `JSON.stringify` already encodes bigint as a decimal string everywhere.\n * This replacer (and `stringifyWithBigInt` below) are now DEFENSE-IN-DEPTH:\n * explicit, greppable bigint-safety at named transport boundaries (queue,\n * webhook) that keeps them safe even if that bootstrap has not run, and produces\n * the identical decimal-string wire form. See the full network-boundary\n * mechanism map in `zod-decorators/src/install-bigint-json-encoding.ts`.\n *\n * `JSON.stringify` throws `TypeError: Do not know how to serialize a BigInt`\n * for any `bigint` value — it has no default JSON representation. This is a\n * real problem for the resource pipeline because `z_money` (`MoneyValue`)\n * stores its `amount` as a `bigint` (see `@wildo-ai/zod-decorators` →\n * `z_money`), deliberately, to avoid the >2^53 precision loss that `number`\n * would introduce for monetary amounts. Any resource payload carrying a money\n * field (prices, invoices, promotions, subscriptions, …) therefore cannot be\n * fed to a bare `JSON.stringify` at a transport / logging boundary.\n *\n * This replacer encodes `bigint` as a **decimal string**, NOT a `number`:\n * a string round-trips losslessly (`BigInt(\"1999\")`), whereas `Number(1999n)`\n * reintroduces exactly the precision risk `bigint` exists to prevent. The\n * provider-boundary `Number()` narrowing (e.g. Stripe's numeric amount API)\n * stays a deliberate, provider-specific conversion and is intentionally NOT\n * the framework default here.\n *\n * NOTE ON QUEUE ROUND-TRIP: worker-side re-hydration of a queued payload\n * (`JSON.parse` → re-validate against the operation's `internalDto`) coerces a\n * money `amount` string back to `bigint` because the DTO network boundary now\n * performs BOTH date and money-bigint coercion (`applyNetworkBoundaryCoercion`\n * rewrites `z.bigint()` leaves to accept the decimal-string form). So a queued\n * `z_money` operation round-trips losslessly through this replacer + that input\n * coercion. This replacer independently keeps the SERIALIZE boundary from\n * crashing (strictly better than an un-catchable enqueue throw). No queued\n * money operation exists today anyway (billing money ops are INTERNAL_CALL /\n * INLINE), so the queue path is crash-safety hardening, not an exercised path.\n *\n * WHY NO EQUIVALENT FOR `Date` (the natural follow-up question): `Date` does\n * NOT need a replacer, because the serialize/deserialize asymmetry runs the\n * opposite way to `bigint`.\n * - SERIALIZE: `JSON.stringify` throws on `bigint` (no `toJSON` on its\n * prototype) — hence this replacer. `Date` has `Date.prototype.toJSON`, so\n * `JSON.stringify` silently emits an ISO string (`\"2026-07-10T…Z\"`). No\n * throw, nothing to guard.\n * - DESERIALIZE: both types land as strings after `JSON.parse`, and both are\n * coerced back to their runtime type by the SAME DTO network boundary\n * (`applyNetworkBoundaryCoercion` rewrites `z.date()` → `z.coerce.date()`\n * AND `z.bigint()` → a string-accepting bigint). A queued payload is\n * re-validated against the operation's `internalDto`, so an ISO-string date\n * becomes a `Date` and a decimal-string money amount becomes a `bigint`.\n * The load-bearing invariant for BOTH types is that the payload is re-hydrated\n * THROUGH that coercing DTO — a raw `JSON.parse` with no re-validation would\n * hand back a string for a date field just as it would for a money bigint.\n *\n * @param _key JSON key (unused — bigint can appear at any depth)\n * @param value Value being serialized\n * @returns The value unchanged, or its decimal-string form when it is a bigint\n */\n static bigIntSafeJsonReplacer(_key: string, value: unknown): unknown {\n return typeof value === 'bigint' ? value.toString() : value;\n }\n\n /**\n * `JSON.stringify` variant that is safe for payloads containing `bigint`\n * (notably `z_money` / `MoneyValue` amounts).\n *\n * Use this at every pipeline serialization boundary that may receive a\n * resource `data` / payload object — queue job payloads, external payload\n * storage, debug logging of resource data — instead of a bare\n * `JSON.stringify`, which throws on the first `bigint` it encounters.\n *\n * @param value Value to serialize\n * @param space Optional pretty-print indentation (as in `JSON.stringify`)\n * @returns JSON string with bigint values encoded as decimal strings\n */\n static stringifyWithBigInt(value: unknown, space?: number): string {\n return JSON.stringify(value, ResourceSerializationUtils.bigIntSafeJsonReplacer, space);\n }\n\n /**\n * Serialize operation path for transport.\n * Use operationPathKey for routing, full path for execution.\n * \n * @param operationPath The operation path to serialize\n * @returns JSON string representation\n */\n static serializeOperationPath(operationPath: ResourceConfiguration_OperationPath<any, any>): string {\n return JSON.stringify({\n resourceIdentifier: operationPath.resourceIdentifier,\n operationIdentifier: operationPath.operationIdentifier,\n variantType: operationPath.variantType,\n variantKey: operationPath.variantKey,\n isOperationDefault: operationPath.isOperationDefault,\n isBulkOperation: operationPath.isBulkOperation,\n });\n }\n \n /**\n * Deserialize operation path from JSON string.\n * \n * @param json JSON string representation\n * @returns Operation path object\n */\n static deserializeOperationPath(json: string): ResourceConfiguration_OperationPath<any, any> {\n return JSON.parse(json);\n }\n \n /**\n * Serialize execution context for transport.\n * Extracts serializable data from ExecutionContext instance.\n * \n * Note: This method accepts an object with the ExecutionContext interface.\n * The actual ExecutionContext class is in saas-backend-lib.\n * \n * @param ctx ExecutionContext-like object with required properties\n * @returns JSON string representation\n */\n static serializeExecutionContext(ctx: {\n executionType: ExecutionContext_ExecutionType;\n initiatorIds: ExecutionContext_InitiatorIds | null;\n initiatorRoles: ExecutionContext_RoleInfo[];\n getContextResourceIds: () => ReadonlyMap<string, string | string[]>;\n relationshipContexts: ExecutionContext_RelationshipContext[];\n }): string {\n // Convert Map to plain object for JSON serialization\n const contextResourcesObj: Record<string, string | string[]> = {};\n ctx.getContextResourceIds().forEach((value, key) => {\n contextResourcesObj[key] = value;\n });\n \n return JSON.stringify({\n executionType: ctx.executionType,\n initiatorIds: ctx.initiatorIds,\n initiatorRoles: ctx.initiatorRoles,\n contextResourcesFieldIdentifier: contextResourcesObj,\n relationshipContexts: ctx.relationshipContexts,\n });\n }\n \n /**\n * Deserialize to raw data.\n * Note: ExecutionContext reconstruction is backend-only and requires\n * ExecutionContextCreatorBackendService.reconstructFromSerializedData()\n * \n * @param json JSON string representation\n * @returns Plain object with execution context data\n */\n static deserializeExecutionContextData(json: string): SerializedExecutionContextData {\n return JSON.parse(json);\n }\n \n /**\n * Parse serialized execution context to extract initiator IDs for querying.\n * Useful for extracting org/user IDs without full reconstruction.\n * \n * @param json Serialized execution context JSON\n * @returns Initiator IDs object or null\n */\n static extractInitiatorIds(json: string | undefined): ExecutionContext_InitiatorIds | null {\n if (!json) return null;\n try {\n const data = JSON.parse(json);\n return data.initiatorIds ?? null;\n } catch {\n return null;\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"resources-serialization.utils.js","sourceRoot":"","sources":["../../../../../src/resources/utils/resources-serialization.utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAwCH;;;GAGG;AACH,MAAM,OAAO,0BAA0B;IAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2DG;IACH,MAAM,CAAC,sBAAsB,CAAC,IAAY,EAAE,KAAc;QACxD,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;IAC9D,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,mBAAmB,CAAC,KAAc,EAAE,KAAc;QACvD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,0BAA0B,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,sBAAsB,CAAC,aAA4D;QACxF,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,kBAAkB,EAAE,aAAa,CAAC,kBAAkB;YACpD,mBAAmB,EAAE,aAAa,CAAC,mBAAmB;YACtD,WAAW,EAAE,aAAa,CAAC,WAAW;YACtC,UAAU,EAAE,aAAa,CAAC,UAAU;YACpC,kBAAkB,EAA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D,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,mBAAmB,CAAC,IAAwB;QACjD,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;QACvB,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC9B,OAAO,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC;QACnC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF","sourcesContent":["/**\n * Resource Serialization Utilities\n * \n * Utilities for serializing/deserializing operation paths and execution contexts\n * for queue/RPC transport. Uses plain JSON serialization.\n */\n\nimport { ResourceConfiguration_OperationPath } from '../resources-config.shared.schemas';\nimport { \n ExecutionContext_ExecutionType,\n ExecutionContext_InitiatorIds,\n ExecutionContext_RoleInfo,\n ExecutionContext_RelationshipContext,\n} from '../../runtime/execution-context.shared.schemas';\nimport type { AuditAgentActor } from '../../compliance/audit-trails/audit-actor.shared.schemas';\n\n/**\n * The ATTRIBUTION evidence an execution context carries beside its authority — who the trail says\n * acted, never what the execution may do. Serialized with the context so a queued job's audit rows\n * name the same principal, agent and delegating client as the request that enqueued it.\n *\n * Evidence only: the reconstructing side passes these to the context's evidence parameters, never\n * into `initiatorIds`, and no authorization decision reads them.\n */\nexport interface SerializedExecutionContextAttribution {\n /** The on-behalf-of principal of an internally-authorized execution (`ExecutionContext.auditActorUserId`). */\n auditActorUserId?: string;\n /** The agent that caused the work, when an agent's tool enqueued it (`ExecutionContext.agentActor`). */\n agentActor?: AuditAgentActor;\n /** The external OAuth client a person delegated to (`ExecutionContext.delegatingClientId`). */\n delegatingClientId?: string;\n}\n\n/**\n * Serialized execution context data structure.\n * This is the plain object representation used in queue messages.\n */\nexport interface SerializedExecutionContextData extends SerializedExecutionContextAttribution {\n executionType: ExecutionContext_ExecutionType;\n initiatorIds: ExecutionContext_InitiatorIds | null;\n initiatorRoles: ExecutionContext_RoleInfo[];\n contextResourcesFieldIdentifier: Record<string, string | string[]>;\n relationshipContexts?: ExecutionContext_RelationshipContext[];\n}\n\n/**\n * Serialization utilities for queue/RPC transport.\n * Uses JSON.stringify/parse - no Zod schemas needed.\n */\nexport class ResourceSerializationUtils {\n\n /**\n * JSON replacer that makes `bigint` values serializable.\n *\n * RELATIONSHIP TO THE PRIMARY MECHANISM: since `installBigIntJsonEncoding`\n * (`@wildo-ai/zod-decorators`) installs `BigInt.prototype.toJSON` at bootstrap,\n * a bare `JSON.stringify` already encodes bigint as a decimal string everywhere.\n * This replacer (and `stringifyWithBigInt` below) are now DEFENSE-IN-DEPTH:\n * explicit, greppable bigint-safety at named transport boundaries (queue,\n * webhook) that keeps them safe even if that bootstrap has not run, and produces\n * the identical decimal-string wire form. See the full network-boundary\n * mechanism map in `zod-decorators/src/install-bigint-json-encoding.ts`.\n *\n * `JSON.stringify` throws `TypeError: Do not know how to serialize a BigInt`\n * for any `bigint` value — it has no default JSON representation. This is a\n * real problem for the resource pipeline because `z_money` (`MoneyValue`)\n * stores its `amount` as a `bigint` (see `@wildo-ai/zod-decorators` →\n * `z_money`), deliberately, to avoid the >2^53 precision loss that `number`\n * would introduce for monetary amounts. Any resource payload carrying a money\n * field (prices, invoices, promotions, subscriptions, …) therefore cannot be\n * fed to a bare `JSON.stringify` at a transport / logging boundary.\n *\n * This replacer encodes `bigint` as a **decimal string**, NOT a `number`:\n * a string round-trips losslessly (`BigInt(\"1999\")`), whereas `Number(1999n)`\n * reintroduces exactly the precision risk `bigint` exists to prevent. The\n * provider-boundary `Number()` narrowing (e.g. Stripe's numeric amount API)\n * stays a deliberate, provider-specific conversion and is intentionally NOT\n * the framework default here.\n *\n * NOTE ON QUEUE ROUND-TRIP: worker-side re-hydration of a queued payload\n * (`JSON.parse` → re-validate against the operation's `internalDto`) coerces a\n * money `amount` string back to `bigint` because the DTO network boundary now\n * performs BOTH date and money-bigint coercion (`applyNetworkBoundaryCoercion`\n * rewrites `z.bigint()` leaves to accept the decimal-string form). So a queued\n * `z_money` operation round-trips losslessly through this replacer + that input\n * coercion. This replacer independently keeps the SERIALIZE boundary from\n * crashing (strictly better than an un-catchable enqueue throw). No queued\n * money operation exists today anyway (billing money ops are INTERNAL_CALL /\n * INLINE), so the queue path is crash-safety hardening, not an exercised path.\n *\n * WHY NO EQUIVALENT FOR `Date` (the natural follow-up question): `Date` does\n * NOT need a replacer, because the serialize/deserialize asymmetry runs the\n * opposite way to `bigint`.\n * - SERIALIZE: `JSON.stringify` throws on `bigint` (no `toJSON` on its\n * prototype) — hence this replacer. `Date` has `Date.prototype.toJSON`, so\n * `JSON.stringify` silently emits an ISO string (`\"2026-07-10T…Z\"`). No\n * throw, nothing to guard.\n * - DESERIALIZE: both types land as strings after `JSON.parse`, and both are\n * coerced back to their runtime type by the SAME DTO network boundary\n * (`applyNetworkBoundaryCoercion` rewrites `z.date()` → `z.coerce.date()`\n * AND `z.bigint()` → a string-accepting bigint). A queued payload is\n * re-validated against the operation's `internalDto`, so an ISO-string date\n * becomes a `Date` and a decimal-string money amount becomes a `bigint`.\n * The load-bearing invariant for BOTH types is that the payload is re-hydrated\n * THROUGH that coercing DTO — a raw `JSON.parse` with no re-validation would\n * hand back a string for a date field just as it would for a money bigint.\n *\n * @param _key JSON key (unused — bigint can appear at any depth)\n * @param value Value being serialized\n * @returns The value unchanged, or its decimal-string form when it is a bigint\n */\n static bigIntSafeJsonReplacer(_key: string, value: unknown): unknown {\n return typeof value === 'bigint' ? value.toString() : value;\n }\n\n /**\n * `JSON.stringify` variant that is safe for payloads containing `bigint`\n * (notably `z_money` / `MoneyValue` amounts).\n *\n * Use this at every pipeline serialization boundary that may receive a\n * resource `data` / payload object — queue job payloads, external payload\n * storage, debug logging of resource data — instead of a bare\n * `JSON.stringify`, which throws on the first `bigint` it encounters.\n *\n * @param value Value to serialize\n * @param space Optional pretty-print indentation (as in `JSON.stringify`)\n * @returns JSON string with bigint values encoded as decimal strings\n */\n static stringifyWithBigInt(value: unknown, space?: number): string {\n return JSON.stringify(value, ResourceSerializationUtils.bigIntSafeJsonReplacer, space);\n }\n\n /**\n * Serialize operation path for transport.\n * Use operationPathKey for routing, full path for execution.\n * \n * @param operationPath The operation path to serialize\n * @returns JSON string representation\n */\n static serializeOperationPath(operationPath: ResourceConfiguration_OperationPath<any, any>): string {\n return JSON.stringify({\n resourceIdentifier: operationPath.resourceIdentifier,\n operationIdentifier: operationPath.operationIdentifier,\n variantType: operationPath.variantType,\n variantKey: operationPath.variantKey,\n isOperationDefault: operationPath.isOperationDefault,\n isBulkOperation: operationPath.isBulkOperation,\n });\n }\n \n /**\n * Deserialize operation path from JSON string.\n * \n * @param json JSON string representation\n * @returns Operation path object\n */\n static deserializeOperationPath(json: string): ResourceConfiguration_OperationPath<any, any> {\n return JSON.parse(json);\n }\n \n /**\n * Serialize execution context for transport.\n * Extracts serializable data from ExecutionContext instance.\n * \n * Note: This method accepts an object with the ExecutionContext interface.\n * The actual ExecutionContext class is in saas-backend-lib.\n * \n * @param ctx ExecutionContext-like object with required properties\n * @returns JSON string representation\n */\n static serializeExecutionContext(ctx: {\n executionType: ExecutionContext_ExecutionType;\n initiatorIds: ExecutionContext_InitiatorIds | null;\n initiatorRoles: ExecutionContext_RoleInfo[];\n getContextResourceIds: () => ReadonlyMap<string, string | string[]>;\n relationshipContexts: ExecutionContext_RelationshipContext[];\n } & SerializedExecutionContextAttribution): string {\n // Convert Map to plain object for JSON serialization\n const contextResourcesObj: Record<string, string | string[]> = {};\n ctx.getContextResourceIds().forEach((value, key) => {\n contextResourcesObj[key] = value;\n });\n \n return JSON.stringify({\n executionType: ctx.executionType,\n initiatorIds: ctx.initiatorIds,\n initiatorRoles: ctx.initiatorRoles,\n contextResourcesFieldIdentifier: contextResourcesObj,\n relationshipContexts: ctx.relationshipContexts,\n // Attribution evidence — absent keys stay absent so a context with none serializes exactly as before.\n ...(ctx.auditActorUserId !== undefined ? { auditActorUserId: ctx.auditActorUserId } : {}),\n ...(ctx.agentActor !== undefined ? { agentActor: ctx.agentActor } : {}),\n ...(ctx.delegatingClientId !== undefined ? { delegatingClientId: ctx.delegatingClientId } : {}),\n });\n }\n \n /**\n * Deserialize to raw data.\n * Note: ExecutionContext reconstruction is backend-only and requires\n * ExecutionContextCreatorBackendService.reconstructFromSerializedData()\n * \n * @param json JSON string representation\n * @returns Plain object with execution context data\n */\n static deserializeExecutionContextData(json: string): SerializedExecutionContextData {\n return JSON.parse(json);\n }\n \n /**\n * Parse serialized execution context to extract initiator IDs for querying.\n * Useful for extracting org/user IDs without full reconstruction.\n * \n * @param json Serialized execution context JSON\n * @returns Initiator IDs object or null\n */\n static extractInitiatorIds(json: string | undefined): ExecutionContext_InitiatorIds | null {\n if (!json) return null;\n try {\n const data = JSON.parse(json);\n return data.initiatorIds ?? null;\n } catch {\n return null;\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-persistence-collection.utils.d.ts","sourceRoot":"","sources":["../../../../../src/resources/utils/shared-persistence-collection.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAC;AAEjG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,eAAO,MAAM,8CAA8C,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAe3F,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,sCAAsC,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,CAEzF;AAED,iGAAiG;AACjG,MAAM,WAAW,2CAA2C;IAC1D,QAAQ,CAAC,kBAAkB,EAAE,YAAY,CAAC;IAC1C,yFAAyF;IACzF,QAAQ,CAAC,kBAAkB,CAAC,EAAE,sBAAsB,GAAG,SAAS,CAAC;CAClE;AAED,gFAAgF;AAChF,MAAM,WAAW,6CAA6C;IAC5D,sEAAsE;IACtE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,yFAAyF;IACzF,QAAQ,CAAC,QAAQ,EAAE,SAAS;QAAE,YAAY,EAAE,YAAY,CAAC;QAAC,OAAO,EAAE,sBAAsB,CAAA;KAAE,EAAE,CAAC;IAC9F,sEAAsE;IACtE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,kDAAkD,CAChE,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,2CAA2C,CAAC,EACnF,yBAAyB,EAAE,sBAAsB,GAChD,6CAA6C,EAAE,CAsDjD;AAED,mGAAmG;AACnG,MAAM,WAAW,6CAA6C;IAC5D,QAAQ,CAAC,kBAAkB,EAAE,YAAY,CAAC;IAC1C,QAAQ,CAAC,eAAe,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,oBAAoB,CAAA;KAAE,GAAG,SAAS,CAAC;CACxE;
|
|
1
|
+
{"version":3,"file":"shared-persistence-collection.utils.d.ts","sourceRoot":"","sources":["../../../../../src/resources/utils/shared-persistence-collection.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAC;AAEjG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,eAAO,MAAM,8CAA8C,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAe3F,CAAC;AAEF;;;;;;GAMG;AACH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,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAgB,oDAAoD,CAClE,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,6CAA6C,CAAC,GACpF,+CAA+C,EAAE,CA0DnD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,oBAAY,iCAAiC;IAC3C,IAAI,SAAS;IACb,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB"}
|
|
@@ -171,13 +171,13 @@ export function findSharedPersistenceCollectionAdapterIncoherences(resourceConfi
|
|
|
171
171
|
/**
|
|
172
172
|
* Canonical comparison key for a resource's retention POSTURE.
|
|
173
173
|
*
|
|
174
|
-
* Compares the WHOLE resolved policy, not just `mode`.
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
174
|
+
* Compares the WHOLE resolved policy, not just `mode`. It carries two members since #1635 — `mode` and
|
|
175
|
+
* the nested `statutoryRetention` ground — and this is the case the whole-policy comparison was written
|
|
176
|
+
* for: comparing `mode` alone would let two configs over one collection agree on the treatment while
|
|
177
|
+
* one says a statute keeps the rows and the other does not. Two configs over one collection must agree
|
|
178
|
+
* on ALL of it.
|
|
179
179
|
*
|
|
180
|
-
* Key order is normalised so authoring order cannot masquerade as a disagreement. `undefined` gets
|
|
180
|
+
* Key order is normalised at EVERY depth so authoring order cannot masquerade as a disagreement. `undefined` gets
|
|
181
181
|
* its own key rather than being skipped: "rows of this resource are hard-deleted" is a positive
|
|
182
182
|
* claim, and the in-vs-out asymmetry is what produces both failure modes documented below.
|
|
183
183
|
*/
|
|
@@ -185,9 +185,15 @@ function buildRetentionPostureKey(retentionPolicy) {
|
|
|
185
185
|
if (retentionPolicy === undefined || retentionPolicy === null) {
|
|
186
186
|
return 'NOT_GOVERNED';
|
|
187
187
|
}
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
|
|
188
|
+
const canonical = (value) => {
|
|
189
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value))
|
|
190
|
+
return value;
|
|
191
|
+
return Object.entries(value)
|
|
192
|
+
.filter(([, member]) => member !== undefined)
|
|
193
|
+
.sort(([leftKey], [rightKey]) => leftKey.localeCompare(rightKey))
|
|
194
|
+
.map(([key, member]) => [key, canonical(member)]);
|
|
195
|
+
};
|
|
196
|
+
const entries = canonical(retentionPolicy);
|
|
191
197
|
return entries.length === 0 ? 'NOT_GOVERNED' : JSON.stringify(entries);
|
|
192
198
|
}
|
|
193
199
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-persistence-collection.utils.js","sourceRoot":"","sources":["../../../../../src/resources/utils/shared-persistence-collection.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAKxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,MAAM,CAAC,MAAM,8CAA8C,GAAqC;IAC9F,CAAC,gBAAgB,CAAC,SAAS,CAAC,EAAE,gBAAgB,CAAC,KAAK;IACpD,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,EAAE,gBAAgB,CAAC,aAAa;IACrE,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,EAAE,gBAAgB,CAAC,gBAAgB;IAC3E;;;;;;;;;OASG;IACH,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,EAAE,gBAAgB,CAAC,UAAU;CACvE,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,sCAAsC,CAAC,YAA0B;IAC/E,OAAO,8CAA8C,CAAC,YAAsB,CAAC,IAAK,YAAuB,CAAC;AAC5G,CAAC;AAmBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,MAAM,UAAU,kDAAkD,CAChE,sBAAmF,EACnF,yBAAiD;IAEjD,MAAM,oBA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2B;gBAC7F,gGAAgG;gBAChG,+FAA+F;gBAC/F,iGAAiG;gBACjG,+FAA+F;gBAC/F,2FAA2F;gBAC3F,6FAA6F;gBAC7F,gGAAgG;gBAChG,6FAA6F;gBAC7F,8BAA8B;SACjC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAN,IAAY,iCAKX;AALD,WAAY,iCAAiC;IAC3C,kDAAa,CAAA;IACb,oDAAe,CAAA;IACf,sDAAiB,CAAA;IACjB,0DAAqB,CAAA;AACvB,CAAC,EALW,iCAAiC,KAAjC,iCAAiC,QAK5C","sourcesContent":["import { CoreResourceType } from '../resources.shared.core.definitions';\nimport type { ResourceType } from '../resources.shared.schemas';\nimport type { PersistenceAdapterType } from '../resources-config.shared.schemas';\nimport { ErasureRetentionMode } from '../../compliance/privacy/impersonalization.shared.schemas';\n\n/**\n * Resource types that deliberately project onto ANOTHER resource type's\n * persistence collection — THE authority for \"which configs address the same\n * physical rows?\".\n *\n * ## What this expresses\n *\n * A `USER_SELF*` resource is not a different record set; it is a different DOOR\n * onto the SAME record set, with its own operations, roles and scoping. The\n * `USERS` door is the admin surface (list every user, delete a user); the\n * `USER_SELF` door is the self surface (read/update MY row). They intentionally\n * share `UserSchema` and they intentionally share storage — the persistence\n * layer builds a SEPARATE model per resource config over ONE collection.\n *\n * Anything not listed here stores under its own resource type.\n *\n * ## Why it is a single named authority\n *\n * This mapping had already been copied twice inside the backend (the\n * zod→mongoose model builder, which is what actually creates and reads the\n * collection, and the aggregation collection resolver — whose earlier\n * divergence made every aggregation query a non-existent collection and return\n * zero rows). It now has a third consumer of a completely different kind:\n * {@link findSharedPersistenceCollectionRetentionIncoherences}, a boot-time\n * coherence guard. A per-resource config factory structurally cannot see this\n * relationship — it validates ONE config at a time — so the fact has to live\n * where every layer can read it, and it has to live exactly once.\n *\n * ## The alias belongs to the RESOURCE, not to the storage adapter\n *\n * Every persistence path resolves through this map, and each adapter has\n * exactly ONE composition point that does so: MongoDB's model builder and its\n * aggregation resolver, and — on the SQL side — the single\n * `resolveTableNameForResource` helper that the hybrid planner, the PostgreSQL\n * repository and the boot-time table verifier all call.\n *\n * This was NOT always true, and the way it failed is the reason to keep it\n * true: PostgreSQL used to derive its table name straight from\n * `resourceIdentifier`, so `USER_SELF` planned, wrote and verified a `userself`\n * table while `USERS` used `users`. An adapter choice must never silently\n * change WHICH RECORDS a resource addresses — that is not a storage detail, it\n * is the \"two doors, one record set\" contract itself. On the SQL side the\n * resolved name is additionally normalised into a SQL identifier; casing is an\n * adapter concern, the alias is not.\n *\n * The one thing a shared resolver still cannot see is an alias group whose\n * members are pointed at DIFFERENT adapters — each config is individually\n * valid, and only the pair is wrong. That is what\n * {@link findSharedPersistenceCollectionAdapterIncoherences} fails closed on.\n */\nexport const RESOURCE_SHARED_PERSISTENCE_COLLECTION_ALIASES: Readonly<Record<string, string>> = {\n [CoreResourceType.USER_SELF]: CoreResourceType.USERS,\n [CoreResourceType.USER_SELF_PROFILES]: CoreResourceType.USER_PROFILES,\n [CoreResourceType.USER_SELF_PREFERENCES]: CoreResourceType.USER_PREFERENCES,\n /*\n * The application-scoped audit door addresses the organization-scoped resource's rows (#317).\n *\n * Unlike the `USER_SELF` group above — where the alias exists so a principal can address its OWN\n * row through a narrower door — this pair exists because the two doors see DIFFERENT SUBSETS of\n * one set: the organization door is tenant-filtered and structurally cannot return the rows that\n * carry no organization (logins, session evictions, application-wide policy changes), which is\n * 74% of them on a measured dogfood application. Splitting the storage would split the audit\n * trail itself, so the alias is load-bearing rather than a convenience.\n */\n [CoreResourceType.APPLICATION_AUDIT_LOGS]: CoreResourceType.AUDIT_LOGS,\n};\n\n/**\n * The persistence collection a resource type's rows live in — its alias target\n * when it declares one, otherwise the resource type itself.\n *\n * @param resourceType - the resource type whose storage location is wanted.\n * @returns the collection name, as a plain string.\n */\nexport function resolveSharedPersistenceCollectionName(resourceType: ResourceType): string {\n return RESOURCE_SHARED_PERSISTENCE_COLLECTION_ALIASES[resourceType as string] ?? (resourceType as string);\n}\n\n/** The minimal config shape {@link findSharedPersistenceCollectionAdapterIncoherences} reads. */\nexport interface SharedPersistenceCollectionAdapterCandidate {\n readonly resourceIdentifier: ResourceType;\n /** The config's OWN declaration; `undefined` means \"inherit the application default\". */\n readonly persistenceAdapter?: PersistenceAdapterType | undefined;\n}\n\n/** One collection whose resource configs are pointed at different databases. */\nexport interface SharedPersistenceCollectionAdapterIncoherence {\n /** The shared collection the disagreeing configs claim to address. */\n readonly collectionName: string;\n /** Every resource config addressing that collection, with the adapter it RESOLVED to. */\n readonly adapters: readonly { resourceType: ResourceType; adapter: PersistenceAdapterType }[];\n /** Operator-facing explanation naming the consequence and the fix. */\n readonly message: string;\n}\n\n/**\n * Registry-ASSEMBLY guardrail: every resource config that resolves to the SAME\n * persistence collection must resolve to the SAME persistence adapter.\n *\n * ## Why the shared resolver cannot cover this on its own\n *\n * {@link resolveSharedPersistenceCollectionName} makes the alias\n * adapter-independent: whichever database a resource lands in, it addresses the\n * aliased NAME. That is necessary and not sufficient. A name is only an address\n * WITHIN one database, so pointing `USERS` at PostgreSQL while `USER_SELF`\n * inherits MongoDB yields two stores that both believe they own the same rows.\n * Nothing downstream can detect it: each config is individually valid, each\n * repository is correctly built, and every per-resource check passes.\n *\n * ## The failure it prevents\n *\n * The doors silently stop sharing records. The admin door lists users the self\n * door cannot read; a self-service update writes to a row the admin door will\n * never see; and — because retention is enforced against ROWS — an erasure\n * performed through one door leaves the other door's copy completely\n * untouched, which is the same compliance-grade lie that\n * {@link findSharedPersistenceCollectionRetentionIncoherences} exists to\n * prevent, arrived at from a different direction.\n *\n * The table name is not the only thing that follows from the adapter. Id FORMAT\n * does too — the PostgreSQL repository validates ids as UUIDs while Mongo\n * expects ObjectIds, each resolved from its OWN resource's adapter — so a split\n * group would also reject through one door the very ids the other door mints.\n * Anything keyed on \"this resource's adapter\" inherits this invariant.\n *\n * ## Why this is permanent, not a capability gate\n *\n * Unlike adapter gaps that close when the missing support is implemented, this\n * one has no future in which it becomes valid: two databases cannot hold one\n * set of rows. It is deliberately NOT a ban on aliased resources using\n * PostgreSQL — an alias group that agrees on PostgreSQL resolves to one shared\n * table, and whether that table was actually provisioned is a separate,\n * already-enforced question (the boot-time table verifier).\n *\n * Resources inherit the application default when they declare nothing, so the\n * caller supplies the resolved default rather than this function guessing it.\n *\n * Pure and side-effect free: it reports, the caller throws.\n *\n * @param resourceConfigurations - every assembled resource config, keyed by resource type.\n * @param defaultPersistenceAdapter - the adapter a config with no declaration inherits.\n * @returns one entry per incoherent collection; empty when the registry is coherent.\n */\nexport function findSharedPersistenceCollectionAdapterIncoherences(\n resourceConfigurations: Record<string, SharedPersistenceCollectionAdapterCandidate>,\n defaultPersistenceAdapter: PersistenceAdapterType,\n): SharedPersistenceCollectionAdapterIncoherence[] {\n const adaptersByCollection = new Map<\n string,\n { resourceType: ResourceType; adapter: PersistenceAdapterType }[]\n >();\n\n for (const [resourceTypeKey, resourceConfig] of Object.entries(resourceConfigurations)) {\n // Same reasoning as the retention guard: prefer the config's OWN identifier so a mis-keyed\n // registry entry is diagnosed against the name its author actually wrote.\n const resourceType = (resourceConfig?.resourceIdentifier ?? resourceTypeKey) as ResourceType;\n const collectionName = resolveSharedPersistenceCollectionName(resourceType);\n const entry = {\n resourceType,\n adapter: resourceConfig?.persistenceAdapter ?? defaultPersistenceAdapter,\n };\n\n const existing = adaptersByCollection.get(collectionName);\n if (existing) {\n existing.push(entry);\n } else {\n adaptersByCollection.set(collectionName, [entry]);\n }\n }\n\n const incoherences: SharedPersistenceCollectionAdapterIncoherence[] = [];\n\n for (const [collectionName, adapters] of adaptersByCollection) {\n if (adapters.length < 2) {\n continue;\n }\n if (new Set(adapters.map((entry) => entry.adapter)).size < 2) {\n continue;\n }\n\n const declared = adapters\n .map((entry) => `'${String(entry.resourceType)}' → ${entry.adapter}`)\n .join(', ');\n\n incoherences.push({\n collectionName,\n adapters,\n message:\n `Resource configs [${declared}] all address the '${collectionName}' persistence collection but ` +\n `resolve to DIFFERENT persistence adapters. These configs are separate doors onto ONE set of ` +\n `rows, and a collection name only addresses rows within a single database, so this splits them ` +\n `across two stores that each believe they own the records: the admin door lists rows the self ` +\n `door cannot read, a self-service write lands where the admin door will never see it, and an ` +\n `erasure performed through one door leaves the other door's copy fully intact. Give every ` +\n `config listed above the same persistenceAdapter (a resource sharing a collection cannot pick ` +\n `its database alone), or stop sharing the collection.`,\n });\n }\n\n return incoherences;\n}\n\n/** The minimal config shape {@link findSharedPersistenceCollectionRetentionIncoherences} reads. */\nexport interface SharedPersistenceCollectionRetentionCandidate {\n readonly resourceIdentifier: ResourceType;\n readonly retentionPolicy?: { mode?: ErasureRetentionMode } | undefined;\n}\n\n/**\n * Canonical comparison key for a resource's retention POSTURE.\n *\n * Compares the WHOLE resolved policy, not just `mode`. `ResourceRetentionPolicy` carries a single\n * axis today, so `mode` alone would be exhaustive — but this guard exists precisely because config\n * checks that look sufficient go quietly wrong later, and a second axis (a disposal clock, a\n * jurisdiction) added to the policy would otherwise escape the comparison with no compile-time\n * signal. Two configs over one collection must agree on ALL of it.\n *\n * Key order is normalised so authoring order cannot masquerade as a disagreement. `undefined` gets\n * its own key rather than being skipped: \"rows of this resource are hard-deleted\" is a positive\n * claim, and the in-vs-out asymmetry is what produces both failure modes documented below.\n */\nfunction buildRetentionPostureKey(retentionPolicy: { mode?: ErasureRetentionMode } | undefined): string {\n if (retentionPolicy === undefined || retentionPolicy === null) {\n return 'NOT_GOVERNED';\n }\n const entries = Object.entries(retentionPolicy as Record<string, unknown>)\n .filter(([, value]) => value !== undefined)\n .sort(([leftKey], [rightKey]) => leftKey.localeCompare(rightKey));\n return entries.length === 0 ? 'NOT_GOVERNED' : JSON.stringify(entries);\n}\n\n/** One collection whose resource configs disagree about retention governance. */\nexport interface SharedPersistenceCollectionRetentionIncoherence {\n /** The shared collection the disagreeing configs write to. */\n readonly collectionName: string;\n /** Every resource config addressing that collection, with the posture it declared. */\n readonly postures: readonly { resourceType: ResourceType; mode: ErasureRetentionMode | undefined }[];\n /** Operator-facing explanation naming both failure modes and the fix. */\n readonly message: string;\n}\n\n/**\n * Registry-ASSEMBLY guardrail: every resource config that resolves to the SAME\n * persistence collection must declare the SAME retention posture.\n *\n * ## Why a config that passes every per-resource check can still be broken\n *\n * `retentionPolicy` is validated PER RESOURCE CONFIG by the config factory: it\n * checks that resource's operations, its field treatments, its system-access\n * grants. It cannot check what a SIBLING config declares, because a factory\n * invocation never sees one. But retention is enforced against ROWS, and two\n * configs can own the same rows (see\n * {@link RESOURCE_SHARED_PERSISTENCE_COLLECTION_ALIASES}). So a pair that\n * disagrees produces a config where every individual resource is valid and the\n * COLLECTION is not.\n *\n * ## The two concrete failure modes\n *\n * **1. Fail-open erasure.** The retention hide filter (rows marked `RETAINED`\n * are invisible) and the immutability freeze are injected per resource config,\n * in `buildContextualFilter`. A row erased through the governed door stays\n * fully READABLE and UPDATABLE through the ungoverned one. For the\n * `USERS`/`USER_SELF` pair that ungoverned door exposes READ + UPDATE to\n * `APP_USER` — i.e. the erased subject can still read and edit their own\n * \"erased\" record. The row is erased only from the door that was opted in,\n * which is a compliance-grade lie about the record.\n *\n * **2. Unique-index collision — a hard functional abort.** A retention-governed\n * config scopes each unique index to NON-retained rows (a partial filter on the\n * retention marker), precisely so scrubbed rows leave the index and cannot\n * collide on the shared mask value. An ungoverned config over the same\n * collection emits a PLAIN unique index on the same field. The FIRST erasure\n * succeeds; the SECOND writes the same mask value, hits the plain index, and\n * fails E11000 — inside the erasure transaction, so the whole erasure rolls\n * back. The capability is silently single-use.\n *\n * Both modes are invisible until a real erasure runs, which is why this is a\n * BOOT-time guard and not a test: the point is that a config which passes at\n * boot must actually be able to perform an erasure.\n *\n * ## Why \"one opted in, one not\" is a disagreement, not a default\n *\n * An absent `retentionPolicy` is a positive statement — \"rows of this resource\n * are hard-deleted\" — not an unset value the governed sibling can supply. Both\n * failure modes above are produced by exactly that asymmetry, so `undefined`\n * participates in the comparison as its own posture rather than being skipped.\n *\n * Pure and side-effect free: it reports, the caller throws. That keeps the\n * shared-collection fact and its invariant in the layer both persistence and\n * validation can import, while the registry owns the error shape.\n *\n * @param resourceConfigurations - every assembled resource config, keyed by resource type.\n * @returns one entry per incoherent collection; empty when the registry is coherent.\n */\nexport function findSharedPersistenceCollectionRetentionIncoherences(\n resourceConfigurations: Record<string, SharedPersistenceCollectionRetentionCandidate>,\n): SharedPersistenceCollectionRetentionIncoherence[] {\n const posturesByCollection = new Map<\n string,\n { resourceType: ResourceType; mode: ErasureRetentionMode | undefined; postureKey: string }[]\n >();\n\n for (const [resourceTypeKey, resourceConfig] of Object.entries(resourceConfigurations)) {\n // Prefer the config's OWN identifier over the map key: the registry keys by resource type, but a\n // host that mis-keyed an entry would otherwise be diagnosed against a name it never authored.\n const resourceType = (resourceConfig?.resourceIdentifier ?? resourceTypeKey) as ResourceType;\n const collectionName = resolveSharedPersistenceCollectionName(resourceType);\n const posture = {\n resourceType,\n mode: resourceConfig?.retentionPolicy?.mode,\n postureKey: buildRetentionPostureKey(resourceConfig?.retentionPolicy),\n };\n\n const existing = posturesByCollection.get(collectionName);\n if (existing) {\n existing.push(posture);\n } else {\n posturesByCollection.set(collectionName, [posture]);\n }\n }\n\n const incoherences: SharedPersistenceCollectionRetentionIncoherence[] = [];\n\n for (const [collectionName, postures] of posturesByCollection) {\n if (postures.length < 2) {\n continue;\n }\n const distinctPostures = new Set(postures.map((posture) => posture.postureKey));\n if (distinctPostures.size < 2) {\n continue;\n }\n\n const declared = postures\n .map((posture) => `'${String(posture.resourceType)}' → ${posture.mode ?? 'NOT retention-governed'}`)\n .join(', ');\n\n incoherences.push({\n collectionName,\n postures,\n message:\n `Resource configs [${declared}] all store in the '${collectionName}' collection but declare ` +\n `DIFFERENT retention postures. They are separate models over ONE set of rows, and retention is ` +\n `enforced per resource config, so this ships two defects that only appear when a real erasure ` +\n `runs: (1) FAIL-OPEN ERASURE — the retention hide filter and the immutability freeze are absent ` +\n `on the ungoverned door, leaving an erased row readable and updatable there; (2) UNIQUE-INDEX ` +\n `COLLISION — the governed config scopes its unique indexes to non-retained rows while the ` +\n `ungoverned one emits plain unique indexes on the same collection, so the SECOND erased row ` +\n `collides (E11000) and the erasure transaction rolls back. Declare the SAME retentionPolicy on ` +\n `every config listed above (a resource sharing a collection cannot opt in or out alone), or ` +\n `stop sharing the collection.`,\n });\n }\n\n return incoherences;\n}\n\n/**\n * The privilege AXES a database credential issued to a named runtime principal (a minion) is built\n * from — one closed vocabulary shared by every storage adapter that mints such a credential.\n *\n * Each axis is a distinct verb set, not a strength on a scale, and they must never be merged:\n *\n * - {@link READ} — read rows.\n * - {@link WRITE} — insert, update and delete. The only axis that can REMOVE a row.\n * - {@link APPEND} — insert only. A principal can add a row and never amend or remove it, which is\n * what makes it the axis for evidence: an audit trail a principal can rewrite is not an audit trail.\n * - {@link MAINTAIN} — insert and update, never delete, for durable runtime state whose history must\n * survive the principal that advances it.\n *\n * It lives beside the collection aliases because a grant is issued per COLLECTION: the alias map says\n * which rows a grant on a resource type reaches, and this says which verbs it carries there. The\n * derivation that fills each axis, and the engine floor it adds, live in `platform-config-lib`\n * (`deriveMinionDatabaseGrants`); the MongoDB and PostgreSQL adapters each translate an axis into\n * their own privilege dialect.\n *\n * Scope, stated because it is easy to over-read: this governs NAMED runtime principals only. The\n * application backend is not issued an axis-scoped credential — it owns its database — so nothing\n * here constrains what the backend's own credential can do to a row.\n */\nexport enum RuntimePrincipalDatabaseGrantAxis {\n READ = 'read',\n WRITE = 'write',\n APPEND = 'append',\n MAINTAIN = 'maintain',\n}\n"]}
|
|
1
|
+
{"version":3,"file":"shared-persistence-collection.utils.js","sourceRoot":"","sources":["../../../../../src/resources/utils/shared-persistence-collection.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAKxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAN,IAAY,iCAKX;AALD,WAAY,iCAAiC;IAC3C,kDAAa,CAAA;IACb,oDAAe,CAAA;IACf,sDAAiB,CAAA;IACjB,0DAAqB,CAAA;AACvB,CAAC,EALW,iCAAiC,KAAjC,iCAAiC,QAK5C","sourcesContent":["import { CoreResourceType } from '../resources.shared.core.definitions';\nimport type { ResourceType } from '../resources.shared.schemas';\nimport type { PersistenceAdapterType } from '../resources-config.shared.schemas';\nimport { ErasureRetentionMode } from '../../compliance/privacy/impersonalization.shared.schemas';\n\n/**\n * Resource types that deliberately project onto ANOTHER resource type's\n * persistence collection — THE authority for \"which configs address the same\n * physical rows?\".\n *\n * ## What this expresses\n *\n * A `USER_SELF*` resource is not a different record set; it is a different DOOR\n * onto the SAME record set, with its own operations, roles and scoping. The\n * `USERS` door is the admin surface (list every user, delete a user); the\n * `USER_SELF` door is the self surface (read/update MY row). They intentionally\n * share `UserSchema` and they intentionally share storage — the persistence\n * layer builds a SEPARATE model per resource config over ONE collection.\n *\n * Anything not listed here stores under its own resource type.\n *\n * ## Why it is a single named authority\n *\n * This mapping had already been copied twice inside the backend (the\n * zod→mongoose model builder, which is what actually creates and reads the\n * collection, and the aggregation collection resolver — whose earlier\n * divergence made every aggregation query a non-existent collection and return\n * zero rows). It now has a third consumer of a completely different kind:\n * {@link findSharedPersistenceCollectionRetentionIncoherences}, a boot-time\n * coherence guard. A per-resource config factory structurally cannot see this\n * relationship — it validates ONE config at a time — so the fact has to live\n * where every layer can read it, and it has to live exactly once.\n *\n * ## The alias belongs to the RESOURCE, not to the storage adapter\n *\n * Every persistence path resolves through this map, and each adapter has\n * exactly ONE composition point that does so: MongoDB's model builder and its\n * aggregation resolver, and — on the SQL side — the single\n * `resolveTableNameForResource` helper that the hybrid planner, the PostgreSQL\n * repository and the boot-time table verifier all call.\n *\n * This was NOT always true, and the way it failed is the reason to keep it\n * true: PostgreSQL used to derive its table name straight from\n * `resourceIdentifier`, so `USER_SELF` planned, wrote and verified a `userself`\n * table while `USERS` used `users`. An adapter choice must never silently\n * change WHICH RECORDS a resource addresses — that is not a storage detail, it\n * is the \"two doors, one record set\" contract itself. On the SQL side the\n * resolved name is additionally normalised into a SQL identifier; casing is an\n * adapter concern, the alias is not.\n *\n * The one thing a shared resolver still cannot see is an alias group whose\n * members are pointed at DIFFERENT adapters — each config is individually\n * valid, and only the pair is wrong. That is what\n * {@link findSharedPersistenceCollectionAdapterIncoherences} fails closed on.\n */\nexport const RESOURCE_SHARED_PERSISTENCE_COLLECTION_ALIASES: Readonly<Record<string, string>> = {\n [CoreResourceType.USER_SELF]: CoreResourceType.USERS,\n [CoreResourceType.USER_SELF_PROFILES]: CoreResourceType.USER_PROFILES,\n [CoreResourceType.USER_SELF_PREFERENCES]: CoreResourceType.USER_PREFERENCES,\n /*\n * The application-scoped audit door addresses the organization-scoped resource's rows (#317).\n *\n * Unlike the `USER_SELF` group above — where the alias exists so a principal can address its OWN\n * row through a narrower door — this pair exists because the two doors see DIFFERENT SUBSETS of\n * one set: the organization door is tenant-filtered and structurally cannot return the rows that\n * carry no organization (logins, session evictions, application-wide policy changes), which is\n * 74% of them on a measured dogfood application. Splitting the storage would split the audit\n * trail itself, so the alias is load-bearing rather than a convenience.\n */\n [CoreResourceType.APPLICATION_AUDIT_LOGS]: CoreResourceType.AUDIT_LOGS,\n};\n\n/**\n * The persistence collection a resource type's rows live in — its alias target\n * when it declares one, otherwise the resource type itself.\n *\n * @param resourceType - the resource type whose storage location is wanted.\n * @returns the collection name, as a plain string.\n */\nexport function resolveSharedPersistenceCollectionName(resourceType: ResourceType): string {\n return RESOURCE_SHARED_PERSISTENCE_COLLECTION_ALIASES[resourceType as string] ?? (resourceType as string);\n}\n\n/** The minimal config shape {@link findSharedPersistenceCollectionAdapterIncoherences} reads. */\nexport interface SharedPersistenceCollectionAdapterCandidate {\n readonly resourceIdentifier: ResourceType;\n /** The config's OWN declaration; `undefined` means \"inherit the application default\". */\n readonly persistenceAdapter?: PersistenceAdapterType | undefined;\n}\n\n/** One collection whose resource configs are pointed at different databases. */\nexport interface SharedPersistenceCollectionAdapterIncoherence {\n /** The shared collection the disagreeing configs claim to address. */\n readonly collectionName: string;\n /** Every resource config addressing that collection, with the adapter it RESOLVED to. */\n readonly adapters: readonly { resourceType: ResourceType; adapter: PersistenceAdapterType }[];\n /** Operator-facing explanation naming the consequence and the fix. */\n readonly message: string;\n}\n\n/**\n * Registry-ASSEMBLY guardrail: every resource config that resolves to the SAME\n * persistence collection must resolve to the SAME persistence adapter.\n *\n * ## Why the shared resolver cannot cover this on its own\n *\n * {@link resolveSharedPersistenceCollectionName} makes the alias\n * adapter-independent: whichever database a resource lands in, it addresses the\n * aliased NAME. That is necessary and not sufficient. A name is only an address\n * WITHIN one database, so pointing `USERS` at PostgreSQL while `USER_SELF`\n * inherits MongoDB yields two stores that both believe they own the same rows.\n * Nothing downstream can detect it: each config is individually valid, each\n * repository is correctly built, and every per-resource check passes.\n *\n * ## The failure it prevents\n *\n * The doors silently stop sharing records. The admin door lists users the self\n * door cannot read; a self-service update writes to a row the admin door will\n * never see; and — because retention is enforced against ROWS — an erasure\n * performed through one door leaves the other door's copy completely\n * untouched, which is the same compliance-grade lie that\n * {@link findSharedPersistenceCollectionRetentionIncoherences} exists to\n * prevent, arrived at from a different direction.\n *\n * The table name is not the only thing that follows from the adapter. Id FORMAT\n * does too — the PostgreSQL repository validates ids as UUIDs while Mongo\n * expects ObjectIds, each resolved from its OWN resource's adapter — so a split\n * group would also reject through one door the very ids the other door mints.\n * Anything keyed on \"this resource's adapter\" inherits this invariant.\n *\n * ## Why this is permanent, not a capability gate\n *\n * Unlike adapter gaps that close when the missing support is implemented, this\n * one has no future in which it becomes valid: two databases cannot hold one\n * set of rows. It is deliberately NOT a ban on aliased resources using\n * PostgreSQL — an alias group that agrees on PostgreSQL resolves to one shared\n * table, and whether that table was actually provisioned is a separate,\n * already-enforced question (the boot-time table verifier).\n *\n * Resources inherit the application default when they declare nothing, so the\n * caller supplies the resolved default rather than this function guessing it.\n *\n * Pure and side-effect free: it reports, the caller throws.\n *\n * @param resourceConfigurations - every assembled resource config, keyed by resource type.\n * @param defaultPersistenceAdapter - the adapter a config with no declaration inherits.\n * @returns one entry per incoherent collection; empty when the registry is coherent.\n */\nexport function findSharedPersistenceCollectionAdapterIncoherences(\n resourceConfigurations: Record<string, SharedPersistenceCollectionAdapterCandidate>,\n defaultPersistenceAdapter: PersistenceAdapterType,\n): SharedPersistenceCollectionAdapterIncoherence[] {\n const adaptersByCollection = new Map<\n string,\n { resourceType: ResourceType; adapter: PersistenceAdapterType }[]\n >();\n\n for (const [resourceTypeKey, resourceConfig] of Object.entries(resourceConfigurations)) {\n // Same reasoning as the retention guard: prefer the config's OWN identifier so a mis-keyed\n // registry entry is diagnosed against the name its author actually wrote.\n const resourceType = (resourceConfig?.resourceIdentifier ?? resourceTypeKey) as ResourceType;\n const collectionName = resolveSharedPersistenceCollectionName(resourceType);\n const entry = {\n resourceType,\n adapter: resourceConfig?.persistenceAdapter ?? defaultPersistenceAdapter,\n };\n\n const existing = adaptersByCollection.get(collectionName);\n if (existing) {\n existing.push(entry);\n } else {\n adaptersByCollection.set(collectionName, [entry]);\n }\n }\n\n const incoherences: SharedPersistenceCollectionAdapterIncoherence[] = [];\n\n for (const [collectionName, adapters] of adaptersByCollection) {\n if (adapters.length < 2) {\n continue;\n }\n if (new Set(adapters.map((entry) => entry.adapter)).size < 2) {\n continue;\n }\n\n const declared = adapters\n .map((entry) => `'${String(entry.resourceType)}' → ${entry.adapter}`)\n .join(', ');\n\n incoherences.push({\n collectionName,\n adapters,\n message:\n `Resource configs [${declared}] all address the '${collectionName}' persistence collection but ` +\n `resolve to DIFFERENT persistence adapters. These configs are separate doors onto ONE set of ` +\n `rows, and a collection name only addresses rows within a single database, so this splits them ` +\n `across two stores that each believe they own the records: the admin door lists rows the self ` +\n `door cannot read, a self-service write lands where the admin door will never see it, and an ` +\n `erasure performed through one door leaves the other door's copy fully intact. Give every ` +\n `config listed above the same persistenceAdapter (a resource sharing a collection cannot pick ` +\n `its database alone), or stop sharing the collection.`,\n });\n }\n\n return incoherences;\n}\n\n/** The minimal config shape {@link findSharedPersistenceCollectionRetentionIncoherences} reads. */\nexport interface SharedPersistenceCollectionRetentionCandidate {\n readonly resourceIdentifier: ResourceType;\n readonly retentionPolicy?: { mode?: ErasureRetentionMode } | undefined;\n}\n\n/**\n * Canonical comparison key for a resource's retention POSTURE.\n *\n * Compares the WHOLE resolved policy, not just `mode`. It carries two members since #1635 — `mode` and\n * the nested `statutoryRetention` ground — and this is the case the whole-policy comparison was written\n * for: comparing `mode` alone would let two configs over one collection agree on the treatment while\n * one says a statute keeps the rows and the other does not. Two configs over one collection must agree\n * on ALL of it.\n *\n * Key order is normalised at EVERY depth so authoring order cannot masquerade as a disagreement. `undefined` gets\n * its own key rather than being skipped: \"rows of this resource are hard-deleted\" is a positive\n * claim, and the in-vs-out asymmetry is what produces both failure modes documented below.\n */\nfunction buildRetentionPostureKey(retentionPolicy: { mode?: ErasureRetentionMode } | undefined): string {\n if (retentionPolicy === undefined || retentionPolicy === null) {\n return 'NOT_GOVERNED';\n }\n const canonical = (value: unknown): unknown => {\n if (value === null || typeof value !== 'object' || Array.isArray(value)) return value;\n return Object.entries(value as Record<string, unknown>)\n .filter(([, member]) => member !== undefined)\n .sort(([leftKey], [rightKey]) => leftKey.localeCompare(rightKey))\n .map(([key, member]) => [key, canonical(member)]);\n };\n const entries = canonical(retentionPolicy) as unknown[];\n return entries.length === 0 ? 'NOT_GOVERNED' : JSON.stringify(entries);\n}\n\n/** One collection whose resource configs disagree about retention governance. */\nexport interface SharedPersistenceCollectionRetentionIncoherence {\n /** The shared collection the disagreeing configs write to. */\n readonly collectionName: string;\n /** Every resource config addressing that collection, with the posture it declared. */\n readonly postures: readonly { resourceType: ResourceType; mode: ErasureRetentionMode | undefined }[];\n /** Operator-facing explanation naming both failure modes and the fix. */\n readonly message: string;\n}\n\n/**\n * Registry-ASSEMBLY guardrail: every resource config that resolves to the SAME\n * persistence collection must declare the SAME retention posture.\n *\n * ## Why a config that passes every per-resource check can still be broken\n *\n * `retentionPolicy` is validated PER RESOURCE CONFIG by the config factory: it\n * checks that resource's operations, its field treatments, its system-access\n * grants. It cannot check what a SIBLING config declares, because a factory\n * invocation never sees one. But retention is enforced against ROWS, and two\n * configs can own the same rows (see\n * {@link RESOURCE_SHARED_PERSISTENCE_COLLECTION_ALIASES}). So a pair that\n * disagrees produces a config where every individual resource is valid and the\n * COLLECTION is not.\n *\n * ## The two concrete failure modes\n *\n * **1. Fail-open erasure.** The retention hide filter (rows marked `RETAINED`\n * are invisible) and the immutability freeze are injected per resource config,\n * in `buildContextualFilter`. A row erased through the governed door stays\n * fully READABLE and UPDATABLE through the ungoverned one. For the\n * `USERS`/`USER_SELF` pair that ungoverned door exposes READ + UPDATE to\n * `APP_USER` — i.e. the erased subject can still read and edit their own\n * \"erased\" record. The row is erased only from the door that was opted in,\n * which is a compliance-grade lie about the record.\n *\n * **2. Unique-index collision — a hard functional abort.** A retention-governed\n * config scopes each unique index to NON-retained rows (a partial filter on the\n * retention marker), precisely so scrubbed rows leave the index and cannot\n * collide on the shared mask value. An ungoverned config over the same\n * collection emits a PLAIN unique index on the same field. The FIRST erasure\n * succeeds; the SECOND writes the same mask value, hits the plain index, and\n * fails E11000 — inside the erasure transaction, so the whole erasure rolls\n * back. The capability is silently single-use.\n *\n * Both modes are invisible until a real erasure runs, which is why this is a\n * BOOT-time guard and not a test: the point is that a config which passes at\n * boot must actually be able to perform an erasure.\n *\n * ## Why \"one opted in, one not\" is a disagreement, not a default\n *\n * An absent `retentionPolicy` is a positive statement — \"rows of this resource\n * are hard-deleted\" — not an unset value the governed sibling can supply. Both\n * failure modes above are produced by exactly that asymmetry, so `undefined`\n * participates in the comparison as its own posture rather than being skipped.\n *\n * Pure and side-effect free: it reports, the caller throws. That keeps the\n * shared-collection fact and its invariant in the layer both persistence and\n * validation can import, while the registry owns the error shape.\n *\n * @param resourceConfigurations - every assembled resource config, keyed by resource type.\n * @returns one entry per incoherent collection; empty when the registry is coherent.\n */\nexport function findSharedPersistenceCollectionRetentionIncoherences(\n resourceConfigurations: Record<string, SharedPersistenceCollectionRetentionCandidate>,\n): SharedPersistenceCollectionRetentionIncoherence[] {\n const posturesByCollection = new Map<\n string,\n { resourceType: ResourceType; mode: ErasureRetentionMode | undefined; postureKey: string }[]\n >();\n\n for (const [resourceTypeKey, resourceConfig] of Object.entries(resourceConfigurations)) {\n // Prefer the config's OWN identifier over the map key: the registry keys by resource type, but a\n // host that mis-keyed an entry would otherwise be diagnosed against a name it never authored.\n const resourceType = (resourceConfig?.resourceIdentifier ?? resourceTypeKey) as ResourceType;\n const collectionName = resolveSharedPersistenceCollectionName(resourceType);\n const posture = {\n resourceType,\n mode: resourceConfig?.retentionPolicy?.mode,\n postureKey: buildRetentionPostureKey(resourceConfig?.retentionPolicy),\n };\n\n const existing = posturesByCollection.get(collectionName);\n if (existing) {\n existing.push(posture);\n } else {\n posturesByCollection.set(collectionName, [posture]);\n }\n }\n\n const incoherences: SharedPersistenceCollectionRetentionIncoherence[] = [];\n\n for (const [collectionName, postures] of posturesByCollection) {\n if (postures.length < 2) {\n continue;\n }\n const distinctPostures = new Set(postures.map((posture) => posture.postureKey));\n if (distinctPostures.size < 2) {\n continue;\n }\n\n const declared = postures\n .map((posture) => `'${String(posture.resourceType)}' → ${posture.mode ?? 'NOT retention-governed'}`)\n .join(', ');\n\n incoherences.push({\n collectionName,\n postures,\n message:\n `Resource configs [${declared}] all store in the '${collectionName}' collection but declare ` +\n `DIFFERENT retention postures. They are separate models over ONE set of rows, and retention is ` +\n `enforced per resource config, so this ships two defects that only appear when a real erasure ` +\n `runs: (1) FAIL-OPEN ERASURE — the retention hide filter and the immutability freeze are absent ` +\n `on the ungoverned door, leaving an erased row readable and updatable there; (2) UNIQUE-INDEX ` +\n `COLLISION — the governed config scopes its unique indexes to non-retained rows while the ` +\n `ungoverned one emits plain unique indexes on the same collection, so the SECOND erased row ` +\n `collides (E11000) and the erasure transaction rolls back. Declare the SAME retentionPolicy on ` +\n `every config listed above (a resource sharing a collection cannot opt in or out alone), or ` +\n `stop sharing the collection.`,\n });\n }\n\n return incoherences;\n}\n\n/**\n * The privilege AXES a database credential issued to a named runtime principal (a minion) is built\n * from — one closed vocabulary shared by every storage adapter that mints such a credential.\n *\n * Each axis is a distinct verb set, not a strength on a scale, and they must never be merged:\n *\n * - {@link READ} — read rows.\n * - {@link WRITE} — insert, update and delete. The only axis that can REMOVE a row.\n * - {@link APPEND} — insert only. A principal can add a row and never amend or remove it, which is\n * what makes it the axis for evidence: an audit trail a principal can rewrite is not an audit trail.\n * - {@link MAINTAIN} — insert and update, never delete, for durable runtime state whose history must\n * survive the principal that advances it.\n *\n * It lives beside the collection aliases because a grant is issued per COLLECTION: the alias map says\n * which rows a grant on a resource type reaches, and this says which verbs it carries there. The\n * derivation that fills each axis, and the engine floor it adds, live in `platform-config-lib`\n * (`deriveMinionDatabaseGrants`); the MongoDB and PostgreSQL adapters each translate an axis into\n * their own privilege dialect.\n *\n * Scope, stated because it is easy to over-read: this governs NAMED runtime principals only. The\n * application backend is not issued an axis-scoped credential — it owns its database — so nothing\n * here constrains what the backend's own credential can do to a row.\n */\nexport enum RuntimePrincipalDatabaseGrantAxis {\n READ = 'read',\n WRITE = 'write',\n APPEND = 'append',\n MAINTAIN = 'maintain',\n}\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** @wildo_source:part:start saas.models.work-unit-ref facet:layer:shared facet:audience:app-developer */
|
|
3
|
+
/**
|
|
4
|
+
* A reference to one CASE — the unit of work an application sells an outcome for (a matter, a file, a
|
|
5
|
+
* claim, a ticket). Model-call cost attribution, expert decisions on agent work and agent turns all carry it
|
|
6
|
+
* as `caseRef`. Import it from `@wildo-ai/saas-models`.
|
|
7
|
+
*
|
|
8
|
+
* `resourceType` is an OPEN application identifier (resource names are not a closed vocabulary), so the
|
|
9
|
+
* shape alone proves nothing: a ref is accepted at a service boundary only after the registry confirms
|
|
10
|
+
* the resource exists and the caller's own authorization can READ that row. The tenant is always derived
|
|
11
|
+
* from the row, never from the caller. And the resource must declare `workUnit: true` in its resource
|
|
12
|
+
* configuration: a ref to any other resource is refused as NOT_A_WORK_UNIT.
|
|
13
|
+
*/
|
|
14
|
+
export declare const WorkUnitRefSchema: z.ZodObject<{
|
|
15
|
+
resourceType: z.ZodString;
|
|
16
|
+
resourceId: z.ZodString;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
export type WorkUnitRef = z.infer<typeof WorkUnitRefSchema>;
|
|
19
|
+
/** @wildo_source:part:end saas.models.work-unit-ref */
|
|
20
|
+
//# sourceMappingURL=work-unit.shared.schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work-unit.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/resources/work-unit.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,yGAAyG;AACzG;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB;;;kBAG5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,uDAAuD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** @wildo_source:part:start saas.models.work-unit-ref facet:layer:shared facet:audience:app-developer */
|
|
3
|
+
/**
|
|
4
|
+
* A reference to one CASE — the unit of work an application sells an outcome for (a matter, a file, a
|
|
5
|
+
* claim, a ticket). Model-call cost attribution, expert decisions on agent work and agent turns all carry it
|
|
6
|
+
* as `caseRef`. Import it from `@wildo-ai/saas-models`.
|
|
7
|
+
*
|
|
8
|
+
* `resourceType` is an OPEN application identifier (resource names are not a closed vocabulary), so the
|
|
9
|
+
* shape alone proves nothing: a ref is accepted at a service boundary only after the registry confirms
|
|
10
|
+
* the resource exists and the caller's own authorization can READ that row. The tenant is always derived
|
|
11
|
+
* from the row, never from the caller. And the resource must declare `workUnit: true` in its resource
|
|
12
|
+
* configuration: a ref to any other resource is refused as NOT_A_WORK_UNIT.
|
|
13
|
+
*/
|
|
14
|
+
export const WorkUnitRefSchema = z.strictObject({
|
|
15
|
+
resourceType: z.string().min(1).max(120).describe('Name of the resource the case is a row of, as the API names it (for example `todos`). The resource must exist, and the caller must be able to read the row.'),
|
|
16
|
+
resourceId: z.string().min(1).max(200).describe('Id of that row. The case belongs to the organization that owns the row, whatever organization the request names.'),
|
|
17
|
+
});
|
|
18
|
+
/** @wildo_source:part:end saas.models.work-unit-ref */
|
|
19
|
+
//# sourceMappingURL=work-unit.shared.schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work-unit.shared.schemas.js","sourceRoot":"","sources":["../../../../src/resources/work-unit.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,yGAAyG;AACzG;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,YAAY,CAAC;IAC9C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,6JAA6J,CAAC;IAChN,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,kHAAkH,CAAC;CACpK,CAAC,CAAC;AAEH,uDAAuD","sourcesContent":["import { z } from 'zod';\n\n/** @wildo_source:part:start saas.models.work-unit-ref facet:layer:shared facet:audience:app-developer */\n/**\n * A reference to one CASE — the unit of work an application sells an outcome for (a matter, a file, a\n * claim, a ticket). Model-call cost attribution, expert decisions on agent work and agent turns all carry it\n * as `caseRef`. Import it from `@wildo-ai/saas-models`.\n *\n * `resourceType` is an OPEN application identifier (resource names are not a closed vocabulary), so the\n * shape alone proves nothing: a ref is accepted at a service boundary only after the registry confirms\n * the resource exists and the caller's own authorization can READ that row. The tenant is always derived\n * from the row, never from the caller. And the resource must declare `workUnit: true` in its resource\n * configuration: a ref to any other resource is refused as NOT_A_WORK_UNIT.\n */\nexport const WorkUnitRefSchema = z.strictObject({\n resourceType: z.string().min(1).max(120).describe('Name of the resource the case is a row of, as the API names it (for example `todos`). The resource must exist, and the caller must be able to read the row.'),\n resourceId: z.string().min(1).max(200).describe('Id of that row. The case belongs to the organization that owns the row, whatever organization the request names.'),\n});\nexport type WorkUnitRef = z.infer<typeof WorkUnitRefSchema>;\n/** @wildo_source:part:end saas.models.work-unit-ref */\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { ResourcePrimaryScope } from "../resources/resources.shared.schemas";
|
|
3
|
+
import { InboundChannelKind, InboundSenderAssurance } from "../inbound/inbound-channels.shared.schemas";
|
|
3
4
|
/**
|
|
4
5
|
* Execution type enum defining how the execution context was initiated.
|
|
5
6
|
*
|
|
@@ -37,7 +38,22 @@ export declare enum ExecutionContext_ExecutionType {
|
|
|
37
38
|
* Created by WebhookHandlerBackendService after signature verification + scope resolution.
|
|
38
39
|
*/
|
|
39
40
|
WEBHOOK_CALLBACK = "webhook_callback",
|
|
40
|
-
ANONYMOUS_SESSION = "anonymous_session"
|
|
41
|
+
ANONYMOUS_SESSION = "anonymous_session",
|
|
42
|
+
/**
|
|
43
|
+
* An application-declared inbound HANDLER running one verified, durably stored delivery (#1596).
|
|
44
|
+
*
|
|
45
|
+
* Unlike `WEBHOOK_CALLBACK`, this is an AUTHORIZED principal: it carries the handler's declared
|
|
46
|
+
* `actingRoles` as its roles, is pinned to the one scope the delivery resolved to, and goes through
|
|
47
|
+
* role authorization, organization-unit narrowing, scope-root confinement and cross-tenant read
|
|
48
|
+
* observation exactly like a user. `WEBHOOK_CALLBACK` skips all four because signature verification
|
|
49
|
+
* is its whole trust story; application code must never inherit that, or a handler would be
|
|
50
|
+
* role-free and cross-tenant.
|
|
51
|
+
*
|
|
52
|
+
* `initiatorIds` is REQUIRED and names the delivery (`inboundDeliveryId`) and the handler
|
|
53
|
+
* (`inboundHandlerRef`); it never carries a user or a machine credential — nobody authenticated, a
|
|
54
|
+
* sender's signature was verified.
|
|
55
|
+
*/
|
|
56
|
+
INBOUND_DELIVERY = "inbound_delivery"
|
|
41
57
|
}
|
|
42
58
|
/**
|
|
43
59
|
* How a MACHINE principal ({@link ExecutionContext_ExecutionType.ORGANIZATION_MACHINE} /
|
|
@@ -96,6 +112,13 @@ export declare const ExecutionContext_InitiatorIdsSchema: z.ZodObject<{
|
|
|
96
112
|
consumableTokenId: z.ZodOptional<z.ZodString>;
|
|
97
113
|
webhookProviderId: z.ZodOptional<z.ZodString>;
|
|
98
114
|
anonymousUserId: z.ZodOptional<z.ZodString>;
|
|
115
|
+
inboundDeliveryId: z.ZodOptional<z.ZodString>;
|
|
116
|
+
inboundHandlerRef: z.ZodOptional<z.ZodString>;
|
|
117
|
+
inboundScopeUserId: z.ZodOptional<z.ZodString>;
|
|
118
|
+
inboundSender: z.ZodOptional<z.ZodObject<{
|
|
119
|
+
channel: z.ZodEnum<typeof InboundChannelKind>;
|
|
120
|
+
assurance: z.ZodEnum<typeof InboundSenderAssurance>;
|
|
121
|
+
}, z.core.$strict>>;
|
|
99
122
|
}, z.core.$strip>;
|
|
100
123
|
export type ExecutionContext_InitiatorIds = z.infer<typeof ExecutionContext_InitiatorIdsSchema>;
|
|
101
124
|
/**
|
|
@@ -106,6 +129,8 @@ export declare const ExecutionContext_RoleInfoSchema: z.ZodObject<{
|
|
|
106
129
|
relatedPrimaryScope: z.ZodEnum<typeof ResourcePrimaryScope>;
|
|
107
130
|
relatedResourceId: z.ZodOptional<z.ZodString>;
|
|
108
131
|
organizationUnitId: z.ZodOptional<z.ZodString>;
|
|
132
|
+
viaServiceProviderRelationshipId: z.ZodOptional<z.ZodString>;
|
|
133
|
+
viaProviderOrganizationId: z.ZodOptional<z.ZodString>;
|
|
109
134
|
}, z.core.$strip>;
|
|
110
135
|
export type ExecutionContext_RoleInfo = z.infer<typeof ExecutionContext_RoleInfoSchema>;
|
|
111
136
|
/**
|
|
@@ -127,6 +152,28 @@ export declare function isOrganizationWideRoleInfo(roleInfo: ExecutionContext_Ro
|
|
|
127
152
|
* question is explicitly unit-aware.
|
|
128
153
|
*/
|
|
129
154
|
export declare function selectOrganizationWideRoles(initiatorRoles: readonly ExecutionContext_RoleInfo[] | undefined): string[];
|
|
155
|
+
/**
|
|
156
|
+
* The role entries that may speak for a request acting inside ONE organization.
|
|
157
|
+
*
|
|
158
|
+
* Every entry that is not ORGANIZATIONS-scoped (the APPLICATION role set, chiefly) is kept: those
|
|
159
|
+
* roles are not held "in" a tenant, and they resolve against their own role table. An
|
|
160
|
+
* ORGANIZATIONS-scoped entry is kept only when it names `organizationId` — organization-wide and
|
|
161
|
+
* unit-scoped entries alike, so a caller partitions on {@link isOrganizationWideRoleInfo} AFTER this.
|
|
162
|
+
*
|
|
163
|
+
* ## Why this exists — measured 2026-09-25
|
|
164
|
+
*
|
|
165
|
+
* The per-instance role gate, the unit-narrowing decision and the role ceiling each unioned
|
|
166
|
+
* organization-wide entries across EVERY organization the caller belongs to, and answered the tenant
|
|
167
|
+
* question separately ("does the caller hold ANY org-wide entry for this row's organization?"). The
|
|
168
|
+
* two answers composed into "ORG_ADMIN somewhere + ORG_GUEST here = ORG_ADMIN here": an ORG_ADMIN of
|
|
169
|
+
* tenant A who was a guest of tenant B passed every ORG_ADMIN per-instance verb on B's rows, and could
|
|
170
|
+
* grant ORG_ADMIN in B through the role ceiling. A role is a fact about a membership, so it is only
|
|
171
|
+
* ever evaluated inside the organization that membership belongs to.
|
|
172
|
+
*
|
|
173
|
+
* An absent `organizationId` keeps no ORGANIZATIONS entry at all — fail closed: a request that names
|
|
174
|
+
* no tenant has no tenant role to speak for it.
|
|
175
|
+
*/
|
|
176
|
+
export declare function selectRoleInfosActingInOrganization(initiatorRoles: readonly ExecutionContext_RoleInfo[] | undefined, organizationId: string | undefined): ExecutionContext_RoleInfo[];
|
|
130
177
|
/**
|
|
131
178
|
* The unit-scoped grants a principal holds, as `(organizationUnitId, roles)` pairs.
|
|
132
179
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-context.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/runtime/execution-context.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"execution-context.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/runtime/execution-context.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AAExG;;;;;;;;;GASG;AACH,oBAAY,8BAA8B;IACtC;;;;;;;OAOG;IACH,oBAAoB,yBAAyB;IAC7C;;;;;OAKG;IACH,mBAAmB,wBAAwB;IAC3C,YAAY,iBAAiB;IAC7B,gBAAgB,qBAAqB;IACrC,4BAA4B,iCAAiC;IAC7D,gBAAgB,qBAAqB;IACrC;;;;OAIG;IACH,gBAAgB,qBAAqB;IACrC,iBAAiB,sBAAsB;IACvC;;;;;;;;;;;;;OAaG;IACH,gBAAgB,qBAAqB;CACxC;AAED;;;;;GAKG;AACH,oBAAY,iBAAiB;IACzB,oFAAoF;IACpF,OAAO,YAAY;IACnB;;;;OAIG;IACH,YAAY,iBAAiB;CAChC;AAED,oBAAY,uCA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0C;;;;;iBAkBrD,CAAC;AAEH,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0CAA0C,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { ResourcePrimaryScope } from "../resources/resources.shared.schemas.js";
|
|
3
|
+
import { InboundChannelKind, InboundSenderAssurance } from "../inbound/inbound-channels.shared.schemas.js";
|
|
3
4
|
/**
|
|
4
5
|
* Execution type enum defining how the execution context was initiated.
|
|
5
6
|
*
|
|
@@ -39,6 +40,21 @@ export var ExecutionContext_ExecutionType;
|
|
|
39
40
|
*/
|
|
40
41
|
ExecutionContext_ExecutionType["WEBHOOK_CALLBACK"] = "webhook_callback";
|
|
41
42
|
ExecutionContext_ExecutionType["ANONYMOUS_SESSION"] = "anonymous_session";
|
|
43
|
+
/**
|
|
44
|
+
* An application-declared inbound HANDLER running one verified, durably stored delivery (#1596).
|
|
45
|
+
*
|
|
46
|
+
* Unlike `WEBHOOK_CALLBACK`, this is an AUTHORIZED principal: it carries the handler's declared
|
|
47
|
+
* `actingRoles` as its roles, is pinned to the one scope the delivery resolved to, and goes through
|
|
48
|
+
* role authorization, organization-unit narrowing, scope-root confinement and cross-tenant read
|
|
49
|
+
* observation exactly like a user. `WEBHOOK_CALLBACK` skips all four because signature verification
|
|
50
|
+
* is its whole trust story; application code must never inherit that, or a handler would be
|
|
51
|
+
* role-free and cross-tenant.
|
|
52
|
+
*
|
|
53
|
+
* `initiatorIds` is REQUIRED and names the delivery (`inboundDeliveryId`) and the handler
|
|
54
|
+
* (`inboundHandlerRef`); it never carries a user or a machine credential — nobody authenticated, a
|
|
55
|
+
* sender's signature was verified.
|
|
56
|
+
*/
|
|
57
|
+
ExecutionContext_ExecutionType["INBOUND_DELIVERY"] = "inbound_delivery";
|
|
42
58
|
})(ExecutionContext_ExecutionType || (ExecutionContext_ExecutionType = {}));
|
|
43
59
|
/**
|
|
44
60
|
* How a MACHINE principal ({@link ExecutionContext_ExecutionType.ORGANIZATION_MACHINE} /
|
|
@@ -86,27 +102,65 @@ export var SessionType;
|
|
|
86
102
|
*/
|
|
87
103
|
export const ExecutionContext_MachineCredentialSchema = z.object({
|
|
88
104
|
/** Whether authentication used a static API key or an OAuth client. */
|
|
89
|
-
authMethod: z.enum(MachineAuthMethod),
|
|
105
|
+
authMethod: z.enum(MachineAuthMethod).describe("The kind of machine credential: `api_key` for an API key, `oauth_client` for an OAuth client."),
|
|
90
106
|
/** The authenticating credential's `_id` (the ApiKey row, or the OAuthClient row). */
|
|
91
|
-
credentialId: z.string(),
|
|
107
|
+
credentialId: z.string().describe("The id of that API key or OAuth client."),
|
|
92
108
|
});
|
|
93
109
|
export const ExecutionContext_InitiatorIdsSchema = z.object({
|
|
94
|
-
organizationId: z.string().optional(),
|
|
95
|
-
userId: z.string().optional(),
|
|
96
|
-
applicationId: z.string().optional(),
|
|
110
|
+
organizationId: z.string().optional().describe("The organization the request ran in, when it ran in one."),
|
|
111
|
+
userId: z.string().optional().describe("The signed-in user who made the request."),
|
|
112
|
+
applicationId: z.string().optional().describe("The application the request was made to."),
|
|
97
113
|
/**
|
|
98
114
|
* Credential provenance for a machine principal (see
|
|
99
115
|
* {@link ExecutionContext_MachineCredentialSchema}). Absent for human / anonymous /
|
|
100
116
|
* webhook / internal principals.
|
|
101
117
|
*/
|
|
102
|
-
machineCredential: ExecutionContext_MachineCredentialSchema.optional(),
|
|
103
|
-
consumableTokenId: z.string().optional(),
|
|
118
|
+
machineCredential: ExecutionContext_MachineCredentialSchema.optional().describe("The API key or OAuth client that authenticated the request, when a machine made it."),
|
|
119
|
+
consumableTokenId: z.string().optional().describe("The one-time token the request was authorized by, such as an invitation or a sign-in link."),
|
|
104
120
|
/**
|
|
105
121
|
* Provider reference that triggered the webhook (e.g., 'stripe', 'google').
|
|
106
122
|
* Only populated for WEBHOOK_CALLBACK execution type.
|
|
107
123
|
*/
|
|
108
|
-
webhookProviderId: z.string().optional(),
|
|
109
|
-
anonymousUserId: z.string().optional(),
|
|
124
|
+
webhookProviderId: z.string().optional().describe("The provider whose webhook call started the request, such as `stripe`."),
|
|
125
|
+
anonymousUserId: z.string().optional().describe("The anonymous visitor who made the request, before signing in."),
|
|
126
|
+
/**
|
|
127
|
+
* The stored inbound delivery this execution runs (its `_id`). Only populated for
|
|
128
|
+
* `INBOUND_DELIVERY`, where it is required — it is what the audit trail names as the source of
|
|
129
|
+
* every write the handler makes.
|
|
130
|
+
*/
|
|
131
|
+
inboundDeliveryId: z.string().optional().describe("The stored inbound delivery the request was processing."),
|
|
132
|
+
/** The declared handler running the delivery. Only populated for `INBOUND_DELIVERY`, where it is required. */
|
|
133
|
+
inboundHandlerRef: z.string().optional().describe("The handler that was processing that inbound delivery."),
|
|
134
|
+
/**
|
|
135
|
+
* The person a USER-scope inbound delivery belongs to (#1629) — its SCOPE, never its identity.
|
|
136
|
+
*
|
|
137
|
+
* Deliberately not `userId`: `userId` means somebody authenticated as that person, which no inbound
|
|
138
|
+
* delivery ever did (a sender's signature was verified). Keeping the two apart is what lets the
|
|
139
|
+
* constructor keep refusing an authenticated identity on `INBOUND_DELIVERY` while personal-scope
|
|
140
|
+
* resources are still confined to one person: the ownership check reads this field for an inbound
|
|
141
|
+
* principal, and the repository's scope filter reads the same id from the context map.
|
|
142
|
+
*
|
|
143
|
+
* Only populated for a USER-scope `INBOUND_DELIVERY`.
|
|
144
|
+
*/
|
|
145
|
+
inboundScopeUserId: z.string().optional().describe("The person a user-scoped inbound delivery belongs to. It scopes the records the delivery may reach; nobody signed in as that person."),
|
|
146
|
+
/**
|
|
147
|
+
* Who sent the message an `INBOUND_DELIVERY` runs, as IDENTIFICATION only (#1630, I8): the channel and
|
|
148
|
+
* how well the sender is known. It never grants anything — no authorization decision reads it, and the
|
|
149
|
+
* roles stay the handler's declared `actingRoles`.
|
|
150
|
+
*
|
|
151
|
+
* The address is deliberately NOT carried. A context is serialized into job payloads and trace
|
|
152
|
+
* attributes, where an address would outlive its erasure; the address lives on the conversation
|
|
153
|
+
* message, which the erasure writer can reach.
|
|
154
|
+
*
|
|
155
|
+
* Only populated for `INBOUND_DELIVERY`.
|
|
156
|
+
*/
|
|
157
|
+
inboundSender: z
|
|
158
|
+
.strictObject({
|
|
159
|
+
channel: z.enum(InboundChannelKind).describe("The channel the inbound message arrived through."),
|
|
160
|
+
assurance: z.enum(InboundSenderAssurance).describe("How well the sender is known on that channel."),
|
|
161
|
+
})
|
|
162
|
+
.optional()
|
|
163
|
+
.describe("Who sent the inbound message the request was processing, as identification only: it grants nothing, and the sender's address is not included."),
|
|
110
164
|
});
|
|
111
165
|
/**
|
|
112
166
|
* Role information with related scope and resource context
|
|
@@ -131,6 +185,19 @@ export const ExecutionContext_RoleInfoSchema = z.object({
|
|
|
131
185
|
* exactly one definition.
|
|
132
186
|
*/
|
|
133
187
|
organizationUnitId: z.string().optional(),
|
|
188
|
+
/**
|
|
189
|
+
* Present ⇒ this entry was conferred by a live service-provider relationship (#1597): the caller is
|
|
190
|
+
* a firm's expert (or an admitted firm machine client) acting inside a CLIENT organization.
|
|
191
|
+
*
|
|
192
|
+
* ⚠️ AUDIT ATTRIBUTION ONLY. No authority decision may read it — the entry's authority is fully
|
|
193
|
+
* expressed by `roles`, `relatedResourceId` and `organizationUnitId`, exactly like any other entry.
|
|
194
|
+
* It exists so an audit row written by a provider principal can name the relationship and the firm,
|
|
195
|
+
* which is what lets the client read "who from which firm did this, under which relationship" from
|
|
196
|
+
* its own trail. A system context derived from a request must not inherit it.
|
|
197
|
+
*/
|
|
198
|
+
viaServiceProviderRelationshipId: z.string().optional(),
|
|
199
|
+
/** The firm behind {@link viaServiceProviderRelationshipId}. Audit attribution only, like it. */
|
|
200
|
+
viaProviderOrganizationId: z.string().optional(),
|
|
134
201
|
});
|
|
135
202
|
/**
|
|
136
203
|
* Does this entry confer authority across the WHOLE owning scope?
|
|
@@ -155,6 +222,31 @@ export function isOrganizationWideRoleInfo(roleInfo) {
|
|
|
155
222
|
export function selectOrganizationWideRoles(initiatorRoles) {
|
|
156
223
|
return (initiatorRoles ?? []).filter(isOrganizationWideRoleInfo).flatMap((roleInfo) => roleInfo.roles);
|
|
157
224
|
}
|
|
225
|
+
/**
|
|
226
|
+
* The role entries that may speak for a request acting inside ONE organization.
|
|
227
|
+
*
|
|
228
|
+
* Every entry that is not ORGANIZATIONS-scoped (the APPLICATION role set, chiefly) is kept: those
|
|
229
|
+
* roles are not held "in" a tenant, and they resolve against their own role table. An
|
|
230
|
+
* ORGANIZATIONS-scoped entry is kept only when it names `organizationId` — organization-wide and
|
|
231
|
+
* unit-scoped entries alike, so a caller partitions on {@link isOrganizationWideRoleInfo} AFTER this.
|
|
232
|
+
*
|
|
233
|
+
* ## Why this exists — measured 2026-09-25
|
|
234
|
+
*
|
|
235
|
+
* The per-instance role gate, the unit-narrowing decision and the role ceiling each unioned
|
|
236
|
+
* organization-wide entries across EVERY organization the caller belongs to, and answered the tenant
|
|
237
|
+
* question separately ("does the caller hold ANY org-wide entry for this row's organization?"). The
|
|
238
|
+
* two answers composed into "ORG_ADMIN somewhere + ORG_GUEST here = ORG_ADMIN here": an ORG_ADMIN of
|
|
239
|
+
* tenant A who was a guest of tenant B passed every ORG_ADMIN per-instance verb on B's rows, and could
|
|
240
|
+
* grant ORG_ADMIN in B through the role ceiling. A role is a fact about a membership, so it is only
|
|
241
|
+
* ever evaluated inside the organization that membership belongs to.
|
|
242
|
+
*
|
|
243
|
+
* An absent `organizationId` keeps no ORGANIZATIONS entry at all — fail closed: a request that names
|
|
244
|
+
* no tenant has no tenant role to speak for it.
|
|
245
|
+
*/
|
|
246
|
+
export function selectRoleInfosActingInOrganization(initiatorRoles, organizationId) {
|
|
247
|
+
return (initiatorRoles ?? []).filter((roleInfo) => roleInfo.relatedPrimaryScope !== ResourcePrimaryScope.ORGANIZATIONS
|
|
248
|
+
|| (Boolean(organizationId) && String(roleInfo.relatedResourceId ?? '') === organizationId));
|
|
249
|
+
}
|
|
158
250
|
/**
|
|
159
251
|
* The unit-scoped grants a principal holds, as `(organizationUnitId, roles)` pairs.
|
|
160
252
|
*
|