@teamscala/service-boot 0.23.444 → 0.23.445

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/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "name": "@teamscala/service-boot",
8
8
  "type": "module",
9
- "version": "0.23.444",
9
+ "version": "0.23.445",
10
10
  "sideEffects": false,
11
11
  "imports": {
12
12
  "#service-boot/*": "./src/*",
@@ -48,7 +48,7 @@ mock.module("@teamscala/logger/app-loggers", () => ({
48
48
 
49
49
  mock.module("@teamscala/api-resend", () => ({
50
50
  createResendAdapter: () => ({ bridged: true }),
51
- sendEmail: async (_client: unknown, args: CapturedEmail) => {
51
+ emailsSend: async (_client: unknown, _params: unknown, args: CapturedEmail) => {
52
52
  capturedEmail = args;
53
53
  emailResolve?.(args);
54
54
  return { id: "re_test_123" };
@@ -8,12 +8,13 @@
8
8
  * the module-global @teamscala/api-resend/send-email wrapper a regen wiped;
9
9
  * failure routes through safe-fallback (fail-open-noisy).
10
10
  */
11
- import { createResendAdapter, sendEmail } from "@teamscala/api-resend";
11
+ import { createResendAdapter, emailsSend } from "@teamscala/api-resend";
12
12
  import { createSafeFallback } from "@teamscala/safe-fallback/create-safe-fallback";
13
13
 
14
14
  /** The Resend send body (from/to/subject + html/text/reply_to) — forwarded
15
- * to the adapter operation verbatim; nothing is assembled here. */
16
- export type ResendSendBody = Parameters<typeof sendEmail>[1];
15
+ * to the adapter operation verbatim; nothing is assembled here. Index 2 is
16
+ * the body arg; index 1 is the spec-derived params (headers) object. */
17
+ export type ResendSendBody = Parameters<typeof emailsSend>[2];
17
18
 
18
19
  export interface ResendSendResult {
19
20
  success: boolean;
@@ -31,7 +32,7 @@ const sendLayer = createSafeFallback<ResendSendResult>({
31
32
  export async function sendResendEmail(token: string, body: ResendSendBody): Promise<ResendSendResult> {
32
33
  const result = await sendLayer.call(async () => {
33
34
  const client = createResendAdapter({ apiKey: token });
34
- const res = await sendEmail(client, body);
35
+ const res = await emailsSend(client, {}, body);
35
36
  return { success: true, id: res.id } satisfies ResendSendResult;
36
37
  });
37
38
  return result;