@wildo-ai/saas-specifications 1.1.5 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/_catalogs/schema-org/_catalog-spec.shared.schemas.d.ts +10 -8
- package/dist/esm/_catalogs/schema-org/_catalog-spec.shared.schemas.d.ts.map +1 -1
- package/dist/esm/_catalogs/schema-org/_catalog-spec.shared.schemas.js +14 -13
- package/dist/esm/_catalogs/schema-org/_catalog-spec.shared.schemas.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/aggregate-offer.catalog-spec.d.ts +3 -2
- package/dist/esm/_catalogs/schema-org/aggregate-offer.catalog-spec.d.ts.map +1 -1
- package/dist/esm/_catalogs/schema-org/aggregate-offer.catalog-spec.js +4 -3
- package/dist/esm/_catalogs/schema-org/aggregate-offer.catalog-spec.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/index.d.ts +31 -15
- package/dist/esm/_catalogs/schema-org/index.d.ts.map +1 -1
- package/dist/esm/_catalogs/schema-org/index.js +34 -13
- package/dist/esm/_catalogs/schema-org/index.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/product.catalog-spec.d.ts +2 -2
- package/dist/esm/_catalogs/schema-org/product.catalog-spec.js +4 -4
- package/dist/esm/_catalogs/schema-org/product.catalog-spec.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/software-application.catalog-spec.d.ts +45 -0
- package/dist/esm/_catalogs/schema-org/software-application.catalog-spec.d.ts.map +1 -0
- package/dist/esm/_catalogs/schema-org/software-application.catalog-spec.js +58 -0
- package/dist/esm/_catalogs/schema-org/software-application.catalog-spec.js.map +1 -0
- package/dist/esm/_core/application-specification-family-identity.schemas.d.ts +3 -2
- package/dist/esm/_core/application-specification-family-identity.schemas.d.ts.map +1 -1
- package/dist/esm/_core/application-specification-family-identity.schemas.js +3 -2
- package/dist/esm/_core/application-specification-family-identity.schemas.js.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts +18 -0
- package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts +39 -13
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js +43 -13
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts +90 -2
- package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js +70 -6
- package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js.map +1 -1
- package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/build-plan/build-plan.family-aspects.js +26 -4
- package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -1
- package/dist/esm/_core/business-semantics.specifications.schemas.d.ts +14 -0
- package/dist/esm/_core/business-semantics.specifications.schemas.d.ts.map +1 -1
- package/dist/esm/_core/business-semantics.specifications.schemas.js.map +1 -1
- package/dist/esm/_core/capability-composition/capability-composition-validation.d.ts.map +1 -1
- package/dist/esm/_core/capability-composition/capability-composition-validation.js +1 -0
- package/dist/esm/_core/capability-composition/capability-composition-validation.js.map +1 -1
- package/dist/esm/_core/capability-composition/capability-composition.schemas.d.ts +21 -2
- package/dist/esm/_core/capability-composition/capability-composition.schemas.d.ts.map +1 -1
- package/dist/esm/_core/capability-composition/capability-composition.schemas.js +20 -1
- package/dist/esm/_core/capability-composition/capability-composition.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts +11 -32
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js +70 -3
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.d.ts +142 -17
- package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js +285 -30
- package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/processor-register.schemas.d.ts +183 -18
- package/dist/esm/_core/compliance-documents/processor-register.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/processor-register.schemas.js +165 -18
- package/dist/esm/_core/compliance-documents/processor-register.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/recipient-disclosures.schemas.d.ts +139 -0
- package/dist/esm/_core/compliance-documents/recipient-disclosures.schemas.d.ts.map +1 -0
- package/dist/esm/_core/compliance-documents/recipient-disclosures.schemas.js +172 -0
- package/dist/esm/_core/compliance-documents/recipient-disclosures.schemas.js.map +1 -0
- package/dist/esm/_core/compliance-documents/recipient-population.schemas.d.ts +306 -0
- package/dist/esm/_core/compliance-documents/recipient-population.schemas.d.ts.map +1 -0
- package/dist/esm/_core/compliance-documents/recipient-population.schemas.js +502 -0
- package/dist/esm/_core/compliance-documents/recipient-population.schemas.js.map +1 -0
- package/dist/esm/_core/compliance-documents/retention-enforcement-facts.schemas.d.ts +107 -0
- package/dist/esm/_core/compliance-documents/retention-enforcement-facts.schemas.d.ts.map +1 -0
- package/dist/esm/_core/compliance-documents/retention-enforcement-facts.schemas.js +118 -0
- package/dist/esm/_core/compliance-documents/retention-enforcement-facts.schemas.js.map +1 -0
- package/dist/esm/_core/compliance-documents/subject-data-recipients.schemas.d.ts +56 -0
- package/dist/esm/_core/compliance-documents/subject-data-recipients.schemas.d.ts.map +1 -0
- package/dist/esm/_core/compliance-documents/subject-data-recipients.schemas.js +100 -0
- package/dist/esm/_core/compliance-documents/subject-data-recipients.schemas.js.map +1 -0
- package/dist/esm/_core/composite-view-specification.schemas.js +8 -1
- package/dist/esm/_core/composite-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts +3 -2
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js +3 -2
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js.map +1 -1
- package/dist/esm/_core/experience-plan/experience-plan.schemas.d.ts +16 -3
- package/dist/esm/_core/experience-plan/experience-plan.schemas.d.ts.map +1 -1
- package/dist/esm/_core/experience-plan/experience-plan.schemas.js +70 -5
- package/dist/esm/_core/experience-plan/experience-plan.schemas.js.map +1 -1
- package/dist/esm/_core/family-aspects.schemas.d.ts +10 -0
- package/dist/esm/_core/family-aspects.schemas.d.ts.map +1 -1
- package/dist/esm/_core/family-aspects.schemas.js.map +1 -1
- package/dist/esm/_core/feature-drafts/capability-map-output-set-generation.schemas.d.ts +2 -2
- package/dist/esm/_core/feature-drafts/capability-map-output-set.schemas.d.ts +1 -0
- package/dist/esm/_core/feature-drafts/capability-map-output-set.schemas.d.ts.map +1 -1
- package/dist/esm/_core/feature-drafts/feature-specification-drafts.schemas.d.ts +16 -0
- package/dist/esm/_core/feature-drafts/feature-specification-drafts.schemas.d.ts.map +1 -1
- package/dist/esm/_core/feature-drafts/feature-specification-drafts.schemas.js +8 -0
- package/dist/esm/_core/feature-drafts/feature-specification-drafts.schemas.js.map +1 -1
- package/dist/esm/_core/index.d.ts +3 -0
- package/dist/esm/_core/index.d.ts.map +1 -1
- package/dist/esm/_core/index.js +3 -0
- package/dist/esm/_core/index.js.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.d.ts +5 -0
- package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.js +3 -1
- package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.js.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js +12 -2
- package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan.schemas.d.ts +30 -2
- package/dist/esm/_core/integration-plan/integration-plan.schemas.d.ts.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan.schemas.js +32 -2
- package/dist/esm/_core/integration-plan/integration-plan.schemas.js.map +1 -1
- package/dist/esm/_core/market/feature-benefit.schemas.js +2 -2
- package/dist/esm/_core/market/feature-benefit.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-alternative.schemas.js +2 -2
- package/dist/esm/_core/market/market-alternative.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-buying-journey.schemas.js +2 -2
- package/dist/esm/_core/market/market-buying-journey.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-category.schemas.js +2 -2
- package/dist/esm/_core/market/market-category.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-channel.schemas.js +2 -2
- package/dist/esm/_core/market/market-channel.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-gain.schemas.js +2 -2
- package/dist/esm/_core/market/market-gain.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-icp.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-icp.schemas.js +2 -2
- package/dist/esm/_core/market/market-icp.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-job.schemas.js +2 -2
- package/dist/esm/_core/market/market-job.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-message-template.schemas.js +2 -2
- package/dist/esm/_core/market/market-message-template.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-objection.schemas.js +2 -2
- package/dist/esm/_core/market/market-objection.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-pain.schemas.js +2 -2
- package/dist/esm/_core/market/market-pain.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-persona.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-persona.schemas.js +2 -2
- package/dist/esm/_core/market/market-persona.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-positioning.schemas.js +2 -2
- package/dist/esm/_core/market/market-positioning.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-proof.schemas.js +2 -2
- package/dist/esm/_core/market/market-proof.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-references.schemas.d.ts +6 -0
- package/dist/esm/_core/market/market-references.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-references.schemas.js +6 -0
- package/dist/esm/_core/market/market-references.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts +4 -4
- package/dist/esm/_core/market/market-tone-of-voice.schemas.js +2 -2
- package/dist/esm/_core/market/market-tone-of-voice.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-trigger.schemas.js +2 -2
- package/dist/esm/_core/market/market-trigger.schemas.js.map +1 -1
- package/dist/esm/_core/market/market.family-aspects.js +1 -1
- package/dist/esm/_core/market/market.family-aspects.js.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan.schemas.js +6 -1
- package/dist/esm/_core/placement-plan/placement-plan.schemas.js.map +1 -1
- package/dist/esm/_core/requirements/functional-requirement.schemas.d.ts +1 -0
- package/dist/esm/_core/requirements/functional-requirement.schemas.d.ts.map +1 -1
- package/dist/esm/_core/requirements/functional-requirement.schemas.js +8 -0
- package/dist/esm/_core/requirements/functional-requirement.schemas.js.map +1 -1
- package/dist/esm/_core/requirements/requirements-snapshot.schemas.d.ts +1 -0
- package/dist/esm/_core/requirements/requirements-snapshot.schemas.d.ts.map +1 -1
- package/dist/esm/_core/resource-specification.schemas.d.ts +86 -28
- package/dist/esm/_core/resource-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/resource-specification.schemas.js +110 -24
- package/dist/esm/_core/resource-specification.schemas.js.map +1 -1
- package/dist/esm/_core/utils/retention-clock-field-specs.d.ts +13 -0
- package/dist/esm/_core/utils/retention-clock-field-specs.d.ts.map +1 -0
- package/dist/esm/_core/utils/retention-clock-field-specs.js +26 -0
- package/dist/esm/_core/utils/retention-clock-field-specs.js.map +1 -0
- package/dist/esm/_core/website-plan/website-plan.schemas.d.ts +31 -6
- package/dist/esm/_core/website-plan/website-plan.schemas.d.ts.map +1 -1
- package/dist/esm/_core/website-plan/website-plan.schemas.js +35 -6
- package/dist/esm/_core/website-plan/website-plan.schemas.js.map +1 -1
- package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.d.ts +142 -3
- package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.js +148 -14
- package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts +70 -10
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js +98 -11
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/application-line.application-creation.schemas.d.ts +215 -0
- package/dist/esm/application-creation/application-line.application-creation.schemas.d.ts.map +1 -0
- package/dist/esm/application-creation/application-line.application-creation.schemas.js +253 -0
- package/dist/esm/application-creation/application-line.application-creation.schemas.js.map +1 -0
- package/dist/esm/application-creation/application-specification-family-decisions.application-creation.schemas.d.ts +39 -0
- package/dist/esm/application-creation/application-specification-family-decisions.application-creation.schemas.d.ts.map +1 -0
- package/dist/esm/application-creation/application-specification-family-decisions.application-creation.schemas.js +37 -0
- package/dist/esm/application-creation/application-specification-family-decisions.application-creation.schemas.js.map +1 -0
- package/dist/esm/application-creation/journey.application-creation.schemas.d.ts +5 -49
- package/dist/esm/application-creation/journey.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/journey.application-creation.schemas.js +25 -60
- package/dist/esm/application-creation/journey.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/playbook-instance.application-creation.schemas.d.ts +28 -0
- package/dist/esm/application-creation/playbook-instance.application-creation.schemas.d.ts.map +1 -0
- package/dist/esm/application-creation/playbook-instance.application-creation.schemas.js +32 -0
- package/dist/esm/application-creation/playbook-instance.application-creation.schemas.js.map +1 -0
- package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +26 -6
- package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/playbooks.application-creation.schemas.js +28 -1
- package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation.exports.d.ts +7 -0
- package/dist/esm/application-creation.exports.d.ts.map +1 -1
- package/dist/esm/application-creation.exports.js +7 -0
- package/dist/esm/application-creation.exports.js.map +1 -1
- package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.d.ts +1 -1
- package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.js +1 -1
- package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.js.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +24 -1
- package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.definitions.js +75 -5
- package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts +6 -0
- package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-document-blueprint-selection.d.ts +11 -0
- package/dist/esm/assurance/assurance-document-blueprint-selection.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-document-blueprint-selection.js +22 -3
- package/dist/esm/assurance/assurance-document-blueprint-selection.js.map +1 -1
- package/dist/esm/assurance/assurance-document-system.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-document-system.definitions.js +39 -6
- package/dist/esm/assurance/assurance-document-system.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-document-system.schemas.d.ts +11 -0
- package/dist/esm/assurance/assurance-document-system.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-document-system.schemas.js +19 -0
- package/dist/esm/assurance/assurance-document-system.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js +295 -31
- package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-foundation.schemas.d.ts +7 -0
- package/dist/esm/assurance/assurance-foundation.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-foundation.schemas.js +7 -0
- package/dist/esm/assurance/assurance-foundation.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-objective-catalog.definitions.js +17 -0
- package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-program-generation.schemas.d.ts +5 -1
- package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-program-generation.schemas.js +6 -3
- package/dist/esm/assurance/assurance-program-generation.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-program.family-aspects.js +1 -1
- package/dist/esm/assurance/assurance-program.family-aspects.js.map +1 -1
- package/dist/esm/assurance/assurance-program.schemas.d.ts +232 -3
- package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-program.schemas.js +107 -14
- package/dist/esm/assurance/assurance-program.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-source-registry.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-source-registry.definitions.js +77 -1
- package/dist/esm/assurance/assurance-source-registry.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js +23 -1
- package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js.map +1 -1
- package/dist/esm/assurance/governed-document-release.d.ts +7 -0
- package/dist/esm/assurance/governed-document-release.d.ts.map +1 -1
- package/dist/esm/assurance/governed-document-release.js +11 -2
- package/dist/esm/assurance/governed-document-release.js.map +1 -1
- package/dist/esm/companion-exports.d.ts +6 -5
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/companion-exports.js.map +1 -1
- package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.d.ts +1 -0
- package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js +35 -33
- package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js.map +1 -1
- package/dist/esm/engine/applications/resources/application-metadata.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js +6 -2
- package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js.map +1 -1
- package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js +13 -12
- package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js.map +1 -1
- package/dist/esm/engine/applications/resources/application-versions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/application-versions.resource.specification.js +26 -2
- package/dist/esm/engine/applications/resources/application-versions.resource.specification.js.map +1 -1
- package/dist/esm/engine/applications/resources/applications.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/applications.resource.specification.js +4 -4
- package/dist/esm/engine/applications/resources/applications.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.js +11 -9
- package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js +2 -2
- package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.d.ts +1 -0
- package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js +45 -32
- package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts +1 -23
- package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js +185 -31
- package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts +2 -1
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js +29 -7
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js +7 -1
- package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js +9 -6
- package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.d.ts +1 -0
- package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js +11 -7
- package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js +18 -16
- package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js +9 -11
- package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/sso-config.resource.specification.js +238 -219
- package/dist/esm/engine/auth/resources/sso-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts +0 -24
- package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js +76 -16
- package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts +2 -1
- package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js +28 -6
- package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js +29 -11
- package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/billing-provider-event-settlements.resource.specification.js +1 -1
- package/dist/esm/engine/billing/resources/billing-provider-event-settlements.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts +2 -0
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js +13 -12
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js +5 -5
- package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/prices.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/prices.resource.specification.js +12 -9
- package/dist/esm/engine/billing/resources/prices.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/products.resource.specification.d.ts +7 -4
- package/dist/esm/engine/billing/resources/products.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/products.resource.specification.js +36 -16
- package/dist/esm/engine/billing/resources/products.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/promotions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/promotions.resource.specification.js +13 -10
- package/dist/esm/engine/billing/resources/promotions.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/referrals.resource.specification.d.ts +13 -8
- package/dist/esm/engine/billing/resources/referrals.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/referrals.resource.specification.js +54 -20
- package/dist/esm/engine/billing/resources/referrals.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts +30 -4
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js +85 -25
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/usage-records.resource.specification.js +2 -2
- package/dist/esm/engine/billing/resources/usage-records.resource.specification.js.map +1 -1
- package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.d.ts +15 -2
- package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.js +45 -10
- package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.js.map +1 -1
- package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.d.ts +15 -2
- package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js +52 -12
- package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js.map +1 -1
- package/dist/esm/engine/compliance/resources/index.d.ts +1 -0
- package/dist/esm/engine/compliance/resources/index.d.ts.map +1 -1
- package/dist/esm/engine/compliance/resources/index.js +1 -0
- package/dist/esm/engine/compliance/resources/index.js.map +1 -1
- package/dist/esm/engine/compliance/resources/legal-holds.resource.specification.d.ts +39 -0
- package/dist/esm/engine/compliance/resources/legal-holds.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/compliance/resources/legal-holds.resource.specification.js +325 -0
- package/dist/esm/engine/compliance/resources/legal-holds.resource.specification.js.map +1 -0
- package/dist/esm/engine/compliance/resources/retention-enforcement-records.resource.specification.d.ts +23 -0
- package/dist/esm/engine/compliance/resources/retention-enforcement-records.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/compliance/resources/retention-enforcement-records.resource.specification.js +197 -0
- package/dist/esm/engine/compliance/resources/retention-enforcement-records.resource.specification.js.map +1 -0
- package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
- package/dist/esm/engine/engine-resource-specifications.registry.js +59 -0
- package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
- package/dist/esm/engine/errors/error-messages.specification.d.ts.map +1 -1
- package/dist/esm/engine/errors/error-messages.specification.js +69 -0
- package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
- package/dist/esm/engine/features/resources/application-features.resource.specification.d.ts +5 -5
- package/dist/esm/engine/features/resources/application-features.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/features/resources/application-features.resource.specification.js +9 -10
- package/dist/esm/engine/features/resources/application-features.resource.specification.js.map +1 -1
- package/dist/esm/engine/features/resources/organization-features.resource.specification.d.ts +5 -5
- package/dist/esm/engine/features/resources/organization-features.resource.specification.js +11 -11
- package/dist/esm/engine/features/resources/organization-features.resource.specification.js.map +1 -1
- package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts +5 -5
- package/dist/esm/engine/features/resources/user-features.resource.specification.js +3 -3
- package/dist/esm/engine/features/resources/user-features.resource.specification.js.map +1 -1
- package/dist/esm/engine/files/resources/files.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/files/resources/files.resource.specification.js +7 -8
- package/dist/esm/engine/files/resources/files.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js +16 -4
- package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/agent-work-decisions.resource.specification.d.ts +11 -0
- package/dist/esm/engine/flows-actors/resources/agent-work-decisions.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/flows-actors/resources/agent-work-decisions.resource.specification.js +382 -0
- package/dist/esm/engine/flows-actors/resources/agent-work-decisions.resource.specification.js.map +1 -0
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts +139 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js +150 -4
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js +9 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/model-call-attributions.resource.specification.d.ts +3 -0
- package/dist/esm/engine/flows-actors/resources/model-call-attributions.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/flows-actors/resources/model-call-attributions.resource.specification.js +162 -0
- package/dist/esm/engine/flows-actors/resources/model-call-attributions.resource.specification.js.map +1 -0
- package/dist/esm/engine/flows-actors/resources/model-cost-period-aggregates.resource.specification.d.ts +3 -0
- package/dist/esm/engine/flows-actors/resources/model-cost-period-aggregates.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/flows-actors/resources/model-cost-period-aggregates.resource.specification.js +158 -0
- package/dist/esm/engine/flows-actors/resources/model-cost-period-aggregates.resource.specification.js.map +1 -0
- package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.d.ts +2 -1
- package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.js +16 -9
- package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/decision/ai-approval-queue.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/decision/ai-approval-queue.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/decision/ai-approval-request.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/decision/ai-approval-request.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-agent-work-override-rate-settings.frontend-component.specification.d.ts +5 -0
- package/dist/esm/engine/frontend-components/app/app-layout-agent-work-override-rate-settings.frontend-component.specification.d.ts.map +1 -0
- package/dist/esm/engine/frontend-components/app/app-layout-agent-work-override-rate-settings.frontend-component.specification.js +79 -0
- package/dist/esm/engine/frontend-components/app/app-layout-agent-work-override-rate-settings.frontend-component.specification.js.map +1 -0
- package/dist/esm/engine/frontend-components/app/app-layout-appearance-settings.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-appearance-settings.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-billing-settings.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-billing-settings.frontend-component.specification.js +3 -1
- package/dist/esm/engine/frontend-components/app/app-layout-billing-settings.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js +5 -4
- package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-invitations-settings.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-invitations-settings.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/auth/admin-config/app-page-security-settings.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/auth/admin-config/app-page-security-settings.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/billing/billing-pricing-table.frontend-component.specification.js +2 -2
- package/dist/esm/engine/frontend-components/billing/billing-pricing-table.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-number.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-number.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-string.frontend-component.specification.js +2 -2
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-string.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-approval.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-approval.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-decision.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-decision.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-address.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-address.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-address.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-string.frontend-component.specification.js +2 -2
- package/dist/esm/engine/frontend-components/form/fields/form-field-string.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/index.d.ts +1 -0
- package/dist/esm/engine/frontend-components/index.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/index.js +3 -0
- package/dist/esm/engine/frontend-components/index.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-empty-state.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-empty-state.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resources-fields-resource-reference-display.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/resources/resources-fields-resource-reference-display.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resources-fields-resource-reference-edit.frontend-component.specification.js +1 -1
- package/dist/esm/engine/frontend-components/resources/resources-fields-resource-reference-edit.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/sections/stepper.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/sections/stepper.frontend-component.specification.js +9 -4
- package/dist/esm/engine/frontend-components/sections/stepper.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js +4 -4
- package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js +34 -0
- package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js +26 -0
- package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js +2 -2
- package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-erasure-suppressions.resource.specification.d.ts +9 -0
- package/dist/esm/engine/infrastructure/resources/external-data-erasure-suppressions.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-erasure-suppressions.resource.specification.js +122 -0
- package/dist/esm/engine/infrastructure/resources/external-data-erasure-suppressions.resource.specification.js.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-outbound-changes.resource.specification.d.ts +9 -0
- package/dist/esm/engine/infrastructure/resources/external-data-outbound-changes.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-outbound-changes.resource.specification.js +152 -0
- package/dist/esm/engine/infrastructure/resources/external-data-outbound-changes.resource.specification.js.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pending-references.resource.specification.d.ts +10 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pending-references.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pending-references.resource.specification.js +94 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pending-references.resource.specification.js.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership-keys.resource.specification.d.ts +10 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership-keys.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership-keys.resource.specification.js +64 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership-keys.resource.specification.js.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.d.ts +4 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.js +20 -16
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-run-records.resource.specification.d.ts +9 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-run-records.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-run-records.resource.specification.js +200 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-run-records.resource.specification.js.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js +19 -6
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-remote-versions.resource.specification.d.ts +9 -0
- package/dist/esm/engine/infrastructure/resources/external-data-remote-versions.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-remote-versions.resource.specification.js +97 -0
- package/dist/esm/engine/infrastructure/resources/external-data-remote-versions.resource.specification.js.map +1 -0
- package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts +8 -0
- package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js +2 -2
- package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts +2 -2
- package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js +1 -1
- package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/system-of-record-partition-assignments.resource.specification.js +4 -4
- package/dist/esm/engine/infrastructure/resources/system-of-record-partition-assignments.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/system-of-record-write-admissions.resource.specification.d.ts +9 -0
- package/dist/esm/engine/infrastructure/resources/system-of-record-write-admissions.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/infrastructure/resources/system-of-record-write-admissions.resource.specification.js +153 -0
- package/dist/esm/engine/infrastructure/resources/system-of-record-write-admissions.resource.specification.js.map +1 -0
- package/dist/esm/engine/notifications/resources/conversation-threads.resource.specification.d.ts +81 -0
- package/dist/esm/engine/notifications/resources/conversation-threads.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/notifications/resources/conversation-threads.resource.specification.js +437 -0
- package/dist/esm/engine/notifications/resources/conversation-threads.resource.specification.js.map +1 -0
- package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.d.ts +112 -0
- package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.js +287 -0
- package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.js.map +1 -0
- package/dist/esm/engine/notifications/resources/inbound-email.resource.specification.d.ts +131 -0
- package/dist/esm/engine/notifications/resources/inbound-email.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/notifications/resources/inbound-email.resource.specification.js +594 -0
- package/dist/esm/engine/notifications/resources/inbound-email.resource.specification.js.map +1 -0
- package/dist/esm/engine/notifications/resources/index.d.ts +1 -0
- package/dist/esm/engine/notifications/resources/index.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/index.js +1 -0
- package/dist/esm/engine/notifications/resources/index.js.map +1 -1
- package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts +6 -3
- package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js +20 -5
- package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js.map +1 -1
- package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js +12 -2
- package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js.map +1 -1
- package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.d.ts +6 -6
- package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js +8 -11
- package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/notifications/system-emails/human-decision.system-emails.specification.d.ts +4 -0
- package/dist/esm/engine/notifications/system-emails/human-decision.system-emails.specification.d.ts.map +1 -0
- package/dist/esm/engine/notifications/system-emails/human-decision.system-emails.specification.js +62 -0
- package/dist/esm/engine/notifications/system-emails/human-decision.system-emails.specification.js.map +1 -0
- package/dist/esm/engine/notifications/system-emails/index.d.ts +2 -1
- package/dist/esm/engine/notifications/system-emails/index.d.ts.map +1 -1
- package/dist/esm/engine/notifications/system-emails/index.js +4 -2
- package/dist/esm/engine/notifications/system-emails/index.js.map +1 -1
- package/dist/esm/engine/organizations/resources/index.d.ts +2 -0
- package/dist/esm/engine/organizations/resources/index.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/index.js +2 -0
- package/dist/esm/engine/organizations/resources/index.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts +3 -0
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js +40 -12
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js +2 -2
- package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js +2 -2
- package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.d.ts +0 -1
- package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js +4 -6
- package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js +7 -3
- package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-units.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js +15 -8
- package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts +3 -1
- package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organizations.resource.specification.js +36 -21
- package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/service-provider-activity-feed.resource.specification.d.ts +38 -0
- package/dist/esm/engine/organizations/resources/service-provider-activity-feed.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/organizations/resources/service-provider-activity-feed.resource.specification.js +152 -0
- package/dist/esm/engine/organizations/resources/service-provider-activity-feed.resource.specification.js.map +1 -0
- package/dist/esm/engine/organizations/resources/service-provider-relationships.resource.specification.d.ts +106 -0
- package/dist/esm/engine/organizations/resources/service-provider-relationships.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/organizations/resources/service-provider-relationships.resource.specification.js +417 -0
- package/dist/esm/engine/organizations/resources/service-provider-relationships.resource.specification.js.map +1 -0
- package/dist/esm/engine/providers/apple.provider.specification.js +1 -1
- package/dist/esm/engine/providers/apple.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/github.provider.specification.js +1 -1
- package/dist/esm/engine/providers/github.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/google-places.provider.specification.d.ts +6 -0
- package/dist/esm/engine/providers/google-places.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/google-places.provider.specification.js +44 -0
- package/dist/esm/engine/providers/google-places.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/google.provider.specification.js +1 -1
- package/dist/esm/engine/providers/google.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/index.d.ts +2 -0
- package/dist/esm/engine/providers/index.d.ts.map +1 -1
- package/dist/esm/engine/providers/index.js +5 -1
- package/dist/esm/engine/providers/index.js.map +1 -1
- package/dist/esm/engine/providers/microsoft.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/microsoft.provider.specification.js +10 -6
- package/dist/esm/engine/providers/microsoft.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/recaptcha.provider.specification.d.ts +6 -0
- package/dist/esm/engine/providers/recaptcha.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/recaptcha.provider.specification.js +38 -0
- package/dist/esm/engine/providers/recaptcha.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/resend.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/resend.provider.specification.js +3 -1
- package/dist/esm/engine/providers/resend.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/stripe.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/stripe.provider.specification.js +3 -2
- package/dist/esm/engine/providers/stripe.provider.specification.js.map +1 -1
- package/dist/esm/engine/roles/app-billing-provider-events.role.specification.d.ts +2 -0
- package/dist/esm/engine/roles/app-billing-provider-events.role.specification.d.ts.map +1 -0
- package/dist/esm/engine/roles/app-billing-provider-events.role.specification.js +21 -0
- package/dist/esm/engine/roles/app-billing-provider-events.role.specification.js.map +1 -0
- package/dist/esm/engine/roles/app-email-inbound-intake.role.specification.d.ts +2 -0
- package/dist/esm/engine/roles/app-email-inbound-intake.role.specification.d.ts.map +1 -0
- package/dist/esm/engine/roles/app-email-inbound-intake.role.specification.js +21 -0
- package/dist/esm/engine/roles/app-email-inbound-intake.role.specification.js.map +1 -0
- package/dist/esm/engine/roles/index.d.ts +13 -5
- package/dist/esm/engine/roles/index.d.ts.map +1 -1
- package/dist/esm/engine/roles/index.js +19 -6
- package/dist/esm/engine/roles/index.js.map +1 -1
- package/dist/esm/engine/roles/org-billing-provider-events.role.specification.d.ts +2 -0
- package/dist/esm/engine/roles/org-billing-provider-events.role.specification.d.ts.map +1 -0
- package/dist/esm/engine/roles/org-billing-provider-events.role.specification.js +21 -0
- package/dist/esm/engine/roles/org-billing-provider-events.role.specification.js.map +1 -0
- package/dist/esm/engine/roles/org-delegated-capabilities.role.specification.d.ts +7 -0
- package/dist/esm/engine/roles/org-delegated-capabilities.role.specification.d.ts.map +1 -0
- package/dist/esm/engine/roles/org-delegated-capabilities.role.specification.js +72 -0
- package/dist/esm/engine/roles/org-delegated-capabilities.role.specification.js.map +1 -0
- package/dist/esm/engine/roles/org-service-provider.role.specification.d.ts +2 -0
- package/dist/esm/engine/roles/org-service-provider.role.specification.d.ts.map +1 -0
- package/dist/esm/engine/roles/org-service-provider.role.specification.js +22 -0
- package/dist/esm/engine/roles/org-service-provider.role.specification.js.map +1 -0
- package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js +2 -2
- package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js +3 -3
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/self-service-user-notifications.shared.d.ts +1 -1
- package/dist/esm/engine/users/resources/self-service-user-notifications.shared.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/self-service-user-notifications.shared.js +3 -6
- package/dist/esm/engine/users/resources/self-service-user-notifications.shared.js.map +1 -1
- package/dist/esm/engine/users/resources/user-credentials.resource.specification.js +2 -2
- package/dist/esm/engine/users/resources/user-credentials.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js +2 -2
- package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.d.ts +0 -4
- package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.js +0 -3
- package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.js.map +1 -1
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts +0 -3
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.js +7 -7
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-profiles.resource.specification.js +5 -5
- package/dist/esm/engine/users/resources/user-profiles.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts +0 -3
- package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js +11 -18
- package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js +6 -6
- package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-self.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-self.resource.specification.js +5 -1
- package/dist/esm/engine/users/resources/user-self.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/users.resource.specification.d.ts +8 -5
- package/dist/esm/engine/users/resources/users.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/users.resource.specification.js +49 -16
- package/dist/esm/engine/users/resources/users.resource.specification.js.map +1 -1
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts.map +1 -1
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js +29 -10
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/dist/assurance/external-framework-mapping.json +0 -1228
package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.d.ts
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resources: `organizationInboundDeliveries` + `applicationInboundDeliveries` — Wildo SaaS engine
|
|
3
|
+
* specification (#1596).
|
|
4
|
+
*
|
|
5
|
+
* Polymorphic ORG + APP pair sharing `InboundDeliveryBaseSchema` and `inboundDeliveryPolymorphicFactories`.
|
|
6
|
+
*
|
|
7
|
+
* Inputs:
|
|
8
|
+
* - Base schema: `InboundDeliveryBaseSchema` (`inbound-delivery.shared.schemas.ts`)
|
|
9
|
+
* - Polymorphic factories: `inboundDeliveryPolymorphicFactories` (`inbound-delivery.shared.resources-config.schemas.ts`)
|
|
10
|
+
* - Custom operations: `InboundDelivery_Operations` (`replay`)
|
|
11
|
+
* - Runtime: the inbound receiver writes rows, the dispatch worker drives the status machine, REPLAY is
|
|
12
|
+
* `inbound-delivery-replay.custom-impl.backend.service.ts` (saas-backend-lib).
|
|
13
|
+
*/
|
|
14
|
+
import { CoreResourceOperation as Op, InboundDelivery_Operations, InboundChannelKind, InboundDeliveryStatus, InboundResolvedScopeKind, InboundSenderAssurance, InboundSourceKind } from '@wildo-ai/saas-models';
|
|
15
|
+
import { type ResourceSpecificationConfig } from '../../../_core';
|
|
16
|
+
type InboundCoreOp = Op.READ | Op.LIST | Op.SEARCH | Op.CREATE | Op.UPDATE | Op.DELETE | Op.DELETE_MANY;
|
|
17
|
+
export declare const organizationInboundDeliveriesResourceSpecification: ResourceSpecificationConfig<typeof InboundDelivery_Operations, InboundCoreOp, import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodObject<{
|
|
18
|
+
_id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>;
|
|
19
|
+
sourceKind: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof InboundSourceKind>>>;
|
|
20
|
+
sourceKey: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>;
|
|
21
|
+
handlerRef: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>;
|
|
22
|
+
dedupKey: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>;
|
|
23
|
+
orderingKey: import("zod").ZodDefault<import("zod").ZodNullable<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>;
|
|
24
|
+
providerDeliveryId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
25
|
+
signedAt: import("zod").ZodOptional<import("zod").ZodDate>;
|
|
26
|
+
receivedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDate>>;
|
|
27
|
+
rawBody: import("zod").ZodString;
|
|
28
|
+
headers: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
29
|
+
resolvedScope: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
30
|
+
kind: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodLiteral<InboundResolvedScopeKind.ORGANIZATION>>;
|
|
31
|
+
organizationId: import("zod").ZodString;
|
|
32
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
33
|
+
kind: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodLiteral<InboundResolvedScopeKind.APPLICATION>>;
|
|
34
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
35
|
+
kind: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodLiteral<InboundResolvedScopeKind.USER>>;
|
|
36
|
+
userId: import("zod").ZodString;
|
|
37
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
38
|
+
kind: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodLiteral<InboundResolvedScopeKind.UNROUTABLE>>;
|
|
39
|
+
reason: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof import("@wildo-ai/saas-models").InboundDeliveryUnroutableReason>>;
|
|
40
|
+
}, import("zod/v4/core").$strict>], "kind">;
|
|
41
|
+
channel: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof InboundChannelKind>>>>;
|
|
42
|
+
senderAssurance: import("zod").ZodDefault<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof InboundSenderAssurance>>>;
|
|
43
|
+
threadId: import("zod").ZodDefault<import("zod").ZodNullable<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>;
|
|
44
|
+
status: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof InboundDeliveryStatus>>>>>;
|
|
45
|
+
attemptCount: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodNumber>>;
|
|
46
|
+
attempts: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodObject<{
|
|
47
|
+
at: import("zod").ZodDate;
|
|
48
|
+
outcome: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof import("@wildo-ai/saas-models").InboundDeliveryAttemptOutcome>>;
|
|
49
|
+
errorCode: import("zod").ZodOptional<import("zod").ZodString>;
|
|
50
|
+
}, import("zod/v4/core").$strict>>>;
|
|
51
|
+
nextAttemptAt: import("zod").ZodDefault<import("zod").ZodNullable<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDate>>>;
|
|
52
|
+
leaseExpiresAt: import("zod").ZodDefault<import("zod").ZodNullable<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDate>>>;
|
|
53
|
+
budgetStartedAt: import("zod").ZodDate;
|
|
54
|
+
budgetBaseAttemptCount: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
55
|
+
terminalAt: import("zod").ZodDefault<import("zod").ZodNullable<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDate>>>;
|
|
56
|
+
replays: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodObject<{
|
|
57
|
+
by: import("zod").ZodString;
|
|
58
|
+
at: import("zod").ZodDate;
|
|
59
|
+
justification: import("zod").ZodString;
|
|
60
|
+
}, import("zod/v4/core").$strict>>>;
|
|
61
|
+
createdAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodDate>>>>;
|
|
62
|
+
updatedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodDate>>>;
|
|
63
|
+
}, import("zod/v4/core").$strip>>>;
|
|
64
|
+
export declare const applicationInboundDeliveriesResourceSpecification: ResourceSpecificationConfig<typeof InboundDelivery_Operations, InboundCoreOp, import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodObject<{
|
|
65
|
+
_id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>;
|
|
66
|
+
sourceKind: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof InboundSourceKind>>>;
|
|
67
|
+
sourceKey: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>;
|
|
68
|
+
handlerRef: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>;
|
|
69
|
+
dedupKey: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>;
|
|
70
|
+
orderingKey: import("zod").ZodDefault<import("zod").ZodNullable<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>;
|
|
71
|
+
providerDeliveryId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
72
|
+
signedAt: import("zod").ZodOptional<import("zod").ZodDate>;
|
|
73
|
+
receivedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDate>>;
|
|
74
|
+
rawBody: import("zod").ZodString;
|
|
75
|
+
headers: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
76
|
+
resolvedScope: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
77
|
+
kind: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodLiteral<InboundResolvedScopeKind.ORGANIZATION>>;
|
|
78
|
+
organizationId: import("zod").ZodString;
|
|
79
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
80
|
+
kind: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodLiteral<InboundResolvedScopeKind.APPLICATION>>;
|
|
81
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
82
|
+
kind: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodLiteral<InboundResolvedScopeKind.USER>>;
|
|
83
|
+
userId: import("zod").ZodString;
|
|
84
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
85
|
+
kind: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodLiteral<InboundResolvedScopeKind.UNROUTABLE>>;
|
|
86
|
+
reason: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof import("@wildo-ai/saas-models").InboundDeliveryUnroutableReason>>;
|
|
87
|
+
}, import("zod/v4/core").$strict>], "kind">;
|
|
88
|
+
channel: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof InboundChannelKind>>>>;
|
|
89
|
+
senderAssurance: import("zod").ZodDefault<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof InboundSenderAssurance>>>;
|
|
90
|
+
threadId: import("zod").ZodDefault<import("zod").ZodNullable<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>;
|
|
91
|
+
status: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof InboundDeliveryStatus>>>>>;
|
|
92
|
+
attemptCount: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodNumber>>;
|
|
93
|
+
attempts: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodObject<{
|
|
94
|
+
at: import("zod").ZodDate;
|
|
95
|
+
outcome: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof import("@wildo-ai/saas-models").InboundDeliveryAttemptOutcome>>;
|
|
96
|
+
errorCode: import("zod").ZodOptional<import("zod").ZodString>;
|
|
97
|
+
}, import("zod/v4/core").$strict>>>;
|
|
98
|
+
nextAttemptAt: import("zod").ZodDefault<import("zod").ZodNullable<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDate>>>;
|
|
99
|
+
leaseExpiresAt: import("zod").ZodDefault<import("zod").ZodNullable<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDate>>>;
|
|
100
|
+
budgetStartedAt: import("zod").ZodDate;
|
|
101
|
+
budgetBaseAttemptCount: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
102
|
+
terminalAt: import("zod").ZodDefault<import("zod").ZodNullable<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDate>>>;
|
|
103
|
+
replays: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodObject<{
|
|
104
|
+
by: import("zod").ZodString;
|
|
105
|
+
at: import("zod").ZodDate;
|
|
106
|
+
justification: import("zod").ZodString;
|
|
107
|
+
}, import("zod/v4/core").$strict>>>;
|
|
108
|
+
createdAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodDate>>>>;
|
|
109
|
+
updatedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodDate>>>;
|
|
110
|
+
}, import("zod/v4/core").$strip>>>;
|
|
111
|
+
export {};
|
|
112
|
+
//# sourceMappingURL=inbound-deliveries.resource.specification.d.ts.map
|
package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbound-deliveries.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/notifications/resources/inbound-deliveries.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAQH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAE3B,0BAA0B,EAE1B,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACtB,iBAAiB,EAGlB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAiD,KAAK,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAqB9H,KAAK,aAAa,GAAG,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,WAAW,CAAC;AA4QxG,eAAO,MAAM,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAAwF,CAAC;AAExJ,eAAO,MAAM,iDAAiD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAAuF,CAAC"}
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resources: `organizationInboundDeliveries` + `applicationInboundDeliveries` — Wildo SaaS engine
|
|
3
|
+
* specification (#1596).
|
|
4
|
+
*
|
|
5
|
+
* Polymorphic ORG + APP pair sharing `InboundDeliveryBaseSchema` and `inboundDeliveryPolymorphicFactories`.
|
|
6
|
+
*
|
|
7
|
+
* Inputs:
|
|
8
|
+
* - Base schema: `InboundDeliveryBaseSchema` (`inbound-delivery.shared.schemas.ts`)
|
|
9
|
+
* - Polymorphic factories: `inboundDeliveryPolymorphicFactories` (`inbound-delivery.shared.resources-config.schemas.ts`)
|
|
10
|
+
* - Custom operations: `InboundDelivery_Operations` (`replay`)
|
|
11
|
+
* - Runtime: the inbound receiver writes rows, the dispatch worker drives the status machine, REPLAY is
|
|
12
|
+
* `inbound-delivery-replay.custom-impl.backend.service.ts` (saas-backend-lib).
|
|
13
|
+
*/
|
|
14
|
+
import { LabelAudience } from '@wildo-ai/presets-components-models';
|
|
15
|
+
import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
|
|
16
|
+
import { CoreResourceOperation as Op, CoreResourceType, InboundDelivery_Operations, InboundDeliveryBaseSchema, InboundChannelKind, InboundDeliveryStatus, InboundResolvedScopeKind, InboundSenderAssurance, InboundSourceKind, ResourcePrimaryScope, inboundDeliveryPolymorphicFactories, } from '@wildo-ai/saas-models';
|
|
17
|
+
import { HttpResponseStatusCode, resourceSpecification } from '../../../_core/index.js';
|
|
18
|
+
import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
|
|
19
|
+
/** The `CoreResourceType` member name of a variant, read off the enum rather than restated. */
|
|
20
|
+
function coreResourceTypeMemberName(resourceType) {
|
|
21
|
+
const member = Object.keys(CoreResourceType).find((key) => CoreResourceType[key] === resourceType);
|
|
22
|
+
if (!member)
|
|
23
|
+
throw new Error(`No CoreResourceType member carries '${resourceType}'`);
|
|
24
|
+
return member;
|
|
25
|
+
}
|
|
26
|
+
const inboundDeliveriesPrimaryScope = {
|
|
27
|
+
[CoreResourceType.ORGANIZATION_INBOUND_DELIVERIES]: ResourcePrimaryScope.ORGANIZATIONS,
|
|
28
|
+
[CoreResourceType.APPLICATION_INBOUND_DELIVERIES]: ResourcePrimaryScope.APPLICATION,
|
|
29
|
+
};
|
|
30
|
+
const enumDeclaration = (exportName) => ({
|
|
31
|
+
packageName: '@wildo-ai/saas-models',
|
|
32
|
+
exportName,
|
|
33
|
+
symbolKind: CodeSymbolKind.ENUM,
|
|
34
|
+
declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,
|
|
35
|
+
});
|
|
36
|
+
function buildInboundDeliveriesSpecification(resourceType) {
|
|
37
|
+
const memberName = coreResourceTypeMemberName(resourceType);
|
|
38
|
+
const isOrganizationScope = resourceType === CoreResourceType.ORGANIZATION_INBOUND_DELIVERIES;
|
|
39
|
+
const scopeIdentity = isOrganizationScope ? { organizationId: 'org_01JEXAMPLE' } : { applicationId: 'app_01JEXAMPLE' };
|
|
40
|
+
const resolvedScope = isOrganizationScope
|
|
41
|
+
? { kind: InboundResolvedScopeKind.ORGANIZATION, organizationId: 'org_01JEXAMPLE' }
|
|
42
|
+
: { kind: InboundResolvedScopeKind.APPLICATION };
|
|
43
|
+
const deliveryIdentity = {
|
|
44
|
+
_id: '5f1c2e9b8a7d6c5b4a392817',
|
|
45
|
+
sourceKind: InboundSourceKind.APPLICATION_ENDPOINT,
|
|
46
|
+
sourceKey: 'app:todo-intake',
|
|
47
|
+
handlerRef: 'todos.intake',
|
|
48
|
+
dedupKey: 'msg_2mQYz9Lr0b7Hc1eKxA',
|
|
49
|
+
orderingKey: null,
|
|
50
|
+
providerDeliveryId: 'msg_2mQYz9Lr0b7Hc1eKxA',
|
|
51
|
+
signedAt: '2026-09-25T09:30:00.000Z',
|
|
52
|
+
receivedAt: '2026-09-25T09:30:01.000Z',
|
|
53
|
+
rawBody: 'eyJ0eXBlIjoidG9kby5yZXF1ZXN0ZWQiLCJ0aXRsZSI6IkNhbGwgdGhlIGNsaWVudCBiYWNrIn0=',
|
|
54
|
+
headers: { 'content-type': 'application/json', 'svix-id': 'msg_2mQYz9Lr0b7Hc1eKxA', 'svix-timestamp': '1790328600' },
|
|
55
|
+
resolvedScope,
|
|
56
|
+
budgetStartedAt: '2026-09-25T09:30:01.000Z',
|
|
57
|
+
budgetBaseAttemptCount: 0,
|
|
58
|
+
createdAt: '2026-09-25T09:30:01.000Z',
|
|
59
|
+
...scopeIdentity,
|
|
60
|
+
};
|
|
61
|
+
const deadExample = {
|
|
62
|
+
...deliveryIdentity,
|
|
63
|
+
status: InboundDeliveryStatus.DEAD,
|
|
64
|
+
attemptCount: 8,
|
|
65
|
+
attempts: [{ at: '2026-09-28T09:30:01.000Z', outcome: 'failed', errorCode: 'VALIDATION:service_resource_validation_failed' }],
|
|
66
|
+
nextAttemptAt: null,
|
|
67
|
+
leaseExpiresAt: null,
|
|
68
|
+
terminalAt: '2026-09-28T09:30:01.000Z',
|
|
69
|
+
replays: [],
|
|
70
|
+
updatedAt: '2026-09-28T09:30:01.000Z',
|
|
71
|
+
};
|
|
72
|
+
const replayedExample = {
|
|
73
|
+
...deadExample,
|
|
74
|
+
status: InboundDeliveryStatus.RECEIVED,
|
|
75
|
+
nextAttemptAt: '2026-09-28T10:00:00.000Z',
|
|
76
|
+
terminalAt: null,
|
|
77
|
+
budgetStartedAt: '2026-09-28T10:00:00.000Z',
|
|
78
|
+
budgetBaseAttemptCount: 8,
|
|
79
|
+
replays: [{ by: 'user_01JEXAMPLE', at: '2026-09-28T10:00:00.000Z', justification: 'The todo schema accepted the missing due date after the fix in release 42.' }],
|
|
80
|
+
updatedAt: '2026-09-28T10:00:00.000Z',
|
|
81
|
+
};
|
|
82
|
+
const pageExample = { data: [deadExample], pagination: { page: 1, limit: 20, total: 1, totalPages: 1 } };
|
|
83
|
+
const adminRole = isOrganizationScope ? 'organization administrator' : 'application super-administrator';
|
|
84
|
+
return resourceSpecification(inboundDeliveryPolymorphicFactories[resourceType], InboundDeliveryBaseSchema, ({ schemaShape }) => ({
|
|
85
|
+
purpose: 'Record every verified message another system sent the application — once per event — as the dedup ledger, the dispatch queue and the operator log of inbound work.',
|
|
86
|
+
businessRole: 'What makes inbound work durable: a provider retry never runs a handler twice, a handler failure is retried on the handler’s own policy, and a delivery that could not be completed stays visible until someone replays it.',
|
|
87
|
+
lifecycleRole: 'RECEIVED → PROCESSING → PROCESSED, or → RETRY_SCHEDULED → PROCESSING …, or → DEAD when the retry budget is spent; DEAD → RECEIVED only by REPLAY. UNROUTABLE is terminal and never runs.',
|
|
88
|
+
audience: LabelAudience.DEVELOPER,
|
|
89
|
+
subDomain: EngineResourceSubDomain.NOTIFICATIONS,
|
|
90
|
+
codeHandling: {
|
|
91
|
+
mainSchema: {
|
|
92
|
+
packageName: '@wildo-ai/saas-models',
|
|
93
|
+
exportName: 'InboundDeliveryBaseSchema',
|
|
94
|
+
symbolKind: CodeSymbolKind.SCHEMA,
|
|
95
|
+
declarationKind: CodeDeclarationKind.ZOD_SCHEMA,
|
|
96
|
+
},
|
|
97
|
+
resourceFactoryCollectionEntry: {
|
|
98
|
+
collectionSymbol: {
|
|
99
|
+
packageName: '@wildo-ai/saas-models',
|
|
100
|
+
exportName: 'inboundDeliveryPolymorphicFactories',
|
|
101
|
+
symbolKind: CodeSymbolKind.FACTORY,
|
|
102
|
+
},
|
|
103
|
+
identifierField: 'collectionKey',
|
|
104
|
+
identifierValue: resourceType,
|
|
105
|
+
},
|
|
106
|
+
resourceType: { enumDeclaration: enumDeclaration('CoreResourceType'), memberName },
|
|
107
|
+
operationVocabulary: {
|
|
108
|
+
coreEnum: enumDeclaration('CoreResourceOperation'),
|
|
109
|
+
customEnum: enumDeclaration('InboundDelivery_Operations'),
|
|
110
|
+
},
|
|
111
|
+
notes: [
|
|
112
|
+
'The polymorphism engine injects `organizationId` (ORG variant) or `applicationId` (APP variant). A delivery that resolved to an organization lives in that organization’s variant and is erased with it; application-scope, person-scope and unroutable deliveries live in the application variant, where the application’s operators administer them.',
|
|
113
|
+
'The row id is derived from `(sourceKey, dedupKey)`, so the primary key is the dedup collision on both adapters.',
|
|
114
|
+
'An UNROUTABLE delivery naming an organization that exists but confers no authority (suspended, or marked for deletion) is stored in the APPLICATION variant, because it never ran in that organization. So it does not leave with that organization’s purge; it leaves at the end of its `OPERATIONAL_LOGS` retention period, counted from the moment it was stored.',
|
|
115
|
+
'LIST and SEARCH never return `rawBody`: their per-variant response (`polymorphicCustomResponseDto`) omits it while keeping the scope key. The store still reads the column; only the response drops it. READ returns it, for one delivery an operator chose to open.',
|
|
116
|
+
'`resolvedScope` is a union on `InboundResolvedScopeKind`: `{ kind: organization, organizationId }`, `{ kind: application }`, `{ kind: user, userId }` (one person’s own data, for a handler that declares user roles), or `{ kind: unroutable, reason }` (`InboundDeliveryUnroutableReason`). It is never a fallback: a delivery whose handler requires an organization and resolves none, or that resolves to a scope its handler holds no roles in, is unroutable, not application-scoped.',
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
fields: {
|
|
120
|
+
_id: schemaShape._id.stringSpec({ meaning: 'Derived from the source and the dedup key: the same event always maps to the same id.', importance: FieldSemanticImportance.PRIMARY, semanticRole: 'identifier' }),
|
|
121
|
+
sourceKind: schemaShape.sourceKind.enumSpec({
|
|
122
|
+
meaning: 'Whether a provider or the application declared the endpoint the message arrived on.',
|
|
123
|
+
enumDeclaration: enumDeclaration('InboundSourceKind'),
|
|
124
|
+
values: {
|
|
125
|
+
[InboundSourceKind.PROVIDER_ENDPOINT]: { meaning: 'A provider-declared endpoint, verified by the provider’s own adapter.' },
|
|
126
|
+
[InboundSourceKind.APPLICATION_ENDPOINT]: { meaning: 'An application endpoint at `/webhooks/app/{endpointKey}`, verified by an engine-owned scheme.' },
|
|
127
|
+
[InboundSourceKind.CHANNEL]: { meaning: 'A message received on an inbound channel (email), routed to an organization and handed to the channel handler selected for it.' },
|
|
128
|
+
},
|
|
129
|
+
}),
|
|
130
|
+
sourceKey: schemaShape.sourceKey.stringSpec({ meaning: '`{providerRef}:{endpointKey}` — `app` for an application endpoint. Half of the dedup key.', importance: FieldSemanticImportance.PRIMARY, semanticRole: 'code' }),
|
|
131
|
+
handlerRef: schemaShape.handlerRef.stringSpec({ meaning: 'The declared handler that owns the delivery.', importance: FieldSemanticImportance.PRIMARY, semanticRole: 'code' }),
|
|
132
|
+
dedupKey: schemaShape.dedupKey.stringSpec({ meaning: 'The signed delivery id, or the handler’s declared dedup key. One key, one run.', semanticRole: 'code' }),
|
|
133
|
+
orderingKey: schemaShape.orderingKey.stringSpec({ meaning: 'When set, deliveries sharing it run one at a time in receive order.', semanticRole: 'code' }),
|
|
134
|
+
providerDeliveryId: schemaShape.providerDeliveryId.stringSpec({ meaning: 'The id the sender signed, when its scheme carries one.', semanticRole: 'code' }),
|
|
135
|
+
signedAt: schemaShape.signedAt.dateSpec({ meaning: 'When the sender says it signed the message, when the scheme carries a timestamp.', temporalRole: 'occurred' }),
|
|
136
|
+
receivedAt: schemaShape.receivedAt.dateSpec({ meaning: 'When the application received and verified the message.', temporalRole: 'occurred', importance: FieldSemanticImportance.PRIMARY }),
|
|
137
|
+
rawBody: schemaShape.rawBody.stringSpec({ meaning: 'The exact verified bytes, base64-encoded — what a replay re-runs. Carries the sender’s data, routinely personal data.' }),
|
|
138
|
+
headers: schemaShape.headers.objectSpec({ meaning: 'Only the headers the verification scheme and the handler need; never cookies or credentials.' }),
|
|
139
|
+
status: schemaShape.status.enumSpec({
|
|
140
|
+
meaning: 'Where the delivery is in its lifecycle.',
|
|
141
|
+
importance: FieldSemanticImportance.PRIMARY,
|
|
142
|
+
enumDeclaration: enumDeclaration('InboundDeliveryStatus'),
|
|
143
|
+
values: {
|
|
144
|
+
[InboundDeliveryStatus.RECEIVED]: { meaning: 'Verified and stored; waiting for the dispatch worker.' },
|
|
145
|
+
[InboundDeliveryStatus.PROCESSING]: { meaning: 'A worker holds it and is running the handler.' },
|
|
146
|
+
[InboundDeliveryStatus.RETRY_SCHEDULED]: { meaning: 'The last attempt failed; the next one runs at `nextAttemptAt`.' },
|
|
147
|
+
[InboundDeliveryStatus.PROCESSED]: { meaning: 'The handler completed.' },
|
|
148
|
+
[InboundDeliveryStatus.DEAD]: { meaning: 'Every attempt the handler’s retry policy allows failed. Waits for a replay.' },
|
|
149
|
+
[InboundDeliveryStatus.UNROUTABLE]: { meaning: 'No admissible scope was resolved, so the handler never ran.' },
|
|
150
|
+
},
|
|
151
|
+
}),
|
|
152
|
+
attemptCount: schemaShape.attemptCount.numberSpec({ meaning: 'Attempts started, ever. Also the fencing token a worker settles against.', unit: 'count' }),
|
|
153
|
+
attempts: schemaShape.attempts.arraySpec({ meaning: 'Every attempt to run the handler, oldest first.', elementMeaning: 'One attempt: when it ended, whether it processed or failed, and for a failure its classified error code (never an error message).' }),
|
|
154
|
+
nextAttemptAt: schemaShape.nextAttemptAt.dateSpec({ meaning: 'When the next attempt may start, while RECEIVED or RETRY_SCHEDULED.', temporalRole: 'scheduled' }),
|
|
155
|
+
leaseExpiresAt: schemaShape.leaseExpiresAt.dateSpec({ meaning: 'While PROCESSING: when a worker that stopped answering loses the row to the sweep.', temporalRole: 'scheduled' }),
|
|
156
|
+
budgetStartedAt: schemaShape.budgetStartedAt.dateSpec({ meaning: 'Start of the current retry budget — receipt, or the last replay.', temporalRole: 'occurred' }),
|
|
157
|
+
budgetBaseAttemptCount: schemaShape.budgetBaseAttemptCount.numberSpec({ meaning: '`attemptCount` when the current budget started.', unit: 'count' }),
|
|
158
|
+
terminalAt: schemaShape.terminalAt.dateSpec({ meaning: 'When the row reached PROCESSED, DEAD or UNROUTABLE — the start point of its retention period.', temporalRole: 'occurred' }),
|
|
159
|
+
replays: schemaShape.replays.arraySpec({ meaning: 'Every operator replay of the delivery, oldest first.', elementMeaning: 'One replay: who replayed the delivery, when, and the justification they wrote.' }),
|
|
160
|
+
channel: schemaShape.channel.enumSpec({
|
|
161
|
+
meaning: 'The channel the delivery arrived on. Every endpoint delivery is a webhook; a message received by email is on the email channel.',
|
|
162
|
+
enumDeclaration: enumDeclaration('InboundChannelKind'),
|
|
163
|
+
values: {
|
|
164
|
+
[InboundChannelKind.WEBHOOK]: { meaning: 'A signed message from another system, on a provider or application endpoint.' },
|
|
165
|
+
[InboundChannelKind.EMAIL]: { meaning: 'An email received for one of the application’s addresses.' },
|
|
166
|
+
},
|
|
167
|
+
}),
|
|
168
|
+
senderAssurance: schemaShape.senderAssurance.enumSpec({
|
|
169
|
+
meaning: 'How much is known about who sent the message, ranked within its channel. It decides only whether the handler may run, never what the handler may do.',
|
|
170
|
+
enumDeclaration: enumDeclaration('InboundSenderAssurance'),
|
|
171
|
+
values: {
|
|
172
|
+
[InboundSenderAssurance.UNVERIFIED]: { meaning: 'Nothing about the sender is proven.' },
|
|
173
|
+
[InboundSenderAssurance.SOURCE_SIGNED]: { meaning: 'A webhook whose signature verified: it came from the system holding the secret.' },
|
|
174
|
+
[InboundSenderAssurance.DOMAIN_ALIGNED]: { meaning: 'An email that passed DMARC alignment: its From domain is authenticated.' },
|
|
175
|
+
[InboundSenderAssurance.KNOWN_CONTACT]: { meaning: 'An aligned email from an organization member, or from a contact the handler knows.' },
|
|
176
|
+
[InboundSenderAssurance.THREAD_TOKEN_BOUND]: { meaning: 'An aligned email to a live reply address, sent by the recipient that address was issued to.' },
|
|
177
|
+
},
|
|
178
|
+
}),
|
|
179
|
+
threadId: schemaShape.threadId.stringSpec({ meaning: 'The conversation thread a channel message belongs to; empty for a webhook delivery.', semanticRole: 'identifier' }),
|
|
180
|
+
createdAt: schemaShape.createdAt.dateSpec({ meaning: 'When the row was stored.', temporalRole: 'creation' }),
|
|
181
|
+
updatedAt: schemaShape.updatedAt.dateSpec({ meaning: 'When the row last changed.', temporalRole: 'modified' }),
|
|
182
|
+
},
|
|
183
|
+
// `resolvedScope` is a DISCRIMINATED UNION, and the spec decorators are not declared on
|
|
184
|
+
// `ZodDiscriminatedUnion`, so its meaning is declared through the escape hatch rather than dropped.
|
|
185
|
+
additionalFieldSpecs: [
|
|
186
|
+
{
|
|
187
|
+
fieldName: 'resolvedScope',
|
|
188
|
+
specDecorator: 'objectSpec',
|
|
189
|
+
params: {
|
|
190
|
+
meaning: 'The scope the delivery runs in: one organization, the application, one person’s own data, or unroutable with the reason no admissible scope was found.',
|
|
191
|
+
whyItMatters: 'The handler runs only in this scope, and never falls back to the application scope: a delivery whose handler requires an organization and resolves none is unroutable.',
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
],
|
|
195
|
+
operations: {
|
|
196
|
+
[Op.READ]: {
|
|
197
|
+
purpose: `Inspect one delivery: its source, handler, scope, status and attempts. The stored body comes back whole — treat it as the sender’s data.`,
|
|
198
|
+
outcome: 'An operator can see why a delivery failed and whether it can be replayed.',
|
|
199
|
+
importance: FieldSemanticImportance.PRIMARY,
|
|
200
|
+
responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The delivery is returned.' }],
|
|
201
|
+
errorScenarios: [
|
|
202
|
+
{ code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery with this id exists in this scope.' },
|
|
203
|
+
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: `The caller is not the ${adminRole}.` },
|
|
204
|
+
],
|
|
205
|
+
idempotent: true,
|
|
206
|
+
examples: [{ title: 'Inspect a dead delivery', response: deadExample, forStatus: HttpResponseStatusCode.OK_200 }],
|
|
207
|
+
variants: { context: { examples: [] }, summary: { examples: [] } },
|
|
208
|
+
},
|
|
209
|
+
[Op.LIST]: {
|
|
210
|
+
purpose: 'Browse deliveries, newest first.',
|
|
211
|
+
outcome: 'An operator can spot a run of failures from one source.',
|
|
212
|
+
responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of deliveries in this scope.' }],
|
|
213
|
+
errorScenarios: [{ code: HttpResponseStatusCode.FORBIDDEN_403, when: `The caller is not the ${adminRole}.` }],
|
|
214
|
+
idempotent: true,
|
|
215
|
+
examples: [{ title: 'Browse recent deliveries', request: { page: 1, limit: 20, sort: 'receivedAt:desc' }, response: pageExample, forStatus: HttpResponseStatusCode.OK_200 }],
|
|
216
|
+
variants: { context: { examples: [] }, summary: { examples: [] } },
|
|
217
|
+
},
|
|
218
|
+
[Op.SEARCH]: {
|
|
219
|
+
purpose: 'Filter deliveries by status, source kind, handler and receipt time.',
|
|
220
|
+
outcome: 'An operator can list every DEAD delivery of one handler before replaying them.',
|
|
221
|
+
responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of matching deliveries.' }],
|
|
222
|
+
errorScenarios: [{ code: HttpResponseStatusCode.FORBIDDEN_403, when: `The caller is not the ${adminRole}.` }],
|
|
223
|
+
idempotent: true,
|
|
224
|
+
examples: [{ title: 'Find dead deliveries of one handler', request: { status: InboundDeliveryStatus.DEAD, handlerRef: 'todos.intake', page: 1, limit: 20 }, response: pageExample, forStatus: HttpResponseStatusCode.OK_200 }],
|
|
225
|
+
},
|
|
226
|
+
[Op.CREATE]: {
|
|
227
|
+
purpose: 'Store a verified delivery. Written only by the inbound receiver.',
|
|
228
|
+
outcome: 'The dedup ledger holds the event and the worker can dispatch it.',
|
|
229
|
+
whenToUse: 'Repository-only: never an HTTP surface.',
|
|
230
|
+
responseStatuses: [{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The delivery was stored. Internal write path.' }],
|
|
231
|
+
errorScenarios: [{ code: HttpResponseStatusCode.CONFLICT_409, when: 'The same event is already stored — the dedup ledger refusing a second copy.' }],
|
|
232
|
+
idempotent: false,
|
|
233
|
+
},
|
|
234
|
+
[Op.UPDATE]: {
|
|
235
|
+
purpose: 'Drive the status machine (lease, settle). Written only by the dispatch worker.',
|
|
236
|
+
outcome: 'Each attempt is fenced by `attemptCount`, so a worker that lost its lease cannot settle the row.',
|
|
237
|
+
whenToUse: 'Repository-only: never an HTTP surface — operators act through REPLAY.',
|
|
238
|
+
responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The row was advanced. Internal write path.' }],
|
|
239
|
+
errorScenarios: [{ code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery with this id exists.' }],
|
|
240
|
+
idempotent: false,
|
|
241
|
+
},
|
|
242
|
+
[Op.DELETE]: {
|
|
243
|
+
purpose: 'The retention sweep’s door: an internal, route-less call. No API deletes a delivery, so the operator’s log cannot be edited.',
|
|
244
|
+
outcome: 'Deliveries leave only through the OPERATIONAL_LOGS retention period, counted from terminalAt, or with their organization.',
|
|
245
|
+
responseStatuses: [{ code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'Internal retention delete completed.' }],
|
|
246
|
+
errorScenarios: [{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'Any caller other than the engine.' }],
|
|
247
|
+
idempotent: true,
|
|
248
|
+
},
|
|
249
|
+
[Op.DELETE_MANY]: {
|
|
250
|
+
purpose: 'Bulk twin of DELETE, the retention sweep’s preferred door (internal, route-less).',
|
|
251
|
+
outcome: 'Terminal deliveries whose OPERATIONAL_LOGS period, counted from terminalAt, has ended are removed in one statement. A delivery that is not terminal has no terminalAt and never expires.',
|
|
252
|
+
responseStatuses: [{ code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'Internal retention delete completed.' }],
|
|
253
|
+
errorScenarios: [{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'Any caller other than the engine.' }],
|
|
254
|
+
idempotent: true,
|
|
255
|
+
},
|
|
256
|
+
[InboundDelivery_Operations.REPLAY]: {
|
|
257
|
+
operationId: InboundDelivery_Operations.REPLAY,
|
|
258
|
+
purpose: 'Put one DEAD delivery back in the queue with a fresh retry budget, recording who replayed it and why.',
|
|
259
|
+
outcome: 'After a handler is fixed, the work the sender was told was received gets done — once.',
|
|
260
|
+
whenToUse: 'Use after fixing whatever made the handler fail. The justification is stored on the row and on the audit trail.',
|
|
261
|
+
importance: FieldSemanticImportance.PRIMARY,
|
|
262
|
+
responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The delivery is RECEIVED again and will be dispatched; the updated row is returned.' }],
|
|
263
|
+
errorScenarios: [
|
|
264
|
+
{ code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'No justification was given.' },
|
|
265
|
+
{ code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery with this id exists in this scope.' },
|
|
266
|
+
{ code: HttpResponseStatusCode.FORBIDDEN_403, when: `The caller is not the ${adminRole}.` },
|
|
267
|
+
{ code: HttpResponseStatusCode.CONFLICT_409, when: 'The delivery is not DEAD — a processed delivery must not run twice and an unroutable one has no scope to run in.' },
|
|
268
|
+
],
|
|
269
|
+
idempotent: false,
|
|
270
|
+
examples: [{
|
|
271
|
+
title: 'Replay a dead delivery after a fix',
|
|
272
|
+
request: { justification: 'The todo schema accepted the missing due date after the fix in release 42.' },
|
|
273
|
+
response: replayedExample,
|
|
274
|
+
forStatus: HttpResponseStatusCode.OK_200,
|
|
275
|
+
}],
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
businessConstraints: [
|
|
279
|
+
'A delivery is stored at most once per `(sourceKey, dedupKey)`; a provider retry answers 200 and runs nothing.',
|
|
280
|
+
'The handler runs under an `INBOUND_DELIVERY` context holding only its declared roles in the resolved scope — never the super-administrator role, never another organization.',
|
|
281
|
+
'`rawBody` is the sender’s data. Reads are limited to the administrator of the scope, and an organization’s deliveries are erased with it.',
|
|
282
|
+
],
|
|
283
|
+
}), { resourcePrimaryScope: inboundDeliveriesPrimaryScope[resourceType] });
|
|
284
|
+
}
|
|
285
|
+
export const organizationInboundDeliveriesResourceSpecification = buildInboundDeliveriesSpecification(CoreResourceType.ORGANIZATION_INBOUND_DELIVERIES);
|
|
286
|
+
export const applicationInboundDeliveriesResourceSpecification = buildInboundDeliveriesSpecification(CoreResourceType.APPLICATION_INBOUND_DELIVERIES);
|
|
287
|
+
//# sourceMappingURL=inbound-deliveries.resource.specification.js.map
|
package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbound-deliveries.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/notifications/resources/inbound-deliveries.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;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,gBAAgB,EAChB,0BAA0B,EAC1B,yBAAyB,EACzB,kBAAkB,EAClB,qB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AC5H,UAAU,EAAE,uBAAuB,CAAC,OAAO;gBAC3C,gBAAgB,EAAE,CAAC,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,qFAAqF,EAAE,CAAC;gBAC3J,cAAc,EAAE;oBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,eAAe,EAAE,IAAI,EAAE,6BAA6B,EAAE;oBACrF,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,gDAAgD,EAAE;oBACtG,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,yBAAyB,SAAS,GAAG,EAAE;oBAC3F,EAAE,IAAI,EAAE,sBAAsB,CAAC,YAAY,EAAE,IAAI,EAAE,kHAAkH,EAAE;iBACxK;gBACD,UAAU,EAAE,KAAK;gBACjB,QAAQ,EAAE,CAAC;wBACT,KAAK,EAAE,oCAAoC;wBAC3C,OAAO,EAAE,EAAE,aAAa,EAAE,4EAA4E,EAAE;wBACxG,QAAQ,EAAE,eAAe;wBACzB,SAAS,EAAE,sBAAsB,CAAC,MAAM;qBACzC,CAAC;aACH;SACF;QACD,mBAAmB,EAAE;YACnB,+GAA+G;YAC/G,8KAA8K;YAC9K,2IAA2I;SAC5I;KACF,CAAC,EACF,EAAE,oBAAoB,EAAE,6BAA6B,CAAC,YAAY,CAAC,EAAE,CACtE,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,kDAAkD,GAAG,mCAAmC,CAAC,gBAAgB,CAAC,+BAA+B,CAAC,CAAC;AAExJ,MAAM,CAAC,MAAM,iDAAiD,GAAG,mCAAmC,CAAC,gBAAgB,CAAC,8BAA8B,CAAC,CAAC","sourcesContent":["/**\n * Resources: `organizationInboundDeliveries` + `applicationInboundDeliveries` — Wildo SaaS engine\n * specification (#1596).\n *\n * Polymorphic ORG + APP pair sharing `InboundDeliveryBaseSchema` and `inboundDeliveryPolymorphicFactories`.\n *\n * Inputs:\n * - Base schema: `InboundDeliveryBaseSchema` (`inbound-delivery.shared.schemas.ts`)\n * - Polymorphic factories: `inboundDeliveryPolymorphicFactories` (`inbound-delivery.shared.resources-config.schemas.ts`)\n * - Custom operations: `InboundDelivery_Operations` (`replay`)\n * - Runtime: the inbound receiver writes rows, the dispatch worker drives the status machine, REPLAY is\n * `inbound-delivery-replay.custom-impl.backend.service.ts` (saas-backend-lib).\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 CoreResourceType,\n InboundDelivery_Operations,\n InboundDeliveryBaseSchema,\n InboundChannelKind,\n InboundDeliveryStatus,\n InboundResolvedScopeKind,\n InboundSenderAssurance,\n InboundSourceKind,\n ResourcePrimaryScope,\n inboundDeliveryPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification, type ResourceSpecificationConfig } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype InboundDeliveriesResourceType =\n | CoreResourceType.ORGANIZATION_INBOUND_DELIVERIES\n | CoreResourceType.APPLICATION_INBOUND_DELIVERIES;\n\n/** The `CoreResourceType` member name of a variant, read off the enum rather than restated. */\nfunction coreResourceTypeMemberName(resourceType: InboundDeliveriesResourceType): keyof typeof CoreResourceType {\n const member = (Object.keys(CoreResourceType) as (keyof typeof CoreResourceType)[]).find((key) => CoreResourceType[key] === resourceType);\n if (!member) throw new Error(`No CoreResourceType member carries '${resourceType}'`);\n return member;\n}\n\nconst inboundDeliveriesPrimaryScope: Record<InboundDeliveriesResourceType, ResourcePrimaryScope> = {\n [CoreResourceType.ORGANIZATION_INBOUND_DELIVERIES]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_INBOUND_DELIVERIES]: ResourcePrimaryScope.APPLICATION,\n};\n\ntype InboundFactoryCfg = ReturnType<(typeof inboundDeliveryPolymorphicFactories)[CoreResourceType.ORGANIZATION_INBOUND_DELIVERIES]>;\ntype InboundCustomOp = NonNullable<InboundFactoryCfg['customOperation']>;\ntype InboundCoreOp = Op.READ | Op.LIST | Op.SEARCH | Op.CREATE | Op.UPDATE | Op.DELETE | Op.DELETE_MANY;\ntype InboundMain = typeof InboundDeliveryBaseSchema;\n\nconst enumDeclaration = (exportName: string) => ({\n packageName: '@wildo-ai/saas-models',\n exportName,\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n});\n\nfunction buildInboundDeliveriesSpecification(\n resourceType: InboundDeliveriesResourceType,\n): ResourceSpecificationConfig<InboundCustomOp, InboundCoreOp, InboundMain> {\n const memberName = coreResourceTypeMemberName(resourceType);\n const isOrganizationScope = resourceType === CoreResourceType.ORGANIZATION_INBOUND_DELIVERIES;\n const scopeIdentity = isOrganizationScope ? { organizationId: 'org_01JEXAMPLE' } : { applicationId: 'app_01JEXAMPLE' };\n const resolvedScope = isOrganizationScope\n ? { kind: InboundResolvedScopeKind.ORGANIZATION, organizationId: 'org_01JEXAMPLE' }\n : { kind: InboundResolvedScopeKind.APPLICATION };\n const deliveryIdentity = {\n _id: '5f1c2e9b8a7d6c5b4a392817',\n sourceKind: InboundSourceKind.APPLICATION_ENDPOINT,\n sourceKey: 'app:todo-intake',\n handlerRef: 'todos.intake',\n dedupKey: 'msg_2mQYz9Lr0b7Hc1eKxA',\n orderingKey: null,\n providerDeliveryId: 'msg_2mQYz9Lr0b7Hc1eKxA',\n signedAt: '2026-09-25T09:30:00.000Z',\n receivedAt: '2026-09-25T09:30:01.000Z',\n rawBody: 'eyJ0eXBlIjoidG9kby5yZXF1ZXN0ZWQiLCJ0aXRsZSI6IkNhbGwgdGhlIGNsaWVudCBiYWNrIn0=',\n headers: { 'content-type': 'application/json', 'svix-id': 'msg_2mQYz9Lr0b7Hc1eKxA', 'svix-timestamp': '1790328600' },\n resolvedScope,\n budgetStartedAt: '2026-09-25T09:30:01.000Z',\n budgetBaseAttemptCount: 0,\n createdAt: '2026-09-25T09:30:01.000Z',\n ...scopeIdentity,\n } as const;\n const deadExample = {\n ...deliveryIdentity,\n status: InboundDeliveryStatus.DEAD,\n attemptCount: 8,\n attempts: [{ at: '2026-09-28T09:30:01.000Z', outcome: 'failed', errorCode: 'VALIDATION:service_resource_validation_failed' }],\n nextAttemptAt: null,\n leaseExpiresAt: null,\n terminalAt: '2026-09-28T09:30:01.000Z',\n replays: [],\n updatedAt: '2026-09-28T09:30:01.000Z',\n } as const;\n const replayedExample = {\n ...deadExample,\n status: InboundDeliveryStatus.RECEIVED,\n nextAttemptAt: '2026-09-28T10:00:00.000Z',\n terminalAt: null,\n budgetStartedAt: '2026-09-28T10:00:00.000Z',\n budgetBaseAttemptCount: 8,\n replays: [{ by: 'user_01JEXAMPLE', at: '2026-09-28T10:00:00.000Z', justification: 'The todo schema accepted the missing due date after the fix in release 42.' }],\n updatedAt: '2026-09-28T10:00:00.000Z',\n } as const;\n const pageExample = { data: [deadExample], pagination: { page: 1, limit: 20, total: 1, totalPages: 1 } } as const;\n const adminRole = isOrganizationScope ? 'organization administrator' : 'application super-administrator';\n\n return resourceSpecification<InboundCustomOp, InboundCoreOp, InboundMain>(\n inboundDeliveryPolymorphicFactories[resourceType],\n InboundDeliveryBaseSchema,\n ({ schemaShape }) => ({\n purpose: 'Record every verified message another system sent the application — once per event — as the dedup ledger, the dispatch queue and the operator log of inbound work.',\n businessRole: 'What makes inbound work durable: a provider retry never runs a handler twice, a handler failure is retried on the handler’s own policy, and a delivery that could not be completed stays visible until someone replays it.',\n lifecycleRole: 'RECEIVED → PROCESSING → PROCESSED, or → RETRY_SCHEDULED → PROCESSING …, or → DEAD when the retry budget is spent; DEAD → RECEIVED only by REPLAY. UNROUTABLE is terminal and never runs.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.NOTIFICATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'InboundDeliveryBaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'inboundDeliveryPolymorphicFactories',\n symbolKind: CodeSymbolKind.FACTORY,\n },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\n },\n resourceType: { enumDeclaration: enumDeclaration('CoreResourceType'), memberName },\n operationVocabulary: {\n coreEnum: enumDeclaration('CoreResourceOperation'),\n customEnum: enumDeclaration('InboundDelivery_Operations'),\n },\n notes: [\n 'The polymorphism engine injects `organizationId` (ORG variant) or `applicationId` (APP variant). A delivery that resolved to an organization lives in that organization’s variant and is erased with it; application-scope, person-scope and unroutable deliveries live in the application variant, where the application’s operators administer them.',\n 'The row id is derived from `(sourceKey, dedupKey)`, so the primary key is the dedup collision on both adapters.',\n 'An UNROUTABLE delivery naming an organization that exists but confers no authority (suspended, or marked for deletion) is stored in the APPLICATION variant, because it never ran in that organization. So it does not leave with that organization’s purge; it leaves at the end of its `OPERATIONAL_LOGS` retention period, counted from the moment it was stored.',\n 'LIST and SEARCH never return `rawBody`: their per-variant response (`polymorphicCustomResponseDto`) omits it while keeping the scope key. The store still reads the column; only the response drops it. READ returns it, for one delivery an operator chose to open.',\n '`resolvedScope` is a union on `InboundResolvedScopeKind`: `{ kind: organization, organizationId }`, `{ kind: application }`, `{ kind: user, userId }` (one person’s own data, for a handler that declares user roles), or `{ kind: unroutable, reason }` (`InboundDeliveryUnroutableReason`). It is never a fallback: a delivery whose handler requires an organization and resolves none, or that resolves to a scope its handler holds no roles in, is unroutable, not application-scoped.',\n ],\n },\n fields: {\n _id: schemaShape._id.stringSpec({ meaning: 'Derived from the source and the dedup key: the same event always maps to the same id.', importance: FieldSemanticImportance.PRIMARY, semanticRole: 'identifier' }),\n sourceKind: schemaShape.sourceKind.enumSpec({\n meaning: 'Whether a provider or the application declared the endpoint the message arrived on.',\n enumDeclaration: enumDeclaration('InboundSourceKind'),\n values: {\n [InboundSourceKind.PROVIDER_ENDPOINT]: { meaning: 'A provider-declared endpoint, verified by the provider’s own adapter.' },\n [InboundSourceKind.APPLICATION_ENDPOINT]: { meaning: 'An application endpoint at `/webhooks/app/{endpointKey}`, verified by an engine-owned scheme.' },\n [InboundSourceKind.CHANNEL]: { meaning: 'A message received on an inbound channel (email), routed to an organization and handed to the channel handler selected for it.' },\n },\n }),\n sourceKey: schemaShape.sourceKey.stringSpec({ meaning: '`{providerRef}:{endpointKey}` — `app` for an application endpoint. Half of the dedup key.', importance: FieldSemanticImportance.PRIMARY, semanticRole: 'code' }),\n handlerRef: schemaShape.handlerRef.stringSpec({ meaning: 'The declared handler that owns the delivery.', importance: FieldSemanticImportance.PRIMARY, semanticRole: 'code' }),\n dedupKey: schemaShape.dedupKey.stringSpec({ meaning: 'The signed delivery id, or the handler’s declared dedup key. One key, one run.', semanticRole: 'code' }),\n orderingKey: schemaShape.orderingKey.stringSpec({ meaning: 'When set, deliveries sharing it run one at a time in receive order.', semanticRole: 'code' }),\n providerDeliveryId: schemaShape.providerDeliveryId.stringSpec({ meaning: 'The id the sender signed, when its scheme carries one.', semanticRole: 'code' }),\n signedAt: schemaShape.signedAt.dateSpec({ meaning: 'When the sender says it signed the message, when the scheme carries a timestamp.', temporalRole: 'occurred' }),\n receivedAt: schemaShape.receivedAt.dateSpec({ meaning: 'When the application received and verified the message.', temporalRole: 'occurred', importance: FieldSemanticImportance.PRIMARY }),\n rawBody: schemaShape.rawBody.stringSpec({ meaning: 'The exact verified bytes, base64-encoded — what a replay re-runs. Carries the sender’s data, routinely personal data.' }),\n headers: schemaShape.headers.objectSpec({ meaning: 'Only the headers the verification scheme and the handler need; never cookies or credentials.' }),\n status: schemaShape.status.enumSpec({\n meaning: 'Where the delivery is in its lifecycle.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: enumDeclaration('InboundDeliveryStatus'),\n values: {\n [InboundDeliveryStatus.RECEIVED]: { meaning: 'Verified and stored; waiting for the dispatch worker.' },\n [InboundDeliveryStatus.PROCESSING]: { meaning: 'A worker holds it and is running the handler.' },\n [InboundDeliveryStatus.RETRY_SCHEDULED]: { meaning: 'The last attempt failed; the next one runs at `nextAttemptAt`.' },\n [InboundDeliveryStatus.PROCESSED]: { meaning: 'The handler completed.' },\n [InboundDeliveryStatus.DEAD]: { meaning: 'Every attempt the handler’s retry policy allows failed. Waits for a replay.' },\n [InboundDeliveryStatus.UNROUTABLE]: { meaning: 'No admissible scope was resolved, so the handler never ran.' },\n },\n }),\n attemptCount: schemaShape.attemptCount.numberSpec({ meaning: 'Attempts started, ever. Also the fencing token a worker settles against.', unit: 'count' }),\n attempts: schemaShape.attempts.arraySpec({ meaning: 'Every attempt to run the handler, oldest first.', elementMeaning: 'One attempt: when it ended, whether it processed or failed, and for a failure its classified error code (never an error message).' }),\n nextAttemptAt: schemaShape.nextAttemptAt.dateSpec({ meaning: 'When the next attempt may start, while RECEIVED or RETRY_SCHEDULED.', temporalRole: 'scheduled' }),\n leaseExpiresAt: schemaShape.leaseExpiresAt.dateSpec({ meaning: 'While PROCESSING: when a worker that stopped answering loses the row to the sweep.', temporalRole: 'scheduled' }),\n budgetStartedAt: schemaShape.budgetStartedAt.dateSpec({ meaning: 'Start of the current retry budget — receipt, or the last replay.', temporalRole: 'occurred' }),\n budgetBaseAttemptCount: schemaShape.budgetBaseAttemptCount.numberSpec({ meaning: '`attemptCount` when the current budget started.', unit: 'count' }),\n terminalAt: schemaShape.terminalAt.dateSpec({ meaning: 'When the row reached PROCESSED, DEAD or UNROUTABLE — the start point of its retention period.', temporalRole: 'occurred' }),\n replays: schemaShape.replays.arraySpec({ meaning: 'Every operator replay of the delivery, oldest first.', elementMeaning: 'One replay: who replayed the delivery, when, and the justification they wrote.' }),\n channel: schemaShape.channel.enumSpec({\n meaning: 'The channel the delivery arrived on. Every endpoint delivery is a webhook; a message received by email is on the email channel.',\n enumDeclaration: enumDeclaration('InboundChannelKind'),\n values: {\n [InboundChannelKind.WEBHOOK]: { meaning: 'A signed message from another system, on a provider or application endpoint.' },\n [InboundChannelKind.EMAIL]: { meaning: 'An email received for one of the application’s addresses.' },\n },\n }),\n senderAssurance: schemaShape.senderAssurance.enumSpec({\n meaning: 'How much is known about who sent the message, ranked within its channel. It decides only whether the handler may run, never what the handler may do.',\n enumDeclaration: enumDeclaration('InboundSenderAssurance'),\n values: {\n [InboundSenderAssurance.UNVERIFIED]: { meaning: 'Nothing about the sender is proven.' },\n [InboundSenderAssurance.SOURCE_SIGNED]: { meaning: 'A webhook whose signature verified: it came from the system holding the secret.' },\n [InboundSenderAssurance.DOMAIN_ALIGNED]: { meaning: 'An email that passed DMARC alignment: its From domain is authenticated.' },\n [InboundSenderAssurance.KNOWN_CONTACT]: { meaning: 'An aligned email from an organization member, or from a contact the handler knows.' },\n [InboundSenderAssurance.THREAD_TOKEN_BOUND]: { meaning: 'An aligned email to a live reply address, sent by the recipient that address was issued to.' },\n },\n }),\n threadId: schemaShape.threadId.stringSpec({ meaning: 'The conversation thread a channel message belongs to; empty for a webhook delivery.', semanticRole: 'identifier' }),\n createdAt: schemaShape.createdAt.dateSpec({ meaning: 'When the row was stored.', temporalRole: 'creation' }),\n updatedAt: schemaShape.updatedAt.dateSpec({ meaning: 'When the row last changed.', temporalRole: 'modified' }),\n },\n // `resolvedScope` is a DISCRIMINATED UNION, and the spec decorators are not declared on\n // `ZodDiscriminatedUnion`, so its meaning is declared through the escape hatch rather than dropped.\n additionalFieldSpecs: [\n {\n fieldName: 'resolvedScope',\n specDecorator: 'objectSpec',\n params: {\n meaning: 'The scope the delivery runs in: one organization, the application, one person’s own data, or unroutable with the reason no admissible scope was found.',\n whyItMatters: 'The handler runs only in this scope, and never falls back to the application scope: a delivery whose handler requires an organization and resolves none is unroutable.',\n },\n },\n ],\n operations: {\n [Op.READ]: {\n purpose: `Inspect one delivery: its source, handler, scope, status and attempts. The stored body comes back whole — treat it as the sender’s data.`,\n outcome: 'An operator can see why a delivery failed and whether it can be replayed.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The delivery is returned.' }],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery with this id exists in this scope.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: `The caller is not the ${adminRole}.` },\n ],\n idempotent: true,\n examples: [{ title: 'Inspect a dead delivery', response: deadExample, forStatus: HttpResponseStatusCode.OK_200 }],\n variants: { context: { examples: [] }, summary: { examples: [] } },\n },\n [Op.LIST]: {\n purpose: 'Browse deliveries, newest first.',\n outcome: 'An operator can spot a run of failures from one source.',\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of deliveries in this scope.' }],\n errorScenarios: [{ code: HttpResponseStatusCode.FORBIDDEN_403, when: `The caller is not the ${adminRole}.` }],\n idempotent: true,\n examples: [{ title: 'Browse recent deliveries', request: { page: 1, limit: 20, sort: 'receivedAt:desc' }, response: pageExample, forStatus: HttpResponseStatusCode.OK_200 }],\n variants: { context: { examples: [] }, summary: { examples: [] } },\n },\n [Op.SEARCH]: {\n purpose: 'Filter deliveries by status, source kind, handler and receipt time.',\n outcome: 'An operator can list every DEAD delivery of one handler before replaying them.',\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of matching deliveries.' }],\n errorScenarios: [{ code: HttpResponseStatusCode.FORBIDDEN_403, when: `The caller is not the ${adminRole}.` }],\n idempotent: true,\n examples: [{ title: 'Find dead deliveries of one handler', request: { status: InboundDeliveryStatus.DEAD, handlerRef: 'todos.intake', page: 1, limit: 20 }, response: pageExample, forStatus: HttpResponseStatusCode.OK_200 }],\n },\n [Op.CREATE]: {\n purpose: 'Store a verified delivery. Written only by the inbound receiver.',\n outcome: 'The dedup ledger holds the event and the worker can dispatch it.',\n whenToUse: 'Repository-only: never an HTTP surface.',\n responseStatuses: [{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The delivery was stored. Internal write path.' }],\n errorScenarios: [{ code: HttpResponseStatusCode.CONFLICT_409, when: 'The same event is already stored — the dedup ledger refusing a second copy.' }],\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Drive the status machine (lease, settle). Written only by the dispatch worker.',\n outcome: 'Each attempt is fenced by `attemptCount`, so a worker that lost its lease cannot settle the row.',\n whenToUse: 'Repository-only: never an HTTP surface — operators act through REPLAY.',\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The row was advanced. Internal write path.' }],\n errorScenarios: [{ code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery with this id exists.' }],\n idempotent: false,\n },\n [Op.DELETE]: {\n purpose: 'The retention sweep’s door: an internal, route-less call. No API deletes a delivery, so the operator’s log cannot be edited.',\n outcome: 'Deliveries leave only through the OPERATIONAL_LOGS retention period, counted from terminalAt, or with their organization.',\n responseStatuses: [{ code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'Internal retention delete completed.' }],\n errorScenarios: [{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'Any caller other than the engine.' }],\n idempotent: true,\n },\n [Op.DELETE_MANY]: {\n purpose: 'Bulk twin of DELETE, the retention sweep’s preferred door (internal, route-less).',\n outcome: 'Terminal deliveries whose OPERATIONAL_LOGS period, counted from terminalAt, has ended are removed in one statement. A delivery that is not terminal has no terminalAt and never expires.',\n responseStatuses: [{ code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'Internal retention delete completed.' }],\n errorScenarios: [{ code: HttpResponseStatusCode.FORBIDDEN_403, when: 'Any caller other than the engine.' }],\n idempotent: true,\n },\n [InboundDelivery_Operations.REPLAY]: {\n operationId: InboundDelivery_Operations.REPLAY,\n purpose: 'Put one DEAD delivery back in the queue with a fresh retry budget, recording who replayed it and why.',\n outcome: 'After a handler is fixed, the work the sender was told was received gets done — once.',\n whenToUse: 'Use after fixing whatever made the handler fail. The justification is stored on the row and on the audit trail.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The delivery is RECEIVED again and will be dispatched; the updated row is returned.' }],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'No justification was given.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery with this id exists in this scope.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: `The caller is not the ${adminRole}.` },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The delivery is not DEAD — a processed delivery must not run twice and an unroutable one has no scope to run in.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Replay a dead delivery after a fix',\n request: { justification: 'The todo schema accepted the missing due date after the fix in release 42.' },\n response: replayedExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n businessConstraints: [\n 'A delivery is stored at most once per `(sourceKey, dedupKey)`; a provider retry answers 200 and runs nothing.',\n 'The handler runs under an `INBOUND_DELIVERY` context holding only its declared roles in the resolved scope — never the super-administrator role, never another organization.',\n '`rawBody` is the sender’s data. Reads are limited to the administrator of the scope, and an organization’s deliveries are erased with it.',\n ],\n }),\n { resourcePrimaryScope: inboundDeliveriesPrimaryScope[resourceType] },\n );\n}\n\nexport const organizationInboundDeliveriesResourceSpecification = buildInboundDeliveriesSpecification(CoreResourceType.ORGANIZATION_INBOUND_DELIVERIES);\n\nexport const applicationInboundDeliveriesResourceSpecification = buildInboundDeliveriesSpecification(CoreResourceType.APPLICATION_INBOUND_DELIVERIES);\n"]}
|