@aws/durable-execution-sdk-js 1.0.0 → 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.
Files changed (74) hide show
  1. package/README.md +3 -50
  2. package/dist/index.mjs +1874 -2017
  3. package/dist/index.mjs.map +1 -1
  4. package/dist-cjs/index.js +1873 -2016
  5. package/dist-cjs/index.js.map +1 -1
  6. package/dist-types/context/durable-context/durable-context.d.ts +0 -6
  7. package/dist-types/context/durable-context/durable-context.d.ts.map +1 -1
  8. package/dist-types/errors/durable-error/durable-error.d.ts +6 -0
  9. package/dist-types/errors/durable-error/durable-error.d.ts.map +1 -1
  10. package/dist-types/errors/step-errors/step-errors.d.ts +1 -0
  11. package/dist-types/errors/step-errors/step-errors.d.ts.map +1 -1
  12. package/dist-types/handlers/callback-handler/callback-promise.d.ts +2 -2
  13. package/dist-types/handlers/callback-handler/callback-promise.d.ts.map +1 -1
  14. package/dist-types/handlers/callback-handler/callback.d.ts +1 -2
  15. package/dist-types/handlers/callback-handler/callback.d.ts.map +1 -1
  16. package/dist-types/handlers/concurrent-execution-handler/concurrent-execution-handler.d.ts +1 -0
  17. package/dist-types/handlers/concurrent-execution-handler/concurrent-execution-handler.d.ts.map +1 -1
  18. package/dist-types/handlers/invoke-handler/invoke-handler.d.ts +1 -2
  19. package/dist-types/handlers/invoke-handler/invoke-handler.d.ts.map +1 -1
  20. package/dist-types/handlers/run-in-child-context-handler/run-in-child-context-handler.d.ts.map +1 -1
  21. package/dist-types/handlers/step-handler/step-handler.d.ts +1 -9
  22. package/dist-types/handlers/step-handler/step-handler.d.ts.map +1 -1
  23. package/dist-types/handlers/wait-for-condition-handler/wait-for-condition-handler.d.ts +1 -6
  24. package/dist-types/handlers/wait-for-condition-handler/wait-for-condition-handler.d.ts.map +1 -1
  25. package/dist-types/handlers/wait-handler/wait-handler-comparison.test.d.ts +2 -0
  26. package/dist-types/handlers/wait-handler/wait-handler-comparison.test.d.ts.map +1 -0
  27. package/dist-types/handlers/wait-handler/wait-handler.d.ts +1 -2
  28. package/dist-types/handlers/wait-handler/wait-handler.d.ts.map +1 -1
  29. package/dist-types/testing/create-test-checkpoint-manager.d.ts.map +1 -1
  30. package/dist-types/testing/create-test-durable-context.d.ts.map +1 -1
  31. package/dist-types/testing/mock-checkpoint-manager.d.ts +0 -1
  32. package/dist-types/testing/mock-checkpoint-manager.d.ts.map +1 -1
  33. package/dist-types/testing/mock-checkpoint.d.ts +1 -0
  34. package/dist-types/testing/mock-checkpoint.d.ts.map +1 -1
  35. package/dist-types/types/batch.d.ts +8 -0
  36. package/dist-types/types/batch.d.ts.map +1 -1
  37. package/dist-types/types/core.d.ts +1 -3
  38. package/dist-types/types/core.d.ts.map +1 -1
  39. package/dist-types/types/durable-context.d.ts +8 -6
  40. package/dist-types/types/durable-context.d.ts.map +1 -1
  41. package/dist-types/types/index.d.ts +2 -0
  42. package/dist-types/types/index.d.ts.map +1 -1
  43. package/dist-types/types/operation-lifecycle-state.d.ts +27 -0
  44. package/dist-types/types/operation-lifecycle-state.d.ts.map +1 -0
  45. package/dist-types/types/operation-lifecycle.d.ts +27 -0
  46. package/dist-types/types/operation-lifecycle.d.ts.map +1 -0
  47. package/dist-types/utils/checkpoint/checkpoint-ancestor.test.d.ts +2 -0
  48. package/dist-types/utils/checkpoint/checkpoint-ancestor.test.d.ts.map +1 -0
  49. package/dist-types/utils/checkpoint/checkpoint-central-termination.test.d.ts +2 -0
  50. package/dist-types/utils/checkpoint/checkpoint-central-termination.test.d.ts.map +1 -0
  51. package/dist-types/utils/checkpoint/checkpoint-helper.d.ts +37 -0
  52. package/dist-types/utils/checkpoint/checkpoint-helper.d.ts.map +1 -1
  53. package/dist-types/utils/checkpoint/checkpoint-manager.d.ts +37 -12
  54. package/dist-types/utils/checkpoint/checkpoint-manager.d.ts.map +1 -1
  55. package/dist-types/utils/constants/constants.d.ts +0 -1
  56. package/dist-types/utils/constants/constants.d.ts.map +1 -1
  57. package/dist-types/utils/durable-execution-invocation-input/durable-execution-invocation-input.d.ts +3 -1
  58. package/dist-types/utils/durable-execution-invocation-input/durable-execution-invocation-input.d.ts.map +1 -1
  59. package/dist-types/utils/durable-execution-invocation-input/durable-execution-invocation-input.test.d.ts +2 -0
  60. package/dist-types/utils/durable-execution-invocation-input/durable-execution-invocation-input.test.d.ts.map +1 -0
  61. package/dist-types/utils/termination-helper/termination-helper.d.ts +0 -9
  62. package/dist-types/utils/termination-helper/termination-helper.d.ts.map +1 -1
  63. package/dist-types/with-durable-execution.d.ts.map +1 -1
  64. package/package.json +8 -3
  65. package/dist-types/utils/checkpoint/checkpoint-ancestor-checking.test.d.ts +0 -2
  66. package/dist-types/utils/checkpoint/checkpoint-ancestor-checking.test.d.ts.map +0 -1
  67. package/dist-types/utils/termination-helper/active-operations-tracker.d.ts +0 -31
  68. package/dist-types/utils/termination-helper/active-operations-tracker.d.ts.map +0 -1
  69. package/dist-types/utils/termination-helper/active-operations-tracker.test.d.ts +0 -2
  70. package/dist-types/utils/termination-helper/active-operations-tracker.test.d.ts.map +0 -1
  71. package/dist-types/utils/wait-before-continue/wait-before-continue.d.ts +0 -35
  72. package/dist-types/utils/wait-before-continue/wait-before-continue.d.ts.map +0 -1
  73. package/dist-types/utils/wait-before-continue/wait-before-continue.test.d.ts +0 -2
  74. package/dist-types/utils/wait-before-continue/wait-before-continue.test.d.ts.map +0 -1
package/README.md CHANGED
@@ -49,8 +49,9 @@ export const lambdaHandler = withDurableExecution(handler);
49
49
 
50
50
  This README provides a quick reference for the SDK's main features. For more detailed information:
51
51
 
52
+ - **[API Reference](../../docs/api-reference/durable-execution-sdk-js.md)** - Complete technical reference with detailed type definitions and operation specifications
52
53
  - **[Concepts and Use Cases](src/documents/CONCEPTS.md)** - Learn about the replay model, best practices, and real-world examples including GenAI agents, human-in-the-loop workflows, and saga patterns
53
- - **[API Specification](src/documents/API_SPECIFICATION.md)** - Complete technical reference with detailed type definitions and operation specifications
54
+ - **[Contributing](../../CONTRIBUTING.md)** - Learn about contributing to the AWS Durable Execution SDK for JavaScript
54
55
 
55
56
  ## Core Concepts
56
57
 
@@ -106,7 +107,7 @@ const orderResult = await context.runInChildContext(
106
107
 
107
108
  ### Invoking Other Functions
108
109
 
109
- Call other durable functions:
110
+ Call another AWS Lambda function and wait for it complete:
110
111
 
111
112
  ```typescript
112
113
  const result = await context.invoke(
@@ -266,16 +267,6 @@ const results = await context.promise.allSettled([operation1(), operation2()]);
266
267
 
267
268
  ### Retry Strategies
268
269
 
269
- Built-in retry presets:
270
-
271
- ```typescript
272
- import { retryPresets } from "@aws/durable-execution-sdk-js";
273
-
274
- await context.step("api-call", async () => callExternalAPI(), {
275
- retryStrategy: retryPresets.exponentialBackoff(),
276
- });
277
- ```
278
-
279
270
  Custom retry strategy:
280
271
 
281
272
  ```typescript
@@ -287,32 +278,6 @@ await context.step("custom-retry", async () => riskyOperation(), {
287
278
  });
288
279
  ```
289
280
 
290
- ### Serialization
291
-
292
- Custom serialization for complex types:
293
-
294
- ```typescript
295
- import {
296
- createClassSerdes,
297
- createClassSerdesWithDates,
298
- } from "@aws/durable-execution-sdk-js";
299
-
300
- class User {
301
- constructor(
302
- public name: string,
303
- public createdAt: Date,
304
- ) {}
305
- }
306
-
307
- const result = await context.step(
308
- "create-user",
309
- async () => new User("Alice", new Date()),
310
- {
311
- serdes: createClassSerdesWithDates(User, ["createdAt"]),
312
- },
313
- );
314
- ```
315
-
316
281
  ### Step Semantics
317
282
 
318
283
  Control execution guarantees:
@@ -395,18 +360,6 @@ context.configureLogger({
395
360
  context.configureLogger({ modeAware: false });
396
361
  ```
397
362
 
398
- ## Testing Locally
399
-
400
- Run durable functions locally for development:
401
-
402
- ```bash
403
- # Basic example
404
- npm run run-locally src/demo/usage-example.ts
405
-
406
- # With invocation ID
407
- npm run run-locally src/demo/retry-config.ts invocation001
408
- ```
409
-
410
363
  ## License
411
364
 
412
365
  This project is licensed under the Apache-2.0 License.