@wildo-ai/saas-models 1.1.2 → 1.1.4
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/__tests__/setup.d.ts.map +1 -1
- package/dist/esm/_inspect.d.ts.map +1 -1
- package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-subject.shared.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications-context.schemas.d.ts +14 -10
- package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.js +4 -3
- package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.d.ts +0 -4
- package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.js +59 -17
- package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts +77 -21
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.js +85 -23
- package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.d.ts +4 -3
- package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.js +45 -0
- package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
- package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.schemas.js +7 -1
- package/dist/esm/billing/price.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product-behavior-policy.shared.schemas.js +52 -11
- package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-definition.shared.schemas.d.ts +2 -2
- package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts +2 -2
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.schemas.d.ts +2 -2
- package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.schemas.js +7 -3
- package/dist/esm/billing/product.shared.schemas.js.map +1 -1
- package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.js +15 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.schemas.d.ts +7 -3
- package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.schemas.js +22 -3
- package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
- package/dist/esm/charts/aggregation-query.shared.schemas.d.ts.map +1 -1
- package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +71 -2
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.js +20 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
- package/dist/esm/companion/shared-library-companion.shared.definitions.d.ts.map +1 -1
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +85 -0
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +157 -0
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +23 -0
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +56 -0
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +658 -26
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +873 -27
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +104 -3
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
- package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts +54 -26
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js +132 -3
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts +17 -0
- package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/privacy.shared.schemas.js +27 -4
- package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts +82 -29
- package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.js +95 -29
- package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.js +12 -5
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts +21 -0
- package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.js +20 -0
- package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
- package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +7 -5
- package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.d.ts +8 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.js +29 -0
- package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
- package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +95 -17
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.js +86 -8
- package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +26 -26
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts +139 -3
- package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
- package/dist/esm/config/frontend/chart-registration-alignment.shared.js +151 -4
- package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
- package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
- package/dist/esm/config-authoring.entry.d.ts.map +1 -1
- package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +34 -0
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js +34 -0
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
- package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +45 -12
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
- package/dist/esm/external-data.exports.d.ts.map +1 -1
- package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +110 -58
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +183 -15
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts +15 -3
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js +32 -5
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
- package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +87 -7
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts +59 -0
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js +61 -0
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts +97 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js +41 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -0
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +205 -2
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +85 -1
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts +175 -0
- package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -0
- package/dist/esm/external-providers/frontend-provider-public-config.shared.js +207 -0
- package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -0
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +5 -28
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-capability.shared.schemas.js +4 -2
- package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts +28 -8
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js +15 -4
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts +165 -0
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js +39 -0
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts +338 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js +332 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts +178 -9
- package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-metadata.shared.schemas.js +181 -9
- package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts +7 -5
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.js +7 -5
- package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts +40 -0
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.js +80 -0
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -0
- package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/features/application-features.shared.resources-config.schemas.js +12 -0
- package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
- package/dist/esm/features/core-feature-definitions.shared.js +7 -1
- package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
- package/dist/esm/features/feature-builders.shared.d.ts +32 -0
- package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
- package/dist/esm/features/feature-builders.shared.js +32 -0
- package/dist/esm/features/feature-builders.shared.js.map +1 -1
- package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
- package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.js +12 -0
- package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts +73 -0
- package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -0
- package/dist/esm/files/file-remote-reference-link.shared.schemas.js +62 -0
- package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -0
- package/dist/esm/files/file-upload-grant.shared.schemas.d.ts +14 -2
- package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
- package/dist/esm/files/file-upload-grant.shared.schemas.js +44 -5
- package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
- package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/files/files.shared.schemas.d.ts +15 -8
- package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
- package/dist/esm/files/files.shared.schemas.js +15 -8
- package/dist/esm/files/files.shared.schemas.js.map +1 -1
- package/dist/esm/files/files.shared.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/actors.shared.schemas.js +3 -2
- package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agents.shared.schemas.d.ts +54 -5
- package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts +0 -3
- package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/deliberation.shared.schemas.js +0 -5
- package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts +14 -0
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js +40 -3
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +19 -0
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js +33 -0
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts +14 -9
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js +14 -9
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js +3 -2
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows.shared.schemas.js +3 -2
- package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts +130 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js +153 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts +0 -3
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js +1 -4
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts +0 -16
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js +1 -17
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts +3 -3
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js +3 -3
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts +2 -8
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js +4 -15
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts +112 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js +113 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -0
- package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.utils.js +1 -0
- package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
- package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
- package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts +8 -0
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.d.ts +46 -0
- package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.js +49 -0
- package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts +320 -50
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js +137 -36
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
- package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
- package/dist/esm/index.d.ts +15 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +15 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
- package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +11 -2
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/email/email-template.shared.enums.d.ts +15 -0
- package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-template.shared.enums.js +15 -0
- package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js +19 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts +30 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js +65 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.d.ts +6 -4
- package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.js +6 -4
- package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.d.ts +167 -5
- package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.js +191 -6
- package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.d.ts +158 -0
- package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.js +200 -1
- package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js +13 -0
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.js +22 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts +26 -0
- package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.schemas.js +25 -0
- package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.d.ts +25 -0
- package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.js +42 -17
- package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts +3 -2
- package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.shared.js +9 -2
- package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
- package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +18 -3
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts +13 -0
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js +13 -0
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
- package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
- package/dist/esm/public-runtime/index.d.ts +71 -2
- package/dist/esm/public-runtime/index.d.ts.map +1 -1
- package/dist/esm/public-runtime/index.js +62 -1
- package/dist/esm/public-runtime/index.js.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts +6 -5
- package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.js +6 -5
- package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.d.ts +16 -3
- package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.js +16 -3
- package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
- package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
- package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-documentation.d.ts +137 -0
- package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -0
- package/dist/esm/requests/manual-controllers-routes-documentation.js +1255 -0
- package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -0
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts +114 -0
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.js +129 -0
- package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.d.ts +11 -1
- package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.js +11 -1
- package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.d.ts +28 -3
- package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.js +52 -0
- package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
- package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.d.ts +1 -0
- package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.js +203 -25
- package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.d.ts +297 -68
- package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources-registry.shared.core.definitions.js +151 -5
- package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
- package/dist/esm/resources/resources-relationships.shared.factory.js +15 -0
- package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.d.ts +54 -0
- package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.js +69 -0
- package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.d.ts +11 -2
- package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.js +34 -3
- package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources.shared.utils.d.ts +32 -7
- package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.utils.js +32 -7
- package/dist/esm/resources/resources.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts +51 -0
- package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -0
- package/dist/esm/resources/utils/field-value-disclosure.utils.js +53 -0
- package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -0
- package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-summary.utils.d.ts +16 -2
- package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-summary.utils.js +19 -5
- package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
- package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/shared-persistence-collection.utils.js +11 -0
- package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
- package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.shared.definitions.d.ts +25 -0
- package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
- package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +38 -0
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +38 -0
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +5 -12
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +0 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.d.ts +84 -5
- package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.js +83 -3
- package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts +1 -0
- package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/registration.shared.dto.schemas.js +11 -0
- package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts +15 -0
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js +21 -4
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts +61 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +238 -6
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts +37 -27
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js +134 -12
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +2 -6
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js +32 -8
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts +45 -2
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js +45 -2
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts +35 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js +257 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts +143 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js +219 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js +27 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts +75 -7
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js +69 -8
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +31 -0
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js +198 -0
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts +31 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js +191 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +307 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +530 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -0
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts +4 -1
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js +29 -0
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts +4 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js +29 -0
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts +6 -0
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js +31 -0
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts +13 -0
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js +24 -3
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -1
- package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
- package/dist/esm/testing.d.ts.map +1 -1
- package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +4 -4
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +4 -4
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self.shared.resources-config.schemas.js +33 -3
- package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/users.shared.resources-config.schemas.d.ts +17 -1
- package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.resources-config.schemas.js +136 -5
- package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/users.shared.schemas.d.ts +60 -13
- package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.schemas.js +56 -9
- package/dist/esm/users/users.shared.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -3,16 +3,42 @@ import { initZodDecorators } from '@wildo-ai/zod-decorators';
|
|
|
3
3
|
initZodDecorators(z);
|
|
4
4
|
import { IndicatorVariant } from '@wildo-ai/presets-components-models';
|
|
5
5
|
import { ResourcePrimaryScope } from "../resources/resources.shared.schemas.js";
|
|
6
|
+
/**
|
|
7
|
+
* The one character that separates the parts of a badge KEY and a badge REFERENCE.
|
|
8
|
+
*
|
|
9
|
+
* Both formats are positional, so the separator may not appear inside a part or the parse is
|
|
10
|
+
* ambiguous. `NotificationBadgeIdentifierSchema` refuses it in an identifier for exactly that
|
|
11
|
+
* reason, and `collectNotificationBadgeDeclarationViolations` re-states the refusal at boot,
|
|
12
|
+
* because a declaration object is authored in TypeScript and never `.parse()`d.
|
|
13
|
+
*/
|
|
14
|
+
export const NOTIFICATION_BADGE_KEY_SEPARATOR = ':';
|
|
15
|
+
/** Any string that does not contain {@link NOTIFICATION_BADGE_KEY_SEPARATOR}. */
|
|
16
|
+
export const NOTIFICATION_BADGE_IDENTIFIER_PATTERN = /^[^:]+$/;
|
|
6
17
|
/**
|
|
7
18
|
* Notification badge identifier.
|
|
8
19
|
*
|
|
9
|
-
*
|
|
10
|
-
* (`new messages` / `unpaid invoices`) were removed because nothing
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
20
|
+
* The identifier is an open string because no canonical (core) identifier ships: the two
|
|
21
|
+
* aspirational placeholders (`new messages` / `unpaid invoices`) were removed because nothing
|
|
22
|
+
* produced them.
|
|
23
|
+
*
|
|
24
|
+
* The SURFACING is not missing. A navigation item declares `notificationBadgeRef` and the sidebar
|
|
25
|
+
* renders it, and an application declares its own badges, so the open string is what an application
|
|
26
|
+
* uses today. What is still absent is a FRAMEWORK-shipped identifier with a framework producer
|
|
27
|
+
* behind it; when one lands, core identifiers come back as a `CoreNotificationBadgeIdentifiers`
|
|
28
|
+
* enum unioned in here.
|
|
29
|
+
*
|
|
30
|
+
* Open, but not unconstrained: an identifier may not contain
|
|
31
|
+
* {@link NOTIFICATION_BADGE_KEY_SEPARATOR}, because it is the LAST part of a badge key and of a
|
|
32
|
+
* badge reference and both are positional. A definition object is authored in TypeScript and never
|
|
33
|
+
* `.parse()`d, so this constraint is also re-stated as a boot check — see
|
|
34
|
+
* {@link collectNotificationBadgeDeclarationViolations}.
|
|
14
35
|
*/
|
|
15
|
-
export const NotificationBadgeIdentifierSchema = z
|
|
36
|
+
export const NotificationBadgeIdentifierSchema = z
|
|
37
|
+
.string()
|
|
38
|
+
.min(1, { error: 'Notification badge identifier is required' })
|
|
39
|
+
.regex(NOTIFICATION_BADGE_IDENTIFIER_PATTERN, {
|
|
40
|
+
error: `Notification badge identifier must not contain "${NOTIFICATION_BADGE_KEY_SEPARATOR}" — that character separates the parts of a badge key and reference`,
|
|
41
|
+
});
|
|
16
42
|
/**
|
|
17
43
|
* Notification badge scope. Tightened to USER_SELF | ORGANIZATIONS only.
|
|
18
44
|
*
|
|
@@ -32,6 +58,22 @@ export const NotificationScopeSchema = z.enum([
|
|
|
32
58
|
ResourcePrimaryScope.USER_SELF,
|
|
33
59
|
ResourcePrimaryScope.ORGANIZATIONS,
|
|
34
60
|
]);
|
|
61
|
+
/**
|
|
62
|
+
* @wildo_source:part:start saas.models.notifications.badge-vocabularies facet:layer:shared facet:audience:app-developer
|
|
63
|
+
*
|
|
64
|
+
* The four vocabularies a badge definition picks from: how its count is CALCULATED, how it is
|
|
65
|
+
* PRESENTED, whether it draws attention, and — for a stored counter — what an operation does to it.
|
|
66
|
+
*
|
|
67
|
+
* ⚠️ **Choosing the source kind wrongly produces a number that DRIFTS.** Reach for `EVENT_COUNTER`
|
|
68
|
+
* only when the count is a fact the badge itself owns ("unread messages": arrive → increment, seen →
|
|
69
|
+
* reset). For any quantity derived from data an operation could change by another route — incomplete
|
|
70
|
+
* todos, unpaid invoices — use `DERIVED_QUERY`, which recomputes a live aggregate. A stored counter
|
|
71
|
+
* on a derived quantity is right on the day it is written and wrong thereafter.
|
|
72
|
+
*
|
|
73
|
+
* An `EVENT_COUNTER` badge additionally needs `notificationBadgeOperations` declared on the
|
|
74
|
+
* operations that move it; a `DERIVED_QUERY` badge needs none, because the recompute hangs off the
|
|
75
|
+
* source resource's own mutations.
|
|
76
|
+
*/
|
|
35
77
|
export var NotificationBadgeOperation;
|
|
36
78
|
(function (NotificationBadgeOperation) {
|
|
37
79
|
NotificationBadgeOperation["INCREMENT"] = "increment";
|
|
@@ -77,6 +119,7 @@ export var NotificationBadgePulse;
|
|
|
77
119
|
/** Persistent — pulse while the count is > 0. */
|
|
78
120
|
NotificationBadgePulse["WHILE_ACTIVE"] = "while_active";
|
|
79
121
|
})(NotificationBadgePulse || (NotificationBadgePulse = {}));
|
|
122
|
+
/** @wildo_source:part:end saas.models.notifications.badge-vocabularies */
|
|
80
123
|
/** EVENT_COUNTER source — no extra config; the stored counter is the truth. */
|
|
81
124
|
export const NotificationBadgeEventCounterSourceSchema = z.object({
|
|
82
125
|
kind: z.literal(NotificationBadgeSourceKind.EVENT_COUNTER),
|
|
@@ -156,4 +199,146 @@ export const NotificationBadgeSchema = z.discriminatedUnion('scope', [
|
|
|
156
199
|
NotificationBadgeOrganizationSchema,
|
|
157
200
|
NotificationBadgeUserSelfSchema,
|
|
158
201
|
]);
|
|
202
|
+
/** Build the DEFINITION-identity key from its parts. */
|
|
203
|
+
export function buildNotificationBadgeKey(scope, identifier) {
|
|
204
|
+
return `${scope}${NOTIFICATION_BADGE_KEY_SEPARATOR}${identifier}`;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* The key of a definition (or of anything else carrying a badge identity, such as a persisted row).
|
|
208
|
+
*
|
|
209
|
+
* Takes the identity fields rather than the whole definition so a `NotificationBadge` row and a
|
|
210
|
+
* `NotificationBadgeDefinition` resolve through the SAME function — a second copy for the row shape
|
|
211
|
+
* is how the two come to disagree.
|
|
212
|
+
*/
|
|
213
|
+
export function notificationBadgeIdentityKey(identity) {
|
|
214
|
+
return buildNotificationBadgeKey(identity.scope, identity.identifier);
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Parse a key, returning `null` when it is not a well-formed key at a SUPPORTED scope.
|
|
218
|
+
*
|
|
219
|
+
* The scope check is not cosmetic: the APPLICATION variant was dropped in the polymorphism refactor
|
|
220
|
+
* and no resource type backs it, so `application:foo` must fail here rather than reach a dispatch
|
|
221
|
+
* that has no repository for it.
|
|
222
|
+
*/
|
|
223
|
+
export function parseNotificationBadgeKey(key) {
|
|
224
|
+
const parts = key.split(NOTIFICATION_BADGE_KEY_SEPARATOR);
|
|
225
|
+
if (parts.length !== 2)
|
|
226
|
+
return null;
|
|
227
|
+
const [scope, identifier] = parts;
|
|
228
|
+
if (!isSupportedNotificationBadgeScope(scope) || identifier.length === 0)
|
|
229
|
+
return null;
|
|
230
|
+
return { scope, identifier };
|
|
231
|
+
}
|
|
232
|
+
/** Build the INSTANCE address carried on the wire. */
|
|
233
|
+
export function buildNotificationBadgeReference(scope, scopeId, identifier) {
|
|
234
|
+
return `${scope}${NOTIFICATION_BADGE_KEY_SEPARATOR}${scopeId}${NOTIFICATION_BADGE_KEY_SEPARATOR}${identifier}`;
|
|
235
|
+
}
|
|
236
|
+
/** Parse a wire reference, returning `null` for a malformed one or an unsupported scope. */
|
|
237
|
+
export function parseNotificationBadgeReference(reference) {
|
|
238
|
+
const parts = reference.split(NOTIFICATION_BADGE_KEY_SEPARATOR);
|
|
239
|
+
if (parts.length !== 3)
|
|
240
|
+
return null;
|
|
241
|
+
const [scope, scopeId, identifier] = parts;
|
|
242
|
+
if (!isSupportedNotificationBadgeScope(scope) || scopeId.length === 0 || identifier.length === 0)
|
|
243
|
+
return null;
|
|
244
|
+
return { scope, scopeId, identifier };
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Reduce a wire reference to the DEFINITION key it addresses — the one hop the browser badge store
|
|
248
|
+
* takes, so that what it keys on is what a navigation item resolves against.
|
|
249
|
+
*/
|
|
250
|
+
export function notificationBadgeKeyFromReference(reference) {
|
|
251
|
+
const parsed = parseNotificationBadgeReference(reference);
|
|
252
|
+
return parsed ? buildNotificationBadgeKey(parsed.scope, parsed.identifier) : null;
|
|
253
|
+
}
|
|
254
|
+
/** Whether a raw string names one of the two surviving badge scopes. */
|
|
255
|
+
export function isSupportedNotificationBadgeScope(scope) {
|
|
256
|
+
return scope === ResourcePrimaryScope.USER_SELF || scope === ResourcePrimaryScope.ORGANIZATIONS;
|
|
257
|
+
}
|
|
258
|
+
// ════════════════════════════════════════════════════════════════
|
|
259
|
+
// Declaration coherence — checked at CONFIGURATION time
|
|
260
|
+
// ════════════════════════════════════════════════════════════════
|
|
261
|
+
/**
|
|
262
|
+
* Why a badge declaration is refused. A closed vocabulary with a named runtime source, so a
|
|
263
|
+
* diagnostic can be branched on and each member can carry its own explanation.
|
|
264
|
+
*/
|
|
265
|
+
export var NotificationBadgeDeclarationViolationReason;
|
|
266
|
+
(function (NotificationBadgeDeclarationViolationReason) {
|
|
267
|
+
/**
|
|
268
|
+
* Two definitions declare the same `(scope, identifier)`. Every lookup resolves the FIRST, so
|
|
269
|
+
* the second is unreachable while silently sharing the first's count — the shape that made
|
|
270
|
+
* identifier-only lookup unsafe in the first place. Two definitions at DIFFERENT scopes are
|
|
271
|
+
* fine and are exactly what the key makes reachable.
|
|
272
|
+
*/
|
|
273
|
+
NotificationBadgeDeclarationViolationReason["DUPLICATE_DEFINITION_KEY"] = "duplicate_definition_key";
|
|
274
|
+
/**
|
|
275
|
+
* An identifier contains the key separator, which would make its key and every reference built
|
|
276
|
+
* from it parse into the wrong parts. Refused rather than escaped: a positional format with an
|
|
277
|
+
* escaping rule is a format two implementations will eventually disagree about.
|
|
278
|
+
*/
|
|
279
|
+
NotificationBadgeDeclarationViolationReason["IDENTIFIER_CONTAINS_KEY_SEPARATOR"] = "identifier_contains_key_separator";
|
|
280
|
+
/** An operation declares a `badgeRef` that names no registered definition. */
|
|
281
|
+
NotificationBadgeDeclarationViolationReason["OPERATION_REF_UNRESOLVED"] = "operation_ref_unresolved";
|
|
282
|
+
})(NotificationBadgeDeclarationViolationReason || (NotificationBadgeDeclarationViolationReason = {}));
|
|
283
|
+
/**
|
|
284
|
+
* The whole declaration-coherence check, as a pure function over what an application declared.
|
|
285
|
+
*
|
|
286
|
+
* Pure and shared on purpose: the backend registry runs it as a fail-closed boot gate and the
|
|
287
|
+
* frontend launcher verifier reports it in development, and a second implementation is how the two
|
|
288
|
+
* come to disagree about what a valid declaration is.
|
|
289
|
+
*
|
|
290
|
+
* It answers the question `derive-before-you-ask.md` asks — who owes this, and what says so. The
|
|
291
|
+
* population is exactly the registered definitions plus every authored
|
|
292
|
+
* `notificationBadgeOperations` entry; nothing is inferred and nothing is sampled.
|
|
293
|
+
*/
|
|
294
|
+
export function collectNotificationBadgeDeclarationViolations(definitions, operationSites = []) {
|
|
295
|
+
const violations = [];
|
|
296
|
+
const seenKeys = new Set();
|
|
297
|
+
for (const definition of definitions) {
|
|
298
|
+
if (!NOTIFICATION_BADGE_IDENTIFIER_PATTERN.test(definition.identifier)) {
|
|
299
|
+
violations.push({
|
|
300
|
+
reason: NotificationBadgeDeclarationViolationReason.IDENTIFIER_CONTAINS_KEY_SEPARATOR,
|
|
301
|
+
badgeKey: notificationBadgeIdentityKey(definition),
|
|
302
|
+
identifier: definition.identifier,
|
|
303
|
+
});
|
|
304
|
+
// Still recorded below, so a malformed identifier declared twice is reported as both.
|
|
305
|
+
}
|
|
306
|
+
const key = notificationBadgeIdentityKey(definition);
|
|
307
|
+
if (seenKeys.has(key)) {
|
|
308
|
+
violations.push({
|
|
309
|
+
reason: NotificationBadgeDeclarationViolationReason.DUPLICATE_DEFINITION_KEY,
|
|
310
|
+
badgeKey: key,
|
|
311
|
+
identifier: definition.identifier,
|
|
312
|
+
});
|
|
313
|
+
continue;
|
|
314
|
+
}
|
|
315
|
+
seenKeys.add(key);
|
|
316
|
+
}
|
|
317
|
+
for (const site of operationSites) {
|
|
318
|
+
if (!seenKeys.has(site.badgeRef)) {
|
|
319
|
+
violations.push({
|
|
320
|
+
reason: NotificationBadgeDeclarationViolationReason.OPERATION_REF_UNRESOLVED,
|
|
321
|
+
badgeKey: site.badgeRef,
|
|
322
|
+
resourceType: site.resourceType,
|
|
323
|
+
operationIdentifier: site.operationIdentifier,
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
return violations;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Index the registered definitions by key, so a dispatch resolves in one lookup rather than a scan.
|
|
331
|
+
*
|
|
332
|
+
* Built from the SAME key function the boot check uses, so a definition the boot check accepted is
|
|
333
|
+
* a definition this map can serve.
|
|
334
|
+
*/
|
|
335
|
+
export function buildNotificationBadgeDefinitionIndex(definitions) {
|
|
336
|
+
const index = new Map();
|
|
337
|
+
for (const definition of definitions) {
|
|
338
|
+
const key = notificationBadgeIdentityKey(definition);
|
|
339
|
+
if (!index.has(key))
|
|
340
|
+
index.set(key, definition);
|
|
341
|
+
}
|
|
342
|
+
return index;
|
|
343
|
+
}
|
|
159
344
|
//# sourceMappingURL=notification-badges.schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-badges.schemas.js","sourceRoot":"","sources":["../../../../src/notifications/notification-badges.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAErB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAG7E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,2CAA2C,EAAE,CAAC,CAAC;AAE3H;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC1C,oBAAoB,CAAC,SAAS;IAC9B,oBAAoB,CAAC,aAAa;CACrC,CAAC,CAAC;AAEH,MAAM,CAAN,IAAY,0BAKX;AALD,WAAY,0BAA0B;IAClC,qDAAuB,CAAA;IACvB,qDAAuB,CAAA;IACvB,yCAAW,CAAA;IACX,6CAAe,CAAA;AACnB,CAAC,EALW,0BAA0B,KAA1B,0BAA0B,QAKrC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAN,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACnC,8DAA+B,CAAA;IAC/B,8DAA+B,CAAA;AACnC,CAAC,EAHW,2BAA2B,KAA3B,2BAA2B,QAGtC;AAED,kFAAkF;AAClF,MAAM,CAAN,IAAY,4BAOX;AAPD,WAAY,4BAA4B;IACpC,+CAA+C;IAC/C,2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,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,cAAc,EAAE;CAC/E,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mCAAmC,GAAG,2BAA2B,CAAC,MAAM,CAAC;IAClF,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,aAAa,CAAC;IACpD,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,6BAA6B,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE;CAC3G,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,+BAA+B,GAAG,2BAA2B,CAAC,MAAM,CAAC;IAC9E,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,SAAS,CAAC;IAChD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE;CAC3F,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,kBAAkB,CAAC,OAAO,EAAE;IACjE,mCAAmC;IACnC,+BAA+B;CAClC,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { initZodDecorators } from '@wildo-ai/zod-decorators';\n\ninitZodDecorators(z);\n\nimport { IndicatorVariant } from '@wildo-ai/presets-components-models';\nimport { ResourcePrimaryScope } from \"../resources/resources.shared.schemas\";\n\n\n/**\n * Notification badge identifier.\n *\n * No canonical (core) identifiers ship today — the two aspirational placeholders\n * (`new messages` / `unpaid invoices`) were removed because nothing produced them\n * (see `.claude/plans/badge-launcher-retract.md`). When the badge surfacing is\n * reintroduced with a real producer (Reintroduction Contract R1), core identifiers\n * come back as a `CoreNotificationBadgeIdentifiers` enum unioned in here.\n */\nexport const NotificationBadgeIdentifierSchema = z.string().min(1, { error: 'Notification badge identifier is required' });\n\n/**\n * Notification badge scope. Tightened to USER_SELF | ORGANIZATIONS only.\n *\n * The APPLICATION variant was dropped in the polymorphism refactor\n * (`.cursor/plans/notification-badges-polymorphism-refactor.md`):\n * - No canonical badges were ever declared at APPLICATION scope (see\n * `notification-badges.core.definitions.ts`).\n * - The two surviving variants (USER + ORG) each own their own resource type\n * and MongoDB collection. Allowing APPLICATION here would let consumers\n * write a payload that no resource configuration / collection accepts.\n *\n * `WS_BadgeUpdatePayload` semantics are unchanged — the dispatcher in\n * `NotificationBadgeBackendService.emitBadgeUpdate` still routes USER badges to\n * `sendToUser` and ORG badges to `sendToOrganization`.\n */\nexport const NotificationScopeSchema = z.enum([\n ResourcePrimaryScope.USER_SELF,\n ResourcePrimaryScope.ORGANIZATIONS,\n]);\n\nexport enum NotificationBadgeOperation {\n INCREMENT = 'increment',\n DECREMENT = 'decrement',\n SET = 'set',\n RESET = 'reset',\n}\n\n/**\n * How a badge's count is CALCULATED — the load-bearing distinction (R1).\n *\n * - `EVENT_COUNTER`: a stored counter mutated imperatively on domain events\n * (arrive → increment, seen → reset). Correct for \"unread messages\" style\n * badges. The count lives in the badge document.\n * - `DERIVED_QUERY`: the count is a LIVE aggregate over a resource collection\n * (`count(resourceType where filter, scoped)`), recomputed on that resource's\n * mutations. Correct for \"incomplete todos\" / \"unpaid invoices\" — quantities\n * derived from data that would DRIFT if tracked with a stored counter.\n */\nexport enum NotificationBadgeSourceKind {\n EVENT_COUNTER = 'event_counter',\n DERIVED_QUERY = 'derived_query',\n}\n\n/** How the badge is presented. `NONE` = suppressed even when the count is > 0. */\nexport enum NotificationBadgeDisplayMode {\n /** A colored signal dot (\"≥ 1\"), no number. */\n DOT = 'dot',\n /** The numeric count (truncated at the display cap). */\n COUNT = 'count',\n /** Rendered as nothing (count still computed/available). */\n NONE = 'none',\n}\n\n/**\n * WHETHER / WHEN a badge draws attention. The LOOK of the pulse is theme-owned\n * (`UIBehaviorRecipe.motion.attention`), so a definition only declares intent.\n */\nexport enum NotificationBadgePulse {\n NONE = 'none',\n /** Transitional — pulse briefly when the count rises (recommended). */\n ON_INCREASE = 'on_increase',\n /** Persistent — pulse while the count is > 0. */\n WHILE_ACTIVE = 'while_active',\n}\n\n/** EVENT_COUNTER source — no extra config; the stored counter is the truth. */\nexport const NotificationBadgeEventCounterSourceSchema = z.object({\n kind: z.literal(NotificationBadgeSourceKind.EVENT_COUNTER),\n});\n\n/**\n * DERIVED_QUERY source — the count is `count(resourceType where filter)` with the\n * scope bound via `scopeField` (the FK field on the counted resource that equals\n * the badge's `scopeId`, e.g. `userId` for a USER_SELF badge). Recomputed by the\n * backend on any mutation of `resourceType` (see backend R5).\n */\nexport const NotificationBadgeDerivedQuerySourceSchema = z.object({\n kind: z.literal(NotificationBadgeSourceKind.DERIVED_QUERY),\n resourceType: z.string().min(1, { error: 'Derived-badge resourceType is required' }),\n filter: z.record(z.string(), z.unknown()),\n scopeField: z.string().min(1, { error: 'Derived-badge scopeField is required' }),\n});\n\n/** Discriminated union over the calculation kinds. */\nexport const NotificationBadgeSourceSchema = z.discriminatedUnion('kind', [\n NotificationBadgeEventCounterSourceSchema,\n NotificationBadgeDerivedQuerySourceSchema,\n]);\n\n/**\n * Presentation declaration. `tone` reuses the design-system `IndicatorVariant`\n * (single source — the `Badge` component maps the same enum). `pulse` is a\n * trigger only; the theme owns the animation.\n */\nexport const NotificationBadgeDisplaySchema = z.object({\n mode: z.enum(NotificationBadgeDisplayMode).default(NotificationBadgeDisplayMode.COUNT),\n tone: z.enum(IndicatorVariant).default(IndicatorVariant.NEUTRAL),\n pulse: z.enum(NotificationBadgePulse).default(NotificationBadgePulse.NONE),\n});\n\n/**\n * Badge IDENTITY — the (identifier, scope) tuple shared by the declaration and\n * the persisted document. Kept separate so the stored badge doc does NOT absorb\n * declaration-only fields (`source` / `display`).\n */\nconst NotificationBadgeIdentitySchema = z.object({\n identifier: NotificationBadgeIdentifierSchema,\n scope: NotificationScopeSchema,\n});\n\n/**\n * Badge DEFINITION — the declaration app/framework authors register: identity +\n * how the count is calculated (`source`) + how it is presented (`display`).\n */\nexport const NotificationBadgeDefinitionSchema = NotificationBadgeIdentitySchema.extend({\n source: NotificationBadgeSourceSchema,\n display: NotificationBadgeDisplaySchema,\n});\n\nconst NotificationBadgeBaseSchema = NotificationBadgeIdentitySchema.extend({\n // A compact badge without its application-defined identifier is not interpretable: callers\n // could see a number but not what the number counts. Override the identity field here (rather\n // than decorating NotificationBadgeIdentitySchema) so persisted API rows gain summary metadata\n // while application-authored badge definitions remain a plain declaration schema.\n identifier: NotificationBadgeIdentifierSchema.isSummaryField(),\n // `isPrimaryKey` (composite: excludeFromCreate + isHidden + isUnique + isDBIndexed) —\n // the server generates `_id`, so it must NOT be required on the create DTO. Using bare\n // `.isDBIndexed()` here left `_id` create-required, which failed the dispatcher-driven\n // badge materialization (`buildNewBadge` supplies no `_id`).\n _id: z.string().min(1, { error: 'Notification badge ID is required' }).isPrimaryKey(),\n count: z.number().min(0, { error: 'Notification badge count must be greater than or equal to 0' }).isSummaryField(),\n createdAt: z.date().default(() => new Date()).isDBIndexed(),\n updatedAt: z.date().default(() => new Date()).isDBIndexed().isSummaryField(),\n});\n\nexport const NotificationBadgeOrganizationSchema = NotificationBadgeBaseSchema.extend({\n scope: z.literal(ResourcePrimaryScope.ORGANIZATIONS),\n organizationId: z.string().min(1, { error: 'Organization ID is required' }).isDBIndexed().isForeignKey(),\n});\n\nexport const NotificationBadgeUserSelfSchema = NotificationBadgeBaseSchema.extend({\n scope: z.literal(ResourcePrimaryScope.USER_SELF),\n userId: z.string().min(1, { error: 'User ID is required' }).isDBIndexed().isForeignKey(),\n});\n\n/**\n * Discriminated union over the two surviving badge scopes (USER_SELF / ORGANIZATIONS).\n * The APPLICATION variant was dropped — see `NotificationScopeSchema` JSDoc above.\n */\nexport const NotificationBadgeSchema = z.discriminatedUnion('scope', [\n NotificationBadgeOrganizationSchema,\n NotificationBadgeUserSelfSchema,\n]);\n\nexport type NotificationBadgeDefinition = z.infer<typeof NotificationBadgeDefinitionSchema>;\nexport type NotificationBadgeIdentifier = z.infer<typeof NotificationBadgeIdentifierSchema>;\nexport type NotificationScope = z.infer<typeof NotificationScopeSchema>;\nexport type NotificationBadge = z.infer<typeof NotificationBadgeSchema>;\nexport type NotificationBadgeSource = z.infer<typeof NotificationBadgeSourceSchema>;\nexport type NotificationBadgeDerivedQuerySource = z.infer<typeof NotificationBadgeDerivedQuerySourceSchema>;\nexport type NotificationBadgeDisplay = z.infer<typeof NotificationBadgeDisplaySchema>;\n\n"]}
|
|
1
|
+
{"version":3,"file":"notification-badges.schemas.js","sourceRoot":"","sources":["../../../src/notifications/notification-badges.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAErB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAG7E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,CAAC;AAEpD,iFAAiF;AACjF,MAAM,CAAC,MAAM,qCAAqC,GAAG,SAAS,CAAC;AAE/D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC;KAC7C,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,2CAA2C,EAAE,CAAC;KAC9D,KAAK,CAAC,qCAAqC,EAAE;IAC1C,KAAK,EAAE,mDAAmD,gCAAgC,qEAAqE;CAClK,CAAC,CAAC;AAEP;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC1C,oBAAoB,CAAC,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AC;YAAE,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;IACpD,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { initZodDecorators } from '@wildo-ai/zod-decorators';\n\ninitZodDecorators(z);\n\nimport { IndicatorVariant } from '@wildo-ai/presets-components-models';\nimport { ResourcePrimaryScope } from \"../resources/resources.shared.schemas\";\n\n\n/**\n * The one character that separates the parts of a badge KEY and a badge REFERENCE.\n *\n * Both formats are positional, so the separator may not appear inside a part or the parse is\n * ambiguous. `NotificationBadgeIdentifierSchema` refuses it in an identifier for exactly that\n * reason, and `collectNotificationBadgeDeclarationViolations` re-states the refusal at boot,\n * because a declaration object is authored in TypeScript and never `.parse()`d.\n */\nexport const NOTIFICATION_BADGE_KEY_SEPARATOR = ':';\n\n/** Any string that does not contain {@link NOTIFICATION_BADGE_KEY_SEPARATOR}. */\nexport const NOTIFICATION_BADGE_IDENTIFIER_PATTERN = /^[^:]+$/;\n\n/**\n * Notification badge identifier.\n *\n * The identifier is an open string because no canonical (core) identifier ships: the two\n * aspirational placeholders (`new messages` / `unpaid invoices`) were removed because nothing\n * produced them.\n *\n * The SURFACING is not missing. A navigation item declares `notificationBadgeRef` and the sidebar\n * renders it, and an application declares its own badges, so the open string is what an application\n * uses today. What is still absent is a FRAMEWORK-shipped identifier with a framework producer\n * behind it; when one lands, core identifiers come back as a `CoreNotificationBadgeIdentifiers`\n * enum unioned in here.\n *\n * Open, but not unconstrained: an identifier may not contain\n * {@link NOTIFICATION_BADGE_KEY_SEPARATOR}, because it is the LAST part of a badge key and of a\n * badge reference and both are positional. A definition object is authored in TypeScript and never\n * `.parse()`d, so this constraint is also re-stated as a boot check — see\n * {@link collectNotificationBadgeDeclarationViolations}.\n */\nexport const NotificationBadgeIdentifierSchema = z\n .string()\n .min(1, { error: 'Notification badge identifier is required' })\n .regex(NOTIFICATION_BADGE_IDENTIFIER_PATTERN, {\n error: `Notification badge identifier must not contain \"${NOTIFICATION_BADGE_KEY_SEPARATOR}\" — that character separates the parts of a badge key and reference`,\n });\n\n/**\n * Notification badge scope. Tightened to USER_SELF | ORGANIZATIONS only.\n *\n * The APPLICATION variant was dropped in the polymorphism refactor\n * (`.cursor/plans/notification-badges-polymorphism-refactor.md`):\n * - No canonical badges were ever declared at APPLICATION scope (see\n * `notification-badges.core.definitions.ts`).\n * - The two surviving variants (USER + ORG) each own their own resource type\n * and MongoDB collection. Allowing APPLICATION here would let consumers\n * write a payload that no resource configuration / collection accepts.\n *\n * `WS_BadgeUpdatePayload` semantics are unchanged — the dispatcher in\n * `NotificationBadgeBackendService.emitBadgeUpdate` still routes USER badges to\n * `sendToUser` and ORG badges to `sendToOrganization`.\n */\nexport const NotificationScopeSchema = z.enum([\n ResourcePrimaryScope.USER_SELF,\n ResourcePrimaryScope.ORGANIZATIONS,\n]);\n\n/**\n * @wildo_source:part:start saas.models.notifications.badge-vocabularies facet:layer:shared facet:audience:app-developer\n *\n * The four vocabularies a badge definition picks from: how its count is CALCULATED, how it is\n * PRESENTED, whether it draws attention, and — for a stored counter — what an operation does to it.\n *\n * ⚠️ **Choosing the source kind wrongly produces a number that DRIFTS.** Reach for `EVENT_COUNTER`\n * only when the count is a fact the badge itself owns (\"unread messages\": arrive → increment, seen →\n * reset). For any quantity derived from data an operation could change by another route — incomplete\n * todos, unpaid invoices — use `DERIVED_QUERY`, which recomputes a live aggregate. A stored counter\n * on a derived quantity is right on the day it is written and wrong thereafter.\n *\n * An `EVENT_COUNTER` badge additionally needs `notificationBadgeOperations` declared on the\n * operations that move it; a `DERIVED_QUERY` badge needs none, because the recompute hangs off the\n * source resource's own mutations.\n */\nexport enum NotificationBadgeOperation {\n INCREMENT = 'increment',\n DECREMENT = 'decrement',\n SET = 'set',\n RESET = 'reset',\n}\n\n/**\n * How a badge's count is CALCULATED — the load-bearing distinction (R1).\n *\n * - `EVENT_COUNTER`: a stored counter mutated imperatively on domain events\n * (arrive → increment, seen → reset). Correct for \"unread messages\" style\n * badges. The count lives in the badge document.\n * - `DERIVED_QUERY`: the count is a LIVE aggregate over a resource collection\n * (`count(resourceType where filter, scoped)`), recomputed on that resource's\n * mutations. Correct for \"incomplete todos\" / \"unpaid invoices\" — quantities\n * derived from data that would DRIFT if tracked with a stored counter.\n */\nexport enum NotificationBadgeSourceKind {\n EVENT_COUNTER = 'event_counter',\n DERIVED_QUERY = 'derived_query',\n}\n\n/** How the badge is presented. `NONE` = suppressed even when the count is > 0. */\nexport enum NotificationBadgeDisplayMode {\n /** A colored signal dot (\"≥ 1\"), no number. */\n DOT = 'dot',\n /** The numeric count (truncated at the display cap). */\n COUNT = 'count',\n /** Rendered as nothing (count still computed/available). */\n NONE = 'none',\n}\n\n/**\n * WHETHER / WHEN a badge draws attention. The LOOK of the pulse is theme-owned\n * (`UIBehaviorRecipe.motion.attention`), so a definition only declares intent.\n */\nexport enum NotificationBadgePulse {\n NONE = 'none',\n /** Transitional — pulse briefly when the count rises (recommended). */\n ON_INCREASE = 'on_increase',\n /** Persistent — pulse while the count is > 0. */\n WHILE_ACTIVE = 'while_active',\n}\n/** @wildo_source:part:end saas.models.notifications.badge-vocabularies */\n\n/** EVENT_COUNTER source — no extra config; the stored counter is the truth. */\nexport const NotificationBadgeEventCounterSourceSchema = z.object({\n kind: z.literal(NotificationBadgeSourceKind.EVENT_COUNTER),\n});\n\n/**\n * DERIVED_QUERY source — the count is `count(resourceType where filter)` with the\n * scope bound via `scopeField` (the FK field on the counted resource that equals\n * the badge's `scopeId`, e.g. `userId` for a USER_SELF badge). Recomputed by the\n * backend on any mutation of `resourceType` (see backend R5).\n */\nexport const NotificationBadgeDerivedQuerySourceSchema = z.object({\n kind: z.literal(NotificationBadgeSourceKind.DERIVED_QUERY),\n resourceType: z.string().min(1, { error: 'Derived-badge resourceType is required' }),\n filter: z.record(z.string(), z.unknown()),\n scopeField: z.string().min(1, { error: 'Derived-badge scopeField is required' }),\n});\n\n/** Discriminated union over the calculation kinds. */\nexport const NotificationBadgeSourceSchema = z.discriminatedUnion('kind', [\n NotificationBadgeEventCounterSourceSchema,\n NotificationBadgeDerivedQuerySourceSchema,\n]);\n\n/**\n * Presentation declaration. `tone` reuses the design-system `IndicatorVariant`\n * (single source — the `Badge` component maps the same enum). `pulse` is a\n * trigger only; the theme owns the animation.\n */\nexport const NotificationBadgeDisplaySchema = z.object({\n mode: z.enum(NotificationBadgeDisplayMode).default(NotificationBadgeDisplayMode.COUNT),\n tone: z.enum(IndicatorVariant).default(IndicatorVariant.NEUTRAL),\n pulse: z.enum(NotificationBadgePulse).default(NotificationBadgePulse.NONE),\n});\n\n/**\n * Badge IDENTITY — the (identifier, scope) tuple shared by the declaration and\n * the persisted document. Kept separate so the stored badge doc does NOT absorb\n * declaration-only fields (`source` / `display`).\n */\nconst NotificationBadgeIdentitySchema = z.object({\n identifier: NotificationBadgeIdentifierSchema,\n scope: NotificationScopeSchema,\n});\n\n/**\n * Badge DEFINITION — the declaration app/framework authors register: identity +\n * how the count is calculated (`source`) + how it is presented (`display`).\n */\nexport const NotificationBadgeDefinitionSchema = NotificationBadgeIdentitySchema.extend({\n source: NotificationBadgeSourceSchema,\n display: NotificationBadgeDisplaySchema,\n});\n\nconst NotificationBadgeBaseSchema = NotificationBadgeIdentitySchema.extend({\n // A compact badge without its application-defined identifier is not interpretable: callers\n // could see a number but not what the number counts. Override the identity field here (rather\n // than decorating NotificationBadgeIdentitySchema) so persisted API rows gain summary metadata\n // while application-authored badge definitions remain a plain declaration schema.\n identifier: NotificationBadgeIdentifierSchema.isSummaryField(),\n // `isPrimaryKey` (composite: excludeFromCreate + isHidden + isUnique + isDBIndexed) —\n // the server generates `_id`, so it must NOT be required on the create DTO. Using bare\n // `.isDBIndexed()` here left `_id` create-required, which failed the dispatcher-driven\n // badge materialization (`buildNewBadge` supplies no `_id`).\n _id: z.string().min(1, { error: 'Notification badge ID is required' }).isPrimaryKey(),\n count: z.number().min(0, { error: 'Notification badge count must be greater than or equal to 0' }).isSummaryField(),\n createdAt: z.date().default(() => new Date()).isDBIndexed(),\n updatedAt: z.date().default(() => new Date()).isDBIndexed().isSummaryField(),\n});\n\nexport const NotificationBadgeOrganizationSchema = NotificationBadgeBaseSchema.extend({\n scope: z.literal(ResourcePrimaryScope.ORGANIZATIONS),\n organizationId: z.string().min(1, { error: 'Organization ID is required' }).isDBIndexed().isForeignKey(),\n});\n\nexport const NotificationBadgeUserSelfSchema = NotificationBadgeBaseSchema.extend({\n scope: z.literal(ResourcePrimaryScope.USER_SELF),\n userId: z.string().min(1, { error: 'User ID is required' }).isDBIndexed().isForeignKey(),\n});\n\n/**\n * Discriminated union over the two surviving badge scopes (USER_SELF / ORGANIZATIONS).\n * The APPLICATION variant was dropped — see `NotificationScopeSchema` JSDoc above.\n */\nexport const NotificationBadgeSchema = z.discriminatedUnion('scope', [\n NotificationBadgeOrganizationSchema,\n NotificationBadgeUserSelfSchema,\n]);\n\nexport type NotificationBadgeDefinition = z.infer<typeof NotificationBadgeDefinitionSchema>;\nexport type NotificationBadgeIdentifier = z.infer<typeof NotificationBadgeIdentifierSchema>;\nexport type NotificationScope = z.infer<typeof NotificationScopeSchema>;\nexport type NotificationBadge = z.infer<typeof NotificationBadgeSchema>;\nexport type NotificationBadgeSource = z.infer<typeof NotificationBadgeSourceSchema>;\nexport type NotificationBadgeDerivedQuerySource = z.infer<typeof NotificationBadgeDerivedQuerySourceSchema>;\nexport type NotificationBadgeDisplay = z.infer<typeof NotificationBadgeDisplaySchema>;\n\n\n// ════════════════════════════════════════════════════════════════\n// Badge IDENTITY — the one place the key and reference formats live\n// ════════════════════════════════════════════════════════════════\n\n/**\n * A badge KEY: `<scope>:<identifier>` — the DEFINITION's identity, and the only thing that may be\n * used to look a definition up.\n *\n * ## Why the identifier alone is not an identity\n *\n * A definition is `(scope, identifier)`. Nothing ever stopped two definitions declaring the same\n * `identifier` at different scopes, and until this type existed every lookup matched on the\n * identifier alone — so the second definition was unreachable and silently shared the first's\n * count. The key makes both reachable and makes the collision that DOES matter (two definitions at\n * one scope and identifier) something a boot check can refuse.\n *\n * ## Why `scopeId` is NOT in the key\n *\n * `scopeId` says WHOSE badge — a user id, an organization id. It is per-viewer instance data that a\n * navigation declaration cannot possibly carry, and a browser session only ever receives pushes for\n * its own scope ids (the backend routes USER badges to that user's socket and ORG badges to that\n * organization's room). So the key is what a DECLARATION can name, and the reference below is what\n * an INSTANCE is addressed by.\n */\nexport type NotificationBadgeKey = string;\n\n/**\n * A badge REFERENCE: `<scope>:<scopeId>:<identifier>` — one badge ROW, on the wire.\n *\n * Carried by `WS_BadgeUpdatePayload.badgeReference` because emission needs the scopeId to route.\n * The browser reduces it to a {@link NotificationBadgeKey} on arrival via\n * {@link notificationBadgeKeyFromReference}, which is what makes the store's key and the navigation\n * item's lookup the same key rather than two conventions that agree by luck.\n */\nexport type NotificationBadgeReference = string;\n\n/** Build the DEFINITION-identity key from its parts. */\nexport function buildNotificationBadgeKey(\n scope: NotificationScope,\n identifier: NotificationBadgeIdentifier,\n): NotificationBadgeKey {\n return `${scope}${NOTIFICATION_BADGE_KEY_SEPARATOR}${identifier}`;\n}\n\n/**\n * The key of a definition (or of anything else carrying a badge identity, such as a persisted row).\n *\n * Takes the identity fields rather than the whole definition so a `NotificationBadge` row and a\n * `NotificationBadgeDefinition` resolve through the SAME function — a second copy for the row shape\n * is how the two come to disagree.\n */\nexport function notificationBadgeIdentityKey(\n identity: Pick<NotificationBadgeDefinition, 'scope' | 'identifier'>,\n): NotificationBadgeKey {\n return buildNotificationBadgeKey(identity.scope, identity.identifier);\n}\n\n/**\n * Parse a key, returning `null` when it is not a well-formed key at a SUPPORTED scope.\n *\n * The scope check is not cosmetic: the APPLICATION variant was dropped in the polymorphism refactor\n * and no resource type backs it, so `application:foo` must fail here rather than reach a dispatch\n * that has no repository for it.\n */\nexport function parseNotificationBadgeKey(\n key: string,\n): { scope: NotificationScope; identifier: NotificationBadgeIdentifier } | null {\n const parts = key.split(NOTIFICATION_BADGE_KEY_SEPARATOR);\n if (parts.length !== 2) return null;\n const [scope, identifier] = parts;\n if (!isSupportedNotificationBadgeScope(scope) || identifier.length === 0) return null;\n return { scope, identifier };\n}\n\n/** Build the INSTANCE address carried on the wire. */\nexport function buildNotificationBadgeReference(\n scope: NotificationScope,\n scopeId: string,\n identifier: NotificationBadgeIdentifier,\n): NotificationBadgeReference {\n return `${scope}${NOTIFICATION_BADGE_KEY_SEPARATOR}${scopeId}${NOTIFICATION_BADGE_KEY_SEPARATOR}${identifier}`;\n}\n\n/** Parse a wire reference, returning `null` for a malformed one or an unsupported scope. */\nexport function parseNotificationBadgeReference(\n reference: string,\n): { scope: NotificationScope; scopeId: string; identifier: NotificationBadgeIdentifier } | null {\n const parts = reference.split(NOTIFICATION_BADGE_KEY_SEPARATOR);\n if (parts.length !== 3) return null;\n const [scope, scopeId, identifier] = parts;\n if (!isSupportedNotificationBadgeScope(scope) || scopeId.length === 0 || identifier.length === 0) return null;\n return { scope, scopeId, identifier };\n}\n\n/**\n * Reduce a wire reference to the DEFINITION key it addresses — the one hop the browser badge store\n * takes, so that what it keys on is what a navigation item resolves against.\n */\nexport function notificationBadgeKeyFromReference(reference: string): NotificationBadgeKey | null {\n const parsed = parseNotificationBadgeReference(reference);\n return parsed ? buildNotificationBadgeKey(parsed.scope, parsed.identifier) : null;\n}\n\n/** Whether a raw string names one of the two surviving badge scopes. */\nexport function isSupportedNotificationBadgeScope(scope: string): scope is NotificationScope {\n return scope === ResourcePrimaryScope.USER_SELF || scope === ResourcePrimaryScope.ORGANIZATIONS;\n}\n\n// ════════════════════════════════════════════════════════════════\n// Declaration coherence — checked at CONFIGURATION time\n// ════════════════════════════════════════════════════════════════\n\n/**\n * Why a badge declaration is refused. A closed vocabulary with a named runtime source, so a\n * diagnostic can be branched on and each member can carry its own explanation.\n */\nexport enum NotificationBadgeDeclarationViolationReason {\n /**\n * Two definitions declare the same `(scope, identifier)`. Every lookup resolves the FIRST, so\n * the second is unreachable while silently sharing the first's count — the shape that made\n * identifier-only lookup unsafe in the first place. Two definitions at DIFFERENT scopes are\n * fine and are exactly what the key makes reachable.\n */\n DUPLICATE_DEFINITION_KEY = 'duplicate_definition_key',\n /**\n * An identifier contains the key separator, which would make its key and every reference built\n * from it parse into the wrong parts. Refused rather than escaped: a positional format with an\n * escaping rule is a format two implementations will eventually disagree about.\n */\n IDENTIFIER_CONTAINS_KEY_SEPARATOR = 'identifier_contains_key_separator',\n /** An operation declares a `badgeRef` that names no registered definition. */\n OPERATION_REF_UNRESOLVED = 'operation_ref_unresolved',\n}\n\n/** One refused declaration, carrying enough to name the author's own file without re-deriving it. */\nexport interface NotificationBadgeDeclarationViolation {\n reason: NotificationBadgeDeclarationViolationReason;\n /** The badge key at issue — the definition's, or the unresolved `badgeRef` as authored. */\n badgeKey: string;\n /** Present when the violation belongs to a definition rather than to an operation declaration. */\n identifier?: NotificationBadgeIdentifier;\n /** Present when the violation belongs to an operation declaration. */\n resourceType?: string;\n /** Present when the violation belongs to an operation declaration. */\n operationIdentifier?: string;\n}\n\n/** Where an operation declared a badge reference — one row per authored `notificationBadgeOperations` entry. */\nexport interface NotificationBadgeOperationDeclarationSite {\n resourceType: string;\n operationIdentifier: string;\n badgeRef: string;\n}\n\n/**\n * The whole declaration-coherence check, as a pure function over what an application declared.\n *\n * Pure and shared on purpose: the backend registry runs it as a fail-closed boot gate and the\n * frontend launcher verifier reports it in development, and a second implementation is how the two\n * come to disagree about what a valid declaration is.\n *\n * It answers the question `derive-before-you-ask.md` asks — who owes this, and what says so. The\n * population is exactly the registered definitions plus every authored\n * `notificationBadgeOperations` entry; nothing is inferred and nothing is sampled.\n */\nexport function collectNotificationBadgeDeclarationViolations(\n definitions: readonly NotificationBadgeDefinition[],\n operationSites: readonly NotificationBadgeOperationDeclarationSite[] = [],\n): NotificationBadgeDeclarationViolation[] {\n const violations: NotificationBadgeDeclarationViolation[] = [];\n const seenKeys = new Set<NotificationBadgeKey>();\n\n for (const definition of definitions) {\n if (!NOTIFICATION_BADGE_IDENTIFIER_PATTERN.test(definition.identifier)) {\n violations.push({\n reason: NotificationBadgeDeclarationViolationReason.IDENTIFIER_CONTAINS_KEY_SEPARATOR,\n badgeKey: notificationBadgeIdentityKey(definition),\n identifier: definition.identifier,\n });\n // Still recorded below, so a malformed identifier declared twice is reported as both.\n }\n\n const key = notificationBadgeIdentityKey(definition);\n if (seenKeys.has(key)) {\n violations.push({\n reason: NotificationBadgeDeclarationViolationReason.DUPLICATE_DEFINITION_KEY,\n badgeKey: key,\n identifier: definition.identifier,\n });\n continue;\n }\n seenKeys.add(key);\n }\n\n for (const site of operationSites) {\n if (!seenKeys.has(site.badgeRef)) {\n violations.push({\n reason: NotificationBadgeDeclarationViolationReason.OPERATION_REF_UNRESOLVED,\n badgeKey: site.badgeRef,\n resourceType: site.resourceType,\n operationIdentifier: site.operationIdentifier,\n });\n }\n }\n\n return violations;\n}\n\n/**\n * Index the registered definitions by key, so a dispatch resolves in one lookup rather than a scan.\n *\n * Built from the SAME key function the boot check uses, so a definition the boot check accepted is\n * a definition this map can serve.\n */\nexport function buildNotificationBadgeDefinitionIndex(\n definitions: readonly NotificationBadgeDefinition[],\n): ReadonlyMap<NotificationBadgeKey, NotificationBadgeDefinition> {\n const index = new Map<NotificationBadgeKey, NotificationBadgeDefinition>();\n for (const definition of definitions) {\n const key = notificationBadgeIdentityKey(definition);\n if (!index.has(key)) index.set(key, definition);\n }\n return index;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-badges.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"notification-badges.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/notifications/notification-badges.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EACL,+BAA+B,EAC/B,mCAAmC,EACpC,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EACL,qBAAqB,EAGtB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAGL,oBAAoB,EACrB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAOrF,KAAK,oCAAoC,GACrC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,WAAW,CAAC;AAEtC,eAAO,MAAM,iEAAiE,GAC5E,wBAAwB,oBAAoB,EAAE,KAC7C,qBAAqB,CACtB,SAAS,EACT,oCAAoC,EACpC,OAAO,+BAA+B,CA+HtC,CAAC;AAIH,KAAK,4CAA4C,GAC7C,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAEjC,eAAO,MAAM,yEAAyE,GACpF,wBAAwB,oBAAoB,EAAE,KAC7C,qBAAqB,CACtB,SAAS,EACT,4CAA4C,EAC5C,OAAO,mCAAmC,CAoF1C,CAAC"}
|
|
@@ -14,6 +14,56 @@ export declare enum UserNotificationLevel {
|
|
|
14
14
|
ERROR = "error"
|
|
15
15
|
}
|
|
16
16
|
export declare const UserNotificationChannelSchema: z.ZodUnion<readonly [z.ZodEnum<typeof CoreUserNotificationChannel>, z.ZodString]>;
|
|
17
|
+
/** @wildo_source:part:start saas.models.notifications.targets facet:layer:shared facet:audience:app-developer */
|
|
18
|
+
/**
|
|
19
|
+
* WHO a declared `userNotifications` entry reaches — and, on the EMAIL channel, whether the tenant
|
|
20
|
+
* gets to redirect or silence it.
|
|
21
|
+
*
|
|
22
|
+
* Imported from `@wildo-ai/saas-models`. The target is the single most consequential field of a
|
|
23
|
+
* notification declaration, because it decides three separate things at once:
|
|
24
|
+
*
|
|
25
|
+
* 1. **the recipients** — resolved per member below;
|
|
26
|
+
* 2. **whether the recipient's own channel preference can suppress it** — only `USER_SELF` and
|
|
27
|
+
* `USERS_CUSTOM` are suppressible, because only they reach a person about their own affairs. Every
|
|
28
|
+
* other target reaches somebody because of a ROLE they hold, and a personal switch must not
|
|
29
|
+
* silently disable a tenant's administrative monitoring. See
|
|
30
|
+
* {@link userNotificationTargetIsSuppressibleByRecipientPreference};
|
|
31
|
+
* 3. **whether `userRoles` is read at all** — see {@link userNotificationTargetReadsUserRoles}. On the
|
|
32
|
+
* two tenant-wide targets the field is REFUSED rather than ignored, because "everyone in the
|
|
33
|
+
* tenant" is not a set a role list may narrow.
|
|
34
|
+
*
|
|
35
|
+
* ## Who each target resolves to
|
|
36
|
+
*
|
|
37
|
+
* | target | recipients |
|
|
38
|
+
* |---|---|
|
|
39
|
+
* | `USER_SELF` | the initiator of the operation |
|
|
40
|
+
* | `USERS_CUSTOM` | whatever your `userIdsSelector` returns. Without that function the target resolves nobody |
|
|
41
|
+
* | `ORGANIZATION`, `ORGANIZATION_USERS` | every member of the initiator's tenant. `userRoles` is refused here |
|
|
42
|
+
* | `ORGANIZATION_BILLING`, `ORGANIZATION_SECURITY`, `ORGANIZATION_USER_MANAGEMENT`, `ORGANIZATION_ADMINISTRATIVE` | members of the tenant holding `ORG_OWNER` or `ORG_ADMIN`, unless `userRoles` names a different set |
|
|
43
|
+
* | `APPLICATION_BILLING` | holders of `APP_ADMIN_BILLING_MANAGER` or `APP_ADMIN_SUPER_ADMIN`, application-wide |
|
|
44
|
+
* | `APPLICATION_ADMIN_VIEWER` | holders of `APP_ADMIN_VIEWER` or `APP_ADMIN_SUPER_ADMIN` |
|
|
45
|
+
* | every other `APPLICATION_*` | holders of `APP_ADMIN_SUPER_ADMIN` |
|
|
46
|
+
* | `INBOUND_CONTACT` | nobody, deliberately. The recipient is not a user of your application, so this target is only usable with an EMAIL notification declaring `recipientEmailField` |
|
|
47
|
+
*
|
|
48
|
+
* A target the dispatcher has no rule for resolves nobody and logs a warning — so a custom target
|
|
49
|
+
* string (the schema accepts one) sends nothing on the email and websocket paths.
|
|
50
|
+
*
|
|
51
|
+
* ## The tenant can redirect or silence an ORGANIZATION-flavoured EMAIL, and you cannot override it
|
|
52
|
+
*
|
|
53
|
+
* Each tenant owns a notification-settings record with a per-category switch and a per-category
|
|
54
|
+
* address, and the category is DERIVED from the target — `ORGANIZATION_BILLING` to `billing`,
|
|
55
|
+
* `ORGANIZATION_SECURITY` to `security`, and so on. Two consequences to design around:
|
|
56
|
+
*
|
|
57
|
+
* - **a configured address REPLACES the member fan-out**, it does not add to it. A tenant routing
|
|
58
|
+
* security mail to a monitoring address is saying where that mail goes, not asking for a copy;
|
|
59
|
+
* - **the category switch suppresses the notification entirely**, whether or not an address is
|
|
60
|
+
* configured. A tenant that turns billing notifications off means it for the members too.
|
|
61
|
+
*
|
|
62
|
+
* `ORGANIZATION` and `ORGANIZATION_USERS` are tenant-wide and belong to no category, so no switch can
|
|
63
|
+
* silence them; a tenant-wide default address still redirects them.
|
|
64
|
+
*
|
|
65
|
+
* This applies to EMAIL only. The websocket and in-product paths always fan out to the members.
|
|
66
|
+
*/
|
|
17
67
|
export declare enum CoreUserNotificationTarget {
|
|
18
68
|
APPLICATION_ADMINISTRATOR = "application_administrator",
|
|
19
69
|
APPLICATION_BILLING = "application_billing",
|
|
@@ -32,6 +82,48 @@ export declare enum CoreUserNotificationTarget {
|
|
|
32
82
|
USERS_CUSTOM = "users_custom",
|
|
33
83
|
INBOUND_CONTACT = "inbound_contact"
|
|
34
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Whether a notification aimed at this target may be SUPPRESSED by the recipient's own channel
|
|
87
|
+
* preference (`UserPreferences.notifications.email` / `.sms` / `.push` / `.inApp`).
|
|
88
|
+
*
|
|
89
|
+
* DERIVED from the target rather than declared per notification, because the target already carries
|
|
90
|
+
* the distinction and a second field would be one more thing to get wrong on 87 declarations.
|
|
91
|
+
*
|
|
92
|
+
* `USER_SELF` and `USERS_CUSTOM` reach a PERSON about their own affairs — those are the messages a
|
|
93
|
+
* person is choosing about when they turn a channel off, and honouring that choice is the whole
|
|
94
|
+
* point of the switch existing (#409).
|
|
95
|
+
*
|
|
96
|
+
* Every other target reaches somebody because of a ROLE they hold: an application administrator, an
|
|
97
|
+
* organization's security or billing contact. A personal channel preference must not silently
|
|
98
|
+
* disable a tenant's or an application's administrative monitoring — the recipient did not choose to
|
|
99
|
+
* receive those as a person and cannot switch them off as one. A tenant that wants role mail
|
|
100
|
+
* elsewhere routes it, which is what the organization notification-settings record is for.
|
|
101
|
+
*
|
|
102
|
+
* Nothing here reaches account RECOVERY. Password reset, magic link and email verification are sent
|
|
103
|
+
* directly through the email service and never pass through the notification dispatcher, so no
|
|
104
|
+
* channel preference can lock a person out of their own account. That measurement is what made
|
|
105
|
+
* suppression safe to implement at all.
|
|
106
|
+
*/
|
|
107
|
+
export declare function userNotificationTargetIsSuppressibleByRecipientPreference(target: string): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* The targets on which `userRoles` MEANS anything (#495).
|
|
110
|
+
*
|
|
111
|
+
* `userRoles` is not a recipient FILTER, which is how its name reads and how it has been authored. It
|
|
112
|
+
* is the role-SELECTION override for the eleven role-scoped targets: `mapOrganizationTargetToRoles`
|
|
113
|
+
* and `mapApplicationTargetToRoles` take it in place of their per-target default, and nothing else
|
|
114
|
+
* anywhere reads it.
|
|
115
|
+
*
|
|
116
|
+
* On every other target it is inert, and inert in three different ways that all looked the same to an
|
|
117
|
+
* author: `USER_SELF` addresses the initiator, `USERS_CUSTOM` goes straight to `userIdsSelector`, and
|
|
118
|
+
* `ORGANIZATION`/`ORGANIZATION_USERS` mean everyone in the tenant by definition. Declaring it there
|
|
119
|
+
* is a filter that silently does nothing, which is what the refinement below now refuses.
|
|
120
|
+
*
|
|
121
|
+
* Scoped as a POSITIVE list of targets that read it rather than a rule about one target, because the
|
|
122
|
+
* defect was never specific to `USERS_CUSTOM` — refusing it there alone would leave the other three
|
|
123
|
+
* free to mislead the next author in exactly the same way.
|
|
124
|
+
*/
|
|
125
|
+
export declare function userNotificationTargetReadsUserRoles(target: string): boolean;
|
|
126
|
+
/** @wildo_source:part:end saas.models.notifications.targets */
|
|
35
127
|
export declare const UserNotificationTargetSchema: z.ZodUnion<readonly [z.ZodEnum<typeof CoreUserNotificationTarget>, z.ZodString]>;
|
|
36
128
|
/**
|
|
37
129
|
* How the frontend renders a celebration after a successful operation.
|
|
@@ -73,6 +165,58 @@ export declare const FrontendDisplayHintsSchema: z.ZodObject<{
|
|
|
73
165
|
}, z.core.$strip>;
|
|
74
166
|
export type FrontendDisplayHints = z.infer<typeof FrontendDisplayHintsSchema>;
|
|
75
167
|
/**
|
|
168
|
+
* @wildo_source:part:start saas.models.notifications.user-notification-definition facet:layer:shared facet:audience:app-developer
|
|
169
|
+
*
|
|
170
|
+
* One notification an operation sends. Declared as `userNotifications` on a resource operation, in
|
|
171
|
+
* the resource config — an array, so one operation may send several.
|
|
172
|
+
*
|
|
173
|
+
* ```ts
|
|
174
|
+
* userNotifications: [
|
|
175
|
+
* { target: CoreUserNotificationTarget.USER_SELF, channel: CoreUserNotificationChannel.EMAIL,
|
|
176
|
+
* condition: ({ currentObject }) => currentObject.status === 'INVITED' },
|
|
177
|
+
* { target: CoreUserNotificationTarget.ORGANIZATION_USERS, channel: CoreUserNotificationChannel.WEBSOCKET },
|
|
178
|
+
* ]
|
|
179
|
+
* ```
|
|
180
|
+
*
|
|
181
|
+
* ## What actually sends
|
|
182
|
+
*
|
|
183
|
+
* `EMAIL`, `WEBSOCKET` and `FRONT_END_SUCCESS` deliver. **`SMS` and `PUSH` are declaration vocabulary
|
|
184
|
+
* only** — the dispatcher's branch for them logs and returns without sending. The framework does have
|
|
185
|
+
* an SMS transport (authentication's one-time codes use it) and this dispatcher is not wired to it,
|
|
186
|
+
* so declaring an SMS notification is inert rather than pending.
|
|
187
|
+
*
|
|
188
|
+
* For an EMAIL, create the template directory the reference names. The startup validator resolves
|
|
189
|
+
* every declared reference through the configured locale chain before the application takes traffic,
|
|
190
|
+
* and prints the exact directory to create when one is missing.
|
|
191
|
+
*
|
|
192
|
+
* ## The recipient's preferences are honoured, and three things override them
|
|
193
|
+
*
|
|
194
|
+
* A recipient who has switched a channel off does not receive it. Three deliberate exceptions:
|
|
195
|
+
*
|
|
196
|
+
* - a ROLE-addressed target — the recipient did not choose to receive it as a person;
|
|
197
|
+
* - `alwaysDeliver: true` — declare it on a security notice a compromised account's owner must still
|
|
198
|
+
* receive;
|
|
199
|
+
* - a recipient with NO preferences row at all, because preferences are created lazily and a missing
|
|
200
|
+
* record must never read as "everything off".
|
|
201
|
+
*
|
|
202
|
+
* The `inApp` switch governs the notification CENTRE on the frontend rather than the socket frame —
|
|
203
|
+
* suppressing the frame would also suppress the live UI updates that ride the same channel.
|
|
204
|
+
*
|
|
205
|
+
* ## `condition` gates the notification, not the operation
|
|
206
|
+
*
|
|
207
|
+
* The predicate goes on the notification. It decides only whether this one message is sent; refusing
|
|
208
|
+
* the CALL is a separate declaration on the operation variant, and the two are independent — a
|
|
209
|
+
* variant can be enabled while its notification is gated off, and the reverse. The form deliberately
|
|
210
|
+
* matches an operation variant's `enabledCondition` so both read the same way.
|
|
211
|
+
*
|
|
212
|
+
* ## Emailing somebody who is not a user
|
|
213
|
+
*
|
|
214
|
+
* `recipientEmailField` names a TOP-LEVEL field on the record holding the address. There is no
|
|
215
|
+
* recipient, so there are no recipient preferences and no recipient language: the message goes out in
|
|
216
|
+
* the application's default locale. A nested address cannot be named, nor a list — the path sends
|
|
217
|
+
* exactly one message per notification. Pair it with a `condition` when the same operation also
|
|
218
|
+
* serves rows whose address belongs to somebody who must not be written to.
|
|
219
|
+
*
|
|
76
220
|
* Base fields shared by all user notification channel variants.
|
|
77
221
|
*/
|
|
78
222
|
export declare const UserNotificationDefinition_BaseSchema: z.ZodObject<{
|
|
@@ -132,6 +276,7 @@ export declare const UserNotificationDefinition_BaseSchema: z.ZodObject<{
|
|
|
132
276
|
};
|
|
133
277
|
}) => boolean>>;
|
|
134
278
|
customNotificationRef: z.ZodOptional<z.ZodString>;
|
|
279
|
+
alwaysDeliver: z.ZodOptional<z.ZodBoolean>;
|
|
135
280
|
}, z.core.$strip>;
|
|
136
281
|
/** EMAIL channel — template-oriented (email-specific fields handled by email templates) */
|
|
137
282
|
export declare const UserNotificationDefinition_EmailSchema: z.ZodObject<{
|
|
@@ -191,6 +336,7 @@ export declare const UserNotificationDefinition_EmailSchema: z.ZodObject<{
|
|
|
191
336
|
};
|
|
192
337
|
}) => boolean>>;
|
|
193
338
|
customNotificationRef: z.ZodOptional<z.ZodString>;
|
|
339
|
+
alwaysDeliver: z.ZodOptional<z.ZodBoolean>;
|
|
194
340
|
channel: z.ZodLiteral<CoreUserNotificationChannel.EMAIL>;
|
|
195
341
|
recipientEmailField: z.ZodOptional<z.ZodString>;
|
|
196
342
|
}, z.core.$strip>;
|
|
@@ -252,6 +398,7 @@ export declare const UserNotificationDefinition_WebSocketSchema: z.ZodObject<{
|
|
|
252
398
|
};
|
|
253
399
|
}) => boolean>>;
|
|
254
400
|
customNotificationRef: z.ZodOptional<z.ZodString>;
|
|
401
|
+
alwaysDeliver: z.ZodOptional<z.ZodBoolean>;
|
|
255
402
|
channel: z.ZodLiteral<CoreUserNotificationChannel.WEBSOCKET>;
|
|
256
403
|
}, z.core.$strip>;
|
|
257
404
|
/**
|
|
@@ -329,6 +476,7 @@ export declare const UserNotificationDefinition_FrontEndSuccessSchema: z.ZodObje
|
|
|
329
476
|
};
|
|
330
477
|
}) => boolean>>;
|
|
331
478
|
customNotificationRef: z.ZodOptional<z.ZodString>;
|
|
479
|
+
alwaysDeliver: z.ZodOptional<z.ZodBoolean>;
|
|
332
480
|
channel: z.ZodLiteral<CoreUserNotificationChannel.FRONT_END_SUCCESS>;
|
|
333
481
|
celebration: z.ZodOptional<z.ZodObject<{
|
|
334
482
|
mode: z.ZodDefault<z.ZodEnum<typeof CelebrationDisplayMode>>;
|
|
@@ -396,6 +544,7 @@ export declare const UserNotificationDefinition_SMSSchema: z.ZodObject<{
|
|
|
396
544
|
};
|
|
397
545
|
}) => boolean>>;
|
|
398
546
|
customNotificationRef: z.ZodOptional<z.ZodString>;
|
|
547
|
+
alwaysDeliver: z.ZodOptional<z.ZodBoolean>;
|
|
399
548
|
channel: z.ZodLiteral<CoreUserNotificationChannel.SMS>;
|
|
400
549
|
}, z.core.$strip>;
|
|
401
550
|
/** PUSH channel — not yet implemented, plain base */
|
|
@@ -456,6 +605,7 @@ export declare const UserNotificationDefinition_PushSchema: z.ZodObject<{
|
|
|
456
605
|
};
|
|
457
606
|
}) => boolean>>;
|
|
458
607
|
customNotificationRef: z.ZodOptional<z.ZodString>;
|
|
608
|
+
alwaysDeliver: z.ZodOptional<z.ZodBoolean>;
|
|
459
609
|
channel: z.ZodLiteral<CoreUserNotificationChannel.PUSH>;
|
|
460
610
|
}, z.core.$strip>;
|
|
461
611
|
/** Catch-all for custom channels (any string not matching core channels) */
|
|
@@ -516,6 +666,7 @@ export declare const UserNotificationDefinition_CustomChannelSchema: z.ZodObject
|
|
|
516
666
|
};
|
|
517
667
|
}) => boolean>>;
|
|
518
668
|
customNotificationRef: z.ZodOptional<z.ZodString>;
|
|
669
|
+
alwaysDeliver: z.ZodOptional<z.ZodBoolean>;
|
|
519
670
|
channel: z.ZodString;
|
|
520
671
|
}, z.core.$strip>;
|
|
521
672
|
/**
|
|
@@ -581,6 +732,7 @@ export declare const UserNotificationDefinitionSchema: z.ZodUnion<readonly [z.Zo
|
|
|
581
732
|
};
|
|
582
733
|
}) => boolean>>;
|
|
583
734
|
customNotificationRef: z.ZodOptional<z.ZodString>;
|
|
735
|
+
alwaysDeliver: z.ZodOptional<z.ZodBoolean>;
|
|
584
736
|
channel: z.ZodLiteral<CoreUserNotificationChannel.EMAIL>;
|
|
585
737
|
recipientEmailField: z.ZodOptional<z.ZodString>;
|
|
586
738
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -640,6 +792,7 @@ export declare const UserNotificationDefinitionSchema: z.ZodUnion<readonly [z.Zo
|
|
|
640
792
|
};
|
|
641
793
|
}) => boolean>>;
|
|
642
794
|
customNotificationRef: z.ZodOptional<z.ZodString>;
|
|
795
|
+
alwaysDeliver: z.ZodOptional<z.ZodBoolean>;
|
|
643
796
|
channel: z.ZodLiteral<CoreUserNotificationChannel.WEBSOCKET>;
|
|
644
797
|
}, z.core.$strip>, z.ZodObject<{
|
|
645
798
|
identifier: z.ZodString;
|
|
@@ -698,6 +851,7 @@ export declare const UserNotificationDefinitionSchema: z.ZodUnion<readonly [z.Zo
|
|
|
698
851
|
};
|
|
699
852
|
}) => boolean>>;
|
|
700
853
|
customNotificationRef: z.ZodOptional<z.ZodString>;
|
|
854
|
+
alwaysDeliver: z.ZodOptional<z.ZodBoolean>;
|
|
701
855
|
channel: z.ZodLiteral<CoreUserNotificationChannel.FRONT_END_SUCCESS>;
|
|
702
856
|
celebration: z.ZodOptional<z.ZodObject<{
|
|
703
857
|
mode: z.ZodDefault<z.ZodEnum<typeof CelebrationDisplayMode>>;
|
|
@@ -763,6 +917,7 @@ export declare const UserNotificationDefinitionSchema: z.ZodUnion<readonly [z.Zo
|
|
|
763
917
|
};
|
|
764
918
|
}) => boolean>>;
|
|
765
919
|
customNotificationRef: z.ZodOptional<z.ZodString>;
|
|
920
|
+
alwaysDeliver: z.ZodOptional<z.ZodBoolean>;
|
|
766
921
|
channel: z.ZodLiteral<CoreUserNotificationChannel.SMS>;
|
|
767
922
|
}, z.core.$strip>, z.ZodObject<{
|
|
768
923
|
identifier: z.ZodString;
|
|
@@ -821,6 +976,7 @@ export declare const UserNotificationDefinitionSchema: z.ZodUnion<readonly [z.Zo
|
|
|
821
976
|
};
|
|
822
977
|
}) => boolean>>;
|
|
823
978
|
customNotificationRef: z.ZodOptional<z.ZodString>;
|
|
979
|
+
alwaysDeliver: z.ZodOptional<z.ZodBoolean>;
|
|
824
980
|
channel: z.ZodLiteral<CoreUserNotificationChannel.PUSH>;
|
|
825
981
|
}, z.core.$strip>, z.ZodObject<{
|
|
826
982
|
identifier: z.ZodString;
|
|
@@ -879,9 +1035,11 @@ export declare const UserNotificationDefinitionSchema: z.ZodUnion<readonly [z.Zo
|
|
|
879
1035
|
};
|
|
880
1036
|
}) => boolean>>;
|
|
881
1037
|
customNotificationRef: z.ZodOptional<z.ZodString>;
|
|
1038
|
+
alwaysDeliver: z.ZodOptional<z.ZodBoolean>;
|
|
882
1039
|
channel: z.ZodString;
|
|
883
1040
|
}, z.core.$strip>]>;
|
|
884
1041
|
export type UserNotificationDefinition = z.infer<typeof UserNotificationDefinitionSchema>;
|
|
1042
|
+
/** @wildo_source:part:end saas.models.notifications.user-notification-definition */
|
|
885
1043
|
/**
|
|
886
1044
|
* M2M Notification Channels
|
|
887
1045
|
*/
|