@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-export.shared.utils.js","sourceRoot":"","sources":["../../../../../src/resources/utils/collection-export.shared.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EACvB,UAAU,EACV,YAAY,GACb,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAAE,8BAA8B,EAAoC,MAAM,oCAAoC,CAAC;AAEtH,wCAAwC;AACxC,MAAM,CAAC,MAAM,+BAA+B,GAA6D;IACvG,CAAC,8BAA8B,CAAC,GAAG,CAAC,EAAE,yBAAyB;IAC/D,CA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B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B,CAC3C,YAAoB,EACpB,MAAsC,EACtC,GAAS;IAET,MAAM,QAAQ,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAChD,OAAO,GAAG,YAAY,IAAI,QAAQ,IAAI,iCAAiC,CAAC,MAAM,CAAC,EAAE,CAAC;AACpF,CAAC","sourcesContent":["import {\n getMergedObjectOrUnionShape,\n getZodDefSchemaProperty,\n getZodType,\n unwrapSchema,\n} from '@wildo-ai/zod-decorators';\nimport { z } from 'zod';\n\nimport type { ResourceCollectionExportConfig } from '../resources-config.shared.schemas';\nimport { ResourceCollectionExportFormat, ResourceCollectionExportRowScope } from '../resources-config.shared.schemas';\n\n/** IANA media types, one per format. */\nexport const COLLECTION_EXPORT_CONTENT_TYPES: Readonly<Record<ResourceCollectionExportFormat, string>> = {\n [ResourceCollectionExportFormat.CSV]: 'text/csv; charset=utf-8',\n [ResourceCollectionExportFormat.JSON]: 'application/json; charset=utf-8',\n};\n\n/** File extensions, one per format. */\nexport const COLLECTION_EXPORT_FILE_EXTENSIONS: Readonly<Record<ResourceCollectionExportFormat, string>> = {\n [ResourceCollectionExportFormat.CSV]: 'csv',\n [ResourceCollectionExportFormat.JSON]: 'json',\n};\n\n/** Query-parameter names the export route reads its two selectors from. */\nexport const COLLECTION_EXPORT_FORMAT_QUERY_PARAM = 'format';\nexport const COLLECTION_EXPORT_ROW_SCOPE_QUERY_PARAM = 'rowScope';\n\n/** Response header carrying the number of rows actually written. */\nexport const COLLECTION_EXPORT_ROW_COUNT_HEADER = 'X-Wildo-Export-Row-Count';\n\n/**\n * The CSV column set for an exported listing, resolved from the operation's DECLARED response shape\n * rather than from the rows.\n *\n * ## Why the schema and not the rows\n *\n * A whole-result-set export streams: the header record is written before the last page has been\n * read. Resolving columns from rows would therefore have to guess from the first page, and a column\n * that first appears on page 40 (an optional field absent from every earlier row) would be dropped\n * from a file that looks complete. Silent column loss inside a file the user then treats as\n * authoritative is exactly the failure this codebase refuses elsewhere.\n *\n * The declared shape has none of that problem: it is complete, ordered by the schema's own field\n * order (which reads far better than alphabetical), and identical across every export of the same\n * operation — so a downstream consumer can rely on the header.\n *\n * Returns `undefined` when the shape cannot be resolved, and callers must then REFUSE to render CSV\n * rather than fall back to a row-derived guess. JSON is unaffected: it carries whatever each row\n * carries, so it needs no column set at all.\n */\nexport function resolveCollectionExportCsvColumns(responseDto: z.ZodTypeAny | undefined): string[] | undefined {\n if (!responseDto) return undefined;\n\n // ⚠️ `getZodObjectShape` answers `{}` — NOT `undefined` — for anything that is not an object, and\n // `{}` is truthy. Every check here is therefore on the KEY COUNT. A truthiness check reads\n // correctly and is always satisfied, which is how the first implementation returned \"no columns\"\n // for a schema whose shape it had successfully read.\n const envelopeShape = getMergedObjectOrUnionShape(deepUnwrapSchema(responseDto));\n if (Object.keys(envelopeShape).length === 0) return undefined;\n\n // A paginated LIST/SEARCH response is `{ data: Row[], pagination: {...} }`.\n const dataSchema = envelopeShape.data ? deepUnwrapSchema(envelopeShape.data) : undefined;\n if (!dataSchema || getZodType(dataSchema) !== 'array') return undefined;\n\n const elementSchema = getZodDefSchemaProperty(dataSchema, 'element');\n if (!elementSchema) return undefined;\n\n // `getMergedObjectOrUnionShape` rather than `getZodObjectShape`: a resource declared through a\n // schema family (`createSchemaFamily`) has a DISCRIMINATED UNION as its row type, not an object —\n // Wonder Todos' `todos` is exactly that, discriminated on `recurringType`, with 24 fields on one\n // variant and 27 on the other. Reading the object shape off such an element yields nothing, which\n // would make CSV export impossible for every inheritance resource in the framework.\n //\n // The union is MERGED, not sampled: a recurring row carries fields a one-off row does not, and a\n // column set taken from one branch would drop the other's fields from a file that looks complete.\n const rowShape = getMergedObjectOrUnionShape(deepUnwrapSchema(elementSchema));\n const columns = Object.keys(rowShape);\n return columns.length > 0 ? columns : undefined;\n}\n\n/**\n * Peel every wrapper a response DTO may have acquired on its way here, until an inspectable schema\n * is reached.\n *\n * A LIST response DTO is not the plain object it was authored as: the DTO builder applies\n * network-boundary coercion (dates, money bigints), which produces `pipe`/effect wrappers around the\n * envelope AND around individual fields. A single `unwrapSchema` call stops at the first of those,\n * and the caller then reports \"no columns\" for a perfectly ordinary listing — a refusal that looks\n * like a configuration problem and is really a traversal that gave up one level early.\n *\n * `pipe` is walked OUTPUT-first: what a CSV column set describes is what the caller receives.\n */\nfunction deepUnwrapSchema(schema: z.ZodTypeAny, depth = 0): z.ZodTypeAny {\n // A cheap cycle/rabbit-hole guard: `z.lazy` chains are legal and a malformed one must not hang\n // resource configuration.\n if (depth > 12) return schema;\n\n const zodType = getZodType(schema);\n if (zodType === 'pipe') {\n const outSchema = getZodDefSchemaProperty(schema, 'out') ?? getZodDefSchemaProperty(schema, 'in');\n return outSchema ? deepUnwrapSchema(outSchema, depth + 1) : schema;\n }\n if (zodType === 'lazy') {\n const inner = getZodDefSchemaProperty(schema, 'getter');\n return inner ? deepUnwrapSchema(inner, depth + 1) : schema;\n }\n\n const innerType = getZodDefSchemaProperty(schema, 'innerType');\n if (innerType) return deepUnwrapSchema(innerType, depth + 1);\n\n const unwrapped = unwrapSchema(schema);\n return unwrapped !== schema ? deepUnwrapSchema(unwrapped, depth + 1) : schema;\n}\n\n/**\n * Resolve the caller's requested format against what the operation OFFERS.\n *\n * Absent ⇒ the operation's first declared format, which is the author's stated preference (the\n * declaration is an ordered list, not a set). Present but not offered ⇒ `undefined`, and the caller\n * refuses — never a silent fallback to something the author did not publish.\n */\nexport function resolveRequestedCollectionExportFormat(\n requested: unknown,\n offered: readonly ResourceCollectionExportFormat[],\n): ResourceCollectionExportFormat | undefined {\n if (requested === undefined || requested === null || requested === '') {\n return offered[0];\n }\n if (typeof requested !== 'string') return undefined;\n return offered.find((format) => format === requested);\n}\n\n/** The row-scope twin of {@link resolveRequestedCollectionExportFormat}, with the same rules. */\nexport function resolveRequestedCollectionExportRowScope(\n requested: unknown,\n offered: readonly ResourceCollectionExportRowScope[],\n): ResourceCollectionExportRowScope | undefined {\n if (requested === undefined || requested === null || requested === '') {\n return offered[0];\n }\n if (typeof requested !== 'string') return undefined;\n return offered.find((rowScope) => rowScope === requested);\n}\n\n/** One offered export: a format and a row scope the operation actually declared. */\nexport interface ResourceCollectionExportSelection {\n format: ResourceCollectionExportFormat;\n rowScope: ResourceCollectionExportRowScope;\n}\n\n/**\n * Every combination the operation offers, format-major, in the author's declared order.\n *\n * The declaration is two ORDERED lists, and the cross product is what a user should be able to\n * choose from — an action that silently picks one pair on their behalf is the surface answering a\n * question they were never asked. Format-major because format is the coarser choice: \"CSV or JSON\"\n * separates two audiences (a spreadsheet and a system), while the row scope refines within each.\n */\nexport function listCollectionExportSelections(\n exportConfig: ResourceCollectionExportConfig,\n): ResourceCollectionExportSelection[] {\n const selections: ResourceCollectionExportSelection[] = [];\n for (const format of exportConfig.formats) {\n for (const rowScope of exportConfig.rowScopes) {\n selections.push({ format, rowScope });\n }\n }\n return selections;\n}\n\n/**\n * `<resourceType>-<ISO date>.<ext>` — stable, sortable, and free of any row content.\n *\n * The date rather than a timestamp: two exports on one day should not produce filenames a human\n * cannot tell apart at a glance, and the exact moment is in the audit trail where it belongs.\n */\nexport function buildCollectionExportFilename(\n resourceType: string,\n format: ResourceCollectionExportFormat,\n now: Date,\n): string {\n const datePart = now.toISOString().slice(0, 10);\n return `${resourceType}-${datePart}.${COLLECTION_EXPORT_FILE_EXTENSIONS[format]}`;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"collection-export.shared.utils.js","sourceRoot":"","sources":["../../../../../src/resources/utils/collection-export.shared.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EACvB,UAAU,EACV,YAAY,GACb,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAAE,8BAA8B,EAAoC,MAAM,oCAAoC,CAAC;AAEtH,wCAAwC;AACxC,MAAM,CAAC,MAAM,+BAA+B,GAA6D;IACvG,CAAC,8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YAAY,CAAC,SAAS,EAAE,CAAC;YAC9C,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B,CAC3C,YAAoB,EACpB,MAAsC,EACtC,GAAS;IAET,MAAM,QAAQ,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAChD,OAAO,GAAG,YAAY,IAAI,QAAQ,IAAI,iCAAiC,CAAC,MAAM,CAAC,EAAE,CAAC;AACpF,CAAC","sourcesContent":["import {\n getMergedObjectOrUnionShape,\n getZodDefSchemaProperty,\n getZodType,\n unwrapSchema,\n} from '@wildo-ai/zod-decorators';\nimport { z } from 'zod';\n\nimport type { ResourceCollectionExportConfig } from '../resources-config.shared.schemas';\nimport { ResourceCollectionExportFormat, ResourceCollectionExportRowScope } from '../resources-config.shared.schemas';\n\n/** IANA media types, one per format. */\nexport const COLLECTION_EXPORT_CONTENT_TYPES: Readonly<Record<ResourceCollectionExportFormat, string>> = {\n [ResourceCollectionExportFormat.CSV]: 'text/csv; charset=utf-8',\n [ResourceCollectionExportFormat.JSON]: 'application/json; charset=utf-8',\n [ResourceCollectionExportFormat.PDF]: 'application/pdf',\n};\n\n/** File extensions, one per format. */\nexport const COLLECTION_EXPORT_FILE_EXTENSIONS: Readonly<Record<ResourceCollectionExportFormat, string>> = {\n [ResourceCollectionExportFormat.CSV]: 'csv',\n [ResourceCollectionExportFormat.JSON]: 'json',\n [ResourceCollectionExportFormat.PDF]: 'pdf',\n};\n\n/** Query-parameter names the export route reads its two selectors from. */\nexport const COLLECTION_EXPORT_FORMAT_QUERY_PARAM = 'format';\nexport const COLLECTION_EXPORT_ROW_SCOPE_QUERY_PARAM = 'rowScope';\n\n/** Response header carrying the number of rows actually written. */\nexport const COLLECTION_EXPORT_ROW_COUNT_HEADER = 'X-Wildo-Export-Row-Count';\n\n/**\n * The CSV column set for an exported listing, resolved from the operation's DECLARED response shape\n * rather than from the rows.\n *\n * ## Why the schema and not the rows\n *\n * A whole-result-set export streams: the header record is written before the last page has been\n * read. Resolving columns from rows would therefore have to guess from the first page, and a column\n * that first appears on page 40 (an optional field absent from every earlier row) would be dropped\n * from a file that looks complete. Silent column loss inside a file the user then treats as\n * authoritative is exactly the failure this codebase refuses elsewhere.\n *\n * The declared shape has none of that problem: it is complete, ordered by the schema's own field\n * order (which reads far better than alphabetical), and identical across every export of the same\n * operation — so a downstream consumer can rely on the header.\n *\n * Returns `undefined` when the shape cannot be resolved, and callers must then REFUSE to render CSV\n * rather than fall back to a row-derived guess. JSON is unaffected: it carries whatever each row\n * carries, so it needs no column set at all.\n */\nexport function resolveCollectionExportCsvColumns(responseDto: z.ZodTypeAny | undefined): string[] | undefined {\n if (!responseDto) return undefined;\n\n // ⚠️ `getZodObjectShape` answers `{}` — NOT `undefined` — for anything that is not an object, and\n // `{}` is truthy. Every check here is therefore on the KEY COUNT. A truthiness check reads\n // correctly and is always satisfied, which is how the first implementation returned \"no columns\"\n // for a schema whose shape it had successfully read.\n const envelopeShape = getMergedObjectOrUnionShape(deepUnwrapSchema(responseDto));\n if (Object.keys(envelopeShape).length === 0) return undefined;\n\n // A paginated LIST/SEARCH response is `{ data: Row[], pagination: {...} }`.\n const dataSchema = envelopeShape.data ? deepUnwrapSchema(envelopeShape.data) : undefined;\n if (!dataSchema || getZodType(dataSchema) !== 'array') return undefined;\n\n const elementSchema = getZodDefSchemaProperty(dataSchema, 'element');\n if (!elementSchema) return undefined;\n\n // `getMergedObjectOrUnionShape` rather than `getZodObjectShape`: a resource declared through a\n // schema family (`createSchemaFamily`) has a DISCRIMINATED UNION as its row type, not an object —\n // Wonder Todos' `todos` is exactly that, discriminated on `recurringType`, with 24 fields on one\n // variant and 27 on the other. Reading the object shape off such an element yields nothing, which\n // would make CSV export impossible for every inheritance resource in the framework.\n //\n // The union is MERGED, not sampled: a recurring row carries fields a one-off row does not, and a\n // column set taken from one branch would drop the other's fields from a file that looks complete.\n const rowShape = getMergedObjectOrUnionShape(deepUnwrapSchema(elementSchema));\n const columns = Object.keys(rowShape);\n return columns.length > 0 ? columns : undefined;\n}\n\n/**\n * Peel every wrapper a response DTO may have acquired on its way here, until an inspectable schema\n * is reached.\n *\n * A LIST response DTO is not the plain object it was authored as: the DTO builder applies\n * network-boundary coercion (dates, money bigints), which produces `pipe`/effect wrappers around the\n * envelope AND around individual fields. A single `unwrapSchema` call stops at the first of those,\n * and the caller then reports \"no columns\" for a perfectly ordinary listing — a refusal that looks\n * like a configuration problem and is really a traversal that gave up one level early.\n *\n * `pipe` is walked OUTPUT-first: what a CSV column set describes is what the caller receives.\n */\nfunction deepUnwrapSchema(schema: z.ZodTypeAny, depth = 0): z.ZodTypeAny {\n // A cheap cycle/rabbit-hole guard: `z.lazy` chains are legal and a malformed one must not hang\n // resource configuration.\n if (depth > 12) return schema;\n\n const zodType = getZodType(schema);\n if (zodType === 'pipe') {\n const outSchema = getZodDefSchemaProperty(schema, 'out') ?? getZodDefSchemaProperty(schema, 'in');\n return outSchema ? deepUnwrapSchema(outSchema, depth + 1) : schema;\n }\n if (zodType === 'lazy') {\n const inner = getZodDefSchemaProperty(schema, 'getter');\n return inner ? deepUnwrapSchema(inner, depth + 1) : schema;\n }\n\n const innerType = getZodDefSchemaProperty(schema, 'innerType');\n if (innerType) return deepUnwrapSchema(innerType, depth + 1);\n\n const unwrapped = unwrapSchema(schema);\n return unwrapped !== schema ? deepUnwrapSchema(unwrapped, depth + 1) : schema;\n}\n\n/**\n * Resolve the caller's requested format against what the operation OFFERS.\n *\n * Absent ⇒ the operation's first declared format, which is the author's stated preference (the\n * declaration is an ordered list, not a set). Present but not offered ⇒ `undefined`, and the caller\n * refuses — never a silent fallback to something the author did not publish.\n */\nexport function resolveRequestedCollectionExportFormat(\n requested: unknown,\n offered: readonly ResourceCollectionExportFormat[],\n): ResourceCollectionExportFormat | undefined {\n if (requested === undefined || requested === null || requested === '') {\n return offered[0];\n }\n if (typeof requested !== 'string') return undefined;\n return offered.find((format) => format === requested);\n}\n\n/** The row-scope twin of {@link resolveRequestedCollectionExportFormat}, with the same rules. */\nexport function resolveRequestedCollectionExportRowScope(\n requested: unknown,\n offered: readonly ResourceCollectionExportRowScope[],\n): ResourceCollectionExportRowScope | undefined {\n if (requested === undefined || requested === null || requested === '') {\n return offered[0];\n }\n if (typeof requested !== 'string') return undefined;\n return offered.find((rowScope) => rowScope === requested);\n}\n\n/** One offered export: a format and a row scope the operation actually declared. */\nexport interface ResourceCollectionExportSelection {\n format: ResourceCollectionExportFormat;\n rowScope: ResourceCollectionExportRowScope;\n}\n\n/**\n * Every combination the operation offers, format-major, in the author's declared order.\n *\n * The declaration is two ORDERED lists, and the cross product is what a user should be able to\n * choose from — an action that silently picks one pair on their behalf is the surface answering a\n * question they were never asked. Format-major because format is the coarser choice: \"CSV, JSON or PDF\"\n * separates audiences (a spreadsheet, a system, a reader), while the row scope refines within each.\n */\nexport function listCollectionExportSelections(\n exportConfig: ResourceCollectionExportConfig,\n): ResourceCollectionExportSelection[] {\n const selections: ResourceCollectionExportSelection[] = [];\n for (const format of exportConfig.formats) {\n for (const rowScope of exportConfig.rowScopes) {\n selections.push({ format, rowScope });\n }\n }\n return selections;\n}\n\n/**\n * `<resourceType>-<ISO date>.<ext>` — stable, sortable, and free of any row content.\n *\n * The date rather than a timestamp: two exports on one day should not produce filenames a human\n * cannot tell apart at a glance, and the exact moment is in the audit trail where it belongs.\n */\nexport function buildCollectionExportFilename(\n resourceType: string,\n format: ResourceCollectionExportFormat,\n now: Date,\n): string {\n const datePart = now.toISOString().slice(0, 10);\n return `${resourceType}-${datePart}.${COLLECTION_EXPORT_FILE_EXTENSIONS[format]}`;\n}\n"]}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The authoring contract of a WRITABLE read-through resource (#1679) — what a resource must declare
|
|
3
|
+
* before the engine will send a create, update or delete to a system of record it does not own.
|
|
4
|
+
*
|
|
5
|
+
* Checked in the resource FACTORY, at authoring, because every rule here is decidable from the one
|
|
6
|
+
* file an author is writing: the binding, the operation list and the schema. What is NOT decidable
|
|
7
|
+
* here — the instance's partition field, whether the dialect implements writes — needs the saas
|
|
8
|
+
* configuration and the engine's dialect registry, so it is checked at boot registration instead.
|
|
9
|
+
*
|
|
10
|
+
* Every refusal names the fix. A write door into somebody else's ERP is the declaration where a
|
|
11
|
+
* silently-accepted mistake costs the most, because the mistake is made against data the platform
|
|
12
|
+
* cannot restore.
|
|
13
|
+
*/
|
|
14
|
+
import type { z } from 'zod';
|
|
15
|
+
import { HttpApiWriteVerb, type HttpApiResourceBinding } from '../../http-api-binding/http-api-binding.shared.schemas';
|
|
16
|
+
import { ResourceOperationIdempotencyKeyRequirement } from '../../requests/idempotency-key.shared';
|
|
17
|
+
import { CoreResourceOperation } from '../resources.shared.core.definitions';
|
|
18
|
+
import { ResourceOperation_ServiceRuntimeMode } from '../resources.shared.schemas';
|
|
19
|
+
/**
|
|
20
|
+
* The core operation each opened verb reaches, and the only three a read-through resource may write
|
|
21
|
+
* through. Total over {@link HttpApiWriteVerb}, so a fourth verb is a compile error here until
|
|
22
|
+
* somebody decides which operation it is.
|
|
23
|
+
*/
|
|
24
|
+
export declare const HTTP_API_WRITE_VERB_CORE_OPERATION: Readonly<Record<HttpApiWriteVerb, CoreResourceOperation>>;
|
|
25
|
+
/**
|
|
26
|
+
* The write verb a core operation IS on a read-through resource, or `undefined` for a read.
|
|
27
|
+
*
|
|
28
|
+
* The one mapping both the authoring check and the repository's dispatch read, so the two cannot
|
|
29
|
+
* disagree about whether an operation is a write.
|
|
30
|
+
*/
|
|
31
|
+
export declare function resolveHttpApiWriteVerb(coreOperation: unknown): HttpApiWriteVerb | undefined;
|
|
32
|
+
/** What the factory knows about ONE declared operation, reduced to what these rules read. */
|
|
33
|
+
interface HttpApiWriteOperationFacts {
|
|
34
|
+
readonly operationKey: string;
|
|
35
|
+
/** The core semantics of each variant: the operation itself for a core one, `resourceOperationLike` for a custom one. */
|
|
36
|
+
readonly effectiveOperations: readonly unknown[];
|
|
37
|
+
readonly variants: ReadonlyArray<{
|
|
38
|
+
readonly idempotencyKey?: ResourceOperationIdempotencyKeyRequirement;
|
|
39
|
+
readonly haveBulkOperation?: boolean;
|
|
40
|
+
}>;
|
|
41
|
+
readonly serviceRuntimeMode?: ResourceOperation_ServiceRuntimeMode;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Reduce the authored operation declarations to {@link HttpApiWriteOperationFacts}.
|
|
45
|
+
*
|
|
46
|
+
* Enumerated by EFFECTIVE semantics, the way the pipeline's CLOSED-population rule enumerates
|
|
47
|
+
* creates: a core operation is its own semantics, a custom one borrows them per variant through
|
|
48
|
+
* `resourceOperationLike`, and both sources are unioned because neither sees the other's members.
|
|
49
|
+
* A custom operation that borrows UPDATE is exactly how an author would write a remote "confirm"
|
|
50
|
+
* without thinking of it as a write — so it is a write here too.
|
|
51
|
+
*/
|
|
52
|
+
export declare function collectHttpApiWriteOperationFacts(coreOperations: readonly unknown[], operationsConfiguration: Readonly<Record<string, unknown>> | undefined): HttpApiWriteOperationFacts[];
|
|
53
|
+
/**
|
|
54
|
+
* The `Idempotency-Key` requirement a variant of a read-through WRITE carries — always REQUIRED.
|
|
55
|
+
*
|
|
56
|
+
* DERIVED rather than demanded from the author, because it has one legal value: a remote write cannot
|
|
57
|
+
* be rolled back, so a retry after a lost response must replay the first outcome instead of writing a
|
|
58
|
+
* second time, and only a required key makes every retry replayable. Asking an author to type the one
|
|
59
|
+
* answer the mechanism already knows is a question nobody should be asked (`derive-before-you-ask`).
|
|
60
|
+
* `ACCEPTED` is refused by {@link assertHttpApiWriteDeclarationCoherence}, never silently upgraded.
|
|
61
|
+
*
|
|
62
|
+
* The AUTHORED value comes first so the factory's forwarding line still reads
|
|
63
|
+
* `idempotencyKey: resolveHttpApiWriteIdempotencyKeyRequirement(variantParams.idempotencyKey, …)`, the shape
|
|
64
|
+
* `operation-variant-field-forwarding.guard.test.ts` recognises as forwarding.
|
|
65
|
+
*/
|
|
66
|
+
export declare function resolveHttpApiWriteIdempotencyKeyRequirement(authored: ResourceOperationIdempotencyKeyRequirement | undefined, isReadThroughWrite: boolean): ResourceOperationIdempotencyKeyRequirement | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Refuse every write declaration on a read-through resource that the engine could not honour.
|
|
69
|
+
*
|
|
70
|
+
* Throws a plain `Error` naming the rule and the fix; the factory wraps it into its own configuration
|
|
71
|
+
* error with the resource identifier in front.
|
|
72
|
+
*
|
|
73
|
+
* The rules, and why each one exists:
|
|
74
|
+
*
|
|
75
|
+
* 1. **No bulk write operation**, opened or not — see {@link BULK_WRITE_OPERATIONS}. Nor a
|
|
76
|
+
* `haveBulkOperation` twin of a write, which every tier would run as N single-row writes.
|
|
77
|
+
* 2. **Every write operation's verb is OPENED by the binding**, and **every opened verb has an
|
|
78
|
+
* operation**. Both directions: the first is a route that would answer a refusal forever, the
|
|
79
|
+
* second a declared door nobody can reach — and an inert declaration that looks like a control is
|
|
80
|
+
* worse than none.
|
|
81
|
+
* 3. **Every write variant runs INLINE.** A queued or background execution cannot carry the
|
|
82
|
+
* `Idempotency-Key`, so a retried request could not replay; the service tier refuses a key on a
|
|
83
|
+
* non-INLINE operation already, and a key is required here.
|
|
84
|
+
* 4. **No write variant declares `Idempotency-Key: ACCEPTED`.** See
|
|
85
|
+
* {@link resolveHttpApiWriteIdempotencyKeyRequirement}.
|
|
86
|
+
* 5. *(Moved, #2010.)* The erasure-stance rule this list carried — a binding that WRITES personal-data fields
|
|
87
|
+
* may not declare `NO_SUBJECT_DATA` — is now `personalFieldsContradictingNoSubjectDataStance`, which the
|
|
88
|
+
* factory applies to EVERY read-through binding and every pipeline copy. Reading those fields out of a
|
|
89
|
+
* system that "holds no subject data" is the same contradiction as writing them into it.
|
|
90
|
+
* 6. **A `VERSION_CHECKED` binding's version field is one the UPDATE can carry and the CREATE cannot** (#1724). The
|
|
91
|
+
* field must exist on the schema, be admitted to the update payload (the caller sends the version it read), and be
|
|
92
|
+
* excluded from create (a new row has no version yet, and the vendor stamps it). It must be a STRING: the check
|
|
93
|
+
* compares the caller's value byte for byte with the vendor's raw one, and a date schema would coerce it on the way
|
|
94
|
+
* in and make every update stale. Whether it maps onto the vendor's `rowVersionField` needs the facet, and is
|
|
95
|
+
* checked at boot.
|
|
96
|
+
*/
|
|
97
|
+
export declare function assertHttpApiWriteDeclarationCoherence(params: {
|
|
98
|
+
readonly binding: HttpApiResourceBinding;
|
|
99
|
+
readonly operations: readonly HttpApiWriteOperationFacts[];
|
|
100
|
+
readonly mainSchema: z.ZodTypeAny;
|
|
101
|
+
}): void;
|
|
102
|
+
export {};
|
|
103
|
+
//# sourceMappingURL=http-api-write-declaration.shared.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-api-write-declaration.shared.utils.d.ts","sourceRoot":"","sources":["../../../../../src/resources/utils/http-api-write-declaration.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAG7B,OAAO,EAEL,gBAAgB,EAChB,KAAK,sBAAsB,EAC5B,MAAM,wDAAwD,CAAC;AAChE,OAAO,EAAE,0CAA0C,EAAE,MAAM,uCAAuC,CAAC;AACnG,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,oCAAoC,EAAE,MAAM,6BAA6B,CAAC;AAEnF;;;;GAIG;AACH,eAAO,MAAM,kCAAkC,EAAE,QAAQ,CAAC,MAAM,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAIvG,CAAC;AAEH;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,aAAa,EAAE,OAAO,GAAG,gBAAgB,GAAG,SAAS,CAK5F;AAeD,6FAA6F;AAC7F,UAAU,0BAA0B;IAClC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,yHAAyH;IACzH,QAAQ,CAAC,mBAAmB,EAAE,SAAS,OAAO,EAAE,CAAC;IACjD,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;QAC/B,QAAQ,CAAC,cAAc,CAAC,EAAE,0CAA0C,CAAC;QACrE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;KACtC,CAAC,CAAC;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,oCAAoC,CAAC;CACpE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iCAAiC,CAC/C,cAAc,EAAE,SAAS,OAAO,EAAE,EAClC,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,GACrE,0BAA0B,EAAE,CAsB9B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,4CAA4C,CAC1D,QAAQ,EAAE,0CAA0C,GAAG,SAAS,EAChE,kBAAkB,EAAE,OAAO,GAC1B,0CAA0C,GAAG,SAAS,CAGxD;AAiFD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,sCAAsC,CAAC,MAAM,EAAE;IAC7D,QAAQ,CAAC,OAAO,EAAE,sBAAsB,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,SAAS,0BAA0B,EAAE,CAAC;IAC3D,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC;CACnC,GAAG,IAAI,CA8GP"}
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The authoring contract of a WRITABLE read-through resource (#1679) — what a resource must declare
|
|
3
|
+
* before the engine will send a create, update or delete to a system of record it does not own.
|
|
4
|
+
*
|
|
5
|
+
* Checked in the resource FACTORY, at authoring, because every rule here is decidable from the one
|
|
6
|
+
* file an author is writing: the binding, the operation list and the schema. What is NOT decidable
|
|
7
|
+
* here — the instance's partition field, whether the dialect implements writes — needs the saas
|
|
8
|
+
* configuration and the engine's dialect registry, so it is checked at boot registration instead.
|
|
9
|
+
*
|
|
10
|
+
* Every refusal names the fix. A write door into somebody else's ERP is the declaration where a
|
|
11
|
+
* silently-accepted mistake costs the most, because the mistake is made against data the platform
|
|
12
|
+
* cannot restore.
|
|
13
|
+
*/
|
|
14
|
+
import { getZodObjectShape, isExcludedFromCreate, isExcludedFromUpdate, isZodObject, unwrapSchema } from '@wildo-ai/zod-decorators';
|
|
15
|
+
import { HttpApiWriteConcurrencyMode, HttpApiWriteVerb, } from '../../http-api-binding/http-api-binding.shared.schemas.js';
|
|
16
|
+
import { ResourceOperationIdempotencyKeyRequirement } from '../../requests/idempotency-key.shared.js';
|
|
17
|
+
import { CoreResourceOperation } from '../resources.shared.core.definitions.js';
|
|
18
|
+
import { ResourceOperation_ServiceRuntimeMode } from '../resources.shared.schemas.js';
|
|
19
|
+
/**
|
|
20
|
+
* The core operation each opened verb reaches, and the only three a read-through resource may write
|
|
21
|
+
* through. Total over {@link HttpApiWriteVerb}, so a fourth verb is a compile error here until
|
|
22
|
+
* somebody decides which operation it is.
|
|
23
|
+
*/
|
|
24
|
+
export const HTTP_API_WRITE_VERB_CORE_OPERATION = Object.freeze({
|
|
25
|
+
[HttpApiWriteVerb.CREATE]: CoreResourceOperation.CREATE,
|
|
26
|
+
[HttpApiWriteVerb.UPDATE]: CoreResourceOperation.UPDATE,
|
|
27
|
+
[HttpApiWriteVerb.DELETE]: CoreResourceOperation.DELETE,
|
|
28
|
+
});
|
|
29
|
+
/**
|
|
30
|
+
* The write verb a core operation IS on a read-through resource, or `undefined` for a read.
|
|
31
|
+
*
|
|
32
|
+
* The one mapping both the authoring check and the repository's dispatch read, so the two cannot
|
|
33
|
+
* disagree about whether an operation is a write.
|
|
34
|
+
*/
|
|
35
|
+
export function resolveHttpApiWriteVerb(coreOperation) {
|
|
36
|
+
for (const [verb, operation] of Object.entries(HTTP_API_WRITE_VERB_CORE_OPERATION)) {
|
|
37
|
+
if (operation === coreOperation)
|
|
38
|
+
return verb;
|
|
39
|
+
}
|
|
40
|
+
return undefined;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The BULK write operations, refused on a read-through resource whatever the binding opens.
|
|
44
|
+
*
|
|
45
|
+
* A bulk write against a system the platform does not own is N remote calls with no atomicity: any
|
|
46
|
+
* of them can fail after the earlier ones landed, and there is no transaction to roll back into. The
|
|
47
|
+
* engine opens single-row writes only, which is what an author can reason about one row at a time.
|
|
48
|
+
*/
|
|
49
|
+
const BULK_WRITE_OPERATIONS = new Set([
|
|
50
|
+
CoreResourceOperation.CREATE_MANY,
|
|
51
|
+
CoreResourceOperation.UPDATE_MANY,
|
|
52
|
+
CoreResourceOperation.DELETE_MANY,
|
|
53
|
+
]);
|
|
54
|
+
/**
|
|
55
|
+
* Reduce the authored operation declarations to {@link HttpApiWriteOperationFacts}.
|
|
56
|
+
*
|
|
57
|
+
* Enumerated by EFFECTIVE semantics, the way the pipeline's CLOSED-population rule enumerates
|
|
58
|
+
* creates: a core operation is its own semantics, a custom one borrows them per variant through
|
|
59
|
+
* `resourceOperationLike`, and both sources are unioned because neither sees the other's members.
|
|
60
|
+
* A custom operation that borrows UPDATE is exactly how an author would write a remote "confirm"
|
|
61
|
+
* without thinking of it as a write — so it is a write here too.
|
|
62
|
+
*/
|
|
63
|
+
export function collectHttpApiWriteOperationFacts(coreOperations, operationsConfiguration) {
|
|
64
|
+
const facts = new Map();
|
|
65
|
+
for (const operation of coreOperations) {
|
|
66
|
+
facts.set(String(operation), { operationKey: String(operation), effectiveOperations: [operation], variants: [] });
|
|
67
|
+
}
|
|
68
|
+
for (const [operationKey, operationConfig] of Object.entries(operationsConfiguration ?? {})) {
|
|
69
|
+
const config = (operationConfig ?? {});
|
|
70
|
+
const variants = config.variants ?? [];
|
|
71
|
+
const isCore = coreOperations.includes(operationKey);
|
|
72
|
+
facts.set(operationKey, {
|
|
73
|
+
operationKey,
|
|
74
|
+
effectiveOperations: variants.length > 0 && !isCore
|
|
75
|
+
? variants.map((variant) => variant.resourceOperationLike ?? operationKey)
|
|
76
|
+
: [operationKey],
|
|
77
|
+
variants,
|
|
78
|
+
serviceRuntimeMode: config.serviceRuntimeMode,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return [...facts.values()];
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The `Idempotency-Key` requirement a variant of a read-through WRITE carries — always REQUIRED.
|
|
85
|
+
*
|
|
86
|
+
* DERIVED rather than demanded from the author, because it has one legal value: a remote write cannot
|
|
87
|
+
* be rolled back, so a retry after a lost response must replay the first outcome instead of writing a
|
|
88
|
+
* second time, and only a required key makes every retry replayable. Asking an author to type the one
|
|
89
|
+
* answer the mechanism already knows is a question nobody should be asked (`derive-before-you-ask`).
|
|
90
|
+
* `ACCEPTED` is refused by {@link assertHttpApiWriteDeclarationCoherence}, never silently upgraded.
|
|
91
|
+
*
|
|
92
|
+
* The AUTHORED value comes first so the factory's forwarding line still reads
|
|
93
|
+
* `idempotencyKey: resolveHttpApiWriteIdempotencyKeyRequirement(variantParams.idempotencyKey, …)`, the shape
|
|
94
|
+
* `operation-variant-field-forwarding.guard.test.ts` recognises as forwarding.
|
|
95
|
+
*/
|
|
96
|
+
export function resolveHttpApiWriteIdempotencyKeyRequirement(authored, isReadThroughWrite) {
|
|
97
|
+
if (!isReadThroughWrite)
|
|
98
|
+
return authored;
|
|
99
|
+
return ResourceOperationIdempotencyKeyRequirement.REQUIRED;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The operations the binding's declared actions name as their HTTP doors, keyed by operation.
|
|
103
|
+
*
|
|
104
|
+
* One operation runs one action: two actions naming the same door would make the operation's meaning depend on which
|
|
105
|
+
* one its implementation happens to hand to the executor, so it is refused here rather than decided there.
|
|
106
|
+
*/
|
|
107
|
+
function collectSystemOfRecordActionDoors(binding) {
|
|
108
|
+
const doors = new Map();
|
|
109
|
+
for (const [actionName, action] of Object.entries(binding.actions ?? {})) {
|
|
110
|
+
if (action.operation === undefined)
|
|
111
|
+
continue;
|
|
112
|
+
const existing = doors.get(action.operation);
|
|
113
|
+
if (existing !== undefined) {
|
|
114
|
+
throw new Error(`operation '${action.operation}' is named as the door of two actions, '${existing.actionName}' and '${actionName}'. `
|
|
115
|
+
+ 'One operation runs one action; declare a second operation for the second action.');
|
|
116
|
+
}
|
|
117
|
+
doors.set(action.operation, { actionName, writes: action.writes });
|
|
118
|
+
}
|
|
119
|
+
return doors;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Hold an action's HTTP door to the ACTION's rules instead of the row-write rules (#1678 review, F1).
|
|
123
|
+
*
|
|
124
|
+
* A door does not write a row of the bound entity: its implementation hands the request to the system-of-record action
|
|
125
|
+
* executor, which authorizes, confines, sends and audits the action. So `writableVerbs` does not open it, and it opens
|
|
126
|
+
* nothing. What it must still be is honest about the effect it has:
|
|
127
|
+
*
|
|
128
|
+
* - a WRITING action changes remote state that cannot be rolled back, so every variant borrows a SINGLE-ROW mutation verb
|
|
129
|
+
* (never a read: a read-shaped route is a GET and claims its repeat is harmless, and the boot validator refuses a key on
|
|
130
|
+
* one), requires the `Idempotency-Key` (the executor refuses a writing action without one, so anything less is a door
|
|
131
|
+
* that always refuses), and runs INLINE (a queued execution cannot carry the key);
|
|
132
|
+
* - a NON-writing action (a vendor computation) is left to the ordinary rules for the verb it borrows.
|
|
133
|
+
*
|
|
134
|
+
* Never a bulk borrow: one request is one action on one target.
|
|
135
|
+
*/
|
|
136
|
+
function assertSystemOfRecordActionDoorCoherence(operation, door) {
|
|
137
|
+
const bulk = operation.effectiveOperations.find((effective) => BULK_WRITE_OPERATIONS.has(effective));
|
|
138
|
+
if (bulk !== undefined) {
|
|
139
|
+
throw new Error(`operation '${operation.operationKey}' is the door of action '${door.actionName}' and borrows a bulk verb ('${String(bulk)}'). `
|
|
140
|
+
+ 'One request runs one action on one target; borrow a single-row verb.');
|
|
141
|
+
}
|
|
142
|
+
if (!door.writes)
|
|
143
|
+
return;
|
|
144
|
+
const readBorrow = operation.effectiveOperations.find((effective) => resolveHttpApiWriteVerb(effective) === undefined);
|
|
145
|
+
if (readBorrow !== undefined) {
|
|
146
|
+
throw new Error(`operation '${operation.operationKey}' is the door of action '${door.actionName}', which writes, and borrows '${String(readBorrow)}', `
|
|
147
|
+
+ 'which is not a mutation. A state-changing route must not be read-shaped: it would be a GET, and a required Idempotency-Key '
|
|
148
|
+
+ 'on a read is refused at boot. Borrow update (an action on one record) or create (an action that makes one) in resourceOperationLike.');
|
|
149
|
+
}
|
|
150
|
+
const unkeyed = operation.variants.find((variant) => variant.idempotencyKey !== ResourceOperationIdempotencyKeyRequirement.REQUIRED);
|
|
151
|
+
if (unkeyed !== undefined) {
|
|
152
|
+
throw new Error(`operation '${operation.operationKey}' is the door of action '${door.actionName}', which writes, and does not require an `
|
|
153
|
+
+ 'Idempotency-Key on every variant. The executor refuses a writing action without one, so the route would refuse every request; '
|
|
154
|
+
+ `declare idempotencyKey: '${ResourceOperationIdempotencyKeyRequirement.REQUIRED}'.`);
|
|
155
|
+
}
|
|
156
|
+
if (operation.serviceRuntimeMode !== undefined
|
|
157
|
+
&& operation.serviceRuntimeMode !== ResourceOperation_ServiceRuntimeMode.INLINE) {
|
|
158
|
+
throw new Error(`operation '${operation.operationKey}' is the door of action '${door.actionName}' and runs '${operation.serviceRuntimeMode}'. `
|
|
159
|
+
+ 'A writing action runs INLINE: a queued or background execution cannot carry its Idempotency-Key. Remove serviceRuntimeMode.');
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Refuse every write declaration on a read-through resource that the engine could not honour.
|
|
164
|
+
*
|
|
165
|
+
* Throws a plain `Error` naming the rule and the fix; the factory wraps it into its own configuration
|
|
166
|
+
* error with the resource identifier in front.
|
|
167
|
+
*
|
|
168
|
+
* The rules, and why each one exists:
|
|
169
|
+
*
|
|
170
|
+
* 1. **No bulk write operation**, opened or not — see {@link BULK_WRITE_OPERATIONS}. Nor a
|
|
171
|
+
* `haveBulkOperation` twin of a write, which every tier would run as N single-row writes.
|
|
172
|
+
* 2. **Every write operation's verb is OPENED by the binding**, and **every opened verb has an
|
|
173
|
+
* operation**. Both directions: the first is a route that would answer a refusal forever, the
|
|
174
|
+
* second a declared door nobody can reach — and an inert declaration that looks like a control is
|
|
175
|
+
* worse than none.
|
|
176
|
+
* 3. **Every write variant runs INLINE.** A queued or background execution cannot carry the
|
|
177
|
+
* `Idempotency-Key`, so a retried request could not replay; the service tier refuses a key on a
|
|
178
|
+
* non-INLINE operation already, and a key is required here.
|
|
179
|
+
* 4. **No write variant declares `Idempotency-Key: ACCEPTED`.** See
|
|
180
|
+
* {@link resolveHttpApiWriteIdempotencyKeyRequirement}.
|
|
181
|
+
* 5. *(Moved, #2010.)* The erasure-stance rule this list carried — a binding that WRITES personal-data fields
|
|
182
|
+
* may not declare `NO_SUBJECT_DATA` — is now `personalFieldsContradictingNoSubjectDataStance`, which the
|
|
183
|
+
* factory applies to EVERY read-through binding and every pipeline copy. Reading those fields out of a
|
|
184
|
+
* system that "holds no subject data" is the same contradiction as writing them into it.
|
|
185
|
+
* 6. **A `VERSION_CHECKED` binding's version field is one the UPDATE can carry and the CREATE cannot** (#1724). The
|
|
186
|
+
* field must exist on the schema, be admitted to the update payload (the caller sends the version it read), and be
|
|
187
|
+
* excluded from create (a new row has no version yet, and the vendor stamps it). It must be a STRING: the check
|
|
188
|
+
* compares the caller's value byte for byte with the vendor's raw one, and a date schema would coerce it on the way
|
|
189
|
+
* in and make every update stale. Whether it maps onto the vendor's `rowVersionField` needs the facet, and is
|
|
190
|
+
* checked at boot.
|
|
191
|
+
*/
|
|
192
|
+
export function assertHttpApiWriteDeclarationCoherence(params) {
|
|
193
|
+
const { binding, operations, mainSchema } = params;
|
|
194
|
+
const opened = new Set(binding.writableVerbs);
|
|
195
|
+
const reached = new Set();
|
|
196
|
+
const actionDoors = collectSystemOfRecordActionDoors(binding);
|
|
197
|
+
// Checked BEFORE the operations: a door named after a missing operation usually means the author mistyped it, and the
|
|
198
|
+
// operation they meant would otherwise be refused first as an unopened row write — a message about the wrong thing.
|
|
199
|
+
const declaredOperationKeys = new Set(operations.map((operation) => operation.operationKey));
|
|
200
|
+
for (const [operationKey, door] of actionDoors) {
|
|
201
|
+
if (!declaredOperationKeys.has(operationKey)) {
|
|
202
|
+
throw new Error(`actions.${door.actionName} names '${operationKey}' as its door, and this resource declares no such operation. `
|
|
203
|
+
+ 'Declare the custom operation, or remove the `operation` from the action.');
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
for (const operation of operations) {
|
|
207
|
+
const door = actionDoors.get(operation.operationKey);
|
|
208
|
+
if (door !== undefined) {
|
|
209
|
+
assertSystemOfRecordActionDoorCoherence(operation, door);
|
|
210
|
+
continue;
|
|
211
|
+
}
|
|
212
|
+
const bulk = operation.effectiveOperations.find((effective) => BULK_WRITE_OPERATIONS.has(effective));
|
|
213
|
+
if (bulk !== undefined) {
|
|
214
|
+
throw new Error(`operation '${operation.operationKey}' is a bulk write ('${String(bulk)}'), which a read-through resource never runs: `
|
|
215
|
+
+ 'N remote writes have no transaction to roll back into when one of them fails after the others landed. '
|
|
216
|
+
+ 'Declare the single-row create/update/delete instead.');
|
|
217
|
+
}
|
|
218
|
+
const verbs = operation.effectiveOperations
|
|
219
|
+
.map((effective) => resolveHttpApiWriteVerb(effective))
|
|
220
|
+
.filter((verb) => verb !== undefined);
|
|
221
|
+
if (verbs.length === 0)
|
|
222
|
+
continue;
|
|
223
|
+
for (const verb of verbs) {
|
|
224
|
+
if (!opened.has(verb)) {
|
|
225
|
+
throw new Error(`operation '${operation.operationKey}' writes ('${verb}'), and httpApiBinding.writableVerbs does not open '${verb}'. `
|
|
226
|
+
+ `Add '${verb}' to writableVerbs to open the write toward '${binding.system}', or remove the operation.`);
|
|
227
|
+
}
|
|
228
|
+
reached.add(verb);
|
|
229
|
+
}
|
|
230
|
+
if (operation.variants.some((variant) => variant.haveBulkOperation === true)) {
|
|
231
|
+
throw new Error(`operation '${operation.operationKey}' declares a bulk twin (haveBulkOperation), which a read-through resource never runs — `
|
|
232
|
+
+ 'one request would become N remote writes with no atomicity. Remove haveBulkOperation.');
|
|
233
|
+
}
|
|
234
|
+
if (operation.serviceRuntimeMode !== undefined
|
|
235
|
+
&& operation.serviceRuntimeMode !== ResourceOperation_ServiceRuntimeMode.INLINE) {
|
|
236
|
+
throw new Error(`operation '${operation.operationKey}' writes to '${binding.system}' with serviceRuntimeMode '${operation.serviceRuntimeMode}'. `
|
|
237
|
+
+ 'A remote write runs INLINE: its Idempotency-Key is required, and a queued or background execution cannot carry one, '
|
|
238
|
+
+ 'so a retried request could not replay its first outcome. Remove serviceRuntimeMode.');
|
|
239
|
+
}
|
|
240
|
+
const accepted = operation.variants.find((variant) => variant.idempotencyKey === ResourceOperationIdempotencyKeyRequirement.ACCEPTED);
|
|
241
|
+
if (accepted !== undefined) {
|
|
242
|
+
throw new Error(`operation '${operation.operationKey}' declares idempotencyKey 'accepted'. A write to a system of record cannot be rolled back, `
|
|
243
|
+
+ 'so every retry must replay the first outcome: the key is REQUIRED on every write variant, and the engine sets it for you. '
|
|
244
|
+
+ 'Remove the idempotencyKey declaration.');
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
for (const verb of opened) {
|
|
248
|
+
if (!reached.has(verb)) {
|
|
249
|
+
throw new Error(`httpApiBinding.writableVerbs opens '${verb}', and no operation of this resource performs it. An opened write nobody can `
|
|
250
|
+
+ `reach is a declaration that decides nothing; declare the ${HTTP_API_WRITE_VERB_CORE_OPERATION[verb]} operation, or remove the verb.`);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
if (binding.writeConcurrency?.mode === HttpApiWriteConcurrencyMode.VERSION_CHECKED && isZodObject(mainSchema)) {
|
|
254
|
+
const versionField = binding.writeConcurrency.versionField;
|
|
255
|
+
const fieldSchema = getZodObjectShape(mainSchema)[versionField];
|
|
256
|
+
if (fieldSchema === undefined) {
|
|
257
|
+
throw new Error(`httpApiBinding.writeConcurrency.versionField names '${versionField}', which this resource's schema does not declare. `
|
|
258
|
+
+ 'Declare the field (mapped to the vendor\'s row version, e.g. Odoo `write_date`) so a caller can read it and send it back.');
|
|
259
|
+
}
|
|
260
|
+
const unwrapped = unwrapSchema(fieldSchema);
|
|
261
|
+
if (unwrapped?._zod?.def?.type !== 'string') {
|
|
262
|
+
throw new Error(`httpApiBinding.writeConcurrency.versionField '${versionField}' must be a string schema: the version is compared byte for `
|
|
263
|
+
+ 'byte with what the vendor served (Odoo `write_date`, "YYYY-MM-DD HH:MM:SS"), and a date or number schema would re-format it.');
|
|
264
|
+
}
|
|
265
|
+
if (isExcludedFromUpdate(fieldSchema)) {
|
|
266
|
+
throw new Error(`httpApiBinding.writeConcurrency.versionField '${versionField}' is excluded from UPDATE, so no caller could send the version `
|
|
267
|
+
+ 'it read and every update would be refused. Remove .excludeFromUpdate() from it.');
|
|
268
|
+
}
|
|
269
|
+
if (opened.has(HttpApiWriteVerb.CREATE) && !isExcludedFromCreate(fieldSchema)) {
|
|
270
|
+
throw new Error(`httpApiBinding.writeConcurrency.versionField '${versionField}' may be sent on CREATE, and a new row has no version: the `
|
|
271
|
+
+ 'vendor stamps it. Declare it .excludeFromCreate().');
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
//# sourceMappingURL=http-api-write-declaration.shared.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-api-write-declaration.shared.utils.js","sourceRoot":"","sources":["../../../../../src/resources/utils/http-api-write-declaration.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEpI,OAAO,EACL,2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CAAC;IACH,CAAC;IAED,IAAI,OAAO,CAAC,gBAAgB,EAAE,IAAI,KAAK,2BAA2B,CAAC,eAAe,IAAI,WAAW,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9G,MAAM,YAAY,GAAG,OAAO,CAAC,gBAAgB,CAAC,YAAY,CAAC;QAC3D,MAAM,WAAW,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAC,YAAY,CAA6B,CAAC;QAC5F,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CACb,uDAAuD,YAAY,oDAAoD;kBACrH,2HAA2H,CAC9H,CAAC;QACJ,CAAC;QACD,MAAM,SAAS,GAAG,YAAY,CAAC,WAAoB,CAA4C,CAAC;QAChG,IAAI,SAAS,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC5C,MAAM,IAAI,KAAK,CACb,iDAAiD,YAAY,8DAA8D;kBACzH,8HAA8H,CACjI,CAAC;QACJ,CAAC;QACD,IAAI,oBAAoB,CAAC,WAAW,CAAC,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CACb,iDAAiD,YAAY,iEAAiE;kBAC5H,iFAAiF,CACpF,CAAC;QACJ,CAAC;QACD,IAAI,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,WAAW,CAAC,EAAE,CAAC;YAC9E,MAAM,IAAI,KAAK,CACb,iDAAiD,YAAY,6DAA6D;kBACxH,oDAAoD,CACvD,CAAC;QACJ,CAAC;IACH,CAAC;AAEH,CAAC","sourcesContent":["/**\n * The authoring contract of a WRITABLE read-through resource (#1679) — what a resource must declare\n * before the engine will send a create, update or delete to a system of record it does not own.\n *\n * Checked in the resource FACTORY, at authoring, because every rule here is decidable from the one\n * file an author is writing: the binding, the operation list and the schema. What is NOT decidable\n * here — the instance's partition field, whether the dialect implements writes — needs the saas\n * configuration and the engine's dialect registry, so it is checked at boot registration instead.\n *\n * Every refusal names the fix. A write door into somebody else's ERP is the declaration where a\n * silently-accepted mistake costs the most, because the mistake is made against data the platform\n * cannot restore.\n */\n\nimport type { z } from 'zod';\nimport { getZodObjectShape, isExcludedFromCreate, isExcludedFromUpdate, isZodObject, unwrapSchema } from '@wildo-ai/zod-decorators';\n\nimport {\n HttpApiWriteConcurrencyMode,\n HttpApiWriteVerb,\n type HttpApiResourceBinding,\n} from '../../http-api-binding/http-api-binding.shared.schemas';\nimport { ResourceOperationIdempotencyKeyRequirement } from '../../requests/idempotency-key.shared';\nimport { CoreResourceOperation } from '../resources.shared.core.definitions';\nimport { ResourceOperation_ServiceRuntimeMode } from '../resources.shared.schemas';\n\n/**\n * The core operation each opened verb reaches, and the only three a read-through resource may write\n * through. Total over {@link HttpApiWriteVerb}, so a fourth verb is a compile error here until\n * somebody decides which operation it is.\n */\nexport const HTTP_API_WRITE_VERB_CORE_OPERATION: Readonly<Record<HttpApiWriteVerb, CoreResourceOperation>> = Object.freeze({\n [HttpApiWriteVerb.CREATE]: CoreResourceOperation.CREATE,\n [HttpApiWriteVerb.UPDATE]: CoreResourceOperation.UPDATE,\n [HttpApiWriteVerb.DELETE]: CoreResourceOperation.DELETE,\n});\n\n/**\n * The write verb a core operation IS on a read-through resource, or `undefined` for a read.\n *\n * The one mapping both the authoring check and the repository's dispatch read, so the two cannot\n * disagree about whether an operation is a write.\n */\nexport function resolveHttpApiWriteVerb(coreOperation: unknown): HttpApiWriteVerb | undefined {\n for (const [verb, operation] of Object.entries(HTTP_API_WRITE_VERB_CORE_OPERATION) as Array<[HttpApiWriteVerb, CoreResourceOperation]>) {\n if (operation === coreOperation) return verb;\n }\n return undefined;\n}\n\n/**\n * The BULK write operations, refused on a read-through resource whatever the binding opens.\n *\n * A bulk write against a system the platform does not own is N remote calls with no atomicity: any\n * of them can fail after the earlier ones landed, and there is no transaction to roll back into. The\n * engine opens single-row writes only, which is what an author can reason about one row at a time.\n */\nconst BULK_WRITE_OPERATIONS: ReadonlySet<unknown> = new Set<unknown>([\n CoreResourceOperation.CREATE_MANY,\n CoreResourceOperation.UPDATE_MANY,\n CoreResourceOperation.DELETE_MANY,\n]);\n\n/** What the factory knows about ONE declared operation, reduced to what these rules read. */\ninterface HttpApiWriteOperationFacts {\n readonly operationKey: string;\n /** The core semantics of each variant: the operation itself for a core one, `resourceOperationLike` for a custom one. */\n readonly effectiveOperations: readonly unknown[];\n readonly variants: ReadonlyArray<{\n readonly idempotencyKey?: ResourceOperationIdempotencyKeyRequirement;\n readonly haveBulkOperation?: boolean;\n }>;\n readonly serviceRuntimeMode?: ResourceOperation_ServiceRuntimeMode;\n}\n\n/**\n * Reduce the authored operation declarations to {@link HttpApiWriteOperationFacts}.\n *\n * Enumerated by EFFECTIVE semantics, the way the pipeline's CLOSED-population rule enumerates\n * creates: a core operation is its own semantics, a custom one borrows them per variant through\n * `resourceOperationLike`, and both sources are unioned because neither sees the other's members.\n * A custom operation that borrows UPDATE is exactly how an author would write a remote \"confirm\"\n * without thinking of it as a write — so it is a write here too.\n */\nexport function collectHttpApiWriteOperationFacts(\n coreOperations: readonly unknown[],\n operationsConfiguration: Readonly<Record<string, unknown>> | undefined,\n): HttpApiWriteOperationFacts[] {\n const facts = new Map<string, HttpApiWriteOperationFacts>();\n for (const operation of coreOperations) {\n facts.set(String(operation), { operationKey: String(operation), effectiveOperations: [operation], variants: [] });\n }\n for (const [operationKey, operationConfig] of Object.entries(operationsConfiguration ?? {})) {\n const config = (operationConfig ?? {}) as {\n variants?: Array<{ resourceOperationLike?: unknown; idempotencyKey?: ResourceOperationIdempotencyKeyRequirement; haveBulkOperation?: boolean }>;\n serviceRuntimeMode?: ResourceOperation_ServiceRuntimeMode;\n };\n const variants = config.variants ?? [];\n const isCore = coreOperations.includes(operationKey);\n facts.set(operationKey, {\n operationKey,\n effectiveOperations: variants.length > 0 && !isCore\n ? variants.map((variant) => variant.resourceOperationLike ?? operationKey)\n : [operationKey],\n variants,\n serviceRuntimeMode: config.serviceRuntimeMode,\n });\n }\n return [...facts.values()];\n}\n\n/**\n * The `Idempotency-Key` requirement a variant of a read-through WRITE carries — always REQUIRED.\n *\n * DERIVED rather than demanded from the author, because it has one legal value: a remote write cannot\n * be rolled back, so a retry after a lost response must replay the first outcome instead of writing a\n * second time, and only a required key makes every retry replayable. Asking an author to type the one\n * answer the mechanism already knows is a question nobody should be asked (`derive-before-you-ask`).\n * `ACCEPTED` is refused by {@link assertHttpApiWriteDeclarationCoherence}, never silently upgraded.\n *\n * The AUTHORED value comes first so the factory's forwarding line still reads\n * `idempotencyKey: resolveHttpApiWriteIdempotencyKeyRequirement(variantParams.idempotencyKey, …)`, the shape\n * `operation-variant-field-forwarding.guard.test.ts` recognises as forwarding.\n */\nexport function resolveHttpApiWriteIdempotencyKeyRequirement(\n authored: ResourceOperationIdempotencyKeyRequirement | undefined,\n isReadThroughWrite: boolean,\n): ResourceOperationIdempotencyKeyRequirement | undefined {\n if (!isReadThroughWrite) return authored;\n return ResourceOperationIdempotencyKeyRequirement.REQUIRED;\n}\n\n/** A resource operation a declared system-of-record action names as its HTTP door (`actions.<name>.operation`). */\ninterface SystemOfRecordActionDoor {\n readonly actionName: string;\n readonly writes: boolean;\n}\n\n/**\n * The operations the binding's declared actions name as their HTTP doors, keyed by operation.\n *\n * One operation runs one action: two actions naming the same door would make the operation's meaning depend on which\n * one its implementation happens to hand to the executor, so it is refused here rather than decided there.\n */\nfunction collectSystemOfRecordActionDoors(binding: HttpApiResourceBinding): ReadonlyMap<string, SystemOfRecordActionDoor> {\n const doors = new Map<string, SystemOfRecordActionDoor>();\n for (const [actionName, action] of Object.entries(binding.actions ?? {})) {\n if (action.operation === undefined) continue;\n const existing = doors.get(action.operation);\n if (existing !== undefined) {\n throw new Error(\n `operation '${action.operation}' is named as the door of two actions, '${existing.actionName}' and '${actionName}'. `\n + 'One operation runs one action; declare a second operation for the second action.',\n );\n }\n doors.set(action.operation, { actionName, writes: action.writes });\n }\n return doors;\n}\n\n/**\n * Hold an action's HTTP door to the ACTION's rules instead of the row-write rules (#1678 review, F1).\n *\n * A door does not write a row of the bound entity: its implementation hands the request to the system-of-record action\n * executor, which authorizes, confines, sends and audits the action. So `writableVerbs` does not open it, and it opens\n * nothing. What it must still be is honest about the effect it has:\n *\n * - a WRITING action changes remote state that cannot be rolled back, so every variant borrows a SINGLE-ROW mutation verb\n * (never a read: a read-shaped route is a GET and claims its repeat is harmless, and the boot validator refuses a key on\n * one), requires the `Idempotency-Key` (the executor refuses a writing action without one, so anything less is a door\n * that always refuses), and runs INLINE (a queued execution cannot carry the key);\n * - a NON-writing action (a vendor computation) is left to the ordinary rules for the verb it borrows.\n *\n * Never a bulk borrow: one request is one action on one target.\n */\nfunction assertSystemOfRecordActionDoorCoherence(operation: HttpApiWriteOperationFacts, door: SystemOfRecordActionDoor): void {\n const bulk = operation.effectiveOperations.find((effective) => BULK_WRITE_OPERATIONS.has(effective));\n if (bulk !== undefined) {\n throw new Error(\n `operation '${operation.operationKey}' is the door of action '${door.actionName}' and borrows a bulk verb ('${String(bulk)}'). `\n + 'One request runs one action on one target; borrow a single-row verb.',\n );\n }\n if (!door.writes) return;\n const readBorrow = operation.effectiveOperations.find((effective) => resolveHttpApiWriteVerb(effective) === undefined);\n if (readBorrow !== undefined) {\n throw new Error(\n `operation '${operation.operationKey}' is the door of action '${door.actionName}', which writes, and borrows '${String(readBorrow)}', `\n + 'which is not a mutation. A state-changing route must not be read-shaped: it would be a GET, and a required Idempotency-Key '\n + 'on a read is refused at boot. Borrow update (an action on one record) or create (an action that makes one) in resourceOperationLike.',\n );\n }\n const unkeyed = operation.variants.find((variant) => variant.idempotencyKey !== ResourceOperationIdempotencyKeyRequirement.REQUIRED);\n if (unkeyed !== undefined) {\n throw new Error(\n `operation '${operation.operationKey}' is the door of action '${door.actionName}', which writes, and does not require an `\n + 'Idempotency-Key on every variant. The executor refuses a writing action without one, so the route would refuse every request; '\n + `declare idempotencyKey: '${ResourceOperationIdempotencyKeyRequirement.REQUIRED}'.`,\n );\n }\n if (\n operation.serviceRuntimeMode !== undefined\n && operation.serviceRuntimeMode !== ResourceOperation_ServiceRuntimeMode.INLINE\n ) {\n throw new Error(\n `operation '${operation.operationKey}' is the door of action '${door.actionName}' and runs '${operation.serviceRuntimeMode}'. `\n + 'A writing action runs INLINE: a queued or background execution cannot carry its Idempotency-Key. Remove serviceRuntimeMode.',\n );\n }\n}\n\n/**\n * Refuse every write declaration on a read-through resource that the engine could not honour.\n *\n * Throws a plain `Error` naming the rule and the fix; the factory wraps it into its own configuration\n * error with the resource identifier in front.\n *\n * The rules, and why each one exists:\n *\n * 1. **No bulk write operation**, opened or not — see {@link BULK_WRITE_OPERATIONS}. Nor a\n * `haveBulkOperation` twin of a write, which every tier would run as N single-row writes.\n * 2. **Every write operation's verb is OPENED by the binding**, and **every opened verb has an\n * operation**. Both directions: the first is a route that would answer a refusal forever, the\n * second a declared door nobody can reach — and an inert declaration that looks like a control is\n * worse than none.\n * 3. **Every write variant runs INLINE.** A queued or background execution cannot carry the\n * `Idempotency-Key`, so a retried request could not replay; the service tier refuses a key on a\n * non-INLINE operation already, and a key is required here.\n * 4. **No write variant declares `Idempotency-Key: ACCEPTED`.** See\n * {@link resolveHttpApiWriteIdempotencyKeyRequirement}.\n * 5. *(Moved, #2010.)* The erasure-stance rule this list carried — a binding that WRITES personal-data fields\n * may not declare `NO_SUBJECT_DATA` — is now `personalFieldsContradictingNoSubjectDataStance`, which the\n * factory applies to EVERY read-through binding and every pipeline copy. Reading those fields out of a\n * system that \"holds no subject data\" is the same contradiction as writing them into it.\n * 6. **A `VERSION_CHECKED` binding's version field is one the UPDATE can carry and the CREATE cannot** (#1724). The\n * field must exist on the schema, be admitted to the update payload (the caller sends the version it read), and be\n * excluded from create (a new row has no version yet, and the vendor stamps it). It must be a STRING: the check\n * compares the caller's value byte for byte with the vendor's raw one, and a date schema would coerce it on the way\n * in and make every update stale. Whether it maps onto the vendor's `rowVersionField` needs the facet, and is\n * checked at boot.\n */\nexport function assertHttpApiWriteDeclarationCoherence(params: {\n readonly binding: HttpApiResourceBinding;\n readonly operations: readonly HttpApiWriteOperationFacts[];\n readonly mainSchema: z.ZodTypeAny;\n}): void {\n const { binding, operations, mainSchema } = params;\n const opened = new Set<HttpApiWriteVerb>(binding.writableVerbs);\n const reached = new Set<HttpApiWriteVerb>();\n const actionDoors = collectSystemOfRecordActionDoors(binding);\n // Checked BEFORE the operations: a door named after a missing operation usually means the author mistyped it, and the\n // operation they meant would otherwise be refused first as an unopened row write — a message about the wrong thing.\n const declaredOperationKeys = new Set(operations.map((operation) => operation.operationKey));\n for (const [operationKey, door] of actionDoors) {\n if (!declaredOperationKeys.has(operationKey)) {\n throw new Error(\n `actions.${door.actionName} names '${operationKey}' as its door, and this resource declares no such operation. `\n + 'Declare the custom operation, or remove the `operation` from the action.',\n );\n }\n }\n\n for (const operation of operations) {\n const door = actionDoors.get(operation.operationKey);\n if (door !== undefined) {\n assertSystemOfRecordActionDoorCoherence(operation, door);\n continue;\n }\n const bulk = operation.effectiveOperations.find((effective) => BULK_WRITE_OPERATIONS.has(effective));\n if (bulk !== undefined) {\n throw new Error(\n `operation '${operation.operationKey}' is a bulk write ('${String(bulk)}'), which a read-through resource never runs: `\n + 'N remote writes have no transaction to roll back into when one of them fails after the others landed. '\n + 'Declare the single-row create/update/delete instead.',\n );\n }\n const verbs = operation.effectiveOperations\n .map((effective) => resolveHttpApiWriteVerb(effective))\n .filter((verb): verb is HttpApiWriteVerb => verb !== undefined);\n if (verbs.length === 0) continue;\n\n for (const verb of verbs) {\n if (!opened.has(verb)) {\n throw new Error(\n `operation '${operation.operationKey}' writes ('${verb}'), and httpApiBinding.writableVerbs does not open '${verb}'. `\n + `Add '${verb}' to writableVerbs to open the write toward '${binding.system}', or remove the operation.`,\n );\n }\n reached.add(verb);\n }\n if (operation.variants.some((variant) => variant.haveBulkOperation === true)) {\n throw new Error(\n `operation '${operation.operationKey}' declares a bulk twin (haveBulkOperation), which a read-through resource never runs — `\n + 'one request would become N remote writes with no atomicity. Remove haveBulkOperation.',\n );\n }\n if (\n operation.serviceRuntimeMode !== undefined\n && operation.serviceRuntimeMode !== ResourceOperation_ServiceRuntimeMode.INLINE\n ) {\n throw new Error(\n `operation '${operation.operationKey}' writes to '${binding.system}' with serviceRuntimeMode '${operation.serviceRuntimeMode}'. `\n + 'A remote write runs INLINE: its Idempotency-Key is required, and a queued or background execution cannot carry one, '\n + 'so a retried request could not replay its first outcome. Remove serviceRuntimeMode.',\n );\n }\n const accepted = operation.variants.find((variant) => variant.idempotencyKey === ResourceOperationIdempotencyKeyRequirement.ACCEPTED);\n if (accepted !== undefined) {\n throw new Error(\n `operation '${operation.operationKey}' declares idempotencyKey 'accepted'. A write to a system of record cannot be rolled back, `\n + 'so every retry must replay the first outcome: the key is REQUIRED on every write variant, and the engine sets it for you. '\n + 'Remove the idempotencyKey declaration.',\n );\n }\n }\n\n for (const verb of opened) {\n if (!reached.has(verb)) {\n throw new Error(\n `httpApiBinding.writableVerbs opens '${verb}', and no operation of this resource performs it. An opened write nobody can `\n + `reach is a declaration that decides nothing; declare the ${HTTP_API_WRITE_VERB_CORE_OPERATION[verb]} operation, or remove the verb.`,\n );\n }\n }\n\n if (binding.writeConcurrency?.mode === HttpApiWriteConcurrencyMode.VERSION_CHECKED && isZodObject(mainSchema)) {\n const versionField = binding.writeConcurrency.versionField;\n const fieldSchema = getZodObjectShape(mainSchema)[versionField] as z.ZodTypeAny | undefined;\n if (fieldSchema === undefined) {\n throw new Error(\n `httpApiBinding.writeConcurrency.versionField names '${versionField}', which this resource's schema does not declare. `\n + 'Declare the field (mapped to the vendor\\'s row version, e.g. Odoo `write_date`) so a caller can read it and send it back.',\n );\n }\n const unwrapped = unwrapSchema(fieldSchema as never) as { _zod?: { def?: { type?: unknown } } };\n if (unwrapped?._zod?.def?.type !== 'string') {\n throw new Error(\n `httpApiBinding.writeConcurrency.versionField '${versionField}' must be a string schema: the version is compared byte for `\n + 'byte with what the vendor served (Odoo `write_date`, \"YYYY-MM-DD HH:MM:SS\"), and a date or number schema would re-format it.',\n );\n }\n if (isExcludedFromUpdate(fieldSchema)) {\n throw new Error(\n `httpApiBinding.writeConcurrency.versionField '${versionField}' is excluded from UPDATE, so no caller could send the version `\n + 'it read and every update would be refused. Remove .excludeFromUpdate() from it.',\n );\n }\n if (opened.has(HttpApiWriteVerb.CREATE) && !isExcludedFromCreate(fieldSchema)) {\n throw new Error(\n `httpApiBinding.writeConcurrency.versionField '${versionField}' may be sent on CREATE, and a new row has no version: the `\n + 'vendor stamps it. Declare it .excludeFromCreate().',\n );\n }\n }\n\n}\n"]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `NO_SUBJECT_DATA` against the personal data a resource declares it gets from the system (#2010).
|
|
3
|
+
*
|
|
4
|
+
* `HttpApiErasureStance.NO_SUBJECT_DATA` says the remote rows hold no data about a person, which is why a
|
|
5
|
+
* subject erasure reports `DECLARED_NO_SUBJECT_DATA` for them and reaches nothing. A resource that declares
|
|
6
|
+
* personal-data categories (`.dataCategories()`) on the fields it takes FROM that system says the opposite about
|
|
7
|
+
* the same rows. Both cannot be true, and the stance is the half that erasure acts on, so the contradiction is
|
|
8
|
+
* refused where it is authored, in the resource factory.
|
|
9
|
+
*
|
|
10
|
+
* Which fields come from the system depends on the lane:
|
|
11
|
+
* - a READ-THROUGH binding keeps the rows in the system of record, so every field of the resource is the remote
|
|
12
|
+
* row's, except the tenant anchors the engine stamps (`HTTP_API_ENGINE_INJECTED_FIELDS`). Whether the resource
|
|
13
|
+
* also WRITES does not matter: the rows hold the data either way;
|
|
14
|
+
* - a PIPELINE copies only its mapped fields. A field no mapping writes is the application's own, and a `CONSTANT`
|
|
15
|
+
* entry reads nothing from the source. These are the same fields the privacy notice's source statement counts
|
|
16
|
+
* (`systemOfRecordFlowsOfResource`), so the refusal and the notice cannot disagree about what came from where.
|
|
17
|
+
*
|
|
18
|
+
* Replaces the narrower write-only rule that `assertHttpApiWriteDeclarationCoherence` carried (#1679 rule 5), which
|
|
19
|
+
* asked only whether a binding WRITES personal fields. Reading them is the same contradiction, and a pipeline copy
|
|
20
|
+
* of them was not checked at all. Wonder Todos' `externalCustomers` held both declarations for twelve days.
|
|
21
|
+
*
|
|
22
|
+
* Fixing a refusal is a question of fact, never of preference:
|
|
23
|
+
* - if the fields really are about a person, the rows hold subject data: declare the stance that says so
|
|
24
|
+
* (`EXTERNAL_ERASURE_OPERATION`, or `CONTROLLER_ACKNOWLEDGED_NON_ERASURE`);
|
|
25
|
+
* - if they are not (a company's name and its contact details are data about a legal person, outside personal
|
|
26
|
+
* data), remove the categories.
|
|
27
|
+
*
|
|
28
|
+
* spec-cite: GDPR Recital 14, https://gdpr-info.eu/recitals/no-14/ — "This Regulation does not cover the processing
|
|
29
|
+
* of personal data which concerns legal persons and in particular undertakings established as legal persons,
|
|
30
|
+
* including the name and the form of the legal person and the contact details of the legal person."
|
|
31
|
+
*/
|
|
32
|
+
import type { z } from 'zod';
|
|
33
|
+
import { HttpApiErasureStance } from '../../http-api-binding/http-api-erasure-stance.shared';
|
|
34
|
+
/**
|
|
35
|
+
* The fields that declare personal-data categories while the binding they come from declares `NO_SUBJECT_DATA`,
|
|
36
|
+
* sorted. Empty for any other stance, and for a schema that is not an object.
|
|
37
|
+
*
|
|
38
|
+
* `sourcedFields` is the set of fields that come from the system: omit it for a read-through binding (every field
|
|
39
|
+
* but the engine-stamped anchors), pass the pipeline's mapped non-constant local fields for a copy.
|
|
40
|
+
*/
|
|
41
|
+
export declare function personalFieldsContradictingNoSubjectDataStance(params: {
|
|
42
|
+
readonly stance: HttpApiErasureStance;
|
|
43
|
+
readonly mainSchema: z.ZodTypeAny;
|
|
44
|
+
readonly sourcedFields?: ReadonlySet<string>;
|
|
45
|
+
}): readonly string[];
|
|
46
|
+
/** The refusal's text, shared by both lanes so the remedy reads the same wherever it fires. */
|
|
47
|
+
export declare function describeNoSubjectDataStanceContradiction(params: {
|
|
48
|
+
readonly system: string;
|
|
49
|
+
readonly personalFields: readonly string[];
|
|
50
|
+
}): string;
|
|
51
|
+
//# sourceMappingURL=no-subject-data-stance-coherence.shared.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-subject-data-stance-coherence.shared.utils.d.ts","sourceRoot":"","sources":["../../../../../src/resources/utils/no-subject-data-stance-coherence.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAG7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,uDAAuD,CAAC;AAG7F;;;;;;GAMG;AACH,wBAAgB,8CAA8C,CAAC,MAAM,EAAE;IACrE,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACtC,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC;IAClC,QAAQ,CAAC,aAAa,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC9C,GAAG,SAAS,MAAM,EAAE,CAOpB;AAED,+FAA+F;AAC/F,wBAAgB,wCAAwC,CAAC,MAAM,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAAG,MAAM,CAMhJ"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { getDataCategories, getZodObjectShape, isZodObject } from '@wildo-ai/zod-decorators';
|
|
2
|
+
import { HttpApiErasureStance } from '../../http-api-binding/http-api-erasure-stance.shared.js';
|
|
3
|
+
import { HTTP_API_ENGINE_INJECTED_FIELDS } from '../../http-api-binding/read-through-engine-anchors.shared.js';
|
|
4
|
+
/**
|
|
5
|
+
* The fields that declare personal-data categories while the binding they come from declares `NO_SUBJECT_DATA`,
|
|
6
|
+
* sorted. Empty for any other stance, and for a schema that is not an object.
|
|
7
|
+
*
|
|
8
|
+
* `sourcedFields` is the set of fields that come from the system: omit it for a read-through binding (every field
|
|
9
|
+
* but the engine-stamped anchors), pass the pipeline's mapped non-constant local fields for a copy.
|
|
10
|
+
*/
|
|
11
|
+
export function personalFieldsContradictingNoSubjectDataStance(params) {
|
|
12
|
+
if (params.stance !== HttpApiErasureStance.NO_SUBJECT_DATA || !isZodObject(params.mainSchema))
|
|
13
|
+
return [];
|
|
14
|
+
return Object.entries(getZodObjectShape(params.mainSchema))
|
|
15
|
+
.filter(([fieldName]) => (params.sourcedFields === undefined ? !HTTP_API_ENGINE_INJECTED_FIELDS.includes(fieldName) : params.sourcedFields.has(fieldName)))
|
|
16
|
+
.filter(([, fieldSchema]) => getDataCategories(fieldSchema) !== undefined)
|
|
17
|
+
.map(([fieldName]) => fieldName)
|
|
18
|
+
.sort();
|
|
19
|
+
}
|
|
20
|
+
/** The refusal's text, shared by both lanes so the remedy reads the same wherever it fires. */
|
|
21
|
+
export function describeNoSubjectDataStanceContradiction(params) {
|
|
22
|
+
return `the fields [${params.personalFields.join(', ')}] come from '${params.system}' and declare personal-data categories, `
|
|
23
|
+
+ `while the binding's erasure stance is '${HttpApiErasureStance.NO_SUBJECT_DATA}' — that those rows hold no data about a person. `
|
|
24
|
+
+ 'Both cannot be true. If the fields are about a person, declare '
|
|
25
|
+
+ `'${HttpApiErasureStance.EXTERNAL_ERASURE_OPERATION}' or '${HttpApiErasureStance.CONTROLLER_ACKNOWLEDGED_NON_ERASURE}'. `
|
|
26
|
+
+ 'If they are not (a company\'s name and its contact details are data about a legal person), remove their .dataCategories().';
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=no-subject-data-stance-coherence.shared.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-subject-data-stance-coherence.shared.utils.js","sourceRoot":"","sources":["../../../../../src/resources/utils/no-subject-data-stance-coherence.shared.utils.ts"],"names":[],"mappings":"AAgCA,OAAO,EAAE,iBAAiB,EAAE,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the personal data a resource declares it gets from the system (#2010).\n *\n * `HttpApiErasureStance.NO_SUBJECT_DATA` says the remote rows hold no data about a person, which is why a\n * subject erasure reports `DECLARED_NO_SUBJECT_DATA` for them and reaches nothing. A resource that declares\n * personal-data categories (`.dataCategories()`) on the fields it takes FROM that system says the opposite about\n * the same rows. Both cannot be true, and the stance is the half that erasure acts on, so the contradiction is\n * refused where it is authored, in the resource factory.\n *\n * Which fields come from the system depends on the lane:\n * - a READ-THROUGH binding keeps the rows in the system of record, so every field of the resource is the remote\n * row's, except the tenant anchors the engine stamps (`HTTP_API_ENGINE_INJECTED_FIELDS`). Whether the resource\n * also WRITES does not matter: the rows hold the data either way;\n * - a PIPELINE copies only its mapped fields. A field no mapping writes is the application's own, and a `CONSTANT`\n * entry reads nothing from the source. These are the same fields the privacy notice's source statement counts\n * (`systemOfRecordFlowsOfResource`), so the refusal and the notice cannot disagree about what came from where.\n *\n * Replaces the narrower write-only rule that `assertHttpApiWriteDeclarationCoherence` carried (#1679 rule 5), which\n * asked only whether a binding WRITES personal fields. Reading them is the same contradiction, and a pipeline copy\n * of them was not checked at all. Wonder Todos' `externalCustomers` held both declarations for twelve days.\n *\n * Fixing a refusal is a question of fact, never of preference:\n * - if the fields really are about a person, the rows hold subject data: declare the stance that says so\n * (`EXTERNAL_ERASURE_OPERATION`, or `CONTROLLER_ACKNOWLEDGED_NON_ERASURE`);\n * - if they are not (a company's name and its contact details are data about a legal person, outside personal\n * data), remove the categories.\n *\n * spec-cite: GDPR Recital 14, https://gdpr-info.eu/recitals/no-14/ — \"This Regulation does not cover the processing\n * of personal data which concerns legal persons and in particular undertakings established as legal persons,\n * including the name and the form of the legal person and the contact details of the legal person.\"\n */\nimport type { z } from 'zod';\nimport { getDataCategories, getZodObjectShape, isZodObject } from '@wildo-ai/zod-decorators';\n\nimport { HttpApiErasureStance } from '../../http-api-binding/http-api-erasure-stance.shared';\nimport { HTTP_API_ENGINE_INJECTED_FIELDS } from '../../http-api-binding/read-through-engine-anchors.shared';\n\n/**\n * The fields that declare personal-data categories while the binding they come from declares `NO_SUBJECT_DATA`,\n * sorted. Empty for any other stance, and for a schema that is not an object.\n *\n * `sourcedFields` is the set of fields that come from the system: omit it for a read-through binding (every field\n * but the engine-stamped anchors), pass the pipeline's mapped non-constant local fields for a copy.\n */\nexport function personalFieldsContradictingNoSubjectDataStance(params: {\n readonly stance: HttpApiErasureStance;\n readonly mainSchema: z.ZodTypeAny;\n readonly sourcedFields?: ReadonlySet<string>;\n}): readonly string[] {\n if (params.stance !== HttpApiErasureStance.NO_SUBJECT_DATA || !isZodObject(params.mainSchema)) return [];\n return Object.entries(getZodObjectShape(params.mainSchema))\n .filter(([fieldName]) => (params.sourcedFields === undefined ? !HTTP_API_ENGINE_INJECTED_FIELDS.includes(fieldName) : params.sourcedFields.has(fieldName)))\n .filter(([, fieldSchema]) => getDataCategories(fieldSchema as z.ZodTypeAny) !== undefined)\n .map(([fieldName]) => fieldName)\n .sort();\n}\n\n/** The refusal's text, shared by both lanes so the remedy reads the same wherever it fires. */\nexport function describeNoSubjectDataStanceContradiction(params: { readonly system: string; readonly personalFields: readonly string[] }): string {\n return `the fields [${params.personalFields.join(', ')}] come from '${params.system}' and declare personal-data categories, `\n + `while the binding's erasure stance is '${HttpApiErasureStance.NO_SUBJECT_DATA}' — that those rows hold no data about a person. `\n + 'Both cannot be true. If the fields are about a person, declare '\n + `'${HttpApiErasureStance.EXTERNAL_ERASURE_OPERATION}' or '${HttpApiErasureStance.CONTROLLER_ACKNOWLEDGED_NON_ERASURE}'. `\n + 'If they are not (a company\\'s name and its contact details are data about a legal person), remove their .dataCategories().';\n}\n"]}
|