@wildo-ai/saas-models 1.0.1 → 1.1.1
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/LICENSE +34 -0
- package/dist/esm/.builder.pid +9 -0
- package/dist/esm/__tests__/setup.d.ts.map +1 -1
- package/dist/esm/__tests__/setup.js +18 -3
- package/dist/esm/__tests__/setup.js.map +1 -1
- package/dist/esm/_inspect.d.ts +2 -0
- package/dist/esm/_inspect.d.ts.map +1 -0
- package/dist/esm/_inspect.js +3 -0
- package/dist/esm/_inspect.js.map +1 -0
- package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts +6 -6
- package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-metadata.shared.resources-config.schemas.js +5 -1
- package/dist/esm/applications/application-metadata.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/applications/application-subject.shared.schemas.d.ts +51 -0
- package/dist/esm/applications/application-subject.shared.schemas.d.ts.map +1 -0
- package/dist/esm/applications/application-subject.shared.schemas.js +56 -0
- package/dist/esm/applications/application-subject.shared.schemas.js.map +1 -0
- package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts +9 -11
- 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 +42 -74
- package/dist/esm/applications/application-versions.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/applications/applications-context.schemas.d.ts +228 -200
- package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications-context.schemas.js +1 -1
- package/dist/esm/applications/applications-context.schemas.js.map +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts +4 -9
- package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.js +103 -87
- package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/applications/applications.shared.schemas.d.ts +59 -5
- package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.schemas.js +80 -3
- package/dist/esm/applications/applications.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts +4 -4
- 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 +98 -25
- package/dist/esm/billing/billing-account.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/billing-account.shared.schemas.d.ts +32 -8
- package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-account.shared.schemas.js +67 -2
- package/dist/esm/billing/billing-account.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.d.ts +8 -8
- package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.js +2 -3
- package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts +75 -0
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.js +78 -1
- package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.d.ts +204 -42
- package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.js +76 -1
- package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
- package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts +8 -6
- 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 +48 -16
- package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/credit-pool.shared.schemas.d.ts +9 -9
- package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/credit-pool.shared.schemas.js +13 -6
- package/dist/esm/billing/credit-pool.shared.schemas.js.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts +2 -2
- package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js +26 -17
- package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.schemas.d.ts +10 -10
- package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.schemas.js +32 -7
- package/dist/esm/billing/invoice-ref.shared.schemas.js.map +1 -1
- package/dist/esm/billing/price.shared.resources-config.schemas.d.ts +7 -7
- package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.resources-config.schemas.js +23 -5
- package/dist/esm/billing/price.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/price.shared.schemas.d.ts +4 -4
- package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.schemas.js +1 -1
- package/dist/esm/billing/price.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts +9 -9
- package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product-behavior-policy.shared.schemas.js +10 -2
- package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-definition.shared.schemas.d.ts +27 -27
- package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product-definition.shared.schemas.js +39 -9
- package/dist/esm/billing/product-definition.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts +22 -22
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.resources-config.schemas.js +6 -6
- package/dist/esm/billing/product.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/product.shared.schemas.d.ts +19 -19
- package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.schemas.js +1 -1
- package/dist/esm/billing/product.shared.schemas.js.map +1 -1
- package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts +7 -7
- package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/promotions.shared.resources-config.schemas.js +34 -6
- package/dist/esm/billing/promotions.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/promotions.shared.schemas.d.ts +2 -2
- package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/promotions.shared.schemas.js +1 -1
- package/dist/esm/billing/promotions.shared.schemas.js.map +1 -1
- package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts +12 -12
- package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.resources-config.schemas.js +5 -5
- package/dist/esm/billing/referral.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/referral.shared.schemas.d.ts +7 -7
- package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.schemas.js +36 -8
- package/dist/esm/billing/referral.shared.schemas.js.map +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +6 -6
- package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.js +51 -24
- package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/subscription.shared.schemas.d.ts +13 -13
- package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/subscription.shared.schemas.js +37 -5
- package/dist/esm/billing/subscription.shared.schemas.js.map +1 -1
- package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts +2 -2
- package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.resources-config.schemas.js +23 -14
- package/dist/esm/billing/usage-record.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/usage-record.shared.schemas.d.ts +15 -12
- package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.schemas.js +34 -7
- package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
- package/dist/esm/charts/aggregation-query.shared.schemas.d.ts +36 -36
- package/dist/esm/charts/aggregation-query.shared.schemas.d.ts.map +1 -1
- package/dist/esm/charts/aggregation-query.shared.schemas.js +6 -6
- package/dist/esm/charts/aggregation-query.shared.schemas.js.map +1 -1
- package/dist/esm/charts/aggregation.shared.definitions.d.ts.map +1 -1
- package/dist/esm/charts/aggregation.shared.definitions.js +1 -1
- package/dist/esm/charts/aggregation.shared.definitions.js.map +1 -1
- package/dist/esm/charts/chart-definition-builder.shared.d.ts +5 -3
- package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
- package/dist/esm/charts/chart-definition-builder.shared.js +4 -2
- package/dist/esm/charts/chart-definition-builder.shared.js.map +1 -1
- package/dist/esm/{runtime/companion-artifact-placement.shared.definitions.d.ts → companion/artifact-placement.shared.definitions.d.ts} +2 -3
- package/dist/esm/companion/artifact-placement.shared.definitions.d.ts.map +1 -0
- package/dist/esm/{runtime/companion-artifact-placement.shared.definitions.js → companion/artifact-placement.shared.definitions.js} +1 -2
- package/dist/esm/companion/artifact-placement.shared.definitions.js.map +1 -0
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +131 -0
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -0
- package/dist/esm/companion/provider-discovery.shared.schemas.js +122 -0
- package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -0
- package/dist/esm/companion/shared-library-companion.shared.definitions.d.ts +6 -0
- package/dist/esm/companion/shared-library-companion.shared.definitions.d.ts.map +1 -0
- package/dist/esm/companion/shared-library-companion.shared.definitions.js +1 -0
- package/dist/esm/companion/shared-library-companion.shared.definitions.js.map +1 -0
- package/dist/esm/companion-exports.d.ts +4 -0
- package/dist/esm/companion-exports.d.ts.map +1 -0
- package/dist/esm/companion-exports.js +4 -0
- package/dist/esm/companion-exports.js.map +1 -0
- package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.d.ts +65 -0
- package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.js +68 -0
- package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts +147 -0
- package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.js +20 -0
- package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts +60 -16
- 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 +77 -10
- 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 +58 -0
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +74 -0
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +1949 -115
- 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 +2229 -11
- 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 +25 -10
- 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 +226 -3
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
- package/dist/esm/compliance/data-classification/data-classification.shared.schemas.d.ts +8 -0
- package/dist/esm/compliance/data-classification/data-classification.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/data-classification/data-classification.shared.schemas.js +9 -0
- package/dist/esm/compliance/data-classification/data-classification.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts +524 -0
- package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/documents/governed-documents.shared.schemas.js +482 -0
- package/dist/esm/compliance/documents/governed-documents.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts +112 -0
- package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js +120 -0
- package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts +134 -0
- package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/client-storage.shared.schemas.js +129 -0
- package/dist/esm/compliance/privacy/client-storage.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts +1 -1
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.js +1 -1
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts +50 -0
- package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.js +98 -0
- package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.js.map +1 -0
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts +181 -0
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js +184 -0
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts +230 -0
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js +232 -0
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.d.ts +220 -0
- package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.js +252 -0
- package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts +75 -0
- package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.js +43 -0
- package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.js.map +1 -0
- package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts +56 -43
- package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/privacy.shared.schemas.js +72 -18
- package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts +21 -3
- package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.js +19 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts +124 -0
- package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.js +107 -0
- package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/sharing.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/sharing.shared.schemas.js +1 -1
- package/dist/esm/compliance/privacy/sharing.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts +279 -0
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js +238 -0
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts +74 -0
- package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/subject-export-render.shared.utils.js +137 -0
- package/dist/esm/compliance/privacy/subject-export-render.shared.utils.js.map +1 -0
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts +457 -0
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.js +549 -0
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -0
- package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts +13 -13
- package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.js +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
- package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +135 -125
- package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/app-configuration-shared.shared.schemas.js +74 -10
- package/dist/esm/config/app-configuration-shared.shared.schemas.js.map +1 -1
- package/dist/esm/config/app-frontend-type.shared.schemas.d.ts +94 -0
- package/dist/esm/config/app-frontend-type.shared.schemas.d.ts.map +1 -0
- package/dist/esm/config/app-frontend-type.shared.schemas.js +95 -0
- package/dist/esm/config/app-frontend-type.shared.schemas.js.map +1 -0
- package/dist/esm/config/auth-config-resolution.shared.utils.d.ts +35 -5
- package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.js +44 -2
- package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
- package/dist/esm/config/brand-assets.shared.schemas.d.ts +89 -0
- package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -0
- package/dist/esm/config/brand-assets.shared.schemas.js +99 -0
- package/dist/esm/config/brand-assets.shared.schemas.js.map +1 -0
- package/dist/esm/config/configuration-validation.shared.schemas.d.ts +12 -1
- package/dist/esm/config/configuration-validation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/configuration-validation.shared.schemas.js +12 -1
- package/dist/esm/config/configuration-validation.shared.schemas.js.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +170 -91
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.js +130 -19
- package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +167 -166
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/chart-definition.shared.schemas.js +93 -9
- package/dist/esm/config/frontend/chart-definition.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts +69 -0
- package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -0
- package/dist/esm/config/frontend/chart-registration-alignment.shared.js +61 -0
- package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -0
- package/dist/esm/config/frontend/navigation.shared.schemas.d.ts +110 -39
- package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/navigation.shared.schemas.js +93 -9
- package/dist/esm/config/frontend/navigation.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts +70 -134
- package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/onboarding.shared.schemas.js +27 -25
- package/dist/esm/config/frontend/onboarding.shared.schemas.js.map +1 -1
- package/dist/esm/config/postgresql.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/postgresql.shared.schemas.js +1 -1
- package/dist/esm/config/postgresql.shared.schemas.js.map +1 -1
- package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts +24 -0
- package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -0
- package/dist/esm/config/registration-acquisition-policy.shared.utils.js +62 -0
- package/dist/esm/config/registration-acquisition-policy.shared.utils.js.map +1 -0
- package/dist/esm/config-authoring.entry.d.ts +5 -0
- package/dist/esm/config-authoring.entry.d.ts.map +1 -0
- package/dist/esm/config-authoring.entry.js +7 -0
- package/dist/esm/config-authoring.entry.js.map +1 -0
- package/dist/esm/crdt/crdt-merge.shared.utils.d.ts +1 -1
- package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
- package/dist/esm/crdt/crdt-merge.shared.utils.js +1 -1
- package/dist/esm/crdt/crdt-merge.shared.utils.js.map +1 -1
- package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts +66 -0
- package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -0
- package/dist/esm/data-seeding/data-seeding-config.shared.schemas.js +118 -0
- package/dist/esm/data-seeding/data-seeding-config.shared.schemas.js.map +1 -0
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +348 -1
- 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 +357 -1
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
- package/dist/esm/errors/errors.shared.definitions.d.ts +2 -2
- package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.definitions.js +12 -1
- package/dist/esm/errors/errors.shared.definitions.js.map +1 -1
- package/dist/esm/errors/errors.shared.schemas.d.ts +82 -36
- package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.schemas.js +100 -3
- package/dist/esm/errors/errors.shared.schemas.js.map +1 -1
- package/dist/esm/errors/errors.shared.utils.d.ts +1 -1
- package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.utils.js +1 -1
- package/dist/esm/errors/errors.shared.utils.js.map +1 -1
- package/dist/esm/errors/resource-access-forbidden.shared.error.d.ts +16 -0
- package/dist/esm/errors/resource-access-forbidden.shared.error.d.ts.map +1 -0
- package/dist/esm/errors/resource-access-forbidden.shared.error.js +18 -0
- package/dist/esm/errors/resource-access-forbidden.shared.error.js.map +1 -0
- package/dist/esm/errors/zod-issue-formatting.shared.utils.d.ts +113 -0
- package/dist/esm/errors/zod-issue-formatting.shared.utils.d.ts.map +1 -0
- package/dist/esm/errors/zod-issue-formatting.shared.utils.js +102 -0
- package/dist/esm/errors/zod-issue-formatting.shared.utils.js.map +1 -0
- package/dist/esm/exports/tabular-csv.shared.utils.d.ts +42 -0
- package/dist/esm/exports/tabular-csv.shared.utils.d.ts.map +1 -0
- package/dist/esm/exports/tabular-csv.shared.utils.js +63 -0
- package/dist/esm/exports/tabular-csv.shared.utils.js.map +1 -0
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +347 -0
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.js +206 -0
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -0
- package/dist/esm/external-data.exports.d.ts +30 -0
- package/dist/esm/external-data.exports.d.ts.map +1 -0
- package/dist/esm/external-data.exports.js +30 -0
- package/dist/esm/external-data.exports.js.map +1 -0
- package/dist/esm/external-providers/compose-provider-registry.shared.d.ts +63 -0
- package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -0
- package/dist/esm/external-providers/compose-provider-registry.shared.js +102 -0
- package/dist/esm/external-providers/compose-provider-registry.shared.js.map +1 -0
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +164 -0
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +194 -0
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts +39 -0
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -0
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js +85 -0
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -0
- package/dist/esm/external-providers/external-providers.shared.schemas.d.ts +22 -22
- package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/external-providers.shared.schemas.js +5 -5
- package/dist/esm/external-providers/external-providers.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +319 -0
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.js +17 -0
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +35 -0
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +19 -0
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +135 -0
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-capability.shared.schemas.js +102 -0
- package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts +175 -0
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js +211 -0
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts +37 -0
- package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-metadata.shared.schemas.js +58 -0
- package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts +65 -0
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-protocol.shared.schemas.js +63 -0
- package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts +99 -0
- package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.js +137 -0
- package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.js.map +1 -0
- package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts +39 -0
- package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/features/application-features.shared.resources-config.schemas.js +147 -0
- package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/features/core-feature-definitions.shared.d.ts +17 -2
- package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
- package/dist/esm/features/core-feature-definitions.shared.js +91 -3
- package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
- package/dist/esm/features/feature-builders.shared.d.ts +13 -2
- package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
- package/dist/esm/features/feature-builders.shared.js +3 -1
- package/dist/esm/features/feature-builders.shared.js.map +1 -1
- package/dist/esm/features/feature-definition.shared.schemas.d.ts +70 -24
- package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/feature-definition.shared.schemas.js +84 -1
- package/dist/esm/features/feature-definition.shared.schemas.js.map +1 -1
- package/dist/esm/features/feature-registry.shared.d.ts +8 -9
- package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
- package/dist/esm/features/feature-registry.shared.js +5 -8
- package/dist/esm/features/feature-registry.shared.js.map +1 -1
- package/dist/esm/features/feature-resolution.shared.schemas.d.ts +1 -1
- package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/feature-resolution.shared.schemas.js +1 -1
- package/dist/esm/features/feature-resolution.shared.schemas.js.map +1 -1
- package/dist/esm/features/scope-features.shared.schemas.d.ts +9 -10
- package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/scope-features.shared.schemas.js +20 -6
- package/dist/esm/features/scope-features.shared.schemas.js.map +1 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts +9 -9
- package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.js +35 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/files/files.shared.resources-config.schemas.d.ts +35 -9
- package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/files/files.shared.resources-config.schemas.js +27 -5
- package/dist/esm/files/files.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/files/files.shared.schemas.d.ts +71 -13
- package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
- package/dist/esm/files/files.shared.schemas.js +110 -35
- package/dist/esm/files/files.shared.schemas.js.map +1 -1
- package/dist/esm/files/files.shared.utils.d.ts +9 -5
- package/dist/esm/files/files.shared.utils.d.ts.map +1 -1
- package/dist/esm/files/files.shared.utils.js +10 -6
- package/dist/esm/files/files.shared.utils.js.map +1 -1
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts +40 -0
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.js +204 -0
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts +113 -0
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.js +153 -0
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts +61 -0
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.js +143 -0
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts +77 -0
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.js +103 -0
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/actors.shared.schemas.d.ts +339 -326
- package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/actors.shared.schemas.js +29 -6
- package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts +237 -0
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.js +152 -0
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/agents.shared.schemas.d.ts +180 -23
- package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agents.shared.schemas.js +69 -2
- package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.d.ts +19 -0
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.d.ts.map +1 -0
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.js +35 -0
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.js.map +1 -0
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts +29 -45
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.js +2 -34
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts +2 -2
- package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.js +1 -1
- package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts +642 -0
- package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/deliberation.shared.schemas.js +604 -0
- package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts +48 -0
- package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.js +179 -0
- package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts +200 -0
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js +337 -0
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts +59 -0
- package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.js +223 -0
- package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts +426 -0
- package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/flows-actors-task.shared.schemas.js +317 -0
- package/dist/esm/flows-actors/flows-actors-task.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +109 -58
- 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 +48 -1
- 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 +62 -62
- 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 +2 -2
- 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 +112 -11
- 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 +63 -1
- package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts +60 -20
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js +36 -3
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts +35 -0
- package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts.map +1 -0
- package/dist/esm/flows-actors/flows-actors.system.shared.definitions.js +1 -0
- package/dist/esm/flows-actors/flows-actors.system.shared.definitions.js.map +1 -0
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts +88 -63
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js +32 -5
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows.shared.schemas.d.ts +63 -49
- package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows.shared.schemas.js +1 -1
- package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.d.ts +73 -0
- package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.js +149 -0
- package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts +20 -0
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js +34 -0
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts +125 -0
- package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.js +136 -0
- package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts +180 -0
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js +187 -0
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts +28 -0
- package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.js +28 -0
- package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts +446 -0
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js +678 -0
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts +106 -0
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js +243 -0
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.d.ts +29 -0
- package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.js +58 -0
- package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts +61 -0
- package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js +93 -0
- package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts +5 -5
- package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/prompt-ir.shared.schemas.js +2 -2
- package/dist/esm/flows-actors/prompt-ir.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts +81 -0
- package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.js +82 -0
- package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts +257 -194
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.js +28 -2
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.js +1 -1
- package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.js.map +1 -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 +1 -1
- package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js.map +1 -1
- package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts +51 -89
- package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-flow.shared.schemas.js +1 -1
- package/dist/esm/guidance/guidance-flow.shared.schemas.js.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts +22 -19
- package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.js +61 -5
- package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.schemas.d.ts +46 -10
- package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.schemas.js +15 -4
- package/dist/esm/guidance/guidance-state.shared.schemas.js.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.utils.d.ts +25 -0
- package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -0
- package/dist/esm/guidance/guidance-state.shared.utils.js +72 -0
- package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -0
- package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts +11 -11
- package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-config.shared.schemas.js +1 -1
- package/dist/esm/guidance/lifecycle-config.shared.schemas.js.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts +28 -25
- package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.js +71 -7
- package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts +53 -14
- package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.schemas.js +26 -25
- package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
- package/dist/esm/guidance/milestone-builders.shared.d.ts +2 -2
- package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
- package/dist/esm/guidance/milestone-builders.shared.js +1 -1
- package/dist/esm/guidance/milestone-builders.shared.js.map +1 -1
- package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts +2 -2
- package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/milestone-definition.shared.schemas.js +1 -1
- package/dist/esm/guidance/milestone-definition.shared.schemas.js.map +1 -1
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts +22 -19
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.js +72 -7
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.d.ts +40 -10
- package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.js +16 -6
- package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts +69 -0
- package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -0
- package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js +232 -0
- package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js.map +1 -0
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts +566 -0
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -0
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js +513 -0
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -0
- package/dist/esm/i18n/interpolate-label-params.shared.utils.d.ts +52 -0
- package/dist/esm/i18n/interpolate-label-params.shared.utils.d.ts.map +1 -0
- package/dist/esm/i18n/interpolate-label-params.shared.utils.js +63 -0
- package/dist/esm/i18n/interpolate-label-params.shared.utils.js.map +1 -0
- package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts +3 -3
- package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
- package/dist/esm/i18n/labelling.dto.shared.schemas.js +1 -1
- package/dist/esm/i18n/labelling.dto.shared.schemas.js.map +1 -1
- package/dist/esm/index.d.ts +277 -200
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +122 -15
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/meta-workflows.exports.d.ts +51 -0
- package/dist/esm/meta-workflows.exports.d.ts.map +1 -0
- package/dist/esm/meta-workflows.exports.js +51 -0
- package/dist/esm/meta-workflows.exports.js.map +1 -0
- package/dist/esm/monitoring/monitoring.shared.schemas.d.ts +16 -16
- package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
- package/dist/esm/monitoring/monitoring.shared.schemas.js +1 -1
- package/dist/esm/monitoring/monitoring.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/email/email-context.shared.schemas.d.ts +9 -9
- package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-context.shared.schemas.js +8 -3
- package/dist/esm/notifications/email/email-context.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +33 -46
- 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 +20 -140
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/email/email-template.shared.enums.d.ts +145 -0
- package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -0
- package/dist/esm/notifications/email/email-template.shared.enums.js +164 -0
- package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -0
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts +43 -0
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js +231 -0
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts +159 -0
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -0
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js +191 -0
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js.map +1 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts +62 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js +183 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts +134 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js +159 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -0
- package/dist/esm/notifications/notification-badges.core.definitions.d.ts +10 -1
- package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.js +11 -13
- package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.d.ts +147 -43
- package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.js +130 -23
- package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts +40 -15
- package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js +149 -23
- package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.d.ts +352 -25
- package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.js +47 -2
- package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts +21 -10
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js +54 -47
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-features.shared.schemas.d.ts +10 -2
- package/dist/esm/organizations/organization-features.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-features.shared.schemas.js +10 -2
- package/dist/esm/organizations/organization-features.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts +31 -17
- 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 +294 -54
- package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-members.shared.schemas.d.ts +31 -41
- package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-members.shared.schemas.js +181 -37
- package/dist/esm/organizations/organization-members.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts +8 -8
- package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.js +43 -2
- package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts +25 -4
- package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.js +35 -15
- package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts +7 -7
- package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.js +42 -3
- package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts +4 -4
- package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.schemas.js +17 -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 +10 -10
- package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.js +32 -2
- package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.d.ts +6 -6
- package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.js +28 -2
- package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts +94 -0
- package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts.map +1 -0
- package/dist/esm/organizations/organization-unit-inheritance.shared.js +96 -0
- package/dist/esm/organizations/organization-unit-inheritance.shared.js.map +1 -0
- package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts +30 -0
- package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.js +97 -0
- package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts +56 -0
- package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -0
- package/dist/esm/organizations/organization-unit-members.shared.schemas.js +92 -0
- package/dist/esm/organizations/organization-unit-members.shared.schemas.js.map +1 -0
- package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts +130 -0
- package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -0
- package/dist/esm/organizations/organization-unit-narrowing-decision.shared.js +139 -0
- package/dist/esm/organizations/organization-unit-narrowing-decision.shared.js.map +1 -0
- package/dist/esm/organizations/organization-unit-narrowing.example.d.ts +27 -0
- package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -0
- package/dist/esm/organizations/organization-unit-narrowing.example.js +29 -0
- package/dist/esm/organizations/organization-unit-narrowing.example.js.map +1 -0
- package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts +137 -0
- package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -0
- package/dist/esm/organizations/organization-unit-narrowing.shared.js +133 -0
- package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -0
- package/dist/esm/organizations/organization-units.shared.path.d.ts +103 -0
- package/dist/esm/organizations/organization-units.shared.path.d.ts.map +1 -0
- package/dist/esm/organizations/organization-units.shared.path.js +120 -0
- package/dist/esm/organizations/organization-units.shared.path.js.map +1 -0
- package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts +8 -8
- 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 +1 -1
- package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-units.shared.schemas.d.ts +69 -8
- package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-units.shared.schemas.js +89 -5
- package/dist/esm/organizations/organization-units.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts +46 -11
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +505 -34
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organizations.shared.schemas.d.ts +95 -39
- package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.schemas.js +228 -6
- package/dist/esm/organizations/organizations.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts +36 -0
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -0
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js +66 -0
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -0
- package/dist/esm/provider-registration-runtime.exports.d.ts +4 -0
- package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -0
- package/dist/esm/provider-registration-runtime.exports.js +4 -0
- package/dist/esm/provider-registration-runtime.exports.js.map +1 -0
- package/dist/esm/public-runtime/index.d.ts +164 -0
- package/dist/esm/public-runtime/index.d.ts.map +1 -0
- package/dist/esm/public-runtime/index.js +164 -0
- package/dist/esm/public-runtime/index.js.map +1 -0
- package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts +4 -4
- package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.js +12 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.d.ts +114 -42
- package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.js +114 -12
- package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
- package/dist/esm/queue/jobs.shared.utils.d.ts +3 -3
- package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.utils.js +2 -2
- package/dist/esm/queue/jobs.shared.utils.js.map +1 -1
- package/dist/esm/queue/queues.shared.schemas.d.ts +17 -15
- package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/queues.shared.schemas.js +14 -5
- package/dist/esm/queue/queues.shared.schemas.js.map +1 -1
- package/dist/esm/queue/queues.shared.utils.d.ts +137 -6
- package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
- package/dist/esm/queue/queues.shared.utils.js +161 -9
- package/dist/esm/queue/queues.shared.utils.js.map +1 -1
- package/dist/esm/queue/rabbitmq-queue-args.shared.d.ts.map +1 -1
- package/dist/esm/queue/rabbitmq-queue-args.shared.js +1 -1
- package/dist/esm/queue/rabbitmq-queue-args.shared.js.map +1 -1
- package/dist/esm/requests/header-keys.shared.d.ts +23 -1
- package/dist/esm/requests/header-keys.shared.d.ts.map +1 -1
- package/dist/esm/requests/header-keys.shared.js +45 -2
- package/dist/esm/requests/header-keys.shared.js.map +1 -1
- package/dist/esm/requests/http-requests.shared.d.ts +1 -0
- package/dist/esm/requests/http-requests.shared.d.ts.map +1 -1
- package/dist/esm/requests/http-requests.shared.js +2 -1
- package/dist/esm/requests/http-requests.shared.js.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts +189 -5
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.js +255 -6
- package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.d.ts +75 -24
- package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.js +80 -18
- package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.d.ts +248 -120
- package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.js +92 -2
- package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
- package/dist/esm/resources/child-operations.shared.schemas.d.ts +128 -23
- package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/child-operations.shared.schemas.js +147 -11
- package/dist/esm/resources/child-operations.shared.schemas.js.map +1 -1
- package/dist/esm/resources/context-policy.shared.schemas.d.ts +4 -4
- package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/context-policy.shared.schemas.js +1 -1
- package/dist/esm/resources/context-policy.shared.schemas.js.map +1 -1
- package/dist/esm/resources/relationship-display.shared.schemas.d.ts +31 -1352
- package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/relationship-display.shared.schemas.js +13 -161
- package/dist/esm/resources/relationship-display.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.d.ts +60 -5
- package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.js +1507 -87
- package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.d.ts +1638 -43
- package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.js +478 -13
- package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts +3 -3
- package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources-registry.shared.core.definitions.js +782 -96
- package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources-relationships.shared.factory.d.ts +37 -7
- package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
- package/dist/esm/resources/resources-relationships.shared.factory.js +76 -24
- package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources-serialization.shared.schemas.d.ts +19 -19
- package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources-serialization.shared.schemas.js +1 -1
- package/dist/esm/resources/resources-serialization.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.d.ts +84 -8
- package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.js +165 -19
- package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.d.ts +582 -602
- package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.js +581 -5
- package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources.shared.utils.d.ts +363 -15
- package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.utils.js +569 -16
- package/dist/esm/resources/resources.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/collection-export.shared.utils.d.ts +65 -0
- package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -0
- package/dist/esm/resources/utils/collection-export.shared.utils.js +150 -0
- package/dist/esm/resources/utils/collection-export.shared.utils.js.map +1 -0
- package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts +134 -0
- package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -0
- package/dist/esm/resources/utils/composition-cascade-deletability.validation.js +167 -0
- package/dist/esm/resources/utils/composition-cascade-deletability.validation.js.map +1 -0
- package/dist/esm/resources/utils/composition-seedability.validation.d.ts +63 -0
- package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -0
- package/dist/esm/resources/utils/composition-seedability.validation.js +75 -0
- package/dist/esm/resources/utils/composition-seedability.validation.js.map +1 -0
- package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts +10 -0
- package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -0
- package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.js +25 -0
- package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.js.map +1 -0
- package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts +111 -0
- package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -0
- package/dist/esm/resources/utils/duplicate-relationship-registration.validation.js +109 -0
- package/dist/esm/resources/utils/duplicate-relationship-registration.validation.js.map +1 -0
- package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts +52 -0
- package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -0
- package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.js +57 -0
- package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.js.map +1 -0
- package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/repository-dto-builder.utils.js +1 -1
- package/dist/esm/resources/utils/repository-dto-builder.utils.js.map +1 -1
- package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts +108 -0
- package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -0
- package/dist/esm/resources/utils/required-fk-fillability.validation.js +186 -0
- package/dist/esm/resources/utils/required-fk-fillability.validation.js.map +1 -0
- package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts +107 -3
- package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-operation-type-guards.utils.js +133 -2
- package/dist/esm/resources/utils/resource-operation-type-guards.utils.js.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts +39 -31
- package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.factory.js +9 -9
- package/dist/esm/resources/utils/resource-polymorphism.factory.js.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts +7 -7
- package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.relationships.js +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.relationships.js.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts +139 -5
- package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.schemas.js +301 -3
- package/dist/esm/resources/utils/resource-polymorphism.schemas.js.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.utils.js +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.utils.js.map +1 -1
- package/dist/esm/resources/utils/resource-subtree.utils.d.ts +1 -1
- package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-subtree.utils.js +1 -1
- package/dist/esm/resources/utils/resource-subtree.utils.js.map +1 -1
- package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts +1 -1
- package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-context-needs.utils.js +1 -1
- package/dist/esm/resources/utils/resources-config-context-needs.utils.js.map +1 -1
- package/dist/esm/resources/utils/resources-config-naming.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-naming.utils.js +1 -1
- package/dist/esm/resources/utils/resources-config-naming.utils.js.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts +256 -39
- 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 +898 -233
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts +16 -6
- package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.path.utils.js +35 -10
- package/dist/esm/resources/utils/resources-config-operations.path.utils.js.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts +120 -20
- package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js +394 -81
- package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.utils.d.ts +2 -2
- package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.utils.js +1 -1
- package/dist/esm/resources/utils/resources-config-operations.utils.js.map +1 -1
- package/dist/esm/resources/utils/resources-serialization.utils.d.ts +77 -2
- package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-serialization.utils.js +80 -1
- package/dist/esm/resources/utils/resources-serialization.utils.js.map +1 -1
- package/dist/esm/resources/utils/resources-summary.utils.d.ts +1 -1
- package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-summary.utils.js +1 -1
- package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
- package/dist/esm/resources/utils/schema-family-builder.utils.d.ts +21 -3
- package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-family-builder.utils.js +7 -1
- package/dist/esm/resources/utils/schema-family-builder.utils.js.map +1 -1
- package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-type-inference.utils.js +1 -1
- package/dist/esm/resources/utils/schema-type-inference.utils.js.map +1 -1
- package/dist/esm/resources/utils/schema-type-utils.d.ts +1 -1
- package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-type-utils.js +1 -1
- package/dist/esm/resources/utils/schema-type-utils.js.map +1 -1
- package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts +1 -1
- package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-variant-resolver.utils.js +1 -1
- package/dist/esm/resources/utils/schema-variant-resolver.utils.js.map +1 -1
- package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts +203 -0
- package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -0
- package/dist/esm/resources/utils/shared-persistence-collection.utils.js +284 -0
- package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -0
- package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts +25 -0
- package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -0
- package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js +322 -0
- package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js.map +1 -0
- package/dist/esm/runtime/domain-module.shared.definitions.d.ts +32 -10
- package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.shared.definitions.js +3 -2
- package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
- package/dist/esm/runtime/execution-context.shared.schemas.d.ts +93 -9
- package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
- package/dist/esm/runtime/execution-context.shared.schemas.js +122 -7
- package/dist/esm/runtime/execution-context.shared.schemas.js.map +1 -1
- package/dist/esm/runtime/runtime.shared.schemas.d.ts.map +1 -1
- package/dist/esm/runtime/runtime.shared.schemas.js +1 -1
- package/dist/esm/runtime/runtime.shared.schemas.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts +14 -11
- 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 +65 -2
- 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 +14 -11
- 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 +162 -1
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts +79 -29
- 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 +87 -6
- package/dist/esm/security/api-keys/api-keys.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts +185 -0
- package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -0
- package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.js +198 -0
- package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.js.map +1 -0
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +307 -149
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +177 -27
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.d.ts +64 -8
- package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.js +56 -9
- package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.utils.d.ts +3 -3
- package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.utils.js +1 -1
- package/dist/esm/security/authentications/authentication.shared.utils.js.map +1 -1
- package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts +103 -5
- package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/consumable-token.shared.schemas.js +31 -1
- package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts +278 -0
- package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -0
- package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js +335 -0
- package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js.map +1 -0
- package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts +6 -6
- package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/password-reset.shared.dto.schemas.js +11 -4
- package/dist/esm/security/authentications/password-reset.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts +51 -18
- package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/registration.shared.dto.schemas.js +70 -13
- package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/same-origin-redirect-path.shared.d.ts +69 -0
- package/dist/esm/security/authentications/same-origin-redirect-path.shared.d.ts.map +1 -0
- package/dist/esm/security/authentications/same-origin-redirect-path.shared.js +93 -0
- package/dist/esm/security/authentications/same-origin-redirect-path.shared.js.map +1 -0
- package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts +91 -0
- package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -0
- package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js +91 -0
- package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js.map +1 -0
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts +2 -9
- 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 +49 -33
- 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 +41 -14
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js +158 -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.d.ts +21 -9
- package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js +92 -18
- 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 +11 -10
- 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 +29 -7
- package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts +12 -5
- 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 +81 -5
- package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts +17 -5
- package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.js +29 -5
- package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts +2 -9
- package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js +46 -33
- package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts +34 -9
- package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js +47 -3
- 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 +2 -17
- 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 +55 -53
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts +37 -37
- 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 +53 -13
- 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 +79 -7
- 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 +157 -14
- 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 +113 -118
- 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 +111 -49
- 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 +57 -0
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js +58 -0
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts +35 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js +252 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts +171 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js +239 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -0
- package/dist/esm/security/authorizations/roles.shared.defaults.d.ts +1 -1
- package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.defaults.js +6 -1
- package/dist/esm/security/authorizations/roles.shared.defaults.js.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.d.ts +12 -3
- package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.js +15 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.utils.d.ts +133 -0
- package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -0
- package/dist/esm/security/authorizations/roles.shared.utils.js +218 -0
- package/dist/esm/security/authorizations/roles.shared.utils.js.map +1 -0
- package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.js +1 -1
- package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts +47 -0
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js +228 -0
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts +46 -0
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js +365 -0
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts +192 -0
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js +401 -0
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -0
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts +30 -0
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.js +83 -0
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts +29 -0
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js +53 -0
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -0
- package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts +117 -0
- package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.js +180 -0
- package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.js.map +1 -0
- package/dist/esm/testing/resource-config-builders.d.ts +4 -4
- package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
- package/dist/esm/testing/resource-config-builders.js +9 -2
- package/dist/esm/testing/resource-config-builders.js.map +1 -1
- package/dist/esm/testing.d.ts +1 -1
- package/dist/esm/testing.d.ts.map +1 -1
- package/dist/esm/testing.js +1 -1
- package/dist/esm/testing.js.map +1 -1
- package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts +76 -0
- package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -0
- package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js +72 -0
- package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js.map +1 -0
- package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts +28 -17
- 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 +43 -4
- package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/anonymous-users.shared.schema.d.ts +19 -12
- package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
- package/dist/esm/users/anonymous-users.shared.schema.js +68 -4
- package/dist/esm/users/anonymous-users.shared.schema.js.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts +52 -0
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js +153 -0
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/users/inbound-contacts.shared.schemas.d.ts +47 -17
- package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.schemas.js +123 -9
- package/dist/esm/users/inbound-contacts.shared.schemas.js.map +1 -1
- package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts +12 -12
- package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-credentials.shared.resources-config.schemas.js +11 -1
- package/dist/esm/users/user-credentials.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-credentials.shared.schemas.d.ts +15 -10
- package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-credentials.shared.schemas.js +53 -9
- package/dist/esm/users/user-credentials.shared.schemas.js.map +1 -1
- package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts +13 -11
- package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-identity-links.shared.resources-config.schemas.js +24 -1
- package/dist/esm/users/user-identity-links.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-identity-links.shared.schemas.d.ts +22 -19
- package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-identity-links.shared.schemas.js +107 -23
- package/dist/esm/users/user-identity-links.shared.schemas.js.map +1 -1
- package/dist/esm/users/user-preferences-reset.shared.utils.d.ts +78 -0
- package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -0
- package/dist/esm/users/user-preferences-reset.shared.utils.js +98 -0
- package/dist/esm/users/user-preferences-reset.shared.utils.js.map +1 -0
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +31 -61
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.js +34 -203
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts +13 -14
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.js +66 -31
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +33 -60
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js +49 -175
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts +13 -21
- package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.js +12 -119
- package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts +12 -16
- package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self.shared.resources-config.schemas.js +263 -115
- 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 +13 -16
- package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.resources-config.schemas.js +376 -141
- package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/users.shared.schemas.d.ts +110 -108
- package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.schemas.js +215 -19
- package/dist/esm/users/users.shared.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +54 -27
- package/dist/esm/compliance/compliance-framework/compliance-frameworks.shared.schemas.d.ts +0 -37
- package/dist/esm/compliance/compliance-framework/compliance-frameworks.shared.schemas.d.ts.map +0 -1
- package/dist/esm/compliance/compliance-framework/compliance-frameworks.shared.schemas.js +0 -38
- package/dist/esm/compliance/compliance-framework/compliance-frameworks.shared.schemas.js.map +0 -1
- package/dist/esm/external-providers/feature-bindings-policy.shared.schemas.d.ts +0 -27
- package/dist/esm/external-providers/feature-bindings-policy.shared.schemas.d.ts.map +0 -1
- package/dist/esm/external-providers/feature-bindings-policy.shared.schemas.js +0 -35
- package/dist/esm/external-providers/feature-bindings-policy.shared.schemas.js.map +0 -1
- package/dist/esm/external-providers/feature-mapping.shared.schemas.d.ts +0 -80
- package/dist/esm/external-providers/feature-mapping.shared.schemas.d.ts.map +0 -1
- package/dist/esm/external-providers/feature-mapping.shared.schemas.js +0 -159
- package/dist/esm/external-providers/feature-mapping.shared.schemas.js.map +0 -1
- package/dist/esm/external-providers/wildo-features.shared.schemas.d.ts +0 -102
- package/dist/esm/external-providers/wildo-features.shared.schemas.d.ts.map +0 -1
- package/dist/esm/external-providers/wildo-features.shared.schemas.js +0 -124
- package/dist/esm/external-providers/wildo-features.shared.schemas.js.map +0 -1
- package/dist/esm/features/platform-capability-definitions.shared.d.ts +0 -50
- package/dist/esm/features/platform-capability-definitions.shared.d.ts.map +0 -1
- package/dist/esm/features/platform-capability-definitions.shared.js +0 -30
- package/dist/esm/features/platform-capability-definitions.shared.js.map +0 -1
- package/dist/esm/flows-actors/agents-context.shared.schemas.d.ts +0 -181
- package/dist/esm/flows-actors/agents-context.shared.schemas.d.ts.map +0 -1
- package/dist/esm/flows-actors/agents-context.shared.schemas.js +0 -116
- package/dist/esm/flows-actors/agents-context.shared.schemas.js.map +0 -1
- package/dist/esm/notifications/email/email-header-footer-template.shared.resources-config.schemas.d.ts +0 -39
- package/dist/esm/notifications/email/email-header-footer-template.shared.resources-config.schemas.d.ts.map +0 -1
- package/dist/esm/notifications/email/email-header-footer-template.shared.resources-config.schemas.js +0 -113
- package/dist/esm/notifications/email/email-header-footer-template.shared.resources-config.schemas.js.map +0 -1
- package/dist/esm/notifications/email/email-header-footer-template.shared.schemas.d.ts +0 -63
- package/dist/esm/notifications/email/email-header-footer-template.shared.schemas.d.ts.map +0 -1
- package/dist/esm/notifications/email/email-header-footer-template.shared.schemas.js +0 -110
- package/dist/esm/notifications/email/email-header-footer-template.shared.schemas.js.map +0 -1
- package/dist/esm/notifications/email/email-template.shared.resources-config.schemas.d.ts +0 -62
- package/dist/esm/notifications/email/email-template.shared.resources-config.schemas.d.ts.map +0 -1
- package/dist/esm/notifications/email/email-template.shared.resources-config.schemas.js +0 -112
- package/dist/esm/notifications/email/email-template.shared.resources-config.schemas.js.map +0 -1
- package/dist/esm/notifications/email/email-template.shared.schemas.d.ts +0 -162
- package/dist/esm/notifications/email/email-template.shared.schemas.d.ts.map +0 -1
- package/dist/esm/notifications/email/email-template.shared.schemas.js +0 -189
- package/dist/esm/notifications/email/email-template.shared.schemas.js.map +0 -1
- package/dist/esm/organizations/organization-member-invitations.shared.resources-config.schemas.d.ts +0 -37
- package/dist/esm/organizations/organization-member-invitations.shared.resources-config.schemas.d.ts.map +0 -1
- package/dist/esm/organizations/organization-member-invitations.shared.resources-config.schemas.js +0 -207
- package/dist/esm/organizations/organization-member-invitations.shared.resources-config.schemas.js.map +0 -1
- package/dist/esm/resources/testing/SchemaDecoratorTestUtils.d.ts +0 -91
- package/dist/esm/resources/testing/SchemaDecoratorTestUtils.d.ts.map +0 -1
- package/dist/esm/resources/testing/SchemaDecoratorTestUtils.js +0 -325
- package/dist/esm/resources/testing/SchemaDecoratorTestUtils.js.map +0 -1
- package/dist/esm/runtime/companion-artifact-placement.shared.definitions.d.ts.map +0 -1
- package/dist/esm/runtime/companion-artifact-placement.shared.definitions.js.map +0 -1
- package/dist/esm/security/authentications/policy/auth-policy.shared.resources-config.schemas.d.ts +0 -10
- package/dist/esm/security/authentications/policy/auth-policy.shared.resources-config.schemas.d.ts.map +0 -1
- package/dist/esm/security/authentications/policy/auth-policy.shared.resources-config.schemas.js +0 -52
- package/dist/esm/security/authentications/policy/auth-policy.shared.resources-config.schemas.js.map +0 -1
- package/dist/esm/security/authentications/policy/auth-policy.shared.schemas.d.ts +0 -52
- package/dist/esm/security/authentications/policy/auth-policy.shared.schemas.d.ts.map +0 -1
- package/dist/esm/security/authentications/policy/auth-policy.shared.schemas.js +0 -40
- package/dist/esm/security/authentications/policy/auth-policy.shared.schemas.js.map +0 -1
- package/dist/esm/testing/schema-decorator-utils.d.ts +0 -91
- package/dist/esm/testing/schema-decorator-utils.d.ts.map +0 -1
- package/dist/esm/testing/schema-decorator-utils.js +0 -325
- package/dist/esm/testing/schema-decorator-utils.js.map +0 -1
|
@@ -3,18 +3,43 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Reusable operation schemas for bulk actions and common operations
|
|
5
5
|
*/
|
|
6
|
-
import { ExpiresInDurationSchema, getZodObjectShape, getZodType, isBackendOnlyField, isDiscriminatorField, isExcludedFromCreate, isExcludedFromUpdate, isSummaryField, isVirtualField, unwrapSchema } from '@wildo-ai/zod-decorators';
|
|
6
|
+
import { ExpiresInDurationSchema, getImpersonalizeMaskValue, getImpersonalizeTreatment, getZodObjectShape, getZodType, isBackendOnlyField, isDiscriminatorField, isExcludedFromCreate, isExcludedFromUpdate, isBusinessKeyField, isZodObject, isSummaryField, isTemplatableFileField, isVirtualField, SingleFileValueSchema, toPatchOptionalField, mainSchemaFieldIsClearable, unwrapSchema, getDataCategories, } from '@wildo-ai/zod-decorators';
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
import { ErrorType } from '../errors/errors.shared.schemas.js';
|
|
9
|
+
import { ErasureRetentionMode, ResourceDataSubjectKind, RetentionStatus, RetentionStatusSchema } from '../compliance/privacy/impersonalization.shared.schemas.js';
|
|
10
|
+
import { buildImpersonalizeScrubPatch, IMPERSONALIZE_MASK_CONSTANT, isImpersonalizeNeverScrubFloorField, resolveImpersonalizeMaskValue, } from '../compliance/privacy/impersonalization-scrub.shared.utils.js';
|
|
11
|
+
import { RedactionType } from '../compliance/privacy/redaction.shared.schemas.js';
|
|
12
|
+
import { unknownPersonalDataCategories } from '../compliance/privacy/personal-data-category.shared.schemas.js';
|
|
13
|
+
/*
|
|
14
|
+
* entrypoint-closure-waiver: this root-reachable module imports the external-data AUTHORING
|
|
15
|
+
* contract, which only `@wildo-ai/saas-models/external-data` publishes (see
|
|
16
|
+
* `external-data.exports.ts` for why that subpath exists).
|
|
17
|
+
*
|
|
18
|
+
* MEASURED SAFE 2026-08-29 by the probe `package-public-entrypoints.md` prescribes — a consumer
|
|
19
|
+
* importing ONLY the package root, re-exporting these surfaces and deriving their parameter types
|
|
20
|
+
* so declaration emit must WRITE them rather than alias them, compiled with `declaration: true`:
|
|
21
|
+
* zero TS2742 / TS2883 / TS7056, and the emitted `.d.ts` names `@wildo-ai/saas-models` with no
|
|
22
|
+
* `node_modules/...` path anywhere in it.
|
|
23
|
+
*
|
|
24
|
+
* The mechanism, so the next reader need not re-derive it: every crossing here is an EXPLICIT
|
|
25
|
+
* ANNOTATION inside this package, so TypeScript emits a RELATIVE intra-package import in our own
|
|
26
|
+
* `.d.ts` — which resolves by PATH for any consumer, whatever the exports map says. TS2742 bites
|
|
27
|
+
* only when TypeScript must INVENT a specifier for an INFERRED type. Re-run the probe if a
|
|
28
|
+
* root-exported contract here ever starts inferring one.
|
|
29
|
+
*/
|
|
30
|
+
import { HttpApiResourceBindingSchema, HttpApiTransportDialect, assertHttpApiBindingDialectCoherence } from '../http-api-binding/http-api-binding.shared.schemas.js';
|
|
31
|
+
import { ExternalDataDestinationPopulation, ExternalDataFieldCoercion, ExternalDataMappingEntryKind, ExternalDataPipelineDeclarationSchema, assertExternalDataPipelineDeclarationCoherence, } from '../external-data/external-data-pipeline.shared.schemas.js';
|
|
9
32
|
import { HttpMethod } from '../requests/http-requests.shared.js';
|
|
10
33
|
import { ConsumableToken_ConsumptionMode, TokenAuthenticationPolicy } from '../security/authentications/consumable-token.shared.schemas.js';
|
|
11
|
-
import { OPERATION_VARIANT_KEY, Resouces_BulkOperationBaseSchema, Resouces_Filter_BaseSchema, Resouces_Filter_DateRangeSchema,
|
|
34
|
+
import { OPERATION_VARIANT_KEY, Resouces_BulkOperationBaseSchema, Resouces_Filter_BaseSchema, Resouces_Filter_DateRangeSchema, createPaginationRequestSchema, createPaginationResponseMetadataSchema, ResourceGeneratedOperationKind, ResourceSystemAccessMode, PersistenceAdapter, SortOrder, ResourceCollectionExportResponseSchema, } from './resources-config.shared.schemas.js';
|
|
12
35
|
import { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from './resources.shared.core.definitions.js';
|
|
13
|
-
import { PRIMARY_SCOPE_FIELD_IDENTIFIERS, PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE, ResourceOperationRiskLevel, ResourceOperationVariantType, ResourceOperation_ServiceRuntimeMode, ResourceParentResourceRequirement, ResourcePrimaryScope, ResourceRelationshipBulkAction, ResourceRelationshipBulkActionResultSchema, ResourceRelationshipBulkClearOperationRequestSchema, ResourceRelationshipBulkCreateOperationRequestSchema, ResourceRelationshipBulkLinkOperationRequestSchema, ResourceRelationshipBulkReplaceOperationRequestSchema, ResourceRelationshipBulkSetOperationRequestSchema, ResourceRelationshipBulkUnlinkOperationRequestSchema, ResourceRelationshipAccessScopeStrategy, ResourceRelationshipCardinality, ResourceTranspositionPolicy } from './resources.shared.schemas.js';
|
|
36
|
+
import { PRIMARY_SCOPE_FIELD_IDENTIFIERS, PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE, FIELD_IDENTIFIER_TO_PRIMARY_SCOPE, RelationshipNature, ResourceOperationRiskLevel, ResourceOperationVariantType, ResourceOperation_ServiceRuntimeMode, ResourceParentResourceRequirement, ResourcePrimaryScope, ResourceRelationshipBulkAction, ResourceRelationshipBulkActionResultSchema, ResourceRelationshipBulkClearOperationRequestSchema, ResourceRelationshipBulkCreateOperationRequestSchema, ResourceRelationshipBulkLinkOperationRequestSchema, ResourceRelationshipBulkReplaceOperationRequestSchema, ResourceRelationshipBulkSetOperationRequestSchema, ResourceRelationshipBulkUnlinkOperationRequestSchema, ResourceRelationshipAccessScopeStrategy, ResourceRelationshipCardinality, ResourceTranspositionPolicy } from './resources.shared.schemas.js';
|
|
14
37
|
import { createResourcesRelationship } from './resources-relationships.shared.factory.js';
|
|
15
38
|
import { Resources_SharedUtils } from './resources.shared.utils.js';
|
|
16
39
|
import { ResourcesConfigOperationsDtosBuilderUtils } from './utils/resources-config-operations.dtos-builder.utils.js';
|
|
17
40
|
import { ResourcesSummaryUtils } from './utils/resources-summary.utils.js';
|
|
41
|
+
import { collectTemplatableFileFieldPaths, stripTemplatableFileFieldsRecursively } from './utils/templatable-file-fields.shared.utils.js';
|
|
42
|
+
import { isServiceResolvableDefaultOperation, SERVICE_RESOLVABLE_OPERATION_VARIANT_TYPES, URL_BEARING_OPERATION_VARIANT_TYPES, } from './utils/resource-operation-type-guards.utils.js';
|
|
18
43
|
// --------------------------------
|
|
19
44
|
// Error Helpers
|
|
20
45
|
// --------------------------------
|
|
@@ -22,6 +47,48 @@ import { ResourcesSummaryUtils } from './utils/resources-summary.utils.js';
|
|
|
22
47
|
* Creates a configuration error with ErrorType.CONFIGURATION
|
|
23
48
|
* Used for resource configuration validation errors at build time
|
|
24
49
|
*/
|
|
50
|
+
/**
|
|
51
|
+
* Reject an `.impersonalizeWith()` treatment declared BELOW the top level of a retention-governed
|
|
52
|
+
* resource's schema (gate G-FILE / scrub-coverage).
|
|
53
|
+
*
|
|
54
|
+
* The impersonalize writer builds its `$set` from the TOP-LEVEL shape only, and file links are stored
|
|
55
|
+
* under a dotted canonical path (`billingContact.signedMandate`). A nested treatment therefore never
|
|
56
|
+
* reaches the scrub patch and never matches a linked file's `linkedFieldName`: the row flips to
|
|
57
|
+
* RETAINED while the nested personal field — and any file beneath it — survive fully intact, with an
|
|
58
|
+
* audit event asserting the record was impersonalized.
|
|
59
|
+
*
|
|
60
|
+
* Recursive scrubbing (dotted-path patches + the matching file-path recursion) is deliberately out of
|
|
61
|
+
* v1 scope, so this fails at CONFIG BUILD instead of silently under-scrubbing at erasure time. Walks
|
|
62
|
+
* nested ZodObjects (through optional/nullable/default/array wrappers) and every discriminated-union
|
|
63
|
+
* option, mirroring how the runtime resolves field paths.
|
|
64
|
+
*/
|
|
65
|
+
function assertNoNestedImpersonalizeTreatment(schema, resourceIdentifier) {
|
|
66
|
+
const visited = new Set();
|
|
67
|
+
const walk = (candidate, path, isTopLevel) => {
|
|
68
|
+
if (!candidate || visited.has(candidate))
|
|
69
|
+
return;
|
|
70
|
+
visited.add(candidate);
|
|
71
|
+
if (!isTopLevel && getImpersonalizeTreatment(candidate) !== undefined) {
|
|
72
|
+
throw createConfigurationError(`[${resourceIdentifier}] field '${path}' declares an impersonalize treatment, but it is NESTED. ` +
|
|
73
|
+
`The scrub writes a top-level $set only, so a nested treatment would be silently ignored — the row ` +
|
|
74
|
+
`would flip to RETAINED with '${path}' (and any file linked under it) fully intact. Move the field to ` +
|
|
75
|
+
`the top level, or scrub the whole containing field instead (REMOVE on the parent object).`);
|
|
76
|
+
}
|
|
77
|
+
const shape = getZodObjectShape(unwrapSchema(candidate) ?? candidate);
|
|
78
|
+
for (const [childName, childSchema] of Object.entries(shape ?? {})) {
|
|
79
|
+
walk(childSchema, path ? `${path}.${childName}` : childName, false);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
// Top-level fields are legitimately treatable; only their DESCENDANTS are the problem.
|
|
83
|
+
const topLevelShape = getZodObjectShape(schema);
|
|
84
|
+
for (const [fieldName, fieldSchema] of Object.entries(topLevelShape ?? {})) {
|
|
85
|
+
const unwrapped = unwrapSchema(fieldSchema) ?? fieldSchema;
|
|
86
|
+
const nestedShape = getZodObjectShape(unwrapped);
|
|
87
|
+
for (const [childName, childSchema] of Object.entries(nestedShape ?? {})) {
|
|
88
|
+
walk(childSchema, `${fieldName}.${childName}`, false);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
25
92
|
function createConfigurationError(message) {
|
|
26
93
|
const error = new Error(message);
|
|
27
94
|
error.type = ErrorType.CONFIGURATION;
|
|
@@ -36,9 +103,51 @@ function createValidationError(message) {
|
|
|
36
103
|
error.type = ErrorType.VALIDATION;
|
|
37
104
|
return error;
|
|
38
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Reads the shared authority rather than re-listing the members: the URL-bearing
|
|
108
|
+
* set is consumed by the route-mount gate, the URL/DTO resolver and this factory,
|
|
109
|
+
* and a variant type added to one copy but not another silently changes which
|
|
110
|
+
* operations get routes.
|
|
111
|
+
*/
|
|
112
|
+
function isUrlisableOperationVariantType(variantType) {
|
|
113
|
+
return URL_BEARING_OPERATION_VARIANT_TYPES.includes(variantType);
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The operations a `retentionPolicy` resource must expose to the SERVICE dispatch
|
|
117
|
+
* layer, with the retention primitive that needs each one.
|
|
118
|
+
*
|
|
119
|
+
* Every entry is consumed by BOTH halves of the retention operation contract — the
|
|
120
|
+
* presence check (is it declared in `coreOperations`?) and the resolvability check
|
|
121
|
+
* (does it have a default variant `getServiceOperationPathDefault` can serve?) — so
|
|
122
|
+
* adding a fourth primitive here extends both at once. Listing the ops twice is how
|
|
123
|
+
* a primitive gets a presence guard and no resolvability guard.
|
|
124
|
+
*/
|
|
125
|
+
const RETENTION_REQUIRED_SERVICE_RESOLVABLE_OPERATIONS = [
|
|
126
|
+
{
|
|
127
|
+
operation: CoreResourceOperation.UPDATE_MANY,
|
|
128
|
+
primitive: 'updateManyAsSystem',
|
|
129
|
+
why: 'the impersonalize writer scrubs rows in place via updateManyAsSystem',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
operation: CoreResourceOperation.READ,
|
|
133
|
+
primitive: 'readRetainedAsSystem',
|
|
134
|
+
why: 'the see-through read primitive readRetainedAsSystem surfaces a single retained record via READ',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
operation: CoreResourceOperation.LIST,
|
|
138
|
+
primitive: 'listRetainedAsSystem',
|
|
139
|
+
why: 'the see-through read primitive listRetainedAsSystem surfaces retained records via LIST',
|
|
140
|
+
},
|
|
141
|
+
];
|
|
142
|
+
function assertOperationPathKeySegment(value, label, operation) {
|
|
143
|
+
if (value.includes(' | ')) {
|
|
144
|
+
throw createConfigurationError(`Operation '${operation}' cannot use ${label} '${value}' because operation path keys reserve the delimiter ' | '`);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
39
147
|
function createGeneratedRelationshipBulkOperations(operations, relevantRelationships, resourceIdentifier, allResourceFieldIdentifiers) {
|
|
40
|
-
const baseBulkUpdateOperations = operations.filter((operation) => operation.variantType
|
|
148
|
+
const baseBulkUpdateOperations = operations.filter((operation) => isUrlisableOperationVariantType(operation.variantType)
|
|
41
149
|
&& operation.operationIdentifier === CoreResourceOperation.UPDATE
|
|
150
|
+
&& 'isBulkOperation' in operation
|
|
42
151
|
&& operation.isBulkOperation === true);
|
|
43
152
|
if (baseBulkUpdateOperations.length > 1) {
|
|
44
153
|
throw createConfigurationError(`[${resourceIdentifier}] generated bulk relationship operations require exactly one API bulk UPDATE base operation, but found ${baseBulkUpdateOperations.length}`);
|
|
@@ -82,6 +191,9 @@ function createGeneratedRelationshipBulkOperations(operations, relevantRelations
|
|
|
82
191
|
isBulkOperation: true,
|
|
83
192
|
resourceOperationLike: CoreResourceOperation.UPDATE_MANY,
|
|
84
193
|
requestDto,
|
|
194
|
+
// Generated bulk-relationship ops own an explicit request contract (the
|
|
195
|
+
// bulk action schema above) — preserve it verbatim, never rebuild.
|
|
196
|
+
hasCustomRequestDto: true,
|
|
85
197
|
responseDto: ResourceRelationshipBulkActionResultSchema,
|
|
86
198
|
hasCustomResponseDto: true,
|
|
87
199
|
basicPrefixOperation: undefined,
|
|
@@ -110,9 +222,188 @@ export function reconcileGeneratedRelationshipBulkOperations(resourceConfigurati
|
|
|
110
222
|
];
|
|
111
223
|
}
|
|
112
224
|
}
|
|
225
|
+
/**
|
|
226
|
+
* Derive the CSV/JSON export companion of every LIST/SEARCH operation that declared
|
|
227
|
+
* `collectionExport`.
|
|
228
|
+
*
|
|
229
|
+
* ## Why derived rather than authored
|
|
230
|
+
*
|
|
231
|
+
* The export must be exactly as reachable as the listing it exports — never more. Copying the source
|
|
232
|
+
* operation wholesale and overriding only what must differ makes that structural: an author cannot
|
|
233
|
+
* give the export wider `roles`, a different parent-scope path, or a laxer variant, because they
|
|
234
|
+
* never write it. It is the same construction `createGeneratedFileRegenerateOperations` uses one
|
|
235
|
+
* function above.
|
|
236
|
+
*
|
|
237
|
+
* ## What is deliberately CLEARED rather than inherited
|
|
238
|
+
*
|
|
239
|
+
* `mcp` is the one that matters. A LIST curated onto an MCP server is a PAGINATED read tool; its
|
|
240
|
+
* export companion returns the whole result set in a single call, which is a different risk profile.
|
|
241
|
+
* Spreading the source operation would silently turn "this app declared an export" into "this app
|
|
242
|
+
* grew a new agent tool that exfiltrates the table", so the flag is dropped and an application that
|
|
243
|
+
* genuinely wants an agent-callable export has to say so.
|
|
244
|
+
*
|
|
245
|
+
* The notification/token fields are cleared for the same reason they are on the regenerate
|
|
246
|
+
* companion: they describe effects of the SOURCE operation and firing them again on an export would
|
|
247
|
+
* double-notify.
|
|
248
|
+
*/
|
|
249
|
+
function createGeneratedCollectionExportOperations(params) {
|
|
250
|
+
const knownOperationIdentifiers = new Set(params.operations.map((operation) => String(operation.operationIdentifier)));
|
|
251
|
+
const exportOperations = [];
|
|
252
|
+
for (const operation of params.operations) {
|
|
253
|
+
const exportConfig = operation.collectionExport;
|
|
254
|
+
if (!exportConfig) {
|
|
255
|
+
continue;
|
|
256
|
+
}
|
|
257
|
+
const sourceOperationIdentifier = String(operation.operationIdentifier);
|
|
258
|
+
if (!isUrlisableOperationVariantType(operation.variantType)) {
|
|
259
|
+
throw createConfigurationError(`[${params.resourceIdentifier}] operation "${sourceOperationIdentifier}" declares collectionExport but is not URL-bearing; an export has no route to live on`);
|
|
260
|
+
}
|
|
261
|
+
// The source's CORE verb decides which service call the export re-runs, and it is the only thing
|
|
262
|
+
// that can: a custom operation carries LIST/SEARCH semantics through `resourceOperationLike`.
|
|
263
|
+
const sourceCoreOperation = (operation.resourceOperationLike ?? operation.operationIdentifier);
|
|
264
|
+
if (sourceCoreOperation !== CoreResourceOperation.LIST && sourceCoreOperation !== CoreResourceOperation.SEARCH) {
|
|
265
|
+
throw createConfigurationError(`[${params.resourceIdentifier}] operation "${sourceOperationIdentifier}" declares collectionExport but is neither LIST nor SEARCH (resolved core operation: ${String(sourceCoreOperation)})`);
|
|
266
|
+
}
|
|
267
|
+
// Empty arrays are a startup error, never a silent "offer everything" — the same rule
|
|
268
|
+
// `mcp.servers` follows, so the declaration always reads as "exactly these".
|
|
269
|
+
if (!exportConfig.formats || exportConfig.formats.length === 0) {
|
|
270
|
+
throw createConfigurationError(`[${params.resourceIdentifier}] operation "${sourceOperationIdentifier}" declares collectionExport with no formats; declare at least one, or omit collectionExport entirely`);
|
|
271
|
+
}
|
|
272
|
+
if (!exportConfig.rowScopes || exportConfig.rowScopes.length === 0) {
|
|
273
|
+
throw createConfigurationError(`[${params.resourceIdentifier}] operation "${sourceOperationIdentifier}" declares collectionExport with no rowScopes; declare at least one, or omit collectionExport entirely`);
|
|
274
|
+
}
|
|
275
|
+
if (exportConfig.maximumExportedRows !== undefined && exportConfig.maximumExportedRows <= 0) {
|
|
276
|
+
throw createConfigurationError(`[${params.resourceIdentifier}] operation "${sourceOperationIdentifier}" declares a non-positive collectionExport.maximumExportedRows; omit it for no ceiling`);
|
|
277
|
+
}
|
|
278
|
+
const operationIdentifier = Resources_SharedUtils.buildGeneratedCollectionExportOperationIdentifier(sourceOperationIdentifier);
|
|
279
|
+
if (knownOperationIdentifiers.has(operationIdentifier)) {
|
|
280
|
+
throw createConfigurationError(`[${params.resourceIdentifier}] generated collection export operation "${operationIdentifier}" collides with an existing operation identifier`);
|
|
281
|
+
}
|
|
282
|
+
knownOperationIdentifiers.add(operationIdentifier);
|
|
283
|
+
exportOperations.push({
|
|
284
|
+
...operation,
|
|
285
|
+
operationIdentifier,
|
|
286
|
+
isDefault: false,
|
|
287
|
+
isOperationDefault: false,
|
|
288
|
+
isBulkOperation: false,
|
|
289
|
+
httpVerb: HttpMethod.GET,
|
|
290
|
+
// Keeps the URL builder treating it as collection-level, and gives a SEARCH export the
|
|
291
|
+
// `search` segment its source already has — so the two exports of one resource cannot collide.
|
|
292
|
+
resourceOperationLike: sourceCoreOperation,
|
|
293
|
+
generatedOperation: {
|
|
294
|
+
kind: ResourceGeneratedOperationKind.GENERATED_COLLECTION_EXPORT,
|
|
295
|
+
sourceOperationIdentifier,
|
|
296
|
+
sourceCoreOperation,
|
|
297
|
+
export: exportConfig,
|
|
298
|
+
},
|
|
299
|
+
// The export takes the SOURCE's query contract (filters, sort, q, pagination) verbatim plus its
|
|
300
|
+
// own two selectors, so "export what I am looking at" is expressible without a second grammar.
|
|
301
|
+
responseDto: ResourceCollectionExportResponseSchema,
|
|
302
|
+
internalDto: ResourceCollectionExportResponseSchema,
|
|
303
|
+
hasCustomResponseDto: true,
|
|
304
|
+
// Cleared, not inherited — see this function's docstring.
|
|
305
|
+
mcp: undefined,
|
|
306
|
+
collectionExport: undefined,
|
|
307
|
+
basicPrefixOperation: undefined,
|
|
308
|
+
notificationBadgeOperations: [],
|
|
309
|
+
userNotifications: [],
|
|
310
|
+
m2mNotifications: [],
|
|
311
|
+
tokenGeneration: undefined,
|
|
312
|
+
tokenRevocation: undefined,
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
return exportOperations;
|
|
316
|
+
}
|
|
317
|
+
function createGeneratedFileRegenerateOperations(params) {
|
|
318
|
+
const generatedFileDiscoverySchema = params.generatedFileDiscoverySchema ?? params.mainSchema;
|
|
319
|
+
const collectedFields = collectTemplatableFileFieldPaths(generatedFileDiscoverySchema);
|
|
320
|
+
const arrayContainedFields = collectedFields.filter((field) => field.isInsideArray);
|
|
321
|
+
if (arrayContainedFields.length > 0) {
|
|
322
|
+
throw createConfigurationError(`[${params.resourceIdentifier}] generated PDF file fields inside arrays or dynamic containers are not supported in v1: ${arrayContainedFields.map((field) => field.fieldName).join(', ')}`);
|
|
323
|
+
}
|
|
324
|
+
const generatedFields = collectedFields.filter((field) => !field.isInsideArray);
|
|
325
|
+
if (generatedFields.length === 0) {
|
|
326
|
+
return [];
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Generated PDF file fields are MongoDB-only in v1, so the guard names what IS supported rather
|
|
330
|
+
* than one adapter that is not: `=== POSTGRESQL` would let any future backing kind slip past as
|
|
331
|
+
* if it were supported. `undefined` stays admitted — it means "the application's default
|
|
332
|
+
* adapter", which this shared-tier factory cannot resolve; the backend registry is where an
|
|
333
|
+
* undeclared adapter gets its concrete answer.
|
|
334
|
+
*/
|
|
335
|
+
if (params.persistenceAdapter !== undefined && params.persistenceAdapter !== PersistenceAdapter.MONGODB) {
|
|
336
|
+
throw createConfigurationError(`[${params.resourceIdentifier}] generated PDF file fields are only supported for MongoDB-backed resources in v1 `
|
|
337
|
+
+ `(declared adapter: '${String(params.persistenceAdapter)}'): ${generatedFields.map((field) => field.fieldName).join(', ')}`);
|
|
338
|
+
}
|
|
339
|
+
const baseUpdateOperation = params.operations.find((operation) => isUrlisableOperationVariantType(operation.variantType)
|
|
340
|
+
&& operation.operationIdentifier === CoreResourceOperation.UPDATE
|
|
341
|
+
&& 'isBulkOperation' in operation
|
|
342
|
+
&& operation.isBulkOperation !== true
|
|
343
|
+
&& operation.isOperationDefault === true);
|
|
344
|
+
if (!baseUpdateOperation) {
|
|
345
|
+
throw createConfigurationError(`[${params.resourceIdentifier}] generated file regenerate operations require a default non-bulk URL-bearing UPDATE operation`);
|
|
346
|
+
}
|
|
347
|
+
const knownOperationIdentifiers = new Set(params.operations.map((operation) => String(operation.operationIdentifier)));
|
|
348
|
+
const responseDto = z.object({
|
|
349
|
+
file: SingleFileValueSchema,
|
|
350
|
+
resource: generatedFileDiscoverySchema,
|
|
351
|
+
});
|
|
352
|
+
return generatedFields.map(({ fieldName }) => {
|
|
353
|
+
const operationIdentifier = Resources_SharedUtils.buildGeneratedFileRegenerateOperationIdentifier(fieldName);
|
|
354
|
+
if (knownOperationIdentifiers.has(operationIdentifier)) {
|
|
355
|
+
throw createConfigurationError(`[${params.resourceIdentifier}] generated file regenerate operation "${operationIdentifier}" collides with an existing operation identifier`);
|
|
356
|
+
}
|
|
357
|
+
knownOperationIdentifiers.add(operationIdentifier);
|
|
358
|
+
return {
|
|
359
|
+
...baseUpdateOperation,
|
|
360
|
+
operationIdentifier,
|
|
361
|
+
isDefault: false,
|
|
362
|
+
isOperationDefault: false,
|
|
363
|
+
isBulkOperation: false,
|
|
364
|
+
httpVerb: HttpMethod.POST,
|
|
365
|
+
resourceOperationLike: CoreResourceOperation.UPDATE,
|
|
366
|
+
generatedOperation: {
|
|
367
|
+
kind: ResourceGeneratedOperationKind.GENERATED_FILE_REGENERATE,
|
|
368
|
+
fieldName,
|
|
369
|
+
},
|
|
370
|
+
requestDto: z.object({}),
|
|
371
|
+
// Generated file-regenerate ops own their request contract: an intentionally
|
|
372
|
+
// empty body (regeneration is UPDATE-like but takes no input). Preserve it,
|
|
373
|
+
// do not rebuild from mainSchema decorators.
|
|
374
|
+
hasCustomRequestDto: true,
|
|
375
|
+
responseDto,
|
|
376
|
+
internalDto: responseDto,
|
|
377
|
+
hasCustomResponseDto: true,
|
|
378
|
+
basicPrefixOperation: undefined,
|
|
379
|
+
notificationBadgeOperations: [],
|
|
380
|
+
userNotifications: [],
|
|
381
|
+
m2mNotifications: [],
|
|
382
|
+
tokenGeneration: undefined,
|
|
383
|
+
tokenRevocation: undefined,
|
|
384
|
+
};
|
|
385
|
+
});
|
|
386
|
+
}
|
|
113
387
|
// --------------------------------
|
|
114
388
|
// Token Config Validation
|
|
115
389
|
// --------------------------------
|
|
390
|
+
const BULK_MUTATION_CORE_OPERATIONS = new Set([
|
|
391
|
+
CoreResourceOperation.CREATE_MANY,
|
|
392
|
+
CoreResourceOperation.UPDATE_MANY,
|
|
393
|
+
CoreResourceOperation.DELETE_MANY,
|
|
394
|
+
]);
|
|
395
|
+
const TOKEN_STATE_EFFECT_UNSUPPORTED_CORE_OPERATIONS = new Set([
|
|
396
|
+
...BULK_MUTATION_CORE_OPERATIONS,
|
|
397
|
+
CoreResourceOperation.LIST,
|
|
398
|
+
CoreResourceOperation.SEARCH,
|
|
399
|
+
CoreResourceOperation.COUNT,
|
|
400
|
+
]);
|
|
401
|
+
function isCoreBulkMutationOperation(operationIdentifier) {
|
|
402
|
+
return BULK_MUTATION_CORE_OPERATIONS.has(operationIdentifier);
|
|
403
|
+
}
|
|
404
|
+
function isTokenStateEffectUnsupportedOperation(operationIdentifier) {
|
|
405
|
+
return TOKEN_STATE_EFFECT_UNSUPPORTED_CORE_OPERATIONS.has(operationIdentifier);
|
|
406
|
+
}
|
|
116
407
|
/**
|
|
117
408
|
* Validates tokenGeneration configuration at build time.
|
|
118
409
|
* Catches common mistakes before the app starts.
|
|
@@ -191,8 +482,17 @@ function normalizeRequiredFeatures(input) {
|
|
|
191
482
|
/**
|
|
192
483
|
* Fields always excluded from create/update DTOs (system-managed)
|
|
193
484
|
* These are hardcoded because they are universal across all resources.
|
|
485
|
+
*
|
|
486
|
+
* `createdByUserId` is a reserved audit FK by framework convention: the
|
|
487
|
+
* repository layer auto-stamps it from the execution context on CREATE
|
|
488
|
+
* (see RepositoryResource data enrichment) and it is immutable afterwards,
|
|
489
|
+
* so clients never author it. Request DTOs must omit it even when the app
|
|
490
|
+
* schema forgets `.excludeFromCreate()` — otherwise create forms validate
|
|
491
|
+
* against a field no form collects and every submit fails
|
|
492
|
+
* ("expected string, received undefined"; recovered 2026-06-11 on the
|
|
493
|
+
* Wonder Todos todoLists create form).
|
|
194
494
|
*/
|
|
195
|
-
const SYSTEM_MANAGED_FIELDS = ['_id', 'createdAt', 'updatedAt', 'deletedAt', '_version_db_doc'];
|
|
495
|
+
const SYSTEM_MANAGED_FIELDS = ['_id', 'createdAt', 'updatedAt', 'deletedAt', 'createdByUserId', '_version_db_doc'];
|
|
196
496
|
// PRIMARY_SCOPE_FIELD_IDENTIFIERS and getPrimaryScopeFieldIdentifier imported from resources.shared.schemas
|
|
197
497
|
/**
|
|
198
498
|
* Build a CREATE request DTO from the main schema using decorators.
|
|
@@ -211,7 +511,7 @@ const SYSTEM_MANAGED_FIELDS = ['_id', 'createdAt', 'updatedAt', 'deletedAt', '_v
|
|
|
211
511
|
* @param customExclusions - Additional fields to exclude
|
|
212
512
|
* @returns A new schema with only creatable fields
|
|
213
513
|
*/
|
|
214
|
-
function buildCreateRequestDto(mainSchema, customExclusions) {
|
|
514
|
+
export function buildCreateRequestDto(mainSchema, customExclusions) {
|
|
215
515
|
try {
|
|
216
516
|
const shape = getZodObjectShape(mainSchema);
|
|
217
517
|
const createShape = {};
|
|
@@ -229,6 +529,10 @@ function buildCreateRequestDto(mainSchema, customExclusions) {
|
|
|
229
529
|
// Exclude explicitly marked fields
|
|
230
530
|
if (isExcludedFromCreate(typedSchema))
|
|
231
531
|
continue;
|
|
532
|
+
// Exclude generated file fields; clients cannot upload or author values
|
|
533
|
+
// that are materialized by framework-owned operations.
|
|
534
|
+
if (isTemplatableFileField(typedSchema))
|
|
535
|
+
continue;
|
|
232
536
|
// NOTE: Backend-only fields are NOT excluded here.
|
|
233
537
|
// isBackendOnly controls response filtering, not request filtering.
|
|
234
538
|
// Backend operations need to set fields like passwordHash directly.
|
|
@@ -240,9 +544,9 @@ function buildCreateRequestDto(mainSchema, customExclusions) {
|
|
|
240
544
|
// Exclude custom exclusions
|
|
241
545
|
if (customExclusions?.includes(fieldName))
|
|
242
546
|
continue;
|
|
243
|
-
createShape[fieldName] = fieldSchema;
|
|
547
|
+
createShape[fieldName] = stripTemplatableFileFieldsRecursively(fieldSchema);
|
|
244
548
|
}
|
|
245
|
-
return z.object(createShape);
|
|
549
|
+
return stripTemplatableFileFieldsRecursively(z.object(createShape));
|
|
246
550
|
}
|
|
247
551
|
catch {
|
|
248
552
|
// If schema is not an object, return as-is
|
|
@@ -286,6 +590,10 @@ function buildUpdateRequestDto(mainSchema, customExclusions) {
|
|
|
286
590
|
// Exclude explicitly marked fields
|
|
287
591
|
if (isExcludedFromUpdate(typedSchema))
|
|
288
592
|
continue;
|
|
593
|
+
// Exclude generated file fields; explicit regenerate operations own
|
|
594
|
+
// refreshing these values instead of generic UPDATE payloads.
|
|
595
|
+
if (isTemplatableFileField(typedSchema))
|
|
596
|
+
continue;
|
|
289
597
|
// NOTE: Backend-only fields are NOT excluded here.
|
|
290
598
|
// isBackendOnly controls response filtering, not request filtering.
|
|
291
599
|
// Backend operations may need to update fields like passwordHash.
|
|
@@ -296,10 +604,12 @@ function buildUpdateRequestDto(mainSchema, customExclusions) {
|
|
|
296
604
|
// Exclude custom exclusions
|
|
297
605
|
if (customExclusions?.includes(fieldName))
|
|
298
606
|
continue;
|
|
299
|
-
// Make field optional for PATCH-style update
|
|
300
|
-
|
|
607
|
+
// Make field optional for PATCH-style update, peeling any `.default()` so
|
|
608
|
+
// an omitted field is never re-materialized to its default and written
|
|
609
|
+
// back over the stored value (see `toPatchOptionalField`).
|
|
610
|
+
updateShape[fieldName] = toPatchOptionalField(stripTemplatableFileFieldsRecursively(fieldSchema));
|
|
301
611
|
}
|
|
302
|
-
return z.object(updateShape);
|
|
612
|
+
return stripTemplatableFileFieldsRecursively(z.object(updateShape));
|
|
303
613
|
}
|
|
304
614
|
catch {
|
|
305
615
|
// If schema is not an object, return as-is
|
|
@@ -311,7 +621,12 @@ function buildUpdateRequestDto(mainSchema, customExclusions) {
|
|
|
311
621
|
*
|
|
312
622
|
* - CREATE: Uses buildCreateRequestDto (excludes excludeFromCreate fields)
|
|
313
623
|
* - UPDATE: Uses buildUpdateRequestDto (excludes excludeFromUpdate fields, all partial)
|
|
314
|
-
* -
|
|
624
|
+
* - READ/DELETE and custom operations without an explicit DTO: empty object
|
|
625
|
+
*
|
|
626
|
+
* This is an early factory placeholder. The final DTO pass in
|
|
627
|
+
* ResourcesConfigOperationsDtosBuilderUtils applies inherited schemas, the
|
|
628
|
+
* shared no-body operation policy, and SEARCH query schemas derived from
|
|
629
|
+
* collection-view metadata.
|
|
315
630
|
*
|
|
316
631
|
* @param operation - The operation identifier
|
|
317
632
|
* @param mainSchema - The main resource schema
|
|
@@ -321,7 +636,7 @@ function buildUpdateRequestDto(mainSchema, customExclusions) {
|
|
|
321
636
|
export function deriveRequestDto(operation, mainSchema, providedDto) {
|
|
322
637
|
// If explicit DTO is provided, use it (for custom operations)
|
|
323
638
|
if (providedDto !== undefined) {
|
|
324
|
-
return providedDto;
|
|
639
|
+
return stripTemplatableFileFieldsRecursively(providedDto);
|
|
325
640
|
}
|
|
326
641
|
// Auto-derive based on operation type
|
|
327
642
|
switch (operation) {
|
|
@@ -479,6 +794,32 @@ function transformResourceRelationships(resourceRelationships, resourceIdentifie
|
|
|
479
794
|
// PROCESS MANY-TO-MANY JOINT RESOURCE RELATIONSHIPS
|
|
480
795
|
// ========================================
|
|
481
796
|
const compileSyntheticRelationship = (relationshipDeclaration) => Resources_SharedUtils.compileRelationshipDeclaration(relationshipDeclaration);
|
|
797
|
+
/**
|
|
798
|
+
* Build the synthetic **scope-anchored peer-under-scope** edge for an M:N
|
|
799
|
+
* (scope-required reference search). It makes a target peer `T` addressable
|
|
800
|
+
* UNDER the other peer `S` for SEARCH/LIST ONLY — e.g.
|
|
801
|
+
* `/organizations/{organizationId}/users/search` — and tags it with the
|
|
802
|
+
* junction `J` so the backend (a) scopes the `T` query via a junction subquery
|
|
803
|
+
* (`T._id ∈ { J.targetFk : J.scopeFk = S_id }` — `T` holds no real FK column
|
|
804
|
+
* for `S`) and (b) authorizes by `S`-membership instead of `T`'s own scope.
|
|
805
|
+
* `OPTIONAL_CONTEXT` so the bare `/users/search` (global) route also survives;
|
|
806
|
+
* `urlOperationScope` keeps this off READ/CREATE/UPDATE/DELETE routes (a
|
|
807
|
+
* peer-under-scope path is a read-only access pattern).
|
|
808
|
+
*/
|
|
809
|
+
const buildScopeAnchoredPeerEdge = (scopeType, targetType, junction, isDisabled) => compileSyntheticRelationship({
|
|
810
|
+
cardinality1: ResourceRelationshipCardinality.ONE, // one scope S
|
|
811
|
+
cardinality2: ResourceRelationshipCardinality.MANY, // many targets T
|
|
812
|
+
resourceType1: scopeType, // S — the URL parent (anchor scope)
|
|
813
|
+
resourceType2: targetType, // T — the searched collection (current peer)
|
|
814
|
+
nature: RelationshipNature.REFERENCE,
|
|
815
|
+
parentResourceRequirement: ResourceParentResourceRequirement.OPTIONAL,
|
|
816
|
+
accessScopeStrategy: ResourceRelationshipAccessScopeStrategy.OPTIONAL_CONTEXT,
|
|
817
|
+
isPrimaryScope: false,
|
|
818
|
+
isDisabled,
|
|
819
|
+
allowCycle: false,
|
|
820
|
+
scopeViaJunction: junction,
|
|
821
|
+
urlOperationScope: [CoreResourceOperation.SEARCH, CoreResourceOperation.LIST],
|
|
822
|
+
});
|
|
482
823
|
// Find many-to-many relationships with joint resource types (from ALL active relationships,
|
|
483
824
|
// including those with discriminators — a conditional M:N is still an M:N)
|
|
484
825
|
const manyToManyRelationships = activeRelationships.filter(rel => rel.cardinality1 === ResourceRelationshipCardinality.MANY &&
|
|
@@ -578,6 +919,9 @@ function transformResourceRelationships(resourceRelationships, resourceIdentifie
|
|
|
578
919
|
display: m2mRel.display,
|
|
579
920
|
});
|
|
580
921
|
additionalRelationships.push(relationToJoint);
|
|
922
|
+
// Scope-anchored read edge: this resource (entity1, the target T) becomes
|
|
923
|
+
// addressable under entity2 (the scope S) for SEARCH/LIST via the junction.
|
|
924
|
+
additionalRelationships.push(buildScopeAnchoredPeerEdge(entity2Type, resourceIdentifier, jointResourceType, m2mRel.isDisabled || false));
|
|
581
925
|
}
|
|
582
926
|
else if (resourceIdentifier === entity2Type) {
|
|
583
927
|
// ========================================
|
|
@@ -609,6 +953,9 @@ function transformResourceRelationships(resourceRelationships, resourceIdentifie
|
|
|
609
953
|
display: m2mRel.display,
|
|
610
954
|
});
|
|
611
955
|
additionalRelationships.push(relationToJoint);
|
|
956
|
+
// Scope-anchored read edge: this resource (entity2, the target T) becomes
|
|
957
|
+
// addressable under entity1 (the scope S) for SEARCH/LIST via the junction.
|
|
958
|
+
additionalRelationships.push(buildScopeAnchoredPeerEdge(entity1Type, resourceIdentifier, jointResourceType, m2mRel.isDisabled || false));
|
|
612
959
|
}
|
|
613
960
|
});
|
|
614
961
|
// Add the additional relationships to the appropriate categories
|
|
@@ -851,7 +1198,9 @@ function createResourcePaginatedResponseSchema(params) {
|
|
|
851
1198
|
// Create the result schema with comprehensive validation
|
|
852
1199
|
const resultSchema = z.object({
|
|
853
1200
|
data: createDataArraySchema(dataSchema),
|
|
854
|
-
|
|
1201
|
+
// Bounded by the SAME ceiling as the data array above. `limit` reports the page size actually
|
|
1202
|
+
// served, so a stricter bound here rejects pages this very schema just declared valid.
|
|
1203
|
+
pagination: createPaginationResponseMetadataSchema(maxResultsPerPageLimit)
|
|
855
1204
|
}).refine(validatePaginatedResponse, {
|
|
856
1205
|
message: "Invalid paginated response structure"
|
|
857
1206
|
});
|
|
@@ -860,8 +1209,23 @@ function createResourcePaginatedResponseSchema(params) {
|
|
|
860
1209
|
// --------------------------------
|
|
861
1210
|
// Resource Search Query Request
|
|
862
1211
|
// --------------------------------
|
|
863
|
-
|
|
864
|
-
|
|
1212
|
+
/**
|
|
1213
|
+
* The ONE authority for the `{ pagination, sorting, filters }` argument envelope every
|
|
1214
|
+
* collection-shaped operation accepts.
|
|
1215
|
+
*
|
|
1216
|
+
* Exported rather than factory-private because a second surface needs the identical shape: the MCP
|
|
1217
|
+
* tool adapter advertises this envelope for collection tools whose `requestDto` is empty. A LIST
|
|
1218
|
+
* operation keeps `requestDto: z.object({})` — its filters travel in the QUERY STRING over HTTP, so
|
|
1219
|
+
* giving it a request BODY would misdescribe the REST contract and the generated OpenAPI — yet the
|
|
1220
|
+
* MCP dispatch normalises the very same envelope for it. Advertising had to be fixed without
|
|
1221
|
+
* touching the DTO, and that means this builder is reachable from both places.
|
|
1222
|
+
*
|
|
1223
|
+
* Deriving the shape a second time in the adapter was the rejected alternative: a filter allow-list
|
|
1224
|
+
* that drifts between the surface that ADVERTISES it and the surface that ENFORCES it is precisely
|
|
1225
|
+
* the defect class this envelope already caused once.
|
|
1226
|
+
*/
|
|
1227
|
+
export function createResourceSearchQueryRequestSchema(params) {
|
|
1228
|
+
const { filterFields, allowedSortFields = [], pagination = true, maxPaginatedResultPerPageLimit } = params;
|
|
865
1229
|
// Validate input parameters
|
|
866
1230
|
if (filterFields !== undefined && typeof filterFields !== 'object') {
|
|
867
1231
|
throw createConfigurationError('Filter fields must be an object');
|
|
@@ -913,9 +1277,14 @@ function createResourceSearchQueryRequestSchema(params) {
|
|
|
913
1277
|
};
|
|
914
1278
|
// Build the schema dynamically based on parameters
|
|
915
1279
|
const schemaConfig = {};
|
|
916
|
-
// Add pagination if enabled
|
|
1280
|
+
// Add pagination if enabled.
|
|
1281
|
+
//
|
|
1282
|
+
// Built from the operation's ceiling rather than the shared default-bounded constant, so the limit
|
|
1283
|
+
// a caller may REQUEST, the limit the repository will SERVE and the limit the response DTO ACCEPTS
|
|
1284
|
+
// are one number. They were three, and the request side was the strictest — which is why a
|
|
1285
|
+
// declared ceiling above 100 was unreachable over HTTP no matter what the other two allowed.
|
|
917
1286
|
if (pagination) {
|
|
918
|
-
schemaConfig.pagination =
|
|
1287
|
+
schemaConfig.pagination = createPaginationRequestSchema(maxPaginatedResultPerPageLimit).optional();
|
|
919
1288
|
}
|
|
920
1289
|
// Add sorting if allowed fields are provided
|
|
921
1290
|
if (allowedSortFields && allowedSortFields.length > 0) {
|
|
@@ -937,12 +1306,17 @@ function getDefaultHttpVerbForOperation(operation) {
|
|
|
937
1306
|
switch (operation) {
|
|
938
1307
|
case CoreResourceOperation.READ:
|
|
939
1308
|
case CoreResourceOperation.LIST:
|
|
1309
|
+
case CoreResourceOperation.SEARCH:
|
|
1310
|
+
case CoreResourceOperation.COUNT:
|
|
940
1311
|
return HttpMethod.GET;
|
|
941
1312
|
case CoreResourceOperation.CREATE:
|
|
1313
|
+
case CoreResourceOperation.CREATE_MANY:
|
|
942
1314
|
return HttpMethod.POST;
|
|
943
1315
|
case CoreResourceOperation.UPDATE:
|
|
1316
|
+
case CoreResourceOperation.UPDATE_MANY:
|
|
944
1317
|
return HttpMethod.PUT;
|
|
945
1318
|
case CoreResourceOperation.DELETE:
|
|
1319
|
+
case CoreResourceOperation.DELETE_MANY:
|
|
946
1320
|
return HttpMethod.DELETE;
|
|
947
1321
|
default:
|
|
948
1322
|
return HttpMethod.POST; // Default for unknown operations
|
|
@@ -952,16 +1326,31 @@ function getDefaultHttpVerbForOperation(operation) {
|
|
|
952
1326
|
* Determines if an operation variant should be marked as the default operation within its variantType group
|
|
953
1327
|
* Handles the complex logic for single vs multiple variants and explicit defaults
|
|
954
1328
|
*
|
|
955
|
-
* Rules:
|
|
956
|
-
* 1. If only one variant exists in the group, it becomes default
|
|
957
|
-
*
|
|
958
|
-
*
|
|
959
|
-
*
|
|
1329
|
+
* Rules after validation:
|
|
1330
|
+
* 1. If only one variant exists in the group, it becomes the group default UNLESS the author
|
|
1331
|
+
* explicitly opted it out with `isDefault: false`. An omitted/`undefined` `isDefault` still
|
|
1332
|
+
* becomes the group default — only an explicit `false` is honored.
|
|
1333
|
+
*
|
|
1334
|
+
* Rationale: a sole `isDefault: false` variant is a real authoring signal that this transport
|
|
1335
|
+
* has NO default for the operation. Example: `users.list` declares an `INTERNAL_CALL` default
|
|
1336
|
+
* plus a single keyed `API_CALL` "admin" variant marked `isDefault: false` — there is no public
|
|
1337
|
+
* default URL listing, only the admin-keyed one. The prior behavior force-defaulted such a
|
|
1338
|
+
* variant, which (a) contradicted author intent and (b) produced two `isOperationDefault === true`
|
|
1339
|
+
* operations for one operation identifier across transport groups (one per group) — a latent
|
|
1340
|
+
* hazard for any consumer that filters defaults across transports (e.g. a set-filter that matches
|
|
1341
|
+
* >1 and throws). Honoring the explicit `false` keeps each transport group with at most one
|
|
1342
|
+
* default and makes the variant resolvable only via its keyed path resolver, which is the intent.
|
|
1343
|
+
* See `.claude/plans/internal-call-operation-path-resolution.md` (D6 + RESOLUTION).
|
|
1344
|
+
* 2. If multiple variants exist in the group, validation requires exactly one `isDefault=true`.
|
|
1345
|
+
* 3. Fallback selection is kept for direct/test-only callers that bypass factory validation,
|
|
1346
|
+
* but authored multi-variant groups must never rely on array order.
|
|
960
1347
|
*/
|
|
961
1348
|
function determineOperationVariantDefault(variantsOfSameType, currentVariant) {
|
|
962
|
-
// Rule 1:
|
|
1349
|
+
// Rule 1: A single variant of this type is the group default UNLESS the author
|
|
1350
|
+
// explicitly opted out with `isDefault: false`. An omitted/`undefined` `isDefault`
|
|
1351
|
+
// still becomes the default — only an explicit `false` is honored (see JSDoc above).
|
|
963
1352
|
if (variantsOfSameType.length === 1) {
|
|
964
|
-
return
|
|
1353
|
+
return currentVariant.isDefault !== false;
|
|
965
1354
|
}
|
|
966
1355
|
// Rule 2: Find explicit isDefault=true within this variant type group
|
|
967
1356
|
const explicitDefaultVariant = variantsOfSameType.find(variant => variant.isDefault === true);
|
|
@@ -977,7 +1366,20 @@ function determineOperationVariantDefault(variantsOfSameType, currentVariant) {
|
|
|
977
1366
|
// Fallback: if all variants have isDefault=false, first one becomes default anyway
|
|
978
1367
|
return currentVariant === variantsOfSameType[0];
|
|
979
1368
|
}
|
|
980
|
-
const RESERVED_OPERATION_VARIANT_KEYS = new Set([
|
|
1369
|
+
const RESERVED_OPERATION_VARIANT_KEYS = new Set([
|
|
1370
|
+
'isdefault',
|
|
1371
|
+
'novariantkey',
|
|
1372
|
+
]);
|
|
1373
|
+
const AUTO_OPERATION_VARIANT_KEYS = new Set([
|
|
1374
|
+
OPERATION_VARIANT_KEY.SUMMARY,
|
|
1375
|
+
OPERATION_VARIANT_KEY.CONTEXT,
|
|
1376
|
+
]);
|
|
1377
|
+
function isDataModeVariantKeyAllowedForOperation(operation, variant) {
|
|
1378
|
+
const effectiveOperation = variant.resourceOperationLike ?? operation;
|
|
1379
|
+
return effectiveOperation === CoreResourceOperation.READ
|
|
1380
|
+
|| effectiveOperation === CoreResourceOperation.LIST
|
|
1381
|
+
|| effectiveOperation === CoreResourceOperation.SEARCH;
|
|
1382
|
+
}
|
|
981
1383
|
// --------------------------------
|
|
982
1384
|
// Resources Shared Configuration
|
|
983
1385
|
// --------------------------------
|
|
@@ -987,7 +1389,195 @@ const RESERVED_OPERATION_VARIANT_KEYS = new Set(['isDefault', 'noVariantKey']);
|
|
|
987
1389
|
* the isBackendOnly decorator in mainSchema and are stripped at the service layer.
|
|
988
1390
|
*/
|
|
989
1391
|
export function createResourceConfiguration_Initialization(params) {
|
|
990
|
-
const { mainSchema, resourceIdentifier, resourceFieldIdentifier, resourceRelationships, inheritenceSchemaDefinition, isSystemResource = false,
|
|
1392
|
+
const { mainSchema, resourceIdentifier, resourceFieldIdentifier, resourceRelationships, inheritenceSchemaDefinition, isSystemResource = false,
|
|
1393
|
+
// Defaulted TRUE — the safe direction. A resource that never considered whether its primary key
|
|
1394
|
+
// names the caller keeps the identity-coherence refusal; only a deliberate `false` relaxes it.
|
|
1395
|
+
primaryKeyIdentifiesInitiator = true,
|
|
1396
|
+
// Fail-closed default: a resource that does not author `systemAccessPolicy`
|
|
1397
|
+
// gets an explicit all-verbs-FORBIDDEN policy, so the resolved config is
|
|
1398
|
+
// self-documenting and every system-context primitive
|
|
1399
|
+
// (`readAsSystem`/`listAsSystem` and the trusted
|
|
1400
|
+
// `createAsSystem`/`updateAsSystem`/`updateManyAsSystem` writes) rejects it
|
|
1401
|
+
// by default.
|
|
1402
|
+
systemAccessPolicy = {
|
|
1403
|
+
read: ResourceSystemAccessMode.FORBIDDEN,
|
|
1404
|
+
list: ResourceSystemAccessMode.FORBIDDEN,
|
|
1405
|
+
create: ResourceSystemAccessMode.FORBIDDEN,
|
|
1406
|
+
update: ResourceSystemAccessMode.FORBIDDEN,
|
|
1407
|
+
updateMany: ResourceSystemAccessMode.FORBIDDEN,
|
|
1408
|
+
}, isAnonymizable = false, transpositionPolicy, retentionPolicy, dataSubjectPolicy, portabilityPolicy, persistenceAdapter, persistenceAdapterIsolation, httpApiBinding, introspectionBinding, coreOperations, customOperation, operationsConfiguration, } = params;
|
|
1409
|
+
/**
|
|
1410
|
+
* HTTP_API ↔ binding coherence — enforced at AUTHORING, both directions, because each half
|
|
1411
|
+
* alone is a contradiction the backend could only discover later and worse:
|
|
1412
|
+
* - `HTTP_API` without a binding is a resource whose rows live "somewhere over HTTP" with no
|
|
1413
|
+
* target, key, identity or erasure story — nothing downstream can repair that;
|
|
1414
|
+
* - a binding on a platform-backed resource is a declaration nothing will ever read, i.e. a
|
|
1415
|
+
* config that LOOKS externally bound and silently is not.
|
|
1416
|
+
* The binding's CONTENT is validated here too (Zod parse) so a malformed declaration names its
|
|
1417
|
+
* defect at the factory, not at boot. (ETL plan Step 3; registration-time checks that need the
|
|
1418
|
+
* RESOLVED adapter or the live registry — scope expressibility, retention/anonymizable/scope-root
|
|
1419
|
+
* refusals — live in the backend registry validation, which structurally cannot run here.)
|
|
1420
|
+
*/
|
|
1421
|
+
if (persistenceAdapter === PersistenceAdapter.HTTP_API && httpApiBinding === undefined) {
|
|
1422
|
+
throw createConfigurationError(`[${resourceIdentifier}] persistenceAdapter 'http-api' requires the companion 'httpApiBinding' declaration (provider, dialect, key fields, identity, tenancy, erasure).`);
|
|
1423
|
+
}
|
|
1424
|
+
if (persistenceAdapter === PersistenceAdapter.INTROSPECTION && introspectionBinding === undefined) {
|
|
1425
|
+
throw createConfigurationError(`[${resourceIdentifier}] persistenceAdapter 'introspection' requires an 'introspectionBinding' naming the companion behavior whose output becomes this resource's rows.`);
|
|
1426
|
+
}
|
|
1427
|
+
if (introspectionBinding !== undefined && persistenceAdapter !== PersistenceAdapter.INTROSPECTION) {
|
|
1428
|
+
throw createConfigurationError(`[${resourceIdentifier}] 'introspectionBinding' is declared but persistenceAdapter is '${String(persistenceAdapter ?? 'undeclared (application default)')}' — a binding on a stored resource would never be read. Declare persistenceAdapter: 'introspection' or remove the binding.`);
|
|
1429
|
+
}
|
|
1430
|
+
if (httpApiBinding !== undefined && persistenceAdapter !== PersistenceAdapter.HTTP_API) {
|
|
1431
|
+
throw createConfigurationError(`[${resourceIdentifier}] 'httpApiBinding' is declared but persistenceAdapter is '${String(persistenceAdapter ?? 'undeclared (application default)')}' — a binding on a platform-backed resource would never be read. Declare persistenceAdapter: 'http-api' or remove the binding.`);
|
|
1432
|
+
}
|
|
1433
|
+
/**
|
|
1434
|
+
* `persistenceAdapterIsolation` alongside `HTTP_API` is REFUSED, because the claim it makes is
|
|
1435
|
+
* one the adapter has already settled — so honouring it would be honouring nothing.
|
|
1436
|
+
*
|
|
1437
|
+
* The declaration exists to buy a resource admission past the one-adapter rule when it disagrees
|
|
1438
|
+
* with the application default: its author asserts the resource takes part in no cross-adapter
|
|
1439
|
+
* atomic write, and the resources registry admits it and logs the admitted set. An `HTTP_API`
|
|
1440
|
+
* resource is admitted by that same rule WITHOUT any such assertion, on the adapter's own nature —
|
|
1441
|
+
* it is not a second platform store, it owns no transactions, and it cannot be an application
|
|
1442
|
+
* default. The registry's exemption is therefore ordered BEFORE the isolation branch and returns
|
|
1443
|
+
* first, so on an `HTTP_API` resource the isolation claim is never read.
|
|
1444
|
+
*
|
|
1445
|
+
* Silently ignoring it is the outcome worth preventing. An author who writes the field believes
|
|
1446
|
+
* they have bought something, and every later reader believes the resource's admission depends on
|
|
1447
|
+
* it — so a future change to the isolation door would look like it affected this resource when it
|
|
1448
|
+
* could not. A field whose absence and presence are indistinguishable is worse than a rejected
|
|
1449
|
+
* one; this is the same reasoning as the sibling refusal directly above, where a binding on a
|
|
1450
|
+
* platform-backed resource is refused precisely because nothing would ever read it.
|
|
1451
|
+
*/
|
|
1452
|
+
if (persistenceAdapter === PersistenceAdapter.HTTP_API && persistenceAdapterIsolation !== undefined) {
|
|
1453
|
+
throw createConfigurationError(`[${resourceIdentifier}] 'persistenceAdapterIsolation' is declared alongside persistenceAdapter 'http-api', where it is never read — an http-api resource is admitted past the one-adapter rule on the adapter's own nature, not on an isolation claim. Remove the isolation declaration.`);
|
|
1454
|
+
}
|
|
1455
|
+
if (httpApiBinding !== undefined) {
|
|
1456
|
+
const bindingParse = HttpApiResourceBindingSchema.safeParse(httpApiBinding);
|
|
1457
|
+
if (!bindingParse.success) {
|
|
1458
|
+
throw createConfigurationError(`[${resourceIdentifier}] invalid httpApiBinding declaration: ${bindingParse.error.issues.map((issue) => `${issue.path.join('.') || '(root)'}: ${issue.message}`).join('; ')}`);
|
|
1459
|
+
}
|
|
1460
|
+
try {
|
|
1461
|
+
assertHttpApiBindingDialectCoherence(bindingParse.data);
|
|
1462
|
+
}
|
|
1463
|
+
catch (error) {
|
|
1464
|
+
throw createConfigurationError(`[${resourceIdentifier}] invalid httpApiBinding declaration: ${error instanceof Error ? error.message : String(error)}`);
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
/**
|
|
1468
|
+
* `externalDataPipeline` — the inbound ETL pipeline on an ordinary LOCAL resource (partial-resource
|
|
1469
|
+
* coverage v3; PR-3/PR-4). Validated at AUTHORING like `httpApiBinding` above: shape (Zod),
|
|
1470
|
+
* schema-independent coherence (`assertExternalDataPipelineDeclarationCoherence` — S1 tenancy
|
|
1471
|
+
* confinement, unique mapping targets, coercion×dialect), the source binding's own dialect
|
|
1472
|
+
* coherence, and every mainSchema-dependent rule:
|
|
1473
|
+
*
|
|
1474
|
+
* - the pipeline is FORBIDDEN on an HTTP_API-adapter resource (a virtual resource IS the
|
|
1475
|
+
* remote side — chaining a pipeline onto read-through would re-create the composite v1
|
|
1476
|
+
* rejected);
|
|
1477
|
+
* - `remoteKeyLocalField` exists, is a STRING, and is declared `.isBusinessKey()` +
|
|
1478
|
+
* `excludeFromCreate` + `excludeFromUpdate` — SYNC's idempotent upsert keys on it and no
|
|
1479
|
+
* caller may mint or move it (boot-CHECKED, not factory-mutated: the app author sees the
|
|
1480
|
+
* truth in their own schema file);
|
|
1481
|
+
* - every mapped local field exists and is `excludeFromCreate`/`excludeFromUpdate`
|
|
1482
|
+
* (remote-authoritative — D-P5), and a non-`required` REMOTE_FIELD target must ACCEPT
|
|
1483
|
+
* ABSENCE (optional/nullable/default wrapper), or an absent remote value would have nowhere
|
|
1484
|
+
* honest to land (v3.1 §3);
|
|
1485
|
+
* - `ISO_STRING_TO_DATE` targets must be date fields;
|
|
1486
|
+
* - `population: CLOSED` refuses declared caller CREATE operations (D-P8) — INCLUDING a custom
|
|
1487
|
+
* operation that is create-shaped through `resourceOperationLike`. Enumerating only
|
|
1488
|
+
* `coreOperations` was the earlier, narrower form and it was a real hole: a custom operation
|
|
1489
|
+
* is exactly where an author expresses "mint a row my own way", so it is the likeliest way
|
|
1490
|
+
* into a CLOSED population, not an exotic one.
|
|
1491
|
+
*/
|
|
1492
|
+
const externalDataPipeline = params.externalDataPipeline === undefined ? undefined : (() => {
|
|
1493
|
+
const refuse = (message) => {
|
|
1494
|
+
throw createConfigurationError(`[${resourceIdentifier}] invalid externalDataPipeline declaration: ${message}`);
|
|
1495
|
+
};
|
|
1496
|
+
if (persistenceAdapter === PersistenceAdapter.HTTP_API) {
|
|
1497
|
+
refuse("an HTTP_API-adapter (virtual) resource cannot ALSO declare a pipeline — it IS the remote side; declare the pipeline on the LOCAL destination resource instead.");
|
|
1498
|
+
}
|
|
1499
|
+
const declarationParse = ExternalDataPipelineDeclarationSchema.safeParse(params.externalDataPipeline);
|
|
1500
|
+
if (!declarationParse.success) {
|
|
1501
|
+
refuse(declarationParse.error.issues.map((issue) => `${issue.path.join('.') || '(root)'}: ${issue.message}`).join('; '));
|
|
1502
|
+
}
|
|
1503
|
+
const declaration = declarationParse.data;
|
|
1504
|
+
try {
|
|
1505
|
+
assertExternalDataPipelineDeclarationCoherence(declaration);
|
|
1506
|
+
assertHttpApiBindingDialectCoherence(declaration.binding);
|
|
1507
|
+
}
|
|
1508
|
+
catch (error) {
|
|
1509
|
+
refuse(error instanceof Error ? error.message : String(error));
|
|
1510
|
+
}
|
|
1511
|
+
const shape = getZodObjectShape(mainSchema);
|
|
1512
|
+
const requireMappedTarget = (fieldName, context) => {
|
|
1513
|
+
const fieldSchema = shape[fieldName];
|
|
1514
|
+
if (!fieldSchema)
|
|
1515
|
+
refuse(`${context}: local field '${fieldName}' does not exist on mainSchema.`);
|
|
1516
|
+
if (!isExcludedFromCreate(fieldSchema) || !isExcludedFromUpdate(fieldSchema)) {
|
|
1517
|
+
refuse(`${context}: local field '${fieldName}' must be declared .excludeFromCreate() and .excludeFromUpdate() — it is REMOTE-AUTHORITATIVE (written only by the pipeline), and the exclusion is also what renders it read-only end to end (DTO → UI).`);
|
|
1518
|
+
}
|
|
1519
|
+
return fieldSchema;
|
|
1520
|
+
};
|
|
1521
|
+
const keyFieldSchema = requireMappedTarget(declaration.remoteKeyLocalField, 'remoteKeyLocalField');
|
|
1522
|
+
if (!(unwrapSchema(keyFieldSchema) instanceof z.ZodString)) {
|
|
1523
|
+
refuse(`remoteKeyLocalField: '${declaration.remoteKeyLocalField}' must be a STRING field — it stores the synthesized remote id.`);
|
|
1524
|
+
}
|
|
1525
|
+
if (!isBusinessKeyField(keyFieldSchema)) {
|
|
1526
|
+
refuse(`remoteKeyLocalField: '${declaration.remoteKeyLocalField}' must be declared .isBusinessKey() — SYNC's idempotent upsert keys on it, and the business-key declaration is what makes the load MERGE instead of duplicate.`);
|
|
1527
|
+
}
|
|
1528
|
+
for (const entry of declaration.mapping) {
|
|
1529
|
+
const targetSchema = requireMappedTarget(entry.localField, `mapping('${entry.localField}')`);
|
|
1530
|
+
if (entry.kind === ExternalDataMappingEntryKind.REMOTE_FIELD) {
|
|
1531
|
+
if (!entry.required && unwrapSchema(targetSchema) === targetSchema) {
|
|
1532
|
+
refuse(`mapping('${entry.localField}'): a non-required remote field can be ABSENT on a row, and absence lands as null — the target must be optional/nullable/defaulted, or declare required: true (absent rows are then rejected and reported per row).`);
|
|
1533
|
+
}
|
|
1534
|
+
if (entry.coercion === ExternalDataFieldCoercion.ISO_STRING_TO_DATE && !(unwrapSchema(targetSchema) instanceof z.ZodDate)) {
|
|
1535
|
+
refuse(`mapping('${entry.localField}'): coercion ISO_STRING_TO_DATE targets a date field.`);
|
|
1536
|
+
}
|
|
1537
|
+
// ⚠ Odoo spells ABSENT values as literal `false` (v3.1 §3 / PR-8), so on an Odoo source
|
|
1538
|
+
// the false→null coercion is the DEFAULT — resolved HERE, at authoring time, because this
|
|
1539
|
+
// is the one place the destination field's type is known: a genuine BOOLEAN target keeps
|
|
1540
|
+
// its `false` (Odoo booleans really are `false`), everything else would otherwise persist
|
|
1541
|
+
// a literal `false` into a string/date/number field. The runtime transform then applies
|
|
1542
|
+
// only RESOLVED coercions and carries no schema knowledge.
|
|
1543
|
+
if (declaration.binding.dialect === HttpApiTransportDialect.ODOO_JSONRPC
|
|
1544
|
+
&& entry.coercion === ExternalDataFieldCoercion.NONE
|
|
1545
|
+
&& !(unwrapSchema(targetSchema) instanceof z.ZodBoolean)) {
|
|
1546
|
+
entry.coercion = ExternalDataFieldCoercion.ODOO_FALSE_AS_NULL;
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
if (declaration.population === ExternalDataDestinationPopulation.CLOSED) {
|
|
1551
|
+
// Enumerate by the operation's EFFECTIVE semantics, never by its identifier: a CORE operation
|
|
1552
|
+
// is its own semantics, while a CUSTOM one declares them per variant through
|
|
1553
|
+
// `resourceOperationLike` (the same resolution `isDataModeVariantKeyAllowedForOperation`
|
|
1554
|
+
// uses). Both sources are unioned because neither sees the other's members — `coreOperations`
|
|
1555
|
+
// can name an operation with no authored configuration entry, and `operationsConfiguration`
|
|
1556
|
+
// is where a custom operation exists at all.
|
|
1557
|
+
const createShaped = new Set([
|
|
1558
|
+
CoreResourceOperation.CREATE,
|
|
1559
|
+
CoreResourceOperation.CREATE_MANY,
|
|
1560
|
+
]);
|
|
1561
|
+
const declaredCreates = new Set();
|
|
1562
|
+
for (const operation of coreOperations) {
|
|
1563
|
+
if (createShaped.has(operation))
|
|
1564
|
+
declaredCreates.add(String(operation));
|
|
1565
|
+
}
|
|
1566
|
+
for (const [operationKey, operationConfig] of Object.entries((operationsConfiguration ?? {}))) {
|
|
1567
|
+
const variants = operationConfig?.variants ?? [];
|
|
1568
|
+
const effectiveOperations = variants.length > 0
|
|
1569
|
+
? variants.map((variant) => variant.resourceOperationLike ?? operationKey)
|
|
1570
|
+
: [operationKey];
|
|
1571
|
+
if (effectiveOperations.some((effective) => createShaped.has(effective))) {
|
|
1572
|
+
declaredCreates.add(operationKey);
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
if (declaredCreates.size > 0) {
|
|
1576
|
+
refuse(`population CLOSED: every row comes from the pipeline, so caller CREATE operations (${[...declaredCreates].sort().join(', ')}) are refused — declare population: OPEN if users may mint rows beside the synced ones. A CUSTOM operation counts when a variant declares a create-shaped resourceOperationLike.`);
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
return declaration;
|
|
1580
|
+
})();
|
|
991
1581
|
const normalizedResourceRelationships = Resources_SharedUtils.ensureCompiledRelationships(resourceRelationships);
|
|
992
1582
|
// ========================================
|
|
993
1583
|
// VALIDATE DECORATOR COMBINATIONS
|
|
@@ -997,30 +1587,97 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
997
1587
|
// ========================================
|
|
998
1588
|
// DERIVE RESOURCE PRIMARY SCOPE
|
|
999
1589
|
// ========================================
|
|
1000
|
-
//
|
|
1590
|
+
//
|
|
1591
|
+
// Two derivation signals are permitted (no silent default). A third
|
|
1592
|
+
// mechanism — polymorphic factories — is mechanically a special case of (2):
|
|
1593
|
+
//
|
|
1594
|
+
// 1. SELF-ANCHOR — the resource itself is one of the canonical scope roots
|
|
1595
|
+
// (USERS, ORGANIZATIONS, APPLICATION, ANONYMOUS_USERS). The PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE
|
|
1596
|
+
// map encodes that bijection.
|
|
1597
|
+
//
|
|
1598
|
+
// 2. FLAGGED RELATIONSHIP — exactly one relationship involving this resource
|
|
1599
|
+
// has `isPrimaryScope: true`. The rel-factory enforces that the flag can
|
|
1600
|
+
// only be set on a parent (not a child-side) and that the parent resolves
|
|
1601
|
+
// to a known scope-root in the primaryScopeMap, so reading
|
|
1602
|
+
// `primaryScopeRelationship.primaryScope` here always yields a valid enum.
|
|
1603
|
+
//
|
|
1604
|
+
// 3. POLYMORPHIC VARIANT (special case of 2) — resources built via
|
|
1605
|
+
// `createPolymorphicResourceConfigurations(...)` (e.g. SSO connections,
|
|
1606
|
+
// billing accounts, subscriptions, M2M webhooks). The polymorphic factory
|
|
1607
|
+
// auto-injects an `isPrimaryScope: true` rel per declared variant, so each
|
|
1608
|
+
// variant resolves through path (2) without the author having to re-declare
|
|
1609
|
+
// the anchor manually. If you reach the throw below for a polymorphic
|
|
1610
|
+
// resource, the variant declaration is missing its scope mapping — fix
|
|
1611
|
+
// the polymorphic config, NOT the registry rel list.
|
|
1612
|
+
//
|
|
1613
|
+
// If no derivation signal is present we THROW. The framework cannot quietly
|
|
1614
|
+
// assume a scope: scope drives auth, notifications, execution context, URL
|
|
1615
|
+
// routing, and cross-tenant isolation. A wrong default would be a silent
|
|
1616
|
+
// security regression. Every resource author MUST declare scope explicitly
|
|
1617
|
+
// via one of the three signals above.
|
|
1618
|
+
//
|
|
1619
|
+
// Migration: if you hit this throw, add a STANDALONE primary rel from the
|
|
1620
|
+
// owning scope-root (e.g. `ORGANIZATIONS → yourResource`,
|
|
1621
|
+
// `USERS → yourResource`, `APPLICATION → yourResource`) with
|
|
1622
|
+
// `accessScopeStrategy: STANDALONE` and `isPrimaryScope: true`. STANDALONE
|
|
1623
|
+
// keeps the rel inert for URL routing while declaring the structural
|
|
1624
|
+
// ownership anchor — see `resources-relationships.shared.factory.ts` Guard 1.
|
|
1625
|
+
const selfScopeEntry = Object.entries(PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE).find(([, coreType]) => coreType === resourceIdentifier);
|
|
1001
1626
|
const relevantRelationships = normalizedResourceRelationships.filter(rel => rel.resourceType1 === resourceIdentifier || rel.resourceType2 === resourceIdentifier);
|
|
1002
|
-
// Find the resource relationship with isPrimaryScope=true for this resource
|
|
1003
1627
|
const primaryScopeRelationship = relevantRelationships.find(rel => rel.isPrimaryScope === true);
|
|
1004
1628
|
let resourcePrimaryScope;
|
|
1005
|
-
if (
|
|
1629
|
+
if (selfScopeEntry) {
|
|
1630
|
+
resourcePrimaryScope = selfScopeEntry[0];
|
|
1631
|
+
}
|
|
1632
|
+
else if (primaryScopeRelationship?.primaryScope) {
|
|
1006
1633
|
resourcePrimaryScope = primaryScopeRelationship.primaryScope;
|
|
1007
1634
|
}
|
|
1008
1635
|
else {
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1636
|
+
throw createConfigurationError(`[${resourceIdentifier}] Cannot derive resourcePrimaryScope.\n` +
|
|
1637
|
+
`\n` +
|
|
1638
|
+
`A resource configuration MUST declare its primary scope via one of:\n` +
|
|
1639
|
+
` (1) Self-anchor — the resource itself is a canonical scope root\n` +
|
|
1640
|
+
` (USERS, ORGANIZATIONS, APPLICATION, ANONYMOUS_USERS).\n` +
|
|
1641
|
+
` (2) Flagged relationship — exactly one parent relationship carries\n` +
|
|
1642
|
+
` \`isPrimaryScope: true\` (parent resolves to a known scope root).\n` +
|
|
1643
|
+
` (3) Polymorphic variant — resources built via\n` +
|
|
1644
|
+
` \`createPolymorphicResourceConfigurations(...)\` get an\n` +
|
|
1645
|
+
` \`isPrimaryScope: true\` rel auto-injected per variant. If you\n` +
|
|
1646
|
+
` reach this throw for a polymorphic resource, your variant\n` +
|
|
1647
|
+
` declaration is missing its scope mapping — fix the polymorphic\n` +
|
|
1648
|
+
` config, NOT the registry rel list.\n` +
|
|
1649
|
+
`\n` +
|
|
1650
|
+
`No signal was found for resource '${resourceIdentifier}'.\n` +
|
|
1651
|
+
`\n` +
|
|
1652
|
+
`Fix: add a primary-anchor relationship in the registry. For an internal\n` +
|
|
1653
|
+
`resource that should NOT be URL-routed under its scope parent, use:\n` +
|
|
1654
|
+
`\n` +
|
|
1655
|
+
` createResourcesRelationship(\n` +
|
|
1656
|
+
` CoreResourceType.ORGANIZATIONS, '${resourceIdentifier}',\n` +
|
|
1657
|
+
` ResourceRelationshipCardinality.ONE, ResourceRelationshipCardinality.MANY,\n` +
|
|
1658
|
+
` {\n` +
|
|
1659
|
+
` accessScopeStrategy: ResourceRelationshipAccessScopeStrategy.STANDALONE,\n` +
|
|
1660
|
+
` isPrimaryScope: true,\n` +
|
|
1661
|
+
` nature: RelationshipNature.REFERENCE,\n` +
|
|
1662
|
+
` contextPolicy: { enabled: false },\n` +
|
|
1663
|
+
` }\n` +
|
|
1664
|
+
` )\n` +
|
|
1665
|
+
`\n` +
|
|
1666
|
+
`For a routable child resource, drop the STANDALONE strategy and add\n` +
|
|
1667
|
+
`\`isPrimaryScope: true\` to the existing parent relationship.\n` +
|
|
1668
|
+
`\n` +
|
|
1669
|
+
`Background: the framework no longer falls back to a silent ORGANIZATIONS\n` +
|
|
1670
|
+
`default — primary scope drives auth, notifications, execution context,\n` +
|
|
1671
|
+
`URL routing, and cross-tenant isolation, so a wrong default would be a\n` +
|
|
1672
|
+
`silent security regression. See \`resources-config.shared.factory.ts\`\n` +
|
|
1673
|
+
`(DERIVE RESOURCE PRIMARY SCOPE) for the full rationale.`);
|
|
1018
1674
|
}
|
|
1019
1675
|
// ========================================
|
|
1020
1676
|
// isAnonymizable VALIDATION & ENRICHMENT (W7.3a)
|
|
1021
1677
|
// ========================================
|
|
1022
1678
|
let effectiveMainSchema = mainSchema;
|
|
1023
1679
|
let effectiveResourceRelationships = normalizedResourceRelationships;
|
|
1680
|
+
let effectiveSystemAccessPolicy = systemAccessPolicy;
|
|
1024
1681
|
if (isAnonymizable) {
|
|
1025
1682
|
if (resourcePrimaryScope !== ResourcePrimaryScope.USER_SELF) {
|
|
1026
1683
|
throw createConfigurationError(`[${resourceIdentifier}] isAnonymizable: true requires primaryScope USER_SELF, got ${resourcePrimaryScope}.`);
|
|
@@ -1063,6 +1720,424 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1063
1720
|
: undefined,
|
|
1064
1721
|
});
|
|
1065
1722
|
effectiveResourceRelationships = [...normalizedResourceRelationships, anonymousRelationship];
|
|
1723
|
+
// ── Derive the transposition system-access grant (W7.3a) ──────────────
|
|
1724
|
+
//
|
|
1725
|
+
// Anonymous→user ownership transposition (`AnonymousSessionBackendService`)
|
|
1726
|
+
// rewrites `{ userId, anonymousUserId }` across every anonymizable resource
|
|
1727
|
+
// via `SystemAccessBackendService.updateManyAsSystem`. That primitive is
|
|
1728
|
+
// fail-closed on `systemAccessPolicy.updateMany` PER RESOURCE, and both FKs
|
|
1729
|
+
// it writes are context-auto-populated names the client-shaped request DTO
|
|
1730
|
+
// strips — so WITHOUT the grant the transposition would either throw
|
|
1731
|
+
// `CONFIGURATION` (fail-closed) or silently no-op, stranding the converting
|
|
1732
|
+
// user's rows under the anonymous id until the cleanup batch deletes them
|
|
1733
|
+
// (user-visible data loss).
|
|
1734
|
+
//
|
|
1735
|
+
// This grant is DERIVED, not authored, precisely because it is not an
|
|
1736
|
+
// incidental capability: it is THE mechanism `isAnonymizable` exists to
|
|
1737
|
+
// enable. The factory already REQUIRES `UPDATE_MANY` in `coreOperations`
|
|
1738
|
+
// above "for transposition batch update"; that core operation is
|
|
1739
|
+
// unreachable by the transposition service without this system-access
|
|
1740
|
+
// opt-in, so deriving it here COMPLETES an existing coupling rather than
|
|
1741
|
+
// inventing a new one — and removes a guaranteed per-app footgun (every
|
|
1742
|
+
// app marking a resource `isAnonymizable` would otherwise have to remember
|
|
1743
|
+
// the grant, and the engine core ships zero anonymizable resources to model
|
|
1744
|
+
// it from).
|
|
1745
|
+
//
|
|
1746
|
+
// Distinct from the `systemAccessPolicy` ⟂ `isSystemResource` separation
|
|
1747
|
+
// documented on the policy type: `isSystemResource` is a broad, ACL-
|
|
1748
|
+
// orthogonal marker (framework infra does NOT imply an ACL bypass is
|
|
1749
|
+
// acceptable), whereas `isAnonymizable` has a single, specific engine
|
|
1750
|
+
// behaviour that requires exactly `updateManyAsSystem`. The derived value
|
|
1751
|
+
// is materialised into the RESOLVED config below (not hidden in factory
|
|
1752
|
+
// control flow), so specs, audits, and `assertSystemAccessAllowed` all see
|
|
1753
|
+
// `updateMany: ALLOWED`. Any explicitly-authored `systemAccessPolicy` on an
|
|
1754
|
+
// anonymizable resource is preserved for its other verbs; only `updateMany`
|
|
1755
|
+
// is forced ALLOWED (a transposition-required resource cannot opt out of
|
|
1756
|
+
// its own transposition).
|
|
1757
|
+
//
|
|
1758
|
+
// FAIL-LOUD (not silent-override): if the author EXPLICITLY declared
|
|
1759
|
+
// `updateMany: FORBIDDEN`, that contradicts `isAnonymizable` (the resource
|
|
1760
|
+
// asks for transposition yet forbids the only primitive that performs it).
|
|
1761
|
+
// Silently flipping it to ALLOWED would erase an explicit security
|
|
1762
|
+
// declaration — dishonest. Throw instead. We read the RAW authored policy
|
|
1763
|
+
// (`params.systemAccessPolicy`), NOT the destructured value: an unauthored
|
|
1764
|
+
// policy is defaulted to all-verbs-FORBIDDEN above, and forcing THAT to
|
|
1765
|
+
// ALLOWED is the intended, non-contradictory derive (the common case). Only
|
|
1766
|
+
// a hand-written `updateMany: FORBIDDEN` is the contradiction we reject.
|
|
1767
|
+
if (params.systemAccessPolicy?.updateMany === ResourceSystemAccessMode.FORBIDDEN) {
|
|
1768
|
+
throw createConfigurationError(`[${resourceIdentifier}] isAnonymizable: true requires systemAccessPolicy.updateMany = ALLOWED ` +
|
|
1769
|
+
`(anonymous→user transposition rewrites { userId, anonymousUserId } via updateManyAsSystem), but ` +
|
|
1770
|
+
`this resource explicitly authored updateMany: FORBIDDEN. A transposition-required resource cannot ` +
|
|
1771
|
+
`opt out of its own transposition — remove the explicit FORBIDDEN (the grant is derived automatically) ` +
|
|
1772
|
+
`or drop isAnonymizable.`);
|
|
1773
|
+
}
|
|
1774
|
+
effectiveSystemAccessPolicy = {
|
|
1775
|
+
...systemAccessPolicy,
|
|
1776
|
+
updateMany: ResourceSystemAccessMode.ALLOWED,
|
|
1777
|
+
};
|
|
1778
|
+
}
|
|
1779
|
+
// ========================================
|
|
1780
|
+
// retentionPolicy VALIDATION & ENRICHMENT (impersonalization-on-erasure)
|
|
1781
|
+
// ========================================
|
|
1782
|
+
//
|
|
1783
|
+
// Mirror of the isAnonymizable branch above, for the OTHER trusted-write axis:
|
|
1784
|
+
// on erasure a retention-governed resource is impersonalized-and-retained
|
|
1785
|
+
// (personal fields scrubbed via `updateManyAsSystem`, row KEPT) instead of
|
|
1786
|
+
// hard-deleted. Injects the per-record `retentionStatus` marker and derives the
|
|
1787
|
+
// system-access grants the capability requires. RESOURCE-level: the per-edge
|
|
1788
|
+
// trigger (`onParentDelete.strategy = IMPERSONALIZE_AND_RETAIN`) and per-field scrub
|
|
1789
|
+
// (`.impersonalizeWith()`) are declared separately.
|
|
1790
|
+
if (retentionPolicy?.mode) {
|
|
1791
|
+
// PRESENCE half of the retention operation contract: each required op must be declared at all.
|
|
1792
|
+
// The RESOLVABILITY half — that the declared op has a variant the retention primitives can
|
|
1793
|
+
// actually dispatch — runs later, once the operation variants are assembled (search
|
|
1794
|
+
// `RETENTION_REQUIRED_SERVICE_RESOLVABLE_OPERATIONS`). Deliberately two checks, because they have
|
|
1795
|
+
// two different fixes: "declare the op" vs "declare it with a service-resolvable variant".
|
|
1796
|
+
for (const { operation: requiredOperation, why } of RETENTION_REQUIRED_SERVICE_RESOLVABLE_OPERATIONS) {
|
|
1797
|
+
if (!coreOperations.includes(requiredOperation)) {
|
|
1798
|
+
throw createConfigurationError(`[${resourceIdentifier}] retentionPolicy requires ${requiredOperation} in coreOperations (${why}).`);
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
// Guard (framework-quality): `retentionStatus` / `impersonalizedAt` are framework-reserved
|
|
1802
|
+
// injected names. Zod-4 `.extend()` SILENTLY OVERWRITES a duplicate key, so a resource that
|
|
1803
|
+
// already declares one would have its own field clobbered on opt-in — fail loud instead. The
|
|
1804
|
+
// same `getZodObjectShape` call also yields a friendly config error if `mainSchema` is not a
|
|
1805
|
+
// ZodObject (the marker cannot be injected into a non-object schema).
|
|
1806
|
+
// EXPLICIT object check. (Do NOT rely on `getZodObjectShape` throwing — it returns `{}` for a
|
|
1807
|
+
// union, so a try/catch around it is dead code and the real failure surfaces later as an
|
|
1808
|
+
// undiagnosable `effectiveMainSchema.extend is not a function`.)
|
|
1809
|
+
if (!isZodObject(effectiveMainSchema)) {
|
|
1810
|
+
throw createConfigurationError(`[${resourceIdentifier}] retentionPolicy requires a ZodObject mainSchema (cannot inject the ` +
|
|
1811
|
+
`retentionStatus marker into a non-object schema — polymorphic/union mainSchemas are not yet supported).`);
|
|
1812
|
+
}
|
|
1813
|
+
const existingShape = getZodObjectShape(effectiveMainSchema);
|
|
1814
|
+
for (const reservedField of ['retentionStatus', 'impersonalizedAt']) {
|
|
1815
|
+
if (existingShape[reservedField]) {
|
|
1816
|
+
throw createConfigurationError(`[${resourceIdentifier}] retentionPolicy injects a reserved '${reservedField}' field, but this ` +
|
|
1817
|
+
`resource already declares one. Rename that field or drop retentionPolicy (the marker is factory-injected).`);
|
|
1818
|
+
}
|
|
1819
|
+
}
|
|
1820
|
+
// ========================================
|
|
1821
|
+
// IMPERSONALIZE TREATMENT VALIDATION — fail loud at CONFIG BUILD, not on the erasure path.
|
|
1822
|
+
// ========================================
|
|
1823
|
+
//
|
|
1824
|
+
// The impersonalize writer scrubs via `updateManyAsSystem`, whose STRICT update-DTO parse runs
|
|
1825
|
+
// over the scrub patch. A treatment the declared field schema cannot accept therefore throws
|
|
1826
|
+
// INSIDE the parent-delete transaction and ROLLS BACK the erasure — the worst possible moment to
|
|
1827
|
+
// discover a config mistake. Every check below is a pure `safeParse` against the AUTHORED field
|
|
1828
|
+
// schema, so it catches every axis at once without a type taxonomy:
|
|
1829
|
+
//
|
|
1830
|
+
// - REMOVE writes `null`, which the field-clearing contract resolves into either a stored null
|
|
1831
|
+
// (null-accepting field) or a removed key (merely `.optional()`). Both are what REMOVE asks
|
|
1832
|
+
// for, so the requirement is that the field be CLEARABLE — i.e. not required and not
|
|
1833
|
+
// `.default()`-wrapped, since a default's output type is non-optional.
|
|
1834
|
+
// HISTORY, because this comment justified a stricter guard for months: update DTOs used to
|
|
1835
|
+
// be made `.optional()` and NEVER `.nullable()`, so a non-nullish field really did reject
|
|
1836
|
+
// the scrub, and the capability was non-functional for every non-nullable field. That
|
|
1837
|
+
// changed when `toPatchOptionalField` began admitting null for clearable fields; the guard
|
|
1838
|
+
// below was left demanding `.nullish()` and so failed startup on valid declarations.
|
|
1839
|
+
// - MASK writes the field's EFFECTIVE mask value — its own `maskValue` override, or
|
|
1840
|
+
// `IMPERSONALIZE_MASK_CONSTANT`. Beyond the obvious number/date/enum/boolean mismatches, the
|
|
1841
|
+
// default constant also fails CONSTRAINED strings — `z.email()`, `z.uuid()`, `.min(n)` — i.e.
|
|
1842
|
+
// exactly the PII fields most likely to be masked, which is why the override exists. A
|
|
1843
|
+
// "MASK is string-only" rule would NOT be sufficient. An override is validated against the
|
|
1844
|
+
// field's own schema here, and is rejected outright on a non-MASK treatment (nothing would
|
|
1845
|
+
// write it).
|
|
1846
|
+
// - A resource that opts into retentionPolicy but declares ZERO treatments would flip rows to
|
|
1847
|
+
// `RETAINED` with every personal field intact: a compliance-grade lie (it LOOKS erased).
|
|
1848
|
+
for (const [fieldName, fieldSchema] of Object.entries(existingShape)) {
|
|
1849
|
+
const treatment = getImpersonalizeTreatment(fieldSchema);
|
|
1850
|
+
if (treatment === undefined)
|
|
1851
|
+
continue;
|
|
1852
|
+
// Floor fields are never scrubbed, so their schema need not accept a scrub value. Reuse the
|
|
1853
|
+
// writer's own floor predicate — one authority, so the guard can never drift from the scrub.
|
|
1854
|
+
if (isImpersonalizeNeverScrubFloorField(fieldName))
|
|
1855
|
+
continue;
|
|
1856
|
+
// D1 allows SEVERING the person-link (`userId` / `anonymousUserId`) — but only when a NON-person
|
|
1857
|
+
// scope survives to anchor the retained row. If the person-link IS the resource's primary scope,
|
|
1858
|
+
// nulling it strips the row's only tenant anchor: contextual scoping can no longer reach it, so
|
|
1859
|
+
// the retained record becomes invisible even to the audited see-through path that retention
|
|
1860
|
+
// exists to serve (retained-but-unreachable ≠ retained).
|
|
1861
|
+
const severedScope = FIELD_IDENTIFIER_TO_PRIMARY_SCOPE[fieldName];
|
|
1862
|
+
if (treatment === RedactionType.REMOVE &&
|
|
1863
|
+
severedScope !== undefined &&
|
|
1864
|
+
severedScope === resourcePrimaryScope) {
|
|
1865
|
+
throw createConfigurationError(`[${resourceIdentifier}] field '${fieldName}' declares impersonalize treatment REMOVE, but it is this ` +
|
|
1866
|
+
`resource's PRIMARY scope ('${severedScope}'). Severing the primary-scope link would leave the retained ` +
|
|
1867
|
+
`row with no tenant anchor — unreachable through contextual scoping, including the audited see-through ` +
|
|
1868
|
+
`read. Keep the primary-scope link (use KEEP) and scrub the personal FIELDS instead.`);
|
|
1869
|
+
}
|
|
1870
|
+
// NOTE ON UNIQUE-INDEXED FIELDS (gate G-BKEY): a scrub writes the SAME value to every row in
|
|
1871
|
+
// the batch (`null` for REMOVE, one shared mask constant for MASK), which on a plain unique
|
|
1872
|
+
// index would collide (E11000) and abort the erasure. That is NOT rejected here, because the
|
|
1873
|
+
// schema layer scopes every unique index on a retention-governed resource to NON-RETAINED rows
|
|
1874
|
+
// (`partialFilterExpression`, see `buildRetentionPartialFilterExpression`): the scrubbed rows
|
|
1875
|
+
// become RETAINED in the same write, leave the index, and therefore cannot collide — the same
|
|
1876
|
+
// property that stops a retained row from permanently locking out re-creation of its key.
|
|
1877
|
+
// ⚠️ This guard's absence DEPENDS on that partial index. If the partial filter is ever removed,
|
|
1878
|
+
// a treatment on a unique field becomes an erasure-aborting defect again.
|
|
1879
|
+
// A maskValue is meaningful ONLY under MASK — no other treatment writes it. Declaring one
|
|
1880
|
+
// elsewhere means the author believes a specific value will be stored while the writer would
|
|
1881
|
+
// null the field (REMOVE) or leave it untouched (KEEP): the declaration and the behaviour
|
|
1882
|
+
// disagree, which is the same class of silent compliance lie the zero-scrub guard prevents.
|
|
1883
|
+
// Checked BEFORE the per-treatment branches, and independently of them — as an arm of that
|
|
1884
|
+
// if/else chain it would be unreachable for exactly the treatments it needs to reject.
|
|
1885
|
+
if (treatment !== RedactionType.MASK && getImpersonalizeMaskValue(fieldSchema) !== undefined) {
|
|
1886
|
+
throw createConfigurationError(`[${resourceIdentifier}] field '${fieldName}' declares an impersonalize maskValue but its treatment is ` +
|
|
1887
|
+
`'${treatment}', not MASK — nothing would ever write that value. Use MASK to store it, or drop the maskValue.`);
|
|
1888
|
+
}
|
|
1889
|
+
if (treatment === RedactionType.REMOVE) {
|
|
1890
|
+
// REMOVE writes `null`, and the field-clearing contract decides what that PERSISTS as: a
|
|
1891
|
+
// null-accepting field stores the null, a merely-`.optional()` field has the key removed.
|
|
1892
|
+
// Either outcome is what REMOVE asks for, so the requirement is CLEARABILITY, not
|
|
1893
|
+
// null-acceptance.
|
|
1894
|
+
//
|
|
1895
|
+
// This guard used to demand `.nullish()` and justify it with "update DTOs are made
|
|
1896
|
+
// .optional(), never .nullable()". That was true when it was written and is not any more —
|
|
1897
|
+
// `toPatchOptionalField` now admits null for every clearable field. Left unchanged, the
|
|
1898
|
+
// guard rejected a perfectly valid `.optional()` + REMOVE declaration at CONFIG BUILD, i.e.
|
|
1899
|
+
// it failed application startup, and explained the refusal with a rule that no longer
|
|
1900
|
+
// exists.
|
|
1901
|
+
if (!mainSchemaFieldIsClearable(fieldSchema)) {
|
|
1902
|
+
throw createConfigurationError(`[${resourceIdentifier}] field '${fieldName}' declares impersonalize treatment REMOVE, which clears the ` +
|
|
1903
|
+
`field, but the field is required (or carries a \`.default()\`, whose output type is non-optional). A ` +
|
|
1904
|
+
`field that must always hold a value cannot be scrubbed by removal — declare it \`.optional()\` or ` +
|
|
1905
|
+
`\`.nullish()\`, or use MASK to overwrite it with a placeholder instead.`);
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
else if (treatment === RedactionType.MASK) {
|
|
1909
|
+
// Validate the EFFECTIVE value — the field's own `maskValue` override when it declares one,
|
|
1910
|
+
// the framework constant otherwise — resolved through the SAME helper the scrub writer uses,
|
|
1911
|
+
// so a config that passes here cannot produce a write the update DTO rejects mid-erasure.
|
|
1912
|
+
const effectiveMaskValue = resolveImpersonalizeMaskValue(fieldSchema);
|
|
1913
|
+
if (!fieldSchema.safeParse(effectiveMaskValue).success) {
|
|
1914
|
+
throw createConfigurationError(effectiveMaskValue === IMPERSONALIZE_MASK_CONSTANT
|
|
1915
|
+
? `[${resourceIdentifier}] field '${fieldName}' declares impersonalize treatment MASK, but its schema ` +
|
|
1916
|
+
`rejects the default mask constant '${IMPERSONALIZE_MASK_CONSTANT}'. That constant is an unconstrained ` +
|
|
1917
|
+
`string, so a number/date/enum/boolean — or a CONSTRAINED string such as z.email()/z.uuid()/.min(n) — ` +
|
|
1918
|
+
`cannot hold it. Either declare a field-specific value the schema accepts ` +
|
|
1919
|
+
`(\`.impersonalizeWith(MASK, { maskValue: '...' })\`), or use REMOVE on a \`.nullish()\` field.`
|
|
1920
|
+
: `[${resourceIdentifier}] field '${fieldName}' declares impersonalize treatment MASK with ` +
|
|
1921
|
+
`maskValue '${effectiveMaskValue}', but its own schema rejects that value. The mask is written ` +
|
|
1922
|
+
`verbatim through the strict update-DTO parse, so it must satisfy every constraint the field ` +
|
|
1923
|
+
`declares (format, length, enum membership).`);
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
// Count what the WRITER would actually scrub, not what was merely declared. `KEEP` treatments and
|
|
1928
|
+
// treatments on never-scrub floor fields are both skipped by `buildImpersonalizeScrubPatch`, so
|
|
1929
|
+
// counting declarations would let a resource satisfy this guard with a patch that is EMPTY — rows
|
|
1930
|
+
// flipping to RETAINED with every field intact, which is precisely the compliance lie the guard
|
|
1931
|
+
// exists to prevent. Deriving the count from the writer keeps ONE authority for "what gets scrubbed".
|
|
1932
|
+
// FAIL LOUD on a NESTED treatment. Both the guard above and the writer walk TOP-LEVEL keys only
|
|
1933
|
+
// (`getMergedObjectOrUnionShape` merges union options; it does not descend into nested objects, and
|
|
1934
|
+
// `getMetadataRecursive` traverses wrappers but never a ZodObject's shape). So a
|
|
1935
|
+
// `.impersonalizeWith()` declared on a nested field — `billingContact.email`, or a nested
|
|
1936
|
+
// `z_file()` — is SILENTLY IGNORED: the row flips to RETAINED while that field, and any file linked
|
|
1937
|
+
// under its dotted path, survive intact. That is the compliance lie this whole block exists to
|
|
1938
|
+
// prevent, reached through a door the top-level walk cannot see. Recursive scrubbing is deliberately
|
|
1939
|
+
// out of v1 scope, so an unscrubable nested treatment must be a BOOT ERROR rather than a silent skip.
|
|
1940
|
+
assertNoNestedImpersonalizeTreatment(effectiveMainSchema, resourceIdentifier);
|
|
1941
|
+
// The two modes assert OPPOSITE things about this resource's fields, so each fails loud on the
|
|
1942
|
+
// other's shape. Neither is a warning: a mismatch here means the config claims something about
|
|
1943
|
+
// personal data that the runtime would not honour.
|
|
1944
|
+
const effectiveScrubPatch = buildImpersonalizeScrubPatch(effectiveMainSchema);
|
|
1945
|
+
if (retentionPolicy.mode === ErasureRetentionMode.RETAIN_ONLY) {
|
|
1946
|
+
// RETAIN_ONLY asserts "this resource holds no personal data of its own". A treatment contradicts
|
|
1947
|
+
// that claim — and would be silently ignored at erasure time, since RETAIN_ONLY writes only the
|
|
1948
|
+
// markers. Fail rather than let the declaration and the behaviour disagree.
|
|
1949
|
+
if (Object.keys(effectiveScrubPatch).length > 0) {
|
|
1950
|
+
throw createConfigurationError(`[${resourceIdentifier}] retentionPolicy.mode = RETAIN_ONLY asserts this resource holds no personal data of ` +
|
|
1951
|
+
`its own, but field(s) [${Object.keys(effectiveScrubPatch).join(', ')}] declare an impersonalize treatment. ` +
|
|
1952
|
+
`Those treatments would never run. Use mode = RETAIN_AND_IMPERSONALIZE to actually scrub them, or remove them.`);
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
else if (Object.keys(effectiveScrubPatch).length === 0) {
|
|
1956
|
+
throw createConfigurationError(`[${resourceIdentifier}] retentionPolicy.mode = RETAIN_AND_IMPERSONALIZE but NO field would actually be ` +
|
|
1957
|
+
`scrubbed (KEEP treatments and treatments on never-scrub floor fields such as scope FKs / createdByUserId ` +
|
|
1958
|
+
`do not count). Erasure would flip rows to RETAINED with every personal field intact — a record ` +
|
|
1959
|
+
`that looks scrubbed but is not. Mark at least one non-floor personal field REMOVE or MASK, or — if this ` +
|
|
1960
|
+
`resource genuinely holds no personal data of its own — declare mode = RETAIN_ONLY instead.`);
|
|
1961
|
+
}
|
|
1962
|
+
// Inject the per-record retention marker. Server-managed (excluded from client
|
|
1963
|
+
// create/update, hidden), DB-indexed for the hidden-by-default filter predicate
|
|
1964
|
+
// + the future disposal clock. Defaults to ACTIVE; only the impersonalize writer
|
|
1965
|
+
// flips it to RETAINED via updateManyAsSystem (which re-attaches verb-excluded
|
|
1966
|
+
// fields after the strict parse — see deriveTrustedSystemWritePreservedFields).
|
|
1967
|
+
effectiveMainSchema = effectiveMainSchema.extend({
|
|
1968
|
+
retentionStatus: RetentionStatusSchema
|
|
1969
|
+
.default(RetentionStatus.ACTIVE)
|
|
1970
|
+
.isDBIndexed()
|
|
1971
|
+
.excludeFromCreate()
|
|
1972
|
+
.excludeFromUpdate()
|
|
1973
|
+
.isHidden(),
|
|
1974
|
+
impersonalizedAt: z.date()
|
|
1975
|
+
.optional()
|
|
1976
|
+
.isDBIndexed()
|
|
1977
|
+
.excludeFromCreate()
|
|
1978
|
+
.excludeFromUpdate()
|
|
1979
|
+
.isHidden(),
|
|
1980
|
+
});
|
|
1981
|
+
// Derive the impersonalization system-access grants (parallel to the
|
|
1982
|
+
// isAnonymizable updateMany derive above): `updateMany` for the in-place scrub,
|
|
1983
|
+
// `seeRetained` for the audited see-through read of retained rows. FAIL-LOUD, not
|
|
1984
|
+
// silent-override: if the author EXPLICITLY declared either verb FORBIDDEN, that
|
|
1985
|
+
// contradicts retentionPolicy (the resource asks to be retained-and-scrubbed yet
|
|
1986
|
+
// forbids the only primitive that performs / audits it). We read the RAW authored
|
|
1987
|
+
// policy (`params.systemAccessPolicy`) — an unauthored policy defaults to
|
|
1988
|
+
// all-verbs-FORBIDDEN, and deriving THAT to ALLOWED is the intended common case.
|
|
1989
|
+
if (params.systemAccessPolicy?.updateMany === ResourceSystemAccessMode.FORBIDDEN) {
|
|
1990
|
+
throw createConfigurationError(`[${resourceIdentifier}] retentionPolicy requires systemAccessPolicy.updateMany = ALLOWED ` +
|
|
1991
|
+
`(the impersonalize writer scrubs in place via updateManyAsSystem), but this resource explicitly ` +
|
|
1992
|
+
`authored updateMany: FORBIDDEN. Remove it (the grant is derived automatically) or drop retentionPolicy.`);
|
|
1993
|
+
}
|
|
1994
|
+
if (params.systemAccessPolicy?.seeRetained === ResourceSystemAccessMode.FORBIDDEN) {
|
|
1995
|
+
throw createConfigurationError(`[${resourceIdentifier}] retentionPolicy requires systemAccessPolicy.seeRetained = ALLOWED ` +
|
|
1996
|
+
`(the audited see-through read of retained rows), but this resource explicitly authored ` +
|
|
1997
|
+
`seeRetained: FORBIDDEN. Remove it (the grant is derived automatically) or drop retentionPolicy.`);
|
|
1998
|
+
}
|
|
1999
|
+
effectiveSystemAccessPolicy = {
|
|
2000
|
+
...effectiveSystemAccessPolicy,
|
|
2001
|
+
updateMany: ResourceSystemAccessMode.ALLOWED,
|
|
2002
|
+
seeRetained: ResourceSystemAccessMode.ALLOWED,
|
|
2003
|
+
};
|
|
2004
|
+
}
|
|
2005
|
+
// ── dataSubjectPolicy: WHO the row is, and whose session an erasure ends ──────────────────────
|
|
2006
|
+
//
|
|
2007
|
+
// Placed AFTER the retention operation contract on purpose: a config can be wrong in several ways
|
|
2008
|
+
// at once, and the contract's errors are the more specific ones ("declare UPDATE_MANY", "rename
|
|
2009
|
+
// your reserved field"). Running this first masked them, so an author fixing a missing operation
|
|
2010
|
+
// was told to declare a data-subject policy instead.
|
|
2011
|
+
//
|
|
2012
|
+
// Paired with `retentionPolicy` in BOTH directions, because a retention-governed resource is
|
|
2013
|
+
// exactly one that `eraseSubjectAsSystem` accepts as a subject (the orchestrator refuses a subject
|
|
2014
|
+
// with no retention policy), and a `dataSubjectPolicy` on anything else describes an erasure that
|
|
2015
|
+
// can never happen.
|
|
2016
|
+
//
|
|
2017
|
+
// Undeclared is REFUSED rather than defaulted: there is no safe default. Assuming
|
|
2018
|
+
// NO_PRINCIPAL would silently drop a real person's session revocation; assuming a linked
|
|
2019
|
+
// principal would revoke whoever a user foreign key happens to name — on `TODOS` that is the
|
|
2020
|
+
// author, the assignee and the escalation contact, none of whom is the data subject. Refusing is
|
|
2021
|
+
// what forces the decision, matching the subject-EXPORT model's treatment of an undeclared resource.
|
|
2022
|
+
if (retentionPolicy?.mode && !dataSubjectPolicy) {
|
|
2023
|
+
throw createConfigurationError(`[${resourceIdentifier}] retentionPolicy requires a dataSubjectPolicy. A retention-governed ` +
|
|
2024
|
+
`resource can be passed to eraseSubjectAsSystem as a data subject, so it must declare WHOSE ` +
|
|
2025
|
+
`SESSION an erasure ends: ResourceDataSubjectKind.NO_PRINCIPAL (nobody's — either an ordinary ` +
|
|
2026
|
+
`record whose user foreign keys name actors rather than the subject, OR a person with no ` +
|
|
2027
|
+
`account such as a CRM contact or a lead), SELF_PRINCIPAL (the row is the person and its own ` +
|
|
2028
|
+
`id is the session principal), or LINKED_PRINCIPAL with sessionPrincipalField (the person ` +
|
|
2029
|
+
`signs in as a different USERS row). Note this is NOT "is the row about a person" — that is ` +
|
|
2030
|
+
`answered by retentionPolicy.mode. This is never inferred from a user foreign key — doing so ` +
|
|
2031
|
+
`would revoke the sessions of owners and assignees instead of the subject.`);
|
|
2032
|
+
}
|
|
2033
|
+
if (dataSubjectPolicy && !retentionPolicy?.mode) {
|
|
2034
|
+
throw createConfigurationError(`[${resourceIdentifier}] dataSubjectPolicy requires retentionPolicy. Without one this resource ` +
|
|
2035
|
+
`can never be an erasure subject (eraseSubjectAsSystem refuses a subject that is not ` +
|
|
2036
|
+
`retention-governed), so the declaration would describe an erasure that cannot happen.`);
|
|
2037
|
+
}
|
|
2038
|
+
if (dataSubjectPolicy) {
|
|
2039
|
+
const namesPrincipalField = dataSubjectPolicy.kind === ResourceDataSubjectKind.LINKED_PRINCIPAL;
|
|
2040
|
+
if (namesPrincipalField && !dataSubjectPolicy.sessionPrincipalField) {
|
|
2041
|
+
throw createConfigurationError(`[${resourceIdentifier}] dataSubjectPolicy.kind = LINKED_PRINCIPAL requires ` +
|
|
2042
|
+
`sessionPrincipalField — the field naming the USERS row whose session an erasure of this row ` +
|
|
2043
|
+
`must end. Without it the erasure has no principal to revoke and the declaration would be inert.`);
|
|
2044
|
+
}
|
|
2045
|
+
if (!namesPrincipalField && dataSubjectPolicy.sessionPrincipalField) {
|
|
2046
|
+
throw createConfigurationError(`[${resourceIdentifier}] dataSubjectPolicy.sessionPrincipalField is only valid under ` +
|
|
2047
|
+
`kind = LINKED_PRINCIPAL (got '${dataSubjectPolicy.kind}'). Under SELF_PRINCIPAL the row's own ` +
|
|
2048
|
+
`id IS the principal, and under NO_PRINCIPAL there is no principal at all — so naming a ` +
|
|
2049
|
+
`field here is a contradiction, not a redundancy.`);
|
|
2050
|
+
}
|
|
2051
|
+
// The named link must not ALSO be scrubbed. This is a COHERENCE guard, not a prerequisite of the
|
|
2052
|
+
// revocation: the principal is resolved BEFORE the scrub (a post-commit read is impossible — the
|
|
2053
|
+
// row is RETAINED and hidden by then, and the only see-through door demands a privileged human),
|
|
2054
|
+
// so a scrubbed field would still be readable when it matters. It is refused because declaring one
|
|
2055
|
+
// field to be BOTH the link to a person and personal data to destroy is a contradiction, and it
|
|
2056
|
+
// leaves the retained row unable to say whose session was ended.
|
|
2057
|
+
//
|
|
2058
|
+
// Derived from the WRITER (`buildImpersonalizeScrubPatch`) rather than from a treatment count —
|
|
2059
|
+
// the same discipline the zero-scrub guard uses, because only the writer knows which declarations
|
|
2060
|
+
// actually produce a scrub.
|
|
2061
|
+
if (namesPrincipalField && mainSchema instanceof z.ZodObject) {
|
|
2062
|
+
const principalField = dataSubjectPolicy.sessionPrincipalField;
|
|
2063
|
+
if (!(principalField in mainSchema.shape)) {
|
|
2064
|
+
throw createConfigurationError(`[${resourceIdentifier}] dataSubjectPolicy.sessionPrincipalField = '${principalField}' is not ` +
|
|
2065
|
+
`a top-level field of this resource's mainSchema.`);
|
|
2066
|
+
}
|
|
2067
|
+
if (principalField in buildImpersonalizeScrubPatch(mainSchema)) {
|
|
2068
|
+
throw createConfigurationError(`[${resourceIdentifier}] dataSubjectPolicy.sessionPrincipalField = '${principalField}' is ` +
|
|
2069
|
+
`SCRUBBED by the erasure (it carries an .impersonalizeWith() treatment the writer acts on). A ` +
|
|
2070
|
+
`field cannot be both the link naming this person's login and personal data to destroy — the ` +
|
|
2071
|
+
`retained row would be left unable to say whose session was ended. Remove the treatment from ` +
|
|
2072
|
+
`that field (a user id is a link, not personal data of this row) or name a different field.`);
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
// The system LIST grant the principal lookup needs.
|
|
2076
|
+
//
|
|
2077
|
+
// `eraseSubjectAsSystem` resolves the principal by reading the subject rows through
|
|
2078
|
+
// `listAsSystem`, which fail-closes on `systemAccessPolicy.list`. The retention derivation grants
|
|
2079
|
+
// only `updateMany` + `seeRetained`, and an unauthored policy is all-verbs-FORBIDDEN — so without
|
|
2080
|
+
// this the lookup would throw, be swallowed as best-effort, resolve to NO principals, and the
|
|
2081
|
+
// erased person's session would quietly survive. That is the exact failure this whole capability
|
|
2082
|
+
// exists to close, so the grant is derived from the declaration that requires it.
|
|
2083
|
+
//
|
|
2084
|
+
// Reads the RAW authored policy (`params.systemAccessPolicy`) — an unauthored policy defaults to
|
|
2085
|
+
// all-verbs-FORBIDDEN, and deriving THAT to ALLOWED is the intended common case.
|
|
2086
|
+
//
|
|
2087
|
+
// Scoped to LINKED_PRINCIPAL deliberately: SELF_PRINCIPAL needs no read (the subject ids ARE the
|
|
2088
|
+
// user ids) and NO_PRINCIPAL reads nothing at all, so neither earns a widened system surface.
|
|
2089
|
+
if (namesPrincipalField) {
|
|
2090
|
+
if (params.systemAccessPolicy?.list === ResourceSystemAccessMode.FORBIDDEN) {
|
|
2091
|
+
throw createConfigurationError(`[${resourceIdentifier}] dataSubjectPolicy.kind = LINKED_PRINCIPAL requires ` +
|
|
2092
|
+
`systemAccessPolicy.list = ALLOWED (the erasure reads the subject rows to resolve the session ` +
|
|
2093
|
+
`principal), but this resource explicitly authored list: FORBIDDEN. Remove it (the grant is ` +
|
|
2094
|
+
`derived automatically) or declare a different dataSubjectPolicy.kind.`);
|
|
2095
|
+
}
|
|
2096
|
+
effectiveSystemAccessPolicy = {
|
|
2097
|
+
...effectiveSystemAccessPolicy,
|
|
2098
|
+
list: ResourceSystemAccessMode.ALLOWED,
|
|
2099
|
+
};
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
// ========================================
|
|
2103
|
+
// DATA-CATEGORY VOCABULARY VALIDATION
|
|
2104
|
+
// ========================================
|
|
2105
|
+
//
|
|
2106
|
+
// `.dataCategories()` stores opaque strings: `zod-decorators` sits BELOW this package and cannot
|
|
2107
|
+
// import `PersonalDataCategory`, so its chokepoint can only check that non-empty strings were
|
|
2108
|
+
// declared. This is the layer that owns the enum, so this is where membership is checked.
|
|
2109
|
+
//
|
|
2110
|
+
// UNCONDITIONAL, unlike the impersonalize guards above — those run only inside `retentionPolicy`
|
|
2111
|
+
// because a treatment is meaningless without one. A data category is meaningful on any resource:
|
|
2112
|
+
// a hard-deleted resource still HOLDS personal data while it exists, and a privacy notice must
|
|
2113
|
+
// enumerate it. Gating this on retentionPolicy would silently exempt exactly the resources that
|
|
2114
|
+
// opted out of retention.
|
|
2115
|
+
//
|
|
2116
|
+
// A typo'd category is worse than an undeclared one and that is why this is a BOOT ERROR rather
|
|
2117
|
+
// than a warning: `'contact_details'` (underscore) is not a member, so the field would be counted
|
|
2118
|
+
// as CATEGORIZED by the gap report — it carries a declaration — while contributing nothing to the
|
|
2119
|
+
// notice's category list. The field disappears from the inventory while looking annotated in the
|
|
2120
|
+
// schema, which is the failure this whole capability exists to prevent.
|
|
2121
|
+
//
|
|
2122
|
+
// TOP-LEVEL fields only, deliberately matching `resolveResourcePersonalDataCategories`: a nested
|
|
2123
|
+
// declaration is invisible to the reader, so validating it here would certify a value nothing
|
|
2124
|
+
// consumes. Unlike a nested `.impersonalizeWith()` — which is a boot error because the row would
|
|
2125
|
+
// flip to RETAINED with the field intact — a nested category breaks nothing at runtime; it simply
|
|
2126
|
+
// never reaches a notice.
|
|
2127
|
+
if (isZodObject(effectiveMainSchema)) {
|
|
2128
|
+
for (const [fieldName, fieldSchema] of Object.entries(getZodObjectShape(effectiveMainSchema))) {
|
|
2129
|
+
const declared = getDataCategories(fieldSchema);
|
|
2130
|
+
if (declared === undefined)
|
|
2131
|
+
continue;
|
|
2132
|
+
const unknownCategories = unknownPersonalDataCategories(declared);
|
|
2133
|
+
if (unknownCategories.length > 0) {
|
|
2134
|
+
throw createConfigurationError(`[${resourceIdentifier}] field '${fieldName}' declares data categor${unknownCategories.length === 1 ? 'y' : 'ies'} ` +
|
|
2135
|
+
`[${unknownCategories.join(', ')}] that ${unknownCategories.length === 1 ? 'is' : 'are'} not a PersonalDataCategory member. ` +
|
|
2136
|
+
`A value outside the vocabulary counts the field as CATEGORIZED — so it is excluded from the ` +
|
|
2137
|
+
`uncategorized-field gap report — while contributing nothing to the privacy notice's category list. ` +
|
|
2138
|
+
`Use a PersonalDataCategory member, or drop the declaration if the field holds no personal data.`);
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
1066
2141
|
}
|
|
1067
2142
|
// ========================================
|
|
1068
2143
|
// TRANSFORM RESOURCE RELATIONSHIPS
|
|
@@ -1091,6 +2166,7 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1091
2166
|
const enableListContext = autoVariantsList.enableContext !== false; // default true
|
|
1092
2167
|
// Process operation configurations
|
|
1093
2168
|
for (const [operation, config] of Object.entries(operationsConfiguration)) {
|
|
2169
|
+
assertOperationPathKeySegment(String(operation), 'operation identifier', String(operation));
|
|
1094
2170
|
// Validate isDefault logic by grouping variants by their variantType
|
|
1095
2171
|
const variantsByType = new Map();
|
|
1096
2172
|
// Group variants by their type
|
|
@@ -1100,9 +2176,12 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1100
2176
|
}
|
|
1101
2177
|
variantsByType.get(variant.variantType).push(variant);
|
|
1102
2178
|
});
|
|
1103
|
-
// Validate each variant type group
|
|
2179
|
+
// Validate each variant type group. URL-bearing variants form a shared
|
|
2180
|
+
// operation identity space (`API_CALL` and `API_CALL_WITH_CALLBACK` are
|
|
2181
|
+
// both selected by operation/default/key at many call sites), so their
|
|
2182
|
+
// default/key invariants are validated as one combined group below.
|
|
1104
2183
|
for (const [variantType, variantsGroup] of variantsByType.entries()) {
|
|
1105
|
-
if (variantsGroup.length > 1) {
|
|
2184
|
+
if (!isUrlisableOperationVariantType(variantType) && variantsGroup.length > 1) {
|
|
1106
2185
|
const explicitDefaults = variantsGroup.filter((variant) => variant.isDefault === true);
|
|
1107
2186
|
if (explicitDefaults.length === 0) {
|
|
1108
2187
|
throw createConfigurationError(`Operation '${operation}' with multiple ${variantType} variants must have at least one with isDefault=true`);
|
|
@@ -1111,31 +2190,79 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1111
2190
|
throw createConfigurationError(`Operation '${operation}' with multiple ${variantType} variants cannot declare more than one with isDefault=true`);
|
|
1112
2191
|
}
|
|
1113
2192
|
}
|
|
1114
|
-
if (variantType
|
|
1115
|
-
const seenVariantKeys = new Set();
|
|
1116
|
-
let seenNonDefaultWithoutVariantKey = false;
|
|
2193
|
+
if (isUrlisableOperationVariantType(variantType)) {
|
|
1117
2194
|
for (const variant of variantsGroup) {
|
|
1118
|
-
|
|
1119
|
-
|
|
2195
|
+
// 🔒 Fail-closed guard: a URL-bearing variant with an EMPTY roles array
|
|
2196
|
+
// is not "skip the role check" — it is a guaranteed 403. The runtime gate
|
|
2197
|
+
// (`AuthorizationsBackendService.validateOperationRoles`) evaluates
|
|
2198
|
+
// `roles.some(...)`, and `[].some()` is always false, so EVERY caller is
|
|
2199
|
+
// denied. There is no legitimate empty-roles URL operation: public ops use
|
|
2200
|
+
// `APP_PUBLIC`, anonymous ops use `APP_ANONYMOUS`, user-self ops use
|
|
2201
|
+
// `APP_USER` (row ownership is enforced separately by the scope authorizer).
|
|
2202
|
+
// Catch the mistake at config-build time instead of shipping a dead endpoint.
|
|
2203
|
+
// (INTERNAL_CALL / REPOSITORY_ONLY variants are exempt — not URL-bearing, so
|
|
2204
|
+
// this loop never sees them; their empty roles are inert.)
|
|
2205
|
+
if (!variant.roles || variant.roles.length === 0) {
|
|
2206
|
+
throw createConfigurationError(`Operation '${operation}' has a URL-bearing (${variantType}) variant with an empty roles array. ` +
|
|
2207
|
+
`An empty roles array is fail-CLOSED: the authorization gate evaluates roles.some(...), which is ` +
|
|
2208
|
+
`always false for [], so every caller is denied (403). Specify at least one role — e.g. ` +
|
|
2209
|
+
`CORE_APP_ROLES.APP_USER (user-self / any authenticated user), CORE_APP_ROLES.APP_PUBLIC (public), ` +
|
|
2210
|
+
`CORE_APP_ROLES.APP_ANONYMOUS (anonymous), or the appropriate ORG/APP role.`);
|
|
1120
2211
|
}
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
continue;
|
|
2212
|
+
if (variant.variantKey) {
|
|
2213
|
+
assertOperationPathKeySegment(variant.variantKey, 'variantKey', String(operation));
|
|
1124
2214
|
}
|
|
1125
|
-
if (
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
2215
|
+
if (variant.variantKey && RESERVED_OPERATION_VARIANT_KEYS.has(variant.variantKey.toLowerCase())) {
|
|
2216
|
+
throw createConfigurationError(`Operation '${operation}' cannot use reserved variantKey '${variant.variantKey}'`);
|
|
2217
|
+
}
|
|
2218
|
+
if (variant.variantKey && AUTO_OPERATION_VARIANT_KEYS.has(variant.variantKey.toLowerCase())
|
|
2219
|
+
&& variant.variantKey !== variant.variantKey.toLowerCase()) {
|
|
2220
|
+
throw createConfigurationError(`Operation '${operation}' must use canonical lowercase variantKey '${variant.variantKey.toLowerCase()}' for generated variant semantics`);
|
|
1131
2221
|
}
|
|
1132
|
-
if (
|
|
1133
|
-
|
|
2222
|
+
if (variant.variantKey && AUTO_OPERATION_VARIANT_KEYS.has(variant.variantKey.toLowerCase())
|
|
2223
|
+
&& !isDataModeVariantKeyAllowedForOperation(String(operation), variant)) {
|
|
2224
|
+
throw createConfigurationError(`Operation '${operation}' cannot use data-mode variantKey '${variant.variantKey}' unless it is READ, LIST, or SEARCH-like`);
|
|
1134
2225
|
}
|
|
1135
|
-
seenVariantKeys.add(variant.variantKey);
|
|
1136
2226
|
}
|
|
1137
2227
|
}
|
|
1138
2228
|
}
|
|
2229
|
+
const urlisableVariants = config.variants.filter((variant) => isUrlisableOperationVariantType(variant.variantType));
|
|
2230
|
+
const explicitUrlisableDefaults = urlisableVariants.filter((variant) => variant.isDefault === true);
|
|
2231
|
+
if (urlisableVariants.length > 1) {
|
|
2232
|
+
if (explicitUrlisableDefaults.length === 0) {
|
|
2233
|
+
throw createConfigurationError(`Operation '${operation}' with multiple URL-bearing variants must have exactly one with isDefault=true`);
|
|
2234
|
+
}
|
|
2235
|
+
if (explicitUrlisableDefaults.length > 1) {
|
|
2236
|
+
throw createConfigurationError(`Operation '${operation}' cannot declare more than one default URL-bearing variant across API_CALL and API_CALL_WITH_CALLBACK`);
|
|
2237
|
+
}
|
|
2238
|
+
}
|
|
2239
|
+
// A single URL-bearing variant is the URL default UNLESS the author explicitly set
|
|
2240
|
+
// `isDefault: false` — mirrors `determineOperationVariantDefault` Rule 1 so the stored
|
|
2241
|
+
// `isOperationDefault` flag and this validation set never disagree. When the opt-out is
|
|
2242
|
+
// honored, the sole `isDefault: false` URL variant is treated as non-default here, which
|
|
2243
|
+
// correctly routes it through the "non-default URL-bearing variant must declare a
|
|
2244
|
+
// variantKey" check below — a sole opted-out URL variant with no variantKey would
|
|
2245
|
+
// otherwise be unresolvable by BOTH the default and the keyed path resolver.
|
|
2246
|
+
const urlisableDefaultVariants = urlisableVariants.length === 1
|
|
2247
|
+
? urlisableVariants.filter((variant) => variant.isDefault !== false)
|
|
2248
|
+
: explicitUrlisableDefaults;
|
|
2249
|
+
const urlisableVariantKeys = new Set();
|
|
2250
|
+
for (const variant of urlisableVariants) {
|
|
2251
|
+
const willBeDefault = urlisableDefaultVariants.includes(variant);
|
|
2252
|
+
if (variant.variantKey) {
|
|
2253
|
+
const normalizedVariantKey = variant.variantKey.toLowerCase();
|
|
2254
|
+
if (urlisableVariantKeys.has(normalizedVariantKey)) {
|
|
2255
|
+
throw createConfigurationError(`Operation '${operation}' cannot reuse variantKey '${variant.variantKey}' across URL-bearing variants`);
|
|
2256
|
+
}
|
|
2257
|
+
urlisableVariantKeys.add(normalizedVariantKey);
|
|
2258
|
+
}
|
|
2259
|
+
if (willBeDefault) {
|
|
2260
|
+
continue;
|
|
2261
|
+
}
|
|
2262
|
+
if (!variant.variantKey) {
|
|
2263
|
+
throw createConfigurationError(`Operation '${operation}' cannot declare a non-default URL-bearing variant without a variantKey`);
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
1139
2266
|
// Process parent resource access scope strategy overrides for this operation
|
|
1140
2267
|
const operationResourceRelationships = processParentResourceAccessScopeStrategyOverrides(processedResourceRelationships, availableParentResourceTypes, config.parentResourceAccessScopeStrategyOverrides || [], operation);
|
|
1141
2268
|
// Process user notifications using helper function
|
|
@@ -1146,15 +2273,47 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1146
2273
|
config.variants.forEach((variantParams, variantIndex) => {
|
|
1147
2274
|
// Note: Cascading delete is now handled via childOperations.lifecycle.onParentDelete on relationships
|
|
1148
2275
|
// No longer processed at operation variant level
|
|
1149
|
-
// Determine if this variant is the default
|
|
2276
|
+
// Determine if this variant is the operation default. URL-bearing
|
|
2277
|
+
// variants share one default/key identity space across API and callback
|
|
2278
|
+
// transports; non-URL transports keep variant-type-local defaults.
|
|
1150
2279
|
const variantsOfSameType = variantsByType.get(variantParams.variantType) || [];
|
|
1151
|
-
const isOperationDefault =
|
|
2280
|
+
const isOperationDefault = isUrlisableOperationVariantType(variantParams.variantType)
|
|
2281
|
+
? determineOperationVariantDefault(urlisableVariants, variantParams)
|
|
2282
|
+
: determineOperationVariantDefault(variantsOfSameType, variantParams);
|
|
1152
2283
|
// Determine effective operation for DTO derivation
|
|
1153
2284
|
// For custom operations, use resourceOperationLike if it maps to CREATE or UPDATE
|
|
1154
2285
|
const isCustomOperation = !coreOperations.includes(operation);
|
|
1155
2286
|
const effectiveOperationForDto = isCustomOperation
|
|
1156
2287
|
? (variantParams.resourceOperationLike || operation)
|
|
1157
2288
|
: operation;
|
|
2289
|
+
// ── Dev-time guardrail: custom op borrowing a NON-object envelope verb ──
|
|
2290
|
+
// A custom operation that borrows DELETE / DELETE_MANY / COUNT via
|
|
2291
|
+
// `resourceOperationLike` inherits that verb's DEFAULT response envelope
|
|
2292
|
+
// (`{ id, deletedAt? }` / `{ deletedIds, deletedCount }` / `{ count }`) as
|
|
2293
|
+
// its responseDto AND internalDto. That envelope is almost never what a
|
|
2294
|
+
// custom op actually returns, so at runtime the service output fails
|
|
2295
|
+
// `transformOutput`'s `internalDto.parse` → HTTP 500
|
|
2296
|
+
// (`service_resource_transformation_failed`). Warn — do NOT throw: a custom
|
|
2297
|
+
// op that legitimately returns a bare id / `{ count }` is valid, so this is
|
|
2298
|
+
// a misconfiguration signal, not an invariant. Surfacing it at registry
|
|
2299
|
+
// build beats discovering it on first invocation.
|
|
2300
|
+
//
|
|
2301
|
+
// Scope note: this deliberately does NOT cover UPDATE / CREATE / READ
|
|
2302
|
+
// borrowing. Those verbs' default response IS the resource object, which is
|
|
2303
|
+
// correct for the many custom mutation ops that return the mutated entity —
|
|
2304
|
+
// a static check cannot tell those from the (rarer) ones that return a
|
|
2305
|
+
// non-resource shape (e.g. `{ url }`, `{ message }`). Those are guarded by
|
|
2306
|
+
// an authored `customResponseDto` + the built-operation DTO tests instead.
|
|
2307
|
+
if (isCustomOperation && !variantParams.customResponseDto
|
|
2308
|
+
&& (variantParams.resourceOperationLike === CoreResourceOperation.DELETE
|
|
2309
|
+
|| variantParams.resourceOperationLike === CoreResourceOperation.DELETE_MANY
|
|
2310
|
+
|| variantParams.resourceOperationLike === CoreResourceOperation.COUNT)) {
|
|
2311
|
+
console.warn(`[wildo:resource-config] Custom operation "${String(resourceIdentifier)}.${String(operation)}" `
|
|
2312
|
+
+ `borrows ${String(variantParams.resourceOperationLike)} via resourceOperationLike but declares no `
|
|
2313
|
+
+ `customResponseDto. It will inherit that verb's default response envelope, which almost never `
|
|
2314
|
+
+ `matches a custom operation's output and will fail output validation (HTTP 500) at invocation. `
|
|
2315
|
+
+ `Declare a customResponseDto matching the operation's true return shape.`);
|
|
2316
|
+
}
|
|
1158
2317
|
// Auto-derive requestDto from decorators if not explicitly provided
|
|
1159
2318
|
const derivedRequestDto = deriveRequestDto(effectiveOperationForDto, effectiveMainSchema, variantParams.requestDto);
|
|
1160
2319
|
// Auto-derive responseDto based on operation type
|
|
@@ -1166,7 +2325,8 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1166
2325
|
if (variantParams.customResponseDto) {
|
|
1167
2326
|
return variantParams.customResponseDto;
|
|
1168
2327
|
}
|
|
1169
|
-
if (operation === CoreResourceOperation.LIST
|
|
2328
|
+
if (operation === CoreResourceOperation.LIST
|
|
2329
|
+
|| variantParams.resourceOperationLike === CoreResourceOperation.LIST) {
|
|
1170
2330
|
return derivedSummarySchema;
|
|
1171
2331
|
}
|
|
1172
2332
|
if (operation === CoreResourceOperation.SEARCH
|
|
@@ -1194,6 +2354,12 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1194
2354
|
serviceRuntimeMode: config.serviceRuntimeMode || ResourceOperation_ServiceRuntimeMode.INLINE,
|
|
1195
2355
|
requestDto: derivedRequestDto, // Temporary - will be replaced by buildAllOperationDtos
|
|
1196
2356
|
responseDto: operationResponseDto, // Temporary - will be replaced by buildAllOperationDtos
|
|
2357
|
+
// When the variant supplied an explicit `requestDto`, it is an author-owned
|
|
2358
|
+
// contract the DTO builder must preserve verbatim. Otherwise `derivedRequestDto`
|
|
2359
|
+
// is an auto-derived TEMPORARY placeholder built from the base object (before
|
|
2360
|
+
// inheritance is known), so the builder must rebuild it — as a per-variant union
|
|
2361
|
+
// for inheritance resources. See `hasCustomRequestDto` in the operation schema.
|
|
2362
|
+
hasCustomRequestDto: !!variantParams.requestDto,
|
|
1197
2363
|
hasCustomResponseDto: !!variantParams.customResponseDto,
|
|
1198
2364
|
notificationBadgeOperations: config.notificationBadgeOperations || [],
|
|
1199
2365
|
userNotifications,
|
|
@@ -1201,14 +2367,51 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1201
2367
|
// Fields from ResourceConfiguration_OperationVariant_Base
|
|
1202
2368
|
variantType: variantParams.variantType,
|
|
1203
2369
|
resourceOperationLike: variantParams.resourceOperationLike,
|
|
2370
|
+
generatedOperation: variantParams.generatedOperation,
|
|
2371
|
+
// Forwarded here rather than inside the collection-view enrichment below, which is an
|
|
2372
|
+
// explicit ALLOW-LIST reached only by LIST/SEARCH-shaped variants. Copying it there would
|
|
2373
|
+
// make a `collectionExport` declared on the wrong verb vanish silently; copying it here
|
|
2374
|
+
// lets it reach `createGeneratedCollectionExportOperations`, which refuses it by name.
|
|
2375
|
+
collectionExport: variantParams.collectionExport,
|
|
1204
2376
|
requiredFeatures: normalizeRequiredFeatures(variantParams.requiredFeatures),
|
|
1205
2377
|
riskLevel: variantParams.riskLevel || ResourceOperationRiskLevel.LOW,
|
|
1206
2378
|
roles: variantParams.roles,
|
|
2379
|
+
// Forwarded, not defaulted: the startup guard and the request-time refusal both read it
|
|
2380
|
+
// off the RUNTIME operation. This block re-lists variant fields rather than spreading
|
|
2381
|
+
// them, so a new variant field that is not added here is silently dropped between
|
|
2382
|
+
// authoring and runtime.
|
|
2383
|
+
unimplementedAcknowledgement: variantParams.unimplementedAcknowledgement,
|
|
2384
|
+
// Forwarded for the same reason: `enforceStepUpAuth` reads it off the RUNTIME operation, so
|
|
2385
|
+
// an unforwarded flag would leave the authored requirement silently unenforced — the exact
|
|
2386
|
+
// failure mode the flag exists to prevent.
|
|
2387
|
+
requiresStepUpAuthentication: variantParams.requiresStepUpAuthentication,
|
|
2388
|
+
admitsCrossTenantPlatformAdministration: variantParams.admitsCrossTenantPlatformAdministration,
|
|
2389
|
+
// Same forwarding obligation as its cross-tenant sibling: the authorizer reads this off the
|
|
2390
|
+
// RUNTIME operation, so dropping it here would silently re-close the admin surface.
|
|
2391
|
+
admitsCrossSubjectUserAdministration: variantParams.admitsCrossSubjectUserAdministration,
|
|
2392
|
+
// Forwarded for the same reason again: the post-commit audit emission reads it off the
|
|
2393
|
+
// RUNTIME operation. Dropping it would either lose an authored below-floor opt-in (a silent
|
|
2394
|
+
// audit gap) or lose an authored suppression (a duplicate row next to a purpose-built event).
|
|
2395
|
+
auditableEvent: variantParams.auditableEvent,
|
|
2396
|
+
mcp: variantParams.mcp,
|
|
1207
2397
|
customServiceImplementationModes: variantParams.customServiceImplementationModes || [],
|
|
1208
|
-
basicPrefixOperation: variantParams.basicPrefixOperation
|
|
2398
|
+
basicPrefixOperation: variantParams.basicPrefixOperation,
|
|
2399
|
+
// Travels WITH `basicPrefixOperation` — it declares which of that hook's fields survive the
|
|
2400
|
+
// repository's strict re-parse even when the caller also sent them. Dropping it here would
|
|
2401
|
+
// silently reduce the hook to the added-key inference it exists to correct.
|
|
2402
|
+
authoritativeFields: variantParams.authoritativeFields,
|
|
2403
|
+
// Forwarded for the same reason as its siblings above: the write-integrity guard reads the
|
|
2404
|
+
// per-variant reference POLICY off the RUNTIME operation. Dropping it here degrades every
|
|
2405
|
+
// variant to the relationship's baseline membership — so an authored `qualifyingStatuses` /
|
|
2406
|
+
// `requiredRoles` / `false` would be silently inert while the config claims otherwise. (This
|
|
2407
|
+
// is not hypothetical: it shipped that way once, and the e2e caught it as a PENDING and a
|
|
2408
|
+
// REVOKED partnership both admitting a share.)
|
|
2409
|
+
referenceConstraints: variantParams.referenceConstraints,
|
|
1209
2410
|
};
|
|
1210
|
-
if (variantParams.variantType
|
|
2411
|
+
if (isUrlisableOperationVariantType(variantParams.variantType)) {
|
|
1211
2412
|
const apiCallParams = variantParams;
|
|
2413
|
+
const isCallbackVariant = apiCallParams.variantType === ResourceOperationVariantType.API_CALL_WITH_CALLBACK;
|
|
2414
|
+
const callbackParams = apiCallParams;
|
|
1212
2415
|
// Determine if this is a custom operation and get the operation to check
|
|
1213
2416
|
const isCustomOperation = !coreOperations.includes(operation);
|
|
1214
2417
|
const operationToCheck = isCustomOperation ? apiCallParams.resourceOperationLike : operation;
|
|
@@ -1217,6 +2420,22 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1217
2420
|
if (haveBulkOperation && (operationToCheck === CoreResourceOperation.READ || operationToCheck === CoreResourceOperation.LIST)) {
|
|
1218
2421
|
throw createConfigurationError(`Operation '${operation}' cannot have bulk operations (read and list are not bulkable)`);
|
|
1219
2422
|
}
|
|
2423
|
+
const tokenStateSideEffects = [
|
|
2424
|
+
...(apiCallParams.tokenGeneration ? ['tokenGeneration'] : []),
|
|
2425
|
+
...(apiCallParams.tokenRevocation ? ['tokenRevocation'] : []),
|
|
2426
|
+
];
|
|
2427
|
+
if (tokenStateSideEffects.length > 0
|
|
2428
|
+
&& (haveBulkOperation
|
|
2429
|
+
|| isTokenStateEffectUnsupportedOperation(operationToCheck))) {
|
|
2430
|
+
throw createConfigurationError(`Operation '${operation}' cannot combine collection/bulk result semantics with ${tokenStateSideEffects.join(' and ')}. `
|
|
2431
|
+
+ 'Token generation and revocation each require one canonical related resource state; collection, aggregate, and '
|
|
2432
|
+
+ 'bulk operations do not expose a single related resource identity. Split the token side effect into a singular '
|
|
2433
|
+
+ 'operation or remove the collection/bulk variant.');
|
|
2434
|
+
}
|
|
2435
|
+
if (apiCallParams.tokenRevocation && operationToCheck === CoreResourceOperation.CREATE) {
|
|
2436
|
+
throw createConfigurationError(`Operation '${operation}' cannot revoke tokens before a CREATE operation because no current resource state exists. `
|
|
2437
|
+
+ 'Move token revocation to an operation that addresses an existing resource.');
|
|
2438
|
+
}
|
|
1220
2439
|
// Determine HTTP verb - for custom operations, use resourceOperationLike
|
|
1221
2440
|
let httpVerb;
|
|
1222
2441
|
if (isCustomOperation) {
|
|
@@ -1237,7 +2456,6 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1237
2456
|
if (apiCallParams.tokenRevocation) {
|
|
1238
2457
|
validateTokenRevocationConfig(apiCallParams.tokenRevocation, resourceIdentifier, operation);
|
|
1239
2458
|
}
|
|
1240
|
-
// Create API_CALL operation fields
|
|
1241
2459
|
const apiCallOperationFields = {
|
|
1242
2460
|
...baseOperationFields,
|
|
1243
2461
|
httpVerb,
|
|
@@ -1246,9 +2464,20 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1246
2464
|
tokenAuthentication: apiCallParams.tokenAuthentication,
|
|
1247
2465
|
tokenGeneration: apiCallParams.tokenGeneration,
|
|
1248
2466
|
tokenRevocation: apiCallParams.tokenRevocation,
|
|
2467
|
+
// Per-endpoint rate-limit policy: forwarded from the
|
|
2468
|
+
// builder params to the resolved operation. Read at runtime by
|
|
2469
|
+
// `RateLimitBackendService.checkPolicyForVariant` at the controller
|
|
2470
|
+
// pre-flight seam. `undefined` means the global HTTP limiter is the
|
|
2471
|
+
// only gate for this route.
|
|
2472
|
+
rateLimit: apiCallParams.rateLimit,
|
|
1249
2473
|
enabledCondition: apiCallParams.enabledCondition,
|
|
1250
2474
|
isDefault: apiCallParams.isDefault,
|
|
1251
|
-
variantKey: apiCallParams.variantKey
|
|
2475
|
+
variantKey: apiCallParams.variantKey,
|
|
2476
|
+
...(isCallbackVariant ? {
|
|
2477
|
+
callbackUrl: callbackParams.callbackUrl,
|
|
2478
|
+
callbackTimeout: callbackParams.callbackTimeout ?? 300,
|
|
2479
|
+
callbackRetryAttempts: callbackParams.callbackRetryAttempts ?? 3,
|
|
2480
|
+
} : {}),
|
|
1252
2481
|
};
|
|
1253
2482
|
// ── Collection-view enrichment ──────────────────────────────────
|
|
1254
2483
|
// When an operation is SEARCH-like or LIST-like (by identity or resourceOperationLike),
|
|
@@ -1259,7 +2488,6 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1259
2488
|
|| variantParams.resourceOperationLike === CoreResourceOperation.LIST;
|
|
1260
2489
|
if (isSearchLike) {
|
|
1261
2490
|
const pageSize = variantParams.pageSize ?? 20;
|
|
1262
|
-
const displayMode = variantParams.displayMode ?? 'cards';
|
|
1263
2491
|
const isSearchable = variantParams.isSearchable !== false;
|
|
1264
2492
|
const searchableFields = variantParams.searchableFields || [];
|
|
1265
2493
|
const searchableOptions = variantParams.searchableOptions || { caseSensitive: false, fullMatchOnly: false };
|
|
@@ -1275,7 +2503,10 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1275
2503
|
const searchQueryRequestSchema = createResourceSearchQueryRequestSchema({
|
|
1276
2504
|
filterFields,
|
|
1277
2505
|
allowedSortFields: sortFields,
|
|
1278
|
-
pagination: true
|
|
2506
|
+
pagination: true,
|
|
2507
|
+
// The SAME value the response schema below is built from. That equality is the point:
|
|
2508
|
+
// request, repository and response must agree on one ceiling.
|
|
2509
|
+
maxPaginatedResultPerPageLimit
|
|
1279
2510
|
});
|
|
1280
2511
|
const paginatedResponseSchema = createResourcePaginatedResponseSchema({
|
|
1281
2512
|
dataSchema: derivedSummarySchema,
|
|
@@ -1284,7 +2515,6 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1284
2515
|
});
|
|
1285
2516
|
Object.assign(apiCallOperationFields, {
|
|
1286
2517
|
pageSize,
|
|
1287
|
-
displayMode,
|
|
1288
2518
|
isSearchable,
|
|
1289
2519
|
searchableFields,
|
|
1290
2520
|
searchableOptions,
|
|
@@ -1299,9 +2529,12 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1299
2529
|
if (isListLike) {
|
|
1300
2530
|
const listEnrichment = {
|
|
1301
2531
|
pageSize: variantParams.pageSize ?? 20,
|
|
1302
|
-
displayMode: variantParams.displayMode ?? 'cards',
|
|
1303
2532
|
searchEnabled: variantParams.searchEnabled ?? true,
|
|
1304
2533
|
filtersEnabled: variantParams.filtersEnabled ?? true,
|
|
2534
|
+
// LIST has one pagination authority. Keep the effective ceiling on the resolved
|
|
2535
|
+
// operation so request/response DTO construction, repositories, auto-generated
|
|
2536
|
+
// SUMMARY/CONTEXT variants and API-reference projection all observe the same value.
|
|
2537
|
+
maxPaginatedResultPerPageLimit: variantParams.maxPaginatedResultPerPageLimit ?? 100,
|
|
1305
2538
|
};
|
|
1306
2539
|
if (variantParams.filterFields !== undefined) {
|
|
1307
2540
|
listEnrichment.filterFields = variantParams.filterFields;
|
|
@@ -1357,23 +2590,23 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1357
2590
|
// ========================================
|
|
1358
2591
|
// Only process auto-variants for READ and LIST core operations
|
|
1359
2592
|
if (operation === CoreResourceOperation.READ || operation === CoreResourceOperation.LIST) {
|
|
1360
|
-
// Reuse the flattened default
|
|
2593
|
+
// Reuse the flattened default URL-bearing operation so auto-variants inherit the same
|
|
1361
2594
|
// resolved default identity as the rest of the resource config.
|
|
1362
2595
|
const defaultApiCallVariant = [...operations].reverse().find((candidate) => (candidate.operationIdentifier === operation
|
|
1363
|
-
&& candidate.variantType
|
|
2596
|
+
&& isUrlisableOperationVariantType(candidate.variantType)
|
|
1364
2597
|
&& candidate.isOperationDefault === true
|
|
1365
2598
|
&& !('isBulkOperation' in candidate && candidate.isBulkOperation === true)));
|
|
1366
2599
|
if (!defaultApiCallVariant) {
|
|
1367
2600
|
// Skip auto-variants if no default variant exists
|
|
1368
2601
|
continue;
|
|
1369
2602
|
}
|
|
2603
|
+
const defaultListCollectionFields = defaultApiCallVariant;
|
|
1370
2604
|
// Check which variants already exist
|
|
1371
|
-
const existingVariantKeys = new Set(operations
|
|
1372
|
-
|
|
1373
|
-
&& candidate.variantType === ResourceOperationVariantType.API_CALL
|
|
2605
|
+
const existingVariantKeys = new Set(operations.filter((candidate) => (candidate.operationIdentifier === operation
|
|
2606
|
+
&& isUrlisableOperationVariantType(candidate.variantType)
|
|
1374
2607
|
&& candidate.variantKey
|
|
1375
2608
|
&& !('isBulkOperation' in candidate && candidate.isBulkOperation === true)))
|
|
1376
|
-
.map((candidate) => candidate.variantKey));
|
|
2609
|
+
.map((candidate) => candidate.variantKey.toLowerCase()));
|
|
1377
2610
|
// Helper to create auto-variant operation
|
|
1378
2611
|
// Note: DTOs will be pre-computed by buildAllOperationDtos() after all operations are created.
|
|
1379
2612
|
// We set temporary DTOs here for type compatibility, but they will be replaced.
|
|
@@ -1390,26 +2623,83 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1390
2623
|
isOperationDefault: false, // Auto-variants are never operation default
|
|
1391
2624
|
serviceRuntimeMode: config.serviceRuntimeMode || ResourceOperation_ServiceRuntimeMode.INLINE,
|
|
1392
2625
|
requestDto: defaultApiCallVariant.requestDto || deriveRequestDto(operation, effectiveMainSchema, undefined), // Temporary - will be replaced by buildAllOperationDtos
|
|
2626
|
+
// Forwarded for the same reason as `unimplementedAcknowledgement` below: an auto-variant
|
|
2627
|
+
// is a projection of the default variant, so it inherits that variant's request contract
|
|
2628
|
+
// and must report the same provenance. Dropping it would make a projection of an
|
|
2629
|
+
// AUTHORED contract look auto-derived to the request-contract-breadth guard.
|
|
2630
|
+
hasCustomRequestDto: defaultApiCallVariant.hasCustomRequestDto ?? !!defaultApiCallVariant.requestDto,
|
|
1393
2631
|
responseDto, // Temporary - will be replaced by buildAllOperationDtos
|
|
1394
2632
|
notificationBadgeOperations: config.notificationBadgeOperations || [],
|
|
1395
2633
|
userNotifications,
|
|
1396
2634
|
m2mNotifications,
|
|
1397
|
-
variantType:
|
|
2635
|
+
variantType: defaultApiCallVariant.variantType,
|
|
1398
2636
|
resourceOperationLike: defaultApiCallVariant.resourceOperationLike,
|
|
1399
2637
|
requiredFeatures: normalizeRequiredFeatures(defaultApiCallVariant.requiredFeatures),
|
|
1400
2638
|
riskLevel: defaultApiCallVariant.riskLevel || ResourceOperationRiskLevel.LOW,
|
|
1401
2639
|
roles: defaultApiCallVariant.roles, // Inherit roles from default variant
|
|
2640
|
+
// Inherited for the same reason as roles: an auto-variant is a projection of the
|
|
2641
|
+
// default variant, so if the default is a known implementation gap its SUMMARY /
|
|
2642
|
+
// CONTEXT derivatives are equally unserviceable and must refuse identically.
|
|
2643
|
+
unimplementedAcknowledgement: defaultApiCallVariant.unimplementedAcknowledgement,
|
|
2644
|
+
// Inherited for the same reason: an auto-variant is a projection of the default variant,
|
|
2645
|
+
// so a SUMMARY / CONTEXT derivative of a step-up-gated operation must demand the same
|
|
2646
|
+
// proof. (Today the auto-variants are read-shaped and `enforceStepUpAuth` exempts reads
|
|
2647
|
+
// anyway — inheriting keeps that a property of the exemption list rather than an accident
|
|
2648
|
+
// of this projection.)
|
|
2649
|
+
requiresStepUpAuthentication: defaultApiCallVariant.requiresStepUpAuthentication,
|
|
2650
|
+
admitsCrossTenantPlatformAdministration: defaultApiCallVariant.admitsCrossTenantPlatformAdministration,
|
|
2651
|
+
// Inherited for the same reason as the cross-tenant flag: an auto-variant is a PROJECTION of
|
|
2652
|
+
// the default operation and must make the same addressing claim, or it would refuse the very
|
|
2653
|
+
// subjects the operation it projects is admitted to administer.
|
|
2654
|
+
admitsCrossSubjectUserAdministration: defaultApiCallVariant.admitsCrossSubjectUserAdministration,
|
|
2655
|
+
// Inherited for the same reason: an auto-variant is a projection of the default variant,
|
|
2656
|
+
// so it must make the same audit claim. Inheriting a `suppressGenericEvent` matters most —
|
|
2657
|
+
// the purpose-built event that supersedes the default covers its projections too, and a
|
|
2658
|
+
// projection that dropped the suppression would write the duplicate row the flag prevents.
|
|
2659
|
+
auditableEvent: defaultApiCallVariant.auditableEvent,
|
|
2660
|
+
mcp: defaultApiCallVariant.mcp, // Inherit MCP exposure from default variant (non-default variants aren't MCP-enumerated anyway)
|
|
1402
2661
|
customServiceImplementationModes: defaultApiCallVariant.customServiceImplementationModes || [],
|
|
1403
2662
|
basicPrefixOperation: defaultApiCallVariant.basicPrefixOperation,
|
|
1404
|
-
|
|
2663
|
+
// Inherited alongside the hook itself — an auto-variant that ran the prefix without its
|
|
2664
|
+
// ownership declaration would drop the very field the hook exists to force.
|
|
2665
|
+
authoritativeFields: defaultApiCallVariant.authoritativeFields,
|
|
2666
|
+
// Inherited for the same reason as `roles`: an auto-variant is a PROJECTION of the default
|
|
2667
|
+
// variant, so it must confine a written reference exactly as the operation it projects does.
|
|
2668
|
+
// (Read-shaped auto-variants write nothing today, so this is inert for them — inheriting
|
|
2669
|
+
// keeps that a property of what they DO rather than an accident of this projection.)
|
|
2670
|
+
referenceConstraints: defaultApiCallVariant.referenceConstraints,
|
|
2671
|
+
httpVerb: defaultApiCallVariant.httpVerb,
|
|
1405
2672
|
isApiKeyAccessDisabled: defaultApiCallVariant.isApiKeyAccessDisabled || false,
|
|
1406
2673
|
isBulkOperation: false,
|
|
1407
2674
|
tokenAuthentication: defaultApiCallVariant.tokenAuthentication,
|
|
1408
2675
|
tokenGeneration: defaultApiCallVariant.tokenGeneration,
|
|
1409
2676
|
tokenRevocation: defaultApiCallVariant.tokenRevocation,
|
|
2677
|
+
// Auto-variants (READ.summary, READ.context, LIST.summary, …)
|
|
2678
|
+
// inherit the default variant's rate-limit policy by design — a
|
|
2679
|
+
// single declaration on the default URL-bearing variant covers all
|
|
2680
|
+
// derived auto-variants. Authors who need a per-variant override
|
|
2681
|
+
// declare the variant explicitly instead of relying on auto-generation.
|
|
2682
|
+
rateLimit: defaultApiCallVariant.rateLimit,
|
|
1410
2683
|
enabledCondition: defaultApiCallVariant.enabledCondition,
|
|
1411
2684
|
isDefault: isDefault,
|
|
1412
|
-
variantKey: variantKey
|
|
2685
|
+
variantKey: variantKey,
|
|
2686
|
+
...(operation === CoreResourceOperation.LIST ? {
|
|
2687
|
+
// A generated representation changes only the response DATA SHAPE. It remains the same
|
|
2688
|
+
// collection operation, so its query contract must be identical to the canonical default
|
|
2689
|
+
// variant. Otherwise selecting SUMMARY or CONTEXT silently removes filters, sorting or
|
|
2690
|
+
// the authored page ceiling from the public contract.
|
|
2691
|
+
pageSize: defaultListCollectionFields.pageSize,
|
|
2692
|
+
searchEnabled: defaultListCollectionFields.searchEnabled,
|
|
2693
|
+
filtersEnabled: defaultListCollectionFields.filtersEnabled,
|
|
2694
|
+
filterFields: defaultListCollectionFields.filterFields,
|
|
2695
|
+
sortFields: defaultListCollectionFields.sortFields,
|
|
2696
|
+
maxPaginatedResultPerPageLimit: defaultListCollectionFields.maxPaginatedResultPerPageLimit,
|
|
2697
|
+
} : {}),
|
|
2698
|
+
...(defaultApiCallVariant.variantType === ResourceOperationVariantType.API_CALL_WITH_CALLBACK ? {
|
|
2699
|
+
callbackUrl: defaultApiCallVariant.callbackUrl,
|
|
2700
|
+
callbackTimeout: defaultApiCallVariant.callbackTimeout,
|
|
2701
|
+
callbackRetryAttempts: defaultApiCallVariant.callbackRetryAttempts,
|
|
2702
|
+
} : {}),
|
|
1413
2703
|
};
|
|
1414
2704
|
// ── Build-time validation for auto-variant token configs ──
|
|
1415
2705
|
if (defaultApiCallVariant.tokenGeneration) {
|
|
@@ -1432,19 +2722,19 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1432
2722
|
}
|
|
1433
2723
|
// Generate LIST.summary variant
|
|
1434
2724
|
if (operation === CoreResourceOperation.LIST && enableListSummary && !existingVariantKeys.has(OPERATION_VARIANT_KEY.SUMMARY)) {
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
2725
|
+
const summaryResponseDto = createResourcePaginatedResponseSchema({
|
|
2726
|
+
dataSchema: derivedSummarySchema,
|
|
2727
|
+
validateArrayConstraints: true,
|
|
2728
|
+
maxResultsPerPageLimit: defaultListCollectionFields.maxPaginatedResultPerPageLimit,
|
|
1439
2729
|
});
|
|
1440
2730
|
operations.push(createAutoVariantOperation(OPERATION_VARIANT_KEY.SUMMARY, summaryResponseDto, false));
|
|
1441
2731
|
}
|
|
1442
2732
|
// Generate LIST.context variant
|
|
1443
2733
|
if (operation === CoreResourceOperation.LIST && enableListContext && !existingVariantKeys.has(OPERATION_VARIANT_KEY.CONTEXT)) {
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
2734
|
+
const contextResponseDto = createResourcePaginatedResponseSchema({
|
|
2735
|
+
dataSchema: effectiveMainSchema,
|
|
2736
|
+
validateArrayConstraints: true,
|
|
2737
|
+
maxResultsPerPageLimit: defaultListCollectionFields.maxPaginatedResultPerPageLimit,
|
|
1448
2738
|
});
|
|
1449
2739
|
operations.push(createAutoVariantOperation(OPERATION_VARIANT_KEY.CONTEXT, contextResponseDto, false));
|
|
1450
2740
|
}
|
|
@@ -1491,6 +2781,102 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1491
2781
|
...coreResourceShared_FieldIdentifier,
|
|
1492
2782
|
[resourceIdentifier]: resourceFieldIdentifier,
|
|
1493
2783
|
}));
|
|
2784
|
+
const generatedFileDiscoverySchema = ResourcesConfigOperationsDtosBuilderUtils.buildSchemaWithInheritance(effectiveMainSchema, inheritenceSchemaDefinition);
|
|
2785
|
+
operations.push(...createGeneratedFileRegenerateOperations({
|
|
2786
|
+
operations,
|
|
2787
|
+
resourceIdentifier,
|
|
2788
|
+
resourceFieldIdentifier,
|
|
2789
|
+
mainSchema: effectiveMainSchema,
|
|
2790
|
+
generatedFileDiscoverySchema,
|
|
2791
|
+
persistenceAdapter,
|
|
2792
|
+
}));
|
|
2793
|
+
// AFTER the file-regenerate companions, and over the same fully-assembled set: a generated
|
|
2794
|
+
// relationship-bulk operation is never a LIST/SEARCH, so ordering cannot change the outcome — but
|
|
2795
|
+
// deriving from the complete set means a future generated LIST would be covered without a second
|
|
2796
|
+
// call site to remember.
|
|
2797
|
+
operations.push(...createGeneratedCollectionExportOperations({
|
|
2798
|
+
operations,
|
|
2799
|
+
resourceIdentifier,
|
|
2800
|
+
}));
|
|
2801
|
+
// ── Fail-closed guard: no anonymous BULK MUTATION (W7.3a hardening) ─────
|
|
2802
|
+
//
|
|
2803
|
+
// An anonymous caller may legitimately be granted single-record CREATE / READ
|
|
2804
|
+
// / LIST / UPDATE / DELETE (e.g. draft-notes lead capture), but a bulk MUTATION
|
|
2805
|
+
// (CREATE_MANY / UPDATE_MANY / DELETE_MANY) granted to `APP_ANONYMOUS` is an
|
|
2806
|
+
// unauthenticated mass-write surface — a whole-collection destructive footgun
|
|
2807
|
+
// no app should be able to author by accident. The framework provided ZERO
|
|
2808
|
+
// enforcement here (only a non-blocking "isAnonymizable without any anon op"
|
|
2809
|
+
// warning existed), so this fails closed at config-build time. Read-shaped
|
|
2810
|
+
// collection ops (LIST / SEARCH / COUNT) are intentionally NOT flagged —
|
|
2811
|
+
// anonymous listing of one's own anonymous rows is a supported pattern.
|
|
2812
|
+
//
|
|
2813
|
+
// Runs over the FULLY-assembled operation set (authored + generated
|
|
2814
|
+
// relationship-bulk + file-regenerate) so a generated bulk op that inherited
|
|
2815
|
+
// anonymous roles from its base is caught too. Zero violations exist today.
|
|
2816
|
+
for (const operation of operations) {
|
|
2817
|
+
// A resource op is a bulk MUTATION iff EITHER its identifier is a core bulk
|
|
2818
|
+
// verb (create_many / update_many / delete_many) OR it carries the
|
|
2819
|
+
// `isBulkOperation` flag. The flag is sufficient on its own: the factory
|
|
2820
|
+
// rejects `haveBulkOperation` on READ / LIST above ("read and list are not
|
|
2821
|
+
// bulkable"), so `isBulkOperation === true` is GUARANTEED to be a mutation —
|
|
2822
|
+
// it covers the opt-in bulk UPDATE/DELETE companions AND the generated
|
|
2823
|
+
// relationship-bulk ops (whose `operationIdentifier` is a relationship id,
|
|
2824
|
+
// not a core verb, so clause 1 alone would miss them). `operationIdentifier`
|
|
2825
|
+
// is the (core | custom) op union and `isBulkOperation` exists only on some
|
|
2826
|
+
// variants of the discriminated union — narrow with `in` and compare by
|
|
2827
|
+
// string value (enum members ARE their string values); the CronJob variant
|
|
2828
|
+
// carries neither.
|
|
2829
|
+
const isBulkMutation = isCoreBulkMutationOperation(operation.operationIdentifier)
|
|
2830
|
+
|| ('isBulkOperation' in operation && operation.isBulkOperation === true);
|
|
2831
|
+
if (isBulkMutation && operation.roles.includes('APP_ANONYMOUS')) {
|
|
2832
|
+
throw createConfigurationError(`[${resourceIdentifier}] operation '${String(operation.operationIdentifier)}' grants APP_ANONYMOUS on a ` +
|
|
2833
|
+
`bulk MUTATION (create_many / update_many / delete_many). Unauthenticated mass-write is forbidden — ` +
|
|
2834
|
+
`anonymous access is only permitted on single-record operations (and read-shaped collection ops: ` +
|
|
2835
|
+
`list / search / count). Remove APP_ANONYMOUS from this operation's roles.`);
|
|
2836
|
+
}
|
|
2837
|
+
}
|
|
2838
|
+
// ── RESOLVABILITY half of the retention operation contract ──────────────
|
|
2839
|
+
//
|
|
2840
|
+
// The presence half ran with the other `retentionPolicy` validations above: it proved
|
|
2841
|
+
// UPDATE_MANY / READ / LIST are declared. Being DECLARED is not the same as being REACHABLE,
|
|
2842
|
+
// and the gap between the two is a config that boots green and breaks on the first erasure.
|
|
2843
|
+
//
|
|
2844
|
+
// All three retention primitives resolve their operation through
|
|
2845
|
+
// `ResourcesRegistryBackendService.getServiceOperationPathDefault`, which admits ONLY the
|
|
2846
|
+
// variant types in `SERVICE_RESOLVABLE_OPERATION_VARIANT_TYPES` and only when the variant is
|
|
2847
|
+
// the operation DEFAULT. `REPOSITORY_ONLY` is route-less exactly like `INTERNAL_CALL` — so it
|
|
2848
|
+
// is the natural-looking choice for "the capability without a new HTTP surface" — but it is
|
|
2849
|
+
// deliberately excluded there and served by the separate `getRepositoryOperationPathDefault`
|
|
2850
|
+
// transport. A `REPOSITORY_ONLY` UPDATE_MANY therefore satisfied the presence check and then
|
|
2851
|
+
// failed to resolve mid-erasure. That is not hypothetical: the `USERS` opt-in shipped it, every
|
|
2852
|
+
// config test passed, and only a completion review caught it.
|
|
2853
|
+
//
|
|
2854
|
+
// Runs HERE, not with the presence half, because `isOperationDefault` is computed by the
|
|
2855
|
+
// operations loop above (it is variant-type-LOCAL — a lone variant marked `isDefault: false`
|
|
2856
|
+
// yields NO default for its transport group, which this check must see). Reads the SAME
|
|
2857
|
+
// predicate the resolver applies, so a config this guard accepts is a config the resolver can
|
|
2858
|
+
// serve, by construction rather than by two lists agreeing.
|
|
2859
|
+
if (retentionPolicy?.mode) {
|
|
2860
|
+
for (const { operation: requiredOperation, primitive } of RETENTION_REQUIRED_SERVICE_RESOLVABLE_OPERATIONS) {
|
|
2861
|
+
if (operations.some((candidate) => isServiceResolvableDefaultOperation(candidate, requiredOperation))) {
|
|
2862
|
+
continue;
|
|
2863
|
+
}
|
|
2864
|
+
const declaredVariants = operations
|
|
2865
|
+
.filter((candidate) => candidate.operationIdentifier === requiredOperation)
|
|
2866
|
+
.map((candidate) => `${candidate.variantType}${candidate.variantKey ? `:${candidate.variantKey}` : ''}` +
|
|
2867
|
+
`${candidate.isOperationDefault ? ' (default)' : ''}`);
|
|
2868
|
+
throw createConfigurationError(`[${resourceIdentifier}] retentionPolicy requires ${requiredOperation} to be SERVICE-RESOLVABLE, but it ` +
|
|
2869
|
+
`declares no DEFAULT variant of an accepted type. Declared variants: ` +
|
|
2870
|
+
`[${declaredVariants.length > 0 ? declaredVariants.join(', ') : 'none'}]. The retention primitive ` +
|
|
2871
|
+
`${primitive} resolves this operation through getServiceOperationPathDefault, which accepts only ` +
|
|
2872
|
+
`[${SERVICE_RESOLVABLE_OPERATION_VARIANT_TYPES.join(', ')}] and only the operation default. ` +
|
|
2873
|
+
`REPOSITORY_ONLY is route-less but is served by the SEPARATE getRepositoryOperationPathDefault ` +
|
|
2874
|
+
`transport, so it passes the "operation exists" check and then FAILS TO RESOLVE the moment an ` +
|
|
2875
|
+
`erasure runs. Use ${ResourceOperationVariantType.INTERNAL_CALL} for a capability that must stay ` +
|
|
2876
|
+
`route-less (it is both route-less and service-resolvable), and make sure it is the default for ` +
|
|
2877
|
+
`its transport group — a lone variant marked \`isDefault: false\` leaves the group with NO default.`);
|
|
2878
|
+
}
|
|
2879
|
+
}
|
|
1494
2880
|
const resourceConfig = {
|
|
1495
2881
|
isDisabled: params.isDisabled ?? false,
|
|
1496
2882
|
resourcePrimaryScope,
|
|
@@ -1502,11 +2888,29 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1502
2888
|
resourceRelationships: processedResourceRelationships,
|
|
1503
2889
|
inheritenceSchemaDefinition,
|
|
1504
2890
|
persistenceAdapter,
|
|
2891
|
+
persistenceAdapterIsolation,
|
|
2892
|
+
httpApiBinding,
|
|
2893
|
+
introspectionBinding,
|
|
2894
|
+
externalDataPipeline,
|
|
1505
2895
|
isSystemResource,
|
|
2896
|
+
primaryKeyIdentifiesInitiator,
|
|
2897
|
+
systemAccessPolicy: effectiveSystemAccessPolicy,
|
|
1506
2898
|
isAnonymizable,
|
|
1507
2899
|
transpositionPolicy: isAnonymizable
|
|
1508
2900
|
? (transpositionPolicy ?? ResourceTranspositionPolicy.ADD)
|
|
1509
2901
|
: ResourceTranspositionPolicy.ADD,
|
|
2902
|
+
// Normalize (mirror transpositionPolicy): the RESOLVED retentionPolicy is present IFF the resource
|
|
2903
|
+
// opted in. An absent `mode` is an opt-in-shaped opt-out that injects no marker
|
|
2904
|
+
// and derives no grants, so it must NOT ship a truthy resolved value — else a consumer doing
|
|
2905
|
+
// `if (config.retentionPolicy)` would treat a non-opted-in resource as retention-governed.
|
|
2906
|
+
retentionPolicy: retentionPolicy?.mode ? retentionPolicy : undefined,
|
|
2907
|
+
// Paired with `retentionPolicy` by the guards above, so these two are present together or not at all.
|
|
2908
|
+
dataSubjectPolicy: retentionPolicy?.mode ? dataSubjectPolicy : undefined,
|
|
2909
|
+
// Normalize (mirror retentionPolicy): the resolved portabilityPolicy is present IFF the
|
|
2910
|
+
// resource actually declared a default. An absent `defaultProvenance` is a policy-shaped
|
|
2911
|
+
// opt-out, and shipping a truthy-but-empty object would make an Art. 20 export believe a
|
|
2912
|
+
// default exists and silently include fields nobody classified.
|
|
2913
|
+
portabilityPolicy: portabilityPolicy?.defaultProvenance ? portabilityPolicy : undefined,
|
|
1510
2914
|
operations: operations // Temporary - will be replaced
|
|
1511
2915
|
};
|
|
1512
2916
|
// Pre-compute all DTOs for each operation using buildAllOperationDtos
|
|
@@ -1525,12 +2929,28 @@ export function createResourceConfiguration_Initialization(params) {
|
|
|
1525
2929
|
resourceRelationships: processedResourceRelationships,
|
|
1526
2930
|
inheritenceSchemaDefinition,
|
|
1527
2931
|
persistenceAdapter,
|
|
2932
|
+
persistenceAdapterIsolation,
|
|
2933
|
+
httpApiBinding,
|
|
2934
|
+
introspectionBinding,
|
|
2935
|
+
externalDataPipeline,
|
|
1528
2936
|
isSystemResource,
|
|
2937
|
+
primaryKeyIdentifiesInitiator,
|
|
2938
|
+
systemAccessPolicy: effectiveSystemAccessPolicy,
|
|
1529
2939
|
isAnonymizable,
|
|
1530
2940
|
transpositionPolicy: isAnonymizable
|
|
1531
2941
|
? (transpositionPolicy ?? ResourceTranspositionPolicy.ADD)
|
|
1532
2942
|
: ResourceTranspositionPolicy.ADD,
|
|
2943
|
+
// Normalize (mirror transpositionPolicy): resolved retentionPolicy present IFF opted-in — see the
|
|
2944
|
+
// internal resourceConfig object above for the full rationale.
|
|
2945
|
+
retentionPolicy: retentionPolicy?.mode ? retentionPolicy : undefined,
|
|
2946
|
+
// Paired with `retentionPolicy` by the guards above, so these two are present together or not at all.
|
|
2947
|
+
dataSubjectPolicy: retentionPolicy?.mode ? dataSubjectPolicy : undefined,
|
|
2948
|
+
// Normalize (mirror retentionPolicy): the resolved portabilityPolicy is present IFF the
|
|
2949
|
+
// resource actually declared a default. An absent `defaultProvenance` is a policy-shaped
|
|
2950
|
+
// opt-out, and shipping a truthy-but-empty object would make an Art. 20 export believe a
|
|
2951
|
+
// default exists and silently include fields nobody classified.
|
|
2952
|
+
portabilityPolicy: portabilityPolicy?.defaultProvenance ? portabilityPolicy : undefined,
|
|
1533
2953
|
operations: operationsWithDtos
|
|
1534
2954
|
};
|
|
1535
2955
|
}
|
|
1536
|
-
//# sourceMappingURL=resources-config.shared.factory.js.map
|
|
2956
|
+
//# sourceMappingURL=resources-config.shared.factory.js.map
|