@samva/email-sdk 0.2.0 → 0.4.0
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 +1 -1
- package/dist/index.mjs +3 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Provider-owned Samva community adapter for
|
|
4
4
|
[Email SDK](https://email-sdk.dev). It targets `@opencoredev/email-sdk@^1.1.0`
|
|
5
|
-
and `samva@^0.
|
|
5
|
+
and `samva@^0.11.0`.
|
|
6
6
|
|
|
7
7
|
This adapter is maintained by Samva as a community integration; it is not an
|
|
8
8
|
official built-in Email SDK adapter.
|
package/dist/index.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import { createClient } from "samva";
|
|
|
3
3
|
//#region src/failures.ts
|
|
4
4
|
const knownNotSentTags = /* @__PURE__ */ new Set([
|
|
5
5
|
"ConflictError",
|
|
6
|
+
"DeliveryUnavailableError",
|
|
6
7
|
"EmailChannelError",
|
|
7
8
|
"FlagDisabledError",
|
|
8
9
|
"ForbiddenError",
|
|
@@ -10,6 +11,7 @@ const knownNotSentTags = /* @__PURE__ */ new Set([
|
|
|
10
11
|
"PaymentRequiredError",
|
|
11
12
|
"RateLimitedError",
|
|
12
13
|
"ResourceNotFoundError",
|
|
14
|
+
"SenderNotReadyError",
|
|
13
15
|
"UnauthorizedError",
|
|
14
16
|
"ValidationError"
|
|
15
17
|
]);
|
|
@@ -216,12 +218,11 @@ function samva(options) {
|
|
|
216
218
|
async send(message, context) {
|
|
217
219
|
if (context.signal?.aborted) throw abortReason(context.signal);
|
|
218
220
|
const payload = await toSamvaMessage(message);
|
|
219
|
-
const headers = context.idempotencyKey === void 0 ? void 0 : { "idempotency-key": context.idempotencyKey };
|
|
220
221
|
let result;
|
|
221
222
|
try {
|
|
222
223
|
result = await client.email.send(payload, {
|
|
223
224
|
...context.signal === void 0 ? {} : { signal: context.signal },
|
|
224
|
-
...
|
|
225
|
+
...context.idempotencyKey === void 0 ? {} : { idempotencyKey: context.idempotencyKey }
|
|
225
226
|
});
|
|
226
227
|
} catch (error) {
|
|
227
228
|
if (isAbortFailure(error, context.signal)) throw abortReason(context.signal);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@samva/email-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Samva community adapter for Email SDK.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"email",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@opencoredev/email-sdk": "^1.1.0",
|
|
50
|
-
"samva": "^0.
|
|
50
|
+
"samva": "^0.13.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@opencoredev/email-sdk": "^1.1.0",
|
|
54
|
-
"samva": "^0.
|
|
54
|
+
"samva": "^0.13.0"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=22"
|