@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso-connection.shared.schemas.js","sourceRoot":"","sources":["../../../../../../src/security/authentications/sso/sso-connection.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,gCAAgC,EAAE,MAAM,wDAAwD,CAAC;AAErI,2EAA2E;AAC3E,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,4BAAa,CAAA;AACf,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB;AAED,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;CACR,CAAC;AAEX,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;CACN,CAAC;AAEX,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;CACd,CAAC;AAEX,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,cAAc,EAAE,gBAAgB;CACxB,CAAC;AAEX,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACN,CAAC;AAEX,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,WAAW,EAAE,uDAAuD;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AC,IAAI,IAAI,EAAE,CAAC,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IACrF,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CACtF,CAAC,CAAC;AAQH,MAAM,CAAC,MAAM,mCAAmC,GAAG,yBAAyB,CAAC;IAC3E,gBAAgB,EAAE,gBAAgB;IAClC,mBAAmB,EAAE,iBAAiB;IACtC,WAAW,EAAE,iBAAiB;IAC9B,UAAU,EAAE,uBAAuB;IACnC,0EAA0E;IAC1E,uEAAuE;IACvE,QAAQ,EAAE,mBAAmB,CAAC,GAAG,CAAC,gCAAgC,CAAC;CACpE,CAAC,CAAC","sourcesContent":["/**\n * SSO Connection Schema (Shared) — Polymorphic\n *\n * Individual SSO provider connections with protocol discriminator (OIDC vs SAML).\n * Unified resource — `protocol` field determines which sub-object is populated.\n * Both OIDC and SAML protocol engines consume this shared discriminator.\n * Scope FK (organizationId / applicationId) is injected by the polymorphism engine.\n *\n * @see auth-data-model-audit.md §2B\n */\n\nimport { z } from 'zod';\nimport { AUTH_SCOPE_VARIANTS } from '../authentication.shared.schemas';\nimport { declarePolymorphicSchemas, optOutPolymorphicAutoBusinessKey } from '../../../resources/utils/resource-polymorphism.schemas';\n\n/** Interactive single-sign-on protocols supported by an SSO connection. */\nexport enum SsoProtocol {\n OIDC = 'oidc',\n SAML = 'saml',\n}\n\nexport const SSOTemplateMode = {\n TEMPLATE: 'template',\n DISCOVERY: 'discovery',\n MANUAL: 'manual',\n} as const;\n\nexport const SSOResponseType = {\n CODE: 'code',\n ID_TOKEN: 'id_token',\n TOKEN: 'token',\n} as const;\n\nexport const SSOResponseMode = {\n QUERY: 'query',\n FRAGMENT: 'fragment',\n FORM_POST: 'form_post',\n} as const;\n\nexport const SSOPrompt = {\n NONE: 'none',\n LOGIN: 'login',\n CONSENT: 'consent',\n SELECT_ACCOUNT: 'select_account',\n} as const;\n\nexport const SSOPKCEMethod = {\n S256: 'S256',\n PLAIN: 'plain',\n} as const;\n\nexport const SamlNameIdFormat = {\n UNSPECIFIED: 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified',\n EMAIL_ADDRESS: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',\n PERSISTENT: 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',\n TRANSIENT: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient',\n} as const;\n\nexport const SsoConnectionBaseSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n protocol: z.enum(SsoProtocol).isSummaryField(),\n externalProviderId: z.string().min(1).optional(),\n displayName: z.string().min(1).isSummaryField(),\n // `.isAuditEvidence()` — `enabled` is the connection's live/dead switch and `isDefault` decides\n // which IdP silently receives logins. Marked individually rather than on any parent: this\n // schema carries `x509Certificates` under `.isBackendOnly()`, and marking a container records\n // the WHOLE object into rows that replicate to an unerasable ledger.\n // assurance-control: WILDO.IDENTITY.SESSION_ASSURANCE — the live/dead switch and the default IdP\n // decide which identity provider is trusted to authenticate this tenant.\n enabled: z.boolean().default(true).isSummaryField().isAuditEvidence(),\n isDefault: z.boolean().default(false).isAuditEvidence(),\n\n // `.isAuditEvidence()` on the SAML leaves below — they say WHERE this connection federates\n // (`entityId` / `ssoUrl` / `sloUrl`) and HOW strictly it validates the IdP (`signRequests`,\n // `wantAssertionsSigned`, `allowedClockDrift`, `forceAuthn`, `maxAuthAge`, `nameIdFormat`,\n // `allowIdpInitiated`). A silent change here redirects the trust anchor or accepts unsigned/replayed\n // assertions — an authentication-assurance change the field NAME alone cannot evidence — so a\n // reviewer must see the before/after value. Marked per LEAF, never on the `saml` container: the\n // certificate material (`x509Certificates` / `x509CertificatePem`) sits beside these and marking the\n // container would copy key material into an unerasable ledger. The two-level `attributeMapping` /\n // `auditSettings` leaves are deliberately NOT marked — the evidence resolver reaches one level of\n // nesting only, so a marker there would be inert.\n // assurance-control: WILDO.IDENTITY.SESSION_ASSURANCE — the IdP endpoints and signature/replay\n // validation posture decide which provider is trusted to authenticate this tenant and whether its\n // assertions are actually verified.\n saml: z.object({\n entityId: z.string().min(1).isAuditEvidence(),\n ssoUrl: z.url().isAuditEvidence(),\n sloUrl: z.url().optional().isAuditEvidence(),\n /** Frontend input: PEM-encoded certificate(s). Backend transforms to x509Certificates. */\n x509CertificatePem: z.string().min(1).optional(),\n x509Certificates: z.array(z.string()).min(1).isBackendOnly(),\n attributeMapping: z.object({\n email: z.string().default('http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress'),\n firstName: z.string().default('http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname'),\n lastName: z.string().default('http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname'),\n roles: z.string().optional(),\n department: z.string().optional(),\n employeeId: z.string().optional(),\n groups: z.string().optional(),\n }),\n signRequests: z.boolean().default(true).isAuditEvidence(),\n wantAssertionsSigned: z.boolean().default(true).isAuditEvidence(),\n allowedClockDrift: z.number().min(0).max(300).default(30).isAuditEvidence(),\n forceAuthn: z.boolean().default(false).isAuditEvidence(),\n maxAuthAge: z.number().min(0).optional().isAuditEvidence(),\n nameIdFormat: z.enum(SamlNameIdFormat).default(SamlNameIdFormat.EMAIL_ADDRESS).isAuditEvidence(),\n allowIdpInitiated: z.boolean().default(false).isAuditEvidence(),\n auditSettings: z.object({\n logAuthAttempts: z.boolean().default(true),\n logAttributeMapping: z.boolean().default(true),\n retentionDays: z.number().min(1).max(2555).default(90),\n }),\n }).optional(),\n\n // `.isAuditEvidence()` on the OIDC leaves below — like the SAML block, they say WHERE this connection\n // federates (`discoveryUrl` / `issuer` / the four endpoints / `jwksUri` / `endSessionEndpoint` /\n // `clientId`) and HOW strictly it validates tokens (`pkceEnabled`, `pkceMethod`), plus what it\n // requests (`scopes` / `customScopes` / `responseType` / `responseMode` / template + auth-request\n // shaping, including the `acrValues` step-up demand). Turning `pkceEnabled` off, or repointing\n // `issuer` / `jwksUri`, silently breaks the token trust chain, so a reviewer must see the\n // before/after — and so does a change to `acrValues`, which is an authentication-strength\n // requirement placed on the identity provider. `clientSecret` is NEVER marked (it is\n // a write-only secret); `claimsMapping` / `auditSettings` are two-level and out of the resolver's\n // one-level reach.\n // assurance-control: WILDO.IDENTITY.SESSION_ASSURANCE — the OIDC endpoints, issuer and token-\n // validation posture decide which provider is trusted and whether its tokens are actually verified.\n oidc: z.object({\n templateMode: z.enum(SSOTemplateMode).default(SSOTemplateMode.MANUAL).isAuditEvidence(),\n templateOverrides: z.record(z.string(), z.string()).optional().isAuditEvidence(),\n customScopes: z.array(z.string()).optional().isAuditEvidence(),\n discoveryUrl: z.url().optional().isAuditEvidence(),\n issuer: z.url().optional().isAuditEvidence(),\n authorizationEndpoint: z.url().optional().isAuditEvidence(),\n tokenEndpoint: z.url().optional().isAuditEvidence(),\n userInfoEndpoint: z.url().optional().isAuditEvidence(),\n jwksUri: z.url().optional().isAuditEvidence(),\n endSessionEndpoint: z.url().optional().isAuditEvidence(),\n clientId: z.string().min(1).isAuditEvidence(),\n /**\n * OIDC/OAuth2 client secret issued by the IdP, used by the backend token\n * exchange (`oauth2-connection-resolver` → `exchangeCodeForTokens`) to\n * authenticate this connection at the provider's token endpoint.\n *\n * `.isWriteOnlySecret()` gives it the framework's write-then-masked contract:\n * the operator sets/rotates it (stays in the CREATE/UPDATE request DTO) and it\n * stays in the response DTO so the UI renders a masked placeholder, but the\n * framework redacts it to `••••••••` at the client-serialization boundary only\n * — internal reads (`servicesRegistryHandler.read` during token exchange) keep\n * the real value. Do NOT use `.isBackendOnly()`: that strips the field from\n * every client DTO, so the operator could never supply it.\n *\n * Preservation on UPDATE is NOT automatic here: this is a nested field, and the\n * repository UPDATE is a whole-subdocument `$set` (no deep merge), so a\n * round-tripped mask must be re-injected from the stored record by the SSO\n * connection UPDATE custom-impl (`sso-connection.custom-impl` prefix). The\n * central sentinel-strip only preserves TOP-LEVEL write-only secrets.\n */\n clientSecret: z.string().min(1).isWriteOnlySecret(),\n scopes: z.array(z.string()).default(['openid', 'email', 'profile']).isAuditEvidence(),\n responseType: z.enum(SSOResponseType).default(SSOResponseType.CODE).isAuditEvidence(),\n responseMode: z.enum(SSOResponseMode).optional().isAuditEvidence(),\n claimsMapping: z.object({\n email: z.string().default('email'),\n firstName: z.string().default('given_name'),\n lastName: z.string().default('family_name'),\n roles: z.string().optional(),\n department: z.string().optional(),\n employeeId: z.string().optional(),\n groups: z.string().optional(),\n }),\n /*\n * NO `validateIssuer` / `validateAudience` / `clockTolerance`. All three were declared here,\n * persisted and audit-marked, and read by nothing — and they were inert in the SAFE direction,\n * which is why they were removed rather than honoured (#419, decided 2026-09-08).\n *\n * `verifyIdToken` ALWAYS verifies the issuer and the audience and hardcodes a five-minute\n * maximum token age. Honouring the three toggles could therefore only ever LOOSEN a guard that\n * is currently unconditional — an operator could switch off issuer or audience validation and\n * break the token trust chain from a settings screen. A configuration field whose only\n * achievable effect is to weaken a security control should not exist.\n */\n acrValues: z.array(z.string()).optional().isAuditEvidence(),\n maxAge: z.number().min(0).optional().isAuditEvidence(),\n prompt: z.enum(SSOPrompt).optional().isAuditEvidence(),\n pkceEnabled: z.boolean().default(true).isAuditEvidence(),\n pkceMethod: z.enum(SSOPKCEMethod).default(SSOPKCEMethod.S256).isAuditEvidence(),\n auditSettings: z.object({\n logAuthAttempts: z.boolean().default(true),\n logTokenExchange: z.boolean().default(true),\n logClaimsMapping: z.boolean().default(true),\n retentionDays: z.number().min(1).max(2555).default(90),\n }),\n }).optional(),\n\n autoCreateUsers: z.boolean().default(true),\n autoVerifyEmail: z.boolean().default(true),\n /** W2.8: if true, users authenticating via this SSO connection skip the application-level MFA policy. */\n // `.isAuditEvidence()` — an explicit escape from the application MFA policy for everyone who\n // authenticates through this connection. Flipping it on lowers the assurance level tenant-wide.\n bypassAppMFA: z.boolean().default(false).isAuditEvidence(),\n // `.isAuditEvidence()` on all four — this is the connection's ROLE-GRANT surface. `defaultRole`\n // and the two mappings decide what authority an externally-authenticated identity lands with,\n // and `allowedDomains` decides whose identities the connection will accept at all. A change\n // here is an authorization change; the field NAME alone cannot evidence it.\n // The values are role names and domains — configuration, not personal data.\n // assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE — these decide what authority an\n // externally-authenticated identity lands with, and whose identities are accepted.\n defaultRole: z.string().optional().isAuditEvidence(),\n allowedDomains: z.array(z.string()).default([]).isDBIndexed().isAuditEvidence(),\n roleMapping: z.record(z.string(), z.string()).optional().isAuditEvidence(),\n groupMapping: z.record(z.string(), z.array(z.string())).optional().isAuditEvidence(),\n\n createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n});\n// NOTE: Protocol-config discriminant enforcement (protocol=saml → saml defined, protocol=oidc → oidc defined)\n// is validated at the backend service layer, not via .refine() here.\n// Zod 4 doesn't allow .extend() on refined objects, which breaks the polymorphism engine.\n\n\nexport type SsoConnectionBase = z.infer<typeof SsoConnectionBaseSchema>;\n\nexport const ssoConnectionPolymorphicDeclaration = declarePolymorphicSchemas({\n baseResourceType: 'ssoConnections',\n baseFieldIdentifier: 'ssoConnectionId',\n baseEnumKey: 'SSO_CONNECTIONS',\n baseSchema: SsoConnectionBaseSchema,\n // Many connections per scope (LIST/CREATE/UPDATE/DELETE) — opt out of the\n // polymorphism engine's singleton-per-scope business-key auto-default.\n variants: AUTH_SCOPE_VARIANTS.map(optOutPolymorphicAutoBusinessKey),\n});\n"]}
|
|
1
|
+
{"version":3,"file":"sso-connection.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/security/authentications/sso/sso-connection.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EA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,MAAM,mCAAmC,GAAG,yBAAyB,CAAC;IAC3E,gBAAgB,EAAE,gBAAgB;IAClC,mBAAmB,EAAE,iBAAiB;IACtC,WAAW,EAAE,iBAAiB;IAC9B,UAAU,EAAE,uBAAuB;IACnC,0EAA0E;IAC1E,uEAAuE;IACvE,QAAQ,EAAE,mBAAmB,CAAC,GAAG,CAAC,gCAAgC,CAAC;CACpE,CAAC,CAAC","sourcesContent":["/**\n * SSO Connection Schema (Shared) — Polymorphic\n *\n * Individual SSO provider connections with protocol discriminator (OIDC vs SAML).\n * Unified resource — `protocol` field determines which sub-object is populated.\n * Both OIDC and SAML protocol engines consume this shared discriminator.\n * Scope FK (organizationId / applicationId) is injected by the polymorphism engine.\n *\n * @see auth-data-model-audit.md §2B\n */\n\nimport { z } from 'zod';\nimport { AUTH_SCOPE_VARIANTS } from '../authentication.shared.schemas';\nimport { declarePolymorphicSchemas, optOutPolymorphicAutoBusinessKey } from '../../../resources/utils/resource-polymorphism.schemas';\n\n/** Interactive single-sign-on protocols supported by an SSO connection. */\nexport enum SsoProtocol {\n OIDC = 'oidc',\n SAML = 'saml',\n}\n\nexport const SSOTemplateMode = {\n TEMPLATE: 'template',\n DISCOVERY: 'discovery',\n MANUAL: 'manual',\n} as const;\n\nexport const SSOResponseType = {\n CODE: 'code',\n ID_TOKEN: 'id_token',\n TOKEN: 'token',\n} as const;\n\nexport const SSOResponseMode = {\n QUERY: 'query',\n FRAGMENT: 'fragment',\n FORM_POST: 'form_post',\n} as const;\n\nexport const SSOPrompt = {\n NONE: 'none',\n LOGIN: 'login',\n CONSENT: 'consent',\n SELECT_ACCOUNT: 'select_account',\n} as const;\n\nexport const SSOPKCEMethod = {\n S256: 'S256',\n PLAIN: 'plain',\n} as const;\n\nexport const SamlNameIdFormat = {\n UNSPECIFIED: 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified',\n EMAIL_ADDRESS: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',\n PERSISTENT: 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',\n TRANSIENT: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient',\n} as const;\n\nexport const SsoConnectionBaseSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n protocol: z.enum(SsoProtocol).isSummaryField(),\n externalProviderId: z.string().min(1).optional(),\n displayName: z.string().min(1).isSummaryField(),\n // `.isAuditEvidence()` — `enabled` is the connection's live/dead switch and `isDefault` decides\n // which IdP silently receives logins. Marked individually rather than on any parent: this\n // schema carries `x509Certificates` under `.isBackendOnly()`, and marking a container records\n // the WHOLE object into rows that replicate to an unerasable ledger.\n // assurance-control: WILDO.IDENTITY.SESSION_ASSURANCE — the live/dead switch and the default IdP\n // decide which identity provider is trusted to authenticate this tenant.\n enabled: z.boolean().default(true).isSummaryField().isAuditEvidence(),\n isDefault: z.boolean().default(false).isAuditEvidence(),\n\n // `.isAuditEvidence()` on the SAML leaves below — they say WHERE this connection federates\n // (`entityId` / `ssoUrl` / `sloUrl`) and HOW strictly it validates the IdP (`signRequests`,\n // `wantAssertionsSigned`, `allowedClockDrift`, `forceAuthn`, `maxAuthAge`, `nameIdFormat`,\n // `allowIdpInitiated`). A silent change here redirects the trust anchor or accepts unsigned/replayed\n // assertions — an authentication-assurance change the field NAME alone cannot evidence — so a\n // reviewer must see the before/after value. Marked per LEAF, never on the `saml` container: the\n // certificate material (`x509Certificates` / `x509CertificatePem`) sits beside these and marking the\n // container would copy key material into an unerasable ledger. The two-level `attributeMapping` /\n // `auditSettings` leaves are deliberately NOT marked — the evidence resolver reaches one level of\n // nesting only, so a marker there would be inert.\n // assurance-control: WILDO.IDENTITY.SESSION_ASSURANCE — the IdP endpoints and signature/replay\n // validation posture decide which provider is trusted to authenticate this tenant and whether its\n // assertions are actually verified.\n saml: z.object({\n entityId: z.string().min(1).isAuditEvidence(),\n ssoUrl: z.url().isAuditEvidence(),\n sloUrl: z.url().optional().isAuditEvidence(),\n /** Frontend input: PEM-encoded certificate(s). Backend transforms to x509Certificates. */\n x509CertificatePem: z.string().min(1).optional(),\n x509Certificates: z.array(z.string()).min(1).isBackendOnly(),\n attributeMapping: z.object({\n email: z.string().default('http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress'),\n firstName: z.string().default('http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname'),\n lastName: z.string().default('http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname'),\n roles: z.string().optional(),\n department: z.string().optional(),\n employeeId: z.string().optional(),\n groups: z.string().optional(),\n }),\n signRequests: z.boolean().default(true).isAuditEvidence(),\n wantAssertionsSigned: z.boolean().default(true).isAuditEvidence(),\n allowedClockDrift: z.number().min(0).max(300).default(30).isAuditEvidence(),\n forceAuthn: z.boolean().default(false).isAuditEvidence(),\n maxAuthAge: z.number().min(0).optional().isAuditEvidence(),\n nameIdFormat: z.enum(SamlNameIdFormat).default(SamlNameIdFormat.EMAIL_ADDRESS).isAuditEvidence(),\n allowIdpInitiated: z.boolean().default(false).isAuditEvidence(),\n auditSettings: z.object({\n logAuthAttempts: z.boolean().default(true),\n logAttributeMapping: z.boolean().default(true),\n retentionDays: z.number().min(1).max(2555).default(90),\n }),\n }).optional(),\n\n // `.isAuditEvidence()` on the OIDC leaves below — like the SAML block, they say WHERE this connection\n // federates (`discoveryUrl` / `issuer` / the four endpoints / `jwksUri` / `endSessionEndpoint` /\n // `clientId`) and HOW strictly it validates tokens (`pkceEnabled`, `pkceMethod`), plus what it\n // requests (`scopes` / `customScopes` / `responseType` / `responseMode` / template + auth-request\n // shaping, including the `acrValues` step-up demand). Turning `pkceEnabled` off, or repointing\n // `issuer` / `jwksUri`, silently breaks the token trust chain, so a reviewer must see the\n // before/after — and so does a change to `acrValues`, which is an authentication-strength\n // requirement placed on the identity provider. `clientSecret` is NEVER marked (it is\n // a write-only secret); `claimsMapping` / `auditSettings` are two-level and out of the resolver's\n // one-level reach.\n // assurance-control: WILDO.IDENTITY.SESSION_ASSURANCE — the OIDC endpoints, issuer and token-\n // validation posture decide which provider is trusted and whether its tokens are actually verified.\n oidc: z.object({\n templateMode: z.enum(SSOTemplateMode).default(SSOTemplateMode.MANUAL).isAuditEvidence(),\n templateOverrides: z.record(z.string(), z.string()).optional().isAuditEvidence(),\n customScopes: z.array(z.string()).optional().isAuditEvidence(),\n discoveryUrl: z.url().optional().isAuditEvidence(),\n issuer: z.url().optional().isAuditEvidence(),\n authorizationEndpoint: z.url().optional().isAuditEvidence(),\n tokenEndpoint: z.url().optional().isAuditEvidence(),\n userInfoEndpoint: z.url().optional().isAuditEvidence(),\n jwksUri: z.url().optional().isAuditEvidence(),\n endSessionEndpoint: z.url().optional().isAuditEvidence(),\n /**\n * Redirect the browser to the identity provider's `endSessionEndpoint` when this connection's\n * user logs out of Wildo — RP-initiated logout (issue #445).\n *\n * OPT-IN, and `false` by default, mirroring SAML's `singleLogoutEnabled` rather than inventing a\n * second shape for the same question. Defaulting it on would change the logout behaviour of\n * every existing connection that merely happens to have discovered an `end_session_endpoint`,\n * which for the DISCOVERY template mode is most of them: the endpoint is read out of the\n * provider's own document, so its presence records what the provider CAN do, never what the\n * operator wants.\n *\n * The endpoint is the CAPABILITY and this is the DECISION. Both are needed — a connection with\n * this on and no endpoint federates nothing, and says so in the log rather than failing a logout.\n */\n federatedLogoutEnabled: z.boolean().default(false).isAuditEvidence(),\n clientId: z.string().min(1).isAuditEvidence(),\n /**\n * OIDC/OAuth2 client secret issued by the IdP, used by the backend token\n * exchange (`oauth2-connection-resolver` → `exchangeCodeForTokens`) to\n * authenticate this connection at the provider's token endpoint.\n *\n * `.isWriteOnlySecret()` gives it the framework's write-then-masked contract:\n * the operator sets/rotates it (stays in the CREATE/UPDATE request DTO) and it\n * stays in the response DTO so the UI renders a masked placeholder, but the\n * framework redacts it to `••••••••` at the client-serialization boundary only\n * — internal reads (`servicesRegistryHandler.read` during token exchange) keep\n * the real value. Do NOT use `.isBackendOnly()`: that strips the field from\n * every client DTO, so the operator could never supply it.\n *\n * Preservation on UPDATE is NOT automatic here: this is a nested field, and the\n * repository UPDATE is a whole-subdocument `$set` (no deep merge), so a\n * round-tripped mask must be re-injected from the stored record by the SSO\n * connection UPDATE custom-impl (`sso-connection.custom-impl` prefix). The\n * central sentinel-strip only preserves TOP-LEVEL write-only secrets.\n */\n clientSecret: z.string().min(1).isWriteOnlySecret(),\n scopes: z.array(z.string()).default(['openid', 'email', 'profile']).isAuditEvidence(),\n responseType: z.enum(SSOResponseType).default(SSOResponseType.CODE).isAuditEvidence(),\n responseMode: z.enum(SSOResponseMode).optional().isAuditEvidence(),\n claimsMapping: z.object({\n email: z.string().default('email'),\n firstName: z.string().default('given_name'),\n lastName: z.string().default('family_name'),\n roles: z.string().optional(),\n department: z.string().optional(),\n employeeId: z.string().optional(),\n groups: z.string().optional(),\n }),\n /*\n * NO `validateIssuer` / `validateAudience` / `clockTolerance`. All three were declared here,\n * persisted and audit-marked, and read by nothing — and they were inert in the SAFE direction,\n * which is why they were removed rather than honoured (#419, decided 2026-09-08).\n *\n * `verifyIdToken` ALWAYS verifies the issuer and the audience and hardcodes a five-minute\n * maximum token age. Honouring the three toggles could therefore only ever LOOSEN a guard that\n * is currently unconditional — an operator could switch off issuer or audience validation and\n * break the token trust chain from a settings screen. A configuration field whose only\n * achievable effect is to weaken a security control should not exist.\n */\n acrValues: z.array(z.string()).optional().isAuditEvidence(),\n maxAge: z.number().min(0).optional().isAuditEvidence(),\n prompt: z.enum(SSOPrompt).optional().isAuditEvidence(),\n pkceEnabled: z.boolean().default(true).isAuditEvidence(),\n pkceMethod: z.enum(SSOPKCEMethod).default(SSOPKCEMethod.S256).isAuditEvidence(),\n auditSettings: z.object({\n logAuthAttempts: z.boolean().default(true),\n logTokenExchange: z.boolean().default(true),\n logClaimsMapping: z.boolean().default(true),\n retentionDays: z.number().min(1).max(2555).default(90),\n }),\n }).optional(),\n\n autoCreateUsers: z.boolean().default(true),\n autoVerifyEmail: z.boolean().default(true),\n /** W2.8: if true, users authenticating via this SSO connection skip the application-level MFA policy. */\n // `.isAuditEvidence()` — an explicit escape from the application MFA policy for everyone who\n // authenticates through this connection. Flipping it on lowers the assurance level tenant-wide.\n bypassAppMFA: z.boolean().default(false).isAuditEvidence(),\n // `.isAuditEvidence()` on all four — this is the connection's ROLE-GRANT surface. `defaultRole`\n // and the two mappings decide what authority an externally-authenticated identity lands with,\n // and `allowedDomains` decides whose identities the connection will accept at all. A change\n // here is an authorization change; the field NAME alone cannot evidence it.\n // The values are role names and domains — configuration, not personal data.\n // assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE — these decide what authority an\n // externally-authenticated identity lands with, and whose identities are accepted.\n defaultRole: z.string().optional().isAuditEvidence(),\n allowedDomains: z.array(z.string()).default([]).isDBIndexed().isAuditEvidence(),\n roleMapping: z.record(z.string(), z.string()).optional().isAuditEvidence(),\n groupMapping: z.record(z.string(), z.array(z.string())).optional().isAuditEvidence(),\n\n createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n});\n// NOTE: Protocol-config discriminant enforcement (protocol=saml → saml defined, protocol=oidc → oidc defined)\n// is validated at the backend service layer, not via .refine() here.\n// Zod 4 doesn't allow .extend() on refined objects, which breaks the polymorphism engine.\n\n\nexport type SsoConnectionBase = z.infer<typeof SsoConnectionBaseSchema>;\n\nexport const ssoConnectionPolymorphicDeclaration = declarePolymorphicSchemas({\n baseResourceType: 'ssoConnections',\n baseFieldIdentifier: 'ssoConnectionId',\n baseEnumKey: 'SSO_CONNECTIONS',\n baseSchema: SsoConnectionBaseSchema,\n // Many connections per scope (LIST/CREATE/UPDATE/DELETE) — opt out of the\n // polymorphism engine's singleton-per-scope business-key auto-default.\n variants: AUTH_SCOPE_VARIANTS.map(optOutPolymorphicAutoBusinessKey),\n});\n"]}
|
|
@@ -27,11 +27,53 @@
|
|
|
27
27
|
* an administrative-continuity refusal" with one check and still distinguish the scope when it wants
|
|
28
28
|
* to — which two unrelated enums would not.
|
|
29
29
|
*/
|
|
30
|
+
/** @wildo_source:part:start saas.models.authorization.administrative-continuity-codes facet:layer:shared facet:audience:app-developer */
|
|
30
31
|
/**
|
|
31
32
|
* Which administrative population a refusal was protecting.
|
|
32
33
|
*
|
|
33
|
-
* A closed vocabulary with one named runtime source: schemas,
|
|
34
|
-
* derive from this enum rather than re-typing the literals.
|
|
34
|
+
* Imported from `@wildo-ai/saas-models`. A closed vocabulary with one named runtime source: schemas,
|
|
35
|
+
* comparisons and client branches all derive from this enum rather than re-typing the literals.
|
|
36
|
+
*
|
|
37
|
+
* ## Where you meet it
|
|
38
|
+
*
|
|
39
|
+
* A write that would strip the last accountable administrator is refused with HTTP **409 CONFLICT**,
|
|
40
|
+
* and this value rides under the response's stable `code` key. Branch on `code`, never on the
|
|
41
|
+
* message: the message is a human remedy and is free to be reworded, and every other field a backend
|
|
42
|
+
* might have used to carry the reason is stripped from a CONFLICT before it reaches a client.
|
|
43
|
+
*
|
|
44
|
+
* `409` and not `403`/`400` is deliberate and worth handling separately: the caller IS authorised and
|
|
45
|
+
* the payload IS valid. What forbids the write is the current state, so a generic "conflict, retry"
|
|
46
|
+
* branch loops forever — the remedy is to appoint another administrator at the named scope first.
|
|
47
|
+
*
|
|
48
|
+
* ## What counts as an administrator, when you are deciding whether the remedy will work
|
|
49
|
+
*
|
|
50
|
+
* Three conditions, all of which must hold, and each resolved toward the SMALLER count so an
|
|
51
|
+
* ambiguity produces an over-refusal (recoverable) rather than a lockout (not):
|
|
52
|
+
*
|
|
53
|
+
* 1. the roles must CONFER the anchor role — `APP_ADMIN_SUPER_ADMIN` at application scope,
|
|
54
|
+
* `ORG_OWNER` at organization scope — directly OR through an `inheritFrom` chain. The conferring
|
|
55
|
+
* set is resolved from your application's LIVE role table at the moment of the call, so a role you
|
|
56
|
+
* registered yourself that inherits from the anchor counts, and its holders are equally protected;
|
|
57
|
+
* 2. the membership must be `ACTIVE`. An `INVITED` row does not count even though accepting it would
|
|
58
|
+
* flip the same row — a recoverable administrator is not a usable one, and the invitee may never
|
|
59
|
+
* accept;
|
|
60
|
+
* 3. the linked user account must be `ACTIVE`. A suspended user cannot present the membership at all.
|
|
61
|
+
*
|
|
62
|
+
* ## Two traps
|
|
63
|
+
*
|
|
64
|
+
* **A UNIT-scoped grant does not satisfy the organization floor.** Granting the owner role inside one
|
|
65
|
+
* organization unit reaches that unit and nothing across the tenant, so the floor — which reads
|
|
66
|
+
* organization-wide membership roles and nothing else — refuses the retry exactly as before. Promote
|
|
67
|
+
* an organization-wide member instead.
|
|
68
|
+
*
|
|
69
|
+
* **Deactivating a user REPORTS rather than refuses.** Suspending an account is overwhelmingly
|
|
70
|
+
* incident response, and refusing it would mean an operator cannot lock out a hostile owner without
|
|
71
|
+
* first transferring ownership using the tenant the attacker controls. So the containment proceeds
|
|
72
|
+
* and every tenant it strands is recorded at critical severity — do not read this refusal as a
|
|
73
|
+
* guarantee that no suspension can leave a tenant ownerless.
|
|
74
|
+
*
|
|
75
|
+
* A tenant that is finished is exempt: a `CANCELLED` or `DELETED` organization, or one that has
|
|
76
|
+
* already requested deletion, may lose its last owner, so ordinary offboarding is never blocked.
|
|
35
77
|
*/
|
|
36
78
|
export declare enum AdministrativeContinuityErrorCode {
|
|
37
79
|
/**
|
|
@@ -54,4 +96,5 @@ export declare enum AdministrativeContinuityErrorCode {
|
|
|
54
96
|
*/
|
|
55
97
|
LAST_ORGANIZATION_OWNER = "LAST_ORGANIZATION_OWNER"
|
|
56
98
|
}
|
|
99
|
+
/** @wildo_source:part:end saas.models.authorization.administrative-continuity-codes */
|
|
57
100
|
//# sourceMappingURL=administrative-continuity.shared.schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"administrative-continuity.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"administrative-continuity.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/security/authorizations/administrative-continuity.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,yIAAyI;AACzI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,oBAAY,iCAAiC;IAC3C;;;;;;;OAOG;IACH,4BAA4B,iCAAiC;IAE7D;;;;;;;;OAQG;IACH,uBAAuB,4BAA4B;CACpD;AACD,uFAAuF"}
|
|
@@ -27,11 +27,53 @@
|
|
|
27
27
|
* an administrative-continuity refusal" with one check and still distinguish the scope when it wants
|
|
28
28
|
* to — which two unrelated enums would not.
|
|
29
29
|
*/
|
|
30
|
+
/** @wildo_source:part:start saas.models.authorization.administrative-continuity-codes facet:layer:shared facet:audience:app-developer */
|
|
30
31
|
/**
|
|
31
32
|
* Which administrative population a refusal was protecting.
|
|
32
33
|
*
|
|
33
|
-
* A closed vocabulary with one named runtime source: schemas,
|
|
34
|
-
* derive from this enum rather than re-typing the literals.
|
|
34
|
+
* Imported from `@wildo-ai/saas-models`. A closed vocabulary with one named runtime source: schemas,
|
|
35
|
+
* comparisons and client branches all derive from this enum rather than re-typing the literals.
|
|
36
|
+
*
|
|
37
|
+
* ## Where you meet it
|
|
38
|
+
*
|
|
39
|
+
* A write that would strip the last accountable administrator is refused with HTTP **409 CONFLICT**,
|
|
40
|
+
* and this value rides under the response's stable `code` key. Branch on `code`, never on the
|
|
41
|
+
* message: the message is a human remedy and is free to be reworded, and every other field a backend
|
|
42
|
+
* might have used to carry the reason is stripped from a CONFLICT before it reaches a client.
|
|
43
|
+
*
|
|
44
|
+
* `409` and not `403`/`400` is deliberate and worth handling separately: the caller IS authorised and
|
|
45
|
+
* the payload IS valid. What forbids the write is the current state, so a generic "conflict, retry"
|
|
46
|
+
* branch loops forever — the remedy is to appoint another administrator at the named scope first.
|
|
47
|
+
*
|
|
48
|
+
* ## What counts as an administrator, when you are deciding whether the remedy will work
|
|
49
|
+
*
|
|
50
|
+
* Three conditions, all of which must hold, and each resolved toward the SMALLER count so an
|
|
51
|
+
* ambiguity produces an over-refusal (recoverable) rather than a lockout (not):
|
|
52
|
+
*
|
|
53
|
+
* 1. the roles must CONFER the anchor role — `APP_ADMIN_SUPER_ADMIN` at application scope,
|
|
54
|
+
* `ORG_OWNER` at organization scope — directly OR through an `inheritFrom` chain. The conferring
|
|
55
|
+
* set is resolved from your application's LIVE role table at the moment of the call, so a role you
|
|
56
|
+
* registered yourself that inherits from the anchor counts, and its holders are equally protected;
|
|
57
|
+
* 2. the membership must be `ACTIVE`. An `INVITED` row does not count even though accepting it would
|
|
58
|
+
* flip the same row — a recoverable administrator is not a usable one, and the invitee may never
|
|
59
|
+
* accept;
|
|
60
|
+
* 3. the linked user account must be `ACTIVE`. A suspended user cannot present the membership at all.
|
|
61
|
+
*
|
|
62
|
+
* ## Two traps
|
|
63
|
+
*
|
|
64
|
+
* **A UNIT-scoped grant does not satisfy the organization floor.** Granting the owner role inside one
|
|
65
|
+
* organization unit reaches that unit and nothing across the tenant, so the floor — which reads
|
|
66
|
+
* organization-wide membership roles and nothing else — refuses the retry exactly as before. Promote
|
|
67
|
+
* an organization-wide member instead.
|
|
68
|
+
*
|
|
69
|
+
* **Deactivating a user REPORTS rather than refuses.** Suspending an account is overwhelmingly
|
|
70
|
+
* incident response, and refusing it would mean an operator cannot lock out a hostile owner without
|
|
71
|
+
* first transferring ownership using the tenant the attacker controls. So the containment proceeds
|
|
72
|
+
* and every tenant it strands is recorded at critical severity — do not read this refusal as a
|
|
73
|
+
* guarantee that no suspension can leave a tenant ownerless.
|
|
74
|
+
*
|
|
75
|
+
* A tenant that is finished is exempt: a `CANCELLED` or `DELETED` organization, or one that has
|
|
76
|
+
* already requested deletion, may lose its last owner, so ordinary offboarding is never blocked.
|
|
35
77
|
*/
|
|
36
78
|
export var AdministrativeContinuityErrorCode;
|
|
37
79
|
(function (AdministrativeContinuityErrorCode) {
|
|
@@ -55,4 +97,5 @@ export var AdministrativeContinuityErrorCode;
|
|
|
55
97
|
*/
|
|
56
98
|
AdministrativeContinuityErrorCode["LAST_ORGANIZATION_OWNER"] = "LAST_ORGANIZATION_OWNER";
|
|
57
99
|
})(AdministrativeContinuityErrorCode || (AdministrativeContinuityErrorCode = {}));
|
|
100
|
+
/** @wildo_source:part:end saas.models.authorization.administrative-continuity-codes */
|
|
58
101
|
//# sourceMappingURL=administrative-continuity.shared.schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"administrative-continuity.shared.schemas.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"administrative-continuity.shared.schemas.js","sourceRoot":"","sources":["../../../../src/security/authorizations/administrative-continuity.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,yIAAyI;AACzI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,CAAN,IAAY,iCAqBX;AArBD,WAAY,iCAAiC;IAC3C;;;;;;;OAOG;IACH,kGAA6D,CAAA;IAE7D;;;;;;;;OAQG;IACH,wFAAmD,CAAA;AACrD,CAAC,EArBW,iCAAiC,KAAjC,iCAAiC,QAqB5C;AACD,uFAAuF","sourcesContent":["/**\n * Administrative-continuity refusal codes — the stable, client-branchable identity of a\n * \"you would remove the last accountable administrator\" refusal.\n *\n * assurance-control: WILDO.ACCESS.ADMINISTRATIVE_CONTINUITY — an application, and each of its\n * tenants, must retain an accountable administrative principal.\n *\n * ## Why this exists as a shared enum rather than prose\n *\n * Both authority floors refuse with `ErrorType.CONFLICT`, and `sanitizeErrorForClient` keeps only an\n * ALLOWLIST of context keys on a CONFLICT. The human remedy travels under `message`, which is on that\n * list — but prose is not a contract: a client wanting to tell \"you would strip the last\n * administrator\" apart from any other 409 would have to regex-parse it, and that breaks the moment\n * the wording is improved.\n *\n * The allowlist's own documented rule is that a client-branchable value rides under the stable `code`\n * key, sourced from an enum declared HERE in `@wildo-ai/saas-models` so backend and frontend share one\n * definition — and explicitly NOT under an invented `reason` / `errorKind` field (which the sanitizer\n * strips precisely so that this rule is the only way through). The backend-side `reason` codes remain,\n * unchanged and unshipped: they are the LOG/audit identity, richer than the wire and free to stay so.\n *\n * ## Why one enum for two floors\n *\n * The application floor and the organization-owner floor are distinct authorities over distinct\n * populations, but from a CLIENT's perspective they are one situation with one remedy shape: appoint\n * another administrator at the named scope, then retry. A single enum lets a caller branch on \"this is\n * an administrative-continuity refusal\" with one check and still distinguish the scope when it wants\n * to — which two unrelated enums would not.\n */\n\n/** @wildo_source:part:start saas.models.authorization.administrative-continuity-codes facet:layer:shared facet:audience:app-developer */\n/**\n * Which administrative population a refusal was protecting.\n *\n * Imported from `@wildo-ai/saas-models`. A closed vocabulary with one named runtime source: schemas,\n * comparisons and client branches all derive from this enum rather than re-typing the literals.\n *\n * ## Where you meet it\n *\n * A write that would strip the last accountable administrator is refused with HTTP **409 CONFLICT**,\n * and this value rides under the response's stable `code` key. Branch on `code`, never on the\n * message: the message is a human remedy and is free to be reworded, and every other field a backend\n * might have used to carry the reason is stripped from a CONFLICT before it reaches a client.\n *\n * `409` and not `403`/`400` is deliberate and worth handling separately: the caller IS authorised and\n * the payload IS valid. What forbids the write is the current state, so a generic \"conflict, retry\"\n * branch loops forever — the remedy is to appoint another administrator at the named scope first.\n *\n * ## What counts as an administrator, when you are deciding whether the remedy will work\n *\n * Three conditions, all of which must hold, and each resolved toward the SMALLER count so an\n * ambiguity produces an over-refusal (recoverable) rather than a lockout (not):\n *\n * 1. the roles must CONFER the anchor role — `APP_ADMIN_SUPER_ADMIN` at application scope,\n * `ORG_OWNER` at organization scope — directly OR through an `inheritFrom` chain. The conferring\n * set is resolved from your application's LIVE role table at the moment of the call, so a role you\n * registered yourself that inherits from the anchor counts, and its holders are equally protected;\n * 2. the membership must be `ACTIVE`. An `INVITED` row does not count even though accepting it would\n * flip the same row — a recoverable administrator is not a usable one, and the invitee may never\n * accept;\n * 3. the linked user account must be `ACTIVE`. A suspended user cannot present the membership at all.\n *\n * ## Two traps\n *\n * **A UNIT-scoped grant does not satisfy the organization floor.** Granting the owner role inside one\n * organization unit reaches that unit and nothing across the tenant, so the floor — which reads\n * organization-wide membership roles and nothing else — refuses the retry exactly as before. Promote\n * an organization-wide member instead.\n *\n * **Deactivating a user REPORTS rather than refuses.** Suspending an account is overwhelmingly\n * incident response, and refusing it would mean an operator cannot lock out a hostile owner without\n * first transferring ownership using the tenant the attacker controls. So the containment proceeds\n * and every tenant it strands is recorded at critical severity — do not read this refusal as a\n * guarantee that no suspension can leave a tenant ownerless.\n *\n * A tenant that is finished is exempt: a `CANCELLED` or `DELETED` organization, or one that has\n * already requested deletion, may lose its last owner, so ordinary offboarding is never blocked.\n */\nexport enum AdministrativeContinuityErrorCode {\n /**\n * The write would leave the APPLICATION with no administratively usable super-administrator —\n * a principal that confers `APP_ADMIN_SUPER_ADMIN` (directly or through an `inheritFrom` chain)\n * and whose account status can still authenticate.\n *\n * Unrecoverable in-product once breached: every recovery door is itself gated on that role.\n * Remedy: grant a super-administrator role to another active user, then retry.\n */\n LAST_APPLICATION_SUPER_ADMIN = 'LAST_APPLICATION_SUPER_ADMIN',\n\n /**\n * The write would leave ONE organization with no administratively usable owner — an ACTIVE\n * membership conferring `ORG_OWNER` (directly or by inheritance) whose linked user is also ACTIVE.\n *\n * Unrecoverable in-product once breached, and MORE absolutely than the application case:\n * `ORGANIZATION_MEMBERS` declares no super-administrator variant, so a platform administrator who\n * is not a member of the stranded tenant can observe and destroy it but cannot re-own it.\n * Remedy: grant an owner role to another active member of that organization, then retry.\n */\n LAST_ORGANIZATION_OWNER = 'LAST_ORGANIZATION_OWNER',\n}\n/** @wildo_source:part:end saas.models.authorization.administrative-continuity-codes */\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application Access Grants — resource configuration.
|
|
3
|
+
*
|
|
4
|
+
* The operation set mirrors `platformAccessGrants` verb for verb, and the ONE difference is the whole
|
|
5
|
+
* feature: `approve` is gated on the PLATFORM's own administrators rather than a tenant's, and refuses
|
|
6
|
+
* the requester. On the tenant resource the ABSENCE of `admitsCrossTenantPlatformAdministration` on
|
|
7
|
+
* `approve` is what stops an operator approving their own request; here every verb is platform-tier by
|
|
8
|
+
* construction, so that absence buys nothing and the refusal has to be a MEASUREMENT the
|
|
9
|
+
* implementation makes — `applicationAccessGrantApproverIsDistinct`.
|
|
10
|
+
*
|
|
11
|
+
* See `application-access-grants.shared.schemas.ts` for why the resource exists and why it is a
|
|
12
|
+
* sibling type rather than a field, and `.claude/rules/administrative-continuity-floors.md` for the
|
|
13
|
+
* ladder it sits on.
|
|
14
|
+
*/
|
|
15
|
+
import { z } from 'zod';
|
|
16
|
+
import { ApplicationAccessGrants_Operations } from './application-access-grants.shared.schemas';
|
|
17
|
+
import { PlatformAccessGrantStatus } from './platform-access-grants.shared.schemas';
|
|
18
|
+
import { CoreResourceOperation } from '../../resources/resources.shared.core.definitions';
|
|
19
|
+
import { type ResourceRelationship } from '../../resources/resources.shared.schemas';
|
|
20
|
+
type ApplicationAccessGrantsCoreOperations = CoreResourceOperation.READ | CoreResourceOperation.LIST | CoreResourceOperation.COUNT | CoreResourceOperation.UPDATE_MANY;
|
|
21
|
+
export declare const applicationAccessGrantsResourceConfiguration_InitializationFactory: (resourcesRelationships: ResourceRelationship[]) => import("../..").ResourceConfiguration<typeof ApplicationAccessGrants_Operations, ApplicationAccessGrantsCoreOperations, z.ZodObject<{
|
|
22
|
+
_id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>;
|
|
23
|
+
applicationId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodString>>>>>;
|
|
24
|
+
operatorUserId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>>>>>;
|
|
25
|
+
justification: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>;
|
|
26
|
+
status: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof PlatformAccessGrantStatus>>>>>>>>;
|
|
27
|
+
expiresAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDate>>>>>;
|
|
28
|
+
approvedByUserId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodString>>>>>>;
|
|
29
|
+
approvedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodDate>>>;
|
|
30
|
+
decisionReason: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodString>>>>;
|
|
31
|
+
createdAt: z.ZodOptional<z.ZodDate>;
|
|
32
|
+
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=application-access-grants.shared.resources-config.schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-access-grants.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/security/authorizations/application-access-grants.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEL,kCAAkC,EAEnC,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAwD,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,0CAA0C,CAAC;AAMlD,KAAK,qCAAqC,GACtC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,KAAK,GAE3B,qBAAqB,CAAC,WAAW,CAAC;AAEtC,eAAO,MAAM,kEAAkE,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;kBA6P7H,CAAC"}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application Access Grants — resource configuration.
|
|
3
|
+
*
|
|
4
|
+
* The operation set mirrors `platformAccessGrants` verb for verb, and the ONE difference is the whole
|
|
5
|
+
* feature: `approve` is gated on the PLATFORM's own administrators rather than a tenant's, and refuses
|
|
6
|
+
* the requester. On the tenant resource the ABSENCE of `admitsCrossTenantPlatformAdministration` on
|
|
7
|
+
* `approve` is what stops an operator approving their own request; here every verb is platform-tier by
|
|
8
|
+
* construction, so that absence buys nothing and the refusal has to be a MEASUREMENT the
|
|
9
|
+
* implementation makes — `applicationAccessGrantApproverIsDistinct`.
|
|
10
|
+
*
|
|
11
|
+
* See `application-access-grants.shared.schemas.ts` for why the resource exists and why it is a
|
|
12
|
+
* sibling type rather than a field, and `.claude/rules/administrative-continuity-floors.md` for the
|
|
13
|
+
* ladder it sits on.
|
|
14
|
+
*/
|
|
15
|
+
import { z } from 'zod';
|
|
16
|
+
import { ApplicationAccessGrantSchema, ApplicationAccessGrants_Operations, applicationAccessGrantApproverIsDistinct, } from './application-access-grants.shared.schemas.js';
|
|
17
|
+
import { PlatformAccessGrantStatus } from './platform-access-grants.shared.schemas.js';
|
|
18
|
+
import { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions.js';
|
|
19
|
+
import { ResourceOperationRiskLevel, ResourceOperationVariantType, } from '../../resources/resources.shared.schemas.js';
|
|
20
|
+
import { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory.js';
|
|
21
|
+
import { ResourceSystemAccessMode } from '../../resources/resources-config.shared.schemas.js';
|
|
22
|
+
import { CORE_APP_ROLES } from './roles.shared.schemas.js';
|
|
23
|
+
import { ErasureRetentionMode, ResourceDataSubjectKind } from '../../compliance/privacy/impersonalization.shared.schemas.js';
|
|
24
|
+
export const applicationAccessGrantsResourceConfiguration_InitializationFactory = (resourcesRelationships) => createResourceConfiguration_Initialization({
|
|
25
|
+
mainSchema: ApplicationAccessGrantSchema,
|
|
26
|
+
resourceIdentifier: CoreResourceType.APPLICATION_ACCESS_GRANTS,
|
|
27
|
+
resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.APPLICATION_ACCESS_GRANTS],
|
|
28
|
+
resourceRelationships: resourcesRelationships,
|
|
29
|
+
isSystemResource: true,
|
|
30
|
+
/**
|
|
31
|
+
* `read`/`list` ALLOWED for the trusted path, and for exactly the reason the tenant resource
|
|
32
|
+
* allows them: the authorization layer itself resolves a caller's usable grant on a system
|
|
33
|
+
* context, before the caller's own authority has been established for the read it is gating.
|
|
34
|
+
*
|
|
35
|
+
* No trusted `create`/`update`: every transition belongs to a custom implementation that applies
|
|
36
|
+
* the two-person measurement. A system door around those would be a second way to mint an
|
|
37
|
+
* application-wide elevation, which is the one thing this resource exists to prevent.
|
|
38
|
+
*
|
|
39
|
+
* `exportSubject: FORBIDDEN`, mirrored from the tenant resource. `operatorUserId` and
|
|
40
|
+
* `approvedByUserId` are foreign keys back to USERS, so these rows sit on a user's Art. 15 graph
|
|
41
|
+
* as `INCLUDED_REFERENCES_SUBJECT`; an included resource carrying NO declaration REFUSES the whole
|
|
42
|
+
* export, so omitting this would trade a boot failure for a broken disclosure right. FORBIDDEN
|
|
43
|
+
* because this is a security-monitoring record and handing the monitoring trail to the person it
|
|
44
|
+
* monitors is self-defeating — and because it names ANOTHER data subject's decision (the second
|
|
45
|
+
* administrator), which Art. 15(4) protects.
|
|
46
|
+
*/
|
|
47
|
+
systemAccessPolicy: {
|
|
48
|
+
read: ResourceSystemAccessMode.ALLOWED,
|
|
49
|
+
list: ResourceSystemAccessMode.ALLOWED,
|
|
50
|
+
exportSubject: ResourceSystemAccessMode.FORBIDDEN,
|
|
51
|
+
},
|
|
52
|
+
/**
|
|
53
|
+
* Subject erasure RETAINS this row and scrubs its free text — mirrored from the tenant resource
|
|
54
|
+
* because it is the same kind of record. What survives is WHO reached application-wide, WHEN, and
|
|
55
|
+
* who signed for it; what does not is `justification` and `decisionReason`, the operator- and
|
|
56
|
+
* approver-written prose most likely to name a third party in passing.
|
|
57
|
+
*/
|
|
58
|
+
retentionPolicy: {
|
|
59
|
+
mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE,
|
|
60
|
+
},
|
|
61
|
+
/**
|
|
62
|
+
* Erasing one of these revokes NO session: the grant is a record ABOUT an operator's access, not
|
|
63
|
+
* the operator. Their session ends through the `USERS` row, which is `SELF_PRINCIPAL`.
|
|
64
|
+
*/
|
|
65
|
+
dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },
|
|
66
|
+
coreOperations: [
|
|
67
|
+
CoreResourceOperation.READ,
|
|
68
|
+
CoreResourceOperation.LIST,
|
|
69
|
+
CoreResourceOperation.COUNT,
|
|
70
|
+
// Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.
|
|
71
|
+
CoreResourceOperation.UPDATE_MANY,
|
|
72
|
+
],
|
|
73
|
+
operationsConfiguration: {
|
|
74
|
+
/*
|
|
75
|
+
* Route-less retention plumbing — INTERNAL_CALL registers no route and must not be
|
|
76
|
+
* REPOSITORY_ONLY: the retention primitives resolve through `getServiceOperationPathDefault`,
|
|
77
|
+
* which matches only INTERNAL_CALL / API_CALL. CRITICAL — it is the verb the impersonalize
|
|
78
|
+
* writer uses to stamp markers.
|
|
79
|
+
*/
|
|
80
|
+
[CoreResourceOperation.UPDATE_MANY]: {
|
|
81
|
+
variants: [{
|
|
82
|
+
variantType: ResourceOperationVariantType.INTERNAL_CALL,
|
|
83
|
+
isDefault: true,
|
|
84
|
+
roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
|
|
85
|
+
riskLevel: ResourceOperationRiskLevel.CRITICAL,
|
|
86
|
+
}],
|
|
87
|
+
},
|
|
88
|
+
/**
|
|
89
|
+
* The pending queue a second administrator works from, and the record of what was granted.
|
|
90
|
+
*
|
|
91
|
+
* `APP_ADMIN_SUPER_ADMIN` on every read: the rows name operator reach across every tenant, and
|
|
92
|
+
* there is no tenant-side reader here as there is on the platform resource — an application-wide
|
|
93
|
+
* grant has no customer to show it to. That absence is precisely why the approval had to become
|
|
94
|
+
* a second signature.
|
|
95
|
+
*/
|
|
96
|
+
[CoreResourceOperation.READ]: {
|
|
97
|
+
variants: [
|
|
98
|
+
{
|
|
99
|
+
variantType: ResourceOperationVariantType.API_CALL,
|
|
100
|
+
isDefault: true,
|
|
101
|
+
roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
|
|
102
|
+
riskLevel: ResourceOperationRiskLevel.LOW,
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
[CoreResourceOperation.LIST]: {
|
|
107
|
+
variants: [
|
|
108
|
+
{
|
|
109
|
+
variantType: ResourceOperationVariantType.API_CALL,
|
|
110
|
+
isDefault: true,
|
|
111
|
+
roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
|
|
112
|
+
riskLevel: ResourceOperationRiskLevel.LOW,
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
[CoreResourceOperation.COUNT]: {
|
|
117
|
+
variants: [
|
|
118
|
+
{
|
|
119
|
+
variantType: ResourceOperationVariantType.API_CALL,
|
|
120
|
+
isDefault: true,
|
|
121
|
+
roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
|
|
122
|
+
riskLevel: ResourceOperationRiskLevel.LOW,
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
},
|
|
126
|
+
/**
|
|
127
|
+
* The bootstrap verb.
|
|
128
|
+
*
|
|
129
|
+
* Note what it deliberately does NOT declare: `admitsCrossTenantPlatformAdministration`. On the
|
|
130
|
+
* tenant resource that flag is what lets a non-member operator write a row inside someone else's
|
|
131
|
+
* tenant, and `requestAccess` there is exempted from the grant requirement it bootstraps. Here
|
|
132
|
+
* the resource is APPLICATION-scoped — there is no tenant boundary to cross — so the flag would
|
|
133
|
+
* be meaningless and the exemption has a different shape: the ADMISSION gate exempts this
|
|
134
|
+
* resource entirely, because an operator would otherwise need an application-wide grant in order
|
|
135
|
+
* to ask for one.
|
|
136
|
+
*
|
|
137
|
+
* What keeps that safe is the same argument the tenant resource makes: requesting is not
|
|
138
|
+
* accessing. This writes one PENDING row and reads nothing. The blast radius of an abused
|
|
139
|
+
* request is an entry in a queue that another administrator must sign.
|
|
140
|
+
*
|
|
141
|
+
* assurance-control: WILDO.ACCESS.CROSS_TENANT_ADMINISTRATION — application-wide reach is
|
|
142
|
+
* requested, never assumed.
|
|
143
|
+
* assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE
|
|
144
|
+
*/
|
|
145
|
+
[ApplicationAccessGrants_Operations.REQUEST_ACCESS]: {
|
|
146
|
+
variants: [
|
|
147
|
+
{
|
|
148
|
+
variantType: ResourceOperationVariantType.API_CALL,
|
|
149
|
+
isDefault: true,
|
|
150
|
+
roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
|
|
151
|
+
riskLevel: ResourceOperationRiskLevel.CRITICAL,
|
|
152
|
+
resourceOperationLike: CoreResourceOperation.CREATE,
|
|
153
|
+
requestDto: z.object({
|
|
154
|
+
justification: z.string().min(1).max(1000),
|
|
155
|
+
/** Minutes. Clamped server-side to the 1h ceiling; a longer ask is not refused. */
|
|
156
|
+
requestedDurationMinutes: z.number().int().positive().optional(),
|
|
157
|
+
}),
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
},
|
|
161
|
+
/**
|
|
162
|
+
* The SECOND SIGNATURE.
|
|
163
|
+
*
|
|
164
|
+
* `enabledCondition` refuses a self-approval here as well as in the implementation, and the
|
|
165
|
+
* duplication is deliberate rather than redundant — they are two different guarantees. This one
|
|
166
|
+
* makes the affordance DISAPPEAR for the requester, so a platform console never renders an
|
|
167
|
+
* Approve button on one's own request; the implementation's `assert…` is the fail-closed half,
|
|
168
|
+
* because `enabledCondition` is evaluated against the row the framework fetched and a future
|
|
169
|
+
* variant authored without one would otherwise transition silently.
|
|
170
|
+
*
|
|
171
|
+
* Neutering either alone must not admit a self-approval. That is what the two pins assert.
|
|
172
|
+
*
|
|
173
|
+
* assurance-control: WILDO.ACCESS.SEGREGATION_OF_DUTIES — the widest operator elevation requires
|
|
174
|
+
* a second, distinct platform administrator's signature.
|
|
175
|
+
*/
|
|
176
|
+
[ApplicationAccessGrants_Operations.APPROVE]: {
|
|
177
|
+
variants: [
|
|
178
|
+
{
|
|
179
|
+
variantType: ResourceOperationVariantType.API_CALL,
|
|
180
|
+
isDefault: true,
|
|
181
|
+
roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
|
|
182
|
+
riskLevel: ResourceOperationRiskLevel.CRITICAL,
|
|
183
|
+
resourceOperationLike: CoreResourceOperation.UPDATE,
|
|
184
|
+
requestDto: z.object({
|
|
185
|
+
decisionReason: z.string().max(1000).optional(),
|
|
186
|
+
}),
|
|
187
|
+
enabledCondition: ({ currentObject, initiatorIds }) => currentObject.status === PlatformAccessGrantStatus.PENDING_APPROVAL
|
|
188
|
+
&& applicationAccessGrantApproverIsDistinct({
|
|
189
|
+
operatorUserId: currentObject.operatorUserId,
|
|
190
|
+
approverUserId: initiatorIds?.userId,
|
|
191
|
+
}),
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
},
|
|
195
|
+
/**
|
|
196
|
+
* Refusing a request. NOT gated on being a different person: an operator who thinks better of
|
|
197
|
+
* their own request should be able to withdraw it, and a denial only ever removes authority.
|
|
198
|
+
* The two-person rule constrains what an operator can GRANT themselves, never what they can
|
|
199
|
+
* refuse themselves.
|
|
200
|
+
*/
|
|
201
|
+
[ApplicationAccessGrants_Operations.DENY]: {
|
|
202
|
+
variants: [
|
|
203
|
+
{
|
|
204
|
+
variantType: ResourceOperationVariantType.API_CALL,
|
|
205
|
+
isDefault: true,
|
|
206
|
+
roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
|
|
207
|
+
riskLevel: ResourceOperationRiskLevel.MEDIUM,
|
|
208
|
+
resourceOperationLike: CoreResourceOperation.UPDATE,
|
|
209
|
+
requestDto: z.object({
|
|
210
|
+
decisionReason: z.string().max(1000).optional(),
|
|
211
|
+
}),
|
|
212
|
+
enabledCondition: ({ currentObject }) => currentObject.status === PlatformAccessGrantStatus.PENDING_APPROVAL,
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
},
|
|
216
|
+
/** Ending an elevation early. Monotonic — it only ever removes authority — so it is unrestricted among platform administrators. */
|
|
217
|
+
[ApplicationAccessGrants_Operations.REVOKE]: {
|
|
218
|
+
variants: [
|
|
219
|
+
{
|
|
220
|
+
variantType: ResourceOperationVariantType.API_CALL,
|
|
221
|
+
isDefault: true,
|
|
222
|
+
roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
|
|
223
|
+
riskLevel: ResourceOperationRiskLevel.MEDIUM,
|
|
224
|
+
resourceOperationLike: CoreResourceOperation.UPDATE,
|
|
225
|
+
requestDto: z.object({
|
|
226
|
+
decisionReason: z.string().max(1000).optional(),
|
|
227
|
+
}),
|
|
228
|
+
enabledCondition: ({ currentObject }) => currentObject.status === PlatformAccessGrantStatus.PENDING_APPROVAL
|
|
229
|
+
|| currentObject.status === PlatformAccessGrantStatus.ACTIVE,
|
|
230
|
+
},
|
|
231
|
+
],
|
|
232
|
+
},
|
|
233
|
+
/**
|
|
234
|
+
* ACTIVE → EXPIRED once the window has elapsed, dispatched by the credential-expiry sweep and by
|
|
235
|
+
* nothing else. INTERNAL_CALL: no route, no affordance.
|
|
236
|
+
*
|
|
237
|
+
* `requestDto: z.object({})` is EMPTY BY CONTRACT, not by omission — an operation without a
|
|
238
|
+
* `requestDto` inherits the resource's entire update contract, which would let a verb that
|
|
239
|
+
* accepts nothing advertise every field, `status` included.
|
|
240
|
+
*/
|
|
241
|
+
[ApplicationAccessGrants_Operations.EXPIRE]: {
|
|
242
|
+
variants: [
|
|
243
|
+
{
|
|
244
|
+
variantType: ResourceOperationVariantType.INTERNAL_CALL,
|
|
245
|
+
isDefault: true,
|
|
246
|
+
roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
|
|
247
|
+
riskLevel: ResourceOperationRiskLevel.LOW,
|
|
248
|
+
resourceOperationLike: CoreResourceOperation.UPDATE,
|
|
249
|
+
requestDto: z.object({}),
|
|
250
|
+
},
|
|
251
|
+
],
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
// NOTE: the APPLICATION primary scope is NOT declared here. It is derived from the registry
|
|
255
|
+
// relationship carrying `isPrimaryScope: true` (APPLICATION → APPLICATION_ACCESS_GRANTS).
|
|
256
|
+
});
|
|
257
|
+
//# sourceMappingURL=application-access-grants.shared.resources-config.schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-access-grants.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/security/authorizations/application-access-grants.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,4BAA4B,EAC5B,kCAAkC,EAClC,wCAAwC,GACzC,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,GAE7B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,0CAA0C,EAAE,MAAM,iDAAiD,CAAC;AAC7G,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,2DAA2D,CAAC;AAS1H,MAAM,CAAC,MAAM,kEAAkE,GAAG,CAAC,sBAA8C,EAAE,EAAE,CACnI,0CAA0C,CAIxC;IACA,UAAU,EAAE,4BAA4B;IACxC,kBAAkB,EAAE,gBAAgB,CAAC,yBAAyB;IAC9D,uBAAuB,EAAE,kCAAkC,CAAC,gBAAgB,CAAC,yBAAyB,CAAC;IACvG,qBAAqB,EAAE,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AAE,CAAC,CAAC,MAAM,CAAC;wBACnB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;qBAChD,CAAC;oBACF,gBAAgB,EAAE,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,CACtC,aAAa,CAAC,MAAM,KAAK,yBAAyB,CAAC,gBAAgB;2BAChE,aAAa,CAAC,MAAM,KAAK,yBAAyB,CAAC,MAAM;iBAC/D;aACF;SACF;QAED;;;;;;;WAOG;QACH,CAAC,kCAAkC,CAAC,MAAM,CAAC,EAAE;YAC3C,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,GAAG;oBACzC,qBAAqB,EAAE,qBAAqB,CAAC,MAAM;oBACnD,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;iBACzB;aACF;SACF;KACF;IACD,4FAA4F;IAC5F,0FAA0F;CAC3F,CAAC,CAAC","sourcesContent":["/**\n * Application Access Grants — resource configuration.\n *\n * The operation set mirrors `platformAccessGrants` verb for verb, and the ONE difference is the whole\n * feature: `approve` is gated on the PLATFORM's own administrators rather than a tenant's, and refuses\n * the requester. On the tenant resource the ABSENCE of `admitsCrossTenantPlatformAdministration` on\n * `approve` is what stops an operator approving their own request; here every verb is platform-tier by\n * construction, so that absence buys nothing and the refusal has to be a MEASUREMENT the\n * implementation makes — `applicationAccessGrantApproverIsDistinct`.\n *\n * See `application-access-grants.shared.schemas.ts` for why the resource exists and why it is a\n * sibling type rather than a field, and `.claude/rules/administrative-continuity-floors.md` for the\n * ladder it sits on.\n */\n\nimport { z } from 'zod';\nimport {\n ApplicationAccessGrantSchema,\n ApplicationAccessGrants_Operations,\n applicationAccessGrantApproverIsDistinct,\n} from './application-access-grants.shared.schemas';\nimport { PlatformAccessGrantStatus } from './platform-access-grants.shared.schemas';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions';\nimport {\n ResourceOperationRiskLevel,\n ResourceOperationVariantType,\n type ResourceRelationship,\n} from '../../resources/resources.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../../resources/resources-config.shared.schemas';\nimport { CORE_APP_ROLES } from './roles.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../../compliance/privacy/impersonalization.shared.schemas';\n\ntype ApplicationAccessGrantsCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.COUNT\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n | CoreResourceOperation.UPDATE_MANY;\n\nexport const applicationAccessGrantsResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) =>\n createResourceConfiguration_Initialization<\n typeof ApplicationAccessGrants_Operations,\n ApplicationAccessGrantsCoreOperations,\n typeof ApplicationAccessGrantSchema\n >({\n mainSchema: ApplicationAccessGrantSchema,\n resourceIdentifier: CoreResourceType.APPLICATION_ACCESS_GRANTS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.APPLICATION_ACCESS_GRANTS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n /**\n * `read`/`list` ALLOWED for the trusted path, and for exactly the reason the tenant resource\n * allows them: the authorization layer itself resolves a caller's usable grant on a system\n * context, before the caller's own authority has been established for the read it is gating.\n *\n * No trusted `create`/`update`: every transition belongs to a custom implementation that applies\n * the two-person measurement. A system door around those would be a second way to mint an\n * application-wide elevation, which is the one thing this resource exists to prevent.\n *\n * `exportSubject: FORBIDDEN`, mirrored from the tenant resource. `operatorUserId` and\n * `approvedByUserId` are foreign keys back to USERS, so these rows sit on a user's Art. 15 graph\n * as `INCLUDED_REFERENCES_SUBJECT`; an included resource carrying NO declaration REFUSES the whole\n * export, so omitting this would trade a boot failure for a broken disclosure right. FORBIDDEN\n * because this is a security-monitoring record and handing the monitoring trail to the person it\n * monitors is self-defeating — and because it names ANOTHER data subject's decision (the second\n * administrator), which Art. 15(4) protects.\n */\n systemAccessPolicy: {\n read: ResourceSystemAccessMode.ALLOWED,\n list: ResourceSystemAccessMode.ALLOWED,\n exportSubject: ResourceSystemAccessMode.FORBIDDEN,\n },\n\n /**\n * Subject erasure RETAINS this row and scrubs its free text — mirrored from the tenant resource\n * because it is the same kind of record. What survives is WHO reached application-wide, WHEN, and\n * who signed for it; what does not is `justification` and `decisionReason`, the operator- and\n * approver-written prose most likely to name a third party in passing.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE,\n },\n\n /**\n * Erasing one of these revokes NO session: the grant is a record ABOUT an operator's access, not\n * the operator. Their session ends through the `USERS` row, which is `SELF_PRINCIPAL`.\n */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.COUNT,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n CoreResourceOperation.UPDATE_MANY,\n ],\n\n operationsConfiguration: {\n\n /*\n * Route-less retention plumbing — INTERNAL_CALL registers no route and must not be\n * REPOSITORY_ONLY: the retention primitives resolve through `getServiceOperationPathDefault`,\n * which matches only INTERNAL_CALL / API_CALL. CRITICAL — it is the verb the impersonalize\n * writer uses to stamp markers.\n */\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n\n /**\n * The pending queue a second administrator works from, and the record of what was granted.\n *\n * `APP_ADMIN_SUPER_ADMIN` on every read: the rows name operator reach across every tenant, and\n * there is no tenant-side reader here as there is on the platform resource — an application-wide\n * grant has no customer to show it to. That absence is precisely why the approval had to become\n * a second signature.\n */\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n [CoreResourceOperation.COUNT]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n /**\n * The bootstrap verb.\n *\n * Note what it deliberately does NOT declare: `admitsCrossTenantPlatformAdministration`. On the\n * tenant resource that flag is what lets a non-member operator write a row inside someone else's\n * tenant, and `requestAccess` there is exempted from the grant requirement it bootstraps. Here\n * the resource is APPLICATION-scoped — there is no tenant boundary to cross — so the flag would\n * be meaningless and the exemption has a different shape: the ADMISSION gate exempts this\n * resource entirely, because an operator would otherwise need an application-wide grant in order\n * to ask for one.\n *\n * What keeps that safe is the same argument the tenant resource makes: requesting is not\n * accessing. This writes one PENDING row and reads nothing. The blast radius of an abused\n * request is an entry in a queue that another administrator must sign.\n *\n * assurance-control: WILDO.ACCESS.CROSS_TENANT_ADMINISTRATION — application-wide reach is\n * requested, never assumed.\n * assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE\n */\n [ApplicationAccessGrants_Operations.REQUEST_ACCESS]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n resourceOperationLike: CoreResourceOperation.CREATE,\n requestDto: z.object({\n justification: z.string().min(1).max(1000),\n /** Minutes. Clamped server-side to the 1h ceiling; a longer ask is not refused. */\n requestedDurationMinutes: z.number().int().positive().optional(),\n }),\n },\n ],\n },\n\n /**\n * The SECOND SIGNATURE.\n *\n * `enabledCondition` refuses a self-approval here as well as in the implementation, and the\n * duplication is deliberate rather than redundant — they are two different guarantees. This one\n * makes the affordance DISAPPEAR for the requester, so a platform console never renders an\n * Approve button on one's own request; the implementation's `assert…` is the fail-closed half,\n * because `enabledCondition` is evaluated against the row the framework fetched and a future\n * variant authored without one would otherwise transition silently.\n *\n * Neutering either alone must not admit a self-approval. That is what the two pins assert.\n *\n * assurance-control: WILDO.ACCESS.SEGREGATION_OF_DUTIES — the widest operator elevation requires\n * a second, distinct platform administrator's signature.\n */\n [ApplicationAccessGrants_Operations.APPROVE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n decisionReason: z.string().max(1000).optional(),\n }),\n enabledCondition: ({ currentObject, initiatorIds }) =>\n currentObject.status === PlatformAccessGrantStatus.PENDING_APPROVAL\n && applicationAccessGrantApproverIsDistinct({\n operatorUserId: currentObject.operatorUserId,\n approverUserId: initiatorIds?.userId,\n }),\n },\n ],\n },\n\n /**\n * Refusing a request. NOT gated on being a different person: an operator who thinks better of\n * their own request should be able to withdraw it, and a denial only ever removes authority.\n * The two-person rule constrains what an operator can GRANT themselves, never what they can\n * refuse themselves.\n */\n [ApplicationAccessGrants_Operations.DENY]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n decisionReason: z.string().max(1000).optional(),\n }),\n enabledCondition: ({ currentObject }) => currentObject.status === PlatformAccessGrantStatus.PENDING_APPROVAL,\n },\n ],\n },\n\n /** Ending an elevation early. Monotonic — it only ever removes authority — so it is unrestricted among platform administrators. */\n [ApplicationAccessGrants_Operations.REVOKE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n decisionReason: z.string().max(1000).optional(),\n }),\n enabledCondition: ({ currentObject }) =>\n currentObject.status === PlatformAccessGrantStatus.PENDING_APPROVAL\n || currentObject.status === PlatformAccessGrantStatus.ACTIVE,\n },\n ],\n },\n\n /**\n * ACTIVE → EXPIRED once the window has elapsed, dispatched by the credential-expiry sweep and by\n * nothing else. INTERNAL_CALL: no route, no affordance.\n *\n * `requestDto: z.object({})` is EMPTY BY CONTRACT, not by omission — an operation without a\n * `requestDto` inherits the resource's entire update contract, which would let a verb that\n * accepts nothing advertise every field, `status` included.\n */\n [ApplicationAccessGrants_Operations.EXPIRE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({}),\n },\n ],\n },\n },\n // NOTE: the APPLICATION primary scope is NOT declared here. It is derived from the registry\n // relationship carrying `isPrimaryScope: true` (APPLICATION → APPLICATION_ACCESS_GRANTS).\n });\n"]}
|