@wildo-ai/saas-specifications 1.1.5 → 1.1.7
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 +2 -2
- 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/auth/resources/organization-provider-credentials.resource.specification.js
CHANGED
|
@@ -29,6 +29,7 @@ const CREDENTIAL_RECORD_EXAMPLE = {
|
|
|
29
29
|
_id: CREDENTIAL_EXAMPLE_ID,
|
|
30
30
|
organizationId: CREDENTIAL_EXAMPLE_ORG_ID,
|
|
31
31
|
providerRef: 'slack',
|
|
32
|
+
connectionRef: 'slack',
|
|
32
33
|
secretSlug: 'accessToken',
|
|
33
34
|
secretValue: '••••••••',
|
|
34
35
|
enabled: true,
|
|
@@ -82,7 +83,7 @@ export const organizationProviderCredentialsResourceSpecification = resourceSpec
|
|
|
82
83
|
},
|
|
83
84
|
},
|
|
84
85
|
notes: [
|
|
85
|
-
'The stored value is SEALED, never the plaintext an administrator typed: an AES-256-GCM envelope whose key is derived from the application\'s own `secrets.security.session.encryptionKey` with a subsystem-specific domain separator. The seal is applied by the CREATE/UPDATE custom implementation, and its associated data binds the envelope to (organizationId,
|
|
86
|
+
'The stored value is SEALED, never the plaintext an administrator typed: an AES-256-GCM envelope whose key is derived from the application\'s own `secrets.security.session.encryptionKey` with a subsystem-specific domain separator. The seal is applied by the CREATE/UPDATE custom implementation, and its associated data binds the envelope to (organizationId, connectionRef, secretSlug), which is the key of the row (#1670) — so a ciphertext copied into another tenant\'s row fails to open rather than silently working.',
|
|
86
87
|
'Every write door is ORG_ADMIN, and there is deliberately NO super-administrator variant. An operator who could list, rotate or spend a tenant\'s credential could act as that tenant toward the vendor, and no later audit event makes that reversible. A tenant that has lost every administrator is repaired through `organizationMembers.grantOwnership` — restore an administrator, and the tenant repairs its own credentials.',
|
|
87
88
|
'Resolution order is the organization\'s own credential, then the deployment\'s env-projected SecretsContract, then a REFUSAL naming both places. A provider is never handed an empty credential.',
|
|
88
89
|
'A row appears in TWO ways, and only one of them is an HTTP write. A credential an administrator PASTES arrives through the organization\'s Connect screen, which offers only the providers this application declares and, for each, only the credential slots that provider declares, and stores it through the connection controller\'s declared-secret door. `CREATE` below performs the same write for an API caller; the application\'s own screens do not offer it, because a free-text slot is how a value lands where nothing will ever read it (#1040). A credential a vendor MINTS arrives through the authorization exchange, where the administrator authorizes on the vendor\'s consent screen and the application records the grant — nobody types the token. The second path is why this resource permits a system-tier create.',
|
|
@@ -103,7 +104,13 @@ export const organizationProviderCredentialsResourceSpecification = resourceSpec
|
|
|
103
104
|
}),
|
|
104
105
|
providerRef: schemaShape.providerRef.stringSpec({
|
|
105
106
|
meaning: 'The provider this credential authenticates toward — `slack`, `stripe`, a generated provider package\'s ref.',
|
|
106
|
-
whyItMatters: '
|
|
107
|
+
whyItMatters: 'What an audit reader uses to see which third parties an organization has granted the application authority toward, and which ref\'s connect flow or write CREATED the row. It is no longer part of the key (#1670): `connectionRef` is.',
|
|
108
|
+
semanticRole: 'identifier',
|
|
109
|
+
importance: FieldSemanticImportance.PRIMARY,
|
|
110
|
+
}),
|
|
111
|
+
connectionRef: schemaShape.connectionRef.stringSpec({
|
|
112
|
+
meaning: 'The connection this credential belongs to — the grant a set of provider refs of one vendor spends. Derived by the server from `providerRef`, never supplied by a client, and equal to it for every ref an application has not declared as part of a shared connection.',
|
|
113
|
+
whyItMatters: 'Half of the credential\'s identity within its tenant, and what the sealed value is bound to. Every ref of one connection resolves this one row, so a tenant authorizes a vendor once rather than once per ref. It cannot change: a row stored under one connection is replaced by reconnecting, never moved (#1670).',
|
|
107
114
|
semanticRole: 'identifier',
|
|
108
115
|
importance: FieldSemanticImportance.PRIMARY,
|
|
109
116
|
}),
|
|
@@ -168,6 +175,9 @@ export const organizationProviderCredentialsResourceSpecification = resourceSpec
|
|
|
168
175
|
whyItMatters: 'Distinct from `updatedAt`, which any field write moves. This is the one that answers "was this rotated after the incident?".',
|
|
169
176
|
temporalRole: 'modified',
|
|
170
177
|
}),
|
|
178
|
+
connectionFacts: schemaShape.connectionFacts.objectSpec({
|
|
179
|
+
meaning: 'Facts about the connected account, keyed by name: values entered when connecting, such as a tenant or region, and values the vendor reported, such as the account\'s API address. Calls to the provider are built from them. Not secret, and never written by a client.',
|
|
180
|
+
}),
|
|
171
181
|
description: schemaShape.description.stringSpec({
|
|
172
182
|
meaning: 'An operator note — which workspace, which account, which environment this credential belongs to.',
|
|
173
183
|
whyItMatters: 'A tenant may hold several credentials for one provider across slugs; the note is what tells them apart in a list.',
|
|
@@ -229,7 +239,7 @@ export const organizationProviderCredentialsResourceSpecification = resourceSpec
|
|
|
229
239
|
{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The credential was sealed and stored. The response masks the value; it is never readable again.' },
|
|
230
240
|
],
|
|
231
241
|
errorScenarios: [
|
|
232
|
-
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The payload fails validation, or `secretValue` is empty.'
|
|
242
|
+
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The payload fails validation, or `secretValue` is empty.' },
|
|
233
243
|
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: "`secretSlug` names no credential slot of the provider's current secrets contract — a retired or free-text name, or an unregistered provider. A value stored there could never be read, so it is refused (#624). Name the slot by its contract key (`accessToken`) or its environment-variable spelling; it is stored as the key.", errorCode: ProviderCredentialSlotWriteRefusal.SECRET_SLUG_NOT_DECLARED },
|
|
234
244
|
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: "`secretSlug` names the provider's own OAuth2 registration (a client id or secret), which is authored in the deployment environment and never read from a credential row.", errorCode: ProviderCredentialSlotWriteRefusal.SECRET_SLUG_NOT_A_CREDENTIAL },
|
|
235
245
|
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an administrator of the organization.' },
|
|
@@ -257,9 +267,9 @@ export const organizationProviderCredentialsResourceSpecification = resourceSpec
|
|
|
257
267
|
{ code: HttpResponseStatusCode.OK_200, meaning: 'The credential was updated. A payload carrying a new `secretValue` re-seals it and is recorded as a rotation; one echoing the mask leaves the stored secret untouched.' },
|
|
258
268
|
],
|
|
259
269
|
errorScenarios: [
|
|
260
|
-
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The payload fails validation.'
|
|
270
|
+
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The payload fails validation.' },
|
|
261
271
|
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: "A new `secretValue` is written into a credential stored under a slot the provider's current secrets contract no longer declares. That value could never be read; reconnect (or create the credential under the current slot) and delete this row. Edits that carry no new value are still accepted.", errorCode: ProviderCredentialSlotWriteRefusal.SECRET_SLUG_NOT_DECLARED },
|
|
262
|
-
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The payload names a different `providerRef` or `secretSlug`. A stored credential cannot move: its sealed value is bound to
|
|
272
|
+
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The payload names a different `providerRef`, `connectionRef` or `secretSlug`. A stored credential cannot move: its sealed value is bound to its connection and slot, and `providerRef` records which ref created it.', errorCode: ProviderCredentialSlotWriteRefusal.CREDENTIAL_SLOT_IMMUTABLE },
|
|
263
273
|
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an administrator of the organization.' },
|
|
264
274
|
{ code: HttpResponseStatusCode.NOT_FOUND_404, when: "No credential with that id is visible in the caller's organization scope." },
|
|
265
275
|
],
|
|
@@ -297,12 +307,24 @@ export const organizationProviderCredentialsResourceSpecification = resourceSpec
|
|
|
297
307
|
{ code: HttpResponseStatusCode.OK_200, meaning: 'The matching records were processed. INTERNAL_CALL — it registers no HTTP route.' },
|
|
298
308
|
],
|
|
299
309
|
errorScenarios: [
|
|
300
|
-
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The filter fails validation.'
|
|
310
|
+
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The filter fails validation.' },
|
|
301
311
|
],
|
|
302
312
|
},
|
|
303
313
|
},
|
|
314
|
+
frontend: {
|
|
315
|
+
layout: {
|
|
316
|
+
purpose: 'No sections: a stored credential is a handful of facts that no heading would group better than the rows do, so the templates are flat rows under a header and the preset declares no `layout.refs`.',
|
|
317
|
+
headerPurpose: 'The READ identity line: `providerRef · secretSlug` as the title and the `validationState` badge beside it. Neither the provider, the slot nor the state repeats in the body.',
|
|
318
|
+
displayPurpose: 'Settings rows: whether the credential is enabled, then its description, last validation error, validation, use and secret-set dates, who set it and any connection facts — each hidden while empty — and its creation date.',
|
|
319
|
+
summaryPurpose: 'A list card: the `providerRef · secretSlug` title, the `validationState` badge, and "Enabled" / "Disabled" as a word rather than a labelled checkmark.',
|
|
320
|
+
editPurpose: 'The form reached from a credential\'s Edit action: the new secret (focused), whether it is enabled, a description. `validationState` is not offered: it is the store\'s verdict on the last use, excluded from create and update (#1809), and shows as the header badge. Provider and slot are the credential\'s identity and are offered only on the API\'s CREATE, which these screens hide.',
|
|
321
|
+
},
|
|
322
|
+
emptyState: {
|
|
323
|
+
purpose: 'Say that nothing is connected yet and that connecting happens on the Connect tab beside this list — the list offers no Create of its own (#1040), so without this line the empty state is the page title again with no way forward.',
|
|
324
|
+
},
|
|
325
|
+
},
|
|
304
326
|
businessConstraints: [
|
|
305
|
-
'The uniqueness grain is `(organizationId,
|
|
327
|
+
'The uniqueness grain is `(organizationId, connectionRef, secretSlug)` — the CONNECTION, not the provider ref (#1670): several refs of one vendor may share one connection and must then spend one stored grant rather than one per ref. Every ref is its own connection until the application declares otherwise, so today `connectionRef` equals `providerRef` on every row. It is enforced by a compound unique index rather than a read-then-write. Two administrators saving a rotation in the same minute would otherwise leave two rows, and the resolver would pick between them arbitrarily — so half the tenant\'s outbound calls would carry the retired credential with nothing to say which half.',
|
|
306
328
|
'A credential is resolved BEFORE the deployment environment and never after it. A tenant that has set its own credential must never fall back to the shared deployment secret: an unopenable or tampered credential is REFUSED rather than substituted, because silently acting as the wrong third-party principal is the defect this resource exists to remove.',
|
|
307
329
|
'A disabled credential resolves as absent, not as an error — disabling parks an integration, it does not break it.',
|
|
308
330
|
'Credentials do not outlive their tenant: the ORGANIZATIONS composition cascade removes them when an organization is purged, through both the retention-window batch door and the super-administrator immediate-purge door. `request_deletion` only MARKS the tenant, so credentials survive the retention window deliberately — otherwise `restore` would return a tenant with no working integrations.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-provider-credentials.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/organization-provider-credentials.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,oCAAoC,EACpC,kCAAkC,EAClC,iCAAiC,EACjC,oBAAoB,EACpB,iEAAiE,GAClE,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,MAAM,qBAAqB,GAAG,wCAAwC,CAAC;AACvE,MAAM,yBAAyB,GAAG,gCAAgC,CAAC;AAEnE;;;;;;;GAOG;AACH,MAAM,yBAAyB,GAAG;IAChC,GAAG,EAAE,qBAAqB;IAC1B,cAAc,EAAE,yBAAyB;IACzC,WAAW,EAAE,OAAO;IACpB,UAAU,EAAE,aAAa;IACzB,WAAW,EAAE,UAAU;IACvB,OAAO,EAAE,IAAI;IACb,eAAe,EAAE,iCAAiC,CAAC,KAAK;IACxD,eAAe,EAAE,0BAA0B;IAC3C,UAAU,EAAE,0BAA0B;IACtC,WAAW,EAAE,0BAA0B;IACvC,WAAW,EAAE,iCAAiC;IAC9C,WAAW,EAAE,8CAA8C;IAC3D,SAAS,EA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AC,EAAE;YACX,OAAO,EAAE,uDAAuD;YAChE,OAAO,EACL,+PAA+P;YACjQ,SAAS,EAAE,oHAAoH;YAC/H,UAAU,EAAE,uBAAuB,CAAC,OAAO;YAC3C,gBAAgB,EAAE;gBAChB,EAAE,IAAI,EAAE,sBAAsB,CAAC,cAAc,EAAE,OAAO,EAAE,sCAAsC,EAAE;aACjG;YACD,cAAc,EAAE;gBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,yDAAyD,EAAE;gBAC/G,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,0GAA0G,EAAE;aACjK;YACD,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,CAAC;oBACT,KAAK,EAAE,gCAAgC;oBACvC,OAAO,EAAE,EAAE,uBAAuB,EAAE,qBAAqB,EAAE;oBAC3D,SAAS,EAAE,sBAAsB,CAAC,cAAc;iBACjD,CAAC;SACH;QACD,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE;YAChB,OAAO,EAAE,gCAAgC;YACzC,OAAO,EACL,0TAA0T;YAC5T,gBAAgB,EAAE;gBAChB,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,kFAAkF,EAAE;aACrI;YACD,cAAc,EAAE;gBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,eAAe,EAAE,IAAI,EAAE,8BAA8B,EAAE,SAAS,EAAE,mBAAmB,EAAE;aACvH;SACF;KACF;IAED,mBAAmB,EAAE;QACnB,gYAAgY;QAChY,iWAAiW;QACjW,mHAAmH;QACnH,yYAAyY;QACzY,+PAA+P;KAChQ;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,aAAa,EAAE,CAC7D,CAAC","sourcesContent":["/**\n * Resource: `organizationProviderCredentials` — Wildo SaaS engine specification\n * (organization-scoped, backend-managed secret).\n *\n * Inputs:\n * - Schema: engine/saas-models/src/security/connected-accounts/provider-credentials.shared.schemas.ts\n * → `OrganizationProviderCredentialSchema`\n * - Factory: engine/saas-models/src/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.ts\n * → `orgProviderCredentialsResourceConfiguration_InitializationFactory`\n * - Custom operations: none\n * - UI presets: none yet — the admin surface is a later slice (#332). The API is complete without it.\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n OrganizationProviderCredentialSchema,\n ProviderCredentialSlotWriteRefusal,\n ProviderCredentialValidationState,\n ResourcePrimaryScope,\n orgProviderCredentialsResourceConfiguration_InitializationFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nconst CREDENTIAL_EXAMPLE_ID = 'orgprovcred_01J7K2M4N6P8Q0R2S4T6V8W0XY';\nconst CREDENTIAL_EXAMPLE_ORG_ID = 'org_01J4M1Z2X3C4V5B6N7M8Q9R0ST';\n\n/**\n * The record as a client sees it — with the value MASKED.\n *\n * That mask is not decoration in an example: `secretValue` is `.isWriteOnlySecret()`, so the\n * framework redacts it at the client boundary on every read. Showing a plausible token here would\n * teach an integrator that a credential can be read back, which is the one thing this resource\n * guarantees it cannot.\n */\nconst CREDENTIAL_RECORD_EXAMPLE = {\n _id: CREDENTIAL_EXAMPLE_ID,\n organizationId: CREDENTIAL_EXAMPLE_ORG_ID,\n providerRef: 'slack',\n secretSlug: 'accessToken',\n secretValue: '••••••••',\n enabled: true,\n validationState: ProviderCredentialValidationState.VALID,\n lastValidatedAt: '2026-09-02T11:14:00.000Z',\n lastUsedAt: '2026-09-02T11:14:00.000Z',\n secretSetAt: '2026-08-30T09:00:00.000Z',\n setByUserId: 'user_01J4M1Z2X3C4V5B6N7M8Q9R0ST',\n description: 'Bot token for the #orders workspace channel.',\n createdAt: '2026-08-30T09:00:00.000Z',\n updatedAt: '2026-09-02T11:14:00.000Z',\n} as const;\n\nconst CREDENTIAL_PAGE_EXAMPLE = {\n data: [CREDENTIAL_RECORD_EXAMPLE],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n} as const;\n\nexport const organizationProviderCredentialsResourceSpecification = resourceSpecification(\n orgProviderCredentialsResourceConfiguration_InitializationFactory,\n OrganizationProviderCredentialSchema,\n ({ schemaShape }) => ({\n purpose:\n \"One organization's OWN credential toward a third-party provider — its Slack workspace token, its CRM API key, its SMTP password.\",\n businessRole:\n 'The record that lets one application serve many organizations while each acts as ITSELF toward a third party. Without it every tenant shares the deployment\\'s single environment secret and therefore acts as the same third-party principal.',\n lifecycleRole:\n 'Created by an organization administrator when the tenant connects a provider, rotated in place when the vendor credential changes, disabled to park an integration during an incident, and removed when the tenant disconnects the provider or the organization itself is purged.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.AUTH,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrganizationProviderCredentialSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'orgProviderCredentialsResourceConfiguration_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: 'ORG_PROVIDER_CREDENTIALS',\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 notes: [\n 'The stored value is SEALED, never the plaintext an administrator typed: an AES-256-GCM envelope whose key is derived from the application\\'s own `secrets.security.session.encryptionKey` with a subsystem-specific domain separator. The seal is applied by the CREATE/UPDATE custom implementation, and its associated data binds the envelope to (organizationId, providerRef, secretSlug) — so a ciphertext copied into another tenant\\'s row fails to open rather than silently working.',\n 'Every write door is ORG_ADMIN, and there is deliberately NO super-administrator variant. An operator who could list, rotate or spend a tenant\\'s credential could act as that tenant toward the vendor, and no later audit event makes that reversible. A tenant that has lost every administrator is repaired through `organizationMembers.grantOwnership` — restore an administrator, and the tenant repairs its own credentials.',\n 'Resolution order is the organization\\'s own credential, then the deployment\\'s env-projected SecretsContract, then a REFUSAL naming both places. A provider is never handed an empty credential.',\n 'A row appears in TWO ways, and only one of them is an HTTP write. A credential an administrator PASTES arrives through the organization\\'s Connect screen, which offers only the providers this application declares and, for each, only the credential slots that provider declares, and stores it through the connection controller\\'s declared-secret door. `CREATE` below performs the same write for an API caller; the application\\'s own screens do not offer it, because a free-text slot is how a value lands where nothing will ever read it (#1040). A credential a vendor MINTS arrives through the authorization exchange, where the administrator authorizes on the vendor\\'s consent screen and the application records the grant — nobody types the token. The second path is why this resource permits a system-tier create.',\n 'Set, rotate, use and delete are audited as `ORGANIZATION_PROVIDER_CREDENTIAL_*`, annotated `WILDO.IDENTITY.DELEGATED_AUTHORIZATION`. None of the four payload schemas has a field the value could occupy.',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Identifier for one stored credential.',\n whyItMatters: 'The address for a rotation or a revocation, and the id every audit event carries.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n organizationId: schemaShape.organizationId.foreignKeySpec({\n meaning: 'The tenant that owns this credential.',\n whyItMatters:\n 'The isolation axis. It is injected by the framework from the request scope rather than read from the payload, it scopes every read, and it is bound into the encryption envelope — so a credential cannot be read, spent or moved outside the organization that set it.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n providerRef: schemaShape.providerRef.stringSpec({\n meaning: 'The provider this credential authenticates toward — `slack`, `stripe`, a generated provider package\\'s ref.',\n whyItMatters: 'Half of the credential\\'s identity within its tenant, and what an audit reader uses to see which third parties an organization has granted the application authority toward.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n secretSlug: schemaShape.secretSlug.stringSpec({\n meaning: \"The provider's `secretsContract` KEY this value satisfies (`accessToken`) — not the slot's environment-variable spelling, which the deployment's environment projection names and a provider regeneration may rename.\",\n whyItMatters:\n 'Keyed on the stable name so a regenerated provider cannot orphan the row. A provider declaring several secrets (an API key and a signing secret) gets one row per key. A row stored under a name the provider no longer declares cannot be renamed — the sealed value binds it — so it is replaced by reconnecting.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n secretValue: schemaShape.secretValue.stringSpec({\n meaning: 'The credential itself. Supplied in plaintext on write, stored SEALED, and never returned — a read renders a fixed mask.',\n whyItMatters:\n 'Echoing the mask back on an update means \"keep the stored secret\", which is how an administrator edits a description without retyping the credential. Sending a real value replaces it and is recorded as a rotation.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n enabled: schemaShape.enabled.booleanSpec({\n meaning: 'Whether this credential may be spent.',\n whyItMatters:\n 'Disabling parks an integration without destroying the credential — the reversible move during an incident. A disabled credential resolves as ABSENT, so the application falls back to the deployment environment exactly as it would for a tenant that never set one.',\n }),\n validationState: schemaShape.validationState.enumSpec({\n meaning: 'Whether the provider has accepted this credential on its last use.',\n whyItMatters:\n 'Separates \"never tried\" from \"tried and rejected\", which a boolean would merge into the same falsy answer. `INVALID` is the operator\\'s signal to rotate.',\n values: {\n [ProviderCredentialValidationState.UNVALIDATED]: {\n meaning: 'Stored, never exercised against the provider. Every credential starts here — storing one proves only that somebody typed it.',\n },\n [ProviderCredentialValidationState.VALID]: {\n meaning: 'The provider accepted it on its last use.',\n },\n [ProviderCredentialValidationState.INVALID]: {\n meaning: 'The provider rejected it on its last use; the integration is down until it is rotated.',\n },\n },\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ProviderCredentialValidationState',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n }),\n validationError: schemaShape.validationError.stringSpec({\n meaning: \"The provider's own message about why the last use failed.\",\n whyItMatters:\n 'Turns \"the integration stopped working\" into a vendor-attributed reason. Server-owned: it describes the credential\\'s status and is never derived from the credential.',\n }),\n lastValidatedAt: schemaShape.lastValidatedAt.dateSpec({\n meaning: 'When the provider last accepted or rejected this credential.',\n whyItMatters: 'How current the validation state is — a `VALID` from three months ago says less than one from this morning.',\n temporalRole: 'modified',\n }),\n lastUsedAt: schemaShape.lastUsedAt.dateSpec({\n meaning: 'When this credential was last resolved for an outbound call.',\n whyItMatters: 'Identifies credentials nothing spends any more — the ones safest to revoke and riskiest to leave live.',\n temporalRole: 'modified',\n }),\n setByUserId: schemaShape.setByUserId.stringSpec({\n meaning: 'The administrator who last supplied the value.',\n whyItMatters:\n 'The first question of any credential incident. Deliberately NOT a registered USERS relationship: that edge would place a live credential on the subject-export graph, and would let a departing administrator\\'s erasure destroy the tenant\\'s integration.',\n semanticRole: 'identifier',\n }),\n secretSetAt: schemaShape.secretSetAt.dateSpec({\n meaning: 'When the stored VALUE last changed.',\n whyItMatters: 'Distinct from `updatedAt`, which any field write moves. This is the one that answers \"was this rotated after the incident?\".',\n temporalRole: 'modified',\n }),\n description: schemaShape.description.stringSpec({\n meaning: 'An operator note — which workspace, which account, which environment this credential belongs to.',\n whyItMatters: 'A tenant may hold several credentials for one provider across slugs; the note is what tells them apart in a list.',\n }),\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the credential was first stored.',\n whyItMatters: 'When this tenant first granted the application authority toward this provider.',\n temporalRole: 'creation',\n }),\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When any field last changed.',\n whyItMatters: 'Ordering for the credential list.',\n temporalRole: 'modified',\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: \"Inspect one of the organization's stored provider credentials.\",\n outcome: 'The administrator sees which provider and slug the credential covers, whether it is enabled, and whether the provider last accepted it — with the value masked.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The credential was found in the caller\\'s organization scope and returned with `secretValue` masked.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an administrator of the organization.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: \"No credential with that id is visible in the caller's organization scope. A credential belonging to a DIFFERENT organization is indistinguishable from one that does not exist — the tenant boundary never confirms the existence of another tenant's row.\" },\n ],\n idempotent: true,\n examples: [{\n title: 'Inspect the Slack bot-token credential',\n request: { orgProviderCredentialId: CREDENTIAL_EXAMPLE_ID },\n response: CREDENTIAL_RECORD_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.LIST]: {\n purpose: \"List the organization's provider credentials — which third parties this tenant has connected.\",\n outcome: 'The administrator sees every provider the organization has credentials for and the health of each.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: \"A (possibly empty) page of the caller's own organization's credentials, values masked.\" },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an administrator of the organization.' },\n ],\n idempotent: true,\n examples: [{\n title: 'List the connected providers',\n request: { page: 1, limit: 20, sort: 'createdAt:desc' },\n response: CREDENTIAL_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.CREATE]: {\n purpose: 'Store the organization\\'s own credential for a provider, so the application acts as THIS tenant toward that third party.',\n outcome: \"Every subsequent outbound call this application makes to that provider on the organization's behalf uses the organization's own credential instead of the deployment's shared one.\",\n whenToUse: 'When a tenant connects a provider with a credential they obtained themselves — a Slack app installed in their workspace, an API key minted in their CRM account.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The credential was sealed and stored. The response masks the value; it is never readable again.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The payload fails validation, or `secretValue` is empty.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: \"`secretSlug` names no credential slot of the provider's current secrets contract — a retired or free-text name, or an unregistered provider. A value stored there could never be read, so it is refused (#624). Name the slot by its contract key (`accessToken`) or its environment-variable spelling; it is stored as the key.\", errorCode: ProviderCredentialSlotWriteRefusal.SECRET_SLUG_NOT_DECLARED },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: \"`secretSlug` names the provider's own OAuth2 registration (a client id or secret), which is authored in the deployment environment and never read from a credential row.\", errorCode: ProviderCredentialSlotWriteRefusal.SECRET_SLUG_NOT_A_CREDENTIAL },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an administrator of the organization.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The organization already holds a credential for this provider and slug — rotate that one instead of creating a second.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Connect the tenant\\'s own Slack workspace',\n request: {\n providerRef: 'slack',\n secretSlug: 'accessToken',\n secretValue: 'xoxb-the-tenants-own-bot-token',\n description: 'Bot token for the #orders workspace channel.',\n },\n response: CREDENTIAL_RECORD_EXAMPLE,\n forStatus: HttpResponseStatusCode.CREATED_201,\n }],\n },\n [Op.UPDATE]: {\n purpose: 'Rotate the stored credential, or edit its description and enabled flag.',\n outcome: 'A new value replaces the old one immediately — there is no overlap window, because the vendor is the authority on which credential is live and only one of them is.',\n whenToUse: 'After rotating the credential at the vendor, or to park an integration by clearing `enabled`.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The credential was updated. A payload carrying a new `secretValue` re-seals it and is recorded as a rotation; one echoing the mask leaves the stored secret untouched.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The payload fails validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: \"A new `secretValue` is written into a credential stored under a slot the provider's current secrets contract no longer declares. That value could never be read; reconnect (or create the credential under the current slot) and delete this row. Edits that carry no new value are still accepted.\", errorCode: ProviderCredentialSlotWriteRefusal.SECRET_SLUG_NOT_DECLARED },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The payload names a different `providerRef` or `secretSlug`. A stored credential cannot move: its sealed value is bound to both.', errorCode: ProviderCredentialSlotWriteRefusal.CREDENTIAL_SLOT_IMMUTABLE },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an administrator of the organization.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: \"No credential with that id is visible in the caller's organization scope.\" },\n ],\n idempotent: true,\n examples: [{\n title: 'Rotate the bot token after a vendor-side reissue',\n request: { orgProviderCredentialId: CREDENTIAL_EXAMPLE_ID, secretValue: 'xoxb-the-newly-issued-bot-token' },\n response: CREDENTIAL_RECORD_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.DELETE]: {\n purpose: 'Revoke the organization\\'s credential for a provider.',\n outcome:\n \"The application stops acting as this tenant toward that provider. Whether the integration keeps working depends on the deployment: if the operator has set the environment secret, calls fall back to the shared principal; if not, they are refused by name.\",\n whenToUse: 'When the tenant disconnects the provider, or when a credential is believed compromised and rotation is not enough.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The credential was removed. No body.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an administrator of the organization.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: \"No credential with that id is visible in the caller's organization scope, including one already removed.\" },\n ],\n idempotent: true,\n examples: [{\n title: 'Disconnect the Slack workspace',\n request: { orgProviderCredentialId: CREDENTIAL_EXAMPLE_ID },\n forStatus: HttpResponseStatusCode.NO_CONTENT_204,\n }],\n },\n [Op.UPDATE_MANY]: {\n purpose: 'Route-less retention plumbing.',\n outcome:\n 'Nothing is scrubbed in practice: this resource declares `RETAIN_ONLY`, a positive assertion that it holds no personal data of its own. The operation exists because the retention contract requires READ + LIST + UPDATE_MANY to resolve, and a declared-but-unresolvable operation fails when an erasure actually runs.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The matching records were processed. INTERNAL_CALL — it registers no HTTP route.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The filter fails validation.', errorCode: 'VALIDATION_FAILED' },\n ],\n },\n },\n\n businessConstraints: [\n 'The uniqueness grain is `(organizationId, providerRef, secretSlug)`, enforced by a compound unique index rather than a read-then-write. Two administrators saving a rotation in the same minute would otherwise leave two rows, and the resolver would pick between them arbitrarily — so half the tenant\\'s outbound calls would carry the retired credential with nothing to say which half.',\n 'A credential is resolved BEFORE the deployment environment and never after it. A tenant that has set its own credential must never fall back to the shared deployment secret: an unopenable or tampered credential is REFUSED rather than substituted, because silently acting as the wrong third-party principal is the defect this resource exists to remove.',\n 'A disabled credential resolves as absent, not as an error — disabling parks an integration, it does not break it.',\n 'Credentials do not outlive their tenant: the ORGANIZATIONS composition cascade removes them when an organization is purged, through both the retention-window batch door and the super-administrator immediate-purge door. `request_deletion` only MARKS the tenant, so credentials survive the retention window deliberately — otherwise `restore` would return a tenant with no working integrations.',\n 'A subject erasure never reaches this resource. `setByUserId` names an ACTOR rather than a data subject, and no USERS relationship is registered for it — which also keeps a live credential off the subject-export graph, where `exportSubject` is FORBIDDEN.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n);\n"]}
|
|
1
|
+
{"version":3,"file":"organization-provider-credentials.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/organization-provider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AC7D,CAAC","sourcesContent":["/**\n * Resource: `organizationProviderCredentials` — Wildo SaaS engine specification\n * (organization-scoped, backend-managed secret).\n *\n * Inputs:\n * - Schema: engine/saas-models/src/security/connected-accounts/provider-credentials.shared.schemas.ts\n * → `OrganizationProviderCredentialSchema`\n * - Factory: engine/saas-models/src/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.ts\n * → `orgProviderCredentialsResourceConfiguration_InitializationFactory`\n * - Custom operations: none\n * - UI presets: none yet — the admin surface is a later slice (#332). The API is complete without it.\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n OrganizationProviderCredentialSchema,\n ProviderCredentialSlotWriteRefusal,\n ProviderCredentialValidationState,\n ResourcePrimaryScope,\n orgProviderCredentialsResourceConfiguration_InitializationFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nconst CREDENTIAL_EXAMPLE_ID = 'orgprovcred_01J7K2M4N6P8Q0R2S4T6V8W0XY';\nconst CREDENTIAL_EXAMPLE_ORG_ID = 'org_01J4M1Z2X3C4V5B6N7M8Q9R0ST';\n\n/**\n * The record as a client sees it — with the value MASKED.\n *\n * That mask is not decoration in an example: `secretValue` is `.isWriteOnlySecret()`, so the\n * framework redacts it at the client boundary on every read. Showing a plausible token here would\n * teach an integrator that a credential can be read back, which is the one thing this resource\n * guarantees it cannot.\n */\nconst CREDENTIAL_RECORD_EXAMPLE = {\n _id: CREDENTIAL_EXAMPLE_ID,\n organizationId: CREDENTIAL_EXAMPLE_ORG_ID,\n providerRef: 'slack',\n connectionRef: 'slack',\n secretSlug: 'accessToken',\n secretValue: '••••••••',\n enabled: true,\n validationState: ProviderCredentialValidationState.VALID,\n lastValidatedAt: '2026-09-02T11:14:00.000Z',\n lastUsedAt: '2026-09-02T11:14:00.000Z',\n secretSetAt: '2026-08-30T09:00:00.000Z',\n setByUserId: 'user_01J4M1Z2X3C4V5B6N7M8Q9R0ST',\n description: 'Bot token for the #orders workspace channel.',\n createdAt: '2026-08-30T09:00:00.000Z',\n updatedAt: '2026-09-02T11:14:00.000Z',\n} as const;\n\nconst CREDENTIAL_PAGE_EXAMPLE = {\n data: [CREDENTIAL_RECORD_EXAMPLE],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n} as const;\n\nexport const organizationProviderCredentialsResourceSpecification = resourceSpecification(\n orgProviderCredentialsResourceConfiguration_InitializationFactory,\n OrganizationProviderCredentialSchema,\n ({ schemaShape }) => ({\n purpose:\n \"One organization's OWN credential toward a third-party provider — its Slack workspace token, its CRM API key, its SMTP password.\",\n businessRole:\n 'The record that lets one application serve many organizations while each acts as ITSELF toward a third party. Without it every tenant shares the deployment\\'s single environment secret and therefore acts as the same third-party principal.',\n lifecycleRole:\n 'Created by an organization administrator when the tenant connects a provider, rotated in place when the vendor credential changes, disabled to park an integration during an incident, and removed when the tenant disconnects the provider or the organization itself is purged.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.AUTH,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrganizationProviderCredentialSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'orgProviderCredentialsResourceConfiguration_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: 'ORG_PROVIDER_CREDENTIALS',\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 notes: [\n 'The stored value is SEALED, never the plaintext an administrator typed: an AES-256-GCM envelope whose key is derived from the application\\'s own `secrets.security.session.encryptionKey` with a subsystem-specific domain separator. The seal is applied by the CREATE/UPDATE custom implementation, and its associated data binds the envelope to (organizationId, connectionRef, secretSlug), which is the key of the row (#1670) — so a ciphertext copied into another tenant\\'s row fails to open rather than silently working.',\n 'Every write door is ORG_ADMIN, and there is deliberately NO super-administrator variant. An operator who could list, rotate or spend a tenant\\'s credential could act as that tenant toward the vendor, and no later audit event makes that reversible. A tenant that has lost every administrator is repaired through `organizationMembers.grantOwnership` — restore an administrator, and the tenant repairs its own credentials.',\n 'Resolution order is the organization\\'s own credential, then the deployment\\'s env-projected SecretsContract, then a REFUSAL naming both places. A provider is never handed an empty credential.',\n 'A row appears in TWO ways, and only one of them is an HTTP write. A credential an administrator PASTES arrives through the organization\\'s Connect screen, which offers only the providers this application declares and, for each, only the credential slots that provider declares, and stores it through the connection controller\\'s declared-secret door. `CREATE` below performs the same write for an API caller; the application\\'s own screens do not offer it, because a free-text slot is how a value lands where nothing will ever read it (#1040). A credential a vendor MINTS arrives through the authorization exchange, where the administrator authorizes on the vendor\\'s consent screen and the application records the grant — nobody types the token. The second path is why this resource permits a system-tier create.',\n 'Set, rotate, use and delete are audited as `ORGANIZATION_PROVIDER_CREDENTIAL_*`, annotated `WILDO.IDENTITY.DELEGATED_AUTHORIZATION`. None of the four payload schemas has a field the value could occupy.',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Identifier for one stored credential.',\n whyItMatters: 'The address for a rotation or a revocation, and the id every audit event carries.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n organizationId: schemaShape.organizationId.foreignKeySpec({\n meaning: 'The tenant that owns this credential.',\n whyItMatters:\n 'The isolation axis. It is injected by the framework from the request scope rather than read from the payload, it scopes every read, and it is bound into the encryption envelope — so a credential cannot be read, spent or moved outside the organization that set it.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n providerRef: schemaShape.providerRef.stringSpec({\n meaning: 'The provider this credential authenticates toward — `slack`, `stripe`, a generated provider package\\'s ref.',\n whyItMatters: 'What an audit reader uses to see which third parties an organization has granted the application authority toward, and which ref\\'s connect flow or write CREATED the row. It is no longer part of the key (#1670): `connectionRef` is.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n connectionRef: schemaShape.connectionRef.stringSpec({\n meaning: 'The connection this credential belongs to — the grant a set of provider refs of one vendor spends. Derived by the server from `providerRef`, never supplied by a client, and equal to it for every ref an application has not declared as part of a shared connection.',\n whyItMatters:\n 'Half of the credential\\'s identity within its tenant, and what the sealed value is bound to. Every ref of one connection resolves this one row, so a tenant authorizes a vendor once rather than once per ref. It cannot change: a row stored under one connection is replaced by reconnecting, never moved (#1670).',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n secretSlug: schemaShape.secretSlug.stringSpec({\n meaning: \"The provider's `secretsContract` KEY this value satisfies (`accessToken`) — not the slot's environment-variable spelling, which the deployment's environment projection names and a provider regeneration may rename.\",\n whyItMatters:\n 'Keyed on the stable name so a regenerated provider cannot orphan the row. A provider declaring several secrets (an API key and a signing secret) gets one row per key. A row stored under a name the provider no longer declares cannot be renamed — the sealed value binds it — so it is replaced by reconnecting.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n secretValue: schemaShape.secretValue.stringSpec({\n meaning: 'The credential itself. Supplied in plaintext on write, stored SEALED, and never returned — a read renders a fixed mask.',\n whyItMatters:\n 'Echoing the mask back on an update means \"keep the stored secret\", which is how an administrator edits a description without retyping the credential. Sending a real value replaces it and is recorded as a rotation.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n enabled: schemaShape.enabled.booleanSpec({\n meaning: 'Whether this credential may be spent.',\n whyItMatters:\n 'Disabling parks an integration without destroying the credential — the reversible move during an incident. A disabled credential resolves as ABSENT, so the application falls back to the deployment environment exactly as it would for a tenant that never set one.',\n }),\n validationState: schemaShape.validationState.enumSpec({\n meaning: 'Whether the provider has accepted this credential on its last use.',\n whyItMatters:\n 'Separates \"never tried\" from \"tried and rejected\", which a boolean would merge into the same falsy answer. `INVALID` is the operator\\'s signal to rotate.',\n values: {\n [ProviderCredentialValidationState.UNVALIDATED]: {\n meaning: 'Stored, never exercised against the provider. Every credential starts here — storing one proves only that somebody typed it.',\n },\n [ProviderCredentialValidationState.VALID]: {\n meaning: 'The provider accepted it on its last use.',\n },\n [ProviderCredentialValidationState.INVALID]: {\n meaning: 'The provider rejected it on its last use; the integration is down until it is rotated.',\n },\n },\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ProviderCredentialValidationState',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n }),\n validationError: schemaShape.validationError.stringSpec({\n meaning: \"The provider's own message about why the last use failed.\",\n whyItMatters:\n 'Turns \"the integration stopped working\" into a vendor-attributed reason. Server-owned: it describes the credential\\'s status and is never derived from the credential.',\n }),\n lastValidatedAt: schemaShape.lastValidatedAt.dateSpec({\n meaning: 'When the provider last accepted or rejected this credential.',\n whyItMatters: 'How current the validation state is — a `VALID` from three months ago says less than one from this morning.',\n temporalRole: 'modified',\n }),\n lastUsedAt: schemaShape.lastUsedAt.dateSpec({\n meaning: 'When this credential was last resolved for an outbound call.',\n whyItMatters: 'Identifies credentials nothing spends any more — the ones safest to revoke and riskiest to leave live.',\n temporalRole: 'modified',\n }),\n setByUserId: schemaShape.setByUserId.stringSpec({\n meaning: 'The administrator who last supplied the value.',\n whyItMatters:\n 'The first question of any credential incident. Deliberately NOT a registered USERS relationship: that edge would place a live credential on the subject-export graph, and would let a departing administrator\\'s erasure destroy the tenant\\'s integration.',\n semanticRole: 'identifier',\n }),\n secretSetAt: schemaShape.secretSetAt.dateSpec({\n meaning: 'When the stored VALUE last changed.',\n whyItMatters: 'Distinct from `updatedAt`, which any field write moves. This is the one that answers \"was this rotated after the incident?\".',\n temporalRole: 'modified',\n }),\n connectionFacts: schemaShape.connectionFacts.objectSpec({\n meaning: 'Facts about the connected account, keyed by name: values entered when connecting, such as a tenant or region, and values the vendor reported, such as the account\\'s API address. Calls to the provider are built from them. Not secret, and never written by a client.',\n }),\n description: schemaShape.description.stringSpec({\n meaning: 'An operator note — which workspace, which account, which environment this credential belongs to.',\n whyItMatters: 'A tenant may hold several credentials for one provider across slugs; the note is what tells them apart in a list.',\n }),\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the credential was first stored.',\n whyItMatters: 'When this tenant first granted the application authority toward this provider.',\n temporalRole: 'creation',\n }),\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When any field last changed.',\n whyItMatters: 'Ordering for the credential list.',\n temporalRole: 'modified',\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: \"Inspect one of the organization's stored provider credentials.\",\n outcome: 'The administrator sees which provider and slug the credential covers, whether it is enabled, and whether the provider last accepted it — with the value masked.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The credential was found in the caller\\'s organization scope and returned with `secretValue` masked.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an administrator of the organization.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: \"No credential with that id is visible in the caller's organization scope. A credential belonging to a DIFFERENT organization is indistinguishable from one that does not exist — the tenant boundary never confirms the existence of another tenant's row.\" },\n ],\n idempotent: true,\n examples: [{\n title: 'Inspect the Slack bot-token credential',\n request: { orgProviderCredentialId: CREDENTIAL_EXAMPLE_ID },\n response: CREDENTIAL_RECORD_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.LIST]: {\n purpose: \"List the organization's provider credentials — which third parties this tenant has connected.\",\n outcome: 'The administrator sees every provider the organization has credentials for and the health of each.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: \"A (possibly empty) page of the caller's own organization's credentials, values masked.\" },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an administrator of the organization.' },\n ],\n idempotent: true,\n examples: [{\n title: 'List the connected providers',\n request: { page: 1, limit: 20, sort: 'createdAt:desc' },\n response: CREDENTIAL_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.CREATE]: {\n purpose: 'Store the organization\\'s own credential for a provider, so the application acts as THIS tenant toward that third party.',\n outcome: \"Every subsequent outbound call this application makes to that provider on the organization's behalf uses the organization's own credential instead of the deployment's shared one.\",\n whenToUse: 'When a tenant connects a provider with a credential they obtained themselves — a Slack app installed in their workspace, an API key minted in their CRM account.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The credential was sealed and stored. The response masks the value; it is never readable again.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The payload fails validation, or `secretValue` is empty.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: \"`secretSlug` names no credential slot of the provider's current secrets contract — a retired or free-text name, or an unregistered provider. A value stored there could never be read, so it is refused (#624). Name the slot by its contract key (`accessToken`) or its environment-variable spelling; it is stored as the key.\", errorCode: ProviderCredentialSlotWriteRefusal.SECRET_SLUG_NOT_DECLARED },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: \"`secretSlug` names the provider's own OAuth2 registration (a client id or secret), which is authored in the deployment environment and never read from a credential row.\", errorCode: ProviderCredentialSlotWriteRefusal.SECRET_SLUG_NOT_A_CREDENTIAL },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an administrator of the organization.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The organization already holds a credential for this provider and slug — rotate that one instead of creating a second.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Connect the tenant\\'s own Slack workspace',\n request: {\n providerRef: 'slack',\n secretSlug: 'accessToken',\n secretValue: 'xoxb-the-tenants-own-bot-token',\n description: 'Bot token for the #orders workspace channel.',\n },\n response: CREDENTIAL_RECORD_EXAMPLE,\n forStatus: HttpResponseStatusCode.CREATED_201,\n }],\n },\n [Op.UPDATE]: {\n purpose: 'Rotate the stored credential, or edit its description and enabled flag.',\n outcome: 'A new value replaces the old one immediately — there is no overlap window, because the vendor is the authority on which credential is live and only one of them is.',\n whenToUse: 'After rotating the credential at the vendor, or to park an integration by clearing `enabled`.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The credential was updated. A payload carrying a new `secretValue` re-seals it and is recorded as a rotation; one echoing the mask leaves the stored secret untouched.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The payload fails validation.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: \"A new `secretValue` is written into a credential stored under a slot the provider's current secrets contract no longer declares. That value could never be read; reconnect (or create the credential under the current slot) and delete this row. Edits that carry no new value are still accepted.\", errorCode: ProviderCredentialSlotWriteRefusal.SECRET_SLUG_NOT_DECLARED },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The payload names a different `providerRef`, `connectionRef` or `secretSlug`. A stored credential cannot move: its sealed value is bound to its connection and slot, and `providerRef` records which ref created it.', errorCode: ProviderCredentialSlotWriteRefusal.CREDENTIAL_SLOT_IMMUTABLE },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an administrator of the organization.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: \"No credential with that id is visible in the caller's organization scope.\" },\n ],\n idempotent: true,\n examples: [{\n title: 'Rotate the bot token after a vendor-side reissue',\n request: { orgProviderCredentialId: CREDENTIAL_EXAMPLE_ID, secretValue: 'xoxb-the-newly-issued-bot-token' },\n response: CREDENTIAL_RECORD_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.DELETE]: {\n purpose: 'Revoke the organization\\'s credential for a provider.',\n outcome:\n \"The application stops acting as this tenant toward that provider. Whether the integration keeps working depends on the deployment: if the operator has set the environment secret, calls fall back to the shared principal; if not, they are refused by name.\",\n whenToUse: 'When the tenant disconnects the provider, or when a credential is believed compromised and rotation is not enough.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The credential was removed. No body.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an administrator of the organization.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: \"No credential with that id is visible in the caller's organization scope, including one already removed.\" },\n ],\n idempotent: true,\n examples: [{\n title: 'Disconnect the Slack workspace',\n request: { orgProviderCredentialId: CREDENTIAL_EXAMPLE_ID },\n forStatus: HttpResponseStatusCode.NO_CONTENT_204,\n }],\n },\n [Op.UPDATE_MANY]: {\n purpose: 'Route-less retention plumbing.',\n outcome:\n 'Nothing is scrubbed in practice: this resource declares `RETAIN_ONLY`, a positive assertion that it holds no personal data of its own. The operation exists because the retention contract requires READ + LIST + UPDATE_MANY to resolve, and a declared-but-unresolvable operation fails when an erasure actually runs.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The matching records were processed. INTERNAL_CALL — it registers no HTTP route.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The filter fails validation.' },\n ],\n },\n },\n\n frontend: {\n layout: {\n purpose: 'No sections: a stored credential is a handful of facts that no heading would group better than the rows do, so the templates are flat rows under a header and the preset declares no `layout.refs`.',\n headerPurpose: 'The READ identity line: `providerRef · secretSlug` as the title and the `validationState` badge beside it. Neither the provider, the slot nor the state repeats in the body.',\n displayPurpose: 'Settings rows: whether the credential is enabled, then its description, last validation error, validation, use and secret-set dates, who set it and any connection facts — each hidden while empty — and its creation date.',\n summaryPurpose: 'A list card: the `providerRef · secretSlug` title, the `validationState` badge, and \"Enabled\" / \"Disabled\" as a word rather than a labelled checkmark.',\n editPurpose: 'The form reached from a credential\\'s Edit action: the new secret (focused), whether it is enabled, a description. `validationState` is not offered: it is the store\\'s verdict on the last use, excluded from create and update (#1809), and shows as the header badge. Provider and slot are the credential\\'s identity and are offered only on the API\\'s CREATE, which these screens hide.',\n },\n emptyState: {\n purpose: 'Say that nothing is connected yet and that connecting happens on the Connect tab beside this list — the list offers no Create of its own (#1040), so without this line the empty state is the page title again with no way forward.',\n },\n },\n businessConstraints: [\n 'The uniqueness grain is `(organizationId, connectionRef, secretSlug)` — the CONNECTION, not the provider ref (#1670): several refs of one vendor may share one connection and must then spend one stored grant rather than one per ref. Every ref is its own connection until the application declares otherwise, so today `connectionRef` equals `providerRef` on every row. It is enforced by a compound unique index rather than a read-then-write. Two administrators saving a rotation in the same minute would otherwise leave two rows, and the resolver would pick between them arbitrarily — so half the tenant\\'s outbound calls would carry the retired credential with nothing to say which half.',\n 'A credential is resolved BEFORE the deployment environment and never after it. A tenant that has set its own credential must never fall back to the shared deployment secret: an unopenable or tampered credential is REFUSED rather than substituted, because silently acting as the wrong third-party principal is the defect this resource exists to remove.',\n 'A disabled credential resolves as absent, not as an error — disabling parks an integration, it does not break it.',\n 'Credentials do not outlive their tenant: the ORGANIZATIONS composition cascade removes them when an organization is purged, through both the retention-window batch door and the super-administrator immediate-purge door. `request_deletion` only MARKS the tenant, so credentials survive the retention window deliberately — otherwise `restore` would return a tenant with no working integrations.',\n 'A subject erasure never reaches this resource. `setByUserId` names an ACTOR rather than a data subject, and no USERS relationship is registered for it — which also keeps a live credential off the subject-export graph, where `exportSubject` is FORBIDDEN.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n);\n"]}
|
package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-access-grants.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/platform-access-grants.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAQH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAE3B,qCAAqC,EAErC,yBAAyB,EACzB,+BAA+B,EAGhC,MAAM,uBAAuB,CAAC;AAmE/B,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"platform-access-grants.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/platform-access-grants.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAQH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAE3B,qCAAqC,EAErC,yBAAyB,EACzB,+BAA+B,EAGhC,MAAM,uBAAuB,CAAC;AAmE/B,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;iCAwarD,CAAC"}
|
|
@@ -227,6 +227,7 @@ export const platformAccessGrantsResourceSpecification = resourceSpecification(p
|
|
|
227
227
|
],
|
|
228
228
|
errorScenarios: [
|
|
229
229
|
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the organization-administrator authority required to review support access.' },
|
|
230
|
+
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A service firm\'s expert reaches this operation only through a live grant of the `APPROVE_ACCESS_GRANTS` capability the organization\'s OWNER lent its relationship, with step-up and for a task-sized window (#1631); refused without one, and on the next request after a revocation.' },
|
|
230
231
|
{ code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No request with the supplied id is visible in the caller\'s organization. Missing and other organizations\' requests are indistinguishable.' },
|
|
231
232
|
],
|
|
232
233
|
idempotent: true,
|
|
@@ -276,6 +277,7 @@ export const platformAccessGrantsResourceSpecification = resourceSpecification(p
|
|
|
276
277
|
],
|
|
277
278
|
errorScenarios: [
|
|
278
279
|
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the organization-administrator authority required to review support access.' },
|
|
280
|
+
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A service firm\'s expert reaches this operation only through a live grant of the `APPROVE_ACCESS_GRANTS` capability the organization\'s OWNER lent its relationship, with step-up and for a task-sized window (#1631); refused without one, and on the next request after a revocation.' },
|
|
279
281
|
],
|
|
280
282
|
idempotent: true,
|
|
281
283
|
examples: [{
|
|
@@ -327,6 +329,7 @@ export const platformAccessGrantsResourceSpecification = resourceSpecification(p
|
|
|
327
329
|
],
|
|
328
330
|
errorScenarios: [
|
|
329
331
|
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the organization-administrator authority required to review support access.' },
|
|
332
|
+
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A service firm\'s expert reaches this operation only through a live grant of the `APPROVE_ACCESS_GRANTS` capability the organization\'s OWNER lent its relationship, with step-up and for a task-sized window (#1631); refused without one, and on the next request after a revocation.' },
|
|
330
333
|
],
|
|
331
334
|
idempotent: true,
|
|
332
335
|
examples: [{
|
|
@@ -355,7 +358,7 @@ export const platformAccessGrantsResourceSpecification = resourceSpecification(p
|
|
|
355
358
|
{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The support-access request was recorded. Its `status` tells the operator whether access is active or awaiting an organization administrator\'s decision.' },
|
|
356
359
|
],
|
|
357
360
|
errorScenarios: [
|
|
358
|
-
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The request body omits a non-empty `justification` or supplies a non-positive `requestedDurationMinutes`. The target organization is the required URL path parameter, not a duplicated body field. Durations above four hours are accepted but capped at four hours.'
|
|
361
|
+
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The request body omits a non-empty `justification` or supplies a non-positive `requestedDurationMinutes`. The target organization is the required URL path parameter, not a duplicated body field. Durations above four hours are accepted but capped at four hours.' },
|
|
359
362
|
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the application super-administrator authority required to request support access.' },
|
|
360
363
|
{ code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No organization exists for the supplied `organizationId`.' },
|
|
361
364
|
],
|
|
@@ -407,6 +410,7 @@ export const platformAccessGrantsResourceSpecification = resourceSpecification(p
|
|
|
407
410
|
],
|
|
408
411
|
errorScenarios: [
|
|
409
412
|
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an administrator of the organization the request targets. A support operator cannot approve their own request.' },
|
|
413
|
+
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A service firm\'s expert reaches this operation only through a live grant of the `APPROVE_ACCESS_GRANTS` capability the organization\'s OWNER lent its relationship, with step-up and for a task-sized window (#1631); refused without one, and on the next request after a revocation.' },
|
|
410
414
|
{ code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No request with the supplied id is visible in the caller\'s organization.' },
|
|
411
415
|
{ code: HttpResponseStatusCode.CONFLICT_409, when: 'The request is no longer `pending_approval`; an approved, denied, revoked or expired request cannot be approved again.' },
|
|
412
416
|
],
|
|
@@ -432,6 +436,7 @@ export const platformAccessGrantsResourceSpecification = resourceSpecification(p
|
|
|
432
436
|
],
|
|
433
437
|
errorScenarios: [
|
|
434
438
|
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an administrator of the organization the request targets. A support operator cannot decide their own request.' },
|
|
439
|
+
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A service firm\'s expert reaches this operation only through a live grant of the `APPROVE_ACCESS_GRANTS` capability the organization\'s OWNER lent its relationship, with step-up and for a task-sized window (#1631); refused without one, and on the next request after a revocation.' },
|
|
435
440
|
{ code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No request with the supplied id is visible in the caller\'s organization.' },
|
|
436
441
|
{ code: HttpResponseStatusCode.CONFLICT_409, when: 'The request is no longer `pending_approval`; it was already approved, denied, revoked or has expired.' },
|
|
437
442
|
],
|
|
@@ -462,6 +467,7 @@ export const platformAccessGrantsResourceSpecification = resourceSpecification(p
|
|
|
462
467
|
],
|
|
463
468
|
errorScenarios: [
|
|
464
469
|
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an administrator of the requested organization nor an application super-administrator.' },
|
|
470
|
+
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A service firm\'s expert reaches this operation only through a live grant of the `APPROVE_ACCESS_GRANTS` capability the organization\'s OWNER lent its relationship, with step-up and for a task-sized window (#1631); refused without one, and on the next request after a revocation.' },
|
|
465
471
|
{ code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No request with the supplied id is visible to the caller.' },
|
|
466
472
|
{ code: HttpResponseStatusCode.CONFLICT_409, when: 'The request is already denied, revoked or expired. Only a `pending_approval` or `active` request can be revoked.' },
|
|
467
473
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-access-grants.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/platform-access-grants.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,0BAA0B,EAC1B,qCAAqC,EACrC,yBAAyB,EACzB,yBAAyB,EACzB,+BAA+B,EAC/B,oBAAoB,EACpB,+DAA+D,GAChE,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,MAAM,uBAAuB,GAAG,4HAA4H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a,EAAE,IAAI,EAAE,2DAA2D,EAAE;gBACjH,EAAE,IAAI,EAAE,sBAAsB,CAAC,YAAY,EAAE,IAAI,EAAE,kHAAkH,EAAE;aACxK;YACD,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,CAAC;oBACT,KAAK,EAAE,8CAA8C;oBACrD,OAAO,EAAE;wBACP,cAAc,EAAE,uCAAuC;wBACvD,qBAAqB,EAAE,+BAA+B;wBACtD,cAAc,EAAE,oCAAoC;qBACrD;oBACD,QAAQ,EAAE;wBACR,GAAG,gCAAgC;wBACnC,MAAM,EAAE,yBAAyB,CAAC,OAAO;wBACzC,cAAc,EAAE,oCAAoC;wBACpD,SAAS,EAAE,0BAA0B;qBACtC;oBACD,SAAS,EAAE,sBAAsB,CAAC,MAAM;iBACzC,CAAC;SACH;KACF;IAED,mBAAmB,EAAE;QACnB,8VAA8V;QAC9V,4cAA4c;QAC5c,mXAAmX;QACnX,yQAAyQ;QACzQ,sLAAsL;QACtL,2kBAA2kB;QAC3kB,kTAAkT;KACnT;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,aAAa,EAAE,CAC7D,CAAC","sourcesContent":["/**\n * Resource: `platformAccessGrants` — Wildo SaaS engine specification (backend-only, organization-scoped).\n *\n * Inputs:\n * - Schema: engine/saas-models/src/security/authorizations/platform-access-grants.shared.schemas.ts\n * → `PlatformAccessGrantSchema`\n * - Factory: engine/saas-models/src/security/authorizations/platform-access-grants.shared.resources-config.schemas.ts\n * → `platformAccessGrantsResourceConfiguration_InitializationFactory`\n * - Custom operations: `PlatformAccessGrants_Operations` (co-located with the VOCABULARY, in the\n * schemas module rather than the resources-config module — the authorization layer needs\n * `REQUEST_ACCESS` by name, and importing it from the config would drag resource-configuration\n * evaluation into the authorizer's module graph). Both modules are re-exported from the package\n * root, so this spec imports every symbol from `@wildo-ai/saas-models` and is unaffected either way.\n *\n * Why backend-only: there is NO entry for `[CoreResourceType.PLATFORM_ACCESS_GRANTS]` in any preset\n * under engine/presets-components/src/config/resources/. The tenant-facing approval surface is not\n * built yet; today the resource is consumed by the authorizer's admission predicate and by the\n * platform/tenant API.\n *\n * Why `ORGANIZATIONS` scope: the grant belongs to the tenant being reached INTO, not to the operator\n * who asked. That is what lets the tenant read, approve and revoke elevations raised against it — a\n * consent record the consenting party cannot see would defeat the purpose of modelling consent. The\n * scope is expressed once, in the registry relationship ORGANIZATIONS → PLATFORM_ACCESS_GRANTS\n * carrying `isPrimaryScope: true`; the runtime config deliberately does not restate it.\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n CoreUserNotificationTarget,\n PlatformAccessGrantAutoApprovalReason,\n PlatformAccessGrantSchema,\n PlatformAccessGrantStatus,\n PlatformAccessGrants_Operations,\n ResourcePrimaryScope,\n platformAccessGrantsResourceConfiguration_InitializationFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nconst TENANT_CONSENT_AUDIENCE = 'Administrators of the TARGET tenant — the party whose data is about to be reached into, and the only party who can refuse.';\nconst TENANT_CONSENT_TONE = 'Direct and factual, and never reassuring by omission: name the operator, the reason they gave, and the window they asked for, so the recipient can decide rather than merely be informed.';\n\nconst PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID = 'org_01J4P8F1M2N3Q4R5S6T7V8W9XY';\nconst PLATFORM_ACCESS_PENDING_GRANT_ID = 'platform_access_grant_01J4P8K2N3Q4R5S6T7V8W9X0YZ';\nconst PLATFORM_ACCESS_ACTIVE_GRANT_ID = 'platform_access_grant_01J4P8M3Q4R5S6T7V8W9X0Y1ZA';\nconst PLATFORM_ACCESS_OPERATOR_USER_ID = 'user_01J4P8P4R5S6T7V8W9X0Y1Z2AB';\nconst PLATFORM_ACCESS_APPROVER_USER_ID = 'user_01J4P8R5S6T7V8W9X0Y1Z2A3BC';\n\nconst platformAccessPendingGrantExample = {\n _id: PLATFORM_ACCESS_PENDING_GRANT_ID,\n organizationId: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID,\n operatorUserId: PLATFORM_ACCESS_OPERATOR_USER_ID,\n justification: 'Investigate failed SCIM provisioning for support case INC-4821.',\n status: PlatformAccessGrantStatus.PENDING_APPROVAL,\n expiresAt: '2026-08-20T14:00:00.000Z',\n createdAt: '2026-08-20T12:00:00.000Z',\n updatedAt: '2026-08-20T12:00:00.000Z',\n};\n\nconst platformAccessActiveGrantExample = {\n ...platformAccessPendingGrantExample,\n _id: PLATFORM_ACCESS_ACTIVE_GRANT_ID,\n status: PlatformAccessGrantStatus.ACTIVE,\n approvedByUserId: PLATFORM_ACCESS_APPROVER_USER_ID,\n approvedAt: '2026-08-20T12:08:00.000Z',\n updatedAt: '2026-08-20T12:08:00.000Z',\n};\n\nconst platformAccessPendingGrantSummaryExample = {\n _id: platformAccessPendingGrantExample._id,\n organizationId: platformAccessPendingGrantExample.organizationId,\n operatorUserId: platformAccessPendingGrantExample.operatorUserId,\n justification: platformAccessPendingGrantExample.justification,\n status: platformAccessPendingGrantExample.status,\n expiresAt: platformAccessPendingGrantExample.expiresAt,\n};\n\nconst platformAccessActiveGrantSummaryExample = {\n ...platformAccessPendingGrantSummaryExample,\n _id: platformAccessActiveGrantExample._id,\n status: platformAccessActiveGrantExample.status,\n};\n\nconst PLATFORM_ACCESS_PAGE_REQUEST = {\n organizationId: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID,\n page: 1,\n limit: 20,\n sort: 'createdAt:desc',\n};\n\nfunction platformAccessGrantPage<T>(data: readonly T[]) {\n return {\n data,\n pagination: {\n page: 1,\n limit: 20,\n total: data.length,\n totalPages: data.length === 0 ? 0 : 1,\n },\n };\n}\n\nexport const platformAccessGrantsResourceSpecification = resourceSpecification(\n platformAccessGrantsResourceConfiguration_InitializationFactory,\n PlatformAccessGrantSchema,\n ({ schemaShape }) => ({\n purpose: 'Give an application support team a justified, time-limited way to request access to an organization while keeping that organization informed and in control of the decision.',\n businessRole: 'The organization\\'s support-access ledger. It answers who requested access, why they requested it, how long the window lasts, whether an administrator approved it and when access ended.',\n lifecycleRole: 'An authorized support operator creates a request. It waits for an organization administrator when approval is required, or becomes active immediately with an explicit automatic-approval reason. An administrator can approve or deny a pending request; either side can revoke pending or active access; expiry ends access automatically. Completed requests remain available as access-review history.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.AUTH,\n\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'PlatformAccessGrantSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'platformAccessGrantsResourceConfiguration_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: 'PLATFORM_ACCESS_GRANTS',\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: 'PlatformAccessGrants_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'No public CREATE or UPDATE. `requestAccess` is the only writer of a new row, and `approve` / `deny` / `revoke` are the only status transitions. A generic UPDATE would be a second, ungated path to those transitions; a generic CREATE would let a caller author `status`, `expiresAt` and `operatorUserId`, which are precisely the fields whose SERVER authorship is the control.',\n 'DELETE exists but has NO client door — its single variant is INTERNAL_CALL, mirroring `organizations.delete`\\'s own default. It is present only so the ORGANIZATIONS composition cascade (`onParentDelete`) has a verb it can call; a cascade declared but unable to run fails the registry\\'s composition-cascade-deletability guard, and would otherwise leave grant rows behind after their tenant was purged.',\n 'The runtime declares exactly ONE `userNotifications[]` entry, on `requestAccess` (target=ORGANIZATION_USERS, channel=EMAIL). There are no `m2mNotifications` anywhere in this family, so no `communications.m2m` block appears on any operation (DF-1 strict parity).',\n 'The grant LIFECYCLE audit events (requested / approved / denied / revoked) are not emitted yet — see `.claude/plans/platform-access-grants-jit-elevation.md` R7. The crossing itself is already audited by `CoreAuditableEventType.CROSS_TENANT_ADMINISTRATIVE_ACCESS`, emitted from the authorizer rather than from this resource.',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Identifier for one elevation request.',\n whyItMatters: 'The address of every subsequent decision — approve, deny and revoke all target this row, and the audit trail names it.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n organizationId: schemaShape.organizationId.foreignKeySpec({\n meaning: 'The TARGET tenant — the organization being reached into, never the operator\\'s own.',\n whyItMatters: 'The scope anchor. It makes the grant an organization-scoped row, which is what lets the tenant see, approve and revoke elevations raised against it, and it is the tenant the admission predicate matches a crossing against.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n operatorUserId: schemaShape.operatorUserId.foreignKeySpec({\n meaning: 'The platform operator who requested the elevation.',\n whyItMatters: 'Server-authored from the session, never client-supplied — an elevation whose subject the caller could choose would let one operator mint access for another. Together with `organizationId` it forms the pair the admission predicate matches: this operator, into this tenant.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n justification: schemaShape.justification.stringSpec({\n meaning: 'Why the operator needs access, in their own words.',\n whyItMatters: 'Required everywhere in the flow and deliberately never optional. An elevation record without a reason answers \"who\" and \"when\" but not \"why\", which is the only question a reviewer or a customer actually asks; NIST SP 800-53 AC-2(7) wants privileged assignment MONITORED, and an unexplained monitored assignment is a log line rather than a control.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n status: schemaShape.status.enumSpec({\n meaning: 'Where this elevation is in its lifecycle.',\n whyItMatters: 'Read together with `expiresAt`, never alone: the admission predicate accepts ACTIVE and then re-checks the window, so a grant whose window elapsed stops working whether or not anything has relabelled it.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'PlatformAccessGrantStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [PlatformAccessGrantStatus.PENDING_APPROVAL]: { meaning: 'Awaiting a decision from an administrator of the target tenant — the Lockbox posture. The elevation does NOT work in this state.' },\n [PlatformAccessGrantStatus.ACTIVE]: { meaning: 'Usable now, and only while unexpired. The one status the admission predicate accepts.' },\n [PlatformAccessGrantStatus.DENIED]: { meaning: 'The tenant refused. Terminal — a fresh request must be raised rather than this one retried.' },\n [PlatformAccessGrantStatus.EXPIRED]: { meaning: 'The window elapsed. Terminal. Written by the nightly credential-expiry sweep, which lags by up to a day — the label is bookkeeping for humans and reporting, never the control that stops the access. Access stops the instant `expiresAt` passes, because the admission predicate compares against that field and not against this one.' },\n [PlatformAccessGrantStatus.REVOKED]: { meaning: 'Withdrawn before expiry, by either the tenant or the platform. Terminal.' },\n },\n }),\n expiresAt: schemaShape.expiresAt.dateSpec({\n meaning: 'When the elevation stops working.',\n whyItMatters: 'The actual control, and the reason this is a time-bound grant rather than a renamed standing privilege. Server-authored from the requested duration and clamped to a 4-hour ceiling, so a client cannot mint a long-lived elevation by asking for one. The admission predicate compares against it directly, which is why expiry needs no sweeper to take effect — the sweep that relabels `status` afterwards is a record, not a control.',\n temporalRole: 'expiration',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n approvedByUserId: schemaShape.approvedByUserId.foreignKeySpec({\n meaning: 'The tenant administrator who approved, when a human in the tenant did.',\n whyItMatters: 'Absent on an auto-approved grant, which is what makes its presence meaningful: it distinguishes \"someone here agreed\" from \"nobody needed to\". Written only by `approve` — `deny` and `revoke` deliberately leave it alone, because writing a refusal into the approver field would corrupt the one field an audit reads.',\n }),\n approvedAt: schemaShape.approvedAt.dateSpec({\n meaning: 'When the tenant administrator approved.',\n whyItMatters: 'Fixes the consent moment relative to the access that followed — a reviewer needs to see that approval preceded use, not merely that both happened.',\n temporalRole: 'occurred',\n }),\n autoApprovalReason: schemaShape.autoApprovalReason.enumSpec({\n meaning: 'Why this grant became ACTIVE with no tenant administrator acting.',\n whyItMatters: 'Present exactly when nobody in the tenant consented, so its ABSENCE on an ACTIVE grant is itself evidence that a human approved. That distinction is what a customer audit asks for, and precisely what a single `approved: true` boolean would erase.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'PlatformAccessGrantAutoApprovalReason',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [PlatformAccessGrantAutoApprovalReason.TENANT_APPROVAL_NOT_REQUIRED]: { meaning: 'The tenant has not opted into approval — the default posture, matching Lockbox being opt-in so a tenant that never staffed an approver can still receive support.' },\n [PlatformAccessGrantAutoApprovalReason.TENANT_CANNOT_APPROVE]: { meaning: 'The tenant has NO administratively usable owner, so no principal exists who could approve. Recorded at high severity: this is the one path where operator access proceeds against a tenant that never consented and never could.' },\n },\n }),\n decisionReason: schemaShape.decisionReason.stringSpec({\n meaning: 'The tenant\\'s reason for refusing, or the revoker\\'s reason for withdrawing.',\n whyItMatters: 'Optional, unlike `justification`: a refusal owes no explanation, whereas a request does. When supplied it is the tenant\\'s side of the record.',\n }),\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the elevation was requested.',\n whyItMatters: 'The start of the window a reviewer reconstructs, and the ordering key for a tenant listing its elevation history.',\n temporalRole: 'creation',\n }),\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When the record last changed — that is, when it was last decided upon.',\n whyItMatters: 'On this resource an update is always a lifecycle decision, since there is no generic UPDATE door.',\n temporalRole: 'modified',\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Inspect one temporary support-access request for your organization.',\n outcome: 'The response identifies who requested access, their justification, the requested window and the current decision state.',\n whenToUse: 'An organization administrator is reviewing a pending request or reconstructing an earlier support-access decision.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The support-access request was found and returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the organization-administrator authority required to review support access.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No request with the supplied id is visible in the caller\\'s organization. Missing and other organizations\\' requests are indistinguishable.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Inspect a pending support-access request',\n request: {\n organizationId: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID,\n platformAccessGrantId: PLATFORM_ACCESS_PENDING_GRANT_ID,\n },\n response: platformAccessPendingGrantExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Inspect a request with its organization context',\n request: {\n organizationId: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID,\n platformAccessGrantId: PLATFORM_ACCESS_PENDING_GRANT_ID,\n },\n response: {\n ...platformAccessPendingGrantExample,\n organization: { _id: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Inspect the compact request summary',\n request: {\n organizationId: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID,\n platformAccessGrantId: PLATFORM_ACCESS_PENDING_GRANT_ID,\n },\n response: platformAccessPendingGrantSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'List temporary support-access requests for your organization.',\n outcome: 'The response provides the organization\\'s support-access history and the current state of each request.',\n whenToUse: 'An access-review screen, approval queue or audit preparation workflow needs the organization\\'s request inventory.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A possibly empty page of the organization\\'s support-access requests.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the organization-administrator authority required to review support access.' },\n ],\n idempotent: true,\n examples: [{\n title: 'List pending and active support-access requests',\n request: PLATFORM_ACCESS_PAGE_REQUEST,\n response: platformAccessGrantPage([\n platformAccessPendingGrantExample,\n platformAccessActiveGrantExample,\n ]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'List requests with organization context',\n request: PLATFORM_ACCESS_PAGE_REQUEST,\n response: platformAccessGrantPage([\n {\n ...platformAccessPendingGrantExample,\n organization: { _id: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID },\n },\n {\n ...platformAccessActiveGrantExample,\n organization: { _id: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID },\n },\n ]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'List compact support-access summaries',\n request: PLATFORM_ACCESS_PAGE_REQUEST,\n response: platformAccessGrantPage([\n platformAccessPendingGrantSummaryExample,\n platformAccessActiveGrantSummaryExample,\n ]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.COUNT]: {\n purpose: 'Count temporary support-access requests for your organization.',\n outcome: 'The response returns the matching request total without transferring the request records.',\n whenToUse: 'Dashboards and access reviews that need a current tally rather than request details.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The number of support-access requests matching the caller\\'s organization and filters.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the organization-administrator authority required to review support access.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Count support-access requests',\n request: { organizationId: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID },\n response: { count: 2 },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.DELETE]: {\n purpose: 'PURGE ONLY — remove grant rows when their tenant is destroyed. There is deliberately no client door.',\n outcome: 'The row is hard-deleted. Reachable exclusively by the ORGANIZATIONS `onParentDelete` cascade during a tenant purge; its single variant is INTERNAL_CALL, so it has no HTTP route and no client — of either party — can invoke it.',\n whenToUse: 'Never directly. It exists so the composition cascade has a verb it can call: a child declaring `onParentDelete` while omitting DELETE fails the registry\\'s composition-cascade-deletability guard, and at runtime would abort the parent tenant\\'s deletion the moment a grant row existed.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The grant record was removed as part of its tenant\\'s purge. Not observable over HTTP — the operation has no route.' },\n ],\n idempotent: true,\n },\n [PlatformAccessGrants_Operations.REQUEST_ACCESS]: {\n operationId: PlatformAccessGrants_Operations.REQUEST_ACCESS,\n purpose: 'Request time-boxed support access to one organization.',\n outcome: 'A request is recorded with the authenticated support operator as requester and a maximum four-hour window. Its status is `pending_approval` when the organization requires approval, otherwise `active` with an explicit automatic-approval reason. The organization is notified by email.',\n whenToUse: 'An authorized application support operator needs temporary access for support, incident response or administrative recovery.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The support-access request was recorded. Its `status` tells the operator whether access is active or awaiting an organization administrator\\'s decision.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The request body omits a non-empty `justification` or supplies a non-positive `requestedDurationMinutes`. The target organization is the required URL path parameter, not a duplicated body field. Durations above four hours are accepted but capped at four hours.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the application super-administrator authority required to request support access.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No organization exists for the supplied `organizationId`.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Request two hours of support access',\n request: {\n organizationId: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID,\n justification: platformAccessPendingGrantExample.justification,\n requestedDurationMinutes: 120,\n },\n response: platformAccessPendingGrantExample,\n forStatus: HttpResponseStatusCode.CREATED_201,\n }],\n communications: {\n email: {\n purpose: 'Tell the target tenant that a platform operator has asked to reach into their organization — before it happens, not after.',\n tone: TENANT_CONSENT_TONE,\n useWhen: 'An operator requests an elevation against this tenant, whether or not the tenant has opted into approval.',\n avoidWhen: 'Never suppressed. Under the approval posture this message IS the request, so withholding it would give a tenant a decision it never hears about; under the default posture it is the only notice the tenant gets that access was taken.',\n textSlots: {\n subject: {\n purpose: 'State in the subject line that a platform operator has requested access to this organization, and whether a decision is being asked for.',\n },\n },\n eventData: {\n purpose: 'Carry the operator\\'s identity, the justification they supplied verbatim, the window they were granted, and whether the tenant must approve before the access becomes usable.',\n },\n deliveries: [\n {\n audience: TENANT_CONSENT_AUDIENCE,\n targetRef: CoreUserNotificationTarget.ORGANIZATION_USERS,\n },\n ],\n notes: [\n 'Mirrors the single `userNotifications[]` entry declared on the runtime `requestAccess` operation (target=ORGANIZATION_USERS, channel=EMAIL). It is the only communication this resource emits — `approve`, `deny` and `revoke` declare none.',\n ],\n },\n },\n },\n [PlatformAccessGrants_Operations.APPROVE]: {\n operationId: PlatformAccessGrants_Operations.APPROVE,\n purpose: 'Approve a pending support-access request.',\n outcome: 'The request becomes `active`; the response records the approving administrator and decision time. Access remains usable only until it expires or is revoked.',\n whenToUse: 'An administrator of the requested organization has reviewed the requester, justification and time window and agrees to grant access.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The support-access request is now active, and its updated state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an administrator of the organization the request targets. A support operator cannot approve their own request.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No request with the supplied id is visible in the caller\\'s organization.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The request is no longer `pending_approval`; an approved, denied, revoked or expired request cannot be approved again.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Approve a reviewed support request',\n request: {\n organizationId: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID,\n platformAccessGrantId: PLATFORM_ACCESS_PENDING_GRANT_ID,\n decisionReason: 'Approved for support case INC-4821.',\n },\n response: platformAccessActiveGrantExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [PlatformAccessGrants_Operations.DENY]: {\n operationId: PlatformAccessGrants_Operations.DENY,\n purpose: 'Deny a pending support-access request.',\n outcome: 'The request becomes `denied` and cannot be retried. Any later support need requires a new request.',\n whenToUse: 'An administrator of the requested organization has reviewed the request and declines access.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The support-access request was denied, and its final state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an administrator of the organization the request targets. A support operator cannot decide their own request.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No request with the supplied id is visible in the caller\\'s organization.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The request is no longer `pending_approval`; it was already approved, denied, revoked or has expired.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Deny a support request',\n request: {\n organizationId: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID,\n platformAccessGrantId: PLATFORM_ACCESS_PENDING_GRANT_ID,\n decisionReason: 'The requested investigation is no longer required.',\n },\n response: {\n ...platformAccessPendingGrantExample,\n status: PlatformAccessGrantStatus.DENIED,\n decisionReason: 'The requested investigation is no longer required.',\n updatedAt: '2026-08-20T12:06:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [PlatformAccessGrants_Operations.REVOKE]: {\n operationId: PlatformAccessGrants_Operations.REVOKE,\n purpose: 'End pending or active support access early.',\n outcome: 'The request becomes `revoked` and access stops immediately instead of remaining available until the recorded expiry.',\n whenToUse: 'An organization withdraws access it approved, or an application support operator closes access as soon as the support work is complete.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The support-access request was revoked, and its final state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an administrator of the requested organization nor an application super-administrator.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No request with the supplied id is visible to the caller.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The request is already denied, revoked or expired. Only a `pending_approval` or `active` request can be revoked.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Close support access after the investigation',\n request: {\n organizationId: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID,\n platformAccessGrantId: PLATFORM_ACCESS_ACTIVE_GRANT_ID,\n decisionReason: 'Support case INC-4821 is resolved.',\n },\n response: {\n ...platformAccessActiveGrantExample,\n status: PlatformAccessGrantStatus.REVOKED,\n decisionReason: 'Support case INC-4821 is resolved.',\n updatedAt: '2026-08-20T12:42:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n\n businessConstraints: [\n 'A grant is required IN ADDITION to the operation variant\\'s `admitsCrossTenantPlatformAdministration` declaration, never instead of it. The declaration says \"this verb MAY cross\"; the grant says \"this operator MAY cross into THIS tenant, until THIS time, for THIS reason\". Neither is sufficient alone, and the roles gate runs independently of both.',\n '`requestAccess` is EXEMPT from the grant requirement it bootstraps. Gating it would be circular — an operator would need an elevation in order to ask for one — and the mechanism could never start. The exemption is safe because requesting is not accessing: the verb writes one row in the target tenant and touches nothing else, so the blast radius of an abused request is a notification, an audit row naming the operator, and a decision the tenant can refuse.',\n 'Usability is EVALUATED, never read off `status`. A grant counts only when it is ACTIVE and its `expiresAt` is still in the future, checked through the single shared predicate. A background transition to EXPIRED is bookkeeping for humans; if usability were read from the label alone, an outage in whatever performs that transition would silently restore standing access.',\n 'The 4-hour ceiling is enforced server-side by CLAMPING, not by refusing. A caller asking for longer simply gets the ceiling — being told \"ask again with a smaller number\" mid-incident is friction with no security benefit, since the ceiling is what actually binds.',\n 'Tenant approval is opt-in PER TENANT, matching Lockbox rather than a deployment-wide posture, so a tenant that has not staffed an approver is not thereby unable to receive support.',\n 'A tenant with no administratively usable owner cannot be required to approve its own repair — that is circular, and the administrative-continuity floors exist precisely because a tenant can reach that state. It is resolved by MEASUREMENT rather than exception: the grant is auto-approved with `TENANT_CANNOT_APPROVE`, evaluated with the SAME predicate the owner floor uses to refuse writes, so the two subsystems can never disagree about whether a tenant can administer itself. An operator cannot manufacture the condition either — stranding a tenant is exactly what the floors refuse.',\n 'Terminal statuses are how a grant ends. DENIED, EXPIRED and REVOKED are never edited back to life, and the row is never erased by either party: an elevation record either side could delete is not evidence. The only removal path is the tenant purge cascade, which destroys the tenant the record was about.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n);\n"]}
|
|
1
|
+
{"version":3,"file":"platform-access-grants.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/platform-access-grants.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,0BAA0B,EAC1B,qCAAqC,EACrC,yBAAyB,EACzB,yBAAyB,EACzB,+BAA+B,EAC/B,oBAAoB,EACpB,+DAA+D,GAChE,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAA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Grants` — Wildo SaaS engine specification (backend-only, organization-scoped).\n *\n * Inputs:\n * - Schema: engine/saas-models/src/security/authorizations/platform-access-grants.shared.schemas.ts\n * → `PlatformAccessGrantSchema`\n * - Factory: engine/saas-models/src/security/authorizations/platform-access-grants.shared.resources-config.schemas.ts\n * → `platformAccessGrantsResourceConfiguration_InitializationFactory`\n * - Custom operations: `PlatformAccessGrants_Operations` (co-located with the VOCABULARY, in the\n * schemas module rather than the resources-config module — the authorization layer needs\n * `REQUEST_ACCESS` by name, and importing it from the config would drag resource-configuration\n * evaluation into the authorizer's module graph). Both modules are re-exported from the package\n * root, so this spec imports every symbol from `@wildo-ai/saas-models` and is unaffected either way.\n *\n * Why backend-only: there is NO entry for `[CoreResourceType.PLATFORM_ACCESS_GRANTS]` in any preset\n * under engine/presets-components/src/config/resources/. The tenant-facing approval surface is not\n * built yet; today the resource is consumed by the authorizer's admission predicate and by the\n * platform/tenant API.\n *\n * Why `ORGANIZATIONS` scope: the grant belongs to the tenant being reached INTO, not to the operator\n * who asked. That is what lets the tenant read, approve and revoke elevations raised against it — a\n * consent record the consenting party cannot see would defeat the purpose of modelling consent. The\n * scope is expressed once, in the registry relationship ORGANIZATIONS → PLATFORM_ACCESS_GRANTS\n * carrying `isPrimaryScope: true`; the runtime config deliberately does not restate it.\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n CoreUserNotificationTarget,\n PlatformAccessGrantAutoApprovalReason,\n PlatformAccessGrantSchema,\n PlatformAccessGrantStatus,\n PlatformAccessGrants_Operations,\n ResourcePrimaryScope,\n platformAccessGrantsResourceConfiguration_InitializationFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nconst TENANT_CONSENT_AUDIENCE = 'Administrators of the TARGET tenant — the party whose data is about to be reached into, and the only party who can refuse.';\nconst TENANT_CONSENT_TONE = 'Direct and factual, and never reassuring by omission: name the operator, the reason they gave, and the window they asked for, so the recipient can decide rather than merely be informed.';\n\nconst PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID = 'org_01J4P8F1M2N3Q4R5S6T7V8W9XY';\nconst PLATFORM_ACCESS_PENDING_GRANT_ID = 'platform_access_grant_01J4P8K2N3Q4R5S6T7V8W9X0YZ';\nconst PLATFORM_ACCESS_ACTIVE_GRANT_ID = 'platform_access_grant_01J4P8M3Q4R5S6T7V8W9X0Y1ZA';\nconst PLATFORM_ACCESS_OPERATOR_USER_ID = 'user_01J4P8P4R5S6T7V8W9X0Y1Z2AB';\nconst PLATFORM_ACCESS_APPROVER_USER_ID = 'user_01J4P8R5S6T7V8W9X0Y1Z2A3BC';\n\nconst platformAccessPendingGrantExample = {\n _id: PLATFORM_ACCESS_PENDING_GRANT_ID,\n organizationId: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID,\n operatorUserId: PLATFORM_ACCESS_OPERATOR_USER_ID,\n justification: 'Investigate failed SCIM provisioning for support case INC-4821.',\n status: PlatformAccessGrantStatus.PENDING_APPROVAL,\n expiresAt: '2026-08-20T14:00:00.000Z',\n createdAt: '2026-08-20T12:00:00.000Z',\n updatedAt: '2026-08-20T12:00:00.000Z',\n};\n\nconst platformAccessActiveGrantExample = {\n ...platformAccessPendingGrantExample,\n _id: PLATFORM_ACCESS_ACTIVE_GRANT_ID,\n status: PlatformAccessGrantStatus.ACTIVE,\n approvedByUserId: PLATFORM_ACCESS_APPROVER_USER_ID,\n approvedAt: '2026-08-20T12:08:00.000Z',\n updatedAt: '2026-08-20T12:08:00.000Z',\n};\n\nconst platformAccessPendingGrantSummaryExample = {\n _id: platformAccessPendingGrantExample._id,\n organizationId: platformAccessPendingGrantExample.organizationId,\n operatorUserId: platformAccessPendingGrantExample.operatorUserId,\n justification: platformAccessPendingGrantExample.justification,\n status: platformAccessPendingGrantExample.status,\n expiresAt: platformAccessPendingGrantExample.expiresAt,\n};\n\nconst platformAccessActiveGrantSummaryExample = {\n ...platformAccessPendingGrantSummaryExample,\n _id: platformAccessActiveGrantExample._id,\n status: platformAccessActiveGrantExample.status,\n};\n\nconst PLATFORM_ACCESS_PAGE_REQUEST = {\n organizationId: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID,\n page: 1,\n limit: 20,\n sort: 'createdAt:desc',\n};\n\nfunction platformAccessGrantPage<T>(data: readonly T[]) {\n return {\n data,\n pagination: {\n page: 1,\n limit: 20,\n total: data.length,\n totalPages: data.length === 0 ? 0 : 1,\n },\n };\n}\n\nexport const platformAccessGrantsResourceSpecification = resourceSpecification(\n platformAccessGrantsResourceConfiguration_InitializationFactory,\n PlatformAccessGrantSchema,\n ({ schemaShape }) => ({\n purpose: 'Give an application support team a justified, time-limited way to request access to an organization while keeping that organization informed and in control of the decision.',\n businessRole: 'The organization\\'s support-access ledger. It answers who requested access, why they requested it, how long the window lasts, whether an administrator approved it and when access ended.',\n lifecycleRole: 'An authorized support operator creates a request. It waits for an organization administrator when approval is required, or becomes active immediately with an explicit automatic-approval reason. An administrator can approve or deny a pending request; either side can revoke pending or active access; expiry ends access automatically. Completed requests remain available as access-review history.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.AUTH,\n\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'PlatformAccessGrantSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'platformAccessGrantsResourceConfiguration_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: 'PLATFORM_ACCESS_GRANTS',\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: 'PlatformAccessGrants_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'No public CREATE or UPDATE. `requestAccess` is the only writer of a new row, and `approve` / `deny` / `revoke` are the only status transitions. A generic UPDATE would be a second, ungated path to those transitions; a generic CREATE would let a caller author `status`, `expiresAt` and `operatorUserId`, which are precisely the fields whose SERVER authorship is the control.',\n 'DELETE exists but has NO client door — its single variant is INTERNAL_CALL, mirroring `organizations.delete`\\'s own default. It is present only so the ORGANIZATIONS composition cascade (`onParentDelete`) has a verb it can call; a cascade declared but unable to run fails the registry\\'s composition-cascade-deletability guard, and would otherwise leave grant rows behind after their tenant was purged.',\n 'The runtime declares exactly ONE `userNotifications[]` entry, on `requestAccess` (target=ORGANIZATION_USERS, channel=EMAIL). There are no `m2mNotifications` anywhere in this family, so no `communications.m2m` block appears on any operation (DF-1 strict parity).',\n 'The grant LIFECYCLE audit events (requested / approved / denied / revoked) are not emitted yet — see `.claude/plans/platform-access-grants-jit-elevation.md` R7. The crossing itself is already audited by `CoreAuditableEventType.CROSS_TENANT_ADMINISTRATIVE_ACCESS`, emitted from the authorizer rather than from this resource.',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Identifier for one elevation request.',\n whyItMatters: 'The address of every subsequent decision — approve, deny and revoke all target this row, and the audit trail names it.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n organizationId: schemaShape.organizationId.foreignKeySpec({\n meaning: 'The TARGET tenant — the organization being reached into, never the operator\\'s own.',\n whyItMatters: 'The scope anchor. It makes the grant an organization-scoped row, which is what lets the tenant see, approve and revoke elevations raised against it, and it is the tenant the admission predicate matches a crossing against.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n operatorUserId: schemaShape.operatorUserId.foreignKeySpec({\n meaning: 'The platform operator who requested the elevation.',\n whyItMatters: 'Server-authored from the session, never client-supplied — an elevation whose subject the caller could choose would let one operator mint access for another. Together with `organizationId` it forms the pair the admission predicate matches: this operator, into this tenant.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n justification: schemaShape.justification.stringSpec({\n meaning: 'Why the operator needs access, in their own words.',\n whyItMatters: 'Required everywhere in the flow and deliberately never optional. An elevation record without a reason answers \"who\" and \"when\" but not \"why\", which is the only question a reviewer or a customer actually asks; NIST SP 800-53 AC-2(7) wants privileged assignment MONITORED, and an unexplained monitored assignment is a log line rather than a control.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n status: schemaShape.status.enumSpec({\n meaning: 'Where this elevation is in its lifecycle.',\n whyItMatters: 'Read together with `expiresAt`, never alone: the admission predicate accepts ACTIVE and then re-checks the window, so a grant whose window elapsed stops working whether or not anything has relabelled it.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'PlatformAccessGrantStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [PlatformAccessGrantStatus.PENDING_APPROVAL]: { meaning: 'Awaiting a decision from an administrator of the target tenant — the Lockbox posture. The elevation does NOT work in this state.' },\n [PlatformAccessGrantStatus.ACTIVE]: { meaning: 'Usable now, and only while unexpired. The one status the admission predicate accepts.' },\n [PlatformAccessGrantStatus.DENIED]: { meaning: 'The tenant refused. Terminal — a fresh request must be raised rather than this one retried.' },\n [PlatformAccessGrantStatus.EXPIRED]: { meaning: 'The window elapsed. Terminal. Written by the nightly credential-expiry sweep, which lags by up to a day — the label is bookkeeping for humans and reporting, never the control that stops the access. Access stops the instant `expiresAt` passes, because the admission predicate compares against that field and not against this one.' },\n [PlatformAccessGrantStatus.REVOKED]: { meaning: 'Withdrawn before expiry, by either the tenant or the platform. Terminal.' },\n },\n }),\n expiresAt: schemaShape.expiresAt.dateSpec({\n meaning: 'When the elevation stops working.',\n whyItMatters: 'The actual control, and the reason this is a time-bound grant rather than a renamed standing privilege. Server-authored from the requested duration and clamped to a 4-hour ceiling, so a client cannot mint a long-lived elevation by asking for one. The admission predicate compares against it directly, which is why expiry needs no sweeper to take effect — the sweep that relabels `status` afterwards is a record, not a control.',\n temporalRole: 'expiration',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n approvedByUserId: schemaShape.approvedByUserId.foreignKeySpec({\n meaning: 'The tenant administrator who approved, when a human in the tenant did.',\n whyItMatters: 'Absent on an auto-approved grant, which is what makes its presence meaningful: it distinguishes \"someone here agreed\" from \"nobody needed to\". Written only by `approve` — `deny` and `revoke` deliberately leave it alone, because writing a refusal into the approver field would corrupt the one field an audit reads.',\n }),\n approvedAt: schemaShape.approvedAt.dateSpec({\n meaning: 'When the tenant administrator approved.',\n whyItMatters: 'Fixes the consent moment relative to the access that followed — a reviewer needs to see that approval preceded use, not merely that both happened.',\n temporalRole: 'occurred',\n }),\n autoApprovalReason: schemaShape.autoApprovalReason.enumSpec({\n meaning: 'Why this grant became ACTIVE with no tenant administrator acting.',\n whyItMatters: 'Present exactly when nobody in the tenant consented, so its ABSENCE on an ACTIVE grant is itself evidence that a human approved. That distinction is what a customer audit asks for, and precisely what a single `approved: true` boolean would erase.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'PlatformAccessGrantAutoApprovalReason',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [PlatformAccessGrantAutoApprovalReason.TENANT_APPROVAL_NOT_REQUIRED]: { meaning: 'The tenant has not opted into approval — the default posture, matching Lockbox being opt-in so a tenant that never staffed an approver can still receive support.' },\n [PlatformAccessGrantAutoApprovalReason.TENANT_CANNOT_APPROVE]: { meaning: 'The tenant has NO administratively usable owner, so no principal exists who could approve. Recorded at high severity: this is the one path where operator access proceeds against a tenant that never consented and never could.' },\n },\n }),\n decisionReason: schemaShape.decisionReason.stringSpec({\n meaning: 'The tenant\\'s reason for refusing, or the revoker\\'s reason for withdrawing.',\n whyItMatters: 'Optional, unlike `justification`: a refusal owes no explanation, whereas a request does. When supplied it is the tenant\\'s side of the record.',\n }),\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the elevation was requested.',\n whyItMatters: 'The start of the window a reviewer reconstructs, and the ordering key for a tenant listing its elevation history.',\n temporalRole: 'creation',\n }),\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When the record last changed — that is, when it was last decided upon.',\n whyItMatters: 'On this resource an update is always a lifecycle decision, since there is no generic UPDATE door.',\n temporalRole: 'modified',\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Inspect one temporary support-access request for your organization.',\n outcome: 'The response identifies who requested access, their justification, the requested window and the current decision state.',\n whenToUse: 'An organization administrator is reviewing a pending request or reconstructing an earlier support-access decision.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The support-access request was found and returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the organization-administrator authority required to review support access.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A service firm\\'s expert reaches this operation only through a live grant of the `APPROVE_ACCESS_GRANTS` capability the organization\\'s OWNER lent its relationship, with step-up and for a task-sized window (#1631); refused without one, and on the next request after a revocation.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No request with the supplied id is visible in the caller\\'s organization. Missing and other organizations\\' requests are indistinguishable.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Inspect a pending support-access request',\n request: {\n organizationId: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID,\n platformAccessGrantId: PLATFORM_ACCESS_PENDING_GRANT_ID,\n },\n response: platformAccessPendingGrantExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Inspect a request with its organization context',\n request: {\n organizationId: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID,\n platformAccessGrantId: PLATFORM_ACCESS_PENDING_GRANT_ID,\n },\n response: {\n ...platformAccessPendingGrantExample,\n organization: { _id: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Inspect the compact request summary',\n request: {\n organizationId: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID,\n platformAccessGrantId: PLATFORM_ACCESS_PENDING_GRANT_ID,\n },\n response: platformAccessPendingGrantSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'List temporary support-access requests for your organization.',\n outcome: 'The response provides the organization\\'s support-access history and the current state of each request.',\n whenToUse: 'An access-review screen, approval queue or audit preparation workflow needs the organization\\'s request inventory.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A possibly empty page of the organization\\'s support-access requests.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the organization-administrator authority required to review support access.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A service firm\\'s expert reaches this operation only through a live grant of the `APPROVE_ACCESS_GRANTS` capability the organization\\'s OWNER lent its relationship, with step-up and for a task-sized window (#1631); refused without one, and on the next request after a revocation.' },\n ],\n idempotent: true,\n examples: [{\n title: 'List pending and active support-access requests',\n request: PLATFORM_ACCESS_PAGE_REQUEST,\n response: platformAccessGrantPage([\n platformAccessPendingGrantExample,\n platformAccessActiveGrantExample,\n ]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'List requests with organization context',\n request: PLATFORM_ACCESS_PAGE_REQUEST,\n response: platformAccessGrantPage([\n {\n ...platformAccessPendingGrantExample,\n organization: { _id: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID },\n },\n {\n ...platformAccessActiveGrantExample,\n organization: { _id: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID },\n },\n ]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'List compact support-access summaries',\n request: PLATFORM_ACCESS_PAGE_REQUEST,\n response: platformAccessGrantPage([\n platformAccessPendingGrantSummaryExample,\n platformAccessActiveGrantSummaryExample,\n ]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.COUNT]: {\n purpose: 'Count temporary support-access requests for your organization.',\n outcome: 'The response returns the matching request total without transferring the request records.',\n whenToUse: 'Dashboards and access reviews that need a current tally rather than request details.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The number of support-access requests matching the caller\\'s organization and filters.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the organization-administrator authority required to review support access.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A service firm\\'s expert reaches this operation only through a live grant of the `APPROVE_ACCESS_GRANTS` capability the organization\\'s OWNER lent its relationship, with step-up and for a task-sized window (#1631); refused without one, and on the next request after a revocation.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Count support-access requests',\n request: { organizationId: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID },\n response: { count: 2 },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.DELETE]: {\n purpose: 'PURGE ONLY — remove grant rows when their tenant is destroyed. There is deliberately no client door.',\n outcome: 'The row is hard-deleted. Reachable exclusively by the ORGANIZATIONS `onParentDelete` cascade during a tenant purge; its single variant is INTERNAL_CALL, so it has no HTTP route and no client — of either party — can invoke it.',\n whenToUse: 'Never directly. It exists so the composition cascade has a verb it can call: a child declaring `onParentDelete` while omitting DELETE fails the registry\\'s composition-cascade-deletability guard, and at runtime would abort the parent tenant\\'s deletion the moment a grant row existed.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The grant record was removed as part of its tenant\\'s purge. Not observable over HTTP — the operation has no route.' },\n ],\n idempotent: true,\n },\n [PlatformAccessGrants_Operations.REQUEST_ACCESS]: {\n operationId: PlatformAccessGrants_Operations.REQUEST_ACCESS,\n purpose: 'Request time-boxed support access to one organization.',\n outcome: 'A request is recorded with the authenticated support operator as requester and a maximum four-hour window. Its status is `pending_approval` when the organization requires approval, otherwise `active` with an explicit automatic-approval reason. The organization is notified by email.',\n whenToUse: 'An authorized application support operator needs temporary access for support, incident response or administrative recovery.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The support-access request was recorded. Its `status` tells the operator whether access is active or awaiting an organization administrator\\'s decision.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The request body omits a non-empty `justification` or supplies a non-positive `requestedDurationMinutes`. The target organization is the required URL path parameter, not a duplicated body field. Durations above four hours are accepted but capped at four hours.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the application super-administrator authority required to request support access.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No organization exists for the supplied `organizationId`.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Request two hours of support access',\n request: {\n organizationId: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID,\n justification: platformAccessPendingGrantExample.justification,\n requestedDurationMinutes: 120,\n },\n response: platformAccessPendingGrantExample,\n forStatus: HttpResponseStatusCode.CREATED_201,\n }],\n communications: {\n email: {\n purpose: 'Tell the target tenant that a platform operator has asked to reach into their organization — before it happens, not after.',\n tone: TENANT_CONSENT_TONE,\n useWhen: 'An operator requests an elevation against this tenant, whether or not the tenant has opted into approval.',\n avoidWhen: 'Never suppressed. Under the approval posture this message IS the request, so withholding it would give a tenant a decision it never hears about; under the default posture it is the only notice the tenant gets that access was taken.',\n textSlots: {\n subject: {\n purpose: 'State in the subject line that a platform operator has requested access to this organization, and whether a decision is being asked for.',\n },\n },\n eventData: {\n purpose: 'Carry the operator\\'s identity, the justification they supplied verbatim, the window they were granted, and whether the tenant must approve before the access becomes usable.',\n },\n deliveries: [\n {\n audience: TENANT_CONSENT_AUDIENCE,\n targetRef: CoreUserNotificationTarget.ORGANIZATION_USERS,\n },\n ],\n notes: [\n 'Mirrors the single `userNotifications[]` entry declared on the runtime `requestAccess` operation (target=ORGANIZATION_USERS, channel=EMAIL). It is the only communication this resource emits — `approve`, `deny` and `revoke` declare none.',\n ],\n },\n },\n },\n [PlatformAccessGrants_Operations.APPROVE]: {\n operationId: PlatformAccessGrants_Operations.APPROVE,\n purpose: 'Approve a pending support-access request.',\n outcome: 'The request becomes `active`; the response records the approving administrator and decision time. Access remains usable only until it expires or is revoked.',\n whenToUse: 'An administrator of the requested organization has reviewed the requester, justification and time window and agrees to grant access.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The support-access request is now active, and its updated state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an administrator of the organization the request targets. A support operator cannot approve their own request.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A service firm\\'s expert reaches this operation only through a live grant of the `APPROVE_ACCESS_GRANTS` capability the organization\\'s OWNER lent its relationship, with step-up and for a task-sized window (#1631); refused without one, and on the next request after a revocation.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No request with the supplied id is visible in the caller\\'s organization.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The request is no longer `pending_approval`; an approved, denied, revoked or expired request cannot be approved again.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Approve a reviewed support request',\n request: {\n organizationId: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID,\n platformAccessGrantId: PLATFORM_ACCESS_PENDING_GRANT_ID,\n decisionReason: 'Approved for support case INC-4821.',\n },\n response: platformAccessActiveGrantExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [PlatformAccessGrants_Operations.DENY]: {\n operationId: PlatformAccessGrants_Operations.DENY,\n purpose: 'Deny a pending support-access request.',\n outcome: 'The request becomes `denied` and cannot be retried. Any later support need requires a new request.',\n whenToUse: 'An administrator of the requested organization has reviewed the request and declines access.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The support-access request was denied, and its final state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an administrator of the organization the request targets. A support operator cannot decide their own request.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A service firm\\'s expert reaches this operation only through a live grant of the `APPROVE_ACCESS_GRANTS` capability the organization\\'s OWNER lent its relationship, with step-up and for a task-sized window (#1631); refused without one, and on the next request after a revocation.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No request with the supplied id is visible in the caller\\'s organization.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The request is no longer `pending_approval`; it was already approved, denied, revoked or has expired.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Deny a support request',\n request: {\n organizationId: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID,\n platformAccessGrantId: PLATFORM_ACCESS_PENDING_GRANT_ID,\n decisionReason: 'The requested investigation is no longer required.',\n },\n response: {\n ...platformAccessPendingGrantExample,\n status: PlatformAccessGrantStatus.DENIED,\n decisionReason: 'The requested investigation is no longer required.',\n updatedAt: '2026-08-20T12:06:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [PlatformAccessGrants_Operations.REVOKE]: {\n operationId: PlatformAccessGrants_Operations.REVOKE,\n purpose: 'End pending or active support access early.',\n outcome: 'The request becomes `revoked` and access stops immediately instead of remaining available until the recorded expiry.',\n whenToUse: 'An organization withdraws access it approved, or an application support operator closes access as soon as the support work is complete.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The support-access request was revoked, and its final state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an administrator of the requested organization nor an application super-administrator.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A service firm\\'s expert reaches this operation only through a live grant of the `APPROVE_ACCESS_GRANTS` capability the organization\\'s OWNER lent its relationship, with step-up and for a task-sized window (#1631); refused without one, and on the next request after a revocation.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No request with the supplied id is visible to the caller.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The request is already denied, revoked or expired. Only a `pending_approval` or `active` request can be revoked.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Close support access after the investigation',\n request: {\n organizationId: PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID,\n platformAccessGrantId: PLATFORM_ACCESS_ACTIVE_GRANT_ID,\n decisionReason: 'Support case INC-4821 is resolved.',\n },\n response: {\n ...platformAccessActiveGrantExample,\n status: PlatformAccessGrantStatus.REVOKED,\n decisionReason: 'Support case INC-4821 is resolved.',\n updatedAt: '2026-08-20T12:42:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n\n businessConstraints: [\n 'A grant is required IN ADDITION to the operation variant\\'s `admitsCrossTenantPlatformAdministration` declaration, never instead of it. The declaration says \"this verb MAY cross\"; the grant says \"this operator MAY cross into THIS tenant, until THIS time, for THIS reason\". Neither is sufficient alone, and the roles gate runs independently of both.',\n '`requestAccess` is EXEMPT from the grant requirement it bootstraps. Gating it would be circular — an operator would need an elevation in order to ask for one — and the mechanism could never start. The exemption is safe because requesting is not accessing: the verb writes one row in the target tenant and touches nothing else, so the blast radius of an abused request is a notification, an audit row naming the operator, and a decision the tenant can refuse.',\n 'Usability is EVALUATED, never read off `status`. A grant counts only when it is ACTIVE and its `expiresAt` is still in the future, checked through the single shared predicate. A background transition to EXPIRED is bookkeeping for humans; if usability were read from the label alone, an outage in whatever performs that transition would silently restore standing access.',\n 'The 4-hour ceiling is enforced server-side by CLAMPING, not by refusing. A caller asking for longer simply gets the ceiling — being told \"ask again with a smaller number\" mid-incident is friction with no security benefit, since the ceiling is what actually binds.',\n 'Tenant approval is opt-in PER TENANT, matching Lockbox rather than a deployment-wide posture, so a tenant that has not staffed an approver is not thereby unable to receive support.',\n 'A tenant with no administratively usable owner cannot be required to approve its own repair — that is circular, and the administrative-continuity floors exist precisely because a tenant can reach that state. It is resolved by MEASUREMENT rather than exception: the grant is auto-approved with `TENANT_CANNOT_APPROVE`, evaluated with the SAME predicate the owner floor uses to refuse writes, so the two subsystems can never disagree about whether a tenant can administer itself. An operator cannot manufacture the condition either — stranding a tenant is exactly what the floors refuse.',\n 'Terminal statuses are how a grant ends. DENIED, EXPIRED and REVOKED are never edited back to life, and the row is never erased by either party: an elevation record either side could delete is not evidence. The only removal path is the tenant purge cascade, which destroys the tenant the record was about.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n);\n"]}
|
package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scim-provisioning-config.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/scim-provisioning-config.resource.specification.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAK5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAML,KAAK,2BAA2B,EACjC,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"scim-provisioning-config.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/scim-provisioning-config.resource.specification.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAK5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAML,KAAK,2BAA2B,EACjC,MAAM,6BAA6B,CAAC;AA2OrC,eAAO,MAAM,uDAAuD;;;;;;;;;;;;;;;;;;;;;iCAGnE,CAAC;AACF,eAAO,MAAM,sDAAsD;;;;;;;;;;;;;;;;;;;;;iCAGlE,CAAC"}
|