@wildo-ai/saas-models 1.1.3 → 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.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.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.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.d.ts +1 -0
- 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.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.map +1 -1
- package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
- 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.map +1 -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.map +1 -1
- 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 +2 -0
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -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.map +1 -1
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -1
- 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.map +1 -1
- 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 +178 -6
- 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 +326 -4
- 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 +22 -0
- 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 +27 -0
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js +36 -2
- 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.map +1 -1
- package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
- package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -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.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.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +14 -14
- 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 +6 -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 +6 -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.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 +7 -0
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +7 -0
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.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 +4 -0
- 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.map +1 -1
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -1
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +57 -0
- 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 +29 -0
- 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.map +1 -1
- 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 +18 -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 +10 -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.map +1 -1
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
- package/dist/esm/features/feature-builders.shared.js.map +1 -1
- package/dist/esm/features/feature-definition.shared.schemas.d.ts.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.map +1 -1
- 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.map +1 -1
- 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.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.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 +6 -6
- 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.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.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.map +1 -1
- 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.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.map +1 -1
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts +2 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js +11 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- 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.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.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.js.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.map +1 -1
- 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 +6 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +6 -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.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.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
- 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 +51 -0
- package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.js +51 -0
- 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.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.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- 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.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 +22 -0
- package/dist/esm/public-runtime/index.d.ts.map +1 -1
- package/dist/esm/public-runtime/index.js +14 -0
- package/dist/esm/public-runtime/index.js.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-documentation.js +57 -3
- package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts +47 -0
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.js +51 -0
- package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.d.ts +9 -7
- package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.js +17 -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.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.js +98 -5
- package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.d.ts +48 -1
- 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 +54 -0
- 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.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 +17 -0
- package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.js +18 -0
- package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
- package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.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.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.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.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.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 +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- 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 +3 -3
- 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 +35 -5
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.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 -0
- 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 +15 -0
- 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.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts +23 -0
- 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 +24 -0
- 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.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +57 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +44 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -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.map +1 -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.map +1 -1
- 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.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.map +1 -1
- 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.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.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.map +1 -1
- package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/users.shared.schemas.d.ts +17 -1
- package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.schemas.js +18 -2
- 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,175 @@
|
|
|
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
|
+
/**
|
|
53
|
+
* The key under `providerConfigurations[providerRef]` an application uses to
|
|
54
|
+
* supply a frontend provider's public configuration.
|
|
55
|
+
*
|
|
56
|
+
* The protocol kind, exactly as SSO's channel is keyed by ITS protocol kind
|
|
57
|
+
* (`sso_oauth2`): the bag is per-provider, per-protocol, and a frontend module
|
|
58
|
+
* speaks `FRONTEND_SDK`. Not a new literal — the enum member is the one source.
|
|
59
|
+
*/
|
|
60
|
+
export declare const FRONTEND_PROVIDER_PUBLIC_CONFIG_KEY: string;
|
|
61
|
+
/** Why an application-supplied public-config bag was refused. */
|
|
62
|
+
export declare enum FrontendProviderPublicConfigRefusal {
|
|
63
|
+
/** A key the provider module does not declare — almost always a misspelling. */
|
|
64
|
+
UNDECLARED_KEY = "UNDECLARED_KEY",
|
|
65
|
+
/** A key naming a secret from the same vendor's backend contract. Never negotiable. */
|
|
66
|
+
SECRET_KEY = "SECRET_KEY",
|
|
67
|
+
/** The supplied bag is not a plain object — a string, an array, `null`. */
|
|
68
|
+
NOT_AN_OBJECT = "NOT_AN_OBJECT"
|
|
69
|
+
}
|
|
70
|
+
export declare class FrontendProviderPublicConfigError extends Error {
|
|
71
|
+
readonly providerRef: string;
|
|
72
|
+
readonly refusal: FrontendProviderPublicConfigRefusal;
|
|
73
|
+
readonly keys: readonly string[];
|
|
74
|
+
constructor(providerRef: string, refusal: FrontendProviderPublicConfigRefusal, keys: readonly string[], message: string);
|
|
75
|
+
}
|
|
76
|
+
export interface OverlayFrontendProviderPublicConfigInput {
|
|
77
|
+
readonly providerRef: string;
|
|
78
|
+
/** What the provider module authored — its own defaults, e.g. `{ authProviderRef: 'google' }`. */
|
|
79
|
+
readonly authored: Readonly<Record<string, unknown>> | undefined;
|
|
80
|
+
/** What the application supplied under `providerConfigurations[providerRef][frontend_sdk]`. */
|
|
81
|
+
readonly supplied: unknown;
|
|
82
|
+
/**
|
|
83
|
+
* The keys the provider module declares it reads. `undefined` means the
|
|
84
|
+
* module declared no introspectable schema, so guard 1 cannot run HERE and
|
|
85
|
+
* hydration's validation is the gate; an empty array means the module
|
|
86
|
+
* declares it reads NOTHING, so every supplied key is refused.
|
|
87
|
+
*/
|
|
88
|
+
readonly declaredKeys: readonly string[] | undefined;
|
|
89
|
+
/** Slugs and environment-variable names of the same vendor's backend secrets. */
|
|
90
|
+
readonly forbiddenKeys: ReadonlySet<string>;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Merges what the application supplied over what the module authored, refusing
|
|
94
|
+
* the two classes of key that must never reach a browser.
|
|
95
|
+
*
|
|
96
|
+
* Supplied values WIN over authored ones for the same key: the module's value is
|
|
97
|
+
* a default, and an application that names a key means it. Absent `supplied`
|
|
98
|
+
* returns the authored bag untouched — an application that configured nothing
|
|
99
|
+
* is the ordinary case, not a refusal.
|
|
100
|
+
*/
|
|
101
|
+
export declare function overlayFrontendProviderPublicConfig(input: OverlayFrontendProviderPublicConfigInput): Readonly<Record<string, unknown>> | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* The value kinds a public-config key may declare. Scalars only, on purpose: a
|
|
104
|
+
* public key is an identifier or a flag, and a structured value here is a
|
|
105
|
+
* design smell — a provider that needs one has a capability-level shape
|
|
106
|
+
* (`FrontendFilePickerPublicConfigSchema`) to declare it in.
|
|
107
|
+
*/
|
|
108
|
+
export declare enum FrontendPublicConfigValueKind {
|
|
109
|
+
STRING = "string",
|
|
110
|
+
NUMBER = "number",
|
|
111
|
+
BOOLEAN = "boolean"
|
|
112
|
+
}
|
|
113
|
+
export interface FrontendPublicConfigKeySpec {
|
|
114
|
+
readonly kind: FrontendPublicConfigValueKind;
|
|
115
|
+
/** Absent = optional. Picker keys are usually optional: a missing one is reported when the picker opens, not by dropping the provider. */
|
|
116
|
+
readonly required?: boolean;
|
|
117
|
+
/** For the person writing `wildo.saas.config.ts`. Not validated; surfaced in refusals. */
|
|
118
|
+
readonly description?: string;
|
|
119
|
+
}
|
|
120
|
+
/** A Standard Schema v1 validator that ALSO says which keys it declares. */
|
|
121
|
+
export interface FrontendPublicConfigSchema<TOutput = Readonly<Record<string, unknown>>> {
|
|
122
|
+
readonly '~standard': {
|
|
123
|
+
readonly version: 1;
|
|
124
|
+
readonly vendor: 'wildo';
|
|
125
|
+
validate(value: unknown): {
|
|
126
|
+
readonly value: TOutput;
|
|
127
|
+
} | {
|
|
128
|
+
readonly issues: ReadonlyArray<{
|
|
129
|
+
readonly message: string;
|
|
130
|
+
readonly path?: ReadonlyArray<PropertyKey>;
|
|
131
|
+
}>;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* The keys this schema admits, readable without running it.
|
|
136
|
+
*
|
|
137
|
+
* This is the DATA half of the declaration, and it is why this helper exists
|
|
138
|
+
* rather than "use Zod": Standard Schema v1 exposes `validate` and nothing
|
|
139
|
+
* else, so a schema alone cannot tell the companion walk which keys an
|
|
140
|
+
* application may supply — and the walk runs in Node, from a projected
|
|
141
|
+
* contribution, without the module. `projectFrontendProviderContribution`
|
|
142
|
+
* mirrors this list onto the entry as `publicConfigKeys`.
|
|
143
|
+
*/
|
|
144
|
+
readonly declaredKeys: readonly string[];
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Declares a frontend provider's public-config keys ONCE and gets both halves:
|
|
148
|
+
* a strict Standard Schema v1 validator (the CODE half hydration runs) and the
|
|
149
|
+
* key list (the DATA half the companion walk reads).
|
|
150
|
+
*
|
|
151
|
+
* Dependency-free by design. It lives here because the engine's provider modules
|
|
152
|
+
* live in `@wildo-ai/external-connectors-public`, whose bare-specifier allow-list
|
|
153
|
+
* holds exactly one entry — this package's `/public-runtime` — so those modules
|
|
154
|
+
* can declare a schema without that package growing a validation library. An
|
|
155
|
+
* application module may still use Zod (a Zod object satisfies Standard Schema
|
|
156
|
+
* and its `shape` keys are read the same way).
|
|
157
|
+
*
|
|
158
|
+
* Strict: an unknown key is an issue, never ignored. Silently ignoring is the
|
|
159
|
+
* defect FE-8 closed — a renamed key yielding `undefined` and a picker that
|
|
160
|
+
* accepts more than it should with no error anywhere.
|
|
161
|
+
*/
|
|
162
|
+
export declare function defineFrontendPublicConfigSchema(keys: Readonly<Record<string, FrontendPublicConfigKeySpec>>): FrontendPublicConfigSchema;
|
|
163
|
+
/**
|
|
164
|
+
* Reads the declared keys off a provider's `publicConfigSchema`, whatever
|
|
165
|
+
* library produced it.
|
|
166
|
+
*
|
|
167
|
+
* Two shapes are recognised, and the order matters: a schema built by
|
|
168
|
+
* `defineFrontendPublicConfigSchema` states its keys outright; a Zod object
|
|
169
|
+
* exposes them as `shape`. Anything else — a hand-written Standard Schema, a
|
|
170
|
+
* library without introspection — yields `undefined`, which the overlay reads
|
|
171
|
+
* as "cannot enforce here" rather than as "declares nothing". That distinction
|
|
172
|
+
* is load-bearing: an empty list refuses EVERY supplied key.
|
|
173
|
+
*/
|
|
174
|
+
export declare function readDeclaredPublicConfigKeys(schema: unknown): readonly string[] | undefined;
|
|
175
|
+
//# sourceMappingURL=frontend-provider-public-config.shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontend-provider-public-config.shared.d.ts","sourceRoot":"","sources":["../../../src/external-providers/frontend-provider-public-config.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAIH;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC,EAAE,MAA4D,CAAC;AAE/G,iEAAiE;AACjE,oBAAY,mCAAmC;IAC7C,gFAAgF;IAChF,cAAc,mBAAmB;IACjC,uFAAuF;IACvF,UAAU,eAAe;IACzB,2EAA2E;IAC3E,aAAa,kBAAkB;CAChC;AAED,qBAAa,iCAAkC,SAAQ,KAAK;IAExD,QAAQ,CAAC,WAAW,EAAE,MAAM;IAC5B,QAAQ,CAAC,OAAO,EAAE,mCAAmC;IACrD,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE;gBAFvB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,mCAAmC,EAC5C,IAAI,EAAE,SAAS,MAAM,EAAE,EAChC,OAAO,EAAE,MAAM;CAKlB;AAED,MAAM,WAAW,wCAAwC;IACvD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,kGAAkG;IAClG,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IACjE,+FAA+F;IAC/F,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IACrD,iFAAiF;IACjF,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC7C;AAED;;;;;;;;GAQG;AACH,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,wCAAwC,GAC9C,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAiD/C;AAED;;;;;GAKG;AACH,oBAAY,6BAA6B;IACvC,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,IAAI,EAAE,6BAA6B,CAAC;IAC7C,0IAA0I;IAC1I,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,0FAA0F;IAC1F,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,4EAA4E;AAC5E,MAAM,WAAW,0BAA0B,CAAC,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrF,QAAQ,CAAC,WAAW,EAAE;QACpB,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;QACpB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;QACzB,QAAQ,CAAC,KAAK,EAAE,OAAO,GACnB;YAAE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;SAAE,GAC3B;YAAE,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;gBAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAA;aAAE,CAAC,CAAA;SAAE,CAAC;KAClH,CAAC;IACF;;;;;;;;;OASG;IACH,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1C;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAAC,GAC1D,0BAA0B,CAiC5B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAU3F"}
|
|
@@ -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":"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","sourcesContent":["/**\n * How an APPLICATION supplies a frontend provider'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"]}
|
|
@@ -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"}
|
|
@@ -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
|
*
|
|
@@ -125,10 +126,14 @@ export declare const ApplicationProviderComplianceChoiceSchema: z.ZodObject<{
|
|
|
125
126
|
* build failure, so the intended posture is warn-do-not-block: a region outside the provider's
|
|
126
127
|
* declared list is APP-ASSERTED and reported, never refused.
|
|
127
128
|
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
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.
|
|
132
137
|
*/
|
|
133
138
|
processingRegion: z.ZodOptional<z.ZodString>;
|
|
134
139
|
}, z.core.$strict>;
|
|
@@ -152,10 +157,14 @@ export declare const ApplicationProviderComplianceChoicesSchema: z.ZodRecord<z.Z
|
|
|
152
157
|
* build failure, so the intended posture is warn-do-not-block: a region outside the provider's
|
|
153
158
|
* declared list is APP-ASSERTED and reported, never refused.
|
|
154
159
|
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
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.
|
|
159
168
|
*/
|
|
160
169
|
processingRegion: z.ZodOptional<z.ZodString>;
|
|
161
170
|
}, z.core.$strict>>;
|
|
@@ -175,6 +184,7 @@ export declare function appAssertedProcessingRegions(params: {
|
|
|
175
184
|
readonly providerRef: string;
|
|
176
185
|
readonly region: string;
|
|
177
186
|
}>;
|
|
187
|
+
/** @wildo_source:part:end saas.models.providers.compliance-choice */
|
|
178
188
|
/**
|
|
179
189
|
* The configured providers that are THIRD-PARTY RECIPIENTS — vendor-hosted, and therefore processors.
|
|
180
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;IACH,WAAW,gBAAgB;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,+BAA+B;IAC1C;;;;;;OAMG;;IAEH;;;;;;;;;;;;;OAaG;;IAEH;;;;;;;OAOG;;kBAkBH,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF,4GAA4G;AAC5G,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAEtF;AAED;;;;;GAKG;AACH,wBAAgB,yCAAyC,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAErG;AAED,uHAAuH;AACvH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,yCAAyC;IACpD;;;;;;;OAOG;;IAEH;;;;;;;;;;;;;;;;OAgBG;;kBAyBH,CAAC;AACH,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yCAAyC,CAAC,CAAC;AAE5G,qEAAqE;AACrE,eAAO,MAAM,0CAA0C;IAtDrD;;;;;;;OAOG;;IAEH;;;;;;;;;;;;;;;;OAgBG;;mBAgCJ,CAAC;AACF,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0CAA0C,CAAC,CAAC;AAE9G;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE;IACnD,QAAQ,CAAC,OAAO,EAAE,oCAAoC,CAAC;IACvD,QAAQ,CAAC,qBAAqB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC,CAAC;CACrF,GAAG,aAAa,CAAC;IAAE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAc3E;AACD,qEAAqE;AAErE;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,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
|
*
|
|
@@ -145,10 +146,14 @@ export const ApplicationProviderComplianceChoiceSchema = z.strictObject({
|
|
|
145
146
|
* build failure, so the intended posture is warn-do-not-block: a region outside the provider's
|
|
146
147
|
* declared list is APP-ASSERTED and reported, never refused.
|
|
147
148
|
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
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.
|
|
152
157
|
*/
|
|
153
158
|
processingRegion: z.string().trim().min(1).optional(),
|
|
154
159
|
}).superRefine((choice, context) => {
|
|
@@ -201,6 +206,7 @@ export function appAssertedProcessingRegions(params) {
|
|
|
201
206
|
}
|
|
202
207
|
return asserted;
|
|
203
208
|
}
|
|
209
|
+
/** @wildo_source:part:end saas.models.providers.compliance-choice */
|
|
204
210
|
/**
|
|
205
211
|
* The configured providers that are THIRD-PARTY RECIPIENTS — vendor-hosted, and therefore processors.
|
|
206
212
|
*
|