@teamscala/service-boot 0.23.410 → 0.23.411

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.410",
9
+ "version": "0.23.411",
10
10
  "sideEffects": false,
11
11
  "imports": {
12
12
  "#service-boot/*": "./src/*",
@@ -54,7 +54,7 @@ const originalFetch = globalThis.fetch;
54
54
  if (body.phone === "0-0-1-refuse") {
55
55
  return new Response("no", { status: 401 });
56
56
  }
57
- return Response.json({ message_id: "3EB07EE8TESTID" });
57
+ return Response.json({ ok: true, sent: true, messageId: "3EB07EE8TESTID" });
58
58
  };
59
59
 
60
60
  const { messagingWhatsappRouter } = await import("./messaging-whatsapp-router.ts");
@@ -154,7 +154,8 @@ export const messagingWhatsappRouter = {
154
154
  };
155
155
  }
156
156
  const body = (await response.json().catch(() => null)) as {
157
- message_id?: string;
157
+ // The Rust handler answers { ok, sent, messageId } (camelCase).
158
+ messageId?: string;
158
159
  error?: string;
159
160
  } | null;
160
161
  if (!response.ok) {
@@ -170,11 +171,11 @@ export const messagingWhatsappRouter = {
170
171
  // parse_message_id contract).
171
172
  log.info("[fn.messagingWhatsappSend] sent", {
172
173
  phone,
173
- message_id: body?.message_id ?? null,
174
+ message_id: body?.messageId ?? null,
174
175
  });
175
176
  return {
176
177
  ok: true as const,
177
- message_id: body?.message_id ?? null,
178
+ message_id: body?.messageId ?? null,
178
179
  };
179
180
  } catch (err) {
180
181
  const errorMessage = err instanceof Error ? err.message : String(err);