@wildo-ai/saas-models 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/__tests__/setup.d.ts.map +1 -1
- package/dist/esm/_inspect.d.ts.map +1 -1
- package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-subject.shared.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications-context.schemas.d.ts +14 -10
- package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.js +4 -3
- package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.d.ts +0 -4
- package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.js +59 -17
- package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts +77 -21
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.js +85 -23
- package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.d.ts +4 -3
- package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.js +45 -0
- package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
- package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.schemas.js +7 -1
- package/dist/esm/billing/price.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product-behavior-policy.shared.schemas.js +52 -11
- package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-definition.shared.schemas.d.ts +2 -2
- package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts +2 -2
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.schemas.d.ts +2 -2
- package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.schemas.js +7 -3
- package/dist/esm/billing/product.shared.schemas.js.map +1 -1
- package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.js +15 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.schemas.d.ts +7 -3
- package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.schemas.js +22 -3
- package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
- package/dist/esm/charts/aggregation-query.shared.schemas.d.ts.map +1 -1
- package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +71 -2
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.js +20 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
- package/dist/esm/companion/shared-library-companion.shared.definitions.d.ts.map +1 -1
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +85 -0
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +157 -0
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +23 -0
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +56 -0
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +658 -26
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +873 -27
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +104 -3
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
- package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts +54 -26
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js +132 -3
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts +17 -0
- package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/privacy.shared.schemas.js +27 -4
- package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts +82 -29
- package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.js +95 -29
- package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.js +12 -5
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts +21 -0
- package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.js +20 -0
- package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
- package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +7 -5
- package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.d.ts +8 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.js +29 -0
- package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
- package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +95 -17
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.js +86 -8
- package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +26 -26
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts +139 -3
- package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
- package/dist/esm/config/frontend/chart-registration-alignment.shared.js +151 -4
- package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
- package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
- package/dist/esm/config-authoring.entry.d.ts.map +1 -1
- package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +34 -0
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js +34 -0
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
- package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +45 -12
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
- package/dist/esm/external-data.exports.d.ts.map +1 -1
- package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +110 -58
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +183 -15
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts +15 -3
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js +32 -5
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
- package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +87 -7
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts +59 -0
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js +61 -0
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts +97 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js +41 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -0
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +205 -2
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +85 -1
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts +175 -0
- package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -0
- package/dist/esm/external-providers/frontend-provider-public-config.shared.js +207 -0
- package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -0
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +5 -28
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-capability.shared.schemas.js +4 -2
- package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts +28 -8
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js +15 -4
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts +165 -0
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js +39 -0
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts +338 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js +332 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts +178 -9
- package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-metadata.shared.schemas.js +181 -9
- package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts +7 -5
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.js +7 -5
- package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts +40 -0
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.js +80 -0
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -0
- package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/features/application-features.shared.resources-config.schemas.js +12 -0
- package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
- package/dist/esm/features/core-feature-definitions.shared.js +7 -1
- package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
- package/dist/esm/features/feature-builders.shared.d.ts +32 -0
- package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
- package/dist/esm/features/feature-builders.shared.js +32 -0
- package/dist/esm/features/feature-builders.shared.js.map +1 -1
- package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
- package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.js +12 -0
- package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts +73 -0
- package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -0
- package/dist/esm/files/file-remote-reference-link.shared.schemas.js +62 -0
- package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -0
- package/dist/esm/files/file-upload-grant.shared.schemas.d.ts +14 -2
- package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
- package/dist/esm/files/file-upload-grant.shared.schemas.js +44 -5
- package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
- package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/files/files.shared.schemas.d.ts +15 -8
- package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
- package/dist/esm/files/files.shared.schemas.js +15 -8
- package/dist/esm/files/files.shared.schemas.js.map +1 -1
- package/dist/esm/files/files.shared.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/actors.shared.schemas.js +3 -2
- package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agents.shared.schemas.d.ts +54 -5
- package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts +0 -3
- package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/deliberation.shared.schemas.js +0 -5
- package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts +14 -0
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js +40 -3
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +19 -0
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js +33 -0
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts +14 -9
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js +14 -9
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js +3 -2
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows.shared.schemas.js +3 -2
- package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts +130 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js +153 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts +0 -3
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js +1 -4
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts +0 -16
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js +1 -17
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts +3 -3
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js +3 -3
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts +2 -8
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js +4 -15
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts +112 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js +113 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -0
- package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.utils.js +1 -0
- package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
- package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
- package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts +8 -0
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.d.ts +46 -0
- package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.js +49 -0
- package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts +320 -50
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js +137 -36
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
- package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
- package/dist/esm/index.d.ts +15 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +15 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
- package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +11 -2
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/email/email-template.shared.enums.d.ts +15 -0
- package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-template.shared.enums.js +15 -0
- package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js +19 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts +30 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js +65 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.d.ts +6 -4
- package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.js +6 -4
- package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.d.ts +167 -5
- package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.js +191 -6
- package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.d.ts +158 -0
- package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.js +200 -1
- package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js +13 -0
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.js +22 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts +26 -0
- package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.schemas.js +25 -0
- package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.d.ts +25 -0
- package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.js +42 -17
- package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts +3 -2
- package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.shared.js +9 -2
- package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
- package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +18 -3
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts +13 -0
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js +13 -0
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
- package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
- package/dist/esm/public-runtime/index.d.ts +71 -2
- package/dist/esm/public-runtime/index.d.ts.map +1 -1
- package/dist/esm/public-runtime/index.js +62 -1
- package/dist/esm/public-runtime/index.js.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts +6 -5
- package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.js +6 -5
- package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.d.ts +16 -3
- package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.js +16 -3
- package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
- package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
- package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-documentation.d.ts +137 -0
- package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -0
- package/dist/esm/requests/manual-controllers-routes-documentation.js +1255 -0
- package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -0
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts +114 -0
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.js +129 -0
- package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.d.ts +11 -1
- package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.js +11 -1
- package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.d.ts +28 -3
- package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.js +52 -0
- package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
- package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.d.ts +1 -0
- package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.js +203 -25
- package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.d.ts +297 -68
- package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources-registry.shared.core.definitions.js +151 -5
- package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
- package/dist/esm/resources/resources-relationships.shared.factory.js +15 -0
- package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.d.ts +54 -0
- package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.js +69 -0
- package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.d.ts +11 -2
- package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.js +34 -3
- package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources.shared.utils.d.ts +32 -7
- package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.utils.js +32 -7
- package/dist/esm/resources/resources.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts +51 -0
- package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -0
- package/dist/esm/resources/utils/field-value-disclosure.utils.js +53 -0
- package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -0
- package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-summary.utils.d.ts +16 -2
- package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-summary.utils.js +19 -5
- package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
- package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/shared-persistence-collection.utils.js +11 -0
- package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
- package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.shared.definitions.d.ts +25 -0
- package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
- package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +38 -0
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +38 -0
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +5 -12
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +0 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.d.ts +84 -5
- package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.js +83 -3
- package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts +1 -0
- package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/registration.shared.dto.schemas.js +11 -0
- package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts +15 -0
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js +21 -4
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts +61 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +238 -6
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts +37 -27
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js +134 -12
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +2 -6
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js +32 -8
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts +45 -2
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js +45 -2
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts +35 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js +257 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts +143 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js +219 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js +27 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts +75 -7
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js +69 -8
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +31 -0
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js +198 -0
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts +31 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js +191 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +307 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +530 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -0
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts +4 -1
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js +29 -0
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts +4 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js +29 -0
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts +6 -0
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js +31 -0
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts +13 -0
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js +24 -3
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -1
- package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
- package/dist/esm/testing.d.ts.map +1 -1
- package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +4 -4
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +4 -4
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self.shared.resources-config.schemas.js +33 -3
- package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/users.shared.resources-config.schemas.d.ts +17 -1
- package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.resources-config.schemas.js +136 -5
- package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/users.shared.schemas.d.ts +60 -13
- package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.schemas.js +56 -9
- package/dist/esm/users/users.shared.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -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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E;YAChB,oBAAoB,CAAC,SAAS;YAC9B,oBAAoB,CAAC,aAAa;YAClC,oBAAoB,CAAC,WAAW;SACjC;QACD,YAAY,EAAE,EAAE;QAChB,YAAY,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 (auto-checked by gate) ───\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,gBAAgB,CAAC,OAAO;QACnC,gBAAgB,EAAE,CAAC,oBAAoB,CAAC,aAAa,C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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"]}
|
|
@@ -24,6 +24,37 @@ export type FeatureDefinitionWithAutoRegister = FeatureDefinition & {
|
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
27
|
+
* @wildo_source:part:start saas.models.features.definition-builders facet:layer:shared facet:audience:app-developer
|
|
28
|
+
*
|
|
29
|
+
* Declaring what an application can SELL or gate on. Two builders, from `@wildo-ai/saas-models`:
|
|
30
|
+
* `defineFeature` for a boolean capability, `defineLimitFeature` for a numeric allowance.
|
|
31
|
+
*
|
|
32
|
+
* A product in the billing catalogue then grants them through `grantedFeatures` / `grantedLimits`,
|
|
33
|
+
* and any surface gates on the identifier with `requiredFeatures` — a resource operation, a view, a
|
|
34
|
+
* chart, a navigation item, a settings section.
|
|
35
|
+
*
|
|
36
|
+
* ## Two things that decide whether the gate actually fires
|
|
37
|
+
*
|
|
38
|
+
* (`limitSemantic` is the third and is covered by the product-definitions skill's own guidance —
|
|
39
|
+
* the default `FLOOR` is an entitlement the tenant is ALLOWED, and a consumption CAP needs `CEILING`.)
|
|
40
|
+
*
|
|
41
|
+
* - **`countResource` is the one-call form.** It registers a limit check on that resource's CREATE
|
|
42
|
+
* automatically, so "at most ten projects per organisation" is one declaration rather than a
|
|
43
|
+
* definition plus a hand-written gate. A limit declared WITHOUT counting cannot be checked
|
|
44
|
+
* automatically: `checkLimit` REFUSES rather than guessing at a remaining quota, and the caller
|
|
45
|
+
* must pass a counting override or measure consumption itself. That is the right answer for a
|
|
46
|
+
* quantity that is not a row count — a sum of tokens, for instance.
|
|
47
|
+
* - **`rateLimit` on a definition is RESERVED and ignored by the gate.** A time-windowed allowance
|
|
48
|
+
* like "one hundred calls an hour" is not expressible here at all; abuse throttling is a separate
|
|
49
|
+
* mechanism with its own declaration.
|
|
50
|
+
*
|
|
51
|
+
* ## Granting a capability does not configure it
|
|
52
|
+
*
|
|
53
|
+
* An entitlement says the tenant MAY have the thing. Single sign-on entitles an organisation to
|
|
54
|
+
* register an identity provider; somebody still has to register one. The same holds for provisioning
|
|
55
|
+
* tokens, export destinations and webhook endpoints — so a plan that grants one of these still needs
|
|
56
|
+
* an onboarding step behind it.
|
|
57
|
+
*
|
|
27
58
|
* Simple boolean feature builder.
|
|
28
59
|
*
|
|
29
60
|
* @example
|
|
@@ -98,4 +129,5 @@ export declare function defineLimitFeature(identifier: string, options: {
|
|
|
98
129
|
dependencies?: string[];
|
|
99
130
|
unavailability?: FeatureUnavailabilityOverride;
|
|
100
131
|
}): FeatureDefinitionWithAutoRegister;
|
|
132
|
+
/** @wildo_source:part:end saas.models.features.definition-builders */
|
|
101
133
|
//# sourceMappingURL=feature-builders.shared.d.ts.map
|
|
@@ -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"}
|
|
@@ -25,6 +25,37 @@ function normalizeScopes(scope) {
|
|
|
25
25
|
// defineFeature() — Boolean Feature Builder
|
|
26
26
|
// =====================================================
|
|
27
27
|
/**
|
|
28
|
+
* @wildo_source:part:start saas.models.features.definition-builders facet:layer:shared facet:audience:app-developer
|
|
29
|
+
*
|
|
30
|
+
* Declaring what an application can SELL or gate on. Two builders, from `@wildo-ai/saas-models`:
|
|
31
|
+
* `defineFeature` for a boolean capability, `defineLimitFeature` for a numeric allowance.
|
|
32
|
+
*
|
|
33
|
+
* A product in the billing catalogue then grants them through `grantedFeatures` / `grantedLimits`,
|
|
34
|
+
* and any surface gates on the identifier with `requiredFeatures` — a resource operation, a view, a
|
|
35
|
+
* chart, a navigation item, a settings section.
|
|
36
|
+
*
|
|
37
|
+
* ## Two things that decide whether the gate actually fires
|
|
38
|
+
*
|
|
39
|
+
* (`limitSemantic` is the third and is covered by the product-definitions skill's own guidance —
|
|
40
|
+
* the default `FLOOR` is an entitlement the tenant is ALLOWED, and a consumption CAP needs `CEILING`.)
|
|
41
|
+
*
|
|
42
|
+
* - **`countResource` is the one-call form.** It registers a limit check on that resource's CREATE
|
|
43
|
+
* automatically, so "at most ten projects per organisation" is one declaration rather than a
|
|
44
|
+
* definition plus a hand-written gate. A limit declared WITHOUT counting cannot be checked
|
|
45
|
+
* automatically: `checkLimit` REFUSES rather than guessing at a remaining quota, and the caller
|
|
46
|
+
* must pass a counting override or measure consumption itself. That is the right answer for a
|
|
47
|
+
* quantity that is not a row count — a sum of tokens, for instance.
|
|
48
|
+
* - **`rateLimit` on a definition is RESERVED and ignored by the gate.** A time-windowed allowance
|
|
49
|
+
* like "one hundred calls an hour" is not expressible here at all; abuse throttling is a separate
|
|
50
|
+
* mechanism with its own declaration.
|
|
51
|
+
*
|
|
52
|
+
* ## Granting a capability does not configure it
|
|
53
|
+
*
|
|
54
|
+
* An entitlement says the tenant MAY have the thing. Single sign-on entitles an organisation to
|
|
55
|
+
* register an identity provider; somebody still has to register one. The same holds for provisioning
|
|
56
|
+
* tokens, export destinations and webhook endpoints — so a plan that grants one of these still needs
|
|
57
|
+
* an onboarding step behind it.
|
|
58
|
+
*
|
|
28
59
|
* Simple boolean feature builder.
|
|
29
60
|
*
|
|
30
61
|
* @example
|
|
@@ -106,4 +137,5 @@ export function defineLimitFeature(identifier, options) {
|
|
|
106
137
|
}
|
|
107
138
|
return definition;
|
|
108
139
|
}
|
|
140
|
+
/** @wildo_source:part:end saas.models.features.definition-builders */
|
|
109
141
|
//# sourceMappingURL=feature-builders.shared.js.map
|
|
@@ -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;AAC5C,wDAAwD;AAExD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,aAAa,CAC3B,UAAkB,EAClB,OAKC;IAED,OAAO;QACL,UAAU;QACV,SAAS,EAAE,gBAAgB,CAAC,OAAO;QACnC,gBAAgB,EAAE,eAAe,CAAC,OAAO,CAAC,KAAK,CAAC;QAChD,YAAY,EAAE,OAAO,CAAC,cAAc,IAAI,KAAK;QAC7C,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,EAAE;QACxC,cAAc,EAAE,OAAO,CAAC,cAAc;KACvC,CAAC;AACJ,CAAC;AAED,wDAAwD;AACxD,+CAA+C;AAC/C,wDAAwD;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,UAAU,kBAAkB,CAChC,UAAkB,EAClB,OAsBC;IAED,8FAA8F;IAC9F,MAAM,QAAQ,GACZ,OAAO,CAAC,QAAQ;QAChB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAEhF,MAAM,UAAU,GAAsC;QACpD,UAAU;QACV,SAAS,EAAE,gBAAgB,CAAC,KAAK;QACjC,gBAAgB,EAAE,eAAe,CAAC,OAAO,CAAC,KAAK,CAAC;QAChD,YAAY,EAAE,OAAO,CAAC,OAAO;QAC7B,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,EAAE;QACxC,6FAA6F;QAC7F,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1E,QAAQ;QACR,cAAc,EAAE,OAAO,CAAC,cAAc;KACvC,CAAC;IAEF,kFAAkF;IAClF,IAAI,OAAO,CAAC,aAAa,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;QACvD,UAAU,CAAC,yBAAyB,CAAC,GAAG;YACtC,aAAa,EAAE,OAAO,CAAC,aAAa;SACrC,CAAC;IACJ,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC","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 * 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"]}
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,UAAU,aAAa,CAC3B,UAAkB,EAClB,OAKC;IAED,OAAO;QACL,UAAU;QACV,SAAS,EAAE,gBAAgB,CAAC,OAAO;QACnC,gBAAgB,EAAE,eAAe,CAAC,OAAO,CAAC,KAAK,CAAC;QAChD,YAAY,EAAE,OAAO,CAAC,cAAc,IAAI,KAAK;QAC7C,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,EAAE;QACxC,cAAc,EAAE,OAAO,CAAC,cAAc;KACvC,CAAC;AACJ,CAAC;AAED,wDAAwD;AACxD,+CAA+C;AAC/C,wDAAwD;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,UAAU,kBAAkB,CAChC,UAAkB,EAClB,OAsBC;IAED,8FAA8F;IAC9F,MAAM,QAAQ,GACZ,OAAO,CAAC,QAAQ;QAChB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAEhF,MAAM,UAAU,GAAsC;QACpD,UAAU;QACV,SAAS,EAAE,gBAAgB,CAAC,KAAK;QACjC,gBAAgB,EAAE,eAAe,CAAC,OAAO,CAAC,KAAK,CAAC;QAChD,YAAY,EAAE,OAAO,CAAC,OAAO;QAC7B,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,EAAE;QACxC,6FAA6F;QAC7F,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1E,QAAQ;QACR,cAAc,EAAE,OAAO,CAAC,cAAc;KACvC,CAAC;IAEF,kFAAkF;IAClF,IAAI,OAAO,CAAC,aAAa,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,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 +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,WAAW;CAClB;AAMD;;;GAGG;AACH,oBAAY,2BAA2B;IACrC,oDAAoD;IACpD,mBAAmB,wBAAwB;IAC3C,mDAAmD;IACnD,cAAc,mBAAmB;IACjC,qDAAqD;IACrD,cAAc,mBAAmB;CAClC;AAMD;;GAEG;AACH,oBAAY,oBAAoB;IAC9B,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;CACZ;AAMD;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;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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;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,gBAAgB,CAAC;CACtC;AAED,4EAA4E;AAC5E,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,qBAAqB,EAAE,CAAC;CACrC;AAED,sFAAsF;AACtF,MAAM,WAAW,iCAAiC;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,KAAK,CAAC,qBAAqB,GAAG;QAAE,eAAe,EAAE,gBAAgB,CAAA;KAAE,CAAC,CAAC;CAClF;AAED,0EAA0E;AAC1E,MAAM,WAAW,gCAAgC;IAC/C,aAAa,EAAE,4BAA4B,EAAE,CAAC;IAC9C,kBAAkB,EAAE,iCAAiC,EAAE,CAAC;CACzD;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE;IACnD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;CACxB,GAAG,qBAAqB,EAAE,CAa1B;AAED;;;;;;GAMG;AACH,wBAAgB,4CAA4C,CAC1D,gBAAgB,EAAE,sBAAsB,GAAG,IAAI,GAAG,SAAS,EAC3D,UAAU,GAAE;IACV,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;CACpB,GACL,qBAAqB,EAAE,CAmBzB;AAED;;;;GAIG;AACH,wBAAgB,yCAAyC,CACvD,aAAa,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,EAC/C,UAAU,GAAE;IACV,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;CACpB,GACL,qBAAqB,EAAE,CAWzB;AAED;;;GAGG;AACH,wBAAgB,uCAAuC,CAAC,MAAM,EAAE;IAC9D,WAAW,EAAE,QAAQ,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,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAWhG,MAAM,CAAC,MAAM,uDAAuD,GAAG,CAAC,sBAA8C,EAAE,EAAE,CAAC,0CAA0C,CAInK;IACA,UAAU,EAAE,gCAAgC;IAC5C,kBAAkB,EAAE,gBAAgB,CAAC,aAAa;IAClD,uBAAuB,EAAE,kCAAkC,CAAC,gBAAgB,CAAC,aAAa,CAAC;IAC3F,qBAAqB,EAAE,sBAAsB;IAC7C,gBAAgB,E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C,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;AACjG,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAWhG,MAAM,CAAC,MAAM,uDAAuD,GAAG,CAAC,sBAA8C,EAAE,EAAE,CAAC,0CAA0C,CAInK;IACA,UAAU,EAAE,gCAAgC;IAC5C,kBAAkB,EAAE,gBAAgB,CAAC,aAAa;IAClD,uBAAuB,EAAE,kCAAkC,CAAC,gBA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AAS,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"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,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,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { FileUploaderEntityType } from '@wildo-ai/zod-decorators';
|
|
2
3
|
import { CoreResourceOperation } from '../resources/resources.shared.core.definitions';
|
|
3
4
|
import { FileStatus } from './files.shared.schemas';
|
|
4
5
|
/**
|
|
@@ -64,7 +65,7 @@ export declare const FileUploadGrantMetadataSchema: z.ZodObject<{
|
|
|
64
65
|
[K in FileUploadGrantOperation]: K;
|
|
65
66
|
}>;
|
|
66
67
|
minter: z.ZodObject<{
|
|
67
|
-
entityType: z.
|
|
68
|
+
entityType: z.ZodEnum<typeof FileUploaderEntityType>;
|
|
68
69
|
id: z.ZodString;
|
|
69
70
|
}>;
|
|
70
71
|
uploadUrl: z.ZodString;
|
|
@@ -135,9 +136,20 @@ export declare const FileUploadGrantStatusSchema: z.ZodObject<{
|
|
|
135
136
|
}>>;
|
|
136
137
|
}>;
|
|
137
138
|
export type FileUploadGrantStatus = z.infer<typeof FileUploadGrantStatusSchema>;
|
|
138
|
-
/**
|
|
139
|
+
/**
|
|
140
|
+
* Body accepted by both mint doors.
|
|
141
|
+
*
|
|
142
|
+
* The three optional file facts mirror what the MCP File Objects proposal has a client declare when
|
|
143
|
+
* it asks to upload (`name`, `mimeType`, `size`): declaring them lets the server refuse a file the
|
|
144
|
+
* field would never accept BEFORE handing out a link, instead of at redemption when the link is
|
|
145
|
+
* already spent. They are advisory for the upload itself — the bytes are validated on receipt
|
|
146
|
+
* regardless — and a declaration that later disagrees with the bytes is refused on receipt too.
|
|
147
|
+
*/
|
|
139
148
|
export declare const FileUploadGrantMintRequestSchema: z.ZodObject<{
|
|
140
149
|
expiresInMinutes: z.ZodOptional<z.ZodNumber>;
|
|
150
|
+
name: z.ZodOptional<z.ZodString>;
|
|
151
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
152
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
141
153
|
}>;
|
|
142
154
|
export type FileUploadGrantMintRequest = z.infer<typeof FileUploadGrantMintRequestSchema>;
|
|
143
155
|
/** @wildo_source:part:end saas.models.file-upload-grant */
|
|
@@ -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,aAAa;IACrB,+DAA+D;IAC/D,OAAO,YAAY;IACnB,mEAAmE;IACnE,OAAO,YAAY;CACpB;AACD,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,oBAAoB,CAAgC,CAAC;AAE/G;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,EAAE,CAAC,CAAC,S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AC,CAAC,SAAS,CAAC;QAAC,gBAAgB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;KAAE,CAAC,CAAC;IAC/F,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC;IACvB,gBAAgB,EAAE,CAAC,CAAC,SAAS,CAAC;IAC9B,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;QAAE,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC;QAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,UAAU,CAAC,CAAA;KAAE,CAAC,CAAC,CAAC;CACjG,CAgBC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;;;;;;;GAQG;AACH,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,SAAS,CAAC;IACzD,gBAAgB,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAC7C,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACjC,QAAQ,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACrC,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;CAClC,CAQU,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAC1F,2DAA2D"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { FileUploaderEntityType } from '@wildo-ai/zod-decorators';
|
|
2
3
|
import { CoreResourceOperation } from '../resources/resources.shared.core.definitions.js';
|
|
3
4
|
import { FileStatus } from './files.shared.schemas.js';
|
|
4
5
|
/**
|
|
@@ -62,11 +63,35 @@ export const FileUploadGrantMetadataSchema = z.object({
|
|
|
62
63
|
operation: FileUploadGrantOperationSchema,
|
|
63
64
|
/**
|
|
64
65
|
* Who minted — recorded so the uploaded file is attributed to a PERSON or MACHINE, not to the
|
|
65
|
-
* grant.
|
|
66
|
-
*
|
|
66
|
+
* grant.
|
|
67
|
+
*
|
|
68
|
+
* `entityType` is the ENUM, not a string. It was `z.string().min(1)` until 2026-09-08, with the
|
|
69
|
+
* stated reason that "the uploader enum lives in `zod-decorators`, upstream of this package" —
|
|
70
|
+
* which is exactly backwards: upstream is what a package MAY import, and this one already does.
|
|
71
|
+
* `files.shared.schemas.ts` in this very directory imports `FileUploaderEntityType` from
|
|
72
|
+
* `@wildo-ai/zod-decorators`, re-exports it, and writes `z.enum(FileUploaderEntityType)` on the
|
|
73
|
+
* FILES row's own `uploadedByEntityType`. So the vocabulary was one import away the whole time and
|
|
74
|
+
* the metadata's copy of the same field was the only one left open.
|
|
75
|
+
*
|
|
76
|
+
* What the enum buys: `metadata` is an UNTYPED bag on the token row, so nothing between the write
|
|
77
|
+
* and the read guarantees its shape — the read is the only place that can. Every reader here goes
|
|
78
|
+
* through `FileUploadGrantMetadataSchema.safeParse`, so an out-of-vocabulary entity type now makes
|
|
79
|
+
* the whole metadata unparseable and the redemption path refuses the grant instead of casting the
|
|
80
|
+
* value into `FileUploaderPrincipal` and carrying it three layers to `validateUploadedByEntityType`.
|
|
81
|
+
*
|
|
82
|
+
* NOT narrowed to the three values `mint` can actually produce (mint refuses an anonymous and a
|
|
83
|
+
* token-borne minter, so `ANONYMOUS_USER` is unreachable): that refusal is a MINT policy, enforced
|
|
84
|
+
* and explained at mint, and re-encoding it here would put half a policy in a schema that cannot
|
|
85
|
+
* say why. The vocabulary of this field is the vocabulary of the principal it names.
|
|
86
|
+
*/
|
|
87
|
+
minter: z.object({ entityType: z.enum(FileUploaderEntityType), id: z.string().min(1) }),
|
|
88
|
+
/**
|
|
89
|
+
* The concrete upload URL the grant was minted for. Two jobs, and the second one is why it must be
|
|
90
|
+
* absolute: the status read hands it to the drop page, AND the redemption path compares its PATH
|
|
91
|
+
* against the route the token is presented on (`assertGrantMatchesRoute`). Until 2026-09-08 it was
|
|
92
|
+
* recorded and never read back, so a grant bound to one concrete route could be redeemed on any
|
|
93
|
+
* other route reaching the same (resource, field, operation, row).
|
|
67
94
|
*/
|
|
68
|
-
minter: z.object({ entityType: z.string().min(1), id: z.string().min(1) }),
|
|
69
|
-
/** The concrete upload URL the grant was minted for — recorded so the status read can hand it to the drop page. */
|
|
70
95
|
uploadUrl: z.string().url(),
|
|
71
96
|
/** Written after a successful redemption; absent until then. */
|
|
72
97
|
producedFileId: z.string().min(1).optional(),
|
|
@@ -128,9 +153,23 @@ export const FileUploadGrantStatusSchema = z.object({
|
|
|
128
153
|
/** `null` until redeemed, or when the post-redemption write-back failed (re-read the resource instead). */
|
|
129
154
|
file: z.object({ fileId: z.string().min(1), status: z.enum(FileStatus) }).nullable(),
|
|
130
155
|
});
|
|
131
|
-
/**
|
|
156
|
+
/**
|
|
157
|
+
* Body accepted by both mint doors.
|
|
158
|
+
*
|
|
159
|
+
* The three optional file facts mirror what the MCP File Objects proposal has a client declare when
|
|
160
|
+
* it asks to upload (`name`, `mimeType`, `size`): declaring them lets the server refuse a file the
|
|
161
|
+
* field would never accept BEFORE handing out a link, instead of at redemption when the link is
|
|
162
|
+
* already spent. They are advisory for the upload itself — the bytes are validated on receipt
|
|
163
|
+
* regardless — and a declaration that later disagrees with the bytes is refused on receipt too.
|
|
164
|
+
*/
|
|
132
165
|
export const FileUploadGrantMintRequestSchema = z.object({
|
|
133
166
|
expiresInMinutes: z.number().int().min(1).max(FILE_UPLOAD_GRANT_ABSOLUTE_MAX_MINUTES).optional(),
|
|
167
|
+
/** The file name the caller intends to upload; used for the curl example and checked against nothing else. */
|
|
168
|
+
name: z.string().min(1).max(255).optional(),
|
|
169
|
+
/** Declared MIME type; refused at mint when the field does not accept it. */
|
|
170
|
+
mimeType: z.string().min(1).max(255).optional(),
|
|
171
|
+
/** Declared size in bytes; refused at mint when above the field's maximum. */
|
|
172
|
+
size: z.number().int().positive().optional(),
|
|
134
173
|
}).strict();
|
|
135
174
|
/** @wildo_source:part:end saas.models.file-upload-grant */
|
|
136
175
|
//# sourceMappingURL=file-upload-grant.shared.schemas.js.map
|