@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.
- package/Errors/package.json +6 -0
- package/SFNClientInstance/package.json +6 -0
- package/SFNService/package.json +6 -0
- package/SFNServiceConfig/package.json +6 -0
- package/{lib → dist/cjs}/Errors.d.ts +6 -11
- package/dist/cjs/Errors.d.ts.map +1 -0
- package/dist/cjs/Errors.js +41 -0
- package/dist/cjs/Errors.js.map +1 -0
- package/dist/cjs/SFNClientInstance.d.ts +24 -0
- package/dist/cjs/SFNClientInstance.d.ts.map +1 -0
- package/dist/cjs/SFNClientInstance.js +50 -0
- package/dist/cjs/SFNClientInstance.js.map +1 -0
- package/dist/cjs/SFNService.d.ts +189 -0
- package/dist/cjs/SFNService.d.ts.map +1 -0
- package/dist/cjs/SFNService.js +96 -0
- package/dist/cjs/SFNService.js.map +1 -0
- package/dist/cjs/SFNServiceConfig.d.ts +25 -0
- package/dist/cjs/SFNServiceConfig.d.ts.map +1 -0
- package/dist/cjs/SFNServiceConfig.js +35 -0
- package/dist/cjs/SFNServiceConfig.js.map +1 -0
- package/dist/cjs/index.d.ts +39 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +56 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/dts/Errors.d.ts +40 -0
- package/dist/dts/Errors.d.ts.map +1 -0
- package/dist/dts/SFNClientInstance.d.ts +24 -0
- package/dist/dts/SFNClientInstance.d.ts.map +1 -0
- package/dist/dts/SFNService.d.ts +189 -0
- package/dist/dts/SFNService.d.ts.map +1 -0
- package/dist/dts/SFNServiceConfig.d.ts +25 -0
- package/dist/dts/SFNServiceConfig.d.ts.map +1 -0
- package/dist/dts/index.d.ts +39 -0
- package/dist/dts/index.d.ts.map +1 -0
- package/dist/esm/Errors.js +38 -0
- package/dist/esm/Errors.js.map +1 -0
- package/dist/esm/SFNClientInstance.js +23 -0
- package/dist/esm/SFNClientInstance.js.map +1 -0
- package/dist/esm/SFNService.js +69 -0
- package/dist/esm/SFNService.js.map +1 -0
- package/dist/esm/SFNServiceConfig.js +31 -0
- package/dist/esm/SFNServiceConfig.js.map +1 -0
- package/dist/esm/index.js +27 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +4 -0
- package/package.json +60 -43
- package/src/Errors.ts +110 -0
- package/src/SFNClientInstance.ts +33 -0
- package/src/SFNService.ts +796 -0
- package/src/SFNServiceConfig.ts +51 -0
- package/src/index.ts +44 -0
- package/CHANGELOG.md +0 -79
- package/docgen.json +0 -8
- package/lib/Errors.js +0 -41
- package/lib/SFNClientInstance.d.ts +0 -31
- package/lib/SFNClientInstance.js +0 -57
- package/lib/SFNClientInstanceConfig.d.ts +0 -23
- package/lib/SFNClientInstanceConfig.js +0 -44
- package/lib/SFNService.d.ts +0 -250
- package/lib/SFNService.js +0 -125
- package/lib/esm/Errors.js +0 -38
- package/lib/esm/SFNClientInstance.js +0 -30
- package/lib/esm/SFNClientInstanceConfig.js +0 -40
- package/lib/esm/SFNService.js +0 -121
- package/lib/esm/index.js +0 -5
- package/lib/index.d.ts +0 -4
- package/lib/index.js +0 -21
- package/project.json +0 -77
- 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"}
|
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
|
-
"
|
|
9
|
-
|
|
10
|
-
"@
|
|
11
|
-
"@
|
|
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.
|
|
22
|
+
"effect": ">=3.0.4 <4.0.0"
|
|
26
23
|
},
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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);
|