@samva/email-sdk 0.2.0 → 0.3.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 +2 -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",
|
|
@@ -216,12 +217,11 @@ function samva(options) {
|
|
|
216
217
|
async send(message, context) {
|
|
217
218
|
if (context.signal?.aborted) throw abortReason(context.signal);
|
|
218
219
|
const payload = await toSamvaMessage(message);
|
|
219
|
-
const headers = context.idempotencyKey === void 0 ? void 0 : { "idempotency-key": context.idempotencyKey };
|
|
220
220
|
let result;
|
|
221
221
|
try {
|
|
222
222
|
result = await client.email.send(payload, {
|
|
223
223
|
...context.signal === void 0 ? {} : { signal: context.signal },
|
|
224
|
-
...
|
|
224
|
+
...context.idempotencyKey === void 0 ? {} : { idempotencyKey: context.idempotencyKey }
|
|
225
225
|
});
|
|
226
226
|
} catch (error) {
|
|
227
227
|
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.3.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.11.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@opencoredev/email-sdk": "^1.1.0",
|
|
54
|
-
"samva": "^0.
|
|
54
|
+
"samva": "^0.11.0"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=22"
|