@wildo-ai/saas-specifications 1.1.0 → 1.1.2
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/assurance/external-framework-mapping.json +980 -0
- package/dist/esm/_core/brand/brand.family-aspects.d.ts +3 -0
- package/dist/esm/_core/brand/brand.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/brand/brand.family-aspects.js +51 -0
- package/dist/esm/_core/brand/brand.family-aspects.js.map +1 -0
- package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts +3 -0
- package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/build-plan/build-plan.family-aspects.js +28 -0
- package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -0
- package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts +3 -0
- package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/business-model-lite/business-model.family-aspects.js +21 -0
- package/dist/esm/_core/business-model-lite/business-model.family-aspects.js.map +1 -0
- package/dist/esm/_core/chart-view-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/chart-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/chart-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts +85 -0
- package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js +41 -0
- package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts +168 -2
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js +98 -9
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts +12 -0
- package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js +47 -0
- package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js.map +1 -0
- package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js +8 -3
- package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts +21 -0
- package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js +40 -0
- package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js.map +1 -0
- package/dist/esm/_core/composite-view-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/composite-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/composite-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts +3 -0
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js +32 -0
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js.map +1 -0
- package/dist/esm/_core/execution-view-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/execution-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/execution-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/family-aspects.registry.d.ts +18 -0
- package/dist/esm/_core/family-aspects.registry.d.ts.map +1 -0
- package/dist/esm/_core/family-aspects.registry.js +60 -0
- package/dist/esm/_core/family-aspects.registry.js.map +1 -0
- package/dist/esm/_core/family-aspects.schemas.d.ts +122 -0
- package/dist/esm/_core/family-aspects.schemas.d.ts.map +1 -0
- package/dist/esm/_core/family-aspects.schemas.js +15 -0
- package/dist/esm/_core/family-aspects.schemas.js.map +1 -0
- package/dist/esm/_core/feature-drafts/capability-map-output-set-generation.schemas.d.ts +11 -11
- package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts +3 -0
- package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js +25 -0
- package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js.map +1 -0
- package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/flows-actors-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/frontend-component-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/frontend-component-specification.schemas.js +19 -1
- package/dist/esm/_core/frontend-component-specification.schemas.js.map +1 -1
- package/dist/esm/_core/full-custom-view-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/full-custom-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/full-custom-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/guidance-flow-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/guidance-flow-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/guidance-flow-specification.schemas.js +14 -0
- package/dist/esm/_core/guidance-flow-specification.schemas.js.map +1 -1
- package/dist/esm/_core/index.d.ts +2 -0
- package/dist/esm/_core/index.d.ts.map +1 -1
- package/dist/esm/_core/index.js +2 -0
- package/dist/esm/_core/index.js.map +1 -1
- package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts +22 -22
- package/dist/esm/_core/market/market.family-aspects.d.ts +9 -0
- package/dist/esm/_core/market/market.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/market/market.family-aspects.js +227 -0
- package/dist/esm/_core/market/market.family-aspects.js.map +1 -0
- package/dist/esm/_core/onboarding-view-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/onboarding-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/onboarding-view-specification.schemas.js +14 -0
- package/dist/esm/_core/onboarding-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts +3 -0
- package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js +31 -0
- package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js.map +1 -0
- package/dist/esm/_core/requirements/requirements.family-aspects.d.ts +9 -0
- package/dist/esm/_core/requirements/requirements.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/requirements/requirements.family-aspects.js +40 -0
- package/dist/esm/_core/requirements/requirements.family-aspects.js.map +1 -0
- package/dist/esm/_core/resource-specification.schemas.d.ts +22 -0
- package/dist/esm/_core/resource-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/resource-specification.schemas.js.map +1 -1
- package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts +3 -0
- package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/roadmap/roadmap.family-aspects.js +26 -0
- package/dist/esm/_core/roadmap/roadmap.family-aspects.js.map +1 -0
- package/dist/esm/_core/vision/vision.family-aspects.d.ts +11 -0
- package/dist/esm/_core/vision/vision.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/vision/vision.family-aspects.js +63 -0
- package/dist/esm/_core/vision/vision.family-aspects.js.map +1 -0
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts +188 -33
- 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 +158 -57
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts +38 -4
- package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js +37 -3
- package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/document-facts.family-aspects.d.ts +12 -0
- package/dist/esm/application-creation/document-facts.family-aspects.d.ts.map +1 -0
- package/dist/esm/application-creation/document-facts.family-aspects.js +37 -0
- package/dist/esm/application-creation/document-facts.family-aspects.js.map +1 -0
- package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts +3 -0
- package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts.map +1 -0
- package/dist/esm/application-creation/document-release-policy.family-aspects.js +23 -0
- package/dist/esm/application-creation/document-release-policy.family-aspects.js.map +1 -0
- package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +93 -62
- package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/playbooks.application-creation.schemas.js +114 -59
- package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts +2 -0
- package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js +2 -0
- package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation.exports.d.ts +11 -0
- package/dist/esm/application-creation.exports.d.ts.map +1 -1
- package/dist/esm/application-creation.exports.js +11 -0
- package/dist/esm/application-creation.exports.js.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +976 -2
- package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.definitions.js +2026 -61
- package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts +1 -0
- package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-document-system.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-document-system.definitions.js +18 -3
- package/dist/esm/assurance/assurance-document-system.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-document-system.schemas.d.ts +32 -2
- package/dist/esm/assurance/assurance-document-system.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-document-system.schemas.js +32 -2
- package/dist/esm/assurance/assurance-document-system.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-external-framework-mapping.d.ts +90 -0
- package/dist/esm/assurance/assurance-external-framework-mapping.d.ts.map +1 -0
- package/dist/esm/assurance/assurance-external-framework-mapping.js +134 -0
- package/dist/esm/assurance/assurance-external-framework-mapping.js.map +1 -0
- package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts +71 -1
- package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-objective-catalog.definitions.js +545 -5
- package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-program-generation.schemas.d.ts +141 -0
- package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -0
- package/dist/esm/assurance/assurance-program-generation.schemas.js +377 -0
- package/dist/esm/assurance/assurance-program-generation.schemas.js.map +1 -0
- package/dist/esm/assurance/assurance-program.family-aspects.d.ts +13 -0
- package/dist/esm/assurance/assurance-program.family-aspects.d.ts.map +1 -0
- package/dist/esm/assurance/assurance-program.family-aspects.js +16 -0
- package/dist/esm/assurance/assurance-program.family-aspects.js.map +1 -0
- package/dist/esm/assurance/assurance-program.schemas.d.ts +30 -6
- package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-program.schemas.js +29 -6
- package/dist/esm/assurance/assurance-program.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-source-registry.definitions.d.ts +1 -0
- package/dist/esm/assurance/assurance-source-registry.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-source-registry.definitions.js +12 -0
- package/dist/esm/assurance/assurance-source-registry.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-sources.schemas.d.ts +76 -0
- package/dist/esm/assurance/assurance-sources.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-sources.schemas.js +59 -0
- package/dist/esm/assurance/assurance-sources.schemas.js.map +1 -1
- package/dist/esm/assurance/document-publication.family-aspects.d.ts +29 -0
- package/dist/esm/assurance/document-publication.family-aspects.d.ts.map +1 -0
- package/dist/esm/assurance/document-publication.family-aspects.js +48 -0
- package/dist/esm/assurance/document-publication.family-aspects.js.map +1 -0
- package/dist/esm/assurance.exports.d.ts +2 -0
- package/dist/esm/assurance.exports.d.ts.map +1 -1
- package/dist/esm/assurance.exports.js +2 -0
- package/dist/esm/assurance.exports.js.map +1 -1
- package/dist/esm/companion-exports.d.ts +19 -2
- 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.map +1 -1
- package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js +2 -0
- 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 +3 -1
- 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 +3 -1
- 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 +3 -1
- 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 +3 -1
- package/dist/esm/engine/applications/resources/applications.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts +36 -0
- package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js +193 -0
- package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js.map +1 -0
- package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts +1 -1
- package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js +2 -0
- package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js +2 -0
- 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.map +1 -1
- package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js +3 -1
- package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts +1 -1
- package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js +2 -0
- 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 +2 -0
- package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js +2 -0
- 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 +2 -0
- 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 +6 -4
- 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 +2 -0
- 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.map +1 -1
- package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js +2 -0
- package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts +2 -2
- package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js +2 -0
- package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts +8 -8
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js +2 -0
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts +2 -2
- package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js +2 -0
- 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 +3 -1
- package/dist/esm/engine/billing/resources/prices.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/products.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/products.resource.specification.js +3 -1
- 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 +2 -0
- package/dist/esm/engine/billing/resources/promotions.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/referrals.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/referrals.resource.specification.js +3 -1
- package/dist/esm/engine/billing/resources/referrals.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts +6 -6
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js +2 -0
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts +6 -6
- package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/usage-records.resource.specification.js +2 -0
- package/dist/esm/engine/billing/resources/usage-records.resource.specification.js.map +1 -1
- package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js +2 -0
- package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js.map +1 -1
- package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
- package/dist/esm/engine/engine-resource-specifications.registry.js +5 -0
- package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
- package/dist/esm/engine/engine-resource-sub-domain.d.ts +63 -0
- package/dist/esm/engine/engine-resource-sub-domain.d.ts.map +1 -0
- package/dist/esm/engine/engine-resource-sub-domain.js +87 -0
- package/dist/esm/engine/engine-resource-sub-domain.js.map +1 -0
- package/dist/esm/engine/errors/error-messages.specification.d.ts.map +1 -1
- package/dist/esm/engine/errors/error-messages.specification.js +30 -1
- package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
- package/dist/esm/engine/features/resources/application-features.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/features/resources/application-features.resource.specification.js +2 -0
- package/dist/esm/engine/features/resources/application-features.resource.specification.js.map +1 -1
- package/dist/esm/engine/features/resources/organization-features.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/features/resources/organization-features.resource.specification.js +2 -0
- package/dist/esm/engine/features/resources/organization-features.resource.specification.js.map +1 -1
- package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts +1 -1
- package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/features/resources/user-features.resource.specification.js +2 -0
- 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 +2 -0
- package/dist/esm/engine/files/resources/files.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts +3 -3
- package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js +12 -0
- package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts +3 -3
- package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js +2 -0
- package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts +3 -3
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js +2 -0
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts +3 -3
- package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js +3 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js +8 -3
- package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts +1 -1
- package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js +3 -0
- package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts +1 -1
- package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js +3 -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 +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 +3 -0
- package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/index.d.ts +1 -0
- package/dist/esm/engine/index.d.ts.map +1 -1
- package/dist/esm/engine/index.js +1 -0
- package/dist/esm/engine/index.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js +2 -0
- package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js +2 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js +2 -0
- 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.map +1 -1
- package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js +2 -0
- package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js.map +1 -1
- package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js +2 -0
- package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js.map +1 -1
- package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts +1 -1
- package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js +3 -0
- package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js.map +1 -1
- package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js +2 -0
- package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts +1 -1
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js +2 -0
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js +2 -0
- package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js +2 -0
- package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js +2 -0
- 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 +2 -0
- package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-units.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js +2 -0
- package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organizations.resource.specification.js +2 -0
- package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/anonymous-users.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js +2 -0
- package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts +1 -1
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js +2 -0
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts +1 -1
- package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-credentials.resource.specification.js +2 -0
- package/dist/esm/engine/users/resources/user-credentials.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts +1 -1
- package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js +2 -0
- package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts +1 -1
- 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 +2 -0
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts +1 -1
- package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-profiles.resource.specification.js +2 -0
- 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 +1 -1
- 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 +2 -0
- package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts +1 -1
- package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js +2 -0
- 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 +3 -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.map +1 -1
- package/dist/esm/engine/users/resources/users.resource.specification.js +2 -0
- package/dist/esm/engine/users/resources/users.resource.specification.js.map +1 -1
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts +5 -0
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts.map +1 -1
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js +385 -9
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-units.schemas.js +1 -1
- package/dist/esm/technical-documentation/technical-documentation-units.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +8 -8
- package/dist/esm/.builder.pid +0 -9
- package/dist/esm/_core/business-coverage/coverage-findings-validation.d.ts +0 -0
- package/dist/esm/_core/business-coverage/coverage-findings-validation.d.ts.map +0 -0
- package/dist/esm/_core/business-coverage/coverage-findings-validation.js.map +0 -0
- package/dist/esm/_core/business-coverage/coverage-findings.schemas.d.ts +0 -0
- package/dist/esm/_core/business-coverage/coverage-findings.schemas.d.ts.map +0 -0
- package/dist/esm/_core/business-coverage/coverage-findings.schemas.js.map +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-self.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-self.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,0BAA0B,IAAI,gCAAgC,EAAE,MAAM,8BAA8B,CAAC;AAC9G,OAAO,EAAE,a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QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,2CAA2C,EAAE,SAAS,EAAE,gCAAgC,EAAE;QAChH,yEAAyE;QACzE,4FAA4F;QAC5F,2DAA2D;QAC3D,8FAA8F;QAC9F,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,EAAE,EAAE,OAAO,EAAE,qCAAqC,EAAE,SAAS,EAAE,+CAA+C,EAAE;QACxJ,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,EAAE,EAAE,OAAO,EAAE,uCAAuC,EAAE,SAAS,EAAE,yCAAyC,EAAE;KACrJ;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `user_self` — Wildo SaaS engine specification (mixed).\n *\n * Self-service identity surface: same `UserSchema` as administrative `USERS` but a distinct `CoreResourceType` with\n * `APP_USER` operations and self-notifications. Preset: `userSelfResourceUIBehavior` (identity main).\n *\n * Runtime: `engine/saas-models/src/users/user-self.shared.resources-config.schemas.ts`\n */\n\nimport { userSelfResourceUIBehavior as userSelfResourceUIBehaviorSource } from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n UserSchema,\n UserSelf_Operations,\n UserStatus,\n userSelfResourceConfiguration_InitializationFactory as userSelfFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n RETENTION_MARKER_FIELD_SPECS,\n} from '~wildo-specifications/_core';\n\nimport {\n selfServiceFrontEndSuccessNotification,\n selfServiceUserEmailBlock,\n} from './self-service-user-notifications.shared';\nimport {\n USERS_API_REFERENCE_USER_ID,\n usersApiReferenceExample,\n usersApiReferenceSummaryExample,\n} from './users-api-reference.examples';\n\ntype UserSelfConfig = ReturnType<typeof userSelfFactory>;\ntype UserSelfCustom = NonNullable<UserSelfConfig['customOperation']>;\ntype UserSelfCore = UserSelfConfig['coreOperations'][number];\ntype UserSelfSchema = UserSelfConfig['mainSchema'];\n\nconst userSelfResourceUIBehavior = userSelfResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n UserSelfCustom,\n UserSelfCore,\n UserSelfSchema\n>;\n\nexport const userSelfResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(userSelfResourceUIBehavior),\n resourceSpecification(\n userSelfFactory,\n UserSchema,\n ({ schemaShape }) => ({\n purpose: 'Let the signed-in end user read and change their own identity row within safe, self-scoped API surfaces.',\n businessRole: 'The user-facing counterpart to the administrative `USERS` resource — same schema, stricter access rules.',\n lifecycleRole: 'Exposes self-identity reads plus voluntary deactivation and reactivation, distinct from administrator-imposed suspension and erasure workflows.',\n audience: LabelAudience.END_USER,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userSelfResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'USER_SELF',\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: 'UserSelf_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'userSelfResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n notes: [\n 'DF-1: every `userNotifications[]` entry in the factory is mirrored in `operations[].communications` — FRONT_END_SUCCESS and EMAIL channels per runtime.',\n ],\n },\n\n /**\n * `USERS` / `USER_SELF` declare `retentionPolicy`, so the resource factory injects the two\n * retention markers. They are absent from `UserSchema`, so the field-spec extractor cannot see\n * them and they must be declared here — see `RETENTION_MARKER_FIELD_SPECS` for why the documented\n * meaning is load-bearing on fields that render nowhere.\n */\n additionalFieldSpecs: [...RETENTION_MARKER_FIELD_SPECS],\n\n fields: {\n email: schemaShape.email.stringSpec({\n meaning: 'Primary identity email for the signed-in user in self-service context.',\n whyItMatters: 'Shown in self profile surfaces and used as the default login identifier.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n status: schemaShape.status.enumSpec({\n meaning: 'Lifecycle and access state of the user account (active, suspended, etc.).',\n whyItMatters: 'Self-service flows must respect deactivation, suspension, and pending invitation states.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [UserStatus.ACTIVE]: { meaning: 'The user may access the app under normal policy.' },\n [UserStatus.INACTIVE]: { meaning: 'Access removed while the account record still exists.' },\n [UserStatus.SUSPENDED]: { meaning: 'Blocked by operators until a reinstatement path runs.' },\n [UserStatus.PENDING_VERIFICATION]: { meaning: 'The email or identity is not yet verified.' },\n [UserStatus.PENDING_INVITATION]: { meaning: 'Invitation is outstanding; sign-in is not yet complete.' },\n [UserStatus.DELETED]: { meaning: 'Soft-deleted — identity retained for audit only.' },\n },\n }),\n\n scheduledReactivationAt: schemaShape.scheduledReactivationAt.dateSpec({\n meaning: 'When an automated sweep returns this account to ACTIVE. Written only by admin SUSPEND_USER on the `USERS` door (from its `suspensionDuration`, resolved to an instant); the self door never sets it, and REACTIVATE_ACCOUNT clears any value it finds. So on a self-deactivated account this is absent, and the subject reactivates deliberately.',\n whyItMatters: '`USERS` and `USER_SELF` are two doors onto one row, so the field means the same thing on both — but only one of them writes it. DEACTIVATE_ACCOUNT used to, from a `reactivationDate` the sweep could never honour (no door exists that a system principal can use to lift INACTIVE); that field was removed rather than left accepted-and-dropped. Server-owned throughout: only the transition verbs write it.',\n }),\n\n appRoles: schemaShape.appRoles.arraySpec({\n meaning: 'Application-level roles the user currently holds (self can read; mutation goes through other resources).',\n whyItMatters: 'Drives which self-service or admin features appear for this identity.',\n elementMeaning: 'One app-role token from the shared framework role vocabulary or tenant string.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CORE_APP_ROLES',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n notes: ['Array elements are union(framework role enum, string) at the Zod layer.'],\n },\n }),\n\n userTypes: schemaShape.userTypes.arraySpec({\n meaning: 'Business classification tags that influence journeys and policy.',\n elementMeaning: 'One `userType` string key from application configuration.',\n elementType: { notes: ['Not a fixed framework enum — values are app-declared.'] },\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Return the caller’s own `User` row for account settings and context hydration.',\n outcome: 'The client can render identity, status, and high-level role posture without org-admin rights.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The signed-in user’s own identity row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session, so there is no self identity to resolve.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The authenticated caller addresses a `userId` other than their own.' },\n ],\n idempotent: true,\n variants: {\n default: {\n examples: [\n {\n title: 'Read the signed-in user identity',\n request: { userId: USERS_API_REFERENCE_USER_ID },\n response: usersApiReferenceExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n context: {\n purpose: 'Return the caller’s own user row together with the available self-profile, preference and organization-membership context.',\n outcome: 'The client can hydrate a signed-in account surface without separately fetching each related self-service record.',\n examples: [\n {\n title: 'Read the signed-in user with account context',\n request: { userId: USERS_API_REFERENCE_USER_ID },\n response: {\n ...usersApiReferenceExample,\n userSelfProfile: { displayName: 'Alex Morgan' },\n userSelfPreference: { locale: 'en' },\n organizationMembers: [{ _id: 'organization_member_01HX2EXAMPLE' }],\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n summary: {\n purpose: 'Return the compact identity representation of the signed-in user.',\n outcome: 'The client receives only the identity, email, status and creation timestamp required by lightweight account surfaces.',\n examples: [\n {\n title: 'Read the signed-in user summary',\n request: { userId: USERS_API_REFERENCE_USER_ID },\n response: usersApiReferenceSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n [Op.UPDATE]: {\n purpose: 'Provide the route-less internal UPDATE transport borrowed by the dedicated self lifecycle verbs.',\n outcome: 'No direct self-service HTTP UPDATE route is exposed for the core user row; profile and preference edits use their dedicated child resources.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The self-editable fields were updated and the new identity state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'An edited field is not self-editable or fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n ],\n idempotent: true,\n communications: {\n notification: selfServiceFrontEndSuccessNotification(\n 'Non-email confirmation that a generic self UPDATE succeeded in the UI (runtime FRONT_END_SUCCESS on USER_SELF).',\n ),\n },\n },\n // `DELETE_ACCOUNT` was REMOVED on 2026-08-01. This spec documented the scheduled semantic\n // (202 accepted + enqueued, 409 already scheduled) while the configuration performed an\n // immediate hard delete — with the password confirmation discarded, a response contract no\n // producer could satisfy (guaranteed HTTP 500), a nondeterministic destructive effect, and a\n // direct contradiction of the resource's `RETAIN_AND_IMPERSONALIZE` retention policy.\n // Data-subject erasure is a system-level API with no route (`eraseSubjectAsSystem`), the same\n // ruling that removed the four export/portability verbs. Voluntary closure is\n // `DEACTIVATE_ACCOUNT` below. Full rationale on the `UserSelf_Operations` enum.\n [UserSelf_Operations.DEACTIVATE_ACCOUNT]: {\n operationId: UserSelf_Operations.DEACTIVATE_ACCOUNT,\n purpose: 'Temporarily disable access while retaining the identity record.',\n outcome: 'The account moves from ACTIVE to INACTIVE and access stops immediately. It remains inactive until the same user calls REACTIVATE_ACCOUNT; there is no scheduled automatic return. INACTIVE is voluntary and distinct from an administrator-imposed SUSPENDED state.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The account is in the deactivated state and the updated identity row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The authenticated caller addresses a `userId` other than their own.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The account is not ACTIVE, so voluntary deactivation is not a legal transition from its current state (already inactive, suspended, or scheduled for deletion). Carries `resource_status_transition_conflict`, whose context names the current status, the target status and the permitted source statuses.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The caller is the LAST administratively usable application super-administrator. Deactivating leaves ACTIVE — the only status that can authenticate — so the application would be left with no principal able to administer it, and every recovery door is gated on that same role. Grant the role to another active user first. This is the self-service door onto the same rule the admin `suspend_user` verb enforces, and carries the same stable client-branchable `code: LAST_SUPER_ADMINISTRATOR`.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Deactivate the signed-in account indefinitely',\n request: {\n userId: USERS_API_REFERENCE_USER_ID,\n reason: 'I am taking a break from the application.',\n },\n response: {\n ...usersApiReferenceExample,\n status: UserStatus.INACTIVE,\n updatedAt: '2026-08-20T15:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: {\n email: selfServiceUserEmailBlock({\n opPurpose: 'Notify the user that deactivation was applied (EMAIL channel in runtime).',\n subjectSlotPurpose: 'State clearly that the account is deactivated and what reactivation requires.',\n eventDataPurpose: 'Capture the optional user-provided reason without recording credentials or unrelated identity data.',\n }),\n },\n },\n [UserSelf_Operations.REACTIVATE_ACCOUNT]: {\n operationId: UserSelf_Operations.REACTIVATE_ACCOUNT,\n purpose: 'Restore access after the signed-in user previously deactivated their own account.',\n outcome: 'The account returns from INACTIVE to ACTIVE immediately and normal access resumes under its current roles and authentication policy.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The account returned to the active state and the updated identity row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The authenticated caller addresses a `userId` other than their own.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The account is not INACTIVE, so there is no voluntary self-deactivation to reverse.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Reactivate the signed-in account',\n request: { userId: USERS_API_REFERENCE_USER_ID },\n response: {\n ...usersApiReferenceExample,\n status: UserStatus.ACTIVE,\n updatedAt: '2026-08-20T15:30:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: {\n email: selfServiceUserEmailBlock({\n opPurpose: 'Confirm successful reactivation to the end user (EMAIL).',\n subjectSlotPurpose: 'Announce the account is active again and link to first steps.',\n eventDataPurpose: 'Summarize the prior state and new status after reactivation.',\n }),\n },\n },\n },\n\n businessConstraints: [\n 'This resource references `UserSchema` but is a different `CoreResourceType` than `USERS` — never merge authorization tables between the two without checking route + role matrices.',\n 'Profile and preference documents are NOT written through this resource — they are separate rows owned by `userSelfProfiles` / `userSelfPreferences`, and companion prompts must point engineers there. The `update_profile` / `update_preferences` shortcut verbs that re-used those schemas as their request DTOs were removed on 2026-08-01: an operation here runs against `UserSchema`, so a core UPDATE dropped every declared field and answered 200 having persisted nothing. A future single self-rooted write across these children cannot be a core UPDATE either; it would require a custom multi-resource implementation declaring `transactionParticipants`.',\n 'This resource and `users` are two doors onto the SAME stored user records, so they must always declare the SAME retention posture. Opting only one in would leave an erased identity readable and updatable through the other door, and would place a second, unscoped uniqueness constraint on the email — which the next erasure would then collide with, aborting it. Change the two together.',\n 'The collection and bulk-update operations here exist only to serve that retention contract — the audited see-through read of retained records, and the trusted in-place scrub. Neither is exposed over HTTP: there is deliberately no self-service enumeration or bulk mutation of identity records.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n ),\n () => ({\n layout: {\n purpose: 'Present self identity as a compact account card: who I am, how I access, and when the record last moved.',\n displayPurpose: 'Read/update flows in the end-user app shell.',\n summaryPurpose: 'Lightweight list cards when the user is referenced in relationship panels.',\n sections: {\n overview: {\n purpose: 'Email + status, the first things a user checks in “My account”.',\n whenToUse: 'Default for self-identity overviews and edit forms that touch core identity fields directly.',\n textSlots: {\n title: { purpose: 'Label the self-identity primary section.' },\n description: { purpose: 'Explain that this is the end-user’s own record, not org directory administration.' },\n },\n },\n access: {\n purpose: 'Roles and user-type metadata that change what the product allows.',\n whenToUse: 'When the signed-in user reviews why a feature is enabled or disabled (read-only here).',\n textSlots: {\n title: { purpose: 'Label the access/roles area for self-identity views.' },\n description: { purpose: 'Clarify that material role assignment still flows through org-admin `USERS` in most products.' },\n },\n },\n lifecycle: {\n purpose: 'Created/updated timestamps and lifecycle hints for the identity row.',\n whenToUse: 'Audit-friendly read panels or export explanations.',\n textSlots: {\n title: { purpose: 'Label lifecycle/audit information on the self record.' },\n description: { purpose: 'Reiterate that some lifecycle moves (suspension) may be operator-driven outside self-service.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Read-only self identity for settings hub.', whenToUse: 'When rendering “Account” home.' },\n // Profile and preferences editing views belong to `USER_SELF_PROFILES` /\n // `USER_SELF_PREFERENCES` — the `UPDATE_PROFILE` / `UPDATE_PREFERENCES` shortcut verbs were\n // removed on 2026-08-01 (see `businessConstraints` below).\n // No self-delete view: `DELETE_ACCOUNT` was removed on 2026-08-01 (see the operations block).\n [UserSelf_Operations.DEACTIVATE_ACCOUNT]: { purpose: 'Pause access without full deletion.', whenToUse: '“Take a break” or parental controls patterns.' },\n [UserSelf_Operations.REACTIVATE_ACCOUNT]: { purpose: 'Return to active from inactive state.', whenToUse: 'Reactivation CTA when policy allows it.' },\n },\n }),\n);\n"]}
|
|
1
|
+
{"version":3,"file":"user-self.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-self.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,0BAA0B,IAAI,gCAAgC,EAAE,MAAM,8BAA8B,CAAC;AAC9G,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,UAAU,EACV,mBAAmB,EACnB,UAAU,EACV,mDAAmD,IAAI,eAAe,GACvE,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,EAC9C,4BAA4B,GAC7B,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,sCAAsC,EACtC,yBAAyB,GAC1B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,+BAA+B,GAChC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAO3E,MAAM,0BAA0B,GA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0G;QACnH,cAAc,EAAE,8CAA8C;QAC9D,cAAc,EAAE,4EAA4E;QAC5F,QAAQ,EAAE;YACR,QAAQ,EAAE;gBACR,OAAO,EAAE,iEAAiE;gBAC1E,SAAS,EAAE,8FAA8F;gBACzG,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,0CAA0C,EAAE;oBAC9D,WAAW,EAAE,EAAE,OAAO,EAAE,mFAAmF,EAAE;iBAC9G;aACF;YACD,MAAM,EAAE;gBACN,OAAO,EAAE,mEAAmE;gBAC5E,SAAS,EAAE,wFAAwF;gBACnG,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,sDAAsD,EAAE;oBAC1E,WAAW,EAAE,EAAE,OAAO,EAAE,+FAA+F,EAAE;iBAC1H;aACF;YACD,SAAS,EAAE;gBACT,OAAO,EAAE,sEAAsE;gBAC/E,SAAS,EAAE,oDAAoD;gBAC/D,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,uDAAuD,EAAE;oBAC3E,WAAW,EAAE,EAAE,OAAO,EAAE,+FAA+F,EAAE;iBAC1H;aACF;SACF;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,2CAA2C,EAAE,SAAS,EAAE,gCAAgC,EAAE;QAChH,yEAAyE;QACzE,4FAA4F;QAC5F,2DAA2D;QAC3D,8FAA8F;QAC9F,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,EAAE,EAAE,OAAO,EAAE,qCAAqC,EAAE,SAAS,EAAE,+CAA+C,EAAE;QACxJ,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,EAAE,EAAE,OAAO,EAAE,uCAAuC,EAAE,SAAS,EAAE,yCAAyC,EAAE;KACrJ;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `user_self` — Wildo SaaS engine specification (mixed).\n *\n * Self-service identity surface: same `UserSchema` as administrative `USERS` but a distinct `CoreResourceType` with\n * `APP_USER` operations and self-notifications. Preset: `userSelfResourceUIBehavior` (identity main).\n *\n * Runtime: `engine/saas-models/src/users/user-self.shared.resources-config.schemas.ts`\n */\n\nimport { userSelfResourceUIBehavior as userSelfResourceUIBehaviorSource } from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n UserSchema,\n UserSelf_Operations,\n UserStatus,\n userSelfResourceConfiguration_InitializationFactory as userSelfFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n RETENTION_MARKER_FIELD_SPECS,\n} from '~wildo-specifications/_core';\n\nimport {\n selfServiceFrontEndSuccessNotification,\n selfServiceUserEmailBlock,\n} from './self-service-user-notifications.shared';\nimport {\n USERS_API_REFERENCE_USER_ID,\n usersApiReferenceExample,\n usersApiReferenceSummaryExample,\n} from './users-api-reference.examples';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype UserSelfConfig = ReturnType<typeof userSelfFactory>;\ntype UserSelfCustom = NonNullable<UserSelfConfig['customOperation']>;\ntype UserSelfCore = UserSelfConfig['coreOperations'][number];\ntype UserSelfSchema = UserSelfConfig['mainSchema'];\n\nconst userSelfResourceUIBehavior = userSelfResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n UserSelfCustom,\n UserSelfCore,\n UserSelfSchema\n>;\n\nexport const userSelfResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(userSelfResourceUIBehavior),\n resourceSpecification(\n userSelfFactory,\n UserSchema,\n ({ schemaShape }) => ({\n purpose: 'The signed-in person\\'s own account: read it and change what belongs to you, and nothing about anyone else.',\n businessRole: 'The user-facing counterpart to the administrative `USERS` resource — same schema, stricter access rules.',\n lifecycleRole: 'Exposes self-identity reads plus voluntary deactivation and reactivation, distinct from administrator-imposed suspension and erasure workflows.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.USERS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userSelfResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'USER_SELF',\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: 'UserSelf_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'userSelfResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n notes: [\n 'DF-1: every `userNotifications[]` entry in the factory is mirrored in `operations[].communications` — FRONT_END_SUCCESS and EMAIL channels per runtime.',\n ],\n },\n\n /**\n * `USERS` / `USER_SELF` declare `retentionPolicy`, so the resource factory injects the two\n * retention markers. They are absent from `UserSchema`, so the field-spec extractor cannot see\n * them and they must be declared here — see `RETENTION_MARKER_FIELD_SPECS` for why the documented\n * meaning is load-bearing on fields that render nowhere.\n */\n additionalFieldSpecs: [...RETENTION_MARKER_FIELD_SPECS],\n\n fields: {\n email: schemaShape.email.stringSpec({\n meaning: 'Primary identity email for the signed-in user in self-service context.',\n whyItMatters: 'Shown in self profile surfaces and used as the default login identifier.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n status: schemaShape.status.enumSpec({\n meaning: 'Lifecycle and access state of the user account (active, suspended, etc.).',\n whyItMatters: 'Self-service flows must respect deactivation, suspension, and pending invitation states.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [UserStatus.ACTIVE]: { meaning: 'The user may access the app under normal policy.' },\n [UserStatus.INACTIVE]: { meaning: 'Access removed while the account record still exists.' },\n [UserStatus.SUSPENDED]: { meaning: 'Blocked by operators until a reinstatement path runs.' },\n [UserStatus.PENDING_VERIFICATION]: { meaning: 'The email or identity is not yet verified.' },\n [UserStatus.PENDING_INVITATION]: { meaning: 'Invitation is outstanding; sign-in is not yet complete.' },\n [UserStatus.DELETED]: { meaning: 'Soft-deleted — identity retained for audit only.' },\n },\n }),\n\n scheduledReactivationAt: schemaShape.scheduledReactivationAt.dateSpec({\n meaning: 'When an automated sweep returns this account to ACTIVE. Written only by admin SUSPEND_USER on the `USERS` door (from its `suspensionDuration`, resolved to an instant); the self door never sets it, and REACTIVATE_ACCOUNT clears any value it finds. So on a self-deactivated account this is absent, and the subject reactivates deliberately.',\n whyItMatters: '`USERS` and `USER_SELF` are two doors onto one row, so the field means the same thing on both — but only one of them writes it. DEACTIVATE_ACCOUNT used to, from a `reactivationDate` the sweep could never honour (no door exists that a system principal can use to lift INACTIVE); that field was removed rather than left accepted-and-dropped. Server-owned throughout: only the transition verbs write it.',\n }),\n\n appRoles: schemaShape.appRoles.arraySpec({\n meaning: 'Application-level roles the user currently holds (self can read; mutation goes through other resources).',\n whyItMatters: 'Drives which self-service or admin features appear for this identity.',\n elementMeaning: 'One app-role token from the shared framework role vocabulary or tenant string.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CORE_APP_ROLES',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n notes: ['Array elements are union(framework role enum, string) at the Zod layer.'],\n },\n }),\n\n userTypes: schemaShape.userTypes.arraySpec({\n meaning: 'Business classification tags that influence journeys and policy.',\n elementMeaning: 'One `userType` string key from application configuration.',\n elementType: { notes: ['Not a fixed framework enum — values are app-declared.'] },\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Return the caller’s own `User` row for account settings and context hydration.',\n outcome: 'The client can render identity, status, and high-level role posture without org-admin rights.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The signed-in user’s own identity row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session, so there is no self identity to resolve.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The authenticated caller addresses a `userId` other than their own.' },\n ],\n idempotent: true,\n variants: {\n default: {\n examples: [\n {\n title: 'Read the signed-in user identity',\n request: { userId: USERS_API_REFERENCE_USER_ID },\n response: usersApiReferenceExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n context: {\n purpose: 'Return the caller’s own user row together with the available self-profile, preference and organization-membership context.',\n outcome: 'The client can hydrate a signed-in account surface without separately fetching each related self-service record.',\n examples: [\n {\n title: 'Read the signed-in user with account context',\n request: { userId: USERS_API_REFERENCE_USER_ID },\n response: {\n ...usersApiReferenceExample,\n userSelfProfile: { displayName: 'Alex Morgan' },\n userSelfPreference: { locale: 'en' },\n organizationMembers: [{ _id: 'organization_member_01HX2EXAMPLE' }],\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n summary: {\n purpose: 'Return the compact identity representation of the signed-in user.',\n outcome: 'The client receives only the identity, email, status and creation timestamp required by lightweight account surfaces.',\n examples: [\n {\n title: 'Read the signed-in user summary',\n request: { userId: USERS_API_REFERENCE_USER_ID },\n response: usersApiReferenceSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n [Op.UPDATE]: {\n purpose: 'Provide the route-less internal UPDATE transport borrowed by the dedicated self lifecycle verbs.',\n outcome: 'No direct self-service HTTP UPDATE route is exposed for the core user row; profile and preference edits use their dedicated child resources.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The self-editable fields were updated and the new identity state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'An edited field is not self-editable or fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n ],\n idempotent: true,\n communications: {\n notification: selfServiceFrontEndSuccessNotification(\n 'Non-email confirmation that a generic self UPDATE succeeded in the UI (runtime FRONT_END_SUCCESS on USER_SELF).',\n ),\n },\n },\n // `DELETE_ACCOUNT` was REMOVED on 2026-08-01. This spec documented the scheduled semantic\n // (202 accepted + enqueued, 409 already scheduled) while the configuration performed an\n // immediate hard delete — with the password confirmation discarded, a response contract no\n // producer could satisfy (guaranteed HTTP 500), a nondeterministic destructive effect, and a\n // direct contradiction of the resource's `RETAIN_AND_IMPERSONALIZE` retention policy.\n // Data-subject erasure is a system-level API with no route (`eraseSubjectAsSystem`), the same\n // ruling that removed the four export/portability verbs. Voluntary closure is\n // `DEACTIVATE_ACCOUNT` below. Full rationale on the `UserSelf_Operations` enum.\n [UserSelf_Operations.DEACTIVATE_ACCOUNT]: {\n operationId: UserSelf_Operations.DEACTIVATE_ACCOUNT,\n purpose: 'Temporarily disable access while retaining the identity record.',\n outcome: 'The account moves from ACTIVE to INACTIVE and access stops immediately. It remains inactive until the same user calls REACTIVATE_ACCOUNT; there is no scheduled automatic return. INACTIVE is voluntary and distinct from an administrator-imposed SUSPENDED state.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The account is in the deactivated state and the updated identity row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The authenticated caller addresses a `userId` other than their own.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The account is not ACTIVE, so voluntary deactivation is not a legal transition from its current state (already inactive, suspended, or scheduled for deletion). Carries `resource_status_transition_conflict`, whose context names the current status, the target status and the permitted source statuses.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The caller is the LAST administratively usable application super-administrator. Deactivating leaves ACTIVE — the only status that can authenticate — so the application would be left with no principal able to administer it, and every recovery door is gated on that same role. Grant the role to another active user first. This is the self-service door onto the same rule the admin `suspend_user` verb enforces, and carries the same stable client-branchable `code: LAST_SUPER_ADMINISTRATOR`.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Deactivate the signed-in account indefinitely',\n request: {\n userId: USERS_API_REFERENCE_USER_ID,\n reason: 'I am taking a break from the application.',\n },\n response: {\n ...usersApiReferenceExample,\n status: UserStatus.INACTIVE,\n updatedAt: '2026-08-20T15:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: {\n email: selfServiceUserEmailBlock({\n opPurpose: 'Notify the user that deactivation was applied (EMAIL channel in runtime).',\n subjectSlotPurpose: 'State clearly that the account is deactivated and what reactivation requires.',\n eventDataPurpose: 'Capture the optional user-provided reason without recording credentials or unrelated identity data.',\n }),\n },\n },\n [UserSelf_Operations.REACTIVATE_ACCOUNT]: {\n operationId: UserSelf_Operations.REACTIVATE_ACCOUNT,\n purpose: 'Restore access after the signed-in user previously deactivated their own account.',\n outcome: 'The account returns from INACTIVE to ACTIVE immediately and normal access resumes under its current roles and authentication policy.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The account returned to the active state and the updated identity row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The authenticated caller addresses a `userId` other than their own.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The account is not INACTIVE, so there is no voluntary self-deactivation to reverse.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Reactivate the signed-in account',\n request: { userId: USERS_API_REFERENCE_USER_ID },\n response: {\n ...usersApiReferenceExample,\n status: UserStatus.ACTIVE,\n updatedAt: '2026-08-20T15:30:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: {\n email: selfServiceUserEmailBlock({\n opPurpose: 'Confirm successful reactivation to the end user (EMAIL).',\n subjectSlotPurpose: 'Announce the account is active again and link to first steps.',\n eventDataPurpose: 'Summarize the prior state and new status after reactivation.',\n }),\n },\n },\n },\n\n businessConstraints: [\n 'This resource references `UserSchema` but is a different `CoreResourceType` than `USERS` — never merge authorization tables between the two without checking route + role matrices.',\n 'Profile and preference documents are NOT written through this resource — they are separate rows owned by `userSelfProfiles` / `userSelfPreferences`, and companion prompts must point engineers there. The `update_profile` / `update_preferences` shortcut verbs that re-used those schemas as their request DTOs were removed on 2026-08-01: an operation here runs against `UserSchema`, so a core UPDATE dropped every declared field and answered 200 having persisted nothing. A future single self-rooted write across these children cannot be a core UPDATE either; it would require a custom multi-resource implementation declaring `transactionParticipants`.',\n 'This resource and `users` are two doors onto the SAME stored user records, so they must always declare the SAME retention posture. Opting only one in would leave an erased identity readable and updatable through the other door, and would place a second, unscoped uniqueness constraint on the email — which the next erasure would then collide with, aborting it. Change the two together.',\n 'The collection and bulk-update operations here exist only to serve that retention contract — the audited see-through read of retained records, and the trusted in-place scrub. Neither is exposed over HTTP: there is deliberately no self-service enumeration or bulk mutation of identity records.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n ),\n () => ({\n layout: {\n purpose: 'Present self identity as a compact account card: who I am, how I access, and when the record last moved.',\n displayPurpose: 'Read/update flows in the end-user app shell.',\n summaryPurpose: 'Lightweight list cards when the user is referenced in relationship panels.',\n sections: {\n overview: {\n purpose: 'Email + status, the first things a user checks in “My account”.',\n whenToUse: 'Default for self-identity overviews and edit forms that touch core identity fields directly.',\n textSlots: {\n title: { purpose: 'Label the self-identity primary section.' },\n description: { purpose: 'Explain that this is the end-user’s own record, not org directory administration.' },\n },\n },\n access: {\n purpose: 'Roles and user-type metadata that change what the product allows.',\n whenToUse: 'When the signed-in user reviews why a feature is enabled or disabled (read-only here).',\n textSlots: {\n title: { purpose: 'Label the access/roles area for self-identity views.' },\n description: { purpose: 'Clarify that material role assignment still flows through org-admin `USERS` in most products.' },\n },\n },\n lifecycle: {\n purpose: 'Created/updated timestamps and lifecycle hints for the identity row.',\n whenToUse: 'Audit-friendly read panels or export explanations.',\n textSlots: {\n title: { purpose: 'Label lifecycle/audit information on the self record.' },\n description: { purpose: 'Reiterate that some lifecycle moves (suspension) may be operator-driven outside self-service.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Read-only self identity for settings hub.', whenToUse: 'When rendering “Account” home.' },\n // Profile and preferences editing views belong to `USER_SELF_PROFILES` /\n // `USER_SELF_PREFERENCES` — the `UPDATE_PROFILE` / `UPDATE_PREFERENCES` shortcut verbs were\n // removed on 2026-08-01 (see `businessConstraints` below).\n // No self-delete view: `DELETE_ACCOUNT` was removed on 2026-08-01 (see the operations block).\n [UserSelf_Operations.DEACTIVATE_ACCOUNT]: { purpose: 'Pause access without full deletion.', whenToUse: '“Take a break” or parental controls patterns.' },\n [UserSelf_Operations.REACTIVATE_ACCOUNT]: { purpose: 'Return to active from inactive state.', whenToUse: 'Reactivation CTA when policy allows it.' },\n },\n }),\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/users.resource.specification.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,cAAc,EACd,qBAAqB,IAAI,EAAE,EAK3B,UAAU,EACV,gBAAgB,EAEjB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"users.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/users.resource.specification.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,cAAc,EACd,qBAAqB,IAAI,EAAE,EAK3B,UAAU,EACV,gBAAgB,EAEjB,MAAM,uBAAuB,CAAC;AA0D/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;iCA03BtC,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
|
|
|
4
4
|
import { CORE_APP_ROLES, CoreResourceOperation as Op, CoreUserNotificationTarget, RetentionStatus, ResourcePrimaryScope, UserSchema, UserStatus, Users_Operations, usersResourceConfiguration_InitializationFactory as usersFactory, } from '@wildo-ai/saas-models';
|
|
5
5
|
import { HttpResponseStatusCode, mergeResourceFrontendConfigurations, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, RETENTION_MARKER_FIELD_SPECS, } from '../../../_core/index.js';
|
|
6
6
|
import { USERS_API_REFERENCE_ORGANIZATION_ID, USERS_API_REFERENCE_USER_ID, usersApiReferenceContextExample, usersApiReferenceExample, usersApiReferencePage, usersApiReferenceSummaryExample, } from './users-api-reference.examples.js';
|
|
7
|
+
import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
|
|
7
8
|
const usersMainResourceUIBehavior = usersMainResourceUIBehaviorSource;
|
|
8
9
|
const usersAdminResourceUIBehavior = usersAdminResourceUIBehaviorSource;
|
|
9
10
|
/*
|
|
@@ -84,6 +85,7 @@ export const usersResourceSpecification = resourceSpecificationFromFrontendConfi
|
|
|
84
85
|
businessRole: 'Administrative identity record used to manage who can access the application and under which authority posture.',
|
|
85
86
|
lifecycleRole: 'Moves through invitation, verification, active usage, suspension, and deactivation states under administrative governance.',
|
|
86
87
|
audience: LabelAudience.ADMIN,
|
|
88
|
+
subDomain: EngineResourceSubDomain.USERS,
|
|
87
89
|
codeHandling: {
|
|
88
90
|
mainSchema: {
|
|
89
91
|
packageName: '@wildo-ai/saas-models',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/users.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,4BAA4B,IAAI,kCAAkC,EAClE,2BAA2B,IAAI,iCAAiC,GACjE,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,cAAc,EACd,qBAAqB,IAAI,EAAE,EAC3B,0BAA0B,EAC1B,eAAe,EACf,oBAAoB,EACpB,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,gDAAgD,IAAI,YAAY,GACjE,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,EAC9C,4BAA4B,GAC7B,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,mCAAmC,EACnC,2BAA2B,EAC3B,+BAA+B,EAC/B,wBAAwB,EACxB,qBAAqB,EACrB,+BAA+B,GAChC,MAAM,gCAAgC,CAAC;AAcxC,MAAM,2BAA2B,GAAG,iCAInC,CAAC;AAEF,MAAM,4BAA4B,GAAG,kCAIpC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAA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BACpH;aACF;SACF;QAED,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;YACT,QAAQ,EAAE;gBACR,KAAK,EAAE;oBACL,OAAO,EAAE,6DAA6D;oBACtE,SAAS,EAAE,mHAAmH;iBAC/H;aACF;SACF;QAED,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,QAAQ,EAAE;gBACR,KAAK,EAAE;oBACL,OAAO,EAAE,6FAA6F;oBACtG,SAAS,EAAE,mKAAmK;iBAC/K;aACF;SACF;QAED,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,6CAA6C;YACtD,SAAS,EAAE,4EAA4E;SACxF;QAED,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,6DAA6D;YACtE,SAAS,EAAE,gHAAgH;SAC5H;QAED,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,uDAAuD;YAChE,SAAS,EAAE,0FAA0F;SACtG;QAED,CAAC,gBAAgB,CAAC,YAAY,CAAC,EAAE;YAC/B,OAAO,EAAE,iEAAiE;SAC3E;QAED,CAAC,gBAAgB,CAAC,YAAY,CAAC,EAAE;YAC/B,OAAO,EAAE,iEAAiE;SAC3E;QAED,CAAC,gBAAgB,CAAC,YAAY,CAAC,EAAE;YAC/B,OAAO,EAAE,2DAA2D;SACrE;QAED,CAAC,gBAAgB,CAAC,cAAc,CAAC,EAAE;YACjC,OAAO,EAAE,uEAAuE;SACjF;QAED,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,EAAE;YACvC,OAAO,EAAE,iFAAiF;SAC3F;KAEF;CACF,CAAC,CACH,CAAC","sourcesContent":["import {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n usersAdminResourceUIBehavior as usersAdminResourceUIBehaviorSource,\n usersMainResourceUIBehavior as usersMainResourceUIBehaviorSource,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CORE_APP_ROLES,\n CoreResourceOperation as Op,\n CoreUserNotificationTarget,\n RetentionStatus,\n ResourcePrimaryScope,\n UserSchema,\n UserStatus,\n Users_Operations,\n usersResourceConfiguration_InitializationFactory as usersFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n RETENTION_MARKER_FIELD_SPECS,\n} from '~wildo-specifications/_core';\n\nimport {\n USERS_API_REFERENCE_ORGANIZATION_ID,\n USERS_API_REFERENCE_USER_ID,\n usersApiReferenceContextExample,\n usersApiReferenceExample,\n usersApiReferencePage,\n usersApiReferenceSummaryExample,\n} from './users-api-reference.examples';\n\n/*\n * Generic-parameter casts for the two preset UI behaviors. Pure typing\n * infrastructure — kept at module scope only because the\n * `ResourceUIBehaviorConfig<TCustomOp, TCoreOp, TSchema>` generic\n * cannot be expressed inline at the call site without losing the\n * `as`-cast narrowing the framework relies on for variant-shape inference.\n */\ntype UsersResourceConfiguration = ReturnType<typeof usersFactory>;\ntype UsersCustomOperation = NonNullable<UsersResourceConfiguration['customOperation']>;\ntype UsersCoreOperation = UsersResourceConfiguration['coreOperations'][number];\ntype UsersMainSchema = UsersResourceConfiguration['mainSchema'];\n\nconst usersMainResourceUIBehavior = usersMainResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n UsersCustomOperation,\n UsersCoreOperation,\n UsersMainSchema\n>;\n\nconst usersAdminResourceUIBehavior = usersAdminResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n UsersCustomOperation,\n UsersCoreOperation,\n UsersMainSchema\n>;\n\n/*\n * DRY anchors for the engine USERS resource's per-operation admin-audit\n * email blocks. These two constants are referenced by every mutation\n * operation's `communications.email` block,\n * so a single source of truth keeps the audit voice and audience prose\n * consistent and prevents drift across the public mutations. Re-inlining\n * them per-operation would itself be a DRY violation and would dilute\n * the documented \"this is the admin-audit channel, not the user-facing\n * dispatch\" semantic anchor that justifies declaring these blocks at\n * all.\n */\nconst ADMIN_AUDIT_AUDIENCE = 'Application administrators monitoring the user-management ledger — internal audit trail, not the user-facing dispatch.';\nconst ADMIN_AUDIT_TONE = 'Operational and factual — surfaces what changed, who acted, and which user identity was affected, without dramatizing the event.';\n\n/**\n * Single, framework-owned `users` resource specification.\n *\n * **Why this is one named export but TWO nested factory calls.**\n * The framework intentionally separates spec assembly into two\n * load-bearing layers, both of which run here as nested arguments to\n * preserve the contract while keeping a single authoring surface:\n *\n * 1. `resourceSpecification(usersFactory, UserSchema, …)` builds the\n * domain-truth layer. It validates field shapes against the Zod\n * schema, validates `operations[].communications` against the\n * declared `resourcePrimaryScope`, validates `scheduledExecution`,\n * and stamps the resolved scope onto the returned config.\n * 2. `resourceSpecificationFromFrontendConfiguration(...)` wraps the\n * base with the **merged preset UI behaviors**\n * (`usersMainResourceUIBehavior` + `usersAdminResourceUIBehavior`).\n * It runs `validateFrontendSpecificationAgainstConfiguration(...)`\n * so a frontend-op variant declared in the spec but missing from\n * the presets fails closed at module load, derives\n * `surfacedOperations` from the merged UI behaviors, and merges\n * `base.frontend` with the authored frontend overlay via\n * `mergeFrontendSpecification(...)`.\n *\n * Collapsing into a single `resourceSpecification(...)` call would lose\n * the preset-validation gate, the surfaced-operations derivation, and\n * the merge step — i.e., a fail-closed contract would silently degrade\n * to a fail-open one. The two calls therefore remain, but the file\n * exposes only one named export so the entire spec reads as one\n * declaration.\n *\n * **Step 7 deferred follow-up #1 — `communications.email` blocks\n * (runtime parity contract).** Verified against\n * `engine/saas-models/src/users/users.shared.resources-config.schemas.ts`:\n * every USERS mutation operation declares exactly one\n * `userNotifications[]` entry, all targeting\n * `CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR` via\n * `CoreUserNotificationChannel.EMAIL`. These are administrator audit\n * emails — internal monitoring of the user-management ledger — NOT\n * the user-facing system templates that live in\n * `SystemEmailTemplateRegistry`. Read/List/Search operations have no\n * `userNotifications` and therefore no `communications.email` block\n * here either; the spec must mirror the runtime exactly so companion\n * prompts cannot invent an email surface that the engine never fires.\n *\n * **System-template cross-link is intentionally NOT declared via\n * `email.deliveries[i].systemEmailTemplateRef`.** That field is only\n * valid when the resource operation's runtime fan-out actually fires\n * a system template; today the engine USERS resource does not — the\n * user-facing `PASSWORD_RESET` / `ORGANIZATION_INVITATION` /\n * `SECURITY_ALERT` / `ORGANIZATION_MEMBER_REMOVED` templates are\n * dispatched by separate services (auth, organization, notifications)\n * outside the resource-operation `userNotifications` plumbing.\n * Cross-references are captured in `notes` so companion prompts know\n * where to look without the spec asserting a fan-out the runtime\n * would not produce. When a future engine workstream wires the\n * system templates through the resource-operation fan-out, replace\n * the prose note with a real `systemEmailTemplateRef` cross-link\n * (the `assertSystemEmailTemplateCrossLink` validator will then pin\n * the cross-package contract).\n */\nexport const usersResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(usersMainResourceUIBehavior),\n resourceFrontendConfiguration(usersAdminResourceUIBehavior),\n ),\n resourceSpecification(\n usersFactory,\n UserSchema,\n ({ schemaShape }) => ({\n purpose: 'Represent an application-known person or actor that can authenticate, receive permissions, and participate in application scope.',\n businessRole: 'Administrative identity record used to manage who can access the application and under which authority posture.',\n lifecycleRole: 'Moves through invitation, verification, active usage, suspension, and deactivation states under administrative governance.',\n audience: LabelAudience.ADMIN,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'usersResourceConfiguration_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: 'USERS',\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: 'Users_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'usersMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'usersAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n notes: [\n 'Frontend-facing prose should be authored from the merged main+admin UI behavior contributions, not from one raw leaf in isolation.',\n ],\n },\n\n /**\n * `USERS` / `USER_SELF` declare `retentionPolicy`, so the resource factory injects the two\n * retention markers. They are absent from `UserSchema`, so the field-spec extractor cannot see\n * them and they must be declared here — see `RETENTION_MARKER_FIELD_SPECS` for why the documented\n * meaning is load-bearing on fields that render nowhere.\n */\n additionalFieldSpecs: [...RETENTION_MARKER_FIELD_SPECS],\n\n fields: {\n email: schemaShape.email.stringSpec({\n meaning: 'Canonical contact and identity anchor for the user inside the application.',\n whyItMatters: 'It is the main administrative lookup point and the primary human-facing identity reference during onboarding and support.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n status: schemaShape.status.enumSpec({\n meaning: 'Current access/lifecycle state of the user account.',\n whyItMatters: 'This tells the system and operators whether the user should be able to enter the application, is still onboarding, or has been restricted.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [UserStatus.ACTIVE]: { meaning: 'Full access — the user can use the application normally.' },\n [UserStatus.INACTIVE]: { meaning: 'Deactivated — the account exists but access is removed.' },\n [UserStatus.SUSPENDED]: { meaning: 'Temporarily blocked — access intentionally interrupted, reinstatement possible.' },\n [UserStatus.PENDING_VERIFICATION]: { meaning: 'Account created but the user has not verified their identity yet.' },\n [UserStatus.PENDING_INVITATION]: { meaning: 'Invitation sent but the user has not accepted it yet.' },\n [UserStatus.DELETED]: { meaning: 'Soft-deleted — the identity record is retained for audit but is no longer usable.' },\n },\n }),\n\n scheduledReactivationAt: schemaShape.scheduledReactivationAt.dateSpec({\n meaning: 'When the automated suspension sweep returns this account to ACTIVE. Written only by admin SUSPEND_USER from its optional `suspensionDuration` in DAYS; voluntary self-deactivation has no schedule and returns only when its subject calls REACTIVATE_ACCOUNT. Absent means the current lifecycle state has no automatic return.',\n whyItMatters: 'The stable field name lets the reactivation sweep query the same scheduling coordinate on user and organization-member rows. It is server-owned and written only by guarded lifecycle transitions. Deliberately not audit evidence: it does not decide what the principal may do, and the transition’s own audit event already records the reason and resulting status.',\n }),\n\n appRoles: schemaShape.appRoles.arraySpec({\n meaning: 'Application-level authority granted to the user.',\n whyItMatters: 'Roles drive permission posture and therefore change what the user is allowed to see or do across the product.',\n elementMeaning: 'Each role grants a discrete set of permissions for application features.',\n importance: FieldSemanticImportance.PRIMARY,\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CORE_APP_ROLES',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n notes: [\n 'Import role members from the shared framework role vocabulary rather than re-authoring raw role strings.',\n 'Element schema is a union of the framework enum and free-form tenant-defined role strings; both branches are surfaced via the framework-derived array element metadata.',\n ],\n },\n }),\n\n userTypes: schemaShape.userTypes.arraySpec({\n meaning: 'Business/authentication category used to apply different enrollment, policy, and user-journey rules.',\n whyItMatters: 'This field often determines which auth policy, registration path, or product posture applies to a user beyond raw roles.',\n elementMeaning: 'Each type tag represents a classification that can drive conditional behavior across the application.',\n elementType: {\n notes: [\n 'Values are application-declared userType keys from backend configuration, not a fixed framework enum.',\n ],\n },\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Retrieve a known user identity record.',\n outcome: 'The caller receives the user representation authorized for this route.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The addressed user identity record was found and the route-specific representation is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not authorized to read the addressed user through this route.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No user identity record exists for the supplied id within the route’s authorized scope.' },\n ],\n idempotent: true,\n variants: {\n default: {\n purpose: 'Read the authenticated caller’s own user identity record without entering an administration workflow.',\n outcome: 'The caller receives their own complete user identity representation.',\n whenToUse: 'Use when an authenticated client needs the caller’s identity anchor, current account status, roles or user classifications.',\n examples: [\n {\n title: 'Read the authenticated user identity',\n request: { userId: USERS_API_REFERENCE_USER_ID },\n response: usersApiReferenceExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n context: {\n purpose: 'Read the authenticated caller’s own user identity together with its available relationship context.',\n outcome: 'The caller receives their user record plus the profile and organization-membership context exposed by this representation.',\n whenToUse: 'Use when a client must bootstrap identity-aware application context without issuing separate profile and membership reads.',\n examples: [\n {\n title: 'Read the authenticated user with relationship context',\n request: { userId: USERS_API_REFERENCE_USER_ID },\n response: usersApiReferenceContextExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n summary: {\n purpose: 'Read a compact representation of the authenticated caller’s own user identity.',\n outcome: 'The caller receives only the identity, email, status and creation timestamp required by lightweight user surfaces.',\n whenToUse: 'Use when a compact identity representation is sufficient and the complete user record is unnecessary.',\n examples: [\n {\n title: 'Read the authenticated user summary',\n request: { userId: USERS_API_REFERENCE_USER_ID },\n response: usersApiReferenceSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n admin: {\n purpose: 'Read a user in administrator workflows with management-focused context.',\n outcome: 'The administrator receives the current management representation of the addressed user.',\n whenToUse: 'Use when the caller is acting in a user-governance posture rather than a normal end-user flow.',\n examples: [\n {\n title: 'Read one managed user',\n request: { userId: USERS_API_REFERENCE_USER_ID },\n response: usersApiReferenceExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n\n [Op.LIST]: {\n purpose: 'Browse collections of known users.',\n outcome: 'The caller can iterate through a user set instead of addressing one identity directly.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of user identity records matching the supplied governance filters.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the administrative authority required to enumerate the user directory.' },\n ],\n idempotent: true,\n variants: {\n default: {\n purpose: 'Provide internal non-HTTP user enumeration for supporting flows that need user lists behind the scenes.',\n whenToUse: 'Use when infrastructure or internal service logic needs a user collection without exposing a user-management route.',\n },\n admin: {\n purpose: 'Provide the administrable user directory surface.',\n whenToUse: 'Use when an operator needs to browse the user base as part of management or support work.',\n examples: [\n {\n title: 'List active managed users',\n request: {\n organizationId: USERS_API_REFERENCE_ORGANIZATION_ID,\n page: 1,\n limit: 20,\n sort: 'createdAt:desc',\n },\n response: usersApiReferencePage(),\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n\n [Op.SEARCH]: {\n purpose: 'Locate users by email (own field) and, through the linked user profile, by first/last/display name. Also powers org-scoped people pickers (e.g. a `createdByUserId` filter), where results are constrained to the caller’s organization.',\n outcome: 'Administrators and org-scoped pickers can narrow the user population to the relevant identity subset by email or name quickly.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of user identity records whose email, or whose linked profile’s first/last/display name, matches the search query.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the administrative authority required to search the user population.' },\n ],\n idempotent: true,\n variants: {\n admin: {\n purpose: 'Expose admin-grade user lookup across identity attributes and governance filters.',\n whenToUse: 'Use when the operator knows part of the target identity or needs filtered user discovery.',\n examples: [\n {\n title: 'Search active users by name or email',\n request: {\n organizationId: USERS_API_REFERENCE_ORGANIZATION_ID,\n q: 'alex',\n status: UserStatus.ACTIVE,\n page: 1,\n limit: 20,\n sort: 'email:asc',\n },\n response: usersApiReferencePage(),\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n\n [Op.CREATE]: {\n purpose: 'Create a managed user identity record.',\n outcome: 'A new application-known person can be onboarded into the user-governance lifecycle.',\n whenToUse: 'Use when an administrator must explicitly introduce a new user into the application.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A new user identity record was provisioned and is returned with its server-assigned id.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The email is missing/malformed or the user payload fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the administrative authority required to provision new users.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The payload assigns an `appRoles` entry outside the caller’s own role ceiling — a principal cannot provision a user carrying authority it does not itself hold. Omitting `appRoles` applies the schema default instead and is never measured against the ceiling.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'Another user identity already exists with the supplied email (the canonical identity anchor must be unique).' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Provision a new managed user',\n request: {\n email: 'new.member@example.com',\n status: UserStatus.PENDING_INVITATION,\n appRoles: [CORE_APP_ROLES.APP_USER],\n userTypes: ['employee'],\n },\n response: {\n _id: 'user_01HX2…',\n email: 'new.member@example.com',\n status: UserStatus.PENDING_INVITATION,\n appRoles: [CORE_APP_ROLES.APP_USER],\n userTypes: ['employee'],\n createdAt: '2026-08-20T09:00:00.000Z',\n updatedAt: '2026-08-20T09:00:00.000Z',\n // retention-authority: N/A — a DOCUMENTATION example pinning the wire value the\n // generated `UsersCreateResponse` DTO really carries (default `active`); no\n // predicate, no visibility decision, and a specification layer cannot consume the\n // backend emitter regardless.\n retentionStatus: RetentionStatus.ACTIVE,\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n communications: {\n email: {\n purpose: 'Notify application administrators that a new user identity was provisioned so the user-governance team has an auditable trail of every onboarding event.',\n tone: ADMIN_AUDIT_TONE,\n useWhen: 'A new user identity record is created via the administrative create flow.',\n textSlots: {\n subject: {\n purpose: 'Announce, in the subject line, that a new user identity was provisioned and identify which user.',\n },\n },\n eventData: {\n purpose: 'Describe the create payload: the new user identity, the administrator who created it, and the initial role / status posture.',\n },\n deliveries: [\n {\n audience: ADMIN_AUDIT_AUDIENCE,\n targetRef: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n },\n ],\n notes: [\n 'Mirrors the single `userNotifications[]` entry declared on the runtime CREATE operation (target=APPLICATION_ADMINISTRATOR, channel=EMAIL).',\n 'No user-facing welcome email fires from this operation today — `SystemEmailTemplateRef.WELCOME_EMAIL` is dispatched by the auth/onboarding service after the user accepts the invitation, not from the resource-operation fan-out.',\n ],\n },\n },\n },\n\n [Op.UPDATE]: {\n purpose: 'Modify the role set or application-defined user classifications on an existing user record.',\n outcome: 'The target user keeps the same identity record with updated `appRoles` and/or `userTypes`; identity and lifecycle fields remain unchanged.',\n whenToUse: 'Use for record maintenance. This operation CAN also rewrite `appRoles`, but it replaces the whole array — prefer the dedicated `assign_roles` / `revoke_roles` verbs for an authority change, which apply an additive or subtractive delta and so cannot clobber a concurrent edit.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user record was updated and the new administrative state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The supplied `appRoles` or `userTypes` values fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the administrative authority required to edit another user’s record.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The edit sets an `appRoles` entry outside the caller’s own role ceiling. Because this operation replaces the whole array, every entry it names is treated as caller-authored — including roles the user already held.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No user identity record exists for the supplied id within the caller’s administrative scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The edit would remove the LAST administratively usable application super-administrator by rewriting `appRoles` so it no longer confers `APP_ADMIN_SUPER_ADMIN`. Grant the role to another active user first. Carries the stable client-branchable `code: LAST_SUPER_ADMINISTRATOR`.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Replace a user classification without rewriting roles',\n request: {\n userId: USERS_API_REFERENCE_USER_ID,\n userTypes: ['employee', 'support'],\n },\n response: {\n ...usersApiReferenceExample,\n userTypes: ['employee', 'support'],\n updatedAt: '2026-08-20T10:15:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: {\n email: {\n purpose: 'Notify application administrators that an existing user record was edited so the user-governance team can audit non-trivial profile or status changes.',\n tone: ADMIN_AUDIT_TONE,\n useWhen: 'An administrator updates governance-relevant attributes on a user record.',\n textSlots: {\n subject: {\n purpose: 'Announce, in the subject line, that a user record was updated and identify the affected user.',\n },\n },\n eventData: {\n purpose: 'Describe the update payload: the affected user identity, the administrator who acted, and which fields changed.',\n },\n deliveries: [\n {\n audience: ADMIN_AUDIT_AUDIENCE,\n targetRef: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n },\n ],\n notes: [\n 'Mirrors the single `userNotifications[]` entry declared on the runtime UPDATE operation (target=APPLICATION_ADMINISTRATOR, channel=EMAIL).',\n 'No dedicated user-facing system template exists for generic profile updates — security-sensitive edits surface separately via `SystemEmailTemplateRef.SECURITY_ALERT`, dispatched by the security service.',\n ],\n },\n },\n },\n\n [Op.DELETE]: {\n purpose: 'Remove a user identity record from normal operational use.',\n outcome: 'The user is no longer treated as an active administrative identity in the application lifecycle.',\n whenToUse: 'Use only when the business decision is true removal, not temporary suspension or narrower access.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The user identity record was removed; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the high-trust governance authority required to remove a user identity.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation declares `requiresStepUpAuthentication`, and the request carried no valid single-use re-authentication token. Obtain one from the re-authentication route and retry with it — holding a valid session is deliberately not sufficient for irreversible identity destruction.', errorCode: 'STEP_UP_REQUIRED' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No user identity record exists for the supplied id (or it was already removed).' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The user still owns dependent records (organization memberships, owned resources) that block hard removal; resolve or reassign them first.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The target is the LAST administratively usable application super-administrator. Destroying the row that holds the last application authority locks the application out exactly as revoking the role would, so it is refused on the same terms — grant the role to another active user first. Carries the stable client-branchable `code: LAST_SUPER_ADMINISTRATOR`.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Remove one managed user',\n request: { userId: USERS_API_REFERENCE_USER_ID },\n forStatus: HttpResponseStatusCode.NO_CONTENT_204,\n },\n ],\n communications: {\n email: {\n purpose: 'Notify application administrators that a user identity was removed so the user-governance team has an auditable trail of every removal event.',\n tone: ADMIN_AUDIT_TONE,\n useWhen: 'An administrator deletes a user identity record.',\n textSlots: {\n subject: {\n purpose: 'Announce, in the subject line, that a user identity was removed and identify which user.',\n },\n },\n eventData: {\n purpose: 'Describe the delete payload: the removed user identity and the administrator who initiated removal.',\n },\n deliveries: [\n {\n audience: ADMIN_AUDIT_AUDIENCE,\n targetRef: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n },\n ],\n notes: [\n 'Mirrors the single `userNotifications[]` entry declared on the runtime DELETE operation (target=APPLICATION_ADMINISTRATOR, channel=EMAIL).',\n 'When the deletion happens via organization-membership removal, the user-facing `SystemEmailTemplateRef.ORGANIZATION_MEMBER_REMOVED` is dispatched by the organization service — not from this resource-operation fan-out.',\n ],\n },\n },\n },\n\n [Users_Operations.ASSIGN_ROLES]: {\n operationId: Users_Operations.ASSIGN_ROLES,\n purpose: 'Grant or widen the authority posture of an existing user.',\n outcome: 'The user gains application permissions that change their effective access surface.',\n whenToUse: 'Use when the administrative intent is permission delegation, not profile maintenance. The named roles are ADDED to the roles the user already holds — this is a delta, not a replacement, so it never drops authority the request did not mention. Re-granting a held role is a no-op that still answers 200.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The requested roles are present on the user and the updated identity record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'A supplied role is unknown to the application role vocabulary or the payload is malformed.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the authority to delegate the requested roles (e.g. cannot grant a role they do not themselves hold).' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No user identity record exists for the supplied id within the caller’s administrative scope.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Grant an application administration role',\n request: {\n userId: USERS_API_REFERENCE_USER_ID,\n roles: [CORE_APP_ROLES.APP_ADMIN_VIEWER],\n reason: 'Provide read-only access for the quarterly access review.',\n },\n response: {\n ...usersApiReferenceExample,\n appRoles: [\n CORE_APP_ROLES.APP_USER,\n CORE_APP_ROLES.APP_ADMIN_VIEWER,\n ],\n updatedAt: '2026-08-20T10:30:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: {\n email: {\n purpose: 'Notify application administrators that a user gained one or more roles so the user-governance team can audit privilege widening.',\n tone: ADMIN_AUDIT_TONE,\n useWhen: 'An administrator assigns one or more application roles to an existing user.',\n textSlots: {\n subject: {\n purpose: 'Announce, in the subject line, that roles were granted and identify the affected user.',\n },\n },\n eventData: {\n purpose: 'Describe the role-grant payload: the affected user, the granted roles, and the administrator who acted.',\n },\n deliveries: [\n {\n audience: ADMIN_AUDIT_AUDIENCE,\n targetRef: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n },\n ],\n notes: [\n 'Mirrors the single `userNotifications[]` entry declared on the runtime ASSIGN_ROLES operation (target=APPLICATION_ADMINISTRATOR, channel=EMAIL).',\n 'No dedicated user-facing system template exists for role-grant events — the user typically learns about the change through the in-app permissions surface, not a dedicated email.',\n ],\n },\n },\n },\n\n [Users_Operations.REVOKE_ROLES]: {\n operationId: Users_Operations.REVOKE_ROLES,\n purpose: 'Reduce or remove previously granted authority from a user.',\n outcome: 'The user loses one or more permission-bearing roles and therefore a narrower access surface applies.',\n whenToUse: 'Use when the administrative intent is access reduction, offboarding, or separation-of-duty correction. Only the named roles are REMOVED — this is a delta, not a replacement. Revoking every remaining role is permitted and leaves the user with none, which withdraws application access without deleting the identity; `assign_roles` restores it. The ONE exception is the application super-administrator floor: the last usable super-administrator cannot be demoted, because no in-product path could then appoint another.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The requested roles are no longer present on the user and the updated identity record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'A supplied role is unknown to the application role vocabulary or the payload is malformed.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the authority to revoke the requested roles (e.g. separation-of-duty restriction).' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No user identity record exists for the supplied id within the caller’s administrative scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The revocation would remove the LAST administratively usable application super-administrator (an ACTIVE user holding a role that confers `APP_ADMIN_SUPER_ADMIN`, directly or by inheritance). Grant the role to another active user first. Not a 403: the caller IS authorized — the current state of the application forbids it. Carries the stable client-branchable `code: LAST_SUPER_ADMINISTRATOR` so a client can branch without parsing the message.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Revoke one application administration role',\n request: {\n userId: USERS_API_REFERENCE_USER_ID,\n roles: [CORE_APP_ROLES.APP_ADMIN_VIEWER],\n reason: 'The temporary access-review assignment has ended.',\n },\n response: {\n ...usersApiReferenceExample,\n appRoles: [CORE_APP_ROLES.APP_USER],\n updatedAt: '2026-08-20T11:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: {\n email: {\n purpose: 'Notify application administrators that a user lost one or more roles so the user-governance team can audit privilege narrowing.',\n tone: ADMIN_AUDIT_TONE,\n useWhen: 'An administrator revokes one or more application roles from a user.',\n textSlots: {\n subject: {\n purpose: 'Announce, in the subject line, that roles were revoked and identify the affected user.',\n },\n },\n eventData: {\n purpose: 'Describe the role-revoke payload: the affected user, the revoked roles, and the administrator who acted.',\n },\n deliveries: [\n {\n audience: ADMIN_AUDIT_AUDIENCE,\n targetRef: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n },\n ],\n notes: [\n 'Mirrors the single `userNotifications[]` entry declared on the runtime REVOKE_ROLES operation (target=APPLICATION_ADMINISTRATOR, channel=EMAIL).',\n 'No dedicated user-facing system template exists for role-revoke events — the user typically learns about the change through the in-app permissions surface, not a dedicated email.',\n ],\n },\n },\n },\n\n [Users_Operations.SUSPEND_USER]: {\n operationId: Users_Operations.SUSPEND_USER,\n purpose: 'Temporarily block a user from normal access without deleting the identity record.',\n outcome: 'The user remains known to the application, but their operational access is intentionally interrupted. `suspensionDuration` is expressed in DAYS and is resolved to an absolute instant at write time — a duration has no meaning without the moment it is counted from, and the row records no such moment — after which an hourly sweep lifts the suspension automatically by running the ordinary UNSUSPEND_USER verb, so the same state machine and administrative floors apply. Omitting it means the suspension is indefinite.',\n whenToUse: 'Use when you need immediate access restriction while preserving auditability and potential reinstatement. The ONE exception is the application super-administrator floor: the last usable super-administrator cannot be suspended, because suspension removes the only status that can authenticate and no in-product path could then appoint another.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user account is in the suspended state and the updated identity record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the administrative authority required to suspend a user account.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No user identity record exists for the supplied id within the caller’s administrative scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The account is not ACTIVE, so suspension is not a legal transition from its current state (already suspended, soft-deleted, or still pending verification/invitation). Carries `resource_status_transition_conflict`, whose context names the current status, the target status and the permitted source statuses. Most callers meet the earlier `enabledCondition` gate (403) instead; this reference covers the paths that gate does not reach.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The target is the LAST administratively usable application super-administrator. Suspending them moves the sole administrator out of ACTIVE — the only status that can authenticate — which locks the application out exactly as revoking the role would, so it is refused on the same terms. Grant the role to another active user first. Not a 403: the caller IS authorized; the current state of the application forbids it. Carries the stable client-branchable `code: LAST_SUPER_ADMINISTRATOR`.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Suspend access for fourteen days',\n request: {\n userId: USERS_API_REFERENCE_USER_ID,\n reason: 'Temporary access hold during a security review.',\n suspensionDuration: 14,\n notifyUser: true,\n },\n response: {\n ...usersApiReferenceExample,\n status: UserStatus.SUSPENDED,\n scheduledReactivationAt: '2026-09-03T11:30:00.000Z',\n updatedAt: '2026-08-20T11:30:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: {\n email: {\n purpose: 'Notify application administrators that a user account was suspended so the user-governance and security teams can audit access interruptions.',\n tone: ADMIN_AUDIT_TONE,\n useWhen: 'An administrator suspends a user account.',\n textSlots: {\n subject: {\n purpose: 'Announce, in the subject line, that a user account was suspended and identify the affected user.',\n },\n },\n eventData: {\n purpose: 'Describe the suspension payload: the affected user, the administrator who acted, and any documented reason.',\n },\n deliveries: [\n {\n audience: ADMIN_AUDIT_AUDIENCE,\n targetRef: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n },\n ],\n notes: [\n 'Mirrors the single `userNotifications[]` entry declared on the runtime SUSPEND_USER operation (target=APPLICATION_ADMINISTRATOR, channel=EMAIL).',\n 'When the suspension is security-driven, a separate `SystemEmailTemplateRef.SECURITY_ALERT` may be dispatched to the affected user by the security service — outside this resource-operation fan-out.',\n ],\n },\n },\n },\n\n [Users_Operations.UNSUSPEND_USER]: {\n operationId: Users_Operations.UNSUSPEND_USER,\n purpose: 'Restore a previously suspended user to an active operational posture.',\n outcome: 'The user can resume normal access under the currently assigned authority set. Any pending automatic-reactivation deadline is CLEARED, so an account reinstated by hand does not carry the sweep’s old date into a later suspension.',\n whenToUse: 'Use when an earlier suspension has been resolved and access should be reinstated.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user account is no longer suspended and the updated identity record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the administrative authority required to reinstate a user account.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No user identity record exists for the supplied id within the caller’s administrative scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The account is not SUSPENDED, so there is no suspension to reverse. Notably an INACTIVE account — one the user voluntarily deactivated through the self door — is refused here rather than reinstated: an imposed suspension and a chosen deactivation are distinct states with distinct remedies, and merging them into one verb would let an administrator silently undo a user’s own decision. Carries `resource_status_transition_conflict` with the current and permitted statuses in its context.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Restore a suspended user',\n request: {\n userId: USERS_API_REFERENCE_USER_ID,\n reason: 'The security review completed successfully.',\n notifyUser: true,\n },\n response: {\n ...usersApiReferenceExample,\n status: UserStatus.ACTIVE,\n updatedAt: '2026-08-20T12:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: {\n email: {\n purpose: 'Notify application administrators that a previously suspended user account was reinstated so the user-governance team can audit access-restoration events.',\n tone: ADMIN_AUDIT_TONE,\n useWhen: 'An administrator reverses a prior suspension on a user account.',\n textSlots: {\n subject: {\n purpose: 'Announce, in the subject line, that a user account was reinstated and identify the affected user.',\n },\n },\n eventData: {\n purpose: 'Describe the reinstatement payload: the affected user and the administrator who acted.',\n },\n deliveries: [\n {\n audience: ADMIN_AUDIT_AUDIENCE,\n targetRef: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n },\n ],\n notes: [\n 'Mirrors the single `userNotifications[]` entry declared on the runtime UNSUSPEND_USER operation (target=APPLICATION_ADMINISTRATOR, channel=EMAIL).',\n 'No dedicated user-facing system template exists for reinstatement — the user simply regains access on next sign-in.',\n ],\n },\n },\n },\n\n [Users_Operations.FORCE_PASSWORD_RESET]: {\n operationId: Users_Operations.FORCE_PASSWORD_RESET,\n purpose: 'Compel a credential reset as a security or recovery action.',\n outcome: 'The target’s live sessions are revoked and a single-use reset link is mailed to them, so they must re-establish a password before regaining password-based access.',\n whenToUse: 'Use for account recovery, suspected compromise, or mandatory credential rotation events.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The reset was forced: sessions revoked and a single-use link mailed to the target. The response carries the link’s expiry, never the link or token itself.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the security/governance authority required to force a credential reset, or the execution carries no attributable principal to record as the actor.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No user identity record exists for the supplied id within the caller’s administrative scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The target account is soft-deleted, so it has no credential path to reset.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'No documented `reason` was supplied, or the caller addressed their own account — self-service credential change belongs to the authenticated password-change route, which proves knowledge of the current password.' },\n ],\n idempotent: false,\n rateLimitNote: 'Rate-sensitive: forcing repeated resets dispatches reset tokens; operators should throttle bulk rotations to avoid flooding affected users.',\n examples: [\n {\n title: 'Force credential recovery after suspected compromise',\n request: {\n userId: USERS_API_REFERENCE_USER_ID,\n reason: 'Credential exposure was reported by the security team.',\n },\n response: {\n expiresAt: '2026-08-20T13:00:00.000Z',\n sessionsRevoked: true,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: {\n email: {\n purpose: 'Notify application administrators that a credential-reset was forced on a user account so the user-governance and security teams can audit recovery and rotation events.',\n tone: ADMIN_AUDIT_TONE,\n useWhen: 'An administrator forces a credential reset on a user account.',\n textSlots: {\n subject: {\n purpose: 'Announce, in the subject line, that a forced credential reset was triggered and identify the affected user.',\n },\n },\n eventData: {\n purpose: 'Describe the forced-reset payload: the affected user, the administrator who acted, and the documented reason.',\n },\n deliveries: [\n {\n audience: ADMIN_AUDIT_AUDIENCE,\n targetRef: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n },\n ],\n notes: [\n 'Mirrors the single `userNotifications[]` entry declared on the runtime FORCE_PASSWORD_RESET operation (target=APPLICATION_ADMINISTRATOR, channel=EMAIL).',\n 'The user-facing reset email is `SystemEmailTemplateRef.PASSWORD_RESET`, dispatched by the auth service when the reset token is generated — not from this resource-operation fan-out. When a future engine workstream wires that dispatch through `userNotifications`, replace this prose note with a `systemEmailTemplateRef: SystemEmailTemplateRef.PASSWORD_RESET` cross-link on a new USER_SELF delivery.',\n 'That user-facing mail carries the ONLY copy of the reset link. The operation response deliberately withholds it: handing an administrator a link that sets another account’s password would let them authenticate as that user — unnoticed by the owner and, absent an actor claim on session tokens, indistinguishable downstream from a genuine login. The token TTL is likewise a framework policy constant rather than a caller-supplied window.',\n 'Beyond this admin-audit mail, the operation emits the `USER_PASSWORD_RESET_FORCED` audit event (severity CRITICAL) naming the acting administrator, the target, and the documented reason — deliberately distinct from the self-service `USER_PASSWORD_RESET_REQUESTED`, which has no actor field and would credit the account owner with the administrator’s action.',\n ],\n },\n },\n },\n\n },\n\n businessConstraints: [\n 'This resource is an administrative identity record, not the self-service profile-editing surface; self-service changes belong on `user_self` and related profile/preference resources.',\n 'Role and lifecycle operations on users should be treated as governance actions because they affect access posture, not only cosmetic account data.',\n 'The `users` resource should remain centered on identity governance and access administration, not become the dumping ground for every piece of personal profile information.',\n 'Erasing a subject SCRUBS AND RETAINS this row rather than deleting it: the email is masked to an unreachable placeholder and the record is marked retained, so retained financial records whose foreign keys point at the person still resolve — to an anonymized subject. A retained row is hidden from every normal read and frozen against writes; only an audited see-through read reaches it.',\n 'The bulk-update operation exists solely to let the trusted erasure writer scrub rows in place, and is deliberately not exposed over HTTP — a bulk user mutation route would allow mass role and status rewrites. Treat it as a capability, never as an administrative surface to build on.',\n 'Retention decisions here bind `user_self` too: it is a second resource over the same underlying user records, so the two must always declare the same retention posture or an erased identity stays reachable through the self-service door.',\n ],\n }),\n // Phase 4.5 Step 2 (F-1): explicit scope declaration. The USERS resource\n // is the self-anchor for the USER_SELF scope (see\n // `PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE` in\n // `engine/saas-models/src/resources/resources.shared.schemas.ts` — the\n // registry-layer factory's branch-2 self-anchor lookup resolves\n // USERS → USER_SELF). The post-factory cross-check (Phase 4.5 Step 2.5,\n // tracked) is the right layer to enforce that this declared value\n // matches the registry-assembled scope.\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n ),\n () => ({\n label: {\n purpose: 'Use the email as the stable human-facing identity anchor whenever the frontend needs to identify a user succinctly in supporting or administrative contexts.',\n textSlots: {\n label: {\n purpose: 'Name the resource as a managed user identity, typically represented by the email-backed identity anchor.',\n },\n },\n },\n layout: {\n purpose: 'Organize user information by governance meaning so operators can distinguish identity facts, permission posture, and lifecycle evidence at a glance.',\n displayPurpose: 'Present the user record as an administrative identity card rather than a broad social/profile page.',\n summaryPurpose: 'Provide a compact user identity snapshot for relationship-heavy surfaces such as assignments, lookups, and related-object summaries.',\n editPurpose: 'Keep mutable governance inputs focused on the fields administrators are expected to curate directly.',\n sections: {\n overview: {\n purpose: 'Anchor the record around the core identifying attributes and current account state.',\n whenToUse: 'Use this section for the fields an operator must read first to verify who the user is and whether the account is currently usable.',\n textSlots: {\n title: {\n purpose: 'Label this section as the primary identity overview rather than as permissions or audit history.',\n },\n description: {\n purpose: 'Explain that the section helps operators verify the user identity and present usability state at a glance.',\n },\n },\n },\n access: {\n purpose: 'Group the permission-bearing and classification fields that directly affect what the user may access.',\n whenToUse: 'Use this section when the task is authority review, delegation, or access troubleshooting.',\n textSlots: {\n title: {\n purpose: 'Label this section as the access-and-permissions area of the user record.',\n },\n description: {\n purpose: 'Explain that the section is about authorization posture and classifications that affect access.',\n },\n },\n },\n lifecycle: {\n purpose: 'Expose timestamped lifecycle evidence and historical state context around the managed identity.',\n whenToUse: 'Use this section when the operator needs chronology and audit-oriented context rather than editable governance controls.',\n textSlots: {\n title: {\n purpose: 'Label this section as lifecycle or audit history instead of active permission controls.',\n },\n description: {\n purpose: 'Explain that the section captures chronology, timestamps, and historical context around the identity.',\n },\n },\n },\n },\n },\n views: {\n [Op.READ]: {\n variants: {\n default: {\n purpose: 'Surface user read in the main application only as a lightweight supporting view.',\n whenToUse: 'Use when end-user workflows need to resolve who a referenced user is without turning the users resource into a full end-user management surface.',\n },\n admin: {\n purpose: 'Surface the user detail view inside administration workflows.',\n whenToUse: 'Use when the operator is already in user governance and needs a focused detail panel for one identity.',\n },\n },\n },\n\n [Op.LIST]: {\n variants: {\n admin: {\n purpose: 'Surface the administrator-facing user-management directory.',\n whenToUse: 'Use when an operator needs to browse users as a managed collection rather than resolving a single known identity.',\n },\n },\n },\n\n [Op.SEARCH]: {\n variants: {\n admin: {\n purpose: 'Surface administrative user search and filtering by email or (via the linked profile) name.',\n whenToUse: 'Use when support, compliance, or administration needs fast identity lookup across the user population, or when an org-scoped picker resolves users by name/email.',\n },\n },\n },\n\n [Op.CREATE]: {\n purpose: 'Surface administrator-driven user creation.',\n whenToUse: 'Use when the product exposes explicit user provisioning to administrators.',\n },\n\n [Op.UPDATE]: {\n purpose: 'Surface administrator-driven edits to managed user records.',\n whenToUse: 'Use when the operator is curating the authoritative user record rather than acting through self-service flows.',\n },\n\n [Op.DELETE]: {\n purpose: 'Surface destructive administrative removal of a user.',\n whenToUse: 'Use only in high-trust governance workflows where removal is intentional and understood.',\n },\n\n [Users_Operations.ASSIGN_ROLES]: {\n purpose: 'Surface role-assignment as a first-class administrative action.',\n },\n\n [Users_Operations.REVOKE_ROLES]: {\n purpose: 'Surface role revocation as a first-class administrative action.',\n },\n\n [Users_Operations.SUSPEND_USER]: {\n purpose: 'Surface suspension directly in user-governance workflows.',\n },\n\n [Users_Operations.UNSUSPEND_USER]: {\n purpose: 'Surface reactivation of suspended users in user-governance workflows.',\n },\n\n [Users_Operations.FORCE_PASSWORD_RESET]: {\n purpose: 'Surface credential-reset enforcement for security operators and administrators.',\n },\n\n },\n }),\n);\n"]}
|
|
1
|
+
{"version":3,"file":"users.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/users.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,4BAA4B,IAAI,kCAAkC,EAClE,2BAA2B,IAAI,iCAAiC,GACjE,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,cAAc,EACd,qBAAqB,IAAI,EAAE,EAC3B,0BAA0B,EAC1B,eAAe,EACf,oBAAoB,EACpB,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,gDAAgD,IAAI,YAAY,GACjE,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB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,EAAE;YAC/B,OAAO,EAAE,2DAA2D;SACrE;QAED,CAAC,gBAAgB,CAAC,cAAc,CAAC,EAAE;YACjC,OAAO,EAAE,uEAAuE;SACjF;QAED,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,EAAE;YACvC,OAAO,EAAE,iFAAiF;SAC3F;KAEF;CACF,CAAC,CACH,CAAC","sourcesContent":["import {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n usersAdminResourceUIBehavior as usersAdminResourceUIBehaviorSource,\n usersMainResourceUIBehavior as usersMainResourceUIBehaviorSource,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CORE_APP_ROLES,\n CoreResourceOperation as Op,\n CoreUserNotificationTarget,\n RetentionStatus,\n ResourcePrimaryScope,\n UserSchema,\n UserStatus,\n Users_Operations,\n usersResourceConfiguration_InitializationFactory as usersFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n RETENTION_MARKER_FIELD_SPECS,\n} from '~wildo-specifications/_core';\n\nimport {\n USERS_API_REFERENCE_ORGANIZATION_ID,\n USERS_API_REFERENCE_USER_ID,\n usersApiReferenceContextExample,\n usersApiReferenceExample,\n usersApiReferencePage,\n usersApiReferenceSummaryExample,\n} from './users-api-reference.examples';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\n/*\n * Generic-parameter casts for the two preset UI behaviors. Pure typing\n * infrastructure — kept at module scope only because the\n * `ResourceUIBehaviorConfig<TCustomOp, TCoreOp, TSchema>` generic\n * cannot be expressed inline at the call site without losing the\n * `as`-cast narrowing the framework relies on for variant-shape inference.\n */\ntype UsersResourceConfiguration = ReturnType<typeof usersFactory>;\ntype UsersCustomOperation = NonNullable<UsersResourceConfiguration['customOperation']>;\ntype UsersCoreOperation = UsersResourceConfiguration['coreOperations'][number];\ntype UsersMainSchema = UsersResourceConfiguration['mainSchema'];\n\nconst usersMainResourceUIBehavior = usersMainResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n UsersCustomOperation,\n UsersCoreOperation,\n UsersMainSchema\n>;\n\nconst usersAdminResourceUIBehavior = usersAdminResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n UsersCustomOperation,\n UsersCoreOperation,\n UsersMainSchema\n>;\n\n/*\n * DRY anchors for the engine USERS resource's per-operation admin-audit\n * email blocks. These two constants are referenced by every mutation\n * operation's `communications.email` block,\n * so a single source of truth keeps the audit voice and audience prose\n * consistent and prevents drift across the public mutations. Re-inlining\n * them per-operation would itself be a DRY violation and would dilute\n * the documented \"this is the admin-audit channel, not the user-facing\n * dispatch\" semantic anchor that justifies declaring these blocks at\n * all.\n */\nconst ADMIN_AUDIT_AUDIENCE = 'Application administrators monitoring the user-management ledger — internal audit trail, not the user-facing dispatch.';\nconst ADMIN_AUDIT_TONE = 'Operational and factual — surfaces what changed, who acted, and which user identity was affected, without dramatizing the event.';\n\n/**\n * Single, framework-owned `users` resource specification.\n *\n * **Why this is one named export but TWO nested factory calls.**\n * The framework intentionally separates spec assembly into two\n * load-bearing layers, both of which run here as nested arguments to\n * preserve the contract while keeping a single authoring surface:\n *\n * 1. `resourceSpecification(usersFactory, UserSchema, …)` builds the\n * domain-truth layer. It validates field shapes against the Zod\n * schema, validates `operations[].communications` against the\n * declared `resourcePrimaryScope`, validates `scheduledExecution`,\n * and stamps the resolved scope onto the returned config.\n * 2. `resourceSpecificationFromFrontendConfiguration(...)` wraps the\n * base with the **merged preset UI behaviors**\n * (`usersMainResourceUIBehavior` + `usersAdminResourceUIBehavior`).\n * It runs `validateFrontendSpecificationAgainstConfiguration(...)`\n * so a frontend-op variant declared in the spec but missing from\n * the presets fails closed at module load, derives\n * `surfacedOperations` from the merged UI behaviors, and merges\n * `base.frontend` with the authored frontend overlay via\n * `mergeFrontendSpecification(...)`.\n *\n * Collapsing into a single `resourceSpecification(...)` call would lose\n * the preset-validation gate, the surfaced-operations derivation, and\n * the merge step — i.e., a fail-closed contract would silently degrade\n * to a fail-open one. The two calls therefore remain, but the file\n * exposes only one named export so the entire spec reads as one\n * declaration.\n *\n * **Step 7 deferred follow-up #1 — `communications.email` blocks\n * (runtime parity contract).** Verified against\n * `engine/saas-models/src/users/users.shared.resources-config.schemas.ts`:\n * every USERS mutation operation declares exactly one\n * `userNotifications[]` entry, all targeting\n * `CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR` via\n * `CoreUserNotificationChannel.EMAIL`. These are administrator audit\n * emails — internal monitoring of the user-management ledger — NOT\n * the user-facing system templates that live in\n * `SystemEmailTemplateRegistry`. Read/List/Search operations have no\n * `userNotifications` and therefore no `communications.email` block\n * here either; the spec must mirror the runtime exactly so companion\n * prompts cannot invent an email surface that the engine never fires.\n *\n * **System-template cross-link is intentionally NOT declared via\n * `email.deliveries[i].systemEmailTemplateRef`.** That field is only\n * valid when the resource operation's runtime fan-out actually fires\n * a system template; today the engine USERS resource does not — the\n * user-facing `PASSWORD_RESET` / `ORGANIZATION_INVITATION` /\n * `SECURITY_ALERT` / `ORGANIZATION_MEMBER_REMOVED` templates are\n * dispatched by separate services (auth, organization, notifications)\n * outside the resource-operation `userNotifications` plumbing.\n * Cross-references are captured in `notes` so companion prompts know\n * where to look without the spec asserting a fan-out the runtime\n * would not produce. When a future engine workstream wires the\n * system templates through the resource-operation fan-out, replace\n * the prose note with a real `systemEmailTemplateRef` cross-link\n * (the `assertSystemEmailTemplateCrossLink` validator will then pin\n * the cross-package contract).\n */\nexport const usersResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(usersMainResourceUIBehavior),\n resourceFrontendConfiguration(usersAdminResourceUIBehavior),\n ),\n resourceSpecification(\n usersFactory,\n UserSchema,\n ({ schemaShape }) => ({\n purpose: 'Represent an application-known person or actor that can authenticate, receive permissions, and participate in application scope.',\n businessRole: 'Administrative identity record used to manage who can access the application and under which authority posture.',\n lifecycleRole: 'Moves through invitation, verification, active usage, suspension, and deactivation states under administrative governance.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.USERS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'usersResourceConfiguration_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: 'USERS',\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: 'Users_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'usersMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'usersAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n notes: [\n 'Frontend-facing prose should be authored from the merged main+admin UI behavior contributions, not from one raw leaf in isolation.',\n ],\n },\n\n /**\n * `USERS` / `USER_SELF` declare `retentionPolicy`, so the resource factory injects the two\n * retention markers. They are absent from `UserSchema`, so the field-spec extractor cannot see\n * them and they must be declared here — see `RETENTION_MARKER_FIELD_SPECS` for why the documented\n * meaning is load-bearing on fields that render nowhere.\n */\n additionalFieldSpecs: [...RETENTION_MARKER_FIELD_SPECS],\n\n fields: {\n email: schemaShape.email.stringSpec({\n meaning: 'Canonical contact and identity anchor for the user inside the application.',\n whyItMatters: 'It is the main administrative lookup point and the primary human-facing identity reference during onboarding and support.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n status: schemaShape.status.enumSpec({\n meaning: 'Current access/lifecycle state of the user account.',\n whyItMatters: 'This tells the system and operators whether the user should be able to enter the application, is still onboarding, or has been restricted.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [UserStatus.ACTIVE]: { meaning: 'Full access — the user can use the application normally.' },\n [UserStatus.INACTIVE]: { meaning: 'Deactivated — the account exists but access is removed.' },\n [UserStatus.SUSPENDED]: { meaning: 'Temporarily blocked — access intentionally interrupted, reinstatement possible.' },\n [UserStatus.PENDING_VERIFICATION]: { meaning: 'Account created but the user has not verified their identity yet.' },\n [UserStatus.PENDING_INVITATION]: { meaning: 'Invitation sent but the user has not accepted it yet.' },\n [UserStatus.DELETED]: { meaning: 'Soft-deleted — the identity record is retained for audit but is no longer usable.' },\n },\n }),\n\n scheduledReactivationAt: schemaShape.scheduledReactivationAt.dateSpec({\n meaning: 'When the automated suspension sweep returns this account to ACTIVE. Written only by admin SUSPEND_USER from its optional `suspensionDuration` in DAYS; voluntary self-deactivation has no schedule and returns only when its subject calls REACTIVATE_ACCOUNT. Absent means the current lifecycle state has no automatic return.',\n whyItMatters: 'The stable field name lets the reactivation sweep query the same scheduling coordinate on user and organization-member rows. It is server-owned and written only by guarded lifecycle transitions. Deliberately not audit evidence: it does not decide what the principal may do, and the transition’s own audit event already records the reason and resulting status.',\n }),\n\n appRoles: schemaShape.appRoles.arraySpec({\n meaning: 'Application-level authority granted to the user.',\n whyItMatters: 'Roles drive permission posture and therefore change what the user is allowed to see or do across the product.',\n elementMeaning: 'Each role grants a discrete set of permissions for application features.',\n importance: FieldSemanticImportance.PRIMARY,\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CORE_APP_ROLES',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n notes: [\n 'Import role members from the shared framework role vocabulary rather than re-authoring raw role strings.',\n 'Element schema is a union of the framework enum and free-form tenant-defined role strings; both branches are surfaced via the framework-derived array element metadata.',\n ],\n },\n }),\n\n userTypes: schemaShape.userTypes.arraySpec({\n meaning: 'Business/authentication category used to apply different enrollment, policy, and user-journey rules.',\n whyItMatters: 'This field often determines which auth policy, registration path, or product posture applies to a user beyond raw roles.',\n elementMeaning: 'Each type tag represents a classification that can drive conditional behavior across the application.',\n elementType: {\n notes: [\n 'Values are application-declared userType keys from backend configuration, not a fixed framework enum.',\n ],\n },\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Retrieve a known user identity record.',\n outcome: 'The caller receives the user representation authorized for this route.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The addressed user identity record was found and the route-specific representation is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not authorized to read the addressed user through this route.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No user identity record exists for the supplied id within the route’s authorized scope.' },\n ],\n idempotent: true,\n variants: {\n default: {\n purpose: 'Read the authenticated caller’s own user identity record without entering an administration workflow.',\n outcome: 'The caller receives their own complete user identity representation.',\n whenToUse: 'Use when an authenticated client needs the caller’s identity anchor, current account status, roles or user classifications.',\n examples: [\n {\n title: 'Read the authenticated user identity',\n request: { userId: USERS_API_REFERENCE_USER_ID },\n response: usersApiReferenceExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n context: {\n purpose: 'Read the authenticated caller’s own user identity together with its available relationship context.',\n outcome: 'The caller receives their user record plus the profile and organization-membership context exposed by this representation.',\n whenToUse: 'Use when a client must bootstrap identity-aware application context without issuing separate profile and membership reads.',\n examples: [\n {\n title: 'Read the authenticated user with relationship context',\n request: { userId: USERS_API_REFERENCE_USER_ID },\n response: usersApiReferenceContextExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n summary: {\n purpose: 'Read a compact representation of the authenticated caller’s own user identity.',\n outcome: 'The caller receives only the identity, email, status and creation timestamp required by lightweight user surfaces.',\n whenToUse: 'Use when a compact identity representation is sufficient and the complete user record is unnecessary.',\n examples: [\n {\n title: 'Read the authenticated user summary',\n request: { userId: USERS_API_REFERENCE_USER_ID },\n response: usersApiReferenceSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n admin: {\n purpose: 'Read a user in administrator workflows with management-focused context.',\n outcome: 'The administrator receives the current management representation of the addressed user.',\n whenToUse: 'Use when the caller is acting in a user-governance posture rather than a normal end-user flow.',\n examples: [\n {\n title: 'Read one managed user',\n request: { userId: USERS_API_REFERENCE_USER_ID },\n response: usersApiReferenceExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n\n [Op.LIST]: {\n purpose: 'Browse collections of known users.',\n outcome: 'The caller can iterate through a user set instead of addressing one identity directly.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of user identity records matching the supplied governance filters.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the administrative authority required to enumerate the user directory.' },\n ],\n idempotent: true,\n variants: {\n default: {\n purpose: 'Provide internal non-HTTP user enumeration for supporting flows that need user lists behind the scenes.',\n whenToUse: 'Use when infrastructure or internal service logic needs a user collection without exposing a user-management route.',\n },\n admin: {\n purpose: 'Provide the administrable user directory surface.',\n whenToUse: 'Use when an operator needs to browse the user base as part of management or support work.',\n examples: [\n {\n title: 'List active managed users',\n request: {\n organizationId: USERS_API_REFERENCE_ORGANIZATION_ID,\n page: 1,\n limit: 20,\n sort: 'createdAt:desc',\n },\n response: usersApiReferencePage(),\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n\n [Op.SEARCH]: {\n purpose: 'Locate users by email (own field) and, through the linked user profile, by first/last/display name. Also powers org-scoped people pickers (e.g. a `createdByUserId` filter), where results are constrained to the caller’s organization.',\n outcome: 'Administrators and org-scoped pickers can narrow the user population to the relevant identity subset by email or name quickly.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of user identity records whose email, or whose linked profile’s first/last/display name, matches the search query.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the administrative authority required to search the user population.' },\n ],\n idempotent: true,\n variants: {\n admin: {\n purpose: 'Expose admin-grade user lookup across identity attributes and governance filters.',\n whenToUse: 'Use when the operator knows part of the target identity or needs filtered user discovery.',\n examples: [\n {\n title: 'Search active users by name or email',\n request: {\n organizationId: USERS_API_REFERENCE_ORGANIZATION_ID,\n q: 'alex',\n status: UserStatus.ACTIVE,\n page: 1,\n limit: 20,\n sort: 'email:asc',\n },\n response: usersApiReferencePage(),\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n\n [Op.CREATE]: {\n purpose: 'Create a managed user identity record.',\n outcome: 'A new application-known person can be onboarded into the user-governance lifecycle.',\n whenToUse: 'Use when an administrator must explicitly introduce a new user into the application.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A new user identity record was provisioned and is returned with its server-assigned id.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The email is missing/malformed or the user payload fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the administrative authority required to provision new users.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The payload assigns an `appRoles` entry outside the caller’s own role ceiling — a principal cannot provision a user carrying authority it does not itself hold. Omitting `appRoles` applies the schema default instead and is never measured against the ceiling.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'Another user identity already exists with the supplied email (the canonical identity anchor must be unique).' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Provision a new managed user',\n request: {\n email: 'new.member@example.com',\n status: UserStatus.PENDING_INVITATION,\n appRoles: [CORE_APP_ROLES.APP_USER],\n userTypes: ['employee'],\n },\n response: {\n _id: 'user_01HX2…',\n email: 'new.member@example.com',\n status: UserStatus.PENDING_INVITATION,\n appRoles: [CORE_APP_ROLES.APP_USER],\n userTypes: ['employee'],\n createdAt: '2026-08-20T09:00:00.000Z',\n updatedAt: '2026-08-20T09:00:00.000Z',\n // retention-authority: N/A — a DOCUMENTATION example pinning the wire value the\n // generated `UsersCreateResponse` DTO really carries (default `active`); no\n // predicate, no visibility decision, and a specification layer cannot consume the\n // backend emitter regardless.\n retentionStatus: RetentionStatus.ACTIVE,\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n communications: {\n email: {\n purpose: 'Notify application administrators that a new user identity was provisioned so the user-governance team has an auditable trail of every onboarding event.',\n tone: ADMIN_AUDIT_TONE,\n useWhen: 'A new user identity record is created via the administrative create flow.',\n textSlots: {\n subject: {\n purpose: 'Announce, in the subject line, that a new user identity was provisioned and identify which user.',\n },\n },\n eventData: {\n purpose: 'Describe the create payload: the new user identity, the administrator who created it, and the initial role / status posture.',\n },\n deliveries: [\n {\n audience: ADMIN_AUDIT_AUDIENCE,\n targetRef: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n },\n ],\n notes: [\n 'Mirrors the single `userNotifications[]` entry declared on the runtime CREATE operation (target=APPLICATION_ADMINISTRATOR, channel=EMAIL).',\n 'No user-facing welcome email fires from this operation today — `SystemEmailTemplateRef.WELCOME_EMAIL` is dispatched by the auth/onboarding service after the user accepts the invitation, not from the resource-operation fan-out.',\n ],\n },\n },\n },\n\n [Op.UPDATE]: {\n purpose: 'Modify the role set or application-defined user classifications on an existing user record.',\n outcome: 'The target user keeps the same identity record with updated `appRoles` and/or `userTypes`; identity and lifecycle fields remain unchanged.',\n whenToUse: 'Use for record maintenance. This operation CAN also rewrite `appRoles`, but it replaces the whole array — prefer the dedicated `assign_roles` / `revoke_roles` verbs for an authority change, which apply an additive or subtractive delta and so cannot clobber a concurrent edit.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user record was updated and the new administrative state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The supplied `appRoles` or `userTypes` values fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the administrative authority required to edit another user’s record.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The edit sets an `appRoles` entry outside the caller’s own role ceiling. Because this operation replaces the whole array, every entry it names is treated as caller-authored — including roles the user already held.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No user identity record exists for the supplied id within the caller’s administrative scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The edit would remove the LAST administratively usable application super-administrator by rewriting `appRoles` so it no longer confers `APP_ADMIN_SUPER_ADMIN`. Grant the role to another active user first. Carries the stable client-branchable `code: LAST_SUPER_ADMINISTRATOR`.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Replace a user classification without rewriting roles',\n request: {\n userId: USERS_API_REFERENCE_USER_ID,\n userTypes: ['employee', 'support'],\n },\n response: {\n ...usersApiReferenceExample,\n userTypes: ['employee', 'support'],\n updatedAt: '2026-08-20T10:15:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: {\n email: {\n purpose: 'Notify application administrators that an existing user record was edited so the user-governance team can audit non-trivial profile or status changes.',\n tone: ADMIN_AUDIT_TONE,\n useWhen: 'An administrator updates governance-relevant attributes on a user record.',\n textSlots: {\n subject: {\n purpose: 'Announce, in the subject line, that a user record was updated and identify the affected user.',\n },\n },\n eventData: {\n purpose: 'Describe the update payload: the affected user identity, the administrator who acted, and which fields changed.',\n },\n deliveries: [\n {\n audience: ADMIN_AUDIT_AUDIENCE,\n targetRef: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n },\n ],\n notes: [\n 'Mirrors the single `userNotifications[]` entry declared on the runtime UPDATE operation (target=APPLICATION_ADMINISTRATOR, channel=EMAIL).',\n 'No dedicated user-facing system template exists for generic profile updates — security-sensitive edits surface separately via `SystemEmailTemplateRef.SECURITY_ALERT`, dispatched by the security service.',\n ],\n },\n },\n },\n\n [Op.DELETE]: {\n purpose: 'Remove a user identity record from normal operational use.',\n outcome: 'The user is no longer treated as an active administrative identity in the application lifecycle.',\n whenToUse: 'Use only when the business decision is true removal, not temporary suspension or narrower access.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The user identity record was removed; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the high-trust governance authority required to remove a user identity.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation declares `requiresStepUpAuthentication`, and the request carried no valid single-use re-authentication token. Obtain one from the re-authentication route and retry with it — holding a valid session is deliberately not sufficient for irreversible identity destruction.', errorCode: 'STEP_UP_REQUIRED' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No user identity record exists for the supplied id (or it was already removed).' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The user still owns dependent records (organization memberships, owned resources) that block hard removal; resolve or reassign them first.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The target is the LAST administratively usable application super-administrator. Destroying the row that holds the last application authority locks the application out exactly as revoking the role would, so it is refused on the same terms — grant the role to another active user first. Carries the stable client-branchable `code: LAST_SUPER_ADMINISTRATOR`.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Remove one managed user',\n request: { userId: USERS_API_REFERENCE_USER_ID },\n forStatus: HttpResponseStatusCode.NO_CONTENT_204,\n },\n ],\n communications: {\n email: {\n purpose: 'Notify application administrators that a user identity was removed so the user-governance team has an auditable trail of every removal event.',\n tone: ADMIN_AUDIT_TONE,\n useWhen: 'An administrator deletes a user identity record.',\n textSlots: {\n subject: {\n purpose: 'Announce, in the subject line, that a user identity was removed and identify which user.',\n },\n },\n eventData: {\n purpose: 'Describe the delete payload: the removed user identity and the administrator who initiated removal.',\n },\n deliveries: [\n {\n audience: ADMIN_AUDIT_AUDIENCE,\n targetRef: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n },\n ],\n notes: [\n 'Mirrors the single `userNotifications[]` entry declared on the runtime DELETE operation (target=APPLICATION_ADMINISTRATOR, channel=EMAIL).',\n 'When the deletion happens via organization-membership removal, the user-facing `SystemEmailTemplateRef.ORGANIZATION_MEMBER_REMOVED` is dispatched by the organization service — not from this resource-operation fan-out.',\n ],\n },\n },\n },\n\n [Users_Operations.ASSIGN_ROLES]: {\n operationId: Users_Operations.ASSIGN_ROLES,\n purpose: 'Grant or widen the authority posture of an existing user.',\n outcome: 'The user gains application permissions that change their effective access surface.',\n whenToUse: 'Use when the administrative intent is permission delegation, not profile maintenance. The named roles are ADDED to the roles the user already holds — this is a delta, not a replacement, so it never drops authority the request did not mention. Re-granting a held role is a no-op that still answers 200.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The requested roles are present on the user and the updated identity record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'A supplied role is unknown to the application role vocabulary or the payload is malformed.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the authority to delegate the requested roles (e.g. cannot grant a role they do not themselves hold).' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No user identity record exists for the supplied id within the caller’s administrative scope.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Grant an application administration role',\n request: {\n userId: USERS_API_REFERENCE_USER_ID,\n roles: [CORE_APP_ROLES.APP_ADMIN_VIEWER],\n reason: 'Provide read-only access for the quarterly access review.',\n },\n response: {\n ...usersApiReferenceExample,\n appRoles: [\n CORE_APP_ROLES.APP_USER,\n CORE_APP_ROLES.APP_ADMIN_VIEWER,\n ],\n updatedAt: '2026-08-20T10:30:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: {\n email: {\n purpose: 'Notify application administrators that a user gained one or more roles so the user-governance team can audit privilege widening.',\n tone: ADMIN_AUDIT_TONE,\n useWhen: 'An administrator assigns one or more application roles to an existing user.',\n textSlots: {\n subject: {\n purpose: 'Announce, in the subject line, that roles were granted and identify the affected user.',\n },\n },\n eventData: {\n purpose: 'Describe the role-grant payload: the affected user, the granted roles, and the administrator who acted.',\n },\n deliveries: [\n {\n audience: ADMIN_AUDIT_AUDIENCE,\n targetRef: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n },\n ],\n notes: [\n 'Mirrors the single `userNotifications[]` entry declared on the runtime ASSIGN_ROLES operation (target=APPLICATION_ADMINISTRATOR, channel=EMAIL).',\n 'No dedicated user-facing system template exists for role-grant events — the user typically learns about the change through the in-app permissions surface, not a dedicated email.',\n ],\n },\n },\n },\n\n [Users_Operations.REVOKE_ROLES]: {\n operationId: Users_Operations.REVOKE_ROLES,\n purpose: 'Reduce or remove previously granted authority from a user.',\n outcome: 'The user loses one or more permission-bearing roles and therefore a narrower access surface applies.',\n whenToUse: 'Use when the administrative intent is access reduction, offboarding, or separation-of-duty correction. Only the named roles are REMOVED — this is a delta, not a replacement. Revoking every remaining role is permitted and leaves the user with none, which withdraws application access without deleting the identity; `assign_roles` restores it. The ONE exception is the application super-administrator floor: the last usable super-administrator cannot be demoted, because no in-product path could then appoint another.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The requested roles are no longer present on the user and the updated identity record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'A supplied role is unknown to the application role vocabulary or the payload is malformed.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the authority to revoke the requested roles (e.g. separation-of-duty restriction).' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No user identity record exists for the supplied id within the caller’s administrative scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The revocation would remove the LAST administratively usable application super-administrator (an ACTIVE user holding a role that confers `APP_ADMIN_SUPER_ADMIN`, directly or by inheritance). Grant the role to another active user first. Not a 403: the caller IS authorized — the current state of the application forbids it. Carries the stable client-branchable `code: LAST_SUPER_ADMINISTRATOR` so a client can branch without parsing the message.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Revoke one application administration role',\n request: {\n userId: USERS_API_REFERENCE_USER_ID,\n roles: [CORE_APP_ROLES.APP_ADMIN_VIEWER],\n reason: 'The temporary access-review assignment has ended.',\n },\n response: {\n ...usersApiReferenceExample,\n appRoles: [CORE_APP_ROLES.APP_USER],\n updatedAt: '2026-08-20T11:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: {\n email: {\n purpose: 'Notify application administrators that a user lost one or more roles so the user-governance team can audit privilege narrowing.',\n tone: ADMIN_AUDIT_TONE,\n useWhen: 'An administrator revokes one or more application roles from a user.',\n textSlots: {\n subject: {\n purpose: 'Announce, in the subject line, that roles were revoked and identify the affected user.',\n },\n },\n eventData: {\n purpose: 'Describe the role-revoke payload: the affected user, the revoked roles, and the administrator who acted.',\n },\n deliveries: [\n {\n audience: ADMIN_AUDIT_AUDIENCE,\n targetRef: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n },\n ],\n notes: [\n 'Mirrors the single `userNotifications[]` entry declared on the runtime REVOKE_ROLES operation (target=APPLICATION_ADMINISTRATOR, channel=EMAIL).',\n 'No dedicated user-facing system template exists for role-revoke events — the user typically learns about the change through the in-app permissions surface, not a dedicated email.',\n ],\n },\n },\n },\n\n [Users_Operations.SUSPEND_USER]: {\n operationId: Users_Operations.SUSPEND_USER,\n purpose: 'Temporarily block a user from normal access without deleting the identity record.',\n outcome: 'The user remains known to the application, but their operational access is intentionally interrupted. `suspensionDuration` is expressed in DAYS and is resolved to an absolute instant at write time — a duration has no meaning without the moment it is counted from, and the row records no such moment — after which an hourly sweep lifts the suspension automatically by running the ordinary UNSUSPEND_USER verb, so the same state machine and administrative floors apply. Omitting it means the suspension is indefinite.',\n whenToUse: 'Use when you need immediate access restriction while preserving auditability and potential reinstatement. The ONE exception is the application super-administrator floor: the last usable super-administrator cannot be suspended, because suspension removes the only status that can authenticate and no in-product path could then appoint another.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user account is in the suspended state and the updated identity record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the administrative authority required to suspend a user account.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No user identity record exists for the supplied id within the caller’s administrative scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The account is not ACTIVE, so suspension is not a legal transition from its current state (already suspended, soft-deleted, or still pending verification/invitation). Carries `resource_status_transition_conflict`, whose context names the current status, the target status and the permitted source statuses. Most callers meet the earlier `enabledCondition` gate (403) instead; this reference covers the paths that gate does not reach.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The target is the LAST administratively usable application super-administrator. Suspending them moves the sole administrator out of ACTIVE — the only status that can authenticate — which locks the application out exactly as revoking the role would, so it is refused on the same terms. Grant the role to another active user first. Not a 403: the caller IS authorized; the current state of the application forbids it. Carries the stable client-branchable `code: LAST_SUPER_ADMINISTRATOR`.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Suspend access for fourteen days',\n request: {\n userId: USERS_API_REFERENCE_USER_ID,\n reason: 'Temporary access hold during a security review.',\n suspensionDuration: 14,\n notifyUser: true,\n },\n response: {\n ...usersApiReferenceExample,\n status: UserStatus.SUSPENDED,\n scheduledReactivationAt: '2026-09-03T11:30:00.000Z',\n updatedAt: '2026-08-20T11:30:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: {\n email: {\n purpose: 'Notify application administrators that a user account was suspended so the user-governance and security teams can audit access interruptions.',\n tone: ADMIN_AUDIT_TONE,\n useWhen: 'An administrator suspends a user account.',\n textSlots: {\n subject: {\n purpose: 'Announce, in the subject line, that a user account was suspended and identify the affected user.',\n },\n },\n eventData: {\n purpose: 'Describe the suspension payload: the affected user, the administrator who acted, and any documented reason.',\n },\n deliveries: [\n {\n audience: ADMIN_AUDIT_AUDIENCE,\n targetRef: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n },\n ],\n notes: [\n 'Mirrors the single `userNotifications[]` entry declared on the runtime SUSPEND_USER operation (target=APPLICATION_ADMINISTRATOR, channel=EMAIL).',\n 'When the suspension is security-driven, a separate `SystemEmailTemplateRef.SECURITY_ALERT` may be dispatched to the affected user by the security service — outside this resource-operation fan-out.',\n ],\n },\n },\n },\n\n [Users_Operations.UNSUSPEND_USER]: {\n operationId: Users_Operations.UNSUSPEND_USER,\n purpose: 'Restore a previously suspended user to an active operational posture.',\n outcome: 'The user can resume normal access under the currently assigned authority set. Any pending automatic-reactivation deadline is CLEARED, so an account reinstated by hand does not carry the sweep’s old date into a later suspension.',\n whenToUse: 'Use when an earlier suspension has been resolved and access should be reinstated.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user account is no longer suspended and the updated identity record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the administrative authority required to reinstate a user account.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No user identity record exists for the supplied id within the caller’s administrative scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The account is not SUSPENDED, so there is no suspension to reverse. Notably an INACTIVE account — one the user voluntarily deactivated through the self door — is refused here rather than reinstated: an imposed suspension and a chosen deactivation are distinct states with distinct remedies, and merging them into one verb would let an administrator silently undo a user’s own decision. Carries `resource_status_transition_conflict` with the current and permitted statuses in its context.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Restore a suspended user',\n request: {\n userId: USERS_API_REFERENCE_USER_ID,\n reason: 'The security review completed successfully.',\n notifyUser: true,\n },\n response: {\n ...usersApiReferenceExample,\n status: UserStatus.ACTIVE,\n updatedAt: '2026-08-20T12:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: {\n email: {\n purpose: 'Notify application administrators that a previously suspended user account was reinstated so the user-governance team can audit access-restoration events.',\n tone: ADMIN_AUDIT_TONE,\n useWhen: 'An administrator reverses a prior suspension on a user account.',\n textSlots: {\n subject: {\n purpose: 'Announce, in the subject line, that a user account was reinstated and identify the affected user.',\n },\n },\n eventData: {\n purpose: 'Describe the reinstatement payload: the affected user and the administrator who acted.',\n },\n deliveries: [\n {\n audience: ADMIN_AUDIT_AUDIENCE,\n targetRef: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n },\n ],\n notes: [\n 'Mirrors the single `userNotifications[]` entry declared on the runtime UNSUSPEND_USER operation (target=APPLICATION_ADMINISTRATOR, channel=EMAIL).',\n 'No dedicated user-facing system template exists for reinstatement — the user simply regains access on next sign-in.',\n ],\n },\n },\n },\n\n [Users_Operations.FORCE_PASSWORD_RESET]: {\n operationId: Users_Operations.FORCE_PASSWORD_RESET,\n purpose: 'Compel a credential reset as a security or recovery action.',\n outcome: 'The target’s live sessions are revoked and a single-use reset link is mailed to them, so they must re-establish a password before regaining password-based access.',\n whenToUse: 'Use for account recovery, suspected compromise, or mandatory credential rotation events.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The reset was forced: sessions revoked and a single-use link mailed to the target. The response carries the link’s expiry, never the link or token itself.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the security/governance authority required to force a credential reset, or the execution carries no attributable principal to record as the actor.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No user identity record exists for the supplied id within the caller’s administrative scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The target account is soft-deleted, so it has no credential path to reset.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'No documented `reason` was supplied, or the caller addressed their own account — self-service credential change belongs to the authenticated password-change route, which proves knowledge of the current password.' },\n ],\n idempotent: false,\n rateLimitNote: 'Rate-sensitive: forcing repeated resets dispatches reset tokens; operators should throttle bulk rotations to avoid flooding affected users.',\n examples: [\n {\n title: 'Force credential recovery after suspected compromise',\n request: {\n userId: USERS_API_REFERENCE_USER_ID,\n reason: 'Credential exposure was reported by the security team.',\n },\n response: {\n expiresAt: '2026-08-20T13:00:00.000Z',\n sessionsRevoked: true,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: {\n email: {\n purpose: 'Notify application administrators that a credential-reset was forced on a user account so the user-governance and security teams can audit recovery and rotation events.',\n tone: ADMIN_AUDIT_TONE,\n useWhen: 'An administrator forces a credential reset on a user account.',\n textSlots: {\n subject: {\n purpose: 'Announce, in the subject line, that a forced credential reset was triggered and identify the affected user.',\n },\n },\n eventData: {\n purpose: 'Describe the forced-reset payload: the affected user, the administrator who acted, and the documented reason.',\n },\n deliveries: [\n {\n audience: ADMIN_AUDIT_AUDIENCE,\n targetRef: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n },\n ],\n notes: [\n 'Mirrors the single `userNotifications[]` entry declared on the runtime FORCE_PASSWORD_RESET operation (target=APPLICATION_ADMINISTRATOR, channel=EMAIL).',\n 'The user-facing reset email is `SystemEmailTemplateRef.PASSWORD_RESET`, dispatched by the auth service when the reset token is generated — not from this resource-operation fan-out. When a future engine workstream wires that dispatch through `userNotifications`, replace this prose note with a `systemEmailTemplateRef: SystemEmailTemplateRef.PASSWORD_RESET` cross-link on a new USER_SELF delivery.',\n 'That user-facing mail carries the ONLY copy of the reset link. The operation response deliberately withholds it: handing an administrator a link that sets another account’s password would let them authenticate as that user — unnoticed by the owner and, absent an actor claim on session tokens, indistinguishable downstream from a genuine login. The token TTL is likewise a framework policy constant rather than a caller-supplied window.',\n 'Beyond this admin-audit mail, the operation emits the `USER_PASSWORD_RESET_FORCED` audit event (severity CRITICAL) naming the acting administrator, the target, and the documented reason — deliberately distinct from the self-service `USER_PASSWORD_RESET_REQUESTED`, which has no actor field and would credit the account owner with the administrator’s action.',\n ],\n },\n },\n },\n\n },\n\n businessConstraints: [\n 'This resource is an administrative identity record, not the self-service profile-editing surface; self-service changes belong on `user_self` and related profile/preference resources.',\n 'Role and lifecycle operations on users should be treated as governance actions because they affect access posture, not only cosmetic account data.',\n 'The `users` resource should remain centered on identity governance and access administration, not become the dumping ground for every piece of personal profile information.',\n 'Erasing a subject SCRUBS AND RETAINS this row rather than deleting it: the email is masked to an unreachable placeholder and the record is marked retained, so retained financial records whose foreign keys point at the person still resolve — to an anonymized subject. A retained row is hidden from every normal read and frozen against writes; only an audited see-through read reaches it.',\n 'The bulk-update operation exists solely to let the trusted erasure writer scrub rows in place, and is deliberately not exposed over HTTP — a bulk user mutation route would allow mass role and status rewrites. Treat it as a capability, never as an administrative surface to build on.',\n 'Retention decisions here bind `user_self` too: it is a second resource over the same underlying user records, so the two must always declare the same retention posture or an erased identity stays reachable through the self-service door.',\n ],\n }),\n // Phase 4.5 Step 2 (F-1): explicit scope declaration. The USERS resource\n // is the self-anchor for the USER_SELF scope (see\n // `PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE` in\n // `engine/saas-models/src/resources/resources.shared.schemas.ts` — the\n // registry-layer factory's branch-2 self-anchor lookup resolves\n // USERS → USER_SELF). The post-factory cross-check (Phase 4.5 Step 2.5,\n // tracked) is the right layer to enforce that this declared value\n // matches the registry-assembled scope.\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n ),\n () => ({\n label: {\n purpose: 'Use the email as the stable human-facing identity anchor whenever the frontend needs to identify a user succinctly in supporting or administrative contexts.',\n textSlots: {\n label: {\n purpose: 'Name the resource as a managed user identity, typically represented by the email-backed identity anchor.',\n },\n },\n },\n layout: {\n purpose: 'Organize user information by governance meaning so operators can distinguish identity facts, permission posture, and lifecycle evidence at a glance.',\n displayPurpose: 'Present the user record as an administrative identity card rather than a broad social/profile page.',\n summaryPurpose: 'Provide a compact user identity snapshot for relationship-heavy surfaces such as assignments, lookups, and related-object summaries.',\n editPurpose: 'Keep mutable governance inputs focused on the fields administrators are expected to curate directly.',\n sections: {\n overview: {\n purpose: 'Anchor the record around the core identifying attributes and current account state.',\n whenToUse: 'Use this section for the fields an operator must read first to verify who the user is and whether the account is currently usable.',\n textSlots: {\n title: {\n purpose: 'Label this section as the primary identity overview rather than as permissions or audit history.',\n },\n description: {\n purpose: 'Explain that the section helps operators verify the user identity and present usability state at a glance.',\n },\n },\n },\n access: {\n purpose: 'Group the permission-bearing and classification fields that directly affect what the user may access.',\n whenToUse: 'Use this section when the task is authority review, delegation, or access troubleshooting.',\n textSlots: {\n title: {\n purpose: 'Label this section as the access-and-permissions area of the user record.',\n },\n description: {\n purpose: 'Explain that the section is about authorization posture and classifications that affect access.',\n },\n },\n },\n lifecycle: {\n purpose: 'Expose timestamped lifecycle evidence and historical state context around the managed identity.',\n whenToUse: 'Use this section when the operator needs chronology and audit-oriented context rather than editable governance controls.',\n textSlots: {\n title: {\n purpose: 'Label this section as lifecycle or audit history instead of active permission controls.',\n },\n description: {\n purpose: 'Explain that the section captures chronology, timestamps, and historical context around the identity.',\n },\n },\n },\n },\n },\n views: {\n [Op.READ]: {\n variants: {\n default: {\n purpose: 'Surface user read in the main application only as a lightweight supporting view.',\n whenToUse: 'Use when end-user workflows need to resolve who a referenced user is without turning the users resource into a full end-user management surface.',\n },\n admin: {\n purpose: 'Surface the user detail view inside administration workflows.',\n whenToUse: 'Use when the operator is already in user governance and needs a focused detail panel for one identity.',\n },\n },\n },\n\n [Op.LIST]: {\n variants: {\n admin: {\n purpose: 'Surface the administrator-facing user-management directory.',\n whenToUse: 'Use when an operator needs to browse users as a managed collection rather than resolving a single known identity.',\n },\n },\n },\n\n [Op.SEARCH]: {\n variants: {\n admin: {\n purpose: 'Surface administrative user search and filtering by email or (via the linked profile) name.',\n whenToUse: 'Use when support, compliance, or administration needs fast identity lookup across the user population, or when an org-scoped picker resolves users by name/email.',\n },\n },\n },\n\n [Op.CREATE]: {\n purpose: 'Surface administrator-driven user creation.',\n whenToUse: 'Use when the product exposes explicit user provisioning to administrators.',\n },\n\n [Op.UPDATE]: {\n purpose: 'Surface administrator-driven edits to managed user records.',\n whenToUse: 'Use when the operator is curating the authoritative user record rather than acting through self-service flows.',\n },\n\n [Op.DELETE]: {\n purpose: 'Surface destructive administrative removal of a user.',\n whenToUse: 'Use only in high-trust governance workflows where removal is intentional and understood.',\n },\n\n [Users_Operations.ASSIGN_ROLES]: {\n purpose: 'Surface role-assignment as a first-class administrative action.',\n },\n\n [Users_Operations.REVOKE_ROLES]: {\n purpose: 'Surface role revocation as a first-class administrative action.',\n },\n\n [Users_Operations.SUSPEND_USER]: {\n purpose: 'Surface suspension directly in user-governance workflows.',\n },\n\n [Users_Operations.UNSUSPEND_USER]: {\n purpose: 'Surface reactivation of suspended users in user-governance workflows.',\n },\n\n [Users_Operations.FORCE_PASSWORD_RESET]: {\n purpose: 'Surface credential-reset enforcement for security operators and administrators.',\n },\n\n },\n }),\n);\n"]}
|
package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AuthMethod } from "@wildo-ai/saas-models";
|
|
1
2
|
import { type EngineDocumentationSpecificationCatalogIdentityV1 } from "./technical-documentation-evidence.schemas";
|
|
2
3
|
type JsonPrimitive = boolean | number | string | null;
|
|
3
4
|
export type EngineDocumentationSpecificationSemanticDto = JsonPrimitive | readonly EngineDocumentationSpecificationSemanticDto[] | {
|
|
@@ -40,6 +41,10 @@ export interface EngineDocumentationSpecificationCatalogV1 {
|
|
|
40
41
|
/** Exact UTF-8 bytes of the canonical self-describing catalog document. */
|
|
41
42
|
readonly canonicalBytes: Uint8Array;
|
|
42
43
|
}
|
|
44
|
+
export declare function authenticationMethodConsumerWords(method: AuthMethod): {
|
|
45
|
+
readonly name: string;
|
|
46
|
+
readonly meaning: string;
|
|
47
|
+
};
|
|
43
48
|
/**
|
|
44
49
|
* The catalog entry that carries the outbound-webhook signature publication
|
|
45
50
|
* contract (`outboundSignaturePublication`).
|