@wildo-ai/saas-models 1.0.1 → 1.1.0
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
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { CoreResourceOperation } from '../resources.shared.core.definitions.js';
|
|
3
|
-
import { Resouces_BulkOperationBaseSchema, DataMode, OPERATION_VARIANT_KEY,
|
|
4
|
-
import { ResourceRelationshipCardinality, isOneToOneCardinality, isArrayCardinality, getDefaultResponseSchemaForOperation, operationShouldHaveRequestDto, DefaultBulkDeleteResponseSchema } from '../resources.shared.schemas.js';
|
|
3
|
+
import { Resouces_BulkOperationBaseSchema, DataMode, OPERATION_VARIANT_KEY, createPaginationResponseMetadataSchema, getChildDirectionRelationships, getParentDirectionRelationships, ResourceGeneratedOperationKind } from '../resources-config.shared.schemas.js';
|
|
4
|
+
import { ResourceRelationshipCardinality, isOneToOneCardinality, isArrayCardinality, getDefaultResponseSchemaForOperation, isOutputEnvelopeOperation, operationShouldHaveRequestDto, DefaultBulkDeleteResponseSchema, CONTEXT_AUTO_POPULATED_FIELD_IDENTIFIERS, createOrUpdateMandatoryDiscardFields } from '../resources.shared.schemas.js';
|
|
5
5
|
import { Resources_SharedUtils } from '../resources.shared.utils.js';
|
|
6
|
-
import { getCustomFieldMetadata, ZodDecorator, getZodType, hasZodType, isZodObject, isZodArray, isZodOptional, isZodDefault, getZodObjectShape, getZodDefSchemaProperty, getZodDefArrayProperty, getZodDefStringProperty, getZodDefProperty, isZodTypeAny, getEnumValues, isExcludedFromCreate, isExcludedFromUpdate, isVirtualField, isPrimaryKey, isBackendOnlyField, getBackendOnlyParams, isDiscriminatorField, unwrapSchema } from '@wildo-ai/zod-decorators';
|
|
6
|
+
import { addDiscriminator, getCustomFieldMetadata, ZodDecorator, getZodType, hasZodType, isZodObject, isZodArray, isZodOptional, isZodNullable, isZodDefault, toPatchOptionalField, getZodObjectShape, getZodDefSchemaProperty, getZodDefArrayProperty, getZodDefStringProperty, getZodDefProperty, isZodTypeAny, getEnumValues, isExcludedFromCreate, isExcludedFromUpdate, isVirtualField, isTemplatableFileField, isPrimaryKey, isBackendOnlyField, getBackendOnlyParams, isWriteOnlySecretField, isDiscriminatorField, unwrapSchema, getMergedObjectOrUnionShape, withArrayElement, SCHEMA_METADATA } from '@wildo-ai/zod-decorators';
|
|
7
7
|
import { ResourcesSummaryUtils } from './resources-summary.utils.js';
|
|
8
8
|
import { RepositoryDtoBuilderUtils } from './repository-dto-builder.utils.js';
|
|
9
|
+
import { stripTemplatableFileFieldsRecursively as stripTemplatableFileFieldsSchema, } from './templatable-file-fields.shared.utils.js';
|
|
10
|
+
/**
|
|
11
|
+
* Canonical placeholder shown to clients in place of a `.isWriteOnlySecret()`
|
|
12
|
+
* field's real value. It doubles as the write-back sentinel: when a client
|
|
13
|
+
* echoes this exact string back on CREATE/UPDATE, the framework interprets it as
|
|
14
|
+
* "keep the existing stored secret" and strips the field from the write payload
|
|
15
|
+
* (UPDATE is a partial `$set`, so the stored value is preserved). Kept as a
|
|
16
|
+
* single constant so the output mask and the input sentinel never drift.
|
|
17
|
+
*/
|
|
18
|
+
export const WRITE_ONLY_SECRET_MASK = '••••••••';
|
|
9
19
|
/**
|
|
10
20
|
* Type guard to check if schema is a ZodAny
|
|
11
21
|
* In Zod v4, any schemas have type: "any"
|
|
@@ -14,6 +24,26 @@ function isZodAny(schema) {
|
|
|
14
24
|
return hasZodType(schema, 'any');
|
|
15
25
|
}
|
|
16
26
|
export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
27
|
+
/**
|
|
28
|
+
* Carry field/schema decorators across a wrapper or leaf rebuild.
|
|
29
|
+
*
|
|
30
|
+
* Network-boundary coercion necessarily replaces Zod instances (`date` becomes
|
|
31
|
+
* `coerce.date`, optional/nullable/default wrappers are rebuilt around transformed
|
|
32
|
+
* children). Decorators such as `isBackendOnly` live on those instances. Losing
|
|
33
|
+
* the metadata before the response-stripping pass turns a backend-only field into
|
|
34
|
+
* an ordinary public field, which is a confidentiality failure rather than a
|
|
35
|
+
* presentation defect.
|
|
36
|
+
*/
|
|
37
|
+
static preserveSchemaMetadata(source, rebuilt) {
|
|
38
|
+
const sourceMetadata = source[SCHEMA_METADATA];
|
|
39
|
+
if (sourceMetadata !== undefined) {
|
|
40
|
+
rebuilt[SCHEMA_METADATA] = sourceMetadata;
|
|
41
|
+
}
|
|
42
|
+
return rebuilt;
|
|
43
|
+
}
|
|
44
|
+
static buildSchemaWithInheritance(mainSchema, inheritanceDefinition) {
|
|
45
|
+
return this.applyInheritanceToSchema(mainSchema, inheritanceDefinition, new Map());
|
|
46
|
+
}
|
|
17
47
|
/**
|
|
18
48
|
* Rebuild an object schema, optionally preserving schema-level checks.
|
|
19
49
|
*
|
|
@@ -32,6 +62,30 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
32
62
|
for (const check of checks ?? []) {
|
|
33
63
|
rebuiltSchema = rebuiltSchema.check(check);
|
|
34
64
|
}
|
|
65
|
+
// Preserve decorator metadata (`SCHEMA_METADATA`) across shape-equivalent rebuilds.
|
|
66
|
+
//
|
|
67
|
+
// Factory helpers like `z_file()`, `z_money()`, `z_bigdecimal()` and `z_range()`
|
|
68
|
+
// stamp their identity as a symbol-keyed metadata object on the *ZodObject
|
|
69
|
+
// instance* (not on any inner field). A fresh `z.object(rebuiltShape)` is a new
|
|
70
|
+
// instance, so that symbol is lost. When the field SET is unchanged — i.e. the
|
|
71
|
+
// check-preserving path (date coercion, nested inner rebuilds) — the metadata
|
|
72
|
+
// still describes the schema faithfully, so it MUST be carried over.
|
|
73
|
+
//
|
|
74
|
+
// Concretely: `z_file()`'s value is `z.object({ fileId, updatedAt: z.date() })`.
|
|
75
|
+
// DTO date-coercion rewrites the inner `updatedAt` to `z.coerce.date()`, which
|
|
76
|
+
// rebuilds the object here. Without re-attaching `fileConfig`, `getSchemaType()`
|
|
77
|
+
// resolves the field to a plain OBJECT and the automated form renders it as a raw
|
|
78
|
+
// `{ fileId, updatedAt }` composite instead of the file uploader — and
|
|
79
|
+
// `collectUploadableFileFieldPaths()` finds nothing, so no upload endpoints are
|
|
80
|
+
// derived. This was the root cause of avatar/file fields never rendering an
|
|
81
|
+
// uploader (the "first real file implementation" gap).
|
|
82
|
+
//
|
|
83
|
+
// The omit path (`preserveChecks: false`, above) intentionally skips this: there
|
|
84
|
+
// the field set changed, so the original field-type identity may no longer hold.
|
|
85
|
+
const sourceMetadata = schema[SCHEMA_METADATA];
|
|
86
|
+
if (sourceMetadata !== undefined) {
|
|
87
|
+
rebuiltSchema[SCHEMA_METADATA] = sourceMetadata;
|
|
88
|
+
}
|
|
35
89
|
return rebuiltSchema;
|
|
36
90
|
}
|
|
37
91
|
/**
|
|
@@ -66,6 +120,41 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
66
120
|
});
|
|
67
121
|
}
|
|
68
122
|
}
|
|
123
|
+
static stripTemplatableFileFieldsRecursively(schema) {
|
|
124
|
+
return stripTemplatableFileFieldsSchema(schema, {
|
|
125
|
+
rebuildObjectSchema: (objectSchema, strippedShape) => this.rebuildObjectSchema(objectSchema, strippedShape, { preserveChecks: false }),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Run a resource `mainSchema`'s TOP-LEVEL object checks (`.refine()` / `.superRefine()`) against a
|
|
130
|
+
* fully-materialised row (post-enrichment) and return the ZodError, or null when the schema declares
|
|
131
|
+
* no top-level check or all pass.
|
|
132
|
+
*
|
|
133
|
+
* This is the correct enforcement point for a cross-field invariant declared on a resource
|
|
134
|
+
* `mainSchema`. A CREATE REQUEST cannot carry it: the request DTO omits every backend-injected field
|
|
135
|
+
* (`primaryScope`, `organizationId`, `createdAt`, …), so a check referencing one — e.g. a file-scope
|
|
136
|
+
* check keyed on `primaryScope` — would fire against an ABSENT value and reject a valid create. The
|
|
137
|
+
* ENRICHED row (after context injection + literal / user-tracking population) carries every field, so
|
|
138
|
+
* the check validates truthfully: a file-scope check passes on a consistent row, while a check on
|
|
139
|
+
* create-supplied fields (a junction's `source ≠ target`) still rejects a bad row.
|
|
140
|
+
*
|
|
141
|
+
* The checks run in ISOLATION via a passthrough object, so no unrelated shape/coercion validation is
|
|
142
|
+
* re-applied to the already-built row (its dates are `Date`s, its ids may be driver objects — none of
|
|
143
|
+
* which a fresh full-schema parse should re-police here). Works whether `mainSchema` is a plain object
|
|
144
|
+
* or a discriminated-union family — a schema with no top-level check simply returns null.
|
|
145
|
+
*/
|
|
146
|
+
static validateTopLevelObjectChecks(mainSchema, value) {
|
|
147
|
+
const checks = getZodDefArrayProperty(mainSchema, 'checks');
|
|
148
|
+
if (!checks || checks.length === 0) {
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
let checker = z.looseObject({});
|
|
152
|
+
for (const check of checks) {
|
|
153
|
+
checker = checker.check(check);
|
|
154
|
+
}
|
|
155
|
+
const result = checker.safeParse(value);
|
|
156
|
+
return result.success ? null : result.error;
|
|
157
|
+
}
|
|
69
158
|
/**
|
|
70
159
|
* Rebuild all operation DTOs once the full registry is available.
|
|
71
160
|
*
|
|
@@ -120,76 +209,121 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
120
209
|
// - Rebuild from enhancedMainSchema (with inheritance applied)
|
|
121
210
|
// - If original was explicitly provided (custom), preserve it but apply transformations
|
|
122
211
|
// - Otherwise use rebuilt DTO (with inheritance)
|
|
123
|
-
// - Apply
|
|
212
|
+
// - Apply network-boundary coercion (dates + money bigints)
|
|
124
213
|
// - Backend-only fields already excluded in buildEnhancedRequestDto
|
|
125
214
|
let requestDto = this.buildEnhancedRequestDto(operationWithEnhancedSchema, effectiveOperation);
|
|
126
|
-
// Check if original DTO was explicitly provided (custom DTO from variantParams.requestDto)
|
|
127
|
-
// Custom DTOs are complete schemas that should be preserved as-is, but still need
|
|
128
|
-
// transformations (date coercion). We detect custom DTOs by checking if they're
|
|
129
|
-
// significantly different from what would be auto-derived, OR if they're the same
|
|
130
|
-
// structure but the user explicitly provided them (we can't distinguish this easily,
|
|
131
|
-
// so we use a heuristic: if different, preserve; if same, use rebuilt with inheritance).
|
|
215
|
+
// Check if original DTO was explicitly provided (custom DTO from variantParams.requestDto).
|
|
132
216
|
const rebuiltRequestInfo = this.analyzeDtoSchema(requestDto);
|
|
133
217
|
const originalRequestInfo = originalRequestDto ? this.analyzeDtoSchema(originalRequestDto) : null;
|
|
134
|
-
//
|
|
135
|
-
//
|
|
136
|
-
//
|
|
137
|
-
//
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
218
|
+
// Custom-DTO classification is driven by the explicit `hasCustomRequestDto`
|
|
219
|
+
// flag that the resource factory stamps on EVERY operation it builds:
|
|
220
|
+
// • `true` → the variant supplied an explicit `requestDto`; preserve it
|
|
221
|
+
// verbatim (it is a complete, author-owned contract — e.g. a narrow
|
|
222
|
+
// `{ status }` for a CHANGE_STATUS custom operation).
|
|
223
|
+
// • `false` → the requestDto is the factory's auto-derived *temporary*
|
|
224
|
+
// placeholder, built from the base object via `deriveRequestDto` BEFORE
|
|
225
|
+
// inheritance is known. So we MUST use the inheritance-rebuilt DTO —
|
|
226
|
+
// which, for an inheritance resource (discriminated-union mainSchema via
|
|
227
|
+
// `createSchemaFamily`), is the per-variant union. Preserving the bare
|
|
228
|
+
// temporary here is what silently dropped variant-only fields
|
|
229
|
+
// (e.g. todos `recurrence`/`startDate`/`endsDate`) from CREATE/UPDATE
|
|
230
|
+
// request validation: `z.object` strips unknown keys, so a RECURRING
|
|
231
|
+
// payload parsed but lost its extension fields — the request-side twin
|
|
232
|
+
// of the RAW-mode LIST responseDto bug fixed just below.
|
|
233
|
+
// Only when the flag is ABSENT (legacy / hand-authored operations that
|
|
234
|
+
// predate the flag) do we fall back to the structural `analyzeDtoSchema`
|
|
235
|
+
// heuristic — a base object always differs structurally from the rebuilt
|
|
236
|
+
// union, so the heuristic alone cannot tell "custom" from "auto-derived
|
|
237
|
+
// inheritance DTO".
|
|
238
|
+
const hasExplicitCustomRequestDto = operation.hasCustomRequestDto === true;
|
|
239
|
+
const isExplicitlyAutoDerivedRequestDto = operation.hasCustomRequestDto === false;
|
|
240
|
+
const isCustomRequestDto = hasExplicitCustomRequestDto
|
|
241
|
+
? (originalRequestDto && !isZodAny(originalRequestDto))
|
|
242
|
+
: isExplicitlyAutoDerivedRequestDto
|
|
243
|
+
? false
|
|
244
|
+
: (originalRequestDto && originalRequestInfo &&
|
|
245
|
+
originalRequestInfo !== rebuiltRequestInfo &&
|
|
246
|
+
originalRequestInfo !== '📄 {} (empty object)' &&
|
|
247
|
+
!isZodAny(originalRequestDto));
|
|
248
|
+
if (isCustomRequestDto && originalRequestDto) {
|
|
249
|
+
// Custom DTO: preserve structure but apply network-boundary coercion (dates + money bigints)
|
|
250
|
+
requestDto = this.applyNetworkBoundaryCoercion(this.stripTemplatableFileFieldsRecursively(originalRequestDto));
|
|
251
|
+
}
|
|
252
|
+
else if (operation.generatedOperation && originalRequestDto && !isZodAny(originalRequestDto)) {
|
|
253
|
+
// Framework-generated operations own their DTO contract. In particular,
|
|
254
|
+
// generated file regeneration is UPDATE-like for authorization and
|
|
255
|
+
// persistence but intentionally accepts an empty request body.
|
|
256
|
+
requestDto = this.applyNetworkBoundaryCoercion(this.stripTemplatableFileFieldsRecursively(originalRequestDto));
|
|
144
257
|
}
|
|
145
258
|
else {
|
|
146
259
|
// Auto-derived DTO: use rebuilt (with inheritance) and apply transformations
|
|
147
|
-
requestDto = this.
|
|
260
|
+
requestDto = this.applyNetworkBoundaryCoercion(requestDto);
|
|
148
261
|
}
|
|
262
|
+
requestDto = this.stripTemplatableFileFieldsRecursively(requestDto);
|
|
149
263
|
// 3. Build responseDto first (repositoryDto depends on it)
|
|
150
264
|
// - Rebuild from enhancedMainSchema (with inheritance applied)
|
|
151
265
|
// - If original was custom (significantly different), preserve it but apply transformations
|
|
152
266
|
// - Otherwise use rebuilt DTO (with inheritance)
|
|
153
267
|
// - Strip backend-only fields (except isReturnedAtCreation for CREATE)
|
|
154
|
-
// - Apply
|
|
268
|
+
// - Apply network-boundary coercion (dates + money bigints)
|
|
155
269
|
// - Exclude virtual fields (they're computed, not stored)
|
|
156
270
|
let responseDtoInternal = this.buildEnhancedResponseDto(operationWithEnhancedSchema, effectiveOperation);
|
|
157
271
|
let responseDto = responseDtoInternal;
|
|
158
272
|
// Check if original DTO was explicitly provided (custom DTO from customResponseDto)
|
|
159
273
|
// Custom DTOs are complete schemas that should be preserved as-is, but still need
|
|
160
|
-
// transformations (backend-only stripping, date coercion).
|
|
274
|
+
// transformations (backend-only stripping, date + money-bigint coercion).
|
|
161
275
|
const hasExplicitCustomResponseDto = operation.hasCustomResponseDto === true;
|
|
162
276
|
const rebuiltResponseInfo = this.analyzeDtoSchema(responseDtoInternal);
|
|
163
277
|
const originalResponseInfo = originalResponseDto ? this.analyzeDtoSchema(originalResponseDto) : null;
|
|
164
|
-
//
|
|
165
|
-
//
|
|
278
|
+
// Custom-DTO classification is driven by the explicit `hasCustomResponseDto`
|
|
279
|
+
// flag that the resource factory stamps on EVERY operation it builds:
|
|
280
|
+
// • `true` → the app supplied a `customResponseDto`; preserve it verbatim.
|
|
281
|
+
// • `false` → the DTO is framework auto-derived. The factory only sets a
|
|
282
|
+
// *temporary*, item-level placeholder (documented as "will be replaced by
|
|
283
|
+
// buildAllOperationDtos"), so we MUST use the inheritance-rebuilt DTO —
|
|
284
|
+
// which, for LIST/SEARCH, is the `{ data, pagination }` pagination wrapper.
|
|
285
|
+
// Preserving the bare temporary schema here is what broke RAW-mode list
|
|
286
|
+
// responses: `selectResponseDto(op, RAW)` returned the item schema and the
|
|
287
|
+
// controller parsed the `{ data, pagination }` envelope against it (Zod
|
|
288
|
+
// "No matching discriminator" for inheritance resources such as todos,
|
|
289
|
+
// missing-field errors for plain ones).
|
|
290
|
+
// Only when the flag is ABSENT (legacy / hand-authored operations that predate
|
|
291
|
+
// the flag) do we fall back to the structural `analyzeDtoSchema` heuristic — an
|
|
292
|
+
// item schema always differs structurally from the rebuilt wrapper, so the
|
|
293
|
+
// heuristic alone cannot tell "custom" from "auto-derived collection DTO".
|
|
294
|
+
const isExplicitlyAutoDerivedResponseDto = operation.hasCustomResponseDto === false;
|
|
166
295
|
const isCustomResponseDto = hasExplicitCustomResponseDto
|
|
167
296
|
? (originalResponseDto && !isZodAny(originalResponseDto))
|
|
168
|
-
:
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
297
|
+
: isExplicitlyAutoDerivedResponseDto
|
|
298
|
+
? false
|
|
299
|
+
: (originalResponseDto && originalResponseInfo &&
|
|
300
|
+
originalResponseInfo !== rebuiltResponseInfo &&
|
|
301
|
+
originalResponseInfo !== '📄 {} (empty object)' &&
|
|
302
|
+
!isZodAny(originalResponseDto));
|
|
172
303
|
if (isCustomResponseDto && originalResponseDto) {
|
|
173
|
-
//
|
|
174
|
-
//
|
|
304
|
+
// Strip while decorator metadata is still on the source nodes, then apply
|
|
305
|
+
// network coercion to each trust-boundary shape independently. Reversing
|
|
306
|
+
// this order allowed wrapper rebuilds to erase `isBackendOnly` before the
|
|
307
|
+
// confidentiality pass inspected it.
|
|
175
308
|
const isCreateOperation = effectiveOperation === CoreResourceOperation.CREATE ||
|
|
176
309
|
effectiveOperation === CoreResourceOperation.CREATE_MANY;
|
|
177
|
-
responseDtoInternal = this.
|
|
178
|
-
responseDto = this.stripBackendOnlyFields(
|
|
310
|
+
responseDtoInternal = this.applyNetworkBoundaryCoercion(originalResponseDto);
|
|
311
|
+
responseDto = this.applyNetworkBoundaryCoercion(this.stripBackendOnlyFields(originalResponseDto, {
|
|
179
312
|
respectIsReturnedAtCreation: isCreateOperation,
|
|
180
313
|
operationType: isCreateOperation ? CoreResourceOperation.CREATE : undefined
|
|
181
|
-
});
|
|
314
|
+
}));
|
|
182
315
|
}
|
|
183
316
|
else {
|
|
184
317
|
// Auto-derived DTO: use rebuilt (with inheritance) and apply transformations
|
|
185
|
-
// Strip backend-only fields
|
|
318
|
+
// Strip backend-only fields before coercion rebuilds wrappers/leaves.
|
|
186
319
|
const isCreateOperation = effectiveOperation === CoreResourceOperation.CREATE ||
|
|
187
320
|
effectiveOperation === CoreResourceOperation.CREATE_MANY;
|
|
188
|
-
|
|
189
|
-
responseDto = this.stripBackendOnlyFields(responseDtoInternal, {
|
|
321
|
+
const clientResponseDto = this.stripBackendOnlyFields(responseDtoInternal, {
|
|
190
322
|
respectIsReturnedAtCreation: isCreateOperation,
|
|
191
323
|
operationType: isCreateOperation ? CoreResourceOperation.CREATE : undefined
|
|
192
324
|
});
|
|
325
|
+
responseDtoInternal = this.applyNetworkBoundaryCoercion(responseDtoInternal);
|
|
326
|
+
responseDto = this.applyNetworkBoundaryCoercion(clientResponseDto);
|
|
193
327
|
}
|
|
194
328
|
// Note: Virtual fields are already excluded in buildEnhancedResponseDto
|
|
195
329
|
// 4. Add nested operations DTOs if configured (child + self relationships)
|
|
@@ -214,8 +348,12 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
214
348
|
// - Extract summary fields (isSummaryField)
|
|
215
349
|
// - If no summary fields defined, fall back to mainSchema (same as RAW)
|
|
216
350
|
// - DO NOT strip backend-only fields yet (needed for repositoryDto)
|
|
217
|
-
// - Apply date coercion (already applied in extractSummaryFields)
|
|
218
351
|
// - Handle discriminated unions
|
|
352
|
+
// - Network-boundary coercion (dates + money bigints) is applied ONCE below,
|
|
353
|
+
// after the no-summary-fields fallback resolves, so EVERY summary shape
|
|
354
|
+
// (plain object, discriminated union, AND the full-schema fallback) accepts
|
|
355
|
+
// ISO-string dates AND bigint-as-string money amounts — the same uniform
|
|
356
|
+
// transposition point used for requestDto/responseDto/internalDto.
|
|
219
357
|
let summaryDtoInternal = this.extractSummaryFields(enhancedMainSchema);
|
|
220
358
|
// If no summary fields are defined, use full schema (same as RAW mode)
|
|
221
359
|
// Check if summaryDtoInternal is empty (z.object({}))
|
|
@@ -227,19 +365,86 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
227
365
|
summaryDtoInternal = this.excludeVirtualFieldsFromSchema(enhancedMainSchema);
|
|
228
366
|
}
|
|
229
367
|
}
|
|
230
|
-
//
|
|
231
|
-
|
|
232
|
-
//
|
|
368
|
+
// Apply network-boundary coercion (z.date() → z.coerce.date() AND string-accepting
|
|
369
|
+
// z.bigint() for z_money amounts) over the fully-resolved summary schema — the
|
|
370
|
+
// single, uniform transposition point for the summary DTO, covering the
|
|
371
|
+
// extracted-summary path, the discriminated-union path, and the full-schema
|
|
372
|
+
// fallback alike. Without this, summary responses (which carry ISO-string
|
|
373
|
+
// createdAt/updatedAt and bigint-as-string money totals over JSON) fail frontend
|
|
374
|
+
// response validation with "expected date, received string" / "expected bigint,
|
|
375
|
+
// received string" (e.g. invoiceRefs.total.amount is an isSummaryField z_money).
|
|
376
|
+
const summaryDto = this.applyNetworkBoundaryCoercion(this.stripBackendOnlyFields(summaryDtoInternal));
|
|
377
|
+
summaryDtoInternal = this.applyNetworkBoundaryCoercion(summaryDtoInternal);
|
|
378
|
+
// The COLLECTION EXPORT companion is deliberately excluded. It carries
|
|
379
|
+
// `resourceOperationLike: LIST/SEARCH` so that routing, collection-level authorization and URL
|
|
380
|
+
// building all treat it as a listing — which is exactly right — but its response is a FILE, not
|
|
381
|
+
// a pagination envelope, so every list-shaped DTO derivation below (context item extraction,
|
|
382
|
+
// SUMMARY/CONTEXT envelope rebuilding) would be operating on the wrong shape. Without this
|
|
383
|
+
// exclusion the derivation throws `pagination response must contain a data array` at resource
|
|
384
|
+
// configuration time and the whole application fails to start.
|
|
385
|
+
const isCollectionExportCompanion = operation.generatedOperation?.kind === ResourceGeneratedOperationKind.GENERATED_COLLECTION_EXPORT;
|
|
386
|
+
const isListOrSearch = !isCollectionExportCompanion
|
|
387
|
+
&& (effectiveOperation === CoreResourceOperation.LIST
|
|
388
|
+
|| effectiveOperation === CoreResourceOperation.SEARCH);
|
|
233
389
|
// 6. Build contextDto:
|
|
234
|
-
// - Start with responseDto
|
|
390
|
+
// - Start with the response item DTO. LIST/SEARCH responseDto is already
|
|
391
|
+
// a pagination envelope, so projecting relationships on that envelope
|
|
392
|
+
// would later wrap a page inside another page for the CONTEXT variant.
|
|
235
393
|
// - Add relationship placeholders
|
|
236
394
|
// - Date coercion already applied to responseDto
|
|
237
|
-
const
|
|
395
|
+
const contextBaseDto = isListOrSearch
|
|
396
|
+
? this.extractPaginatedCollectionItemDto(responseDto, effectiveOperation)
|
|
397
|
+
: responseDto;
|
|
398
|
+
const contextDto = this.addRelationshipPlaceholders(contextBaseDto, operation.resourceRelationships, registry);
|
|
238
399
|
// 7. Build internalDto base (before variant overrides):
|
|
239
400
|
// - Start with mainSchema (with inheritance)
|
|
240
401
|
// - Include backend-only fields (DO NOT strip)
|
|
241
402
|
// - Exclude virtual fields (they're computed)
|
|
403
|
+
//
|
|
404
|
+
// A non-READ op that declares a `customResponseDto` (e.g. a CREATE that
|
|
405
|
+
// returns an ephemeral `plainKey`) legitimately carries the extra fields
|
|
406
|
+
// the custom schema adds in its service output. `transformOutput`
|
|
407
|
+
// validates that output against `internalDto`, so for these ops internalDto
|
|
408
|
+
// must be the custom schema (`responseDtoInternal`), not the bare main
|
|
409
|
+
// schema — otherwise the enriched fields are stripped before the controller
|
|
410
|
+
// serializes against the custom `responseDto` (the api-key CREATE's
|
|
411
|
+
// `plainKey` failed exactly this way). This mirrors the custom-VARIANT
|
|
412
|
+
// branch below (lines ~516), which only runs for `variantKey`'d ops and so
|
|
413
|
+
// left the DEFAULT custom-DTO op falling through to `enhancedMainSchema`.
|
|
414
|
+
// LIST/SEARCH keep the main-schema base (their pagination wrapper is
|
|
415
|
+
// applied below and the collection item DTO is handled separately).
|
|
416
|
+
const internalDtoUsesCustomResponse = effectiveOperation !== CoreResourceOperation.READ
|
|
417
|
+
&& Boolean(isCustomResponseDto)
|
|
418
|
+
&& Boolean(originalResponseDto)
|
|
419
|
+
&& effectiveOperation !== CoreResourceOperation.LIST
|
|
420
|
+
&& effectiveOperation !== CoreResourceOperation.SEARCH;
|
|
421
|
+
// `internalDto` is what the service layer validates its OUTPUT against
|
|
422
|
+
// (`ServiceResourceBackendService.transformOutput`). It must mirror the shape the operation
|
|
423
|
+
// actually returns. For most mutations that is the resource object (`enhancedMainSchema`), but:
|
|
424
|
+
// • READ → the resource itself (custom read DTOs handled via the flag below)
|
|
425
|
+
// • OUTPUT_ENVELOPE_OPERATIONS (DELETE, DELETE_MANY, COUNT) → a framework RESPONSE ENVELOPE
|
|
426
|
+
// (`DefaultDeleteResponseSchema` / `DefaultBulkDeleteResponseSchema` / `DefaultCountResponseSchema`)
|
|
427
|
+
// For all of these the correct `internalDto` is the very schema already exposed via
|
|
428
|
+
// `responseDto`: `responseDtoInternal` is that schema with backend-only fields retained (a
|
|
429
|
+
// no-op for these envelopes, which carry none) and is already bulk-vs-single aware because
|
|
430
|
+
// `buildEnhancedResponseDto` resolved it from `getDefaultResponseSchemaForOperation` (and the
|
|
431
|
+
// bulk-operation branch). Leaving an envelope operation on `enhancedMainSchema` is what made
|
|
432
|
+
// `transformOutput` validate the envelope value against the resource object schema and throw
|
|
433
|
+
// `service_resource_transformation_failed` → HTTP 500 (the delete bug; COUNT was a latent
|
|
434
|
+
// sibling). Bulk mutations (CREATE_MANY/UPDATE_MANY) are intentionally NOT in the set — they
|
|
435
|
+
// return per-item resource objects validated item-by-item, so they keep `enhancedMainSchema`.
|
|
436
|
+
//
|
|
437
|
+
// ⚠️ Keyed on the operation's OWN `operationIdentifier`, NOT `effectiveOperation`
|
|
438
|
+
// (`resourceOperationLike || operationIdentifier`). A CUSTOM op that borrows DELETE/COUNT
|
|
439
|
+
// semantics for its route/verb but returns its own shape (via `REPLACE_CORE_OPERATIONS` or a
|
|
440
|
+
// `customResponseDto`) must NOT be forced onto the core envelope — its custom response is
|
|
441
|
+
// already handled by `internalDtoUsesCustomResponse`, or it keeps `enhancedMainSchema`. Only the
|
|
442
|
+
// genuine core operation carries `operationIdentifier === CoreResourceOperation.DELETE` etc.
|
|
443
|
+
// For the deletes, the runtime composition of the envelope from the repository's bare id(s)
|
|
444
|
+
// happens at the transform boundary via `composeDefaultOperationResponse` (same keying).
|
|
242
445
|
let internalDtoProcessed = effectiveOperation === CoreResourceOperation.READ
|
|
446
|
+
|| isOutputEnvelopeOperation(operation.operationIdentifier)
|
|
447
|
+
|| internalDtoUsesCustomResponse
|
|
243
448
|
? responseDtoInternal
|
|
244
449
|
: enhancedMainSchema;
|
|
245
450
|
// Exclude virtual fields from internalDto
|
|
@@ -261,13 +466,11 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
261
466
|
// - Exclude virtual fields but include their dependencies
|
|
262
467
|
let repositoryDto = RepositoryDtoBuilderUtils.deriveRepositoryDto(responseDto, enhancedMainSchema);
|
|
263
468
|
// 9. For default operations (no variantKey), wrap internalDto in pagination for LIST/SEARCH:
|
|
264
|
-
const isListOrSearch = effectiveOperation === CoreResourceOperation.LIST
|
|
265
|
-
|| effectiveOperation === CoreResourceOperation.SEARCH;
|
|
266
469
|
if (!operation.variantKey && isListOrSearch) {
|
|
267
470
|
// Default LIST/SEARCH operations: wrap internalDto in pagination
|
|
268
471
|
internalDtoProcessed = z.object({
|
|
269
472
|
data: z.array(internalDtoProcessed),
|
|
270
|
-
pagination:
|
|
473
|
+
pagination: createPaginationResponseMetadataSchema(operation.maxPaginatedResultPerPageLimit)
|
|
271
474
|
});
|
|
272
475
|
}
|
|
273
476
|
// 10. Override responseDto, repositoryDto, and internalDto for variant operations:
|
|
@@ -284,12 +487,12 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
284
487
|
// Build internalDto for service-layer validation (pagination wrapper with backend-only items)
|
|
285
488
|
internalDtoProcessed = z.object({
|
|
286
489
|
data: z.array(summaryDtoInternal),
|
|
287
|
-
pagination:
|
|
490
|
+
pagination: createPaginationResponseMetadataSchema(operation.maxPaginatedResultPerPageLimit)
|
|
288
491
|
});
|
|
289
492
|
// Wrap summaryDto (frontend version, backend-only stripped) in pagination for responseDto
|
|
290
493
|
responseDto = z.object({
|
|
291
494
|
data: z.array(summaryDto),
|
|
292
|
-
pagination:
|
|
495
|
+
pagination: createPaginationResponseMetadataSchema(operation.maxPaginatedResultPerPageLimit)
|
|
293
496
|
});
|
|
294
497
|
}
|
|
295
498
|
else {
|
|
@@ -307,12 +510,12 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
307
510
|
// Build internalDto for service-layer validation (pagination wrapper with backend-only items)
|
|
308
511
|
internalDtoProcessed = z.object({
|
|
309
512
|
data: z.array(contextDtoInternal),
|
|
310
|
-
pagination:
|
|
513
|
+
pagination: createPaginationResponseMetadataSchema(operation.maxPaginatedResultPerPageLimit)
|
|
311
514
|
});
|
|
312
515
|
// Wrap contextDto (frontend version, backend-only stripped) in pagination for responseDto
|
|
313
516
|
responseDto = z.object({
|
|
314
517
|
data: z.array(contextDto),
|
|
315
|
-
pagination:
|
|
518
|
+
pagination: createPaginationResponseMetadataSchema(operation.maxPaginatedResultPerPageLimit)
|
|
316
519
|
});
|
|
317
520
|
}
|
|
318
521
|
else {
|
|
@@ -325,13 +528,21 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
325
528
|
// For custom variants with customResponseDto (e.g., 'context_old'):
|
|
326
529
|
// The internalDto should also use the custom schema to preserve enriched fields.
|
|
327
530
|
// This ensures that custom implementations can return additional fields that won't be stripped.
|
|
328
|
-
// Apply
|
|
329
|
-
internalDtoProcessed = this.
|
|
531
|
+
// Apply network-boundary coercion (dates + money bigints) to the custom schema for internal processing.
|
|
532
|
+
internalDtoProcessed = this.applyNetworkBoundaryCoercion(originalResponseDto);
|
|
330
533
|
repositoryDto = RepositoryDtoBuilderUtils.deriveRepositoryDto(originalResponseDto, enhancedMainSchema);
|
|
331
534
|
}
|
|
332
535
|
}
|
|
333
|
-
|
|
334
|
-
|
|
536
|
+
if (operation.generatedOperation && originalResponseDto && !isZodAny(originalResponseDto)) {
|
|
537
|
+
// Generated operations may be UPDATE-like for routing/authorization while
|
|
538
|
+
// returning a framework-owned envelope that is not the resource schema.
|
|
539
|
+
// Keep service-layer output validation aligned with that envelope.
|
|
540
|
+
internalDtoProcessed = this.applyNetworkBoundaryCoercion(originalResponseDto);
|
|
541
|
+
repositoryDto = RepositoryDtoBuilderUtils.deriveRepositoryDto(enhancedMainSchema, enhancedMainSchema);
|
|
542
|
+
}
|
|
543
|
+
requestDto = this.stripTemplatableFileFieldsRecursively(requestDto);
|
|
544
|
+
// 11. Finalize internalDto with network-boundary coercion (dates + money bigints):
|
|
545
|
+
const internalDtoFinal = this.applyNetworkBoundaryCoercion(internalDtoProcessed);
|
|
335
546
|
// 12. Return operation with all DTOs stored
|
|
336
547
|
return {
|
|
337
548
|
...operation,
|
|
@@ -343,72 +554,6 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
343
554
|
repositoryDto
|
|
344
555
|
};
|
|
345
556
|
}
|
|
346
|
-
/**
|
|
347
|
-
* Main entry point to build DTOs for all operations of a resource
|
|
348
|
-
* This replaces the minimal DTOs set during initialization with comprehensive ones
|
|
349
|
-
*
|
|
350
|
-
* INHERITANCE APPROACH:
|
|
351
|
-
* - Inheritance is applied to mainSchema (not relationship cascading)
|
|
352
|
-
* - Creates discriminated union schemas based on inheritance definitions
|
|
353
|
-
* - Inheritance logic is transferred to DTO building process
|
|
354
|
-
*
|
|
355
|
-
* NOTE: TDatabaseSchema has been removed. Backend-only fields are now marked with
|
|
356
|
-
* the `isBackendOnly` decorator on mainSchema and stripped at the service layer.
|
|
357
|
-
*
|
|
358
|
-
* IMPORTANT: Each operation represents ONE flattened variant, not multiple variants
|
|
359
|
-
*/
|
|
360
|
-
static buildOperationDtos(operations, resourceRegistry, // Full resource registry for cross-references
|
|
361
|
-
processedInheritanceSchemas = new Map() // Cache for inheritance schemas
|
|
362
|
-
) {
|
|
363
|
-
// Process each flattened operation individually
|
|
364
|
-
const enhancedOperations = operations.map((operation, index) => {
|
|
365
|
-
return this.buildOperationDto(operation, resourceRegistry, processedInheritanceSchemas);
|
|
366
|
-
});
|
|
367
|
-
return enhancedOperations;
|
|
368
|
-
}
|
|
369
|
-
/**
|
|
370
|
-
* Build DTO for a single flattened operation with enhanced inheritance handling
|
|
371
|
-
*/
|
|
372
|
-
static buildOperationDto(operation, resourceRegistry, processedInheritanceSchemas, resourceConfig) {
|
|
373
|
-
// Determine the effective operation identifier for DTO building
|
|
374
|
-
const effectiveOperation = operation.resourceOperationLike || operation.operationIdentifier;
|
|
375
|
-
// Apply inheritance to mainSchema if inheritance definition exists
|
|
376
|
-
// Use resource-level inheritance (resourceConfig.inheritenceSchemaDefinition) instead of operation-level
|
|
377
|
-
const inheritenceSchemaDefinition = resourceConfig?.inheritenceSchemaDefinition;
|
|
378
|
-
const enhancedMainSchema = this.applyInheritanceToSchema(operation.mainSchema, inheritenceSchemaDefinition, processedInheritanceSchemas);
|
|
379
|
-
// Create operation with inherited schema
|
|
380
|
-
const operationWithInheritance = {
|
|
381
|
-
...operation,
|
|
382
|
-
mainSchema: enhancedMainSchema
|
|
383
|
-
};
|
|
384
|
-
// Build enhanced request DTO based on operation type and inherited schemas
|
|
385
|
-
let enhancedRequestDto = this.buildEnhancedRequestDto(operationWithInheritance, effectiveOperation);
|
|
386
|
-
// Build enhanced response DTO based on operation type and inherited schemas
|
|
387
|
-
let enhancedResponseDto = this.buildEnhancedResponseDto(operationWithInheritance, effectiveOperation);
|
|
388
|
-
// Add nested operations DTOs if configured (child + self relationships)
|
|
389
|
-
const resourceRelationships = operationWithInheritance.resourceRelationships;
|
|
390
|
-
const childDirRels = resourceRelationships ? getChildDirectionRelationships(resourceRelationships) : [];
|
|
391
|
-
if (childDirRels.length > 0) {
|
|
392
|
-
// Build request DTO with nested children for create/update operations,
|
|
393
|
-
// including bulk variants. Runtime bulk orchestration is handled in the
|
|
394
|
-
// services layer by applying the same nested-processing principles per
|
|
395
|
-
// parent result.
|
|
396
|
-
if (effectiveOperation === CoreResourceOperation.CREATE || effectiveOperation === CoreResourceOperation.CREATE_MANY ||
|
|
397
|
-
effectiveOperation === CoreResourceOperation.UPDATE || effectiveOperation === CoreResourceOperation.UPDATE_MANY) {
|
|
398
|
-
enhancedRequestDto = this.buildRequestDtoWithNested(effectiveOperation, enhancedRequestDto, childDirRels, resourceRegistry);
|
|
399
|
-
}
|
|
400
|
-
// Build response DTO with nested children (for READ)
|
|
401
|
-
if (effectiveOperation === CoreResourceOperation.READ) {
|
|
402
|
-
enhancedResponseDto = this.buildResponseDtoWithNested(enhancedResponseDto, childDirRels, resourceRegistry);
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
const result = {
|
|
406
|
-
...operationWithInheritance,
|
|
407
|
-
requestDto: enhancedRequestDto,
|
|
408
|
-
responseDto: enhancedResponseDto,
|
|
409
|
-
};
|
|
410
|
-
return result;
|
|
411
|
-
}
|
|
412
557
|
/**
|
|
413
558
|
* Build enhanced request DTO based on operation type and existing DTOs.
|
|
414
559
|
*
|
|
@@ -422,7 +567,7 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
422
567
|
const isZAny = operation.requestDto && isZodAny(operation.requestDto);
|
|
423
568
|
const currentRequestInfo = this.analyzeDtoSchema(operation.requestDto);
|
|
424
569
|
if (operation.requestDto && !isZAny && currentRequestInfo !== '📄 {} (empty object)') {
|
|
425
|
-
return operation.requestDto;
|
|
570
|
+
return this.stripTemplatableFileFieldsRecursively(operation.requestDto);
|
|
426
571
|
}
|
|
427
572
|
const searchQueryRequestSchema = operation.searchQueryRequestSchema;
|
|
428
573
|
if (effectiveOperation === CoreResourceOperation.SEARCH
|
|
@@ -435,7 +580,7 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
435
580
|
if (!shouldHaveRequestDto) {
|
|
436
581
|
return z.object({});
|
|
437
582
|
}
|
|
438
|
-
// Apply bulk operation decorator
|
|
583
|
+
// Apply bulk operation decorator for URL-bearing bulk companion operations.
|
|
439
584
|
// For bulk operations, we need to wrap the underlying operation's requestDto
|
|
440
585
|
// with Resouces_BulkOperationBaseSchema
|
|
441
586
|
if ('isBulkOperation' in operation && operation.isBulkOperation) {
|
|
@@ -488,7 +633,7 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
488
633
|
if (operation.responseDto && !isZAny && currentResponseInfo !== '📄 {} (empty object)') {
|
|
489
634
|
return operation.responseDto;
|
|
490
635
|
}
|
|
491
|
-
// Apply bulk operation decorator for bulk
|
|
636
|
+
// Apply bulk operation decorator for URL-bearing bulk companion operations.
|
|
492
637
|
if ('isBulkOperation' in operation && operation.isBulkOperation) {
|
|
493
638
|
switch (effectiveOperation) {
|
|
494
639
|
case CoreResourceOperation.DELETE:
|
|
@@ -506,14 +651,56 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
506
651
|
return z.array(operation.mainSchema);
|
|
507
652
|
}
|
|
508
653
|
}
|
|
509
|
-
// Apply pagination decorator for list/search operations
|
|
654
|
+
// Apply pagination decorator for list/search operations.
|
|
655
|
+
//
|
|
656
|
+
// The ceiling comes from the OPERATION, not from a constant. It used to be a hard-coded `50`,
|
|
657
|
+
// which made `maxPaginatedResultPerPageLimit` inert on the response side: an operation could
|
|
658
|
+
// declare 100 or 200, the repository would honour it, and the response DTO would then reject the
|
|
659
|
+
// very page the repository had just built — a 500 (`service_resource_transformation_failed`,
|
|
660
|
+
// `too_big: expected array to have <=50 items`) rather than a page. Live example found
|
|
661
|
+
// 2026-08-12 on `users | list | admin`; latent on every operation declaring a larger ceiling
|
|
662
|
+
// (`users SEARCH` 200, `organizations SEARCH` 100, `user-profiles` 200).
|
|
663
|
+
//
|
|
664
|
+
// The default is 100 — the ceiling the Mongo `_doList` hard-coded before it was taught to read
|
|
665
|
+
// the declared value, and therefore the largest page this DTO could ever have been handed. It is
|
|
666
|
+
// NOT 50: a 50 default would reject the very pages the repository is still allowed to build for
|
|
667
|
+
// an operation that declares nothing, which is the 500 this whole change exists to remove, in a
|
|
668
|
+
// new place. SEARCH's repository default stays 50, so its pages sit comfortably inside this.
|
|
510
669
|
if (effectiveOperation === CoreResourceOperation.LIST || effectiveOperation === CoreResourceOperation.SEARCH) {
|
|
511
|
-
return this.createPaginatedResponseSchema(operation.mainSchema,
|
|
670
|
+
return this.createPaginatedResponseSchema(operation.mainSchema, operation.maxPaginatedResultPerPageLimit ?? 100);
|
|
512
671
|
}
|
|
513
672
|
// Apply operation-specific default patterns
|
|
514
673
|
const defaultResponse = getDefaultResponseSchemaForOperation(effectiveOperation, operation.mainSchema);
|
|
515
674
|
return defaultResponse;
|
|
516
675
|
}
|
|
676
|
+
/**
|
|
677
|
+
* Return the row schema owned by a standard paginated collection response.
|
|
678
|
+
*
|
|
679
|
+
* LIST and SEARCH first derive a client response shaped as
|
|
680
|
+
* `{ data: Row[]; pagination: ... }`. Context projection enriches `Row`, not
|
|
681
|
+
* the envelope. Keeping this extraction at the shared DTO boundary makes the
|
|
682
|
+
* invariant unbypassable for every generated CONTEXT collection operation:
|
|
683
|
+
* its response is exactly one page of context-enriched rows.
|
|
684
|
+
*
|
|
685
|
+
* A malformed/custom collection response fails closed here. Silently falling
|
|
686
|
+
* back to the envelope recreates the former `Page<Page<Row>>` contract and
|
|
687
|
+
* lets runtime, OpenAPI, examples and client validation disagree.
|
|
688
|
+
*/
|
|
689
|
+
static extractPaginatedCollectionItemDto(responseDto, effectiveOperation) {
|
|
690
|
+
if (!isZodObject(responseDto)) {
|
|
691
|
+
throw new Error(`Cannot build ${effectiveOperation} context DTO: collection response must be a pagination object`);
|
|
692
|
+
}
|
|
693
|
+
const responseShape = getZodObjectShape(responseDto);
|
|
694
|
+
const dataSchema = responseShape.data;
|
|
695
|
+
if (!dataSchema || !isZodArray(dataSchema)) {
|
|
696
|
+
throw new Error(`Cannot build ${effectiveOperation} context DTO: pagination response must contain a data array`);
|
|
697
|
+
}
|
|
698
|
+
const itemSchema = getZodDefSchemaProperty(dataSchema, 'element');
|
|
699
|
+
if (!itemSchema) {
|
|
700
|
+
throw new Error(`Cannot build ${effectiveOperation} context DTO: pagination data array has no item schema`);
|
|
701
|
+
}
|
|
702
|
+
return itemSchema;
|
|
703
|
+
}
|
|
517
704
|
/**
|
|
518
705
|
* Create request DTO for CREATE operations.
|
|
519
706
|
*
|
|
@@ -567,11 +754,14 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
567
754
|
if (!isZodObject(schema)) {
|
|
568
755
|
return schema;
|
|
569
756
|
}
|
|
570
|
-
// Standard auto-generated fields to omit from create request DTOs
|
|
571
|
-
// Note: _id is handled via isPrimaryKey decorator which implies excludeFromCreate
|
|
572
|
-
//
|
|
573
|
-
//
|
|
574
|
-
|
|
757
|
+
// Standard auto-generated fields to omit from create request DTOs.
|
|
758
|
+
// Note: _id is handled via isPrimaryKey decorator which implies excludeFromCreate.
|
|
759
|
+
// The context-auto-populated FKs (createdByUserId, organizationId, userId,
|
|
760
|
+
// applicationId, anonymousUserId — all backend-injected from the EC, never
|
|
761
|
+
// client-supplied) come from the shared CONTEXT_AUTO_POPULATED_FIELD_IDENTIFIERS
|
|
762
|
+
// single source of truth so this omit list and the trusted-system-write
|
|
763
|
+
// re-attach allowlist (deriveTrustedSystemWritePreservedFields) never drift.
|
|
764
|
+
const fieldsToOmit = ['id', 'createdAt', 'updatedAt', ...CONTEXT_AUTO_POPULATED_FIELD_IDENTIFIERS];
|
|
575
765
|
try {
|
|
576
766
|
const omitObj = {};
|
|
577
767
|
const shape = getZodObjectShape(schema);
|
|
@@ -594,6 +784,11 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
594
784
|
if (isBackendOnlyField(fieldSchema)) {
|
|
595
785
|
omitObj[fieldName] = true;
|
|
596
786
|
}
|
|
787
|
+
// Exclude generated file fields - they are materialized by operations,
|
|
788
|
+
// not uploaded or supplied in client write payloads.
|
|
789
|
+
if (isTemplatableFileField(fieldSchema)) {
|
|
790
|
+
omitObj[fieldName] = true;
|
|
791
|
+
}
|
|
597
792
|
// Exclude non-discriminator literals - they are auto-populated by backend
|
|
598
793
|
// Discriminator literals are KEPT for variant selection in CREATE forms
|
|
599
794
|
if (this.isNonDiscriminatorLiteral(fieldSchema)) {
|
|
@@ -603,13 +798,13 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
603
798
|
// If we have fields to omit, create omitted schema
|
|
604
799
|
if (Object.keys(omitObj).length > 0) {
|
|
605
800
|
const omittedSchema = this.omitObjectFields(schema, omitObj);
|
|
606
|
-
return omittedSchema;
|
|
801
|
+
return this.stripTemplatableFileFieldsRecursively(omittedSchema);
|
|
607
802
|
}
|
|
608
803
|
}
|
|
609
804
|
catch (error) {
|
|
610
805
|
throw new Error(`Failed to create request DTO for CREATE: ${error instanceof Error ? error.message : String(error)}`);
|
|
611
806
|
}
|
|
612
|
-
return schema;
|
|
807
|
+
return this.stripTemplatableFileFieldsRecursively(schema);
|
|
613
808
|
}
|
|
614
809
|
/**
|
|
615
810
|
* Create request DTO for UPDATE operations.
|
|
@@ -628,30 +823,122 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
628
823
|
const discriminator = getZodDefStringProperty(mainSchema, 'discriminator');
|
|
629
824
|
const options = getZodDefArrayProperty(mainSchema, 'options');
|
|
630
825
|
if (discriminator && options && options.length > 0) {
|
|
631
|
-
//
|
|
632
|
-
|
|
633
|
-
//
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
826
|
+
// PATCH semantics for an inheritance resource. Two hard constraints
|
|
827
|
+
// collide here and only a MERGED SUPERSET OBJECT satisfies both:
|
|
828
|
+
//
|
|
829
|
+
// 1. The persisted variant is IMMUTABLE and the repository applies a
|
|
830
|
+
// partial `$set` (see `RepositoryResourceBackendService.update` →
|
|
831
|
+
// `findOneAndUpdate({ $set })`). A caller therefore legitimately
|
|
832
|
+
// sends only the fields it changes — e.g. an inline status
|
|
833
|
+
// autosave submits `{ status }` with NO `recurringType`. A
|
|
834
|
+
// discriminated union CANNOT express "discriminator optional":
|
|
835
|
+
// Zod needs the key present to pick a branch, and a discriminator
|
|
836
|
+
// `.default()` does NOT fire inside `z.discriminatedUnion`, so the
|
|
837
|
+
// missing key fails with "No matching discriminator" (the exact
|
|
838
|
+
// wonder-todos `todos` CHANGE_STATUS / inline-edit crash).
|
|
839
|
+
// 2. Variant-only fields (`recurrence` / `startDate` / `endsDate`)
|
|
840
|
+
// must stay IN the contract — a bare base object would `z.object`-
|
|
841
|
+
// strip them, silently dropping a partial update that touches a
|
|
842
|
+
// variant field. Keeping every variant field is the whole reason
|
|
843
|
+
// this DTO became a union in the first place.
|
|
844
|
+
//
|
|
845
|
+
// Collapsing the per-variant options into one object whose fields are
|
|
846
|
+
// all optional (the discriminator included) keeps every variant field
|
|
847
|
+
// reachable AND lets any partial subset validate without echoing the
|
|
848
|
+
// immutable discriminator. Variant/field coherence is enforced
|
|
849
|
+
// server-side against the merged persisted+patch object (the `$set`
|
|
850
|
+
// target already carries the true variant), NOT by the static request
|
|
851
|
+
// contract. CREATE keeps the discriminated union (see
|
|
852
|
+
// `createRequestDtoForCreate`) because on CREATE the client MUST choose
|
|
853
|
+
// a variant and variant-field validation applies.
|
|
854
|
+
return this.mergeUnionOptionsIntoOptionalUpdateObject(options, discriminator);
|
|
640
855
|
}
|
|
641
856
|
}
|
|
642
857
|
// Regular object schema - apply omissions directly
|
|
643
858
|
return this.applyUpdateOmissionsToSchema(mainSchema);
|
|
644
859
|
}
|
|
645
860
|
/**
|
|
646
|
-
*
|
|
647
|
-
*
|
|
861
|
+
* Collapse the per-variant options of an inheritance UPDATE discriminated
|
|
862
|
+
* union into a single object with PATCH semantics: every base + variant-only
|
|
863
|
+
* field present and optional, and the discriminator itself optional.
|
|
648
864
|
*
|
|
649
|
-
*
|
|
865
|
+
* Each option is first run through {@link applyUpdateOmissionsToSchema}
|
|
866
|
+
* (which drops `excludeFromUpdate` / PK / virtual / backend-only / templatable
|
|
867
|
+
* file fields and optionalises every non-discriminator field), then the
|
|
868
|
+
* resulting shapes are merged. The discriminator — which
|
|
869
|
+
* `applyUpdateOmissionsToSchema` keeps required per-variant so the omission
|
|
870
|
+
* pass does not mistake it for an auto-populated literal — is replaced by a
|
|
871
|
+
* single OPTIONAL enum spanning every variant value, so a partial update may
|
|
872
|
+
* omit it entirely (the persisted variant is immutable) yet a full-object
|
|
873
|
+
* update that re-sends the current discriminator still validates.
|
|
874
|
+
*
|
|
875
|
+
* Nested inheritance (an option that is itself a union) is flattened
|
|
876
|
+
* recursively so deeply-nested variant fields are preserved too.
|
|
650
877
|
*/
|
|
651
|
-
static
|
|
652
|
-
|
|
878
|
+
static mergeUnionOptionsIntoOptionalUpdateObject(options, discriminatorField) {
|
|
879
|
+
const mergedShape = {};
|
|
880
|
+
const discriminatorValues = new Set();
|
|
881
|
+
const collectFromOption = (option) => {
|
|
882
|
+
// Flatten nested discriminated unions (multi-level inheritance).
|
|
883
|
+
if (getZodType(option) === 'union') {
|
|
884
|
+
const nestedOptions = getZodDefArrayProperty(option, 'options');
|
|
885
|
+
if (nestedOptions && nestedOptions.length > 0) {
|
|
886
|
+
nestedOptions.forEach(collectFromOption);
|
|
887
|
+
return;
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
const omitted = this.applyUpdateOmissionsToSchema(option);
|
|
891
|
+
if (!isZodObject(omitted)) {
|
|
892
|
+
return;
|
|
893
|
+
}
|
|
894
|
+
const shape = getZodObjectShape(omitted);
|
|
895
|
+
for (const [fieldName, fieldSchema] of Object.entries(shape)) {
|
|
896
|
+
if (fieldName === discriminatorField) {
|
|
897
|
+
// Gather every variant value the discriminator can carry; the field
|
|
898
|
+
// is rebuilt as one optional enum below.
|
|
899
|
+
for (const value of this.extractDiscriminatorValues(fieldSchema)) {
|
|
900
|
+
discriminatorValues.add(value);
|
|
901
|
+
}
|
|
902
|
+
continue;
|
|
903
|
+
}
|
|
904
|
+
// First writer wins: base fields are identical across variants and
|
|
905
|
+
// variant-only fields appear in exactly one option, so there is no
|
|
906
|
+
// meaningful collision to resolve. `applyUpdateOmissionsToSchema`
|
|
907
|
+
// already made every non-discriminator field optional.
|
|
908
|
+
if (!mergedShape[fieldName]) {
|
|
909
|
+
mergedShape[fieldName] = fieldSchema;
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
};
|
|
913
|
+
options.forEach(collectFromOption);
|
|
914
|
+
if (discriminatorValues.size > 0) {
|
|
915
|
+
// Optional so a partial update may omit the immutable discriminator; the
|
|
916
|
+
// enum still accepts a re-sent current value from a full-object update.
|
|
917
|
+
mergedShape[discriminatorField] = z
|
|
918
|
+
.enum(Array.from(discriminatorValues))
|
|
919
|
+
.optional();
|
|
920
|
+
}
|
|
921
|
+
return z.object(mergedShape);
|
|
922
|
+
}
|
|
923
|
+
/**
|
|
924
|
+
* Extract the concrete discriminator value(s) a union-option's discriminator
|
|
925
|
+
* field can hold. Variant options carry a `z.literal(value)`; the base option
|
|
926
|
+
* carries a `z.enum([...baseValues])`. Both may be wrapped by the
|
|
927
|
+
* `isDiscriminator` decorator / `.default()` / `.optional()`, so unwrap first.
|
|
928
|
+
*/
|
|
929
|
+
static extractDiscriminatorValues(fieldSchema) {
|
|
653
930
|
const unwrapped = unwrapSchema(fieldSchema);
|
|
654
|
-
|
|
931
|
+
const unwrappedType = getZodType(unwrapped);
|
|
932
|
+
if (unwrappedType === 'enum') {
|
|
933
|
+
return getEnumValues(unwrapped).map(String);
|
|
934
|
+
}
|
|
935
|
+
// Literal — Zod 4 stores value(s) in `def.values` (array); fall back to the
|
|
936
|
+
// legacy scalar `def.value`. Mirrors the literal read at `analyzeDtoSchema`.
|
|
937
|
+
const literalValues = (getZodDefArrayProperty(unwrapped, 'values')
|
|
938
|
+
?? [getZodDefProperty(unwrapped, 'value')]);
|
|
939
|
+
return literalValues
|
|
940
|
+
.filter((value) => value !== undefined && value !== null)
|
|
941
|
+
.map(String);
|
|
655
942
|
}
|
|
656
943
|
/**
|
|
657
944
|
* Apply UPDATE operation omissions to a single schema (object or other).
|
|
@@ -660,11 +947,13 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
660
947
|
if (!isZodObject(schema)) {
|
|
661
948
|
return schema;
|
|
662
949
|
}
|
|
663
|
-
// Standard auto-generated fields to omit from update request DTOs
|
|
664
|
-
// Note: Primary keys are passed as route params, not in request body
|
|
665
|
-
//
|
|
666
|
-
//
|
|
667
|
-
|
|
950
|
+
// Standard auto-generated fields to omit from update request DTOs.
|
|
951
|
+
// Note: Primary keys are passed as route params, not in request body.
|
|
952
|
+
// The context-auto-populated FKs (immutable after creation; anonymousUserId
|
|
953
|
+
// is managed by transposition, never client-updatable) come from the shared
|
|
954
|
+
// CONTEXT_AUTO_POPULATED_FIELD_IDENTIFIERS single source of truth so this omit
|
|
955
|
+
// list and the trusted-system-write re-attach allowlist stay in lockstep.
|
|
956
|
+
const fieldsToOmit = ['id', 'createdAt', 'updatedAt', ...CONTEXT_AUTO_POPULATED_FIELD_IDENTIFIERS];
|
|
668
957
|
try {
|
|
669
958
|
const omitObj = {};
|
|
670
959
|
const shape = getZodObjectShape(schema);
|
|
@@ -691,23 +980,59 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
691
980
|
if (isBackendOnlyField(fieldSchema)) {
|
|
692
981
|
omitObj[fieldName] = true;
|
|
693
982
|
}
|
|
694
|
-
// Exclude
|
|
695
|
-
//
|
|
696
|
-
|
|
697
|
-
|
|
983
|
+
// Exclude generated file fields - explicit regenerate operations own
|
|
984
|
+
// refreshing them, so generic UPDATE payloads must not accept them.
|
|
985
|
+
if (isTemplatableFileField(fieldSchema)) {
|
|
986
|
+
omitObj[fieldName] = true;
|
|
987
|
+
}
|
|
988
|
+
// Exclude NON-discriminator literals only — they are fixed values
|
|
989
|
+
// auto-populated by the backend and immutable after creation.
|
|
990
|
+
//
|
|
991
|
+
// Discriminator literals are KEPT: for an inheritance resource the
|
|
992
|
+
// UPDATE DTO is a discriminated union, and the discriminator must be
|
|
993
|
+
// present (and required) so Zod can select the variant and validate
|
|
994
|
+
// its variant-specific fields. Stripping it produced a structurally
|
|
995
|
+
// invalid discriminated union ("Invalid discriminated union option").
|
|
996
|
+
// The discriminator's immutability is enforced at the service layer
|
|
997
|
+
// (the update is rejected if it changes the variant), not by removing
|
|
998
|
+
// it from the request contract — which would silently drop every
|
|
999
|
+
// variant-only field from the payload.
|
|
1000
|
+
if (this.isNonDiscriminatorLiteral(fieldSchema)) {
|
|
698
1001
|
omitObj[fieldName] = true;
|
|
699
1002
|
}
|
|
700
1003
|
}
|
|
701
|
-
//
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
1004
|
+
// Rebuild the shape with PATCH semantics: drop the omitted fields, then
|
|
1005
|
+
// make every remaining field optional EXCEPT the discriminator. This
|
|
1006
|
+
// mirrors the factory's `buildUpdateRequestDto` (partial update). The
|
|
1007
|
+
// discriminator is left REQUIRED here only so this per-variant omission
|
|
1008
|
+
// pass does not mistake it for an auto-populated literal and strip it —
|
|
1009
|
+
// for an inheritance UPDATE the per-variant objects are then merged by
|
|
1010
|
+
// `mergeUnionOptionsIntoOptionalUpdateObject`, which replaces the
|
|
1011
|
+
// discriminator with a single OPTIONAL enum so partial updates may omit
|
|
1012
|
+
// the immutable discriminator. (Without optionalizing the other fields
|
|
1013
|
+
// every field would become mandatory, breaking partial updates for every
|
|
1014
|
+
// resource.)
|
|
1015
|
+
const updateShape = {};
|
|
1016
|
+
for (const [fieldName, fieldSchema] of Object.entries(shape)) {
|
|
1017
|
+
if (omitObj[fieldName]) {
|
|
1018
|
+
continue;
|
|
1019
|
+
}
|
|
1020
|
+
const strippedField = this.stripTemplatableFileFieldsRecursively(fieldSchema);
|
|
1021
|
+
// Non-discriminator fields are optionalised for PATCH; `toPatchOptionalField`
|
|
1022
|
+
// also peels any `.default()` so an omitted field is never re-materialized to
|
|
1023
|
+
// its default and `$set` back over the stored value (the `attemptCount`-reset
|
|
1024
|
+
// class of bug). The discriminator is kept as-is (required, default intact) so
|
|
1025
|
+
// the union stays selectable — the merge pass replaces it with an optional enum.
|
|
1026
|
+
updateShape[fieldName] = isDiscriminatorField(fieldSchema)
|
|
1027
|
+
? strippedField
|
|
1028
|
+
: toPatchOptionalField(strippedField);
|
|
1029
|
+
}
|
|
1030
|
+
return z.object(updateShape);
|
|
706
1031
|
}
|
|
707
1032
|
catch (error) {
|
|
708
1033
|
throw new Error(`Failed to create request DTO for UPDATE: ${error instanceof Error ? error.message : String(error)}`);
|
|
709
1034
|
}
|
|
710
|
-
return schema;
|
|
1035
|
+
return this.stripTemplatableFileFieldsRecursively(schema);
|
|
711
1036
|
}
|
|
712
1037
|
/**
|
|
713
1038
|
* Exclude virtual fields from a schema.
|
|
@@ -767,10 +1092,14 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
767
1092
|
/**
|
|
768
1093
|
* Create paginated response schema using shared pagination metadata schema
|
|
769
1094
|
*/
|
|
770
|
-
static createPaginatedResponseSchema(dataSchema, maxResultsPerPageLimit =
|
|
1095
|
+
static createPaginatedResponseSchema(dataSchema, maxResultsPerPageLimit = 100) {
|
|
771
1096
|
return z.object({
|
|
772
1097
|
data: z.array(dataSchema).max(maxResultsPerPageLimit),
|
|
773
|
-
|
|
1098
|
+
// Bounded by the SAME ceiling as the data array beside it. Leaving this on the default-bounded
|
|
1099
|
+
// constant is how a legitimately-served 120-row page still answered 500 after the array bound,
|
|
1100
|
+
// the request bound and both repository maxima had been unified: `limit` echoes the page size
|
|
1101
|
+
// actually served, so a stricter bound here rejects what the line above just permitted.
|
|
1102
|
+
pagination: createPaginationResponseMetadataSchema(maxResultsPerPageLimit)
|
|
774
1103
|
});
|
|
775
1104
|
}
|
|
776
1105
|
/**
|
|
@@ -843,7 +1172,7 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
843
1172
|
ops.forEach((operation, index) => {
|
|
844
1173
|
totalOperations++;
|
|
845
1174
|
const variantInfo = operation.variantType +
|
|
846
|
-
(operation.isBulkOperation ? ' [BULK]' : '') +
|
|
1175
|
+
('isBulkOperation' in operation && operation.isBulkOperation ? ' [BULK]' : '') +
|
|
847
1176
|
(operation.isOperationDefault ? ' [DEFAULT]' : '') +
|
|
848
1177
|
(operation.variantKey ? ` [${operation.variantKey}]` : '');
|
|
849
1178
|
console.log(` └─ Variant ${index + 1}: ${variantInfo}`);
|
|
@@ -1260,8 +1589,12 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
1260
1589
|
}
|
|
1261
1590
|
return `union(${optionCount} options)`;
|
|
1262
1591
|
case 'literal':
|
|
1263
|
-
|
|
1264
|
-
|
|
1592
|
+
// Zod 4 stores literal value(s) in def.values (an array); the legacy Zod-3
|
|
1593
|
+
// def.value is always undefined in v4, so reading it alone always rendered
|
|
1594
|
+
// literal("unknown"). Read def.values first, fall back to def.value.
|
|
1595
|
+
const literalValues = (getZodDefArrayProperty(fieldSchema, 'values') ?? [getZodDefProperty(fieldSchema, 'value')])
|
|
1596
|
+
.filter((entry) => entry !== undefined && entry !== null);
|
|
1597
|
+
return `literal("${String(literalValues[0] ?? 'unknown')}")`;
|
|
1265
1598
|
case 'any':
|
|
1266
1599
|
return 'any';
|
|
1267
1600
|
case 'unknown':
|
|
@@ -1366,8 +1699,11 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
1366
1699
|
const mainSchemaOptions = [];
|
|
1367
1700
|
// Add base schema for non-inherited values if specified
|
|
1368
1701
|
if (withoutInheritanceDiscriminatorFieldValues && withoutInheritanceDiscriminatorFieldValues.length > 0) {
|
|
1369
|
-
// Create enum for base discriminator values
|
|
1370
|
-
|
|
1702
|
+
// Create enum for base discriminator values.
|
|
1703
|
+
// Mark it with the isDiscriminator decorator so EVERY union option's
|
|
1704
|
+
// discriminator field is uniformly recognized as a discriminator (and not
|
|
1705
|
+
// mistaken for an auto-populated literal by the request-DTO omission logic).
|
|
1706
|
+
const baseDiscriminatorEnum = addDiscriminator(z.enum(withoutInheritanceDiscriminatorFieldValues), { baseValues: withoutInheritanceDiscriminatorFieldValues });
|
|
1371
1707
|
// Extend mainSchema with discriminator field
|
|
1372
1708
|
const baseMainSchema = this.extendSchemaWithDiscriminator(mainSchema, discriminatorField, baseDiscriminatorEnum);
|
|
1373
1709
|
mainSchemaOptions.push(baseMainSchema);
|
|
@@ -1375,8 +1711,14 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
1375
1711
|
// Process each inherited schema
|
|
1376
1712
|
inheritedSchemas.forEach((inheritedItem) => {
|
|
1377
1713
|
const { discriminatorFieldValue, schema: inheritedSchema } = inheritedItem;
|
|
1378
|
-
// Create literal discriminator for this variant
|
|
1379
|
-
|
|
1714
|
+
// Create literal discriminator for this variant.
|
|
1715
|
+
// It MUST carry the isDiscriminator decorator: `mergeInheritedSchema`
|
|
1716
|
+
// overwrites the variant's discriminator field with this value, dropping
|
|
1717
|
+
// the decorator `createSchemaFamily` originally applied. Without it, the
|
|
1718
|
+
// request-DTO builder's `isNonDiscriminatorLiteral` check would strip the
|
|
1719
|
+
// discriminator from CREATE/UPDATE DTOs, producing a structurally-invalid
|
|
1720
|
+
// discriminated union (Zod: "Invalid discriminated union option").
|
|
1721
|
+
const discriminatorLiteral = addDiscriminator(z.literal(discriminatorFieldValue), { baseValues: withoutInheritanceDiscriminatorFieldValues });
|
|
1380
1722
|
// Merge inherited schema with base schema and add discriminator
|
|
1381
1723
|
const mergedMainSchema = this.mergeInheritedSchema(mainSchema, inheritedSchema, discriminatorField, discriminatorLiteral);
|
|
1382
1724
|
mainSchemaOptions.push(mergedMainSchema);
|
|
@@ -1630,8 +1972,9 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
1630
1972
|
}
|
|
1631
1973
|
}
|
|
1632
1974
|
const nestedFields = {};
|
|
1975
|
+
const allResourceFieldIdentifiers = this.getAllResourceFieldIdentifiers(resourceRegistry);
|
|
1633
1976
|
for (const rel of childRelationships) {
|
|
1634
|
-
const compiledRel = Resources_SharedUtils.ensureCompiledRelationship(rel);
|
|
1977
|
+
const compiledRel = Resources_SharedUtils.ensureCompiledRelationship(rel, allResourceFieldIdentifiers);
|
|
1635
1978
|
const nestedConfig = Resources_SharedUtils.resolveRelationshipNestedMutationConfig(compiledRel, operation);
|
|
1636
1979
|
if (!nestedConfig)
|
|
1637
1980
|
continue;
|
|
@@ -1665,8 +2008,9 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
1665
2008
|
*/
|
|
1666
2009
|
static buildResponseDtoWithNested(baseDto, childRelationships, resourceRegistry) {
|
|
1667
2010
|
const nestedFields = {};
|
|
2011
|
+
const allResourceFieldIdentifiers = this.getAllResourceFieldIdentifiers(resourceRegistry);
|
|
1668
2012
|
for (const rel of childRelationships) {
|
|
1669
|
-
const compiledRel = Resources_SharedUtils.ensureCompiledRelationship(rel);
|
|
2013
|
+
const compiledRel = Resources_SharedUtils.ensureCompiledRelationship(rel, allResourceFieldIdentifiers);
|
|
1670
2014
|
const readConfig = Resources_SharedUtils.resolveRelationshipNestedReadConfig(compiledRel);
|
|
1671
2015
|
if (!readConfig)
|
|
1672
2016
|
continue;
|
|
@@ -1682,6 +2026,97 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
1682
2026
|
}
|
|
1683
2027
|
return this.extendObjectLikeDto(baseDto, nestedFields);
|
|
1684
2028
|
}
|
|
2029
|
+
/**
|
|
2030
|
+
* Schema-guided value walk that locates every `.isWriteOnlySecret()` field in
|
|
2031
|
+
* a runtime object and hands the holding object + field name to `visitSecret`.
|
|
2032
|
+
*
|
|
2033
|
+
* Mirrors the unwrap/recursion structure of {@link stripBackendOnlyFields} but
|
|
2034
|
+
* operates on VALUES, not schemas. It mutates in place (callers pass a freshly
|
|
2035
|
+
* `.parse()`'d body or a to-be-validated input, both safe to mutate). For
|
|
2036
|
+
* discriminated unions it recurses EVERY variant against the single value —
|
|
2037
|
+
* safe because both leaf actions (mask/strip) are guarded (mask only a present
|
|
2038
|
+
* value; strip only the exact sentinel), so fields belonging to a non-matching
|
|
2039
|
+
* variant are simply absent and no-op.
|
|
2040
|
+
*/
|
|
2041
|
+
static walkWriteOnlySecretValues(schema, value, visitSecret) {
|
|
2042
|
+
if (value === null || value === undefined) {
|
|
2043
|
+
return;
|
|
2044
|
+
}
|
|
2045
|
+
// Unwrap optional / nullable / default wrappers — same value, inner schema.
|
|
2046
|
+
if (isZodOptional(schema) || hasZodType(schema, 'nullable') || isZodDefault(schema)) {
|
|
2047
|
+
const innerSchema = getZodDefProperty(schema, 'innerType');
|
|
2048
|
+
if (innerSchema) {
|
|
2049
|
+
this.walkWriteOnlySecretValues(innerSchema, value, visitSecret);
|
|
2050
|
+
}
|
|
2051
|
+
return;
|
|
2052
|
+
}
|
|
2053
|
+
// Unions (incl. discriminated) — recurse every object variant.
|
|
2054
|
+
if (getZodType(schema) === 'union') {
|
|
2055
|
+
const unionOptions = getZodDefArrayProperty(schema, 'options');
|
|
2056
|
+
if (unionOptions) {
|
|
2057
|
+
for (const option of unionOptions) {
|
|
2058
|
+
this.walkWriteOnlySecretValues(option, value, visitSecret);
|
|
2059
|
+
}
|
|
2060
|
+
}
|
|
2061
|
+
return;
|
|
2062
|
+
}
|
|
2063
|
+
// Arrays — recurse each element against the element schema.
|
|
2064
|
+
if (isZodArray(schema) && Array.isArray(value)) {
|
|
2065
|
+
const elementSchema = getZodDefProperty(schema, 'element');
|
|
2066
|
+
if (elementSchema) {
|
|
2067
|
+
for (const item of value) {
|
|
2068
|
+
this.walkWriteOnlySecretValues(elementSchema, item, visitSecret);
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
2071
|
+
return;
|
|
2072
|
+
}
|
|
2073
|
+
// Objects — visit write-only-secret fields, recurse the rest.
|
|
2074
|
+
if (isZodObject(schema) && typeof value === 'object' && !Array.isArray(value)) {
|
|
2075
|
+
const shape = getZodObjectShape(schema);
|
|
2076
|
+
const holder = value;
|
|
2077
|
+
for (const [fieldName, fieldSchema] of Object.entries(shape)) {
|
|
2078
|
+
if (isWriteOnlySecretField(fieldSchema)) {
|
|
2079
|
+
visitSecret(holder, fieldName);
|
|
2080
|
+
}
|
|
2081
|
+
else {
|
|
2082
|
+
this.walkWriteOnlySecretValues(fieldSchema, holder[fieldName], visitSecret);
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
}
|
|
2086
|
+
}
|
|
2087
|
+
/**
|
|
2088
|
+
* Redact every `.isWriteOnlySecret()` field in a client-facing response body to
|
|
2089
|
+
* {@link WRITE_ONLY_SECRET_MASK}. Applied at the client-serialization boundary
|
|
2090
|
+
* ONLY (`serializeOperationResultForResponse`), never at the service dispatch /
|
|
2091
|
+
* `transformOutput` tier — internal reads (`readAsSystem`, repository
|
|
2092
|
+
* `read<T>()`) must keep the real value so backend consumers (e.g. a webhook
|
|
2093
|
+
* signer) can use it. Returns the same (mutated) value for call-site ergonomics.
|
|
2094
|
+
*/
|
|
2095
|
+
static maskWriteOnlySecretFields(schema, value) {
|
|
2096
|
+
this.walkWriteOnlySecretValues(schema, value, (holder, fieldName) => {
|
|
2097
|
+
const current = holder[fieldName];
|
|
2098
|
+
if (current !== null && current !== undefined && current !== '') {
|
|
2099
|
+
holder[fieldName] = WRITE_ONLY_SECRET_MASK;
|
|
2100
|
+
}
|
|
2101
|
+
});
|
|
2102
|
+
return value;
|
|
2103
|
+
}
|
|
2104
|
+
/**
|
|
2105
|
+
* Strip any `.isWriteOnlySecret()` field whose incoming value equals the
|
|
2106
|
+
* {@link WRITE_ONLY_SECRET_MASK} sentinel from a CREATE/UPDATE input payload.
|
|
2107
|
+
* A client that renders the masked read value and submits it unchanged sends
|
|
2108
|
+
* the sentinel back; removing the field means the stored secret is preserved
|
|
2109
|
+
* (UPDATE is a partial `$set`). A genuinely new secret value is left intact.
|
|
2110
|
+
* Returns the same (mutated) value.
|
|
2111
|
+
*/
|
|
2112
|
+
static stripWriteOnlySecretSentinel(schema, value) {
|
|
2113
|
+
this.walkWriteOnlySecretValues(schema, value, (holder, fieldName) => {
|
|
2114
|
+
if (holder[fieldName] === WRITE_ONLY_SECRET_MASK) {
|
|
2115
|
+
delete holder[fieldName];
|
|
2116
|
+
}
|
|
2117
|
+
});
|
|
2118
|
+
return value;
|
|
2119
|
+
}
|
|
1685
2120
|
/**
|
|
1686
2121
|
* Strip fields marked with isBackendOnly decorator from schema.
|
|
1687
2122
|
*
|
|
@@ -1707,25 +2142,39 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
1707
2142
|
}
|
|
1708
2143
|
return schema;
|
|
1709
2144
|
}
|
|
1710
|
-
// Handle arrays - strip from array element schema
|
|
2145
|
+
// Handle arrays - strip from array element schema.
|
|
2146
|
+
// `withArrayElement` rather than `z.array(...)`: a fresh array carries none of the original's
|
|
2147
|
+
// own `.min()` / `.max()` / `.length()` checks, which would silently drop an authored
|
|
2148
|
+
// collection-size constraint from the response contract.
|
|
1711
2149
|
if (isZodArray(schema)) {
|
|
1712
2150
|
// ZodArray stores element schema in _def.element (not _def.type)
|
|
1713
2151
|
const elementSchema = getZodDefProperty(schema, 'element');
|
|
1714
|
-
return
|
|
2152
|
+
return withArrayElement(schema, this.stripBackendOnlyFields(elementSchema, options));
|
|
1715
2153
|
}
|
|
1716
2154
|
// Handle optional/nullable/default wrappers - unwrap, strip, rewrap
|
|
1717
2155
|
if (isZodOptional(schema)) {
|
|
1718
2156
|
const innerSchema = getZodDefProperty(schema, 'innerType');
|
|
1719
|
-
return this.stripBackendOnlyFields(innerSchema, options).optional();
|
|
2157
|
+
return this.preserveSchemaMetadata(schema, this.stripBackendOnlyFields(innerSchema, options).optional());
|
|
1720
2158
|
}
|
|
1721
2159
|
if (hasZodType(schema, 'nullable')) {
|
|
1722
2160
|
const innerSchema = getZodDefProperty(schema, 'innerType');
|
|
1723
|
-
return this.stripBackendOnlyFields(innerSchema, options).nullable();
|
|
2161
|
+
return this.preserveSchemaMetadata(schema, this.stripBackendOnlyFields(innerSchema, options).nullable());
|
|
1724
2162
|
}
|
|
1725
2163
|
if (isZodDefault(schema)) {
|
|
1726
2164
|
const innerSchema = getZodDefProperty(schema, 'innerType');
|
|
1727
|
-
|
|
1728
|
-
|
|
2165
|
+
// ⚠️ Re-READ the default per parse, never carry a value across.
|
|
2166
|
+
//
|
|
2167
|
+
// In Zod 4 `def.defaultValue` is a GETTER: reading it EVALUATES the default
|
|
2168
|
+
// (`z.date().default(() => new Date())` yields a fresh Date on every read).
|
|
2169
|
+
// A DTO is rebuilt ONCE, when the resource configuration is built at process
|
|
2170
|
+
// start — so `.default(<value read here>)` freezes that instant into every
|
|
2171
|
+
// parse the process ever performs. Recovered 2026-08-11: lifecycle rows were
|
|
2172
|
+
// persisting `stageEnteredAt` / `lastActiveAt` stamped at backend boot,
|
|
2173
|
+
// identical to the millisecond across rows created a minute apart.
|
|
2174
|
+
//
|
|
2175
|
+
// Passing a FUNCTION makes Zod evaluate per parse. A literal default is
|
|
2176
|
+
// unaffected — the getter simply returns the same value each time.
|
|
2177
|
+
return this.preserveSchemaMetadata(schema, this.stripBackendOnlyFields(innerSchema, options).default(() => getZodDefProperty(schema, 'defaultValue')));
|
|
1729
2178
|
}
|
|
1730
2179
|
// Handle objects - strip backend-only fields from shape
|
|
1731
2180
|
if (isZodObject(schema)) {
|
|
@@ -1765,19 +2214,23 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
1765
2214
|
return schema;
|
|
1766
2215
|
}
|
|
1767
2216
|
/**
|
|
1768
|
-
* Transform
|
|
2217
|
+
* Transform network-boundary leaves recursively for API/WebSocket/Queue DTOs:
|
|
2218
|
+
* `z.date()` → string-accepting `z.coerce.date()`, and `z.bigint()` (notably
|
|
2219
|
+
* `z_money`'s `amount`) → a string-accepting bigint (see
|
|
2220
|
+
* {@link applyNetworkBoundaryCoercion} for why money bigints arrive as strings).
|
|
1769
2221
|
*
|
|
1770
2222
|
* This utility is used to create schemas suitable for parsing API responses/requests
|
|
1771
|
-
* where dates come as ISO strings and
|
|
2223
|
+
* where dates come as ISO strings and money amounts come as numeric strings, both of
|
|
2224
|
+
* which need to be coerced back to their runtime types (Date / bigint).
|
|
1772
2225
|
*
|
|
1773
2226
|
* Use this when parsing data from:
|
|
1774
|
-
* - HTTP API responses (JSON with date strings)
|
|
2227
|
+
* - HTTP API responses (JSON with date strings and bigint-as-string money amounts)
|
|
1775
2228
|
* - WebSocket messages
|
|
1776
2229
|
* - Queue messages
|
|
1777
|
-
* - Any external data source where dates are serialized as strings
|
|
2230
|
+
* - Any external data source where dates/bigints are serialized as strings
|
|
1778
2231
|
*
|
|
1779
|
-
* @param schema - Schema to transform (typically a database/internal schema with z.date())
|
|
1780
|
-
* @returns New schema with coerced dates
|
|
2232
|
+
* @param schema - Schema to transform (typically a database/internal schema with z.date()/z.bigint())
|
|
2233
|
+
* @returns New schema with coerced dates + bigints suitable for API parsing
|
|
1781
2234
|
*
|
|
1782
2235
|
* @example
|
|
1783
2236
|
* ```typescript
|
|
@@ -1792,22 +2245,57 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
1792
2245
|
* ```
|
|
1793
2246
|
*/
|
|
1794
2247
|
static createApiParsingSchema(schema) {
|
|
1795
|
-
return this.
|
|
2248
|
+
return this.applyNetworkBoundaryCoercion(schema);
|
|
1796
2249
|
}
|
|
1797
2250
|
/**
|
|
1798
|
-
*
|
|
2251
|
+
* Recursively transpose the two network-boundary leaf types that do NOT survive
|
|
2252
|
+
* a JSON round-trip as their runtime type — `z.date()` and `z.bigint()` — into
|
|
2253
|
+
* string-accepting forms, walking union / array / optional / nullable / default /
|
|
2254
|
+
* object wrappers so nested and optional leaves are covered identically.
|
|
2255
|
+
*
|
|
2256
|
+
* This is the INBOUND (coerce, string → runtime type) half of the network-boundary
|
|
2257
|
+
* contract. Its OUTBOUND (serialize, runtime type → wire string) counterpart is
|
|
2258
|
+
* `Date.prototype.toJSON` (built-in) for dates and `BigInt.prototype.toJSON`
|
|
2259
|
+
* (installed by `installBigIntJsonEncoding` in `@wildo-ai/zod-decorators`) for
|
|
2260
|
+
* money bigints. Because the SAME coerced `responseDto`/`requestDto` this produces
|
|
2261
|
+
* is parsed on BOTH sides, the backend serialize-parse, the frontend
|
|
2262
|
+
* receive-parse, and worker queue re-hydration all coerce identically. See the
|
|
2263
|
+
* full mechanism map in `install-bigint-json-encoding.ts`.
|
|
1799
2264
|
*
|
|
1800
|
-
*
|
|
1801
|
-
*
|
|
2265
|
+
* **Why `z.bigint()` needs this (the `z_money` case).** `z_money().amount` is a
|
|
2266
|
+
* `z.bigint()`. The Zod→Mongoose convertor persists bigint as a Mongoose **String**
|
|
2267
|
+
* column (with a `v → BigInt(v)` getter), but reads go through `.lean()` /
|
|
2268
|
+
* `toObject` WITHOUT `{ getters: true }`, so the value that reaches the DTO layer
|
|
2269
|
+
* is the raw **string** (e.g. `"1999"`), and over the JSON wire a bigint is always
|
|
2270
|
+
* serialized as a string too. A strict `z.bigint().parse("1999")` then throws
|
|
2271
|
+
* `expected bigint, received string` in the service-layer `transformOutput`. This
|
|
2272
|
+
* pass rewrites every `z.bigint()` leaf to first coerce a string to `BigInt`, so
|
|
2273
|
+
* the same strict schema now accepts the on-wire/from-DB string form. It mirrors
|
|
2274
|
+
* the `z.date()` → `z.coerce.date()` transposition exactly — both are "the runtime
|
|
2275
|
+
* type does not round-trip through JSON, accept its string form on read" fixes.
|
|
2276
|
+
*
|
|
2277
|
+
* The bigint leaf is wrapped with `z.preprocess` over the ORIGINAL schema (rather
|
|
2278
|
+
* than a fresh `z.coerce.bigint()`) specifically to **preserve any `.min()`/`.max()`
|
|
2279
|
+
* checks** — e.g. `z_money({ minAmount: 0n })` compiles to `z.bigint().min(0n)`,
|
|
2280
|
+
* whose non-negativity check must survive the coercion. `z.coerce.bigint()` would
|
|
2281
|
+
* silently drop those checks; preprocessing the untouched schema keeps them intact.
|
|
2282
|
+
*
|
|
2283
|
+
* z_money field coverage this pass restores (each parses after coercion):
|
|
2284
|
+
* `prices.unitPrice`, `prices.tiers[].unitPrice`, `prices.tiers[].flatPrice`
|
|
2285
|
+
* (array-nested), `invoiceRefs.total`, `promotions.discountFixedAmount` (optional),
|
|
2286
|
+
* `productDefinitions.unitPrice`.
|
|
2287
|
+
*
|
|
2288
|
+
* @param schema - Schema to transform (typically a database/internal schema with z.date()/z.bigint())
|
|
2289
|
+
* @returns New schema with coerced dates + string-accepting bigints
|
|
1802
2290
|
*/
|
|
1803
|
-
static
|
|
2291
|
+
static applyNetworkBoundaryCoercion(schema) {
|
|
1804
2292
|
// Handle discriminated unions - transform dates in all variants
|
|
1805
2293
|
const zodType = getZodType(schema);
|
|
1806
2294
|
if (zodType === 'union') {
|
|
1807
2295
|
const discriminator = getZodDefStringProperty(schema, 'discriminator');
|
|
1808
2296
|
const unionOptions = getZodDefArrayProperty(schema, 'options');
|
|
1809
2297
|
if (discriminator && unionOptions && unionOptions.length > 0) {
|
|
1810
|
-
const transformedOptions = unionOptions.map((option) => this.
|
|
2298
|
+
const transformedOptions = unionOptions.map((option) => this.applyNetworkBoundaryCoercion(option));
|
|
1811
2299
|
if (transformedOptions.length >= 2) {
|
|
1812
2300
|
return z.discriminatedUnion(discriminator, transformedOptions);
|
|
1813
2301
|
}
|
|
@@ -1817,39 +2305,69 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
1817
2305
|
}
|
|
1818
2306
|
return schema;
|
|
1819
2307
|
}
|
|
1820
|
-
// Handle arrays - transform dates in array element schema
|
|
2308
|
+
// Handle arrays - transform dates in array element schema.
|
|
2309
|
+
// `withArrayElement` rather than `z.array(...)`: this walk runs over EVERY operation DTO,
|
|
2310
|
+
// including an author-supplied `requestDto`, so rebuilding bare here is what stripped
|
|
2311
|
+
// authored `.min()` / `.max()` constraints out of request validation.
|
|
1821
2312
|
if (isZodArray(schema)) {
|
|
1822
2313
|
// ZodArray stores element schema in _def.element (not _def.type)
|
|
1823
2314
|
const elementSchema = getZodDefProperty(schema, 'element');
|
|
1824
|
-
return
|
|
2315
|
+
return withArrayElement(schema, this.applyNetworkBoundaryCoercion(elementSchema));
|
|
1825
2316
|
}
|
|
1826
2317
|
// Handle optional/nullable/default wrappers - unwrap, transform, rewrap
|
|
1827
2318
|
if (isZodOptional(schema)) {
|
|
1828
2319
|
const innerSchema = getZodDefProperty(schema, 'innerType');
|
|
1829
|
-
return this.
|
|
2320
|
+
return this.preserveSchemaMetadata(schema, this.applyNetworkBoundaryCoercion(innerSchema).optional());
|
|
1830
2321
|
}
|
|
1831
2322
|
if (hasZodType(schema, 'nullable')) {
|
|
1832
2323
|
const innerSchema = getZodDefProperty(schema, 'innerType');
|
|
1833
|
-
return this.
|
|
2324
|
+
return this.preserveSchemaMetadata(schema, this.applyNetworkBoundaryCoercion(innerSchema).nullable());
|
|
1834
2325
|
}
|
|
1835
2326
|
if (isZodDefault(schema)) {
|
|
1836
2327
|
const innerSchema = getZodDefProperty(schema, 'innerType');
|
|
1837
|
-
|
|
1838
|
-
|
|
2328
|
+
// Per-parse re-read — see the note on the `stripBackendOnlyFields` default
|
|
2329
|
+
// branch: a materialized default freezes at DTO-build time (process start).
|
|
2330
|
+
return this.preserveSchemaMetadata(schema, this.applyNetworkBoundaryCoercion(innerSchema).default(() => getZodDefProperty(schema, 'defaultValue')));
|
|
1839
2331
|
}
|
|
1840
|
-
// Handle pipe/refine
|
|
2332
|
+
// Handle pipe/refine chains (`.transform()` / `.refine()` — e.g. `z_phone()`,
|
|
2333
|
+
// which is `z.string().transform(...).refine(...).transform(...)`, or a bare
|
|
2334
|
+
// `z.coerce.date()`). Return the schema UNCHANGED.
|
|
2335
|
+
//
|
|
2336
|
+
// Rationale: a pipe/refine chain is an opaque validation+normalization pipeline
|
|
2337
|
+
// over a primitive. Framework `z.date()` leaves NEVER live inside such a chain —
|
|
2338
|
+
// dates are only ever wrapped in optional/nullable/default/array/object/union —
|
|
2339
|
+
// so there is nothing for date-coercion to rewrite here.
|
|
2340
|
+
//
|
|
2341
|
+
// Rejected alternative (the prior implementation): unwrap the inner schema,
|
|
2342
|
+
// coerce it, and return that inner. This is doubly wrong — (1) in Zod 4 the pipe
|
|
2343
|
+
// input lives at `def.in`, not the Zod-3-era `def.schema`, so the unwrap read
|
|
2344
|
+
// `undefined` and any surrounding `.optional()/.nullable()/.default()` then
|
|
2345
|
+
// crashed with "Cannot read properties of undefined (reading 'optional')" the
|
|
2346
|
+
// moment a pipe field (e.g. `z_phone().optional()`) reached this branch; and
|
|
2347
|
+
// (2) even reading `def.in` correctly, returning the bare inner would silently
|
|
2348
|
+
// DROP the pipe's transform/refine steps (e.g. `z_phone`'s E.164 normalization
|
|
2349
|
+
// and validation) from every request/response/summary DTO. Preserving the whole
|
|
2350
|
+
// pipe atomically is the only semantically-faithful behavior.
|
|
1841
2351
|
if (hasZodType(schema, 'pipe') || hasZodType(schema, 'refine')) {
|
|
1842
|
-
|
|
1843
|
-
const transformed = this.applyDateCoercion(innerSchema);
|
|
1844
|
-
// Reapply pipe/refine - this is complex, for now just transform inner schema
|
|
1845
|
-
// Full pipe/refine preservation would require extracting all pipe steps
|
|
1846
|
-
return transformed;
|
|
2352
|
+
return schema;
|
|
1847
2353
|
}
|
|
1848
2354
|
// Handle date - transform to coerce.date
|
|
1849
2355
|
if (hasZodType(schema, 'date')) {
|
|
1850
2356
|
// Always transform to coerce.date for DTOs (API/WebSocket/Queue communication)
|
|
1851
2357
|
// This allows string dates from JSON to be coerced to Date objects
|
|
1852
|
-
return z.coerce.date();
|
|
2358
|
+
return this.preserveSchemaMetadata(schema, z.coerce.date());
|
|
2359
|
+
}
|
|
2360
|
+
// Handle bigint - accept the on-wire/from-DB string form and coerce to bigint.
|
|
2361
|
+
//
|
|
2362
|
+
// z_money's `amount` is a z.bigint(); bigint never round-trips through JSON as a
|
|
2363
|
+
// bigint (it serializes as a string) and the Mongoose String-backed storage + a
|
|
2364
|
+
// getterless .lean()/toObject read also yield the raw string. Wrapping the
|
|
2365
|
+
// ORIGINAL schema in z.preprocess (instead of z.coerce.bigint()) preserves any
|
|
2366
|
+
// .min()/.max() checks compiled from z_money({ minAmount/maxAmount }). Non-string
|
|
2367
|
+
// inputs pass through untouched so an in-process bigint stays a bigint and any
|
|
2368
|
+
// genuinely-wrong type is still reported by the underlying strict bigint schema.
|
|
2369
|
+
if (hasZodType(schema, 'bigint')) {
|
|
2370
|
+
return this.preserveSchemaMetadata(schema, z.preprocess((value) => (typeof value === 'string' ? BigInt(value) : value), schema));
|
|
1853
2371
|
}
|
|
1854
2372
|
// Handle objects - transform dates in shape
|
|
1855
2373
|
if (isZodObject(schema)) {
|
|
@@ -1857,7 +2375,7 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
1857
2375
|
const transformedShape = {};
|
|
1858
2376
|
let didTransformAnyField = false;
|
|
1859
2377
|
for (const [fieldName, fieldSchema] of Object.entries(shape)) {
|
|
1860
|
-
const transformedFieldSchema = this.
|
|
2378
|
+
const transformedFieldSchema = this.applyNetworkBoundaryCoercion(fieldSchema);
|
|
1861
2379
|
transformedShape[fieldName] = transformedFieldSchema;
|
|
1862
2380
|
didTransformAnyField = didTransformAnyField || transformedFieldSchema !== fieldSchema;
|
|
1863
2381
|
}
|
|
@@ -1907,11 +2425,13 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
1907
2425
|
}
|
|
1908
2426
|
return schema;
|
|
1909
2427
|
}
|
|
1910
|
-
// Handle arrays - extract summary from array element schema
|
|
2428
|
+
// Handle arrays - extract summary from array element schema.
|
|
2429
|
+
// `withArrayElement` rather than `z.array(...)`, for the same reason as the two walkers above:
|
|
2430
|
+
// a fresh array carries none of the original's own `.min()` / `.max()` / `.length()` checks.
|
|
1911
2431
|
if (isZodArray(schema)) {
|
|
1912
2432
|
// ZodArray stores element schema in _def.element (not _def.type)
|
|
1913
2433
|
const elementSchema = getZodDefProperty(schema, 'element');
|
|
1914
|
-
return
|
|
2434
|
+
return withArrayElement(schema, this.extractSummaryFields(elementSchema));
|
|
1915
2435
|
}
|
|
1916
2436
|
// Handle optional/nullable/default wrappers - unwrap, extract, rewrap
|
|
1917
2437
|
if (isZodOptional(schema)) {
|
|
@@ -1924,18 +2444,25 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
1924
2444
|
}
|
|
1925
2445
|
if (isZodDefault(schema)) {
|
|
1926
2446
|
const innerSchema = getZodDefProperty(schema, 'innerType');
|
|
1927
|
-
|
|
1928
|
-
|
|
2447
|
+
// Per-parse re-read — see the note on the `stripBackendOnlyFields` default
|
|
2448
|
+
// branch: a materialized default freezes at DTO-build time (process start).
|
|
2449
|
+
return this.extractSummaryFields(innerSchema).default(() => getZodDefProperty(schema, 'defaultValue'));
|
|
1929
2450
|
}
|
|
1930
2451
|
// Handle objects - use ResourcesSummaryUtils.deriveSummarySchema
|
|
1931
2452
|
if (isZodObject(schema)) {
|
|
1932
2453
|
try {
|
|
1933
|
-
|
|
2454
|
+
// Pure summary-field extraction — NO network-boundary coercion here.
|
|
2455
|
+
// Network-boundary transposition (z.date() → z.coerce.date() AND
|
|
2456
|
+
// string-accepting z.bigint() for z_money amounts) is applied UNIFORMLY by
|
|
2457
|
+
// the caller (`buildAllOperationDtos`) over the fully-resolved summary
|
|
2458
|
+
// schema, mirroring how requestDto/responseDto/internalDto are coerced.
|
|
2459
|
+
// Coercing per-branch here is what let the discriminated-union branch (and
|
|
2460
|
+
// the no-summary-fields fallback) silently ship strict z.date()/z.bigint()
|
|
2461
|
+
// summary DTOs that reject ISO-string dates / bigint-as-string amounts.
|
|
2462
|
+
return ResourcesSummaryUtils.deriveSummarySchema(schema, {
|
|
1934
2463
|
includeId: true,
|
|
1935
2464
|
includeForeignKeys: false
|
|
1936
2465
|
});
|
|
1937
|
-
// Apply date coercion to summary schema
|
|
1938
|
-
return this.applyDateCoercion(summarySchema);
|
|
1939
2466
|
}
|
|
1940
2467
|
catch (error) {
|
|
1941
2468
|
throw new Error(`Failed to derive summary schema for object: ${error instanceof Error ? error.message : String(error)}`);
|
|
@@ -1988,6 +2515,10 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
1988
2515
|
continue;
|
|
1989
2516
|
}
|
|
1990
2517
|
const fieldName = this.getRelationshipObjectFieldName(relationship, relationship.resourceType2, relationship.cardinality2, registry);
|
|
2518
|
+
// DTO context placeholders are projection conveniences, not transport
|
|
2519
|
+
// addressability proof. Keep this broader than context-addressed mutation
|
|
2520
|
+
// eligibility: URL/backend/frontend runtime predicates separately require
|
|
2521
|
+
// composition nature, explicit FK metadata, and routing scope.
|
|
1991
2522
|
const isOneToOne = isOneToOneCardinality(relationship.cardinality2);
|
|
1992
2523
|
// Only add if field doesn't already exist (avoid conflicts)
|
|
1993
2524
|
if (!shape[fieldName]) {
|
|
@@ -2018,16 +2549,47 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
2018
2549
|
* @param dtoSchema - DTO schema (with z.coerce.date() fields)
|
|
2019
2550
|
* @returns Transformed object with Date objects
|
|
2020
2551
|
*/
|
|
2552
|
+
/**
|
|
2553
|
+
* Unwrap the pure field-MODIFIER wrappers (`optional` / `nullable` / `default`) to
|
|
2554
|
+
* reach the underlying schema, so a wrapped date field is still detected as a date
|
|
2555
|
+
* and a wrapped nested object/array is still recursed into.
|
|
2556
|
+
*
|
|
2557
|
+
* WHY: without this, `z.date().optional()` reports type `'optional'` (not `'date'`),
|
|
2558
|
+
* so its string value was never coerced to a `Date`, and an `.optional()`-wrapped
|
|
2559
|
+
* object was treated as a leaf. Nested/optional date fields — notably the collection
|
|
2560
|
+
* filter date ranges `{ startDate, endDate }` built on `z.date()` (NOT
|
|
2561
|
+
* `z.coerce.date()`) — therefore reached the DTO parse as strings and threw
|
|
2562
|
+
* `z.date()` validation. Stackable modifiers (`z.date().nullable().default()`) are
|
|
2563
|
+
* peeled in a bounded loop.
|
|
2564
|
+
*
|
|
2565
|
+
* DELIBERATELY does NOT unwrap `pipe` / `transform` / `readonly` / `catch`: those can
|
|
2566
|
+
* change the value's meaning (input vs output side), so treating their output schema
|
|
2567
|
+
* as their input would mis-coerce. They stay leaves exactly as before. (`z.coerce.date()`
|
|
2568
|
+
* reports type `'date'` directly, so it needs no unwrapping and keeps working.)
|
|
2569
|
+
*/
|
|
2570
|
+
static unwrapDateModifierWrappers(schema) {
|
|
2571
|
+
let current = schema;
|
|
2572
|
+
while (isZodOptional(current) || isZodNullable(current) || isZodDefault(current)) {
|
|
2573
|
+
const inner = getZodDefSchemaProperty(current, 'innerType');
|
|
2574
|
+
if (!inner)
|
|
2575
|
+
break;
|
|
2576
|
+
current = inner;
|
|
2577
|
+
}
|
|
2578
|
+
return current;
|
|
2579
|
+
}
|
|
2021
2580
|
static transformRequestDates(data, dtoSchema) {
|
|
2022
2581
|
if (!data || typeof data !== 'object') {
|
|
2023
2582
|
return data;
|
|
2024
2583
|
}
|
|
2584
|
+
// See through modifier wrappers so a wrapped array/object schema is still handled
|
|
2585
|
+
// (e.g. `z.array(...).optional()`, an `.optional()` nested object).
|
|
2586
|
+
const schema = this.unwrapDateModifierWrappers(dtoSchema);
|
|
2025
2587
|
// Handle arrays
|
|
2026
2588
|
if (Array.isArray(data)) {
|
|
2027
|
-
const zodType = getZodType(
|
|
2589
|
+
const zodType = getZodType(schema);
|
|
2028
2590
|
if (zodType === 'array') {
|
|
2029
2591
|
// ZodArray stores element schema in _def.element (not _def.type)
|
|
2030
|
-
const elementSchema = getZodDefProperty(
|
|
2592
|
+
const elementSchema = getZodDefProperty(schema, 'element');
|
|
2031
2593
|
if (elementSchema) {
|
|
2032
2594
|
return data.map(item => this.transformRequestDates(item, elementSchema));
|
|
2033
2595
|
}
|
|
@@ -2035,26 +2597,23 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
2035
2597
|
return data;
|
|
2036
2598
|
}
|
|
2037
2599
|
// Handle objects
|
|
2038
|
-
if (isZodObject(
|
|
2039
|
-
const shape = getZodObjectShape(
|
|
2600
|
+
if (isZodObject(schema)) {
|
|
2601
|
+
const shape = getZodObjectShape(schema);
|
|
2040
2602
|
const transformed = {};
|
|
2041
2603
|
for (const [key, value] of Object.entries(data)) {
|
|
2042
2604
|
const fieldSchema = shape[key];
|
|
2043
2605
|
if (fieldSchema) {
|
|
2044
|
-
//
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
else {
|
|
2052
|
-
transformed[key] = value;
|
|
2053
|
-
}
|
|
2606
|
+
// Unwrap modifier wrappers, then check if the underlying field is a date
|
|
2607
|
+
// (`z.date()` / `z.coerce.date()`, incl. `.optional()` / `.nullable()` /
|
|
2608
|
+
// `.default()` around them).
|
|
2609
|
+
const unwrappedField = this.unwrapDateModifierWrappers(fieldSchema);
|
|
2610
|
+
if (getZodType(unwrappedField) === 'date') {
|
|
2611
|
+
// Transform string to Date; leave existing Dates (and non-strings) alone.
|
|
2612
|
+
transformed[key] = typeof value === 'string' ? new Date(value) : value;
|
|
2054
2613
|
}
|
|
2055
2614
|
else {
|
|
2056
|
-
// Recursively transform nested objects/arrays
|
|
2057
|
-
transformed[key] = this.transformRequestDates(value,
|
|
2615
|
+
// Recursively transform nested objects/arrays (through their wrappers).
|
|
2616
|
+
transformed[key] = this.transformRequestDates(value, unwrappedField);
|
|
2058
2617
|
}
|
|
2059
2618
|
}
|
|
2060
2619
|
else {
|
|
@@ -2069,6 +2628,15 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
2069
2628
|
* Transform object dates from Date objects to ISO strings (for outgoing responses).
|
|
2070
2629
|
* Uses DTO schema to identify which fields are dates.
|
|
2071
2630
|
*
|
|
2631
|
+
* NO `transformResponseBigints` twin exists, BY DESIGN. This is date-specific
|
|
2632
|
+
* in-body normalization; the money-`bigint` leaf (the other network-boundary type)
|
|
2633
|
+
* is NOT normalized in the body — it stays a `bigint` in the serialized body and is
|
|
2634
|
+
* encoded to a decimal string at the JSON boundary by `BigInt.prototype.toJSON`
|
|
2635
|
+
* (`installBigIntJsonEncoding`, `@wildo-ai/zod-decorators`). A parallel body-walk for
|
|
2636
|
+
* bigint would be redundant with that `toJSON`. (Indeed, since `Date.prototype.toJSON`
|
|
2637
|
+
* also exists, this date walk is itself now largely belt-and-suspenders — kept as-is,
|
|
2638
|
+
* not extended.) Full mechanism map: `install-bigint-json-encoding.ts`.
|
|
2639
|
+
*
|
|
2072
2640
|
* @param data - Object to transform
|
|
2073
2641
|
* @param dtoSchema - DTO schema (with z.coerce.date() fields)
|
|
2074
2642
|
* @returns Transformed object with ISO string dates
|
|
@@ -2154,12 +2722,12 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
2154
2722
|
// For default operations with dataMode specified, select and wrap appropriately
|
|
2155
2723
|
if (effectiveDataMode === DataMode.SUMMARY && operation.summaryDto) {
|
|
2156
2724
|
return isListOrSearch
|
|
2157
|
-
? this.wrapInPaginationStructure(operation.summaryDto)
|
|
2725
|
+
? this.wrapInPaginationStructure(operation.summaryDto, operation.maxPaginatedResultPerPageLimit)
|
|
2158
2726
|
: operation.summaryDto;
|
|
2159
2727
|
}
|
|
2160
2728
|
if (effectiveDataMode === DataMode.CONTEXT && operation.contextDto) {
|
|
2161
2729
|
return isListOrSearch
|
|
2162
|
-
? this.wrapInPaginationStructure(operation.contextDto)
|
|
2730
|
+
? this.wrapInPaginationStructure(operation.contextDto, operation.maxPaginatedResultPerPageLimit)
|
|
2163
2731
|
: operation.contextDto;
|
|
2164
2732
|
}
|
|
2165
2733
|
// Default to responseDto for RAW mode or when specific DTOs are not available
|
|
@@ -2170,11 +2738,108 @@ export class ResourcesConfigOperationsDtosBuilderUtils {
|
|
|
2170
2738
|
* @param itemSchema - Schema for individual items
|
|
2171
2739
|
* @returns Pagination wrapper schema
|
|
2172
2740
|
*/
|
|
2173
|
-
static wrapInPaginationStructure(itemSchema) {
|
|
2741
|
+
static wrapInPaginationStructure(itemSchema, maxResultsPerPageLimit) {
|
|
2174
2742
|
return z.object({
|
|
2175
2743
|
data: z.array(itemSchema),
|
|
2176
|
-
pagination
|
|
2744
|
+
// The operation's ceiling, like every other pagination bound in the framework. `limit` echoes
|
|
2745
|
+
// the page size that was SERVED, so a bound stricter than the repository's turns a valid page
|
|
2746
|
+
// into a 500 — which is exactly what a hard-coded 100 here did to an operation declaring 200.
|
|
2747
|
+
pagination: createPaginationResponseMetadataSchema(maxResultsPerPageLimit)
|
|
2177
2748
|
});
|
|
2178
2749
|
}
|
|
2179
2750
|
}
|
|
2180
|
-
|
|
2751
|
+
/**
|
|
2752
|
+
* Derive the re-attach allowlist for a TRUSTED, in-process system write.
|
|
2753
|
+
*
|
|
2754
|
+
* The repository strict-parses every create/update against a client-shaped
|
|
2755
|
+
* request DTO that DROPS three classes of field: `.isBackendOnly()` fields, the
|
|
2756
|
+
* context-auto-populated FKs (`CONTEXT_AUTO_POPULATED_FIELD_IDENTIFIERS`, stripped
|
|
2757
|
+
* by name), and the verb-excluded fields (`.excludeFromCreate()` on CREATE /
|
|
2758
|
+
* `.excludeFromUpdate()` on UPDATE). On the HTTP path those are re-supplied AFTER
|
|
2759
|
+
* the strip — backend-only material never comes from the client, the context FKs
|
|
2760
|
+
* are injected from the URL-derived context / initiator identity by
|
|
2761
|
+
* `enrichDataWithContext`, and a client is simply not allowed to author the
|
|
2762
|
+
* verb-excluded fields (the server owns them).
|
|
2763
|
+
*
|
|
2764
|
+
* An in-process caller writing to a system resource has NEITHER context: the
|
|
2765
|
+
* payload IS the source of truth. Registration creating `USER_CREDENTIALS` with
|
|
2766
|
+
* `{ userId, passwordHash }` needs the FK + backend-only field to survive; an
|
|
2767
|
+
* OIDC re-login bumping an identity link's `.excludeFromUpdate()` `lastUsedAt`
|
|
2768
|
+
* needs the verb-excluded field to survive. Without help, the strip silently
|
|
2769
|
+
* drops them → a required-path Mongoose crash or silent data loss.
|
|
2770
|
+
*
|
|
2771
|
+
* This function returns exactly the subset of `payloadKeys` the strip would drop
|
|
2772
|
+
* for one of those legitimate reasons, so the trusted-write primitives
|
|
2773
|
+
* (`SystemAccessBackendService.createAsSystem` / `updateAsSystem` /
|
|
2774
|
+
* `updateManyAsSystem`) can forward it as `options.preserveServerInjectedFields`
|
|
2775
|
+
* and have the repository re-attach the values after the strip. Ordinary fields
|
|
2776
|
+
* are deliberately excluded — they parse normally, so re-attaching them would
|
|
2777
|
+
* bypass their own validation.
|
|
2778
|
+
*
|
|
2779
|
+
* PER-VERB EXCLUDE SEMANTICS (the `verb` argument):
|
|
2780
|
+
* - UPDATE / UPDATE_MANY: re-attach every `.excludeFromUpdate()` key the caller
|
|
2781
|
+
* authored. UPDATE is a partial `$set` (no default application), so an
|
|
2782
|
+
* explicitly-authored value is authoritative — this is the path that lets a
|
|
2783
|
+
* server-managed timestamp like `lastUsedAt` actually advance.
|
|
2784
|
+
* - CREATE: re-attach an `.excludeFromCreate()` key the caller authored ONLY
|
|
2785
|
+
* when the field has NO `.default()`. A defaulted excludeFromCreate field
|
|
2786
|
+
* (`createdAt`, `linkedAt`, …) is server-owned at creation and the
|
|
2787
|
+
* strip-then-default path is the intended source of truth; re-attaching a
|
|
2788
|
+
* caller value would let stale input clobber the fresh default. A caller with
|
|
2789
|
+
* a genuine need to override a defaulted field can still pass an explicit
|
|
2790
|
+
* `preserveServerInjectedFields`.
|
|
2791
|
+
*
|
|
2792
|
+
* The mandatory-discard fields (`_id` / `createdAt` / `updatedAt` / `deletedAt` /
|
|
2793
|
+
* `_version_db_doc`) are NEVER re-attached — they are force-removed before
|
|
2794
|
+
* validation and are unconditionally server-owned. This guard is what keeps the
|
|
2795
|
+
* UPDATE branch (which would otherwise match `.excludeFromUpdate()` `createdAt` /
|
|
2796
|
+
* `updatedAt`) honest.
|
|
2797
|
+
*
|
|
2798
|
+
* ANTI-SMUGGLING: this is safe ONLY because the primitives are reachable exclusively
|
|
2799
|
+
* from trusted engine code behind a fail-closed `systemAccessPolicy` opt-in — never
|
|
2800
|
+
* from an HTTP payload. Do NOT call this to re-attach fields from an untrusted
|
|
2801
|
+
* request; that would re-open the exact hole the strict parse closes.
|
|
2802
|
+
*
|
|
2803
|
+
* Polymorphic-safe: `getMergedObjectOrUnionShape` merges discriminated-union
|
|
2804
|
+
* variants and returns `{}` for a non-object schema (in which case only the
|
|
2805
|
+
* name-based context-FK detection applies — still correct for scope/audit FKs).
|
|
2806
|
+
*
|
|
2807
|
+
* @param mainSchema The resource's main Zod schema.
|
|
2808
|
+
* @param payloadKeys The keys actually present on the trusted write payload.
|
|
2809
|
+
* @param verb The write verb — selects `.excludeFromCreate()` vs
|
|
2810
|
+
* `.excludeFromUpdate()` detection (UPDATE_MANY ≡ UPDATE). The
|
|
2811
|
+
* write is always one of these, so the caller always knows it.
|
|
2812
|
+
* @returns The subset of `payloadKeys` that are backend-only, context-auto-populated,
|
|
2813
|
+
* or a legitimately-authored verb-excluded field.
|
|
2814
|
+
*/
|
|
2815
|
+
export function deriveTrustedSystemWritePreservedFields(mainSchema, payloadKeys, verb) {
|
|
2816
|
+
const backendOnlyFieldNames = new Set();
|
|
2817
|
+
// Verb-excluded fields the client-shaped DTO strips but a TRUSTED caller may
|
|
2818
|
+
// legitimately author (see PER-VERB EXCLUDE SEMANTICS above).
|
|
2819
|
+
const verbExcludedFieldNames = new Set();
|
|
2820
|
+
const shape = getMergedObjectOrUnionShape(mainSchema);
|
|
2821
|
+
for (const [fieldName, fieldSchema] of Object.entries(shape)) {
|
|
2822
|
+
if (isBackendOnlyField(fieldSchema)) {
|
|
2823
|
+
backendOnlyFieldNames.add(fieldName);
|
|
2824
|
+
}
|
|
2825
|
+
if (verb === CoreResourceOperation.CREATE) {
|
|
2826
|
+
// Defaulted excludeFromCreate fields are server-materialised at creation —
|
|
2827
|
+
// withhold them so the schema default wins over any (potentially stale) input.
|
|
2828
|
+
if (isExcludedFromCreate(fieldSchema) && !isZodDefault(fieldSchema)) {
|
|
2829
|
+
verbExcludedFieldNames.add(fieldName);
|
|
2830
|
+
}
|
|
2831
|
+
}
|
|
2832
|
+
else if (verb === CoreResourceOperation.UPDATE || verb === CoreResourceOperation.UPDATE_MANY) {
|
|
2833
|
+
if (isExcludedFromUpdate(fieldSchema)) {
|
|
2834
|
+
verbExcludedFieldNames.add(fieldName);
|
|
2835
|
+
}
|
|
2836
|
+
}
|
|
2837
|
+
}
|
|
2838
|
+
return payloadKeys.filter((key) =>
|
|
2839
|
+
// Never resurrect a mandatory-discard field (force-removed pre-validation).
|
|
2840
|
+
!createOrUpdateMandatoryDiscardFields.includes(key)
|
|
2841
|
+
&& (backendOnlyFieldNames.has(key)
|
|
2842
|
+
|| verbExcludedFieldNames.has(key)
|
|
2843
|
+
|| CONTEXT_AUTO_POPULATED_FIELD_IDENTIFIERS.includes(key)));
|
|
2844
|
+
}
|
|
2845
|
+
//# sourceMappingURL=resources-config-operations.dtos-builder.utils.js.map
|