@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,24 @@
|
|
|
1
|
+
import { Serdes } from "../utils/serdes/serdes";
|
|
2
|
+
import { DurableLogger } from "./durable-logger";
|
|
3
|
+
import { DurableContext } from "./durable-context";
|
|
4
|
+
/**
|
|
5
|
+
* Configuration options for child context operations
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface ChildConfig<T> {
|
|
9
|
+
/** Serialization/deserialization configuration for child context data */
|
|
10
|
+
serdes?: Serdes<T>;
|
|
11
|
+
/** Sub-type identifier for categorizing child contexts */
|
|
12
|
+
subType?: string;
|
|
13
|
+
/** Function to generate summaries for large results (used internally by map/parallel) */
|
|
14
|
+
summaryGenerator?: (result: T) => string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Function to be executed in a child context with isolated state
|
|
18
|
+
* @param context - DurableContext with isolated step counter and state tracking
|
|
19
|
+
* @returns Promise resolving to the child function result
|
|
20
|
+
*
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export type ChildFunc<T, Logger extends DurableLogger = DurableLogger> = (context: DurableContext<Logger>) => Promise<T>;
|
|
24
|
+
//# sourceMappingURL=child-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"child-context.d.ts","sourceRoot":"","sources":["../../src/types/child-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;GAGG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACnB,0DAA0D;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yFAAyF;IACzF,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,MAAM,CAAC;CAC1C;AAED;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,EAAE,MAAM,SAAS,aAAa,GAAG,aAAa,IAAI,CACvE,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,KAC5B,OAAO,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { TerminationManager } from "../termination-manager/termination-manager";
|
|
2
|
+
import { DurableExecutionClient } from "./durable-execution";
|
|
3
|
+
import { ErrorObject, Operation } from "@aws-sdk/client-lambda";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare enum DurableExecutionMode {
|
|
8
|
+
ExecutionMode = "ExecutionMode",
|
|
9
|
+
ReplayMode = "ReplayMode",
|
|
10
|
+
ReplaySucceededContext = "ReplaySucceededContext"
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Input structure for durable execution invocations.
|
|
14
|
+
*
|
|
15
|
+
* This interface defines the payload structure that the durable execution service provides
|
|
16
|
+
* to durable functions. It contains all the necessary information for the Durable
|
|
17
|
+
* Execution Language SDK to:
|
|
18
|
+
* - Manage checkpointing and state persistence
|
|
19
|
+
* - Replay completed operations from previous state
|
|
20
|
+
*
|
|
21
|
+
* The input is automatically provided by the durable execution service and
|
|
22
|
+
* contains both execution metadata and the operation history for replay.
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export interface DurableExecutionInvocationInput {
|
|
27
|
+
/**
|
|
28
|
+
* Amazon Resource Name (ARN) that uniquely identifies this durable execution instance.
|
|
29
|
+
*/
|
|
30
|
+
DurableExecutionArn: string;
|
|
31
|
+
/**
|
|
32
|
+
* Unique token for the next checkpoint in this execution.
|
|
33
|
+
*
|
|
34
|
+
* This token:
|
|
35
|
+
* - Ensures checkpoint operations are idempotent
|
|
36
|
+
* - Prevents duplicate checkpoints
|
|
37
|
+
* - Validates that checkpoint requests belong to the current execution cycle
|
|
38
|
+
*/
|
|
39
|
+
CheckpointToken: string;
|
|
40
|
+
/**
|
|
41
|
+
* Execution state including operation history and pagination information.
|
|
42
|
+
*
|
|
43
|
+
* Contains the full context needed to resume execution including:
|
|
44
|
+
* - All previously completed operations with their results
|
|
45
|
+
* - Execution metadata and step identifiers
|
|
46
|
+
* - Pagination markers for long operation histories
|
|
47
|
+
*/
|
|
48
|
+
InitialExecutionState: {
|
|
49
|
+
/**
|
|
50
|
+
* Array of completed operations with their execution details and results.
|
|
51
|
+
*
|
|
52
|
+
* Each operation contains:
|
|
53
|
+
* - Operation type and subtype (STEP, WAIT, CALLBACK, etc.)
|
|
54
|
+
* - Unique operation identifier
|
|
55
|
+
* - Output results
|
|
56
|
+
* - Execution timestamps and status
|
|
57
|
+
*/
|
|
58
|
+
Operations: Operation[];
|
|
59
|
+
/**
|
|
60
|
+
* Pagination marker for retrieving additional operation history if needed.
|
|
61
|
+
*
|
|
62
|
+
* Used when the operation history is too large to fit in a single response.
|
|
63
|
+
* The Durable Execution Language SDK handles pagination automatically.
|
|
64
|
+
*/
|
|
65
|
+
NextMarker?: string | undefined;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Status enumeration for durable execution invocation results.
|
|
70
|
+
*
|
|
71
|
+
* This enum defines the possible outcomes of a durable execution invocation,
|
|
72
|
+
* indicating whether the execution completed successfully, failed, or is
|
|
73
|
+
* continuing asynchronously.
|
|
74
|
+
*
|
|
75
|
+
* The status determines how the AWS durable execution service will handle
|
|
76
|
+
* the execution:
|
|
77
|
+
* - SUCCEEDED: Execution completed successfully with a final result
|
|
78
|
+
* - FAILED: Execution failed with an error that cannot be retried
|
|
79
|
+
* - PENDING: Execution is continuing and will be resumed later (checkpointed)
|
|
80
|
+
*
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
export declare enum InvocationStatus {
|
|
84
|
+
/**
|
|
85
|
+
* The durable execution completed successfully.
|
|
86
|
+
*
|
|
87
|
+
* This status indicates:
|
|
88
|
+
* - A final result is available (if any)
|
|
89
|
+
* - No further invocations are needed
|
|
90
|
+
* - The execution has reached its natural completion
|
|
91
|
+
*/
|
|
92
|
+
SUCCEEDED = "SUCCEEDED",
|
|
93
|
+
/**
|
|
94
|
+
* The durable execution failed with an unrecoverable error.
|
|
95
|
+
*
|
|
96
|
+
* This status indicates:
|
|
97
|
+
* - An error occurred that cannot be automatically retried
|
|
98
|
+
* - Error details are provided in the response
|
|
99
|
+
* - No further invocations will occur
|
|
100
|
+
*/
|
|
101
|
+
FAILED = "FAILED",
|
|
102
|
+
/**
|
|
103
|
+
* The durable execution is continuing asynchronously.
|
|
104
|
+
*
|
|
105
|
+
* This status indicates:
|
|
106
|
+
* - Execution was checkpointed and will resume later
|
|
107
|
+
* - Common scenarios: waiting for callbacks, retries, wait operations
|
|
108
|
+
* - The function may terminate while execution continues
|
|
109
|
+
* - Future invocations will resume from the checkpoint
|
|
110
|
+
*/
|
|
111
|
+
PENDING = "PENDING"
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Operation subtype enumeration for categorizing different types of durable operations.
|
|
115
|
+
*
|
|
116
|
+
* This enum provides fine-grained classification of durable operations beyond the
|
|
117
|
+
* basic operation types. Subtypes enable improved observability for specific
|
|
118
|
+
* operation patterns.
|
|
119
|
+
*
|
|
120
|
+
* Each subtype corresponds to a specific durable context method or execution pattern.
|
|
121
|
+
*
|
|
122
|
+
* @public
|
|
123
|
+
*/
|
|
124
|
+
export declare enum OperationSubType {
|
|
125
|
+
/**
|
|
126
|
+
* A durable step operation (`context.step`).
|
|
127
|
+
*
|
|
128
|
+
* Represents atomic operations with automatic retry and checkpointing.
|
|
129
|
+
* Steps are the fundamental building blocks of durable executions.
|
|
130
|
+
*/
|
|
131
|
+
STEP = "Step",
|
|
132
|
+
/**
|
|
133
|
+
* A wait operation (`context.wait`).
|
|
134
|
+
*
|
|
135
|
+
* Represents time-based delays that pause execution for a specified duration.
|
|
136
|
+
* Waits allow long-running workflows without keeping invocations active.
|
|
137
|
+
*/
|
|
138
|
+
WAIT = "Wait",
|
|
139
|
+
/**
|
|
140
|
+
* A callback creation operation (`context.createCallback`).
|
|
141
|
+
*
|
|
142
|
+
* Represents the creation of a callback that external systems can complete.
|
|
143
|
+
* Used for human-in-the-loop workflows and external system integration.
|
|
144
|
+
*/
|
|
145
|
+
CALLBACK = "Callback",
|
|
146
|
+
/**
|
|
147
|
+
* A child context operation (`context.runInChildContext`).
|
|
148
|
+
*
|
|
149
|
+
* Represents execution within an isolated child context with its own
|
|
150
|
+
* step counter and state tracking. Used for grouping related operations.
|
|
151
|
+
*/
|
|
152
|
+
RUN_IN_CHILD_CONTEXT = "RunInChildContext",
|
|
153
|
+
/**
|
|
154
|
+
* A map operation (`context.map`).
|
|
155
|
+
*
|
|
156
|
+
* Represents parallel processing of an array of items with concurrency control
|
|
157
|
+
* and completion policies. Each map operation coordinates multiple iterations.
|
|
158
|
+
*/
|
|
159
|
+
MAP = "Map",
|
|
160
|
+
/**
|
|
161
|
+
* An individual iteration within a map operation.
|
|
162
|
+
*
|
|
163
|
+
* Represents the processing of a single item within a `context.map` call.
|
|
164
|
+
* Each iteration runs in its own child context with isolated state.
|
|
165
|
+
*/
|
|
166
|
+
MAP_ITERATION = "MapIteration",
|
|
167
|
+
/**
|
|
168
|
+
* A parallel execution operation (`context.parallel`).
|
|
169
|
+
*
|
|
170
|
+
* Represents concurrent execution of multiple branches with optional
|
|
171
|
+
* concurrency control and completion policies.
|
|
172
|
+
*/
|
|
173
|
+
PARALLEL = "Parallel",
|
|
174
|
+
/**
|
|
175
|
+
* An individual branch within a parallel operation.
|
|
176
|
+
*
|
|
177
|
+
* Represents a single branch of execution within a `context.parallel` call.
|
|
178
|
+
* Each branch runs in its own child context with isolated state.
|
|
179
|
+
*/
|
|
180
|
+
PARALLEL_BRANCH = "ParallelBranch",
|
|
181
|
+
/**
|
|
182
|
+
* A wait for callback operation (`context.waitForCallback`).
|
|
183
|
+
*
|
|
184
|
+
* Represents waiting for an external system to complete a callback,
|
|
185
|
+
* combining callback creation with submission logic.
|
|
186
|
+
*/
|
|
187
|
+
WAIT_FOR_CALLBACK = "WaitForCallback",
|
|
188
|
+
/**
|
|
189
|
+
* A wait for condition operation (`context.waitForCondition`).
|
|
190
|
+
*
|
|
191
|
+
* Represents periodic checking of a condition until it's met,
|
|
192
|
+
* with configurable polling intervals and wait strategies.
|
|
193
|
+
*/
|
|
194
|
+
WAIT_FOR_CONDITION = "WaitForCondition",
|
|
195
|
+
/**
|
|
196
|
+
* A chained invocation operation (`context.invoke`).
|
|
197
|
+
*
|
|
198
|
+
* Represents calling another durable function with input parameters
|
|
199
|
+
* and waiting for its completion. Used for function composition and workflows.
|
|
200
|
+
*/
|
|
201
|
+
CHAINED_INVOKE = "ChainedInvoke"
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Response structure for failed durable execution invocations.
|
|
205
|
+
* @public
|
|
206
|
+
*/
|
|
207
|
+
interface DurableExecutionInvocationOutputFailed {
|
|
208
|
+
/** Status indicating the execution failed */
|
|
209
|
+
Status: InvocationStatus.FAILED;
|
|
210
|
+
/** Error object containing failure details and stack trace */
|
|
211
|
+
Error: ErrorObject;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Response structure for successfully completed durable execution invocations.
|
|
215
|
+
* @public
|
|
216
|
+
*/
|
|
217
|
+
interface DurableExecutionInvocationOutputSucceeded {
|
|
218
|
+
/** Status indicating successful completion */
|
|
219
|
+
Status: InvocationStatus.SUCCEEDED;
|
|
220
|
+
/** Optional serialized result from the execution (undefined for void results) */
|
|
221
|
+
Result?: string;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Response structure for durable execution invocations that are continuing asynchronously.
|
|
225
|
+
* @public
|
|
226
|
+
*/
|
|
227
|
+
interface DurableExecutionInvocationOutputPending {
|
|
228
|
+
/** Status indicating the execution is pending and will be resumed later */
|
|
229
|
+
Status: InvocationStatus.PENDING;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Union type representing all possible output formats for durable execution invocations.
|
|
233
|
+
*
|
|
234
|
+
* This type defines the complete response structure that durable functions return
|
|
235
|
+
* to the AWS Durable Execution service. The response format varies based on the
|
|
236
|
+
* execution outcome:
|
|
237
|
+
*
|
|
238
|
+
* **Successful Completion (`SUCCEEDED`):**
|
|
239
|
+
* - Contains the final execution result (if any) as a serialized string
|
|
240
|
+
* - Indicates the execution has completed and no further invocations are needed
|
|
241
|
+
* - The Result field may be undefined for void functions or large results that were checkpointed
|
|
242
|
+
*
|
|
243
|
+
* **Execution Failure (`FAILED`):**
|
|
244
|
+
* - Contains structured error information including message and stack trace
|
|
245
|
+
* - Indicates an unrecoverable error that terminates the execution
|
|
246
|
+
* - No further automatic retries will occur
|
|
247
|
+
*
|
|
248
|
+
* **Continued Execution (`PENDING`):**
|
|
249
|
+
* - Indicates the execution is continuing asynchronously
|
|
250
|
+
* - Common for operations involving waits, callbacks, or retries
|
|
251
|
+
* - The execution will be resumed in a future invocation
|
|
252
|
+
*
|
|
253
|
+
* The durable execution service uses this response to determine next steps:
|
|
254
|
+
* - Schedule continuation for PENDING status
|
|
255
|
+
* - Complete the execution for SUCCEEDED status
|
|
256
|
+
* - Complete the execution for FAILED status
|
|
257
|
+
*
|
|
258
|
+
* @public
|
|
259
|
+
*/
|
|
260
|
+
export type DurableExecutionInvocationOutput = DurableExecutionInvocationOutputSucceeded | DurableExecutionInvocationOutputFailed | DurableExecutionInvocationOutputPending;
|
|
261
|
+
/**
|
|
262
|
+
* Type representing time durations for durable execution operations, such as
|
|
263
|
+
* `wait`, `retry`, and `timeout` options.
|
|
264
|
+
*
|
|
265
|
+
* **Supported Units:**
|
|
266
|
+
* - `days`: Number of days
|
|
267
|
+
* - `hours`: Number of hours
|
|
268
|
+
* - `minutes`: Number of minutes
|
|
269
|
+
* - `seconds`: Number of seconds
|
|
270
|
+
*
|
|
271
|
+
* **Usage Rules:**
|
|
272
|
+
* - At least one time unit must be specified
|
|
273
|
+
* - All numeric values must be positive integers
|
|
274
|
+
* - Fractional values are not supported
|
|
275
|
+
*
|
|
276
|
+
* @example
|
|
277
|
+
* ```typescript
|
|
278
|
+
* // Wait for 30 seconds
|
|
279
|
+
* await context.wait({ seconds: 30 });
|
|
280
|
+
* ```
|
|
281
|
+
*
|
|
282
|
+
* @public
|
|
283
|
+
*/
|
|
284
|
+
export type Duration = {
|
|
285
|
+
days: number;
|
|
286
|
+
hours?: number;
|
|
287
|
+
minutes?: number;
|
|
288
|
+
seconds?: number;
|
|
289
|
+
} | {
|
|
290
|
+
hours: number;
|
|
291
|
+
minutes?: number;
|
|
292
|
+
seconds?: number;
|
|
293
|
+
} | {
|
|
294
|
+
minutes: number;
|
|
295
|
+
seconds?: number;
|
|
296
|
+
} | {
|
|
297
|
+
seconds: number;
|
|
298
|
+
};
|
|
299
|
+
/**
|
|
300
|
+
* @internal
|
|
301
|
+
*/
|
|
302
|
+
export interface ExecutionContext {
|
|
303
|
+
durableExecutionClient: DurableExecutionClient;
|
|
304
|
+
_stepData: Record<string, Operation>;
|
|
305
|
+
terminationManager: TerminationManager;
|
|
306
|
+
durableExecutionArn: string;
|
|
307
|
+
requestId: string;
|
|
308
|
+
tenantId: string | undefined;
|
|
309
|
+
pendingCompletions: Set<string>;
|
|
310
|
+
getStepData(stepId: string): Operation | undefined;
|
|
311
|
+
}
|
|
312
|
+
export {};
|
|
313
|
+
//# sourceMappingURL=core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/types/core.ts"],"names":[],"mappings":"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"}
|