@aws/durable-execution-sdk-js 0.0.1 → 1.0.1
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/README.md +365 -0
- package/dist/index.mjs +4628 -0
- package/dist/index.mjs.map +1 -0
- package/dist-cjs/index.js +4646 -0
- package/dist-cjs/index.js.map +1 -0
- package/dist-types/context/durable-context/durable-context.d.ts +70 -0
- package/dist-types/context/durable-context/durable-context.d.ts.map +1 -0
- package/dist-types/context/durable-context/durable-context.integration.test.d.ts +2 -0
- package/dist-types/context/durable-context/durable-context.integration.test.d.ts.map +1 -0
- package/dist-types/context/durable-context/durable-context.unit.test.d.ts +2 -0
- package/dist-types/context/durable-context/durable-context.unit.test.d.ts.map +1 -0
- package/dist-types/context/durable-context/logger-mode-aware.test.d.ts +2 -0
- package/dist-types/context/durable-context/logger-mode-aware.test.d.ts.map +1 -0
- package/dist-types/context/durable-context/logger-property.test.d.ts +2 -0
- package/dist-types/context/durable-context/logger-property.test.d.ts.map +1 -0
- package/dist-types/context/durable-context/mode-management/mode-management.d.ts +13 -0
- package/dist-types/context/durable-context/mode-management/mode-management.d.ts.map +1 -0
- package/dist-types/context/durable-context/mode-management/mode-management.test.d.ts +2 -0
- package/dist-types/context/durable-context/mode-management/mode-management.test.d.ts.map +1 -0
- package/dist-types/context/execution-context/execution-context.d.ts +9 -0
- package/dist-types/context/execution-context/execution-context.d.ts.map +1 -0
- package/dist-types/context/execution-context/execution-context.test.d.ts +2 -0
- package/dist-types/context/execution-context/execution-context.test.d.ts.map +1 -0
- package/dist-types/durable-execution-api-client/durable-execution-api-client-caching.test.d.ts +2 -0
- package/dist-types/durable-execution-api-client/durable-execution-api-client-caching.test.d.ts.map +1 -0
- package/dist-types/durable-execution-api-client/durable-execution-api-client.d.ts +29 -0
- package/dist-types/durable-execution-api-client/durable-execution-api-client.d.ts.map +1 -0
- package/dist-types/durable-execution-api-client/durable-execution-api-client.test.d.ts +2 -0
- package/dist-types/durable-execution-api-client/durable-execution-api-client.test.d.ts.map +1 -0
- package/dist-types/errors/callback-error/callback-error.test.d.ts +2 -0
- package/dist-types/errors/callback-error/callback-error.test.d.ts.map +1 -0
- package/dist-types/errors/checkpoint-errors/checkpoint-errors.d.ts +21 -0
- package/dist-types/errors/checkpoint-errors/checkpoint-errors.d.ts.map +1 -0
- package/dist-types/errors/checkpoint-errors/checkpoint-errors.test.d.ts +2 -0
- package/dist-types/errors/checkpoint-errors/checkpoint-errors.test.d.ts.map +1 -0
- package/dist-types/errors/durable-error/durable-error-coverage.test.d.ts +2 -0
- package/dist-types/errors/durable-error/durable-error-coverage.test.d.ts.map +1 -0
- package/dist-types/errors/durable-error/durable-error.d.ts +61 -0
- package/dist-types/errors/durable-error/durable-error.d.ts.map +1 -0
- package/dist-types/errors/durable-error/durable-error.test.d.ts +2 -0
- package/dist-types/errors/durable-error/durable-error.test.d.ts.map +1 -0
- package/dist-types/errors/durable-error/error-determinism.integration.test.d.ts +2 -0
- package/dist-types/errors/durable-error/error-determinism.integration.test.d.ts.map +1 -0
- package/dist-types/errors/non-deterministic-error/non-deterministic-error.d.ts +10 -0
- package/dist-types/errors/non-deterministic-error/non-deterministic-error.d.ts.map +1 -0
- package/dist-types/errors/serdes-errors/serdes-errors.d.ts +27 -0
- package/dist-types/errors/serdes-errors/serdes-errors.d.ts.map +1 -0
- package/dist-types/errors/serdes-errors/serdes-errors.test.d.ts +2 -0
- package/dist-types/errors/serdes-errors/serdes-errors.test.d.ts.map +1 -0
- package/dist-types/errors/step-errors/step-errors.d.ts +9 -0
- package/dist-types/errors/step-errors/step-errors.d.ts.map +1 -0
- package/dist-types/errors/unrecoverable-error/unrecoverable-error.d.ts +41 -0
- package/dist-types/errors/unrecoverable-error/unrecoverable-error.d.ts.map +1 -0
- package/dist-types/errors/unrecoverable-error/unrecoverable-error.test.d.ts +2 -0
- package/dist-types/errors/unrecoverable-error/unrecoverable-error.test.d.ts.map +1 -0
- package/dist-types/handlers/callback-handler/callback-promise.d.ts +5 -0
- package/dist-types/handlers/callback-handler/callback-promise.d.ts.map +1 -0
- package/dist-types/handlers/callback-handler/callback-promise.test.d.ts +2 -0
- package/dist-types/handlers/callback-handler/callback-promise.test.d.ts.map +1 -0
- package/dist-types/handlers/callback-handler/callback.d.ts +6 -0
- package/dist-types/handlers/callback-handler/callback.d.ts.map +1 -0
- package/dist-types/handlers/callback-handler/callback.test.d.ts +2 -0
- package/dist-types/handlers/callback-handler/callback.test.d.ts.map +1 -0
- package/dist-types/handlers/concurrent-execution-handler/batch-result.d.ts +35 -0
- package/dist-types/handlers/concurrent-execution-handler/batch-result.d.ts.map +1 -0
- package/dist-types/handlers/concurrent-execution-handler/batch-result.test.d.ts +2 -0
- package/dist-types/handlers/concurrent-execution-handler/batch-result.test.d.ts.map +1 -0
- package/dist-types/handlers/concurrent-execution-handler/concurrent-execution-handler-two-phase.test.d.ts +2 -0
- package/dist-types/handlers/concurrent-execution-handler/concurrent-execution-handler-two-phase.test.d.ts.map +1 -0
- package/dist-types/handlers/concurrent-execution-handler/concurrent-execution-handler.d.ts +13 -0
- package/dist-types/handlers/concurrent-execution-handler/concurrent-execution-handler.d.ts.map +1 -0
- package/dist-types/handlers/concurrent-execution-handler/concurrent-execution-handler.integration.test.d.ts +2 -0
- package/dist-types/handlers/concurrent-execution-handler/concurrent-execution-handler.integration.test.d.ts.map +1 -0
- package/dist-types/handlers/concurrent-execution-handler/concurrent-execution-handler.replay.test.d.ts +2 -0
- package/dist-types/handlers/concurrent-execution-handler/concurrent-execution-handler.replay.test.d.ts.map +1 -0
- package/dist-types/handlers/concurrent-execution-handler/concurrent-execution-handler.test.d.ts +2 -0
- package/dist-types/handlers/concurrent-execution-handler/concurrent-execution-handler.test.d.ts.map +1 -0
- package/dist-types/handlers/invoke-handler/invoke-handler-two-phase.test.d.ts +2 -0
- package/dist-types/handlers/invoke-handler/invoke-handler-two-phase.test.d.ts.map +1 -0
- package/dist-types/handlers/invoke-handler/invoke-handler.d.ts +7 -0
- package/dist-types/handlers/invoke-handler/invoke-handler.d.ts.map +1 -0
- package/dist-types/handlers/invoke-handler/invoke-handler.test.d.ts +2 -0
- package/dist-types/handlers/invoke-handler/invoke-handler.test.d.ts.map +1 -0
- package/dist-types/handlers/map-handler/map-handler-two-phase.test.d.ts +2 -0
- package/dist-types/handlers/map-handler/map-handler-two-phase.test.d.ts.map +1 -0
- package/dist-types/handlers/map-handler/map-handler.d.ts +3 -0
- package/dist-types/handlers/map-handler/map-handler.d.ts.map +1 -0
- package/dist-types/handlers/map-handler/map-handler.test.d.ts +2 -0
- package/dist-types/handlers/map-handler/map-handler.test.d.ts.map +1 -0
- package/dist-types/handlers/parallel-handler/parallel-handler-two-phase.test.d.ts +2 -0
- package/dist-types/handlers/parallel-handler/parallel-handler-two-phase.test.d.ts.map +1 -0
- package/dist-types/handlers/parallel-handler/parallel-handler.d.ts +3 -0
- package/dist-types/handlers/parallel-handler/parallel-handler.d.ts.map +1 -0
- package/dist-types/handlers/parallel-handler/parallel-handler.test.d.ts +2 -0
- package/dist-types/handlers/parallel-handler/parallel-handler.test.d.ts.map +1 -0
- package/dist-types/handlers/promise-handler/promise-handler.d.ts +8 -0
- package/dist-types/handlers/promise-handler/promise-handler.d.ts.map +1 -0
- package/dist-types/handlers/promise-handler/promise-handler.test.d.ts +2 -0
- package/dist-types/handlers/promise-handler/promise-handler.test.d.ts.map +1 -0
- package/dist-types/handlers/run-in-child-context-handler/run-in-child-context-handler-two-phase.test.d.ts +2 -0
- package/dist-types/handlers/run-in-child-context-handler/run-in-child-context-handler-two-phase.test.d.ts.map +1 -0
- package/dist-types/handlers/run-in-child-context-handler/run-in-child-context-handler.d.ts +10 -0
- package/dist-types/handlers/run-in-child-context-handler/run-in-child-context-handler.d.ts.map +1 -0
- package/dist-types/handlers/run-in-child-context-handler/run-in-child-context-handler.test.d.ts +2 -0
- package/dist-types/handlers/run-in-child-context-handler/run-in-child-context-handler.test.d.ts.map +1 -0
- package/dist-types/handlers/run-in-child-context-handler/run-in-child-context-integration.test.d.ts +2 -0
- package/dist-types/handlers/run-in-child-context-handler/run-in-child-context-integration.test.d.ts.map +1 -0
- package/dist-types/handlers/step-handler/step-handler-two-phase.test.d.ts +2 -0
- package/dist-types/handlers/step-handler/step-handler-two-phase.test.d.ts.map +1 -0
- package/dist-types/handlers/step-handler/step-handler.d.ts +6 -0
- package/dist-types/handlers/step-handler/step-handler.d.ts.map +1 -0
- package/dist-types/handlers/step-handler/step-handler.test.d.ts +2 -0
- package/dist-types/handlers/step-handler/step-handler.test.d.ts.map +1 -0
- package/dist-types/handlers/step-handler/step-handler.timing.test.d.ts +2 -0
- package/dist-types/handlers/step-handler/step-handler.timing.test.d.ts.map +1 -0
- package/dist-types/handlers/wait-for-callback-handler/wait-for-callback-handler.d.ts +3 -0
- package/dist-types/handlers/wait-for-callback-handler/wait-for-callback-handler.d.ts.map +1 -0
- package/dist-types/handlers/wait-for-callback-handler/wait-for-callback-handler.test.d.ts +2 -0
- package/dist-types/handlers/wait-for-callback-handler/wait-for-callback-handler.test.d.ts.map +1 -0
- package/dist-types/handlers/wait-for-condition-handler/wait-for-condition-handler-two-phase.test.d.ts +2 -0
- package/dist-types/handlers/wait-for-condition-handler/wait-for-condition-handler-two-phase.test.d.ts.map +1 -0
- package/dist-types/handlers/wait-for-condition-handler/wait-for-condition-handler.d.ts +5 -0
- package/dist-types/handlers/wait-for-condition-handler/wait-for-condition-handler.d.ts.map +1 -0
- package/dist-types/handlers/wait-for-condition-handler/wait-for-condition-handler.test.d.ts +2 -0
- package/dist-types/handlers/wait-for-condition-handler/wait-for-condition-handler.test.d.ts.map +1 -0
- package/dist-types/handlers/wait-for-condition-handler/wait-for-condition-handler.timing.test.d.ts +2 -0
- package/dist-types/handlers/wait-for-condition-handler/wait-for-condition-handler.timing.test.d.ts.map +1 -0
- package/dist-types/handlers/wait-handler/wait-handler-comparison.test.d.ts +2 -0
- package/dist-types/handlers/wait-handler/wait-handler-comparison.test.d.ts.map +1 -0
- package/dist-types/handlers/wait-handler/wait-handler-two-phase.test.d.ts +2 -0
- package/dist-types/handlers/wait-handler/wait-handler-two-phase.test.d.ts.map +1 -0
- package/dist-types/handlers/wait-handler/wait-handler.d.ts +8 -0
- package/dist-types/handlers/wait-handler/wait-handler.d.ts.map +1 -0
- package/dist-types/handlers/wait-handler/wait-handler.test.d.ts +2 -0
- package/dist-types/handlers/wait-handler/wait-handler.test.d.ts.map +1 -0
- package/dist-types/index.d.ts +12 -0
- package/dist-types/index.d.ts.map +1 -0
- package/dist-types/run-durable.d.ts +2 -0
- package/dist-types/run-durable.d.ts.map +1 -0
- package/dist-types/termination-manager/termination-manager-checkpoint.test.d.ts +2 -0
- package/dist-types/termination-manager/termination-manager-checkpoint.test.d.ts.map +1 -0
- package/dist-types/termination-manager/termination-manager.d.ts +15 -0
- package/dist-types/termination-manager/termination-manager.d.ts.map +1 -0
- package/dist-types/termination-manager/termination-manager.test.d.ts +2 -0
- package/dist-types/termination-manager/termination-manager.test.d.ts.map +1 -0
- package/dist-types/termination-manager/types.d.ts +26 -0
- package/dist-types/termination-manager/types.d.ts.map +1 -0
- package/dist-types/testing/create-test-checkpoint-manager.d.ts +5 -0
- package/dist-types/testing/create-test-checkpoint-manager.d.ts.map +1 -0
- package/dist-types/testing/create-test-durable-context.d.ts +32 -0
- package/dist-types/testing/create-test-durable-context.d.ts.map +1 -0
- package/dist-types/testing/mock-batch-result.d.ts +26 -0
- package/dist-types/testing/mock-batch-result.d.ts.map +1 -0
- package/dist-types/testing/mock-checkpoint-manager.d.ts +20 -0
- package/dist-types/testing/mock-checkpoint-manager.d.ts.map +1 -0
- package/dist-types/testing/mock-checkpoint.d.ts +13 -0
- package/dist-types/testing/mock-checkpoint.d.ts.map +1 -0
- package/dist-types/testing/mock-context.d.ts +10 -0
- package/dist-types/testing/mock-context.d.ts.map +1 -0
- package/dist-types/testing/test-constants.d.ts +59 -0
- package/dist-types/testing/test-constants.d.ts.map +1 -0
- package/dist-types/types/batch.d.ts +185 -0
- package/dist-types/types/batch.d.ts.map +1 -0
- package/dist-types/types/callback.d.ts +48 -0
- package/dist-types/types/callback.d.ts.map +1 -0
- package/dist-types/types/child-context.d.ts +24 -0
- package/dist-types/types/child-context.d.ts.map +1 -0
- package/dist-types/types/core.d.ts +313 -0
- package/dist-types/types/core.d.ts.map +1 -0
- package/dist-types/types/durable-context.d.ts +669 -0
- package/dist-types/types/durable-context.d.ts.map +1 -0
- package/dist-types/types/durable-execution.d.ts +192 -0
- package/dist-types/types/durable-execution.d.ts.map +1 -0
- package/dist-types/types/durable-logger.d.ts +69 -0
- package/dist-types/types/durable-logger.d.ts.map +1 -0
- package/dist-types/types/durable-promise.d.ts +80 -0
- package/dist-types/types/durable-promise.d.ts.map +1 -0
- package/dist-types/types/index.d.ts +15 -0
- package/dist-types/types/index.d.ts.map +1 -0
- package/dist-types/types/invoke.d.ts +12 -0
- package/dist-types/types/invoke.d.ts.map +1 -0
- package/dist-types/types/logger.d.ts +63 -0
- package/dist-types/types/logger.d.ts.map +1 -0
- package/dist-types/types/operation-lifecycle-state.d.ts +27 -0
- package/dist-types/types/operation-lifecycle-state.d.ts.map +1 -0
- package/dist-types/types/operation-lifecycle.d.ts +27 -0
- package/dist-types/types/operation-lifecycle.d.ts.map +1 -0
- package/dist-types/types/step.d.ts +76 -0
- package/dist-types/types/step.d.ts.map +1 -0
- package/dist-types/types/wait-condition.d.ts +46 -0
- package/dist-types/types/wait-condition.d.ts.map +1 -0
- package/dist-types/utils/checkpoint/checkpoint-ancestor.test.d.ts +2 -0
- package/dist-types/utils/checkpoint/checkpoint-ancestor.test.d.ts.map +1 -0
- package/dist-types/utils/checkpoint/checkpoint-central-termination.test.d.ts +2 -0
- package/dist-types/utils/checkpoint/checkpoint-central-termination.test.d.ts.map +1 -0
- package/dist-types/utils/checkpoint/checkpoint-error-classification.test.d.ts +2 -0
- package/dist-types/utils/checkpoint/checkpoint-error-classification.test.d.ts.map +1 -0
- package/dist-types/utils/checkpoint/checkpoint-helper.d.ts +47 -0
- package/dist-types/utils/checkpoint/checkpoint-helper.d.ts.map +1 -0
- package/dist-types/utils/checkpoint/checkpoint-integration.test.d.ts +2 -0
- package/dist-types/utils/checkpoint/checkpoint-integration.test.d.ts.map +1 -0
- package/dist-types/utils/checkpoint/checkpoint-manager.d.ts +78 -0
- package/dist-types/utils/checkpoint/checkpoint-manager.d.ts.map +1 -0
- package/dist-types/utils/checkpoint/checkpoint-queue-completion.test.d.ts +2 -0
- package/dist-types/utils/checkpoint/checkpoint-queue-completion.test.d.ts.map +1 -0
- package/dist-types/utils/checkpoint/checkpoint-stepdata-update.test.d.ts +2 -0
- package/dist-types/utils/checkpoint/checkpoint-stepdata-update.test.d.ts.map +1 -0
- package/dist-types/utils/checkpoint/checkpoint-termination.test.d.ts +2 -0
- package/dist-types/utils/checkpoint/checkpoint-termination.test.d.ts.map +1 -0
- package/dist-types/utils/checkpoint/checkpoint.test.d.ts +2 -0
- package/dist-types/utils/checkpoint/checkpoint.test.d.ts.map +1 -0
- package/dist-types/utils/constants/constants.d.ts +9 -0
- package/dist-types/utils/constants/constants.d.ts.map +1 -0
- package/dist-types/utils/context-tracker/context-tracker.d.ts +13 -0
- package/dist-types/utils/context-tracker/context-tracker.d.ts.map +1 -0
- package/dist-types/utils/context-tracker/context-tracker.test.d.ts +2 -0
- package/dist-types/utils/context-tracker/context-tracker.test.d.ts.map +1 -0
- package/dist-types/utils/durable-execution-invocation-input/durable-execution-invocation-input.d.ts +22 -0
- package/dist-types/utils/durable-execution-invocation-input/durable-execution-invocation-input.d.ts.map +1 -0
- package/dist-types/utils/durable-execution-invocation-input/durable-execution-invocation-input.test.d.ts +2 -0
- package/dist-types/utils/durable-execution-invocation-input/durable-execution-invocation-input.test.d.ts.map +1 -0
- package/dist-types/utils/duration/duration.d.ts +8 -0
- package/dist-types/utils/duration/duration.d.ts.map +1 -0
- package/dist-types/utils/duration/duration.test.d.ts +2 -0
- package/dist-types/utils/duration/duration.test.d.ts.map +1 -0
- package/dist-types/utils/error-object/error-object-coverage.test.d.ts +2 -0
- package/dist-types/utils/error-object/error-object-coverage.test.d.ts.map +1 -0
- package/dist-types/utils/error-object/error-object.d.ts +3 -0
- package/dist-types/utils/error-object/error-object.d.ts.map +1 -0
- package/dist-types/utils/error-object/error-object.test.d.ts +2 -0
- package/dist-types/utils/error-object/error-object.test.d.ts.map +1 -0
- package/dist-types/utils/logger/default-logger.d.ts +51 -0
- package/dist-types/utils/logger/default-logger.d.ts.map +1 -0
- package/dist-types/utils/logger/default-logger.test.d.ts +2 -0
- package/dist-types/utils/logger/default-logger.test.d.ts.map +1 -0
- package/dist-types/utils/logger/logger.d.ts +2 -0
- package/dist-types/utils/logger/logger.d.ts.map +1 -0
- package/dist-types/utils/logger/logger.test.d.ts +2 -0
- package/dist-types/utils/logger/logger.test.d.ts.map +1 -0
- package/dist-types/utils/logger/structured-logger-integration.test.d.ts +2 -0
- package/dist-types/utils/logger/structured-logger-integration.test.d.ts.map +1 -0
- package/dist-types/utils/replay-validation/replay-validation.d.ts +8 -0
- package/dist-types/utils/replay-validation/replay-validation.d.ts.map +1 -0
- package/dist-types/utils/replay-validation/replay-validation.test.d.ts +2 -0
- package/dist-types/utils/replay-validation/replay-validation.test.d.ts.map +1 -0
- package/dist-types/utils/retry/retry-config/index.d.ts +167 -0
- package/dist-types/utils/retry/retry-config/index.d.ts.map +1 -0
- package/dist-types/utils/retry/retry-config/index.test.d.ts +2 -0
- package/dist-types/utils/retry/retry-config/index.test.d.ts.map +1 -0
- package/dist-types/utils/retry/retry-presets/retry-presets.d.ts +35 -0
- package/dist-types/utils/retry/retry-presets/retry-presets.d.ts.map +1 -0
- package/dist-types/utils/safe-stringify/safe-stringify.d.ts +2 -0
- package/dist-types/utils/safe-stringify/safe-stringify.d.ts.map +1 -0
- package/dist-types/utils/safe-stringify/safe-stringify.test.d.ts +2 -0
- package/dist-types/utils/safe-stringify/safe-stringify.test.d.ts.map +1 -0
- package/dist-types/utils/serdes/serdes.d.ts +152 -0
- package/dist-types/utils/serdes/serdes.d.ts.map +1 -0
- package/dist-types/utils/serdes/serdes.test.d.ts +2 -0
- package/dist-types/utils/serdes/serdes.test.d.ts.map +1 -0
- package/dist-types/utils/step-id-utils/step-id-utils.d.ts +16 -0
- package/dist-types/utils/step-id-utils/step-id-utils.d.ts.map +1 -0
- package/dist-types/utils/step-id-utils/step-id-utils.test.d.ts +2 -0
- package/dist-types/utils/step-id-utils/step-id-utils.test.d.ts.map +1 -0
- package/dist-types/utils/summary-generators/summary-generators.d.ts +10 -0
- package/dist-types/utils/summary-generators/summary-generators.d.ts.map +1 -0
- package/dist-types/utils/summary-generators/summary-generators.test.d.ts +2 -0
- package/dist-types/utils/summary-generators/summary-generators.test.d.ts.map +1 -0
- package/dist-types/utils/termination-helper/termination-deferral.test.d.ts +2 -0
- package/dist-types/utils/termination-helper/termination-deferral.test.d.ts.map +1 -0
- package/dist-types/utils/termination-helper/termination-helper.d.ts +11 -0
- package/dist-types/utils/termination-helper/termination-helper.d.ts.map +1 -0
- package/dist-types/utils/termination-helper/termination-helper.test.d.ts +2 -0
- package/dist-types/utils/termination-helper/termination-helper.test.d.ts.map +1 -0
- package/dist-types/utils/wait-strategy/wait-strategy-config.d.ts +19 -0
- package/dist-types/utils/wait-strategy/wait-strategy-config.d.ts.map +1 -0
- package/dist-types/utils/wait-strategy/wait-strategy-config.test.d.ts +2 -0
- package/dist-types/utils/wait-strategy/wait-strategy-config.test.d.ts.map +1 -0
- package/dist-types/with-durable-execution-queue-completion.test.d.ts +2 -0
- package/dist-types/with-durable-execution-queue-completion.test.d.ts.map +1 -0
- package/dist-types/with-durable-execution.d.ts +75 -0
- package/dist-types/with-durable-execution.d.ts.map +1 -0
- package/dist-types/with-durable-execution.test.d.ts +2 -0
- package/dist-types/with-durable-execution.test.d.ts.map +1 -0
- package/package.json +69 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait-for-condition-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/wait-for-condition-handler/wait-for-condition-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,sBAAsB,EAItB,cAAc,EAGf,MAAM,aAAa,CAAC;AAQrB,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAYtE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,eAAO,MAAM,6BAA6B,GAAI,MAAM,SAAS,aAAa,EACxE,SAAS,gBAAgB,EACzB,YAAY,UAAU,EACtB,cAAc,MAAM,MAAM,EAC1B,QAAQ,MAAM,EACd,UAAU,MAAM,GAAG,SAAS,MAEpB,CAAC,EACP,aAAa,MAAM,GAAG,SAAS,GAAG,yBAAyB,CAAC,CAAC,EAAE,MAAM,CAAC,EACtE,gBACI,yBAAyB,CAAC,CAAC,EAAE,MAAM,CAAC,GACpC,sBAAsB,CAAC,CAAC,CAAC,EAC7B,cAAc,sBAAsB,CAAC,CAAC,CAAC,KACtC,cAAc,CAAC,CAAC,CA8QpB,CAAC"}
|
package/dist-types/handlers/wait-for-condition-handler/wait-for-condition-handler.test.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait-for-condition-handler.test.d.ts","sourceRoot":"","sources":["../../../src/handlers/wait-for-condition-handler/wait-for-condition-handler.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait-for-condition-handler.timing.test.d.ts","sourceRoot":"","sources":["../../../src/handlers/wait-for-condition-handler/wait-for-condition-handler.timing.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait-handler-comparison.test.d.ts","sourceRoot":"","sources":["../../../src/handlers/wait-handler/wait-handler-comparison.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait-handler-two-phase.test.d.ts","sourceRoot":"","sources":["../../../src/handlers/wait-handler/wait-handler-two-phase.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ExecutionContext, Duration } from "../../types";
|
|
2
|
+
import { Checkpoint } from "../../utils/checkpoint/checkpoint-helper";
|
|
3
|
+
import { DurablePromise } from "../../types/durable-promise";
|
|
4
|
+
export declare const createWaitHandler: (context: ExecutionContext, checkpoint: Checkpoint, createStepId: () => string, parentId?: string, checkAndUpdateReplayMode?: () => void) => {
|
|
5
|
+
(name: string, duration: Duration): DurablePromise<void>;
|
|
6
|
+
(duration: Duration): DurablePromise<void>;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=wait-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/wait-handler/wait-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAEhB,QAAQ,EAET,MAAM,aAAa,CAAC;AAOrB,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAGtE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,eAAO,MAAM,iBAAiB,GAC5B,SAAS,gBAAgB,EACzB,YAAY,UAAU,EACtB,cAAc,MAAM,MAAM,EAC1B,WAAW,MAAM,EACjB,2BAA2B,MAAM,IAAI,KACpC;IACD,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC,QAAQ,EAAE,QAAQ,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;CAgJ5C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait-handler.test.d.ts","sourceRoot":"","sources":["../../../src/handlers/wait-handler/wait-handler.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./with-durable-execution";
|
|
2
|
+
export { DurableContext, StepConfig, StepFunc, StepSemantics, ChildConfig, DurableExecutionInvocationInput, DurableExecutionInvocationOutput, InvocationStatus, OperationSubType, MapFunc, MapConfig, ConcurrentExecutionItem, ConcurrentExecutor, ConcurrencyConfig, WaitForConditionCheckFunc, WaitForConditionConfig, WaitForConditionDecision, WaitForConditionWaitStrategyFunc, DurableLambdaHandler, DurableExecutionHandler, InvokeConfig, JitterStrategy, Duration, DurableLogger, DurableContextLogger, DurableLogData, DurableLoggingContext, DurableExecutionConfig, DurableExecutionClient, BatchItem, BatchItemStatus, BatchResult, CompletionConfig, RetryDecision, } from "./types";
|
|
3
|
+
export { DurablePromise } from "./types/durable-promise";
|
|
4
|
+
export { StepInterruptedError } from "./errors/step-errors/step-errors";
|
|
5
|
+
export { DurableOperationError, StepError, CallbackError, InvokeError, ChildContextError, WaitForConditionError, } from "./errors/durable-error/durable-error";
|
|
6
|
+
export { defaultSerdes, createClassSerdes, createClassSerdesWithDates, Serdes, } from "./utils/serdes/serdes";
|
|
7
|
+
export { DurableExecutionApiClient } from "./durable-execution-api-client/durable-execution-api-client";
|
|
8
|
+
export { createWaitStrategy, WaitStrategyConfig, } from "./utils/wait-strategy/wait-strategy-config";
|
|
9
|
+
export { createRetryStrategy, RetryStrategyConfig, } from "./utils/retry/retry-config";
|
|
10
|
+
export { retryPresets } from "./utils/retry/retry-presets/retry-presets";
|
|
11
|
+
export { DurableExecutionInvocationInputWithClient } from "./utils/durable-execution-invocation-input/durable-execution-invocation-input";
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,OAAO,EACL,cAAc,EACd,UAAU,EACV,QAAQ,EACR,aAAa,EACb,WAAW,EACX,+BAA+B,EAC/B,gCAAgC,EAChC,gBAAgB,EAChB,gBAAgB,EAChB,OAAO,EACP,SAAS,EACT,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,gCAAgC,EAChC,oBAAoB,EACpB,uBAAuB,EACvB,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,SAAS,EACT,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EACL,qBAAqB,EACrB,SAAS,EACT,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,0BAA0B,EAC1B,MAAM,GACP,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,6DAA6D,CAAC;AACxG,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,yCAAyC,EAAE,MAAM,+EAA+E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-durable.d.ts","sourceRoot":"","sources":["../src/run-durable.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"termination-manager-checkpoint.test.d.ts","sourceRoot":"","sources":["../../src/termination-manager/termination-manager-checkpoint.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EventEmitter } from "events";
|
|
2
|
+
import { TerminationOptions, TerminationResponse } from "./types";
|
|
3
|
+
export declare class TerminationManager extends EventEmitter {
|
|
4
|
+
private isTerminated;
|
|
5
|
+
private terminationDetails?;
|
|
6
|
+
private resolveTermination?;
|
|
7
|
+
private terminationPromise;
|
|
8
|
+
private setCheckpointTerminating?;
|
|
9
|
+
constructor(setCheckpointTerminating?: () => void);
|
|
10
|
+
setCheckpointTerminatingCallback(callback: () => void): void;
|
|
11
|
+
terminate(options?: TerminationOptions): void;
|
|
12
|
+
getTerminationPromise(): Promise<TerminationResponse>;
|
|
13
|
+
private handleTermination;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=termination-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"termination-manager.d.ts","sourceRoot":"","sources":["../../src/termination-manager/termination-manager.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EACL,kBAAkB,EAElB,mBAAmB,EAEpB,MAAM,SAAS,CAAC;AAEjB,qBAAa,kBAAmB,SAAQ,YAAY;IAClD,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,kBAAkB,CAAC,CAAqB;IAChD,OAAO,CAAC,kBAAkB,CAAC,CAAwC;IACnE,OAAO,CAAC,kBAAkB,CAA+B;IACzD,OAAO,CAAC,wBAAwB,CAAC,CAAa;gBAElC,wBAAwB,CAAC,EAAE,MAAM,IAAI;IASjD,gCAAgC,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IAI5D,SAAS,CAAC,OAAO,GAAE,kBAAuB,GAAG,IAAI;IAuBjD,qBAAqB,IAAI,OAAO,CAAC,mBAAmB,CAAC;YAIvC,iBAAiB;CAehC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"termination-manager.test.d.ts","sourceRoot":"","sources":["../../src/termination-manager/termination-manager.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare enum TerminationReason {
|
|
2
|
+
OPERATION_TERMINATED = "OPERATION_TERMINATED",
|
|
3
|
+
RETRY_SCHEDULED = "RETRY_SCHEDULED",
|
|
4
|
+
RETRY_INTERRUPTED_STEP = "RETRY_INTERRUPTED_STEP",
|
|
5
|
+
WAIT_SCHEDULED = "WAIT_SCHEDULED",
|
|
6
|
+
CALLBACK_PENDING = "CALLBACK_PENDING",
|
|
7
|
+
CHECKPOINT_FAILED = "CHECKPOINT_FAILED",
|
|
8
|
+
SERDES_FAILED = "SERDES_FAILED",
|
|
9
|
+
CONTEXT_VALIDATION_ERROR = "CONTEXT_VALIDATION_ERROR",
|
|
10
|
+
CUSTOM = "CUSTOM"
|
|
11
|
+
}
|
|
12
|
+
export interface TerminationResponse {
|
|
13
|
+
reason: TerminationReason;
|
|
14
|
+
message: string;
|
|
15
|
+
error?: Error;
|
|
16
|
+
}
|
|
17
|
+
export interface TerminationOptions {
|
|
18
|
+
reason?: TerminationReason;
|
|
19
|
+
message?: string;
|
|
20
|
+
error?: Error;
|
|
21
|
+
cleanup?: () => Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
export interface TerminationDetails extends TerminationResponse {
|
|
24
|
+
cleanup?: () => Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/termination-manager/types.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAE3B,oBAAoB,yBAAyB;IAG7C,eAAe,oBAAoB;IACnC,sBAAsB,2BAA2B;IAGjD,cAAc,mBAAmB;IAGjC,gBAAgB,qBAAqB;IAGrC,iBAAiB,sBAAsB;IACvC,aAAa,kBAAkB;IAC/B,wBAAwB,6BAA6B;IAGrD,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,kBAAmB,SAAQ,mBAAmB;IAC7D,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CheckpointManager } from "../utils/checkpoint/checkpoint-manager";
|
|
2
|
+
import { ExecutionContext, DurableLogger } from "../types";
|
|
3
|
+
import { EventEmitter } from "events";
|
|
4
|
+
export declare const createTestCheckpointManager: (context: ExecutionContext, checkpointToken: string, emitter: EventEmitter, logger: DurableLogger) => CheckpointManager;
|
|
5
|
+
//# sourceMappingURL=create-test-checkpoint-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-test-checkpoint-manager.d.ts","sourceRoot":"","sources":["../../src/testing/create-test-checkpoint-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,eAAO,MAAM,2BAA2B,GACtC,SAAS,gBAAgB,EACzB,iBAAiB,MAAM,EACvB,SAAS,YAAY,EACrB,QAAQ,aAAa,KACpB,iBAWF,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Context } from "aws-lambda";
|
|
2
|
+
import { Operation, CheckpointDurableExecutionResponse } from "@aws-sdk/client-lambda";
|
|
3
|
+
import { DurableContextImpl } from "../context/durable-context/durable-context";
|
|
4
|
+
import { DurableExecutionClient } from "../types/durable-execution";
|
|
5
|
+
import { ExecutionContext, DurableExecutionMode, DurableLogger } from "../types";
|
|
6
|
+
/**
|
|
7
|
+
* In-memory storage for testing - no API calls
|
|
8
|
+
*/
|
|
9
|
+
declare class InMemoryStorage implements DurableExecutionClient {
|
|
10
|
+
private operations;
|
|
11
|
+
getExecutionState(): Promise<{
|
|
12
|
+
Operations: Operation[];
|
|
13
|
+
}>;
|
|
14
|
+
checkpoint(): Promise<CheckpointDurableExecutionResponse>;
|
|
15
|
+
addOperation(operation: Operation): void;
|
|
16
|
+
getOperations(): Operation[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Creates a real DurableContext with mocked storage for integration testing
|
|
20
|
+
*/
|
|
21
|
+
export declare function createTestDurableContext(options?: {
|
|
22
|
+
stepPrefix?: string;
|
|
23
|
+
durableExecutionMode?: DurableExecutionMode;
|
|
24
|
+
existingOperations?: Operation[];
|
|
25
|
+
lambdaContext?: Partial<Context>;
|
|
26
|
+
}): {
|
|
27
|
+
context: DurableContextImpl<DurableLogger>;
|
|
28
|
+
storage: InMemoryStorage;
|
|
29
|
+
executionContext: ExecutionContext;
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=create-test-durable-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-test-durable-context.d.ts","sourceRoot":"","sources":["../../src/testing/create-test-durable-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EACL,SAAS,EACT,kCAAkC,EACnC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEL,kBAAkB,EAEnB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACd,MAAM,UAAU,CAAC;AAIlB;;GAEG;AACH,cAAM,eAAgB,YAAW,sBAAsB;IACrD,OAAO,CAAC,UAAU,CAAmB;IAE/B,iBAAiB,IAAI,OAAO,CAAC;QAAE,UAAU,EAAE,SAAS,EAAE,CAAA;KAAE,CAAC;IAIzD,UAAU,IAAI,OAAO,CAAC,kCAAkC,CAAC;IAI/D,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;IAIxC,aAAa,IAAI,SAAS,EAAE;CAG7B;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,CAAC,EAAE;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,kBAAkB,CAAC,EAAE,SAAS,EAAE,CAAC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;CAClC,GAAG;IACF,OAAO,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAC3C,OAAO,EAAE,eAAe,CAAC;IACzB,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,CA+EA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BatchResult, BatchItem, BatchItemStatus } from "../types";
|
|
2
|
+
import { ChildContextError } from "../errors/durable-error/durable-error";
|
|
3
|
+
export declare class MockBatchResult<R> implements BatchResult<R> {
|
|
4
|
+
readonly all: Array<BatchItem<R>>;
|
|
5
|
+
readonly completionReason: "ALL_COMPLETED" | "MIN_SUCCESSFUL_REACHED" | "FAILURE_TOLERANCE_EXCEEDED";
|
|
6
|
+
constructor(all: Array<BatchItem<R>>, completionReason?: "ALL_COMPLETED" | "MIN_SUCCESSFUL_REACHED" | "FAILURE_TOLERANCE_EXCEEDED");
|
|
7
|
+
succeeded(): Array<BatchItem<R> & {
|
|
8
|
+
result: R;
|
|
9
|
+
}>;
|
|
10
|
+
failed(): Array<BatchItem<R> & {
|
|
11
|
+
error: ChildContextError;
|
|
12
|
+
}>;
|
|
13
|
+
started(): Array<BatchItem<R> & {
|
|
14
|
+
status: BatchItemStatus.STARTED;
|
|
15
|
+
}>;
|
|
16
|
+
get status(): BatchItemStatus.SUCCEEDED | BatchItemStatus.FAILED;
|
|
17
|
+
get hasFailure(): boolean;
|
|
18
|
+
throwIfError(): void;
|
|
19
|
+
getResults(): Array<R>;
|
|
20
|
+
getErrors(): Array<ChildContextError>;
|
|
21
|
+
get successCount(): number;
|
|
22
|
+
get failureCount(): number;
|
|
23
|
+
get startedCount(): number;
|
|
24
|
+
get totalCount(): number;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=mock-batch-result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-batch-result.d.ts","sourceRoot":"","sources":["../../src/testing/mock-batch-result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,qBAAa,eAAe,CAAC,CAAC,CAAE,YAAW,WAAW,CAAC,CAAC,CAAC;aAErC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;aACxB,gBAAgB,EAC5B,eAAe,GACf,wBAAwB,GACxB,4BAA4B;gBAJhB,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EACxB,gBAAgB,GAC5B,eAAe,GACf,wBAAwB,GACxB,4BAA8C;IAGpD,SAAS,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG;QAAE,MAAM,EAAE,CAAC,CAAA;KAAE,CAAC;IAOhD,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG;QAAE,KAAK,EAAE,iBAAiB,CAAA;KAAE,CAAC;IAO5D,OAAO,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG;QAAE,MAAM,EAAE,eAAe,CAAC,OAAO,CAAA;KAAE,CAAC;IAOpE,IAAI,MAAM,IAAI,eAAe,CAAC,SAAS,GAAG,eAAe,CAAC,MAAM,CAE/D;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,YAAY,IAAI,IAAI;IASpB,UAAU,IAAI,KAAK,CAAC,CAAC,CAAC;IAItB,SAAS,IAAI,KAAK,CAAC,iBAAiB,CAAC;IAIrC,IAAI,YAAY,IAAI,MAAM,CAGzB;IAED,IAAI,YAAY,IAAI,MAAM,CAGzB;IAED,IAAI,YAAY,IAAI,MAAM,CAGzB;IAED,IAAI,UAAU,IAAI,MAAM,CAEvB;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CheckpointManager } from "../utils/checkpoint/checkpoint-manager";
|
|
2
|
+
import { OperationUpdate } from "@aws-sdk/client-lambda";
|
|
3
|
+
export declare class MockCheckpointManager extends CheckpointManager {
|
|
4
|
+
checkpointCalls: Array<{
|
|
5
|
+
stepId: string;
|
|
6
|
+
data: Partial<OperationUpdate>;
|
|
7
|
+
}>;
|
|
8
|
+
forceCheckpointCalls: number;
|
|
9
|
+
setTerminatingCalls: number;
|
|
10
|
+
constructor();
|
|
11
|
+
checkpoint(stepId: string, data: Partial<OperationUpdate>): Promise<void>;
|
|
12
|
+
forceCheckpoint(): Promise<void>;
|
|
13
|
+
setTerminating(): void;
|
|
14
|
+
getQueueStatus(): {
|
|
15
|
+
queueLength: number;
|
|
16
|
+
isProcessing: boolean;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export declare const createMockCheckpointManager: () => MockCheckpointManager;
|
|
20
|
+
//# sourceMappingURL=mock-checkpoint-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-checkpoint-manager.d.ts","sourceRoot":"","sources":["../../src/testing/mock-checkpoint-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAMzD,qBAAa,qBAAsB,SAAQ,iBAAiB;IACnD,eAAe,EAAE,KAAK,CAAC;QAC5B,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;KAChC,CAAC,CAAM;IACD,oBAAoB,EAAE,MAAM,CAAK;IACjC,mBAAmB,EAAE,MAAM,CAAK;;IAgBjC,UAAU,CACd,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,OAAO,CAAC,eAAe,CAAC,GAC7B,OAAO,CAAC,IAAI,CAAC;IAKV,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAKtC,cAAc,IAAI,IAAI;IAItB,cAAc,IAAI;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,OAAO,CAAA;KAAE;CAGjE;AAED,eAAO,MAAM,2BAA2B,QAAO,qBAClB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OperationUpdate } from "@aws-sdk/client-lambda";
|
|
2
|
+
import { Checkpoint } from "../utils/checkpoint/checkpoint-helper";
|
|
3
|
+
export interface CheckpointFunction extends Checkpoint {
|
|
4
|
+
(stepId: string, data: Partial<OperationUpdate>): Promise<void>;
|
|
5
|
+
checkpoint(stepId: string, data: Partial<OperationUpdate>): Promise<void>;
|
|
6
|
+
force(): Promise<void>;
|
|
7
|
+
setTerminating(): void;
|
|
8
|
+
hasPendingAncestorCompletion(stepId: string): boolean;
|
|
9
|
+
waitForQueueCompletion(): Promise<void>;
|
|
10
|
+
markAncestorFinished(stepId: string): void;
|
|
11
|
+
}
|
|
12
|
+
export declare const createMockCheckpoint: (mockImplementation?: (stepId: string, data: Partial<OperationUpdate>) => Promise<void>) => jest.MockedFunction<CheckpointFunction>;
|
|
13
|
+
//# sourceMappingURL=mock-checkpoint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-checkpoint.d.ts","sourceRoot":"","sources":["../../src/testing/mock-checkpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAEnE,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACpD,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,cAAc,IAAI,IAAI,CAAC;IACvB,4BAA4B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;IACtD,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5C;AAED,eAAO,MAAM,oBAAoB,GAC/B,qBAAqB,CACnB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,OAAO,CAAC,eAAe,CAAC,KAC3B,OAAO,CAAC,IAAI,CAAC,KACjB,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAsBxC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ExecutionContext } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Creates a mock ExecutionContext for testing purposes
|
|
4
|
+
* @param overrides - Optional overrides for specific properties
|
|
5
|
+
* @returns A mocked ExecutionContext
|
|
6
|
+
*/
|
|
7
|
+
export declare const createMockExecutionContext: (overrides?: Partial<ExecutionContext & {
|
|
8
|
+
mutex?: unknown;
|
|
9
|
+
}>) => jest.Mocked<ExecutionContext>;
|
|
10
|
+
//# sourceMappingURL=mock-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-context.d.ts","sourceRoot":"","sources":["../../src/testing/mock-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAwB,MAAM,UAAU,CAAC;AAIlE;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GACrC,YAAW,OAAO,CAAC,gBAAgB,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,CAAM,KAC9D,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAyB9B,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export declare const TEST_CONSTANTS: {
|
|
2
|
+
readonly STEP_ID: "test-step-id";
|
|
3
|
+
readonly STEP_ID_1: "step-1";
|
|
4
|
+
readonly CALLBACK_ID: "test-callback-id";
|
|
5
|
+
readonly STEP: "test-step";
|
|
6
|
+
readonly TASK_TOKEN: "test-task-token";
|
|
7
|
+
readonly CHECKPOINT_TOKEN: "test-checkpoint-token";
|
|
8
|
+
readonly DURABLE_EXECUTION_ARN: "test-durable-execution-arn";
|
|
9
|
+
readonly CALLBACK_NAME: "test-callback";
|
|
10
|
+
readonly STEP_NAME: "test-step";
|
|
11
|
+
readonly RESULT: "test-result";
|
|
12
|
+
readonly CHILD_CONTEXT_ID: "test-child-context-id";
|
|
13
|
+
readonly CHILD_CONTEXT_STEP_ID: "test-child-context-step-id";
|
|
14
|
+
readonly CHILD_CONTEXT_NAME: "test-child-context";
|
|
15
|
+
readonly CHILD_CONTEXT_RESULT: "child-context-result";
|
|
16
|
+
readonly DEFAULT_MAP_CONFIG: {
|
|
17
|
+
readonly iterationSubType: "MapIteration";
|
|
18
|
+
readonly maxConcurrency: undefined;
|
|
19
|
+
readonly topLevelSubType: "Map";
|
|
20
|
+
};
|
|
21
|
+
readonly DEFAULT_PARALLEL_CONFIG: {
|
|
22
|
+
readonly iterationSubType: "ParallelBranch";
|
|
23
|
+
readonly maxConcurrency: undefined;
|
|
24
|
+
readonly topLevelSubType: "Parallel";
|
|
25
|
+
};
|
|
26
|
+
readonly DEFAULT_STEP_START_CHECKPOINT: {
|
|
27
|
+
readonly Id: "test-step-id";
|
|
28
|
+
readonly ParentId: undefined;
|
|
29
|
+
readonly Action: "START";
|
|
30
|
+
readonly SubType: "Step";
|
|
31
|
+
readonly Type: "STEP";
|
|
32
|
+
readonly Name: "test-step";
|
|
33
|
+
};
|
|
34
|
+
readonly DEFAULT_STEP_SUCCEED_CHECKPOINT: {
|
|
35
|
+
readonly Id: "test-step-id";
|
|
36
|
+
readonly ParentId: undefined;
|
|
37
|
+
readonly Action: "SUCCEED";
|
|
38
|
+
readonly SubType: "Step";
|
|
39
|
+
readonly Type: "STEP";
|
|
40
|
+
readonly Name: "test-step";
|
|
41
|
+
};
|
|
42
|
+
readonly DEFAULT_STEP_FAIL_CHECKPOINT: {
|
|
43
|
+
readonly Id: "test-step-id";
|
|
44
|
+
readonly ParentId: undefined;
|
|
45
|
+
readonly Action: "FAIL";
|
|
46
|
+
readonly SubType: "Step";
|
|
47
|
+
readonly Type: "STEP";
|
|
48
|
+
readonly Name: "test-step";
|
|
49
|
+
};
|
|
50
|
+
readonly DEFAULT_STEP_RETRY_CHECKPOINT: {
|
|
51
|
+
readonly Id: "test-step-id";
|
|
52
|
+
readonly ParentId: undefined;
|
|
53
|
+
readonly Action: "RETRY";
|
|
54
|
+
readonly SubType: "Step";
|
|
55
|
+
readonly Type: "STEP";
|
|
56
|
+
readonly Name: "test-step";
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=test-constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-constants.d.ts","sourceRoot":"","sources":["../../src/testing/test-constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsEjB,CAAC"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { Serdes } from "../utils/serdes/serdes";
|
|
2
|
+
import { DurableContext } from "./durable-context";
|
|
3
|
+
import { ChildContextError } from "../errors/durable-error/durable-error";
|
|
4
|
+
import { DurableLogger } from "./durable-logger";
|
|
5
|
+
/**
|
|
6
|
+
* The status of a batch item
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export declare enum BatchItemStatus {
|
|
10
|
+
SUCCEEDED = "SUCCEEDED",
|
|
11
|
+
FAILED = "FAILED",
|
|
12
|
+
STARTED = "STARTED"
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Represents a single item in a batch result
|
|
16
|
+
*
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export interface BatchItem<TResult> {
|
|
20
|
+
/** The result value if the item succeeded */
|
|
21
|
+
result?: TResult;
|
|
22
|
+
/** The error if the item failed (always ChildContextError since batch items run in child contexts) */
|
|
23
|
+
error?: ChildContextError;
|
|
24
|
+
/** Index of the item in the original array */
|
|
25
|
+
index: number;
|
|
26
|
+
/** Status of the item execution */
|
|
27
|
+
status: BatchItemStatus;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Result of a batch operation (map, parallel, or concurrent execution)
|
|
31
|
+
*
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
export interface BatchResult<TResult> {
|
|
35
|
+
/** All items in the batch with their results/errors */
|
|
36
|
+
all: Array<BatchItem<TResult>>;
|
|
37
|
+
/** Returns only the items that succeeded */
|
|
38
|
+
succeeded(): Array<BatchItem<TResult> & {
|
|
39
|
+
result: TResult;
|
|
40
|
+
}>;
|
|
41
|
+
/** Returns only the items that failed */
|
|
42
|
+
failed(): Array<BatchItem<TResult> & {
|
|
43
|
+
error: ChildContextError;
|
|
44
|
+
}>;
|
|
45
|
+
/** Returns only the items that are still in progress */
|
|
46
|
+
started(): Array<BatchItem<TResult> & {
|
|
47
|
+
status: BatchItemStatus.STARTED;
|
|
48
|
+
}>;
|
|
49
|
+
/** Overall status of the batch (SUCCEEDED if no failures, FAILED otherwise) */
|
|
50
|
+
status: BatchItemStatus.SUCCEEDED | BatchItemStatus.FAILED;
|
|
51
|
+
/** Reason why the batch completed */
|
|
52
|
+
completionReason: "ALL_COMPLETED" | "MIN_SUCCESSFUL_REACHED" | "FAILURE_TOLERANCE_EXCEEDED";
|
|
53
|
+
/** Whether any item in the batch failed */
|
|
54
|
+
hasFailure: boolean;
|
|
55
|
+
/** Throws the first error if any item failed */
|
|
56
|
+
throwIfError(): void;
|
|
57
|
+
/** Returns array of all successful results */
|
|
58
|
+
getResults(): Array<TResult>;
|
|
59
|
+
/** Returns array of all errors */
|
|
60
|
+
getErrors(): Array<ChildContextError>;
|
|
61
|
+
/** Number of successful items */
|
|
62
|
+
successCount: number;
|
|
63
|
+
/** Number of failed items */
|
|
64
|
+
failureCount: number;
|
|
65
|
+
/** Number of started but not completed items */
|
|
66
|
+
startedCount: number;
|
|
67
|
+
/** Total number of items */
|
|
68
|
+
totalCount: number;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Configuration for early completion of map/parallel operations
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* **Race Condition Behavior**: When multiple children complete simultaneously,
|
|
75
|
+
* the parent operation may have more completed children than the specified threshold
|
|
76
|
+
* by the time the completion check occurs. This is expected behavior due to the
|
|
77
|
+
* asynchronous nature of concurrent execution.
|
|
78
|
+
*
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
export interface CompletionConfig {
|
|
82
|
+
/** Minimum number of successful executions required */
|
|
83
|
+
minSuccessful?: number;
|
|
84
|
+
/** Maximum number of failures tolerated */
|
|
85
|
+
toleratedFailureCount?: number;
|
|
86
|
+
/** Maximum percentage of failures tolerated (0-100) */
|
|
87
|
+
toleratedFailurePercentage?: number;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Function to be executed for each item in a map operation
|
|
91
|
+
* @param context - DurableContext for executing durable operations within the map
|
|
92
|
+
* @param item - Current item being processed
|
|
93
|
+
* @param index - Index of the current item in the array
|
|
94
|
+
* @param array - The original array being mapped over
|
|
95
|
+
* @returns Promise resolving to the transformed value
|
|
96
|
+
*
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
99
|
+
export type MapFunc<TInput, TOutput, Logger extends DurableLogger> = (context: DurableContext<Logger>, item: TInput, index: number, array: TInput[]) => Promise<TOutput>;
|
|
100
|
+
/**
|
|
101
|
+
* Configuration options for map operations
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
export interface MapConfig<TItem, TResult> {
|
|
105
|
+
/** Maximum number of concurrent executions (default: unlimited) */
|
|
106
|
+
maxConcurrency?: number;
|
|
107
|
+
/** Function to generate custom names for map items */
|
|
108
|
+
itemNamer?: (item: TItem, index: number) => string;
|
|
109
|
+
/** Serialization/deserialization configuration for parent context */
|
|
110
|
+
serdes?: Serdes<BatchResult<TResult>>;
|
|
111
|
+
/** Serialization/deserialization configuration for each item */
|
|
112
|
+
itemSerdes?: Serdes<TResult>;
|
|
113
|
+
/** Configuration for completion behavior */
|
|
114
|
+
completionConfig?: CompletionConfig;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Function to be executed as a branch in a parallel operation
|
|
118
|
+
* @param context - DurableContext for executing durable operations within the branch
|
|
119
|
+
* @returns Promise resolving to the branch result
|
|
120
|
+
*
|
|
121
|
+
* @public
|
|
122
|
+
*/
|
|
123
|
+
export type ParallelFunc<TResult, Logger extends DurableLogger = DurableLogger> = (context: DurableContext<Logger>) => Promise<TResult>;
|
|
124
|
+
/**
|
|
125
|
+
* Named parallel branch with optional custom name
|
|
126
|
+
* @public
|
|
127
|
+
*/
|
|
128
|
+
export interface NamedParallelBranch<TResult, Logger extends DurableLogger> {
|
|
129
|
+
name?: string;
|
|
130
|
+
func: ParallelFunc<TResult, Logger>;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Configuration options for parallel operations
|
|
134
|
+
* @public
|
|
135
|
+
*/
|
|
136
|
+
export interface ParallelConfig<TResult> {
|
|
137
|
+
/** Maximum number of concurrent executions (default: unlimited) */
|
|
138
|
+
maxConcurrency?: number;
|
|
139
|
+
/** Serialization/deserialization configuration for parent context */
|
|
140
|
+
serdes?: Serdes<BatchResult<TResult>>;
|
|
141
|
+
/** Serialization/deserialization configuration for each branch */
|
|
142
|
+
itemSerdes?: Serdes<TResult>;
|
|
143
|
+
/** Configuration for completion behavior */
|
|
144
|
+
completionConfig?: CompletionConfig;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Represents an item to be executed with metadata for deterministic replay
|
|
148
|
+
* @public
|
|
149
|
+
*/
|
|
150
|
+
export interface ConcurrentExecutionItem<T> {
|
|
151
|
+
/** Unique identifier for the item */
|
|
152
|
+
id: string;
|
|
153
|
+
/** The actual data/payload for the item */
|
|
154
|
+
data: T;
|
|
155
|
+
/** Index of the item in the original array */
|
|
156
|
+
index: number;
|
|
157
|
+
/** Optional custom name for the item */
|
|
158
|
+
name?: string;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Executor function type for concurrent execution
|
|
162
|
+
* @public
|
|
163
|
+
*/
|
|
164
|
+
export type ConcurrentExecutor<TItem, TResult, Logger extends DurableLogger> = (item: ConcurrentExecutionItem<TItem>, childContext: DurableContext<Logger>) => Promise<TResult>;
|
|
165
|
+
/**
|
|
166
|
+
* Configuration options for concurrent execution operations
|
|
167
|
+
* @public
|
|
168
|
+
*/
|
|
169
|
+
export interface ConcurrencyConfig<TResult> {
|
|
170
|
+
/** Maximum number of concurrent executions (default: unlimited) */
|
|
171
|
+
maxConcurrency?: number;
|
|
172
|
+
/** Top-level operation subtype for tracking */
|
|
173
|
+
topLevelSubType?: string;
|
|
174
|
+
/** Iteration-level operation subtype for tracking */
|
|
175
|
+
iterationSubType?: string;
|
|
176
|
+
/** Function to generate summary from batch result */
|
|
177
|
+
summaryGenerator?: (result: BatchResult<TResult>) => string;
|
|
178
|
+
/** Serialization/deserialization configuration for parent context */
|
|
179
|
+
serdes?: Serdes<BatchResult<TResult>>;
|
|
180
|
+
/** Serialization/deserialization configuration for each item */
|
|
181
|
+
itemSerdes?: Serdes<TResult>;
|
|
182
|
+
/** Configuration for completion behavior */
|
|
183
|
+
completionConfig?: CompletionConfig;
|
|
184
|
+
}
|
|
185
|
+
//# sourceMappingURL=batch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch.d.ts","sourceRoot":"","sources":["../../src/types/batch.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Serdes } from "../utils/serdes/serdes";
|
|
2
|
+
import { RetryDecision } from "./step";
|
|
3
|
+
import { WaitForCallbackContext } from "./logger";
|
|
4
|
+
import { Duration } from "./core";
|
|
5
|
+
import { DurablePromise } from "./durable-promise";
|
|
6
|
+
import { DurableLogger } from "./durable-logger";
|
|
7
|
+
/**
|
|
8
|
+
* Configuration options for createCallback operations
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export interface CreateCallbackConfig<TOutput = string> {
|
|
13
|
+
/** Maximum time to wait for callback submission */
|
|
14
|
+
timeout?: Duration;
|
|
15
|
+
/** Heartbeat timeout to detect stalled callback operations */
|
|
16
|
+
heartbeatTimeout?: Duration;
|
|
17
|
+
/** Deserialization configuration for callback data */
|
|
18
|
+
serdes?: Omit<Serdes<TOutput>, "serialize">;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Configuration options for waitForCallback operations
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
export interface WaitForCallbackConfig<TOutput = string> {
|
|
26
|
+
/** Maximum time to wait for callback */
|
|
27
|
+
timeout?: Duration;
|
|
28
|
+
/** Heartbeat timeout to detect stalled operations */
|
|
29
|
+
heartbeatTimeout?: Duration;
|
|
30
|
+
/** Strategy for retrying failed callback submissions */
|
|
31
|
+
retryStrategy?: (error: Error, attemptCount: number) => RetryDecision;
|
|
32
|
+
/** Deserialization configuration for callback data */
|
|
33
|
+
serdes?: Omit<Serdes<TOutput>, "serialize">;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export type CreateCallbackResult<T = string> = [DurablePromise<T>, string];
|
|
39
|
+
/**
|
|
40
|
+
* Function that submits a callback ID to an external system
|
|
41
|
+
* @param callbackId - Unique identifier for the callback that should be submitted to external system
|
|
42
|
+
* @param context - Context for logging and other operations during callback submission
|
|
43
|
+
* @returns Promise that resolves when the callback ID has been successfully submitted
|
|
44
|
+
*
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
export type WaitForCallbackSubmitterFunc<TLogger extends DurableLogger> = (callbackId: string, context: WaitForCallbackContext<TLogger>) => Promise<void>;
|
|
48
|
+
//# sourceMappingURL=callback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callback.d.ts","sourceRoot":"","sources":["../../src/types/callback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;;;GAIG;AACH,MAAM,WAAW,oBAAoB,CAAC,OAAO,GAAG,MAAM;IACpD,mDAAmD;IACnD,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,8DAA8D;IAC9D,gBAAgB,CAAC,EAAE,QAAQ,CAAC;IAC5B,sDAAsD;IACtD,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,CAAC;CAC7C;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB,CAAC,OAAO,GAAG,MAAM;IACrD,wCAAwC;IACxC,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,QAAQ,CAAC;IAC5B,wDAAwD;IACxD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,aAAa,CAAC;IACtE,sDAAsD;IACtD,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,CAAC,CAAC,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AAE3E;;;;;;;GAOG;AACH,MAAM,MAAM,4BAA4B,CAAC,OAAO,SAAS,aAAa,IAAI,CACxE,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,sBAAsB,CAAC,OAAO,CAAC,KACrC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|