@wildo-ai/saas-models 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/__tests__/setup.d.ts.map +1 -1
- package/dist/esm/_inspect.d.ts.map +1 -1
- package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-subject.shared.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications-context.schemas.d.ts +14 -10
- package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.js +4 -3
- package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.d.ts +0 -4
- package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.js +59 -17
- package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts +77 -21
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.js +85 -23
- package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.d.ts +4 -3
- package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.js +45 -0
- package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
- package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.schemas.js +7 -1
- package/dist/esm/billing/price.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product-behavior-policy.shared.schemas.js +52 -11
- package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-definition.shared.schemas.d.ts +2 -2
- package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts +2 -2
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.schemas.d.ts +2 -2
- package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.schemas.js +7 -3
- package/dist/esm/billing/product.shared.schemas.js.map +1 -1
- package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.js +15 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.schemas.d.ts +7 -3
- package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.schemas.js +22 -3
- package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
- package/dist/esm/charts/aggregation-query.shared.schemas.d.ts.map +1 -1
- package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +71 -2
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.js +20 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
- package/dist/esm/companion/shared-library-companion.shared.definitions.d.ts.map +1 -1
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +85 -0
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +157 -0
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +23 -0
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +56 -0
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +658 -26
- 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 +873 -27
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +104 -3
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
- package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts +54 -26
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js +132 -3
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts +17 -0
- package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/privacy.shared.schemas.js +27 -4
- package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts +82 -29
- package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.js +95 -29
- package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.js +12 -5
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts +21 -0
- package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.js +20 -0
- package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
- package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +7 -5
- package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.d.ts +8 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.js +29 -0
- package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
- package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +95 -17
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.js +86 -8
- package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +26 -26
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts +139 -3
- package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
- package/dist/esm/config/frontend/chart-registration-alignment.shared.js +151 -4
- package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
- package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
- package/dist/esm/config-authoring.entry.d.ts.map +1 -1
- package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +34 -0
- 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 +34 -0
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
- package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +45 -12
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
- package/dist/esm/external-data.exports.d.ts.map +1 -1
- package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +110 -58
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +183 -15
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts +15 -3
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js +32 -5
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
- package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +87 -7
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts +59 -0
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js +61 -0
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts +97 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js +41 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -0
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +205 -2
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +85 -1
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts +175 -0
- package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -0
- package/dist/esm/external-providers/frontend-provider-public-config.shared.js +207 -0
- package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -0
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +5 -28
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-capability.shared.schemas.js +4 -2
- package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts +28 -8
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js +15 -4
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts +165 -0
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js +39 -0
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts +338 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js +332 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts +178 -9
- package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-metadata.shared.schemas.js +181 -9
- package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts +7 -5
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.js +7 -5
- package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts +40 -0
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.js +80 -0
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -0
- package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/features/application-features.shared.resources-config.schemas.js +12 -0
- package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
- package/dist/esm/features/core-feature-definitions.shared.js +7 -1
- package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
- package/dist/esm/features/feature-builders.shared.d.ts +32 -0
- package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
- package/dist/esm/features/feature-builders.shared.js +32 -0
- package/dist/esm/features/feature-builders.shared.js.map +1 -1
- package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
- package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.js +12 -0
- package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts +73 -0
- package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -0
- package/dist/esm/files/file-remote-reference-link.shared.schemas.js +62 -0
- package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -0
- package/dist/esm/files/file-upload-grant.shared.schemas.d.ts +14 -2
- package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
- package/dist/esm/files/file-upload-grant.shared.schemas.js +44 -5
- package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
- package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/files/files.shared.schemas.d.ts +15 -8
- package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
- package/dist/esm/files/files.shared.schemas.js +15 -8
- package/dist/esm/files/files.shared.schemas.js.map +1 -1
- package/dist/esm/files/files.shared.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/actors.shared.schemas.js +3 -2
- package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agents.shared.schemas.d.ts +54 -5
- package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts +0 -3
- package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/deliberation.shared.schemas.js +0 -5
- package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts +14 -0
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js +40 -3
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +19 -0
- 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 +33 -0
- 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.map +1 -1
- package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts +14 -9
- 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 +14 -9
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js +3 -2
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows.shared.schemas.js +3 -2
- package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts +130 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js +153 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts +0 -3
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js +1 -4
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts +0 -16
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js +1 -17
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts +3 -3
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js +3 -3
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts +2 -8
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js +4 -15
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts +112 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js +113 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -0
- package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.utils.js +1 -0
- package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
- package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
- package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts +8 -0
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.d.ts +46 -0
- package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.js +49 -0
- package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts +320 -50
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js +137 -36
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
- package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
- package/dist/esm/index.d.ts +15 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +15 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
- package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +11 -2
- 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.map +1 -1
- package/dist/esm/notifications/email/email-template.shared.enums.d.ts +15 -0
- package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-template.shared.enums.js +15 -0
- package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js +19 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts +30 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js +65 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.d.ts +6 -4
- package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.js +6 -4
- package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.d.ts +167 -5
- package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.js +191 -6
- package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.d.ts +158 -0
- package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.js +200 -1
- package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
- 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 +13 -0
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.js +22 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts +26 -0
- package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.schemas.js +25 -0
- package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.d.ts +25 -0
- package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.js +42 -17
- package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts +3 -2
- package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.shared.js +9 -2
- package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
- package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +18 -3
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts +13 -0
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js +13 -0
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
- package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
- package/dist/esm/public-runtime/index.d.ts +71 -2
- package/dist/esm/public-runtime/index.d.ts.map +1 -1
- package/dist/esm/public-runtime/index.js +62 -1
- package/dist/esm/public-runtime/index.js.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts +6 -5
- package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.js +6 -5
- package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.d.ts +16 -3
- package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.js +16 -3
- package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
- package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
- package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-documentation.d.ts +137 -0
- package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -0
- package/dist/esm/requests/manual-controllers-routes-documentation.js +1255 -0
- package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -0
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts +114 -0
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.js +129 -0
- package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.d.ts +11 -1
- package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.js +11 -1
- package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.d.ts +28 -3
- package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.js +52 -0
- package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
- package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.d.ts +1 -0
- package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.js +203 -25
- package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.d.ts +297 -68
- package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources-registry.shared.core.definitions.js +151 -5
- package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
- package/dist/esm/resources/resources-relationships.shared.factory.js +15 -0
- package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.d.ts +54 -0
- package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.js +69 -0
- package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.d.ts +11 -2
- package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.js +34 -3
- package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources.shared.utils.d.ts +32 -7
- package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.utils.js +32 -7
- package/dist/esm/resources/resources.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts +51 -0
- package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -0
- package/dist/esm/resources/utils/field-value-disclosure.utils.js +53 -0
- package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -0
- package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-summary.utils.d.ts +16 -2
- package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-summary.utils.js +19 -5
- package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
- package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/shared-persistence-collection.utils.js +11 -0
- package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
- package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.shared.definitions.d.ts +25 -0
- package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
- package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +38 -0
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +38 -0
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +5 -12
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +0 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.d.ts +84 -5
- package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.js +83 -3
- package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts +1 -0
- package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/registration.shared.dto.schemas.js +11 -0
- package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts +15 -0
- 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 +21 -4
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts +61 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +238 -6
- 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 -27
- 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 +134 -12
- 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.map +1 -1
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +2 -6
- 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 +32 -8
- 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 +45 -2
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js +45 -2
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts +35 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js +257 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts +143 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js +219 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js +27 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts +75 -7
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js +69 -8
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +31 -0
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js +198 -0
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts +31 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js +191 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +307 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +530 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -0
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts +4 -1
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js +29 -0
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts +4 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js +29 -0
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts +6 -0
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js +31 -0
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts +13 -0
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js +24 -3
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -1
- package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
- package/dist/esm/testing.d.ts.map +1 -1
- package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +4 -4
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +4 -4
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
- 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 +33 -3
- 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 +17 -1
- package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.resources-config.schemas.js +136 -5
- package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/users.shared.schemas.d.ts +60 -13
- package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.schemas.js +56 -9
- package/dist/esm/users/users.shared.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How an APPLICATION supplies a frontend provider's public configuration — the
|
|
3
|
+
* keys a picker needs that only the application can know (a Drive `appId`, a
|
|
4
|
+
* OneDrive `clientId`) — and the two guards that keep that channel from
|
|
5
|
+
* carrying anything else.
|
|
6
|
+
*
|
|
7
|
+
* ## The gap this closes
|
|
8
|
+
*
|
|
9
|
+
* A frontend provider's `publicConfig` was HARD-CODED on the engine's provider
|
|
10
|
+
* module and projected verbatim onto the wire. The only way to set a picker's
|
|
11
|
+
* `appId` was to edit engine code. The backend never had that problem: an
|
|
12
|
+
* application authors `providerConfigurations[providerRef][protocolKind]` in
|
|
13
|
+
* `wildo.saas.config.ts`, and SSO's public OAuth client id already travels that
|
|
14
|
+
* way, keyed by the protocol (`sso_oauth2`).
|
|
15
|
+
*
|
|
16
|
+
* This file gives the frontend the same channel, keyed by the same vocabulary:
|
|
17
|
+
* `providerConfigurations[providerRef][frontend_sdk]`. One authority for
|
|
18
|
+
* "what an application configured for this provider", read by both sides.
|
|
19
|
+
*
|
|
20
|
+
* ## Two guards, because `publicConfig` is served to every browser
|
|
21
|
+
*
|
|
22
|
+
* 1. **Only DECLARED keys cross.** A provider module declares the keys it reads
|
|
23
|
+
* (`publicConfigSchema` — see `defineFrontendPublicConfigSchema` below, which
|
|
24
|
+
* is what makes those keys READABLE without running the schema). A key the
|
|
25
|
+
* module never declared is refused with the provider and key named, at the
|
|
26
|
+
* two places the overlay runs: `wildo config sync` and the backend's
|
|
27
|
+
* fallback projection. A misspelled `apiId` therefore fails where it was
|
|
28
|
+
* typed, instead of silently contributing nothing and leaving a picker that
|
|
29
|
+
* reports "no appId" at the moment a user opens it.
|
|
30
|
+
*
|
|
31
|
+
* 2. **A secret never crosses.** A frontend provider owns no secrets by
|
|
32
|
+
* construction (`secretsContractShape: []`), so the only way one reaches a
|
|
33
|
+
* browser is an author typing the BACKEND module's secret into the frontend
|
|
34
|
+
* bag. The overlay refuses any key whose name matches a slug or an
|
|
35
|
+
* environment-variable name from the same vendor's backend secrets
|
|
36
|
+
* contract — `GOOGLE_OAUTH2_CLIENT_SECRET` cannot be typed into the bag that
|
|
37
|
+
* every visitor downloads.
|
|
38
|
+
*
|
|
39
|
+
* Both guards are decisions about NAMES, so they run wherever the names are
|
|
40
|
+
* known and need no schema execution. Value VALIDATION (is `appId` a string?)
|
|
41
|
+
* is the schema's job and runs where the schema is: at hydration (FE-8) and, on
|
|
42
|
+
* the backend fallback, before serving.
|
|
43
|
+
*
|
|
44
|
+
* ## Why the overlay is a pure function in this package
|
|
45
|
+
*
|
|
46
|
+
* It has THREE call sites that must agree — the companion walk in
|
|
47
|
+
* `platform-config-lib`, the backend fallback in `saas-backend-lib`, and any
|
|
48
|
+
* future producer of a `FrontendProviderEntry` — and #380 already paid once for
|
|
49
|
+
* a projection that landed on one site and not another. A function both import
|
|
50
|
+
* cannot be applied differently by each.
|
|
51
|
+
*/
|
|
52
|
+
import { ExternalProvider_ExchangeProtocol_Kind } from '@wildo-ai/external-connectors-models';
|
|
53
|
+
/**
|
|
54
|
+
* The key under `providerConfigurations[providerRef]` an application uses to
|
|
55
|
+
* supply a frontend provider's public configuration.
|
|
56
|
+
*
|
|
57
|
+
* The protocol kind, exactly as SSO's channel is keyed by ITS protocol kind
|
|
58
|
+
* (`sso_oauth2`): the bag is per-provider, per-protocol, and a frontend module
|
|
59
|
+
* speaks `FRONTEND_SDK`. Not a new literal — the enum member is the one source.
|
|
60
|
+
*/
|
|
61
|
+
export const FRONTEND_PROVIDER_PUBLIC_CONFIG_KEY = ExternalProvider_ExchangeProtocol_Kind.FRONTEND_SDK;
|
|
62
|
+
/** Why an application-supplied public-config bag was refused. */
|
|
63
|
+
export var FrontendProviderPublicConfigRefusal;
|
|
64
|
+
(function (FrontendProviderPublicConfigRefusal) {
|
|
65
|
+
/** A key the provider module does not declare — almost always a misspelling. */
|
|
66
|
+
FrontendProviderPublicConfigRefusal["UNDECLARED_KEY"] = "UNDECLARED_KEY";
|
|
67
|
+
/** A key naming a secret from the same vendor's backend contract. Never negotiable. */
|
|
68
|
+
FrontendProviderPublicConfigRefusal["SECRET_KEY"] = "SECRET_KEY";
|
|
69
|
+
/** The supplied bag is not a plain object — a string, an array, `null`. */
|
|
70
|
+
FrontendProviderPublicConfigRefusal["NOT_AN_OBJECT"] = "NOT_AN_OBJECT";
|
|
71
|
+
})(FrontendProviderPublicConfigRefusal || (FrontendProviderPublicConfigRefusal = {}));
|
|
72
|
+
export class FrontendProviderPublicConfigError extends Error {
|
|
73
|
+
providerRef;
|
|
74
|
+
refusal;
|
|
75
|
+
keys;
|
|
76
|
+
constructor(providerRef, refusal, keys, message) {
|
|
77
|
+
super(message);
|
|
78
|
+
this.providerRef = providerRef;
|
|
79
|
+
this.refusal = refusal;
|
|
80
|
+
this.keys = keys;
|
|
81
|
+
this.name = 'FrontendProviderPublicConfigError';
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Merges what the application supplied over what the module authored, refusing
|
|
86
|
+
* the two classes of key that must never reach a browser.
|
|
87
|
+
*
|
|
88
|
+
* Supplied values WIN over authored ones for the same key: the module's value is
|
|
89
|
+
* a default, and an application that names a key means it. Absent `supplied`
|
|
90
|
+
* returns the authored bag untouched — an application that configured nothing
|
|
91
|
+
* is the ordinary case, not a refusal.
|
|
92
|
+
*/
|
|
93
|
+
export function overlayFrontendProviderPublicConfig(input) {
|
|
94
|
+
const { providerRef, authored, supplied, declaredKeys, forbiddenKeys } = input;
|
|
95
|
+
if (supplied === undefined)
|
|
96
|
+
return authored;
|
|
97
|
+
if (typeof supplied !== 'object' || supplied === null || Array.isArray(supplied)) {
|
|
98
|
+
throw new FrontendProviderPublicConfigError(providerRef, FrontendProviderPublicConfigRefusal.NOT_AN_OBJECT, [], `providerConfigurations.${providerRef}.${FRONTEND_PROVIDER_PUBLIC_CONFIG_KEY} must be an object of public `
|
|
99
|
+
+ `keys, got ${Array.isArray(supplied) ? 'an array' : typeof supplied}.`);
|
|
100
|
+
}
|
|
101
|
+
const suppliedKeys = Object.keys(supplied);
|
|
102
|
+
// Guard 2 runs FIRST and unconditionally: a secret is refused even when the
|
|
103
|
+
// module has no introspectable schema, because that is not the module's call.
|
|
104
|
+
const secretKeys = suppliedKeys.filter((key) => forbiddenKeys.has(key));
|
|
105
|
+
if (secretKeys.length > 0) {
|
|
106
|
+
throw new FrontendProviderPublicConfigError(providerRef, FrontendProviderPublicConfigRefusal.SECRET_KEY, secretKeys, `providerConfigurations.${providerRef}.${FRONTEND_PROVIDER_PUBLIC_CONFIG_KEY} names ${secretKeys.map((key) => `"${key}"`).join(', ')}, `
|
|
107
|
+
+ `which is a SECRET of the "${providerRef}" backend provider. A frontend provider's public configuration is `
|
|
108
|
+
+ 'served to every browser; a secret belongs in the deployment environment under its `envVarName`, and '
|
|
109
|
+
+ 'nowhere else.');
|
|
110
|
+
}
|
|
111
|
+
if (declaredKeys !== undefined) {
|
|
112
|
+
const declared = new Set(declaredKeys);
|
|
113
|
+
const undeclared = suppliedKeys.filter((key) => !declared.has(key));
|
|
114
|
+
if (undeclared.length > 0) {
|
|
115
|
+
throw new FrontendProviderPublicConfigError(providerRef, FrontendProviderPublicConfigRefusal.UNDECLARED_KEY, undeclared, `providerConfigurations.${providerRef}.${FRONTEND_PROVIDER_PUBLIC_CONFIG_KEY} names ${undeclared.map((key) => `"${key}"`).join(', ')}, `
|
|
116
|
+
+ `which the "${providerRef}" frontend provider does not declare. It declares: `
|
|
117
|
+
+ `${declaredKeys.length > 0 ? declaredKeys.map((key) => `"${key}"`).join(', ') : '(nothing)'}. `
|
|
118
|
+
+ 'A key the provider never reads would be served to every browser and used by nothing.');
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return { ...(authored ?? {}), ...supplied };
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* The value kinds a public-config key may declare. Scalars only, on purpose: a
|
|
125
|
+
* public key is an identifier or a flag, and a structured value here is a
|
|
126
|
+
* design smell — a provider that needs one has a capability-level shape
|
|
127
|
+
* (`FrontendFilePickerPublicConfigSchema`) to declare it in.
|
|
128
|
+
*/
|
|
129
|
+
export var FrontendPublicConfigValueKind;
|
|
130
|
+
(function (FrontendPublicConfigValueKind) {
|
|
131
|
+
FrontendPublicConfigValueKind["STRING"] = "string";
|
|
132
|
+
FrontendPublicConfigValueKind["NUMBER"] = "number";
|
|
133
|
+
FrontendPublicConfigValueKind["BOOLEAN"] = "boolean";
|
|
134
|
+
})(FrontendPublicConfigValueKind || (FrontendPublicConfigValueKind = {}));
|
|
135
|
+
/**
|
|
136
|
+
* Declares a frontend provider's public-config keys ONCE and gets both halves:
|
|
137
|
+
* a strict Standard Schema v1 validator (the CODE half hydration runs) and the
|
|
138
|
+
* key list (the DATA half the companion walk reads).
|
|
139
|
+
*
|
|
140
|
+
* Dependency-free by design. It lives here because the engine's provider modules
|
|
141
|
+
* live in `@wildo-ai/external-connectors-public`, whose bare-specifier allow-list
|
|
142
|
+
* holds exactly one entry — this package's `/public-runtime` — so those modules
|
|
143
|
+
* can declare a schema without that package growing a validation library. An
|
|
144
|
+
* application module may still use Zod (a Zod object satisfies Standard Schema
|
|
145
|
+
* and its `shape` keys are read the same way).
|
|
146
|
+
*
|
|
147
|
+
* Strict: an unknown key is an issue, never ignored. Silently ignoring is the
|
|
148
|
+
* defect FE-8 closed — a renamed key yielding `undefined` and a picker that
|
|
149
|
+
* accepts more than it should with no error anywhere.
|
|
150
|
+
*/
|
|
151
|
+
export function defineFrontendPublicConfigSchema(keys) {
|
|
152
|
+
const declaredKeys = Object.freeze(Object.keys(keys));
|
|
153
|
+
return {
|
|
154
|
+
declaredKeys,
|
|
155
|
+
'~standard': {
|
|
156
|
+
version: 1,
|
|
157
|
+
vendor: 'wildo',
|
|
158
|
+
validate(value) {
|
|
159
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
160
|
+
return { issues: [{ message: 'public configuration must be an object' }] };
|
|
161
|
+
}
|
|
162
|
+
const record = value;
|
|
163
|
+
const issues = [];
|
|
164
|
+
for (const key of Object.keys(record)) {
|
|
165
|
+
if (!(key in keys))
|
|
166
|
+
issues.push({ message: 'unknown key', path: [key] });
|
|
167
|
+
}
|
|
168
|
+
for (const [key, spec] of Object.entries(keys)) {
|
|
169
|
+
const present = record[key];
|
|
170
|
+
if (present === undefined) {
|
|
171
|
+
if (spec.required === true)
|
|
172
|
+
issues.push({ message: 'required', path: [key] });
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
if (typeof present !== spec.kind) {
|
|
176
|
+
issues.push({ message: `expected a ${spec.kind}, got ${typeof present}`, path: [key] });
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return issues.length > 0 ? { issues } : { value: record };
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Reads the declared keys off a provider's `publicConfigSchema`, whatever
|
|
186
|
+
* library produced it.
|
|
187
|
+
*
|
|
188
|
+
* Two shapes are recognised, and the order matters: a schema built by
|
|
189
|
+
* `defineFrontendPublicConfigSchema` states its keys outright; a Zod object
|
|
190
|
+
* exposes them as `shape`. Anything else — a hand-written Standard Schema, a
|
|
191
|
+
* library without introspection — yields `undefined`, which the overlay reads
|
|
192
|
+
* as "cannot enforce here" rather than as "declares nothing". That distinction
|
|
193
|
+
* is load-bearing: an empty list refuses EVERY supplied key.
|
|
194
|
+
*/
|
|
195
|
+
export function readDeclaredPublicConfigKeys(schema) {
|
|
196
|
+
if (typeof schema !== 'object' || schema === null)
|
|
197
|
+
return undefined;
|
|
198
|
+
const candidate = schema;
|
|
199
|
+
if (Array.isArray(candidate.declaredKeys) && candidate.declaredKeys.every((key) => typeof key === 'string')) {
|
|
200
|
+
return candidate.declaredKeys;
|
|
201
|
+
}
|
|
202
|
+
if (typeof candidate.shape === 'object' && candidate.shape !== null) {
|
|
203
|
+
return Object.keys(candidate.shape);
|
|
204
|
+
}
|
|
205
|
+
return undefined;
|
|
206
|
+
}
|
|
207
|
+
//# sourceMappingURL=frontend-provider-public-config.shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontend-provider-public-config.shared.js","sourceRoot":"","sources":["../../../src/external-providers/frontend-provider-public-config.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,OAAO,EAAE,sCAAsC,EAAE,MAAM,sCAAsC,CAAC;AAE9F;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAW,sCAAsC,CAAC,YAAY,CAAC;AAE/G,iEAAiE;AACjE,MAAM,CAAN,IAAY,mCAOX;AAPD,WAAY,mCAAmC;IAC7C,gFAAgF;IAChF,wEAAiC,CAAA;IACjC,uFAAuF;IACvF,gEAAyB,CAAA;IACzB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ider's public configuration — the\n * keys a picker needs that only the application can know (a Drive `appId`, a\n * OneDrive `clientId`) — and the two guards that keep that channel from\n * carrying anything else.\n *\n * ## The gap this closes\n *\n * A frontend provider's `publicConfig` was HARD-CODED on the engine's provider\n * module and projected verbatim onto the wire. The only way to set a picker's\n * `appId` was to edit engine code. The backend never had that problem: an\n * application authors `providerConfigurations[providerRef][protocolKind]` in\n * `wildo.saas.config.ts`, and SSO's public OAuth client id already travels that\n * way, keyed by the protocol (`sso_oauth2`).\n *\n * This file gives the frontend the same channel, keyed by the same vocabulary:\n * `providerConfigurations[providerRef][frontend_sdk]`. One authority for\n * \"what an application configured for this provider\", read by both sides.\n *\n * ## Two guards, because `publicConfig` is served to every browser\n *\n * 1. **Only DECLARED keys cross.** A provider module declares the keys it reads\n * (`publicConfigSchema` — see `defineFrontendPublicConfigSchema` below, which\n * is what makes those keys READABLE without running the schema). A key the\n * module never declared is refused with the provider and key named, at the\n * two places the overlay runs: `wildo config sync` and the backend's\n * fallback projection. A misspelled `apiId` therefore fails where it was\n * typed, instead of silently contributing nothing and leaving a picker that\n * reports \"no appId\" at the moment a user opens it.\n *\n * 2. **A secret never crosses.** A frontend provider owns no secrets by\n * construction (`secretsContractShape: []`), so the only way one reaches a\n * browser is an author typing the BACKEND module's secret into the frontend\n * bag. The overlay refuses any key whose name matches a slug or an\n * environment-variable name from the same vendor's backend secrets\n * contract — `GOOGLE_OAUTH2_CLIENT_SECRET` cannot be typed into the bag that\n * every visitor downloads.\n *\n * Both guards are decisions about NAMES, so they run wherever the names are\n * known and need no schema execution. Value VALIDATION (is `appId` a string?)\n * is the schema's job and runs where the schema is: at hydration (FE-8) and, on\n * the backend fallback, before serving.\n *\n * ## Why the overlay is a pure function in this package\n *\n * It has THREE call sites that must agree — the companion walk in\n * `platform-config-lib`, the backend fallback in `saas-backend-lib`, and any\n * future producer of a `FrontendProviderEntry` — and #380 already paid once for\n * a projection that landed on one site and not another. A function both import\n * cannot be applied differently by each.\n */\n\nimport { ExternalProvider_ExchangeProtocol_Kind } from '@wildo-ai/external-connectors-models';\n\n/**\n * The key under `providerConfigurations[providerRef]` an application uses to\n * supply a frontend provider's public configuration.\n *\n * The protocol kind, exactly as SSO's channel is keyed by ITS protocol kind\n * (`sso_oauth2`): the bag is per-provider, per-protocol, and a frontend module\n * speaks `FRONTEND_SDK`. Not a new literal — the enum member is the one source.\n */\nexport const FRONTEND_PROVIDER_PUBLIC_CONFIG_KEY: string = ExternalProvider_ExchangeProtocol_Kind.FRONTEND_SDK;\n\n/** Why an application-supplied public-config bag was refused. */\nexport enum FrontendProviderPublicConfigRefusal {\n /** A key the provider module does not declare — almost always a misspelling. */\n UNDECLARED_KEY = 'UNDECLARED_KEY',\n /** A key naming a secret from the same vendor's backend contract. Never negotiable. */\n SECRET_KEY = 'SECRET_KEY',\n /** The supplied bag is not a plain object — a string, an array, `null`. */\n NOT_AN_OBJECT = 'NOT_AN_OBJECT',\n}\n\nexport class FrontendProviderPublicConfigError extends Error {\n constructor(\n readonly providerRef: string,\n readonly refusal: FrontendProviderPublicConfigRefusal,\n readonly keys: readonly string[],\n message: string,\n ) {\n super(message);\n this.name = 'FrontendProviderPublicConfigError';\n }\n}\n\nexport interface OverlayFrontendProviderPublicConfigInput {\n readonly providerRef: string;\n /** What the provider module authored — its own defaults, e.g. `{ authProviderRef: 'google' }`. */\n readonly authored: Readonly<Record<string, unknown>> | undefined;\n /** What the application supplied under `providerConfigurations[providerRef][frontend_sdk]`. */\n readonly supplied: unknown;\n /**\n * The keys the provider module declares it reads. `undefined` means the\n * module declared no introspectable schema, so guard 1 cannot run HERE and\n * hydration's validation is the gate; an empty array means the module\n * declares it reads NOTHING, so every supplied key is refused.\n */\n readonly declaredKeys: readonly string[] | undefined;\n /** Slugs and environment-variable names of the same vendor's backend secrets. */\n readonly forbiddenKeys: ReadonlySet<string>;\n}\n\n/**\n * Merges what the application supplied over what the module authored, refusing\n * the two classes of key that must never reach a browser.\n *\n * Supplied values WIN over authored ones for the same key: the module's value is\n * a default, and an application that names a key means it. Absent `supplied`\n * returns the authored bag untouched — an application that configured nothing\n * is the ordinary case, not a refusal.\n */\nexport function overlayFrontendProviderPublicConfig(\n input: OverlayFrontendProviderPublicConfigInput,\n): Readonly<Record<string, unknown>> | undefined {\n const { providerRef, authored, supplied, declaredKeys, forbiddenKeys } = input;\n\n if (supplied === undefined) return authored;\n\n if (typeof supplied !== 'object' || supplied === null || Array.isArray(supplied)) {\n throw new FrontendProviderPublicConfigError(\n providerRef,\n FrontendProviderPublicConfigRefusal.NOT_AN_OBJECT,\n [],\n `providerConfigurations.${providerRef}.${FRONTEND_PROVIDER_PUBLIC_CONFIG_KEY} must be an object of public `\n + `keys, got ${Array.isArray(supplied) ? 'an array' : typeof supplied}.`,\n );\n }\n\n const suppliedKeys = Object.keys(supplied);\n\n // Guard 2 runs FIRST and unconditionally: a secret is refused even when the\n // module has no introspectable schema, because that is not the module's call.\n const secretKeys = suppliedKeys.filter((key) => forbiddenKeys.has(key));\n if (secretKeys.length > 0) {\n throw new FrontendProviderPublicConfigError(\n providerRef,\n FrontendProviderPublicConfigRefusal.SECRET_KEY,\n secretKeys,\n `providerConfigurations.${providerRef}.${FRONTEND_PROVIDER_PUBLIC_CONFIG_KEY} names ${secretKeys.map((key) => `\"${key}\"`).join(', ')}, `\n + `which is a SECRET of the \"${providerRef}\" backend provider. A frontend provider's public configuration is `\n + 'served to every browser; a secret belongs in the deployment environment under its `envVarName`, and '\n + 'nowhere else.',\n );\n }\n\n if (declaredKeys !== undefined) {\n const declared = new Set(declaredKeys);\n const undeclared = suppliedKeys.filter((key) => !declared.has(key));\n if (undeclared.length > 0) {\n throw new FrontendProviderPublicConfigError(\n providerRef,\n FrontendProviderPublicConfigRefusal.UNDECLARED_KEY,\n undeclared,\n `providerConfigurations.${providerRef}.${FRONTEND_PROVIDER_PUBLIC_CONFIG_KEY} names ${undeclared.map((key) => `\"${key}\"`).join(', ')}, `\n + `which the \"${providerRef}\" frontend provider does not declare. It declares: `\n + `${declaredKeys.length > 0 ? declaredKeys.map((key) => `\"${key}\"`).join(', ') : '(nothing)'}. `\n + 'A key the provider never reads would be served to every browser and used by nothing.',\n );\n }\n }\n\n return { ...(authored ?? {}), ...(supplied as Record<string, unknown>) };\n}\n\n/**\n * The value kinds a public-config key may declare. Scalars only, on purpose: a\n * public key is an identifier or a flag, and a structured value here is a\n * design smell — a provider that needs one has a capability-level shape\n * (`FrontendFilePickerPublicConfigSchema`) to declare it in.\n */\nexport enum FrontendPublicConfigValueKind {\n STRING = 'string',\n NUMBER = 'number',\n BOOLEAN = 'boolean',\n}\n\nexport interface FrontendPublicConfigKeySpec {\n readonly kind: FrontendPublicConfigValueKind;\n /** Absent = optional. Picker keys are usually optional: a missing one is reported when the picker opens, not by dropping the provider. */\n readonly required?: boolean;\n /** For the person writing `wildo.saas.config.ts`. Not validated; surfaced in refusals. */\n readonly description?: string;\n}\n\n/** A Standard Schema v1 validator that ALSO says which keys it declares. */\nexport interface FrontendPublicConfigSchema<TOutput = Readonly<Record<string, unknown>>> {\n readonly '~standard': {\n readonly version: 1;\n readonly vendor: 'wildo';\n validate(value: unknown):\n | { readonly value: TOutput }\n | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray<PropertyKey> }> };\n };\n /**\n * The keys this schema admits, readable without running it.\n *\n * This is the DATA half of the declaration, and it is why this helper exists\n * rather than \"use Zod\": Standard Schema v1 exposes `validate` and nothing\n * else, so a schema alone cannot tell the companion walk which keys an\n * application may supply — and the walk runs in Node, from a projected\n * contribution, without the module. `projectFrontendProviderContribution`\n * mirrors this list onto the entry as `publicConfigKeys`.\n */\n readonly declaredKeys: readonly string[];\n}\n\n/**\n * Declares a frontend provider's public-config keys ONCE and gets both halves:\n * a strict Standard Schema v1 validator (the CODE half hydration runs) and the\n * key list (the DATA half the companion walk reads).\n *\n * Dependency-free by design. It lives here because the engine's provider modules\n * live in `@wildo-ai/external-connectors-public`, whose bare-specifier allow-list\n * holds exactly one entry — this package's `/public-runtime` — so those modules\n * can declare a schema without that package growing a validation library. An\n * application module may still use Zod (a Zod object satisfies Standard Schema\n * and its `shape` keys are read the same way).\n *\n * Strict: an unknown key is an issue, never ignored. Silently ignoring is the\n * defect FE-8 closed — a renamed key yielding `undefined` and a picker that\n * accepts more than it should with no error anywhere.\n */\nexport function defineFrontendPublicConfigSchema(\n keys: Readonly<Record<string, FrontendPublicConfigKeySpec>>,\n): FrontendPublicConfigSchema {\n const declaredKeys = Object.freeze(Object.keys(keys));\n\n return {\n declaredKeys,\n '~standard': {\n version: 1,\n vendor: 'wildo',\n validate(value: unknown) {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n return { issues: [{ message: 'public configuration must be an object' }] };\n }\n const record = value as Record<string, unknown>;\n const issues: Array<{ message: string; path?: PropertyKey[] }> = [];\n\n for (const key of Object.keys(record)) {\n if (!(key in keys)) issues.push({ message: 'unknown key', path: [key] });\n }\n for (const [key, spec] of Object.entries(keys)) {\n const present = record[key];\n if (present === undefined) {\n if (spec.required === true) issues.push({ message: 'required', path: [key] });\n continue;\n }\n if (typeof present !== spec.kind) {\n issues.push({ message: `expected a ${spec.kind}, got ${typeof present}`, path: [key] });\n }\n }\n\n return issues.length > 0 ? { issues } : { value: record };\n },\n },\n };\n}\n\n/**\n * Reads the declared keys off a provider's `publicConfigSchema`, whatever\n * library produced it.\n *\n * Two shapes are recognised, and the order matters: a schema built by\n * `defineFrontendPublicConfigSchema` states its keys outright; a Zod object\n * exposes them as `shape`. Anything else — a hand-written Standard Schema, a\n * library without introspection — yields `undefined`, which the overlay reads\n * as \"cannot enforce here\" rather than as \"declares nothing\". That distinction\n * is load-bearing: an empty list refuses EVERY supplied key.\n */\nexport function readDeclaredPublicConfigKeys(schema: unknown): readonly string[] | undefined {\n if (typeof schema !== 'object' || schema === null) return undefined;\n const candidate = schema as { declaredKeys?: unknown; shape?: unknown };\n if (Array.isArray(candidate.declaredKeys) && candidate.declaredKeys.every((key) => typeof key === 'string')) {\n return candidate.declaredKeys as readonly string[];\n }\n if (typeof candidate.shape === 'object' && candidate.shape !== null) {\n return Object.keys(candidate.shape as Record<string, unknown>);\n }\n return undefined;\n}\n"]}
|
|
@@ -20,8 +20,10 @@
|
|
|
20
20
|
* Authoring rule: keep this list narrow and stable. Adding a new
|
|
21
21
|
* built-in capability is a framework-level decision (it implies the
|
|
22
22
|
* engine knows how to consume the capability via a transformer or a
|
|
23
|
-
* platform binding)
|
|
24
|
-
*
|
|
23
|
+
* platform binding). There is no app-side extension point: an application
|
|
24
|
+
* needing a capability this vocabulary does not name is a decision to widen
|
|
25
|
+
* the vocabulary, taken with the resolution path that would make it mean
|
|
26
|
+
* something (#502).
|
|
25
27
|
*/
|
|
26
28
|
export declare const BUILTIN_PROVIDER_CAPABILITY: {
|
|
27
29
|
readonly EMAIL_TRANSACTIONAL: "EMAIL_TRANSACTIONAL";
|
|
@@ -102,35 +104,10 @@ export declare const BUILTIN_PROVIDER_CAPABILITY: {
|
|
|
102
104
|
};
|
|
103
105
|
/** @wildo_source:part:end saas.models.provider-capabilities */
|
|
104
106
|
export type BuiltinProviderCapability = (typeof BUILTIN_PROVIDER_CAPABILITY)[keyof typeof BUILTIN_PROVIDER_CAPABILITY];
|
|
105
|
-
/**
|
|
106
|
-
* Open extension point — apps augment via TypeScript module augmentation
|
|
107
|
-
* inside their `wildo.saas.config.ts`. See analysis §10 Q2 for the
|
|
108
|
-
* design decision (no `app.d.ts` file; declaration merging happens
|
|
109
|
-
* inline in the saas config so the surface is co-located with the
|
|
110
|
-
* authored configuration).
|
|
111
|
-
*
|
|
112
|
-
* Example app-side augmentation:
|
|
113
|
-
*
|
|
114
|
-
* ```ts
|
|
115
|
-
* declare module '@wildo-ai/saas-models' {
|
|
116
|
-
* interface AppCustomProviderCapabilities {
|
|
117
|
-
* 'live-chat-handoff': true;
|
|
118
|
-
* 'search-index': true;
|
|
119
|
-
* }
|
|
120
|
-
* }
|
|
121
|
-
* ```
|
|
122
|
-
*
|
|
123
|
-
* Phase 3.d (per the implementation plan) wires this augmentation point
|
|
124
|
-
* into `BackendProviderRegistry.getProvidersByProviderCapability()` so
|
|
125
|
-
* apps can register and resolve custom capabilities in a fully
|
|
126
|
-
* type-checked way. In Phase 0 the interface is intentionally empty.
|
|
127
|
-
*/
|
|
128
|
-
export interface AppCustomProviderCapabilities {
|
|
129
|
-
}
|
|
130
107
|
/**
|
|
131
108
|
* Union of every possible provider capability — the closed built-in set
|
|
132
109
|
* plus any app-side augmentations. Consumers (registries, transformers,
|
|
133
110
|
* lock-file digests) accept this union.
|
|
134
111
|
*/
|
|
135
|
-
export type ProviderCapability = BuiltinProviderCapability
|
|
112
|
+
export type ProviderCapability = BuiltinProviderCapability;
|
|
136
113
|
//# sourceMappingURL=provider-capability.shared.schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-capability.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"provider-capability.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/external-providers/provider-capability.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,2BAA2B;;;;IAItC;;;;;;;;OAQG;;;IAGH,sEAAsE;;;;IAItE;;;;;;;;;;;;;;OAcG;;IAEH;;;;;;;;;;OAUG;;;;;;;;IAQH;;;;;OAKG;;IAEH;;;;;OAKG;;IAEH;;;;;;;OAOG;;CAEK,CAAC;AACX,+DAA+D;AAE/D,MAAM,MAAM,yBAAyB,GACnC,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,OAAO,2BAA2B,CAAC,CAAC;AAiBjF;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,yBAAyB,CAAC"}
|
|
@@ -20,8 +20,10 @@
|
|
|
20
20
|
* Authoring rule: keep this list narrow and stable. Adding a new
|
|
21
21
|
* built-in capability is a framework-level decision (it implies the
|
|
22
22
|
* engine knows how to consume the capability via a transformer or a
|
|
23
|
-
* platform binding)
|
|
24
|
-
*
|
|
23
|
+
* platform binding). There is no app-side extension point: an application
|
|
24
|
+
* needing a capability this vocabulary does not name is a decision to widen
|
|
25
|
+
* the vocabulary, taken with the resolution path that would make it mean
|
|
26
|
+
* something (#502).
|
|
25
27
|
*/
|
|
26
28
|
export const BUILTIN_PROVIDER_CAPABILITY = {
|
|
27
29
|
EMAIL_TRANSACTIONAL: 'EMAIL_TRANSACTIONAL',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-capability.shared.schemas.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"provider-capability.shared.schemas.js","sourceRoot":"","sources":["../../../src/external-providers/provider-capability.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,mBAAmB,EAAE,qBAAqB;IAC1C,eAAe,EAAE,iBAAiB;IAClC,GAAG,EAAE,KAAK;IACV;;;;;;;;OAQG;IACH,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,YAAY;IACxB,sEAAsE;IACtE,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,cAAc,EAAE,gBAAgB;IAChC;;;;;;;;;;;;;;OAcG;IACH,wBAAwB,EAAE,0BAA0B;IACpD;;;;;;;;;;OAUG;IACH,YAAY,EAAE,cAAc;IAC5B,gBAAgB,EAAE,kBAAkB;IACpC,yBAAyB,EAAE,2BAA2B;IACtD,0BAA0B,EAAE,4BAA4B;IACxD,eAAe,EAAE,iBAAiB;IAClC,oBAAoB,EAAE,sBAAsB;IAC5C,gBAAgB,EAAE,kBAAkB;IACpC;;;;;OAKG;IACH,iBAAiB,EAAE,mBAAmB;IACtC;;;;;OAKG;IACH,uBAAuB,EAAE,yBAAyB;IAClD;;;;;;;OAOG;IACH,sBAAsB,EAAE,wBAAwB;CACxC,CAAC","sourcesContent":["/**\n * `ProviderCapability` — open, app-extensible enum of standardized\n * behaviors that providers implement.\n *\n * Distinct from `EngineCapability` (closed, engine-defined slots that\n * may require fulfillment). See the analysis glossary in\n * `.cursor/plans/provider-registration-refactor-draft-analysis.md` §14\n * for the full naming rationale; this file is the canonical Phase-0\n * authoring surface called out in §Phase 0.2 of the implementation\n * plan.\n *\n * Built-in values use SCREAMING_SNAKE_CASE; app-augmented values SHOULD\n * use kebab-case + domain prefix (e.g. `'live-chat-handoff'`,\n * `'search-index'`). The two namespaces never collide by construction.\n */\n\n/** @wildo_source:part:start saas.models.provider-capabilities facet:kind:api facet:audience:app-developer\n *\n * Built-in provider capabilities shipped by the framework.\n *\n * Authoring rule: keep this list narrow and stable. Adding a new\n * built-in capability is a framework-level decision (it implies the\n * engine knows how to consume the capability via a transformer or a\n * platform binding). There is no app-side extension point: an application\n * needing a capability this vocabulary does not name is a decision to widen\n * the vocabulary, taken with the resolution path that would make it mean\n * something (#502).\n */\nexport const BUILTIN_PROVIDER_CAPABILITY = {\n EMAIL_TRANSACTIONAL: 'EMAIL_TRANSACTIONAL',\n EMAIL_MARKETING: 'EMAIL_MARKETING',\n SMS: 'SMS',\n /**\n * Single billing-engagement capability covering everything from\n * Checkout-style hosted flows to first-party PaymentIntent flows.\n * Webhook delivery is NOT a separate capability — it is modelled at\n * the protocol layer (e.g. Stripe declares both a `BILLING_PROVIDER`\n * and a `WEBHOOK_ORIGINATOR` protocol but a single `BILLING`\n * capability). This 1:1 matches the billing slot from the older\n * external connector transformer vocabulary.\n */\n BILLING: 'BILLING',\n SSO_OAUTH2: 'SSO_OAUTH2',\n /** Reserved for future SAML-based SSO providers (none ship today). */\n SSO_SAML: 'SSO_SAML',\n LLM_CHAT: 'LLM_CHAT',\n LLM_EMBEDDINGS: 'LLM_EMBEDDINGS',\n /**\n * Provider turns DOCUMENT BYTES into text — OCR over scans and photographs of pages, not merely\n * a read of a PDF's existing text layer. Maps to `EngineCapability.AI_DOCUMENT_EXTRACTION`.\n *\n * A NEW token was genuinely required rather than convenient: `IMAGE_GENERATION` is an OUTPUT\n * capability (text → image), and PDF *generation* — the `pdfTemplates` surface — is this\n * capability's exact opposite. Nothing in the existing vocabulary claimed the document-INPUT\n * slot. (This paragraph used to name `EngineCapability.DOCUMENT_GENERATION`; that member was\n * withdrawn because no provider capability could fill it.)\n *\n * Distinct from `LLM_CHAT` even where a vendor serves both from one API key: the work is\n * different (a page-layout model, billed per page, with no sampling parameters), and fusing\n * them would make the OCR provider unselectable independently of the chat provider — the exact\n * defect that splitting `AI_EMBEDDINGS` out of `AI_LLM` existed to fix.\n */\n DOCUMENT_TEXT_EXTRACTION: 'DOCUMENT_TEXT_EXTRACTION',\n /**\n * Provider ships an autonomous CODING AGENT: a process that reads and writes\n * a workspace, runs commands, and requests authorisation, reachable over the\n * Agent Client Protocol.\n *\n * Distinct from `LLM_CHAT` because the WORK is\n * different, not merely its transport. A chat model returns text for a caller\n * to act on; a coding agent acts, and the resulting obligations — permission\n * decisions, mutation scope, change attribution, verification — have no\n * counterpart in a completion call.\n */\n CODING_AGENT: 'CODING_AGENT',\n IMAGE_GENERATION: 'IMAGE_GENERATION',\n FRONTEND_ERROR_MONITORING: 'FRONTEND_ERROR_MONITORING',\n FRONTEND_PRODUCT_ANALYTICS: 'FRONTEND_PRODUCT_ANALYTICS',\n FRONTEND_SEARCH: 'FRONTEND_SEARCH',\n FRONTEND_FILE_PICKER: 'FRONTEND_FILE_PICKER',\n FRONTEND_CAPTCHA: 'FRONTEND_CAPTCHA',\n /**\n * Backend LLM-call observability — a provider that ingests per-`invokeAgent`\n * generation traces (model / tokens / cost / latency), e.g. PostHog\n * `$ai_generation`. Maps to `EngineCapability.LLM_OBSERVABILITY`. The engine\n * consumes it via the `AgentCallTraceSink` (not a request/response transformer).\n */\n LLM_OBSERVABILITY: 'LLM_OBSERVABILITY',\n /**\n * Operational-telemetry sink — a provider that ingests OpenTelemetry traces,\n * metrics, and logs over OTLP (e.g. BetterStack). Maps to\n * `EngineCapability.OBSERVABILITY_TELEMETRY`. Consumed by the OTel SDK preload\n * (env-var-driven), NOT a request/response transformer or a DI sink.\n */\n OBSERVABILITY_TELEMETRY: 'OBSERVABILITY_TELEMETRY',\n /**\n * Audit-log sink — a provider that stores or forwards compliance audit\n * events (who-did-what-when), e.g. immudb (tamper-evident) or a SIEM\n * webhook. Maps to `EngineCapability.COMPLIANCE_AUDIT_TRAIL`, a FAN_OUT\n * capability: every declared audit provider receives every event (see\n * `getEngineCapabilityResolutionMode`). The engine consumes it via the\n * `AuditLogSink` DI fan-out, layered on the always-on database audit store.\n */\n COMPLIANCE_AUDIT_TRAIL: 'COMPLIANCE_AUDIT_TRAIL',\n} as const;\n/** @wildo_source:part:end saas.models.provider-capabilities */\n\nexport type BuiltinProviderCapability =\n (typeof BUILTIN_PROVIDER_CAPABILITY)[keyof typeof BUILTIN_PROVIDER_CAPABILITY];\n\n/*\n * The app-side augmentation point was REMOVED here (#502, decided 2026-09-08).\n *\n * `AppCustomProviderCapabilities` was an empty interface, extended by no application in the\n * repository, whose own docstring described wiring it into `getProvidersByProviderCapability()` as a\n * later phase nobody scheduled. It offered a choice that did not exist: `keyof` an empty interface is\n * `never`, so the union below already resolved to `BuiltinProviderCapability` and removing it changes\n * the resolved type for none of its consumers.\n *\n * If an application genuinely needs a capability the built-in vocabulary does not name, that is a\n * decision about widening a CLOSED semantic vocabulary — with a resolution path built at the same\n * time — not an empty interface left open in advance. An extension point with no resolver is not\n * extensibility; it is a promise nothing can keep.\n */\n\n/**\n * Union of every possible provider capability — the closed built-in set\n * plus any app-side augmentations. Consumers (registries, transformers,\n * lock-file digests) accept this union.\n */\nexport type ProviderCapability = BuiltinProviderCapability;\n"]}
|
|
@@ -95,6 +95,7 @@ export declare function providerIsAlwaysSelfHosted(profile: ProviderCompliancePr
|
|
|
95
95
|
* application's configuration decides whether it is a recipient at all.
|
|
96
96
|
*/
|
|
97
97
|
export declare function providerDeploymentModelIsAnOperatorChoice(profile: ProviderComplianceProfile): boolean;
|
|
98
|
+
/** @wildo_source:part:start saas.models.providers.compliance-choice facet:layer:shared facet:audience:app-developer */
|
|
98
99
|
/**
|
|
99
100
|
* The application's CHOICE among what a provider offers — one entry per configured provider.
|
|
100
101
|
*
|
|
@@ -120,10 +121,19 @@ export declare const ApplicationProviderComplianceChoiceSchema: z.ZodObject<{
|
|
|
120
121
|
/**
|
|
121
122
|
* Which region this provider processes in, chosen from what the provider declares possible.
|
|
122
123
|
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
124
|
+
* NOT validated here, and NOT validated at boot either. This schema cannot see the provider
|
|
125
|
+
* registry, and refusing an unlisted region would make a vendor's new data centre an application
|
|
126
|
+
* build failure, so the intended posture is warn-do-not-block: a region outside the provider's
|
|
127
|
+
* declared list is APP-ASSERTED and reported, never refused.
|
|
128
|
+
*
|
|
129
|
+
* WIRED since 2026-09-10 (issue #308). `appAssertedProcessingRegions` below computes exactly that
|
|
130
|
+
* set, and the companion's compliance-primary-facts section reports it per provider, naming both the
|
|
131
|
+
* configured value and what the provider declares — because a divergence is either a typo or a stale
|
|
132
|
+
* provider module, and those are opposite work. It took this long only because of a DATA PATH: the
|
|
133
|
+
* vendor's region list lives on the backend provider module and the renderer reads provider
|
|
134
|
+
* SPECIFICATIONS, so the helper could not be called until `complianceProfile` was mirrored onto the
|
|
135
|
+
* specification contract. Any future report must call this helper rather than re-derive the
|
|
136
|
+
* comparison.
|
|
127
137
|
*/
|
|
128
138
|
processingRegion: z.ZodOptional<z.ZodString>;
|
|
129
139
|
}, z.core.$strict>;
|
|
@@ -142,10 +152,19 @@ export declare const ApplicationProviderComplianceChoicesSchema: z.ZodRecord<z.Z
|
|
|
142
152
|
/**
|
|
143
153
|
* Which region this provider processes in, chosen from what the provider declares possible.
|
|
144
154
|
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
155
|
+
* NOT validated here, and NOT validated at boot either. This schema cannot see the provider
|
|
156
|
+
* registry, and refusing an unlisted region would make a vendor's new data centre an application
|
|
157
|
+
* build failure, so the intended posture is warn-do-not-block: a region outside the provider's
|
|
158
|
+
* declared list is APP-ASSERTED and reported, never refused.
|
|
159
|
+
*
|
|
160
|
+
* WIRED since 2026-09-10 (issue #308). `appAssertedProcessingRegions` below computes exactly that
|
|
161
|
+
* set, and the companion's compliance-primary-facts section reports it per provider, naming both the
|
|
162
|
+
* configured value and what the provider declares — because a divergence is either a typo or a stale
|
|
163
|
+
* provider module, and those are opposite work. It took this long only because of a DATA PATH: the
|
|
164
|
+
* vendor's region list lives on the backend provider module and the renderer reads provider
|
|
165
|
+
* SPECIFICATIONS, so the helper could not be called until `complianceProfile` was mirrored onto the
|
|
166
|
+
* specification contract. Any future report must call this helper rather than re-derive the
|
|
167
|
+
* comparison.
|
|
149
168
|
*/
|
|
150
169
|
processingRegion: z.ZodOptional<z.ZodString>;
|
|
151
170
|
}, z.core.$strict>>;
|
|
@@ -165,6 +184,7 @@ export declare function appAssertedProcessingRegions(params: {
|
|
|
165
184
|
readonly providerRef: string;
|
|
166
185
|
readonly region: string;
|
|
167
186
|
}>;
|
|
187
|
+
/** @wildo_source:part:end saas.models.providers.compliance-choice */
|
|
168
188
|
/**
|
|
169
189
|
* The configured providers that are THIRD-PARTY RECIPIENTS — vendor-hosted, and therefore processors.
|
|
170
190
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-compliance-profile.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"provider-compliance-profile.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/external-providers/provider-compliance-profile.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;GAaG;AACH,oBAAY,uBAAuB;IACjC;;;OAGG;IACH,aAAa,kBAAkB;IAC/B;;;;OAIG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,oCAAoC,GAAG,SAAS,MAAM,EAAE,CAKzG"}
|
|
@@ -115,6 +115,7 @@ export function providerIsAlwaysSelfHosted(profile) {
|
|
|
115
115
|
export function providerDeploymentModelIsAnOperatorChoice(profile) {
|
|
116
116
|
return profile.deploymentModels.length > 1;
|
|
117
117
|
}
|
|
118
|
+
/** @wildo_source:part:start saas.models.providers.compliance-choice facet:layer:shared facet:audience:app-developer */
|
|
118
119
|
/**
|
|
119
120
|
* The application's CHOICE among what a provider offers — one entry per configured provider.
|
|
120
121
|
*
|
|
@@ -140,10 +141,19 @@ export const ApplicationProviderComplianceChoiceSchema = z.strictObject({
|
|
|
140
141
|
/**
|
|
141
142
|
* Which region this provider processes in, chosen from what the provider declares possible.
|
|
142
143
|
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
144
|
+
* NOT validated here, and NOT validated at boot either. This schema cannot see the provider
|
|
145
|
+
* registry, and refusing an unlisted region would make a vendor's new data centre an application
|
|
146
|
+
* build failure, so the intended posture is warn-do-not-block: a region outside the provider's
|
|
147
|
+
* declared list is APP-ASSERTED and reported, never refused.
|
|
148
|
+
*
|
|
149
|
+
* WIRED since 2026-09-10 (issue #308). `appAssertedProcessingRegions` below computes exactly that
|
|
150
|
+
* set, and the companion's compliance-primary-facts section reports it per provider, naming both the
|
|
151
|
+
* configured value and what the provider declares — because a divergence is either a typo or a stale
|
|
152
|
+
* provider module, and those are opposite work. It took this long only because of a DATA PATH: the
|
|
153
|
+
* vendor's region list lives on the backend provider module and the renderer reads provider
|
|
154
|
+
* SPECIFICATIONS, so the helper could not be called until `complianceProfile` was mirrored onto the
|
|
155
|
+
* specification contract. Any future report must call this helper rather than re-derive the
|
|
156
|
+
* comparison.
|
|
147
157
|
*/
|
|
148
158
|
processingRegion: z.string().trim().min(1).optional(),
|
|
149
159
|
}).superRefine((choice, context) => {
|
|
@@ -196,6 +206,7 @@ export function appAssertedProcessingRegions(params) {
|
|
|
196
206
|
}
|
|
197
207
|
return asserted;
|
|
198
208
|
}
|
|
209
|
+
/** @wildo_source:part:end saas.models.providers.compliance-choice */
|
|
199
210
|
/**
|
|
200
211
|
* The configured providers that are THIRD-PARTY RECIPIENTS — vendor-hosted, and therefore processors.
|
|
201
212
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-compliance-profile.shared.schemas.js","sourceRoot":"","sources":["../../../../src/external-providers/provider-compliance-profile.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAN,IAAY,uBAYX;AAZD,WAAY,uBAAuB;IACjC;;;OAGG;IACH,0DAA+B,CAAA;IAC/B;;;;OAIG;IACH,sDAA2B,CAAA;AAC7B,CAAC,EAZW,uBAAuB,KAAvB,uBAAuB,QAYlC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,YAAY,CAAC;IAC5D;;;;;;OAMG;IACH,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACjE;;;;;;;;;;;;;OAaG;IACH,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACpD;;;;;;;OAOG;IACH,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC3D,CAAC,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;IAClC;;;;;;;OAOG;IACH,IAAI,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,uBAAuB,CAAC,aAAa,CAA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CAAC,MAAM,CAAC,eAAe,KAAK,uBAAuB,CAAC,aAAa,CAAC;SACxF,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC;SACnC,IAAI,EAAE,CAAC;AACZ,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * WHO RUNS the software a provider module drives.\n *\n * This is the axis that decides whether a provider is a third-party RECIPIENT of personal data at\n * all, and until 2026-08-30 it did not exist anywhere in the provider model. immudb is described in\n * `BUILTIN_PROVIDER_CAPABILITY` as an audit-trail provider with nothing separating the container an\n * operator runs themselves from a hosted service — so the first privacy notice to ENUMERATE\n * recipients would have named a self-hosted audit ledger as a third party. That is false, and false\n * in the direction that alarms a reader rather than the direction they can check.\n *\n * ⚠️ NOT a hosting-topology field and not an infrastructure concern. It answers one compliance\n * question — does personal data leave the operator's control by reaching this provider — and a\n * consumer must not read it as \"where is it deployed\".\n */\nexport enum ProviderDeploymentModel {\n /**\n * The vendor runs it. Data reaching this provider reaches a third party, so it is a processor\n * under Art. 28 and belongs in the subprocessor register.\n */\n VENDOR_HOSTED = 'VENDOR_HOSTED',\n /**\n * The operator runs it — their own container, their own infrastructure. No third party receives\n * anything, so it is NOT a recipient. A notice states it as processing under the operator's own\n * control, which is a different sentence and a stronger one.\n */\n SELF_HOSTED = 'SELF_HOSTED',\n}\n\n/**\n * The compliance-relevant facts a PROVIDER MODULE knows about itself.\n *\n * ## Why these live on the provider and not on the application\n *\n * The processor register shipped by issue #88 was fully application-authored, and that made every\n * application restate facts the framework already holds. What a provider IS — who runs it, which\n * regions its vendor offers, what legal entity stands behind it — does not vary per application, and\n * an application asked to restate it will eventually get it wrong. What DOES vary is the operator's\n * CHOICE among those possibilities, and that is configuration.\n *\n * So the split is: possibilities here, choice in `wildo.saas.config.ts`, and the register entry\n * derived from both (issue #130).\n *\n * ## What is deliberately NOT here\n *\n * **A transfer mechanism.** Adequacy decisions move by court ruling rather than by release cycle, so\n * a list baked into the engine goes stale silently and emits a false compliance statement — the worst\n * failure mode in this lane. The mechanism is a legal determination with a shelf life, recorded per\n * subprocessor entry by a human, never derived here (issue #126).\n *\n * **What the provider RECEIVES.** That is already implied by the capability it serves —\n * `BUILTIN_PROVIDER_CAPABILITY` describes the data flow per member. Restating it here would be a\n * second authority for one fact.\n */\nexport const ProviderComplianceProfileSchema = z.strictObject({\n /**\n * The deployment models this provider SUPPORTS — one, or both where the provider genuinely offers\n * a choice (immudb: a hosted service and a container you run).\n *\n * A single entry means the answer is not the operator's to make and no configuration should offer\n * it. Two means the application must choose, and a register entry cannot be derived until it has.\n */\n deploymentModels: z.array(z.enum(ProviderDeploymentModel)).min(1),\n /**\n * The regions this vendor can process in — POSSIBILITIES the operator chooses from, never a\n * choice already made.\n *\n * Open strings, deliberately, because these are the VENDOR's own labels (`eu-west-1`,\n * `us-east-1`, `EU`) and a closed enum here would be this repository inventing a vocabulary it\n * does not own. The compliance question a transfer statement asks is about JURISDICTION rather\n * than datacentre, and mapping one to the other is part of the legal determination that is\n * deliberately not modelled (see above).\n *\n * EMPTY is meaningful and is the honest answer for a provider that is only ever self-hosted: the\n * region is wherever the operator runs it, which the framework cannot know. A configuration\n * choosing `SELF_HOSTED` therefore needs no region from this list.\n */\n processingRegions: z.array(z.string().trim().min(1)),\n /**\n * The vendor's legal entity, where the provider module's author can state it.\n *\n * OPTIONAL, and the reason is that this is the field most likely to go stale: vendors reorganise,\n * and a stale legal entity published as a current one is worse than an absent one. Absent means\n * the application must declare it on the register entry, which is where an operator's own contract\n * makes it checkable.\n */\n vendorLegalEntityName: z.string().trim().min(1).optional(),\n}).superRefine((profile, context) => {\n /*\n * A VENDOR_HOSTED provider that offers no region cannot support a transfer statement, and the\n * whole point of carrying regions is that a transfer statement becomes derivable. Refused at the\n * schema so the gap surfaces where the provider module is authored, rather than as an\n * unexplainable hole in a produced notice months later.\n *\n * The SELF_HOSTED-only case is exempt above: its region is wherever the operator runs it.\n */\n if (profile.deploymentModels.includes(ProviderDeploymentModel.VENDOR_HOSTED) && profile.processingRegions.length === 0) {\n context.addIssue({\n code: 'custom',\n path: ['processingRegions'],\n message: 'a VENDOR_HOSTED provider must declare at least one processing region — without one, no transfer statement about it can be derived',\n });\n }\n});\nexport type ProviderComplianceProfile = z.infer<typeof ProviderComplianceProfileSchema>;\n\n/** True when this provider can only ever be run by the operator, so it is never a third-party recipient. */\nexport function providerIsAlwaysSelfHosted(profile: ProviderComplianceProfile): boolean {\n return profile.deploymentModels.every((model) => model === ProviderDeploymentModel.SELF_HOSTED);\n}\n\n/**\n * True when the operator must CHOOSE, because the provider supports both.\n *\n * A register entry for such a provider cannot be derived from the provider module alone — the\n * application's configuration decides whether it is a recipient at all.\n */\nexport function providerDeploymentModelIsAnOperatorChoice(profile: ProviderComplianceProfile): boolean {\n return profile.deploymentModels.length > 1;\n}\n\n/**\n * The application's CHOICE among what a provider offers — one entry per configured provider.\n *\n * The provider declares possibilities ({@link ProviderComplianceProfileSchema}); this is where an\n * operator says which of them applies to their deployment. Keeping the two apart is the whole point\n * of the layering: a vendor's regions change when it opens a data centre, an operator's choice\n * changes when they migrate, and collapsing them would make one edit look like the other.\n *\n * Not carried inside `providerConfigurations`, which is an opaque `Record<string, unknown>` bag for a\n * provider's own runtime profile. A compliance answer must not live somewhere nothing can read it\n * without knowing the provider.\n */\nexport const ApplicationProviderComplianceChoiceSchema = z.strictObject({\n /**\n * Who runs this provider in THIS deployment.\n *\n * Required even when the provider supports only one model. The redundancy is deliberate: whether\n * personal data leaves the operator's control is the single most consequential fact a notice states\n * about a provider, and reading it out of a framework default rather than an operator's declaration\n * is how a wrong one goes unnoticed.\n */\n deploymentModel: z.enum(ProviderDeploymentModel),\n /**\n * Which region this provider processes in, chosen from what the provider declares possible.\n *\n * Validated against the provider's declared list at BOOT rather than here — this schema cannot see\n * the provider registry, and refusing an unlisted region would make a vendor's new data centre an\n * application build failure. A region outside the list is APP-ASSERTED and reported, never refused\n * (the same warn-do-not-block posture as the personal-data declaration report).\n */\n processingRegion: z.string().trim().min(1).optional(),\n}).superRefine((choice, context) => {\n /*\n * The pairing, in both directions.\n *\n * A VENDOR_HOSTED choice with no region leaves the notice unable to state where the data goes,\n * which is the question this whole layer exists to answer. A SELF_HOSTED choice WITH one is the\n * fiction the provider layer already refuses: the operator runs it, so its region is wherever they\n * run it, and a value here would be a guess presented as a configuration.\n */\n if (choice.deploymentModel === ProviderDeploymentModel.VENDOR_HOSTED && choice.processingRegion === undefined) {\n context.addIssue({\n code: 'custom',\n path: ['processingRegion'],\n message: 'a VENDOR_HOSTED provider must be configured with the region it processes in — without one, no notice can state where this data goes',\n });\n }\n if (choice.deploymentModel === ProviderDeploymentModel.SELF_HOSTED && choice.processingRegion !== undefined) {\n context.addIssue({\n code: 'custom',\n path: ['processingRegion'],\n message: 'a SELF_HOSTED provider runs wherever the operator runs it, so a processing region here is a guess presented as configuration — drop it',\n });\n }\n});\nexport type ApplicationProviderComplianceChoice = z.infer<typeof ApplicationProviderComplianceChoiceSchema>;\n\n/** Per configured provider ref, the operator's compliance choice. */\nexport const ApplicationProviderComplianceChoicesSchema = z.record(\n z.string().trim().min(1),\n ApplicationProviderComplianceChoiceSchema,\n);\nexport type ApplicationProviderComplianceChoices = z.infer<typeof ApplicationProviderComplianceChoicesSchema>;\n\n/**\n * Regions an application asserts that the provider does not declare.\n *\n * Reported, never refused — a vendor opening a data centre must not become a build failure, and an\n * operator who genuinely knows better than a stale framework list should be able to say so. What the\n * framework owes is that the divergence is VISIBLE, which is the same trade the personal-data\n * declaration report makes.\n */\nexport function appAssertedProcessingRegions(params: {\n readonly choices: ApplicationProviderComplianceChoices;\n readonly profilesByProviderRef: Readonly<Record<string, ProviderComplianceProfile>>;\n}): ReadonlyArray<{ readonly providerRef: string; readonly region: string }> {\n const asserted: Array<{ providerRef: string; region: string }> = [];\n\n for (const [providerRef, choice] of Object.entries(params.choices)) {\n if (choice.processingRegion === undefined) continue;\n const profile = params.profilesByProviderRef[providerRef];\n // No profile is not an assertion about a region — it is a provider that declares no compliance\n // profile at all, which is a different gap and belongs to whoever reports THAT.\n if (profile === undefined) continue;\n if (profile.processingRegions.includes(choice.processingRegion)) continue;\n asserted.push({ providerRef, region: choice.processingRegion });\n }\n\n return asserted;\n}\n\n/**\n * The configured providers that are THIRD-PARTY RECIPIENTS — vendor-hosted, and therefore processors.\n *\n * A self-hosted provider is excluded by construction rather than by a filter a caller must remember:\n * no data leaves the operator, so it is not a recipient and must never be enumerated as one.\n */\nexport function vendorHostedProviderRefs(choices: ApplicationProviderComplianceChoices): readonly string[] {\n return Object.entries(choices)\n .filter(([, choice]) => choice.deploymentModel === ProviderDeploymentModel.VENDOR_HOSTED)\n .map(([providerRef]) => providerRef)\n .sort();\n}\n"]}
|
|
1
|
+
{"version":3,"file":"provider-compliance-profile.shared.schemas.js","sourceRoot":"","sources":["../../../src/external-providers/provider-compliance-profile.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAN,IAAY,uBAYX;AAZD,WAAY,uBAAuB;IACjC;;;OAGG;IACH,0DAA+B,CAAA;IAC/B;;;;OAIG;IACH,sDAA2B,CAAA;AAC7B,CAAC,EAZW,uBAAuB,KAAvB,uBAAuB,QAYlC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,YAAY,CAAC;IAC5D;;;;;;OAMG;IACH,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACjE;;;;;;;;;;;;;OAaG;IACH,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACpD;;;;;;;OAOG;IACH,qBAAqB,EA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C,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AACD,qEAAqE;AAErE;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CAAC,OAA6C;IACpF,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;SAC3B,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,KAAK,uBAAuB,CAAC,aAAa,CAAC;SACxF,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC;SACnC,IAAI,EAAE,CAAC;AACZ,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * WHO RUNS the software a provider module drives.\n *\n * This is the axis that decides whether a provider is a third-party RECIPIENT of personal data at\n * all, and until 2026-08-30 it did not exist anywhere in the provider model. immudb is described in\n * `BUILTIN_PROVIDER_CAPABILITY` as an audit-trail provider with nothing separating the container an\n * operator runs themselves from a hosted service — so the first privacy notice to ENUMERATE\n * recipients would have named a self-hosted audit ledger as a third party. That is false, and false\n * in the direction that alarms a reader rather than the direction they can check.\n *\n * ⚠️ NOT a hosting-topology field and not an infrastructure concern. It answers one compliance\n * question — does personal data leave the operator's control by reaching this provider — and a\n * consumer must not read it as \"where is it deployed\".\n */\nexport enum ProviderDeploymentModel {\n /**\n * The vendor runs it. Data reaching this provider reaches a third party, so it is a processor\n * under Art. 28 and belongs in the subprocessor register.\n */\n VENDOR_HOSTED = 'VENDOR_HOSTED',\n /**\n * The operator runs it — their own container, their own infrastructure. No third party receives\n * anything, so it is NOT a recipient. A notice states it as processing under the operator's own\n * control, which is a different sentence and a stronger one.\n */\n SELF_HOSTED = 'SELF_HOSTED',\n}\n\n/**\n * The compliance-relevant facts a PROVIDER MODULE knows about itself.\n *\n * ## Why these live on the provider and not on the application\n *\n * The processor register shipped by issue #88 was fully application-authored, and that made every\n * application restate facts the framework already holds. What a provider IS — who runs it, which\n * regions its vendor offers, what legal entity stands behind it — does not vary per application, and\n * an application asked to restate it will eventually get it wrong. What DOES vary is the operator's\n * CHOICE among those possibilities, and that is configuration.\n *\n * So the split is: possibilities here, choice in `wildo.saas.config.ts`, and the register entry\n * derived from both (issue #130).\n *\n * ## What is deliberately NOT here\n *\n * **A transfer mechanism.** Adequacy decisions move by court ruling rather than by release cycle, so\n * a list baked into the engine goes stale silently and emits a false compliance statement — the worst\n * failure mode in this lane. The mechanism is a legal determination with a shelf life, recorded per\n * subprocessor entry by a human, never derived here (issue #126).\n *\n * **What the provider RECEIVES.** That is already implied by the capability it serves —\n * `BUILTIN_PROVIDER_CAPABILITY` describes the data flow per member. Restating it here would be a\n * second authority for one fact.\n */\nexport const ProviderComplianceProfileSchema = z.strictObject({\n /**\n * The deployment models this provider SUPPORTS — one, or both where the provider genuinely offers\n * a choice (immudb: a hosted service and a container you run).\n *\n * A single entry means the answer is not the operator's to make and no configuration should offer\n * it. Two means the application must choose, and a register entry cannot be derived until it has.\n */\n deploymentModels: z.array(z.enum(ProviderDeploymentModel)).min(1),\n /**\n * The regions this vendor can process in — POSSIBILITIES the operator chooses from, never a\n * choice already made.\n *\n * Open strings, deliberately, because these are the VENDOR's own labels (`eu-west-1`,\n * `us-east-1`, `EU`) and a closed enum here would be this repository inventing a vocabulary it\n * does not own. The compliance question a transfer statement asks is about JURISDICTION rather\n * than datacentre, and mapping one to the other is part of the legal determination that is\n * deliberately not modelled (see above).\n *\n * EMPTY is meaningful and is the honest answer for a provider that is only ever self-hosted: the\n * region is wherever the operator runs it, which the framework cannot know. A configuration\n * choosing `SELF_HOSTED` therefore needs no region from this list.\n */\n processingRegions: z.array(z.string().trim().min(1)),\n /**\n * The vendor's legal entity, where the provider module's author can state it.\n *\n * OPTIONAL, and the reason is that this is the field most likely to go stale: vendors reorganise,\n * and a stale legal entity published as a current one is worse than an absent one. Absent means\n * the application must declare it on the register entry, which is where an operator's own contract\n * makes it checkable.\n */\n vendorLegalEntityName: z.string().trim().min(1).optional(),\n}).superRefine((profile, context) => {\n /*\n * A VENDOR_HOSTED provider that offers no region cannot support a transfer statement, and the\n * whole point of carrying regions is that a transfer statement becomes derivable. Refused at the\n * schema so the gap surfaces where the provider module is authored, rather than as an\n * unexplainable hole in a produced notice months later.\n *\n * The SELF_HOSTED-only case is exempt above: its region is wherever the operator runs it.\n */\n if (profile.deploymentModels.includes(ProviderDeploymentModel.VENDOR_HOSTED) && profile.processingRegions.length === 0) {\n context.addIssue({\n code: 'custom',\n path: ['processingRegions'],\n message: 'a VENDOR_HOSTED provider must declare at least one processing region — without one, no transfer statement about it can be derived',\n });\n }\n});\nexport type ProviderComplianceProfile = z.infer<typeof ProviderComplianceProfileSchema>;\n\n/** True when this provider can only ever be run by the operator, so it is never a third-party recipient. */\nexport function providerIsAlwaysSelfHosted(profile: ProviderComplianceProfile): boolean {\n return profile.deploymentModels.every((model) => model === ProviderDeploymentModel.SELF_HOSTED);\n}\n\n/**\n * True when the operator must CHOOSE, because the provider supports both.\n *\n * A register entry for such a provider cannot be derived from the provider module alone — the\n * application's configuration decides whether it is a recipient at all.\n */\nexport function providerDeploymentModelIsAnOperatorChoice(profile: ProviderComplianceProfile): boolean {\n return profile.deploymentModels.length > 1;\n}\n\n/** @wildo_source:part:start saas.models.providers.compliance-choice facet:layer:shared facet:audience:app-developer */\n/**\n * The application's CHOICE among what a provider offers — one entry per configured provider.\n *\n * The provider declares possibilities ({@link ProviderComplianceProfileSchema}); this is where an\n * operator says which of them applies to their deployment. Keeping the two apart is the whole point\n * of the layering: a vendor's regions change when it opens a data centre, an operator's choice\n * changes when they migrate, and collapsing them would make one edit look like the other.\n *\n * Not carried inside `providerConfigurations`, which is an opaque `Record<string, unknown>` bag for a\n * provider's own runtime profile. A compliance answer must not live somewhere nothing can read it\n * without knowing the provider.\n */\nexport const ApplicationProviderComplianceChoiceSchema = z.strictObject({\n /**\n * Who runs this provider in THIS deployment.\n *\n * Required even when the provider supports only one model. The redundancy is deliberate: whether\n * personal data leaves the operator's control is the single most consequential fact a notice states\n * about a provider, and reading it out of a framework default rather than an operator's declaration\n * is how a wrong one goes unnoticed.\n */\n deploymentModel: z.enum(ProviderDeploymentModel),\n /**\n * Which region this provider processes in, chosen from what the provider declares possible.\n *\n * NOT validated here, and NOT validated at boot either. This schema cannot see the provider\n * registry, and refusing an unlisted region would make a vendor's new data centre an application\n * build failure, so the intended posture is warn-do-not-block: a region outside the provider's\n * declared list is APP-ASSERTED and reported, never refused.\n *\n * WIRED since 2026-09-10 (issue #308). `appAssertedProcessingRegions` below computes exactly that\n * set, and the companion's compliance-primary-facts section reports it per provider, naming both the\n * configured value and what the provider declares — because a divergence is either a typo or a stale\n * provider module, and those are opposite work. It took this long only because of a DATA PATH: the\n * vendor's region list lives on the backend provider module and the renderer reads provider\n * SPECIFICATIONS, so the helper could not be called until `complianceProfile` was mirrored onto the\n * specification contract. Any future report must call this helper rather than re-derive the\n * comparison.\n */\n processingRegion: z.string().trim().min(1).optional(),\n}).superRefine((choice, context) => {\n /*\n * The pairing, in both directions.\n *\n * A VENDOR_HOSTED choice with no region leaves the notice unable to state where the data goes,\n * which is the question this whole layer exists to answer. A SELF_HOSTED choice WITH one is the\n * fiction the provider layer already refuses: the operator runs it, so its region is wherever they\n * run it, and a value here would be a guess presented as a configuration.\n */\n if (choice.deploymentModel === ProviderDeploymentModel.VENDOR_HOSTED && choice.processingRegion === undefined) {\n context.addIssue({\n code: 'custom',\n path: ['processingRegion'],\n message: 'a VENDOR_HOSTED provider must be configured with the region it processes in — without one, no notice can state where this data goes',\n });\n }\n if (choice.deploymentModel === ProviderDeploymentModel.SELF_HOSTED && choice.processingRegion !== undefined) {\n context.addIssue({\n code: 'custom',\n path: ['processingRegion'],\n message: 'a SELF_HOSTED provider runs wherever the operator runs it, so a processing region here is a guess presented as configuration — drop it',\n });\n }\n});\nexport type ApplicationProviderComplianceChoice = z.infer<typeof ApplicationProviderComplianceChoiceSchema>;\n\n/** Per configured provider ref, the operator's compliance choice. */\nexport const ApplicationProviderComplianceChoicesSchema = z.record(\n z.string().trim().min(1),\n ApplicationProviderComplianceChoiceSchema,\n);\nexport type ApplicationProviderComplianceChoices = z.infer<typeof ApplicationProviderComplianceChoicesSchema>;\n\n/**\n * Regions an application asserts that the provider does not declare.\n *\n * Reported, never refused — a vendor opening a data centre must not become a build failure, and an\n * operator who genuinely knows better than a stale framework list should be able to say so. What the\n * framework owes is that the divergence is VISIBLE, which is the same trade the personal-data\n * declaration report makes.\n */\nexport function appAssertedProcessingRegions(params: {\n readonly choices: ApplicationProviderComplianceChoices;\n readonly profilesByProviderRef: Readonly<Record<string, ProviderComplianceProfile>>;\n}): ReadonlyArray<{ readonly providerRef: string; readonly region: string }> {\n const asserted: Array<{ providerRef: string; region: string }> = [];\n\n for (const [providerRef, choice] of Object.entries(params.choices)) {\n if (choice.processingRegion === undefined) continue;\n const profile = params.profilesByProviderRef[providerRef];\n // No profile is not an assertion about a region — it is a provider that declares no compliance\n // profile at all, which is a different gap and belongs to whoever reports THAT.\n if (profile === undefined) continue;\n if (profile.processingRegions.includes(choice.processingRegion)) continue;\n asserted.push({ providerRef, region: choice.processingRegion });\n }\n\n return asserted;\n}\n/** @wildo_source:part:end saas.models.providers.compliance-choice */\n\n/**\n * The configured providers that are THIRD-PARTY RECIPIENTS — vendor-hosted, and therefore processors.\n *\n * A self-hosted provider is excluded by construction rather than by a filter a caller must remember:\n * no data leaves the operator, so it is not a recipient and must never be enumerated as one.\n */\nexport function vendorHostedProviderRefs(choices: ApplicationProviderComplianceChoices): readonly string[] {\n return Object.entries(choices)\n .filter(([, choice]) => choice.deploymentModel === ProviderDeploymentModel.VENDOR_HOSTED)\n .map(([providerRef]) => providerRef)\n .sort();\n}\n"]}
|