@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":"provider-usage-pricing.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"provider-usage-pricing.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/external-providers/provider-usage-pricing.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,6GAA6G;AAC7G,oBAAY,4BAA4B;IACtC,WAAW,gBAAgB;IAC3B,kBAAkB,uBAAuB;IACzC,uBAAuB,4BAA4B;IACnD,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;CACpC;AAED,eAAO,MAAM,qCAAqC,EAAE,SAAS,4BAA4B,EAMvF,CAAC;AAEH,yGAAyG;AACzG,oBAAY,gCAAgC;IAC1C,+BAA+B,oCAAoC;CACpE;AAED,4DAA4D;AAC5D,oBAAY,gCAAgC;IAC1C,0BAA0B,+BAA+B;CAC1D;AAID,eAAO,MAAM,kCAAkC;;;;;kBAK7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,eAAO,MAAM,8BAA8B;;IAEzC,0EAA0E;;kBAE1E,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF;;;;;;GAMG;AACH,eAAO,MAAM,qCAAqC;;;;;;;;;;;;QAZhD,0EAA0E;;;IAuB1E,mFAAmF;;;;;;;;;;;;kBA2BnF,CAAC;AACH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAEpG;;;;;GAKG;AACH,MAAM,MAAM,oCAAoC,GAAG,IAAI,CACrD,+BAA+B,EAC/B,sBAAsB,GAAG,eAAe,GAAG,OAAO,GAAG,gBAAgB,CACtE,GAAG;IACF,QAAQ,CAAC,KAAK,EAAE,SAAS,wBAAwB,EAAE,CAAC;IACpD,QAAQ,CAAC,cAAc,EAAE,SAAS,4BAA4B,EAAE,CAAC;CAClE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,oDAAoD,EAAE,oCA2BjE,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;kBAGpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,6BAA6B;;;;;;kBAMxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-features.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"application-features.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/features/application-features.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,uDAAuD,CAAC;AAGpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAA8B,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAMzG,oBAAY,8BAA8B;IACxC,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IACnC,cAAc,mBAAmB;CAClC;AAED,eAAO,MAAM,gDAAgD;;;iBAG3D,CAAC;AAEH,eAAO,MAAM,iDAAiD;;;iBAG5D,CAAC;AAEH,eAAO,MAAM,gDAAgD;;iBAE3D,CAAC;AAEH,KAAK,iCAAiC,GAClC,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAEjC,eAAO,MAAM,8DAA8D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;kBA0I3H,CAAC"}
|
|
@@ -48,6 +48,18 @@ export const applicationFeaturesResourceConfiguration_InitializationFactory = (r
|
|
|
48
48
|
CoreResourceOperation.DELETE,
|
|
49
49
|
],
|
|
50
50
|
customOperation: ApplicationFeatures_Operations,
|
|
51
|
+
// assurance-control: WILDO.ENTITLEMENT.NO_SELF_GRANT — the application-wide entitlement set is
|
|
52
|
+
// operator-gated on every operation, read included.
|
|
53
|
+
//
|
|
54
|
+
// This is the widest of the three feature ledgers: a write here changes what EVERY tenant is
|
|
55
|
+
// entitled to, so it is the one ledger where even READ and SEARCH are `APP_ADMIN_SUPER_ADMIN`
|
|
56
|
+
// rather than a tenant role. That asymmetry against the organization and user ledgers is the
|
|
57
|
+
// deliberate part — those two let a tenant see its own entitlements; this one is not a tenant's to
|
|
58
|
+
// see at all.
|
|
59
|
+
//
|
|
60
|
+
// As on the sibling ledgers the role is the entire control, because the super-admin path must write
|
|
61
|
+
// these fields and so they cannot be field-protected. Pinned by
|
|
62
|
+
// `security-sensitive-operation-reachability.backend.test.ts`.
|
|
51
63
|
operationsConfiguration: {
|
|
52
64
|
[CoreResourceOperation.CREATE]: {
|
|
53
65
|
variants: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-features.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/features/application-features.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,uDAAuD,CAAC;AACpF,OAAO,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AAEnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDA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AAqB,CAAC,WAAW;oBACxD,UAAU,EAAE,iDAAiD;iBAC9D;aACF;SACF;QAED,CAAC,8BAA8B,CAAC,cAAc,CAAC,EAAE;YAC/C,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,QAAQ;oBAC9C,qBAAqB,EAAE,qBAAqB,CAAC,WAAW;oBACxD,UAAU,EAAE,gDAAgD;iBAC7D;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Application Features Shared Resource Configuration\n *\n * Application-scope entitlement ledger. This mirrors organization/user feature\n * ledgers so exact-scope gates such as `M2M_WEBHOOK_DELIVERY` can be enabled\n * for `WEBHOOK_APPLICATION` without leaking app enablement to every org.\n */\n\nimport { z } from 'zod';\nimport { CoreFeature } from '../organizations/organization-features.shared.schemas';\nimport { ScopeFeaturesWithOverridesSchema } from './scope-features.shared.schemas';\n\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationVariantType } from '../resources/resources.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { CORE_APP_ROLES } from '../security/authorizations/roles.shared.schemas';\n\nexport enum ApplicationFeatures_Operations {\n ENABLE_FEATURE = 'enable_feature',\n DISABLE_FEATURE = 'disable_feature',\n RESET_FEATURES = 'reset_features',\n}\n\nexport const ApplicationFeaturesEnableFeatureRequestDtoSchema = z.object({\n featureId: z.enum(CoreFeature),\n reason: z.string().max(500).optional(),\n});\n\nexport const ApplicationFeaturesDisableFeatureRequestDtoSchema = z.object({\n featureId: z.enum(CoreFeature),\n reason: z.string().min(1).max(500),\n});\n\nexport const ApplicationFeaturesResetFeaturesRequestDtoSchema = z.object({\n reason: z.string().min(1).max(500),\n});\n\ntype ApplicationFeaturesCoreOperations =\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.READ\n | CoreResourceOperation.SEARCH\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE;\n\nexport const applicationFeaturesResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n typeof ApplicationFeatures_Operations,\n ApplicationFeaturesCoreOperations,\n typeof ScopeFeaturesWithOverridesSchema\n>({\n mainSchema: ScopeFeaturesWithOverridesSchema,\n resourceIdentifier: CoreResourceType.APPLICATION_FEATURES,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.APPLICATION_FEATURES],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n coreOperations: [\n CoreResourceOperation.CREATE,\n CoreResourceOperation.READ,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.UPDATE,\n // DELETE is REPOSITORY_ONLY (no HTTP route): powers the composition onParentDelete\n // cascade so the row is physically removed when its application is deleted. Without\n // it the cascade throws ErrorType.CONFIGURATION on any app that has a features row.\n CoreResourceOperation.DELETE,\n ],\n\n customOperation: ApplicationFeatures_Operations,\n\n operationsConfiguration: {\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n },\n ],\n },\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.SEARCH]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: false,\n searchableFields: [],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: {},\n sortFields: [],\n maxPaginatedResultPerPageLimit: 50,\n }],\n },\n\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n requestDto: ScopeFeaturesWithOverridesSchema.partial(),\n },\n ],\n },\n\n // Internal-only (REPOSITORY_ONLY): powers the composition onParentDelete cascade,\n // not a public API surface — the ledger is reset, never DELETEd, over HTTP.\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n },\n ],\n },\n\n [ApplicationFeatures_Operations.ENABLE_FEATURE]: {\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_MANY,\n requestDto: ApplicationFeaturesEnableFeatureRequestDtoSchema,\n },\n ],\n },\n\n [ApplicationFeatures_Operations.DISABLE_FEATURE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE_MANY,\n requestDto: ApplicationFeaturesDisableFeatureRequestDtoSchema,\n },\n ],\n },\n\n [ApplicationFeatures_Operations.RESET_FEATURES]: {\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_MANY,\n requestDto: ApplicationFeaturesResetFeaturesRequestDtoSchema,\n },\n ],\n },\n },\n});\n"]}
|
|
1
|
+
{"version":3,"file":"application-features.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../src/features/application-features.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,uDAAuD,CAAC;AACpF,OAAO,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AAEnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,0BAA0B,EAAwB,MAAM,uCAAuC,CAAC;AACzG,OAAO,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AACtH,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,0CAA0C,EAAE,MAAM,8CAA8C,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjF,MAAM,CAAN,IAAY,8BAIX;AAJD,WAAY,8BAA8B;IACxC,mEAAiC,CAAA;IACjC,qEAAmC,CAAA;IACnC,mEAAiC,CAAA;AACnC,CAAC,EAJW,8BAA8B,KAA9B,8BAA8B,QAIzC;AAED,MAAM,CAAC,MAAM,gDAAgD,GAAG,CAAC,CAAC,MAAM,CAAC;IACvE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;IAC9B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC;AAEH,MAAM,CAAC,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e;oBACzD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,IAAI;iBAC3C;aACF;SACF;QAED,CAAC,8BAA8B,CAAC,cAAc,CAAC,EAAE;YAC/C,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,MAAM;oBAC5C,qBAAqB,EAAE,qBAAqB,CAAC,WAAW;oBACxD,UAAU,EAAE,gDAAgD;iBAC7D;aACF;SACF;QAED,CAAC,8BAA8B,CAAC,eAAe,CAAC,EAAE;YAChD,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,IAAI;oBAC1C,qBAAqB,EAAE,qBAAqB,CAAC,WAAW;oBACxD,UAAU,EAAE,iDAAiD;iBAC9D;aACF;SACF;QAED,CAAC,8BAA8B,CAAC,cAAc,CAAC,EAAE;YAC/C,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,QAAQ;oBAC9C,qBAAqB,EAAE,qBAAqB,CAAC,WAAW;oBACxD,UAAU,EAAE,gDAAgD;iBAC7D;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Application Features Shared Resource Configuration\n *\n * Application-scope entitlement ledger. This mirrors organization/user feature\n * ledgers so exact-scope gates such as `M2M_WEBHOOK_DELIVERY` can be enabled\n * for `WEBHOOK_APPLICATION` without leaking app enablement to every org.\n */\n\nimport { z } from 'zod';\nimport { CoreFeature } from '../organizations/organization-features.shared.schemas';\nimport { ScopeFeaturesWithOverridesSchema } from './scope-features.shared.schemas';\n\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationVariantType } from '../resources/resources.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { CORE_APP_ROLES } from '../security/authorizations/roles.shared.schemas';\n\nexport enum ApplicationFeatures_Operations {\n ENABLE_FEATURE = 'enable_feature',\n DISABLE_FEATURE = 'disable_feature',\n RESET_FEATURES = 'reset_features',\n}\n\nexport const ApplicationFeaturesEnableFeatureRequestDtoSchema = z.object({\n featureId: z.enum(CoreFeature),\n reason: z.string().max(500).optional(),\n});\n\nexport const ApplicationFeaturesDisableFeatureRequestDtoSchema = z.object({\n featureId: z.enum(CoreFeature),\n reason: z.string().min(1).max(500),\n});\n\nexport const ApplicationFeaturesResetFeaturesRequestDtoSchema = z.object({\n reason: z.string().min(1).max(500),\n});\n\ntype ApplicationFeaturesCoreOperations =\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.READ\n | CoreResourceOperation.SEARCH\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE;\n\nexport const applicationFeaturesResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n typeof ApplicationFeatures_Operations,\n ApplicationFeaturesCoreOperations,\n typeof ScopeFeaturesWithOverridesSchema\n>({\n mainSchema: ScopeFeaturesWithOverridesSchema,\n resourceIdentifier: CoreResourceType.APPLICATION_FEATURES,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.APPLICATION_FEATURES],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n coreOperations: [\n CoreResourceOperation.CREATE,\n CoreResourceOperation.READ,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.UPDATE,\n // DELETE is REPOSITORY_ONLY (no HTTP route): powers the composition onParentDelete\n // cascade so the row is physically removed when its application is deleted. Without\n // it the cascade throws ErrorType.CONFIGURATION on any app that has a features row.\n CoreResourceOperation.DELETE,\n ],\n\n customOperation: ApplicationFeatures_Operations,\n\n // assurance-control: WILDO.ENTITLEMENT.NO_SELF_GRANT — the application-wide entitlement set is\n // operator-gated on every operation, read included.\n //\n // This is the widest of the three feature ledgers: a write here changes what EVERY tenant is\n // entitled to, so it is the one ledger where even READ and SEARCH are `APP_ADMIN_SUPER_ADMIN`\n // rather than a tenant role. That asymmetry against the organization and user ledgers is the\n // deliberate part — those two let a tenant see its own entitlements; this one is not a tenant's to\n // see at all.\n //\n // As on the sibling ledgers the role is the entire control, because the super-admin path must write\n // these fields and so they cannot be field-protected. Pinned by\n // `security-sensitive-operation-reachability.backend.test.ts`.\n operationsConfiguration: {\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n },\n ],\n },\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.SEARCH]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: false,\n searchableFields: [],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: {},\n sortFields: [],\n maxPaginatedResultPerPageLimit: 50,\n }],\n },\n\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n requestDto: ScopeFeaturesWithOverridesSchema.partial(),\n },\n ],\n },\n\n // Internal-only (REPOSITORY_ONLY): powers the composition onParentDelete cascade,\n // not a public API surface — the ledger is reset, never DELETEd, over HTTP.\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n },\n ],\n },\n\n [ApplicationFeatures_Operations.ENABLE_FEATURE]: {\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_MANY,\n requestDto: ApplicationFeaturesEnableFeatureRequestDtoSchema,\n },\n ],\n },\n\n [ApplicationFeatures_Operations.DISABLE_FEATURE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE_MANY,\n requestDto: ApplicationFeaturesDisableFeatureRequestDtoSchema,\n },\n ],\n },\n\n [ApplicationFeatures_Operations.RESET_FEATURES]: {\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_MANY,\n requestDto: ApplicationFeaturesResetFeaturesRequestDtoSchema,\n },\n ],\n },\n },\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-feature-definitions.shared.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"core-feature-definitions.shared.d.ts","sourceRoot":"","sources":["../../../src/features/core-feature-definitions.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAE7E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,2BAA2B,4BAA4B,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,EA8HvD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-feature-definitions.shared.js","sourceRoot":"","sources":["../../../../src/features/core-feature-definitions.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,uDAAuD,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAGjH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,yBAAyB,CAAC;AAErE;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAwB;IAC3D,4CAA4C;IAC5C;QACE,UAAU,EAAE,WAAW,CAAC,eAAe;QACvC,SAAS,EAAE,gBAAgB,CAAC,OAAO;QACnC,gBAAgB,EAAE,CAAC,oBAAoB,CAAC,aAAa,CAAC;QACtD,YAAY,EAAE,EAAE;QAChB,YAAY,EAAE,KAAK;KACpB;IACD;QACE,UAAU,EAAE,WAAW,CAAC,kBAAkB;QAC1C,SAAS,EAAE,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Y,EAAE,kBAAkB;KACjC;CACF,CAAC","sourcesContent":["/**\n * Framework Core Feature Definitions\n *\n * These are business features managed by the engine (not tied to external providers).\n * Enabled by config profiles, billing products, or manual admin overrides.\n *\n * Note: PRIORITY_SUPPORT, CUSTOM_INTEGRATIONS, ADVANCED_PERMISSIONS from the old CoreOrganizationFeature\n * enum were dropped:\n * - PRIORITY_SUPPORT → modeled as a custom app feature (not engine-level)\n * - CUSTOM_INTEGRATIONS → modeled by provider declarations, not entitlement features\n * - ADVANCED_PERMISSIONS → handled by RBAC system, not feature gating\n */\n\nimport { CoreFeature } from '../organizations/organization-features.shared.schemas';\nimport { CoreResourceType } from '../resources/resources.shared.core.definitions';\nimport { ResourcePrimaryScope } from '../resources/resources.shared.schemas';\nimport { FEATURES_UNLIMITED, FeatureLimitSemantic, FeatureValueType } from './feature-definition.shared.schemas';\nimport type { FeatureDefinition } from './feature-definition.shared.schemas';\n\n/**\n * LIMIT-feature identifier for the inbound Agent2Agent (A2A) LLM **token budget**: how many LLM\n * tokens a tenant's A2A agent turns may consume per billing period. Grant it from a billing plan\n * (a `LimitGrant` on the product) and the A2A transport enforces it fail-closed, denying further\n * turns with HTTP 402 once exhausted.\n *\n * The single named source for this identifier — the backend budget service resolves the allowance\n * by this exact key, so definition and enforcement cannot drift.\n *\n * Measured in TOKENS, not currency: the framework's canonical provider-usage pricing registry is\n * deliberately not consulted by this A2A entitlement gate. The gate caps the transport's directly\n * metered token consumption; monetary reservation and settlement belong to the separate Work Cycle\n * budget authority.\n */\nexport const A2A_TOKEN_BUDGET_FEATURE_ID = 'a2a.llm.tokensPerPeriod';\n\n/**\n * Core feature definitions: every CoreFeature value + core LIMIT features.\n * Merged with custom app feature definitions at startup.\n */\nexport const CORE_FEATURE_DEFINITIONS: FeatureDefinition[] = [\n // ─── BOOLEAN features (on/off toggles) ───\n {\n identifier: CoreFeature.CUSTOM_BRANDING,\n valueType: FeatureValueType.BOOLEAN,\n applicableScopes: [ResourcePrimaryScope.ORGANIZATIONS],\n dependencies: [],\n defaultValue: false,\n },\n {\n identifier: CoreFeature.ADVANCED_ANALYTICS,\n valueType: FeatureValueType.BOOLEAN,\n applicableScopes: [ResourcePrimaryScope.ORGANIZATIONS],\n dependencies: [],\n defaultValue: false,\n },\n {\n identifier: CoreFeature.SINGLE_SIGN_ON,\n valueType: FeatureValueType.BOOLEAN,\n applicableScopes: [ResourcePrimaryScope.ORGANIZATIONS],\n dependencies: [],\n defaultValue: false,\n },\n {\n identifier: CoreFeature.AUDIT_LOGS,\n valueType: FeatureValueType.BOOLEAN,\n applicableScopes: [ResourcePrimaryScope.ORGANIZATIONS],\n dependencies: [],\n defaultValue: false,\n },\n {\n // Outbound delivery of audit-trail events to a tenant-owned SIEM /\n // compliance store. Depends on `AUDIT_LOGS` for the read-side surface,\n // but the gate is independent so admins can enable read-only auditing\n // without paying for outbound delivery.\n identifier: CoreFeature.SECURITY_EVENT_EXPORT,\n valueType: FeatureValueType.BOOLEAN,\n applicableScopes: [ResourcePrimaryScope.ORGANIZATIONS],\n dependencies: [],\n defaultValue: false,\n },\n {\n // SCIM-driven user/group provisioning. Typically procured alongside\n // `SINGLE_SIGN_ON` but each feature is an independent gate so an org\n // can run SSO without provisioning (or vice versa).\n identifier: CoreFeature.DIRECTORY_PROVISIONING,\n valueType: FeatureValueType.BOOLEAN,\n applicableScopes: [ResourcePrimaryScope.ORGANIZATIONS],\n dependencies: [],\n defaultValue: false,\n },\n {\n // M2M_WEBHOOK_DELIVERY is scope-bound: enabling it at the app level\n // does NOT auto-enable it for every organization. Each scope (app or\n // organization) opts in independently. See `FeatureDefinitionSchema.scopeBoundary`\n // and `FeatureResolutionBackendService.isFeatureEnabledAtScope`.\n identifier: CoreFeature.M2M_WEBHOOK_DELIVERY,\n valueType: FeatureValueType.BOOLEAN,\n applicableScopes: [\n ResourcePrimaryScope.APPLICATION,\n ResourcePrimaryScope.ORGANIZATIONS,\n ],\n dependencies: [],\n defaultValue: false,\n scopeBoundary: true,\n },\n // ─── LIMIT features with counting configs ───\n //\n // NOT auto-checked. `registerCoreFeatures` registers these definitions and stops there; the\n // auto-registration of a `limitChecks` entry runs only in `registerCustomFeatures`, for an\n // application-declared limit built with `countResource`. No operation declares a check for either\n // of the two below, so `counting` names the resource that WOULD be counted and nothing counts it.\n // An application that wants the cap enforced declares the check on the counted resource's CREATE.\n {\n identifier: 'MAX_MEMBERS',\n valueType: FeatureValueType.LIMIT,\n applicableScopes: [ResourcePrimaryScope.ORGANIZATIONS],\n dependencies: [],\n defaultValue: 5,\n counting: { resourceType: CoreResourceType.ORGANIZATION_MEMBERS },\n },\n {\n identifier: 'MAX_API_KEYS',\n valueType: FeatureValueType.LIMIT,\n applicableScopes: [ResourcePrimaryScope.ORGANIZATIONS],\n dependencies: [],\n defaultValue: 2,\n counting: { resourceType: CoreResourceType.ORG_API_KEYS },\n },\n {\n // Inbound A2A LLM token budget — see {@link A2A_TOKEN_BUDGET_FEATURE_ID}.\n //\n // Applies to all THREE A2A owner scopes: a user-delegated turn is owned by the delegating\n // user, a machine turn by its organization or application.\n //\n // NO `counting` config, deliberately: consumption here is a SUM OF TOKENS, not a count of\n // resource rows, so the gate's row-counting strategy cannot measure it. The A2A budget service\n // owns measurement (accumulating into the `a2aTokenBudgetState` singleton) and resolves this\n // limit directly — which is exactly the \"limit checking done in custom service code\" case the\n // `counting` field documents as its absent-branch.\n //\n // ⚠️ `limitSemantic: CEILING` is LOAD-BEARING — without it this feature is inert. Under the\n // default FLOOR semantic the merge is most-permissive-wins, so the `FEATURES_UNLIMITED` default\n // below would absorb every finite plan grant (`max(-1, 10_000) = -1`) and no cap could ever\n // engage. CEILING inverts it: `-1` means \"no ceiling\" and YIELDS to the plan's finite grant.\n //\n // With CEILING, `defaultValue: FEATURES_UNLIMITED` is both correct and required: this\n // definition is registered for EVERY application, so a finite default would silently cap every\n // tenant that never opted into A2A budgeting (and `0` would deny every A2A turn everywhere).\n // Budgeting stays opt-in — a real cap arrives only from a plan's `LimitGrant`.\n identifier: A2A_TOKEN_BUDGET_FEATURE_ID,\n valueType: FeatureValueType.LIMIT,\n limitSemantic: FeatureLimitSemantic.CEILING,\n // All three A2A owner scopes are declared because all three can OWN a turn. ⚠️ But only\n // ORGANIZATIONS and USER_SELF have a BILLING rail (`BILLING_SCOPE_TO_VARIANTS` has no\n // application variant), so an APPLICATION-scope cap cannot arrive from a plan `LimitGrant` —\n // it must come from a features profile or a manual `limitOverrides`. Declaring the scope is\n // still correct: without it an app-machine principal could never be capped by ANY mechanism.\n applicableScopes: [\n ResourcePrimaryScope.USER_SELF,\n ResourcePrimaryScope.ORGANIZATIONS,\n ResourcePrimaryScope.APPLICATION,\n ],\n dependencies: [],\n defaultValue: FEATURES_UNLIMITED,\n },\n];\n"]}
|
|
1
|
+
{"version":3,"file":"core-feature-definitions.shared.js","sourceRoot":"","sources":["../../../src/features/core-feature-definitions.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,uDAAuD,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAGjH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,yBAAyB,CAAC;AAErE;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAwB;IAC3D,4CAA4C;IAC5C;QACE,UAAU,EAAE,WAAW,CAAC,eAAe;QACvC,SAAS,EAAE,gBAAgB,CAAC,OAAO;QACnC,gBAAgB,EAAE,CAAC,oBAAoB,CAAC,aAAa,CAAC;QACtD,YAAY,EAAE,EAAE;QAChB,YAAY,EAAE,KAAK;KACpB;IACD;QACE,UAAU,EAAE,WAAW,CAAC,kBAAkB;QAC1C,SAAS,EAAE,gBAA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AE,kBAAkB;KACjC;CACF,CAAC","sourcesContent":["/**\n * Framework Core Feature Definitions\n *\n * These are business features managed by the engine (not tied to external providers).\n * Enabled by config profiles, billing products, or manual admin overrides.\n *\n * Note: PRIORITY_SUPPORT, CUSTOM_INTEGRATIONS, ADVANCED_PERMISSIONS from the old CoreOrganizationFeature\n * enum were dropped:\n * - PRIORITY_SUPPORT → modeled as a custom app feature (not engine-level)\n * - CUSTOM_INTEGRATIONS → modeled by provider declarations, not entitlement features\n * - ADVANCED_PERMISSIONS → handled by RBAC system, not feature gating\n */\n\nimport { CoreFeature } from '../organizations/organization-features.shared.schemas';\nimport { CoreResourceType } from '../resources/resources.shared.core.definitions';\nimport { ResourcePrimaryScope } from '../resources/resources.shared.schemas';\nimport { FEATURES_UNLIMITED, FeatureLimitSemantic, FeatureValueType } from './feature-definition.shared.schemas';\nimport type { FeatureDefinition } from './feature-definition.shared.schemas';\n\n/**\n * LIMIT-feature identifier for the inbound Agent2Agent (A2A) LLM **token budget**: how many LLM\n * tokens a tenant's A2A agent turns may consume per billing period. Grant it from a billing plan\n * (a `LimitGrant` on the product) and the A2A transport enforces it fail-closed, denying further\n * turns with HTTP 402 once exhausted.\n *\n * The single named source for this identifier — the backend budget service resolves the allowance\n * by this exact key, so definition and enforcement cannot drift.\n *\n * Measured in TOKENS, not currency: the framework's canonical provider-usage pricing registry is\n * deliberately not consulted by this A2A entitlement gate. The gate caps the transport's directly\n * metered token consumption; monetary reservation and settlement belong to the separate Work Cycle\n * budget authority.\n */\nexport const A2A_TOKEN_BUDGET_FEATURE_ID = 'a2a.llm.tokensPerPeriod';\n\n/**\n * Core feature definitions: every CoreFeature value + core LIMIT features.\n * Merged with custom app feature definitions at startup.\n */\nexport const CORE_FEATURE_DEFINITIONS: FeatureDefinition[] = [\n // ─── BOOLEAN features (on/off toggles) ───\n {\n identifier: CoreFeature.CUSTOM_BRANDING,\n valueType: FeatureValueType.BOOLEAN,\n applicableScopes: [ResourcePrimaryScope.ORGANIZATIONS],\n dependencies: [],\n defaultValue: false,\n },\n {\n identifier: CoreFeature.ADVANCED_ANALYTICS,\n valueType: FeatureValueType.BOOLEAN,\n applicableScopes: [ResourcePrimaryScope.ORGANIZATIONS],\n dependencies: [],\n defaultValue: false,\n },\n {\n identifier: CoreFeature.SINGLE_SIGN_ON,\n valueType: FeatureValueType.BOOLEAN,\n applicableScopes: [ResourcePrimaryScope.ORGANIZATIONS],\n dependencies: [],\n defaultValue: false,\n },\n {\n identifier: CoreFeature.AUDIT_LOGS,\n valueType: FeatureValueType.BOOLEAN,\n applicableScopes: [ResourcePrimaryScope.ORGANIZATIONS],\n dependencies: [],\n defaultValue: false,\n },\n {\n // Outbound delivery of audit-trail events to a tenant-owned SIEM /\n // compliance store. Depends on `AUDIT_LOGS` for the read-side surface,\n // but the gate is independent so admins can enable read-only auditing\n // without paying for outbound delivery.\n identifier: CoreFeature.SECURITY_EVENT_EXPORT,\n valueType: FeatureValueType.BOOLEAN,\n applicableScopes: [ResourcePrimaryScope.ORGANIZATIONS],\n dependencies: [],\n defaultValue: false,\n },\n {\n // SCIM-driven user/group provisioning. Typically procured alongside\n // `SINGLE_SIGN_ON` but each feature is an independent gate so an org\n // can run SSO without provisioning (or vice versa).\n identifier: CoreFeature.DIRECTORY_PROVISIONING,\n valueType: FeatureValueType.BOOLEAN,\n applicableScopes: [ResourcePrimaryScope.ORGANIZATIONS],\n dependencies: [],\n defaultValue: false,\n },\n {\n // M2M_WEBHOOK_DELIVERY is scope-bound: enabling it at the app level\n // does NOT auto-enable it for every organization. Each scope (app or\n // organization) opts in independently. See `FeatureDefinitionSchema.scopeBoundary`\n // and `FeatureResolutionBackendService.isFeatureEnabledAtScope`.\n identifier: CoreFeature.M2M_WEBHOOK_DELIVERY,\n valueType: FeatureValueType.BOOLEAN,\n applicableScopes: [\n ResourcePrimaryScope.APPLICATION,\n ResourcePrimaryScope.ORGANIZATIONS,\n ],\n dependencies: [],\n defaultValue: false,\n scopeBoundary: true,\n },\n // ─── LIMIT features with counting configs ───\n //\n // NOT auto-checked. `registerCoreFeatures` registers these definitions and stops there; the\n // auto-registration of a `limitChecks` entry runs only in `registerCustomFeatures`, for an\n // application-declared limit built with `countResource`. No operation declares a check for either\n // of the two below, so `counting` names the resource that WOULD be counted and nothing counts it.\n // An application that wants the cap enforced declares the check on the counted resource's CREATE.\n {\n identifier: 'MAX_MEMBERS',\n valueType: FeatureValueType.LIMIT,\n applicableScopes: [ResourcePrimaryScope.ORGANIZATIONS],\n dependencies: [],\n defaultValue: 5,\n counting: { resourceType: CoreResourceType.ORGANIZATION_MEMBERS },\n },\n {\n identifier: 'MAX_API_KEYS',\n valueType: FeatureValueType.LIMIT,\n applicableScopes: [ResourcePrimaryScope.ORGANIZATIONS],\n dependencies: [],\n defaultValue: 2,\n counting: { resourceType: CoreResourceType.ORG_API_KEYS },\n },\n {\n // Inbound A2A LLM token budget — see {@link A2A_TOKEN_BUDGET_FEATURE_ID}.\n //\n // Applies to all THREE A2A owner scopes: a user-delegated turn is owned by the delegating\n // user, a machine turn by its organization or application.\n //\n // NO `counting` config, deliberately: consumption here is a SUM OF TOKENS, not a count of\n // resource rows, so the gate's row-counting strategy cannot measure it. The A2A budget service\n // owns measurement (accumulating into the `a2aTokenBudgetState` singleton) and resolves this\n // limit directly — which is exactly the \"limit checking done in custom service code\" case the\n // `counting` field documents as its absent-branch.\n //\n // ⚠️ `limitSemantic: CEILING` is LOAD-BEARING — without it this feature is inert. Under the\n // default FLOOR semantic the merge is most-permissive-wins, so the `FEATURES_UNLIMITED` default\n // below would absorb every finite plan grant (`max(-1, 10_000) = -1`) and no cap could ever\n // engage. CEILING inverts it: `-1` means \"no ceiling\" and YIELDS to the plan's finite grant.\n //\n // With CEILING, `defaultValue: FEATURES_UNLIMITED` is both correct and required: this\n // definition is registered for EVERY application, so a finite default would silently cap every\n // tenant that never opted into A2A budgeting (and `0` would deny every A2A turn everywhere).\n // Budgeting stays opt-in — a real cap arrives only from a plan's `LimitGrant`.\n identifier: A2A_TOKEN_BUDGET_FEATURE_ID,\n valueType: FeatureValueType.LIMIT,\n limitSemantic: FeatureLimitSemantic.CEILING,\n // All three A2A owner scopes are declared because all three can OWN a turn. ⚠️ But only\n // ORGANIZATIONS and USER_SELF have a BILLING rail (`BILLING_SCOPE_TO_VARIANTS` has no\n // application variant), so an APPLICATION-scope cap cannot arrive from a plan `LimitGrant` —\n // it must come from a features profile or a manual `limitOverrides`. Declaring the scope is\n // still correct: without it an app-machine principal could never be capped by ANY mechanism.\n applicableScopes: [\n ResourcePrimaryScope.USER_SELF,\n ResourcePrimaryScope.ORGANIZATIONS,\n ResourcePrimaryScope.APPLICATION,\n ],\n dependencies: [],\n defaultValue: FEATURES_UNLIMITED,\n },\n];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-builders.shared.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"feature-builders.shared.d.ts","sourceRoot":"","sources":["../../../src/features/feature-builders.shared.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAGL,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EAClC,KAAK,mBAAmB,EACzB,MAAM,qCAAqC,CAAC;AAM7C;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,eAA0C,CAAC;AAEjF;;;GAGG;AACH,MAAM,MAAM,iCAAiC,GAAG,iBAAiB,GAAG;IAClE,CAAC,yBAAyB,CAAC,CAAC,EAAE;QAC5B,oFAAoF;QACpF,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;CACH,CAAC;AAcF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE;IACP,KAAK,EAAE,oBAAoB,GAAG,oBAAoB,EAAE,CAAC;IACrD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,cAAc,CAAC,EAAE,6BAA6B,CAAC;CAChD,GACA,iBAAiB,CASnB;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE;IACP,KAAK,EAAE,oBAAoB,GAAG,oBAAoB,EAAE,CAAC;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,kFAAkF;IAClF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oFAAoF;IACpF,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,wFAAwF;IACxF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,cAAc,CAAC,EAAE,6BAA6B,CAAC;CAChD,GACA,iCAAiC,CA0BnC;AACD,sEAAsE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-builders.shared.js","sourceRoot":"","sources":["../../../../src/features/feature-builders.shared.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,gBAAgB,GAMjB,MAAM,qCAAqC,CAAC;AAE7C,wDAAwD;AACxD,iCAAiC;AACjC,wDAAwD;AAExD;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;AAajF,wDAAwD;AACxD,sBAAsB;AACtB,wDAAwD;AAExD,SAAS,eAAe,CAAC,KAAoD;IAC3E,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC;AAED,wDAAwD;AACxD,4CAA4C;AA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E,CAAC;QACvD,UAAU,CAAC,yBAAyB,CAAC,GAAG;YACtC,aAAa,EAAE,OAAO,CAAC,aAAa;SACrC,CAAC;IACJ,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AACD,sEAAsE","sourcesContent":["/**\n * Feature Builder Utilities\n *\n * DX-oriented builder functions for defining features.\n * These handle boilerplate: scope normalization, default values, counting config generation.\n * Custom app developers should use these instead of raw FeatureDefinition objects.\n */\n\nimport { ResourcePrimaryScope } from '../resources/resources.shared.schemas';\nimport {\n FeatureValueType,\n FEATURES_UNLIMITED,\n FeatureLimitSemantic,\n type FeatureDefinition,\n type FeatureUnavailabilityOverride,\n type LimitCountingConfig,\n} from './feature-definition.shared.schemas';\n\n// =====================================================\n// Internal: Auto-register marker\n// =====================================================\n\n/**\n * Internal marker symbol for limit features that should auto-register\n * a limitCheck on the counted resource's CREATE operation.\n * Used by FeatureDefinitionRegistryBackendService at startup.\n */\nexport const AUTO_REGISTER_LIMIT_CHECK = Symbol.for('AUTO_REGISTER_LIMIT_CHECK');\n\n/**\n * Extended FeatureDefinition with auto-register metadata.\n * This is the internal type returned by defineLimitFeature when countResource is provided.\n */\nexport type FeatureDefinitionWithAutoRegister = FeatureDefinition & {\n [AUTO_REGISTER_LIMIT_CHECK]?: {\n /** Resource type whose CREATE operation should get a limitCheck for this feature */\n countResource: string;\n };\n};\n\n// =====================================================\n// Scope Normalization\n// =====================================================\n\nfunction normalizeScopes(scope: ResourcePrimaryScope | ResourcePrimaryScope[]): ResourcePrimaryScope[] {\n return Array.isArray(scope) ? scope : [scope];\n}\n\n// =====================================================\n// defineFeature() — Boolean Feature Builder\n// =====================================================\n\n/**\n * @wildo_source:part:start saas.models.features.definition-builders facet:layer:shared facet:audience:app-developer\n *\n * Declaring what an application can SELL or gate on. Two builders, from `@wildo-ai/saas-models`:\n * `defineFeature` for a boolean capability, `defineLimitFeature` for a numeric allowance.\n *\n * A product in the billing catalogue then grants them through `grantedFeatures` / `grantedLimits`,\n * and any surface gates on the identifier with `requiredFeatures` — a resource operation, a view, a\n * chart, a navigation item, a settings section.\n *\n * ## Two things that decide whether the gate actually fires\n *\n * (`limitSemantic` is the third and is covered by the product-definitions skill's own guidance —\n * the default `FLOOR` is an entitlement the tenant is ALLOWED, and a consumption CAP needs `CEILING`.)\n *\n * - **`countResource` is the one-call form.** It registers a limit check on that resource's CREATE\n * automatically, so \"at most ten projects per organisation\" is one declaration rather than a\n * definition plus a hand-written gate. A limit declared WITHOUT counting cannot be checked\n * automatically: `checkLimit` REFUSES rather than guessing at a remaining quota, and the caller\n * must pass a counting override or measure consumption itself. That is the right answer for a\n * quantity that is not a row count — a sum of tokens, for instance.\n * - **`rateLimit` on a definition is RESERVED and ignored by the gate.** A time-windowed allowance\n * like \"one hundred calls an hour\" is not expressible here at all; abuse throttling is a separate\n * mechanism with its own declaration.\n *\n * ## Granting a capability does not configure it\n *\n * An entitlement says the tenant MAY have the thing. Single sign-on entitles an organisation to\n * register an identity provider; somebody still has to register one. The same holds for provisioning\n * tokens, export destinations and webhook endpoints — so a plan that grants one of these still needs\n * an onboarding step behind it.\n *\n * Simple boolean feature builder.\n *\n * @example\n * defineFeature('AI_ASSISTANT', { scope: ResourcePrimaryScope.ORGANIZATIONS })\n *\n * @example\n * defineFeature('PREMIUM_THEMES', {\n * scope: ResourcePrimaryScope.USER_SELF,\n * unavailability: {\n * behavior: FeatureUnavailabilityBehavior.UPGRADE_PROMPT,\n * },\n * })\n */\nexport function defineFeature(\n identifier: string,\n options: {\n scope: ResourcePrimaryScope | ResourcePrimaryScope[];\n defaultEnabled?: boolean;\n dependencies?: string[];\n unavailability?: FeatureUnavailabilityOverride;\n }\n): FeatureDefinition {\n return {\n identifier,\n valueType: FeatureValueType.BOOLEAN,\n applicableScopes: normalizeScopes(options.scope),\n defaultValue: options.defaultEnabled ?? false,\n dependencies: options.dependencies ?? [],\n unavailability: options.unavailability,\n };\n}\n\n// =====================================================\n// defineLimitFeature() — Limit Feature Builder\n// =====================================================\n\n/**\n * Limit feature builder with auto-wiring support.\n *\n * Key DX improvement: when `countResource` is provided, the engine\n * auto-registers a `limitChecks` entry on the CREATE operation of the\n * referenced resource at startup (via FeatureDefinitionRegistryBackendService).\n *\n * This means: to add \"max 10 projects per org\", write ONE call and the\n * gate is automatically enforced. No need to manually add limitChecks on\n * the resource's operation variant.\n *\n * @example\n * defineLimitFeature('MAX_PROJECTS', {\n * scope: ResourcePrimaryScope.ORGANIZATIONS,\n * default: 5,\n * countResource: CustomShared_ResourceType.PROJECTS,\n * })\n * // Equivalent to manually defining:\n * // { identifier: 'MAX_PROJECTS', valueType: LIMIT, applicableScopes: [ORGANIZATIONS],\n * // defaultValue: 5, counting: { resourceType: 'PROJECTS' } }\n * // + adding limitChecks: [{ featureId: 'MAX_PROJECTS' }] on PROJECTS.CREATE variant\n *\n * @example\n * defineLimitFeature('MAX_STORAGE_GB', {\n * scope: ResourcePrimaryScope.ORGANIZATIONS,\n * default: 10,\n * counting: {\n * resourceType: 'FILES',\n * aggregate: { field: 'sizeBytes', operation: AggregationOperation.SUM },\n * },\n * })\n */\nexport function defineLimitFeature(\n identifier: string,\n options: {\n scope: ResourcePrimaryScope | ResourcePrimaryScope[];\n default: number;\n /**\n * How this limit COMPOSES when several sources supply a value (see {@link FeatureLimitSemantic}).\n * Omit for the default `FLOOR` — an entitlement the tenant is ALLOWED, where most-permissive\n * wins and add-ons stack upward (`MAX_MEMBERS`, `MAX_API_KEYS`).\n *\n * Pass `CEILING` for a consumption CAP the tenant may not exceed: most-RESTRICTIVE wins, and\n * `FEATURES_UNLIMITED` means \"no ceiling\" so it yields to any finite grant. Without it a cap is\n * inexpressible — under FLOOR an unlimited default absorbs every finite plan grant, so the cap\n * silently never engages.\n */\n limitSemantic?: FeatureLimitSemantic;\n /** Resource to count. Auto-registers a limitCheck on CREATE for this resource. */\n countResource?: string;\n /** Advanced: filter + aggregation for counting (overrides simple resource count) */\n counting?: LimitCountingConfig;\n /** If true, skip auto-registration of limitChecks on the resource's CREATE operation */\n skipAutoRegister?: boolean;\n dependencies?: string[];\n unavailability?: FeatureUnavailabilityOverride;\n }\n): FeatureDefinitionWithAutoRegister {\n // Build counting config: explicit counting takes precedence, then countResource, then nothing\n const counting: LimitCountingConfig | undefined =\n options.counting ??\n (options.countResource ? { resourceType: options.countResource } : undefined);\n\n const definition: FeatureDefinitionWithAutoRegister = {\n identifier,\n valueType: FeatureValueType.LIMIT,\n applicableScopes: normalizeScopes(options.scope),\n defaultValue: options.default,\n dependencies: options.dependencies ?? [],\n // Omitted ⇒ absent on the definition ⇒ read as FLOOR, so every existing caller is unchanged.\n ...(options.limitSemantic ? { limitSemantic: options.limitSemantic } : {}),\n counting,\n unavailability: options.unavailability,\n };\n\n // Add auto-register marker for limit features with countResource (unless skipped)\n if (options.countResource && !options.skipAutoRegister) {\n definition[AUTO_REGISTER_LIMIT_CHECK] = {\n countResource: options.countResource,\n };\n }\n\n return definition;\n}\n/** @wildo_source:part:end saas.models.features.definition-builders */\n"]}
|
|
1
|
+
{"version":3,"file":"feature-builders.shared.js","sourceRoot":"","sources":["../../../src/features/feature-builders.shared.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,gBAAgB,GAMjB,MAAM,qCAAqC,CAAC;AAE7C,wDAAwD;AACxD,iCAAiC;AACjC,wDAAwD;AAExD;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;AAajF,wDAAwD;AACxD,sBAAsB;AACtB,wDAAwD;AAExD,SAAS,eAAe,CAAC,KAAoD;IAC3E,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC;AAED,wDAAwD;AACxD,4CAA4C;AAC5C,wDAAwD;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;G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AAC,aAAa;SACrC,CAAC;IACJ,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AACD,sEAAsE","sourcesContent":["/**\n * Feature Builder Utilities\n *\n * DX-oriented builder functions for defining features.\n * These handle boilerplate: scope normalization, default values, counting config generation.\n * Custom app developers should use these instead of raw FeatureDefinition objects.\n */\n\nimport { ResourcePrimaryScope } from '../resources/resources.shared.schemas';\nimport {\n FeatureValueType,\n FEATURES_UNLIMITED,\n FeatureLimitSemantic,\n type FeatureDefinition,\n type FeatureUnavailabilityOverride,\n type LimitCountingConfig,\n} from './feature-definition.shared.schemas';\n\n// =====================================================\n// Internal: Auto-register marker\n// =====================================================\n\n/**\n * Internal marker symbol for limit features that should auto-register\n * a limitCheck on the counted resource's CREATE operation.\n * Used by FeatureDefinitionRegistryBackendService at startup.\n */\nexport const AUTO_REGISTER_LIMIT_CHECK = Symbol.for('AUTO_REGISTER_LIMIT_CHECK');\n\n/**\n * Extended FeatureDefinition with auto-register metadata.\n * This is the internal type returned by defineLimitFeature when countResource is provided.\n */\nexport type FeatureDefinitionWithAutoRegister = FeatureDefinition & {\n [AUTO_REGISTER_LIMIT_CHECK]?: {\n /** Resource type whose CREATE operation should get a limitCheck for this feature */\n countResource: string;\n };\n};\n\n// =====================================================\n// Scope Normalization\n// =====================================================\n\nfunction normalizeScopes(scope: ResourcePrimaryScope | ResourcePrimaryScope[]): ResourcePrimaryScope[] {\n return Array.isArray(scope) ? scope : [scope];\n}\n\n// =====================================================\n// defineFeature() — Boolean Feature Builder\n// =====================================================\n\n/**\n * @wildo_source:part:start saas.models.features.definition-builders facet:layer:shared facet:audience:app-developer\n *\n * Declaring what an application can SELL or gate on. Two builders, from `@wildo-ai/saas-models`:\n * `defineFeature` for a boolean capability, `defineLimitFeature` for a numeric allowance.\n *\n * A product in the billing catalogue then grants them through `grantedFeatures` / `grantedLimits`,\n * and any surface gates on the identifier with `requiredFeatures` — a resource operation, a view, a\n * chart, a navigation item, a settings section.\n *\n * ## Two things that decide whether the gate actually fires\n *\n * (`limitSemantic` is the third and is covered by the product-definitions skill's own guidance —\n * the default `FLOOR` is an entitlement the tenant is ALLOWED, and a consumption CAP needs `CEILING`.)\n *\n * - **`countResource` is the one-call form.** It registers a limit check on that resource's CREATE\n * automatically, so \"at most ten projects per organisation\" is one declaration rather than a\n * definition plus a hand-written gate. A limit declared WITHOUT counting cannot be checked\n * automatically: `checkLimit` REFUSES rather than guessing at a remaining quota, and the caller\n * must pass a counting override or measure consumption itself. That is the right answer for a\n * quantity that is not a row count — a sum of tokens, for instance.\n * - **`rateLimit` on a definition is RESERVED and ignored by the gate.** A time-windowed allowance\n * like \"one hundred calls an hour\" is not expressible here at all; abuse throttling is a separate\n * mechanism with its own declaration.\n *\n * ## Granting a capability does not configure it\n *\n * An entitlement says the tenant MAY have the thing. Single sign-on entitles an organisation to\n * register an identity provider; somebody still has to register one. The same holds for provisioning\n * tokens, export destinations and webhook endpoints — so a plan that grants one of these still needs\n * an onboarding step behind it.\n *\n * Simple boolean feature builder.\n *\n * @example\n * defineFeature('AI_ASSISTANT', { scope: ResourcePrimaryScope.ORGANIZATIONS })\n *\n * @example\n * defineFeature('PREMIUM_THEMES', {\n * scope: ResourcePrimaryScope.USER_SELF,\n * unavailability: {\n * behavior: FeatureUnavailabilityBehavior.UPGRADE_PROMPT,\n * },\n * })\n */\nexport function defineFeature(\n identifier: string,\n options: {\n scope: ResourcePrimaryScope | ResourcePrimaryScope[];\n defaultEnabled?: boolean;\n dependencies?: string[];\n unavailability?: FeatureUnavailabilityOverride;\n }\n): FeatureDefinition {\n return {\n identifier,\n valueType: FeatureValueType.BOOLEAN,\n applicableScopes: normalizeScopes(options.scope),\n defaultValue: options.defaultEnabled ?? false,\n dependencies: options.dependencies ?? [],\n unavailability: options.unavailability,\n };\n}\n\n// =====================================================\n// defineLimitFeature() — Limit Feature Builder\n// =====================================================\n\n/**\n * Limit feature builder with auto-wiring support.\n *\n * Key DX improvement: when `countResource` is provided, the engine\n * auto-registers a `limitChecks` entry on the CREATE operation of the\n * referenced resource at startup (via FeatureDefinitionRegistryBackendService).\n *\n * This means: to add \"max 10 projects per org\", write ONE call and the\n * gate is automatically enforced. No need to manually add limitChecks on\n * the resource's operation variant.\n *\n * @example\n * defineLimitFeature('MAX_PROJECTS', {\n * scope: ResourcePrimaryScope.ORGANIZATIONS,\n * default: 5,\n * countResource: CustomShared_ResourceType.PROJECTS,\n * })\n * // Equivalent to manually defining:\n * // { identifier: 'MAX_PROJECTS', valueType: LIMIT, applicableScopes: [ORGANIZATIONS],\n * // defaultValue: 5, counting: { resourceType: 'PROJECTS' } }\n * // + adding limitChecks: [{ featureId: 'MAX_PROJECTS' }] on PROJECTS.CREATE variant\n *\n * @example\n * defineLimitFeature('MAX_STORAGE_GB', {\n * scope: ResourcePrimaryScope.ORGANIZATIONS,\n * default: 10,\n * counting: {\n * resourceType: 'FILES',\n * aggregate: { field: 'sizeBytes', operation: AggregationOperation.SUM },\n * },\n * })\n */\nexport function defineLimitFeature(\n identifier: string,\n options: {\n scope: ResourcePrimaryScope | ResourcePrimaryScope[];\n default: number;\n /**\n * How this limit COMPOSES when several sources supply a value (see {@link FeatureLimitSemantic}).\n * Omit for the default `FLOOR` — an entitlement the tenant is ALLOWED, where most-permissive\n * wins and add-ons stack upward (`MAX_MEMBERS`, `MAX_API_KEYS`).\n *\n * Pass `CEILING` for a consumption CAP the tenant may not exceed: most-RESTRICTIVE wins, and\n * `FEATURES_UNLIMITED` means \"no ceiling\" so it yields to any finite grant. Without it a cap is\n * inexpressible — under FLOOR an unlimited default absorbs every finite plan grant, so the cap\n * silently never engages.\n */\n limitSemantic?: FeatureLimitSemantic;\n /** Resource to count. Auto-registers a limitCheck on CREATE for this resource. */\n countResource?: string;\n /** Advanced: filter + aggregation for counting (overrides simple resource count) */\n counting?: LimitCountingConfig;\n /** If true, skip auto-registration of limitChecks on the resource's CREATE operation */\n skipAutoRegister?: boolean;\n dependencies?: string[];\n unavailability?: FeatureUnavailabilityOverride;\n }\n): FeatureDefinitionWithAutoRegister {\n // Build counting config: explicit counting takes precedence, then countResource, then nothing\n const counting: LimitCountingConfig | undefined =\n options.counting ??\n (options.countResource ? { resourceType: options.countResource } : undefined);\n\n const definition: FeatureDefinitionWithAutoRegister = {\n identifier,\n valueType: FeatureValueType.LIMIT,\n applicableScopes: normalizeScopes(options.scope),\n defaultValue: options.default,\n dependencies: options.dependencies ?? [],\n // Omitted ⇒ absent on the definition ⇒ read as FLOOR, so every existing caller is unchanged.\n ...(options.limitSemantic ? { limitSemantic: options.limitSemantic } : {}),\n counting,\n unavailability: options.unavailability,\n };\n\n // Add auto-register marker for limit features with countResource (unless skipped)\n if (options.countResource && !options.skipAutoRegister) {\n definition[AUTO_REGISTER_LIMIT_CHECK] = {\n countResource: options.countResource,\n };\n }\n\n return definition;\n}\n/** @wildo_source:part:end saas.models.features.definition-builders */\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-definition.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"feature-definition.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/features/feature-definition.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAO7E,oBAAY,gBAAgB;IAC1B,uDAAuD;IACvD,OAAO,YAAY;IACnB,6DAA6D;IAC7D,KAAK,UAAU;CAChB;AAMD;;;;GAIG;AACH,oBAAY,6BAA6B;IACvC,sCAAsC;IACtC,IAAI,SAAS;IACb,sCAAsC;IACtC,OAAO,YAAY;IACnB,8CAA8C;IAC9C,cAAc,mBAAmB;IACjC,iDAAiD;IACjD,YAAY,iBAAiB;IAC7B,wDAAwD;IACxD,aAAa,kBAAkB;IAC/B,gEAAgE;IAChE,oBAAoB,yBAAyB;IAC7C,wHAAwH;IACxH,MAAM,W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H;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0DrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-registry.shared.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"feature-registry.shared.d.ts","sourceRoot":"","sources":["../../../src/features/feature-registry.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACnG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAGL,gBAAgB,EACjB,MAAM,qCAAqC,CAAC;AAO7C;;;GAGG;AACH,MAAM,WAAW,+BAA+B;IAC9C,4EAA4E;IAC5E,WAAW,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAClC,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACzC,yDAAyD;IACzD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qCAAqC;IACrC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;CACrE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CACxC,YAAY,GAAE,+BAAoC,GACjD,oBAAoB,CA8BtB;AAMD;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,qBAAqB,EAAE,CAAC;CACrC;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IACl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,CAAC,iBAAiB,CAAC,CAAC;IACzC,MAAM,EAAE,qBAAqB,EAAE,CAAC;CACjC,GAAG,gCAAgC,CA+CnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-resolution.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"feature-resolution.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/features/feature-resolution.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAMrE;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAM7C;;;;;;GAMG;AACH,MAAM,WAAW,yBAA0B,SAAQ,aAAa;IAC9D,+GAA+G;IAC/G,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAMD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,UAAU,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAyB,SAAQ,yBAAyB;IACzE;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,YAAY,EAAE,oBAAoB,EAAE,CAAA;KAAE,CAAC,CAAC;CAC1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope-features.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"scope-features.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/features/scope-features.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,uDAAuD,CAAC;AAMpF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;;iBAY9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAMhE;;;;;;;;GAQG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;iBAe3C,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-features.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"user-features.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/features/user-features.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAA8B,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAQzG,KAAK,0BAA0B,GAC3B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,WAAW,GACjC,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAEjC,eAAO,MAAM,uDAAuD,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;iCA2JpH,CAAC"}
|
|
@@ -57,6 +57,18 @@ export const userFeaturesResourceConfiguration_InitializationFactory = (resource
|
|
|
57
57
|
CoreResourceOperation.DELETE,
|
|
58
58
|
],
|
|
59
59
|
customOperation: {},
|
|
60
|
+
// assurance-control: WILDO.ENTITLEMENT.NO_SELF_GRANT — a user cannot widen its own entitlements.
|
|
61
|
+
//
|
|
62
|
+
// The subject of this row is the person it belongs to, which is exactly why the write gate matters
|
|
63
|
+
// more here than the read gate: READ and SEARCH are `ORG_MEMBER` so a principal can see its own
|
|
64
|
+
// entitlements, and every write — CREATE, UPDATE, DELETE, plus the route-less LIST/UPDATE_MANY the
|
|
65
|
+
// retention primitives use — is `APP_ADMIN_SUPER_ADMIN`, which no organization-scope role confers.
|
|
66
|
+
// So the self-grant this objective names is refused for the principal best placed to attempt it.
|
|
67
|
+
//
|
|
68
|
+
// The role is the whole control for the same reason as the sibling ledgers: the super-admin path
|
|
69
|
+
// writes these fields, so they cannot be field-protected. Note the two INTERNAL_CALL entries carry
|
|
70
|
+
// the same role and register no route, so they are not a second door. Pinned by
|
|
71
|
+
// `security-sensitive-operation-reachability.backend.test.ts`.
|
|
60
72
|
operationsConfiguration: {
|
|
61
73
|
/*
|
|
62
74
|
* Route-less retention plumbing — INTERNAL_CALL registers no route. Not REPOSITORY_ONLY: the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-features.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/features/user-features.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AAEvH,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,0BAA0B,EAAwB,MAAM,uCAAuC,CAAC;AACzG,OAAO,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AACtH,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,0CAA0C,EAAE,MAAM,8CAA8C,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE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,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,IAAI;oBAC1C,UAAU,EAAE,gCAAgC,CAAC,OAAO,EAAE;iBACvD;aACF;SACF;QAED,kFAAkF;QAClF,4EAA4E;QAC5E,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,eAAe;oBACzD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,IAAI;iBAC3C;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * User Features Shared Resource Configuration\n *\n * Resource configuration for user-level feature management.\n * Controls which features are available to individual users (overrides/additions).\n * Uses ScopeFeaturesWithOverridesSchema as mainSchema (same pattern as org features).\n */\n\nimport { ScopeFeaturesWithOverridesSchema } from './scope-features.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\n\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationVariantType } from '../resources/resources.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { DataPortabilityProvenance } from '../compliance/privacy/subject-export.shared.schemas';\n\ntype UserFeaturesCoreOperations =\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.UPDATE_MANY\n | CoreResourceOperation.SEARCH\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE;\n\nexport const userFeaturesResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n Record<string, never>,\n UserFeaturesCoreOperations,\n typeof ScopeFeaturesWithOverridesSchema\n>({\n mainSchema: ScopeFeaturesWithOverridesSchema,\n resourceIdentifier: CoreResourceType.USER_FEATURES,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.USER_FEATURES],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n /** Subject-export disclosure. The subject's own data. Secrets and backend-only values are withheld by the export's security floor regardless of this grant. */\n systemAccessPolicy: { exportSubject: ResourceSystemAccessMode.ALLOWED },\n portabilityPolicy: { defaultProvenance: DataPortabilityProvenance.DERIVED },\n\n\n /**\n * Subject erasure RETAINS this row and scrubs nothing, because there is nothing here to scrub.\n *\n * `RETAIN_ONLY` is a positive assertion, not a default: this resource holds feature toggles, added\n * and removed feature keys, and numeric limit overrides. Its only link to a person is the scope\n * foreign key, which the never-scrub floor protects in every mode. Declaring the mode is what lets a\n * notice say what erasure does to these rows instead of reporting them as undeclared.\n *\n * The assertion is CHECKED: the factory refuses `RETAIN_ONLY` if any field declares an impersonalize\n * treatment, because a treatment that would never run is a config claiming something the runtime\n * would not honour.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_ONLY,\n },\n\n /** The subject is the person whose features these are, reached through the scope key. */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.SELF_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.CREATE,\n CoreResourceOperation.READ,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.UPDATE,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY (see the variants).\n CoreResourceOperation.LIST,\n CoreResourceOperation.UPDATE_MANY,\n // DELETE is REPOSITORY_ONLY (no HTTP route): the scope-features ledger is not\n // API-deletable, but the composition `onParentDelete` cascade must physically\n // delete the row when its owning user is deleted. Without a DELETE op the cascade\n // (`deleteChildrenImmediate`) throws ErrorType.CONFIGURATION on any user that has a\n // features row. See .claude/plans/composition-oncreate-lifecycle.md (FEATURES wave).\n CoreResourceOperation.DELETE,\n ],\n\n customOperation: {} as Record<string, never>,\n\n operationsConfiguration: {\n /*\n * Route-less retention plumbing — INTERNAL_CALL registers no route. Not REPOSITORY_ONLY: the\n * retention primitives resolve through `getServiceOperationPathDefault`, which excludes it, so\n * that spelling passes the boot guard and fails when an erasure runs. LIST is LOW because a\n * read-shaped operation may not claim the HIGH/CRITICAL band — that band carries an audit-emission\n * obligation, checked over the real engine catalogue.\n */\n [CoreResourceOperation.LIST]: {\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 },\n ],\n },\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [\n {\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 [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n }\n ],\n },\n\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.SEARCH]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: false,\n searchableFields: [],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: {},\n sortFields: [],\n maxPaginatedResultPerPageLimit: 50,\n }],\n },\n\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n requestDto: ScopeFeaturesWithOverridesSchema.partial(),\n }\n ],\n },\n\n // Internal-only (REPOSITORY_ONLY): powers the composition onParentDelete cascade,\n // not a public API surface — the ledger is reset, never DELETEd, over HTTP.\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }\n ],\n },\n },\n});\n"]}
|
|
1
|
+
{"version":3,"file":"user-features.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../src/features/user-features.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AAEvH,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,0BAA0B,EAAwB,MAAM,uCAAuC,CAAC;AACzG,OAAO,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AACtH,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,0CAA0C,EAAE,MAAM,8CAA8C,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;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AE,EAAE;oBACpB,iBAAiB,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE;oBACjE,YAAY,EAAE,EAAE;oBAChB,UAAU,EAAE,EAAE;oBACd,8BAA8B,EAAE,EAAE;iBACnC,CAAC;SACH;QAED,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,IAAI;oBAC1C,UAAU,EAAE,gCAAgC,CAAC,OAAO,EAAE;iBACvD;aACF;SACF;QAED,kFAAkF;QAClF,4EAA4E;QAC5E,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,eAAe;oBACzD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,IAAI;iBAC3C;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * User Features Shared Resource Configuration\n *\n * Resource configuration for user-level feature management.\n * Controls which features are available to individual users (overrides/additions).\n * Uses ScopeFeaturesWithOverridesSchema as mainSchema (same pattern as org features).\n */\n\nimport { ScopeFeaturesWithOverridesSchema } from './scope-features.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\n\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationVariantType } from '../resources/resources.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { DataPortabilityProvenance } from '../compliance/privacy/subject-export.shared.schemas';\n\ntype UserFeaturesCoreOperations =\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.UPDATE_MANY\n | CoreResourceOperation.SEARCH\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE;\n\nexport const userFeaturesResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n Record<string, never>,\n UserFeaturesCoreOperations,\n typeof ScopeFeaturesWithOverridesSchema\n>({\n mainSchema: ScopeFeaturesWithOverridesSchema,\n resourceIdentifier: CoreResourceType.USER_FEATURES,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.USER_FEATURES],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n /** Subject-export disclosure. The subject's own data. Secrets and backend-only values are withheld by the export's security floor regardless of this grant. */\n systemAccessPolicy: { exportSubject: ResourceSystemAccessMode.ALLOWED },\n portabilityPolicy: { defaultProvenance: DataPortabilityProvenance.DERIVED },\n\n\n /**\n * Subject erasure RETAINS this row and scrubs nothing, because there is nothing here to scrub.\n *\n * `RETAIN_ONLY` is a positive assertion, not a default: this resource holds feature toggles, added\n * and removed feature keys, and numeric limit overrides. Its only link to a person is the scope\n * foreign key, which the never-scrub floor protects in every mode. Declaring the mode is what lets a\n * notice say what erasure does to these rows instead of reporting them as undeclared.\n *\n * The assertion is CHECKED: the factory refuses `RETAIN_ONLY` if any field declares an impersonalize\n * treatment, because a treatment that would never run is a config claiming something the runtime\n * would not honour.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_ONLY,\n },\n\n /** The subject is the person whose features these are, reached through the scope key. */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.SELF_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.CREATE,\n CoreResourceOperation.READ,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.UPDATE,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY (see the variants).\n CoreResourceOperation.LIST,\n CoreResourceOperation.UPDATE_MANY,\n // DELETE is REPOSITORY_ONLY (no HTTP route): the scope-features ledger is not\n // API-deletable, but the composition `onParentDelete` cascade must physically\n // delete the row when its owning user is deleted. Without a DELETE op the cascade\n // (`deleteChildrenImmediate`) throws ErrorType.CONFIGURATION on any user that has a\n // features row. See .claude/plans/composition-oncreate-lifecycle.md (FEATURES wave).\n CoreResourceOperation.DELETE,\n ],\n\n customOperation: {} as Record<string, never>,\n\n // assurance-control: WILDO.ENTITLEMENT.NO_SELF_GRANT — a user cannot widen its own entitlements.\n //\n // The subject of this row is the person it belongs to, which is exactly why the write gate matters\n // more here than the read gate: READ and SEARCH are `ORG_MEMBER` so a principal can see its own\n // entitlements, and every write — CREATE, UPDATE, DELETE, plus the route-less LIST/UPDATE_MANY the\n // retention primitives use — is `APP_ADMIN_SUPER_ADMIN`, which no organization-scope role confers.\n // So the self-grant this objective names is refused for the principal best placed to attempt it.\n //\n // The role is the whole control for the same reason as the sibling ledgers: the super-admin path\n // writes these fields, so they cannot be field-protected. Note the two INTERNAL_CALL entries carry\n // the same role and register no route, so they are not a second door. Pinned by\n // `security-sensitive-operation-reachability.backend.test.ts`.\n operationsConfiguration: {\n /*\n * Route-less retention plumbing — INTERNAL_CALL registers no route. Not REPOSITORY_ONLY: the\n * retention primitives resolve through `getServiceOperationPathDefault`, which excludes it, so\n * that spelling passes the boot guard and fails when an erasure runs. LIST is LOW because a\n * read-shaped operation may not claim the HIGH/CRITICAL band — that band carries an audit-emission\n * obligation, checked over the real engine catalogue.\n */\n [CoreResourceOperation.LIST]: {\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 },\n ],\n },\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [\n {\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 [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n }\n ],\n },\n\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.SEARCH]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: false,\n searchableFields: [],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: {},\n sortFields: [],\n maxPaginatedResultPerPageLimit: 50,\n }],\n },\n\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n requestDto: ScopeFeaturesWithOverridesSchema.partial(),\n }\n ],\n },\n\n // Internal-only (REPOSITORY_ONLY): powers the composition onParentDelete cascade,\n // not a public API surface — the ledger is reset, never DELETEd, over HTTP.\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }\n ],\n },\n },\n});\n"]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Linking a file that STAYS at a vendor into a resource's file field (#394 P5).
|
|
4
|
+
*
|
|
5
|
+
* A provider's picker that delivers a `REMOTE_REFERENCE` hands the browser an
|
|
6
|
+
* opaque id the vendor understands and nothing else — no bytes. The field then
|
|
7
|
+
* POSTs this body to the SAME route a byte upload uses, so the route's
|
|
8
|
+
* authorization, the field's `storageAccepted`, scope derivation and upload
|
|
9
|
+
* grants all apply once, and the backend produces a FILES row whose
|
|
10
|
+
* `storageProvider` is the vendor storage and whose `storageRef` is that id.
|
|
11
|
+
*
|
|
12
|
+
* One route, two bodies: a multipart `file` part carries bytes, a JSON
|
|
13
|
+
* `remoteReference` carries a reference. The two are distinguished by which is
|
|
14
|
+
* present, never by a header a client can get wrong.
|
|
15
|
+
*/
|
|
16
|
+
export declare const FILE_REMOTE_REFERENCE_LINK_BODY_KEY = "remoteReference";
|
|
17
|
+
export declare const FileRemoteReferenceLinkSchema: z.ZodObject<{
|
|
18
|
+
/** The provider whose picker produced the reference — `google-drive` (the connected provider's ref), never the storage value `google_drive`. */
|
|
19
|
+
providerRef: z.ZodString;
|
|
20
|
+
/** The vendor's own id for the file, exactly as the picker returned it. */
|
|
21
|
+
externalId: z.ZodString;
|
|
22
|
+
/**
|
|
23
|
+
* What the picker showed the person. Advisory: the backend reads the vendor's
|
|
24
|
+
* own metadata before creating the row and prefers it, because a display
|
|
25
|
+
* name typed by a client is not evidence about the file.
|
|
26
|
+
*/
|
|
27
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
28
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
29
|
+
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
}, z.core.$strict>;
|
|
31
|
+
export type FileRemoteReferenceLink = z.infer<typeof FileRemoteReferenceLinkSchema>;
|
|
32
|
+
export declare const FileRemoteReferenceLinkRequestSchema: z.ZodObject<{
|
|
33
|
+
remoteReference: z.ZodObject<{
|
|
34
|
+
/** The provider whose picker produced the reference — `google-drive` (the connected provider's ref), never the storage value `google_drive`. */
|
|
35
|
+
providerRef: z.ZodString;
|
|
36
|
+
/** The vendor's own id for the file, exactly as the picker returned it. */
|
|
37
|
+
externalId: z.ZodString;
|
|
38
|
+
/**
|
|
39
|
+
* What the picker showed the person. Advisory: the backend reads the vendor's
|
|
40
|
+
* own metadata before creating the row and prefers it, because a display
|
|
41
|
+
* name typed by a client is not evidence about the file.
|
|
42
|
+
*/
|
|
43
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
44
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
45
|
+
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
}, z.core.$strict>;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
export type FileRemoteReferenceLinkRequest = z.infer<typeof FileRemoteReferenceLinkRequestSchema>;
|
|
49
|
+
/** What a request body says about a remote reference — three answers, all distinct. */
|
|
50
|
+
export declare enum FileRemoteReferenceLinkRead {
|
|
51
|
+
/** The body carries no `remoteReference` at all: this is a byte upload, or nothing. */
|
|
52
|
+
ABSENT = "absent",
|
|
53
|
+
/** A well-formed reference. */
|
|
54
|
+
PRESENT = "present",
|
|
55
|
+
/** The key is there and its value is not a reference — a client defect, never silently an upload. */
|
|
56
|
+
INVALID = "invalid"
|
|
57
|
+
}
|
|
58
|
+
export type FileRemoteReferenceLinkReadResult = {
|
|
59
|
+
readonly kind: FileRemoteReferenceLinkRead.ABSENT;
|
|
60
|
+
} | {
|
|
61
|
+
readonly kind: FileRemoteReferenceLinkRead.PRESENT;
|
|
62
|
+
readonly link: FileRemoteReferenceLink;
|
|
63
|
+
} | {
|
|
64
|
+
readonly kind: FileRemoteReferenceLinkRead.INVALID;
|
|
65
|
+
readonly issues: readonly string[];
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Reads a remote reference off a parsed request body. A multipart upload
|
|
69
|
+
* arrives with an empty or `fileId`-only body and reads as ABSENT; a JSON body
|
|
70
|
+
* naming the key is either PRESENT or INVALID. Nothing else is inferred.
|
|
71
|
+
*/
|
|
72
|
+
export declare function readFileRemoteReferenceLinkRequest(body: unknown): FileRemoteReferenceLinkReadResult;
|
|
73
|
+
//# sourceMappingURL=file-remote-reference-link.shared.schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-remote-reference-link.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/files/file-remote-reference-link.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mCAAmC,oBAAoB,CAAC;AAErE,eAAO,MAAM,6BAA6B;IACxC,gJAAgJ;;IAEhJ,2EAA2E;;IAE3E;;;;OAIG;;;;kBAIH,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,oCAAoC;;QAf/C,gJAAgJ;;QAEhJ,2EAA2E;;QAE3E;;;;WAIG;;;;;iBASH,CAAC;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAElG,uFAAuF;AACvF,oBAAY,2BAA2B;IACrC,uFAAuF;IACvF,MAAM,WAAW;IACjB,+BAA+B;IAC/B,OAAO,YAAY;IACnB,qGAAqG;IACrG,OAAO,YAAY;CACpB;AAED,MAAM,MAAM,iCAAiC,GACzC;IAAE,QAAQ,CAAC,IAAI,EAAE,2BAA2B,CAAC,MAAM,CAAA;CAAE,GACrD;IAAE,QAAQ,CAAC,IAAI,EAAE,2BAA2B,CAAC,OAAO,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,uBAAuB,CAAA;CAAE,GAC9F;IAAE,QAAQ,CAAC,IAAI,EAAE,2BAA2B,CAAC,OAAO,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC;AAE/F;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,IAAI,EAAE,OAAO,GAAG,iCAAiC,CAYnG"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Linking a file that STAYS at a vendor into a resource's file field (#394 P5).
|
|
4
|
+
*
|
|
5
|
+
* A provider's picker that delivers a `REMOTE_REFERENCE` hands the browser an
|
|
6
|
+
* opaque id the vendor understands and nothing else — no bytes. The field then
|
|
7
|
+
* POSTs this body to the SAME route a byte upload uses, so the route's
|
|
8
|
+
* authorization, the field's `storageAccepted`, scope derivation and upload
|
|
9
|
+
* grants all apply once, and the backend produces a FILES row whose
|
|
10
|
+
* `storageProvider` is the vendor storage and whose `storageRef` is that id.
|
|
11
|
+
*
|
|
12
|
+
* One route, two bodies: a multipart `file` part carries bytes, a JSON
|
|
13
|
+
* `remoteReference` carries a reference. The two are distinguished by which is
|
|
14
|
+
* present, never by a header a client can get wrong.
|
|
15
|
+
*/
|
|
16
|
+
export const FILE_REMOTE_REFERENCE_LINK_BODY_KEY = 'remoteReference';
|
|
17
|
+
export const FileRemoteReferenceLinkSchema = z.strictObject({
|
|
18
|
+
/** The provider whose picker produced the reference — `google-drive` (the connected provider's ref), never the storage value `google_drive`. */
|
|
19
|
+
providerRef: z.string().min(1),
|
|
20
|
+
/** The vendor's own id for the file, exactly as the picker returned it. */
|
|
21
|
+
externalId: z.string().min(1),
|
|
22
|
+
/**
|
|
23
|
+
* What the picker showed the person. Advisory: the backend reads the vendor's
|
|
24
|
+
* own metadata before creating the row and prefers it, because a display
|
|
25
|
+
* name typed by a client is not evidence about the file.
|
|
26
|
+
*/
|
|
27
|
+
displayName: z.string().min(1).optional(),
|
|
28
|
+
mimeType: z.string().min(1).optional(),
|
|
29
|
+
sizeBytes: z.number().int().min(0).optional(),
|
|
30
|
+
});
|
|
31
|
+
export const FileRemoteReferenceLinkRequestSchema = z.object({
|
|
32
|
+
[FILE_REMOTE_REFERENCE_LINK_BODY_KEY]: FileRemoteReferenceLinkSchema,
|
|
33
|
+
});
|
|
34
|
+
/** What a request body says about a remote reference — three answers, all distinct. */
|
|
35
|
+
export var FileRemoteReferenceLinkRead;
|
|
36
|
+
(function (FileRemoteReferenceLinkRead) {
|
|
37
|
+
/** The body carries no `remoteReference` at all: this is a byte upload, or nothing. */
|
|
38
|
+
FileRemoteReferenceLinkRead["ABSENT"] = "absent";
|
|
39
|
+
/** A well-formed reference. */
|
|
40
|
+
FileRemoteReferenceLinkRead["PRESENT"] = "present";
|
|
41
|
+
/** The key is there and its value is not a reference — a client defect, never silently an upload. */
|
|
42
|
+
FileRemoteReferenceLinkRead["INVALID"] = "invalid";
|
|
43
|
+
})(FileRemoteReferenceLinkRead || (FileRemoteReferenceLinkRead = {}));
|
|
44
|
+
/**
|
|
45
|
+
* Reads a remote reference off a parsed request body. A multipart upload
|
|
46
|
+
* arrives with an empty or `fileId`-only body and reads as ABSENT; a JSON body
|
|
47
|
+
* naming the key is either PRESENT or INVALID. Nothing else is inferred.
|
|
48
|
+
*/
|
|
49
|
+
export function readFileRemoteReferenceLinkRequest(body) {
|
|
50
|
+
if (body === null || typeof body !== 'object' || !(FILE_REMOTE_REFERENCE_LINK_BODY_KEY in body)) {
|
|
51
|
+
return { kind: FileRemoteReferenceLinkRead.ABSENT };
|
|
52
|
+
}
|
|
53
|
+
const parsed = FileRemoteReferenceLinkRequestSchema.safeParse(body);
|
|
54
|
+
if (!parsed.success) {
|
|
55
|
+
return {
|
|
56
|
+
kind: FileRemoteReferenceLinkRead.INVALID,
|
|
57
|
+
issues: parsed.error.issues.map((issue) => `${issue.path.join('.') || '(root)'}: ${issue.message}`),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
return { kind: FileRemoteReferenceLinkRead.PRESENT, link: parsed.data[FILE_REMOTE_REFERENCE_LINK_BODY_KEY] };
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=file-remote-reference-link.shared.schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-remote-reference-link.shared.schemas.js","sourceRoot":"","sources":["../../../src/files/file-remote-reference-link.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,iBAAiB,CAAC;AAErE,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,YAAY,CAAC;IAC1D,gJAAgJ;IAChJ,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,2EAA2E;IAC3E,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B;;;;OAIG;IACH,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACzC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACtC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3D,CAAC,mCAAmC,CAAC,EAAE,6BAA6B;CACrE,CAAC,CAAC;AAGH,uFAAuF;AACvF,MAAM,CAAN,IAAY,2BAOX;AAPD,WAAY,2BAA2B;IACrC,uFAAuF;IACvF,gDAAiB,CAAA;IACjB,+BAA+B;IAC/B,kDAAmB,CAAA;IACnB,qGAAqG;IACrG,kDAAmB,CAAA;AACrB,CAAC,EAPW,2BAA2B,KAA3B,2BAA2B,QAOtC;AAOD;;;;GAIG;AACH,MAAM,UAAU,kCAAkC,CAAC,IAAa;IAC9D,IAAI,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,mCAAmC,IAAI,IAAI,CAAC,EAAE,CAAC;QAChG,OAAO,EAAE,IAAI,EAAE,2BAA2B,CAAC,MAAM,EAAE,CAAC;IACtD,CAAC;IACD,MAAM,MAAM,GAAG,oCAAoC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACpE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,OAAO;YACL,IAAI,EAAE,2BAA2B,CAAC,OAAO;YACzC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,QAAQ,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;SACpG,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,2BAA2B,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,mCAAmC,CAAC,EAAE,CAAC;AAC/G,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * Linking a file that STAYS at a vendor into a resource's file field (#394 P5).\n *\n * A provider's picker that delivers a `REMOTE_REFERENCE` hands the browser an\n * opaque id the vendor understands and nothing else — no bytes. The field then\n * POSTs this body to the SAME route a byte upload uses, so the route's\n * authorization, the field's `storageAccepted`, scope derivation and upload\n * grants all apply once, and the backend produces a FILES row whose\n * `storageProvider` is the vendor storage and whose `storageRef` is that id.\n *\n * One route, two bodies: a multipart `file` part carries bytes, a JSON\n * `remoteReference` carries a reference. The two are distinguished by which is\n * present, never by a header a client can get wrong.\n */\nexport const FILE_REMOTE_REFERENCE_LINK_BODY_KEY = 'remoteReference';\n\nexport const FileRemoteReferenceLinkSchema = z.strictObject({\n /** The provider whose picker produced the reference — `google-drive` (the connected provider's ref), never the storage value `google_drive`. */\n providerRef: z.string().min(1),\n /** The vendor's own id for the file, exactly as the picker returned it. */\n externalId: z.string().min(1),\n /**\n * What the picker showed the person. Advisory: the backend reads the vendor's\n * own metadata before creating the row and prefers it, because a display\n * name typed by a client is not evidence about the file.\n */\n displayName: z.string().min(1).optional(),\n mimeType: z.string().min(1).optional(),\n sizeBytes: z.number().int().min(0).optional(),\n});\nexport type FileRemoteReferenceLink = z.infer<typeof FileRemoteReferenceLinkSchema>;\n\nexport const FileRemoteReferenceLinkRequestSchema = z.object({\n [FILE_REMOTE_REFERENCE_LINK_BODY_KEY]: FileRemoteReferenceLinkSchema,\n});\nexport type FileRemoteReferenceLinkRequest = z.infer<typeof FileRemoteReferenceLinkRequestSchema>;\n\n/** What a request body says about a remote reference — three answers, all distinct. */\nexport enum FileRemoteReferenceLinkRead {\n /** The body carries no `remoteReference` at all: this is a byte upload, or nothing. */\n ABSENT = 'absent',\n /** A well-formed reference. */\n PRESENT = 'present',\n /** The key is there and its value is not a reference — a client defect, never silently an upload. */\n INVALID = 'invalid',\n}\n\nexport type FileRemoteReferenceLinkReadResult =\n | { readonly kind: FileRemoteReferenceLinkRead.ABSENT }\n | { readonly kind: FileRemoteReferenceLinkRead.PRESENT; readonly link: FileRemoteReferenceLink }\n | { readonly kind: FileRemoteReferenceLinkRead.INVALID; readonly issues: readonly string[] };\n\n/**\n * Reads a remote reference off a parsed request body. A multipart upload\n * arrives with an empty or `fileId`-only body and reads as ABSENT; a JSON body\n * naming the key is either PRESENT or INVALID. Nothing else is inferred.\n */\nexport function readFileRemoteReferenceLinkRequest(body: unknown): FileRemoteReferenceLinkReadResult {\n if (body === null || typeof body !== 'object' || !(FILE_REMOTE_REFERENCE_LINK_BODY_KEY in body)) {\n return { kind: FileRemoteReferenceLinkRead.ABSENT };\n }\n const parsed = FileRemoteReferenceLinkRequestSchema.safeParse(body);\n if (!parsed.success) {\n return {\n kind: FileRemoteReferenceLinkRead.INVALID,\n issues: parsed.error.issues.map((issue) => `${issue.path.join('.') || '(root)'}: ${issue.message}`),\n };\n }\n return { kind: FileRemoteReferenceLinkRead.PRESENT, link: parsed.data[FILE_REMOTE_REFERENCE_LINK_BODY_KEY] };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-upload-grant.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"file-upload-grant.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/files/file-upload-grant.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;GAOG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,kBAAkB,CAAC;AAE3D;;;;;;;GAOG;AACH,eAAO,MAAM,iCAAiC,KAAK,CAAC;AACpD,eAAO,MAAM,sCAAsC,KAAK,CAAC;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,uEAAwE,CAAC;AAClH,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAC;AACrF,uHAAuH;AACvH,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,OAAO,CAAC;KAAG,CAAC,IAAI,wBAAwB,GAAG,CAAC;CAAE,CAAwC,CAAC;AAEtI;;;GAGG;AACH,oBAAY,oBAAoB;IAC9B,kFAAkF;IAClF,OAAO,YAAY;IACnB,mGAAmG;IACnG,QAAQ,aAA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