@effect-aws/client-sfn 1.6.0 → 1.9.3

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 (69) hide show
  1. package/Errors/package.json +6 -0
  2. package/SFNClientInstance/package.json +6 -0
  3. package/SFNService/package.json +6 -0
  4. package/SFNServiceConfig/package.json +6 -0
  5. package/{lib → dist/cjs}/Errors.d.ts +6 -11
  6. package/dist/cjs/Errors.d.ts.map +1 -0
  7. package/dist/cjs/Errors.js +41 -0
  8. package/dist/cjs/Errors.js.map +1 -0
  9. package/dist/cjs/SFNClientInstance.d.ts +24 -0
  10. package/dist/cjs/SFNClientInstance.d.ts.map +1 -0
  11. package/dist/cjs/SFNClientInstance.js +50 -0
  12. package/dist/cjs/SFNClientInstance.js.map +1 -0
  13. package/dist/cjs/SFNService.d.ts +189 -0
  14. package/dist/cjs/SFNService.d.ts.map +1 -0
  15. package/dist/cjs/SFNService.js +96 -0
  16. package/dist/cjs/SFNService.js.map +1 -0
  17. package/dist/cjs/SFNServiceConfig.d.ts +25 -0
  18. package/dist/cjs/SFNServiceConfig.d.ts.map +1 -0
  19. package/dist/cjs/SFNServiceConfig.js +35 -0
  20. package/dist/cjs/SFNServiceConfig.js.map +1 -0
  21. package/dist/cjs/index.d.ts +39 -0
  22. package/dist/cjs/index.d.ts.map +1 -0
  23. package/dist/cjs/index.js +56 -0
  24. package/dist/cjs/index.js.map +1 -0
  25. package/dist/dts/Errors.d.ts +40 -0
  26. package/dist/dts/Errors.d.ts.map +1 -0
  27. package/dist/dts/SFNClientInstance.d.ts +24 -0
  28. package/dist/dts/SFNClientInstance.d.ts.map +1 -0
  29. package/dist/dts/SFNService.d.ts +189 -0
  30. package/dist/dts/SFNService.d.ts.map +1 -0
  31. package/dist/dts/SFNServiceConfig.d.ts +25 -0
  32. package/dist/dts/SFNServiceConfig.d.ts.map +1 -0
  33. package/dist/dts/index.d.ts +39 -0
  34. package/dist/dts/index.d.ts.map +1 -0
  35. package/dist/esm/Errors.js +38 -0
  36. package/dist/esm/Errors.js.map +1 -0
  37. package/dist/esm/SFNClientInstance.js +23 -0
  38. package/dist/esm/SFNClientInstance.js.map +1 -0
  39. package/dist/esm/SFNService.js +69 -0
  40. package/dist/esm/SFNService.js.map +1 -0
  41. package/dist/esm/SFNServiceConfig.js +31 -0
  42. package/dist/esm/SFNServiceConfig.js.map +1 -0
  43. package/dist/esm/index.js +27 -0
  44. package/dist/esm/index.js.map +1 -0
  45. package/dist/esm/package.json +4 -0
  46. package/package.json +60 -43
  47. package/src/Errors.ts +110 -0
  48. package/src/SFNClientInstance.ts +33 -0
  49. package/src/SFNService.ts +796 -0
  50. package/src/SFNServiceConfig.ts +51 -0
  51. package/src/index.ts +44 -0
  52. package/CHANGELOG.md +0 -79
  53. package/docgen.json +0 -8
  54. package/lib/Errors.js +0 -41
  55. package/lib/SFNClientInstance.d.ts +0 -31
  56. package/lib/SFNClientInstance.js +0 -57
  57. package/lib/SFNClientInstanceConfig.d.ts +0 -23
  58. package/lib/SFNClientInstanceConfig.js +0 -44
  59. package/lib/SFNService.d.ts +0 -250
  60. package/lib/SFNService.js +0 -125
  61. package/lib/esm/Errors.js +0 -38
  62. package/lib/esm/SFNClientInstance.js +0 -30
  63. package/lib/esm/SFNClientInstanceConfig.js +0 -40
  64. package/lib/esm/SFNService.js +0 -121
  65. package/lib/esm/index.js +0 -5
  66. package/lib/index.d.ts +0 -4
  67. package/lib/index.js +0 -21
  68. package/project.json +0 -77
  69. package/vitest.config.ts +0 -3
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { SFNService } from "./SFNService.js";
5
+ /**
6
+ * @since 1.0.0
7
+ */
8
+ export * from "./Errors.js";
9
+ /**
10
+ * @since 1.0.0
11
+ */
12
+ export * as SFNClientInstance from "./SFNClientInstance.js";
13
+ /**
14
+ * @since 1.0.0
15
+ */
16
+ export * as SFNServiceConfig from "./SFNServiceConfig.js";
17
+ /**
18
+ * @since 1.0.0
19
+ */
20
+ export * from "./SFNService.js";
21
+ /**
22
+ * @since 1.0.0
23
+ * @category exports
24
+ * @alias SFNService
25
+ */
26
+ export const SFN = SFNService;
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;GAEG;AACH,cAAc,aAAa,CAAC;AAE5B;;GAEG;AACH,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAC;AAE5D;;GAEG;AACH,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAC;AAE1D;;GAEG;AACH,cAAc,iBAAiB,CAAC;AAehC;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,UAAU,CAAC"}
@@ -0,0 +1,4 @@
1
+ {
2
+ "type": "module",
3
+ "sideEffects": []
4
+ }
package/package.json CHANGED
@@ -1,54 +1,71 @@
1
1
  {
2
2
  "name": "@effect-aws/client-sfn",
3
+ "version": "1.9.3",
4
+ "description": "Effectful AWS Step Functions client",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "github:floydspace/effect-aws",
9
+ "directory": "packages/client-sfn"
10
+ },
11
+ "sideEffects": [],
3
12
  "author": {
4
13
  "name": "Victor Korzunin",
5
- "email": "ifloydrose@gmail.com",
6
- "organization": false
14
+ "email": "ifloydrose@gmail.com"
7
15
  },
8
- "devDependencies": {
9
- "@types/node": "^18",
10
- "@typescript-eslint/eslint-plugin": "^7",
11
- "@typescript-eslint/parser": "^7",
12
- "aws-sdk-client-mock": "^4.0.2",
13
- "aws-sdk-client-mock-vitest": "^4.0.0",
14
- "effect": "3.0.0",
15
- "eslint": "^8",
16
- "eslint-config-prettier": "^9.1.0",
17
- "eslint-import-resolver-typescript": "^3.6.1",
18
- "eslint-plugin-import": "^2.29.1",
19
- "eslint-plugin-prettier": "^5.2.1",
20
- "prettier": "^3.2.5",
21
- "typescript": "^5.4.2",
22
- "vitest": "^2.0.5"
16
+ "homepage": "https://floydspace.github.io/effect-aws/docs/client-sfn",
17
+ "dependencies": {
18
+ "@aws-sdk/client-sfn": "^3",
19
+ "@effect-aws/commons": "^0.2.0"
23
20
  },
24
21
  "peerDependencies": {
25
- "effect": ">=3.0.0 <4.0.0"
22
+ "effect": ">=3.0.4 <4.0.0"
26
23
  },
27
- "dependencies": {
28
- "@aws-sdk/client-sfn": "^3"
29
- },
30
- "main": "lib/index.js",
31
- "license": "MIT",
32
- "homepage": "https://floydspace.github.io/effect-aws",
33
- "publishConfig": {
34
- "access": "public"
24
+ "main": "./dist/cjs/index.js",
25
+ "module": "./dist/esm/index.js",
26
+ "types": "./dist/dts/index.d.ts",
27
+ "exports": {
28
+ "./package.json": "./package.json",
29
+ ".": {
30
+ "types": "./dist/dts/index.d.ts",
31
+ "import": "./dist/esm/index.js",
32
+ "default": "./dist/cjs/index.js"
33
+ },
34
+ "./Errors": {
35
+ "types": "./dist/dts/Errors.d.ts",
36
+ "import": "./dist/esm/Errors.js",
37
+ "default": "./dist/cjs/Errors.js"
38
+ },
39
+ "./SFNClientInstance": {
40
+ "types": "./dist/dts/SFNClientInstance.d.ts",
41
+ "import": "./dist/esm/SFNClientInstance.js",
42
+ "default": "./dist/cjs/SFNClientInstance.js"
43
+ },
44
+ "./SFNService": {
45
+ "types": "./dist/dts/SFNService.d.ts",
46
+ "import": "./dist/esm/SFNService.js",
47
+ "default": "./dist/cjs/SFNService.js"
48
+ },
49
+ "./SFNServiceConfig": {
50
+ "types": "./dist/dts/SFNServiceConfig.d.ts",
51
+ "import": "./dist/esm/SFNServiceConfig.js",
52
+ "default": "./dist/cjs/SFNServiceConfig.js"
53
+ }
35
54
  },
36
- "version": "1.6.0",
37
- "types": "lib/index.d.ts",
38
- "module": "lib/esm/index.js",
39
- "sideEffects": [],
40
- "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\".",
41
- "scripts": {
42
- "build": "npx projen build",
43
- "compile": "npx projen compile",
44
- "default": "npx projen default",
45
- "eslint": "npx projen eslint",
46
- "package": "npx projen package",
47
- "post-compile": "npx projen post-compile",
48
- "pre-compile": "npx projen pre-compile",
49
- "test": "npx projen test",
50
- "test:watch": "npx projen test:watch",
51
- "watch": "npx projen watch",
52
- "docgen": "docgen"
55
+ "typesVersions": {
56
+ "*": {
57
+ "Errors": [
58
+ "./dist/dts/Errors.d.ts"
59
+ ],
60
+ "SFNClientInstance": [
61
+ "./dist/dts/SFNClientInstance.d.ts"
62
+ ],
63
+ "SFNService": [
64
+ "./dist/dts/SFNService.d.ts"
65
+ ],
66
+ "SFNServiceConfig": [
67
+ "./dist/dts/SFNServiceConfig.d.ts"
68
+ ]
69
+ }
53
70
  }
54
71
  }
package/src/Errors.ts ADDED
@@ -0,0 +1,110 @@
1
+ import type {
2
+ ActivityAlreadyExists,
3
+ ActivityDoesNotExist,
4
+ ActivityLimitExceeded,
5
+ ActivityWorkerLimitExceeded,
6
+ ConflictException,
7
+ ExecutionAlreadyExists,
8
+ ExecutionDoesNotExist,
9
+ ExecutionLimitExceeded,
10
+ ExecutionNotRedrivable,
11
+ InvalidArn,
12
+ InvalidDefinition,
13
+ InvalidEncryptionConfiguration,
14
+ InvalidExecutionInput,
15
+ InvalidLoggingConfiguration,
16
+ InvalidName,
17
+ InvalidOutput,
18
+ InvalidToken,
19
+ InvalidTracingConfiguration,
20
+ KmsAccessDeniedException,
21
+ KmsInvalidStateException,
22
+ KmsThrottlingException,
23
+ MissingRequiredParameter,
24
+ ResourceNotFound,
25
+ ServiceQuotaExceededException,
26
+ StateMachineAlreadyExists,
27
+ StateMachineDeleting,
28
+ StateMachineDoesNotExist,
29
+ StateMachineLimitExceeded,
30
+ StateMachineTypeNotSupported,
31
+ TaskDoesNotExist,
32
+ TaskTimedOut,
33
+ TooManyTags,
34
+ ValidationException,
35
+ } from "@aws-sdk/client-sfn";
36
+ import type { TaggedException } from "@effect-aws/commons";
37
+ import { SdkError as CommonSdkError } from "@effect-aws/commons";
38
+
39
+ export const AllServiceErrors = [
40
+ "ActivityAlreadyExists",
41
+ "ActivityDoesNotExist",
42
+ "ActivityLimitExceeded",
43
+ "ActivityWorkerLimitExceeded",
44
+ "ConflictException",
45
+ "ExecutionAlreadyExists",
46
+ "ExecutionDoesNotExist",
47
+ "ExecutionLimitExceeded",
48
+ "ExecutionNotRedrivable",
49
+ "InvalidArn",
50
+ "InvalidDefinition",
51
+ "InvalidEncryptionConfiguration",
52
+ "InvalidExecutionInput",
53
+ "InvalidLoggingConfiguration",
54
+ "InvalidName",
55
+ "InvalidOutput",
56
+ "InvalidToken",
57
+ "InvalidTracingConfiguration",
58
+ "KmsAccessDeniedException",
59
+ "KmsInvalidStateException",
60
+ "KmsThrottlingException",
61
+ "MissingRequiredParameter",
62
+ "ResourceNotFound",
63
+ "ServiceQuotaExceededException",
64
+ "StateMachineAlreadyExists",
65
+ "StateMachineDeleting",
66
+ "StateMachineDoesNotExist",
67
+ "StateMachineLimitExceeded",
68
+ "StateMachineTypeNotSupported",
69
+ "TaskDoesNotExist",
70
+ "TaskTimedOut",
71
+ "TooManyTags",
72
+ "ValidationException",
73
+ ] as const;
74
+
75
+ export type ActivityAlreadyExistsError = TaggedException<ActivityAlreadyExists>;
76
+ export type ActivityDoesNotExistError = TaggedException<ActivityDoesNotExist>;
77
+ export type ActivityLimitExceededError = TaggedException<ActivityLimitExceeded>;
78
+ export type ActivityWorkerLimitExceededError = TaggedException<ActivityWorkerLimitExceeded>;
79
+ export type ConflictError = TaggedException<ConflictException>;
80
+ export type ExecutionAlreadyExistsError = TaggedException<ExecutionAlreadyExists>;
81
+ export type ExecutionDoesNotExistError = TaggedException<ExecutionDoesNotExist>;
82
+ export type ExecutionLimitExceededError = TaggedException<ExecutionLimitExceeded>;
83
+ export type ExecutionNotRedrivableError = TaggedException<ExecutionNotRedrivable>;
84
+ export type InvalidArnError = TaggedException<InvalidArn>;
85
+ export type InvalidDefinitionError = TaggedException<InvalidDefinition>;
86
+ export type InvalidEncryptionConfigurationError = TaggedException<InvalidEncryptionConfiguration>;
87
+ export type InvalidExecutionInputError = TaggedException<InvalidExecutionInput>;
88
+ export type InvalidLoggingConfigurationError = TaggedException<InvalidLoggingConfiguration>;
89
+ export type InvalidNameError = TaggedException<InvalidName>;
90
+ export type InvalidOutputError = TaggedException<InvalidOutput>;
91
+ export type InvalidTokenError = TaggedException<InvalidToken>;
92
+ export type InvalidTracingConfigurationError = TaggedException<InvalidTracingConfiguration>;
93
+ export type KmsAccessDeniedError = TaggedException<KmsAccessDeniedException>;
94
+ export type KmsInvalidStateError = TaggedException<KmsInvalidStateException>;
95
+ export type KmsThrottlingError = TaggedException<KmsThrottlingException>;
96
+ export type MissingRequiredParameterError = TaggedException<MissingRequiredParameter>;
97
+ export type ResourceNotFoundError = TaggedException<ResourceNotFound>;
98
+ export type ServiceQuotaExceededError = TaggedException<ServiceQuotaExceededException>;
99
+ export type StateMachineAlreadyExistsError = TaggedException<StateMachineAlreadyExists>;
100
+ export type StateMachineDeletingError = TaggedException<StateMachineDeleting>;
101
+ export type StateMachineDoesNotExistError = TaggedException<StateMachineDoesNotExist>;
102
+ export type StateMachineLimitExceededError = TaggedException<StateMachineLimitExceeded>;
103
+ export type StateMachineTypeNotSupportedError = TaggedException<StateMachineTypeNotSupported>;
104
+ export type TaskDoesNotExistError = TaggedException<TaskDoesNotExist>;
105
+ export type TaskTimedOutError = TaggedException<TaskTimedOut>;
106
+ export type TooManyTagsError = TaggedException<TooManyTags>;
107
+ export type ValidationError = TaggedException<ValidationException>;
108
+
109
+ export type SdkError = CommonSdkError;
110
+ export const SdkError = CommonSdkError;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { SFNClient } from "@aws-sdk/client-sfn";
5
+ import { Context, Effect, Layer } from "effect";
6
+ import * as SFNServiceConfig from "./SFNServiceConfig.js";
7
+
8
+ /**
9
+ * @since 1.0.0
10
+ * @category tags
11
+ */
12
+ export class SFNClientInstance extends Context.Tag(
13
+ "@effect-aws/client-sfn/SFNClientInstance",
14
+ )<SFNClientInstance, SFNClient>() {}
15
+
16
+ /**
17
+ * @since 1.0.0
18
+ * @category constructors
19
+ */
20
+ export const make = Effect.flatMap(
21
+ SFNServiceConfig.toSFNClientConfig,
22
+ (config) =>
23
+ Effect.acquireRelease(
24
+ Effect.sync(() => new SFNClient(config)),
25
+ (client) => Effect.sync(() => client.destroy()),
26
+ ),
27
+ );
28
+
29
+ /**
30
+ * @since 1.0.0
31
+ * @category layers
32
+ */
33
+ export const layer = Layer.scoped(SFNClientInstance, make);