@effect-aws/client-ses 1.1.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/SESClientInstance/package.json +6 -0
- package/SESService/package.json +6 -0
- package/SESServiceConfig/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 +42 -0
- package/dist/cjs/Errors.js.map +1 -0
- package/dist/cjs/SESClientInstance.d.ts +24 -0
- package/dist/cjs/SESClientInstance.d.ts.map +1 -0
- package/dist/cjs/SESClientInstance.js +50 -0
- package/dist/cjs/SESClientInstance.js.map +1 -0
- package/dist/cjs/SESService.d.ts +325 -0
- package/dist/cjs/SESService.d.ts.map +1 -0
- package/dist/cjs/SESService.js +130 -0
- package/dist/cjs/SESService.js.map +1 -0
- package/dist/cjs/SESServiceConfig.d.ts +25 -0
- package/dist/cjs/SESServiceConfig.d.ts.map +1 -0
- package/dist/cjs/SESServiceConfig.js +35 -0
- package/dist/cjs/SESServiceConfig.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 +41 -0
- package/dist/dts/Errors.d.ts.map +1 -0
- package/dist/dts/SESClientInstance.d.ts +24 -0
- package/dist/dts/SESClientInstance.d.ts.map +1 -0
- package/dist/dts/SESService.d.ts +325 -0
- package/dist/dts/SESService.d.ts.map +1 -0
- package/dist/dts/SESServiceConfig.d.ts +25 -0
- package/dist/dts/SESServiceConfig.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 +39 -0
- package/dist/esm/Errors.js.map +1 -0
- package/dist/esm/SESClientInstance.js +23 -0
- package/dist/esm/SESClientInstance.js.map +1 -0
- package/dist/esm/SESService.js +103 -0
- package/dist/esm/SESService.js.map +1 -0
- package/dist/esm/SESServiceConfig.js +31 -0
- package/dist/esm/SESServiceConfig.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 +119 -0
- package/src/SESClientInstance.ts +33 -0
- package/src/SESService.ts +1235 -0
- package/src/SESServiceConfig.ts +51 -0
- package/src/index.ts +44 -0
- package/CHANGELOG.md +0 -13
- package/docgen.json +0 -8
- package/lib/Errors.js +0 -42
- package/lib/SESClientInstance.d.ts +0 -31
- package/lib/SESClientInstance.js +0 -57
- package/lib/SESClientInstanceConfig.d.ts +0 -23
- package/lib/SESClientInstanceConfig.js +0 -44
- package/lib/SESService.d.ts +0 -420
- package/lib/SESService.js +0 -159
- package/lib/esm/Errors.js +0 -39
- package/lib/esm/SESClientInstance.js +0 -30
- package/lib/esm/SESClientInstanceConfig.js +0 -40
- package/lib/esm/SESService.js +0 -155
- 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,31 @@
|
|
|
1
|
+
import { ServiceLogger } from "@effect-aws/commons";
|
|
2
|
+
import { Effect, FiberRef, Layer } from "effect";
|
|
3
|
+
import { dual } from "effect/Function";
|
|
4
|
+
import { globalValue } from "effect/GlobalValue";
|
|
5
|
+
/**
|
|
6
|
+
* @since 1.0.0
|
|
7
|
+
* @category ses service config
|
|
8
|
+
*/
|
|
9
|
+
const currentSESServiceConfig = globalValue("@effect-aws/client-ses/currentSESServiceConfig", () => FiberRef.unsafeMake({}));
|
|
10
|
+
/**
|
|
11
|
+
* @since 1.0.0
|
|
12
|
+
* @category ses service config
|
|
13
|
+
*/
|
|
14
|
+
export const withSESServiceConfig = dual(2, (effect, config) => Effect.locally(effect, currentSESServiceConfig, config));
|
|
15
|
+
/**
|
|
16
|
+
* @since 1.0.0
|
|
17
|
+
* @category ses service config
|
|
18
|
+
*/
|
|
19
|
+
export const setSESServiceConfig = (config) => Layer.locallyScoped(currentSESServiceConfig, config);
|
|
20
|
+
/**
|
|
21
|
+
* @since 1.0.0
|
|
22
|
+
* @category adapters
|
|
23
|
+
*/
|
|
24
|
+
export const toSESClientConfig = Effect.gen(function* () {
|
|
25
|
+
const { logger: serviceLogger, ...config } = yield* FiberRef.get(currentSESServiceConfig);
|
|
26
|
+
const logger = serviceLogger === true
|
|
27
|
+
? yield* ServiceLogger.toClientLogger(ServiceLogger.defaultServiceLogger)
|
|
28
|
+
: (serviceLogger ? yield* ServiceLogger.toClientLogger(ServiceLogger.make(serviceLogger)) : undefined);
|
|
29
|
+
return { logger, ...config };
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=SESServiceConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SESServiceConfig.js","sourceRoot":"","sources":["../../src/SESServiceConfig.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD;;;GAGG;AACH,MAAM,uBAAuB,GAAG,WAAW,CACzC,gDAAgD,EAChD,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAoB,EAAE,CAAC,CACjD,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAG7B,IAAI,CACN,CAAC,EACD,CAAU,MAA8B,EAAE,MAAyB,EAA0B,EAAE,CAC7F,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,uBAAuB,EAAE,MAAM,CAAC,CAC1D,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,MAAyB,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC;AAEvH;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAmC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IACnF,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;IAE1F,MAAM,MAAM,GAAG,aAAa,KAAK,IAAI;QACnC,CAAC,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,cAAc,CAAC,aAAa,CAAC,oBAAoB,CAAC;QACzE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,cAAc,CAAC,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAEzG,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;AAC/B,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import { SESService } from "./SESService.js";
|
|
5
|
+
/**
|
|
6
|
+
* @since 1.0.0
|
|
7
|
+
*/
|
|
8
|
+
export * from "./Errors.js";
|
|
9
|
+
/**
|
|
10
|
+
* @since 1.0.0
|
|
11
|
+
*/
|
|
12
|
+
export * as SESClientInstance from "./SESClientInstance.js";
|
|
13
|
+
/**
|
|
14
|
+
* @since 1.0.0
|
|
15
|
+
*/
|
|
16
|
+
export * as SESServiceConfig from "./SESServiceConfig.js";
|
|
17
|
+
/**
|
|
18
|
+
* @since 1.0.0
|
|
19
|
+
*/
|
|
20
|
+
export * from "./SESService.js";
|
|
21
|
+
/**
|
|
22
|
+
* @since 1.0.0
|
|
23
|
+
* @category exports
|
|
24
|
+
* @alias SESService
|
|
25
|
+
*/
|
|
26
|
+
export const SES = SESService;
|
|
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-ses",
|
|
3
|
+
"version": "1.9.3",
|
|
4
|
+
"description": "Effectful AWS SES client",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "github:floydspace/effect-aws",
|
|
9
|
+
"directory": "packages/client-ses"
|
|
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-ses",
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@aws-sdk/client-ses": "^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
|
+
"./SESClientInstance": {
|
|
40
|
+
"types": "./dist/dts/SESClientInstance.d.ts",
|
|
41
|
+
"import": "./dist/esm/SESClientInstance.js",
|
|
42
|
+
"default": "./dist/cjs/SESClientInstance.js"
|
|
43
|
+
},
|
|
44
|
+
"./SESService": {
|
|
45
|
+
"types": "./dist/dts/SESService.d.ts",
|
|
46
|
+
"import": "./dist/esm/SESService.js",
|
|
47
|
+
"default": "./dist/cjs/SESService.js"
|
|
48
|
+
},
|
|
49
|
+
"./SESServiceConfig": {
|
|
50
|
+
"types": "./dist/dts/SESServiceConfig.d.ts",
|
|
51
|
+
"import": "./dist/esm/SESServiceConfig.js",
|
|
52
|
+
"default": "./dist/cjs/SESServiceConfig.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
|
+
"SESClientInstance": [
|
|
61
|
+
"./dist/dts/SESClientInstance.d.ts"
|
|
62
|
+
],
|
|
63
|
+
"SESService": [
|
|
64
|
+
"./dist/dts/SESService.d.ts"
|
|
65
|
+
],
|
|
66
|
+
"SESServiceConfig": [
|
|
67
|
+
"./dist/dts/SESServiceConfig.d.ts"
|
|
68
|
+
]
|
|
69
|
+
}
|
|
53
70
|
}
|
|
54
71
|
}
|
package/src/Errors.ts
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AccountSendingPausedException,
|
|
3
|
+
AlreadyExistsException,
|
|
4
|
+
CannotDeleteException,
|
|
5
|
+
ConfigurationSetAlreadyExistsException,
|
|
6
|
+
ConfigurationSetDoesNotExistException,
|
|
7
|
+
ConfigurationSetSendingPausedException,
|
|
8
|
+
CustomVerificationEmailInvalidContentException,
|
|
9
|
+
CustomVerificationEmailTemplateAlreadyExistsException,
|
|
10
|
+
CustomVerificationEmailTemplateDoesNotExistException,
|
|
11
|
+
EventDestinationAlreadyExistsException,
|
|
12
|
+
EventDestinationDoesNotExistException,
|
|
13
|
+
FromEmailAddressNotVerifiedException,
|
|
14
|
+
InvalidCloudWatchDestinationException,
|
|
15
|
+
InvalidConfigurationSetException,
|
|
16
|
+
InvalidDeliveryOptionsException,
|
|
17
|
+
InvalidFirehoseDestinationException,
|
|
18
|
+
InvalidLambdaFunctionException,
|
|
19
|
+
InvalidPolicyException,
|
|
20
|
+
InvalidRenderingParameterException,
|
|
21
|
+
InvalidS3ConfigurationException,
|
|
22
|
+
InvalidSNSDestinationException,
|
|
23
|
+
InvalidSnsTopicException,
|
|
24
|
+
InvalidTemplateException,
|
|
25
|
+
InvalidTrackingOptionsException,
|
|
26
|
+
LimitExceededException,
|
|
27
|
+
MailFromDomainNotVerifiedException,
|
|
28
|
+
MessageRejected,
|
|
29
|
+
MissingRenderingAttributeException,
|
|
30
|
+
ProductionAccessNotGrantedException,
|
|
31
|
+
RuleDoesNotExistException,
|
|
32
|
+
RuleSetDoesNotExistException,
|
|
33
|
+
TemplateDoesNotExistException,
|
|
34
|
+
TrackingOptionsAlreadyExistsException,
|
|
35
|
+
TrackingOptionsDoesNotExistException,
|
|
36
|
+
} from "@aws-sdk/client-ses";
|
|
37
|
+
import type { TaggedException } from "@effect-aws/commons";
|
|
38
|
+
import { SdkError as CommonSdkError } from "@effect-aws/commons";
|
|
39
|
+
|
|
40
|
+
export const AllServiceErrors = [
|
|
41
|
+
"AccountSendingPausedException",
|
|
42
|
+
"AlreadyExistsException",
|
|
43
|
+
"CannotDeleteException",
|
|
44
|
+
"ConfigurationSetAlreadyExistsException",
|
|
45
|
+
"ConfigurationSetDoesNotExistException",
|
|
46
|
+
"ConfigurationSetSendingPausedException",
|
|
47
|
+
"CustomVerificationEmailInvalidContentException",
|
|
48
|
+
"CustomVerificationEmailTemplateAlreadyExistsException",
|
|
49
|
+
"CustomVerificationEmailTemplateDoesNotExistException",
|
|
50
|
+
"EventDestinationAlreadyExistsException",
|
|
51
|
+
"EventDestinationDoesNotExistException",
|
|
52
|
+
"FromEmailAddressNotVerifiedException",
|
|
53
|
+
"InvalidCloudWatchDestinationException",
|
|
54
|
+
"InvalidConfigurationSetException",
|
|
55
|
+
"InvalidDeliveryOptionsException",
|
|
56
|
+
"InvalidFirehoseDestinationException",
|
|
57
|
+
"InvalidLambdaFunctionException",
|
|
58
|
+
"InvalidPolicyException",
|
|
59
|
+
"InvalidRenderingParameterException",
|
|
60
|
+
"InvalidS3ConfigurationException",
|
|
61
|
+
"InvalidSNSDestinationException",
|
|
62
|
+
"InvalidSnsTopicException",
|
|
63
|
+
"InvalidTemplateException",
|
|
64
|
+
"InvalidTrackingOptionsException",
|
|
65
|
+
"LimitExceededException",
|
|
66
|
+
"MailFromDomainNotVerifiedException",
|
|
67
|
+
"MessageRejected",
|
|
68
|
+
"MissingRenderingAttributeException",
|
|
69
|
+
"ProductionAccessNotGrantedException",
|
|
70
|
+
"RuleDoesNotExistException",
|
|
71
|
+
"RuleSetDoesNotExistException",
|
|
72
|
+
"TemplateDoesNotExistException",
|
|
73
|
+
"TrackingOptionsAlreadyExistsException",
|
|
74
|
+
"TrackingOptionsDoesNotExistException",
|
|
75
|
+
] as const;
|
|
76
|
+
|
|
77
|
+
export type AccountSendingPausedError = TaggedException<AccountSendingPausedException>;
|
|
78
|
+
export type AlreadyExistsError = TaggedException<AlreadyExistsException>;
|
|
79
|
+
export type CannotDeleteError = TaggedException<CannotDeleteException>;
|
|
80
|
+
export type ConfigurationSetAlreadyExistsError = TaggedException<ConfigurationSetAlreadyExistsException>;
|
|
81
|
+
export type ConfigurationSetDoesNotExistError = TaggedException<ConfigurationSetDoesNotExistException>;
|
|
82
|
+
export type ConfigurationSetSendingPausedError = TaggedException<ConfigurationSetSendingPausedException>;
|
|
83
|
+
export type CustomVerificationEmailInvalidContentError = TaggedException<
|
|
84
|
+
CustomVerificationEmailInvalidContentException
|
|
85
|
+
>;
|
|
86
|
+
export type CustomVerificationEmailTemplateAlreadyExistsError = TaggedException<
|
|
87
|
+
CustomVerificationEmailTemplateAlreadyExistsException
|
|
88
|
+
>;
|
|
89
|
+
export type CustomVerificationEmailTemplateDoesNotExistError = TaggedException<
|
|
90
|
+
CustomVerificationEmailTemplateDoesNotExistException
|
|
91
|
+
>;
|
|
92
|
+
export type EventDestinationAlreadyExistsError = TaggedException<EventDestinationAlreadyExistsException>;
|
|
93
|
+
export type EventDestinationDoesNotExistError = TaggedException<EventDestinationDoesNotExistException>;
|
|
94
|
+
export type FromEmailAddressNotVerifiedError = TaggedException<FromEmailAddressNotVerifiedException>;
|
|
95
|
+
export type InvalidCloudWatchDestinationError = TaggedException<InvalidCloudWatchDestinationException>;
|
|
96
|
+
export type InvalidConfigurationSetError = TaggedException<InvalidConfigurationSetException>;
|
|
97
|
+
export type InvalidDeliveryOptionsError = TaggedException<InvalidDeliveryOptionsException>;
|
|
98
|
+
export type InvalidFirehoseDestinationError = TaggedException<InvalidFirehoseDestinationException>;
|
|
99
|
+
export type InvalidLambdaFunctionError = TaggedException<InvalidLambdaFunctionException>;
|
|
100
|
+
export type InvalidPolicyError = TaggedException<InvalidPolicyException>;
|
|
101
|
+
export type InvalidRenderingParameterError = TaggedException<InvalidRenderingParameterException>;
|
|
102
|
+
export type InvalidS3ConfigurationError = TaggedException<InvalidS3ConfigurationException>;
|
|
103
|
+
export type InvalidSNSDestinationError = TaggedException<InvalidSNSDestinationException>;
|
|
104
|
+
export type InvalidSnsTopicError = TaggedException<InvalidSnsTopicException>;
|
|
105
|
+
export type InvalidTemplateError = TaggedException<InvalidTemplateException>;
|
|
106
|
+
export type InvalidTrackingOptionsError = TaggedException<InvalidTrackingOptionsException>;
|
|
107
|
+
export type LimitExceededError = TaggedException<LimitExceededException>;
|
|
108
|
+
export type MailFromDomainNotVerifiedError = TaggedException<MailFromDomainNotVerifiedException>;
|
|
109
|
+
export type MessageRejectedError = TaggedException<MessageRejected>;
|
|
110
|
+
export type MissingRenderingAttributeError = TaggedException<MissingRenderingAttributeException>;
|
|
111
|
+
export type ProductionAccessNotGrantedError = TaggedException<ProductionAccessNotGrantedException>;
|
|
112
|
+
export type RuleDoesNotExistError = TaggedException<RuleDoesNotExistException>;
|
|
113
|
+
export type RuleSetDoesNotExistError = TaggedException<RuleSetDoesNotExistException>;
|
|
114
|
+
export type TemplateDoesNotExistError = TaggedException<TemplateDoesNotExistException>;
|
|
115
|
+
export type TrackingOptionsAlreadyExistsError = TaggedException<TrackingOptionsAlreadyExistsException>;
|
|
116
|
+
export type TrackingOptionsDoesNotExistError = TaggedException<TrackingOptionsDoesNotExistException>;
|
|
117
|
+
|
|
118
|
+
export type SdkError = CommonSdkError;
|
|
119
|
+
export const SdkError = CommonSdkError;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import { SESClient } from "@aws-sdk/client-ses";
|
|
5
|
+
import { Context, Effect, Layer } from "effect";
|
|
6
|
+
import * as SESServiceConfig from "./SESServiceConfig.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @since 1.0.0
|
|
10
|
+
* @category tags
|
|
11
|
+
*/
|
|
12
|
+
export class SESClientInstance extends Context.Tag(
|
|
13
|
+
"@effect-aws/client-ses/SESClientInstance",
|
|
14
|
+
)<SESClientInstance, SESClient>() {}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @since 1.0.0
|
|
18
|
+
* @category constructors
|
|
19
|
+
*/
|
|
20
|
+
export const make = Effect.flatMap(
|
|
21
|
+
SESServiceConfig.toSESClientConfig,
|
|
22
|
+
(config) =>
|
|
23
|
+
Effect.acquireRelease(
|
|
24
|
+
Effect.sync(() => new SESClient(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(SESClientInstance, make);
|