@wildo-ai/saas-models 1.1.3 → 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.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.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.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.d.ts +1 -0
- 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.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.map +1 -1
- package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
- 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.map +1 -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.map +1 -1
- 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 +2 -0
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -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.map +1 -1
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -1
- 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.map +1 -1
- 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 +178 -6
- 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 +326 -4
- 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 +22 -0
- 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 +27 -0
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js +36 -2
- 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.map +1 -1
- package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +14 -14
- 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 +6 -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 +6 -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.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 +7 -0
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +7 -0
- 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.map +1 -1
- 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 +4 -0
- 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.map +1 -1
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -1
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +57 -0
- 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 +29 -0
- 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.map +1 -1
- 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 +18 -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 +10 -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.map +1 -1
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- 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.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.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 +6 -6
- 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.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- 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.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.map +1 -1
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts +2 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js +11 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- 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.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.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
- 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.map +1 -1
- 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 +6 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +6 -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.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.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
- 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 +51 -0
- package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.js +51 -0
- 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.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.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- 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.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 +22 -0
- package/dist/esm/public-runtime/index.d.ts.map +1 -1
- package/dist/esm/public-runtime/index.js +14 -0
- package/dist/esm/public-runtime/index.js.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-documentation.js +57 -3
- package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts +47 -0
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.js +51 -0
- package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.d.ts +9 -7
- package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.js +17 -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.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.js +98 -5
- package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.d.ts +48 -1
- 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 +54 -0
- 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.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 +17 -0
- package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.js +18 -0
- package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -1
- 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.map +1 -1
- 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.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.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.map +1 -1
- 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.map +1 -1
- 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 +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- 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 +3 -3
- 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 +35 -5
- 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.map +1 -1
- 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 -0
- 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 +15 -0
- 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.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts +23 -0
- 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 +24 -0
- 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.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +57 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +44 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -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.map +1 -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.map +1 -1
- 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.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.map +1 -1
- 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.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.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.map +1 -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.map +1 -1
- package/dist/esm/users/users.shared.schemas.d.ts +17 -1
- package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.schemas.js +18 -2
- package/dist/esm/users/users.shared.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/queue/jobs.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,0CAA0C,EAAE,MAAM,8CAA8C,CAAC;AAC1G,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AAE7I,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAwB,MAAM,uCAAuC,CAAC;AACvI,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,OAAO,EACP,YAAY,EACZ,WAAW,GACZ,MAAM,uBAAuB,CAAC;AAG/B,+EAA+E;AAC/E,uCAAuC;AACvC,+EAA+E;AAE/E;;GAEG;AACH,MAAM,CAAN,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,kDAAkD;IAClD,+CAAqB,CAAA;AACvB,CAAC,EAHW,sBAAsB,KAAtB,sBAAsB,QAGjC;AAYD,6CAA6C;AAC7C,MAAM,2BAA2B,GAAG;IAClC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAA0B,CAAC;IAChE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAA0B,CAAC;IAC1E,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,MA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AC9B,QAAQ,EAAE;oBACR,2CAA2C;oBAC3C;wBACE,UAAU,EAAE,2BAA2B,CAAC,QAAQ;wBAChD,WAAW,EAAE,4BAA4B,CAAC,eAAe;wBACzD,SAAS,EAAE,IAAI;wBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;wBAC7C,SAAS,EAAE,0BAA0B,CAAC,GAAG;qBAC1C;iBACF;aACF;YAED,iBAAiB;YACjB,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;gBAC9B,QAAQ,EAAE;oBACR;wBACE,UAAU,EAAE,2BAA2B,CAAC,QAAQ;wBAChD,WAAW,EAAE,4BAA4B,CAAC,eAAe;wBACzD,SAAS,EAAE,IAAI;wBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;wBAC7C,SAAS,EAAE,0BAA0B,CAAC,GAAG;wBACzC,YAAY,EAAE,IAAI;wBAClB,gBAAgB,EAAE,CAAC,WAAW,CAAC;wBAC/B,iBAAiB,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;wBAC/D,YAAY,EAAE,iCAAiC;wBAC/C,UAAU,EAAE,+BAA+B;wBAC3C,8BAA8B,EAAE,GAAG;qBACpC;iBACF;aACF;SACF;KACF,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["/**\n * Job Resource Configurations\n * \n * Defines resource configurations for JobExecution and JobPayloadStorage.\n * \n * Resource Design Principles:\n * - REPOSITORY_ONLY variants throughout: both resources are reached by the queue services and by\n * nothing else, so neither declares an API variant and neither generates a route\n * - Proper requestDto schemas for each variant\n * - isBackendOnly fields are automatically filtered in responses\n * \n * Key Resources:\n * - JobExecution: Tracks all job lifecycle events (30-day TTL)\n * - JobPayloadStorage: Stores large payloads >100KB (24-hour TTL)\n */\n\nimport { z } from 'zod';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport type { ResourceConfiguration } from '../resources/resources-config.shared.schemas';\nimport { ResourceOperationRiskLevel, ResourceOperationVariantType, ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { CORE_APP_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { \n JobExecutionSchema, \n JobPayloadStorageSchema,\n JobExecutionStatus,\n JobType,\n JobInitiator,\n JobPriority,\n} from './jobs.shared.schemas';\n\n\n// ============================================================================\n// JOB EXECUTION RESOURCE CONFIGURATION\n// ============================================================================\n\n/**\n * Variant keys for JobExecution operations.\n */\nexport enum JobExecutionVariantKey {\n /** Internal queue service operations (default) */\n INTERNAL = 'internal',\n}\n\n/**\n * Core operations available for JobExecution.\n */\ntype JobExecution_CoreOperations = \n | CoreResourceOperation.CREATE \n | CoreResourceOperation.READ \n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.LIST\n | CoreResourceOperation.SEARCH;\n\n// Filter fields for JobExecution LIST/SEARCH\nconst JOB_EXECUTION_FILTER_FIELDS = {\n applicationId: z.string(),\n jobType: z.enum(Object.values(JobType) as [string, ...string[]]),\n status: z.enum(Object.values(JobExecutionStatus) as [string, ...string[]]),\n organizationId: z.string(),\n userId: z.string(),\n queueName: z.string(),\n domainCategory: z.string(),\n initiatedBy: z.enum(Object.values(JobInitiator) as [string, ...string[]]),\n priority: z.enum(Object.values(JobPriority) as [string, ...string[]]),\n};\n\n// Sort fields for JobExecution LIST/SEARCH\nconst JOB_EXECUTION_SORT_FIELDS = ['createdAt', 'completedAt', 'durationMs', 'retryCount'] as const;\n\n/**\n * Factory function for JobExecution resource configuration.\n * \n * JobExecution tracks the lifecycle of all jobs processed by the queue system.\n * It provides visibility into job status, retries, timing, and error information.\n * \n * Variants: one per operation, all REPOSITORY_ONLY (CREATE, READ, UPDATE, LIST), for the queue\n * services. There is no API variant, so no route is generated and nothing here is reachable over\n * HTTP. In particular there is no admin cancel verb: cancelling a job is a queue-service call, not\n * an API call, and adding an operator-facing one means declaring an API variant here first.\n */\nexport const jobExecution_ResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[]\n): ResourceConfiguration<undefined, JobExecution_CoreOperations, typeof JobExecutionSchema> => {\n\n // === CREATE Schemas ===\n // Full create schema for internal use\n const JobExecutionCreateInternalSchema = JobExecutionSchema.omit({\n _id: true,\n retryCount: true, // Starts at 0 (default)\n lastRetryAt: true, // Set on retry\n startedAt: true, // Set when processing starts\n completedAt: true, // Set when completed\n durationMs: true, // Calculated on completion\n outputPayloadStorageId: true, // Set after execution\n error: true, // Set on failure\n workerId: true, // Set by worker\n workerHostname: true, // Set by worker\n });\n\n // === UPDATE Schemas ===\n // Internal service can update most fields (status changes, timing, errors)\n const JobExecutionUpdateInternalSchema = z.object({\n // Status updates\n status: z.enum(Object.values(JobExecutionStatus) as [string, ...string[]]).optional(),\n \n // Timing updates\n queuedAt: z.date().optional(),\n startedAt: z.date().optional(),\n completedAt: z.date().optional(),\n durationMs: z.number().int().optional(),\n lastRetryAt: z.date().optional(),\n \n // Retry tracking\n retryCount: z.number().int().min(0).optional(),\n \n // Worker info\n workerId: z.string().optional(),\n workerHostname: z.string().optional(),\n \n // Payload references\n outputPayloadStorageId: z.uuid().optional(),\n \n // Error info\n error: JobExecutionSchema.shape.error,\n });\n\n return createResourceConfiguration_Initialization<\n undefined,\n JobExecution_CoreOperations,\n typeof JobExecutionSchema\n >({\n mainSchema: JobExecutionSchema,\n resourceIdentifier: CoreResourceType.JOB_EXECUTIONS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.JOB_EXECUTIONS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true, // Internal infrastructure component\n\n /**\n * Subject-export disclosure: explicitly FORBIDDEN. A job execution is an OPERATIONAL record of\n * the platform doing work — it references a subject without being data *about* them in any sense\n * a data subject would recognise, and it is already out of Art. 20 scope as controller-generated.\n *\n * FORBIDDEN rather than left undeclared on purpose: this is a decision someone took, not a gap\n * nobody has filled, and the export refusal says so — precisely so a future operator clearing a\n * startup error cannot \"fix\" it by opting in.\n */\n systemAccessPolicy: { exportSubject: ResourceSystemAccessMode.FORBIDDEN },\n\n /*\n * DELIBERATELY NO `retentionPolicy`, and this comment is the declaration of that.\n *\n * Issue #138 asks that every engine resource declaring `exportSubject` either declare an erasure\n * posture or be deliberately and visibly exempt. This one is exempt, for the same reason the export\n * refusal directly above gives: a job execution is an operational record of the platform doing work,\n * not data about a person. It declares no personal-data category, and no field of it would be scrubbed.\n *\n * Declaring `RETAIN_ONLY` here would be worse than saying nothing. The mode is a positive assertion\n * about a resource that holds personal data of a subject; making it would place this row in the\n * subject-erasure population, inject the `retentionStatus` / `impersonalizedAt` markers and the\n * route-less LIST + UPDATE_MANY plumbing, and require a migration on all three schema planes — all to\n * describe an erasure path that never visits this collection.\n *\n * If a future job payload ever carries subject content, that is a `.dataCategories()` declaration on\n * the payload first, and this exemption is then wrong and must be revisited with it.\n */\n\n coreOperations: [\n CoreResourceOperation.CREATE,\n CoreResourceOperation.READ,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.LIST,\n CoreResourceOperation.SEARCH,\n ],\n \n operationsConfiguration: {\n // === CREATE ===\n [CoreResourceOperation.CREATE]: {\n variants: [\n // Internal: Queue services create job records\n {\n variantKey: JobExecutionVariantKey.INTERNAL,\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n requestDto: JobExecutionCreateInternalSchema,\n },\n ],\n },\n \n // === READ ===\n [CoreResourceOperation.READ]: {\n variants: [\n // Internal: Queue services read job details\n {\n variantKey: JobExecutionVariantKey.INTERNAL,\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n \n // === UPDATE ===\n [CoreResourceOperation.UPDATE]: {\n variants: [\n // Internal: Queue services update job status\n {\n variantKey: JobExecutionVariantKey.INTERNAL,\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n requestDto: JobExecutionUpdateInternalSchema,\n },\n ],\n },\n \n // === LIST ===\n [CoreResourceOperation.LIST]: {\n variants: [\n // Internal: Queue services list jobs\n {\n variantKey: JobExecutionVariantKey.INTERNAL,\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n // === SEARCH ===\n [CoreResourceOperation.SEARCH]: {\n variants: [\n {\n variantKey: JobExecutionVariantKey.INTERNAL,\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: true,\n searchableFields: ['jobId', 'operationPathKey', 'batchRef'],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: JOB_EXECUTION_FILTER_FIELDS,\n sortFields: JOB_EXECUTION_SORT_FIELDS,\n maxPaginatedResultPerPageLimit: 100,\n },\n ],\n },\n },\n });\n};\n\n// ============================================================================\n// JOB PAYLOAD STORAGE RESOURCE CONFIGURATION\n// ============================================================================\n\n/**\n * Variant keys for JobPayloadStorage operations.\n */\nexport enum JobPayloadStorageVariantKey {\n /** Internal queue service operations (default, only variant) */\n INTERNAL = 'internal',\n}\n\n/**\n * Core operations available for JobPayloadStorage.\n */\ntype JobPayloadStorage_CoreOperations = \n | CoreResourceOperation.CREATE \n | CoreResourceOperation.READ \n | CoreResourceOperation.DELETE\n | CoreResourceOperation.SEARCH;\n\n// Filter fields for JobPayloadStorage\nconst JOB_PAYLOAD_STORAGE_FILTER_FIELDS = {\n applicationId: z.string(),\n isCompressed: z.boolean(),\n};\n\n// Sort fields for JobPayloadStorage\nconst JOB_PAYLOAD_STORAGE_SORT_FIELDS = ['createdAt', 'expiresAt', 'payloadSizeBytes'] as const;\n\n/**\n * Factory function for JobPayloadStorage resource configuration.\n * \n * JobPayloadStorage stores large job payloads (>100KB) that exceed RabbitMQ\n * message size limits. Referenced by storageId in JobPayload messages.\n * \n * Variants:\n * - INTERNAL only: No API exposure (contains sensitive payload data)\n */\nexport const jobPayloadStorage_ResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[]\n): ResourceConfiguration<undefined, JobPayloadStorage_CoreOperations, typeof JobPayloadStorageSchema> => {\n\n // === CREATE Schema ===\n // Internal services provide all data except auto-generated fields\n const JobPayloadStorageCreateInternalSchema = JobPayloadStorageSchema.omit({\n _id: true,\n referenceCount: true, // Starts at 1 (default)\n });\n\n return createResourceConfiguration_Initialization<\n undefined,\n JobPayloadStorage_CoreOperations,\n typeof JobPayloadStorageSchema\n >({\n mainSchema: JobPayloadStorageSchema,\n resourceIdentifier: CoreResourceType.JOB_PAYLOAD_STORAGE,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.JOB_PAYLOAD_STORAGE],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true, // Internal infrastructure component\n\n coreOperations: [\n CoreResourceOperation.CREATE,\n CoreResourceOperation.READ,\n CoreResourceOperation.DELETE,\n CoreResourceOperation.SEARCH,\n ],\n \n operationsConfiguration: {\n // === CREATE ===\n [CoreResourceOperation.CREATE]: {\n variants: [\n // Internal: Queue services store payloads\n {\n variantKey: JobPayloadStorageVariantKey.INTERNAL,\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n requestDto: JobPayloadStorageCreateInternalSchema,\n },\n ],\n },\n \n // === READ ===\n [CoreResourceOperation.READ]: {\n variants: [\n // Internal: Queue services retrieve payloads\n {\n variantKey: JobPayloadStorageVariantKey.INTERNAL,\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n \n // === DELETE ===\n [CoreResourceOperation.DELETE]: {\n variants: [\n // Internal: Queue services delete payloads\n {\n variantKey: JobPayloadStorageVariantKey.INTERNAL,\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n // === SEARCH ===\n [CoreResourceOperation.SEARCH]: {\n variants: [\n {\n variantKey: JobPayloadStorageVariantKey.INTERNAL,\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: true,\n searchableFields: ['storageId'],\n searchableOptions: { caseSensitive: true, fullMatchOnly: true },\n filterFields: JOB_PAYLOAD_STORAGE_FILTER_FIELDS,\n sortFields: JOB_PAYLOAD_STORAGE_SORT_FIELDS,\n maxPaginatedResultPerPageLimit: 100,\n },\n ],\n },\n },\n });\n};\n"]}
|
|
1
|
+
{"version":3,"file":"jobs.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../src/queue/jobs.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,0CAA0C,EAAE,MAAM,8CAA8C,CAAC;AAC1G,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,kCAAkC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CAAC,eAAe;wBACzD,SAAS,EAAE,IAAI;wBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;wBAC7C,SAAS,EAAE,0BAA0B,CAAC,GAAG;wBACzC,YAAY,EAAE,IAAI;wBAClB,gBAAgB,EAAE,CAAC,WAAW,CAAC;wBAC/B,iBAAiB,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;wBAC/D,YAAY,EAAE,iCAAiC;wBAC/C,UAAU,EAAE,+BAA+B;wBAC3C,8BAA8B,EAAE,GAAG;qBACpC;iBACF;aACF;SACF;KACF,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["/**\n * Job Resource Configurations\n * \n * Defines resource configurations for JobExecution and JobPayloadStorage.\n * \n * Resource Design Principles:\n * - REPOSITORY_ONLY variants throughout: both resources are reached by the queue services and by\n * nothing else, so neither declares an API variant and neither generates a route\n * - Proper requestDto schemas for each variant\n * - isBackendOnly fields are automatically filtered in responses\n * \n * Key Resources:\n * - JobExecution: Tracks all job lifecycle events (30-day TTL)\n * - JobPayloadStorage: Stores large payloads >100KB (24-hour TTL)\n */\n\nimport { z } from 'zod';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport type { ResourceConfiguration } from '../resources/resources-config.shared.schemas';\nimport { ResourceOperationRiskLevel, ResourceOperationVariantType, ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { CORE_APP_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { \n JobExecutionSchema, \n JobPayloadStorageSchema,\n JobExecutionStatus,\n JobType,\n JobInitiator,\n JobPriority,\n} from './jobs.shared.schemas';\n\n\n// ============================================================================\n// JOB EXECUTION RESOURCE CONFIGURATION\n// ============================================================================\n\n/**\n * Variant keys for JobExecution operations.\n */\nexport enum JobExecutionVariantKey {\n /** Internal queue service operations (default) */\n INTERNAL = 'internal',\n}\n\n/**\n * Core operations available for JobExecution.\n */\ntype JobExecution_CoreOperations = \n | CoreResourceOperation.CREATE \n | CoreResourceOperation.READ \n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.LIST\n | CoreResourceOperation.SEARCH;\n\n// Filter fields for JobExecution LIST/SEARCH\nconst JOB_EXECUTION_FILTER_FIELDS = {\n applicationId: z.string(),\n jobType: z.enum(Object.values(JobType) as [string, ...string[]]),\n status: z.enum(Object.values(JobExecutionStatus) as [string, ...string[]]),\n organizationId: z.string(),\n userId: z.string(),\n queueName: z.string(),\n domainCategory: z.string(),\n initiatedBy: z.enum(Object.values(JobInitiator) as [string, ...string[]]),\n priority: z.enum(Object.values(JobPriority) as [string, ...string[]]),\n};\n\n// Sort fields for JobExecution LIST/SEARCH\nconst JOB_EXECUTION_SORT_FIELDS = ['createdAt', 'completedAt', 'durationMs', 'retryCount'] as const;\n\n/**\n * Factory function for JobExecution resource configuration.\n * \n * JobExecution tracks the lifecycle of all jobs processed by the queue system.\n * It provides visibility into job status, retries, timing, and error information.\n * \n * Variants: one per operation, all REPOSITORY_ONLY (CREATE, READ, UPDATE, LIST), for the queue\n * services. There is no API variant, so no route is generated and nothing here is reachable over\n * HTTP. In particular there is no admin cancel verb: cancelling a job is a queue-service call, not\n * an API call, and adding an operator-facing one means declaring an API variant here first.\n */\nexport const jobExecution_ResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[]\n): ResourceConfiguration<undefined, JobExecution_CoreOperations, typeof JobExecutionSchema> => {\n\n // === CREATE Schemas ===\n // Full create schema for internal use\n const JobExecutionCreateInternalSchema = JobExecutionSchema.omit({\n _id: true,\n retryCount: true, // Starts at 0 (default)\n lastRetryAt: true, // Set on retry\n startedAt: true, // Set when processing starts\n completedAt: true, // Set when completed\n durationMs: true, // Calculated on completion\n outputPayloadStorageId: true, // Set after execution\n error: true, // Set on failure\n workerId: true, // Set by worker\n workerHostname: true, // Set by worker\n });\n\n // === UPDATE Schemas ===\n // Internal service can update most fields (status changes, timing, errors)\n const JobExecutionUpdateInternalSchema = z.object({\n // Status updates\n status: z.enum(Object.values(JobExecutionStatus) as [string, ...string[]]).optional(),\n \n // Timing updates\n queuedAt: z.date().optional(),\n startedAt: z.date().optional(),\n completedAt: z.date().optional(),\n durationMs: z.number().int().optional(),\n lastRetryAt: z.date().optional(),\n \n // Retry tracking\n retryCount: z.number().int().min(0).optional(),\n \n // Worker info\n workerId: z.string().optional(),\n workerHostname: z.string().optional(),\n \n // Payload references\n outputPayloadStorageId: z.uuid().optional(),\n \n // Error info\n error: JobExecutionSchema.shape.error,\n });\n\n return createResourceConfiguration_Initialization<\n undefined,\n JobExecution_CoreOperations,\n typeof JobExecutionSchema\n >({\n mainSchema: JobExecutionSchema,\n resourceIdentifier: CoreResourceType.JOB_EXECUTIONS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.JOB_EXECUTIONS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true, // Internal infrastructure component\n\n /**\n * Subject-export disclosure: explicitly FORBIDDEN. A job execution is an OPERATIONAL record of\n * the platform doing work — it references a subject without being data *about* them in any sense\n * a data subject would recognise, and it is already out of Art. 20 scope as controller-generated.\n *\n * FORBIDDEN rather than left undeclared on purpose: this is a decision someone took, not a gap\n * nobody has filled, and the export refusal says so — precisely so a future operator clearing a\n * startup error cannot \"fix\" it by opting in.\n */\n systemAccessPolicy: { exportSubject: ResourceSystemAccessMode.FORBIDDEN },\n\n /*\n * DELIBERATELY NO `retentionPolicy`, and this comment is the declaration of that.\n *\n * Issue #138 asks that every engine resource declaring `exportSubject` either declare an erasure\n * posture or be deliberately and visibly exempt. This one is exempt, for the same reason the export\n * refusal directly above gives: a job execution is an operational record of the platform doing work,\n * not data about a person. It declares no personal-data category, and no field of it would be scrubbed.\n *\n * Declaring `RETAIN_ONLY` here would be worse than saying nothing. The mode is a positive assertion\n * about a resource that holds personal data of a subject; making it would place this row in the\n * subject-erasure population, inject the `retentionStatus` / `impersonalizedAt` markers and the\n * route-less LIST + UPDATE_MANY plumbing, and require a migration on all three schema planes — all to\n * describe an erasure path that never visits this collection.\n *\n * If a future job payload ever carries subject content, that is a `.dataCategories()` declaration on\n * the payload first, and this exemption is then wrong and must be revisited with it.\n */\n\n coreOperations: [\n CoreResourceOperation.CREATE,\n CoreResourceOperation.READ,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.LIST,\n CoreResourceOperation.SEARCH,\n ],\n \n operationsConfiguration: {\n // === CREATE ===\n [CoreResourceOperation.CREATE]: {\n variants: [\n // Internal: Queue services create job records\n {\n variantKey: JobExecutionVariantKey.INTERNAL,\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n requestDto: JobExecutionCreateInternalSchema,\n },\n ],\n },\n \n // === READ ===\n [CoreResourceOperation.READ]: {\n variants: [\n // Internal: Queue services read job details\n {\n variantKey: JobExecutionVariantKey.INTERNAL,\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n \n // === UPDATE ===\n [CoreResourceOperation.UPDATE]: {\n variants: [\n // Internal: Queue services update job status\n {\n variantKey: JobExecutionVariantKey.INTERNAL,\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n requestDto: JobExecutionUpdateInternalSchema,\n },\n ],\n },\n \n // === LIST ===\n [CoreResourceOperation.LIST]: {\n variants: [\n // Internal: Queue services list jobs\n {\n variantKey: JobExecutionVariantKey.INTERNAL,\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n // === SEARCH ===\n [CoreResourceOperation.SEARCH]: {\n variants: [\n {\n variantKey: JobExecutionVariantKey.INTERNAL,\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: true,\n searchableFields: ['jobId', 'operationPathKey', 'batchRef'],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: JOB_EXECUTION_FILTER_FIELDS,\n sortFields: JOB_EXECUTION_SORT_FIELDS,\n maxPaginatedResultPerPageLimit: 100,\n },\n ],\n },\n },\n });\n};\n\n// ============================================================================\n// JOB PAYLOAD STORAGE RESOURCE CONFIGURATION\n// ============================================================================\n\n/**\n * Variant keys for JobPayloadStorage operations.\n */\nexport enum JobPayloadStorageVariantKey {\n /** Internal queue service operations (default, only variant) */\n INTERNAL = 'internal',\n}\n\n/**\n * Core operations available for JobPayloadStorage.\n */\ntype JobPayloadStorage_CoreOperations = \n | CoreResourceOperation.CREATE \n | CoreResourceOperation.READ \n | CoreResourceOperation.DELETE\n | CoreResourceOperation.SEARCH;\n\n// Filter fields for JobPayloadStorage\nconst JOB_PAYLOAD_STORAGE_FILTER_FIELDS = {\n applicationId: z.string(),\n isCompressed: z.boolean(),\n};\n\n// Sort fields for JobPayloadStorage\nconst JOB_PAYLOAD_STORAGE_SORT_FIELDS = ['createdAt', 'expiresAt', 'payloadSizeBytes'] as const;\n\n/**\n * Factory function for JobPayloadStorage resource configuration.\n * \n * JobPayloadStorage stores large job payloads (>100KB) that exceed RabbitMQ\n * message size limits. Referenced by storageId in JobPayload messages.\n * \n * Variants:\n * - INTERNAL only: No API exposure (contains sensitive payload data)\n */\nexport const jobPayloadStorage_ResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[]\n): ResourceConfiguration<undefined, JobPayloadStorage_CoreOperations, typeof JobPayloadStorageSchema> => {\n\n // === CREATE Schema ===\n // Internal services provide all data except auto-generated fields\n const JobPayloadStorageCreateInternalSchema = JobPayloadStorageSchema.omit({\n _id: true,\n referenceCount: true, // Starts at 1 (default)\n });\n\n return createResourceConfiguration_Initialization<\n undefined,\n JobPayloadStorage_CoreOperations,\n typeof JobPayloadStorageSchema\n >({\n mainSchema: JobPayloadStorageSchema,\n resourceIdentifier: CoreResourceType.JOB_PAYLOAD_STORAGE,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.JOB_PAYLOAD_STORAGE],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true, // Internal infrastructure component\n\n coreOperations: [\n CoreResourceOperation.CREATE,\n CoreResourceOperation.READ,\n CoreResourceOperation.DELETE,\n CoreResourceOperation.SEARCH,\n ],\n \n operationsConfiguration: {\n // === CREATE ===\n [CoreResourceOperation.CREATE]: {\n variants: [\n // Internal: Queue services store payloads\n {\n variantKey: JobPayloadStorageVariantKey.INTERNAL,\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n requestDto: JobPayloadStorageCreateInternalSchema,\n },\n ],\n },\n \n // === READ ===\n [CoreResourceOperation.READ]: {\n variants: [\n // Internal: Queue services retrieve payloads\n {\n variantKey: JobPayloadStorageVariantKey.INTERNAL,\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n \n // === DELETE ===\n [CoreResourceOperation.DELETE]: {\n variants: [\n // Internal: Queue services delete payloads\n {\n variantKey: JobPayloadStorageVariantKey.INTERNAL,\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n // === SEARCH ===\n [CoreResourceOperation.SEARCH]: {\n variants: [\n {\n variantKey: JobPayloadStorageVariantKey.INTERNAL,\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: true,\n searchableFields: ['storageId'],\n searchableOptions: { caseSensitive: true, fullMatchOnly: true },\n filterFields: JOB_PAYLOAD_STORAGE_FILTER_FIELDS,\n sortFields: JOB_PAYLOAD_STORAGE_SORT_FIELDS,\n maxPaginatedResultPerPageLimit: 100,\n },\n ],\n },\n },\n });\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"jobs.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/queue/jobs.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAA4B,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AASpG;;GAEG;AACH,oBAAY,OAAO;IACjB,uEAAuE;IACvE,kBAAkB,uBAAuB;IACzC,uDAAuD;IACvD,YAAY,iBAAiB;IAC7B,uDAAuD;IACvD,cAAc,mBAAmB;IACjC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,WAAW,gBAAgB;CAC5B;AAED;;GAEG;AACH,oBAAY,SAAS;IACnB,iCAAiC;IACjC,OAAO,YAAY;IACnB,yBAAyB;IACzB,MAAM,WAAW;IACjB,gCAAgC;IAChC,UAAU,eAAe;IACzB,4BAA4B;IAC5B,SAAS,cAAc;IACvB,gCAAgC;IAChC,MAAM,WAAW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EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,aAAa,EAAE,CAAC,QAAQ,EAAE;IAC/C,6CAA6C;IAC7C,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,aAAa,EAAE,CAAC,QAAQ,EAAE;CACtD,CAAC,CAAC","sourcesContent":["/**\n * Jobs Shared Schemas\n *\n * All job-related enums, schemas, and types consolidated in a single file.\n * Includes: job types, statuses, payloads, results, execution tracking, and storage.\n *\n * Resource Design Notes:\n * - JobExecution and JobPayloadStorage are internal system resources\n * - Many fields are marked .isBackendOnly() as they contain sensitive internal data\n * - TTL indexes ensure automatic cleanup\n * - Proper indexes for common query patterns\n */\n\nimport { z } from 'zod';\nimport { initZodDecorators } from '@wildo-ai/zod-decorators';\nimport { WildoError_BackendSchema, RetryPolicy_BackoffType } from '../errors/errors.shared.schemas';\n\n// Ensure Zod decorators are loaded\ninitZodDecorators(z);\n\n// ============================================================================\n// ENUMS\n// ============================================================================\n\n/**\n * Type of job being processed.\n */\nexport enum JobType {\n /** Standard resource operation (CREATE, READ, UPDATE, DELETE, etc.) */\n RESOURCE_OPERATION = 'resource_operation',\n /** Custom batch job defined in customBatchesFactory */\n CUSTOM_BATCH = 'custom_batch',\n /** Scheduled cron job triggered by crontabs-manager */\n SCHEDULED_CRON = 'scheduled_cron',\n /**\n * Cron-driven minion tick (KD-12 of\n * `.claude/plans/minions-and-workers-implementation.md`).\n *\n * Published by `platform-crontabs-batches-manager` to the application's\n * scheduled queue when a minion's cron schedule fires. The consumer\n * (`MinionTickConsumerBackendService` in `saas-minions-lib`) filters\n * messages by matching the token's `minionName` against the minion's OWN\n * identity — which each minion sources from its compiled-in\n * `defineMinionInit({ minionName })` config (the minion package is\n * domain-specific by construction), cross-validated at boot against the\n * fetched `appConfig.minions[minionName]`. Matched ticks route to the\n * minion's locally-hosted actor system. Identity is NOT read from env:\n * `APP_OWNED_SERVICE_NAME` is deploy-time metadata (and the read-from-env\n * path of the language-pluggable *worker* runtime), never the Node\n * minion's runtime identity source.\n *\n * Dispatch is a pure switch on `jobType` — see `PublishScheduledJobInput`\n * / `ScheduledJobTokenInput` xor that pairs `MINION_TICK` with the\n * `minionName` discriminator.\n */\n MINION_TICK = 'minion_tick',\n}\n\n/**\n * Status of a job through its lifecycle.\n */\nexport enum JobStatus {\n /** Created but not yet queued */\n PENDING = 'pending',\n /** Published to queue */\n QUEUED = 'queued',\n /** Worker started processing */\n PROCESSING = 'processing',\n /** Successfully finished */\n COMPLETED = 'completed',\n /** Failed, retries exhausted */\n FAILED = 'failed',\n /** Failed but will retry */\n RETRYING = 'retrying',\n /** Moved to dead letter queue */\n DEAD_LETTER = 'dead_letter',\n /** Manually cancelled */\n CANCELLED = 'cancelled',\n}\n\n/**\n * Which queue substrate a runtime uses.\n *\n * Read by `bindQueueAdapter()` in `saas-backend-lib`, which is the only place a member is mapped to\n * an implementation — as a total `Record`, so adding a member here is a compile error until somebody\n * says which class serves it.\n *\n * `REDIS` was declared and removed (#502). It had no implementation, no reader and no selection\n * path, and the decision was to build ONE of the two missing adapters rather than both: a vocabulary\n * member offering a choice nothing can make is worse than an absent one, because it reads as a\n * supported deployment. Reinstate it when something needs it, alongside the adapter.\n */\nexport enum QueueAdapterType {\n /** A real broker. The default, and what a deployed application wants: durability across a restart, visibility across processes, permissions per runtime. */\n RABBITMQ = 'rabbitmq',\n /**\n * In-process, no broker. For a test lane that needs real background-work BEHAVIOUR — retry,\n * dead-lettering, delayed redelivery, unacknowledged messages staying unacknowledged — and for a\n * single-process runtime that has declared it wants none of what a broker is bought for.\n */\n MEMORY = 'memory',\n}\n\n/**\n * Who initiated the job.\n */\nexport enum JobInitiator {\n /** Triggered via API call */\n API = 'api',\n /** Triggered by crontabs-batches-manager */\n CRONTAB = 'crontab',\n /** Triggered internally by service */\n INTERNAL = 'internal',\n}\n\n/**\n * Status of a job execution record (for tracking).\n * Similar to JobStatus but specific to the tracking record.\n */\nexport enum JobExecutionStatus {\n /** Created but not yet queued */\n PENDING = 'pending',\n /** Published to queue */\n QUEUED = 'queued',\n /** Worker started processing */\n PROCESSING = 'processing',\n /** Successfully finished */\n COMPLETED = 'completed',\n /** Failed, retries exhausted */\n FAILED = 'failed',\n /** Failed but will retry */\n RETRYING = 'retrying',\n /** Moved to dead letter queue */\n DEAD_LETTER = 'dead_letter',\n /** Manually cancelled */\n CANCELLED = 'cancelled',\n}\n\n/**\n * Compression type for stored payloads.\n */\nexport enum PayloadCompressionType {\n NONE = 'none',\n GZIP = 'gzip',\n}\n\n/**\n * Job priority levels.\n * HIGH and CRITICAL are routed to priority queues.\n */\nexport enum JobPriority {\n LOW = 'low',\n NORMAL = 'normal',\n HIGH = 'high',\n CRITICAL = 'critical',\n}\n\n// ============================================================================\n// CONSTANTS\n// ============================================================================\n\n/**\n * Threshold for storing payloads externally vs inline.\n * Payloads >= 100KB are stored in MongoDB, referenced by storageId.\n * This prevents RabbitMQ performance issues with large messages.\n */\nexport const PAYLOAD_SIZE_THRESHOLD_BYTES = 100 * 1024; // 100KB\n\n// ============================================================================\n// ZOD ENUM VALUE EXTRACTION (for Zod 4)\n// ============================================================================\n\nconst JobTypeValues = Object.values(JobType) as [string, ...string[]];\nconst JobStatusValues = Object.values(JobStatus) as [string, ...string[]];\nconst JobPriorityValues = Object.values(JobPriority) as [string, ...string[]];\nconst JobInitiatorValues = Object.values(JobInitiator) as [string, ...string[]];\nconst JobExecutionStatusValues = Object.values(JobExecutionStatus) as [string, ...string[]];\nconst PayloadCompressionTypeValues = Object.values(PayloadCompressionType) as [string, ...string[]];\n\n// ============================================================================\n// RETRY BACKOFF CONFIG (shared: operation queueConfig + job transport)\n// ============================================================================\n\n/**\n * App-authorable backoff shape controlling the *timing* of job retries.\n *\n * This is the subset of retry parameters an application developer sets on an\n * operation's `queueConfig.retryConfig` to shape how long a failed job waits\n * before each re-attempt. It is intentionally a partial: the `maxRetries` and\n * `timeoutMs` axes already live at the top of `ResourceConfiguration_QueueConfig`,\n * so they are NOT repeated here (single source of truth per axis).\n *\n * Runtime semantics — when a job fails and is still eligible to retry, the queue\n * worker computes `delay = baseDelayMs × 2^attempt` (for `EXPONENTIAL`; see\n * `JobRetryUtils.calculateDelay` for `FIXED`/`LINEAR`), clamps it to `maxDelayMs`,\n * and holds the message that long in a **durable broker-side delay queue**\n * (RabbitMQ per-queue TTL + dead-letter back to the source queue) before\n * redelivery. The delay is broker-timed, not an in-process sleep, so it survives\n * a worker crash during the wait.\n *\n * All fields are optional; unset fields fall back to `QUEUE_RETRY_DEFAULTS`.\n * Both the authoring surface (`queueConfig.retryConfig`) and the wire payload\n * (`JobPayload.retryConfig`) reuse this exact schema — the enqueue side resolves\n * defaults so the transported object carries fully-resolved values.\n *\n * NOTE: This schema lives in the jobs module (not queues) because\n * `queues.shared.schemas.ts` already imports from here (`JobPriority`); putting\n * it in queues would create an import cycle. It is queue-facing by name.\n *\n * @example\n * // Exponential backoff starting at 2s, capped at 30s:\n * queueConfig: { maxRetries: 5, retryConfig: { baseDelayMs: 2000, maxDelayMs: 30000 } }\n */\nexport const QueueRetryBackoffConfigSchema = z.object({\n /** Base delay in ms — first retry / base of the exponential (or linear) curve. */\n baseDelayMs: z.number().int().min(100).optional(),\n /** Maximum delay cap in ms — prevents unbounded backoff on late attempts. */\n maxDelayMs: z.number().int().min(1000).optional(),\n /** Backoff curve: `fixed` | `linear` | `exponential`. Defaults to `exponential`. */\n retryPolicy: z.enum(RetryPolicy_BackoffType).optional(),\n});\n\nexport type QueueRetryBackoffConfig = z.infer<typeof QueueRetryBackoffConfigSchema>;\n\n// ============================================================================\n// JOB PAYLOAD SCHEMA (Transport - not a resource)\n// ============================================================================\n\n/**\n * Job payload for queue transport.\n *\n * Design notes:\n * - This is NOT a resource schema (used for RabbitMQ message transport)\n * - applicationId is needed for queue routing (not duplicated from context)\n * - operationPathKey is primary identifier, operationPathJson for execution\n * - executionContextJson carries full context for reconstruction\n * - org/user IDs are NOT duplicated - extract from executionContextJson if needed\n */\nexport const JobPayloadSchema = z.object({\n /** Unique job identifier */\n jobId: z.uuid(),\n\n /** Type of job being executed */\n jobType: z.enum(JobTypeValues),\n\n // === Application Routing ===\n /** Application ID for queue name construction */\n applicationId: z.string(),\n\n // === Operation Identification ===\n /** Primary key for lookup/matching (required for RESOURCE_OPERATION) */\n operationPathKey: z.string().optional(),\n /** Serialized ResourceConfiguration_OperationPath (required for RESOURCE_OPERATION) */\n operationPathJson: z.string().optional(),\n /** Custom batch reference (required for CUSTOM_BATCH) */\n batchRef: z.string().optional(),\n\n // === Execution Data ===\n // EITHER inline OR storage reference (mutually exclusive)\n /** JSON-stringified input data for small payloads (<100KB) */\n inputDataJson: z.string().optional(),\n /** Reference to JobPayloadStorage for large payloads */\n inputPayloadStorageId: z.uuid().optional(),\n /** Resource ID for READ/UPDATE/DELETE operations */\n inputId: z.string().optional(),\n\n // === Execution Context ===\n /**\n * Serialized execution context (reconstructed on worker side).\n * Optional for CUSTOM_BATCH and SCHEDULED_CRON (they create their own internal context).\n */\n executionContextJson: z.string().optional(),\n\n // === Job Source ===\n /** How the job was initiated */\n initiatedBy: z.enum(JobInitiatorValues).default(JobInitiator.API),\n\n // === Job Configuration ===\n /** Queue priority level */\n priority: z.enum(JobPriorityValues).default(JobPriority.NORMAL),\n /** Current retry attempt (0-indexed) */\n retryCount: z.number().int().min(0).default(0),\n /** Maximum retry attempts */\n maxRetries: z.number().int().min(0).default(3),\n /**\n * Backoff timing for retries (base delay, cap, curve). Resolved from the\n * operation's `queueConfig.retryConfig` at enqueue time (defaults applied), so\n * the worker can honor per-operation backoff without re-reading config. The\n * worker computes the delay from these values and holds the message in a\n * durable broker delay queue before redelivery — see `QueueRetryBackoffConfig`.\n */\n retryConfig: QueueRetryBackoffConfigSchema.optional(),\n /** Job execution timeout in milliseconds */\n timeoutMs: z.number().int().min(1000).default(300000),\n\n // === Timing ===\n /** When the job was created */\n createdAt: z.date(),\n /** When the job should be executed (for delayed jobs) */\n scheduledAt: z.date().optional(),\n\n // === RPC Support ===\n /**\n * RPC reply-matching id (QUEUED awaitable mode). A fresh uuid minted at enqueue time to correlate a\n * published job with its reply on the RPC reply queue — it is NOT a request trace id. Renamed from\n * `correlationId` when request→job traceability landed (Phase 6): the job now ALSO carries\n * `originCorrelationId` (the enqueuing request's trace id), and the two must never be conflated —\n * one matches a reply, the other joins the job to a distributed trace.\n */\n rpcReplyCorrelationId: z.uuid().optional(),\n /** Reply queue name for RPC pattern */\n replyTo: z.string().optional(),\n\n // === Traceability ===\n /**\n * The correlation id of the REQUEST that enqueued this job, carried onto the payload so the worker\n * that later executes it adopts the same id (see `adoptCorrelationIdIntoCurrentFrame`). This joins\n * the asynchronous job execution — its worker-side logs and audit rows — to the originating\n * request's distributed trace. Distinct from `rpcReplyCorrelationId` (reply matching) and from the\n * AMQP message `correlationId` property (wire-level reply routing). Absent for jobs with no\n * originating request (e.g. some system-enqueued work), in which case the worker mints a fresh id.\n */\n originCorrelationId: z.string().optional(),\n\n // === Domain Routing ===\n /** Domain category for domain-specific routing (e.g., 'email', 'agents') */\n domainCategory: z.string().optional(),\n});\n\nexport type JobPayload = z.infer<typeof JobPayloadSchema>;\n\n// ============================================================================\n// JOB PAYLOAD STORAGE SCHEMA (Resource)\n// ============================================================================\n\n/**\n * Default TTL for job payload storage in seconds (24 hours).\n * Large payloads are automatically deleted after this period.\n */\nexport const JOB_PAYLOAD_STORAGE_TTL_SECONDS = 24 * 60 * 60; // 24 hours\n\n/**\n * Schema for stored job payloads.\n * Used when payload exceeds PAYLOAD_SIZE_THRESHOLD_BYTES.\n *\n * Resource Design:\n * - Internal system resource, no frontend exposure\n * - All fields except storageId are backendOnly\n * - TTL: Documents are automatically deleted when expiresAt is reached\n */\nexport const JobPayloadStorageSchema = z.object({\n /** Document ID — auto-generated. `.isPrimaryKey()` is what makes the PostgreSQL planner emit the\n * PRIMARY KEY constraint (MongoDB enforces `_id` uniqueness implicitly); without it this table\n * shipped constraint-less on PostgreSQL. */\n _id: z.string().isPrimaryKey(),\n\n // === Reference (exposed for lookup) ===\n /** Storage ID (used in JobPayload.inputPayloadStorageId) */\n storageId: z.uuid().isUnique({ scope: 'global', sparse: false }),\n\n // === Application Context ===\n /** Application that owns this payload */\n applicationId: z.string().isDBIndexed().isBackendOnly(),\n\n // === Content (sensitive, backend-only) ===\n /** JSON-stringified payload - contains actual job data */\n payloadJson: z.string().isBackendOnly(),\n /** Size of the payload in bytes */\n payloadSizeBytes: z.number().int().positive().isBackendOnly(),\n\n // === Compression (internal implementation detail) ===\n /** Whether the payload is compressed */\n isCompressed: z.boolean().default(false).isBackendOnly(),\n /** Compression algorithm used */\n compressionType: z.enum(PayloadCompressionTypeValues).default(PayloadCompressionType.NONE).isBackendOnly(),\n\n // === Lifecycle ===\n /** When the payload was stored */\n createdAt: z.date().isDBIndexed(),\n /**\n * When the payload expires and can be cleaned up.\n * MongoDB TTL index will automatically delete documents at this time.\n */\n expiresAt: z.date().ttl({ expireAfterSeconds: 0 }),\n\n // === Reference Tracking (internal) ===\n /** Number of references to this payload (for cleanup) */\n referenceCount: z.number().int().min(0).default(1).isBackendOnly(),\n});\n\nexport type JobPayloadStorage = z.infer<typeof JobPayloadStorageSchema>;\n\n// ============================================================================\n// JOB RESULT SCHEMA (Transport - not a resource)\n// ============================================================================\n\n/**\n * Job execution result.\n * Returned to callers via RPC reply queue or callback dispatch.\n *\n * This is NOT a resource schema (used for RabbitMQ message transport)\n */\nexport const JobResultSchema = z.object({\n /** Job identifier */\n jobId: z.uuid(),\n\n /** Final status of the job */\n status: z.enum(JobStatusValues),\n\n // === Success Result ===\n // EITHER inline OR storage reference (mutually exclusive)\n /** JSON-stringified result data for small results */\n resultJson: z.string().optional(),\n /** Reference to JobPayloadStorage for large results */\n resultPayloadStorageId: z.uuid().optional(),\n\n // === Error Info ===\n /** Error information if job failed (uses backend error schema with full error details) */\n error: WildoError_BackendSchema.optional(),\n\n // === Timing ===\n /** When job execution started */\n startedAt: z.date(),\n /** When job execution completed */\n completedAt: z.date().optional(),\n /** Execution duration in milliseconds */\n durationMs: z.number().int().optional(),\n});\n\nexport type JobResult = z.infer<typeof JobResultSchema>;\n\n// ============================================================================\n// JOB EXECUTION TRACKING SCHEMA (Resource)\n// ============================================================================\n\n/**\n * Default TTL for job execution records in seconds (30 days).\n * Completed/failed jobs are automatically deleted after this period.\n */\nexport const JOB_EXECUTION_TTL_SECONDS = 30 * 24 * 60 * 60; // 30 days\n\n/**\n * Job execution tracking record.\n *\n * Resource Design:\n * - Internal system resource for job lifecycle tracking\n * - Queryable fields (jobId, status, organizationId, userId) are exposed\n * - Sensitive/internal fields are marked .isBackendOnly()\n * - TTL: Documents are automatically deleted 30 days after creation\n * - Proper indexes for dashboard/monitoring queries\n */\nexport const JobExecutionSchema = z.object({\n /** Document ID — auto-generated. `.isPrimaryKey()` is what makes the PostgreSQL planner emit the\n * PRIMARY KEY constraint (MongoDB enforces `_id` uniqueness implicitly); without it this table\n * shipped constraint-less on PostgreSQL. */\n _id: z.string().isPrimaryKey(),\n\n // === Job Identity (exposed for queries) ===\n /** Unique job identifier */\n jobId: z.uuid().isUnique({ scope: 'global', sparse: false }),\n /** Application that owns this job */\n applicationId: z.string().isDBIndexed(),\n\n // === What Was Executed (exposed for filtering) ===\n /** Type of job */\n jobType: z.enum(JobTypeValues).isDBIndexed(),\n /** Operation path key for resource operations */\n operationPathKey: z.string().optional(),\n /** Batch reference for custom batches */\n batchRef: z.string().optional(),\n /** Domain category for domain jobs (email, agents, etc.) */\n domainCategory: z.string().isDBIndexed().optional(),\n\n // === Context (exposed for org/user filtering) ===\n /** Organization ID from execution context */\n organizationId: z.string().isDBIndexed().optional(),\n /** User ID from execution context */\n userId: z.string().isDBIndexed().optional(),\n /** How the job was initiated */\n initiatedBy: z.enum(JobInitiatorValues),\n\n // === Execution State (exposed for monitoring) ===\n /** Current status */\n status: z.enum(JobExecutionStatusValues).isDBIndexed(),\n /** Queue name where job was published */\n queueName: z.string().isDBIndexed(),\n /** Queue priority */\n priority: z.enum(JobPriorityValues),\n\n // === Retry Tracking (exposed for retry monitoring) ===\n /** Current retry attempt (0-indexed) */\n retryCount: z.number().int().min(0).default(0),\n /** Maximum retry attempts */\n maxRetries: z.number().int().min(0),\n /** When the last retry was attempted */\n lastRetryAt: z.date().optional(),\n\n // === Timing (exposed for performance monitoring) ===\n /**\n * When the job record was created. TTL cleanup after 30 days.\n *\n * `.default(() => new Date())` is REQUIRED, not decorative: this is a\n * system-managed timestamp that the create pipeline strips from the input\n * before validation (like every other `createdAt`). Without a default, the\n * create-DTO date-coercion (`z.date()` → `z.coerce.date()`) then coerces the\n * now-`undefined` value → `new Date(undefined)` = Invalid Date → the create\n * FATALs with `createdAt: expected date, received Date`. The default supplies\n * a valid Date when the field is absent, matching the canonical timestamp\n * pattern (`z.date().default(() => new Date())` on todos/tasks/etc.). TTL must\n * stay BEFORE `.default()` — its allowed types are `[ZodDate, ZodOptional]`,\n * not `ZodDefault`.\n */\n createdAt: z.date().ttl({ expireAfterSeconds: JOB_EXECUTION_TTL_SECONDS }).default(() => new Date()),\n /** When the job was published to queue */\n queuedAt: z.date().optional(),\n /** When worker started processing */\n startedAt: z.date().optional(),\n /** When execution completed (success or failure) */\n completedAt: z.date().isDBIndexed().optional(),\n /** Execution duration in milliseconds */\n durationMs: z.number().int().optional(),\n\n // === Payload References (backend-only, internal implementation) ===\n /** Reference to input payload storage */\n inputPayloadStorageId: z.uuid().isBackendOnly().optional(),\n /** Reference to output payload storage */\n outputPayloadStorageId: z.uuid().isBackendOnly().optional(),\n\n // === Error Info (exposed for error analysis) ===\n /** Error information if job failed (uses backend error schema with full error details) */\n error: WildoError_BackendSchema.optional(),\n\n // === Worker Info (backend-only, debugging only) ===\n /** Pod/worker ID that processed this job */\n workerId: z.string().isBackendOnly().optional(),\n /** Hostname of the worker (for debugging) */\n workerHostname: z.string().isBackendOnly().optional(),\n});\n\nexport type JobExecution = z.infer<typeof JobExecutionSchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"jobs.shared.schemas.js","sourceRoot":"","sources":["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C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAEvC,qEAAqE;IACrE,yCAAyC;IACzC,qBAAqB,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,aAAa,EAAE,CAAC,QAAQ,EAAE;IAC1D,0CAA0C;IAC1C,sBAAsB,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,aAAa,EAAE,CAAC,QAAQ,EAAE;IAE3D,kDAAkD;IAClD,0FAA0F;IAC1F,KAAK,EAAE,wBAAwB,CAAC,QAAQ,EAAE;IAE1C,qDAAqD;IACrD,4CAA4C;IAC5C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,aAAa,EAAE,CAAC,QAAQ,EAAE;IAC/C,6CAA6C;IAC7C,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,aAAa,EAAE,CAAC,QAAQ,EAAE;CACtD,CAAC,CAAC","sourcesContent":["/**\n * Jobs Shared Schemas\n *\n * All job-related enums, schemas, and types consolidated in a single file.\n * Includes: job types, statuses, payloads, results, execution tracking, and storage.\n *\n * Resource Design Notes:\n * - JobExecution and JobPayloadStorage are internal system resources\n * - Many fields are marked .isBackendOnly() as they contain sensitive internal data\n * - TTL indexes ensure automatic cleanup\n * - Proper indexes for common query patterns\n */\n\nimport { z } from 'zod';\nimport { initZodDecorators } from '@wildo-ai/zod-decorators';\nimport { WildoError_BackendSchema, RetryPolicy_BackoffType } from '../errors/errors.shared.schemas';\n\n// Ensure Zod decorators are loaded\ninitZodDecorators(z);\n\n// ============================================================================\n// ENUMS\n// ============================================================================\n\n/**\n * Type of job being processed.\n */\nexport enum JobType {\n /** Standard resource operation (CREATE, READ, UPDATE, DELETE, etc.) */\n RESOURCE_OPERATION = 'resource_operation',\n /** Custom batch job defined in customBatchesFactory */\n CUSTOM_BATCH = 'custom_batch',\n /** Scheduled cron job triggered by crontabs-manager */\n SCHEDULED_CRON = 'scheduled_cron',\n /**\n * Cron-driven minion tick (KD-12 of\n * `.claude/plans/minions-and-workers-implementation.md`).\n *\n * Published by `platform-crontabs-batches-manager` to the application's\n * scheduled queue when a minion's cron schedule fires. The consumer\n * (`MinionTickConsumerBackendService` in `saas-minions-lib`) filters\n * messages by matching the token's `minionName` against the minion's OWN\n * identity — which each minion sources from its compiled-in\n * `defineMinionInit({ minionName })` config (the minion package is\n * domain-specific by construction), cross-validated at boot against the\n * fetched `appConfig.minions[minionName]`. Matched ticks route to the\n * minion's locally-hosted actor system. Identity is NOT read from env:\n * `APP_OWNED_SERVICE_NAME` is deploy-time metadata (and the read-from-env\n * path of the language-pluggable *worker* runtime), never the Node\n * minion's runtime identity source.\n *\n * Dispatch is a pure switch on `jobType` — see `PublishScheduledJobInput`\n * / `ScheduledJobTokenInput` xor that pairs `MINION_TICK` with the\n * `minionName` discriminator.\n */\n MINION_TICK = 'minion_tick',\n}\n\n/**\n * Status of a job through its lifecycle.\n */\nexport enum JobStatus {\n /** Created but not yet queued */\n PENDING = 'pending',\n /** Published to queue */\n QUEUED = 'queued',\n /** Worker started processing */\n PROCESSING = 'processing',\n /** Successfully finished */\n COMPLETED = 'completed',\n /** Failed, retries exhausted */\n FAILED = 'failed',\n /** Failed but will retry */\n RETRYING = 'retrying',\n /** Moved to dead letter queue */\n DEAD_LETTER = 'dead_letter',\n /** Manually cancelled */\n CANCELLED = 'cancelled',\n}\n\n/**\n * Which queue substrate a runtime uses.\n *\n * Read by `bindQueueAdapter()` in `saas-backend-lib`, which is the only place a member is mapped to\n * an implementation — as a total `Record`, so adding a member here is a compile error until somebody\n * says which class serves it.\n *\n * `REDIS` was declared and removed (#502). It had no implementation, no reader and no selection\n * path, and the decision was to build ONE of the two missing adapters rather than both: a vocabulary\n * member offering a choice nothing can make is worse than an absent one, because it reads as a\n * supported deployment. Reinstate it when something needs it, alongside the adapter.\n */\nexport enum QueueAdapterType {\n /** A real broker. The default, and what a deployed application wants: durability across a restart, visibility across processes, permissions per runtime. */\n RABBITMQ = 'rabbitmq',\n /**\n * In-process, no broker. For a test lane that needs real background-work BEHAVIOUR — retry,\n * dead-lettering, delayed redelivery, unacknowledged messages staying unacknowledged — and for a\n * single-process runtime that has declared it wants none of what a broker is bought for.\n */\n MEMORY = 'memory',\n}\n\n/**\n * Who initiated the job.\n */\nexport enum JobInitiator {\n /** Triggered via API call */\n API = 'api',\n /** Triggered by crontabs-batches-manager */\n CRONTAB = 'crontab',\n /** Triggered internally by service */\n INTERNAL = 'internal',\n}\n\n/**\n * Status of a job execution record (for tracking).\n * Similar to JobStatus but specific to the tracking record.\n */\nexport enum JobExecutionStatus {\n /** Created but not yet queued */\n PENDING = 'pending',\n /** Published to queue */\n QUEUED = 'queued',\n /** Worker started processing */\n PROCESSING = 'processing',\n /** Successfully finished */\n COMPLETED = 'completed',\n /** Failed, retries exhausted */\n FAILED = 'failed',\n /** Failed but will retry */\n RETRYING = 'retrying',\n /** Moved to dead letter queue */\n DEAD_LETTER = 'dead_letter',\n /** Manually cancelled */\n CANCELLED = 'cancelled',\n}\n\n/**\n * Compression type for stored payloads.\n */\nexport enum PayloadCompressionType {\n NONE = 'none',\n GZIP = 'gzip',\n}\n\n/**\n * Job priority levels.\n * HIGH and CRITICAL are routed to priority queues.\n */\nexport enum JobPriority {\n LOW = 'low',\n NORMAL = 'normal',\n HIGH = 'high',\n CRITICAL = 'critical',\n}\n\n// ============================================================================\n// CONSTANTS\n// ============================================================================\n\n/**\n * Threshold for storing payloads externally vs inline.\n * Payloads >= 100KB are stored in MongoDB, referenced by storageId.\n * This prevents RabbitMQ performance issues with large messages.\n */\nexport const PAYLOAD_SIZE_THRESHOLD_BYTES = 100 * 1024; // 100KB\n\n// ============================================================================\n// ZOD ENUM VALUE EXTRACTION (for Zod 4)\n// ============================================================================\n\nconst JobTypeValues = Object.values(JobType) as [string, ...string[]];\nconst JobStatusValues = Object.values(JobStatus) as [string, ...string[]];\nconst JobPriorityValues = Object.values(JobPriority) as [string, ...string[]];\nconst JobInitiatorValues = Object.values(JobInitiator) as [string, ...string[]];\nconst JobExecutionStatusValues = Object.values(JobExecutionStatus) as [string, ...string[]];\nconst PayloadCompressionTypeValues = Object.values(PayloadCompressionType) as [string, ...string[]];\n\n// ============================================================================\n// RETRY BACKOFF CONFIG (shared: operation queueConfig + job transport)\n// ============================================================================\n\n/**\n * App-authorable backoff shape controlling the *timing* of job retries.\n *\n * This is the subset of retry parameters an application developer sets on an\n * operation's `queueConfig.retryConfig` to shape how long a failed job waits\n * before each re-attempt. It is intentionally a partial: the `maxRetries` and\n * `timeoutMs` axes already live at the top of `ResourceConfiguration_QueueConfig`,\n * so they are NOT repeated here (single source of truth per axis).\n *\n * Runtime semantics — when a job fails and is still eligible to retry, the queue\n * worker computes `delay = baseDelayMs × 2^attempt` (for `EXPONENTIAL`; see\n * `JobRetryUtils.calculateDelay` for `FIXED`/`LINEAR`), clamps it to `maxDelayMs`,\n * and holds the message that long in a **durable broker-side delay queue**\n * (RabbitMQ per-queue TTL + dead-letter back to the source queue) before\n * redelivery. The delay is broker-timed, not an in-process sleep, so it survives\n * a worker crash during the wait.\n *\n * All fields are optional; unset fields fall back to `QUEUE_RETRY_DEFAULTS`.\n * Both the authoring surface (`queueConfig.retryConfig`) and the wire payload\n * (`JobPayload.retryConfig`) reuse this exact schema — the enqueue side resolves\n * defaults so the transported object carries fully-resolved values.\n *\n * NOTE: This schema lives in the jobs module (not queues) because\n * `queues.shared.schemas.ts` already imports from here (`JobPriority`); putting\n * it in queues would create an import cycle. It is queue-facing by name.\n *\n * @example\n * // Exponential backoff starting at 2s, capped at 30s:\n * queueConfig: { maxRetries: 5, retryConfig: { baseDelayMs: 2000, maxDelayMs: 30000 } }\n */\nexport const QueueRetryBackoffConfigSchema = z.object({\n /** Base delay in ms — first retry / base of the exponential (or linear) curve. */\n baseDelayMs: z.number().int().min(100).optional(),\n /** Maximum delay cap in ms — prevents unbounded backoff on late attempts. */\n maxDelayMs: z.number().int().min(1000).optional(),\n /** Backoff curve: `fixed` | `linear` | `exponential`. Defaults to `exponential`. */\n retryPolicy: z.enum(RetryPolicy_BackoffType).optional(),\n});\n\nexport type QueueRetryBackoffConfig = z.infer<typeof QueueRetryBackoffConfigSchema>;\n\n// ============================================================================\n// JOB PAYLOAD SCHEMA (Transport - not a resource)\n// ============================================================================\n\n/**\n * Job payload for queue transport.\n *\n * Design notes:\n * - This is NOT a resource schema (used for RabbitMQ message transport)\n * - applicationId is needed for queue routing (not duplicated from context)\n * - operationPathKey is primary identifier, operationPathJson for execution\n * - executionContextJson carries full context for reconstruction\n * - org/user IDs are NOT duplicated - extract from executionContextJson if needed\n */\nexport const JobPayloadSchema = z.object({\n /** Unique job identifier */\n jobId: z.uuid(),\n\n /** Type of job being executed */\n jobType: z.enum(JobTypeValues),\n\n // === Application Routing ===\n /** Application ID for queue name construction */\n applicationId: z.string(),\n\n // === Operation Identification ===\n /** Primary key for lookup/matching (required for RESOURCE_OPERATION) */\n operationPathKey: z.string().optional(),\n /** Serialized ResourceConfiguration_OperationPath (required for RESOURCE_OPERATION) */\n operationPathJson: z.string().optional(),\n /** Custom batch reference (required for CUSTOM_BATCH) */\n batchRef: z.string().optional(),\n\n // === Execution Data ===\n // EITHER inline OR storage reference (mutually exclusive)\n /** JSON-stringified input data for small payloads (<100KB) */\n inputDataJson: z.string().optional(),\n /** Reference to JobPayloadStorage for large payloads */\n inputPayloadStorageId: z.uuid().optional(),\n /** Resource ID for READ/UPDATE/DELETE operations */\n inputId: z.string().optional(),\n\n // === Execution Context ===\n /**\n * Serialized execution context (reconstructed on worker side).\n * Optional for CUSTOM_BATCH and SCHEDULED_CRON (they create their own internal context).\n */\n executionContextJson: z.string().optional(),\n\n // === Job Source ===\n /** How the job was initiated */\n initiatedBy: z.enum(JobInitiatorValues).default(JobInitiator.API),\n\n // === Job Configuration ===\n /** Queue priority level */\n priority: z.enum(JobPriorityValues).default(JobPriority.NORMAL),\n /** Current retry attempt (0-indexed) */\n retryCount: z.number().int().min(0).default(0),\n /** Maximum retry attempts */\n maxRetries: z.number().int().min(0).default(3),\n /**\n * Backoff timing for retries (base delay, cap, curve). Resolved from the\n * operation's `queueConfig.retryConfig` at enqueue time (defaults applied), so\n * the worker can honor per-operation backoff without re-reading config. The\n * worker computes the delay from these values and holds the message in a\n * durable broker delay queue before redelivery — see `QueueRetryBackoffConfig`.\n */\n retryConfig: QueueRetryBackoffConfigSchema.optional(),\n /** Job execution timeout in milliseconds */\n timeoutMs: z.number().int().min(1000).default(300000),\n\n // === Timing ===\n /** When the job was created */\n createdAt: z.date(),\n /** When the job should be executed (for delayed jobs) */\n scheduledAt: z.date().optional(),\n\n // === RPC Support ===\n /**\n * RPC reply-matching id (QUEUED awaitable mode). A fresh uuid minted at enqueue time to correlate a\n * published job with its reply on the RPC reply queue — it is NOT a request trace id. Renamed from\n * `correlationId` when request→job traceability landed (Phase 6): the job now ALSO carries\n * `originCorrelationId` (the enqueuing request's trace id), and the two must never be conflated —\n * one matches a reply, the other joins the job to a distributed trace.\n */\n rpcReplyCorrelationId: z.uuid().optional(),\n /** Reply queue name for RPC pattern */\n replyTo: z.string().optional(),\n\n // === Traceability ===\n /**\n * The correlation id of the REQUEST that enqueued this job, carried onto the payload so the worker\n * that later executes it adopts the same id (see `adoptCorrelationIdIntoCurrentFrame`). This joins\n * the asynchronous job execution — its worker-side logs and audit rows — to the originating\n * request's distributed trace. Distinct from `rpcReplyCorrelationId` (reply matching) and from the\n * AMQP message `correlationId` property (wire-level reply routing). Absent for jobs with no\n * originating request (e.g. some system-enqueued work), in which case the worker mints a fresh id.\n */\n originCorrelationId: z.string().optional(),\n\n // === Domain Routing ===\n /** Domain category for domain-specific routing (e.g., 'email', 'agents') */\n domainCategory: z.string().optional(),\n});\n\nexport type JobPayload = z.infer<typeof JobPayloadSchema>;\n\n// ============================================================================\n// JOB PAYLOAD STORAGE SCHEMA (Resource)\n// ============================================================================\n\n/**\n * Default TTL for job payload storage in seconds (24 hours).\n * Large payloads are automatically deleted after this period.\n */\nexport const JOB_PAYLOAD_STORAGE_TTL_SECONDS = 24 * 60 * 60; // 24 hours\n\n/**\n * Schema for stored job payloads.\n * Used when payload exceeds PAYLOAD_SIZE_THRESHOLD_BYTES.\n *\n * Resource Design:\n * - Internal system resource, no frontend exposure\n * - All fields except storageId are backendOnly\n * - TTL: Documents are automatically deleted when expiresAt is reached\n */\nexport const JobPayloadStorageSchema = z.object({\n /** Document ID — auto-generated. `.isPrimaryKey()` is what makes the PostgreSQL planner emit the\n * PRIMARY KEY constraint (MongoDB enforces `_id` uniqueness implicitly); without it this table\n * shipped constraint-less on PostgreSQL. */\n _id: z.string().isPrimaryKey(),\n\n // === Reference (exposed for lookup) ===\n /** Storage ID (used in JobPayload.inputPayloadStorageId) */\n storageId: z.uuid().isUnique({ scope: 'global', sparse: false }),\n\n // === Application Context ===\n /** Application that owns this payload */\n applicationId: z.string().isDBIndexed().isBackendOnly(),\n\n // === Content (sensitive, backend-only) ===\n /** JSON-stringified payload - contains actual job data */\n payloadJson: z.string().isBackendOnly(),\n /** Size of the payload in bytes */\n payloadSizeBytes: z.number().int().positive().isBackendOnly(),\n\n // === Compression (internal implementation detail) ===\n /** Whether the payload is compressed */\n isCompressed: z.boolean().default(false).isBackendOnly(),\n /** Compression algorithm used */\n compressionType: z.enum(PayloadCompressionTypeValues).default(PayloadCompressionType.NONE).isBackendOnly(),\n\n // === Lifecycle ===\n /** When the payload was stored */\n createdAt: z.date().isDBIndexed(),\n /**\n * When the payload expires and can be cleaned up.\n * MongoDB TTL index will automatically delete documents at this time.\n */\n expiresAt: z.date().ttl({ expireAfterSeconds: 0 }),\n\n // === Reference Tracking (internal) ===\n /** Number of references to this payload (for cleanup) */\n referenceCount: z.number().int().min(0).default(1).isBackendOnly(),\n});\n\nexport type JobPayloadStorage = z.infer<typeof JobPayloadStorageSchema>;\n\n// ============================================================================\n// JOB RESULT SCHEMA (Transport - not a resource)\n// ============================================================================\n\n/**\n * Job execution result.\n * Returned to callers via RPC reply queue or callback dispatch.\n *\n * This is NOT a resource schema (used for RabbitMQ message transport)\n */\nexport const JobResultSchema = z.object({\n /** Job identifier */\n jobId: z.uuid(),\n\n /** Final status of the job */\n status: z.enum(JobStatusValues),\n\n // === Success Result ===\n // EITHER inline OR storage reference (mutually exclusive)\n /** JSON-stringified result data for small results */\n resultJson: z.string().optional(),\n /** Reference to JobPayloadStorage for large results */\n resultPayloadStorageId: z.uuid().optional(),\n\n // === Error Info ===\n /** Error information if job failed (uses backend error schema with full error details) */\n error: WildoError_BackendSchema.optional(),\n\n // === Timing ===\n /** When job execution started */\n startedAt: z.date(),\n /** When job execution completed */\n completedAt: z.date().optional(),\n /** Execution duration in milliseconds */\n durationMs: z.number().int().optional(),\n});\n\nexport type JobResult = z.infer<typeof JobResultSchema>;\n\n// ============================================================================\n// JOB EXECUTION TRACKING SCHEMA (Resource)\n// ============================================================================\n\n/**\n * Default TTL for job execution records in seconds (30 days).\n * Completed/failed jobs are automatically deleted after this period.\n */\nexport const JOB_EXECUTION_TTL_SECONDS = 30 * 24 * 60 * 60; // 30 days\n\n/**\n * Job execution tracking record.\n *\n * Resource Design:\n * - Internal system resource for job lifecycle tracking\n * - Queryable fields (jobId, status, organizationId, userId) are exposed\n * - Sensitive/internal fields are marked .isBackendOnly()\n * - TTL: Documents are automatically deleted 30 days after creation\n * - Proper indexes for dashboard/monitoring queries\n */\nexport const JobExecutionSchema = z.object({\n /** Document ID — auto-generated. `.isPrimaryKey()` is what makes the PostgreSQL planner emit the\n * PRIMARY KEY constraint (MongoDB enforces `_id` uniqueness implicitly); without it this table\n * shipped constraint-less on PostgreSQL. */\n _id: z.string().isPrimaryKey(),\n\n // === Job Identity (exposed for queries) ===\n /** Unique job identifier */\n jobId: z.uuid().isUnique({ scope: 'global', sparse: false }),\n /** Application that owns this job */\n applicationId: z.string().isDBIndexed(),\n\n // === What Was Executed (exposed for filtering) ===\n /** Type of job */\n jobType: z.enum(JobTypeValues).isDBIndexed(),\n /** Operation path key for resource operations */\n operationPathKey: z.string().optional(),\n /** Batch reference for custom batches */\n batchRef: z.string().optional(),\n /** Domain category for domain jobs (email, agents, etc.) */\n domainCategory: z.string().isDBIndexed().optional(),\n\n // === Context (exposed for org/user filtering) ===\n /** Organization ID from execution context */\n organizationId: z.string().isDBIndexed().optional(),\n /** User ID from execution context */\n userId: z.string().isDBIndexed().optional(),\n /** How the job was initiated */\n initiatedBy: z.enum(JobInitiatorValues),\n\n // === Execution State (exposed for monitoring) ===\n /** Current status */\n status: z.enum(JobExecutionStatusValues).isDBIndexed(),\n /** Queue name where job was published */\n queueName: z.string().isDBIndexed(),\n /** Queue priority */\n priority: z.enum(JobPriorityValues),\n\n // === Retry Tracking (exposed for retry monitoring) ===\n /** Current retry attempt (0-indexed) */\n retryCount: z.number().int().min(0).default(0),\n /** Maximum retry attempts */\n maxRetries: z.number().int().min(0),\n /** When the last retry was attempted */\n lastRetryAt: z.date().optional(),\n\n // === Timing (exposed for performance monitoring) ===\n /**\n * When the job record was created. TTL cleanup after 30 days.\n *\n * `.default(() => new Date())` is REQUIRED, not decorative: this is a\n * system-managed timestamp that the create pipeline strips from the input\n * before validation (like every other `createdAt`). Without a default, the\n * create-DTO date-coercion (`z.date()` → `z.coerce.date()`) then coerces the\n * now-`undefined` value → `new Date(undefined)` = Invalid Date → the create\n * FATALs with `createdAt: expected date, received Date`. The default supplies\n * a valid Date when the field is absent, matching the canonical timestamp\n * pattern (`z.date().default(() => new Date())` on todos/tasks/etc.). TTL must\n * stay BEFORE `.default()` — its allowed types are `[ZodDate, ZodOptional]`,\n * not `ZodDefault`.\n */\n createdAt: z.date().ttl({ expireAfterSeconds: JOB_EXECUTION_TTL_SECONDS }).default(() => new Date()),\n /** When the job was published to queue */\n queuedAt: z.date().optional(),\n /** When worker started processing */\n startedAt: z.date().optional(),\n /** When execution completed (success or failure) */\n completedAt: z.date().isDBIndexed().optional(),\n /** Execution duration in milliseconds */\n durationMs: z.number().int().optional(),\n\n // === Payload References (backend-only, internal implementation) ===\n /** Reference to input payload storage */\n inputPayloadStorageId: z.uuid().isBackendOnly().optional(),\n /** Reference to output payload storage */\n outputPayloadStorageId: z.uuid().isBackendOnly().optional(),\n\n // === Error Info (exposed for error analysis) ===\n /** Error information if job failed (uses backend error schema with full error details) */\n error: WildoError_BackendSchema.optional(),\n\n // === Worker Info (backend-only, debugging only) ===\n /** Pod/worker ID that processed this job */\n workerId: z.string().isBackendOnly().optional(),\n /** Hostname of the worker (for debugging) */\n workerHostname: z.string().isBackendOnly().optional(),\n});\n\nexport type JobExecution = z.infer<typeof JobExecutionSchema>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs.shared.utils.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"jobs.shared.utils.d.ts","sourceRoot":"","sources":["../../../src/queue/jobs.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EACL,UAAU,EACV,SAAS,EACT,kBAAkB,EAGnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAwB,MAAM,yBAAyB,CAAC;AAMjF;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,uBAAuB,CAAC;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAMlC,CAAC;AAEF;;GAEG;AACH,qBAAa,aAAa;IACxB;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,gBAAgB,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM;IAmBtF;;;;;;OAMG;IACH,MAAM,CAAC,oBAAoB,CAAC,MAAM,EAAE,WAAW,GAAG,gBAAgB,G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AAG,OAAO;IASjE;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,SAAS,GAAG,kBAAkB,GAAG,OAAO;IAapE;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,SAAS,GAAG,kBAAkB,GAAG,OAAO;IAIlE;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,SAAS,GAAG,kBAAkB,GAAG,OAAO;IAInE;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,SAAS,GAAG,kBAAkB,GAAG,OAAO;IAIpE;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,SAAS,GAAG,kBAAkB,GAAG,MAAM;IA+BrE;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,aAAa,EAAE,SAAS,GAAG,kBAAkB,GAAG,CAAC,SAAS,GAAG,kBAAkB,CAAC,EAAE;IA8B7G;;OAEG;IACH,MAAM,CAAC,iBAAiB,CACtB,UAAU,EAAE,SAAS,GAAG,kBAAkB,EAC1C,QAAQ,EAAE,SAAS,GAAG,kBAAkB,GACvC,OAAO;CAIX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queues.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"queues.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/queue/queues.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAClG,OAAO,EAAE,WAAW,EAAiC,MAAM,uBAAuB,CAAC;AAMnF;;GAEG;AACH,oBAAY,iBAAiB;IAC3B,2EAA2E;IAC3E,MAAM,WAAW;IACjB,yFAAyF;IACzF,SAAS,cAAc;IACvB,2FAA2F;IAC3F,SAAS,cAAc;CACxB;AAED;;GAEG;AACH,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;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAE9E;AAMD;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;iBAmC7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;iBAepC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;iBAwBnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queues.shared.utils.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"queues.shared.utils.d.ts","sourceRoot":"","sources":["../../../src/queue/queues.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,gBAAgB,EAAwB,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAM/F;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,gBAAgB;IAC3B;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,cAAc,CACnB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,YAAY,GACrB,MAAM;IAKT;;;;;OAKG;IACH,MAAM,CAAC,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM;IAmB3F;;;;OAIG;IACH,MAAM,CAAC,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM;IAIt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K,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAE9E;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEpF;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAElF;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAiBrF;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAO1E;AAMD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,gEAAgE;AAChE,MAAM,WAAW,0BAA0B;IACzC,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,QAAQ,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,0BAA0B,GAAG,MAAM,CAUpF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manual-controllers-routes-documentation.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"manual-controllers-routes-documentation.d.ts","sourceRoot":"","sources":["../../../src/requests/manual-controllers-routes-documentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;A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QAAQ,CAAC,WAAW,EAAE,gCAAgC,CAAC,QAAQ,CAAC;IAChE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,MAAM,kCAAkC,GAC1C,2CAA2C,GAC3C,0CAA0C,CAAC;AAoB/C,gGAAgG;AAChG,eAAO,MAAM,0CAA0C,EAAE,MAAM,CAAC,0BAA0B,EAAE,MAAM,CAuBjG,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,qCAAqC,EAAE,MAAM,CAAC,wBAAwB,EAAE,kCAAkC,CAssCtH,CAAC"}
|
|
@@ -748,6 +748,18 @@ export const MANUAL_CONTROLLER_ROUTE_DOCUMENTATION = {
|
|
|
748
748
|
authenticationSummary: BEARER_CREDENTIAL,
|
|
749
749
|
successStatus: ok('The session is ended, with the identity provider\'s logout location when there is one.'),
|
|
750
750
|
},
|
|
751
|
+
[ManualControllerRouteKey.AUTH_OIDC_LOGOUT]: {
|
|
752
|
+
publication: ManualControllerRoutePublication.PUBLISHED,
|
|
753
|
+
group: AUTH,
|
|
754
|
+
methods: [HttpMethod.POST],
|
|
755
|
+
summary: 'End my enterprise OIDC session',
|
|
756
|
+
description: 'Ends the caller\'s session here and, when the connection is configured for it, hands back where to redirect so the '
|
|
757
|
+
+ 'identity-provider session ends too. Without this a person who signs out is still signed in at their provider, so the '
|
|
758
|
+
+ 'next sign-in is silent. The OIDC counterpart of **End my SAML session**.',
|
|
759
|
+
authentication: BEARER,
|
|
760
|
+
authenticationSummary: BEARER_CREDENTIAL,
|
|
761
|
+
successStatus: ok('The session is ended, with the identity provider\'s logout location when the connection has one.'),
|
|
762
|
+
},
|
|
751
763
|
// ─── Sessions that cross a boundary ──────────────────────────────────────────────────────────
|
|
752
764
|
[ManualControllerRouteKey.AUTH_CROSS_FRONTEND_HANDOFF]: {
|
|
753
765
|
publication: ManualControllerRoutePublication.PUBLISHED,
|
|
@@ -975,13 +987,40 @@ export const MANUAL_CONTROLLER_ROUTE_DOCUMENTATION = {
|
|
|
975
987
|
group: CONNECTIONS,
|
|
976
988
|
methods: [HttpMethod.GET],
|
|
977
989
|
summary: 'Third-party connection callback',
|
|
978
|
-
description: 'Where a provider returns after the person authorizes the connection
|
|
990
|
+
description: 'Where a provider returns after the person authorizes the connection. **You do not call '
|
|
979
991
|
+ 'this** — it is the redirect URI to register with the vendor. ONE address serves every provider, keyed by the state '
|
|
980
992
|
+ 'parameter, because a redirect URI must be registered before it is accepted and a path per provider would mean '
|
|
981
|
-
+ 'registering one per vendor, per environment, by hand.'
|
|
993
|
+
+ 'registering one per vendor, per environment, by hand. It authenticates nobody and exchanges nothing: a redirect '
|
|
994
|
+
+ 'carries no bearer token, so it hands the approval back to the application, which finishes it as the signed-in person.',
|
|
982
995
|
authentication: PUBLIC,
|
|
983
996
|
authenticationSummary: 'No credential. The single-use state parameter identifies the attempt and defends against CSRF.',
|
|
984
|
-
successStatus: { code: '302', meaning: 'The
|
|
997
|
+
successStatus: { code: '302', meaning: 'The browser continues into the application, carrying the approval for it to finish.' },
|
|
998
|
+
},
|
|
999
|
+
[ManualControllerRouteKey.PROVIDER_CONNECTION_COMPLETE]: {
|
|
1000
|
+
publication: ManualControllerRoutePublication.PUBLISHED,
|
|
1001
|
+
group: CONNECTIONS,
|
|
1002
|
+
methods: [HttpMethod.POST],
|
|
1003
|
+
summary: 'Finish a connection the provider has approved',
|
|
1004
|
+
description: 'Exchanges an approval the vendor just granted for a stored grant. The application calls this on the person\u2019s behalf '
|
|
1005
|
+
+ 'when they return from the vendor; the callback cannot, because a redirect carries no credential and so cannot tell '
|
|
1006
|
+
+ 'who is finishing the flow. The attempt is consumed here, once and atomically, and is only completed for the same '
|
|
1007
|
+
+ 'person who began it \u2014 so an approval somebody else obtained cannot be redeemed against their target.',
|
|
1008
|
+
authentication: BEARER,
|
|
1009
|
+
authenticationSummary: BEARER_CREDENTIAL,
|
|
1010
|
+
successStatus: ok('The connection outcome, and the provider it was stored for.'),
|
|
1011
|
+
},
|
|
1012
|
+
[ManualControllerRouteKey.PROVIDER_CONNECTION_STORE_CREDENTIAL]: {
|
|
1013
|
+
publication: ManualControllerRoutePublication.PUBLISHED,
|
|
1014
|
+
group: CONNECTIONS,
|
|
1015
|
+
methods: [HttpMethod.POST],
|
|
1016
|
+
summary: 'Store a typed credential for a provider',
|
|
1017
|
+
description: 'For a vendor whose credential is TYPED rather than granted. Takes one value per slot the provider declares as '
|
|
1018
|
+
+ 'identifying an account, and refuses any name the provider did not declare — so a caller cannot invent a slot, '
|
|
1019
|
+
+ 'and cannot write an account token into the slot holding the application\u2019s own registration. Values are '
|
|
1020
|
+
+ 'sealed by the write door; the request is the only place they exist in plaintext.',
|
|
1021
|
+
authentication: BEARER,
|
|
1022
|
+
authenticationSummary: BEARER_CREDENTIAL,
|
|
1023
|
+
successStatus: ok('The stored credential ids, one per slot supplied.'),
|
|
985
1024
|
},
|
|
986
1025
|
[ManualControllerRouteKey.PROVIDER_CONNECTION_CATALOGUE]: {
|
|
987
1026
|
publication: ManualControllerRoutePublication.PUBLISHED,
|
|
@@ -996,6 +1035,21 @@ export const MANUAL_CONTROLLER_ROUTE_DOCUMENTATION = {
|
|
|
996
1035
|
authenticationSummary: BEARER_CREDENTIAL,
|
|
997
1036
|
successStatus: ok('The connectable providers, each with its admissible owner scopes.'),
|
|
998
1037
|
},
|
|
1038
|
+
[ManualControllerRouteKey.PROVIDER_CONNECTION_ACCESS_TOKEN]: {
|
|
1039
|
+
publication: ManualControllerRoutePublication.PUBLISHED,
|
|
1040
|
+
group: CONNECTIONS,
|
|
1041
|
+
methods: [HttpMethod.GET],
|
|
1042
|
+
summary: 'A short-lived access token for your own connected account',
|
|
1043
|
+
description: 'Resolves the caller\u2019s OWN grant for a provider and returns its access token, renewed if the vendor\u2019s expiry '
|
|
1044
|
+
+ 'has passed \u2014 the one credential a browser may be handed, because a vendor\u2019s own picker authorizes as the '
|
|
1045
|
+
+ 'signed-in user and cannot open without it. Never the refresh token; never another owner\u2019s account. Each '
|
|
1046
|
+
+ 'hand-out is recorded as a USE of the credential, so revoking or erasing the connection is visible against '
|
|
1047
|
+
+ 'every token that left the process. Answers 404 when nothing is connected, so a surface can offer the connection '
|
|
1048
|
+
+ 'rather than open a picker on nobody\u2019s files.',
|
|
1049
|
+
authentication: BEARER,
|
|
1050
|
+
authenticationSummary: BEARER_CREDENTIAL,
|
|
1051
|
+
successStatus: ok('The access token, with its expiry and granted scopes when the vendor stated them.'),
|
|
1052
|
+
},
|
|
999
1053
|
// ─── Agent interfaces ────────────────────────────────────────────────────────────────────────
|
|
1000
1054
|
[ManualControllerRouteKey.MCP_ENDPOINT]: {
|
|
1001
1055
|
publication: ManualControllerRoutePublication.PUBLISHED,
|