@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-credentials.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-credentials.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,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AE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,qFAAqF,EAAE;aAC5I;YACD,UAAU,EAAE,IAAI;SACjB;KACF;IAED,mBAAmB,EAAE;QACnB,sMAAsM;QACtM,6LAA6L;KAC9L;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,SAAS,EAAE,CACzD,CAAC","sourcesContent":["/**\n * Resource: `userCredentials` — Wildo SaaS engine specification (backend-only).\n *\n * Inputs:\n * - Schema: engine/saas-models/src/users/user-credentials.shared.schemas.ts → `UserCredentialsSchema`\n * - Factory: engine/saas-models/src/users/user-credentials.shared.resources-config.schemas.ts\n * → `userCredentialsResourceConfiguration_InitializationFactory`\n * - Custom operations: none (core CRUD only; all variants `INTERNAL_CALL` system resource)\n * - UI presets: none\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n MfaEnrollmentState,\n ResourcePrimaryScope,\n UserCredentialsSchema,\n userCredentialsResourceConfiguration_InitializationFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\n\nexport const userCredentialsResourceSpecification = resourceSpecification(\n userCredentialsResourceConfiguration_InitializationFactory,\n UserCredentialsSchema,\n ({ schemaShape }) => ({\n purpose: 'Store each user’s primary authentication material (password, MFA, and passkey credentials) as a system-owned secrets record.',\n businessRole: 'The authoritative per-user auth-secrets table backing login, re-auth, lockout, and MFA policy enforcement for that identity.',\n lifecycleRole: 'Rotates with every password or MFA change, new passkey registration, and progressive lockout counter updates as security events occur.',\n audience: LabelAudience.END_USER,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserCredentialsSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userCredentialsResourceConfiguration_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_CREDENTIALS',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'System resource: operations are `INTERNAL_CALL` only — the HTTP surface is custom auth service routes, not generated CRUD controllers.',\n 'The runtime `userNotifications[]` fan-out is empty; do not add communications.* blocks — password-reset and security emails are owned by auth/notification services outside this resource.',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Document identifier for this credentials row, aligned with the user identity it protects.',\n whyItMatters: 'It is the join key the auth stack uses when it needs to read or update secrets for a given user in one fetch.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'Foreign key to the `users` record whose credentials are stored in this document.',\n whyItMatters: 'Drives a strict 1:1 (per deployment convention) between an identity and its stored secrets, preventing orphan secret blobs.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n passwordHash: schemaShape.passwordHash.stringSpec({\n meaning: 'Password verifier material (e.g. Argon2 output) for traditional password sign-in — never sent to the client. NULLISH: absent for password-less accounts whose first factor is a passkey, magic link, or enterprise SSO, or explicitly null once a directory-managed reconciliation physically destroys the local first factor.',\n whyItMatters: 'It is the root first-factor for PASSWORD users and must never leave backend-controlled storage or logs; its absence OR null both mark an account with no usable local password, so consumers must treat it as falsy-when-cleared (never assume presence).',\n semanticRole: 'code',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n secretBase32: schemaShape.secretBase32.stringSpec({\n meaning: 'Base32 TOTP shared secret, when MFA via authenticator is enabled. NULLISH: absent when TOTP was never set up, or explicitly null after the TOTP-disable clear destroys it.',\n whyItMatters: 'Powers one-time code validation in second-factor policies; must remain backend-only. A disable writes null here, so consumers must treat absent and null identically (no TOTP secret).',\n }),\n\n totpVerified: schemaShape.totpVerified.booleanSpec({\n meaning: 'True once the user has completed an authenticator enrollment ceremony and proved possession of a valid TOTP code.',\n whyItMatters: 'Gates which authentication paths are allowed before marking MFA as fully active.',\n }),\n\n backupCodesHashed: schemaShape.backupCodesHashed.arraySpec({\n meaning: 'One-way hashes of one-time recovery codes, consumed by the server when a user depletes them.',\n whyItMatters: 'Gives a break-glass path when a device is lost, without ever storing the raw recovery codes in plaintext.',\n elementMeaning: 'SHA-256 hash of a single consumed or active backup code value.',\n elementType: {\n notes: [\n 'Elements are string hashes, not a closed enum; strength is the responsibility of the issuing routine.',\n ],\n },\n }),\n\n totpVerifiedAt: schemaShape.totpVerifiedAt.dateSpec({\n meaning: 'Timestamp of the first successful TOTP setup confirmation. NULLISH: absent before verification, a date once verified, or explicitly null after the TOTP-disable clear.',\n whyItMatters: 'Useful in audits and in telling whether MFA was already proven before later policy changes; a disable writes null, so readers treat absent and null as \"not currently verified\".',\n temporalRole: 'occurred',\n }),\n\n passwordChangedAt: schemaShape.passwordChangedAt.dateSpec({\n meaning: 'When the user last changed their password.',\n whyItMatters: 'The auth stack can invalidate long-lived sessions issued before this time (refresh-token family invalidation).',\n temporalRole: 'occurred',\n }),\n\n passkeyCredentials: schemaShape.passkeyCredentials.arraySpec({\n meaning: 'Registered WebAuthn / passkey credentials (FIDO2) for passwordless or phishing-resistant auth.',\n whyItMatters: 'The platform can bind multiple device-bound keys per user while still enforcing duplicate detection on `credentialId`.',\n elementMeaning: 'One passkey registration bundle (credentialId, publicKey, device metadata) as produced by the WebAuthn verification layer.',\n elementType: {\n notes: [\n 'Element schema is the nested `PasskeyCredentialEntrySchema` in `user-credentials.shared.schemas.ts` — a nested object, not a flat enum, so this arraySpec carries element prose without an enum map.',\n ],\n },\n }),\n\n firstMfaPromptAt: schemaShape.firstMfaPromptAt.dateSpec({\n meaning: 'First wall-clock moment MFA was required but not yet satisfied under the grace window.',\n whyItMatters: 'Feeds progressive enrollment policies that give users a limited time to add a second factor.',\n temporalRole: 'occurred',\n }),\n\n mfaEnrollmentState: schemaShape.mfaEnrollmentState.enumSpec({\n meaning: 'Coarse policy state of MFA enrollment (none, required-grace, fully enrolled, etc.).',\n whyItMatters: 'The login gate and admin dashboards read this to decide which ceremonies to force next.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'MfaEnrollmentState',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [MfaEnrollmentState.NOT_REQUIRED]: { meaning: 'Policy does not currently force MFA for this user.' },\n [MfaEnrollmentState.PENDING]: { meaning: 'MFA is expected but the user has not started enrollment yet.' },\n [MfaEnrollmentState.GRACE]: { meaning: 'MFA is required; the user is still inside the grace period before hard enforcement.' },\n [MfaEnrollmentState.ENROLLED]: { meaning: 'MFA is active and verified per policy (TOTP, passkey, or equivalent).' },\n },\n }),\n\n consecutiveLockouts: schemaShape.consecutiveLockouts.numberSpec({\n meaning: 'How many times this account has recently tripped a lockout (used for progressive lockout back-off).',\n whyItMatters: 'Allows infrastructure to grow delay severity without permanently banning mistaken-password attempts in one shot.',\n unit: 'count',\n }),\n\n phoneNumber: schemaShape.phoneNumber.stringSpec({\n meaning: 'E.164 phone number used for SMS OTP, when the deployment enables phone second factors.',\n whyItMatters: 'Binds a distinct possession factor channel separate from TOTP and passkeys when SMS is in scope.',\n semanticRole: 'identifier',\n }),\n\n phoneNumberVerified: schemaShape.phoneNumberVerified.booleanSpec({\n meaning: 'Whether a one-time code flow has confirmed the phone number is reachable by the user.',\n whyItMatters: 'Stops unverified phone numbers from being treated as a trusted second channel.',\n }),\n\n phoneVerifiedAt: schemaShape.phoneVerifiedAt.dateSpec({\n meaning: 'Timestamp of the most recent successful phone verification round-trip.',\n whyItMatters: 'Gives the audit trail a concrete proof point for when SMS was trusted for this number.',\n temporalRole: 'occurred',\n }),\n\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the credentials document was first created (typically alongside user provisioning).',\n temporalRole: 'creation',\n }),\n\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When any mutable secret, factor state, or counter last changed on this document.',\n temporalRole: 'modified',\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Load the current authentication secrets and factor state for one user from the system repository path.',\n outcome: 'Internal services obtain the up-to-date credential payload needed to verify passwords, TOTP, passkeys, or phone OTP.',\n whenToUse: 'Use only on trusted service routes — never for direct user-facing “view my password” flows; values except policy flags remain backend-only at rest.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The credentials document was found and its factor/secret-state payload is returned to the trusted internal caller (raw verifiers stay backend-only).' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The internal service credential on the request is missing, malformed, or expired; this `INTERNAL_CALL` surface fails closed before any secret is read.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is authenticated but lacks the system role permitted to read raw credential material (never exposed to member-facing sessions).' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No credentials document exists for the supplied user id (the identity has no provisioned secrets row).' },\n ],\n idempotent: true,\n rateLimitNote: 'Reads of secret-grade material are restricted to trusted service routes and may be throttled / audited to limit credential-harvesting blast radius.',\n },\n\n [Op.LIST]: {\n purpose: 'Enumerate user credential records for background maintenance or support tooling (bounded by the repository query).',\n outcome: 'Operators or infrastructure jobs can page through secrets rows under strict system roles.',\n whenToUse: 'Use for migrations, audits, or break-glass investigations — not for unfiltered bulk download.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) bounded page of credentials rows is returned for the system maintenance/audit caller.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The internal service credential on the request is missing, malformed, or expired.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the strict system / break-glass role required to enumerate secrets rows; this is never an org-operator or member surface.' },\n ],\n idempotent: true,\n },\n\n [Op.CREATE]: {\n purpose: 'Insert the initial secrets row for a new user, typically during provisioning.',\n outcome: 'The platform can tie every subsequent login event to a stable secrets document for that identity.',\n whenToUse: 'Call when a user is first materialized in the `users` table and a credentials row is required for auth.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A fresh credentials document is created for the user and linked 1:1 to the identity it protects.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The provisioning payload fails schema validation (e.g. missing `userId`, malformed initial factor state).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The internal service credential on the provisioning request is missing, malformed, or expired.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the system/provisioning role permitted to mint a credentials row.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The referenced `users` row does not exist, so there is no identity to anchor secrets to.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A credentials document already exists for this user id; the per-user 1:1 convention forbids a second secrets blob.' },\n ],\n idempotent: false,\n },\n\n [Op.UPDATE]: {\n purpose: 'Mutate any authentication material or state counters (password, MFA, passkey list, lockout, phone) on the row.',\n outcome: 'The system-of-record for secrets stays in sync with what the user or admin last changed in policy-compliant flows.',\n whenToUse: 'Use for password change, MFA enable/disable, new passkey registration, lockout counter bumps, and phone refresh.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The requested secret/factor mutation (password rotation, MFA change, passkey add, lockout bump, phone refresh) was applied and the updated factor-state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The mutation payload fails validation (e.g. weak password rejected by policy, malformed passkey bundle, invalid OTP secret).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'Re-authentication is required and the supplied auth is missing/expired — credential mutation always fails closed on stale auth.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role to mutate this identity’s secrets (a non-self, non-system actor).' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No credentials document exists for the supplied user id.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The mutation collides with current factor state (e.g. registering a passkey whose `credentialId` already exists, or reusing a password the rotation policy forbids).' },\n ],\n idempotent: false,\n rateLimitNote: 'Password change, MFA enrollment, and passkey registration are credential-rotation paths: non-convergent, session-invalidating, and rate-limited to slow brute-force and credential-stuffing.',\n },\n\n [Op.DELETE]: {\n purpose: 'Remove the entire credentials document when a user is deleted or a compliance scrub demands removal.',\n outcome: 'No verifier material remains for that identity, closing the high-risk data-retention path.',\n whenToUse: 'Use with extreme caution; pair with a matching user/identity delete or legal erasure run.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The credentials document was permanently removed; no verifier material remains for the identity and no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The internal service credential on the erasure request is missing, malformed, or expired.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the system / compliance role required to delete a secrets document.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No credentials document exists for the supplied user id (or it was already erased).' },\n ],\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'This resource stores secret-grade material. Even though some fields (like display names) are not present here, every field is treated with production encryption-at-rest and strict logging hygiene.',\n 'Refresh-token invalidation and similar session hygiene keys off `passwordChangedAt` and other timestamps — do not back-date these fields in migrations without coordinating session stores.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n);\n"]}
|
|
1
|
+
{"version":3,"file":"user-credentials.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-credentials.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,0DAA0D,GAC3D,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,MAAM,CAAC,MAAM,oCAAoC,GAAG,qBAAqB,CACvE,0DAA0D,EAC1D,qBAAqB,EACrB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,8HAA8H;IACvI,YAAY,EAAE,8HAA8H;IAC5I,aAAa,EAAE,wIAAwI;IACvJ,QAAQ,EAAE,aAAa,CAAC,QAAQ;IAChC,SAAS,EAAE,uBAAuB,CAAC,KAAK;IACxC,YAAY,EAAE;QACZ,UAAU,EAAE;YACV,WAAW,EAAE,uBAAuB;YACpC,UAAU,EAAE,uBAAuB;YACnC,UAAU,EAAE,cAAc,CAAC,MAAM;YACjC,eAAe,EAAE,mBAAmB,CAAC,UAAU;SAChD;QACD,eAAe,EAAE;YACf,WAAW,EAAE,uBAAuB;YACpC,UAAU,EAAE,4DAA4D;YACxE,UAAU,EAAE,cAAc,CAAC,OAAO;YAClC,eAA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CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,sGAAsG;YAC/G,OAAO,EAAE,4FAA4F;YACrG,SAAS,EAAE,2FAA2F;YACtG,UAAU,EAAE,uBAAuB,CAAC,OAAO;YAC3C,gBAAgB,EAAE;gBAChB,EAAE,IAAI,EAAE,sBAAsB,CAAC,cAAc,EAAE,OAAO,EAAE,0HAA0H,EAAE;aACrL;YACD,cAAc,EAAE;gBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,gBAAgB,EAAE,IAAI,EAAE,2FAA2F,EAAE;gBACpJ,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,sFAAsF,EAAE;gBAC5I,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,qFAAqF,EAAE;aAC5I;YACD,UAAU,EAAE,IAAI;SACjB;KACF;IAED,mBAAmB,EAAE;QACnB,sMAAsM;QACtM,6LAA6L;KAC9L;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,SAAS,EAAE,CACzD,CAAC","sourcesContent":["/**\n * Resource: `userCredentials` — Wildo SaaS engine specification (backend-only).\n *\n * Inputs:\n * - Schema: engine/saas-models/src/users/user-credentials.shared.schemas.ts → `UserCredentialsSchema`\n * - Factory: engine/saas-models/src/users/user-credentials.shared.resources-config.schemas.ts\n * → `userCredentialsResourceConfiguration_InitializationFactory`\n * - Custom operations: none (core CRUD only; all variants `INTERNAL_CALL` system resource)\n * - UI presets: none\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n MfaEnrollmentState,\n ResourcePrimaryScope,\n UserCredentialsSchema,\n userCredentialsResourceConfiguration_InitializationFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nexport const userCredentialsResourceSpecification = resourceSpecification(\n userCredentialsResourceConfiguration_InitializationFactory,\n UserCredentialsSchema,\n ({ schemaShape }) => ({\n purpose: 'Store each user’s primary authentication material (password, MFA, and passkey credentials) as a system-owned secrets record.',\n businessRole: 'The authoritative per-user auth-secrets table backing login, re-auth, lockout, and MFA policy enforcement for that identity.',\n lifecycleRole: 'Rotates with every password or MFA change, new passkey registration, and progressive lockout counter updates as security events occur.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.USERS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserCredentialsSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userCredentialsResourceConfiguration_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_CREDENTIALS',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'System resource: operations are `INTERNAL_CALL` only — the HTTP surface is custom auth service routes, not generated CRUD controllers.',\n 'The runtime `userNotifications[]` fan-out is empty; do not add communications.* blocks — password-reset and security emails are owned by auth/notification services outside this resource.',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Document identifier for this credentials row, aligned with the user identity it protects.',\n whyItMatters: 'It is the join key the auth stack uses when it needs to read or update secrets for a given user in one fetch.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'Foreign key to the `users` record whose credentials are stored in this document.',\n whyItMatters: 'Drives a strict 1:1 (per deployment convention) between an identity and its stored secrets, preventing orphan secret blobs.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n passwordHash: schemaShape.passwordHash.stringSpec({\n meaning: 'Password verifier material (e.g. Argon2 output) for traditional password sign-in — never sent to the client. NULLISH: absent for password-less accounts whose first factor is a passkey, magic link, or enterprise SSO, or explicitly null once a directory-managed reconciliation physically destroys the local first factor.',\n whyItMatters: 'It is the root first-factor for PASSWORD users and must never leave backend-controlled storage or logs; its absence OR null both mark an account with no usable local password, so consumers must treat it as falsy-when-cleared (never assume presence).',\n semanticRole: 'code',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n secretBase32: schemaShape.secretBase32.stringSpec({\n meaning: 'Base32 TOTP shared secret, when MFA via authenticator is enabled. NULLISH: absent when TOTP was never set up, or explicitly null after the TOTP-disable clear destroys it.',\n whyItMatters: 'Powers one-time code validation in second-factor policies; must remain backend-only. A disable writes null here, so consumers must treat absent and null identically (no TOTP secret).',\n }),\n\n totpVerified: schemaShape.totpVerified.booleanSpec({\n meaning: 'True once the user has completed an authenticator enrollment ceremony and proved possession of a valid TOTP code.',\n whyItMatters: 'Gates which authentication paths are allowed before marking MFA as fully active.',\n }),\n\n backupCodesHashed: schemaShape.backupCodesHashed.arraySpec({\n meaning: 'One-way hashes of one-time recovery codes, consumed by the server when a user depletes them.',\n whyItMatters: 'Gives a break-glass path when a device is lost, without ever storing the raw recovery codes in plaintext.',\n elementMeaning: 'SHA-256 hash of a single consumed or active backup code value.',\n elementType: {\n notes: [\n 'Elements are string hashes, not a closed enum; strength is the responsibility of the issuing routine.',\n ],\n },\n }),\n\n totpVerifiedAt: schemaShape.totpVerifiedAt.dateSpec({\n meaning: 'Timestamp of the first successful TOTP setup confirmation. NULLISH: absent before verification, a date once verified, or explicitly null after the TOTP-disable clear.',\n whyItMatters: 'Useful in audits and in telling whether MFA was already proven before later policy changes; a disable writes null, so readers treat absent and null as \"not currently verified\".',\n temporalRole: 'occurred',\n }),\n\n passwordChangedAt: schemaShape.passwordChangedAt.dateSpec({\n meaning: 'When the user last changed their password.',\n whyItMatters: 'The auth stack can invalidate long-lived sessions issued before this time (refresh-token family invalidation).',\n temporalRole: 'occurred',\n }),\n\n passkeyCredentials: schemaShape.passkeyCredentials.arraySpec({\n meaning: 'Registered WebAuthn / passkey credentials (FIDO2) for passwordless or phishing-resistant auth.',\n whyItMatters: 'The platform can bind multiple device-bound keys per user while still enforcing duplicate detection on `credentialId`.',\n elementMeaning: 'One passkey registration bundle (credentialId, publicKey, device metadata) as produced by the WebAuthn verification layer.',\n elementType: {\n notes: [\n 'Element schema is the nested `PasskeyCredentialEntrySchema` in `user-credentials.shared.schemas.ts` — a nested object, not a flat enum, so this arraySpec carries element prose without an enum map.',\n ],\n },\n }),\n\n firstMfaPromptAt: schemaShape.firstMfaPromptAt.dateSpec({\n meaning: 'First wall-clock moment MFA was required but not yet satisfied under the grace window.',\n whyItMatters: 'Feeds progressive enrollment policies that give users a limited time to add a second factor.',\n temporalRole: 'occurred',\n }),\n\n mfaEnrollmentState: schemaShape.mfaEnrollmentState.enumSpec({\n meaning: 'Coarse policy state of MFA enrollment (none, required-grace, fully enrolled, etc.).',\n whyItMatters: 'The login gate and admin dashboards read this to decide which ceremonies to force next.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'MfaEnrollmentState',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [MfaEnrollmentState.NOT_REQUIRED]: { meaning: 'Policy does not currently force MFA for this user.' },\n [MfaEnrollmentState.PENDING]: { meaning: 'MFA is expected but the user has not started enrollment yet.' },\n [MfaEnrollmentState.GRACE]: { meaning: 'MFA is required; the user is still inside the grace period before hard enforcement.' },\n [MfaEnrollmentState.ENROLLED]: { meaning: 'MFA is active and verified per policy (TOTP, passkey, or equivalent).' },\n },\n }),\n\n consecutiveLockouts: schemaShape.consecutiveLockouts.numberSpec({\n meaning: 'How many times this account has recently tripped a lockout (used for progressive lockout back-off).',\n whyItMatters: 'Allows infrastructure to grow delay severity without permanently banning mistaken-password attempts in one shot.',\n unit: 'count',\n }),\n\n phoneNumber: schemaShape.phoneNumber.stringSpec({\n meaning: 'E.164 phone number used for SMS OTP, when the deployment enables phone second factors.',\n whyItMatters: 'Binds a distinct possession factor channel separate from TOTP and passkeys when SMS is in scope.',\n semanticRole: 'identifier',\n }),\n\n phoneNumberVerified: schemaShape.phoneNumberVerified.booleanSpec({\n meaning: 'Whether a one-time code flow has confirmed the phone number is reachable by the user.',\n whyItMatters: 'Stops unverified phone numbers from being treated as a trusted second channel.',\n }),\n\n phoneVerifiedAt: schemaShape.phoneVerifiedAt.dateSpec({\n meaning: 'Timestamp of the most recent successful phone verification round-trip.',\n whyItMatters: 'Gives the audit trail a concrete proof point for when SMS was trusted for this number.',\n temporalRole: 'occurred',\n }),\n\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the credentials document was first created (typically alongside user provisioning).',\n temporalRole: 'creation',\n }),\n\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When any mutable secret, factor state, or counter last changed on this document.',\n temporalRole: 'modified',\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Load the current authentication secrets and factor state for one user from the system repository path.',\n outcome: 'Internal services obtain the up-to-date credential payload needed to verify passwords, TOTP, passkeys, or phone OTP.',\n whenToUse: 'Use only on trusted service routes — never for direct user-facing “view my password” flows; values except policy flags remain backend-only at rest.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The credentials document was found and its factor/secret-state payload is returned to the trusted internal caller (raw verifiers stay backend-only).' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The internal service credential on the request is missing, malformed, or expired; this `INTERNAL_CALL` surface fails closed before any secret is read.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is authenticated but lacks the system role permitted to read raw credential material (never exposed to member-facing sessions).' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No credentials document exists for the supplied user id (the identity has no provisioned secrets row).' },\n ],\n idempotent: true,\n rateLimitNote: 'Reads of secret-grade material are restricted to trusted service routes and may be throttled / audited to limit credential-harvesting blast radius.',\n },\n\n [Op.LIST]: {\n purpose: 'Enumerate user credential records for background maintenance or support tooling (bounded by the repository query).',\n outcome: 'Operators or infrastructure jobs can page through secrets rows under strict system roles.',\n whenToUse: 'Use for migrations, audits, or break-glass investigations — not for unfiltered bulk download.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) bounded page of credentials rows is returned for the system maintenance/audit caller.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The internal service credential on the request is missing, malformed, or expired.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the strict system / break-glass role required to enumerate secrets rows; this is never an org-operator or member surface.' },\n ],\n idempotent: true,\n },\n\n [Op.CREATE]: {\n purpose: 'Insert the initial secrets row for a new user, typically during provisioning.',\n outcome: 'The platform can tie every subsequent login event to a stable secrets document for that identity.',\n whenToUse: 'Call when a user is first materialized in the `users` table and a credentials row is required for auth.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A fresh credentials document is created for the user and linked 1:1 to the identity it protects.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The provisioning payload fails schema validation (e.g. missing `userId`, malformed initial factor state).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The internal service credential on the provisioning request is missing, malformed, or expired.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the system/provisioning role permitted to mint a credentials row.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The referenced `users` row does not exist, so there is no identity to anchor secrets to.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A credentials document already exists for this user id; the per-user 1:1 convention forbids a second secrets blob.' },\n ],\n idempotent: false,\n },\n\n [Op.UPDATE]: {\n purpose: 'Mutate any authentication material or state counters (password, MFA, passkey list, lockout, phone) on the row.',\n outcome: 'The system-of-record for secrets stays in sync with what the user or admin last changed in policy-compliant flows.',\n whenToUse: 'Use for password change, MFA enable/disable, new passkey registration, lockout counter bumps, and phone refresh.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The requested secret/factor mutation (password rotation, MFA change, passkey add, lockout bump, phone refresh) was applied and the updated factor-state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The mutation payload fails validation (e.g. weak password rejected by policy, malformed passkey bundle, invalid OTP secret).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'Re-authentication is required and the supplied auth is missing/expired — credential mutation always fails closed on stale auth.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role to mutate this identity’s secrets (a non-self, non-system actor).' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No credentials document exists for the supplied user id.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The mutation collides with current factor state (e.g. registering a passkey whose `credentialId` already exists, or reusing a password the rotation policy forbids).' },\n ],\n idempotent: false,\n rateLimitNote: 'Password change, MFA enrollment, and passkey registration are credential-rotation paths: non-convergent, session-invalidating, and rate-limited to slow brute-force and credential-stuffing.',\n },\n\n [Op.DELETE]: {\n purpose: 'Remove the entire credentials document when a user is deleted or a compliance scrub demands removal.',\n outcome: 'No verifier material remains for that identity, closing the high-risk data-retention path.',\n whenToUse: 'Use with extreme caution; pair with a matching user/identity delete or legal erasure run.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The credentials document was permanently removed; no verifier material remains for the identity and no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The internal service credential on the erasure request is missing, malformed, or expired.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the system / compliance role required to delete a secrets document.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No credentials document exists for the supplied user id (or it was already erased).' },\n ],\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'This resource stores secret-grade material. Even though some fields (like display names) are not present here, every field is treated with production encryption-at-rest and strict logging hygiene.',\n 'Refresh-token invalidation and similar session hygiene keys off `passwordChangedAt` and other timestamps — do not back-date these fields in migrations without coordinating session stores.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n);\n"]}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* engine `resourceUIBehavior` preset is registered in presets-components for this type).
|
|
11
11
|
*/
|
|
12
12
|
import { AuthScopeType, CoreResourceOperation as Op, ExternalIdentitySource, SsoConnectionType } from '@wildo-ai/saas-models';
|
|
13
|
-
export declare const userIdentityLinksResourceSpecification: import("../../../_core").ResourceSpecificationConfig<undefined, Op.READ | Op.UPDATE | Op.DELETE | Op.CREATE | Op.LIST, import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodObject<{
|
|
13
|
+
export declare const userIdentityLinksResourceSpecification: import("../../../_core").ResourceSpecificationConfig<undefined, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.DELETE | Op.CREATE | Op.LIST, import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodObject<{
|
|
14
14
|
_id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>;
|
|
15
15
|
userId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>>;
|
|
16
16
|
connectionType: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof SsoConnectionType>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-identity-links.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-identity-links.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH,OAAO,EACL,aAAa,EACb,qBAAqB,IAAI,EAAE,EAC3B,sBAAsB,EAEtB,iBAAiB,EAGlB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"user-identity-links.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-identity-links.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH,OAAO,EACL,aAAa,EACb,qBAAqB,IAAI,EAAE,EAC3B,sBAAsB,EAEtB,iBAAiB,EAGlB,MAAM,uBAAuB,CAAC;AAI/B,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;kCAsQlD,CAAC"}
|
|
@@ -13,11 +13,13 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
|
|
|
13
13
|
import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
|
|
14
14
|
import { AuthScopeType, CoreResourceOperation as Op, ExternalIdentitySource, ResourcePrimaryScope, SsoConnectionType, UserIdentityLinkSchema, userIdentityLinksResourceConfiguration_InitializationFactory, } from '@wildo-ai/saas-models';
|
|
15
15
|
import { HttpResponseStatusCode, resourceSpecification } from '../../../_core/index.js';
|
|
16
|
+
import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
|
|
16
17
|
export const userIdentityLinksResourceSpecification = resourceSpecification(userIdentityLinksResourceConfiguration_InitializationFactory, UserIdentityLinkSchema, ({ schemaShape }) => ({
|
|
17
18
|
purpose: 'Persist the OAuth/OIDC/SSO identity links that connect each managed user to their external provider identities (social or enterprise).',
|
|
18
19
|
businessRole: 'The per-user system-of-record for which IdP subjects map to a Wildo `users` row during login, provisioning, and SCIM flows.',
|
|
19
20
|
lifecycleRole: 'Rows are created on first link, updated when provider fields refresh, and timestamped for last use on every successful sign-in with that link.',
|
|
20
21
|
audience: LabelAudience.END_USER,
|
|
22
|
+
subDomain: EngineResourceSubDomain.USERS,
|
|
21
23
|
codeHandling: {
|
|
22
24
|
mainSchema: {
|
|
23
25
|
packageName: '@wildo-ai/saas-models',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-identity-links.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-identity-links.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,aAAa,EACb,qBAAqB,IAAI,EAAE,EAC3B,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,4DAA4D,GAC7D,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAE5F,MAAM,CAAC,MAAM,sCAAsC,GAAG,qBAAqB,CACzE,4DAA4D,EAC5D,sBAAsB,EACtB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;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AAuB,CAAC,OAAO;YAC3C,gBAAgB,EAAE;gBAChB,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,iHAAiH,EAAE;aACpK;YACD,cAAc,EAAE;gBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,eAAe,EAAE,IAAI,EAAE,8CAA8C,EAAE,SAAS,EAAE,mBAAmB,EAAE;gBACtI,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,uFAAuF,EAAE;gBAC7I,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,kDAAkD,EAAE;aACzG;YACD,UAAU,EAAE,IAAI;SACjB;QAED,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,kHAAkH;YAC3H,OAAO,EAAE,8FAA8F;YACvG,SAAS,EAAE,mGAAmG;YAC9G,UAAU,EAAE,uBAAuB,CAAC,OAAO;YAC3C,gBAAgB,EAAE;gBAChB,EAAE,IAAI,EAAE,sBAAsB,CAAC,cAAc,EAAE,OAAO,EAAE,mJAAmJ,EAAE;aAC9M;YACD,cAAc,EAAE;gBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,sHAAsH,EAAE;gBAC5K,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,2GAA2G,EAAE;aAClK;YACD,UAAU,EAAE,IAAI;SACjB;KACF;IAED,mBAAmB,EAAE;QACnB,iMAAiM;QACjM,4PAA4P;KAC7P;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,SAAS,EAAE,CACzD,CAAC","sourcesContent":["/**\n * Resource: `userIdentityLinks` — Wildo SaaS engine specification (backend-only).\n *\n * Inputs:\n * - Schema: engine/saas-models/src/users/user-identity-links.shared.schemas.ts → `UserIdentityLinkSchema`\n * - Factory: engine/saas-models/src/users/user-identity-links.shared.resources-config.schemas.ts\n * → `userIdentityLinksResourceConfiguration_InitializationFactory`\n * - Custom operations: none\n * - UI presets: none (a dedicated read path exists for GET /auth/identity-links at the app layer, but no\n * engine `resourceUIBehavior` preset is registered in presets-components for this type).\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n AuthScopeType,\n CoreResourceOperation as Op,\n ExternalIdentitySource,\n ResourcePrimaryScope,\n SsoConnectionType,\n UserIdentityLinkSchema,\n userIdentityLinksResourceConfiguration_InitializationFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\n\nexport const userIdentityLinksResourceSpecification = resourceSpecification(\n userIdentityLinksResourceConfiguration_InitializationFactory,\n UserIdentityLinkSchema,\n ({ schemaShape }) => ({\n purpose: 'Persist the OAuth/OIDC/SSO identity links that connect each managed user to their external provider identities (social or enterprise).',\n businessRole: 'The per-user system-of-record for which IdP subjects map to a Wildo `users` row during login, provisioning, and SCIM flows.',\n lifecycleRole: 'Rows are created on first link, updated when provider fields refresh, and timestamped for last use on every successful sign-in with that link.',\n audience: LabelAudience.END_USER,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserIdentityLinkSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userIdentityLinksResourceConfiguration_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_IDENTITY_LINKS',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'All operations are `INTERNAL_CALL` in the resource config — the supported external read surface is the auth controller, not a generic CRUD controller.',\n 'No `userNotifications` / `m2mNotifications` on this resource; do not add communications.* blocks (invitation/alert emails are owned by adjacent services).',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Identifier for a single (user, provider, connection-type) link row stored in the identity-links collection.',\n whyItMatters: 'Deduplicates the identity-link upsert key used during JIT provisioning and IdP re-login.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'The Wildo user that owns this external identity link.',\n whyItMatters: 'Drives the fan-out to “which app user is logging in from which IdP account”.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n connectionType: schemaShape.connectionType.enumSpec({\n meaning: 'Whether this link is a lightweight social sign-in or a stricter enterprise connector.',\n whyItMatters: 'Changes validation rules, admin UX, and whether an explicit enterprise scope is permitted.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'SsoConnectionType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [SsoConnectionType.SOCIAL]: { meaning: 'Consumer or workspace-social IdP (no tenant-specific enterprise contract).' },\n [SsoConnectionType.ENTERPRISE]: { meaning: 'SAML/enterprise contract bound to exactly one organization or application scope.' },\n },\n }),\n\n providerRef: schemaShape.providerRef.stringSpec({\n meaning: 'Stable connector string for the provider family (e.g. google, microsoft, oidc, github).',\n whyItMatters: 'Picks the correct OIDC/SAML client configuration and certificate trust chain during login.',\n semanticRole: 'code',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n providerUserId: schemaShape.providerUserId.stringSpec({\n meaning: 'The end-user’s stable subject at the provider (IdP `sub` or directory object id, depending on IdP).',\n whyItMatters: 'The lookup anchor when reconciling a returning login with the same external account.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n providerEmail: schemaShape.providerEmail.stringSpec({\n meaning: 'Email the IdP attests for the user at link time, used for UI display and support correlation.',\n whyItMatters: 'Often the human-readable handle operators see; may diverge from the Wildo account email in edge cases.',\n semanticRole: 'identifier',\n }),\n\n providerDisplayName: schemaShape.providerDisplayName.stringSpec({\n meaning: 'Display name the IdP returned on last profile refresh, if any.',\n whyItMatters: 'Powers friendly UI in device/session lists and admin tooling when available.',\n }),\n\n providerAvatarUrl: schemaShape.providerAvatarUrl.stringSpec({\n meaning: 'Profile picture URL from the provider when the IdP includes one in claims.',\n whyItMatters: 'Improves UX without re-uploading a separate app avatar, when permitted by policy.',\n semanticRole: 'uri',\n }),\n\n providerRawProfile: schemaShape.providerRawProfile.objectSpec({\n meaning: 'Opaque provider claims map (`string` keys → `unknown` values) retained for support and debugging — not shown to the end user.',\n whyItMatters: 'Gives the auth team enough raw context to diagnose mapping bugs without a second data fetch; treated as operator-only and excluded from public APIs.',\n }),\n\n scopeType: schemaShape.scopeType.enumSpec({\n meaning: 'The exact tenant kind that owns an enterprise identity link; omitted for social links.',\n whyItMatters: 'Prevents application identifiers from being interpreted as organization identifiers by membership, grant, and audit logic.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'AuthScopeType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [AuthScopeType.ORGANIZATION]: { meaning: 'The link belongs to an organization-scoped enterprise connection.' },\n [AuthScopeType.APPLICATION]: { meaning: 'The link belongs to an application-scoped enterprise connection.' },\n },\n }),\n\n organizationId: schemaShape.organizationId.stringSpec({\n meaning: 'The owning organization for an organization-scoped enterprise identity link.',\n whyItMatters:\n 'Binds the identity to the same organization that owns membership and organization-type grants. Forbidden for social and application-scoped links.',\n semanticRole: 'identifier',\n }),\n\n applicationId: schemaShape.applicationId.stringSpec({\n meaning: 'The owning application for an application-scoped enterprise identity link.',\n whyItMatters:\n 'Preserves application tenancy without manufacturing an organization membership or overloading `organizationId`.',\n semanticRole: 'identifier',\n }),\n\n connectionId: schemaShape.connectionId.stringSpec({\n meaning: 'Enterprise connector row identifier inside the owning organization or application scope.',\n whyItMatters:\n 'Distinguishes multiple enterprise connectors in one scope and is required for enterprise links; social links omit it.',\n semanticRole: 'identifier',\n }),\n\n source: schemaShape.source.enumSpec({\n meaning: 'How this row was first established (OIDC, SAML, SCIM, …).',\n whyItMatters: 'Distinguishes interactive JIT links from service-driven SCIM or migration imports when auditing the graph.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ExternalIdentitySource',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [ExternalIdentitySource.OAUTH2]: { meaning: 'Created through an OAuth 2.0 interactive flow that does not provide OpenID Connect identity semantics.' },\n [ExternalIdentitySource.OIDC]: { meaning: 'Created through an OpenID Connect interactive flow.' },\n [ExternalIdentitySource.SAML]: { meaning: 'Created through a SAML-based enterprise sign-in or assertion exchange.' },\n [ExternalIdentitySource.SCIM]: { meaning: 'Provisioned or reconciled from directory SCIM sync rather than a browser sign-in only.' },\n },\n }),\n\n linkedAt: schemaShape.linkedAt.dateSpec({\n meaning: 'When the provider first bound this `providerUserId` to the Wildo user (insert-time timestamp).',\n whyItMatters: 'Ordering field for “account linking history” views and compliance exports.',\n temporalRole: 'creation',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n lastUsedAt: schemaShape.lastUsedAt.dateSpec({\n meaning: 'The last successful sign-in (or link refresh) that used this exact identity link.',\n whyItMatters: 'Idle-link cleanup policies and support triage can rely on inactivity heuristics from this value.',\n temporalRole: 'occurred',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Fetch one specific identity link row, typically through internal service calls when reconciling a provider subject.',\n outcome: 'The caller can inspect the stored provider email, type, and connector metadata to finish auth or audit.',\n whenToUse: 'Use when a backend flow already has the object id; user-facing “list my links” goes through a dedicated API surface, not a generic public READ.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The identity-link row was found and its provider metadata (email, type, connector ids) is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither the owning user nor a trusted auth/admin service permitted to read another user’s provider bindings.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No identity-link row exists for the supplied id.' },\n ],\n idempotent: true,\n },\n\n [Op.LIST]: {\n purpose: 'List identity links (usually filtered by `userId`) to render settings pages or to audit provider coverage.',\n outcome: 'Operators or services receive the full set of provider bindings for a user in one query plan.',\n whenToUse: 'Use when the auth controller or admin service enumerates a user’s connected accounts.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) set of the target user’s provider bindings is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller tries to enumerate another user’s links without the auth-controller / admin role; a user may only list their own connected accounts.' },\n ],\n idempotent: true,\n },\n\n [Op.CREATE]: {\n purpose: 'Insert a new identity link when a first-time OIDC or SAML sign-in or SCIM import introduces a new provider subject.',\n outcome: 'The Wildo user record gains a new stable mapping row that future sign-ins can hit without a migration.',\n whenToUse: 'Use in JIT account linking — never from untrusted public callers without a verified IdP attestation first.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A new identity-link row binds the provider subject to the Wildo user; future sign-ins resolve through it without re-provisioning.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The link payload fails schema validation (e.g. missing provider subject fields, an incompatible connection/source pair, or enterprise scope coordinates that do not match `scopeType`).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is an untrusted/public actor with no verified IdP attestation; JIT linking is gated to the auth service.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The referenced `users` row does not exist, so there is no identity to bind the provider subject to.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'This provider subject is already linked for the same connection type, provider, external subject, and exact enterprise scope/connection coordinates, so a second binding is rejected.' },\n ],\n idempotent: false,\n },\n\n [Op.UPDATE]: {\n purpose: 'Refresh profile metadata (email, name, raw claims) or move ownership fields after transposition/merge events.',\n outcome: 'The next login sees up-to-date provider data without re-creating a new link row id.',\n whenToUse: 'Use when a provider re-issues a subject change or when a manual data-fix adjusts enterprise connector ids.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The link’s provider metadata (or ownership fields after a merge) was refreshed and the updated row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The refreshed fields fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the auth-service / admin role required to mutate this identity link.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No identity-link row exists for the supplied id.' },\n ],\n idempotent: true,\n },\n\n [Op.DELETE]: {\n purpose: 'Remove an identity link when a user explicitly disconnects a provider or an admin unlinks a compromised binding.',\n outcome: 'That provider can no longer authenticate into this Wildo user until a fresh link is created.',\n whenToUse: 'Use when policy demands removing a specific IdP mapping without deleting the entire user account.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The identity link was removed; that provider subject can no longer authenticate into the user until a fresh link is created. No body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither the owning user disconnecting their own provider nor an admin unlinking a compromised binding.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No identity-link row exists for the supplied id (the provider was never linked, or was already unlinked).' },\n ],\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'The unique constraint at the data layer is `(userId, providerRef, connectionType)`; schema-level prose defers to the engine migration index because link-uniqueness is a database truth source.',\n 'Enterprise fields (`organizationId`, `connectionId`) are optional in the shared schema: social connections omit them while enterprise ones rely on them for tenant scoping — authors must not flatten those semantics in AI prompts into “always present”.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n);\n"]}
|
|
1
|
+
{"version":3,"file":"user-identity-links.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-identity-links.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,aAAa,EACb,qBAAqB,IAAI,EAAE,EAC3B,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,4DAA4D,GAC7D,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,MAAM,CAAC,MAAM,sCAAsC,GAAG,qBAAqB,CACzE,4DAA4D,EAC5D,sBAAsB,EACtB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,wIAAwI;IACjJ,YAAY,EAAE,6HAA6H;IAC3I,aAAa,EAAE,gJAAgJ;IAC/J,QAAQ,EAAE,aAAa,CAAC,QAAQ;IAChC,SAAS,EAAE,uBAAuB,CAAC,KAAK;IACxC,YAAY,EAAE;QACZ,UAAU,EAAE;YAC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AE,sBAAsB,CAAC,eAAe,EAAE,IAAI,EAAE,8CAA8C,EAAE,SAAS,EAAE,mBAAmB,EAAE;gBACtI,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,uFAAuF,EAAE;gBAC7I,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,kDAAkD,EAAE;aACzG;YACD,UAAU,EAAE,IAAI;SACjB;QAED,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,kHAAkH;YAC3H,OAAO,EAAE,8FAA8F;YACvG,SAAS,EAAE,mGAAmG;YAC9G,UAAU,EAAE,uBAAuB,CAAC,OAAO;YAC3C,gBAAgB,EAAE;gBAChB,EAAE,IAAI,EAAE,sBAAsB,CAAC,cAAc,EAAE,OAAO,EAAE,mJAAmJ,EAAE;aAC9M;YACD,cAAc,EAAE;gBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,sHAAsH,EAAE;gBAC5K,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,2GAA2G,EAAE;aAClK;YACD,UAAU,EAAE,IAAI;SACjB;KACF;IAED,mBAAmB,EAAE;QACnB,iMAAiM;QACjM,4PAA4P;KAC7P;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,SAAS,EAAE,CACzD,CAAC","sourcesContent":["/**\n * Resource: `userIdentityLinks` — Wildo SaaS engine specification (backend-only).\n *\n * Inputs:\n * - Schema: engine/saas-models/src/users/user-identity-links.shared.schemas.ts → `UserIdentityLinkSchema`\n * - Factory: engine/saas-models/src/users/user-identity-links.shared.resources-config.schemas.ts\n * → `userIdentityLinksResourceConfiguration_InitializationFactory`\n * - Custom operations: none\n * - UI presets: none (a dedicated read path exists for GET /auth/identity-links at the app layer, but no\n * engine `resourceUIBehavior` preset is registered in presets-components for this type).\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n AuthScopeType,\n CoreResourceOperation as Op,\n ExternalIdentitySource,\n ResourcePrimaryScope,\n SsoConnectionType,\n UserIdentityLinkSchema,\n userIdentityLinksResourceConfiguration_InitializationFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nexport const userIdentityLinksResourceSpecification = resourceSpecification(\n userIdentityLinksResourceConfiguration_InitializationFactory,\n UserIdentityLinkSchema,\n ({ schemaShape }) => ({\n purpose: 'Persist the OAuth/OIDC/SSO identity links that connect each managed user to their external provider identities (social or enterprise).',\n businessRole: 'The per-user system-of-record for which IdP subjects map to a Wildo `users` row during login, provisioning, and SCIM flows.',\n lifecycleRole: 'Rows are created on first link, updated when provider fields refresh, and timestamped for last use on every successful sign-in with that link.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.USERS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserIdentityLinkSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userIdentityLinksResourceConfiguration_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_IDENTITY_LINKS',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'All operations are `INTERNAL_CALL` in the resource config — the supported external read surface is the auth controller, not a generic CRUD controller.',\n 'No `userNotifications` / `m2mNotifications` on this resource; do not add communications.* blocks (invitation/alert emails are owned by adjacent services).',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Identifier for a single (user, provider, connection-type) link row stored in the identity-links collection.',\n whyItMatters: 'Deduplicates the identity-link upsert key used during JIT provisioning and IdP re-login.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'The Wildo user that owns this external identity link.',\n whyItMatters: 'Drives the fan-out to “which app user is logging in from which IdP account”.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n connectionType: schemaShape.connectionType.enumSpec({\n meaning: 'Whether this link is a lightweight social sign-in or a stricter enterprise connector.',\n whyItMatters: 'Changes validation rules, admin UX, and whether an explicit enterprise scope is permitted.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'SsoConnectionType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [SsoConnectionType.SOCIAL]: { meaning: 'Consumer or workspace-social IdP (no tenant-specific enterprise contract).' },\n [SsoConnectionType.ENTERPRISE]: { meaning: 'SAML/enterprise contract bound to exactly one organization or application scope.' },\n },\n }),\n\n providerRef: schemaShape.providerRef.stringSpec({\n meaning: 'Stable connector string for the provider family (e.g. google, microsoft, oidc, github).',\n whyItMatters: 'Picks the correct OIDC/SAML client configuration and certificate trust chain during login.',\n semanticRole: 'code',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n providerUserId: schemaShape.providerUserId.stringSpec({\n meaning: 'The end-user’s stable subject at the provider (IdP `sub` or directory object id, depending on IdP).',\n whyItMatters: 'The lookup anchor when reconciling a returning login with the same external account.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n providerEmail: schemaShape.providerEmail.stringSpec({\n meaning: 'Email the IdP attests for the user at link time, used for UI display and support correlation.',\n whyItMatters: 'Often the human-readable handle operators see; may diverge from the Wildo account email in edge cases.',\n semanticRole: 'identifier',\n }),\n\n providerDisplayName: schemaShape.providerDisplayName.stringSpec({\n meaning: 'Display name the IdP returned on last profile refresh, if any.',\n whyItMatters: 'Powers friendly UI in device/session lists and admin tooling when available.',\n }),\n\n providerAvatarUrl: schemaShape.providerAvatarUrl.stringSpec({\n meaning: 'Profile picture URL from the provider when the IdP includes one in claims.',\n whyItMatters: 'Improves UX without re-uploading a separate app avatar, when permitted by policy.',\n semanticRole: 'uri',\n }),\n\n providerRawProfile: schemaShape.providerRawProfile.objectSpec({\n meaning: 'Opaque provider claims map (`string` keys → `unknown` values) retained for support and debugging — not shown to the end user.',\n whyItMatters: 'Gives the auth team enough raw context to diagnose mapping bugs without a second data fetch; treated as operator-only and excluded from public APIs.',\n }),\n\n scopeType: schemaShape.scopeType.enumSpec({\n meaning: 'The exact tenant kind that owns an enterprise identity link; omitted for social links.',\n whyItMatters: 'Prevents application identifiers from being interpreted as organization identifiers by membership, grant, and audit logic.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'AuthScopeType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [AuthScopeType.ORGANIZATION]: { meaning: 'The link belongs to an organization-scoped enterprise connection.' },\n [AuthScopeType.APPLICATION]: { meaning: 'The link belongs to an application-scoped enterprise connection.' },\n },\n }),\n\n organizationId: schemaShape.organizationId.stringSpec({\n meaning: 'The owning organization for an organization-scoped enterprise identity link.',\n whyItMatters:\n 'Binds the identity to the same organization that owns membership and organization-type grants. Forbidden for social and application-scoped links.',\n semanticRole: 'identifier',\n }),\n\n applicationId: schemaShape.applicationId.stringSpec({\n meaning: 'The owning application for an application-scoped enterprise identity link.',\n whyItMatters:\n 'Preserves application tenancy without manufacturing an organization membership or overloading `organizationId`.',\n semanticRole: 'identifier',\n }),\n\n connectionId: schemaShape.connectionId.stringSpec({\n meaning: 'Enterprise connector row identifier inside the owning organization or application scope.',\n whyItMatters:\n 'Distinguishes multiple enterprise connectors in one scope and is required for enterprise links; social links omit it.',\n semanticRole: 'identifier',\n }),\n\n source: schemaShape.source.enumSpec({\n meaning: 'How this row was first established (OIDC, SAML, SCIM, …).',\n whyItMatters: 'Distinguishes interactive JIT links from service-driven SCIM or migration imports when auditing the graph.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ExternalIdentitySource',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [ExternalIdentitySource.OAUTH2]: { meaning: 'Created through an OAuth 2.0 interactive flow that does not provide OpenID Connect identity semantics.' },\n [ExternalIdentitySource.OIDC]: { meaning: 'Created through an OpenID Connect interactive flow.' },\n [ExternalIdentitySource.SAML]: { meaning: 'Created through a SAML-based enterprise sign-in or assertion exchange.' },\n [ExternalIdentitySource.SCIM]: { meaning: 'Provisioned or reconciled from directory SCIM sync rather than a browser sign-in only.' },\n },\n }),\n\n linkedAt: schemaShape.linkedAt.dateSpec({\n meaning: 'When the provider first bound this `providerUserId` to the Wildo user (insert-time timestamp).',\n whyItMatters: 'Ordering field for “account linking history” views and compliance exports.',\n temporalRole: 'creation',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n lastUsedAt: schemaShape.lastUsedAt.dateSpec({\n meaning: 'The last successful sign-in (or link refresh) that used this exact identity link.',\n whyItMatters: 'Idle-link cleanup policies and support triage can rely on inactivity heuristics from this value.',\n temporalRole: 'occurred',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Fetch one specific identity link row, typically through internal service calls when reconciling a provider subject.',\n outcome: 'The caller can inspect the stored provider email, type, and connector metadata to finish auth or audit.',\n whenToUse: 'Use when a backend flow already has the object id; user-facing “list my links” goes through a dedicated API surface, not a generic public READ.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The identity-link row was found and its provider metadata (email, type, connector ids) is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither the owning user nor a trusted auth/admin service permitted to read another user’s provider bindings.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No identity-link row exists for the supplied id.' },\n ],\n idempotent: true,\n },\n\n [Op.LIST]: {\n purpose: 'List identity links (usually filtered by `userId`) to render settings pages or to audit provider coverage.',\n outcome: 'Operators or services receive the full set of provider bindings for a user in one query plan.',\n whenToUse: 'Use when the auth controller or admin service enumerates a user’s connected accounts.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) set of the target user’s provider bindings is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller tries to enumerate another user’s links without the auth-controller / admin role; a user may only list their own connected accounts.' },\n ],\n idempotent: true,\n },\n\n [Op.CREATE]: {\n purpose: 'Insert a new identity link when a first-time OIDC or SAML sign-in or SCIM import introduces a new provider subject.',\n outcome: 'The Wildo user record gains a new stable mapping row that future sign-ins can hit without a migration.',\n whenToUse: 'Use in JIT account linking — never from untrusted public callers without a verified IdP attestation first.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A new identity-link row binds the provider subject to the Wildo user; future sign-ins resolve through it without re-provisioning.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The link payload fails schema validation (e.g. missing provider subject fields, an incompatible connection/source pair, or enterprise scope coordinates that do not match `scopeType`).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is an untrusted/public actor with no verified IdP attestation; JIT linking is gated to the auth service.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The referenced `users` row does not exist, so there is no identity to bind the provider subject to.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'This provider subject is already linked for the same connection type, provider, external subject, and exact enterprise scope/connection coordinates, so a second binding is rejected.' },\n ],\n idempotent: false,\n },\n\n [Op.UPDATE]: {\n purpose: 'Refresh profile metadata (email, name, raw claims) or move ownership fields after transposition/merge events.',\n outcome: 'The next login sees up-to-date provider data without re-creating a new link row id.',\n whenToUse: 'Use when a provider re-issues a subject change or when a manual data-fix adjusts enterprise connector ids.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The link’s provider metadata (or ownership fields after a merge) was refreshed and the updated row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The refreshed fields fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the auth-service / admin role required to mutate this identity link.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No identity-link row exists for the supplied id.' },\n ],\n idempotent: true,\n },\n\n [Op.DELETE]: {\n purpose: 'Remove an identity link when a user explicitly disconnects a provider or an admin unlinks a compromised binding.',\n outcome: 'That provider can no longer authenticate into this Wildo user until a fresh link is created.',\n whenToUse: 'Use when policy demands removing a specific IdP mapping without deleting the entire user account.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The identity link was removed; that provider subject can no longer authenticate into the user until a fresh link is created. No body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither the owning user disconnecting their own provider nor an admin unlinking a compromised binding.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No identity-link row exists for the supplied id (the provider was never linked, or was already unlinked).' },\n ],\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'The unique constraint at the data layer is `(userId, providerRef, connectionType)`; schema-level prose defers to the engine migration index because link-uniqueness is a database truth source.',\n 'Enterprise fields (`organizationId`, `connectionId`) are optional in the shared schema: social connections omit them while enterprise ones rely on them for tenant scoping — authors must not flatten those semantics in AI prompts into “always present”.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n);\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Schema: `UserPreferencesSchema` (same document shape as `userSelfPreferences`).
|
|
4
4
|
*/
|
|
5
5
|
import { CoreResourceOperation as Op } from '@wildo-ai/saas-models';
|
|
6
|
-
export declare const userPreferencesResourceSpecification: import("../../../_core").ResourceSpecificationConfig<never, Op.READ | Op.UPDATE | Op.DELETE | Op.CREATE, import("zod").ZodObject<{
|
|
6
|
+
export declare const userPreferencesResourceSpecification: import("../../../_core").ResourceSpecificationConfig<never, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
|
|
7
7
|
_id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>;
|
|
8
8
|
userId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>>>;
|
|
9
9
|
notifications: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-preferences.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-preferences.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI5B,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"user-preferences.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-preferences.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI5B,MAAM,uBAAuB,CAAC;AA8B/B,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAuNhD,CAAC"}
|
|
@@ -9,6 +9,7 @@ import { CoreResourceOperation as Op, ResourcePrimaryScope, UserPreferencesSchem
|
|
|
9
9
|
import { HttpResponseStatusCode, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
|
|
10
10
|
import { selfServiceFrontEndSuccessNotification } from './self-service-user-notifications.shared.js';
|
|
11
11
|
import { USER_PREFERENCES_EXAMPLE_USER_ID, userPreferencesApiReferenceExample, userPreferencesApiReferencePathExample, userPreferencesApiReferenceSummaryExample, } from './user-preferences-api-reference.examples.js';
|
|
12
|
+
import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
|
|
12
13
|
const userPreferencesResourceUIBehavior = userPreferencesResourceUIBehaviorSource;
|
|
13
14
|
const toast = (s) => selfServiceFrontEndSuccessNotification(s);
|
|
14
15
|
export const userPreferencesResourceSpecification = resourceSpecificationFromFrontendConfiguration(resourceFrontendConfiguration(userPreferencesResourceUIBehavior), resourceSpecification(userPreferencesFactory, UserPreferencesSchema, ({ schemaShape }) => ({
|
|
@@ -16,6 +17,7 @@ export const userPreferencesResourceSpecification = resourceSpecificationFromFro
|
|
|
16
17
|
businessRole: 'Powers authorized support inspection and explicitly privileged preference corrections without republishing the self-service API under an addressable user route.',
|
|
17
18
|
lifecycleRole: 'Created internally alongside the user and deleted internally with the user; administrators may read or update the existing row but cannot create or delete it over HTTP.',
|
|
18
19
|
audience: LabelAudience.ADMIN,
|
|
20
|
+
subDomain: EngineResourceSubDomain.USERS,
|
|
19
21
|
codeHandling: {
|
|
20
22
|
mainSchema: {
|
|
21
23
|
packageName: '@wildo-ai/saas-models',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-preferences.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-preferences.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iCAAiC,IAAI,uCAAuC,EAAE,MAAM,8BAA8B,CAAC;AAC5H,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,qBAAqB,EACrB,0DAA0D,IAAI,sBAAsB,GACrF,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,sCAAsC,EAAE,MAAM,0CAA0C,CAAC;AAClG,OAAO,EACL,gCAAgC,EAChC,kCAAkC,EAClC,sCAAsC,EACtC,yCAAyC,GAC1C,MAAM,2CAA2C,CAAC;AAOnD,MAAM,iCAAiC,GAAG,uCAIzC,CAAC;AAEF,MAAM,KAAK,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,sCAAsC,CAAC,CAAC,CAAC,CAAC;AAEvE,MAAM,CAAC,MAAM,oCAAoC,GAAG,8CAA8C,CAChG,6BAA6B,CAAC,iCAAiC,CAAC,EAChE,qBAAqB,CACnB,sBAAsB,EACtB,qBAAqB,EACrB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,qJAAqJ;IAC9J,YAAY,EAAE,kKAAkK;IAChL,aAAa,EAAE,0KAA0K;IAC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AE,sBAAsB;gBAC/B,SAAS,EAAE,+DAA+D;gBAC1E,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,8BAA8B,EAAE,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,4DAA4D,EAAE,EAAE;aAC1J;YACD,OAAO,EAAE;gBACP,OAAO,EAAE,uBAAuB;gBAChC,SAAS,EAAE,yBAAyB;gBACpC,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,wBAAwB,EAAE,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,+CAA+C,EAAE,EAAE;aACvI;YACD,QAAQ,EAAE;gBACR,OAAO,EAAE,uBAAuB;gBAChC,SAAS,EAAE,2BAA2B;gBACtC,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,sDAAsD,EAAE,EAAE;aACvI;YACD,QAAQ,EAAE;gBACR,OAAO,EAAE,uCAAuC;gBAChD,SAAS,EAAE,8BAA8B;gBACzC,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,iDAAiD,EAAE,EAAE;aAClI;SACF;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;YACT,QAAQ,EAAE;gBACR,KAAK,EAAE;oBACL,OAAO,EAAE,gGAAgG;oBACzG,SAAS,EAAE,yEAAyE;iBACrF;aACF;SACF;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,QAAQ,EAAE;gBACR,KAAK,EAAE;oBACL,OAAO,EAAE,mEAAmE;oBAC5E,SAAS,EAAE,gDAAgD;iBAC5D;aACF;SACF;KACF;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `userPreferences` — Wildo SaaS engine specification (mixed, admin-leaning).\n * Schema: `UserPreferencesSchema` (same document shape as `userSelfPreferences`).\n */\n\nimport { userPreferencesResourceUIBehavior as userPreferencesResourceUIBehaviorSource } 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 UserPreferencesSchema,\n userPreferencesResourceConfiguration_InitializationFactory as userPreferencesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\nimport { selfServiceFrontEndSuccessNotification } from './self-service-user-notifications.shared';\nimport {\n USER_PREFERENCES_EXAMPLE_USER_ID,\n userPreferencesApiReferenceExample,\n userPreferencesApiReferencePathExample,\n userPreferencesApiReferenceSummaryExample,\n} from './user-preferences-api-reference.examples';\n\ntype Cfg = ReturnType<typeof userPreferencesFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst userPreferencesResourceUIBehavior = userPreferencesResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n Custom,\n Core,\n Main\n>;\n\nconst toast = (s: string) => selfServiceFrontEndSuccessNotification(s);\n\nexport const userPreferencesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(userPreferencesResourceUIBehavior),\n resourceSpecification(\n userPreferencesFactory,\n UserPreferencesSchema,\n ({ schemaShape }) => ({\n purpose: 'Application-administration access to an addressed user’s preference document. Subject-facing access belongs exclusively to `USER_SELF_PREFERENCES`.',\n businessRole: 'Powers authorized support inspection and explicitly privileged preference corrections without republishing the self-service API under an addressable user route.',\n lifecycleRole: 'Created internally alongside the user and deleted internally with the user; administrators may read or update the existing row but cannot create or delete it over HTTP.',\n audience: LabelAudience.ADMIN,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserPreferencesSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userPreferencesResourceConfiguration_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_PREFERENCES',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'userPreferencesResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({ meaning: 'Preferences row id.', semanticRole: 'identifier', importance: FieldSemanticImportance.PRIMARY }),\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'Foreign key to the `users` row that owns this preference document — immutable after create.',\n whyItMatters: 'Anchors the preference record to a single identity so admin/impersonation reads and self-serve writes always resolve one owner and never leak preferences across users.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n notifications: schemaShape.notifications.objectSpec({ meaning: 'Channel toggles.', importance: FieldSemanticImportance.PRIMARY }),\n privacy: schemaShape.privacy.objectSpec({ meaning: 'Privacy and consent data.', importance: FieldSemanticImportance.PRIMARY }),\n ui: schemaShape.ui.objectSpec({ meaning: 'Theme and presentation block.', importance: FieldSemanticImportance.PRIMARY }),\n regional: schemaShape.regional.objectSpec({ meaning: 'Timezone and format settings.', importance: FieldSemanticImportance.PRIMARY }),\n languagePreferences: schemaShape.languagePreferences.objectSpec({ meaning: 'Language/locale block.', importance: FieldSemanticImportance.PRIMARY }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Read the preference document of an addressed user through the application-administration API. This cross-subject operation requires `APP_ADMIN_VIEWER`; a user reading their own preferences uses `USER_SELF_PREFERENCES` instead.',\n outcome: 'Support and application administrators can inspect the exact preference state that the addressed user sees without impersonating that user.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The addressed user’s complete preference document 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 caller does not hold the application-administration viewer role.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The addressed user does not exist or has no preferences row because provisioning did not complete successfully.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Inspect a user’s delivery, privacy and regional choices',\n request: userPreferencesApiReferencePathExample,\n response: userPreferencesApiReferenceExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n variants: {\n context: {\n examples: [\n {\n title: 'Inspect preferences with their owning user context',\n request: userPreferencesApiReferencePathExample,\n response: {\n ...userPreferencesApiReferenceExample,\n user: { _id: USER_PREFERENCES_EXAMPLE_USER_ID },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n summary: {\n examples: [\n {\n title: 'Inspect the compact locale and appearance summary',\n request: userPreferencesApiReferencePathExample,\n response: userPreferencesApiReferenceSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n [Op.CREATE]: {\n purpose: 'Create the default preferences row from the trusted user-provisioning lifecycle.',\n outcome: 'Every newly created user starts with exactly one schema-default preferences row.',\n responseStatuses: [{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The internal provisioning hook created the preferences row.' }],\n errorScenarios: [{ code: HttpResponseStatusCode.CONFLICT_409, when: 'The one-per-user preferences row already exists.' }],\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Correct selected preference blocks for an addressed user through the application-administration API. This cross-subject operation requires `APP_ADMIN_SUPER_ADMIN`; ordinary user changes use `USER_SELF_PREFERENCES`.',\n outcome: 'The selected blocks are replaced on the same preference document used by the self-service API, and the addressed user receives the updated state.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The addressed user’s preference document was updated and is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'A supplied preference block fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the application super-administrator role.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The addressed user does not exist or has no preferences row because provisioning did not complete successfully.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Correct the timezone used for a user’s scheduled work',\n request: {\n userId: USER_PREFERENCES_EXAMPLE_USER_ID,\n regional: {\n timezone: 'Europe/Paris',\n dateFormat: 'DD/MM/YYYY',\n timeFormat: '24h',\n locale: 'fr',\n },\n },\n response: userPreferencesApiReferenceExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: { notification: toast('FRONT_END_SUCCESS on UPDATE (runtime).') },\n },\n [Op.DELETE]: {\n purpose: 'Delete the preferences row as part of the trusted user-composition cascade.',\n outcome: 'The dependent preferences row is removed when its owning user is deleted.',\n responseStatuses: [{ code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The internal lifecycle cascade deleted the preferences row.' }],\n errorScenarios: [],\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'Registry `resourcePrimaryScope` is `USER_SELF` from the `USERS → USER_PREFERENCES` composition rel — the document is user-anchored even when operators edit it in admin UIs.',\n 'The only HTTP variants are administrator-addressed READ and UPDATE. CREATE exists solely for eager `createAsSystem` provisioning; DELETE exists solely for the USERS composition cascade.',\n '`USER_PREFERENCES` and `USER_SELF_PREFERENCES` resolve to the SAME collection. Subject-facing READ, UPDATE and RESET_TO_DEFAULTS belong only to the self resource; this resource never republishes them under `/users/{userId}`.',\n 'Both administrative variants explicitly admit cross-subject user administration and retain independent APP_ADMIN role gates. The path user id selects the subject only after that authorization succeeds.',\n 'UPDATE accepts selected preference blocks, but a supplied block is validated as that block’s complete object. Send all fields of each block you change.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n ),\n () => ({\n layout: {\n purpose: 'Reuse the self-preference section structure (the admin preset sets its layout to the shared USER_SELF_PREFERENCES layout) so admin and user see identical field grouping: notifications/privacy/regional/language. UI theme is intentionally NOT a section here — the shared self-preferences layout omits it; theme is read-only in the summary and edited via the dedicated Appearance Settings-Hub panel. Do not re-add an appearance section unless the shared layout reintroduces the ref.',\n displayPurpose: 'Admin “Edit user preferences” or impersonation read-only view.',\n summaryPurpose: 'Theme, timezone, and language chips for list/table contexts.',\n sections: {\n notifications: {\n purpose: 'Per-channel opt-ins.',\n whenToUse: 'When support verifies notification storms or delivery issues.',\n textSlots: { title: { purpose: 'Notifications section label.' }, description: { purpose: 'Warn that admin edits may be audited in regulated tenants.' } },\n },\n privacy: {\n purpose: 'User privacy posture.',\n whenToUse: 'DSR and consent audits.',\n textSlots: { title: { purpose: 'Privacy section label.' }, description: { purpose: 'Tie to org default policies where applicable.' } },\n },\n regional: {\n purpose: 'Timezone and formats.',\n whenToUse: 'Scheduling support cases.',\n textSlots: { title: { purpose: 'Regional label.' }, description: { purpose: 'Remind that historical timestamps are not rewritten.' } },\n },\n language: {\n purpose: 'Language and fallback language stack.',\n whenToUse: 'i18n bug reports for a user.',\n textSlots: { title: { purpose: 'Language label.' }, description: { purpose: 'Reference auto-detect vs fixed locale behavior.' } },\n },\n },\n },\n views: {\n [Op.READ]: {\n variants: {\n admin: {\n purpose: 'Read preferences through the only public variant on this resource: application administration.',\n whenToUse: 'Back-office user-preferences inspection without impersonating the user.',\n },\n },\n },\n [Op.UPDATE]: {\n variants: {\n admin: {\n purpose: 'Update preferences on behalf of the user (super-admin / support).',\n whenToUse: 'Impersonation or break-glass preference fixes.',\n },\n },\n },\n },\n }),\n);\n"]}
|
|
1
|
+
{"version":3,"file":"user-preferences.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-preferences.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iCAAiC,IAAI,uCAAuC,EAAE,MAAM,8BAA8B,CAAC;AAC5H,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,qBAAqB,EACrB,0DAA0D,IAAI,sBAAsB,GACrF,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,sCAAsC,EAAE,MAAM,0CAA0C,CAAC;AAClG,OAAO,EACL,gCAAgC,EAChC,kCAAkC,EAClC,sCAAsC,EACtC,yCAAyC,GAC1C,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAO3E,MAAM,iCAAiC,GAAG,uCAIzC,CAAC;AAEF,MAAM,KAAK,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,sCAAsC,CAAC,CAAC,CAAC,CAAC;AAEvE,MAAM,CAAC,MAAM,oCAAoC,GAAG,8CAA8C,CAChG,6BAA6B,CAAC,iCAAiC,CAAC,EAChE,qBAAqB,CACnB,sBAAsB,EACtB,qBAAqB,EACrB,CAAC,EA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C5E,SAAS,EAAE,gDAAgD;iBAC5D;aACF;SACF;KACF;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `userPreferences` — Wildo SaaS engine specification (mixed, admin-leaning).\n * Schema: `UserPreferencesSchema` (same document shape as `userSelfPreferences`).\n */\n\nimport { userPreferencesResourceUIBehavior as userPreferencesResourceUIBehaviorSource } 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 UserPreferencesSchema,\n userPreferencesResourceConfiguration_InitializationFactory as userPreferencesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\nimport { selfServiceFrontEndSuccessNotification } from './self-service-user-notifications.shared';\nimport {\n USER_PREFERENCES_EXAMPLE_USER_ID,\n userPreferencesApiReferenceExample,\n userPreferencesApiReferencePathExample,\n userPreferencesApiReferenceSummaryExample,\n} from './user-preferences-api-reference.examples';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype Cfg = ReturnType<typeof userPreferencesFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst userPreferencesResourceUIBehavior = userPreferencesResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n Custom,\n Core,\n Main\n>;\n\nconst toast = (s: string) => selfServiceFrontEndSuccessNotification(s);\n\nexport const userPreferencesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(userPreferencesResourceUIBehavior),\n resourceSpecification(\n userPreferencesFactory,\n UserPreferencesSchema,\n ({ schemaShape }) => ({\n purpose: 'Application-administration access to an addressed user’s preference document. Subject-facing access belongs exclusively to `USER_SELF_PREFERENCES`.',\n businessRole: 'Powers authorized support inspection and explicitly privileged preference corrections without republishing the self-service API under an addressable user route.',\n lifecycleRole: 'Created internally alongside the user and deleted internally with the user; administrators may read or update the existing row but cannot create or delete it over HTTP.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.USERS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserPreferencesSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userPreferencesResourceConfiguration_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_PREFERENCES',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'userPreferencesResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({ meaning: 'Preferences row id.', semanticRole: 'identifier', importance: FieldSemanticImportance.PRIMARY }),\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'Foreign key to the `users` row that owns this preference document — immutable after create.',\n whyItMatters: 'Anchors the preference record to a single identity so admin/impersonation reads and self-serve writes always resolve one owner and never leak preferences across users.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n notifications: schemaShape.notifications.objectSpec({ meaning: 'Channel toggles.', importance: FieldSemanticImportance.PRIMARY }),\n privacy: schemaShape.privacy.objectSpec({ meaning: 'Privacy and consent data.', importance: FieldSemanticImportance.PRIMARY }),\n ui: schemaShape.ui.objectSpec({ meaning: 'Theme and presentation block.', importance: FieldSemanticImportance.PRIMARY }),\n regional: schemaShape.regional.objectSpec({ meaning: 'Timezone and format settings.', importance: FieldSemanticImportance.PRIMARY }),\n languagePreferences: schemaShape.languagePreferences.objectSpec({ meaning: 'Language/locale block.', importance: FieldSemanticImportance.PRIMARY }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Read the preference document of an addressed user through the application-administration API. This cross-subject operation requires `APP_ADMIN_VIEWER`; a user reading their own preferences uses `USER_SELF_PREFERENCES` instead.',\n outcome: 'Support and application administrators can inspect the exact preference state that the addressed user sees without impersonating that user.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The addressed user’s complete preference document 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 caller does not hold the application-administration viewer role.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The addressed user does not exist or has no preferences row because provisioning did not complete successfully.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Inspect a user’s delivery, privacy and regional choices',\n request: userPreferencesApiReferencePathExample,\n response: userPreferencesApiReferenceExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n variants: {\n context: {\n examples: [\n {\n title: 'Inspect preferences with their owning user context',\n request: userPreferencesApiReferencePathExample,\n response: {\n ...userPreferencesApiReferenceExample,\n user: { _id: USER_PREFERENCES_EXAMPLE_USER_ID },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n summary: {\n examples: [\n {\n title: 'Inspect the compact locale and appearance summary',\n request: userPreferencesApiReferencePathExample,\n response: userPreferencesApiReferenceSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n [Op.CREATE]: {\n purpose: 'Create the default preferences row from the trusted user-provisioning lifecycle.',\n outcome: 'Every newly created user starts with exactly one schema-default preferences row.',\n responseStatuses: [{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The internal provisioning hook created the preferences row.' }],\n errorScenarios: [{ code: HttpResponseStatusCode.CONFLICT_409, when: 'The one-per-user preferences row already exists.' }],\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Correct selected preference blocks for an addressed user through the application-administration API. This cross-subject operation requires `APP_ADMIN_SUPER_ADMIN`; ordinary user changes use `USER_SELF_PREFERENCES`.',\n outcome: 'The selected blocks are replaced on the same preference document used by the self-service API, and the addressed user receives the updated state.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The addressed user’s preference document was updated and is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'A supplied preference block fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the application super-administrator role.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The addressed user does not exist or has no preferences row because provisioning did not complete successfully.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Correct the timezone used for a user’s scheduled work',\n request: {\n userId: USER_PREFERENCES_EXAMPLE_USER_ID,\n regional: {\n timezone: 'Europe/Paris',\n dateFormat: 'DD/MM/YYYY',\n timeFormat: '24h',\n locale: 'fr',\n },\n },\n response: userPreferencesApiReferenceExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: { notification: toast('FRONT_END_SUCCESS on UPDATE (runtime).') },\n },\n [Op.DELETE]: {\n purpose: 'Delete the preferences row as part of the trusted user-composition cascade.',\n outcome: 'The dependent preferences row is removed when its owning user is deleted.',\n responseStatuses: [{ code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The internal lifecycle cascade deleted the preferences row.' }],\n errorScenarios: [],\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'Registry `resourcePrimaryScope` is `USER_SELF` from the `USERS → USER_PREFERENCES` composition rel — the document is user-anchored even when operators edit it in admin UIs.',\n 'The only HTTP variants are administrator-addressed READ and UPDATE. CREATE exists solely for eager `createAsSystem` provisioning; DELETE exists solely for the USERS composition cascade.',\n '`USER_PREFERENCES` and `USER_SELF_PREFERENCES` resolve to the SAME collection. Subject-facing READ, UPDATE and RESET_TO_DEFAULTS belong only to the self resource; this resource never republishes them under `/users/{userId}`.',\n 'Both administrative variants explicitly admit cross-subject user administration and retain independent APP_ADMIN role gates. The path user id selects the subject only after that authorization succeeds.',\n 'UPDATE accepts selected preference blocks, but a supplied block is validated as that block’s complete object. Send all fields of each block you change.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n ),\n () => ({\n layout: {\n purpose: 'Reuse the self-preference section structure (the admin preset sets its layout to the shared USER_SELF_PREFERENCES layout) so admin and user see identical field grouping: notifications/privacy/regional/language. UI theme is intentionally NOT a section here — the shared self-preferences layout omits it; theme is read-only in the summary and edited via the dedicated Appearance Settings-Hub panel. Do not re-add an appearance section unless the shared layout reintroduces the ref.',\n displayPurpose: 'Admin “Edit user preferences” or impersonation read-only view.',\n summaryPurpose: 'Theme, timezone, and language chips for list/table contexts.',\n sections: {\n notifications: {\n purpose: 'Per-channel opt-ins.',\n whenToUse: 'When support verifies notification storms or delivery issues.',\n textSlots: { title: { purpose: 'Notifications section label.' }, description: { purpose: 'Warn that admin edits may be audited in regulated tenants.' } },\n },\n privacy: {\n purpose: 'User privacy posture.',\n whenToUse: 'DSR and consent audits.',\n textSlots: { title: { purpose: 'Privacy section label.' }, description: { purpose: 'Tie to org default policies where applicable.' } },\n },\n regional: {\n purpose: 'Timezone and formats.',\n whenToUse: 'Scheduling support cases.',\n textSlots: { title: { purpose: 'Regional label.' }, description: { purpose: 'Remind that historical timestamps are not rewritten.' } },\n },\n language: {\n purpose: 'Language and fallback language stack.',\n whenToUse: 'i18n bug reports for a user.',\n textSlots: { title: { purpose: 'Language label.' }, description: { purpose: 'Reference auto-detect vs fixed locale behavior.' } },\n },\n },\n },\n views: {\n [Op.READ]: {\n variants: {\n admin: {\n purpose: 'Read preferences through the only public variant on this resource: application administration.',\n whenToUse: 'Back-office user-preferences inspection without impersonating the user.',\n },\n },\n },\n [Op.UPDATE]: {\n variants: {\n admin: {\n purpose: 'Update preferences on behalf of the user (super-admin / support).',\n whenToUse: 'Impersonation or break-glass preference fixes.',\n },\n },\n },\n },\n }),\n);\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Same `UserProfileSchema` as `userSelfProfiles` but `CoreResourceType.USER_PROFILES` with org/admin variants.
|
|
4
4
|
*/
|
|
5
5
|
import { CoreResourceOperation as Op, UserProfiles_Operations } from '@wildo-ai/saas-models';
|
|
6
|
-
export declare const userProfilesResourceSpecification: import("../../../_core").ResourceSpecificationConfig<typeof UserProfiles_Operations, Op.READ | Op.UPDATE | Op.DELETE | Op.CREATE | Op.SEARCH, import("zod").ZodObject<{
|
|
6
|
+
export declare const userProfilesResourceSpecification: import("../../../_core").ResourceSpecificationConfig<typeof UserProfiles_Operations, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.DELETE | Op.CREATE | Op.LIST | Op.SEARCH, import("zod").ZodObject<{
|
|
7
7
|
_id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>;
|
|
8
8
|
userId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>>>;
|
|
9
9
|
firstName: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-profiles.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-profiles.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAG3B,uBAAuB,EAExB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"user-profiles.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-profiles.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAG3B,uBAAuB,EAExB,MAAM,uBAAuB,CAAC;AA6D/B,eAAO,MAAM,iCAAiC;;;;;;;;;;iCAsZ7C,CAAC"}
|
|
@@ -8,6 +8,7 @@ import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@
|
|
|
8
8
|
import { CoreResourceOperation as Op, ResourcePrimaryScope, UserProfileSchema, UserProfiles_Operations, userProfilesResourceConfiguration_InitializationFactory as userProfilesFactory, } from '@wildo-ai/saas-models';
|
|
9
9
|
import { HttpResponseStatusCode, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
|
|
10
10
|
import { selfServiceFrontEndSuccessNotification, } from './self-service-user-notifications.shared.js';
|
|
11
|
+
import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
|
|
11
12
|
const userProfilesResourceUIBehavior = userProfilesResourceUIBehaviorSource;
|
|
12
13
|
const toast = (s) => selfServiceFrontEndSuccessNotification(s);
|
|
13
14
|
const USER_PROFILE_EXAMPLE = {
|
|
@@ -46,6 +47,7 @@ export const userProfilesResourceSpecification = resourceSpecificationFromFronte
|
|
|
46
47
|
businessRole: 'Use the normal API for a user’s own profile and the application-administration API to inspect or maintain another user’s profile.',
|
|
47
48
|
lifecycleRole: 'One profile is created for each user, changes as their public or contact information changes, and is removed with that user or by an authorized administrator.',
|
|
48
49
|
audience: LabelAudience.ADMIN,
|
|
50
|
+
subDomain: EngineResourceSubDomain.USERS,
|
|
49
51
|
codeHandling: {
|
|
50
52
|
mainSchema: {
|
|
51
53
|
packageName: '@wildo-ai/saas-models',
|