@wildo-ai/saas-specifications 1.1.1 → 1.1.3
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/_core/brand/brand-asset.schemas.d.ts +4 -6
- package/dist/esm/_core/brand/brand-asset.schemas.d.ts.map +1 -1
- package/dist/esm/_core/brand/brand-asset.schemas.js +4 -12
- package/dist/esm/_core/brand/brand-asset.schemas.js.map +1 -1
- package/dist/esm/_core/brand/brand-generation.schemas.d.ts +5 -3
- package/dist/esm/_core/brand/brand-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/brand/brand-generation.schemas.js +5 -2
- package/dist/esm/_core/brand/brand-generation.schemas.js.map +1 -1
- package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts +10 -3
- package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts.map +1 -1
- package/dist/esm/_core/brand/brand-snapshot.schemas.js +10 -2
- package/dist/esm/_core/brand/brand-snapshot.schemas.js.map +1 -1
- package/dist/esm/_core/brand/brand.family-aspects.d.ts +3 -0
- package/dist/esm/_core/brand/brand.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/brand/brand.family-aspects.js +51 -0
- package/dist/esm/_core/brand/brand.family-aspects.js.map +1 -0
- package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.js +15 -5
- package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.js.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts +40 -3
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js +85 -6
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js.map +1 -1
- package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts +3 -0
- package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/build-plan/build-plan.family-aspects.js +28 -0
- package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -0
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js +10 -4
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts +15 -0
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.js.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts +3 -0
- package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/business-model-lite/business-model.family-aspects.js +21 -0
- package/dist/esm/_core/business-model-lite/business-model.family-aspects.js.map +1 -0
- package/dist/esm/_core/chart-view-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/chart-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/chart-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts +85 -0
- package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js +41 -0
- package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts +178 -2
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js +115 -9
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts +12 -0
- package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js +47 -0
- package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js.map +1 -0
- package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js +8 -3
- package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts +21 -0
- package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js +40 -0
- package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js.map +1 -0
- package/dist/esm/_core/composite-view-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/composite-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/composite-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts +3 -0
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js +32 -0
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js.map +1 -0
- package/dist/esm/_core/execution-view-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/execution-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/execution-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.d.ts +6 -7
- package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.d.ts.map +1 -1
- package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.js +6 -13
- package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.js.map +1 -1
- package/dist/esm/_core/expert-personas/expert-persona-validation.d.ts +0 -11
- package/dist/esm/_core/expert-personas/expert-persona-validation.d.ts.map +1 -1
- package/dist/esm/_core/expert-personas/expert-persona-validation.js +0 -19
- package/dist/esm/_core/expert-personas/expert-persona-validation.js.map +1 -1
- package/dist/esm/_core/expert-personas/expert-role-template.schemas.d.ts +1 -2
- package/dist/esm/_core/expert-personas/expert-role-template.schemas.d.ts.map +1 -1
- package/dist/esm/_core/expert-personas/expert-role-template.schemas.js +1 -2
- package/dist/esm/_core/expert-personas/expert-role-template.schemas.js.map +1 -1
- package/dist/esm/_core/family-aspects.registry.d.ts +18 -0
- package/dist/esm/_core/family-aspects.registry.d.ts.map +1 -0
- package/dist/esm/_core/family-aspects.registry.js +60 -0
- package/dist/esm/_core/family-aspects.registry.js.map +1 -0
- package/dist/esm/_core/family-aspects.schemas.d.ts +122 -0
- package/dist/esm/_core/family-aspects.schemas.d.ts.map +1 -0
- package/dist/esm/_core/family-aspects.schemas.js +15 -0
- package/dist/esm/_core/family-aspects.schemas.js.map +1 -0
- package/dist/esm/_core/feature-drafts/capability-map-output-set-generation.schemas.d.ts +11 -11
- package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts +3 -0
- package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js +25 -0
- package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js.map +1 -0
- package/dist/esm/_core/feature-drafts/feature-specification-drafts-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/feature-drafts/feature-specification-drafts-generation.schemas.js +17 -4
- package/dist/esm/_core/feature-drafts/feature-specification-drafts-generation.schemas.js.map +1 -1
- package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/flows-actors-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/frontend-component-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/frontend-component-specification.schemas.js +19 -1
- package/dist/esm/_core/frontend-component-specification.schemas.js.map +1 -1
- package/dist/esm/_core/full-custom-view-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/full-custom-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/full-custom-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/guidance-flow-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/guidance-flow-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/guidance-flow-specification.schemas.js +14 -0
- package/dist/esm/_core/guidance-flow-specification.schemas.js.map +1 -1
- package/dist/esm/_core/index.d.ts +3 -0
- package/dist/esm/_core/index.d.ts.map +1 -1
- package/dist/esm/_core/index.js +3 -0
- package/dist/esm/_core/index.js.map +1 -1
- package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts +22 -22
- package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-snapshot-generation.schemas.js +5 -40
- package/dist/esm/_core/market/market-snapshot-generation.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-snapshot-validation.d.ts +15 -0
- package/dist/esm/_core/market/market-snapshot-validation.d.ts.map +1 -1
- package/dist/esm/_core/market/market-snapshot-validation.js.map +1 -1
- package/dist/esm/_core/market/market.family-aspects.d.ts +9 -0
- package/dist/esm/_core/market/market.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/market/market.family-aspects.js +227 -0
- package/dist/esm/_core/market/market.family-aspects.js.map +1 -0
- package/dist/esm/_core/onboarding-view-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/onboarding-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/onboarding-view-specification.schemas.js +14 -0
- package/dist/esm/_core/onboarding-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.js +11 -5
- package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.js.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts +66 -9
- package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan-validation.js +62 -20
- package/dist/esm/_core/placement-plan/placement-plan-validation.js.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts +3 -0
- package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js +31 -0
- package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js.map +1 -0
- package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts +4 -1
- package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan.schemas.js +4 -1
- package/dist/esm/_core/placement-plan/placement-plan.schemas.js.map +1 -1
- package/dist/esm/_core/provider-specification.schemas.d.ts +82 -0
- package/dist/esm/_core/provider-specification.schemas.d.ts.map +1 -0
- package/dist/esm/_core/provider-specification.schemas.js +144 -0
- package/dist/esm/_core/provider-specification.schemas.js.map +1 -0
- package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.js +13 -8
- package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.js.map +1 -1
- package/dist/esm/_core/requirements/requirements-snapshot-validation.d.ts +15 -0
- package/dist/esm/_core/requirements/requirements-snapshot-validation.d.ts.map +1 -1
- package/dist/esm/_core/requirements/requirements-snapshot-validation.js.map +1 -1
- package/dist/esm/_core/requirements/requirements.family-aspects.d.ts +9 -0
- package/dist/esm/_core/requirements/requirements.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/requirements/requirements.family-aspects.js +40 -0
- package/dist/esm/_core/requirements/requirements.family-aspects.js.map +1 -0
- package/dist/esm/_core/resource-specification.schemas.d.ts +22 -0
- package/dist/esm/_core/resource-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/resource-specification.schemas.js.map +1 -1
- package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.js +7 -2
- package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.js.map +1 -1
- package/dist/esm/_core/roadmap/roadmap-snapshot-validation.d.ts +15 -0
- package/dist/esm/_core/roadmap/roadmap-snapshot-validation.d.ts.map +1 -1
- package/dist/esm/_core/roadmap/roadmap-snapshot-validation.js.map +1 -1
- package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts +3 -0
- package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/roadmap/roadmap.family-aspects.js +26 -0
- package/dist/esm/_core/roadmap/roadmap.family-aspects.js.map +1 -0
- package/dist/esm/_core/utils/family-ref-stamping.d.ts +64 -0
- package/dist/esm/_core/utils/family-ref-stamping.d.ts.map +1 -0
- package/dist/esm/_core/utils/family-ref-stamping.js +73 -0
- package/dist/esm/_core/utils/family-ref-stamping.js.map +1 -0
- package/dist/esm/_core/vision/vision-snapshot-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/vision/vision-snapshot-generation.schemas.js +23 -9
- package/dist/esm/_core/vision/vision-snapshot-generation.schemas.js.map +1 -1
- package/dist/esm/_core/vision/vision.family-aspects.d.ts +11 -0
- package/dist/esm/_core/vision/vision.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/vision/vision.family-aspects.js +63 -0
- package/dist/esm/_core/vision/vision.family-aspects.js.map +1 -0
- package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.d.ts +0 -4
- package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts +193 -38
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js +157 -57
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.d.ts +3 -3
- package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.js +3 -3
- package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts +38 -4
- package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js +37 -3
- package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/document-facts.family-aspects.d.ts +12 -0
- package/dist/esm/application-creation/document-facts.family-aspects.d.ts.map +1 -0
- package/dist/esm/application-creation/document-facts.family-aspects.js +37 -0
- package/dist/esm/application-creation/document-facts.family-aspects.js.map +1 -0
- package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts +3 -0
- package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts.map +1 -0
- package/dist/esm/application-creation/document-release-policy.family-aspects.js +23 -0
- package/dist/esm/application-creation/document-release-policy.family-aspects.js.map +1 -0
- package/dist/esm/application-creation/journey.application-creation.schemas.d.ts +18 -6
- package/dist/esm/application-creation/journey.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/journey.application-creation.schemas.js +18 -6
- package/dist/esm/application-creation/journey.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +101 -85
- package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/playbooks.application-creation.schemas.js +171 -86
- package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts +2 -0
- package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js +2 -0
- package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation.exports.d.ts +11 -0
- package/dist/esm/application-creation.exports.d.ts.map +1 -1
- package/dist/esm/application-creation.exports.js +11 -0
- package/dist/esm/application-creation.exports.js.map +1 -1
- package/dist/esm/assurance/application-document-publication.schemas.d.ts +20 -6
- package/dist/esm/assurance/application-document-publication.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/application-document-publication.schemas.js +26 -10
- package/dist/esm/assurance/application-document-publication.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +999 -2
- package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.definitions.js +2127 -61
- package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts +26 -0
- package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-document-system.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-document-system.definitions.js +18 -3
- package/dist/esm/assurance/assurance-document-system.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-document-system.schemas.d.ts +32 -2
- package/dist/esm/assurance/assurance-document-system.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-document-system.schemas.js +32 -2
- package/dist/esm/assurance/assurance-document-system.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts +36 -0
- package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts.map +1 -0
- package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js +859 -0
- package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js.map +1 -0
- package/dist/esm/assurance/assurance-external-framework-mapping.d.ts +90 -0
- package/dist/esm/assurance/assurance-external-framework-mapping.d.ts.map +1 -0
- package/dist/esm/assurance/assurance-external-framework-mapping.js +134 -0
- package/dist/esm/assurance/assurance-external-framework-mapping.js.map +1 -0
- package/dist/esm/assurance/assurance-foundation.schemas.d.ts +43 -0
- package/dist/esm/assurance/assurance-foundation.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-foundation.schemas.js +56 -0
- package/dist/esm/assurance/assurance-foundation.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts +78 -1
- package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-objective-catalog.definitions.js +562 -5
- package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-program-generation.schemas.d.ts +148 -0
- package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -0
- package/dist/esm/assurance/assurance-program-generation.schemas.js +385 -0
- package/dist/esm/assurance/assurance-program-generation.schemas.js.map +1 -0
- package/dist/esm/assurance/assurance-program.family-aspects.d.ts +13 -0
- package/dist/esm/assurance/assurance-program.family-aspects.d.ts.map +1 -0
- package/dist/esm/assurance/assurance-program.family-aspects.js +16 -0
- package/dist/esm/assurance/assurance-program.family-aspects.js.map +1 -0
- package/dist/esm/assurance/assurance-program.schemas.d.ts +474 -14
- package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-program.schemas.js +319 -8
- package/dist/esm/assurance/assurance-program.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-source-registry.definitions.d.ts +1 -0
- package/dist/esm/assurance/assurance-source-registry.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-source-registry.definitions.js +12 -0
- package/dist/esm/assurance/assurance-source-registry.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-sources.schemas.d.ts +76 -0
- package/dist/esm/assurance/assurance-sources.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-sources.schemas.js +59 -0
- package/dist/esm/assurance/assurance-sources.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts +35 -0
- package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts.map +1 -0
- package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js +999 -0
- package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js.map +1 -0
- package/dist/esm/assurance/document-publication.family-aspects.d.ts +29 -0
- package/dist/esm/assurance/document-publication.family-aspects.d.ts.map +1 -0
- package/dist/esm/assurance/document-publication.family-aspects.js +48 -0
- package/dist/esm/assurance/document-publication.family-aspects.js.map +1 -0
- package/dist/esm/assurance.exports.d.ts +2 -0
- package/dist/esm/assurance.exports.d.ts.map +1 -1
- package/dist/esm/assurance.exports.js +2 -0
- package/dist/esm/assurance.exports.js.map +1 -1
- package/dist/esm/companion-exports.d.ts +26 -8
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/companion-exports.js.map +1 -1
- package/dist/esm/engine/_bootstrap.js +3 -1
- package/dist/esm/engine/_bootstrap.js.map +1 -1
- package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js +15 -1
- package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js.map +1 -1
- package/dist/esm/engine/applications/resources/application-metadata.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js +4 -2
- package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js.map +1 -1
- package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts +2 -0
- package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js +17 -3
- package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js.map +1 -1
- package/dist/esm/engine/applications/resources/application-versions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/application-versions.resource.specification.js +12 -10
- package/dist/esm/engine/applications/resources/application-versions.resource.specification.js.map +1 -1
- package/dist/esm/engine/applications/resources/applications.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/applications.resource.specification.js +4 -2
- package/dist/esm/engine/applications/resources/applications.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts +36 -0
- package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js +193 -0
- package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js.map +1 -0
- package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts +1 -1
- package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js +3 -1
- package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js +15 -1
- package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts +2 -0
- package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js +17 -3
- package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts +32 -0
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js +308 -0
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js.map +1 -0
- package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts +1 -1
- package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js +6 -4
- package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js +4 -2
- package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js +8 -6
- package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js +11 -9
- package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js +8 -6
- package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts +9 -25
- package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/sso-config.resource.specification.js +106 -10
- package/dist/esm/engine/auth/resources/sso-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts +0 -6
- package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js +2 -0
- package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts +32 -0
- package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js +297 -0
- package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js.map +1 -0
- package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts +2 -2
- package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js +6 -3
- package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts +8 -8
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js +4 -2
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts +2 -2
- package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js +5 -3
- package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/prices.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/prices.resource.specification.js +10 -8
- package/dist/esm/engine/billing/resources/prices.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/products.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/products.resource.specification.js +10 -8
- package/dist/esm/engine/billing/resources/products.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/promotions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/promotions.resource.specification.js +16 -12
- package/dist/esm/engine/billing/resources/promotions.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/referrals.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/referrals.resource.specification.js +10 -8
- package/dist/esm/engine/billing/resources/referrals.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts +6 -6
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js +8 -3
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts +13 -9
- package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/usage-records.resource.specification.js +30 -11
- package/dist/esm/engine/billing/resources/usage-records.resource.specification.js.map +1 -1
- package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js +10 -8
- package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js.map +1 -1
- package/dist/esm/engine/engine-resource-specifications.registry.d.ts +2 -2
- package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
- package/dist/esm/engine/engine-resource-specifications.registry.js +11 -2
- package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
- package/dist/esm/engine/engine-resource-sub-domain.d.ts +83 -0
- package/dist/esm/engine/engine-resource-sub-domain.d.ts.map +1 -0
- package/dist/esm/engine/engine-resource-sub-domain.js +153 -0
- package/dist/esm/engine/engine-resource-sub-domain.js.map +1 -0
- package/dist/esm/engine/errors/error-messages.specification.d.ts.map +1 -1
- package/dist/esm/engine/errors/error-messages.specification.js +44 -1
- package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
- package/dist/esm/engine/features/audit-logs.feature.specification.js +4 -4
- package/dist/esm/engine/features/audit-logs.feature.specification.js.map +1 -1
- package/dist/esm/engine/features/core-limits.feature.specifications.js +7 -7
- package/dist/esm/engine/features/core-limits.feature.specifications.js.map +1 -1
- package/dist/esm/engine/features/resources/application-features.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/features/resources/application-features.resource.specification.js +5 -3
- package/dist/esm/engine/features/resources/application-features.resource.specification.js.map +1 -1
- package/dist/esm/engine/features/resources/organization-features.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/features/resources/organization-features.resource.specification.js +5 -3
- package/dist/esm/engine/features/resources/organization-features.resource.specification.js.map +1 -1
- package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts +1 -1
- package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/features/resources/user-features.resource.specification.js +5 -3
- package/dist/esm/engine/features/resources/user-features.resource.specification.js.map +1 -1
- package/dist/esm/engine/files/resources/files.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/files/resources/files.resource.specification.js +12 -10
- package/dist/esm/engine/files/resources/files.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts +3 -3
- package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js +22 -10
- package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts +3 -3
- package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js +6 -4
- package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts +3 -3
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js +4 -2
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts +3 -3
- package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js +3 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.d.ts +5 -0
- package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.d.ts.map +1 -0
- package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js +81 -0
- package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js.map +1 -0
- package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.d.ts +4 -0
- package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.d.ts.map +1 -0
- package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.js +22 -0
- package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.js.map +1 -0
- package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js +8 -3
- package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.d.ts +0 -4
- package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.d.ts.map +0 -1
- package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.js +0 -21
- package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.js.map +0 -1
- package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.d.ts +0 -4
- package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.d.ts.map +0 -1
- package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.js +0 -21
- package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.js.map +0 -1
- package/dist/esm/engine/frontend-components/index.d.ts +0 -2
- package/dist/esm/engine/frontend-components/index.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/index.js +4 -6
- package/dist/esm/engine/frontend-components/index.js.map +1 -1
- package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts +1 -1
- package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js +15 -12
- package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts +1 -1
- package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js +12 -9
- package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts +9 -1
- package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js +9 -6
- package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/index.d.ts +2 -0
- package/dist/esm/engine/index.d.ts.map +1 -1
- package/dist/esm/engine/index.js +2 -0
- package/dist/esm/engine/index.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js +19 -17
- package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js +9 -7
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js +10 -8
- package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts +7 -2
- package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js +12 -5
- package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js.map +1 -1
- package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js +22 -15
- package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js.map +1 -1
- package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts +1 -1
- package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js +14 -10
- package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js.map +1 -1
- package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js +31 -6
- package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts +1 -1
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js +11 -9
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js +5 -3
- package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js +6 -4
- package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js +4 -2
- package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js +3 -1
- package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-units.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js +2 -0
- package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organizations.resource.specification.js +9 -7
- package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
- package/dist/esm/engine/providers/_engine-provider-shared.d.ts +9 -0
- package/dist/esm/engine/providers/_engine-provider-shared.d.ts.map +1 -0
- package/dist/esm/engine/providers/_engine-provider-shared.js +19 -0
- package/dist/esm/engine/providers/_engine-provider-shared.js.map +1 -0
- package/dist/esm/engine/providers/anthropic.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/anthropic.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/anthropic.provider.specification.js +33 -0
- package/dist/esm/engine/providers/anthropic.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/apple.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/apple.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/apple.provider.specification.js +35 -0
- package/dist/esm/engine/providers/apple.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/email-preview.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/email-preview.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/email-preview.provider.specification.js +31 -0
- package/dist/esm/engine/providers/email-preview.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/github.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/github.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/github.provider.specification.js +30 -0
- package/dist/esm/engine/providers/github.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/google.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/google.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/google.provider.specification.js +34 -0
- package/dist/esm/engine/providers/google.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/grok.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/grok.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/grok.provider.specification.js +30 -0
- package/dist/esm/engine/providers/grok.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/index.d.ts +23 -0
- package/dist/esm/engine/providers/index.d.ts.map +1 -0
- package/dist/esm/engine/providers/index.js +37 -0
- package/dist/esm/engine/providers/index.js.map +1 -0
- package/dist/esm/engine/providers/microsoft.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/microsoft.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/microsoft.provider.specification.js +30 -0
- package/dist/esm/engine/providers/microsoft.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/mistral.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/mistral.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/mistral.provider.specification.js +33 -0
- package/dist/esm/engine/providers/mistral.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/openai.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/openai.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/openai.provider.specification.js +43 -0
- package/dist/esm/engine/providers/openai.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/opencode.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/opencode.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/opencode.provider.specification.js +50 -0
- package/dist/esm/engine/providers/opencode.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/perplexity.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/perplexity.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/perplexity.provider.specification.js +30 -0
- package/dist/esm/engine/providers/perplexity.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/resend.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/resend.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/resend.provider.specification.js +33 -0
- package/dist/esm/engine/providers/resend.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/stripe.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/stripe.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/stripe.provider.specification.js +35 -0
- package/dist/esm/engine/providers/stripe.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/twilio.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/twilio.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/twilio.provider.specification.js +33 -0
- package/dist/esm/engine/providers/twilio.provider.specification.js.map +1 -0
- package/dist/esm/engine/users/resources/anonymous-users.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js +9 -7
- package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts +1 -1
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js +11 -9
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts +1 -1
- package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-credentials.resource.specification.js +4 -2
- package/dist/esm/engine/users/resources/user-credentials.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts +1 -1
- package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js +10 -8
- package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts +5 -5
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.js +6 -4
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts +1 -1
- package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-profiles.resource.specification.js +4 -2
- package/dist/esm/engine/users/resources/user-profiles.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts +5 -5
- package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js +15 -11
- package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts +1 -1
- package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js +3 -1
- package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-self.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-self.resource.specification.js +11 -9
- package/dist/esm/engine/users/resources/user-self.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/users.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/users.resource.specification.js +95 -0
- package/dist/esm/engine/users/resources/users.resource.specification.js.map +1 -1
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts +5 -0
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts.map +1 -1
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js +451 -25
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-units.schemas.d.ts +37 -1
- package/dist/esm/technical-documentation/technical-documentation-units.schemas.d.ts.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-units.schemas.js +37 -1
- package/dist/esm/technical-documentation/technical-documentation-units.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +8 -8
- package/dist/esm/.builder.pid +0 -9
- package/dist/esm/_core/business-coverage/coverage-findings-validation.d.ts +0 -0
- package/dist/esm/_core/business-coverage/coverage-findings-validation.d.ts.map +0 -0
- package/dist/esm/_core/business-coverage/coverage-findings-validation.js.map +0 -0
- package/dist/esm/_core/business-coverage/coverage-findings.schemas.d.ts +0 -0
- package/dist/esm/_core/business-coverage/coverage-findings.schemas.d.ts.map +0 -0
- package/dist/esm/_core/business-coverage/coverage-findings.schemas.js.map +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-limits.feature.specifications.js","sourceRoot":"","sources":["../../../../../src/engine/features/core-limits.feature.specifications.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,0CAA0C,EAAE,MAAM,6BAA6B,CAAC;AACzF,OAAO,EACL,0CAA0C,EAC1C,gBAAgB,EAChB,oCAAoC,GACrC,MAAM,0BAA0B,CAAC;AAElC,MAAM,CAAC,MAAM,8BAA8B,GAAG,0CAA0C,CACtF,EAAE,UAAU,EAAE,aAAa,EAAE,EAC7B,GAAG,EAAE,CAAC,CAAC;IACL,OAAO,EACL,+F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C,gBAAgB,EAAE,0CAA0C;QAC5D,yBAAyB,EAAE,oCAAoC,CAAC,2BAA2B,CAAC;QAC5F,KAAK,EAAE;YACL,+OAA+O;YAC/O,qPAAqP;YACrP,0OAA0O;SAC3O;KACF;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Engine-shipped overlays for the LIMIT-typed feature definitions in\n * `CORE_FEATURE_DEFINITIONS` that are NOT members of the `CoreFeature`\n * enum (`MAX_MEMBERS`, `MAX_API_KEYS`).\n *\n * These two LIMIT features are bundled into a single file because they\n * share the same shape (organisation-scoped numeric limit feeding a\n * resource counter) and are not enum members — there is no `CoreFeature`\n * declaration to point `identifierDeclaration` at, so the spec layer\n * carries the literal string identifier as `ref` directly. Companion\n * prompts surface them just like the enum-backed entries, but the\n * `codeHandling` shape reflects the truthful absence of a public enum\n * declaration.\n *\n * Q5-2 says \"engine ships overlays for: (a) all 7 `CoreFeature`\n * definitions\". The LIMIT entries are engine-shipped feature\n * definitions too — covering them keeps the engine overlay set\n * exhaustive across `CORE_FEATURE_DEFINITIONS`, not only the enum\n * subset.\n */\n\nimport { A2A_TOKEN_BUDGET_FEATURE_ID } from '@wildo-ai/saas-models';\nimport { appLevelFeatureSpecificationFromDefinition } from '~wildo-specifications/_core';\nimport {\n CORE_FEATURE_DEFINITIONS_COLLECTION_SYMBOL,\n ENGINE_OWNER_REF,\n coreFeatureDefinitionCollectionEntry,\n} from './_engine-feature-shared';\n\nexport const maxMembersFeatureSpecification = appLevelFeatureSpecificationFromDefinition(\n { identifier: 'MAX_MEMBERS' },\n () => ({\n purpose:\n 'Cap the number of members an organisation can hold so seat-based packaging stays enforceable.',\n businessRole:\n 'Seat-based limit feature backing organisation-membership counting. The enforcement and counting both run inside the engine feature gate.',\n availabilityRole:\n 'Plan-derived numeric limit. The default of 5 covers entry tiers; larger seat counts ship through plan upgrades or seat add-ons.',\n useWhen:\n 'Use this limit whenever a tenant operation tries to add a new organisation member; the engine feature gate consumes it automatically against the `ORGANIZATION_MEMBERS` resource counter.',\n avoidWhen:\n 'Avoid using this limit to gate non-member resources (API keys, anonymous users) — those have their own dedicated counters.',\n businessConstraints: [\n 'Lowering the limit below the current member count must not silently revoke existing memberships; the gate fails closed for new additions only.',\n 'Counting is owned by the runtime `FeatureDefinition.counting.resourceType` field, not by ad-hoc reads — bypassing the counter would silently overflow the limit.',\n ],\n codeHandling: {\n definitionOwner: ENGINE_OWNER_REF,\n definitionSymbol: CORE_FEATURE_DEFINITIONS_COLLECTION_SYMBOL,\n definitionCollectionEntry: coreFeatureDefinitionCollectionEntry('MAX_MEMBERS'),\n notes: [\n 'No public enum declaration owns this identifier — the runtime entry uses the literal string `MAX_MEMBERS` directly inside `CORE_FEATURE_DEFINITIONS`. Authors should treat `MAX_MEMBERS` as a stable constant and surface the value via the engine feature gate.',\n ],\n },\n }),\n);\n\nexport const maxApiKeysFeatureSpecification = appLevelFeatureSpecificationFromDefinition(\n { identifier: 'MAX_API_KEYS' },\n () => ({\n purpose:\n 'Cap the number of API keys an organisation can mint so credential sprawl stays bounded by plan tier.',\n businessRole:\n 'API-credential limit feature backing the `ORG_API_KEYS` resource counter inside the engine feature gate.',\n availabilityRole:\n 'Plan-derived numeric limit. The default of 2 covers low-touch integrations; higher counts ship as part of integration-heavy plans.',\n useWhen:\n 'Use this limit whenever a tenant operation tries to create a new organisation-scoped API key; the engine feature gate consumes it automatically.',\n avoidWhen:\n 'Avoid using this limit to gate application-scoped API keys, user-scoped tokens, or webhook secrets — those credentials live on different counters.',\n businessConstraints: [\n 'Lowering the limit below the current key count must not silently revoke existing keys; revocation is an explicit admin action.',\n 'API key counting is owned by the runtime `FeatureDefinition.counting.resourceType` field — ad-hoc creation paths that bypass the counter would silently overflow the limit.',\n ],\n codeHandling: {\n definitionOwner: ENGINE_OWNER_REF,\n definitionSymbol: CORE_FEATURE_DEFINITIONS_COLLECTION_SYMBOL,\n definitionCollectionEntry: coreFeatureDefinitionCollectionEntry('MAX_API_KEYS'),\n notes: [\n 'No public enum declaration owns this identifier — the runtime entry uses the literal string `MAX_API_KEYS` directly inside `CORE_FEATURE_DEFINITIONS`. Authors should treat `MAX_API_KEYS` as a stable constant and surface the value via the engine feature gate.',\n ],\n },\n }),\n);\n\nexport const a2aTokenBudgetFeatureSpecification = appLevelFeatureSpecificationFromDefinition(\n { identifier: A2A_TOKEN_BUDGET_FEATURE_ID },\n () => ({\n purpose:\n 'Cap how many LLM tokens a tenant\\'s inbound Agent2Agent (A2A) agent turns may consume per billing period, so exposing an agent endpoint cannot become unbounded model spend.',\n businessRole:\n 'Consumption CEILING for external agent traffic. Unlike the seat/credential limits above — which are entitlement FLOORS that plans raise — this one is a cap that plans TIGHTEN: the most restrictive value wins, and unlimited means \"no ceiling\". Enforcement lives in the A2A transport, which denies a turn with HTTP 402 once the period allowance is spent.',\n availabilityRole:\n 'Plan-derived numeric limit, granted per billing plan. Absent (or unlimited) by default, so A2A budgeting is strictly opt-in: an application that never grants it keeps today\\'s uncapped behaviour, and only the per-principal burst throttle applies.',\n useWhen:\n 'Grant this whenever a plan exposes A2A agent access and the model spend it drives must be bounded by tier — the transport consumes it automatically on every turn.',\n avoidWhen:\n 'Avoid using it to gate non-LLM external traffic: MCP `tools/call` dispatches a CRUD resource operation rather than an agent turn, and is bounded by its own request throttle instead.',\n businessConstraints: [\n 'Measured in TOKENS, not currency: the framework\\'s canonical provider-usage pricing registry is deliberately not consulted by this A2A entitlement gate. The gate caps directly metered transport consumption; monetary reservation and settlement belong to the separate Work Cycle budget authority.',\n 'The allowance applies to the PAYING TENANT, which is not always the conversation owner — a user-delegated turn is billed to the organisation the user is acting within, while the conversation record stays owned by the user.',\n 'Consumption is only known after a turn completes, so the gate compares already-accumulated usage: a tenant can exceed the cap by the turns in flight when it is reached, and lowering an allowance mid-period does not retroactively revoke turns already served.',\n 'Agent transports that report no token usage (and turns that fail after the model has run) cannot be metered; that spend is logged but invisible to the cap.',\n ],\n codeHandling: {\n definitionOwner: ENGINE_OWNER_REF,\n definitionSymbol: CORE_FEATURE_DEFINITIONS_COLLECTION_SYMBOL,\n definitionCollectionEntry: coreFeatureDefinitionCollectionEntry(A2A_TOKEN_BUDGET_FEATURE_ID),\n notes: [\n 'The identifier is exported as the named constant `A2A_TOKEN_BUDGET_FEATURE_ID` from `@wildo-ai/saas-models` — the single source shared by the definition and the enforcing service, so a grant cannot drift from what the transport resolves.',\n 'This definition carries `limitSemantic: CEILING`, which is load-bearing rather than descriptive: under the default FLOOR semantic the unlimited default would absorb every finite plan grant (most-permissive wins) and the cap could never engage.',\n 'It intentionally declares no `counting` config: consumption is a sum of tokens rather than a count of resource rows, so the feature gate\\'s row-counting strategy cannot measure it and the A2A budget service owns measurement instead.',\n ],\n },\n }),\n);\n"]}
|
|
1
|
+
{"version":3,"file":"core-limits.feature.specifications.js","sourceRoot":"","sources":["../../../../../src/engine/features/core-limits.feature.specifications.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,0CAA0C,EAAE,MAAM,6BAA6B,CAAC;AACzF,OAAO,EACL,0CAA0C,EAC1C,gBAAgB,EAChB,oCAAoC,GACrC,MAAM,0BAA0B,CAAC;AAElC,MAAM,CAAC,MAAM,8BAA8B,GAAG,0CAA0C,CACtF,EAAE,UAAU,EAAE,aAAa,EAAE,EAC7B,GAAG,EAAE,CAAC,CAAC;IACL,OAAO,EACL,+FAA+F;IACjG,YAAY,EACV,qUAAqU;IACvU,gBAAgB,EACd,iIAAiI;IACnI,OAAO,EACL,gVAAgV;IAClV,SAAS,EACP,4HAA4H;IAC9H,mBAAmB,EAAE;QACnB,8JAA8J;QAC9J,uKAAuK;KACxK;IACD,YAAY,EAAE;QACZ,eAAe,EAAE,gBAAgB;QACjC,gBAAgB,EAAE,0CAA0C;QAC5D,yBAAyB,EAAE,oCAAoC,CAAC,aAAa,CAAC;QAC9E,KAAK,EAAE;YACL,kQAAkQ;SACnQ;KACF;CACF,CAAC,CACH,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG,0CAA0C,CACtF,EAAE,UAAU,EAAE,cAAc,EAAE,EAC9B,GAAG,EAAE,CAAC,CAAC;IACL,OAAO,EACL,sGAAsG;IACxG,YAAY,EACV,wOAAwO;IAC1O,gBAAgB,EACd,oIAAoI;IACtI,OAAO,EACL,yMAAyM;IAC3M,SAAS,EACP,oJAAoJ;IACtJ,mBAAmB,EAAE;QACnB,gIAAgI;QAChI,2KAA2K;KAC5K;IACD,YAAY,EAAE;QACZ,eAAe,EAAE,gBAAgB;QACjC,gBAAgB,EAAE,0CAA0C;QAC5D,yBAAyB,EAAE,oCAAoC,CAAC,cAAc,CAAC;QAC/E,KAAK,EAAE;YACL,oQAAoQ;SACrQ;KACF;CACF,CAAC,CACH,CAAC;AAEF,MAAM,CAAC,MAAM,kCAAkC,GAAG,0CAA0C,CAC1F,EAAE,UAAU,EAAE,2BAA2B,EAAE,EAC3C,GAAG,EAAE,CAAC,CAAC;IACL,OAAO,EACL,8KAA8K;IAChL,YAAY,EACV,kWAAkW;IACpW,gBAAgB,EACd,wPAAwP;IAC1P,OAAO,EACL,oKAAoK;IACtK,SAAS,EACP,uLAAuL;IACzL,mBAAmB,EAAE;QACnB,wSAAwS;QACxS,gOAAgO;QAChO,mQAAmQ;QACnQ,6JAA6J;KAC9J;IACD,YAAY,EAAE;QACZ,eAAe,EAAE,gBAAgB;QACjC,gBAAgB,EAAE,0CAA0C;QAC5D,yBAAyB,EAAE,oCAAoC,CAAC,2BAA2B,CAAC;QAC5F,KAAK,EAAE;YACL,+OAA+O;YAC/O,qPAAqP;YACrP,0OAA0O;SAC3O;KACF;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Engine-shipped overlays for the LIMIT-typed feature definitions in\n * `CORE_FEATURE_DEFINITIONS` that are NOT members of the `CoreFeature`\n * enum (`MAX_MEMBERS`, `MAX_API_KEYS`).\n *\n * These two LIMIT features are bundled into a single file because they\n * share the same shape (organisation-scoped numeric limit feeding a\n * resource counter) and are not enum members — there is no `CoreFeature`\n * declaration to point `identifierDeclaration` at, so the spec layer\n * carries the literal string identifier as `ref` directly. Companion\n * prompts surface them just like the enum-backed entries, but the\n * `codeHandling` shape reflects the truthful absence of a public enum\n * declaration.\n *\n * Q5-2 says \"engine ships overlays for: (a) all 7 `CoreFeature`\n * definitions\". The LIMIT entries are engine-shipped feature\n * definitions too — covering them keeps the engine overlay set\n * exhaustive across `CORE_FEATURE_DEFINITIONS`, not only the enum\n * subset.\n */\n\nimport { A2A_TOKEN_BUDGET_FEATURE_ID } from '@wildo-ai/saas-models';\nimport { appLevelFeatureSpecificationFromDefinition } from '~wildo-specifications/_core';\nimport {\n CORE_FEATURE_DEFINITIONS_COLLECTION_SYMBOL,\n ENGINE_OWNER_REF,\n coreFeatureDefinitionCollectionEntry,\n} from './_engine-feature-shared';\n\nexport const maxMembersFeatureSpecification = appLevelFeatureSpecificationFromDefinition(\n { identifier: 'MAX_MEMBERS' },\n () => ({\n purpose:\n 'Cap the number of members an organisation can hold so seat-based packaging stays enforceable.',\n businessRole:\n 'Seat-based limit feature declaring organisation-membership counting. NOT ENFORCED TODAY: no operation declares a `limitChecks` entry for it, and automatic registration runs only for application-declared limits built with `countResource`, so the engine ships the declaration and the default value without a gate behind them.',\n availabilityRole:\n 'Plan-derived numeric limit. The default of 5 covers entry tiers; larger seat counts ship through plan upgrades or seat add-ons.',\n useWhen:\n 'Read this limit whenever a tenant operation tries to add a new organisation member. Nothing consumes it automatically: an application that wants the cap enforced declares its own `limitChecks` entry on the `ORGANIZATION_MEMBERS` CREATE operation, or declares its own limit feature with `countResource` so the check is auto-registered.',\n avoidWhen:\n 'Avoid using this limit to gate non-member resources (API keys, anonymous users) — those have their own dedicated counters.',\n businessConstraints: [\n 'Lowering the limit below the current member count must not silently revoke existing memberships; a gate, once declared, fails closed for new additions only.',\n 'The counted resource is named by the runtime `FeatureDefinition.counting.resourceType` field. Counting from an ad-hoc read instead would silently overflow the limit.',\n ],\n codeHandling: {\n definitionOwner: ENGINE_OWNER_REF,\n definitionSymbol: CORE_FEATURE_DEFINITIONS_COLLECTION_SYMBOL,\n definitionCollectionEntry: coreFeatureDefinitionCollectionEntry('MAX_MEMBERS'),\n notes: [\n 'No public enum declaration owns this identifier — the runtime entry uses the literal string `MAX_MEMBERS` directly inside `CORE_FEATURE_DEFINITIONS`. Authors should treat `MAX_MEMBERS` as a stable constant and surface the value via the engine feature gate.',\n ],\n },\n }),\n);\n\nexport const maxApiKeysFeatureSpecification = appLevelFeatureSpecificationFromDefinition(\n { identifier: 'MAX_API_KEYS' },\n () => ({\n purpose:\n 'Cap the number of API keys an organisation can mint so credential sprawl stays bounded by plan tier.',\n businessRole:\n 'API-credential limit feature declaring the `ORG_API_KEYS` resource counter. NOT ENFORCED TODAY, for the same reason as `MAX_MEMBERS`: no operation declares a `limitChecks` entry for it and core definitions are not auto-registered.',\n availabilityRole:\n 'Plan-derived numeric limit. The default of 2 covers low-touch integrations; higher counts ship as part of integration-heavy plans.',\n useWhen:\n 'Read this limit whenever a tenant operation tries to create a new organisation-scoped API key. Nothing consumes it automatically; an application that wants the cap enforced declares the check itself.',\n avoidWhen:\n 'Avoid using this limit to gate application-scoped API keys, user-scoped tokens, or webhook secrets — those credentials live on different counters.',\n businessConstraints: [\n 'Lowering the limit below the current key count must not silently revoke existing keys; revocation is an explicit admin action.',\n 'The counted resource is named by the runtime `FeatureDefinition.counting.resourceType` field. Creation paths that count some other way would silently overflow the limit.',\n ],\n codeHandling: {\n definitionOwner: ENGINE_OWNER_REF,\n definitionSymbol: CORE_FEATURE_DEFINITIONS_COLLECTION_SYMBOL,\n definitionCollectionEntry: coreFeatureDefinitionCollectionEntry('MAX_API_KEYS'),\n notes: [\n 'No public enum declaration owns this identifier — the runtime entry uses the literal string `MAX_API_KEYS` directly inside `CORE_FEATURE_DEFINITIONS`. Authors should treat `MAX_API_KEYS` as a stable constant and surface the value via the engine feature gate.',\n ],\n },\n }),\n);\n\nexport const a2aTokenBudgetFeatureSpecification = appLevelFeatureSpecificationFromDefinition(\n { identifier: A2A_TOKEN_BUDGET_FEATURE_ID },\n () => ({\n purpose:\n 'Cap how many LLM tokens a tenant\\'s inbound Agent2Agent (A2A) agent turns may consume per billing period, so exposing an agent endpoint cannot become unbounded model spend.',\n businessRole:\n 'Consumption CEILING for external agent traffic. Unlike the seat/credential limits above — which are entitlement FLOORS that plans raise — this one is a cap that plans TIGHTEN: the most restrictive value wins, and unlimited means \"no ceiling\". Enforcement lives in the A2A transport, which denies a turn with HTTP 402 once the period allowance is spent.',\n availabilityRole:\n 'Plan-derived numeric limit, granted per billing plan. Absent (or unlimited) by default, so A2A budgeting is strictly opt-in: an application that never grants it keeps today\\'s uncapped behaviour, and only the per-principal burst throttle applies.',\n useWhen:\n 'Grant this whenever a plan exposes A2A agent access and the model spend it drives must be bounded by tier — the transport consumes it automatically on every turn.',\n avoidWhen:\n 'Avoid using it to gate non-LLM external traffic: MCP `tools/call` dispatches a CRUD resource operation rather than an agent turn, and is bounded by its own request throttle instead.',\n businessConstraints: [\n 'Measured in TOKENS, not currency: the framework\\'s canonical provider-usage pricing registry is deliberately not consulted by this A2A entitlement gate. The gate caps directly metered transport consumption; monetary reservation and settlement belong to the separate Work Cycle budget authority.',\n 'The allowance applies to the PAYING TENANT, which is not always the conversation owner — a user-delegated turn is billed to the organisation the user is acting within, while the conversation record stays owned by the user.',\n 'Consumption is only known after a turn completes, so the gate compares already-accumulated usage: a tenant can exceed the cap by the turns in flight when it is reached, and lowering an allowance mid-period does not retroactively revoke turns already served.',\n 'Agent transports that report no token usage (and turns that fail after the model has run) cannot be metered; that spend is logged but invisible to the cap.',\n ],\n codeHandling: {\n definitionOwner: ENGINE_OWNER_REF,\n definitionSymbol: CORE_FEATURE_DEFINITIONS_COLLECTION_SYMBOL,\n definitionCollectionEntry: coreFeatureDefinitionCollectionEntry(A2A_TOKEN_BUDGET_FEATURE_ID),\n notes: [\n 'The identifier is exported as the named constant `A2A_TOKEN_BUDGET_FEATURE_ID` from `@wildo-ai/saas-models` — the single source shared by the definition and the enforcing service, so a grant cannot drift from what the transport resolves.',\n 'This definition carries `limitSemantic: CEILING`, which is load-bearing rather than descriptive: under the default FLOOR semantic the unlimited default would absorb every finite plan grant (most-permissive wins) and the cap could never engage.',\n 'It intentionally declares no `counting` config: consumption is a sum of tokens rather than a count of resource rows, so the feature gate\\'s row-counting strategy cannot measure it and the A2A budget service owns measurement instead.',\n ],\n },\n }),\n);\n"]}
|
package/dist/esm/engine/features/resources/application-features.resource.specification.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-features.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/application-features.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAYH,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,IAAI,EAAE,EAI5B,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"application-features.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/application-features.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAYH,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,IAAI,EAAE,EAI5B,MAAM,uBAAuB,CAAC;AAmB/B,eAAO,MAAM,wCAAwC;;;;;;;;iCAuOpD,CAAC"}
|
|
@@ -12,12 +12,14 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
|
|
|
12
12
|
import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
|
|
13
13
|
import { ApplicationFeatures_Operations, CoreResourceOperation as Op, ResourcePrimaryScope, ScopeFeaturesWithOverridesSchema, applicationFeaturesResourceConfiguration_InitializationFactory as applicationFeaturesFactory, } from '@wildo-ai/saas-models';
|
|
14
14
|
import { HttpResponseStatusCode, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
|
|
15
|
+
import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
|
|
15
16
|
const applicationFeaturesAdminResourceUIBehavior = applicationFeaturesAdminSource;
|
|
16
17
|
export const applicationFeaturesResourceSpecification = resourceSpecificationFromFrontendConfiguration(resourceFrontendConfiguration(applicationFeaturesAdminResourceUIBehavior), resourceSpecification(applicationFeaturesFactory, ScopeFeaturesWithOverridesSchema, ({ schemaShape }) => ({
|
|
17
18
|
purpose: 'Application-wide entitlements: enabled features, limits, and manual overrides for app-scoped capabilities.',
|
|
18
19
|
businessRole: 'Unblocks exact application-scope feature gates such as `M2M_WEBHOOK_DELIVERY` for `WEBHOOK_APPLICATION` delivery without leaking app opt-in to every organization.',
|
|
19
20
|
lifecycleRole: 'Materialized by high-trust admin operations when an application-scope capability needs to be enabled or reset.',
|
|
20
21
|
audience: LabelAudience.ADMIN,
|
|
22
|
+
subDomain: EngineResourceSubDomain.FEATURES,
|
|
21
23
|
codeHandling: {
|
|
22
24
|
mainSchema: {
|
|
23
25
|
packageName: '@wildo-ai/saas-models',
|
|
@@ -93,7 +95,7 @@ export const applicationFeaturesResourceSpecification = resourceSpecificationFro
|
|
|
93
95
|
purpose: 'Repository-only bootstrap of the application feature ledger.',
|
|
94
96
|
outcome: 'The application has a singleton entitlement row.',
|
|
95
97
|
responseStatuses: [
|
|
96
|
-
{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The singleton application-feature ledger
|
|
98
|
+
{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The singleton application-feature ledger record was materialized for the app.' },
|
|
97
99
|
],
|
|
98
100
|
// REPOSITORY_ONLY variant — invoked by system/admin bootstrap workflows, not exposed as a public HTTP endpoint, so no client-facing 400/403/404 are documented.
|
|
99
101
|
idempotent: false,
|
|
@@ -113,7 +115,7 @@ export const applicationFeaturesResourceSpecification = resourceSpecificationFro
|
|
|
113
115
|
purpose: 'Reserved lightweight listing path for app feature rows.',
|
|
114
116
|
outcome: 'Returns rows if a host admin surface enables it.',
|
|
115
117
|
responseStatuses: [
|
|
116
|
-
{ code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of application feature ledger
|
|
118
|
+
{ code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of application feature ledger records for super-admin diagnostics.' },
|
|
117
119
|
],
|
|
118
120
|
errorScenarios: [
|
|
119
121
|
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; the app-feature listing path is admin-only.' },
|
|
@@ -136,7 +138,7 @@ export const applicationFeaturesResourceSpecification = resourceSpecificationFro
|
|
|
136
138
|
purpose: 'Repository-only teardown of the application feature ledger when its owning application is deleted (composition `onParentDelete` cascade).',
|
|
137
139
|
outcome: 'The singleton entitlement row is removed together with the application — the composition part does not outlive its whole.',
|
|
138
140
|
responseStatuses: [
|
|
139
|
-
{ code: HttpResponseStatusCode.OK_200, meaning: 'The application-feature ledger
|
|
141
|
+
{ code: HttpResponseStatusCode.OK_200, meaning: 'The application-feature ledger record was deleted as part of the owning application’s deletion cascade.' },
|
|
140
142
|
],
|
|
141
143
|
// REPOSITORY_ONLY variant (super-admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.
|
|
142
144
|
idempotent: true,
|
package/dist/esm/engine/features/resources/application-features.resource.specification.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-features.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/application-features.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,0CAA0C,IAAI,8BAA8B,GAC7E,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,IAAI,E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;gBACpK,SAAS,EAAE,4GAA4G;gBACvH,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,qDAAqD,EAAE;oBACzE,WAAW,EAAE,EAAE,OAAO,EAAE,2GAA2G,EAAE;iBACtI;aACF;SACF;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,qCAAqC,EAAE,SAAS,EAAE,kDAAkD,EAAE;QAC5H,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,0BAA0B,EAAE,SAAS,EAAE,sCAAsC,EAAE;QACvG,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,sCAAsC,EAAE,SAAS,EAAE,8DAA8D,EAAE;QAC3I,CAAC,8BAA8B,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,kCAAkC,EAAE,SAAS,EAAE,iEAAiE,EAAE;QAC9K,CAAC,8BAA8B,CAAC,eAAe,CAAC,EAAE,EAAE,OAAO,EAAE,mCAAmC,EAAE,SAAS,EAAE,wCAAwC,EAAE;QACvJ,CAAC,8BAA8B,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,mCAAmC,EAAE,SAAS,EAAE,+CAA+C,EAAE;KAC9J;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `applicationFeatures` — Wildo SaaS engine specification (application scope).\n *\n * Inputs:\n * - Schema: `ScopeFeaturesWithOverridesSchema`\n * - Factory: `applicationFeaturesResourceConfiguration_InitializationFactory`\n * - Custom operations: `ApplicationFeatures_Operations`\n * - Preset: `applicationFeaturesAdminResourceUIBehavior`\n */\n\nimport {\n applicationFeaturesAdminResourceUIBehavior as applicationFeaturesAdminSource,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n ApplicationFeatures_Operations,\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n ScopeFeaturesWithOverridesSchema,\n applicationFeaturesResourceConfiguration_InitializationFactory as applicationFeaturesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\ntype ApplicationFeaturesConfig = ReturnType<typeof applicationFeaturesFactory>;\ntype ApplicationFeaturesCoreOp = ApplicationFeaturesConfig['coreOperations'][number];\ntype ApplicationFeaturesSchema = ApplicationFeaturesConfig['mainSchema'];\n\nconst applicationFeaturesAdminResourceUIBehavior = applicationFeaturesAdminSource as ResourceUIBehaviorConfig<\n typeof ApplicationFeatures_Operations,\n ApplicationFeaturesCoreOp,\n ApplicationFeaturesSchema\n>;\n\nexport const applicationFeaturesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(applicationFeaturesAdminResourceUIBehavior),\n resourceSpecification(\n applicationFeaturesFactory,\n ScopeFeaturesWithOverridesSchema,\n ({ schemaShape }) => ({\n purpose: 'Application-wide entitlements: enabled features, limits, and manual overrides for app-scoped capabilities.',\n businessRole: 'Unblocks exact application-scope feature gates such as `M2M_WEBHOOK_DELIVERY` for `WEBHOOK_APPLICATION` delivery without leaking app opt-in to every organization.',\n lifecycleRole: 'Materialized by high-trust admin operations when an application-scope capability needs to be enabled or reset.',\n audience: LabelAudience.ADMIN,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ScopeFeaturesWithOverridesSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'applicationFeaturesResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'APPLICATION_FEATURES',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n customEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ApplicationFeatures_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'applicationFeaturesAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n features: schemaShape.features.clone().arraySpec({\n meaning: 'Enabled application-scope feature keys.',\n whyItMatters: 'The M2M dispatcher checks this ledger for exact app-scope delivery gates.',\n elementMeaning: 'One `CoreFeature` or custom feature key applicable to application scope.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreFeature',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n notes: [\n '`CoreFeature.M2M_WEBHOOK_DELIVERY` is the first application-scope consumer; it is scope-bound and must be enabled independently from organization scope.',\n ],\n },\n }),\n limits: schemaShape.limits.clone().objectSpec({\n meaning: 'Application-level caps keyed by feature or meter identifier.',\n whyItMatters: 'Reserved for app-scoped limits; org/user limits remain in their own ledgers.',\n }),\n manualOverrides: schemaShape.manualOverrides.clone().objectSpec({\n meaning: 'App-admin-applied enable/disable/limit delta that survives config/profile changes until reset.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n operations: {\n [Op.CREATE]: {\n purpose: 'Repository-only bootstrap of the application feature ledger.',\n outcome: 'The application has a singleton entitlement row.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The singleton application-feature ledger row was materialized for the app.' },\n ],\n // REPOSITORY_ONLY variant — invoked by system/admin bootstrap workflows, not exposed as a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: false,\n },\n [Op.READ]: {\n purpose: 'Load app-scoped entitlements for super-admin diagnostics.',\n outcome: 'Admin surfaces and gates can inspect application-wide feature state.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The application feature ledger is returned with its effective features, limits, and manual overrides.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; app-scope entitlements are not exposed to lower-trust roles.' },\n ],\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Reserved lightweight listing path for app feature rows.',\n outcome: 'Returns rows if a host admin surface enables it.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of application feature ledger rows for super-admin diagnostics.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; the app-feature listing path is admin-only.' },\n ],\n idempotent: true,\n },\n [Op.UPDATE]: {\n purpose: 'Super-admin partial update of the application entitlements document.',\n outcome: 'Application-scope gates observe the updated feature state after cache invalidation.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The application entitlements document was patched and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The partial entitlements payload fails `ScopeFeaturesWithOverridesSchema.partial()` validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; document-level overrides are high-trust only.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the application feature ledger when its owning application is deleted (composition `onParentDelete` cascade).',\n outcome: 'The singleton entitlement row is removed together with the application — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The application-feature ledger row was deleted as part of the owning application’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (super-admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n [ApplicationFeatures_Operations.ENABLE_FEATURE]: {\n operationId: ApplicationFeatures_Operations.ENABLE_FEATURE,\n purpose: 'Surgical enable of one application-scope feature.',\n outcome: 'Feature flag flips for the application without knowing `applicationFeaturesId`.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The named feature is now enabled at application scope and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `featureId` is not a member of `CoreFeature` (the request DTO is enum-constrained, so an unknown key is a validation failure rather than a 404).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; feature enablement is admin-gated.' },\n ],\n // Convergent: enabling an already-enabled feature lands the same end state.\n idempotent: true,\n examples: [\n {\n title: 'Enable an application-scope feature',\n request: {\n featureId: 'M2M_WEBHOOK_DELIVERY',\n reason: 'Enable application-wide webhook delivery for the dogfood pilot.',\n },\n response: {\n features: ['M2M_WEBHOOK_DELIVERY'],\n manualOverrides: { M2M_WEBHOOK_DELIVERY: { enabled: true } },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [ApplicationFeatures_Operations.DISABLE_FEATURE]: {\n operationId: ApplicationFeatures_Operations.DISABLE_FEATURE,\n purpose: 'Surgical disable of one application-scope feature.',\n outcome: 'Application-scope capability is removed while other overrides remain intact.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The named feature is now disabled at application scope and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `featureId` is not a `CoreFeature` member, or the required `reason` is missing/empty.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; feature disablement is admin-gated.' },\n ],\n // Convergent: disabling an already-disabled feature lands the same end state.\n idempotent: true,\n },\n [ApplicationFeatures_Operations.RESET_FEATURES]: {\n operationId: ApplicationFeatures_Operations.RESET_FEATURES,\n purpose: 'Clear all application-scope manual overrides.',\n outcome: 'Application returns to defaults/profile-derived features.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'All application-scope manual overrides were cleared and the defaults-derived ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The required `reason` justification is missing or empty.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; clearing overrides is the highest-trust feature operation.' },\n ],\n // Convergent: this clears overrides back to the defaults baseline, so a repeated reset lands the same cleared state (not an incrementing/event-style mutation).\n idempotent: true,\n },\n },\n businessConstraints: [\n '`APPLICATION_FEATURES` is one-to-one by `appId`; it is not an organization fallback or global feature catalog.',\n 'Do not use app-scope enablement to imply org-scope enablement for `scopeBoundary` features.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n ),\n () => ({\n layout: {\n purpose: 'Show app-scoped entitlement state and manual overrides for high-trust operators.',\n displayPurpose: 'Super-admin-only diagnostic and override surface.',\n summaryPurpose: 'Compact feature and limit summary for application-level gates.',\n sections: {\n overview: {\n purpose: 'Render `features` and `limits` as the engine currently evaluates them at application scope (e.g. `M2M_WEBHOOK_DELIVERY` for `WEBHOOK_APPLICATION`).',\n whenToUse: 'Default super-admin diagnostic page when inspecting why an app-scope gate is open or closed.',\n textSlots: {\n title: { purpose: 'Label the overview area for the application’s effective app-scope entitlements.' },\n description: { purpose: 'Clarify that values reflect application-scope state only — they do NOT imply org-scope enablement for `scopeBoundary` features.' },\n },\n },\n overrides: {\n purpose: 'Author `manualOverrides` deltas (enable / disable / limit patches) when operators intentionally diverge an application from its profile-derived defaults.',\n whenToUse: 'Break-glass enables for app-scope dogfood pilots, incident-driven disables, and bespoke limit adjustments.',\n textSlots: {\n title: { purpose: 'Label the manual-override area for the application.' },\n description: { purpose: 'State that these overrides survive config/profile changes until cleared via the RESET_FEATURES operation.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Super-admin app feature inspection.', whenToUse: 'Debug app-scoped gates like WEBHOOK_APPLICATION.' },\n [Op.SEARCH]: { purpose: 'Rare admin listing path.', whenToUse: 'Diagnostics and registry validation.' },\n [Op.UPDATE]: { purpose: 'Super-admin document-level override.', whenToUse: 'Break-glass edits when surgical operations are insufficient.' },\n [ApplicationFeatures_Operations.ENABLE_FEATURE]: { purpose: 'Single-feature app-scope enable.', whenToUse: 'Enable WEBHOOK_APPLICATION dogfood or app-level feature pilots.' },\n [ApplicationFeatures_Operations.DISABLE_FEATURE]: { purpose: 'Single-feature app-scope disable.', whenToUse: 'Incident response or feature rollback.' },\n [ApplicationFeatures_Operations.RESET_FEATURES]: { purpose: 'Clear app-scope manual overrides.', whenToUse: 'Return application to defaults/profile truth.' },\n },\n }),\n);\n"]}
|
|
1
|
+
{"version":3,"file":"application-features.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/application-features.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,0CAA0C,IAAI,8BAA8B,GAC7E,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,gCAAgC,EAChC,8DAA8D,IAAI,0BAA0B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EAAE;gBACT,OAAO,EAAE,2JAA2J;gBACpK,SAAS,EAAE,4GAA4G;gBACvH,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,qDAAqD,EAAE;oBACzE,WAAW,EAAE,EAAE,OAAO,EAAE,2GAA2G,EAAE;iBACtI;aACF;SACF;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,qCAAqC,EAAE,SAAS,EAAE,kDAAkD,EAAE;QAC5H,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,0BAA0B,EAAE,SAAS,EAAE,sCAAsC,EAAE;QACvG,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,sCAAsC,EAAE,SAAS,EAAE,8DAA8D,EAAE;QAC3I,CAAC,8BAA8B,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,kCAAkC,EAAE,SAAS,EAAE,iEAAiE,EAAE;QAC9K,CAAC,8BAA8B,CAAC,eAAe,CAAC,EAAE,EAAE,OAAO,EAAE,mCAAmC,EAAE,SAAS,EAAE,wCAAwC,EAAE;QACvJ,CAAC,8BAA8B,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,mCAAmC,EAAE,SAAS,EAAE,+CAA+C,EAAE;KAC9J;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `applicationFeatures` — Wildo SaaS engine specification (application scope).\n *\n * Inputs:\n * - Schema: `ScopeFeaturesWithOverridesSchema`\n * - Factory: `applicationFeaturesResourceConfiguration_InitializationFactory`\n * - Custom operations: `ApplicationFeatures_Operations`\n * - Preset: `applicationFeaturesAdminResourceUIBehavior`\n */\n\nimport {\n applicationFeaturesAdminResourceUIBehavior as applicationFeaturesAdminSource,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n ApplicationFeatures_Operations,\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n ScopeFeaturesWithOverridesSchema,\n applicationFeaturesResourceConfiguration_InitializationFactory as applicationFeaturesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype ApplicationFeaturesConfig = ReturnType<typeof applicationFeaturesFactory>;\ntype ApplicationFeaturesCoreOp = ApplicationFeaturesConfig['coreOperations'][number];\ntype ApplicationFeaturesSchema = ApplicationFeaturesConfig['mainSchema'];\n\nconst applicationFeaturesAdminResourceUIBehavior = applicationFeaturesAdminSource as ResourceUIBehaviorConfig<\n typeof ApplicationFeatures_Operations,\n ApplicationFeaturesCoreOp,\n ApplicationFeaturesSchema\n>;\n\nexport const applicationFeaturesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(applicationFeaturesAdminResourceUIBehavior),\n resourceSpecification(\n applicationFeaturesFactory,\n ScopeFeaturesWithOverridesSchema,\n ({ schemaShape }) => ({\n purpose: 'Application-wide entitlements: enabled features, limits, and manual overrides for app-scoped capabilities.',\n businessRole: 'Unblocks exact application-scope feature gates such as `M2M_WEBHOOK_DELIVERY` for `WEBHOOK_APPLICATION` delivery without leaking app opt-in to every organization.',\n lifecycleRole: 'Materialized by high-trust admin operations when an application-scope capability needs to be enabled or reset.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.FEATURES,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ScopeFeaturesWithOverridesSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'applicationFeaturesResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'APPLICATION_FEATURES',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n customEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ApplicationFeatures_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'applicationFeaturesAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n features: schemaShape.features.clone().arraySpec({\n meaning: 'Enabled application-scope feature keys.',\n whyItMatters: 'The M2M dispatcher checks this ledger for exact app-scope delivery gates.',\n elementMeaning: 'One `CoreFeature` or custom feature key applicable to application scope.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreFeature',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n notes: [\n '`CoreFeature.M2M_WEBHOOK_DELIVERY` is the first application-scope consumer; it is scope-bound and must be enabled independently from organization scope.',\n ],\n },\n }),\n limits: schemaShape.limits.clone().objectSpec({\n meaning: 'Application-level caps keyed by feature or meter identifier.',\n whyItMatters: 'Reserved for app-scoped limits; org/user limits remain in their own ledgers.',\n }),\n manualOverrides: schemaShape.manualOverrides.clone().objectSpec({\n meaning: 'App-admin-applied enable/disable/limit delta that survives config/profile changes until reset.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n operations: {\n [Op.CREATE]: {\n purpose: 'Repository-only bootstrap of the application feature ledger.',\n outcome: 'The application has a singleton entitlement row.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The singleton application-feature ledger record was materialized for the app.' },\n ],\n // REPOSITORY_ONLY variant — invoked by system/admin bootstrap workflows, not exposed as a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: false,\n },\n [Op.READ]: {\n purpose: 'Load app-scoped entitlements for super-admin diagnostics.',\n outcome: 'Admin surfaces and gates can inspect application-wide feature state.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The application feature ledger is returned with its effective features, limits, and manual overrides.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; app-scope entitlements are not exposed to lower-trust roles.' },\n ],\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Reserved lightweight listing path for app feature rows.',\n outcome: 'Returns rows if a host admin surface enables it.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of application feature ledger records for super-admin diagnostics.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; the app-feature listing path is admin-only.' },\n ],\n idempotent: true,\n },\n [Op.UPDATE]: {\n purpose: 'Super-admin partial update of the application entitlements document.',\n outcome: 'Application-scope gates observe the updated feature state after cache invalidation.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The application entitlements document was patched and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The partial entitlements payload fails `ScopeFeaturesWithOverridesSchema.partial()` validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; document-level overrides are high-trust only.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the application feature ledger when its owning application is deleted (composition `onParentDelete` cascade).',\n outcome: 'The singleton entitlement row is removed together with the application — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The application-feature ledger record was deleted as part of the owning application’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (super-admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n [ApplicationFeatures_Operations.ENABLE_FEATURE]: {\n operationId: ApplicationFeatures_Operations.ENABLE_FEATURE,\n purpose: 'Surgical enable of one application-scope feature.',\n outcome: 'Feature flag flips for the application without knowing `applicationFeaturesId`.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The named feature is now enabled at application scope and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `featureId` is not a member of `CoreFeature` (the request DTO is enum-constrained, so an unknown key is a validation failure rather than a 404).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; feature enablement is admin-gated.' },\n ],\n // Convergent: enabling an already-enabled feature lands the same end state.\n idempotent: true,\n examples: [\n {\n title: 'Enable an application-scope feature',\n request: {\n featureId: 'M2M_WEBHOOK_DELIVERY',\n reason: 'Enable application-wide webhook delivery for the dogfood pilot.',\n },\n response: {\n features: ['M2M_WEBHOOK_DELIVERY'],\n manualOverrides: { M2M_WEBHOOK_DELIVERY: { enabled: true } },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [ApplicationFeatures_Operations.DISABLE_FEATURE]: {\n operationId: ApplicationFeatures_Operations.DISABLE_FEATURE,\n purpose: 'Surgical disable of one application-scope feature.',\n outcome: 'Application-scope capability is removed while other overrides remain intact.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The named feature is now disabled at application scope and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `featureId` is not a `CoreFeature` member, or the required `reason` is missing/empty.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; feature disablement is admin-gated.' },\n ],\n // Convergent: disabling an already-disabled feature lands the same end state.\n idempotent: true,\n },\n [ApplicationFeatures_Operations.RESET_FEATURES]: {\n operationId: ApplicationFeatures_Operations.RESET_FEATURES,\n purpose: 'Clear all application-scope manual overrides.',\n outcome: 'Application returns to defaults/profile-derived features.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'All application-scope manual overrides were cleared and the defaults-derived ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The required `reason` justification is missing or empty.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; clearing overrides is the highest-trust feature operation.' },\n ],\n // Convergent: this clears overrides back to the defaults baseline, so a repeated reset lands the same cleared state (not an incrementing/event-style mutation).\n idempotent: true,\n },\n },\n businessConstraints: [\n '`APPLICATION_FEATURES` is one-to-one by `appId`; it is not an organization fallback or global feature catalog.',\n 'Do not use app-scope enablement to imply org-scope enablement for `scopeBoundary` features.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n ),\n () => ({\n layout: {\n purpose: 'Show app-scoped entitlement state and manual overrides for high-trust operators.',\n displayPurpose: 'Super-admin-only diagnostic and override surface.',\n summaryPurpose: 'Compact feature and limit summary for application-level gates.',\n sections: {\n overview: {\n purpose: 'Render `features` and `limits` as the engine currently evaluates them at application scope (e.g. `M2M_WEBHOOK_DELIVERY` for `WEBHOOK_APPLICATION`).',\n whenToUse: 'Default super-admin diagnostic page when inspecting why an app-scope gate is open or closed.',\n textSlots: {\n title: { purpose: 'Label the overview area for the application’s effective app-scope entitlements.' },\n description: { purpose: 'Clarify that values reflect application-scope state only — they do NOT imply org-scope enablement for `scopeBoundary` features.' },\n },\n },\n overrides: {\n purpose: 'Author `manualOverrides` deltas (enable / disable / limit patches) when operators intentionally diverge an application from its profile-derived defaults.',\n whenToUse: 'Break-glass enables for app-scope dogfood pilots, incident-driven disables, and bespoke limit adjustments.',\n textSlots: {\n title: { purpose: 'Label the manual-override area for the application.' },\n description: { purpose: 'State that these overrides survive config/profile changes until cleared via the RESET_FEATURES operation.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Super-admin app feature inspection.', whenToUse: 'Debug app-scoped gates like WEBHOOK_APPLICATION.' },\n [Op.SEARCH]: { purpose: 'Rare admin listing path.', whenToUse: 'Diagnostics and registry validation.' },\n [Op.UPDATE]: { purpose: 'Super-admin document-level override.', whenToUse: 'Break-glass edits when surgical operations are insufficient.' },\n [ApplicationFeatures_Operations.ENABLE_FEATURE]: { purpose: 'Single-feature app-scope enable.', whenToUse: 'Enable WEBHOOK_APPLICATION dogfood or app-level feature pilots.' },\n [ApplicationFeatures_Operations.DISABLE_FEATURE]: { purpose: 'Single-feature app-scope disable.', whenToUse: 'Incident response or feature rollback.' },\n [ApplicationFeatures_Operations.RESET_FEATURES]: { purpose: 'Clear app-scope manual overrides.', whenToUse: 'Return application to defaults/profile truth.' },\n },\n }),\n);\n"]}
|
package/dist/esm/engine/features/resources/organization-features.resource.specification.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-features.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/organization-features.resource.specification.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,WAAW,EACX,qBAAqB,IAAI,EAAE,EAC3B,+BAA+B,EAIhC,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"organization-features.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/organization-features.resource.specification.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,WAAW,EACX,qBAAqB,IAAI,EAAE,EAC3B,+BAA+B,EAIhC,MAAM,uBAAuB,CAAC;AA4E/B;;;GAGG;AACH,eAAO,MAAM,yCAAyC;;;;;;;;iCAuUrD,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
|
|
|
3
3
|
import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
|
|
4
4
|
import { CoreFeature, CoreResourceOperation as Op, OrganizationFeatures_Operations, ResourcePrimaryScope, ScopeFeaturesWithOverridesSchema, organizationFeaturesResourceConfiguration_InitializationFactory as organizationFeaturesFactory, } from '@wildo-ai/saas-models';
|
|
5
5
|
import { HttpResponseStatusCode, mergeResourceFrontendConfigurations, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
|
|
6
|
+
import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
|
|
6
7
|
const organizationFeaturesMainUI = organizationFeaturesMainSource;
|
|
7
8
|
const organizationFeaturesAdminUI = organizationFeaturesAdminSource;
|
|
8
9
|
const ORGANIZATION_FEATURE_STATE_EXAMPLE = {
|
|
@@ -65,6 +66,7 @@ export const organizationFeaturesResourceSpecification = resourceSpecificationFr
|
|
|
65
66
|
businessRole: 'Lets members and integrations understand organization-level availability while giving application administrators controlled entitlement operations.',
|
|
66
67
|
lifecycleRole: 'Changes when the organization’s plan changes or an application administrator grants, withdraws, or resets an exception.',
|
|
67
68
|
audience: LabelAudience.ADMIN,
|
|
69
|
+
subDomain: EngineResourceSubDomain.FEATURES,
|
|
68
70
|
codeHandling: {
|
|
69
71
|
mainSchema: {
|
|
70
72
|
packageName: '@wildo-ai/saas-models',
|
|
@@ -150,7 +152,7 @@ export const organizationFeaturesResourceSpecification = resourceSpecificationFr
|
|
|
150
152
|
purpose: 'Repository-only bootstrap of the org feature ledger when a system/admin workflow first materializes it.',
|
|
151
153
|
outcome: 'The organization has a singleton entitlement row to receive billing-derived features and manual overrides.',
|
|
152
154
|
responseStatuses: [
|
|
153
|
-
{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The singleton org-feature ledger
|
|
155
|
+
{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The singleton org-feature ledger record was materialized for the tenant.' },
|
|
154
156
|
],
|
|
155
157
|
// REPOSITORY_ONLY variant — materialized by system/admin workflows, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.
|
|
156
158
|
idempotent: false,
|
|
@@ -200,7 +202,7 @@ export const organizationFeaturesResourceSpecification = resourceSpecificationFr
|
|
|
200
202
|
outcome: 'A paginated result contains the singleton feature-state row when it matches, or an empty page when it does not.',
|
|
201
203
|
whenToUse: 'Use this route when a client needs a collection-shaped eligibility check. Use READ when the complete organization feature state is required regardless of one feature.',
|
|
202
204
|
responseStatuses: [
|
|
203
|
-
{ code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of org feature
|
|
205
|
+
{ code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of org feature records matching the supplied feature filter.' },
|
|
204
206
|
],
|
|
205
207
|
errorScenarios: [
|
|
206
208
|
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a member of this organization; the entitlements search is available to organization members.' },
|
|
@@ -249,7 +251,7 @@ export const organizationFeaturesResourceSpecification = resourceSpecificationFr
|
|
|
249
251
|
purpose: 'Repository-only teardown of the org feature ledger when its owning organization is deleted (composition `onParentDelete` cascade).',
|
|
250
252
|
outcome: 'The singleton entitlement row is removed together with the organization — the composition part does not outlive its whole.',
|
|
251
253
|
responseStatuses: [
|
|
252
|
-
{ code: HttpResponseStatusCode.OK_200, meaning: 'The org-feature ledger
|
|
254
|
+
{ code: HttpResponseStatusCode.OK_200, meaning: 'The org-feature ledger record was deleted as part of the owning organization’s deletion cascade.' },
|
|
253
255
|
],
|
|
254
256
|
// REPOSITORY_ONLY variant (super-admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.
|
|
255
257
|
idempotent: true,
|
package/dist/esm/engine/features/resources/organization-features.resource.specification.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-features.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/organization-features.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2CAA2C,IAAI,+BAA+B,EAC9E,0CAA0C,IAAI,8BAA8B,GAC7E,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,WAAW,EACX,qBAAqB,IAAI,EAAE,EAC3B,+BAA+B,EAC/B,oBAAoB,EACpB,gCAAgC,EAChC,+DAA+D,IAAI,2BAA2B,GAC/F,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AAOrC,MAAM,0BAA0B,GAAG,8BAA8E,CAAC;AAClH,MAAM,2BAA2B,GAAG,+BAA+E,CAAC;AAEpH,MAAM,kCAAkC,GAAG;IACzC,QAAQ,EAAE;QACR,WAAW,CAAC,eAAe;QAC3B,WAAW,CAAC,cAAc;QAC1B,WAAW,CAAC,UAAU;QACtB,WAAW,CAAC,oBAAoB;KACjC;IACD,MAAM,EAAE;QACN,KAAK,EAAE,GAAG;QACV,kBAAkB,EAAE,SAAS;KAC9B;IACD,eAAe,EAAE;QACf,aAAa,EAAE,CAAC,WAAW,CAAC,oBAAoB,CAAC;QACjD,eAAe,EAAE,EAAE;QACnB,cAAc,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE;KAC/B;CACO,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yGAAyG,EAAE;iBACpI;aACF;SACF;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,6EAA6E,EAAE,SAAS,EAAE,6CAA6C,EAAE;QAC/J,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,yDAAyD,EAAE,SAAS,EAAE,oDAAoD,EAAE;QACpJ,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,6EAA6E,EAAE,SAAS,EAAE,uEAAuE,EAAE;QAC3L,CAAC,+BAA+B,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,gDAAgD,EAAE,SAAS,EAAE,uEAAuE,EAAE;QACnM,CAAC,+BAA+B,CAAC,eAAe,CAAC,EAAE,EAAE,OAAO,EAAE,oDAAoD,EAAE,SAAS,EAAE,qEAAqE,EAAE;QACtM,CAAC,+BAA+B,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,oEAAoE,EAAE,SAAS,EAAE,2DAA2D,EAAE;KAC5M;CACF,CAAC,CACH,CAAC","sourcesContent":["import {\n organizationFeaturesAdminResourceUIBehavior as organizationFeaturesAdminSource,\n organizationFeaturesMainResourceUIBehavior as organizationFeaturesMainSource,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreFeature,\n CoreResourceOperation as Op,\n OrganizationFeatures_Operations,\n ResourcePrimaryScope,\n ScopeFeaturesWithOverridesSchema,\n organizationFeaturesResourceConfiguration_InitializationFactory as organizationFeaturesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\ntype Cfg = ReturnType<typeof organizationFeaturesFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst organizationFeaturesMainUI = organizationFeaturesMainSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\nconst organizationFeaturesAdminUI = organizationFeaturesAdminSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\n\nconst ORGANIZATION_FEATURE_STATE_EXAMPLE = {\n features: [\n CoreFeature.CUSTOM_BRANDING,\n CoreFeature.SINGLE_SIGN_ON,\n CoreFeature.AUDIT_LOGS,\n CoreFeature.M2M_WEBHOOK_DELIVERY,\n ],\n limits: {\n seats: 250,\n monthlyApiRequests: 1_000_000,\n },\n manualOverrides: {\n addedFeatures: [CoreFeature.M2M_WEBHOOK_DELIVERY],\n removedFeatures: [],\n limitOverrides: { seats: 250 },\n },\n} as const;\n\nconst ORGANIZATION_FEATURE_CONTEXT_EXAMPLE = {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE,\n organization: { _id: 'org_01JEXAMPLE' },\n} as const;\n\nconst ORGANIZATION_FEATURE_SUMMARY_EXAMPLE = {\n features: ORGANIZATION_FEATURE_STATE_EXAMPLE.features,\n limits: ORGANIZATION_FEATURE_STATE_EXAMPLE.limits,\n} as const;\n\nconst ORGANIZATION_FEATURE_UPDATE_REQUEST_EXAMPLE = {\n manualOverrides: {\n addedFeatures: [CoreFeature.ADVANCED_ANALYTICS, CoreFeature.M2M_WEBHOOK_DELIVERY],\n removedFeatures: [],\n limitOverrides: { seats: 300 },\n },\n} as const;\n\nconst ORGANIZATION_FEATURE_UPDATE_RESPONSE_EXAMPLE = {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE,\n features: [...ORGANIZATION_FEATURE_STATE_EXAMPLE.features, CoreFeature.ADVANCED_ANALYTICS],\n limits: { ...ORGANIZATION_FEATURE_STATE_EXAMPLE.limits, seats: 300 },\n manualOverrides: ORGANIZATION_FEATURE_UPDATE_REQUEST_EXAMPLE.manualOverrides,\n} as const;\n\nconst ORGANIZATION_FEATURE_DISABLE_RESPONSE_EXAMPLE = {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE,\n features: ORGANIZATION_FEATURE_STATE_EXAMPLE.features.filter((feature) => feature !== CoreFeature.SINGLE_SIGN_ON),\n manualOverrides: {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE.manualOverrides,\n removedFeatures: [CoreFeature.SINGLE_SIGN_ON],\n },\n} as const;\n\nconst ORGANIZATION_FEATURE_RESET_RESPONSE_EXAMPLE = {\n features: [CoreFeature.CUSTOM_BRANDING, CoreFeature.SINGLE_SIGN_ON, CoreFeature.AUDIT_LOGS],\n limits: { seats: 200, monthlyApiRequests: 1_000_000 },\n manualOverrides: { addedFeatures: [], removedFeatures: [], limitOverrides: {} },\n} as const;\n\n/**\n * Merged `ORGANIZATION_FEATURES` UI: org members can read entitlements, super-admins\n * can override, toggle, or reset the feature bundle (`organizations.resource-presets.tsx`).\n */\nexport const organizationFeaturesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(organizationFeaturesMainUI),\n resourceFrontendConfiguration(organizationFeaturesAdminUI),\n ),\n resourceSpecification(\n organizationFeaturesFactory,\n ScopeFeaturesWithOverridesSchema,\n ({ schemaShape }) => ({\n purpose: 'Current features and numeric limits available to one organization, including explicit application-administrator exceptions.',\n businessRole: 'Lets members and integrations understand organization-level availability while giving application administrators controlled entitlement operations.',\n lifecycleRole: 'Changes when the organization’s plan changes or an application administrator grants, withdraws, or resets an exception.',\n audience: LabelAudience.ADMIN,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ScopeFeaturesWithOverridesSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'organizationFeaturesResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'ORGANIZATION_FEATURES',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n customEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrganizationFeatures_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'organizationFeaturesMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'organizationFeaturesAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n // This schema is shared with application and user feature ledgers. Clone\n // every field before adding scope-specific metadata so one specification\n // cannot overwrite another specification's generated descriptions.\n features: schemaShape.features.clone().arraySpec({\n meaning: 'Effective feature keys enabled for this organization.',\n whyItMatters: 'Organization-level capability checks consult this set after plan state and manual overrides are resolved.',\n elementMeaning: 'One framework feature or application-defined entitlement key.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreFeature',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n notes: [\n 'Runtime can union additional custom entitlement feature string keys; `EngineCapability` is not stored here.',\n 'Example `CoreFeature` member: `SINGLE_SIGN_ON` — enterprise IdP and SSO sign-in for the tenant.',\n ],\n },\n }),\n limits: schemaShape.limits.clone().objectSpec({\n meaning: 'Effective numeric caps keyed by feature or meter identifier for this organization.',\n whyItMatters: 'A feature may be enabled while still carrying a quantity limit such as seats, API requests, or storage.',\n }),\n manualOverrides: schemaShape.manualOverrides.clone().objectSpec({\n meaning: 'Application-administrator additions, removals, and limit changes applied on top of this organization’s plan-derived state.',\n whyItMatters: 'These deliberate exceptions survive plan changes until an administrator replaces or resets them.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n operations: {\n [Op.CREATE]: {\n purpose: 'Repository-only bootstrap of the org feature ledger when a system/admin workflow first materializes it.',\n outcome: 'The organization has a singleton entitlement row to receive billing-derived features and manual overrides.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The singleton org-feature ledger row was materialized for the tenant.' },\n ],\n // REPOSITORY_ONLY variant — materialized by system/admin workflows, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: false,\n },\n [Op.READ]: {\n purpose: 'Read the effective feature entitlements and limits for the addressed organization.',\n outcome: 'The caller receives the resolved feature set, numeric limits, and any administrator-authored override delta.',\n whenToUse: 'Use this representation to explain which organization capabilities are available and which quantitative limits currently apply.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The org feature ledger is returned with its effective features, plan limits, and manual overrides.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a member of this organization; the effective entitlements ledger is readable by any organization member (writes remain super-admin-only).' },\n ],\n examples: [{\n title: 'Read organization feature entitlements',\n request: { organizationId: 'org_01JEXAMPLE' },\n response: ORGANIZATION_FEATURE_STATE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n purpose: 'Read effective organization feature state with its organization relationship context.',\n outcome: 'The feature state and related organization identifier are returned together.',\n examples: [{\n title: 'Read organization features with context',\n request: { organizationId: 'org_01JEXAMPLE' },\n response: ORGANIZATION_FEATURE_CONTEXT_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n purpose: 'Read the compact effective feature and limit representation.',\n outcome: 'The resolved feature keys and numeric limits are returned without the administrator override details.',\n examples: [{\n title: 'Read compact organization feature state',\n request: { organizationId: 'org_01JEXAMPLE' },\n response: ORGANIZATION_FEATURE_SUMMARY_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Filter the addressed organization’s feature-state row by an enabled feature key.',\n outcome: 'A paginated result contains the singleton feature-state row when it matches, or an empty page when it does not.',\n whenToUse: 'Use this route when a client needs a collection-shaped eligibility check. Use READ when the complete organization feature state is required regardless of one feature.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of org feature rows matching the supplied feature filter.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a member of this organization; the entitlements search is available to organization members.' },\n ],\n examples: [{\n title: 'Filter organization state by enabled SSO feature',\n request: {\n organizationId: 'org_01JEXAMPLE',\n q: 'single sign on',\n features: CoreFeature.SINGLE_SIGN_ON,\n page: 1,\n limit: 20,\n sort: 'features:asc',\n },\n response: {\n data: [ORGANIZATION_FEATURE_STATE_EXAMPLE],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n idempotent: true,\n },\n [Op.UPDATE]: {\n purpose: 'Replace one or more organization feature-state fields through the application-administration API.',\n outcome: 'The updated effective state and override delta are returned, and subsequent capability checks use the new values.',\n whenToUse: 'Use this operation for a coordinated override change involving several feature or limit entries. Use enable, disable, or reset for one explicit administrative action.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The org entitlements document was patched and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The partial entitlements payload fails `ScopeFeaturesWithOverridesSchema.partial()` validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; document-level overrides are high-trust only.' },\n ],\n examples: [{\n title: 'Update organization feature overrides and seat limit',\n request: {\n organizationId: 'org_01JEXAMPLE',\n ...ORGANIZATION_FEATURE_UPDATE_REQUEST_EXAMPLE,\n },\n response: ORGANIZATION_FEATURE_UPDATE_RESPONSE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the org feature ledger when its owning organization is deleted (composition `onParentDelete` cascade).',\n outcome: 'The singleton entitlement row is removed together with the organization — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The org-feature ledger row was deleted as part of the owning organization’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (super-admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n [OrganizationFeatures_Operations.ENABLE_FEATURE]: {\n operationId: OrganizationFeatures_Operations.ENABLE_FEATURE,\n purpose: 'Add one feature to the organization’s manual enablement overrides.',\n outcome: 'The feature is removed from any disable override, added once to the enable override, and the updated feature ledger is returned.',\n whenToUse: 'Use this command for one deliberate entitlement grant. The optional reason lets the caller explain why the change is being requested.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The named feature is now enabled for the org and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `featureId` is not a member of `CoreFeature` (the request DTO is enum-constrained, so an unknown key is a validation failure rather than a 404).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; feature enablement is administration-gated.' },\n ],\n // Convergent: enabling an already-enabled feature lands the same end state.\n idempotent: true,\n examples: [\n {\n title: 'Enable advanced analytics for an organization',\n request: {\n organizationId: 'org_01JEXAMPLE',\n featureId: CoreFeature.ADVANCED_ANALYTICS,\n reason: 'Advanced analytics is included in the signed enterprise addendum.',\n },\n response: {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE,\n features: [...ORGANIZATION_FEATURE_STATE_EXAMPLE.features, CoreFeature.ADVANCED_ANALYTICS],\n manualOverrides: {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE.manualOverrides,\n addedFeatures: [CoreFeature.M2M_WEBHOOK_DELIVERY, CoreFeature.ADVANCED_ANALYTICS],\n },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrganizationFeatures_Operations.DISABLE_FEATURE]: {\n operationId: OrganizationFeatures_Operations.DISABLE_FEATURE,\n purpose: 'Add one feature to the organization’s manual disablement overrides.',\n outcome: 'The feature is removed from any enable override, added once to the disable override, and the updated feature ledger is returned.',\n whenToUse: 'Use this command for one deliberate entitlement withdrawal. A non-empty reason is required.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The named feature is now disabled for the org and the updated ledger is returned.' },\n ],\n examples: [{\n title: 'Disable organization SSO after contract expiry',\n request: {\n organizationId: 'org_01JEXAMPLE',\n featureId: CoreFeature.SINGLE_SIGN_ON,\n reason: 'The enterprise SSO add-on ended on 2026-08-20.',\n },\n response: ORGANIZATION_FEATURE_DISABLE_RESPONSE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `featureId` is not a `CoreFeature` member, or the required `reason` justification is missing/empty.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; feature disablement is administration-gated.' },\n ],\n // Convergent: disabling an already-disabled feature lands the same end state.\n idempotent: true,\n },\n [OrganizationFeatures_Operations.RESET_FEATURES]: {\n operationId: OrganizationFeatures_Operations.RESET_FEATURES,\n purpose: 'Clear every manual organization feature and limit override.',\n outcome: 'The feature ledger returns to its plan-derived feature set and limits, and the updated ledger is returned.',\n whenToUse: 'Use this command after a temporary exception ends or when the organization should again follow its plan without manual additions, removals, or limit changes.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'All org manual overrides were cleared, the ledger was re-synced to plan truth, and the result is returned.' },\n ],\n examples: [{\n title: 'Reset organization features to plan-derived state',\n request: {\n organizationId: 'org_01JEXAMPLE',\n reason: 'Temporary migration entitlements are no longer required.',\n },\n response: ORGANIZATION_FEATURE_RESET_RESPONSE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The required `reason` justification is missing or empty.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; clearing overrides is the highest-trust feature operation.' },\n ],\n // Convergent: re-syncing to plan defaults lands the same cleared state on repeat, so this is idempotent despite being a high-risk action.\n idempotent: true,\n },\n },\n businessConstraints: [\n 'Each organization has one current feature-state record. The search route therefore returns either that matching record or an empty page; it is not a cross-organization feature catalogue.',\n 'Organization feature state and user feature state are separate entitlement layers. A capability may require both scopes to allow it.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n ),\n () => ({\n layout: {\n purpose: 'Show effective entitlements and manual deltas for a tenant without mixing in unrelated billing calculations.',\n displayPurpose: 'Read-only for org members; super-admin and platform flows edit overrides in the `overrides` section.',\n summaryPurpose: 'Compact summary of org-level feature chips and high-signal limit highlights.',\n sections: {\n overview: {\n purpose: 'Render `features` and `limits` for the org as the engine currently evaluates them.',\n whenToUse: 'Default org-level feature page and billing alignment reviews.',\n textSlots: {\n title: { purpose: 'Label the overview area for the org’s effective entitlements.' },\n description: { purpose: 'Clarify that values combine plan defaults, org policy, and manual operator overrides.' },\n },\n },\n overrides: {\n purpose: 'Author `manualOverrides` deltas (add/remove and limit patches) when operators intentionally diverge a tenant from plan truth.',\n whenToUse: 'Break-glass support, contract exceptions, and migration assists.',\n textSlots: {\n title: { purpose: 'Label the manual-override area for the organization.' },\n description: { purpose: 'State that these persist across billing plan transitions until reset via policy or the RESET operation.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Members and admins read effective entitlements in org settings and billing.', whenToUse: 'Plan comparison and support investigations.' },\n [Op.SEARCH]: { purpose: 'Search across feature metadata in merged main behavior.', whenToUse: 'Large shared catalogs in multi-tenant admin hosts.' },\n [Op.UPDATE]: { purpose: 'Super-admin edit of the entitlements document (admin preset adds this key).', whenToUse: 'Manual break-glass grants when billing cannot respond quickly enough.' },\n [OrganizationFeatures_Operations.ENABLE_FEATURE]: { purpose: 'Single-toggle enable UX tied to the custom op.', whenToUse: 'Sales-assist, pilots, and emergency unlocks with narrow blast radius.' },\n [OrganizationFeatures_Operations.DISABLE_FEATURE]: { purpose: 'Single-toggle disable with required reason string.', whenToUse: 'Abuse, license claw-back, and incident response for one capability.' },\n [OrganizationFeatures_Operations.RESET_FEATURES]: { purpose: 'Nuclear option to return to plan defaults after many manual edits.', whenToUse: 'Offboarding a bespoke bundle or after migration mistakes.' },\n },\n }),\n);\n"]}
|
|
1
|
+
{"version":3,"file":"organization-features.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/organization-features.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2CAA2C,IAAI,+BAA+B,EAC9E,0CAA0C,IAAI,8BAA8B,GAC7E,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,WAAW,EACX,qBAAqB,IAAI,EAAE,EAC3B,+BAA+B,EAC/B,oBAAoB,EACpB,gCAAgC,EAChC,+DAA+D,IAAI,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,EAAE,SAAS,EAAE,qEAAqE,EAAE;QACtM,CAAC,+BAA+B,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,oEAAoE,EAAE,SAAS,EAAE,2DAA2D,EAAE;KAC5M;CACF,CAAC,CACH,CAAC","sourcesContent":["import {\n organizationFeaturesAdminResourceUIBehavior as organizationFeaturesAdminSource,\n organizationFeaturesMainResourceUIBehavior as organizationFeaturesMainSource,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreFeature,\n CoreResourceOperation as Op,\n OrganizationFeatures_Operations,\n ResourcePrimaryScope,\n ScopeFeaturesWithOverridesSchema,\n organizationFeaturesResourceConfiguration_InitializationFactory as organizationFeaturesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype Cfg = ReturnType<typeof organizationFeaturesFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst organizationFeaturesMainUI = organizationFeaturesMainSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\nconst organizationFeaturesAdminUI = organizationFeaturesAdminSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\n\nconst ORGANIZATION_FEATURE_STATE_EXAMPLE = {\n features: [\n CoreFeature.CUSTOM_BRANDING,\n CoreFeature.SINGLE_SIGN_ON,\n CoreFeature.AUDIT_LOGS,\n CoreFeature.M2M_WEBHOOK_DELIVERY,\n ],\n limits: {\n seats: 250,\n monthlyApiRequests: 1_000_000,\n },\n manualOverrides: {\n addedFeatures: [CoreFeature.M2M_WEBHOOK_DELIVERY],\n removedFeatures: [],\n limitOverrides: { seats: 250 },\n },\n} as const;\n\nconst ORGANIZATION_FEATURE_CONTEXT_EXAMPLE = {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE,\n organization: { _id: 'org_01JEXAMPLE' },\n} as const;\n\nconst ORGANIZATION_FEATURE_SUMMARY_EXAMPLE = {\n features: ORGANIZATION_FEATURE_STATE_EXAMPLE.features,\n limits: ORGANIZATION_FEATURE_STATE_EXAMPLE.limits,\n} as const;\n\nconst ORGANIZATION_FEATURE_UPDATE_REQUEST_EXAMPLE = {\n manualOverrides: {\n addedFeatures: [CoreFeature.ADVANCED_ANALYTICS, CoreFeature.M2M_WEBHOOK_DELIVERY],\n removedFeatures: [],\n limitOverrides: { seats: 300 },\n },\n} as const;\n\nconst ORGANIZATION_FEATURE_UPDATE_RESPONSE_EXAMPLE = {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE,\n features: [...ORGANIZATION_FEATURE_STATE_EXAMPLE.features, CoreFeature.ADVANCED_ANALYTICS],\n limits: { ...ORGANIZATION_FEATURE_STATE_EXAMPLE.limits, seats: 300 },\n manualOverrides: ORGANIZATION_FEATURE_UPDATE_REQUEST_EXAMPLE.manualOverrides,\n} as const;\n\nconst ORGANIZATION_FEATURE_DISABLE_RESPONSE_EXAMPLE = {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE,\n features: ORGANIZATION_FEATURE_STATE_EXAMPLE.features.filter((feature) => feature !== CoreFeature.SINGLE_SIGN_ON),\n manualOverrides: {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE.manualOverrides,\n removedFeatures: [CoreFeature.SINGLE_SIGN_ON],\n },\n} as const;\n\nconst ORGANIZATION_FEATURE_RESET_RESPONSE_EXAMPLE = {\n features: [CoreFeature.CUSTOM_BRANDING, CoreFeature.SINGLE_SIGN_ON, CoreFeature.AUDIT_LOGS],\n limits: { seats: 200, monthlyApiRequests: 1_000_000 },\n manualOverrides: { addedFeatures: [], removedFeatures: [], limitOverrides: {} },\n} as const;\n\n/**\n * Merged `ORGANIZATION_FEATURES` UI: org members can read entitlements, super-admins\n * can override, toggle, or reset the feature bundle (`organizations.resource-presets.tsx`).\n */\nexport const organizationFeaturesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(organizationFeaturesMainUI),\n resourceFrontendConfiguration(organizationFeaturesAdminUI),\n ),\n resourceSpecification(\n organizationFeaturesFactory,\n ScopeFeaturesWithOverridesSchema,\n ({ schemaShape }) => ({\n purpose: 'Current features and numeric limits available to one organization, including explicit application-administrator exceptions.',\n businessRole: 'Lets members and integrations understand organization-level availability while giving application administrators controlled entitlement operations.',\n lifecycleRole: 'Changes when the organization’s plan changes or an application administrator grants, withdraws, or resets an exception.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.FEATURES,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ScopeFeaturesWithOverridesSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'organizationFeaturesResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'ORGANIZATION_FEATURES',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n customEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrganizationFeatures_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'organizationFeaturesMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'organizationFeaturesAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n // This schema is shared with application and user feature ledgers. Clone\n // every field before adding scope-specific metadata so one specification\n // cannot overwrite another specification's generated descriptions.\n features: schemaShape.features.clone().arraySpec({\n meaning: 'Effective feature keys enabled for this organization.',\n whyItMatters: 'Organization-level capability checks consult this set after plan state and manual overrides are resolved.',\n elementMeaning: 'One framework feature or application-defined entitlement key.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreFeature',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n notes: [\n 'Runtime can union additional custom entitlement feature string keys; `EngineCapability` is not stored here.',\n 'Example `CoreFeature` member: `SINGLE_SIGN_ON` — enterprise IdP and SSO sign-in for the tenant.',\n ],\n },\n }),\n limits: schemaShape.limits.clone().objectSpec({\n meaning: 'Effective numeric caps keyed by feature or meter identifier for this organization.',\n whyItMatters: 'A feature may be enabled while still carrying a quantity limit such as seats, API requests, or storage.',\n }),\n manualOverrides: schemaShape.manualOverrides.clone().objectSpec({\n meaning: 'Application-administrator additions, removals, and limit changes applied on top of this organization’s plan-derived state.',\n whyItMatters: 'These deliberate exceptions survive plan changes until an administrator replaces or resets them.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n operations: {\n [Op.CREATE]: {\n purpose: 'Repository-only bootstrap of the org feature ledger when a system/admin workflow first materializes it.',\n outcome: 'The organization has a singleton entitlement row to receive billing-derived features and manual overrides.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The singleton org-feature ledger record was materialized for the tenant.' },\n ],\n // REPOSITORY_ONLY variant — materialized by system/admin workflows, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: false,\n },\n [Op.READ]: {\n purpose: 'Read the effective feature entitlements and limits for the addressed organization.',\n outcome: 'The caller receives the resolved feature set, numeric limits, and any administrator-authored override delta.',\n whenToUse: 'Use this representation to explain which organization capabilities are available and which quantitative limits currently apply.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The org feature ledger is returned with its effective features, plan limits, and manual overrides.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a member of this organization; the effective entitlements ledger is readable by any organization member (writes remain super-admin-only).' },\n ],\n examples: [{\n title: 'Read organization feature entitlements',\n request: { organizationId: 'org_01JEXAMPLE' },\n response: ORGANIZATION_FEATURE_STATE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n purpose: 'Read effective organization feature state with its organization relationship context.',\n outcome: 'The feature state and related organization identifier are returned together.',\n examples: [{\n title: 'Read organization features with context',\n request: { organizationId: 'org_01JEXAMPLE' },\n response: ORGANIZATION_FEATURE_CONTEXT_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n purpose: 'Read the compact effective feature and limit representation.',\n outcome: 'The resolved feature keys and numeric limits are returned without the administrator override details.',\n examples: [{\n title: 'Read compact organization feature state',\n request: { organizationId: 'org_01JEXAMPLE' },\n response: ORGANIZATION_FEATURE_SUMMARY_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Filter the addressed organization’s feature-state row by an enabled feature key.',\n outcome: 'A paginated result contains the singleton feature-state row when it matches, or an empty page when it does not.',\n whenToUse: 'Use this route when a client needs a collection-shaped eligibility check. Use READ when the complete organization feature state is required regardless of one feature.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of org feature records matching the supplied feature filter.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a member of this organization; the entitlements search is available to organization members.' },\n ],\n examples: [{\n title: 'Filter organization state by enabled SSO feature',\n request: {\n organizationId: 'org_01JEXAMPLE',\n q: 'single sign on',\n features: CoreFeature.SINGLE_SIGN_ON,\n page: 1,\n limit: 20,\n sort: 'features:asc',\n },\n response: {\n data: [ORGANIZATION_FEATURE_STATE_EXAMPLE],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n idempotent: true,\n },\n [Op.UPDATE]: {\n purpose: 'Replace one or more organization feature-state fields through the application-administration API.',\n outcome: 'The updated effective state and override delta are returned, and subsequent capability checks use the new values.',\n whenToUse: 'Use this operation for a coordinated override change involving several feature or limit entries. Use enable, disable, or reset for one explicit administrative action.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The org entitlements document was patched and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The partial entitlements payload fails `ScopeFeaturesWithOverridesSchema.partial()` validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; document-level overrides are high-trust only.' },\n ],\n examples: [{\n title: 'Update organization feature overrides and seat limit',\n request: {\n organizationId: 'org_01JEXAMPLE',\n ...ORGANIZATION_FEATURE_UPDATE_REQUEST_EXAMPLE,\n },\n response: ORGANIZATION_FEATURE_UPDATE_RESPONSE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the org feature ledger when its owning organization is deleted (composition `onParentDelete` cascade).',\n outcome: 'The singleton entitlement row is removed together with the organization — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The org-feature ledger record was deleted as part of the owning organization’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (super-admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n [OrganizationFeatures_Operations.ENABLE_FEATURE]: {\n operationId: OrganizationFeatures_Operations.ENABLE_FEATURE,\n purpose: 'Add one feature to the organization’s manual enablement overrides.',\n outcome: 'The feature is removed from any disable override, added once to the enable override, and the updated feature ledger is returned.',\n whenToUse: 'Use this command for one deliberate entitlement grant. The optional reason lets the caller explain why the change is being requested.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The named feature is now enabled for the org and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `featureId` is not a member of `CoreFeature` (the request DTO is enum-constrained, so an unknown key is a validation failure rather than a 404).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; feature enablement is administration-gated.' },\n ],\n // Convergent: enabling an already-enabled feature lands the same end state.\n idempotent: true,\n examples: [\n {\n title: 'Enable advanced analytics for an organization',\n request: {\n organizationId: 'org_01JEXAMPLE',\n featureId: CoreFeature.ADVANCED_ANALYTICS,\n reason: 'Advanced analytics is included in the signed enterprise addendum.',\n },\n response: {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE,\n features: [...ORGANIZATION_FEATURE_STATE_EXAMPLE.features, CoreFeature.ADVANCED_ANALYTICS],\n manualOverrides: {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE.manualOverrides,\n addedFeatures: [CoreFeature.M2M_WEBHOOK_DELIVERY, CoreFeature.ADVANCED_ANALYTICS],\n },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrganizationFeatures_Operations.DISABLE_FEATURE]: {\n operationId: OrganizationFeatures_Operations.DISABLE_FEATURE,\n purpose: 'Add one feature to the organization’s manual disablement overrides.',\n outcome: 'The feature is removed from any enable override, added once to the disable override, and the updated feature ledger is returned.',\n whenToUse: 'Use this command for one deliberate entitlement withdrawal. A non-empty reason is required.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The named feature is now disabled for the org and the updated ledger is returned.' },\n ],\n examples: [{\n title: 'Disable organization SSO after contract expiry',\n request: {\n organizationId: 'org_01JEXAMPLE',\n featureId: CoreFeature.SINGLE_SIGN_ON,\n reason: 'The enterprise SSO add-on ended on 2026-08-20.',\n },\n response: ORGANIZATION_FEATURE_DISABLE_RESPONSE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `featureId` is not a `CoreFeature` member, or the required `reason` justification is missing/empty.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; feature disablement is administration-gated.' },\n ],\n // Convergent: disabling an already-disabled feature lands the same end state.\n idempotent: true,\n },\n [OrganizationFeatures_Operations.RESET_FEATURES]: {\n operationId: OrganizationFeatures_Operations.RESET_FEATURES,\n purpose: 'Clear every manual organization feature and limit override.',\n outcome: 'The feature ledger returns to its plan-derived feature set and limits, and the updated ledger is returned.',\n whenToUse: 'Use this command after a temporary exception ends or when the organization should again follow its plan without manual additions, removals, or limit changes.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'All org manual overrides were cleared, the ledger was re-synced to plan truth, and the result is returned.' },\n ],\n examples: [{\n title: 'Reset organization features to plan-derived state',\n request: {\n organizationId: 'org_01JEXAMPLE',\n reason: 'Temporary migration entitlements are no longer required.',\n },\n response: ORGANIZATION_FEATURE_RESET_RESPONSE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The required `reason` justification is missing or empty.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; clearing overrides is the highest-trust feature operation.' },\n ],\n // Convergent: re-syncing to plan defaults lands the same cleared state on repeat, so this is idempotent despite being a high-risk action.\n idempotent: true,\n },\n },\n businessConstraints: [\n 'Each organization has one current feature-state record. The search route therefore returns either that matching record or an empty page; it is not a cross-organization feature catalogue.',\n 'Organization feature state and user feature state are separate entitlement layers. A capability may require both scopes to allow it.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n ),\n () => ({\n layout: {\n purpose: 'Show effective entitlements and manual deltas for a tenant without mixing in unrelated billing calculations.',\n displayPurpose: 'Read-only for org members; super-admin and platform flows edit overrides in the `overrides` section.',\n summaryPurpose: 'Compact summary of org-level feature chips and high-signal limit highlights.',\n sections: {\n overview: {\n purpose: 'Render `features` and `limits` for the org as the engine currently evaluates them.',\n whenToUse: 'Default org-level feature page and billing alignment reviews.',\n textSlots: {\n title: { purpose: 'Label the overview area for the org’s effective entitlements.' },\n description: { purpose: 'Clarify that values combine plan defaults, org policy, and manual operator overrides.' },\n },\n },\n overrides: {\n purpose: 'Author `manualOverrides` deltas (add/remove and limit patches) when operators intentionally diverge a tenant from plan truth.',\n whenToUse: 'Break-glass support, contract exceptions, and migration assists.',\n textSlots: {\n title: { purpose: 'Label the manual-override area for the organization.' },\n description: { purpose: 'State that these persist across billing plan transitions until reset via policy or the RESET operation.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Members and admins read effective entitlements in org settings and billing.', whenToUse: 'Plan comparison and support investigations.' },\n [Op.SEARCH]: { purpose: 'Search across feature metadata in merged main behavior.', whenToUse: 'Large shared catalogs in multi-tenant admin hosts.' },\n [Op.UPDATE]: { purpose: 'Super-admin edit of the entitlements document (admin preset adds this key).', whenToUse: 'Manual break-glass grants when billing cannot respond quickly enough.' },\n [OrganizationFeatures_Operations.ENABLE_FEATURE]: { purpose: 'Single-toggle enable UX tied to the custom op.', whenToUse: 'Sales-assist, pilots, and emergency unlocks with narrow blast radius.' },\n [OrganizationFeatures_Operations.DISABLE_FEATURE]: { purpose: 'Single-toggle disable with required reason string.', whenToUse: 'Abuse, license claw-back, and incident response for one capability.' },\n [OrganizationFeatures_Operations.RESET_FEATURES]: { purpose: 'Nuclear option to return to plan defaults after many manual edits.', whenToUse: 'Offboarding a bespoke bundle or after migration mistakes.' },\n },\n }),\n);\n"]}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Presets: `userFeaturesMainResourceUIBehavior` + `userFeaturesAdminResourceUIBehavior` (identity)
|
|
9
9
|
*/
|
|
10
10
|
import { CoreResourceOperation as Op } from '@wildo-ai/saas-models';
|
|
11
|
-
export declare const userFeaturesResourceSpecification: import("../../../_core").ResourceSpecificationConfig<Record<string, never>, Op.READ | Op.UPDATE | Op.DELETE | Op.CREATE | Op.SEARCH, import("zod").ZodObject<{
|
|
11
|
+
export declare const userFeaturesResourceSpecification: import("../../../_core").ResourceSpecificationConfig<Record<string, never>, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.DELETE | Op.CREATE | Op.LIST | Op.SEARCH, import("zod").ZodObject<{
|
|
12
12
|
features: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodEnum<typeof import("@wildo-ai/saas-models").CoreFeature>, import("zod").ZodString]>>>>>;
|
|
13
13
|
limits: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodNumber>>>>;
|
|
14
14
|
manualOverrides: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-features.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/user-features.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAaH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI5B,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"user-features.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/user-features.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAaH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI5B,MAAM,uBAAuB,CAAC;AA0B/B,eAAO,MAAM,iCAAiC;;;;;;;;iCAoM7C,CAAC"}
|
|
@@ -12,6 +12,7 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
|
|
|
12
12
|
import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
|
|
13
13
|
import { CoreResourceOperation as Op, ResourcePrimaryScope, ScopeFeaturesWithOverridesSchema, userFeaturesResourceConfiguration_InitializationFactory as userFeaturesFactory, } from '@wildo-ai/saas-models';
|
|
14
14
|
import { HttpResponseStatusCode, mergeResourceFrontendConfigurations, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
|
|
15
|
+
import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
|
|
15
16
|
const userFeaturesMainResourceUIBehavior = userFeaturesMainResourceUIBehaviorSource;
|
|
16
17
|
const userFeaturesAdminResourceUIBehavior = userFeaturesAdminResourceUIBehaviorSource;
|
|
17
18
|
export const userFeaturesResourceSpecification = resourceSpecificationFromFrontendConfiguration(mergeResourceFrontendConfigurations(resourceFrontendConfiguration(userFeaturesMainResourceUIBehavior), resourceFrontendConfiguration(userFeaturesAdminResourceUIBehavior)), resourceSpecification(userFeaturesFactory, ScopeFeaturesWithOverridesSchema, ({ schemaShape }) => ({
|
|
@@ -19,6 +20,7 @@ export const userFeaturesResourceSpecification = resourceSpecificationFromFronte
|
|
|
19
20
|
businessRole: 'The user-scoped feature ledger backing progressive rollout, org plans, and manual operator grants in admin UI.',
|
|
20
21
|
lifecycleRole: 'Recomputed as billing, profile, and admin edits land — overrides persist until explicitly cleared or superseded by policy.',
|
|
21
22
|
audience: LabelAudience.ADMIN,
|
|
23
|
+
subDomain: EngineResourceSubDomain.FEATURES,
|
|
22
24
|
codeHandling: {
|
|
23
25
|
mainSchema: {
|
|
24
26
|
packageName: '@wildo-ai/saas-models',
|
|
@@ -98,7 +100,7 @@ export const userFeaturesResourceSpecification = resourceSpecificationFromFronte
|
|
|
98
100
|
purpose: 'Repository-only bootstrap of the user feature ledger when a backend workflow first materializes it.',
|
|
99
101
|
outcome: 'The user has a singleton entitlement row to receive plan-derived state and manual overrides.',
|
|
100
102
|
responseStatuses: [
|
|
101
|
-
{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The singleton user-feature ledger
|
|
103
|
+
{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The singleton user-feature ledger record was materialized for the user.' },
|
|
102
104
|
],
|
|
103
105
|
// REPOSITORY_ONLY variant (super-admin) — created by backend workflows, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.
|
|
104
106
|
idempotent: false,
|
|
@@ -119,7 +121,7 @@ export const userFeaturesResourceSpecification = resourceSpecificationFromFronte
|
|
|
119
121
|
purpose: 'Reserved lightweight listing path — runtime marks search with empty searchable metadata for this resource.',
|
|
120
122
|
outcome: 'Returns paginated rows when a platform adds filters; do not expect rich full-text on this type by default.',
|
|
121
123
|
responseStatuses: [
|
|
122
|
-
{ code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of user feature
|
|
124
|
+
{ code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of user feature records; search metadata is intentionally minimal for this resource.' },
|
|
123
125
|
],
|
|
124
126
|
errorScenarios: [
|
|
125
127
|
{ code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated member session for the entitlement search context.' },
|
|
@@ -144,7 +146,7 @@ export const userFeaturesResourceSpecification = resourceSpecificationFromFronte
|
|
|
144
146
|
purpose: 'Repository-only teardown of the user feature ledger when its owning user is deleted (composition `onParentDelete` cascade).',
|
|
145
147
|
outcome: 'The singleton entitlement row is removed together with the user — the composition part does not outlive its whole.',
|
|
146
148
|
responseStatuses: [
|
|
147
|
-
{ code: HttpResponseStatusCode.OK_200, meaning: 'The user-feature ledger
|
|
149
|
+
{ code: HttpResponseStatusCode.OK_200, meaning: 'The user-feature ledger record was deleted as part of the owning user’s deletion cascade.' },
|
|
148
150
|
],
|
|
149
151
|
// REPOSITORY_ONLY variant (super-admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.
|
|
150
152
|
idempotent: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-features.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/user-features.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,mCAAmC,IAAI,yCAAyC,EAChF,kCAAkC,IAAI,wCAAwC,GAC/E,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,gCAAgC,EAChC,uDAAuD,IAAI,mBAAmB,GAC/E,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AAMrC,MAAM,kCAAkC,GAAG,wCAI1C,CAAC;AAEF,MAAM,mCAAmC,GAAG,yCAI3C,CAAC;AAEF,MAAM,CAAC,MAA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A6J;YAC7J,UAAU,EAAE,IAAI;SACjB;KACF;IAED,mBAAmB,EAAE;QACnB,0OAA0O;QAC1O,uIAAuI;KACxI;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,SAAS,EAAE,CACzD,EACD,GAAG,EAAE,CAAC,CAAC;IACL,MAAM,EAAE;QACN,OAAO,EAAE,6GAA6G;QACtH,cAAc,EAAE,gHAAgH;QAChI,cAAc,EAAE,sEAAsE;QACtF,QAAQ,EAAE;YACR,QAAQ,EAAE;gBACR,OAAO,EAAE,8FAA8F;gBACvG,SAAS,EAAE,uDAAuD;gBAClE,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,wDAAwD,EAAE;oBAC5E,WAAW,EAAE,EAAE,OAAO,EAAE,4EAA4E,EAAE;iBACvG;aACF;YACD,SAAS,EAAE;gBACT,OAAO,EAAE,+EAA+E;gBACxF,SAAS,EAAE,8EAA8E;gBACzF,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,iCAAiC,EAAE;oBACrD,WAAW,EAAE,EAAE,OAAO,EAAE,sEAAsE,EAAE;iBACjG;aACF;SACF;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;YACT,OAAO,EAAE,mFAAmF;YAC5F,SAAS,EAAE,qEAAqE;SACjF;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,yFAAyF;YAClG,SAAS,EAAE,qDAAqD;SACjE;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,qDAAqD;YAC9D,SAAS,EAAE,0FAA0F;SACtG;KACF;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `userFeatures` — Wildo SaaS engine specification (mixed).\n *\n * Inputs:\n * - Schema: `ScopeFeaturesWithOverridesSchema` in `engine/saas-models/src/features/scope-features.shared.schemas.ts`\n * - Factory: `userFeaturesResourceConfiguration_InitializationFactory` in `user-features.shared.resources-config.schemas.ts`\n * - Custom operations: none (`Record<string, never>`)\n * - Presets: `userFeaturesMainResourceUIBehavior` + `userFeaturesAdminResourceUIBehavior` (identity)\n */\n\nimport {\n userFeaturesAdminResourceUIBehavior as userFeaturesAdminResourceUIBehaviorSource,\n userFeaturesMainResourceUIBehavior as userFeaturesMainResourceUIBehaviorSource,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n ScopeFeaturesWithOverridesSchema,\n userFeaturesResourceConfiguration_InitializationFactory as userFeaturesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\ntype UserFeaturesConfig = ReturnType<typeof userFeaturesFactory>;\ntype UserFeaturesCoreOp = UserFeaturesConfig['coreOperations'][number];\ntype UserFeaturesSchema = UserFeaturesConfig['mainSchema'];\n\nconst userFeaturesMainResourceUIBehavior = userFeaturesMainResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n Record<string, never>,\n UserFeaturesCoreOp,\n UserFeaturesSchema\n>;\n\nconst userFeaturesAdminResourceUIBehavior = userFeaturesAdminResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n Record<string, never>,\n UserFeaturesCoreOp,\n UserFeaturesSchema\n>;\n\nexport const userFeaturesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(userFeaturesMainResourceUIBehavior),\n resourceFrontendConfiguration(userFeaturesAdminResourceUIBehavior),\n ),\n resourceSpecification(\n userFeaturesFactory,\n ScopeFeaturesWithOverridesSchema,\n ({ schemaShape }) => ({\n purpose: 'Per-user entitlements: enabled engine features, numeric limits, and admin overrides that survive billing churn.',\n businessRole: 'The user-scoped feature ledger backing progressive rollout, org plans, and manual operator grants in admin UI.',\n lifecycleRole: 'Recomputed as billing, profile, and admin edits land — overrides persist until explicitly cleared or superseded by policy.',\n audience: LabelAudience.ADMIN,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ScopeFeaturesWithOverridesSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userFeaturesResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'USER_FEATURES',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'userFeaturesMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'userFeaturesAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n notes: [\n 'Runtime has no `userNotifications` / `m2mNotifications` on READ/SEARCH/UPDATE — do not add communications.* (DF-1).',\n ],\n },\n\n fields: {\n features: schemaShape.features.clone().arraySpec({\n meaning: 'Boolean feature switches currently enabled for this user (union of `CoreFeature` and custom entitlement feature keys).',\n whyItMatters: 'Feature gates across the product consult this set when evaluating user-level entitlements.',\n elementMeaning: 'One feature key — an engine feature enum member, a connector capability, or a tenant-specific string key.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreFeature',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n notes: [\n 'Runtime union is `CoreFeature | string`; `EngineCapability` is SaaS/framework activation and is not an entitlement feature id.',\n 'Representative `CoreFeature` members: `CUSTOM_BRANDING` (white-label / themes), `ADVANCED_ANALYTICS`, `SINGLE_SIGN_ON` (IdP + SSO), `AUDIT_LOGS`, `SECURITY_EVENT_EXPORT` (SIEM), `DIRECTORY_PROVISIONING` (SCIM), `M2M_WEBHOOK_DELIVERY`.',\n ],\n },\n }),\n\n limits: schemaShape.limits.clone().objectSpec({\n meaning: 'Numeric caps keyed by feature identifier — `FEATURES_UNLIMITED` convention marks no cap in consuming services.',\n whyItMatters: 'Distinguishes “feature on” from “how much of it” (seats, API units, etc.).',\n }),\n\n manualOverrides: schemaShape.manualOverrides.clone().objectSpec({\n meaning: 'Admin-edited delta applied on top of plan defaults — survives subscription changes until cleared.',\n whyItMatters: 'Carries “grant/deny and bespoke limits” the billing engine would not infer automatically.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n\n operations: {\n [Op.CREATE]: {\n purpose: 'Repository-only bootstrap of the user feature ledger when a backend workflow first materializes it.',\n outcome: 'The user has a singleton entitlement row to receive plan-derived state and manual overrides.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The singleton user-feature ledger row was materialized for the user.' },\n ],\n // REPOSITORY_ONLY variant (super-admin) — created by backend workflows, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: false,\n },\n [Op.READ]: {\n purpose: 'Load the effective user feature state for the current org + user context.',\n outcome: 'Clients render gates, admin consoles show truth, and services evaluate entitlements without recomputing from billing alone.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user feature ledger is returned with its effective features, limits, and manual overrides.' },\n ],\n errorScenarios: [\n // READ is an ORG_MEMBER-scoped API call over the caller's own entitlements; the failure is \"not authenticated\" (401), not a role denial (403).\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated member session, so the user entitlement context cannot be resolved.' },\n ],\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Reserved lightweight listing path — runtime marks search with empty searchable metadata for this resource.',\n outcome: 'Returns paginated rows when a platform adds filters; do not expect rich full-text on this type by default.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of user feature rows; search metadata is intentionally minimal for this resource.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated member session for the entitlement search context.' },\n ],\n idempotent: true,\n },\n [Op.UPDATE]: {\n purpose: 'Super-admin override of a user’s feature set or limits (high-trust).',\n outcome: 'Manual grants or revocations apply immediately to authorization and feature gating for that user.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user’s entitlements were overridden and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The entitlements payload fails `ScopeFeaturesWithOverridesSchema` validation.', errorCode: 'VALIDATION_FAILED' },\n // UPDATE is an APP_ADMIN_SUPER_ADMIN API call (unlike the ORG_MEMBER reads), so a non-admin caller is forbidden (403).\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; overriding a user’s entitlements is high-trust.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the user feature ledger when its owning user is deleted (composition `onParentDelete` cascade).',\n outcome: 'The singleton entitlement row is removed together with the user — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user-feature ledger row was deleted as part of the owning user’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (super-admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'The registry anchors `USER_FEATURES` under `USERS` with a one-to-one STANDALONE composition rel — the declared `resourcePrimaryScope` is `USER_SELF` to match the factory’s self-anchor, not a free-floating application catalog record.',\n 'Elements in `features` are entitlement feature ids. Provider-backed runtime needs live in `engineCapabilities`, not in this resource.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n ),\n () => ({\n layout: {\n purpose: 'Present effective entitlements and manual deltas without overwhelming operators with internal billing math.',\n displayPurpose: 'Read-only for members; super-admin update uses the same layout with editable controls in the override section.',\n summaryPurpose: 'Compact chip-style summary of enabled features and limit highlights.',\n sections: {\n overview: {\n purpose: 'Show the net effective `features` and `limits` as the system understands them for this user.',\n whenToUse: 'Default landing area on the feature-entitlement page.',\n textSlots: {\n title: { purpose: 'Label the overview card for feature and limit summary.' },\n description: { purpose: 'Explain that values may combine billing, org policy, and manual overrides.' },\n },\n },\n overrides: {\n purpose: 'Surface `manualOverrides` (added/removed features and per-key limit patches).',\n whenToUse: 'Admin workflows that intentionally deviate a single user from plan defaults.',\n textSlots: {\n title: { purpose: 'Label the manual-override area.' },\n description: { purpose: 'Clarify that these survive billing changes until explicitly removed.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: {\n purpose: 'End-user or member visibility of their effective entitlements in standard app UI.',\n whenToUse: 'Profile/settings surfaces that need honest “what you can use” data.',\n },\n [Op.SEARCH]: {\n purpose: 'Administrative or platform search across user entitlements (when enabled in host apps).',\n whenToUse: 'Rare — prefer user-scoped READ for the common case.',\n },\n [Op.UPDATE]: {\n purpose: 'Super-admin “edit entitlements for this user” path.',\n whenToUse: 'Support, sales-assist, or break-glass grants that cannot wait for a billing plan change.',\n },\n },\n }),\n);\n"]}
|
|
1
|
+
{"version":3,"file":"user-features.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/user-features.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,mCAAmC,IAAI,yCAAyC,EAChF,kCAAkC,IAAI,wCAAwC,GAC/E,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,gCAAgC,EAChC,uDAAuD,IAAI,mBAAmB,GAC/E,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAM3E,MAAM,kCAAkC,GAAG,wCAI1C,CAAC;AAEF,MAAM,mCAAmC,GAAG,yCAI3C,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG,8CAA8C,CAC7F,mCAAmC,CACjC,6BAA6B,CAAC,kCAAkC,CAAC,EACjE,6BAA6B,CAAC,mCAAmC,CAAC,CACnE,EACD,qBAAqB,CACnB,mBAAmB,EACnB,gCAAgC,EAChC,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,iHAAiH;IAC1H,YAAY,EAAE,gHAAgH;IAC9H,aAAa,EAAE,4HAA4H;IAC3I,QAAQ,EAAE,aAAa,CAAC,KAAK;IAC7B,SAAS,EAAE,uBAAuB,CAAC,QAAQ;IAC3C,YAAY,EAAE;QACZ,UAAU,EAAE;YACV,WAAW,EAAE,uBAAuB;YACpC,UAAU,EAAE,kCAAkC;YAC9C,UAAU,EAAE,cAAc,CAAC,MAAM;YACjC,eAAe,EAAE,mBAAm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E,4EAA4E,EAAE;iBACvG;aACF;YACD,SAAS,EAAE;gBACT,OAAO,EAAE,+EAA+E;gBACxF,SAAS,EAAE,8EAA8E;gBACzF,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,iCAAiC,EAAE;oBACrD,WAAW,EAAE,EAAE,OAAO,EAAE,sEAAsE,EAAE;iBACjG;aACF;SACF;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;YACT,OAAO,EAAE,mFAAmF;YAC5F,SAAS,EAAE,qEAAqE;SACjF;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,yFAAyF;YAClG,SAAS,EAAE,qDAAqD;SACjE;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,qDAAqD;YAC9D,SAAS,EAAE,0FAA0F;SACtG;KACF;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `userFeatures` — Wildo SaaS engine specification (mixed).\n *\n * Inputs:\n * - Schema: `ScopeFeaturesWithOverridesSchema` in `engine/saas-models/src/features/scope-features.shared.schemas.ts`\n * - Factory: `userFeaturesResourceConfiguration_InitializationFactory` in `user-features.shared.resources-config.schemas.ts`\n * - Custom operations: none (`Record<string, never>`)\n * - Presets: `userFeaturesMainResourceUIBehavior` + `userFeaturesAdminResourceUIBehavior` (identity)\n */\n\nimport {\n userFeaturesAdminResourceUIBehavior as userFeaturesAdminResourceUIBehaviorSource,\n userFeaturesMainResourceUIBehavior as userFeaturesMainResourceUIBehaviorSource,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n ScopeFeaturesWithOverridesSchema,\n userFeaturesResourceConfiguration_InitializationFactory as userFeaturesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype UserFeaturesConfig = ReturnType<typeof userFeaturesFactory>;\ntype UserFeaturesCoreOp = UserFeaturesConfig['coreOperations'][number];\ntype UserFeaturesSchema = UserFeaturesConfig['mainSchema'];\n\nconst userFeaturesMainResourceUIBehavior = userFeaturesMainResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n Record<string, never>,\n UserFeaturesCoreOp,\n UserFeaturesSchema\n>;\n\nconst userFeaturesAdminResourceUIBehavior = userFeaturesAdminResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n Record<string, never>,\n UserFeaturesCoreOp,\n UserFeaturesSchema\n>;\n\nexport const userFeaturesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(userFeaturesMainResourceUIBehavior),\n resourceFrontendConfiguration(userFeaturesAdminResourceUIBehavior),\n ),\n resourceSpecification(\n userFeaturesFactory,\n ScopeFeaturesWithOverridesSchema,\n ({ schemaShape }) => ({\n purpose: 'Per-user entitlements: enabled engine features, numeric limits, and admin overrides that survive billing churn.',\n businessRole: 'The user-scoped feature ledger backing progressive rollout, org plans, and manual operator grants in admin UI.',\n lifecycleRole: 'Recomputed as billing, profile, and admin edits land — overrides persist until explicitly cleared or superseded by policy.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.FEATURES,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ScopeFeaturesWithOverridesSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userFeaturesResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'USER_FEATURES',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'userFeaturesMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'userFeaturesAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n notes: [\n 'Runtime has no `userNotifications` / `m2mNotifications` on READ/SEARCH/UPDATE — do not add communications.* (DF-1).',\n ],\n },\n\n fields: {\n features: schemaShape.features.clone().arraySpec({\n meaning: 'Boolean feature switches currently enabled for this user (union of `CoreFeature` and custom entitlement feature keys).',\n whyItMatters: 'Feature gates across the product consult this set when evaluating user-level entitlements.',\n elementMeaning: 'One feature key — an engine feature enum member, a connector capability, or a tenant-specific string key.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreFeature',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n notes: [\n 'Runtime union is `CoreFeature | string`; `EngineCapability` is SaaS/framework activation and is not an entitlement feature id.',\n 'Representative `CoreFeature` members: `CUSTOM_BRANDING` (white-label / themes), `ADVANCED_ANALYTICS`, `SINGLE_SIGN_ON` (IdP + SSO), `AUDIT_LOGS`, `SECURITY_EVENT_EXPORT` (SIEM), `DIRECTORY_PROVISIONING` (SCIM), `M2M_WEBHOOK_DELIVERY`.',\n ],\n },\n }),\n\n limits: schemaShape.limits.clone().objectSpec({\n meaning: 'Numeric caps keyed by feature identifier — `FEATURES_UNLIMITED` convention marks no cap in consuming services.',\n whyItMatters: 'Distinguishes “feature on” from “how much of it” (seats, API units, etc.).',\n }),\n\n manualOverrides: schemaShape.manualOverrides.clone().objectSpec({\n meaning: 'Admin-edited delta applied on top of plan defaults — survives subscription changes until cleared.',\n whyItMatters: 'Carries “grant/deny and bespoke limits” the billing engine would not infer automatically.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n\n operations: {\n [Op.CREATE]: {\n purpose: 'Repository-only bootstrap of the user feature ledger when a backend workflow first materializes it.',\n outcome: 'The user has a singleton entitlement row to receive plan-derived state and manual overrides.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The singleton user-feature ledger record was materialized for the user.' },\n ],\n // REPOSITORY_ONLY variant (super-admin) — created by backend workflows, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: false,\n },\n [Op.READ]: {\n purpose: 'Load the effective user feature state for the current org + user context.',\n outcome: 'Clients render gates, admin consoles show truth, and services evaluate entitlements without recomputing from billing alone.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user feature ledger is returned with its effective features, limits, and manual overrides.' },\n ],\n errorScenarios: [\n // READ is an ORG_MEMBER-scoped API call over the caller's own entitlements; the failure is \"not authenticated\" (401), not a role denial (403).\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated member session, so the user entitlement context cannot be resolved.' },\n ],\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Reserved lightweight listing path — runtime marks search with empty searchable metadata for this resource.',\n outcome: 'Returns paginated rows when a platform adds filters; do not expect rich full-text on this type by default.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of user feature records; search metadata is intentionally minimal for this resource.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated member session for the entitlement search context.' },\n ],\n idempotent: true,\n },\n [Op.UPDATE]: {\n purpose: 'Super-admin override of a user’s feature set or limits (high-trust).',\n outcome: 'Manual grants or revocations apply immediately to authorization and feature gating for that user.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user’s entitlements were overridden and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The entitlements payload fails `ScopeFeaturesWithOverridesSchema` validation.', errorCode: 'VALIDATION_FAILED' },\n // UPDATE is an APP_ADMIN_SUPER_ADMIN API call (unlike the ORG_MEMBER reads), so a non-admin caller is forbidden (403).\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; overriding a user’s entitlements is high-trust.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the user feature ledger when its owning user is deleted (composition `onParentDelete` cascade).',\n outcome: 'The singleton entitlement row is removed together with the user — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user-feature ledger record was deleted as part of the owning user’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (super-admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'The registry anchors `USER_FEATURES` under `USERS` with a one-to-one STANDALONE composition rel — the declared `resourcePrimaryScope` is `USER_SELF` to match the factory’s self-anchor, not a free-floating application catalog record.',\n 'Elements in `features` are entitlement feature ids. Provider-backed runtime needs live in `engineCapabilities`, not in this resource.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n ),\n () => ({\n layout: {\n purpose: 'Present effective entitlements and manual deltas without overwhelming operators with internal billing math.',\n displayPurpose: 'Read-only for members; super-admin update uses the same layout with editable controls in the override section.',\n summaryPurpose: 'Compact chip-style summary of enabled features and limit highlights.',\n sections: {\n overview: {\n purpose: 'Show the net effective `features` and `limits` as the system understands them for this user.',\n whenToUse: 'Default landing area on the feature-entitlement page.',\n textSlots: {\n title: { purpose: 'Label the overview card for feature and limit summary.' },\n description: { purpose: 'Explain that values may combine billing, org policy, and manual overrides.' },\n },\n },\n overrides: {\n purpose: 'Surface `manualOverrides` (added/removed features and per-key limit patches).',\n whenToUse: 'Admin workflows that intentionally deviate a single user from plan defaults.',\n textSlots: {\n title: { purpose: 'Label the manual-override area.' },\n description: { purpose: 'Clarify that these survive billing changes until explicitly removed.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: {\n purpose: 'End-user or member visibility of their effective entitlements in standard app UI.',\n whenToUse: 'Profile/settings surfaces that need honest “what you can use” data.',\n },\n [Op.SEARCH]: {\n purpose: 'Administrative or platform search across user entitlements (when enabled in host apps).',\n whenToUse: 'Rare — prefer user-scoped READ for the common case.',\n },\n [Op.UPDATE]: {\n purpose: 'Super-admin “edit entitlements for this user” path.',\n whenToUse: 'Support, sales-assist, or break-glass grants that cannot wait for a billing plan change.',\n },\n },\n }),\n);\n"]}
|