@wildo-ai/saas-specifications 1.1.5 → 1.1.6
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/_catalogs/schema-org/_catalog-spec.shared.schemas.d.ts +10 -8
- package/dist/esm/_catalogs/schema-org/_catalog-spec.shared.schemas.d.ts.map +1 -1
- package/dist/esm/_catalogs/schema-org/_catalog-spec.shared.schemas.js +14 -13
- package/dist/esm/_catalogs/schema-org/_catalog-spec.shared.schemas.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/aggregate-offer.catalog-spec.d.ts +3 -2
- package/dist/esm/_catalogs/schema-org/aggregate-offer.catalog-spec.d.ts.map +1 -1
- package/dist/esm/_catalogs/schema-org/aggregate-offer.catalog-spec.js +4 -3
- package/dist/esm/_catalogs/schema-org/aggregate-offer.catalog-spec.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/index.d.ts +31 -15
- package/dist/esm/_catalogs/schema-org/index.d.ts.map +1 -1
- package/dist/esm/_catalogs/schema-org/index.js +34 -13
- package/dist/esm/_catalogs/schema-org/index.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/product.catalog-spec.d.ts +2 -2
- package/dist/esm/_catalogs/schema-org/product.catalog-spec.js +4 -4
- package/dist/esm/_catalogs/schema-org/product.catalog-spec.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/software-application.catalog-spec.d.ts +45 -0
- package/dist/esm/_catalogs/schema-org/software-application.catalog-spec.d.ts.map +1 -0
- package/dist/esm/_catalogs/schema-org/software-application.catalog-spec.js +58 -0
- package/dist/esm/_catalogs/schema-org/software-application.catalog-spec.js.map +1 -0
- package/dist/esm/_core/application-specification-family-identity.schemas.d.ts +3 -2
- package/dist/esm/_core/application-specification-family-identity.schemas.d.ts.map +1 -1
- package/dist/esm/_core/application-specification-family-identity.schemas.js +3 -2
- package/dist/esm/_core/application-specification-family-identity.schemas.js.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts +18 -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-validation.d.ts +39 -13
- 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 +43 -13
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts +90 -2
- package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js +70 -6
- package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js.map +1 -1
- package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/build-plan/build-plan.family-aspects.js +26 -4
- package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -1
- package/dist/esm/_core/business-semantics.specifications.schemas.d.ts +14 -0
- package/dist/esm/_core/business-semantics.specifications.schemas.d.ts.map +1 -1
- package/dist/esm/_core/business-semantics.specifications.schemas.js.map +1 -1
- package/dist/esm/_core/capability-composition/capability-composition-validation.d.ts.map +1 -1
- package/dist/esm/_core/capability-composition/capability-composition-validation.js +1 -0
- package/dist/esm/_core/capability-composition/capability-composition-validation.js.map +1 -1
- package/dist/esm/_core/capability-composition/capability-composition.schemas.d.ts +21 -2
- package/dist/esm/_core/capability-composition/capability-composition.schemas.d.ts.map +1 -1
- package/dist/esm/_core/capability-composition/capability-composition.schemas.js +20 -1
- package/dist/esm/_core/capability-composition/capability-composition.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts +11 -32
- 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 +70 -3
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.d.ts +142 -17
- package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js +285 -30
- package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/processor-register.schemas.d.ts +183 -18
- package/dist/esm/_core/compliance-documents/processor-register.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/processor-register.schemas.js +165 -18
- package/dist/esm/_core/compliance-documents/processor-register.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/recipient-disclosures.schemas.d.ts +139 -0
- package/dist/esm/_core/compliance-documents/recipient-disclosures.schemas.d.ts.map +1 -0
- package/dist/esm/_core/compliance-documents/recipient-disclosures.schemas.js +172 -0
- package/dist/esm/_core/compliance-documents/recipient-disclosures.schemas.js.map +1 -0
- package/dist/esm/_core/compliance-documents/recipient-population.schemas.d.ts +306 -0
- package/dist/esm/_core/compliance-documents/recipient-population.schemas.d.ts.map +1 -0
- package/dist/esm/_core/compliance-documents/recipient-population.schemas.js +502 -0
- package/dist/esm/_core/compliance-documents/recipient-population.schemas.js.map +1 -0
- package/dist/esm/_core/compliance-documents/retention-enforcement-facts.schemas.d.ts +107 -0
- package/dist/esm/_core/compliance-documents/retention-enforcement-facts.schemas.d.ts.map +1 -0
- package/dist/esm/_core/compliance-documents/retention-enforcement-facts.schemas.js +118 -0
- package/dist/esm/_core/compliance-documents/retention-enforcement-facts.schemas.js.map +1 -0
- package/dist/esm/_core/compliance-documents/subject-data-recipients.schemas.d.ts +56 -0
- package/dist/esm/_core/compliance-documents/subject-data-recipients.schemas.d.ts.map +1 -0
- package/dist/esm/_core/compliance-documents/subject-data-recipients.schemas.js +100 -0
- package/dist/esm/_core/compliance-documents/subject-data-recipients.schemas.js.map +1 -0
- package/dist/esm/_core/composite-view-specification.schemas.js +8 -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 -2
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js +3 -2
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js.map +1 -1
- package/dist/esm/_core/experience-plan/experience-plan.schemas.d.ts +16 -3
- package/dist/esm/_core/experience-plan/experience-plan.schemas.d.ts.map +1 -1
- package/dist/esm/_core/experience-plan/experience-plan.schemas.js +70 -5
- package/dist/esm/_core/experience-plan/experience-plan.schemas.js.map +1 -1
- package/dist/esm/_core/family-aspects.schemas.d.ts +10 -0
- package/dist/esm/_core/family-aspects.schemas.d.ts.map +1 -1
- package/dist/esm/_core/family-aspects.schemas.js.map +1 -1
- package/dist/esm/_core/feature-drafts/capability-map-output-set-generation.schemas.d.ts +2 -2
- package/dist/esm/_core/feature-drafts/capability-map-output-set.schemas.d.ts +1 -0
- package/dist/esm/_core/feature-drafts/capability-map-output-set.schemas.d.ts.map +1 -1
- package/dist/esm/_core/feature-drafts/feature-specification-drafts.schemas.d.ts +16 -0
- package/dist/esm/_core/feature-drafts/feature-specification-drafts.schemas.d.ts.map +1 -1
- package/dist/esm/_core/feature-drafts/feature-specification-drafts.schemas.js +8 -0
- package/dist/esm/_core/feature-drafts/feature-specification-drafts.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/integration-plan/integration-plan-generation.schemas.d.ts +5 -0
- package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.js +3 -1
- package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.js.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js +12 -2
- package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan.schemas.d.ts +30 -2
- package/dist/esm/_core/integration-plan/integration-plan.schemas.d.ts.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan.schemas.js +32 -2
- package/dist/esm/_core/integration-plan/integration-plan.schemas.js.map +1 -1
- package/dist/esm/_core/market/feature-benefit.schemas.js +2 -2
- package/dist/esm/_core/market/feature-benefit.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-alternative.schemas.js +2 -2
- package/dist/esm/_core/market/market-alternative.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-buying-journey.schemas.js +2 -2
- package/dist/esm/_core/market/market-buying-journey.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-category.schemas.js +2 -2
- package/dist/esm/_core/market/market-category.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-channel.schemas.js +2 -2
- package/dist/esm/_core/market/market-channel.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-gain.schemas.js +2 -2
- package/dist/esm/_core/market/market-gain.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-icp.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-icp.schemas.js +2 -2
- package/dist/esm/_core/market/market-icp.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-job.schemas.js +2 -2
- package/dist/esm/_core/market/market-job.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-message-template.schemas.js +2 -2
- package/dist/esm/_core/market/market-message-template.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-objection.schemas.js +2 -2
- package/dist/esm/_core/market/market-objection.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-pain.schemas.js +2 -2
- package/dist/esm/_core/market/market-pain.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-persona.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-persona.schemas.js +2 -2
- package/dist/esm/_core/market/market-persona.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-positioning.schemas.js +2 -2
- package/dist/esm/_core/market/market-positioning.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-proof.schemas.js +2 -2
- package/dist/esm/_core/market/market-proof.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-references.schemas.d.ts +6 -0
- package/dist/esm/_core/market/market-references.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-references.schemas.js +6 -0
- package/dist/esm/_core/market/market-references.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts +4 -4
- package/dist/esm/_core/market/market-tone-of-voice.schemas.js +2 -2
- package/dist/esm/_core/market/market-tone-of-voice.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-trigger.schemas.js +2 -2
- package/dist/esm/_core/market/market-trigger.schemas.js.map +1 -1
- package/dist/esm/_core/market/market.family-aspects.js +1 -1
- package/dist/esm/_core/market/market.family-aspects.js.map +1 -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 +6 -1
- package/dist/esm/_core/placement-plan/placement-plan.schemas.js.map +1 -1
- package/dist/esm/_core/requirements/functional-requirement.schemas.d.ts +1 -0
- package/dist/esm/_core/requirements/functional-requirement.schemas.d.ts.map +1 -1
- package/dist/esm/_core/requirements/functional-requirement.schemas.js +8 -0
- package/dist/esm/_core/requirements/functional-requirement.schemas.js.map +1 -1
- package/dist/esm/_core/requirements/requirements-snapshot.schemas.d.ts +1 -0
- package/dist/esm/_core/requirements/requirements-snapshot.schemas.d.ts.map +1 -1
- package/dist/esm/_core/resource-specification.schemas.d.ts +86 -28
- package/dist/esm/_core/resource-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/resource-specification.schemas.js +110 -24
- package/dist/esm/_core/resource-specification.schemas.js.map +1 -1
- package/dist/esm/_core/utils/retention-clock-field-specs.d.ts +13 -0
- package/dist/esm/_core/utils/retention-clock-field-specs.d.ts.map +1 -0
- package/dist/esm/_core/utils/retention-clock-field-specs.js +26 -0
- package/dist/esm/_core/utils/retention-clock-field-specs.js.map +1 -0
- package/dist/esm/_core/website-plan/website-plan.schemas.d.ts +31 -6
- package/dist/esm/_core/website-plan/website-plan.schemas.d.ts.map +1 -1
- package/dist/esm/_core/website-plan/website-plan.schemas.js +35 -6
- package/dist/esm/_core/website-plan/website-plan.schemas.js.map +1 -1
- package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.d.ts +142 -3
- package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.js +148 -14
- package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts +70 -10
- 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 +98 -11
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/application-line.application-creation.schemas.d.ts +215 -0
- package/dist/esm/application-creation/application-line.application-creation.schemas.d.ts.map +1 -0
- package/dist/esm/application-creation/application-line.application-creation.schemas.js +253 -0
- package/dist/esm/application-creation/application-line.application-creation.schemas.js.map +1 -0
- package/dist/esm/application-creation/application-specification-family-decisions.application-creation.schemas.d.ts +39 -0
- package/dist/esm/application-creation/application-specification-family-decisions.application-creation.schemas.d.ts.map +1 -0
- package/dist/esm/application-creation/application-specification-family-decisions.application-creation.schemas.js +37 -0
- package/dist/esm/application-creation/application-specification-family-decisions.application-creation.schemas.js.map +1 -0
- package/dist/esm/application-creation/journey.application-creation.schemas.d.ts +5 -49
- package/dist/esm/application-creation/journey.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/journey.application-creation.schemas.js +25 -60
- package/dist/esm/application-creation/journey.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/playbook-instance.application-creation.schemas.d.ts +28 -0
- package/dist/esm/application-creation/playbook-instance.application-creation.schemas.d.ts.map +1 -0
- package/dist/esm/application-creation/playbook-instance.application-creation.schemas.js +32 -0
- package/dist/esm/application-creation/playbook-instance.application-creation.schemas.js.map +1 -0
- package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +26 -6
- package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/playbooks.application-creation.schemas.js +28 -1
- package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation.exports.d.ts +7 -0
- package/dist/esm/application-creation.exports.d.ts.map +1 -1
- package/dist/esm/application-creation.exports.js +7 -0
- package/dist/esm/application-creation.exports.js.map +1 -1
- package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.d.ts +1 -1
- package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.js +1 -1
- package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.js.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +24 -1
- package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.definitions.js +75 -5
- package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts +6 -0
- package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-document-blueprint-selection.d.ts +11 -0
- package/dist/esm/assurance/assurance-document-blueprint-selection.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-document-blueprint-selection.js +22 -3
- package/dist/esm/assurance/assurance-document-blueprint-selection.js.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 +39 -6
- package/dist/esm/assurance/assurance-document-system.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-document-system.schemas.d.ts +11 -0
- package/dist/esm/assurance/assurance-document-system.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-document-system.schemas.js +19 -0
- package/dist/esm/assurance/assurance-document-system.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js +295 -31
- package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-foundation.schemas.d.ts +7 -0
- package/dist/esm/assurance/assurance-foundation.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-foundation.schemas.js +7 -0
- package/dist/esm/assurance/assurance-foundation.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-objective-catalog.definitions.js +17 -0
- package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-program-generation.schemas.d.ts +5 -1
- package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-program-generation.schemas.js +6 -3
- package/dist/esm/assurance/assurance-program-generation.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-program.family-aspects.js +1 -1
- package/dist/esm/assurance/assurance-program.family-aspects.js.map +1 -1
- package/dist/esm/assurance/assurance-program.schemas.d.ts +232 -3
- package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-program.schemas.js +107 -14
- package/dist/esm/assurance/assurance-program.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-source-registry.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-source-registry.definitions.js +77 -1
- package/dist/esm/assurance/assurance-source-registry.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js +23 -1
- package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js.map +1 -1
- package/dist/esm/assurance/governed-document-release.d.ts +7 -0
- package/dist/esm/assurance/governed-document-release.d.ts.map +1 -1
- package/dist/esm/assurance/governed-document-release.js +11 -2
- package/dist/esm/assurance/governed-document-release.js.map +1 -1
- package/dist/esm/companion-exports.d.ts +6 -5
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/companion-exports.js.map +1 -1
- package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.d.ts +1 -0
- 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 +35 -33
- 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 +6 -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.map +1 -1
- package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js +13 -12
- 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 +26 -2
- 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 -4
- package/dist/esm/engine/applications/resources/applications.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.js +11 -9
- package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js +2 -2
- 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 +1 -0
- 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 +45 -32
- 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 +1 -23
- 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 +185 -31
- 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 +2 -1
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js +29 -7
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js.map +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 +7 -1
- 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 +9 -6
- 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 +1 -0
- 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 +11 -7
- 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 +18 -16
- 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 +9 -11
- 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.map +1 -1
- package/dist/esm/engine/auth/resources/sso-config.resource.specification.js +238 -219
- 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 -24
- 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 +76 -16
- 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 +2 -1
- package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js +28 -6
- package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js.map +1 -1
- 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 +29 -11
- package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/billing-provider-event-settlements.resource.specification.js +1 -1
- package/dist/esm/engine/billing/resources/billing-provider-event-settlements.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts +2 -0
- 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 +13 -12
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js +5 -5
- 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 +12 -9
- package/dist/esm/engine/billing/resources/prices.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/products.resource.specification.d.ts +7 -4
- package/dist/esm/engine/billing/resources/products.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/products.resource.specification.js +36 -16
- 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 +13 -10
- package/dist/esm/engine/billing/resources/promotions.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/referrals.resource.specification.d.ts +13 -8
- package/dist/esm/engine/billing/resources/referrals.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/referrals.resource.specification.js +54 -20
- package/dist/esm/engine/billing/resources/referrals.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts +30 -4
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js +85 -25
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/usage-records.resource.specification.js +2 -2
- package/dist/esm/engine/billing/resources/usage-records.resource.specification.js.map +1 -1
- package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.d.ts +15 -2
- package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.js +45 -10
- package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.js.map +1 -1
- package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.d.ts +15 -2
- 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 +52 -12
- package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js.map +1 -1
- package/dist/esm/engine/compliance/resources/index.d.ts +1 -0
- package/dist/esm/engine/compliance/resources/index.d.ts.map +1 -1
- package/dist/esm/engine/compliance/resources/index.js +1 -0
- package/dist/esm/engine/compliance/resources/index.js.map +1 -1
- package/dist/esm/engine/compliance/resources/legal-holds.resource.specification.d.ts +39 -0
- package/dist/esm/engine/compliance/resources/legal-holds.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/compliance/resources/legal-holds.resource.specification.js +325 -0
- package/dist/esm/engine/compliance/resources/legal-holds.resource.specification.js.map +1 -0
- package/dist/esm/engine/compliance/resources/retention-enforcement-records.resource.specification.d.ts +23 -0
- package/dist/esm/engine/compliance/resources/retention-enforcement-records.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/compliance/resources/retention-enforcement-records.resource.specification.js +197 -0
- package/dist/esm/engine/compliance/resources/retention-enforcement-records.resource.specification.js.map +1 -0
- package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
- package/dist/esm/engine/engine-resource-specifications.registry.js +59 -0
- package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
- package/dist/esm/engine/errors/error-messages.specification.d.ts.map +1 -1
- package/dist/esm/engine/errors/error-messages.specification.js +69 -0
- package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
- package/dist/esm/engine/features/resources/application-features.resource.specification.d.ts +5 -5
- 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 +9 -10
- 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 +5 -5
- package/dist/esm/engine/features/resources/organization-features.resource.specification.js +11 -11
- 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 +5 -5
- package/dist/esm/engine/features/resources/user-features.resource.specification.js +3 -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 +7 -8
- 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.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js +16 -4
- 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.js +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/agent-work-decisions.resource.specification.d.ts +11 -0
- package/dist/esm/engine/flows-actors/resources/agent-work-decisions.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/flows-actors/resources/agent-work-decisions.resource.specification.js +382 -0
- package/dist/esm/engine/flows-actors/resources/agent-work-decisions.resource.specification.js.map +1 -0
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts +139 -1
- 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 +150 -4
- 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.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js +9 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/model-call-attributions.resource.specification.d.ts +3 -0
- package/dist/esm/engine/flows-actors/resources/model-call-attributions.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/flows-actors/resources/model-call-attributions.resource.specification.js +162 -0
- package/dist/esm/engine/flows-actors/resources/model-call-attributions.resource.specification.js.map +1 -0
- package/dist/esm/engine/flows-actors/resources/model-cost-period-aggregates.resource.specification.d.ts +3 -0
- package/dist/esm/engine/flows-actors/resources/model-cost-period-aggregates.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/flows-actors/resources/model-cost-period-aggregates.resource.specification.js +158 -0
- package/dist/esm/engine/flows-actors/resources/model-cost-period-aggregates.resource.specification.js.map +1 -0
- package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.d.ts +2 -1
- package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.js +16 -9
- package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/decision/ai-approval-queue.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/decision/ai-approval-queue.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/decision/ai-approval-request.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/decision/ai-approval-request.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-agent-work-override-rate-settings.frontend-component.specification.d.ts +5 -0
- package/dist/esm/engine/frontend-components/app/app-layout-agent-work-override-rate-settings.frontend-component.specification.d.ts.map +1 -0
- package/dist/esm/engine/frontend-components/app/app-layout-agent-work-override-rate-settings.frontend-component.specification.js +79 -0
- package/dist/esm/engine/frontend-components/app/app-layout-agent-work-override-rate-settings.frontend-component.specification.js.map +1 -0
- package/dist/esm/engine/frontend-components/app/app-layout-appearance-settings.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-appearance-settings.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-billing-settings.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-billing-settings.frontend-component.specification.js +3 -1
- package/dist/esm/engine/frontend-components/app/app-layout-billing-settings.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js +5 -4
- package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-invitations-settings.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-invitations-settings.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/auth/admin-config/app-page-security-settings.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/auth/admin-config/app-page-security-settings.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/billing/billing-pricing-table.frontend-component.specification.js +2 -2
- package/dist/esm/engine/frontend-components/billing/billing-pricing-table.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-number.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-number.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-string.frontend-component.specification.js +2 -2
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-string.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-approval.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-approval.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-decision.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-decision.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-address.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-address.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-address.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-string.frontend-component.specification.js +2 -2
- package/dist/esm/engine/frontend-components/form/fields/form-field-string.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/index.d.ts +1 -0
- package/dist/esm/engine/frontend-components/index.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/index.js +3 -0
- package/dist/esm/engine/frontend-components/index.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-empty-state.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-empty-state.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resources-fields-resource-reference-display.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/resources/resources-fields-resource-reference-display.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resources-fields-resource-reference-edit.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/resources/resources-fields-resource-reference-edit.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/sections/stepper.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/sections/stepper.frontend-component.specification.js +9 -4
- package/dist/esm/engine/frontend-components/sections/stepper.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js +4 -4
- 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.map +1 -1
- package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js +34 -0
- 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.map +1 -1
- package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js +26 -0
- package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js +2 -2
- package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-erasure-suppressions.resource.specification.d.ts +9 -0
- package/dist/esm/engine/infrastructure/resources/external-data-erasure-suppressions.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-erasure-suppressions.resource.specification.js +122 -0
- package/dist/esm/engine/infrastructure/resources/external-data-erasure-suppressions.resource.specification.js.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-outbound-changes.resource.specification.d.ts +9 -0
- package/dist/esm/engine/infrastructure/resources/external-data-outbound-changes.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-outbound-changes.resource.specification.js +152 -0
- package/dist/esm/engine/infrastructure/resources/external-data-outbound-changes.resource.specification.js.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pending-references.resource.specification.d.ts +10 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pending-references.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pending-references.resource.specification.js +94 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pending-references.resource.specification.js.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership-keys.resource.specification.d.ts +10 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership-keys.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership-keys.resource.specification.js +64 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership-keys.resource.specification.js.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.d.ts +4 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.js +20 -16
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-run-records.resource.specification.d.ts +9 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-run-records.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-run-records.resource.specification.js +200 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-run-records.resource.specification.js.map +1 -0
- 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 +19 -6
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-remote-versions.resource.specification.d.ts +9 -0
- package/dist/esm/engine/infrastructure/resources/external-data-remote-versions.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-remote-versions.resource.specification.js +97 -0
- package/dist/esm/engine/infrastructure/resources/external-data-remote-versions.resource.specification.js.map +1 -0
- package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts +8 -0
- 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 +2 -2
- 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 +8 -8
- package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js +1 -1
- package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/system-of-record-partition-assignments.resource.specification.js +4 -4
- package/dist/esm/engine/infrastructure/resources/system-of-record-partition-assignments.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/system-of-record-write-admissions.resource.specification.d.ts +9 -0
- package/dist/esm/engine/infrastructure/resources/system-of-record-write-admissions.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/infrastructure/resources/system-of-record-write-admissions.resource.specification.js +153 -0
- package/dist/esm/engine/infrastructure/resources/system-of-record-write-admissions.resource.specification.js.map +1 -0
- package/dist/esm/engine/notifications/resources/conversation-threads.resource.specification.d.ts +81 -0
- package/dist/esm/engine/notifications/resources/conversation-threads.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/notifications/resources/conversation-threads.resource.specification.js +437 -0
- package/dist/esm/engine/notifications/resources/conversation-threads.resource.specification.js.map +1 -0
- package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.d.ts +112 -0
- package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.js +287 -0
- package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.js.map +1 -0
- package/dist/esm/engine/notifications/resources/inbound-email.resource.specification.d.ts +131 -0
- package/dist/esm/engine/notifications/resources/inbound-email.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/notifications/resources/inbound-email.resource.specification.js +594 -0
- package/dist/esm/engine/notifications/resources/inbound-email.resource.specification.js.map +1 -0
- package/dist/esm/engine/notifications/resources/index.d.ts +1 -0
- package/dist/esm/engine/notifications/resources/index.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/index.js +1 -0
- package/dist/esm/engine/notifications/resources/index.js.map +1 -1
- package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts +6 -3
- 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 +20 -5
- 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.map +1 -1
- package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js +12 -2
- 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 +6 -6
- 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 +8 -11
- package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/notifications/system-emails/human-decision.system-emails.specification.d.ts +4 -0
- package/dist/esm/engine/notifications/system-emails/human-decision.system-emails.specification.d.ts.map +1 -0
- package/dist/esm/engine/notifications/system-emails/human-decision.system-emails.specification.js +62 -0
- package/dist/esm/engine/notifications/system-emails/human-decision.system-emails.specification.js.map +1 -0
- package/dist/esm/engine/notifications/system-emails/index.d.ts +2 -1
- package/dist/esm/engine/notifications/system-emails/index.d.ts.map +1 -1
- package/dist/esm/engine/notifications/system-emails/index.js +4 -2
- package/dist/esm/engine/notifications/system-emails/index.js.map +1 -1
- package/dist/esm/engine/organizations/resources/index.d.ts +2 -0
- package/dist/esm/engine/organizations/resources/index.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/index.js +2 -0
- package/dist/esm/engine/organizations/resources/index.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts +3 -0
- 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 +40 -12
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js +2 -2
- package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js +2 -2
- 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 +0 -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 -6
- 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 +7 -3
- 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 +15 -8
- 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 +3 -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 +36 -21
- package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/service-provider-activity-feed.resource.specification.d.ts +38 -0
- package/dist/esm/engine/organizations/resources/service-provider-activity-feed.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/organizations/resources/service-provider-activity-feed.resource.specification.js +152 -0
- package/dist/esm/engine/organizations/resources/service-provider-activity-feed.resource.specification.js.map +1 -0
- package/dist/esm/engine/organizations/resources/service-provider-relationships.resource.specification.d.ts +106 -0
- package/dist/esm/engine/organizations/resources/service-provider-relationships.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/organizations/resources/service-provider-relationships.resource.specification.js +417 -0
- package/dist/esm/engine/organizations/resources/service-provider-relationships.resource.specification.js.map +1 -0
- package/dist/esm/engine/providers/apple.provider.specification.js +1 -1
- package/dist/esm/engine/providers/apple.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/github.provider.specification.js +1 -1
- package/dist/esm/engine/providers/github.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/google-places.provider.specification.d.ts +6 -0
- package/dist/esm/engine/providers/google-places.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/google-places.provider.specification.js +44 -0
- package/dist/esm/engine/providers/google-places.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/google.provider.specification.js +1 -1
- package/dist/esm/engine/providers/google.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/index.d.ts +2 -0
- package/dist/esm/engine/providers/index.d.ts.map +1 -1
- package/dist/esm/engine/providers/index.js +5 -1
- package/dist/esm/engine/providers/index.js.map +1 -1
- package/dist/esm/engine/providers/microsoft.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/microsoft.provider.specification.js +10 -6
- package/dist/esm/engine/providers/microsoft.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/recaptcha.provider.specification.d.ts +6 -0
- package/dist/esm/engine/providers/recaptcha.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/recaptcha.provider.specification.js +38 -0
- package/dist/esm/engine/providers/recaptcha.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/resend.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/resend.provider.specification.js +3 -1
- package/dist/esm/engine/providers/resend.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/stripe.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/stripe.provider.specification.js +3 -2
- package/dist/esm/engine/providers/stripe.provider.specification.js.map +1 -1
- package/dist/esm/engine/roles/app-billing-provider-events.role.specification.d.ts +2 -0
- package/dist/esm/engine/roles/app-billing-provider-events.role.specification.d.ts.map +1 -0
- package/dist/esm/engine/roles/app-billing-provider-events.role.specification.js +21 -0
- package/dist/esm/engine/roles/app-billing-provider-events.role.specification.js.map +1 -0
- package/dist/esm/engine/roles/app-email-inbound-intake.role.specification.d.ts +2 -0
- package/dist/esm/engine/roles/app-email-inbound-intake.role.specification.d.ts.map +1 -0
- package/dist/esm/engine/roles/app-email-inbound-intake.role.specification.js +21 -0
- package/dist/esm/engine/roles/app-email-inbound-intake.role.specification.js.map +1 -0
- package/dist/esm/engine/roles/index.d.ts +13 -5
- package/dist/esm/engine/roles/index.d.ts.map +1 -1
- package/dist/esm/engine/roles/index.js +19 -6
- package/dist/esm/engine/roles/index.js.map +1 -1
- package/dist/esm/engine/roles/org-billing-provider-events.role.specification.d.ts +2 -0
- package/dist/esm/engine/roles/org-billing-provider-events.role.specification.d.ts.map +1 -0
- package/dist/esm/engine/roles/org-billing-provider-events.role.specification.js +21 -0
- package/dist/esm/engine/roles/org-billing-provider-events.role.specification.js.map +1 -0
- package/dist/esm/engine/roles/org-delegated-capabilities.role.specification.d.ts +7 -0
- package/dist/esm/engine/roles/org-delegated-capabilities.role.specification.d.ts.map +1 -0
- package/dist/esm/engine/roles/org-delegated-capabilities.role.specification.js +72 -0
- package/dist/esm/engine/roles/org-delegated-capabilities.role.specification.js.map +1 -0
- package/dist/esm/engine/roles/org-service-provider.role.specification.d.ts +2 -0
- package/dist/esm/engine/roles/org-service-provider.role.specification.d.ts.map +1 -0
- package/dist/esm/engine/roles/org-service-provider.role.specification.js +22 -0
- package/dist/esm/engine/roles/org-service-provider.role.specification.js.map +1 -0
- package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js +2 -2
- package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js +3 -3
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/self-service-user-notifications.shared.d.ts +1 -1
- package/dist/esm/engine/users/resources/self-service-user-notifications.shared.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/self-service-user-notifications.shared.js +3 -6
- package/dist/esm/engine/users/resources/self-service-user-notifications.shared.js.map +1 -1
- package/dist/esm/engine/users/resources/user-credentials.resource.specification.js +2 -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.js +2 -2
- package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.d.ts +0 -4
- package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.js +0 -3
- package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.js.map +1 -1
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts +0 -3
- 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 +7 -7
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-profiles.resource.specification.js +5 -5
- 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 +0 -3
- 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 +11 -18
- 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.js +6 -6
- 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 +5 -1
- 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 +8 -5
- package/dist/esm/engine/users/resources/users.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/users.resource.specification.js +49 -16
- 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.map +1 -1
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js +29 -10
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/dist/assurance/external-framework-mapping.json +0 -1228
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,EAAE,EAC3B,oBAAoB,EACpB,gCAAgC,EAChC,8DAA8D,IAAI,0BAA0B,GAC7F,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAM3E,MAAM,0CAA0C,GAAG,8BAIlD,CAAC;AAEF,MAAM,CAAC,MAAM,wCAAwC,GAAG,8CAA8C,CACpG,6BAA6B,CAAC,0CAA0C,CAAC,EACzE,qBAAqB,CACnB,0BAA0B,EAC1B,gCAAgC,EAChC,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,4GAA4G;IACrH,YAAY,EAAE,oKAAoK;IAClL,aAAa,EAAE,gHAAgH;IAC/H,QAAQ,EAAE,aAAa,CAAC,KAAK;IAC7B,SAAS,EAAE,uBAAuB,CAAC,QAAQ;IAC3C,YA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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 'ENABLE_FEATURE, DISABLE_FEATURE and RESET_FEATURES record a committed RESOURCE_OPERATION_PERFORMED event with the persisted feature-ledger id, override change and supplied reason. Enable accepts an optional reason; disable and reset require one. Audit history survives later override changes and resets.',\n '`APPLICATION_FEATURES` is one-to-one by `applicationId`; 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,GAC7F,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAM3E,MAAM,0CAA0C,GAAG,8BAIlD,CAAC;AAEF,MAAM,CAAC,MAAM,wCAAwC,GAAG,8CAA8C,CACpG,6BAA6B,CAAC,0CAA0C,CAAC,EACzE,qB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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. Each is shown as its word (`billing_features.<id>.label`), the identifier while the word is missing.',\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. Each key is shown as its word (`billing_limits.<id>.label`), and `-1` (`FEATURES_UNLIMITED`) as unlimited.',\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.' },\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).' },\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.' },\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.' },\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 'ENABLE_FEATURE, DISABLE_FEATURE and RESET_FEATURES record a committed RESOURCE_OPERATION_PERFORMED event with the persisted feature-ledger id, override change and supplied reason. Enable accepts an optional reason; disable and reset require one. Audit history survives later override changes and resets.',\n '`APPLICATION_FEATURES` is one-to-one by `applicationId`; 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. The effective features and limits sit in an untitled card (the page header already names the record); the manual overrides keep their heading, which is what separates a grant the configuration gave from one a person gave. No read section shows a description; an empty list says \"None yet\". The form keeps one description, on the overrides.',\n summaryPurpose: 'Compact feature and limit summary for application-level gates, as bare values.',\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. Not rendered: the page header already names the record.' },\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
CHANGED
|
@@ -4,12 +4,12 @@ import { CoreFeature, CoreResourceOperation as Op, OrganizationFeatures_Operatio
|
|
|
4
4
|
* can override, toggle, or reset the feature bundle (`organizations.resource-presets.tsx`).
|
|
5
5
|
*/
|
|
6
6
|
export declare const organizationFeaturesResourceSpecification: import("../../../_core").ResourceSpecificationConfig<typeof OrganizationFeatures_Operations, Op.READ | Op.UPDATE | Op.DELETE | Op.CREATE | Op.SEARCH, import("zod").ZodObject<{
|
|
7
|
-
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 CoreFeature>, import("zod").ZodString]
|
|
8
|
-
limits: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString
|
|
7
|
+
features: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodArray<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodUnion<readonly [import("zod").ZodEnum<typeof CoreFeature>, import("zod").ZodString]>>>>>>;
|
|
8
|
+
limits: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodRecord<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>, import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodNumber>>>>>;
|
|
9
9
|
manualOverrides: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodObject<{
|
|
10
|
-
addedFeatures: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString
|
|
11
|
-
removedFeatures: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString
|
|
12
|
-
limitOverrides: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString
|
|
10
|
+
addedFeatures: import("zod").ZodDefault<import("zod").ZodArray<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>;
|
|
11
|
+
removedFeatures: import("zod").ZodDefault<import("zod").ZodArray<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>;
|
|
12
|
+
limitOverrides: import("zod").ZodDefault<import("zod").ZodRecord<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>, import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodNumber>>>;
|
|
13
13
|
}, import("zod/v4/core").$strip>>>;
|
|
14
14
|
}, import("zod/v4/core").$strip>>;
|
|
15
15
|
//# sourceMappingURL=organization-features.resource.specification.d.ts.map
|
|
@@ -121,7 +121,7 @@ export const organizationFeaturesResourceSpecification = resourceSpecificationFr
|
|
|
121
121
|
// every field before adding scope-specific metadata so one specification
|
|
122
122
|
// cannot overwrite another specification's generated descriptions.
|
|
123
123
|
features: schemaShape.features.clone().arraySpec({
|
|
124
|
-
meaning: 'Effective feature keys enabled for this organization.',
|
|
124
|
+
meaning: 'Effective feature keys enabled for this organization. Each is shown as its word (`billing_features.<id>.label`), the identifier while the word is missing.',
|
|
125
125
|
whyItMatters: 'Organization-level capability checks consult this set after plan state and manual overrides are resolved.',
|
|
126
126
|
elementMeaning: 'One framework feature or application-defined entitlement key.',
|
|
127
127
|
elementType: {
|
|
@@ -138,7 +138,7 @@ export const organizationFeaturesResourceSpecification = resourceSpecificationFr
|
|
|
138
138
|
},
|
|
139
139
|
}),
|
|
140
140
|
limits: schemaShape.limits.clone().objectSpec({
|
|
141
|
-
meaning: 'Effective numeric caps keyed by feature or meter identifier for this organization.',
|
|
141
|
+
meaning: 'Effective numeric caps keyed by feature or meter identifier for this organization. Each key is shown as its word (`billing_limits.<id>.label`), and `-1` (`FEATURES_UNLIMITED`) as unlimited.',
|
|
142
142
|
whyItMatters: 'A feature may be enabled while still carrying a quantity limit such as seats, API requests, or storage.',
|
|
143
143
|
}),
|
|
144
144
|
manualOverrides: schemaShape.manualOverrides.clone().objectSpec({
|
|
@@ -233,7 +233,7 @@ export const organizationFeaturesResourceSpecification = resourceSpecificationFr
|
|
|
233
233
|
{ code: HttpResponseStatusCode.OK_200, meaning: 'The org entitlements document was patched and the updated ledger is returned.' },
|
|
234
234
|
],
|
|
235
235
|
errorScenarios: [
|
|
236
|
-
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The partial entitlements payload fails `ScopeFeaturesWithOverridesSchema.partial()` validation.'
|
|
236
|
+
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The partial entitlements payload fails `ScopeFeaturesWithOverridesSchema.partial()` validation.' },
|
|
237
237
|
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; document-level overrides are high-trust only.' },
|
|
238
238
|
],
|
|
239
239
|
examples: [{
|
|
@@ -265,7 +265,7 @@ export const organizationFeaturesResourceSpecification = resourceSpecificationFr
|
|
|
265
265
|
{ code: HttpResponseStatusCode.OK_200, meaning: 'The named feature is now enabled for the org and the updated ledger is returned.' },
|
|
266
266
|
],
|
|
267
267
|
errorScenarios: [
|
|
268
|
-
{ 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).'
|
|
268
|
+
{ 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).' },
|
|
269
269
|
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; feature enablement is administration-gated.' },
|
|
270
270
|
],
|
|
271
271
|
// Convergent: enabling an already-enabled feature lands the same end state.
|
|
@@ -309,7 +309,7 @@ export const organizationFeaturesResourceSpecification = resourceSpecificationFr
|
|
|
309
309
|
forStatus: HttpResponseStatusCode.OK_200,
|
|
310
310
|
}],
|
|
311
311
|
errorScenarios: [
|
|
312
|
-
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `featureId` is not a `CoreFeature` member, or the required `reason` justification is missing/empty.'
|
|
312
|
+
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `featureId` is not a `CoreFeature` member, or the required `reason` justification is missing/empty.' },
|
|
313
313
|
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; feature disablement is administration-gated.' },
|
|
314
314
|
],
|
|
315
315
|
// Convergent: disabling an already-disabled feature lands the same end state.
|
|
@@ -333,7 +333,7 @@ export const organizationFeaturesResourceSpecification = resourceSpecificationFr
|
|
|
333
333
|
forStatus: HttpResponseStatusCode.OK_200,
|
|
334
334
|
}],
|
|
335
335
|
errorScenarios: [
|
|
336
|
-
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The required `reason` justification is missing or empty.'
|
|
336
|
+
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The required `reason` justification is missing or empty.' },
|
|
337
337
|
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; clearing overrides is the highest-trust feature operation.' },
|
|
338
338
|
],
|
|
339
339
|
// Convergent: re-syncing to plan defaults lands the same cleared state on repeat, so this is idempotent despite being a high-risk action.
|
|
@@ -348,15 +348,15 @@ export const organizationFeaturesResourceSpecification = resourceSpecificationFr
|
|
|
348
348
|
}), { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS }), () => ({
|
|
349
349
|
layout: {
|
|
350
350
|
purpose: 'Show effective entitlements and manual deltas for a tenant without mixing in unrelated billing calculations.',
|
|
351
|
-
displayPurpose: 'Read-only for org members
|
|
352
|
-
summaryPurpose: 'Compact summary of org-level feature chips and high-signal limit highlights.',
|
|
351
|
+
displayPurpose: 'Read-only for org members. Two groups: the effective `features` and `limits` in an untitled card (the page title already names it), then the `overrides` section, titled because it is what separates a grant the plan gave from one a person gave. An empty override list reads "None yet", which on this pane is the answer. No section shows a description on read.',
|
|
352
|
+
summaryPurpose: 'Compact summary of org-level feature chips and high-signal limit highlights, as bare values.',
|
|
353
|
+
editPurpose: 'Super-admin edit of the ledger, stacked. The `overrides` section keeps its description on the form: that a hand-made override outlives plan changes until reset is the consequence of saving, and no field name says it.',
|
|
353
354
|
sections: {
|
|
354
355
|
overview: {
|
|
355
356
|
purpose: 'Render `features` and `limits` for the org as the engine currently evaluates them.',
|
|
356
|
-
whenToUse: 'Default org-level feature page and billing alignment reviews.',
|
|
357
|
+
whenToUse: 'Default org-level feature page and billing alignment reviews. Untitled on read; titled on the edit form, where it sits beside `overrides`.',
|
|
357
358
|
textSlots: {
|
|
358
359
|
title: { purpose: 'Label the overview area for the org’s effective entitlements.' },
|
|
359
|
-
description: { purpose: 'Clarify that values combine plan defaults, org policy, and manual operator overrides.' },
|
|
360
360
|
},
|
|
361
361
|
},
|
|
362
362
|
overrides: {
|
|
@@ -364,7 +364,7 @@ export const organizationFeaturesResourceSpecification = resourceSpecificationFr
|
|
|
364
364
|
whenToUse: 'Break-glass support, contract exceptions, and migration assists.',
|
|
365
365
|
textSlots: {
|
|
366
366
|
title: { purpose: 'Label the manual-override area for the organization.' },
|
|
367
|
-
description: { purpose: '
|
|
367
|
+
description: { purpose: 'On the edit form only: state that these persist across billing plan transitions until reset via policy or the RESET operation.' },
|
|
368
368
|
},
|
|
369
369
|
},
|
|
370
370
|
},
|
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;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAO3E,MAAM,0BAA0B,GAAG,8BAA8E,CAAC;AAClH,MAAM,2BAA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Ac,EAAE,sGAAsG;QACtH,cAAc,EAAE,8EAA8E;QAC9F,QAAQ,EAAE;YACR,QAAQ,EAAE;gBACR,OAAO,EAAE,oFAAoF;gBAC7F,SAAS,EAAE,+DAA+D;gBAC1E,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,+DAA+D,EAAE;oBACnF,WAAW,EAAE,EAAE,OAAO,EAAE,uFAAuF,EAAE;iBAClH;aACF;YACD,SAAS,EAAE;gBACT,OAAO,EAAE,+HAA+H;gBACxI,SAAS,EAAE,kEAAkE;gBAC7E,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,sDAAsD,EAAE;oBAC1E,WAAW,EAAE,EAAE,OAAO,EAAE,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';\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 'ENABLE_FEATURE, DISABLE_FEATURE and RESET_FEATURES record a committed RESOURCE_OPERATION_PERFORMED event with the persisted feature-ledger id, override change and supplied reason. Enable accepts an optional reason; disable and reset require one. Audit history survives later override changes and resets.',\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,2BAA2B,GAC/F,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;AAO3E,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,oBAAo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E,OAAO,EAAE,gIAAgI,EAAE;iBAC3J;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';\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. Each is shown as its word (`billing_features.<id>.label`), the identifier while the word is missing.',\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. Each key is shown as its word (`billing_limits.<id>.label`), and `-1` (`FEATURES_UNLIMITED`) as unlimited.',\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.' },\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).' },\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.' },\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.' },\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 'ENABLE_FEATURE, DISABLE_FEATURE and RESET_FEATURES record a committed RESOURCE_OPERATION_PERFORMED event with the persisted feature-ledger id, override change and supplied reason. Enable accepts an optional reason; disable and reset require one. Audit history survives later override changes and resets.',\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. Two groups: the effective `features` and `limits` in an untitled card (the page title already names it), then the `overrides` section, titled because it is what separates a grant the plan gave from one a person gave. An empty override list reads \"None yet\", which on this pane is the answer. No section shows a description on read.',\n summaryPurpose: 'Compact summary of org-level feature chips and high-signal limit highlights, as bare values.',\n editPurpose: 'Super-admin edit of the ledger, stacked. The `overrides` section keeps its description on the form: that a hand-made override outlives plan changes until reset is the consequence of saving, and no field name says it.',\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. Untitled on read; titled on the edit form, where it sits beside `overrides`.',\n textSlots: {\n title: { purpose: 'Label the overview area for the org’s effective entitlements.' },\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: 'On the edit form only: 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"]}
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { CoreResourceOperation as Op } from '@wildo-ai/saas-models';
|
|
11
11
|
export declare const userFeaturesResourceSpecification: import("../../../_core").ResourceSpecificationConfig<Record<string, never>, Op.READ | Op.UPDATE | Op.DELETE | Op.CREATE | Op.SEARCH, import("zod").ZodObject<{
|
|
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
|
-
limits: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString
|
|
12
|
+
features: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodArray<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodUnion<readonly [import("zod").ZodEnum<typeof import("@wildo-ai/saas-models").CoreFeature>, import("zod").ZodString]>>>>>>;
|
|
13
|
+
limits: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodRecord<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>, import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodNumber>>>>>;
|
|
14
14
|
manualOverrides: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodObject<{
|
|
15
|
-
addedFeatures: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString
|
|
16
|
-
removedFeatures: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString
|
|
17
|
-
limitOverrides: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString
|
|
15
|
+
addedFeatures: import("zod").ZodDefault<import("zod").ZodArray<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>;
|
|
16
|
+
removedFeatures: import("zod").ZodDefault<import("zod").ZodArray<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>;
|
|
17
|
+
limitOverrides: import("zod").ZodDefault<import("zod").ZodRecord<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>, import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodNumber>>>;
|
|
18
18
|
}, import("zod/v4/core").$strip>>>;
|
|
19
19
|
}, import("zod/v4/core").$strip>>;
|
|
20
20
|
//# sourceMappingURL=user-features.resource.specification.d.ts.map
|
|
@@ -69,7 +69,7 @@ export const userFeaturesResourceSpecification = resourceSpecificationFromFronte
|
|
|
69
69
|
},
|
|
70
70
|
fields: {
|
|
71
71
|
features: schemaShape.features.clone().arraySpec({
|
|
72
|
-
meaning: 'Boolean feature switches currently enabled for this user (union of `CoreFeature` and custom entitlement feature keys).',
|
|
72
|
+
meaning: 'Boolean feature switches currently enabled for this user (union of `CoreFeature` and custom entitlement feature keys). Each is shown as its word (`billing_features.<id>.label`), the identifier while the word is missing.',
|
|
73
73
|
whyItMatters: 'Feature gates across the product consult this set when evaluating user-level entitlements.',
|
|
74
74
|
elementMeaning: 'One feature key — an engine feature enum member, a connector capability, or a tenant-specific string key.',
|
|
75
75
|
elementType: {
|
|
@@ -86,7 +86,7 @@ export const userFeaturesResourceSpecification = resourceSpecificationFromFronte
|
|
|
86
86
|
},
|
|
87
87
|
}),
|
|
88
88
|
limits: schemaShape.limits.clone().objectSpec({
|
|
89
|
-
meaning: 'Numeric caps keyed by feature identifier — `FEATURES_UNLIMITED` convention marks no cap in consuming services.',
|
|
89
|
+
meaning: 'Numeric caps keyed by feature identifier — `FEATURES_UNLIMITED` convention marks no cap in consuming services. Each key is shown as its word (`billing_limits.<id>.label`), and `-1` (`FEATURES_UNLIMITED`) as unlimited.',
|
|
90
90
|
whyItMatters: 'Distinguishes “feature on” from “how much of it” (seats, API units, etc.).',
|
|
91
91
|
}),
|
|
92
92
|
manualOverrides: schemaShape.manualOverrides.clone().objectSpec({
|
|
@@ -139,7 +139,7 @@ export const userFeaturesResourceSpecification = resourceSpecificationFromFronte
|
|
|
139
139
|
{ code: HttpResponseStatusCode.OK_200, meaning: 'The user’s entitlements were overridden and the updated ledger is returned.' },
|
|
140
140
|
],
|
|
141
141
|
errorScenarios: [
|
|
142
|
-
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The entitlements payload fails `ScopeFeaturesWithOverridesSchema` validation.'
|
|
142
|
+
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The entitlements payload fails `ScopeFeaturesWithOverridesSchema` validation.' },
|
|
143
143
|
// UPDATE is an APP_ADMIN_SUPER_ADMIN API call (unlike the ORG_MEMBER reads), so a non-admin caller is forbidden (403).
|
|
144
144
|
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; overriding a user’s entitlements is high-trust.' },
|
|
145
145
|
],
|
|
@@ -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,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AC,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 // The variant admits cross-subject user administration (`admitsCrossSubjectUserAdministration`): the\n // super-admin addresses ANY user's ledger, not only their own. The USER_SELF scope would otherwise refuse\n // every row but the caller's (#1030).\n outcome: 'Manual grants or revocations apply immediately to authorization and feature gating for that user — any user the super-admin addresses, not only the caller.',\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"]}
|
|
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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AAE;gBAChB,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,2FAA2F,EAAE;aAC9I;YACD,6JAA6J;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';\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). Each is shown as its word (`billing_features.<id>.label`), the identifier while the word is missing.',\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. Each key is shown as its word (`billing_limits.<id>.label`), and `-1` (`FEATURES_UNLIMITED`) as unlimited.',\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 // The variant admits cross-subject user administration (`admitsCrossSubjectUserAdministration`): the\n // super-admin addresses ANY user's ledger, not only their own. The USER_SELF scope would otherwise refuse\n // every row but the caller's (#1030).\n outcome: 'Manual grants or revocations apply immediately to authorization and feature gating for that user — any user the super-admin addresses, not only the caller.',\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.' },\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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/files/resources/files.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAIL,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAE3B,UAAU,EAEV,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAI/B,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"files.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/files/resources/files.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAIL,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAE3B,UAAU,EAEV,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAI/B,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCA2XtC,CAAC"}
|