@wildo-ai/saas-specifications 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/_core/brand/brand-asset.schemas.d.ts +4 -6
- package/dist/esm/_core/brand/brand-asset.schemas.d.ts.map +1 -1
- package/dist/esm/_core/brand/brand-asset.schemas.js +4 -12
- package/dist/esm/_core/brand/brand-asset.schemas.js.map +1 -1
- package/dist/esm/_core/brand/brand-generation.schemas.d.ts +5 -3
- package/dist/esm/_core/brand/brand-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/brand/brand-generation.schemas.js +5 -2
- package/dist/esm/_core/brand/brand-generation.schemas.js.map +1 -1
- package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts +10 -3
- package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts.map +1 -1
- package/dist/esm/_core/brand/brand-snapshot.schemas.js +10 -2
- package/dist/esm/_core/brand/brand-snapshot.schemas.js.map +1 -1
- 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-task-graph-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.js +15 -5
- package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.js.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts +40 -3
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js +85 -6
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js.map +1 -1
- 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-lite-snapshot-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js +10 -4
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts +15 -0
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.js.map +1 -1
- 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 +178 -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 +115 -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/expert-personas/expert-persona-charter.schemas.d.ts +6 -7
- package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.d.ts.map +1 -1
- package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.js +6 -13
- package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.js.map +1 -1
- package/dist/esm/_core/expert-personas/expert-persona-validation.d.ts +0 -11
- package/dist/esm/_core/expert-personas/expert-persona-validation.d.ts.map +1 -1
- package/dist/esm/_core/expert-personas/expert-persona-validation.js +0 -19
- package/dist/esm/_core/expert-personas/expert-persona-validation.js.map +1 -1
- package/dist/esm/_core/expert-personas/expert-role-template.schemas.d.ts +1 -2
- package/dist/esm/_core/expert-personas/expert-role-template.schemas.d.ts.map +1 -1
- package/dist/esm/_core/expert-personas/expert-role-template.schemas.js +1 -2
- package/dist/esm/_core/expert-personas/expert-role-template.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/feature-drafts/feature-specification-drafts-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/feature-drafts/feature-specification-drafts-generation.schemas.js +17 -4
- package/dist/esm/_core/feature-drafts/feature-specification-drafts-generation.schemas.js.map +1 -1
- 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 +3 -0
- package/dist/esm/_core/index.d.ts.map +1 -1
- package/dist/esm/_core/index.js +3 -0
- package/dist/esm/_core/index.js.map +1 -1
- package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts +22 -22
- package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-snapshot-generation.schemas.js +5 -40
- package/dist/esm/_core/market/market-snapshot-generation.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-snapshot-validation.d.ts +15 -0
- package/dist/esm/_core/market/market-snapshot-validation.d.ts.map +1 -1
- package/dist/esm/_core/market/market-snapshot-validation.js.map +1 -1
- 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-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.js +11 -5
- package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.js.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts +66 -9
- package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan-validation.js +62 -20
- package/dist/esm/_core/placement-plan/placement-plan-validation.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/placement-plan/placement-plan.schemas.d.ts +4 -1
- package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan.schemas.js +4 -1
- package/dist/esm/_core/placement-plan/placement-plan.schemas.js.map +1 -1
- package/dist/esm/_core/provider-specification.schemas.d.ts +82 -0
- package/dist/esm/_core/provider-specification.schemas.d.ts.map +1 -0
- package/dist/esm/_core/provider-specification.schemas.js +144 -0
- package/dist/esm/_core/provider-specification.schemas.js.map +1 -0
- package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.js +13 -8
- package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.js.map +1 -1
- package/dist/esm/_core/requirements/requirements-snapshot-validation.d.ts +15 -0
- package/dist/esm/_core/requirements/requirements-snapshot-validation.d.ts.map +1 -1
- package/dist/esm/_core/requirements/requirements-snapshot-validation.js.map +1 -1
- 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-snapshot-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.js +7 -2
- package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.js.map +1 -1
- package/dist/esm/_core/roadmap/roadmap-snapshot-validation.d.ts +15 -0
- package/dist/esm/_core/roadmap/roadmap-snapshot-validation.d.ts.map +1 -1
- package/dist/esm/_core/roadmap/roadmap-snapshot-validation.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/utils/family-ref-stamping.d.ts +64 -0
- package/dist/esm/_core/utils/family-ref-stamping.d.ts.map +1 -0
- package/dist/esm/_core/utils/family-ref-stamping.js +73 -0
- package/dist/esm/_core/utils/family-ref-stamping.js.map +1 -0
- package/dist/esm/_core/vision/vision-snapshot-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/vision/vision-snapshot-generation.schemas.js +23 -9
- package/dist/esm/_core/vision/vision-snapshot-generation.schemas.js.map +1 -1
- 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-coding-tasks.application-creation.schemas.d.ts +0 -4
- package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts +193 -38
- 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 +157 -57
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.d.ts +3 -3
- package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.js +3 -3
- package/dist/esm/application-creation/application-document-release-policy-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/journey.application-creation.schemas.d.ts +18 -6
- package/dist/esm/application-creation/journey.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/journey.application-creation.schemas.js +18 -6
- package/dist/esm/application-creation/journey.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +101 -85
- package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/playbooks.application-creation.schemas.js +171 -86
- 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/application-document-publication.schemas.d.ts +20 -6
- package/dist/esm/assurance/application-document-publication.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/application-document-publication.schemas.js +26 -10
- package/dist/esm/assurance/application-document-publication.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +999 -2
- package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.definitions.js +2127 -61
- package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts +26 -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-evidence-requirement-bodies.definitions.d.ts +36 -0
- package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts.map +1 -0
- package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js +859 -0
- package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js.map +1 -0
- 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-foundation.schemas.d.ts +43 -0
- package/dist/esm/assurance/assurance-foundation.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-foundation.schemas.js +56 -0
- package/dist/esm/assurance/assurance-foundation.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts +78 -1
- package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-objective-catalog.definitions.js +562 -5
- package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-program-generation.schemas.d.ts +148 -0
- package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -0
- package/dist/esm/assurance/assurance-program-generation.schemas.js +385 -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 +474 -14
- package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-program.schemas.js +319 -8
- 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/assurance-verification-requirement-bodies.definitions.d.ts +35 -0
- package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts.map +1 -0
- package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js +999 -0
- package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js.map +1 -0
- 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 +26 -8
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/companion-exports.js.map +1 -1
- package/dist/esm/engine/_bootstrap.js +3 -1
- package/dist/esm/engine/_bootstrap.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 +15 -1
- 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 +4 -2
- package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js.map +1 -1
- package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts +2 -0
- 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 +17 -3
- 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 +12 -10
- package/dist/esm/engine/applications/resources/application-versions.resource.specification.js.map +1 -1
- package/dist/esm/engine/applications/resources/applications.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/applications.resource.specification.js +4 -2
- 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 +3 -1
- 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 +15 -1
- 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 +2 -0
- 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 +17 -3
- package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts +32 -0
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js +308 -0
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js.map +1 -0
- 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 +6 -4
- 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 +4 -2
- 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 +8 -6
- 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 +11 -9
- 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 +8 -6
- 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 +9 -25
- 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 +106 -10
- package/dist/esm/engine/auth/resources/sso-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts +0 -6
- 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/auth/resources/user-provider-credentials.resource.specification.d.ts +32 -0
- package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js +297 -0
- package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js.map +1 -0
- 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 +6 -3
- 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 +4 -2
- 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 +5 -3
- 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 +10 -8
- 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 +10 -8
- 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 +16 -12
- 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 +10 -8
- 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 +8 -3
- 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 +13 -9
- 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 +30 -11
- 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 +10 -8
- package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js.map +1 -1
- package/dist/esm/engine/engine-resource-specifications.registry.d.ts +2 -2
- package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
- package/dist/esm/engine/engine-resource-specifications.registry.js +11 -2
- package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
- package/dist/esm/engine/engine-resource-sub-domain.d.ts +83 -0
- package/dist/esm/engine/engine-resource-sub-domain.d.ts.map +1 -0
- package/dist/esm/engine/engine-resource-sub-domain.js +153 -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 +44 -1
- package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
- package/dist/esm/engine/features/audit-logs.feature.specification.js +4 -4
- package/dist/esm/engine/features/audit-logs.feature.specification.js.map +1 -1
- package/dist/esm/engine/features/core-limits.feature.specifications.js +7 -7
- package/dist/esm/engine/features/core-limits.feature.specifications.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 +5 -3
- 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 +5 -3
- 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 +5 -3
- package/dist/esm/engine/features/resources/user-features.resource.specification.js.map +1 -1
- package/dist/esm/engine/files/resources/files.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/files/resources/files.resource.specification.js +12 -10
- 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 +22 -10
- 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 +6 -4
- 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 +4 -2
- 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/app-layout-connected-accounts-settings.frontend-component.specification.d.ts +5 -0
- package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.d.ts.map +1 -0
- package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js +81 -0
- package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js.map +1 -0
- package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.d.ts +4 -0
- package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.d.ts.map +1 -0
- package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.js +22 -0
- package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.js.map +1 -0
- 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/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.d.ts +0 -4
- package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.d.ts.map +0 -1
- package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.js +0 -21
- package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.js.map +0 -1
- package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.d.ts +0 -4
- package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.d.ts.map +0 -1
- package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.js +0 -21
- package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.js.map +0 -1
- package/dist/esm/engine/frontend-components/index.d.ts +0 -2
- package/dist/esm/engine/frontend-components/index.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/index.js +4 -6
- package/dist/esm/engine/frontend-components/index.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 +15 -12
- 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 +12 -9
- 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 +9 -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 +9 -6
- package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/index.d.ts +2 -0
- package/dist/esm/engine/index.d.ts.map +1 -1
- package/dist/esm/engine/index.js +2 -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 +19 -17
- 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 +9 -7
- 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 +10 -8
- 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 +7 -2
- 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 +12 -5
- 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 +22 -15
- 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 +14 -10
- 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 +31 -6
- 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 +11 -9
- 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 +5 -3
- 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 +6 -4
- 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 +4 -2
- 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 +3 -1
- 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 +9 -7
- package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
- package/dist/esm/engine/providers/_engine-provider-shared.d.ts +9 -0
- package/dist/esm/engine/providers/_engine-provider-shared.d.ts.map +1 -0
- package/dist/esm/engine/providers/_engine-provider-shared.js +19 -0
- package/dist/esm/engine/providers/_engine-provider-shared.js.map +1 -0
- package/dist/esm/engine/providers/anthropic.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/anthropic.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/anthropic.provider.specification.js +33 -0
- package/dist/esm/engine/providers/anthropic.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/apple.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/apple.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/apple.provider.specification.js +35 -0
- package/dist/esm/engine/providers/apple.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/email-preview.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/email-preview.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/email-preview.provider.specification.js +31 -0
- package/dist/esm/engine/providers/email-preview.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/github.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/github.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/github.provider.specification.js +30 -0
- package/dist/esm/engine/providers/github.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/google.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/google.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/google.provider.specification.js +34 -0
- package/dist/esm/engine/providers/google.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/grok.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/grok.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/grok.provider.specification.js +30 -0
- package/dist/esm/engine/providers/grok.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/index.d.ts +23 -0
- package/dist/esm/engine/providers/index.d.ts.map +1 -0
- package/dist/esm/engine/providers/index.js +37 -0
- package/dist/esm/engine/providers/index.js.map +1 -0
- package/dist/esm/engine/providers/microsoft.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/microsoft.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/microsoft.provider.specification.js +30 -0
- package/dist/esm/engine/providers/microsoft.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/mistral.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/mistral.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/mistral.provider.specification.js +33 -0
- package/dist/esm/engine/providers/mistral.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/openai.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/openai.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/openai.provider.specification.js +43 -0
- package/dist/esm/engine/providers/openai.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/opencode.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/opencode.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/opencode.provider.specification.js +50 -0
- package/dist/esm/engine/providers/opencode.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/perplexity.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/perplexity.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/perplexity.provider.specification.js +30 -0
- package/dist/esm/engine/providers/perplexity.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/resend.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/resend.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/resend.provider.specification.js +33 -0
- package/dist/esm/engine/providers/resend.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/stripe.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/stripe.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/stripe.provider.specification.js +35 -0
- package/dist/esm/engine/providers/stripe.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/twilio.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/twilio.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/twilio.provider.specification.js +33 -0
- package/dist/esm/engine/providers/twilio.provider.specification.js.map +1 -0
- 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 +9 -7
- 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 +11 -9
- 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 +4 -2
- package/dist/esm/engine/users/resources/user-credentials.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-identity-links.resource.specification.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 +10 -8
- 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 +5 -5
- 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 +6 -4
- 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 +4 -2
- 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 +5 -5
- 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 +15 -11
- 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 +3 -1
- 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 +11 -9
- 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 +95 -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 +451 -25
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-units.schemas.d.ts +37 -1
- package/dist/esm/technical-documentation/technical-documentation-units.schemas.d.ts.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-units.schemas.js +37 -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":"m2m-webhook-delivery-log.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,IAAI,EAAE,EAC3B,gBAAgB,EAChB,gCAAgC,EAChC,+BAA+B,EAC/B,2BAA2B,EAC3B,oBAAoB,EACpB,yCAAyC,GAC1C,MAAM,uBAAuB,CAA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E,+GAA+G,EAAE;iBAClK;gBACD,cAAc,EAAE;oBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,eAAe,EAAE,IAAI,EAAE,yGAAyG,EAAE,SAAS,EAAE,mBAAmB,EAAE;oBACjM,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,+FAA+F,EAAE;iBACtJ;gBACD,UAAU,EAAE,KAAK;gBACjB,QAAQ,EAAE,CAAC;wBACT,KAAK,EAAE,oDAAoD;wBAC3D,OAAO,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE;wBAC9B,QAAQ,EAAE;4BACR,WAAW,EAAE,EAAE;4BACf,OAAO,EAAE,qEAAqE;yBAC/E;wBACD,SAAS,EAAE,sBAAsB,CAAC,MAAM;qBACzC,CAAC;aACH;SACF;QACD,mBAAmB,EAAE;YACnB,sQAAsQ;YACtQ,iJAAiJ;YACjJ,qKAAqK;SACtK;KACF,CAAC,EACF,EAAE,oBAAoB,EAAE,kCAAkC,CAAC,YAAY,CAAC,EAAE,CAC3E,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,sDAAsD,GAAG,uCAAuC,CAC3G,gBAAgB,CAAC,qCAAqC,EACtD,uCAAuC,CACxC,CAAC;AAEF,MAAM,CAAC,MAAM,qDAAqD,GAAG,uCAAuC,CAC1G,gBAAgB,CAAC,oCAAoC,EACrD,sCAAsC,CACvC,CAAC","sourcesContent":["/**\n * Resources: `organizationM2mWebhookDeliveryLog` + `applicationM2mWebhookDeliveryLog` — Wildo SaaS engine specification (backend-only).\n *\n * Polymorphic ORG + APP pair sharing `M2MWebhookDeliveryLogBaseSchema` and `m2mWebhookDeliveryLogPolymorphicFactories`.\n *\n * Inputs:\n * - Base schema: `M2MWebhookDeliveryLogBaseSchema` (`m2m-webhook-delivery-log.shared.schemas.ts`)\n * - Polymorphic factories: `m2mWebhookDeliveryLogPolymorphicFactories` (`m2m-webhook-delivery-log.shared.resources-config.schemas.ts`)\n * - Custom operations: `M2MWebhookDeliveryLog_Operations` (`retry`, `purgeOld`)\n * - UI presets: `webhooksMainPresets` / `webhooksAdminPresets`\n * (engine/presets-components/src/config/resources/webhooks.resource-presets.tsx) —\n * layout-less auto-render surfaced in the org Settings Hub `webhooks` section\n * (Delivery log sub-tab), dashboard-style via generic collection capabilities:\n * status quick-filter tab strip (`collectionDisplayConfig.quickFilterField`)\n * + day-bucket date headings (`temporalGroupField: 'createdAt'`) on LIST,\n * EMBEDDED READ (row click → companion drawer; opaque `payload` renders as\n * pretty JSON), `retry` / `purgeOld` actions, status badge.\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreM2MNotificationChannel,\n CoreResourceOperation as Op,\n CoreResourceType,\n M2MWebhookDeliveryLog_Operations,\n M2MWebhookDeliveryLogBaseSchema,\n M2MWebhookDeliveryLogStatus,\n ResourcePrimaryScope,\n m2mWebhookDeliveryLogPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification, type ResourceSpecificationConfig } from '~wildo-specifications/_core';\n\ntype M2mDeliveryLogResourceType =\n | CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG\n | CoreResourceType.APPLICATION_M2M_WEBHOOK_DELIVERY_LOG;\n\ntype M2mDeliveryLogResourceTypeMember =\n | 'ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG'\n | 'APPLICATION_M2M_WEBHOOK_DELIVERY_LOG';\n\nconst m2mDeliveryLogResourcePrimaryScope: Record<M2mDeliveryLogResourceType, ResourcePrimaryScope> = {\n [CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_M2M_WEBHOOK_DELIVERY_LOG]: ResourcePrimaryScope.APPLICATION,\n};\n\ntype M2mDeliveryFactoryCfg = ReturnType<\n (typeof m2mWebhookDeliveryLogPolymorphicFactories)[CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG]\n>;\ntype M2mDeliveryCustomOp = NonNullable<M2mDeliveryFactoryCfg['customOperation']>;\ntype M2mDeliveryCoreOp =\n | Op.READ\n | Op.LIST\n | Op.SEARCH\n | Op.CREATE\n | Op.UPDATE\n | Op.DELETE\n | Op.DELETE_MANY;\ntype M2mDeliveryMain = typeof M2MWebhookDeliveryLogBaseSchema;\n\nfunction buildM2mWebhookDeliveryLogSpecification(\n resourceType: M2mDeliveryLogResourceType,\n memberName: M2mDeliveryLogResourceTypeMember,\n): ResourceSpecificationConfig<M2mDeliveryCustomOp, M2mDeliveryCoreOp, M2mDeliveryMain> {\n const isOrganizationScope = resourceType === CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG;\n const scopeIdentity = isOrganizationScope\n ? { organizationId: 'org_01JEXAMPLE' }\n : { applicationId: 'app_01JEXAMPLE' };\n const channel = isOrganizationScope\n ? CoreM2MNotificationChannel.WEBHOOK_ORGANIZATION\n : CoreM2MNotificationChannel.WEBHOOK_APPLICATION;\n const deliveryIdentity = {\n _id: 'delivery_01JEXAMPLE',\n endpointId: 'orders-primary',\n channel,\n resourceIdentifier: 'orders',\n operationIdentifier: 'create',\n httpUrl: 'https://partners.example.com/webhooks/orders',\n payloadHash: '31da863f127a6c22b91b5cc85081c382b02039a9c8c4b30db2cc3172de31d2d8',\n payload: { event: 'order.created', orderId: 'order_01JEXAMPLE' },\n signatureJti: 'webhook-signature-01JEXAMPLE',\n createdAt: '2026-08-18T09:30:00.000Z',\n updatedAt: '2026-08-18T09:32:12.000Z',\n ...scopeIdentity,\n } as const;\n const failedDeliveryExample = {\n ...deliveryIdentity,\n status: M2MWebhookDeliveryLogStatus.FAILED,\n attemptCount: 5,\n lastAttemptAt: '2026-08-18T09:32:12.000Z',\n responseStatus: 503,\n responseBodyTruncated: 'Service temporarily unavailable',\n failureReason: 'The receiver returned HTTP 503 after the final retry.',\n failedAt: '2026-08-18T09:32:12.000Z',\n } as const;\n const retriedDeliveryExample = {\n ...deliveryIdentity,\n status: M2MWebhookDeliveryLogStatus.PENDING,\n attemptCount: 0,\n nextAttemptAt: '2026-08-18T09:35:00.000Z',\n } as const;\n const deliveryPageExample = {\n data: [failedDeliveryExample],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n } as const;\n\n return resourceSpecification<M2mDeliveryCustomOp, M2mDeliveryCoreOp, M2mDeliveryMain>(\n m2mWebhookDeliveryLogPolymorphicFactories[resourceType],\n M2MWebhookDeliveryLogBaseSchema,\n ({ schemaShape }) => ({\n purpose: 'Persist every outbound M2M webhook POST (queue entry, delivery status, HTTP evidence, and signing metadata) for org- or app-scoped admin review and retry.',\n businessRole: 'The user-visible event log and the worker’s durable queue for asynchronous webhook delivery — one row per (scope × target endpoint × fire).',\n lifecycleRole: 'Rows move PENDING → IN_FLIGHT → DELIVERED, or PENDING/IN_FLIGHT → FAILED, with `attemptCount` and `nextAttemptAt` governing back-off; RETRY and PURGE_OLD custom ops re-queue or clean history.',\n audience: LabelAudience.DEVELOPER,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'M2MWebhookDeliveryLogBaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'm2mWebhookDeliveryLogPolymorphicFactories',\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 customEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'M2MWebhookDeliveryLog_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'The polymorphism engine injects `organizationId` (ORG variant) or `applicationId` (APP variant) on the document — those FKs are not on the base Zod object.',\n ],\n },\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Unique id for a single delivery log row and lease token anchor for the worker.',\n importance: FieldSemanticImportance.PRIMARY,\n semanticRole: 'identifier',\n }),\n endpointId: schemaShape.endpointId.stringSpec({\n meaning: 'Stable FK to `webhookConfig.endpoints[].id` at enqueue time so historical rows survive endpoint renames/URL changes.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n channel: schemaShape.channel.enumSpec({\n meaning: 'Which M2M channel the originating operation fired (must be compatible with the resource’s primary scope in the dispatcher).',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreM2MNotificationChannel',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [CoreM2MNotificationChannel.WEBHOOK_ORGANIZATION]: { meaning: 'Org-scoped outbound webhook (requires an org id in the execution context).' },\n [CoreM2MNotificationChannel.WEBHOOK_APPLICATION]: { meaning: 'App-scoped outbound webhook (resolves the app id from `appConfigService`).' },\n },\n }),\n resourceIdentifier: schemaShape.resourceIdentifier.stringSpec({\n meaning: 'Originating `CoreResourceType` string (or app resource key) that produced the M2M payload.',\n semanticRole: 'code',\n }),\n operationIdentifier: schemaShape.operationIdentifier.stringSpec({\n meaning: 'Operation or custom-op identifier that the serializer used when building the POST body (used for support correlation).',\n semanticRole: 'code',\n }),\n variantKey: schemaShape.variantKey.stringSpec({\n meaning: 'Optional default vs named operation variant, when the originating op exposed multiple API variants.',\n }),\n httpUrl: schemaShape.httpUrl.stringSpec({\n meaning: 'Snapshot of the destination URL that was used for this attempt (duplicated from the config so URL edits do not rewrite history).',\n importance: FieldSemanticImportance.PRIMARY,\n semanticRole: 'uri',\n }),\n payloadHash: schemaShape.payloadHash.stringSpec({\n meaning: 'SHA-256 of the JSON body, mirrored into the signed JWT and used to detect replays or tampering.',\n semanticRole: 'code',\n }),\n status: schemaShape.status.enumSpec({\n meaning: 'Current queue/delivery state for the worker and admin filters.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'M2MWebhookDeliveryLogStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.CONST_OBJECT,\n },\n values: {\n [M2MWebhookDeliveryLogStatus.PENDING]: { meaning: 'Row is either waiting in the queue or has been re-queued for another attempt after a transient failure.' },\n [M2MWebhookDeliveryLogStatus.IN_FLIGHT]: { meaning: 'A worker currently holds a lease and is trying to send the HTTP request.' },\n [M2MWebhookDeliveryLogStatus.DELIVERED]: { meaning: 'HTTP success path with signature validated at the consumer; terminal success.' },\n [M2MWebhookDeliveryLogStatus.FAILED]: { meaning: 'Terminal failure: exhausted attempt budget or a non-retryable 4xx class error.' },\n },\n }),\n attemptCount: schemaShape.attemptCount.numberSpec({\n meaning: 'Number of send attempts (including successes that still increment the counter, per worker policy).',\n unit: 'count',\n }),\n lastAttemptAt: schemaShape.lastAttemptAt.dateSpec({\n meaning: 'When the most recent send attempt started or finished, depending on writer semantics.',\n temporalRole: 'occurred',\n }),\n nextAttemptAt: schemaShape.nextAttemptAt.dateSpec({\n meaning: 'When the next retry is eligible; indexed for the worker’s polling query on `(status, nextAttemptAt)`.',\n temporalRole: 'scheduled',\n }),\n responseStatus: schemaShape.responseStatus.numberSpec({\n meaning: 'Last observed HTTP status code (present even for successes for observability).',\n }),\n responseBodyTruncated: schemaShape.responseBodyTruncated.stringSpec({\n meaning: 'First 4 KB of the HTTP response (when captured) to help debug remote listener failures.',\n }),\n failureReason: schemaShape.failureReason.stringSpec({\n meaning: 'Human-readable last error string when `status=failed` (worker-set).',\n }),\n signatureJti: schemaShape.signatureJti.stringSpec({\n meaning: 'Matches the JWT `jti` and `X-Webhook-Signature` header so the consumer can look up the exact signing key material.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n deliveredAt: schemaShape.deliveredAt.dateSpec({\n meaning: 'Timestamp when a terminal `DELIVERED` state was recorded.',\n temporalRole: 'occurred',\n }),\n failedAt: schemaShape.failedAt.dateSpec({\n meaning: 'Timestamp when a terminal `FAILED` state was recorded.',\n temporalRole: 'occurred',\n }),\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the row was enqueued (immutable upper bound for retention policies).',\n temporalRole: 'creation',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When status / attempt counters / timestamps last changed for this id.',\n temporalRole: 'modified',\n }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Inspect a single log row in admin or support UIs using the fields documented above (status, URL snapshot, hashes, HTTP evidence, correlation ids). The Mongo `payload` column is `z.unknown()` at rest and is not expanded in `fields.*` — when the runtime returns it, treat it as sensitive; see `businessConstraints`.',\n outcome: 'Operators can see whether a business event was delivered and, if not, the precise failure class.',\n whenToUse: 'Use when triaging a customer ticket referencing a `deliveryLogId` or `signatureJti`.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The delivery log row for the supplied id was found and its status, URL snapshot, HTTP evidence, and signing metadata are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery log row exists for the supplied id in this scope (never enqueued, or already removed by `PURGE_OLD`).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role; because `payload` may embed serialized customer data, reads are gated to roles that already see that data (see `businessConstraints`).' },\n ],\n idempotent: true,\n examples: [{\n title: 'Inspect a failed order webhook delivery',\n response: failedDeliveryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: { examples: [] },\n summary: { examples: [] },\n },\n },\n [Op.LIST]: {\n purpose: 'Browse recent delivery attempts in chronological order, filtered by the repository’s search defaults.',\n outcome: 'Admins can scan for spikes in `FAILED` rows or revalidation after URL rotation.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) chronological page of delivery log rows in this scope.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role required to browse the delivery log (rows may carry serialized customer payloads).' },\n ],\n idempotent: true,\n examples: [{\n title: 'Browse recent delivery attempts',\n request: { page: 1, limit: 20, sort: 'createdAt:desc' },\n response: deliveryPageExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: { examples: [] },\n summary: { examples: [] },\n },\n },\n [Op.SEARCH]: {\n purpose: 'Filter log rows on status, `endpointId`, channel, date windows, and operation identifiers to isolate incidents.',\n outcome: 'Security and ops can produce CSV-grade subsets without an external data warehouse in small deployments.',\n whenToUse: 'Use in admin dashboards; heavy analytics may still go to a warehouse — this is the operational “small query” path.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of delivery log rows matching the status / endpoint / channel / date-window / operation filters.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role required to search the delivery log.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Find failures for one endpoint',\n request: {\n q: 'orders',\n status: M2MWebhookDeliveryLogStatus.FAILED,\n channel,\n endpointId: 'orders-primary',\n page: 1,\n limit: 20,\n sort: 'createdAt:desc',\n },\n response: deliveryPageExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.CREATE]: {\n purpose: 'Enqueue a new delivery row when a resource operation with an M2M channel fires.',\n outcome: 'The worker pool can find ready rows via the `(status, nextAttemptAt)` index.',\n whenToUse: 'Repository-only: invoked by the dispatcher, never by a human HTTP client.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A `PENDING` delivery row was enqueued and is now discoverable by the worker pool. Internal/service write path — the dispatcher fires this, never a human HTTP client.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The enqueue payload fails schema validation (e.g. missing `endpointId`, `httpUrl`, or `channel`).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-dispatcher caller attempts to enqueue a delivery row directly.' },\n ],\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Drive the delivery lifecycle status transitions (PENDING → IN_FLIGHT → DELIVERED/FAILED) with `attemptCount` / `nextAttemptAt` / terminal-timestamp writes.',\n outcome: 'The worker can advance a row through its lifecycle so the `(status, nextAttemptAt)` index stays accurate for polling and back-off.',\n whenToUse: 'Repository-only: invoked by the dispatcher/worker (`markInFlight` / `markDelivered` / `markFailedAttempt` / `markFinallyFailed`), never by a human HTTP client — admins act via the `RETRY` custom operation.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The delivery row’s status / attempt counters / timestamps were updated. Internal/service write path — the worker fires this, never a human HTTP client.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery log row exists for the supplied id to update.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-dispatcher caller attempts to mutate a delivery row directly; UI flows must use the `RETRY` custom operation.' },\n ],\n idempotent: false,\n },\n [Op.DELETE]: {\n purpose: 'Reserved for `PURGE_OLD` and internal cleanup — no public single-row delete to keep the audit trail honest.',\n outcome: 'Old rows are removed in bulk, not opportunistically per UI click, matching the high-risk gating in the config.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'An internal/maintenance single-row delete completed; no body is returned. Intentionally not a public per-click operation — routine cleanup goes through `PURGE_OLD`.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery log row exists for the supplied id to delete.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an operator authorized for exceptional single-row maintenance deletes; UI flows must use `PURGE_OLD` instead.' },\n ],\n idempotent: true,\n },\n [Op.DELETE_MANY]: {\n purpose: 'Bulk twin of `DELETE` — the actual `PURGE_OLD` write path: one repository round trip drops every terminal `DELIVERED`/`FAILED` row older than the requested retention window.',\n outcome: 'Retention purges scale with one bulk delete instead of N per-row deletes; non-terminal rows are never touched (the drain owns them).',\n whenToUse: 'Repository-only — never a public HTTP surface. Admins purge via the `PURGE_OLD` custom operation, which owns request validation and the purge summary response.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The matched terminal rows were bulk-deleted; the `PURGE_OLD` wrapper 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_OLD`.' },\n ],\n idempotent: true,\n },\n [M2MWebhookDeliveryLog_Operations.RETRY]: {\n operationId: M2MWebhookDeliveryLog_Operations.RETRY,\n purpose: 'Re-queue a `FAILED` row (reset to pending / zero attempts per worker contract) for manual replay.',\n outcome: 'Operators can attempt redelivery after fixing the downstream listener without re-sending the originating business event.',\n whenToUse: 'Use after a partner confirms their endpoint or certificate is healthy again.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The `FAILED` row was reset to `PENDING` with attempt counters cleared, and the worker pool will re-attempt delivery; the re-queued row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery log row exists for the supplied id to retry.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role required to trigger a manual redelivery.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The row is not in a retryable terminal `FAILED` state (e.g. it is still `PENDING`/`IN_FLIGHT`, or already `DELIVERED`), so a manual re-queue is illegal.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Retry after the receiver recovers',\n request: {},\n response: retriedDeliveryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [M2MWebhookDeliveryLog_Operations.PURGE_OLD]: {\n operationId: M2MWebhookDeliveryLog_Operations.PURGE_OLD,\n purpose: 'Bulk-delete rows older than `N` days (delivered or failed) to bound storage in busy tenants.',\n outcome: 'Tenants can comply with data-retention policy without manual Mongo shell intervention.',\n whenToUse: 'Use in scheduled admin jobs (or manual compliance runs) with explicit `olderThanDays` guardrails.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'Rows older than the supplied `olderThanDays` window were bulk-deleted and a count of purged rows is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `olderThanDays` guardrail is missing, non-numeric, or below the configured minimum retention floor.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role required to run a bulk retention purge.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Purge terminal delivery history older than 30 days',\n request: { olderThanDays: 30 },\n response: {\n purgedCount: 47,\n message: 'Purged 47 delivered/failed webhook deliveries older than 30 day(s).',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n businessConstraints: [\n 'The `payload` field stores `z.unknown()` JSON at rest (full operation serialization per plan). It is intentionally not expanded into `fields.*` here because the shape is the arbitrary API response; treat any READ that surfaces `payload` as PII/secret handling.',\n 'Do not use `Op.DELETE` for routine UI — prefer `PURGE_OLD` to maintain structured audit logs; single-row delete is for exceptional maintenance.',\n 'Because payloads may embed serialized API responses, treat READ/LIST as sensitive: scope RBAC to org-admin or app-super-admin roles that already see customer data.',\n ],\n }),\n { resourcePrimaryScope: m2mDeliveryLogResourcePrimaryScope[resourceType] },\n );\n}\n\nexport const organizationM2mWebhookDeliveryLogResourceSpecification = buildM2mWebhookDeliveryLogSpecification(\n CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG,\n 'ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG',\n);\n\nexport const applicationM2mWebhookDeliveryLogResourceSpecification = buildM2mWebhookDeliveryLogSpecification(\n CoreResourceType.APPLICATION_M2M_WEBHOOK_DELIVERY_LOG,\n 'APPLICATION_M2M_WEBHOOK_DELIVERY_LOG',\n);\n"]}
|
|
1
|
+
{"version":3,"file":"m2m-webhook-delivery-log.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,IAAI,EAAE,EAC3B,gBAAgB,EAChB,gCAAgC,EAChC,+BAA+B,EAC/B,2BAA2B,EAC3B,oBAAoB,EACpB,yCAAyC,GAC1C,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAoC,MAAM,6BAA6B,CAAC;AAC9H,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAU3E,MAAM,kCAAkC,GAA6D;IACnG,CAAC,gBAAgB,CAAC,qCAAqC,CAAC,EAAE,oBAAoB,CAAC,aAAa;IAC5F,CAAC,gBAAgB,CAAC,oCAAoC,CAAC,EAAE,oBAAoB,CAAC,WAAW;CAC1F,CAAC;AAgBF,SAAS,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+FAA+F,EAAE;iBACtJ;gBACD,UAAU,EAAE,KAAK;gBACjB,QAAQ,EAAE,CAAC;wBACT,KAAK,EAAE,oDAAoD;wBAC3D,OAAO,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE;wBAC9B,QAAQ,EAAE;4BACR,WAAW,EAAE,EAAE;4BACf,OAAO,EAAE,qEAAqE;yBAC/E;wBACD,SAAS,EAAE,sBAAsB,CAAC,MAAM;qBACzC,CAAC;aACH;SACF;QACD,mBAAmB,EAAE;YACnB,sQAAsQ;YACtQ,iJAAiJ;YACjJ,qKAAqK;SACtK;KACF,CAAC,EACF,EAAE,oBAAoB,EAAE,kCAAkC,CAAC,YAAY,CAAC,EAAE,CAC3E,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,sDAAsD,GAAG,uCAAuC,CAC3G,gBAAgB,CAAC,qCAAqC,EACtD,uCAAuC,CACxC,CAAC;AAEF,MAAM,CAAC,MAAM,qDAAqD,GAAG,uCAAuC,CAC1G,gBAAgB,CAAC,oCAAoC,EACrD,sCAAsC,CACvC,CAAC","sourcesContent":["/**\n * Resources: `organizationM2mWebhookDeliveryLog` + `applicationM2mWebhookDeliveryLog` — Wildo SaaS engine specification (backend-only).\n *\n * Polymorphic ORG + APP pair sharing `M2MWebhookDeliveryLogBaseSchema` and `m2mWebhookDeliveryLogPolymorphicFactories`.\n *\n * Inputs:\n * - Base schema: `M2MWebhookDeliveryLogBaseSchema` (`m2m-webhook-delivery-log.shared.schemas.ts`)\n * - Polymorphic factories: `m2mWebhookDeliveryLogPolymorphicFactories` (`m2m-webhook-delivery-log.shared.resources-config.schemas.ts`)\n * - Custom operations: `M2MWebhookDeliveryLog_Operations` (`retry`, `purgeOld`)\n * - UI presets: `webhooksMainPresets` / `webhooksAdminPresets`\n * (engine/presets-components/src/config/resources/webhooks.resource-presets.tsx) —\n * layout-less auto-render surfaced in the org Settings Hub `webhooks` section\n * (Delivery log sub-tab), dashboard-style via generic collection capabilities:\n * status quick-filter tab strip (`collectionDisplayConfig.quickFilterField`)\n * + day-bucket date headings (`temporalGroupField: 'createdAt'`) on LIST,\n * EMBEDDED READ (row click → companion drawer; opaque `payload` renders as\n * pretty JSON), `retry` / `purgeOld` actions, status badge.\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreM2MNotificationChannel,\n CoreResourceOperation as Op,\n CoreResourceType,\n M2MWebhookDeliveryLog_Operations,\n M2MWebhookDeliveryLogBaseSchema,\n M2MWebhookDeliveryLogStatus,\n ResourcePrimaryScope,\n m2mWebhookDeliveryLogPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification, type ResourceSpecificationConfig } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype M2mDeliveryLogResourceType =\n | CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG\n | CoreResourceType.APPLICATION_M2M_WEBHOOK_DELIVERY_LOG;\n\ntype M2mDeliveryLogResourceTypeMember =\n | 'ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG'\n | 'APPLICATION_M2M_WEBHOOK_DELIVERY_LOG';\n\nconst m2mDeliveryLogResourcePrimaryScope: Record<M2mDeliveryLogResourceType, ResourcePrimaryScope> = {\n [CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_M2M_WEBHOOK_DELIVERY_LOG]: ResourcePrimaryScope.APPLICATION,\n};\n\ntype M2mDeliveryFactoryCfg = ReturnType<\n (typeof m2mWebhookDeliveryLogPolymorphicFactories)[CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG]\n>;\ntype M2mDeliveryCustomOp = NonNullable<M2mDeliveryFactoryCfg['customOperation']>;\ntype M2mDeliveryCoreOp =\n | Op.READ\n | Op.LIST\n | Op.SEARCH\n | Op.CREATE\n | Op.UPDATE\n | Op.DELETE\n | Op.DELETE_MANY;\ntype M2mDeliveryMain = typeof M2MWebhookDeliveryLogBaseSchema;\n\nfunction buildM2mWebhookDeliveryLogSpecification(\n resourceType: M2mDeliveryLogResourceType,\n memberName: M2mDeliveryLogResourceTypeMember,\n): ResourceSpecificationConfig<M2mDeliveryCustomOp, M2mDeliveryCoreOp, M2mDeliveryMain> {\n const isOrganizationScope = resourceType === CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG;\n const scopeIdentity = isOrganizationScope\n ? { organizationId: 'org_01JEXAMPLE' }\n : { applicationId: 'app_01JEXAMPLE' };\n const channel = isOrganizationScope\n ? CoreM2MNotificationChannel.WEBHOOK_ORGANIZATION\n : CoreM2MNotificationChannel.WEBHOOK_APPLICATION;\n const deliveryIdentity = {\n _id: 'delivery_01JEXAMPLE',\n endpointId: 'orders-primary',\n channel,\n resourceIdentifier: 'orders',\n operationIdentifier: 'create',\n httpUrl: 'https://partners.example.com/webhooks/orders',\n payloadHash: '31da863f127a6c22b91b5cc85081c382b02039a9c8c4b30db2cc3172de31d2d8',\n payload: { event: 'order.created', orderId: 'order_01JEXAMPLE' },\n signatureJti: 'webhook-signature-01JEXAMPLE',\n createdAt: '2026-08-18T09:30:00.000Z',\n updatedAt: '2026-08-18T09:32:12.000Z',\n ...scopeIdentity,\n } as const;\n const failedDeliveryExample = {\n ...deliveryIdentity,\n status: M2MWebhookDeliveryLogStatus.FAILED,\n attemptCount: 5,\n lastAttemptAt: '2026-08-18T09:32:12.000Z',\n responseStatus: 503,\n responseBodyTruncated: 'Service temporarily unavailable',\n failureReason: 'The receiver returned HTTP 503 after the final retry.',\n failedAt: '2026-08-18T09:32:12.000Z',\n } as const;\n const retriedDeliveryExample = {\n ...deliveryIdentity,\n status: M2MWebhookDeliveryLogStatus.PENDING,\n attemptCount: 0,\n nextAttemptAt: '2026-08-18T09:35:00.000Z',\n } as const;\n const deliveryPageExample = {\n data: [failedDeliveryExample],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n } as const;\n\n return resourceSpecification<M2mDeliveryCustomOp, M2mDeliveryCoreOp, M2mDeliveryMain>(\n m2mWebhookDeliveryLogPolymorphicFactories[resourceType],\n M2MWebhookDeliveryLogBaseSchema,\n ({ schemaShape }) => ({\n purpose: 'Persist every outbound M2M webhook POST (queue entry, delivery status, HTTP evidence, and signing metadata) for org- or app-scoped admin review and retry.',\n businessRole: 'The user-visible event log and the worker’s durable queue for asynchronous webhook delivery — one row per (scope × target endpoint × fire).',\n lifecycleRole: 'Rows move PENDING → IN_FLIGHT → DELIVERED, or PENDING/IN_FLIGHT → FAILED, with `attemptCount` and `nextAttemptAt` governing back-off; RETRY and PURGE_OLD custom ops re-queue or clean history.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.NOTIFICATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'M2MWebhookDeliveryLogBaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'm2mWebhookDeliveryLogPolymorphicFactories',\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 customEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'M2MWebhookDeliveryLog_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'The polymorphism engine injects `organizationId` (ORG variant) or `applicationId` (APP variant) on the document — those FKs are not on the base Zod object.',\n ],\n },\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Unique id for a single delivery log record and lease token anchor for the worker.',\n importance: FieldSemanticImportance.PRIMARY,\n semanticRole: 'identifier',\n }),\n endpointId: schemaShape.endpointId.stringSpec({\n meaning: 'Stable FK to `webhookConfig.endpoints[].id` at enqueue time so historical records survive endpoint renames/URL changes.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n channel: schemaShape.channel.enumSpec({\n meaning: 'Which M2M channel the originating operation fired (must be compatible with the resource’s primary scope in the dispatcher).',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreM2MNotificationChannel',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [CoreM2MNotificationChannel.WEBHOOK_ORGANIZATION]: { meaning: 'Org-scoped outbound webhook (requires an org id in the execution context).' },\n [CoreM2MNotificationChannel.WEBHOOK_APPLICATION]: { meaning: 'App-scoped outbound webhook (resolves the app id from `appConfigService`).' },\n },\n }),\n resourceIdentifier: schemaShape.resourceIdentifier.stringSpec({\n meaning: 'Originating `CoreResourceType` string (or app resource key) that produced the M2M payload.',\n semanticRole: 'code',\n }),\n operationIdentifier: schemaShape.operationIdentifier.stringSpec({\n meaning: 'Operation or custom-op identifier that the serializer used when building the POST body (used for support correlation).',\n semanticRole: 'code',\n }),\n variantKey: schemaShape.variantKey.stringSpec({\n meaning: 'Optional default vs named operation variant, when the originating op exposed multiple API variants.',\n }),\n httpUrl: schemaShape.httpUrl.stringSpec({\n meaning: 'Snapshot of the destination URL that was used for this attempt (duplicated from the config so URL edits do not rewrite history).',\n importance: FieldSemanticImportance.PRIMARY,\n semanticRole: 'uri',\n }),\n payloadHash: schemaShape.payloadHash.stringSpec({\n meaning: 'SHA-256 of the JSON body, mirrored into the signed JWT and used to detect replays or tampering.',\n semanticRole: 'code',\n }),\n status: schemaShape.status.enumSpec({\n meaning: 'Current queue/delivery state for the worker and admin filters.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'M2MWebhookDeliveryLogStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.CONST_OBJECT,\n },\n values: {\n [M2MWebhookDeliveryLogStatus.PENDING]: { meaning: 'Record is either waiting in the queue or has been re-queued for another attempt after a transient failure.' },\n [M2MWebhookDeliveryLogStatus.IN_FLIGHT]: { meaning: 'A worker currently holds a lease and is trying to send the HTTP request.' },\n [M2MWebhookDeliveryLogStatus.DELIVERED]: { meaning: 'HTTP success path with signature validated at the consumer; terminal success.' },\n [M2MWebhookDeliveryLogStatus.FAILED]: { meaning: 'Terminal failure: exhausted attempt budget or a non-retryable 4xx class error.' },\n },\n }),\n attemptCount: schemaShape.attemptCount.numberSpec({\n meaning: 'Number of send attempts (including successes that still increment the counter, per worker policy).',\n unit: 'count',\n }),\n lastAttemptAt: schemaShape.lastAttemptAt.dateSpec({\n meaning: 'When the most recent send attempt started or finished, depending on writer semantics.',\n temporalRole: 'occurred',\n }),\n nextAttemptAt: schemaShape.nextAttemptAt.dateSpec({\n meaning: 'When the next retry is eligible; indexed for the worker’s polling query on `(status, nextAttemptAt)`.',\n temporalRole: 'scheduled',\n }),\n responseStatus: schemaShape.responseStatus.numberSpec({\n meaning: 'Last observed HTTP status code (present even for successes for observability).',\n }),\n responseBodyTruncated: schemaShape.responseBodyTruncated.stringSpec({\n meaning: 'First 4 KB of the HTTP response (when captured) to help debug remote listener failures.',\n }),\n failureReason: schemaShape.failureReason.stringSpec({\n meaning: 'Human-readable last error string when `status=failed` (worker-set).',\n }),\n signatureJti: schemaShape.signatureJti.stringSpec({\n meaning: 'Matches the JWT `jti` and `X-Webhook-Signature` header so the consumer can look up the exact signing key material.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n deliveredAt: schemaShape.deliveredAt.dateSpec({\n meaning: 'Timestamp when a terminal `DELIVERED` state was recorded.',\n temporalRole: 'occurred',\n }),\n failedAt: schemaShape.failedAt.dateSpec({\n meaning: 'Timestamp when a terminal `FAILED` state was recorded.',\n temporalRole: 'occurred',\n }),\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the record was enqueued (immutable upper bound for retention policies).',\n temporalRole: 'creation',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When status / attempt counters / timestamps last changed for this id.',\n temporalRole: 'modified',\n }),\n },\n operations: {\n [Op.READ]: {\n /*\n * `payload` is stored opaquely and is deliberately not broken into documented fields.\n * That is a storage decision the reader of this sentence does not need; what they DO\n * need is that it comes back whole and carries whatever the event carried.\n */\n purpose: 'Inspect one delivery attempt using the fields documented above (status, URL snapshot, hashes, HTTP evidence, correlation ids). The stored `payload` is returned whole rather than broken into documented fields — treat it as sensitive; see `businessConstraints`.',\n outcome: 'Operators can see whether a business event was delivered and, if not, the precise failure class.',\n whenToUse: 'Use when triaging a customer ticket referencing a `deliveryLogId` or `signatureJti`.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The delivery log record for the supplied id was found and its status, URL snapshot, HTTP evidence, and signing metadata are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery log row exists for the supplied id in this scope (never enqueued, or already removed by `PURGE_OLD`).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role; because `payload` may embed serialized customer data, reads are gated to roles that already see that data (see `businessConstraints`).' },\n ],\n idempotent: true,\n examples: [{\n title: 'Inspect a failed order webhook delivery',\n response: failedDeliveryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: { examples: [] },\n summary: { examples: [] },\n },\n },\n [Op.LIST]: {\n purpose: 'Browse recent delivery attempts in chronological order, filtered by the repository’s search defaults.',\n outcome: 'Admins can scan for spikes in `FAILED` rows or revalidation after URL rotation.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) chronological page of delivery log records in this scope.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role required to browse the delivery log (rows may carry serialized customer payloads).' },\n ],\n idempotent: true,\n examples: [{\n title: 'Browse recent delivery attempts',\n request: { page: 1, limit: 20, sort: 'createdAt:desc' },\n response: deliveryPageExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: { examples: [] },\n summary: { examples: [] },\n },\n },\n [Op.SEARCH]: {\n purpose: 'Filter log rows on status, `endpointId`, channel, date windows, and operation identifiers to isolate incidents.',\n outcome: 'Security and ops can produce CSV-grade subsets without an external data warehouse in small deployments.',\n whenToUse: 'Use in admin dashboards; heavy analytics may still go to a warehouse — this is the operational “small query” path.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of delivery log records matching the status / endpoint / channel / date-window / operation filters.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role required to search the delivery log.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Find failures for one endpoint',\n request: {\n q: 'orders',\n status: M2MWebhookDeliveryLogStatus.FAILED,\n channel,\n endpointId: 'orders-primary',\n page: 1,\n limit: 20,\n sort: 'createdAt:desc',\n },\n response: deliveryPageExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.CREATE]: {\n purpose: 'Enqueue a new delivery row when a resource operation with an M2M channel fires.',\n outcome: 'The worker pool can find ready rows via the `(status, nextAttemptAt)` index.',\n whenToUse: 'Repository-only: invoked by the dispatcher, never by a human HTTP client.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A `PENDING` delivery record was enqueued and is now discoverable by the worker pool. Internal/service write path — the dispatcher fires this, never a human HTTP client.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The enqueue payload fails schema validation (e.g. missing `endpointId`, `httpUrl`, or `channel`).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-dispatcher caller attempts to enqueue a delivery row directly.' },\n ],\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Drive the delivery lifecycle status transitions (PENDING → IN_FLIGHT → DELIVERED/FAILED) with `attemptCount` / `nextAttemptAt` / terminal-timestamp writes.',\n outcome: 'The worker can advance a row through its lifecycle so the `(status, nextAttemptAt)` index stays accurate for polling and back-off.',\n whenToUse: 'Repository-only: invoked by the dispatcher/worker (`markInFlight` / `markDelivered` / `markFailedAttempt` / `markFinallyFailed`), never by a human HTTP client — admins act via the `RETRY` custom operation.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The delivery record’s status / attempt counters / timestamps were updated. Internal/service write path — the worker fires this, never a human HTTP client.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery log row exists for the supplied id to update.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-dispatcher caller attempts to mutate a delivery row directly; UI flows must use the `RETRY` custom operation.' },\n ],\n idempotent: false,\n },\n [Op.DELETE]: {\n purpose: 'Reserved for `PURGE_OLD` and internal cleanup — no public single-row delete to keep the audit trail honest.',\n outcome: 'Old rows are removed in bulk, not opportunistically per UI click, matching the high-risk gating in the config.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'An internal/maintenance single-record delete completed; no body is returned. Intentionally not a public per-click operation — routine cleanup goes through `PURGE_OLD`.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery log row exists for the supplied id to delete.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an operator authorized for exceptional single-row maintenance deletes; UI flows must use `PURGE_OLD` instead.' },\n ],\n idempotent: true,\n },\n [Op.DELETE_MANY]: {\n purpose: 'Bulk twin of `DELETE` — the actual `PURGE_OLD` write path: one repository round trip drops every terminal `DELIVERED`/`FAILED` row older than the requested retention window.',\n outcome: 'Retention purges scale with one bulk delete instead of N per-row deletes; non-terminal rows are never touched (the drain owns them).',\n whenToUse: 'Repository-only — never a public HTTP surface. Admins purge via the `PURGE_OLD` custom operation, which owns request validation and the purge summary response.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The matched terminal records were bulk-deleted; the `PURGE_OLD` wrapper 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_OLD`.' },\n ],\n idempotent: true,\n },\n [M2MWebhookDeliveryLog_Operations.RETRY]: {\n operationId: M2MWebhookDeliveryLog_Operations.RETRY,\n purpose: 'Re-queue a `FAILED` row (reset to pending / zero attempts per worker contract) for manual replay.',\n outcome: 'Operators can attempt redelivery after fixing the downstream listener without re-sending the originating business event.',\n whenToUse: 'Use after a partner confirms their endpoint or certificate is healthy again.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The `FAILED` record was reset to `PENDING` with attempt counters cleared, and the worker pool will re-attempt delivery; the re-queued record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery log row exists for the supplied id to retry.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role required to trigger a manual redelivery.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The row is not in a retryable terminal `FAILED` state (e.g. it is still `PENDING`/`IN_FLIGHT`, or already `DELIVERED`), so a manual re-queue is illegal.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Retry after the receiver recovers',\n request: {},\n response: retriedDeliveryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [M2MWebhookDeliveryLog_Operations.PURGE_OLD]: {\n operationId: M2MWebhookDeliveryLog_Operations.PURGE_OLD,\n purpose: 'Bulk-delete rows older than `N` days (delivered or failed) to bound storage in busy tenants.',\n outcome: 'Tenants can comply with a data-retention policy without asking an operator to remove records by hand.',\n whenToUse: 'Use in scheduled admin jobs (or manual compliance runs) with explicit `olderThanDays` guardrails.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'Records older than the supplied `olderThanDays` window were bulk-deleted and a count of purged records is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `olderThanDays` guardrail is missing, non-numeric, or below the configured minimum retention floor.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role required to run a bulk retention purge.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Purge terminal delivery history older than 30 days',\n request: { olderThanDays: 30 },\n response: {\n purgedCount: 47,\n message: 'Purged 47 delivered/failed webhook deliveries older than 30 day(s).',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n businessConstraints: [\n 'The `payload` field stores `z.unknown()` JSON at rest (full operation serialization per plan). It is intentionally not expanded into `fields.*` here because the shape is the arbitrary API response; treat any READ that surfaces `payload` as PII/secret handling.',\n 'Do not use `Op.DELETE` for routine UI — prefer `PURGE_OLD` to maintain structured audit logs; single-row delete is for exceptional maintenance.',\n 'Because payloads may embed serialized API responses, treat READ/LIST as sensitive: scope RBAC to org-admin or app-super-admin roles that already see customer data.',\n ],\n }),\n { resourcePrimaryScope: m2mDeliveryLogResourcePrimaryScope[resourceType] },\n );\n}\n\nexport const organizationM2mWebhookDeliveryLogResourceSpecification = buildM2mWebhookDeliveryLogSpecification(\n CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG,\n 'ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG',\n);\n\nexport const applicationM2mWebhookDeliveryLogResourceSpecification = buildM2mWebhookDeliveryLogSpecification(\n CoreResourceType.APPLICATION_M2M_WEBHOOK_DELIVERY_LOG,\n 'APPLICATION_M2M_WEBHOOK_DELIVERY_LOG',\n);\n"]}
|
package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* @see `.cursor/plans/notification-badges-polymorphism-refactor.md`
|
|
18
18
|
*/
|
|
19
19
|
import { CoreResourceOperation as Op, ResourcePrimaryScope } from '@wildo-ai/saas-models';
|
|
20
|
-
export declare const userNotificationBadgesResourceSpecification: import("../../../_core").ResourceSpecificationConfig<undefined, Op.READ | Op.UPDATE | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
|
|
20
|
+
export declare const userNotificationBadgesResourceSpecification: import("../../../_core").ResourceSpecificationConfig<undefined, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
|
|
21
21
|
identifier: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>;
|
|
22
22
|
_id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>;
|
|
23
23
|
count: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodNumber>;
|
package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-badges.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/notifications/resources/notification-badges.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAQH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI3B,oBAAoB,EAErB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"notification-badges.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/notifications/resources/notification-badges.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAQH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI3B,oBAAoB,EAErB,MAAM,uBAAuB,CAAC;AA4M/B,eAAO,MAAM,2CAA2C;;;;;;;;iCAmGvD,CAAC;AAEF,eAAO,MAAM,mDAAmD;;;;;;;;iCA+F/D,CAAC"}
|
package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js
CHANGED
|
@@ -20,6 +20,7 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
|
|
|
20
20
|
import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
|
|
21
21
|
import { CoreResourceOperation as Op, NotificationBadgeOrganizationSchema, NotificationBadgeUserSelfSchema, organizationNotificationBadgesResourceConfiguration_InitializationFactory, ResourcePrimaryScope, userNotificationBadgesResourceConfiguration_InitializationFactory, } from '@wildo-ai/saas-models';
|
|
22
22
|
import { HttpResponseStatusCode, resourceSpecification } from '../../../_core/index.js';
|
|
23
|
+
import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
|
|
23
24
|
const BADGE_LIST_REQUEST_EXAMPLE = {
|
|
24
25
|
page: 1,
|
|
25
26
|
limit: 20,
|
|
@@ -45,7 +46,7 @@ const buildBadgeReadListOps = ({ readAuthError, badgeExample, summaryExample, })
|
|
|
45
46
|
whenToUse: 'Use when a client needs to refresh one known badge row by its API id. Use LIST to discover all materialized badge identifiers in the scope.',
|
|
46
47
|
importance: FieldSemanticImportance.PRIMARY,
|
|
47
48
|
responseStatuses: [
|
|
48
|
-
{ code: HttpResponseStatusCode.OK_200, meaning: 'The materialized badge
|
|
49
|
+
{ code: HttpResponseStatusCode.OK_200, meaning: 'The materialized badge record is visible in the caller’s scope and its identifier, count, and timestamps are returned.' },
|
|
49
50
|
],
|
|
50
51
|
errorScenarios: [
|
|
51
52
|
readAuthError,
|
|
@@ -79,7 +80,7 @@ const buildBadgeReadListOps = ({ readAuthError, badgeExample, summaryExample, })
|
|
|
79
80
|
outcome: 'The caller receives a paginated inventory of application-defined badge identifiers and their current counts.',
|
|
80
81
|
whenToUse: 'Use when synchronizing badge state after reconnecting a session or switching organization context.',
|
|
81
82
|
responseStatuses: [
|
|
82
|
-
{ code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) collection of materialized badge
|
|
83
|
+
{ code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) collection of materialized badge records in the caller’s scope.' },
|
|
83
84
|
],
|
|
84
85
|
errorScenarios: [readAuthError],
|
|
85
86
|
idempotent: true,
|
|
@@ -123,7 +124,7 @@ const buildBadgeCreateUpdateOps = (writeRoleLabel) => ({
|
|
|
123
124
|
whenToUse: 'Not a public app call — repository-only writers (`REPOSITORY_ONLY`) drive this from `NotificationBadgeBackendService`.',
|
|
124
125
|
importance: FieldSemanticImportance.PRIMARY,
|
|
125
126
|
responseStatuses: [
|
|
126
|
-
{ code: HttpResponseStatusCode.CREATED_201, meaning: 'A badge
|
|
127
|
+
{ code: HttpResponseStatusCode.CREATED_201, meaning: 'A badge record was materialized with its initial `count` and timestamps. Internal/service write path — `NotificationBadgeBackendService` drives this, not a public app call.' },
|
|
127
128
|
],
|
|
128
129
|
errorScenarios: [
|
|
129
130
|
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The badge row fails schema validation (e.g. a negative `count` or an unrecognized identifier).', errorCode: 'VALIDATION_FAILED' },
|
|
@@ -137,7 +138,7 @@ const buildBadgeCreateUpdateOps = (writeRoleLabel) => ({
|
|
|
137
138
|
whenToUse: 'Not a public app call — internal notification dispatchers own these writes.',
|
|
138
139
|
importance: FieldSemanticImportance.PRIMARY,
|
|
139
140
|
responseStatuses: [
|
|
140
|
-
{ code: HttpResponseStatusCode.OK_200, meaning: 'The counter was adjusted (increment / decrement / set / reset-to-zero) and the updated badge
|
|
141
|
+
{ code: HttpResponseStatusCode.OK_200, meaning: 'The counter was adjusted (increment / decrement / set / reset-to-zero) and the updated badge record is returned. Internal/service write path owned by the notification dispatchers.' },
|
|
141
142
|
],
|
|
142
143
|
errorScenarios: [
|
|
143
144
|
{ code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No badge row exists for the (scope, identifier) pair to adjust — the dispatcher must CREATE it before incrementing.' },
|
|
@@ -151,7 +152,7 @@ const buildBadgeCreateUpdateOps = (writeRoleLabel) => ({
|
|
|
151
152
|
outcome: 'The badge row is physically removed together with its owning user/organization — normal badge lifecycle resets `count` to 0, but a deleted parent takes its badges with it rather than orphaning them.',
|
|
152
153
|
whenToUse: 'Not a public app call — invoked only by the composition delete cascade when the owning user/org is deleted.',
|
|
153
154
|
responseStatuses: [
|
|
154
|
-
{ code: HttpResponseStatusCode.OK_200, meaning: 'The badge
|
|
155
|
+
{ code: HttpResponseStatusCode.OK_200, meaning: 'The badge record was deleted as part of the owning scope entity’s deletion cascade.' },
|
|
155
156
|
],
|
|
156
157
|
// REPOSITORY_ONLY variant (super-admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.
|
|
157
158
|
idempotent: true,
|
|
@@ -192,6 +193,7 @@ export const userNotificationBadgesResourceSpecification = resourceSpecification
|
|
|
192
193
|
businessRole: 'Lets a client restore per-user navigation and inbox counts without calculating each count locally.',
|
|
193
194
|
lifecycleRole: 'A badge row appears after its identifier first produces a count, changes as the underlying event or query changes, and normally resets to zero instead of being deleted.',
|
|
194
195
|
audience: LabelAudience.END_USER,
|
|
196
|
+
subDomain: EngineResourceSubDomain.NOTIFICATIONS,
|
|
195
197
|
codeHandling: {
|
|
196
198
|
mainSchema: {
|
|
197
199
|
packageName: '@wildo-ai/saas-models',
|
|
@@ -230,18 +232,18 @@ export const userNotificationBadgesResourceSpecification = resourceSpecification
|
|
|
230
232
|
},
|
|
231
233
|
fields: {
|
|
232
234
|
_id: schemaShape._id.stringSpec({
|
|
233
|
-
meaning: 'MongoDB document id for this user-scoped badge
|
|
235
|
+
meaning: 'MongoDB document id for this user-scoped badge record.',
|
|
234
236
|
whyItMatters: 'Stable anchor for updates and list projections per user + identifier.',
|
|
235
237
|
semanticRole: 'identifier',
|
|
236
238
|
importance: FieldSemanticImportance.PRIMARY,
|
|
237
239
|
}),
|
|
238
240
|
userId: schemaShape.userId.foreignKeySpec({
|
|
239
|
-
meaning: 'The Wildo `users`
|
|
241
|
+
meaning: 'The Wildo `users` record this badge count belongs to.',
|
|
240
242
|
whyItMatters: 'Filters LIST/READ through the user-self access strategy so a user can never read another user’s counts.',
|
|
241
243
|
importance: FieldSemanticImportance.PRIMARY,
|
|
242
244
|
}),
|
|
243
245
|
count: schemaShape.count.numberSpec({
|
|
244
|
-
meaning: 'Non-negative badge counter displayed in UI — reset paths write 0 instead of deleting the
|
|
246
|
+
meaning: 'Non-negative badge counter displayed in UI — reset paths write 0 instead of deleting the record.',
|
|
245
247
|
whyItMatters: 'Drives the numeric bubble next to the icon the user actually sees after notification fan-out.',
|
|
246
248
|
importance: FieldSemanticImportance.PRIMARY,
|
|
247
249
|
unit: 'count',
|
|
@@ -268,7 +270,8 @@ export const userNotificationBadgesResourceSpecification = resourceSpecification
|
|
|
268
270
|
},
|
|
269
271
|
businessConstraints: [
|
|
270
272
|
'The `scope` field is a `z.literal(ResourcePrimaryScope.USER_SELF)` discriminant on this schema — it is intentionally not expanded in `fields` because Zod literals do not expose the `*Spec` decorator helpers the specification layer expects on every entry.',
|
|
271
|
-
'The `identifier` field uses `NotificationBadgeIdentifierSchema` (`z.string().min(1)
|
|
273
|
+
'The `identifier` field uses `NotificationBadgeIdentifierSchema` (`z.string().min(1)`, refusing the `:` key separator). No canonical (core) identifiers ship today — the aspirational placeholders were removed with the launcher-badge retract; a `CoreNotificationBadgeIdentifiers` enum is unioned back in when the surfacing is reintroduced with a real producer. Document badge keys in prose here.',
|
|
274
|
+
'The `identifier` is NOT the badge\'s identity — a definition is `(scope, identifier)` and is NAMED by the KEY `<scope>:<identifier>`. The identifier alone is what a persisted row carries, because each scope owns its own collection so the scope is implicit in the table. Everything that REFERS to a badge — a launcher item\'s `notificationBadgeRef`, an operation\'s `notificationBadgeOperations[].badgeRef`, the browser count store — uses the key, and two definitions sharing one key are refused at startup. Do not reintroduce an identifier-only lookup: it made the second of two same-identifier definitions unreachable and gave it the first\'s count.',
|
|
272
275
|
'There is no PUBLIC/API delete; badge counts reset to 0 in normal use. A REPOSITORY_ONLY DELETE was added solely for the composition `onParentDelete` cascade (physical teardown when the owning user is deleted). Other compliance “forget me” paths still clear counts or drop rows via repository tooling that understands badge semantics.',
|
|
273
276
|
'Writes are not intended for public arbitrary callers — only internal dispatchers and admin automation should touch CREATE/UPDATE despite the `APP_ADMIN_SUPER_ADMIN` role token on the repository variant.',
|
|
274
277
|
],
|
|
@@ -278,6 +281,7 @@ export const organizationNotificationBadgesResourceSpecification = resourceSpeci
|
|
|
278
281
|
businessRole: 'Lets every authorized organization member see the same outstanding-work indicators in shared navigation and dashboards.',
|
|
279
282
|
lifecycleRole: 'A badge row appears after its identifier first produces a count, changes as the shared condition changes, and normally resets to zero instead of being deleted.',
|
|
280
283
|
audience: LabelAudience.END_USER,
|
|
284
|
+
subDomain: EngineResourceSubDomain.NOTIFICATIONS,
|
|
281
285
|
codeHandling: {
|
|
282
286
|
mainSchema: {
|
|
283
287
|
packageName: '@wildo-ai/saas-models',
|
|
@@ -351,7 +355,7 @@ export const organizationNotificationBadgesResourceSpecification = resourceSpeci
|
|
|
351
355
|
},
|
|
352
356
|
businessConstraints: [
|
|
353
357
|
'The `scope` field is a `z.literal(ResourcePrimaryScope.ORGANIZATIONS)` discriminant — omitted from `fields` for the same Zod-literal + `*Spec` decorator reason as the USER variant (see the USER variant `businessConstraints`).',
|
|
354
|
-
'The `identifier` field matches the USER variant (`NotificationBadgeIdentifierSchema`) — see the USER variant `businessConstraints`
|
|
358
|
+
'The `identifier` field matches the USER variant (`NotificationBadgeIdentifierSchema`) — see the USER variant `businessConstraints` bullets that explain the identifier constraints and why the badge KEY, not the identifier, is what refers to a definition.',
|
|
355
359
|
'Any org member with LIST rights sees the same aggregate count — it is not a per-seat personalization surface.',
|
|
356
360
|
'Because writes are `REPOSITORY_ONLY`, product teams must not expose raw repository endpoints for badge tuning without a dedicated admin workflow.',
|
|
357
361
|
],
|
package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-badges.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/notifications/resources/notification-badges.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,mCAAmC,EACnC,+BAA+B,EAC/B,yEAAyE,EACzE,oBAAoB,EACpB,iEAAiE,GAClE,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAuB5F,MAAM,0BAA0B,GAAG;IACjC,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,EAAE;IACT,IAAI,EAAE,gBAAgB;CACd,CAAC;AAEX,SAAS,SAAS,CAAC,GAAsC;IACvD,OAAO;QACL,IAAI,EAAE,CAAC,GAAG,CAAC;QACX,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,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esContent":["/**\n * Resources: `userNotificationBadges` + `organizationNotificationBadges` — Wildo SaaS engine specification (backend-only).\n *\n * Polymorphic pair implemented as **two side-by-side factories** (lifecycle-state precedent), not\n * `createPolymorphicResourceConfigurations`, because USER and ORG variants differ in Zod shape, role\n * surfaces, and parent scope anchors.\n *\n * Inputs:\n * - Schemas: engine/saas-models/src/notifications/notification-badges.schemas.ts\n * → `NotificationBadgeUserSelfSchema`, `NotificationBadgeOrganizationSchema`\n * - Factories: engine/saas-models/src/notifications/notification-badges.shared.resources-config.schemas.ts\n * → `userNotificationBadgesResourceConfiguration_InitializationFactory`,\n * → `organizationNotificationBadgesResourceConfiguration_InitializationFactory`\n * - Custom operations: none\n * - UI presets: none\n *\n * @see `.cursor/plans/notification-badges-polymorphism-refactor.md`\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n NotificationBadgeOrganizationSchema,\n NotificationBadgeUserSelfSchema,\n organizationNotificationBadgesResourceConfiguration_InitializationFactory,\n ResourcePrimaryScope,\n userNotificationBadgesResourceConfiguration_InitializationFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\n\n/**\n * One authored auth-failure scenario for the READ/LIST surface, parameterized\n * per polymorphic variant. The USER_SELF variant fails closed with `401`\n * (an unauthenticated caller has no signed-in identity whose private counts\n * to read), while the ORG variant fails with `403` (an authenticated member\n * of the wrong org/role). Badge rows are lazily materialized, so the read\n * surface intentionally does NOT author a `404`: a never-yet-incremented\n * counter resolves to a zero/default count rather than a missing-resource\n * error.\n */\ntype BadgeReadAuthScenario = {\n code: HttpResponseStatusCode.UNAUTHORIZED_401 | HttpResponseStatusCode.FORBIDDEN_403;\n when: string;\n};\n\ntype BadgeReadListDocumentation = {\n readonly readAuthError: BadgeReadAuthScenario;\n readonly badgeExample: Readonly<Record<string, unknown>>;\n readonly summaryExample: Readonly<Record<string, unknown>>;\n};\n\nconst BADGE_LIST_REQUEST_EXAMPLE = {\n page: 1,\n limit: 20,\n sort: 'updatedAt:desc',\n} as const;\n\nfunction badgePage(row: Readonly<Record<string, unknown>>) {\n return {\n data: [row],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n } as const;\n}\n\n/**\n * Build the shared READ/LIST operation prose for one badge variant, layering\n * the variant-specific auth-failure scenario on top of the common\n * success-path semantics. Returns freshly-constructed objects (mutable\n * `responseStatuses` / `errorScenarios` arrays) so the result splices cleanly\n * into each variant's `operations` map.\n */\nconst buildBadgeReadListOps = ({\n readAuthError,\n badgeExample,\n summaryExample,\n}: BadgeReadListDocumentation) => ({\n [Op.READ]: {\n purpose: 'Read one materialized notification-badge counter in the caller’s user or organization scope.',\n outcome: 'The caller receives the application-defined badge identifier, its current non-negative count, and the time it last changed.',\n whenToUse: 'Use when a client needs to refresh one known badge row by its API id. Use LIST to discover all materialized badge identifiers in the scope.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The materialized badge row is visible in the caller’s scope and its identifier, count, and timestamps are returned.' },\n ],\n errorScenarios: [\n readAuthError,\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No materialized badge row with the supplied API id exists in the caller’s scope. An identifier that has never produced a row is absent rather than synthesized by this endpoint.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Read one current notification badge',\n response: badgeExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Read one notification badge with available relationship context',\n response: badgeExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Read the compact badge count',\n response: summaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'List the notification-badge rows that have been materialized in the caller’s user or organization scope.',\n outcome: 'The caller receives a paginated inventory of application-defined badge identifiers and their current counts.',\n whenToUse: 'Use when synchronizing badge state after reconnecting a session or switching organization context.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) collection of materialized badge rows in the caller’s scope.' },\n ],\n errorScenarios: [readAuthError],\n idempotent: true,\n examples: [{\n title: 'List current notification badges',\n request: BADGE_LIST_REQUEST_EXAMPLE,\n response: badgePage(badgeExample),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'List notification badges with available relationship context',\n request: BADGE_LIST_REQUEST_EXAMPLE,\n response: badgePage(badgeExample),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'List compact badge counts',\n request: BADGE_LIST_REQUEST_EXAMPLE,\n response: badgePage(summaryExample),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n});\n\n/**\n * Build the shared CREATE/UPDATE operation prose for one badge variant. Both\n * writes are `REPOSITORY_ONLY` (dispatcher-driven), so a `403` is authored for\n * any non-dispatcher caller across both variants; the message names the\n * variant's role token. Returns freshly-constructed objects so the mutable\n * arrays splice into each variant's `operations` map.\n */\nconst buildBadgeCreateUpdateOps = (writeRoleLabel: string) => ({\n [Op.CREATE]: {\n purpose: 'Insert a new badge row when the dispatcher first materializes a badge identifier for this scope.',\n outcome: 'The platform can persist `count` and timestamps for a badge that did not yet exist in MongoDB.',\n whenToUse: 'Not a public app call — repository-only writers (`REPOSITORY_ONLY`) drive this from `NotificationBadgeBackendService`.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A badge row was materialized with its initial `count` and timestamps. Internal/service write path — `NotificationBadgeBackendService` drives this, not a public app call.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The badge row fails schema validation (e.g. a negative `count` or an unrecognized identifier).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: `A caller without the ${writeRoleLabel} repository role attempts to create a badge row — materialization is dispatcher-only.` },\n ],\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Adjust the counter (increment, decrement, set) or reset semantics for an existing badge row.',\n outcome: 'The UI layer receives updated counts through the normal resource read path and WebSocket bridge after the write.',\n whenToUse: 'Not a public app call — internal notification dispatchers own these writes.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The counter was adjusted (increment / decrement / set / reset-to-zero) and the updated badge row is returned. Internal/service write path owned by the notification dispatchers.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No badge row exists for the (scope, identifier) pair to adjust — the dispatcher must CREATE it before incrementing.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The counter mutation fails schema validation (e.g. a non-numeric delta).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: `A caller without the ${writeRoleLabel} repository role attempts to mutate a counter — only internal dispatchers own badge writes.` },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the badge row when its owning scope entity (user or organization) is deleted (composition `onParentDelete` cascade).',\n outcome: 'The badge row is physically removed together with its owning user/organization — normal badge lifecycle resets `count` to 0, but a deleted parent takes its badges with it rather than orphaning them.',\n whenToUse: 'Not a public app call — invoked only by the composition delete cascade when the owning user/org is deleted.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The badge row was deleted as part of the owning scope entity’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (super-admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n});\n\nconst USER_BADGE_EXAMPLE = {\n _id: 'user_badge_01JEXAMPLE',\n identifier: 'incomplete_items',\n scope: ResourcePrimaryScope.USER_SELF,\n userId: 'user_01JEXAMPLE',\n count: 4,\n createdAt: '2026-08-18T08:00:00.000Z',\n updatedAt: '2026-08-20T14:35:00.000Z',\n} as const;\n\nconst USER_BADGE_SUMMARY_EXAMPLE = {\n _id: USER_BADGE_EXAMPLE._id,\n identifier: USER_BADGE_EXAMPLE.identifier,\n count: USER_BADGE_EXAMPLE.count,\n updatedAt: USER_BADGE_EXAMPLE.updatedAt,\n} as const;\n\nconst ORGANIZATION_BADGE_EXAMPLE = {\n _id: 'organization_badge_01JEXAMPLE',\n identifier: 'pending_approvals',\n scope: ResourcePrimaryScope.ORGANIZATIONS,\n organizationId: 'org_01JEXAMPLE',\n count: 7,\n createdAt: '2026-08-17T09:00:00.000Z',\n updatedAt: '2026-08-20T15:10:00.000Z',\n} as const;\n\nconst ORGANIZATION_BADGE_SUMMARY_EXAMPLE = {\n _id: ORGANIZATION_BADGE_EXAMPLE._id,\n identifier: ORGANIZATION_BADGE_EXAMPLE.identifier,\n count: ORGANIZATION_BADGE_EXAMPLE.count,\n updatedAt: ORGANIZATION_BADGE_EXAMPLE.updatedAt,\n} as const;\n\nexport const userNotificationBadgesResourceSpecification = resourceSpecification(\n userNotificationBadgesResourceConfiguration_InitializationFactory,\n NotificationBadgeUserSelfSchema,\n ({ schemaShape }) => ({\n purpose: 'Expose the current notification-badge counters belonging to the signed-in user, keyed by application-defined badge identifiers.',\n businessRole: 'Lets a client restore per-user navigation and inbox counts without calculating each count locally.',\n lifecycleRole: 'A badge row appears after its identifier first produces a count, changes as the underlying event or query changes, and normally resets to zero instead of being deleted.',\n audience: LabelAudience.END_USER,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'NotificationBadgeUserSelfSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userNotificationBadgesResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'USER_NOTIFICATION_BADGES',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'USER variant: READ/LIST → `APP_USER` via `API_CALL`; CREATE/UPDATE → `APP_ADMIN_SUPER_ADMIN` via `REPOSITORY_ONLY` (dispatcher-only writes).',\n 'APPLICATION-scoped badges were removed in the polymorphism refactor — `NotificationScopeSchema` is `USER_SELF | ORGANIZATIONS` only.',\n 'Runtime `userNotifications[]` / `m2mNotifications[]` are absent on this resource — WebSocket/badge fan-out is handled in `NotificationBadgeBackendService`, not here.',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'MongoDB document id for this user-scoped badge row.',\n whyItMatters: 'Stable anchor for updates and list projections per user + identifier.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'The Wildo `users` row this badge count belongs to.',\n whyItMatters: 'Filters LIST/READ through the user-self access strategy so a user can never read another user’s counts.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n count: schemaShape.count.numberSpec({\n meaning: 'Non-negative badge counter displayed in UI — reset paths write 0 instead of deleting the row.',\n whyItMatters: 'Drives the numeric bubble next to the icon the user actually sees after notification fan-out.',\n importance: FieldSemanticImportance.PRIMARY,\n unit: 'count',\n }),\n\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When this badge document was first materialized for the (user, identifier) pair.',\n temporalRole: 'creation',\n }),\n\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When the counter or metadata last changed.',\n temporalRole: 'modified',\n }),\n },\n\n operations: {\n ...buildBadgeReadListOps({\n readAuthError: {\n code: HttpResponseStatusCode.UNAUTHORIZED_401,\n when: 'The request carries no authenticated user whose private badge counters can be read.',\n },\n badgeExample: USER_BADGE_EXAMPLE,\n summaryExample: USER_BADGE_SUMMARY_EXAMPLE,\n }),\n ...buildBadgeCreateUpdateOps('APP_ADMIN_SUPER_ADMIN'),\n },\n\n businessConstraints: [\n 'The `scope` field is a `z.literal(ResourcePrimaryScope.USER_SELF)` discriminant on this schema — it is intentionally not expanded in `fields` because Zod literals do not expose the `*Spec` decorator helpers the specification layer expects on every entry.',\n 'The `identifier` field uses `NotificationBadgeIdentifierSchema` (`z.string().min(1)`). No canonical (core) identifiers ship today — the aspirational placeholders were removed with the launcher-badge retract; a `CoreNotificationBadgeIdentifiers` enum is unioned back in when the surfacing is reintroduced with a real producer. Document badge keys in prose here.',\n 'There is no PUBLIC/API delete; badge counts reset to 0 in normal use. A REPOSITORY_ONLY DELETE was added solely for the composition `onParentDelete` cascade (physical teardown when the owning user is deleted). Other compliance “forget me” paths still clear counts or drop rows via repository tooling that understands badge semantics.',\n 'Writes are not intended for public arbitrary callers — only internal dispatchers and admin automation should touch CREATE/UPDATE despite the `APP_ADMIN_SUPER_ADMIN` role token on the repository variant.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n);\n\nexport const organizationNotificationBadgesResourceSpecification = resourceSpecification(\n organizationNotificationBadgesResourceConfiguration_InitializationFactory,\n NotificationBadgeOrganizationSchema,\n ({ schemaShape }) => ({\n purpose: 'Expose shared notification-badge counters for one organization, keyed by application-defined badge identifiers.',\n businessRole: 'Lets every authorized organization member see the same outstanding-work indicators in shared navigation and dashboards.',\n lifecycleRole: 'A badge row appears after its identifier first produces a count, changes as the shared condition changes, and normally resets to zero instead of being deleted.',\n audience: LabelAudience.END_USER,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'NotificationBadgeOrganizationSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'organizationNotificationBadgesResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'ORGANIZATION_NOTIFICATION_BADGES',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'ORG variant: READ/LIST → `ORG_MEMBER` via `API_CALL`; CREATE/UPDATE → `APP_ADMIN_SUPER_ADMIN` via `REPOSITORY_ONLY`.',\n 'Pairs with a separate `USER_NOTIFICATION_BADGES` resource type and Mongo collection (true polymorphic split, not a shared polymorphic factory map).',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Document id for the organization-level badge instance.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n organizationId: schemaShape.organizationId.foreignKeySpec({\n meaning: 'The organization whose aggregate count this badge represents.',\n whyItMatters: 'Used by the access layer so org members read shared counts while other tenants never see the row.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n count: schemaShape.count.numberSpec({\n meaning: 'Non-negative org aggregate for the given identifier.',\n importance: FieldSemanticImportance.PRIMARY,\n unit: 'count',\n }),\n\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the org-level badge was first materialized for this org + identifier pair.',\n temporalRole: 'creation',\n }),\n\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When the aggregate counter or metadata was last written.',\n temporalRole: 'modified',\n }),\n },\n\n operations: {\n ...buildBadgeReadListOps({\n readAuthError: {\n code: HttpResponseStatusCode.FORBIDDEN_403,\n when: 'The caller is not an organization member allowed to read the organization’s shared badge counters.',\n },\n badgeExample: ORGANIZATION_BADGE_EXAMPLE,\n summaryExample: ORGANIZATION_BADGE_SUMMARY_EXAMPLE,\n }),\n ...buildBadgeCreateUpdateOps('APP_ADMIN_SUPER_ADMIN'),\n },\n\n businessConstraints: [\n 'The `scope` field is a `z.literal(ResourcePrimaryScope.ORGANIZATIONS)` discriminant — omitted from `fields` for the same Zod-literal + `*Spec` decorator reason as the USER variant (see the USER variant `businessConstraints`).',\n 'The `identifier` field matches the USER variant (`NotificationBadgeIdentifierSchema`) — see the USER variant `businessConstraints` bullet that explains the enum ∪ string union and why it is omitted from `fields`.',\n 'Any org member with LIST rights sees the same aggregate count — it is not a per-seat personalization surface.',\n 'Because writes are `REPOSITORY_ONLY`, product teams must not expose raw repository endpoints for badge tuning without a dedicated admin workflow.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n);\n"]}
|
|
1
|
+
{"version":3,"file":"notification-badges.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/notifications/resources/notification-badges.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,mCAAmC,EACnC,+BAA+B,EAC/B,yEAAyE,EACzE,oBAAoB,EACpB,iEAAiE,GAClE,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,uBA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SACzB,CAAC;KACH;IAED,UAAU,EAAE;QACV,GAAG,qBAAqB,CAAC;YACvB,aAAa,EAAE;gBACb,IAAI,EAAE,sBAAsB,CAAC,aAAa;gBAC1C,IAAI,EAAE,oGAAoG;aAC3G;YACD,YAAY,EAAE,0BAA0B;YACxC,cAAc,EAAE,kCAAkC;SACnD,CAAC;QACF,GAAG,yBAAyB,CAAC,uBAAuB,CAAC;KACtD;IAED,mBAAmB,EAAE;QACnB,mOAAmO;QACnO,+PAA+P;QAC/P,+GAA+G;QAC/G,mJAAmJ;KACpJ;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,aAAa,EAAE,CAC7D,CAAC","sourcesContent":["/**\n * Resources: `userNotificationBadges` + `organizationNotificationBadges` — Wildo SaaS engine specification (backend-only).\n *\n * Polymorphic pair implemented as **two side-by-side factories** (lifecycle-state precedent), not\n * `createPolymorphicResourceConfigurations`, because USER and ORG variants differ in Zod shape, role\n * surfaces, and parent scope anchors.\n *\n * Inputs:\n * - Schemas: engine/saas-models/src/notifications/notification-badges.schemas.ts\n * → `NotificationBadgeUserSelfSchema`, `NotificationBadgeOrganizationSchema`\n * - Factories: engine/saas-models/src/notifications/notification-badges.shared.resources-config.schemas.ts\n * → `userNotificationBadgesResourceConfiguration_InitializationFactory`,\n * → `organizationNotificationBadgesResourceConfiguration_InitializationFactory`\n * - Custom operations: none\n * - UI presets: none\n *\n * @see `.cursor/plans/notification-badges-polymorphism-refactor.md`\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n NotificationBadgeOrganizationSchema,\n NotificationBadgeUserSelfSchema,\n organizationNotificationBadgesResourceConfiguration_InitializationFactory,\n ResourcePrimaryScope,\n userNotificationBadgesResourceConfiguration_InitializationFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\n/**\n * One authored auth-failure scenario for the READ/LIST surface, parameterized\n * per polymorphic variant. The USER_SELF variant fails closed with `401`\n * (an unauthenticated caller has no signed-in identity whose private counts\n * to read), while the ORG variant fails with `403` (an authenticated member\n * of the wrong org/role). Badge rows are lazily materialized, so the read\n * surface intentionally does NOT author a `404`: a never-yet-incremented\n * counter resolves to a zero/default count rather than a missing-resource\n * error.\n */\ntype BadgeReadAuthScenario = {\n code: HttpResponseStatusCode.UNAUTHORIZED_401 | HttpResponseStatusCode.FORBIDDEN_403;\n when: string;\n};\n\ntype BadgeReadListDocumentation = {\n readonly readAuthError: BadgeReadAuthScenario;\n readonly badgeExample: Readonly<Record<string, unknown>>;\n readonly summaryExample: Readonly<Record<string, unknown>>;\n};\n\nconst BADGE_LIST_REQUEST_EXAMPLE = {\n page: 1,\n limit: 20,\n sort: 'updatedAt:desc',\n} as const;\n\nfunction badgePage(row: Readonly<Record<string, unknown>>) {\n return {\n data: [row],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n } as const;\n}\n\n/**\n * Build the shared READ/LIST operation prose for one badge variant, layering\n * the variant-specific auth-failure scenario on top of the common\n * success-path semantics. Returns freshly-constructed objects (mutable\n * `responseStatuses` / `errorScenarios` arrays) so the result splices cleanly\n * into each variant's `operations` map.\n */\nconst buildBadgeReadListOps = ({\n readAuthError,\n badgeExample,\n summaryExample,\n}: BadgeReadListDocumentation) => ({\n [Op.READ]: {\n purpose: 'Read one materialized notification-badge counter in the caller’s user or organization scope.',\n outcome: 'The caller receives the application-defined badge identifier, its current non-negative count, and the time it last changed.',\n whenToUse: 'Use when a client needs to refresh one known badge row by its API id. Use LIST to discover all materialized badge identifiers in the scope.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The materialized badge record is visible in the caller’s scope and its identifier, count, and timestamps are returned.' },\n ],\n errorScenarios: [\n readAuthError,\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No materialized badge row with the supplied API id exists in the caller’s scope. An identifier that has never produced a row is absent rather than synthesized by this endpoint.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Read one current notification badge',\n response: badgeExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Read one notification badge with available relationship context',\n response: badgeExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Read the compact badge count',\n response: summaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'List the notification-badge rows that have been materialized in the caller’s user or organization scope.',\n outcome: 'The caller receives a paginated inventory of application-defined badge identifiers and their current counts.',\n whenToUse: 'Use when synchronizing badge state after reconnecting a session or switching organization context.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) collection of materialized badge records in the caller’s scope.' },\n ],\n errorScenarios: [readAuthError],\n idempotent: true,\n examples: [{\n title: 'List current notification badges',\n request: BADGE_LIST_REQUEST_EXAMPLE,\n response: badgePage(badgeExample),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'List notification badges with available relationship context',\n request: BADGE_LIST_REQUEST_EXAMPLE,\n response: badgePage(badgeExample),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'List compact badge counts',\n request: BADGE_LIST_REQUEST_EXAMPLE,\n response: badgePage(summaryExample),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n});\n\n/**\n * Build the shared CREATE/UPDATE operation prose for one badge variant. Both\n * writes are `REPOSITORY_ONLY` (dispatcher-driven), so a `403` is authored for\n * any non-dispatcher caller across both variants; the message names the\n * variant's role token. Returns freshly-constructed objects so the mutable\n * arrays splice into each variant's `operations` map.\n */\nconst buildBadgeCreateUpdateOps = (writeRoleLabel: string) => ({\n [Op.CREATE]: {\n purpose: 'Insert a new badge row when the dispatcher first materializes a badge identifier for this scope.',\n outcome: 'The platform can persist `count` and timestamps for a badge that did not yet exist in MongoDB.',\n whenToUse: 'Not a public app call — repository-only writers (`REPOSITORY_ONLY`) drive this from `NotificationBadgeBackendService`.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A badge record was materialized with its initial `count` and timestamps. Internal/service write path — `NotificationBadgeBackendService` drives this, not a public app call.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The badge row fails schema validation (e.g. a negative `count` or an unrecognized identifier).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: `A caller without the ${writeRoleLabel} repository role attempts to create a badge row — materialization is dispatcher-only.` },\n ],\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Adjust the counter (increment, decrement, set) or reset semantics for an existing badge row.',\n outcome: 'The UI layer receives updated counts through the normal resource read path and WebSocket bridge after the write.',\n whenToUse: 'Not a public app call — internal notification dispatchers own these writes.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The counter was adjusted (increment / decrement / set / reset-to-zero) and the updated badge record is returned. Internal/service write path owned by the notification dispatchers.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No badge row exists for the (scope, identifier) pair to adjust — the dispatcher must CREATE it before incrementing.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The counter mutation fails schema validation (e.g. a non-numeric delta).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: `A caller without the ${writeRoleLabel} repository role attempts to mutate a counter — only internal dispatchers own badge writes.` },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the badge row when its owning scope entity (user or organization) is deleted (composition `onParentDelete` cascade).',\n outcome: 'The badge row is physically removed together with its owning user/organization — normal badge lifecycle resets `count` to 0, but a deleted parent takes its badges with it rather than orphaning them.',\n whenToUse: 'Not a public app call — invoked only by the composition delete cascade when the owning user/org is deleted.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The badge record was deleted as part of the owning scope entity’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (super-admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n});\n\nconst USER_BADGE_EXAMPLE = {\n _id: 'user_badge_01JEXAMPLE',\n identifier: 'incomplete_items',\n scope: ResourcePrimaryScope.USER_SELF,\n userId: 'user_01JEXAMPLE',\n count: 4,\n createdAt: '2026-08-18T08:00:00.000Z',\n updatedAt: '2026-08-20T14:35:00.000Z',\n} as const;\n\nconst USER_BADGE_SUMMARY_EXAMPLE = {\n _id: USER_BADGE_EXAMPLE._id,\n identifier: USER_BADGE_EXAMPLE.identifier,\n count: USER_BADGE_EXAMPLE.count,\n updatedAt: USER_BADGE_EXAMPLE.updatedAt,\n} as const;\n\nconst ORGANIZATION_BADGE_EXAMPLE = {\n _id: 'organization_badge_01JEXAMPLE',\n identifier: 'pending_approvals',\n scope: ResourcePrimaryScope.ORGANIZATIONS,\n organizationId: 'org_01JEXAMPLE',\n count: 7,\n createdAt: '2026-08-17T09:00:00.000Z',\n updatedAt: '2026-08-20T15:10:00.000Z',\n} as const;\n\nconst ORGANIZATION_BADGE_SUMMARY_EXAMPLE = {\n _id: ORGANIZATION_BADGE_EXAMPLE._id,\n identifier: ORGANIZATION_BADGE_EXAMPLE.identifier,\n count: ORGANIZATION_BADGE_EXAMPLE.count,\n updatedAt: ORGANIZATION_BADGE_EXAMPLE.updatedAt,\n} as const;\n\nexport const userNotificationBadgesResourceSpecification = resourceSpecification(\n userNotificationBadgesResourceConfiguration_InitializationFactory,\n NotificationBadgeUserSelfSchema,\n ({ schemaShape }) => ({\n purpose: 'Expose the current notification-badge counters belonging to the signed-in user, keyed by application-defined badge identifiers.',\n businessRole: 'Lets a client restore per-user navigation and inbox counts without calculating each count locally.',\n lifecycleRole: 'A badge row appears after its identifier first produces a count, changes as the underlying event or query changes, and normally resets to zero instead of being deleted.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.NOTIFICATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'NotificationBadgeUserSelfSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userNotificationBadgesResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'USER_NOTIFICATION_BADGES',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'USER variant: READ/LIST → `APP_USER` via `API_CALL`; CREATE/UPDATE → `APP_ADMIN_SUPER_ADMIN` via `REPOSITORY_ONLY` (dispatcher-only writes).',\n 'APPLICATION-scoped badges were removed in the polymorphism refactor — `NotificationScopeSchema` is `USER_SELF | ORGANIZATIONS` only.',\n 'Runtime `userNotifications[]` / `m2mNotifications[]` are absent on this resource — WebSocket/badge fan-out is handled in `NotificationBadgeBackendService`, not here.',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'MongoDB document id for this user-scoped badge record.',\n whyItMatters: 'Stable anchor for updates and list projections per user + identifier.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'The Wildo `users` record this badge count belongs to.',\n whyItMatters: 'Filters LIST/READ through the user-self access strategy so a user can never read another user’s counts.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n count: schemaShape.count.numberSpec({\n meaning: 'Non-negative badge counter displayed in UI — reset paths write 0 instead of deleting the record.',\n whyItMatters: 'Drives the numeric bubble next to the icon the user actually sees after notification fan-out.',\n importance: FieldSemanticImportance.PRIMARY,\n unit: 'count',\n }),\n\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When this badge document was first materialized for the (user, identifier) pair.',\n temporalRole: 'creation',\n }),\n\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When the counter or metadata last changed.',\n temporalRole: 'modified',\n }),\n },\n\n operations: {\n ...buildBadgeReadListOps({\n readAuthError: {\n code: HttpResponseStatusCode.UNAUTHORIZED_401,\n when: 'The request carries no authenticated user whose private badge counters can be read.',\n },\n badgeExample: USER_BADGE_EXAMPLE,\n summaryExample: USER_BADGE_SUMMARY_EXAMPLE,\n }),\n ...buildBadgeCreateUpdateOps('APP_ADMIN_SUPER_ADMIN'),\n },\n\n businessConstraints: [\n 'The `scope` field is a `z.literal(ResourcePrimaryScope.USER_SELF)` discriminant on this schema — it is intentionally not expanded in `fields` because Zod literals do not expose the `*Spec` decorator helpers the specification layer expects on every entry.',\n 'The `identifier` field uses `NotificationBadgeIdentifierSchema` (`z.string().min(1)`, refusing the `:` key separator). No canonical (core) identifiers ship today — the aspirational placeholders were removed with the launcher-badge retract; a `CoreNotificationBadgeIdentifiers` enum is unioned back in when the surfacing is reintroduced with a real producer. Document badge keys in prose here.',\n 'The `identifier` is NOT the badge\\'s identity — a definition is `(scope, identifier)` and is NAMED by the KEY `<scope>:<identifier>`. The identifier alone is what a persisted row carries, because each scope owns its own collection so the scope is implicit in the table. Everything that REFERS to a badge — a launcher item\\'s `notificationBadgeRef`, an operation\\'s `notificationBadgeOperations[].badgeRef`, the browser count store — uses the key, and two definitions sharing one key are refused at startup. Do not reintroduce an identifier-only lookup: it made the second of two same-identifier definitions unreachable and gave it the first\\'s count.',\n 'There is no PUBLIC/API delete; badge counts reset to 0 in normal use. A REPOSITORY_ONLY DELETE was added solely for the composition `onParentDelete` cascade (physical teardown when the owning user is deleted). Other compliance “forget me” paths still clear counts or drop rows via repository tooling that understands badge semantics.',\n 'Writes are not intended for public arbitrary callers — only internal dispatchers and admin automation should touch CREATE/UPDATE despite the `APP_ADMIN_SUPER_ADMIN` role token on the repository variant.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n);\n\nexport const organizationNotificationBadgesResourceSpecification = resourceSpecification(\n organizationNotificationBadgesResourceConfiguration_InitializationFactory,\n NotificationBadgeOrganizationSchema,\n ({ schemaShape }) => ({\n purpose: 'Expose shared notification-badge counters for one organization, keyed by application-defined badge identifiers.',\n businessRole: 'Lets every authorized organization member see the same outstanding-work indicators in shared navigation and dashboards.',\n lifecycleRole: 'A badge row appears after its identifier first produces a count, changes as the shared condition changes, and normally resets to zero instead of being deleted.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.NOTIFICATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'NotificationBadgeOrganizationSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'organizationNotificationBadgesResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'ORGANIZATION_NOTIFICATION_BADGES',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'ORG variant: READ/LIST → `ORG_MEMBER` via `API_CALL`; CREATE/UPDATE → `APP_ADMIN_SUPER_ADMIN` via `REPOSITORY_ONLY`.',\n 'Pairs with a separate `USER_NOTIFICATION_BADGES` resource type and Mongo collection (true polymorphic split, not a shared polymorphic factory map).',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Document id for the organization-level badge instance.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n organizationId: schemaShape.organizationId.foreignKeySpec({\n meaning: 'The organization whose aggregate count this badge represents.',\n whyItMatters: 'Used by the access layer so org members read shared counts while other tenants never see the row.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n count: schemaShape.count.numberSpec({\n meaning: 'Non-negative org aggregate for the given identifier.',\n importance: FieldSemanticImportance.PRIMARY,\n unit: 'count',\n }),\n\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the org-level badge was first materialized for this org + identifier pair.',\n temporalRole: 'creation',\n }),\n\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When the aggregate counter or metadata was last written.',\n temporalRole: 'modified',\n }),\n },\n\n operations: {\n ...buildBadgeReadListOps({\n readAuthError: {\n code: HttpResponseStatusCode.FORBIDDEN_403,\n when: 'The caller is not an organization member allowed to read the organization’s shared badge counters.',\n },\n badgeExample: ORGANIZATION_BADGE_EXAMPLE,\n summaryExample: ORGANIZATION_BADGE_SUMMARY_EXAMPLE,\n }),\n ...buildBadgeCreateUpdateOps('APP_ADMIN_SUPER_ADMIN'),\n },\n\n businessConstraints: [\n 'The `scope` field is a `z.literal(ResourcePrimaryScope.ORGANIZATIONS)` discriminant — omitted from `fields` for the same Zod-literal + `*Spec` decorator reason as the USER variant (see the USER variant `businessConstraints`).',\n 'The `identifier` field matches the USER variant (`NotificationBadgeIdentifierSchema`) — see the USER variant `businessConstraints` bullets that explain the identifier constraints and why the badge KEY, not the identifier, is what refers to a definition.',\n 'Any org member with LIST rights sees the same aggregate count — it is not a per-seat personalization surface.',\n 'Because writes are `REPOSITORY_ONLY`, product teams must not expose raw repository endpoints for badge tuning without a dedicated admin workflow.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n);\n"]}
|
package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-config.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/notifications/resources/webhook-config.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAQH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAG3B,wBAAwB,EAIzB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAML,KAAK,2BAA2B,EACjC,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"webhook-config.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/notifications/resources/webhook-config.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAQH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAG3B,wBAAwB,EAIzB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAML,KAAK,2BAA2B,EACjC,MAAM,6BAA6B,CAAC;AAkZrC,eAAO,MAAM,8CAA8C;;;;;;;;;;;;;;iCAG1D,CAAC;AAEF,eAAO,MAAM,6CAA6C;;;;;;;;;;;;;;iCAGzD,CAAC"}
|
|
@@ -22,6 +22,7 @@ import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@
|
|
|
22
22
|
import { CoreResourceOperation as Op, CoreResourceType, ResourcePrimaryScope, WebhookConfig_Operations, WebhookConfigBaseSchema, WebhookEndpointProbeOutcome, webhookConfigPolymorphicFactories, } from '@wildo-ai/saas-models';
|
|
23
23
|
import { webhooksAdminPresets, webhooksMainPresets } from '@wildo-ai/presets-components';
|
|
24
24
|
import { HttpResponseStatusCode, mergeResourceFrontendConfigurations, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
|
|
25
|
+
import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
|
|
25
26
|
const webhookConfigResourcePrimaryScope = {
|
|
26
27
|
[CoreResourceType.ORGANIZATION_WEBHOOK_CONFIG]: ResourcePrimaryScope.ORGANIZATIONS,
|
|
27
28
|
[CoreResourceType.APPLICATION_WEBHOOK_CONFIG]: ResourcePrimaryScope.APPLICATION,
|
|
@@ -66,6 +67,7 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
|
|
|
66
67
|
businessRole: 'Singleton-per-scope config row that the dispatcher and admin UI use to know where to POST JSON payloads and which endpoints are still enabled.',
|
|
67
68
|
lifecycleRole: 'Seeded as a REPOSITORY-only create per org/app, then maintained by admins (UPDATE) and read for diagnostics; test deliveries exercise connectivity without writing delivery log rows.',
|
|
68
69
|
audience: LabelAudience.DEVELOPER,
|
|
70
|
+
subDomain: EngineResourceSubDomain.NOTIFICATIONS,
|
|
69
71
|
codeHandling: {
|
|
70
72
|
mainSchema: {
|
|
71
73
|
packageName: '@wildo-ai/saas-models',
|
|
@@ -112,7 +114,7 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
|
|
|
112
114
|
},
|
|
113
115
|
fields: {
|
|
114
116
|
_id: schemaShape._id.stringSpec({
|
|
115
|
-
meaning: 'Singleton document id for the webhook config
|
|
117
|
+
meaning: 'Singleton document id for the webhook config record in this scope’s MongoDB collection.',
|
|
116
118
|
importance: FieldSemanticImportance.PRIMARY,
|
|
117
119
|
semanticRole: 'identifier',
|
|
118
120
|
}),
|
|
@@ -135,11 +137,11 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
|
|
|
135
137
|
whyItMatters: 'Downstream verifiers need the public key without out-of-band secret sharing; key rotation re-reads from app config on every READ per postfix hook.',
|
|
136
138
|
}),
|
|
137
139
|
createdAt: schemaShape.createdAt.dateSpec({
|
|
138
|
-
meaning: 'When the singleton config
|
|
140
|
+
meaning: 'When the singleton config record was first inserted.',
|
|
139
141
|
temporalRole: 'creation',
|
|
140
142
|
}),
|
|
141
143
|
updatedAt: schemaShape.updatedAt.dateSpec({
|
|
142
|
-
meaning: 'When the
|
|
144
|
+
meaning: 'When the record last changed (endpoint list edits, `enabled` toggles, or hook refreshes).',
|
|
143
145
|
temporalRole: 'modified',
|
|
144
146
|
}),
|
|
145
147
|
},
|
|
@@ -170,7 +172,7 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
|
|
|
170
172
|
outcome: 'A baseline disabled config exists so the dispatcher can load structured rows without null-check sprawl.',
|
|
171
173
|
whenToUse: 'Repository-only path — not an HTTP public create; used by system seeds or platform bootstrap runs.',
|
|
172
174
|
responseStatuses: [
|
|
173
|
-
{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The baseline (disabled) singleton config
|
|
175
|
+
{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The baseline (disabled) singleton config record was seeded for this scope and returned. Internal/service write path — system seeds or platform bootstrap run this, not a public HTTP create.' },
|
|
174
176
|
],
|
|
175
177
|
errorScenarios: [
|
|
176
178
|
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The seed payload fails schema validation (e.g. a non-HTTPS endpoint URL or a malformed endpoint entry).', errorCode: 'VALIDATION_FAILED' },
|
|
@@ -217,7 +219,7 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
|
|
|
217
219
|
purpose: 'Repository-only teardown of the webhook config row when its owning org/app is deleted (composition `onParentDelete` cascade).',
|
|
218
220
|
outcome: 'The one-per-scope config row is removed together with its parent — the composition part does not outlive its whole.',
|
|
219
221
|
responseStatuses: [
|
|
220
|
-
{ code: HttpResponseStatusCode.OK_200, meaning: 'The webhook config
|
|
222
|
+
{ code: HttpResponseStatusCode.OK_200, meaning: 'The webhook config record was deleted as part of the deletion cascade of its owning scope.' },
|
|
221
223
|
],
|
|
222
224
|
// 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.
|
|
223
225
|
idempotent: true,
|
|
@@ -225,7 +227,7 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
|
|
|
225
227
|
[WebhookConfig_Operations.TEST_ENDPOINT]: {
|
|
226
228
|
operationId: WebhookConfig_Operations.TEST_ENDPOINT,
|
|
227
229
|
purpose: 'Send a single synthetic request to a chosen `endpointId` to prove reachability and signature verification (does not create `M2MWebhookDeliveryLog` rows). Borrows UPDATE (a `PUT` on the custom-op sub-path) rather than READ: no row is written, but a live signed request leaves the platform, and a `GET` for that was a contradiction the generated contract had to spell out as `x-idempotent: false`.',
|
|
228
|
-
outcome: 'Admins can validate connectivity in isolation before real notification traffic is enabled. The response is a diagnostic — `outcome` (`accepted` / `rejected` / `unreachable` / `not_sent`), plus response status, truncated response body, failure reason, duration,
|
|
230
|
+
outcome: 'Admins can validate connectivity in isolation before real notification traffic is enabled. The response is a diagnostic — `outcome` (`accepted` / `rejected` / `unreachable` / `not_sent`), plus response status, truncated response body, failure reason, duration, the probe’s `signatureJti` for correlation against the consumer’s own logs, and `transportIsPlaintext` — NOT the configuration row. `transportIsPlaintext` is independent of `outcome`: an endpoint on `http://` can answer `accepted` and still be sending the delivery signature in the clear, where it is readable and replayable until it expires. Plaintext endpoints are admitted deliberately (see `WebhookEndpointSchema.url`), so this probe is where that admission is surfaced to the admin who can act on it.',
|
|
229
231
|
whenToUse: 'Run after any URL/secret/rotation event that could break downstream listeners.',
|
|
230
232
|
importance: FieldSemanticImportance.PRIMARY,
|
|
231
233
|
responseStatuses: [
|
|
@@ -246,6 +248,7 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
|
|
|
246
248
|
response: {
|
|
247
249
|
endpointId: 'whe_primary_partner',
|
|
248
250
|
url: 'https://hooks.example.com/wildo',
|
|
251
|
+
transportIsPlaintext: false,
|
|
249
252
|
outcome: WebhookEndpointProbeOutcome.ACCEPTED,
|
|
250
253
|
responseStatus: 202,
|
|
251
254
|
responseBodyTruncated: 'queued',
|
|
@@ -261,6 +264,7 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
|
|
|
261
264
|
response: {
|
|
262
265
|
endpointId: 'whe_primary_partner',
|
|
263
266
|
url: 'https://hooks.example.com/wildo',
|
|
267
|
+
transportIsPlaintext: false,
|
|
264
268
|
outcome: WebhookEndpointProbeOutcome.REJECTED,
|
|
265
269
|
responseStatus: 401,
|
|
266
270
|
responseBodyTruncated: 'invalid signature',
|
|
@@ -276,6 +280,7 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
|
|
|
276
280
|
response: {
|
|
277
281
|
endpointId: 'whe_primary_partner',
|
|
278
282
|
url: 'https://hooks.example.com/wildo',
|
|
283
|
+
transportIsPlaintext: false,
|
|
279
284
|
outcome: WebhookEndpointProbeOutcome.UNREACHABLE,
|
|
280
285
|
failureReason: 'fetch failed: connect ECONNREFUSED',
|
|
281
286
|
durationMs: 10003,
|
|
@@ -290,6 +295,7 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
|
|
|
290
295
|
response: {
|
|
291
296
|
endpointId: 'whe_primary_partner',
|
|
292
297
|
url: 'https://hooks.example.com/wildo',
|
|
298
|
+
transportIsPlaintext: false,
|
|
293
299
|
outcome: WebhookEndpointProbeOutcome.NOT_SENT,
|
|
294
300
|
failureReason: 'JWT signing failed: application webhook key unavailable',
|
|
295
301
|
durationMs: 0,
|
|
@@ -298,6 +304,25 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
|
|
|
298
304
|
},
|
|
299
305
|
forStatus: HttpResponseStatusCode.OK_200,
|
|
300
306
|
},
|
|
307
|
+
{
|
|
308
|
+
title: 'Endpoint accepts the probe, but over plaintext HTTP',
|
|
309
|
+
request: { endpointId: 'whe_legacy_plaintext' },
|
|
310
|
+
response: {
|
|
311
|
+
endpointId: 'whe_legacy_plaintext',
|
|
312
|
+
url: 'http://legacy.example.com/wildo',
|
|
313
|
+
// The case this field exists for (#492). A working endpoint AND a credential on the
|
|
314
|
+
// wire — `ACCEPTED` is the truthful outcome, and reporting the exposure as a failure
|
|
315
|
+
// would be false, so the two are stated separately.
|
|
316
|
+
transportIsPlaintext: true,
|
|
317
|
+
outcome: WebhookEndpointProbeOutcome.ACCEPTED,
|
|
318
|
+
responseStatus: 200,
|
|
319
|
+
responseBodyTruncated: 'ok',
|
|
320
|
+
durationMs: 77,
|
|
321
|
+
signatureJti: 'probe_01HX2PLAINTEXT',
|
|
322
|
+
attemptedAt: '2026-06-14T12:09:00.000Z',
|
|
323
|
+
},
|
|
324
|
+
forStatus: HttpResponseStatusCode.OK_200,
|
|
325
|
+
},
|
|
301
326
|
],
|
|
302
327
|
},
|
|
303
328
|
},
|