@wildo-ai/saas-specifications 1.1.1 → 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":"siem-delivery-dlq.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/siem-delivery-dlq.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACzF,OAAO,EAAE,aAA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sE,EAAE;YAC7S,CAAC,0BAA0B,CAAC,SAAS,CAAC,EAAE,EAAE,OAAO,EAAE,2LAA2L,EAAE,SAAS,EAAE,oDAAoD,EAAE;YACjT,CAAC,0BAA0B,CAAC,SAAS,CAAC,EAAE,EAAE,OAAO,EAAE,+LAA+L,EAAE,SAAS,EAAE,yFAAyF,EAAE;SAC3V;KACF,CAAC,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,gDAAgD,GAAG,KAAK,CACnE,gBAAgB,CAAC,8BAA8B,EAC/C,gCAAgC,CACjC,CAAC;AACF,MAAM,CAAC,MAAM,+CAA+C,GAAG,KAAK,CAClE,gBAAgB,CAAC,6BAA6B,EAC9C,+BAA+B,CAChC,CAAC","sourcesContent":["import { securityAdminPresets, securityMainPresets } 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 CoreResourceType,\n ErrorCustomMessageReference,\n ErrorSeverity,\n ErrorType,\n ResourcePrimaryScope,\n SiemDeliveryDlq_Operations,\n SiemDeliveryDlqBaseSchema,\n SiemDeliveryDlqStatus,\n siemDeliveryDlqPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n type ResourceSpecificationConfig,\n} from '~wildo-specifications/_core';\n\ntype RType = CoreResourceType.ORGANIZATION_SIEM_DELIVERY_DLQ | CoreResourceType.APPLICATION_SIEM_DELIVERY_DLQ;\ntype RMember = 'ORGANIZATION_SIEM_DELIVERY_DLQ' | 'APPLICATION_SIEM_DELIVERY_DLQ';\n\ntype Cfg = ReturnType<(typeof siemDeliveryDlqPolymorphicFactories)[CoreResourceType.ORGANIZATION_SIEM_DELIVERY_DLQ]>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = typeof SiemDeliveryDlqBaseSchema;\ntype F = ResourceUIBehaviorConfig<Custom, Core, Main>;\n\nfunction r(source: Partial<Record<string, unknown>>, rt: RType, name: string): F {\n const u = source[rt] as F | undefined;\n if (!u) throw new Error(`Missing \"${rt}\" in ${name}.`);\n return u;\n}\n\nconst scope: Record<RType, ResourcePrimaryScope> = {\n [CoreResourceType.ORGANIZATION_SIEM_DELIVERY_DLQ]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_SIEM_DELIVERY_DLQ]: ResourcePrimaryScope.APPLICATION,\n};\n\nfunction siemDeliveryDlqPage(data: readonly unknown[]) {\n return {\n data,\n pagination: {\n page: 1,\n limit: 20,\n total: data.length,\n totalPages: data.length === 0 ? 0 : 1,\n },\n };\n}\n\nfunction createSiemDeliveryDlqReferenceExamples(resourceType: RType) {\n const isApplication = resourceType === CoreResourceType.APPLICATION_SIEM_DELIVERY_DLQ;\n const scopeId = isApplication ? 'application_01HX2EXAMPLE' : 'organization_01HX2EXAMPLE';\n const scopeField = isApplication ? 'applicationId' : 'organizationId';\n const relationshipField = isApplication ? 'application' : 'organization';\n const scopeIdentity = { [scopeField]: scopeId };\n const pendingEntry = {\n _id: 'siemdlq_pending_01HX2EXAMPLE',\n eventId: 'audit_evt_login_failed_01HX2EXAMPLE',\n eventPayload: {\n eventType: 'authentication.login.failed',\n occurredAt: '2026-08-18T13:34:58.000Z',\n actor: { type: 'user', id: 'user_01HX2EXAMPLE' },\n outcome: 'failure',\n correlationId: 'corr_01HX2EXAMPLE',\n },\n failureReason: 'The SIEM endpoint timed out after 10 seconds.',\n failureCount: 2,\n lastAttemptAt: '2026-08-18T13:35:10.000Z',\n nextRetryAt: '2026-08-18T13:40:10.000Z',\n status: SiemDeliveryDlqStatus.PENDING_RETRY,\n createdAt: '2026-08-18T13:30:00.000Z',\n updatedAt: '2026-08-18T13:35:10.000Z',\n ...scopeIdentity,\n };\n const exhaustedEntry = {\n _id: 'siemdlq_exhausted_01HX2EXAMPLE',\n eventId: 'audit_evt_access_denied_01HX2EXAMPLE',\n eventPayload: {\n eventType: 'authorization.access.denied',\n occurredAt: '2026-08-18T12:05:00.000Z',\n actor: { type: 'service', id: 'integration_01HX2EXAMPLE' },\n outcome: 'denied',\n correlationId: 'corr_02HX2EXAMPLE',\n },\n failureReason: 'The SIEM endpoint returned HTTP 503 for every configured retry.',\n failureCount: 4,\n lastAttemptAt: '2026-08-18T12:20:00.000Z',\n status: SiemDeliveryDlqStatus.EXHAUSTED,\n createdAt: '2026-08-18T12:05:02.000Z',\n updatedAt: '2026-08-18T12:20:00.000Z',\n ...scopeIdentity,\n };\n const deliveredEntry = {\n _id: 'siemdlq_delivered_01HX2EXAMPLE',\n eventId: 'audit_evt_role_changed_01HX2EXAMPLE',\n eventPayload: {\n eventType: 'authorization.role.changed',\n occurredAt: '2026-08-18T11:15:00.000Z',\n actor: { type: 'user', id: 'admin_01HX2EXAMPLE' },\n outcome: 'success',\n correlationId: 'corr_03HX2EXAMPLE',\n },\n failureReason: 'The first delivery failed, but a later attempt succeeded.',\n failureCount: 1,\n lastAttemptAt: '2026-08-18T11:20:00.000Z',\n status: SiemDeliveryDlqStatus.DELIVERED,\n createdAt: '2026-08-18T11:15:02.000Z',\n updatedAt: '2026-08-18T11:20:00.000Z',\n ...scopeIdentity,\n };\n const listRequest = {\n ...scopeIdentity,\n createdAt: {\n startDate: '2026-08-18T00:00:00.000Z',\n endDate: '2026-08-18T23:59:59.999Z',\n },\n page: 1,\n limit: 20,\n sort: 'createdAt:desc',\n };\n const visibleEntries = isApplication ? [] : [pendingEntry, exhaustedEntry, deliveredEntry];\n const contextEntries = visibleEntries.map((entry) => ({\n ...entry,\n [relationshipField]: { _id: scopeId },\n }));\n const summaryEntries = visibleEntries.map((entry) => ({\n _id: entry._id,\n failureReason: entry.failureReason,\n status: entry.status,\n createdAt: entry.createdAt,\n }));\n\n return {\n isApplication,\n scopeIdentity,\n pendingEntry,\n listRequest,\n listPage: siemDeliveryDlqPage(visibleEntries),\n contextPage: siemDeliveryDlqPage(contextEntries),\n summaryPage: siemDeliveryDlqPage(summaryEntries),\n };\n}\n\nfunction buildBase(rt: RType, member: RMember): ResourceSpecificationConfig<Custom, Core, Main> {\n const reference = createSiemDeliveryDlqReferenceExamples(rt);\n return resourceSpecification<Custom, Core, Main>(\n siemDeliveryDlqPolymorphicFactories[rt],\n SiemDeliveryDlqBaseSchema,\n ({ schemaShape }) => ({\n purpose: 'SIEM delivery dead-letter entry: one record per failed (or re-queued) webhook delivery attempt, retaining payload for retry, inspection, and purge.',\n businessRole: 'Operator-facing queue for data that could not be pushed to a customer’s SIEM endpoint in time, with a clear failure reason and retry state.',\n lifecycleRole: 'Progresses from pending retry to exhausted or eventually delivered; custom ops requeue or clear entries in bulk.',\n audience: LabelAudience.DEVELOPER,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'SiemDeliveryDlqBaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: { packageName: '@wildo-ai/saas-models', exportName: 'siemDeliveryDlqPolymorphicFactories', symbolKind: CodeSymbolKind.FACTORY },\n identifierField: 'collectionKey',\n identifierValue: rt,\n },\n resourceType: {\n enumDeclaration: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceType', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM },\n memberName: member,\n },\n operationVocabulary: {\n coreEnum: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceOperation', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM },\n customEnum: { packageName: '@wildo-ai/saas-models', exportName: 'SiemDeliveryDlq_Operations', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM },\n },\n frontendConfigurationSourceEntries: [\n { collectionSymbol: { packageName: '@wildo-ai/presets-components', exportName: 'securityMainPresets', symbolKind: CodeSymbolKind.UI_BEHAVIOR }, identifierField: 'collectionKey', identifierValue: rt },\n { collectionSymbol: { packageName: '@wildo-ai/presets-components', exportName: 'securityAdminPresets', symbolKind: CodeSymbolKind.UI_BEHAVIOR }, identifierField: 'collectionKey', identifierValue: rt },\n ],\n notes: [\n '`eventPayload` is `z.unknown()` in the schema — the companion may describe it generically; this spec file omits a typed field spec until a dedicated `unknown`/`json` *Spec is standardized.',\n ],\n },\n fields: {\n status: schemaShape.status.enumSpec({\n meaning: 'DLQ lifecycle: awaiting retry, exhausted, or already delivered to SIEM on a later attempt.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: { packageName: '@wildo-ai/saas-models', exportName: 'SiemDeliveryDlqStatus', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.CONST_OBJECT },\n values: {\n [SiemDeliveryDlqStatus.PENDING_RETRY]: { meaning: 'May be retried automatically or by an operator while policy allows.' },\n [SiemDeliveryDlqStatus.EXHAUSTED]: { meaning: 'Retries are exhausted; manual inspection and purge or policy-driven cleanup apply.' },\n [SiemDeliveryDlqStatus.DELIVERED]: { meaning: 'A later attempt succeeded; row may be retained for an audit window.' },\n },\n }),\n failureReason: schemaShape.failureReason.stringSpec({\n meaning: 'Default list label in presets: human- or system-authored reason for the last failure path.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n eventId: schemaShape.eventId.stringSpec({ meaning: 'Correlation id to the source audit/transport event behind this failed delivery.' }),\n failureCount: schemaShape.failureCount.numberSpec({ meaning: 'How many times delivery failed for this chain.' }),\n lastAttemptAt: schemaShape.lastAttemptAt.dateSpec({ meaning: 'Last delivery attempt from Wildo to the customer webhook.' }),\n nextRetryAt: schemaShape.nextRetryAt.dateSpec({ meaning: 'When the next automatic retry is scheduled, if any.' }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Repository read of a single DLQ row (internal and admin diagnostics, not a broad end-user read).',\n outcome: 'Inspect error metadata and the opaque payload for support.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The DLQ row was found and its failure metadata plus opaque payload snapshot are returned for diagnostics.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the operator/admin role required to inspect a dead-letter row (the payload may contain customer PII).' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No DLQ row exists for the supplied id in the caller’s scope (already purged or re-delivered and removed).' },\n ],\n idempotent: true,\n },\n [Op.LIST]: {\n purpose: reference.isApplication\n ? 'List application-scoped SIEM delivery failures. This framework version has no application-scoped SIEM event producer, so the queue is expected to remain empty.'\n : 'List organization SIEM delivery failures for an incident window, filtered by retry status and ordered for investigation.',\n outcome: reference.isApplication\n ? 'A paginated empty queue confirms that no application-scoped SIEM delivery stream is active.'\n : 'Administrators receive the failed event envelope, failure reason, attempt history and current retry state for each delivery.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of dead-letter rows for the scope, ordered for the queue browser.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the operator/admin role that gates the SIEM dead-letter queue for this scope.' },\n ],\n idempotent: true,\n examples: [{\n title: reference.isApplication\n ? 'Confirm the application SIEM queue is empty'\n : 'Investigate current SIEM delivery states',\n request: reference.listRequest,\n response: reference.listPage,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: reference.isApplication\n ? 'Confirm the application SIEM context queue is empty'\n : 'Investigate SIEM failures with organization context',\n request: reference.listRequest,\n response: reference.contextPage,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: reference.isApplication\n ? 'Confirm the application SIEM summary queue is empty'\n : 'Review compact SIEM failure summaries',\n request: reference.listRequest,\n response: reference.summaryPage,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.CREATE]: {\n purpose: 'Internal append of DLQ rows on delivery failure (REPOSITORY_ONLY in the factory).',\n outcome: 'A new retryable or terminal document.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A dead-letter row was appended for a failed SIEM delivery and is returned with its server-assigned id.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The failure record fails schema validation (e.g. an unknown `status` or a missing `eventId`/`failureReason`).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not the internal delivery pipeline; this is a REPOSITORY_ONLY append path, not a self-serve create.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Append a dead-letter row for a failed SIEM delivery',\n request: {\n eventId: 'evt_01HX2…',\n status: SiemDeliveryDlqStatus.PENDING_RETRY,\n failureReason: 'Connection timed out posting to the customer webhook.',\n failureCount: 1,\n },\n response: {\n _id: 'siemdlq_01HX2…',\n eventId: 'evt_01HX2…',\n status: SiemDeliveryDlqStatus.PENDING_RETRY,\n failureReason: 'Connection timed out posting to the customer webhook.',\n failureCount: 1,\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.DELETE]: {\n purpose: 'Remove one row after a successful re-delivery or explicit row-level purge; REPOSITORY_ONLY in the factory for safety.',\n outcome: 'Entry removed from the DLQ collection; separate audit may still cover the original event stream.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The dead-letter row was removed from the queue; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the operator role required to drop a dead-letter row.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No DLQ row exists for the supplied id (already removed by a prior purge or re-delivery).' },\n ],\n idempotent: true,\n },\n [Op.DELETE_MANY]: {\n purpose: 'Bulk twin of `DELETE` — the repository write path behind `PURGE_ALL` (whole-scope clear) and the delete-on-requeue tail of `RETRY_SINGLE`/`RETRY_ALL`: one round trip drops every matched row.',\n outcome: 'Purge and retry-cleanup scale with a single bulk delete instead of N per-row deletes; DLQ rows are inert (no worker owns them, no retry sweep touches them) so any status is safe to drop.',\n whenToUse: 'Repository-only — never a public HTTP surface. Operators clear or drain via the `PURGE_ALL` / `RETRY_*` custom operations, which own request validation and the summary response.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The matched rows were bulk-deleted; the invoking custom operation reports the count in its own summary response.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-system caller attempts the repository-only bulk delete directly; UI/API flows must use `PURGE_ALL` / `RETRY_*`.' },\n ],\n idempotent: true,\n },\n [SiemDeliveryDlq_Operations.RETRY_SINGLE]: {\n operationId: SiemDeliveryDlq_Operations.RETRY_SINGLE,\n purpose: reference.isApplication\n ? 'Request a retry for one application-scoped queue entry by `entryId`; this version normally has no such entries because the application SIEM producer is unavailable.'\n : 'Request a new delivery attempt for one organization queue entry identified by `entryId` in the request body.',\n outcome: 'The response acknowledges the selected queue entry. If the new delivery also fails, its failure is visible in the queue again.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The targeted dead-letter entry was re-queued for delivery; a `{ message, entryId }` acknowledgement is returned (not the DLQ row).' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the operator role required to replay SIEM deliveries.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No DLQ row exists for the supplied `entryId` in the caller’s scope — it was already cleared or successfully re-delivered.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The entry is already `DELIVERED` (a later attempt succeeded), so there is nothing to retry. `PENDING_RETRY` and `EXHAUSTED` entries are both retryable.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The scope has no SIEM webhook URL configured, so there is no destination to re-deliver to; configure SIEM export before retrying.' },\n ],\n idempotent: false,\n examples: reference.isApplication\n ? [{\n title: 'Retry an unavailable application-scoped queue entry',\n request: { ...reference.scopeIdentity, entryId: 'siemdlq_missing_01HX2EXAMPLE' },\n response: {\n error: {\n type: ErrorType.NOT_FOUND,\n severity: ErrorSeverity.LOW,\n message: 'Requested resource not found',\n customMessage: 'The SIEM delivery queue entry could not be found.',\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n timestamp: '2026-08-18T13:45:00.000Z',\n },\n },\n forStatus: HttpResponseStatusCode.NOT_FOUND_404,\n }]\n : [{\n title: 'Retry one failed organization SIEM delivery',\n request: { ...reference.scopeIdentity, entryId: reference.pendingEntry._id },\n response: {\n message: 'SIEM DLQ entry re-queued for delivery.',\n entryId: reference.pendingEntry._id,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [SiemDeliveryDlq_Operations.RETRY_ALL]: {\n operationId: SiemDeliveryDlq_Operations.RETRY_ALL,\n purpose: 'Retry every pending or exhausted SIEM delivery entry in the current scope.',\n outcome: 'The response reports how many entries were accepted for another attempt and how many could not be retried.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'Eligible dead-letter entries in the scope were re-queued and removed; a `{ retriedCount, skippedCount, message }` summary is returned (not the rows). When SIEM export has no webhook URL configured, all entries are reported as skipped.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the operator role required to trigger a scope-wide SIEM replay.' },\n ],\n idempotent: false,\n rateLimitNote: 'Bulk replay fans out one outbound delivery attempt per eligible row (no artificial batch cap — the DLQ is a bounded failure queue); the SIEM delivery worker’s own per-scope circuit breaker and retry/backoff protect the customer endpoint.',\n examples: [{\n title: reference.isApplication\n ? 'Retry the empty application SIEM queue'\n : 'Retry all eligible organization SIEM deliveries',\n request: reference.scopeIdentity,\n response: reference.isApplication\n ? { retriedCount: 0, skippedCount: 0, message: 'The SIEM dead-letter queue is empty for this scope.' }\n : { retriedCount: 2, skippedCount: 1, message: 'Re-queued 2 of 3 SIEM dead-letter entries for this organization; skipped 1.' },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [SiemDeliveryDlq_Operations.PURGE_ALL]: {\n operationId: SiemDeliveryDlq_Operations.PURGE_ALL,\n purpose: 'Permanently remove every SIEM delivery-failure entry in the current scope.',\n outcome: 'The queue is cleared and the response reports how many entries were irreversibly removed.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'Every dead-letter row in the scope was permanently removed; a count of purged rows is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the CRITICAL-risk operator role required for an irreversible scope-wide purge.' },\n ],\n idempotent: false,\n examples: [{\n title: reference.isApplication\n ? 'Purge the empty application SIEM queue'\n : 'Purge all organization SIEM delivery failures',\n request: reference.scopeIdentity,\n response: reference.isApplication\n ? { purgedCount: 0, message: 'Purged 0 SIEM dead-letter entries for this application.' }\n : { purgedCount: 3, message: 'Purged 3 SIEM dead-letter entries for this organization.' },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n businessConstraints: [\n 'Purge and bulk retry are governed by the factory’s risk tiers: companion should never describe them as low-impact maintenance.',\n ...(reference.isApplication\n ? ['Application-scoped SIEM delivery is reserved in this framework version: no application event producer populates this queue, so retry and purge normally operate on an empty collection.']\n : []),\n ],\n }),\n { resourcePrimaryScope: scope[rt] },\n );\n}\n\nfunction build(rt: RType, member: RMember): ResourceSpecificationConfig<Custom, Core, Main> {\n const b = buildBase(rt, member);\n return resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(r(securityMainPresets as Partial<Record<string, unknown>>, rt, 'securityMainPresets')),\n resourceFrontendConfiguration(r(securityAdminPresets as Partial<Record<string, unknown>>, rt, 'securityAdminPresets')),\n ),\n b,\n () => ({\n label: {\n purpose: 'List rows and summaries are labeled from `failureReason` in the merged `security` preset — surface a concise operator-readable reason, not the entire payload.',\n },\n layout: {\n purpose: 'DLQ display in `security` uses section refs `overview` (context), `delivery` (attempt metadata), and `payload` (opaque snapshot).',\n displayPurpose: 'Template JSX for DLQ is defined alongside `layout.refs` in the preset to keep list rows compact; detail chrome expands the three blocks.',\n sections: {\n overview: {\n purpose: 'Status badge, `eventId`, and failure count so the operator orients to which stream failed before opening payload text.',\n whenToUse: 'All read layouts for a DLQ row in security consoles.',\n textSlots: {\n title: { purpose: 'Name the current DLQ item with status-first framing.' },\n description: { purpose: 'Mention that payload may contain PII; treat the screen as operator-only.' },\n },\n },\n delivery: {\n purpose: 'Attempt timestamps and next retry, plus a human-readable `failureReason` for triage.',\n whenToUse: 'Understanding whether automatic retries can still help vs exhausted state.',\n textSlots: {\n title: { purpose: 'Label the delivery and retry block.' },\n description: { purpose: 'Clarify that `nextRetryAt` can be empty when the row is terminal.' },\n },\n },\n payload: {\n purpose: 'The opaque `eventPayload` blob — rendering may truncate or redact; structure is not fixed across event types.',\n whenToUse: 'Deep debugging after overview/delivery are understood; export paths may also reference this data.',\n textSlots: {\n title: { purpose: 'Label the payload/technical view.' },\n description: { purpose: 'Avoid claiming a stable JSON contract — the schema stores `z.unknown()` for flexibility at write time.' },\n },\n },\n },\n },\n views: {\n [Op.LIST]: { purpose: 'Primary addressable queue surface in merged presets for org and app security operators — dashboard-style: `status` quick-filter tab strip (All / Pending retry / Exhausted / Delivered) + `createdAt` day-bucket grouping via `collectionDisplayConfig` (backend-validated: `status` + `createdAt` are the LIST op\\'s declared `filterFields`).', whenToUse: 'SIEM health and retry workflows under security settings; the Failed tab is the triage entry point.' },\n [SiemDeliveryDlq_Operations.RETRY_SINGLE]: { purpose: 'Single-row retry surfaced as a per-row action (not URL-addressable); executes in place on the clicked row, whose id is injected into the request body `entryId`.', whenToUse: 'Replaying one known-bad event after a customer fixes their endpoint.' },\n [SiemDeliveryDlq_Operations.RETRY_ALL]: { purpose: 'Whole-scope requeue (borrows the collection verb `UPDATE_MANY` for an id-less collection route); surfaced once in the list collection-action bar, confirms (HIGH) then executes in place.', whenToUse: 'Outage recovery after a shared infrastructure fix.' },\n [SiemDeliveryDlq_Operations.PURGE_ALL]: { purpose: 'Whole-scope clear (borrows the collection verb `DELETE_MANY` for an id-less collection route); surfaced in the list collection-action bar, type-to-confirm (CRITICAL) then executes in place.', whenToUse: 'Compliance or disk-pressure teardown when retention policy allows purging the DLQ only.' },\n },\n }),\n );\n}\n\nexport const organizationSiemDeliveryDlqResourceSpecification = build(\n CoreResourceType.ORGANIZATION_SIEM_DELIVERY_DLQ,\n 'ORGANIZATION_SIEM_DELIVERY_DLQ',\n);\nexport const applicationSiemDeliveryDlqResourceSpecification = build(\n CoreResourceType.APPLICATION_SIEM_DELIVERY_DLQ,\n 'APPLICATION_SIEM_DELIVERY_DLQ',\n);\n"]}
|
|
1
|
+
{"version":3,"file":"siem-delivery-dlq.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/siem-delivery-dlq.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACzF,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,gBAAgB,EAChB,2BAA2B,EAC3B,aAAa,EACb,SAAS,EACT,oBAAoB,EACpB,0BAA0B,EAC1B,yBAAyB,EACzB,qBAAqB,EACrB,mCAAmC,GACpC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAE/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAA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,MAAM,CAAC,MAAM,+CAA+C,GAAG,KAAK,CAClE,gBAAgB,CAAC,6BAA6B,EAC9C,+BAA+B,CAChC,CAAC","sourcesContent":["import { securityAdminPresets, securityMainPresets } 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 CoreResourceType,\n ErrorCustomMessageReference,\n ErrorSeverity,\n ErrorType,\n ResourcePrimaryScope,\n SiemDeliveryDlq_Operations,\n SiemDeliveryDlqBaseSchema,\n SiemDeliveryDlqStatus,\n siemDeliveryDlqPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n type ResourceSpecificationConfig,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype RType = CoreResourceType.ORGANIZATION_SIEM_DELIVERY_DLQ | CoreResourceType.APPLICATION_SIEM_DELIVERY_DLQ;\ntype RMember = 'ORGANIZATION_SIEM_DELIVERY_DLQ' | 'APPLICATION_SIEM_DELIVERY_DLQ';\n\ntype Cfg = ReturnType<(typeof siemDeliveryDlqPolymorphicFactories)[CoreResourceType.ORGANIZATION_SIEM_DELIVERY_DLQ]>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = typeof SiemDeliveryDlqBaseSchema;\ntype F = ResourceUIBehaviorConfig<Custom, Core, Main>;\n\nfunction r(source: Partial<Record<string, unknown>>, rt: RType, name: string): F {\n const u = source[rt] as F | undefined;\n if (!u) throw new Error(`Missing \"${rt}\" in ${name}.`);\n return u;\n}\n\nconst scope: Record<RType, ResourcePrimaryScope> = {\n [CoreResourceType.ORGANIZATION_SIEM_DELIVERY_DLQ]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_SIEM_DELIVERY_DLQ]: ResourcePrimaryScope.APPLICATION,\n};\n\nfunction siemDeliveryDlqPage(data: readonly unknown[]) {\n return {\n data,\n pagination: {\n page: 1,\n limit: 20,\n total: data.length,\n totalPages: data.length === 0 ? 0 : 1,\n },\n };\n}\n\nfunction createSiemDeliveryDlqReferenceExamples(resourceType: RType) {\n const isApplication = resourceType === CoreResourceType.APPLICATION_SIEM_DELIVERY_DLQ;\n const scopeId = isApplication ? 'application_01HX2EXAMPLE' : 'organization_01HX2EXAMPLE';\n const scopeField = isApplication ? 'applicationId' : 'organizationId';\n const relationshipField = isApplication ? 'application' : 'organization';\n const scopeIdentity = { [scopeField]: scopeId };\n const pendingEntry = {\n _id: 'siemdlq_pending_01HX2EXAMPLE',\n eventId: 'audit_evt_login_failed_01HX2EXAMPLE',\n eventPayload: {\n eventType: 'authentication.login.failed',\n occurredAt: '2026-08-18T13:34:58.000Z',\n actor: { type: 'user', id: 'user_01HX2EXAMPLE' },\n outcome: 'failure',\n correlationId: 'corr_01HX2EXAMPLE',\n },\n failureReason: 'The SIEM endpoint timed out after 10 seconds.',\n failureCount: 2,\n lastAttemptAt: '2026-08-18T13:35:10.000Z',\n nextRetryAt: '2026-08-18T13:40:10.000Z',\n status: SiemDeliveryDlqStatus.PENDING_RETRY,\n createdAt: '2026-08-18T13:30:00.000Z',\n updatedAt: '2026-08-18T13:35:10.000Z',\n ...scopeIdentity,\n };\n const exhaustedEntry = {\n _id: 'siemdlq_exhausted_01HX2EXAMPLE',\n eventId: 'audit_evt_access_denied_01HX2EXAMPLE',\n eventPayload: {\n eventType: 'authorization.access.denied',\n occurredAt: '2026-08-18T12:05:00.000Z',\n actor: { type: 'service', id: 'integration_01HX2EXAMPLE' },\n outcome: 'denied',\n correlationId: 'corr_02HX2EXAMPLE',\n },\n failureReason: 'The SIEM endpoint returned HTTP 503 for every configured retry.',\n failureCount: 4,\n lastAttemptAt: '2026-08-18T12:20:00.000Z',\n status: SiemDeliveryDlqStatus.EXHAUSTED,\n createdAt: '2026-08-18T12:05:02.000Z',\n updatedAt: '2026-08-18T12:20:00.000Z',\n ...scopeIdentity,\n };\n const deliveredEntry = {\n _id: 'siemdlq_delivered_01HX2EXAMPLE',\n eventId: 'audit_evt_role_changed_01HX2EXAMPLE',\n eventPayload: {\n eventType: 'authorization.role.changed',\n occurredAt: '2026-08-18T11:15:00.000Z',\n actor: { type: 'user', id: 'admin_01HX2EXAMPLE' },\n outcome: 'success',\n correlationId: 'corr_03HX2EXAMPLE',\n },\n failureReason: 'The first delivery failed, but a later attempt succeeded.',\n failureCount: 1,\n lastAttemptAt: '2026-08-18T11:20:00.000Z',\n status: SiemDeliveryDlqStatus.DELIVERED,\n createdAt: '2026-08-18T11:15:02.000Z',\n updatedAt: '2026-08-18T11:20:00.000Z',\n ...scopeIdentity,\n };\n const listRequest = {\n ...scopeIdentity,\n createdAt: {\n startDate: '2026-08-18T00:00:00.000Z',\n endDate: '2026-08-18T23:59:59.999Z',\n },\n page: 1,\n limit: 20,\n sort: 'createdAt:desc',\n };\n const visibleEntries = isApplication ? [] : [pendingEntry, exhaustedEntry, deliveredEntry];\n const contextEntries = visibleEntries.map((entry) => ({\n ...entry,\n [relationshipField]: { _id: scopeId },\n }));\n const summaryEntries = visibleEntries.map((entry) => ({\n _id: entry._id,\n failureReason: entry.failureReason,\n status: entry.status,\n createdAt: entry.createdAt,\n }));\n\n return {\n isApplication,\n scopeIdentity,\n pendingEntry,\n listRequest,\n listPage: siemDeliveryDlqPage(visibleEntries),\n contextPage: siemDeliveryDlqPage(contextEntries),\n summaryPage: siemDeliveryDlqPage(summaryEntries),\n };\n}\n\nfunction buildBase(rt: RType, member: RMember): ResourceSpecificationConfig<Custom, Core, Main> {\n const reference = createSiemDeliveryDlqReferenceExamples(rt);\n return resourceSpecification<Custom, Core, Main>(\n siemDeliveryDlqPolymorphicFactories[rt],\n SiemDeliveryDlqBaseSchema,\n ({ schemaShape }) => ({\n purpose: 'SIEM delivery dead-letter entry: one record per failed (or re-queued) webhook delivery attempt, retaining payload for retry, inspection, and purge.',\n businessRole: 'Operator-facing queue for data that could not be pushed to a customer’s SIEM endpoint in time, with a clear failure reason and retry state.',\n lifecycleRole: 'Progresses from pending retry to exhausted or eventually delivered; custom ops requeue or clear entries in bulk.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.AUTH,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'SiemDeliveryDlqBaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: { packageName: '@wildo-ai/saas-models', exportName: 'siemDeliveryDlqPolymorphicFactories', symbolKind: CodeSymbolKind.FACTORY },\n identifierField: 'collectionKey',\n identifierValue: rt,\n },\n resourceType: {\n enumDeclaration: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceType', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM },\n memberName: member,\n },\n operationVocabulary: {\n coreEnum: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceOperation', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM },\n customEnum: { packageName: '@wildo-ai/saas-models', exportName: 'SiemDeliveryDlq_Operations', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM },\n },\n frontendConfigurationSourceEntries: [\n { collectionSymbol: { packageName: '@wildo-ai/presets-components', exportName: 'securityMainPresets', symbolKind: CodeSymbolKind.UI_BEHAVIOR }, identifierField: 'collectionKey', identifierValue: rt },\n { collectionSymbol: { packageName: '@wildo-ai/presets-components', exportName: 'securityAdminPresets', symbolKind: CodeSymbolKind.UI_BEHAVIOR }, identifierField: 'collectionKey', identifierValue: rt },\n ],\n notes: [\n '`eventPayload` is `z.unknown()` in the schema — the companion may describe it generically; this spec file omits a typed field spec until a dedicated `unknown`/`json` *Spec is standardized.',\n ],\n },\n fields: {\n status: schemaShape.status.enumSpec({\n meaning: 'DLQ lifecycle: awaiting retry, exhausted, or already delivered to SIEM on a later attempt.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: { packageName: '@wildo-ai/saas-models', exportName: 'SiemDeliveryDlqStatus', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.CONST_OBJECT },\n values: {\n [SiemDeliveryDlqStatus.PENDING_RETRY]: { meaning: 'May be retried automatically or by an operator while policy allows.' },\n [SiemDeliveryDlqStatus.EXHAUSTED]: { meaning: 'Retries are exhausted; manual inspection and purge or policy-driven cleanup apply.' },\n [SiemDeliveryDlqStatus.DELIVERED]: { meaning: 'A later attempt succeeded; row may be retained for an audit window.' },\n },\n }),\n failureReason: schemaShape.failureReason.stringSpec({\n meaning: 'Default list label in presets: human- or system-authored reason for the last failure path.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n eventId: schemaShape.eventId.stringSpec({ meaning: 'Correlation id to the source audit/transport event behind this failed delivery.' }),\n failureCount: schemaShape.failureCount.numberSpec({ meaning: 'How many times delivery failed for this chain.' }),\n lastAttemptAt: schemaShape.lastAttemptAt.dateSpec({ meaning: 'Last delivery attempt from Wildo to the customer webhook.' }),\n nextRetryAt: schemaShape.nextRetryAt.dateSpec({ meaning: 'When the next automatic retry is scheduled, if any.' }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Repository read of a single DLQ row (internal and admin diagnostics, not a broad end-user read).',\n outcome: 'Inspect error metadata and the opaque payload for support.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The DLQ row was found and its failure metadata plus opaque payload snapshot are returned for diagnostics.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the operator/admin role required to inspect a dead-letter row (the payload may contain customer PII).' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No DLQ row exists for the supplied id in the caller’s scope (already purged or re-delivered and removed).' },\n ],\n idempotent: true,\n },\n [Op.LIST]: {\n purpose: reference.isApplication\n ? 'List application-scoped SIEM delivery failures. This framework version has no application-scoped SIEM event producer, so the queue is expected to remain empty.'\n : 'List organization SIEM delivery failures for an incident window, filtered by retry status and ordered for investigation.',\n outcome: reference.isApplication\n ? 'A paginated empty queue confirms that no application-scoped SIEM delivery stream is active.'\n : 'Administrators receive the failed event envelope, failure reason, attempt history and current retry state for each delivery.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of dead-letter rows for the scope, ordered for the queue browser.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the operator/admin role that gates the SIEM dead-letter queue for this scope.' },\n ],\n idempotent: true,\n examples: [{\n title: reference.isApplication\n ? 'Confirm the application SIEM queue is empty'\n : 'Investigate current SIEM delivery states',\n request: reference.listRequest,\n response: reference.listPage,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: reference.isApplication\n ? 'Confirm the application SIEM context queue is empty'\n : 'Investigate SIEM failures with organization context',\n request: reference.listRequest,\n response: reference.contextPage,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: reference.isApplication\n ? 'Confirm the application SIEM summary queue is empty'\n : 'Review compact SIEM failure summaries',\n request: reference.listRequest,\n response: reference.summaryPage,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.CREATE]: {\n purpose: 'Internal append of DLQ rows on delivery failure (REPOSITORY_ONLY in the factory).',\n outcome: 'A new retryable or terminal document.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A dead-letter row was appended for a failed SIEM delivery and is returned with its server-assigned id.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The failure record fails schema validation (e.g. an unknown `status` or a missing `eventId`/`failureReason`).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not the internal delivery pipeline; this is a REPOSITORY_ONLY append path, not a self-serve create.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Append a dead-letter row for a failed SIEM delivery',\n request: {\n eventId: 'evt_01HX2…',\n status: SiemDeliveryDlqStatus.PENDING_RETRY,\n failureReason: 'Connection timed out posting to the customer webhook.',\n failureCount: 1,\n },\n response: {\n _id: 'siemdlq_01HX2…',\n eventId: 'evt_01HX2…',\n status: SiemDeliveryDlqStatus.PENDING_RETRY,\n failureReason: 'Connection timed out posting to the customer webhook.',\n failureCount: 1,\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.DELETE]: {\n purpose: 'Remove one row after a successful re-delivery or explicit row-level purge; REPOSITORY_ONLY in the factory for safety.',\n outcome: 'Entry removed from the DLQ collection; separate audit may still cover the original event stream.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The dead-letter row was removed from the queue; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the operator role required to drop a dead-letter row.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No DLQ row exists for the supplied id (already removed by a prior purge or re-delivery).' },\n ],\n idempotent: true,\n },\n [Op.DELETE_MANY]: {\n purpose: 'Bulk twin of `DELETE` — the repository write path behind `PURGE_ALL` (whole-scope clear) and the delete-on-requeue tail of `RETRY_SINGLE`/`RETRY_ALL`: one round trip drops every matched row.',\n outcome: 'Purge and retry-cleanup scale with a single bulk delete instead of N per-row deletes; DLQ rows are inert (no worker owns them, no retry sweep touches them) so any status is safe to drop.',\n whenToUse: 'Repository-only — never a public HTTP surface. Operators clear or drain via the `PURGE_ALL` / `RETRY_*` custom operations, which own request validation and the summary response.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The matched rows were bulk-deleted; the invoking custom operation reports the count in its own summary response.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-system caller attempts the repository-only bulk delete directly; UI/API flows must use `PURGE_ALL` / `RETRY_*`.' },\n ],\n idempotent: true,\n },\n [SiemDeliveryDlq_Operations.RETRY_SINGLE]: {\n operationId: SiemDeliveryDlq_Operations.RETRY_SINGLE,\n purpose: reference.isApplication\n ? 'Request a retry for one application-scoped queue entry by `entryId`; this version normally has no such entries because the application SIEM producer is unavailable.'\n : 'Request a new delivery attempt for one organization queue entry identified by `entryId` in the request body.',\n outcome: 'The response acknowledges the selected queue entry. If the new delivery also fails, its failure is visible in the queue again.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The targeted dead-letter entry was re-queued for delivery; a `{ message, entryId }` acknowledgement is returned (not the DLQ row).' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the operator role required to replay SIEM deliveries.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No DLQ row exists for the supplied `entryId` in the caller’s scope — it was already cleared or successfully re-delivered.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The entry is already `DELIVERED` (a later attempt succeeded), so there is nothing to retry. `PENDING_RETRY` and `EXHAUSTED` entries are both retryable.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The scope has no SIEM webhook URL configured, so there is no destination to re-deliver to; configure SIEM export before retrying.' },\n ],\n idempotent: false,\n examples: reference.isApplication\n ? [{\n title: 'Retry an unavailable application-scoped queue entry',\n request: { ...reference.scopeIdentity, entryId: 'siemdlq_missing_01HX2EXAMPLE' },\n response: {\n error: {\n type: ErrorType.NOT_FOUND,\n severity: ErrorSeverity.LOW,\n message: 'Requested resource not found',\n customMessage: 'The SIEM delivery queue entry could not be found.',\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n timestamp: '2026-08-18T13:45:00.000Z',\n },\n },\n forStatus: HttpResponseStatusCode.NOT_FOUND_404,\n }]\n : [{\n title: 'Retry one failed organization SIEM delivery',\n request: { ...reference.scopeIdentity, entryId: reference.pendingEntry._id },\n response: {\n message: 'SIEM DLQ entry re-queued for delivery.',\n entryId: reference.pendingEntry._id,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [SiemDeliveryDlq_Operations.RETRY_ALL]: {\n operationId: SiemDeliveryDlq_Operations.RETRY_ALL,\n purpose: 'Retry every pending or exhausted SIEM delivery entry in the current scope.',\n outcome: 'The response reports how many entries were accepted for another attempt and how many could not be retried.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'Eligible dead-letter entries in the scope were re-queued and removed; a `{ retriedCount, skippedCount, message }` summary is returned (not the rows). When SIEM export has no webhook URL configured, all entries are reported as skipped.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the operator role required to trigger a scope-wide SIEM replay.' },\n ],\n idempotent: false,\n rateLimitNote: 'Bulk replay fans out one outbound delivery attempt per eligible row (no artificial batch cap — the DLQ is a bounded failure queue); the SIEM delivery worker’s own per-scope circuit breaker and retry/backoff protect the customer endpoint.',\n examples: [{\n title: reference.isApplication\n ? 'Retry the empty application SIEM queue'\n : 'Retry all eligible organization SIEM deliveries',\n request: reference.scopeIdentity,\n response: reference.isApplication\n ? { retriedCount: 0, skippedCount: 0, message: 'The SIEM dead-letter queue is empty for this scope.' }\n : { retriedCount: 2, skippedCount: 1, message: 'Re-queued 2 of 3 SIEM dead-letter entries for this organization; skipped 1.' },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [SiemDeliveryDlq_Operations.PURGE_ALL]: {\n operationId: SiemDeliveryDlq_Operations.PURGE_ALL,\n purpose: 'Permanently remove every SIEM delivery-failure entry in the current scope.',\n outcome: 'The queue is cleared and the response reports how many entries were irreversibly removed.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'Every dead-letter row in the scope was permanently removed; a count of purged rows is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the CRITICAL-risk operator role required for an irreversible scope-wide purge.' },\n ],\n idempotent: false,\n examples: [{\n title: reference.isApplication\n ? 'Purge the empty application SIEM queue'\n : 'Purge all organization SIEM delivery failures',\n request: reference.scopeIdentity,\n response: reference.isApplication\n ? { purgedCount: 0, message: 'Purged 0 SIEM dead-letter entries for this application.' }\n : { purgedCount: 3, message: 'Purged 3 SIEM dead-letter entries for this organization.' },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n businessConstraints: [\n 'Purge and bulk retry are governed by the factory’s risk tiers: companion should never describe them as low-impact maintenance.',\n ...(reference.isApplication\n ? ['Application-scoped SIEM delivery is reserved in this framework version: no application event producer populates this queue, so retry and purge normally operate on an empty collection.']\n : []),\n ],\n }),\n { resourcePrimaryScope: scope[rt] },\n );\n}\n\nfunction build(rt: RType, member: RMember): ResourceSpecificationConfig<Custom, Core, Main> {\n const b = buildBase(rt, member);\n return resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(r(securityMainPresets as Partial<Record<string, unknown>>, rt, 'securityMainPresets')),\n resourceFrontendConfiguration(r(securityAdminPresets as Partial<Record<string, unknown>>, rt, 'securityAdminPresets')),\n ),\n b,\n () => ({\n label: {\n purpose: 'List rows and summaries are labeled from `failureReason` in the merged `security` preset — surface a concise operator-readable reason, not the entire payload.',\n },\n layout: {\n purpose: 'DLQ display in `security` uses section refs `overview` (context), `delivery` (attempt metadata), and `payload` (opaque snapshot).',\n displayPurpose: 'Template JSX for DLQ is defined alongside `layout.refs` in the preset to keep list rows compact; detail chrome expands the three blocks.',\n sections: {\n overview: {\n purpose: 'Status badge, `eventId`, and failure count so the operator orients to which stream failed before opening payload text.',\n whenToUse: 'All read layouts for a DLQ row in security consoles.',\n textSlots: {\n title: { purpose: 'Name the current DLQ item with status-first framing.' },\n description: { purpose: 'Mention that payload may contain PII; treat the screen as operator-only.' },\n },\n },\n delivery: {\n purpose: 'Attempt timestamps and next retry, plus a human-readable `failureReason` for triage.',\n whenToUse: 'Understanding whether automatic retries can still help vs exhausted state.',\n textSlots: {\n title: { purpose: 'Label the delivery and retry block.' },\n description: { purpose: 'Clarify that `nextRetryAt` can be empty when the row is terminal.' },\n },\n },\n payload: {\n purpose: 'The opaque `eventPayload` blob — rendering may truncate or redact; structure is not fixed across event types.',\n whenToUse: 'Deep debugging after overview/delivery are understood; export paths may also reference this data.',\n textSlots: {\n title: { purpose: 'Label the payload/technical view.' },\n description: { purpose: 'Avoid claiming a stable JSON contract — the schema stores `z.unknown()` for flexibility at write time.' },\n },\n },\n },\n },\n views: {\n [Op.LIST]: { purpose: 'Primary addressable queue surface in merged presets for org and app security operators — dashboard-style: `status` quick-filter tab strip (All / Pending retry / Exhausted / Delivered) + `createdAt` day-bucket grouping via `collectionDisplayConfig` (backend-validated: `status` + `createdAt` are the LIST op\\'s declared `filterFields`).', whenToUse: 'SIEM health and retry workflows under security settings; the Failed tab is the triage entry point.' },\n [SiemDeliveryDlq_Operations.RETRY_SINGLE]: { purpose: 'Single-row retry surfaced as a per-row action (not URL-addressable); executes in place on the clicked row, whose id is injected into the request body `entryId`.', whenToUse: 'Replaying one known-bad event after a customer fixes their endpoint.' },\n [SiemDeliveryDlq_Operations.RETRY_ALL]: { purpose: 'Whole-scope requeue (borrows the collection verb `UPDATE_MANY` for an id-less collection route); surfaced once in the list collection-action bar, confirms (HIGH) then executes in place.', whenToUse: 'Outage recovery after a shared infrastructure fix.' },\n [SiemDeliveryDlq_Operations.PURGE_ALL]: { purpose: 'Whole-scope clear (borrows the collection verb `DELETE_MANY` for an id-less collection route); surfaced in the list collection-action bar, type-to-confirm (CRITICAL) then executes in place.', whenToUse: 'Compliance or disk-pressure teardown when retention policy allows purging the DLQ only.' },\n },\n }),\n );\n}\n\nexport const organizationSiemDeliveryDlqResourceSpecification = build(\n CoreResourceType.ORGANIZATION_SIEM_DELIVERY_DLQ,\n 'ORGANIZATION_SIEM_DELIVERY_DLQ',\n);\nexport const applicationSiemDeliveryDlqResourceSpecification = build(\n CoreResourceType.APPLICATION_SIEM_DELIVERY_DLQ,\n 'APPLICATION_SIEM_DELIVERY_DLQ',\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siem-export-config.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/siem-export-config.resource.specification.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAU5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAML,KAAK,2BAA2B,EACjC,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"siem-export-config.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/siem-export-config.resource.specification.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAU5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAML,KAAK,2BAA2B,EACjC,MAAM,6BAA6B,CAAC;AA4YrC,eAAO,MAAM,iDAAiD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAG7D,CAAC;AACF,eAAO,MAAM,gDAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAG5D,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
|
|
|
3
3
|
import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
|
|
4
4
|
import { CoreResourceOperation as Op, CoreResourceType, ResourcePrimaryScope, SIEMEventCategory, SIEMEventFormat, SIEMFilterSeverity, SIEMAuthMethod, SiemExportConfigBaseSchema, WildoHeaderKeys, siemExportConfigPolymorphicFactories, } from '@wildo-ai/saas-models';
|
|
5
5
|
import { HttpResponseStatusCode, mergeResourceFrontendConfigurations, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
|
|
6
|
+
import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
|
|
6
7
|
function resolveSiemExportUI(source, resourceType, sourceName) {
|
|
7
8
|
const ui = source[resourceType];
|
|
8
9
|
if (!ui) {
|
|
@@ -73,6 +74,7 @@ function buildSiemExportBase(resourceType, memberName) {
|
|
|
73
74
|
businessRole: 'The outbound integration point that turns internal audit events into a customer SIEM or log pipeline.',
|
|
74
75
|
lifecycleRole: 'Seeded per scope, enabled or disabled through the administration configuration flow, and edited for destinations, credentials, filtering, and delivery policy.',
|
|
75
76
|
audience: LabelAudience.DEVELOPER,
|
|
77
|
+
subDomain: EngineResourceSubDomain.AUTH,
|
|
76
78
|
codeHandling: {
|
|
77
79
|
mainSchema: {
|
|
78
80
|
packageName: '@wildo-ai/saas-models',
|
|
@@ -137,9 +139,9 @@ function buildSiemExportBase(resourceType, memberName) {
|
|
|
137
139
|
},
|
|
138
140
|
values: {
|
|
139
141
|
[SIEMAuthMethod.NONE]: { meaning: 'No client authentication (rare; usually dev-only).' },
|
|
140
|
-
[SIEMAuthMethod.BEARER_TOKEN]: { meaning: 'Bearer token in the Authorization header
|
|
141
|
-
[SIEMAuthMethod.API_KEY_HEADER]: { meaning: 'API key in a
|
|
142
|
-
[SIEMAuthMethod.HMAC_SHA256]: { meaning: '
|
|
142
|
+
[SIEMAuthMethod.BEARER_TOKEN]: { meaning: 'Bearer token in the Authorization header. You supply the token when you save the configuration; reading it back returns `••••••••` rather than the value.' },
|
|
143
|
+
[SIEMAuthMethod.API_KEY_HEADER]: { meaning: 'API key in a header you name. When you do not name one, the default is `x-api-key`.' },
|
|
144
|
+
[SIEMAuthMethod.HMAC_SHA256]: { meaning: 'The payload is signed with a shared secret your receiver verifies. You supply the secret when you save the configuration; reading it back returns `••••••••` rather than the value.' },
|
|
143
145
|
},
|
|
144
146
|
}),
|
|
145
147
|
authCredential: schemaShape.authCredential.stringSpec({
|
|
@@ -294,7 +296,7 @@ function buildSiemExportBase(resourceType, memberName) {
|
|
|
294
296
|
},
|
|
295
297
|
},
|
|
296
298
|
businessConstraints: [
|
|
297
|
-
'
|
|
299
|
+
'Credentials are write-only: `authCredential` and any HMAC secret are supplied when the configuration is saved and are never returned by a read, which answers `••••••••` instead. There is no list or search over these rows, so a credential cannot be recovered from the configuration once it is stored.',
|
|
298
300
|
'Event payload shapes are a separate concern from this row: `eventFilter` and `eventFormat` do not re-specify the full audit log schema, only the export fan-out contract.',
|
|
299
301
|
...(reference.isApplication
|
|
300
302
|
? ['Application-scoped SIEM export is reserved in this framework version: no application event producer feeds this configuration or its delivery queue. Consumers must not treat `enabled: true` as evidence that application-scoped events are being exported.']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siem-export-config.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/siem-export-config.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,0BAA0B,EAC1B,eAAe,EACf,oCAAoC,GACrC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAE/C,MAAM,6BAA6B,CAAC;AAarC,SAAS,mBAAmB,CAC1B,MAAwC,EACx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AAC,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,iDAAiD,GAAG,mBAAmB,CAClF,gBAAgB,CAAC,+BAA+B,EAChD,iCAAiC,CAClC,CAAC;AACF,MAAM,CAAC,MAAM,gDAAgD,GAAG,mBAAmB,CACjF,gBAAgB,CAAC,8BAA8B,EAC/C,gCAAgC,CACjC,CAAC","sourcesContent":["import {\n securityAdminPresets,\n securityMainPresets,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n CoreResourceType,\n ResourcePrimaryScope,\n SIEMEventCategory,\n SIEMEventFormat,\n SIEMFilterSeverity,\n SIEMAuthMethod,\n SiemExportConfigBaseSchema,\n WildoHeaderKeys,\n siemExportConfigPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n type ResourceSpecificationConfig,\n} from '~wildo-specifications/_core';\n\ntype SiemResourceType =\n | CoreResourceType.ORGANIZATION_SIEM_EXPORT_CONFIG\n | CoreResourceType.APPLICATION_SIEM_EXPORT_CONFIG;\ntype SiemResourceTypeMemberName = 'ORGANIZATION_SIEM_EXPORT_CONFIG' | 'APPLICATION_SIEM_EXPORT_CONFIG';\n\ntype SiemConfig = ReturnType<(typeof siemExportConfigPolymorphicFactories)[CoreResourceType.ORGANIZATION_SIEM_EXPORT_CONFIG]>;\ntype SiemCustom = SiemConfig['customOperation'];\ntype SiemCore = SiemConfig['coreOperations'][number];\ntype SiemSchema = typeof SiemExportConfigBaseSchema;\ntype SiemFrontend = ResourceUIBehaviorConfig<SiemCustom, SiemCore, SiemSchema>;\n\nfunction resolveSiemExportUI(\n source: Partial<Record<string, unknown>>,\n resourceType: SiemResourceType,\n sourceName: string,\n): SiemFrontend {\n const ui = source[resourceType] as SiemFrontend | undefined;\n if (!ui) {\n throw new Error(`Missing \"${resourceType}\" UI behavior in ${sourceName}.`);\n }\n return ui;\n}\n\nconst siemExportResourcePrimaryScope: Record<SiemResourceType, ResourcePrimaryScope> = {\n [CoreResourceType.ORGANIZATION_SIEM_EXPORT_CONFIG]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_SIEM_EXPORT_CONFIG]: ResourcePrimaryScope.APPLICATION,\n};\n\nconst SIEM_EXPORT_DELIVERY_EXAMPLE = {\n batchSize: 20,\n batchWindowSeconds: 10,\n retryAttempts: 3,\n retryBackoffSeconds: 30,\n timeoutSeconds: 10,\n} as const;\n\nfunction createSiemExportReferenceExamples(resourceType: SiemResourceType) {\n const isApplication = resourceType === CoreResourceType.APPLICATION_SIEM_EXPORT_CONFIG;\n const scopeId = isApplication ? 'application_01HX2EXAMPLE' : 'organization_01HX2EXAMPLE';\n const scopeField = isApplication ? 'applicationId' : 'organizationId';\n const relationshipField = isApplication ? 'application' : 'organization';\n const scopeIdentity = { [scopeField]: scopeId };\n const record = {\n _id: isApplication ? 'app_siemcfg_01HX2EXAMPLE' : 'org_siemcfg_01HX2EXAMPLE',\n enabled: !isApplication,\n webhookUrl: isApplication ? '' : 'https://siem.example.com/v1/events',\n authMethod: isApplication ? SIEMAuthMethod.NONE : SIEMAuthMethod.BEARER_TOKEN,\n ...(!isApplication ? { authCredential: '••••••••' } : {}),\n authHeaderName: WildoHeaderKeys.API_KEY,\n eventFormat: SIEMEventFormat.OCSF,\n eventFilter: {\n categories: [\n SIEMEventCategory.AUTHENTICATION,\n SIEMEventCategory.AUTHORIZATION,\n SIEMEventCategory.USER_LIFECYCLE,\n ],\n severityMinimum: SIEMFilterSeverity.WARNING,\n specificEventTypes: ['authentication.login.failed', 'authorization.access.denied'],\n },\n delivery: SIEM_EXPORT_DELIVERY_EXAMPLE,\n customHeaders: { 'x-customer-tenant': isApplication ? 'wonder-todos' : 'northwind' },\n includeRawEventData: true,\n includeDeviceContext: true,\n createdAt: '2026-08-01T09:00:00.000Z',\n updatedAt: '2026-08-18T13:40:00.000Z',\n ...scopeIdentity,\n };\n\n return {\n isApplication,\n scopeIdentity,\n record,\n contextRecord: {\n ...record,\n [relationshipField]: { _id: scopeId },\n },\n summaryRecord: {\n _id: record._id,\n enabled: record.enabled,\n },\n };\n}\n\nfunction buildSiemExportBase(\n resourceType: SiemResourceType,\n memberName: SiemResourceTypeMemberName,\n): ResourceSpecificationConfig<SiemCustom, SiemCore, SiemSchema> {\n const reference = createSiemExportReferenceExamples(resourceType);\n return resourceSpecification<SiemCustom, SiemCore, SiemSchema>(\n siemExportConfigPolymorphicFactories[resourceType],\n SiemExportConfigBaseSchema,\n ({ schemaShape }) => ({\n purpose: 'SIEM export configuration: where audit/security events are delivered, how they are signed or authenticated, and how they are batched to an HTTPS webhook endpoint.',\n businessRole: 'The outbound integration point that turns internal audit events into a customer SIEM or log pipeline.',\n lifecycleRole: 'Seeded per scope, enabled or disabled through the administration configuration flow, and edited for destinations, credentials, filtering, and delivery policy.',\n audience: LabelAudience.DEVELOPER,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'SiemExportConfigBaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'siemExportConfigPolymorphicFactories',\n symbolKind: CodeSymbolKind.FACTORY,\n },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\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,\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 frontendConfigurationSourceEntries: [\n {\n collectionSymbol: { packageName: '@wildo-ai/presets-components', exportName: 'securityMainPresets', symbolKind: CodeSymbolKind.UI_BEHAVIOR },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\n },\n {\n collectionSymbol: { packageName: '@wildo-ai/presets-components', exportName: 'securityAdminPresets', symbolKind: CodeSymbolKind.UI_BEHAVIOR },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\n },\n ],\n notes: [\n 'Application variant in main presets may override `views` to empty; merged admin may still provide addressable `READ` for super-admin flows — the spec’s frontend section reflects operations that exist in the factory regardless.',\n ],\n },\n fields: {\n enabled: schemaShape.enabled.booleanSpec({\n meaning: 'When true, the pipeline may emit configured events; when false, deliveries should be suppressed without deleting configuration.',\n }),\n webhookUrl: schemaShape.webhookUrl.stringSpec({ meaning: 'Destination HTTPS URL for JSON/CEF/LEEF payload posts.', importance: FieldSemanticImportance.PRIMARY }),\n authMethod: schemaShape.authMethod.enumSpec({\n meaning: 'How the outbound webhook authenticates to the customer endpoint.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'SIEMAuthMethod',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.CONST_OBJECT,\n },\n values: {\n [SIEMAuthMethod.NONE]: { meaning: 'No client authentication (rare; usually dev-only).' },\n [SIEMAuthMethod.BEARER_TOKEN]: { meaning: 'Bearer token in the Authorization header (credential is a `.isWriteOnlySecret()` field: client-supplied, redacted to `••••••••` on read by the framework).' },\n [SIEMAuthMethod.API_KEY_HEADER]: { meaning: 'API key in a named header, defaulting to a shared `Wildo` header key in schema when not overridden.' },\n [SIEMAuthMethod.HMAC_SHA256]: { meaning: 'HMAC of payload with a shared secret for webhook verification (credential is a `.isWriteOnlySecret()` field, redacted on read by the framework).' },\n },\n }),\n authCredential: schemaShape.authCredential.stringSpec({\n meaning: 'Write-only credential used by the selected outbound authentication method. Reads return only the masked marker `••••••••`; sending that marker back preserves the existing secret, while sending another value replaces it.',\n }),\n authHeaderName: schemaShape.authHeaderName.stringSpec({\n meaning: 'Header name used only by `api_key_header`. The configured credential is sent as that header’s complete value; prefixes such as `Splunk ` or `ApiKey ` must therefore be included in the stored value when the receiver requires them.',\n }),\n eventFormat: schemaShape.eventFormat.enumSpec({\n meaning: 'Payload wire format the receiver expects (structured JSON, CEF, LEEF, or OCSF). '\n + 'The two text formats are delivered as `text/plain`; the two JSON formats as `application/json`.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'SIEMEventFormat',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.CONST_OBJECT,\n },\n values: {\n [SIEMEventFormat.JSON_STRUCTURED]: { meaning: 'Product-native JSON schema for structured log ingest. Carries every envelope field.' },\n [SIEMEventFormat.CEF]: {\n meaning: 'Common Event Format for legacy SIEM connectors. Reaches 20 of the 27 envelope fields — CEF publishes only six general-purpose '\n + '`csN` slots, and a minted custom extension is unreportable in ArcSight ESM, so the remainder are deliberately omitted rather than force-fitted.',\n },\n [SIEMEventFormat.LEEF]: {\n meaning: 'LEEF v2 for IBM QRadar. Reaches all 27 envelope fields, because a LEEF custom key stays searchable in QRadar where a CEF custom extension does not.',\n },\n [SIEMEventFormat.OCSF]: {\n meaning: 'Open Cybersecurity Schema Framework — the JSON-native security schema, delivered as `application/json`. A PEER of the text formats rather than '\n + 'a replacement: an audit event maps onto an OCSF CLASS natively (Authentication, User Management, API Activity, Entity Management) instead of being '\n + 'force-fit into a custom slot. The class is selected from the event category, and `type_uid` is derived, never authored.',\n },\n },\n }),\n eventFilter: schemaShape.eventFilter.objectSpec({\n meaning: 'Filter block: selected high-level event categories, minimum SIEM severity, and an optional exact allowlist of event-type identifiers. `specificEventTypes` uses exact string equality, not substring or wildcard matching.',\n }),\n delivery: schemaShape.delivery.objectSpec({\n meaning: 'Retry and timeout policy for each outbound event. `retryAttempts`, `retryBackoffSeconds` and `timeoutSeconds` are enforced. `batchSize` and `batchWindowSeconds` are accepted and stored but the current worker still posts one event per request; do not size a receiver on the assumption that batching occurs.',\n }),\n customHeaders: schemaShape.customHeaders.codeSpec({\n meaning: 'Additional static HTTP headers included with every delivery. The selected authentication method is applied afterward and overrides a custom header with the same name.',\n }),\n includeRawEventData: schemaShape.includeRawEventData.booleanSpec({\n meaning: 'Reserved configuration flag. It is currently accepted and stored but is not read by the event-envelope or delivery path; changing it does not remove `eventData` from emitted events.',\n }),\n includeDeviceContext: schemaShape.includeDeviceContext.booleanSpec({\n meaning: 'Reserved configuration flag. It is currently accepted and stored but is not read by the event-envelope or delivery path; changing it does not remove available IP address or user-agent context.',\n }),\n },\n operations: {\n [Op.READ]: {\n purpose: reference.isApplication\n ? 'Inspect the application-scoped SIEM export configuration and its current activation state.'\n : 'Inspect the organization SIEM export destination, authentication, filtering and delivery policy.',\n outcome: reference.isApplication\n ? 'Application administrators can see the reserved configuration record. This framework version does not produce application-scoped SIEM events, so enabling this record does not start delivery.'\n : 'Organization administrators can verify the active destination and policy without receiving the stored credential value.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: reference.isApplication\n ? 'The reserved application-scoped configuration was returned. No application-scoped event producer is available in this framework version.'\n : 'The organization SIEM export configuration was returned, with any stored credential represented only by the redacted placeholder.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the security-admin role required to read the SIEM export configuration.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No SIEM export configuration has been provisioned for this scope yet.' },\n ],\n idempotent: true,\n examples: [{\n title: reference.isApplication\n ? 'Inspect the inactive application SIEM configuration'\n : 'Inspect the organization SIEM export configuration',\n request: reference.scopeIdentity,\n response: reference.record,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: reference.isApplication\n ? 'Inspect the application configuration with scope context'\n : 'Inspect the organization configuration with scope context',\n request: reference.scopeIdentity,\n response: reference.contextRecord,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: reference.isApplication\n ? 'Inspect the application SIEM activation summary'\n : 'Inspect the organization SIEM activation summary',\n request: reference.scopeIdentity,\n response: reference.summaryRecord,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.CREATE]: {\n purpose: 'Create the per-scope SIEM config row; internal-only (INTERNAL_CALL) variant in the factory — no public HTTP create route. Materialised by the framework default-seed (repository tier) or, when that was bypassed, a system-context lazy-create.',\n outcome: 'The scope gains a new SIEM export document.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A SIEM export configuration row was created for the scope and returned with its server-assigned id.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The configuration fails schema validation (e.g. a non-HTTPS `webhookUrl`, an unknown `eventFormat`, or an `authMethod` missing its required credential).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a security-admin/platform operator; this is an internal-only (INTERNAL_CALL) bootstrap path, not a self-serve create.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A SIEM export configuration already exists for this scope — the resource is one-per-scope, so a second create collides.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Provision a SIEM export configuration for a scope',\n request: {\n enabled: true,\n webhookUrl: 'https://siem.example.com/ingest',\n authMethod: SIEMAuthMethod.BEARER_TOKEN,\n eventFormat: SIEMEventFormat.JSON_STRUCTURED,\n },\n response: {\n _id: 'siemcfg_01HX2…',\n enabled: true,\n webhookUrl: 'https://siem.example.com/ingest',\n authMethod: SIEMAuthMethod.BEARER_TOKEN,\n eventFormat: SIEMEventFormat.JSON_STRUCTURED,\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.UPDATE]: {\n purpose: 'Update webhook, format, event filter, or delivery block after validation (INTERNAL_CALL update — no public HTTP route; reached through `AuthOrganizationConfigurationService.saveSiemExportConfig` on the admin’s execution context, preserving admin audit attribution).',\n outcome: 'Downstream services pick up changes for subsequent deliveries.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The SIEM export configuration was updated and the new settings (secrets redacted) are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited destination, format, filter, or delivery block fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the security-admin role required to change SIEM export settings.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No SIEM export configuration exists for this scope to update.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the SIEM export config row when its owning org/app is deleted (composition `onParentDelete` cascade).',\n outcome: 'The one-per-scope config row is removed together with its parent — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The SIEM export config row was deleted as part of the deletion cascade of its owning scope.' },\n ],\n // REPOSITORY_ONLY variant (org/app admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n },\n businessConstraints: [\n 'Sensitive secrets (`authCredential` and HMAC material) carry the framework `.isWriteOnlySecret()` contract: the operator supplies them on CREATE/UPDATE, but the framework redacts them to a stored-credential reference (`••••••••`) at the client boundary on every read (no LIST/SEARCH is exposed). Companion and UI must reference “stored credential” not literal values; re-submitting the `••••••••` placeholder unchanged on UPDATE preserves the existing secret (the framework strips the sentinel). The real value is retained for the backend webhook signer only.',\n 'Event payload shapes are a separate concern from this row: `eventFilter` and `eventFormat` do not re-specify the full audit log schema, only the export fan-out contract.',\n ...(reference.isApplication\n ? ['Application-scoped SIEM export is reserved in this framework version: no application event producer feeds this configuration or its delivery queue. Consumers must not treat `enabled: true` as evidence that application-scoped events are being exported.']\n : []),\n ],\n }),\n { resourcePrimaryScope: siemExportResourcePrimaryScope[resourceType] },\n );\n}\n\nfunction buildSiemExportSpec(\n resourceType: SiemResourceType,\n memberName: SiemResourceTypeMemberName,\n): ResourceSpecificationConfig<SiemCustom, SiemCore, SiemSchema> {\n const base = buildSiemExportBase(resourceType, memberName);\n const main = resolveSiemExportUI(securityMainPresets as Partial<Record<string, unknown>>, resourceType, 'securityMainPresets');\n const admin = resolveSiemExportUI(securityAdminPresets as Partial<Record<string, unknown>>, resourceType, 'securityAdminPresets');\n return resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(resourceFrontendConfiguration(main), resourceFrontendConfiguration(admin)),\n base,\n () => ({\n layout: {\n purpose: 'Field-edit layout in `security` uses section refs `status`, `destination`, `authentication`, `format`, and `advanced` (collapsible) with a settings-row edit chrome for most controls.',\n displayPurpose: 'Read template mirrors the same section ordering for a consistent admin walkthrough of SIEM settings.',\n sections: {\n status: {\n purpose: 'On/off and health posture for the SIEM integration.',\n whenToUse: 'First decision point: enable or pause exports without losing configuration.',\n textSlots: {\n title: { purpose: 'Name the “SIEM is active / paused” card.' },\n description: { purpose: 'Clarify that disabled mode stops new deliveries; existing DLQ may still be visible elsewhere.' },\n },\n },\n destination: {\n purpose: 'The HTTPS endpoint receiving exported events.',\n whenToUse: 'Initial setup and any rotation of the customer-side ingress URL.',\n textSlots: {\n title: { purpose: 'Label the webhook / destination block.' },\n description: { purpose: 'Mention that TLS and DNS must be valid from Wildo’s egress perspective.' },\n },\n },\n authentication: {\n purpose: 'Auth method, credential (stored server-side), and header naming for key-based methods.',\n whenToUse: 'When `authMethod` is not `NONE` or when the customer hardens their webhook.',\n textSlots: {\n title: { purpose: 'Label the authentication and secrets block.' },\n description: { purpose: 'Never echo raw secrets; reference rotation procedures instead.' },\n },\n },\n format: {\n purpose: 'Wire format and the event filter: categories, minimum severity, and allow-listed event type strings when used.',\n whenToUse: 'Tightening what is exported to match SIEM capacity and policy.',\n textSlots: {\n title: { purpose: 'Label the format and filter area.' },\n description: { purpose: 'Tie the filter to `eventType` strings produced by the audit pipeline, not arbitrary JSON paths.' },\n },\n },\n advanced: {\n purpose: 'Delivery tuning (batch size/window, retries, timeouts) and transport extras such as `customHeaders` and optional raw/device context flags.',\n whenToUse: 'After basic connectivity is proven and operators tune throughput and observability cost.',\n textSlots: {\n title: { purpose: 'Label the advanced and tuning section.' },\n description: { purpose: 'Clarify that bad tuning can delay or drop events; document incident procedures separately.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Read-oriented settings and status host in merged presets (addressable in main org/app SIEM UIs; admin merge may differ).', whenToUse: 'Navigating the SIEM configuration screen in security settings.' },\n },\n }),\n );\n}\n\nexport const organizationSiemExportConfigResourceSpecification = buildSiemExportSpec(\n CoreResourceType.ORGANIZATION_SIEM_EXPORT_CONFIG,\n 'ORGANIZATION_SIEM_EXPORT_CONFIG',\n);\nexport const applicationSiemExportConfigResourceSpecification = buildSiemExportSpec(\n CoreResourceType.APPLICATION_SIEM_EXPORT_CONFIG,\n 'APPLICATION_SIEM_EXPORT_CONFIG',\n);\n"]}
|
|
1
|
+
{"version":3,"file":"siem-export-config.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/siem-export-config.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,0BAA0B,EAC1B,eAAe,EACf,oCAAoC,GACrC,MAAM,uBAAuB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AK,EAAE,EAAE,OAAO,EAAE,wCAAwC,EAAE;wBAC5D,WAAW,EAAE,EAAE,OAAO,EAAE,4FAA4F,EAAE;qBACvH;iBACF;aACF;SACF;QACD,KAAK,EAAE;YACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,0HAA0H,EAAE,SAAS,EAAE,gEAAgE,EAAE;SAChO;KACF,CAAC,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,iDAAiD,GAAG,mBAAmB,CAClF,gBAAgB,CAAC,+BAA+B,EAChD,iCAAiC,CAClC,CAAC;AACF,MAAM,CAAC,MAAM,gDAAgD,GAAG,mBAAmB,CACjF,gBAAgB,CAAC,8BAA8B,EAC/C,gCAAgC,CACjC,CAAC","sourcesContent":["import {\n securityAdminPresets,\n securityMainPresets,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n CoreResourceType,\n ResourcePrimaryScope,\n SIEMEventCategory,\n SIEMEventFormat,\n SIEMFilterSeverity,\n SIEMAuthMethod,\n SiemExportConfigBaseSchema,\n WildoHeaderKeys,\n siemExportConfigPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n type ResourceSpecificationConfig,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype SiemResourceType =\n | CoreResourceType.ORGANIZATION_SIEM_EXPORT_CONFIG\n | CoreResourceType.APPLICATION_SIEM_EXPORT_CONFIG;\ntype SiemResourceTypeMemberName = 'ORGANIZATION_SIEM_EXPORT_CONFIG' | 'APPLICATION_SIEM_EXPORT_CONFIG';\n\ntype SiemConfig = ReturnType<(typeof siemExportConfigPolymorphicFactories)[CoreResourceType.ORGANIZATION_SIEM_EXPORT_CONFIG]>;\ntype SiemCustom = SiemConfig['customOperation'];\ntype SiemCore = SiemConfig['coreOperations'][number];\ntype SiemSchema = typeof SiemExportConfigBaseSchema;\ntype SiemFrontend = ResourceUIBehaviorConfig<SiemCustom, SiemCore, SiemSchema>;\n\nfunction resolveSiemExportUI(\n source: Partial<Record<string, unknown>>,\n resourceType: SiemResourceType,\n sourceName: string,\n): SiemFrontend {\n const ui = source[resourceType] as SiemFrontend | undefined;\n if (!ui) {\n throw new Error(`Missing \"${resourceType}\" UI behavior in ${sourceName}.`);\n }\n return ui;\n}\n\nconst siemExportResourcePrimaryScope: Record<SiemResourceType, ResourcePrimaryScope> = {\n [CoreResourceType.ORGANIZATION_SIEM_EXPORT_CONFIG]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_SIEM_EXPORT_CONFIG]: ResourcePrimaryScope.APPLICATION,\n};\n\nconst SIEM_EXPORT_DELIVERY_EXAMPLE = {\n batchSize: 20,\n batchWindowSeconds: 10,\n retryAttempts: 3,\n retryBackoffSeconds: 30,\n timeoutSeconds: 10,\n} as const;\n\nfunction createSiemExportReferenceExamples(resourceType: SiemResourceType) {\n const isApplication = resourceType === CoreResourceType.APPLICATION_SIEM_EXPORT_CONFIG;\n const scopeId = isApplication ? 'application_01HX2EXAMPLE' : 'organization_01HX2EXAMPLE';\n const scopeField = isApplication ? 'applicationId' : 'organizationId';\n const relationshipField = isApplication ? 'application' : 'organization';\n const scopeIdentity = { [scopeField]: scopeId };\n const record = {\n _id: isApplication ? 'app_siemcfg_01HX2EXAMPLE' : 'org_siemcfg_01HX2EXAMPLE',\n enabled: !isApplication,\n webhookUrl: isApplication ? '' : 'https://siem.example.com/v1/events',\n authMethod: isApplication ? SIEMAuthMethod.NONE : SIEMAuthMethod.BEARER_TOKEN,\n ...(!isApplication ? { authCredential: '••••••••' } : {}),\n authHeaderName: WildoHeaderKeys.API_KEY,\n eventFormat: SIEMEventFormat.OCSF,\n eventFilter: {\n categories: [\n SIEMEventCategory.AUTHENTICATION,\n SIEMEventCategory.AUTHORIZATION,\n SIEMEventCategory.USER_LIFECYCLE,\n ],\n severityMinimum: SIEMFilterSeverity.WARNING,\n specificEventTypes: ['authentication.login.failed', 'authorization.access.denied'],\n },\n delivery: SIEM_EXPORT_DELIVERY_EXAMPLE,\n customHeaders: { 'x-customer-tenant': isApplication ? 'wonder-todos' : 'northwind' },\n includeRawEventData: true,\n includeDeviceContext: true,\n createdAt: '2026-08-01T09:00:00.000Z',\n updatedAt: '2026-08-18T13:40:00.000Z',\n ...scopeIdentity,\n };\n\n return {\n isApplication,\n scopeIdentity,\n record,\n contextRecord: {\n ...record,\n [relationshipField]: { _id: scopeId },\n },\n summaryRecord: {\n _id: record._id,\n enabled: record.enabled,\n },\n };\n}\n\nfunction buildSiemExportBase(\n resourceType: SiemResourceType,\n memberName: SiemResourceTypeMemberName,\n): ResourceSpecificationConfig<SiemCustom, SiemCore, SiemSchema> {\n const reference = createSiemExportReferenceExamples(resourceType);\n return resourceSpecification<SiemCustom, SiemCore, SiemSchema>(\n siemExportConfigPolymorphicFactories[resourceType],\n SiemExportConfigBaseSchema,\n ({ schemaShape }) => ({\n purpose: 'SIEM export configuration: where audit/security events are delivered, how they are signed or authenticated, and how they are batched to an HTTPS webhook endpoint.',\n businessRole: 'The outbound integration point that turns internal audit events into a customer SIEM or log pipeline.',\n lifecycleRole: 'Seeded per scope, enabled or disabled through the administration configuration flow, and edited for destinations, credentials, filtering, and delivery policy.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.AUTH,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'SiemExportConfigBaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'siemExportConfigPolymorphicFactories',\n symbolKind: CodeSymbolKind.FACTORY,\n },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\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,\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 frontendConfigurationSourceEntries: [\n {\n collectionSymbol: { packageName: '@wildo-ai/presets-components', exportName: 'securityMainPresets', symbolKind: CodeSymbolKind.UI_BEHAVIOR },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\n },\n {\n collectionSymbol: { packageName: '@wildo-ai/presets-components', exportName: 'securityAdminPresets', symbolKind: CodeSymbolKind.UI_BEHAVIOR },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\n },\n ],\n notes: [\n 'Application variant in main presets may override `views` to empty; merged admin may still provide addressable `READ` for super-admin flows — the spec’s frontend section reflects operations that exist in the factory regardless.',\n ],\n },\n fields: {\n enabled: schemaShape.enabled.booleanSpec({\n meaning: 'When true, the pipeline may emit configured events; when false, deliveries should be suppressed without deleting configuration.',\n }),\n webhookUrl: schemaShape.webhookUrl.stringSpec({ meaning: 'Destination HTTPS URL for JSON/CEF/LEEF payload posts.', importance: FieldSemanticImportance.PRIMARY }),\n authMethod: schemaShape.authMethod.enumSpec({\n meaning: 'How the outbound webhook authenticates to the customer endpoint.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'SIEMAuthMethod',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.CONST_OBJECT,\n },\n values: {\n [SIEMAuthMethod.NONE]: { meaning: 'No client authentication (rare; usually dev-only).' },\n [SIEMAuthMethod.BEARER_TOKEN]: { meaning: 'Bearer token in the Authorization header. You supply the token when you save the configuration; reading it back returns `••••••••` rather than the value.' },\n [SIEMAuthMethod.API_KEY_HEADER]: { meaning: 'API key in a header you name. When you do not name one, the default is `x-api-key`.' },\n [SIEMAuthMethod.HMAC_SHA256]: { meaning: 'The payload is signed with a shared secret your receiver verifies. You supply the secret when you save the configuration; reading it back returns `••••••••` rather than the value.' },\n },\n }),\n authCredential: schemaShape.authCredential.stringSpec({\n meaning: 'Write-only credential used by the selected outbound authentication method. Reads return only the masked marker `••••••••`; sending that marker back preserves the existing secret, while sending another value replaces it.',\n }),\n authHeaderName: schemaShape.authHeaderName.stringSpec({\n meaning: 'Header name used only by `api_key_header`. The configured credential is sent as that header’s complete value; prefixes such as `Splunk ` or `ApiKey ` must therefore be included in the stored value when the receiver requires them.',\n }),\n eventFormat: schemaShape.eventFormat.enumSpec({\n meaning: 'Payload wire format the receiver expects (structured JSON, CEF, LEEF, or OCSF). '\n + 'The two text formats are delivered as `text/plain`; the two JSON formats as `application/json`.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'SIEMEventFormat',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.CONST_OBJECT,\n },\n values: {\n [SIEMEventFormat.JSON_STRUCTURED]: { meaning: 'Product-native JSON schema for structured log ingest. Carries every envelope field.' },\n [SIEMEventFormat.CEF]: {\n meaning: 'Common Event Format for legacy SIEM connectors. Reaches 20 of the 27 envelope fields — CEF publishes only six general-purpose '\n + '`csN` slots, and a minted custom extension is unreportable in ArcSight ESM, so the remainder are deliberately omitted rather than force-fitted.',\n },\n [SIEMEventFormat.LEEF]: {\n meaning: 'LEEF v2 for IBM QRadar. Reaches all 27 envelope fields, because a LEEF custom key stays searchable in QRadar where a CEF custom extension does not.',\n },\n [SIEMEventFormat.OCSF]: {\n meaning: 'Open Cybersecurity Schema Framework — the JSON-native security schema, delivered as `application/json`. A PEER of the text formats rather than '\n + 'a replacement: an audit event maps onto an OCSF CLASS natively (Authentication, User Management, API Activity, Entity Management) instead of being '\n + 'force-fit into a custom slot. The class is selected from the event category, and `type_uid` is derived, never authored.',\n },\n },\n }),\n eventFilter: schemaShape.eventFilter.objectSpec({\n meaning: 'Filter block: selected high-level event categories, minimum SIEM severity, and an optional exact allowlist of event-type identifiers. `specificEventTypes` uses exact string equality, not substring or wildcard matching.',\n }),\n delivery: schemaShape.delivery.objectSpec({\n meaning: 'Retry and timeout policy for each outbound event. `retryAttempts`, `retryBackoffSeconds` and `timeoutSeconds` are enforced. `batchSize` and `batchWindowSeconds` are accepted and stored but the current worker still posts one event per request; do not size a receiver on the assumption that batching occurs.',\n }),\n customHeaders: schemaShape.customHeaders.codeSpec({\n meaning: 'Additional static HTTP headers included with every delivery. The selected authentication method is applied afterward and overrides a custom header with the same name.',\n }),\n includeRawEventData: schemaShape.includeRawEventData.booleanSpec({\n meaning: 'Reserved configuration flag. It is currently accepted and stored but is not read by the event-envelope or delivery path; changing it does not remove `eventData` from emitted events.',\n }),\n includeDeviceContext: schemaShape.includeDeviceContext.booleanSpec({\n meaning: 'Reserved configuration flag. It is currently accepted and stored but is not read by the event-envelope or delivery path; changing it does not remove available IP address or user-agent context.',\n }),\n },\n operations: {\n [Op.READ]: {\n purpose: reference.isApplication\n ? 'Inspect the application-scoped SIEM export configuration and its current activation state.'\n : 'Inspect the organization SIEM export destination, authentication, filtering and delivery policy.',\n outcome: reference.isApplication\n ? 'Application administrators can see the reserved configuration record. This framework version does not produce application-scoped SIEM events, so enabling this record does not start delivery.'\n : 'Organization administrators can verify the active destination and policy without receiving the stored credential value.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: reference.isApplication\n ? 'The reserved application-scoped configuration was returned. No application-scoped event producer is available in this framework version.'\n : 'The organization SIEM export configuration was returned, with any stored credential represented only by the redacted placeholder.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the security-admin role required to read the SIEM export configuration.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No SIEM export configuration has been provisioned for this scope yet.' },\n ],\n idempotent: true,\n examples: [{\n title: reference.isApplication\n ? 'Inspect the inactive application SIEM configuration'\n : 'Inspect the organization SIEM export configuration',\n request: reference.scopeIdentity,\n response: reference.record,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: reference.isApplication\n ? 'Inspect the application configuration with scope context'\n : 'Inspect the organization configuration with scope context',\n request: reference.scopeIdentity,\n response: reference.contextRecord,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: reference.isApplication\n ? 'Inspect the application SIEM activation summary'\n : 'Inspect the organization SIEM activation summary',\n request: reference.scopeIdentity,\n response: reference.summaryRecord,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.CREATE]: {\n purpose: 'Create the per-scope SIEM config row; internal-only (INTERNAL_CALL) variant in the factory — no public HTTP create route. Materialised by the framework default-seed (repository tier) or, when that was bypassed, a system-context lazy-create.',\n outcome: 'The scope gains a new SIEM export document.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A SIEM export configuration row was created for the scope and returned with its server-assigned id.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The configuration fails schema validation (e.g. a non-HTTPS `webhookUrl`, an unknown `eventFormat`, or an `authMethod` missing its required credential).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a security-admin/platform operator; this is an internal-only (INTERNAL_CALL) bootstrap path, not a self-serve create.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A SIEM export configuration already exists for this scope — the resource is one-per-scope, so a second create collides.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Provision a SIEM export configuration for a scope',\n request: {\n enabled: true,\n webhookUrl: 'https://siem.example.com/ingest',\n authMethod: SIEMAuthMethod.BEARER_TOKEN,\n eventFormat: SIEMEventFormat.JSON_STRUCTURED,\n },\n response: {\n _id: 'siemcfg_01HX2…',\n enabled: true,\n webhookUrl: 'https://siem.example.com/ingest',\n authMethod: SIEMAuthMethod.BEARER_TOKEN,\n eventFormat: SIEMEventFormat.JSON_STRUCTURED,\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.UPDATE]: {\n purpose: 'Update webhook, format, event filter, or delivery block after validation (INTERNAL_CALL update — no public HTTP route; reached through `AuthOrganizationConfigurationService.saveSiemExportConfig` on the admin’s execution context, preserving admin audit attribution).',\n outcome: 'Downstream services pick up changes for subsequent deliveries.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The SIEM export configuration was updated and the new settings (secrets redacted) are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited destination, format, filter, or delivery block fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the security-admin role required to change SIEM export settings.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No SIEM export configuration exists for this scope to update.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the SIEM export config row when its owning org/app is deleted (composition `onParentDelete` cascade).',\n outcome: 'The one-per-scope config row is removed together with its parent — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The SIEM export config row was deleted as part of the deletion cascade of its owning scope.' },\n ],\n // REPOSITORY_ONLY variant (org/app admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n },\n businessConstraints: [\n 'Credentials are write-only: `authCredential` and any HMAC secret are supplied when the configuration is saved and are never returned by a read, which answers `••••••••` instead. There is no list or search over these rows, so a credential cannot be recovered from the configuration once it is stored.',\n 'Event payload shapes are a separate concern from this row: `eventFilter` and `eventFormat` do not re-specify the full audit log schema, only the export fan-out contract.',\n ...(reference.isApplication\n ? ['Application-scoped SIEM export is reserved in this framework version: no application event producer feeds this configuration or its delivery queue. Consumers must not treat `enabled: true` as evidence that application-scoped events are being exported.']\n : []),\n ],\n }),\n { resourcePrimaryScope: siemExportResourcePrimaryScope[resourceType] },\n );\n}\n\nfunction buildSiemExportSpec(\n resourceType: SiemResourceType,\n memberName: SiemResourceTypeMemberName,\n): ResourceSpecificationConfig<SiemCustom, SiemCore, SiemSchema> {\n const base = buildSiemExportBase(resourceType, memberName);\n const main = resolveSiemExportUI(securityMainPresets as Partial<Record<string, unknown>>, resourceType, 'securityMainPresets');\n const admin = resolveSiemExportUI(securityAdminPresets as Partial<Record<string, unknown>>, resourceType, 'securityAdminPresets');\n return resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(resourceFrontendConfiguration(main), resourceFrontendConfiguration(admin)),\n base,\n () => ({\n layout: {\n purpose: 'Field-edit layout in `security` uses section refs `status`, `destination`, `authentication`, `format`, and `advanced` (collapsible) with a settings-row edit chrome for most controls.',\n displayPurpose: 'Read template mirrors the same section ordering for a consistent admin walkthrough of SIEM settings.',\n sections: {\n status: {\n purpose: 'On/off and health posture for the SIEM integration.',\n whenToUse: 'First decision point: enable or pause exports without losing configuration.',\n textSlots: {\n title: { purpose: 'Name the “SIEM is active / paused” card.' },\n description: { purpose: 'Clarify that disabled mode stops new deliveries; existing DLQ may still be visible elsewhere.' },\n },\n },\n destination: {\n purpose: 'The HTTPS endpoint receiving exported events.',\n whenToUse: 'Initial setup and any rotation of the customer-side ingress URL.',\n textSlots: {\n title: { purpose: 'Label the webhook / destination block.' },\n description: { purpose: 'Mention that TLS and DNS must be valid from Wildo’s egress perspective.' },\n },\n },\n authentication: {\n purpose: 'Auth method, credential (stored server-side), and header naming for key-based methods.',\n whenToUse: 'When `authMethod` is not `NONE` or when the customer hardens their webhook.',\n textSlots: {\n title: { purpose: 'Label the authentication and secrets block.' },\n description: { purpose: 'Never echo raw secrets; reference rotation procedures instead.' },\n },\n },\n format: {\n purpose: 'Wire format and the event filter: categories, minimum severity, and allow-listed event type strings when used.',\n whenToUse: 'Tightening what is exported to match SIEM capacity and policy.',\n textSlots: {\n title: { purpose: 'Label the format and filter area.' },\n description: { purpose: 'Tie the filter to `eventType` strings produced by the audit pipeline, not arbitrary JSON paths.' },\n },\n },\n advanced: {\n purpose: 'Delivery tuning (batch size/window, retries, timeouts) and transport extras such as `customHeaders` and optional raw/device context flags.',\n whenToUse: 'After basic connectivity is proven and operators tune throughput and observability cost.',\n textSlots: {\n title: { purpose: 'Label the advanced and tuning section.' },\n description: { purpose: 'Clarify that bad tuning can delay or drop events; document incident procedures separately.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Read-oriented settings and status host in merged presets (addressable in main org/app SIEM UIs; admin merge may differ).', whenToUse: 'Navigating the SIEM configuration screen in security settings.' },\n },\n }),\n );\n}\n\nexport const organizationSiemExportConfigResourceSpecification = buildSiemExportSpec(\n CoreResourceType.ORGANIZATION_SIEM_EXPORT_CONFIG,\n 'ORGANIZATION_SIEM_EXPORT_CONFIG',\n);\nexport const applicationSiemExportConfigResourceSpecification = buildSiemExportSpec(\n CoreResourceType.APPLICATION_SIEM_EXPORT_CONFIG,\n 'APPLICATION_SIEM_EXPORT_CONFIG',\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso-config.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/sso-config.resource.specification.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAO5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAML,KAAK,2BAA2B,EACjC,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"sso-config.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/sso-config.resource.specification.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAO5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAML,KAAK,2BAA2B,EACjC,MAAM,6BAA6B,CAAC;AAoQrC,eAAO,MAAM,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAA6E,CAAC;AACrI,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAA2E,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
|
|
|
3
3
|
import { CodeDeclarationKind, CodeSymbolKind } from '@wildo-ai/zod-decorators';
|
|
4
4
|
import { CoreResourceOperation as Op, CoreResourceType, DomainVerificationStatus, ResourcePrimaryScope, SSOAuditLevel, SsoConfigBaseSchema, ssoConfigPolymorphicFactories, } from '@wildo-ai/saas-models';
|
|
5
5
|
import { HttpResponseStatusCode, mergeResourceFrontendConfigurations, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
|
|
6
|
+
import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
|
|
6
7
|
function r(source, rt, name) {
|
|
7
8
|
const u = source[rt];
|
|
8
9
|
if (!u)
|
|
@@ -100,6 +101,7 @@ function buildBase(rt, member) {
|
|
|
100
101
|
businessRole: 'The customer-facing “how SSO works here” config separate from one provider’s OIDC/SAML row.',
|
|
101
102
|
lifecycleRole: 'Tightened or relaxed through framework-owned administrative policy services. Domain mutation is not publicly exposed until a real ownership-verification workflow is integrated.',
|
|
102
103
|
audience: LabelAudience.DEVELOPER,
|
|
104
|
+
subDomain: EngineResourceSubDomain.AUTH,
|
|
103
105
|
codeHandling: {
|
|
104
106
|
mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'SsoConfigBaseSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },
|
|
105
107
|
resourceFactoryCollectionEntry: { collectionSymbol: { packageName: '@wildo-ai/saas-models', exportName: 'ssoConfigPolymorphicFactories', symbolKind: CodeSymbolKind.FACTORY }, identifierField: 'collectionKey', identifierValue: rt },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso-config.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/sso-config.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACnB,6BAA6B,GAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAE/C,MAAM,6BAA6B,CAAC;AAUrC,SAAS,CAAC,CAAC,MAAwC,EAAE,EAAS,EAAE,IAAY;IAC1E,MAAM,CAAC,GAAG,MAAM,CAAC,EAAE,CAAkB,CAAC;IACtC,IAAI,CAAC,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,YAAY,EAAE,QAAQ,IAAI,GAAG,CAAC,CAAC;IACvD,OAAO,CAAC,CAAC;AACX,CAAC;AACD,MAAM,KAAK,GAAwC;IACjD,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,EAAE,oBAAoB,CAAC,aAAa;IAC9E,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,EAAE,oBAAoB,CAAC,WAAW;CAC5E,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z;SACF;QACD,KAAK,EAAE;YACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,2JAA2J,EAAE,SAAS,EAAE,4CAA4C,EAAE;SAC7O;KACF,CAAC,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,0CAA0C,GAAG,KAAK,CAAC,gBAAgB,CAAC,uBAAuB,EAAE,yBAAyB,CAAC,CAAC;AACrI,MAAM,CAAC,MAAM,yCAAyC,GAAG,KAAK,CAAC,gBAAgB,CAAC,sBAAsB,EAAE,wBAAwB,CAAC,CAAC","sourcesContent":["import { securityAdminPresets, securityMainPresets } from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport { CodeDeclarationKind, CodeSymbolKind } from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n CoreResourceType,\n DomainVerificationStatus,\n ResourcePrimaryScope,\n SSOAuditLevel,\n SsoConfigBaseSchema,\n ssoConfigPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n type ResourceSpecificationConfig,\n} from '~wildo-specifications/_core';\n\ntype RType = CoreResourceType.ORGANIZATION_SSO_CONFIG | CoreResourceType.APPLICATION_SSO_CONFIG;\ntype RMember = 'ORGANIZATION_SSO_CONFIG' | 'APPLICATION_SSO_CONFIG';\ntype Cfg = ReturnType<(typeof ssoConfigPolymorphicFactories)[CoreResourceType.ORGANIZATION_SSO_CONFIG]>;\ntype Custom = undefined;\ntype Core = Cfg['coreOperations'][number];\ntype Main = typeof SsoConfigBaseSchema;\ntype F = ResourceUIBehaviorConfig<Custom, Core, Main>;\n\nfunction r(source: Partial<Record<string, unknown>>, rt: RType, name: string): F {\n const u = source[rt] as F | undefined;\n if (!u) throw new Error(`Missing \"${rt}\" in ${name}.`);\n return u;\n}\nconst scope: Record<RType, ResourcePrimaryScope> = {\n [CoreResourceType.ORGANIZATION_SSO_CONFIG]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_SSO_CONFIG]: ResourcePrimaryScope.APPLICATION,\n};\n\nconst SSO_CONFIG_DOMAIN_EXAMPLE = 'identity.example.com';\n\n/**\n * Builds the three READ representation examples from one policy snapshot so\n * the source specification, generated OpenAPI, and native renderer cannot\n * teach contradictory SSO postures. Scope-specific ownership is injected here\n * rather than duplicated in the organization and application specifications.\n * Secrets and backend-only domain-verification tokens are deliberately absent.\n */\nfunction createSsoConfigExamples(rt: RType) {\n const scopeId = rt === CoreResourceType.ORGANIZATION_SSO_CONFIG ? 'org_01JSSOEXAMPLE' : 'app_01JSSOEXAMPLE';\n const scopeIdentifier = rt === CoreResourceType.ORGANIZATION_SSO_CONFIG\n ? { organizationId: scopeId }\n : { applicationId: scopeId };\n const scopeContext = rt === CoreResourceType.ORGANIZATION_SSO_CONFIG\n ? { organization: { _id: scopeId } }\n : { application: { _id: scopeId } };\n const response = {\n _id: 'ssocfg_01JSSOEXAMPLE',\n enforcement: {\n requireSSO: true,\n allowPasswordFallback: false,\n enforceForAdmins: true,\n graceLoginAttempts: 1,\n },\n domains: {\n verifiedDomains: [SSO_CONFIG_DOMAIN_EXAMPLE],\n ssoEnabledDomains: [SSO_CONFIG_DOMAIN_EXAMPLE],\n domainHinting: true,\n allowExternalDomains: false,\n domainVerificationStatus: {\n [SSO_CONFIG_DOMAIN_EXAMPLE]: DomainVerificationStatus.VERIFIED,\n },\n },\n provisioning: {\n autoCreateUsers: true,\n autoUpdateUsers: true,\n autoDeactivateUsers: false,\n defaultRole: 'organization-member',\n requiredAttributes: ['email'],\n syncFrequencyHours: 24,\n },\n sessionSettings: {\n ssoSessionDurationMinutes: 480,\n requireReauthForSensitive: true,\n singleLogoutEnabled: true,\n maxConcurrentSessions: 5,\n },\n auditConfig: {\n logAllSSOEvents: true,\n logProviderSwitching: true,\n logRoleMapping: true,\n complianceReporting: true,\n retentionDays: 365,\n },\n emergencyAccess: {\n enabled: true,\n breakGlassAccounts: [],\n requireApproval: true,\n maxDurationHours: 4,\n auditLevel: SSOAuditLevel.VERBOSE,\n },\n oauth2ProviderRestrictions: {\n allowedProviders: [],\n blockedProviders: [],\n requireEnterpriseSSOOnly: true,\n },\n socialCredentialOverrides: [],\n createdAt: '2026-08-20T08:00:00.000Z',\n updatedAt: '2026-08-20T08:15:00.000Z',\n ...scopeIdentifier,\n };\n\n return {\n response,\n contextResponse: { ...response, ...scopeContext },\n summaryResponse: {\n _id: response._id,\n enforcement: response.enforcement,\n },\n };\n}\n\nfunction buildBase(rt: RType, member: RMember): ResourceSpecificationConfig<Custom, Core, Main> {\n const examples = createSsoConfigExamples(rt);\n\n return resourceSpecification<Custom, Core, Main>(\n ssoConfigPolymorphicFactories[rt],\n SsoConfigBaseSchema,\n ({ schemaShape }) => ({\n purpose: 'SSO **policy and settings** for a scope: enforcement, email-domain routing, session and audit knobs, and emergency break-glass. Concrete IdP **connections** are `SsoConnection` resources.',\n businessRole: 'The customer-facing “how SSO works here” config separate from one provider’s OIDC/SAML row.',\n lifecycleRole: 'Tightened or relaxed through framework-owned administrative policy services. Domain mutation is not publicly exposed until a real ownership-verification workflow is integrated.',\n audience: LabelAudience.DEVELOPER,\n codeHandling: {\n mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'SsoConfigBaseSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },\n resourceFactoryCollectionEntry: { collectionSymbol: { packageName: '@wildo-ai/saas-models', exportName: 'ssoConfigPolymorphicFactories', symbolKind: CodeSymbolKind.FACTORY }, identifierField: 'collectionKey', identifierValue: rt },\n resourceType: { enumDeclaration: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceType', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM }, memberName: member },\n operationVocabulary: {\n coreEnum: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceOperation', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM },\n },\n frontendConfigurationSourceEntries: [\n { collectionSymbol: { packageName: '@wildo-ai/presets-components', exportName: 'securityMainPresets', symbolKind: CodeSymbolKind.UI_BEHAVIOR }, identifierField: 'collectionKey', identifierValue: rt },\n { collectionSymbol: { packageName: '@wildo-ai/presets-components', exportName: 'securityAdminPresets', symbolKind: CodeSymbolKind.UI_BEHAVIOR }, identifierField: 'collectionKey', identifierValue: rt },\n ],\n },\n fields: {\n enforcement: schemaShape.enforcement.objectSpec({ meaning: 'Require-SSO, password fallback, admin-only enforcement, and grace attempts — the “hard vs soft” SSO posture for the scope.' }),\n domains: schemaShape.domains.objectSpec({ meaning: 'Email-domain allow and verification state maps, plus whether external domains and hinting are allowed — drives login routing UX.' }),\n sessionSettings: schemaShape.sessionSettings.objectSpec({ meaning: 'SSO session duration, reauth for sensitive, SLO, and concurrent session caps for enterprise expectations.' }),\n socialCredentialOverrides: schemaShape.socialCredentialOverrides.arraySpec({\n meaning: 'Per-scope social-provider OAuth2 credential overrides: when set, this org/app uses its own registered OAuth2 app (client id/secret, plus signed-JWT team/key ids for Apple-style secrets) instead of the platform-level social credentials from AppConfiguration.',\n elementMeaning: 'One provider override — the target `providerRef` plus its scope-owned client credentials. `clientSecret` is a write-only secret (operator-writable, returned to the client masked as `••••••••`); `signedJwtKeyId`/`signedJwtTeamId` are backend-only (never returned). All three are re-injected from the existing record on save when the client sends the mask or omits them.',\n }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Read the current SSO policy for org/app admins.',\n outcome: 'Security settings and enforcement preview UIs can hydrate from this op.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The SSO policy document for the scope was found and its enforcement, domains, and session blocks are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org/app admin role required to read the SSO policy.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No SSO policy has been provisioned for this scope yet.' },\n ],\n examples: [{\n title: 'Read the complete SSO policy',\n response: examples.response,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Read the SSO policy with its owning scope context',\n response: examples.contextResponse,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Read the SSO enforcement summary',\n response: examples.summaryResponse,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'Bootstrap a policy row (INTERNAL_CALL create in the factory — no public HTTP route; seed / system-context lazy-create only; HIGH risk).',\n outcome: 'First-time SSO policy for a scope in migration or greenfield flows.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'An SSO policy document was provisioned for the scope and returned with its server-assigned id.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The enforcement/domains/session blocks fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform/migration operator; this is a HIGH-risk internal-only (INTERNAL_CALL) bootstrap, not a self-serve create.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'An SSO policy already exists for this scope — the resource is one-per-scope, so a second create collides.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Provision an SSO policy for a scope',\n request: {\n enforcement: { requireSSO: false, allowPasswordFallback: true },\n domains: { allowExternalDomains: false },\n },\n response: {\n _id: 'ssocfg_01HX2…',\n enforcement: { requireSSO: false, allowPasswordFallback: true },\n domains: { allowExternalDomains: false },\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.UPDATE]: {\n purpose: 'Patch nested blocks through the internal administrative policy service (INTERNAL_CALL update — no public HTTP route; reached through `AuthOrganizationConfigurationService.saveSSOConfig` on the admin’s execution context, preserving admin audit attribution; HIGH risk).',\n outcome: 'Updated sign-in and routing behavior for subsequent sessions, subject to cache/propagation.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The SSO policy was updated and the new enforcement/routing posture for the scope is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The patched enforcement, domains, or session block fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the HIGH-risk admin role required to rewrite the SSO policy.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No SSO policy exists for this scope to update.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the SSO policy row when its owning org/app is deleted (composition `onParentDelete` cascade).',\n outcome: 'The one-per-scope SSO policy row is removed together with its parent — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The SSO policy row was deleted as part of the deletion cascade of its owning scope.' },\n ],\n // REPOSITORY_ONLY variant (org/app admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n },\n businessConstraints: [\n 'This resource is the policy document for SSO behavior in-product; individual IdP connection rows (`SsoConnection`) remain the correct place to describe per-provider setup and `TEST_CONNECTION` flows.',\n 'SCIM user provisioning (token resources and `ScimProvisioningConfig`) is a separate channel from `SsoConfig.provisioning` JIT in schema notes — avoid conflating them in end-user help.',\n 'Domain add, ownership verification, and removal are not public operations until the runtime is integrated with domain-verification services. Placeholder acknowledgements must not be exposed as successful API behavior.',\n ],\n }),\n { resourcePrimaryScope: scope[rt] },\n );\n}\n\nfunction build(rt: RType, member: RMember): ResourceSpecificationConfig<Custom, Core, Main> {\n return resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(r(securityMainPresets as Partial<Record<string, unknown>>, rt, 'securityMainPresets')),\n resourceFrontendConfiguration(r(securityAdminPresets as Partial<Record<string, unknown>>, rt, 'securityAdminPresets')),\n ),\n buildBase(rt, member),\n () => ({\n layout: {\n purpose: 'Seven section refs in `security` : `enforcement`, `domains`, `provisioning` (IdP push/JIT, distinct from SCIM), `session`, `audit`, `emergency`, `oauth` (provider restrictions and OAuth2 scopes).',\n displayPurpose: 'Long-form display layout mirrors edit sections for a guided admin walkthrough of SSO security posture.',\n sections: {\n enforcement: { purpose: 'When SSO is mandatory vs optional, and grace for password fallback.', whenToUse: 'First-time SSO hardening in tenant security.', textSlots: { title: { purpose: 'Enforcement heading.' }, description: { purpose: 'Tie to auth flows and any grace counters from factory-enabled checks.' } } },\n domains: { purpose: 'Email-domain routing, verification, and allow lists.', whenToUse: 'Onboarding a new corporate email domain to SSO without opening all addresses globally.', textSlots: { title: { purpose: 'Domains block.' }, description: { purpose: 'DNS verification state is backend-owned; UI may show per-domain badges.' } } },\n provisioning: { purpose: 'IdP-provisioned user lifecycle in the **SSO/SCIM** sense as modeled in the schema (not the SCIM token resource).', whenToUse: 'When enterprises expect IdP to drive user create/update in Wildo for SSO, subject to product wiring.', textSlots: { title: { purpose: 'Provisioning (SSO) heading.' }, description: { purpose: 'Clarify difference vs SCIM push channel configured elsewhere.' } } },\n session: { purpose: 'SSO session duration, reauth, SLO, concurrent sessions — enterprise session hygiene.', whenToUse: 'Security and compliance review of idle vs absolute timeouts.', textSlots: { title: { purpose: 'Session settings.' }, description: { purpose: 'Note impact on `maxConcurrentSessions` and user-visible sign-out.' } } },\n audit: { purpose: 'What SSO path actions are auditable, retention, and compliance reporting flags.', whenToUse: 'Customers needing provable sign-in and IdP event trails.', textSlots: { title: { purpose: 'SSO audit block.' }, description: { purpose: 'Tie to `AuditEvent` classifiers, not the raw SIEM stream.' } } },\n emergency: { purpose: 'Break-glass, approvals, and duration of elevated access in SSO outage scenarios when enabled.', whenToUse: 'Disaster recovery and controlled password fallback in emergencies.', textSlots: { title: { purpose: 'Emergency access.' }, description: { purpose: 'Human approval and short TTL are typical — align with `SSOAuditLevel` in the schema.' } } },\n oauth: { purpose: 'OAuth2 provider allow/deny, scopes, and tenant restrictions to reduce token theft blast radius in OIDC-based SSO when configured.', whenToUse: 'Locking IdP tenants and scopes in highly regulated orgs.', textSlots: { title: { purpose: 'OAuth restrictions.' }, description: { purpose: 'Complement, not replace, the per-connection OIDC field-level settings in `SsoConnection` resources.' } } },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Addressable read for org in merged main/admin where presets surface SSO policy; app-scoped may suppress views in `variantOverrides`—factory READ remains.', whenToUse: 'Security “SSO” settings in admin consoles.' },\n },\n }),\n );\n}\n\nexport const organizationSsoConfigResourceSpecification = build(CoreResourceType.ORGANIZATION_SSO_CONFIG, 'ORGANIZATION_SSO_CONFIG');\nexport const applicationSsoConfigResourceSpecification = build(CoreResourceType.APPLICATION_SSO_CONFIG, 'APPLICATION_SSO_CONFIG');\n"]}
|
|
1
|
+
{"version":3,"file":"sso-config.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/sso-config.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACnB,6BAA6B,GAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAE/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAU3E,SAAS,C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A2D,EAAE,EAAE,EAAE;gBAC1T,SAAS,EAAE,EAAE,OAAO,EAAE,+FAA+F,EAAE,SAAS,EAAE,oEAAoE,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,sFAAsF,EAAE,EAAE,EAAE;gBAClX,KAAK,EAAE,EAAE,OAAO,EAAE,mIAAmI,EAAE,SAAS,EAAE,0DAA0D,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,qGAAqG,EAAE,EAAE,EAAE;aAC1Z;SACF;QACD,KAAK,EAAE;YACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,2JAA2J,EAAE,SAAS,EAAE,4CAA4C,EAAE;SAC7O;KACF,CAAC,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,0CAA0C,GAAG,KAAK,CAAC,gBAAgB,CAAC,uBAAuB,EAAE,yBAAyB,CAAC,CAAC;AACrI,MAAM,CAAC,MAAM,yCAAyC,GAAG,KAAK,CAAC,gBAAgB,CAAC,sBAAsB,EAAE,wBAAwB,CAAC,CAAC","sourcesContent":["import { securityAdminPresets, securityMainPresets } from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport { CodeDeclarationKind, CodeSymbolKind } from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n CoreResourceType,\n DomainVerificationStatus,\n ResourcePrimaryScope,\n SSOAuditLevel,\n SsoConfigBaseSchema,\n ssoConfigPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n type ResourceSpecificationConfig,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype RType = CoreResourceType.ORGANIZATION_SSO_CONFIG | CoreResourceType.APPLICATION_SSO_CONFIG;\ntype RMember = 'ORGANIZATION_SSO_CONFIG' | 'APPLICATION_SSO_CONFIG';\ntype Cfg = ReturnType<(typeof ssoConfigPolymorphicFactories)[CoreResourceType.ORGANIZATION_SSO_CONFIG]>;\ntype Custom = undefined;\ntype Core = Cfg['coreOperations'][number];\ntype Main = typeof SsoConfigBaseSchema;\ntype F = ResourceUIBehaviorConfig<Custom, Core, Main>;\n\nfunction r(source: Partial<Record<string, unknown>>, rt: RType, name: string): F {\n const u = source[rt] as F | undefined;\n if (!u) throw new Error(`Missing \"${rt}\" in ${name}.`);\n return u;\n}\nconst scope: Record<RType, ResourcePrimaryScope> = {\n [CoreResourceType.ORGANIZATION_SSO_CONFIG]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_SSO_CONFIG]: ResourcePrimaryScope.APPLICATION,\n};\n\nconst SSO_CONFIG_DOMAIN_EXAMPLE = 'identity.example.com';\n\n/**\n * Builds the three READ representation examples from one policy snapshot so\n * the source specification, generated OpenAPI, and native renderer cannot\n * teach contradictory SSO postures. Scope-specific ownership is injected here\n * rather than duplicated in the organization and application specifications.\n * Secrets and backend-only domain-verification tokens are deliberately absent.\n */\nfunction createSsoConfigExamples(rt: RType) {\n const scopeId = rt === CoreResourceType.ORGANIZATION_SSO_CONFIG ? 'org_01JSSOEXAMPLE' : 'app_01JSSOEXAMPLE';\n const scopeIdentifier = rt === CoreResourceType.ORGANIZATION_SSO_CONFIG\n ? { organizationId: scopeId }\n : { applicationId: scopeId };\n const scopeContext = rt === CoreResourceType.ORGANIZATION_SSO_CONFIG\n ? { organization: { _id: scopeId } }\n : { application: { _id: scopeId } };\n const response = {\n _id: 'ssocfg_01JSSOEXAMPLE',\n enforcement: {\n requireSSO: true,\n allowPasswordFallback: false,\n enforceForAdmins: true,\n graceLoginAttempts: 1,\n },\n domains: {\n verifiedDomains: [SSO_CONFIG_DOMAIN_EXAMPLE],\n ssoEnabledDomains: [SSO_CONFIG_DOMAIN_EXAMPLE],\n domainHinting: true,\n allowExternalDomains: false,\n domainVerificationStatus: {\n [SSO_CONFIG_DOMAIN_EXAMPLE]: DomainVerificationStatus.VERIFIED,\n },\n },\n provisioning: {\n autoCreateUsers: true,\n autoUpdateUsers: true,\n autoDeactivateUsers: false,\n defaultRole: 'organization-member',\n requiredAttributes: ['email'],\n syncFrequencyHours: 24,\n },\n sessionSettings: {\n ssoSessionDurationMinutes: 480,\n requireReauthForSensitive: true,\n singleLogoutEnabled: true,\n maxConcurrentSessions: 5,\n },\n auditConfig: {\n logAllSSOEvents: true,\n logProviderSwitching: true,\n logRoleMapping: true,\n complianceReporting: true,\n retentionDays: 365,\n },\n emergencyAccess: {\n enabled: true,\n breakGlassAccounts: [],\n requireApproval: true,\n maxDurationHours: 4,\n auditLevel: SSOAuditLevel.VERBOSE,\n },\n oauth2ProviderRestrictions: {\n allowedProviders: [],\n blockedProviders: [],\n requireEnterpriseSSOOnly: true,\n },\n socialCredentialOverrides: [],\n createdAt: '2026-08-20T08:00:00.000Z',\n updatedAt: '2026-08-20T08:15:00.000Z',\n ...scopeIdentifier,\n };\n\n return {\n response,\n contextResponse: { ...response, ...scopeContext },\n summaryResponse: {\n _id: response._id,\n enforcement: response.enforcement,\n },\n };\n}\n\nfunction buildBase(rt: RType, member: RMember): ResourceSpecificationConfig<Custom, Core, Main> {\n const examples = createSsoConfigExamples(rt);\n\n return resourceSpecification<Custom, Core, Main>(\n ssoConfigPolymorphicFactories[rt],\n SsoConfigBaseSchema,\n ({ schemaShape }) => ({\n purpose: 'SSO **policy and settings** for a scope: enforcement, email-domain routing, session and audit knobs, and emergency break-glass. Concrete IdP **connections** are `SsoConnection` resources.',\n businessRole: 'The customer-facing “how SSO works here” config separate from one provider’s OIDC/SAML row.',\n lifecycleRole: 'Tightened or relaxed through framework-owned administrative policy services. Domain mutation is not publicly exposed until a real ownership-verification workflow is integrated.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.AUTH,\n codeHandling: {\n mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'SsoConfigBaseSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },\n resourceFactoryCollectionEntry: { collectionSymbol: { packageName: '@wildo-ai/saas-models', exportName: 'ssoConfigPolymorphicFactories', symbolKind: CodeSymbolKind.FACTORY }, identifierField: 'collectionKey', identifierValue: rt },\n resourceType: { enumDeclaration: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceType', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM }, memberName: member },\n operationVocabulary: {\n coreEnum: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceOperation', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM },\n },\n frontendConfigurationSourceEntries: [\n { collectionSymbol: { packageName: '@wildo-ai/presets-components', exportName: 'securityMainPresets', symbolKind: CodeSymbolKind.UI_BEHAVIOR }, identifierField: 'collectionKey', identifierValue: rt },\n { collectionSymbol: { packageName: '@wildo-ai/presets-components', exportName: 'securityAdminPresets', symbolKind: CodeSymbolKind.UI_BEHAVIOR }, identifierField: 'collectionKey', identifierValue: rt },\n ],\n },\n fields: {\n enforcement: schemaShape.enforcement.objectSpec({ meaning: 'Require-SSO, password fallback, admin-only enforcement, and grace attempts — the “hard vs soft” SSO posture for the scope.' }),\n domains: schemaShape.domains.objectSpec({ meaning: 'Email-domain allow and verification state maps, plus whether external domains and hinting are allowed — drives login routing UX.' }),\n sessionSettings: schemaShape.sessionSettings.objectSpec({ meaning: 'SSO session duration, reauth for sensitive, SLO, and concurrent session caps for enterprise expectations.' }),\n socialCredentialOverrides: schemaShape.socialCredentialOverrides.arraySpec({\n meaning: 'Per-scope social-provider OAuth2 credential overrides: when set, this org/app uses its own registered OAuth2 app (client id/secret, plus signed-JWT team/key ids for Apple-style secrets) instead of the platform-level social credentials from AppConfiguration.',\n elementMeaning: 'One provider override — the target `providerRef` plus its scope-owned client credentials. `clientSecret` is a write-only secret (operator-writable, returned to the client masked as `••••••••`); `signedJwtKeyId`/`signedJwtTeamId` are backend-only (never returned). All three are re-injected from the existing record on save when the client sends the mask or omits them.',\n }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Read the current SSO policy for org/app admins.',\n outcome: 'Security settings and enforcement preview UIs can hydrate from this op.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The SSO policy document for the scope was found and its enforcement, domains, and session blocks are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org/app admin role required to read the SSO policy.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No SSO policy has been provisioned for this scope yet.' },\n ],\n examples: [{\n title: 'Read the complete SSO policy',\n response: examples.response,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Read the SSO policy with its owning scope context',\n response: examples.contextResponse,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Read the SSO enforcement summary',\n response: examples.summaryResponse,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'Bootstrap a policy row (INTERNAL_CALL create in the factory — no public HTTP route; seed / system-context lazy-create only; HIGH risk).',\n outcome: 'First-time SSO policy for a scope in migration or greenfield flows.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'An SSO policy document was provisioned for the scope and returned with its server-assigned id.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The enforcement/domains/session blocks fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform/migration operator; this is a HIGH-risk internal-only (INTERNAL_CALL) bootstrap, not a self-serve create.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'An SSO policy already exists for this scope — the resource is one-per-scope, so a second create collides.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Provision an SSO policy for a scope',\n request: {\n enforcement: { requireSSO: false, allowPasswordFallback: true },\n domains: { allowExternalDomains: false },\n },\n response: {\n _id: 'ssocfg_01HX2…',\n enforcement: { requireSSO: false, allowPasswordFallback: true },\n domains: { allowExternalDomains: false },\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.UPDATE]: {\n purpose: 'Patch nested blocks through the internal administrative policy service (INTERNAL_CALL update — no public HTTP route; reached through `AuthOrganizationConfigurationService.saveSSOConfig` on the admin’s execution context, preserving admin audit attribution; HIGH risk).',\n outcome: 'Updated sign-in and routing behavior for subsequent sessions, subject to cache/propagation.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The SSO policy was updated and the new enforcement/routing posture for the scope is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The patched enforcement, domains, or session block fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the HIGH-risk admin role required to rewrite the SSO policy.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No SSO policy exists for this scope to update.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the SSO policy row when its owning org/app is deleted (composition `onParentDelete` cascade).',\n outcome: 'The one-per-scope SSO policy row is removed together with its parent — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The SSO policy row was deleted as part of the deletion cascade of its owning scope.' },\n ],\n // REPOSITORY_ONLY variant (org/app admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n },\n businessConstraints: [\n 'This resource is the policy document for SSO behavior in-product; individual IdP connection rows (`SsoConnection`) remain the correct place to describe per-provider setup and `TEST_CONNECTION` flows.',\n 'SCIM user provisioning (token resources and `ScimProvisioningConfig`) is a separate channel from `SsoConfig.provisioning` JIT in schema notes — avoid conflating them in end-user help.',\n 'Domain add, ownership verification, and removal are not public operations until the runtime is integrated with domain-verification services. Placeholder acknowledgements must not be exposed as successful API behavior.',\n ],\n }),\n { resourcePrimaryScope: scope[rt] },\n );\n}\n\nfunction build(rt: RType, member: RMember): ResourceSpecificationConfig<Custom, Core, Main> {\n return resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(r(securityMainPresets as Partial<Record<string, unknown>>, rt, 'securityMainPresets')),\n resourceFrontendConfiguration(r(securityAdminPresets as Partial<Record<string, unknown>>, rt, 'securityAdminPresets')),\n ),\n buildBase(rt, member),\n () => ({\n layout: {\n purpose: 'Seven section refs in `security` : `enforcement`, `domains`, `provisioning` (IdP push/JIT, distinct from SCIM), `session`, `audit`, `emergency`, `oauth` (provider restrictions and OAuth2 scopes).',\n displayPurpose: 'Long-form display layout mirrors edit sections for a guided admin walkthrough of SSO security posture.',\n sections: {\n enforcement: { purpose: 'When SSO is mandatory vs optional, and grace for password fallback.', whenToUse: 'First-time SSO hardening in tenant security.', textSlots: { title: { purpose: 'Enforcement heading.' }, description: { purpose: 'Tie to auth flows and any grace counters from factory-enabled checks.' } } },\n domains: { purpose: 'Email-domain routing, verification, and allow lists.', whenToUse: 'Onboarding a new corporate email domain to SSO without opening all addresses globally.', textSlots: { title: { purpose: 'Domains block.' }, description: { purpose: 'DNS verification state is backend-owned; UI may show per-domain badges.' } } },\n provisioning: { purpose: 'IdP-provisioned user lifecycle in the **SSO/SCIM** sense as modeled in the schema (not the SCIM token resource).', whenToUse: 'When enterprises expect IdP to drive user create/update in Wildo for SSO, subject to product wiring.', textSlots: { title: { purpose: 'Provisioning (SSO) heading.' }, description: { purpose: 'Clarify difference vs SCIM push channel configured elsewhere.' } } },\n session: { purpose: 'SSO session duration, reauth, SLO, concurrent sessions — enterprise session hygiene.', whenToUse: 'Security and compliance review of idle vs absolute timeouts.', textSlots: { title: { purpose: 'Session settings.' }, description: { purpose: 'Note impact on `maxConcurrentSessions` and user-visible sign-out.' } } },\n audit: { purpose: 'What SSO path actions are auditable, retention, and compliance reporting flags.', whenToUse: 'Customers needing provable sign-in and IdP event trails.', textSlots: { title: { purpose: 'SSO audit block.' }, description: { purpose: 'Tie to `AuditEvent` classifiers, not the raw SIEM stream.' } } },\n emergency: { purpose: 'Break-glass, approvals, and duration of elevated access in SSO outage scenarios when enabled.', whenToUse: 'Disaster recovery and controlled password fallback in emergencies.', textSlots: { title: { purpose: 'Emergency access.' }, description: { purpose: 'Human approval and short TTL are typical — align with `SSOAuditLevel` in the schema.' } } },\n oauth: { purpose: 'OAuth2 provider allow/deny, scopes, and tenant restrictions to reduce token theft blast radius in OIDC-based SSO when configured.', whenToUse: 'Locking IdP tenants and scopes in highly regulated orgs.', textSlots: { title: { purpose: 'OAuth restrictions.' }, description: { purpose: 'Complement, not replace, the per-connection OIDC field-level settings in `SsoConnection` resources.' } } },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Addressable read for org in merged main/admin where presets surface SSO policy; app-scoped may suppress views in `variantOverrides`—factory READ remains.', whenToUse: 'Security “SSO” settings in admin consoles.' },\n },\n }),\n );\n}\n\nexport const organizationSsoConfigResourceSpecification = build(CoreResourceType.ORGANIZATION_SSO_CONFIG, 'ORGANIZATION_SSO_CONFIG');\nexport const applicationSsoConfigResourceSpecification = build(CoreResourceType.APPLICATION_SSO_CONFIG, 'APPLICATION_SSO_CONFIG');\n"]}
|