@openclaw/sms 2026.10.10 → 2026.11.5-beta.1
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/dist/.setup/{media-CXXQruyp.mjs → media-BF6-nsm2.mjs} +15 -31
- package/dist/.setup/{twilio-DlIKNs5E.mjs → twilio-07yIWayE.mjs} +37 -85
- package/dist/.source-module-urls/795a0e3f2ca7aa49f58abd6277a5075ff6437cd84711eea7629da8f4ff8f2b43.json +1 -1
- package/dist/channel-plugin-api.js +284 -368
- package/node_modules/zod/package.json +1 -1
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +6 -0
- package/node_modules/zod/src/v4/core/compile.ts +9 -0
- package/node_modules/zod/src/v4/core/schemas.ts +35 -1
- package/node_modules/zod/src/v4/core/util.ts +13 -0
- package/node_modules/zod/src/v4/core/versions.ts +1 -1
- package/node_modules/zod/v4/core/compile.cjs +8 -0
- package/node_modules/zod/v4/core/compile.js +8 -0
- package/node_modules/zod/v4/core/schemas.cjs +30 -0
- package/node_modules/zod/v4/core/schemas.d.cts +3 -1
- package/node_modules/zod/v4/core/schemas.d.ts +3 -1
- package/node_modules/zod/v4/core/schemas.js +30 -0
- package/node_modules/zod/v4/core/util.cjs +15 -0
- package/node_modules/zod/v4/core/util.d.cts +2 -0
- package/node_modules/zod/v4/core/util.d.ts +2 -0
- package/node_modules/zod/v4/core/util.js +14 -0
- package/node_modules/zod/v4/core/versions.cjs +1 -1
- package/node_modules/zod/v4/core/versions.js +1 -1
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as getSmsRuntime } from "./runtime-A8rnEOmw.mjs";
|
|
2
|
-
import { h as assertSmsCredentialOwnerAvailable, n as TWILIO_MMS_MAX_BYTES } from "./twilio-
|
|
2
|
+
import { h as assertSmsCredentialOwnerAvailable, n as TWILIO_MMS_MAX_BYTES } from "./twilio-07yIWayE.mjs";
|
|
3
3
|
import { collectErrorGraphCandidates } from "openclaw/plugin-sdk/error-runtime";
|
|
4
4
|
import { resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
@@ -149,7 +149,6 @@ async function prepareHostedSmsMedia(params) {
|
|
|
149
149
|
});
|
|
150
150
|
const store = getHostedSmsMediaStore(params.account.accountId);
|
|
151
151
|
const captionByteLength = params.captionByteLength ?? 0;
|
|
152
|
-
if (!Number.isSafeInteger(captionByteLength) || captionByteLength < 0) throw new Error("MMS caption byte length must be a non-negative integer.");
|
|
153
152
|
const aggregateMediaBudget = TWILIO_MMS_IMAGE_MAX_BYTES - captionByteLength - 1;
|
|
154
153
|
if (aggregateMediaBudget < 1) throw new Error("Twilio MMS caption leaves no room for an attachment below 5,000,000 bytes.");
|
|
155
154
|
const stagedUrl = new URL(await store.prepareUrl({
|
|
@@ -157,32 +156,20 @@ async function prepareHostedSmsMedia(params) {
|
|
|
157
156
|
routePath: route.localRoutePath,
|
|
158
157
|
publicBaseUrl: route.publicBaseUrl,
|
|
159
158
|
maxBytes: Math.min(params.account.mediaMaxBytes ?? aggregateMediaBudget, aggregateMediaBudget),
|
|
160
|
-
mediaAccess: resolveOutboundMediaAccess(params)
|
|
159
|
+
mediaAccess: resolveOutboundMediaAccess(params),
|
|
160
|
+
validateBeforePersist: (media) => {
|
|
161
|
+
const contentType = media.contentType?.split(";", 1)[0]?.trim().toLowerCase();
|
|
162
|
+
if (!contentType || !Object.hasOwn(TWILIO_MMS_EXTENSION_BY_TYPE, contentType)) throw new Error(`Twilio MMS does not support media type ${contentType || "unknown content type"}.`);
|
|
163
|
+
if (captionByteLength > 0 && TWILIO_MMS_MEDIA_ONLY_TYPES.has(contentType)) throw new Error(`Twilio MMS media type ${contentType} must be sent without a caption.`);
|
|
164
|
+
const maxBytes = TWILIO_MMS_LARGE_MEDIA_TYPES.has(contentType) ? TWILIO_MMS_IMAGE_MAX_BYTES : TWILIO_MMS_OTHER_MAX_BYTES;
|
|
165
|
+
if (media.buffer.byteLength > maxBytes) throw new Error(`Twilio MMS media exceeds the ${maxBytes.toLocaleString("en-US")} byte limit for ${contentType}.`);
|
|
166
|
+
if (media.buffer.byteLength + captionByteLength >= TWILIO_MMS_IMAGE_MAX_BYTES) throw new Error("Twilio MMS attachment and caption must total less than 5,000,000 bytes.");
|
|
167
|
+
}
|
|
161
168
|
}));
|
|
162
169
|
const id = stagedUrl.pathname.split("/").at(-1) ?? "";
|
|
163
170
|
const token = stagedUrl.searchParams.get("token");
|
|
164
171
|
if (!SMS_OUTBOUND_MEDIA_ID_RE.test(id) || !token) throw new Error("Hosted MMS media URL could not be prepared.");
|
|
165
172
|
const cleanup = () => store.delete(id);
|
|
166
|
-
const entry = await store.read(id);
|
|
167
|
-
if (!entry) throw new Error("Hosted MMS media expired before it could be sent.");
|
|
168
|
-
const contentType = entry.metadata.contentType?.split(";", 1)[0]?.trim().toLowerCase();
|
|
169
|
-
if (!contentType || !Object.hasOwn(TWILIO_MMS_EXTENSION_BY_TYPE, contentType)) {
|
|
170
|
-
await cleanup();
|
|
171
|
-
throw new Error(`Twilio MMS does not support media type ${contentType || "unknown content type"}.`);
|
|
172
|
-
}
|
|
173
|
-
if (captionByteLength > 0 && TWILIO_MMS_MEDIA_ONLY_TYPES.has(contentType)) {
|
|
174
|
-
await cleanup();
|
|
175
|
-
throw new Error(`Twilio MMS media type ${contentType} must be sent without a caption.`);
|
|
176
|
-
}
|
|
177
|
-
const maxBytes = TWILIO_MMS_LARGE_MEDIA_TYPES.has(contentType) ? TWILIO_MMS_IMAGE_MAX_BYTES : TWILIO_MMS_OTHER_MAX_BYTES;
|
|
178
|
-
if (entry.metadata.byteLength > maxBytes) {
|
|
179
|
-
await cleanup();
|
|
180
|
-
throw new Error(`Twilio MMS media exceeds the ${maxBytes.toLocaleString("en-US")} byte limit for ${contentType || "unknown content type"}.`);
|
|
181
|
-
}
|
|
182
|
-
if (entry.metadata.byteLength + captionByteLength >= TWILIO_MMS_IMAGE_MAX_BYTES) {
|
|
183
|
-
await cleanup();
|
|
184
|
-
throw new Error("Twilio MMS attachment and caption must total less than 5,000,000 bytes.");
|
|
185
|
-
}
|
|
186
173
|
const tokenParam = `${SMS_OUTBOUND_MEDIA_TOKEN_PARAM_PREFIX}_${id}`;
|
|
187
174
|
const querySeparator = route.publicSearch ? "&" : "?";
|
|
188
175
|
return {
|
|
@@ -235,19 +222,16 @@ async function materializeSmsInboundMedia(params) {
|
|
|
235
222
|
const savedPaths = [];
|
|
236
223
|
const cleanup = createInboundMediaCleanup(savedPaths);
|
|
237
224
|
const declaredUnavailableCount = params.msg.unavailableMediaCount ?? 0;
|
|
238
|
-
|
|
239
|
-
body:
|
|
225
|
+
const withoutMedia = (count) => ({
|
|
226
|
+
body: count > 0 ? inboundMediaUnavailableBody(params.msg.body, count) : params.msg.body,
|
|
240
227
|
media: [],
|
|
241
228
|
cleanup
|
|
242
|
-
};
|
|
229
|
+
});
|
|
230
|
+
if (params.msg.media.length === 0) return withoutMedia(declaredUnavailableCount);
|
|
243
231
|
const callbackAccountSid = params.msg.accountSid;
|
|
244
232
|
if (!callbackAccountSid || callbackAccountSid !== params.account.accountSid) {
|
|
245
233
|
params.log?.warn?.(`Refused Twilio MMS attachments for ${params.msg.messageSid}: webhook account mismatch`);
|
|
246
|
-
return
|
|
247
|
-
body: inboundMediaUnavailableBody(params.msg.body, declaredUnavailableCount + params.msg.media.length),
|
|
248
|
-
media: [],
|
|
249
|
-
cleanup
|
|
250
|
-
};
|
|
234
|
+
return withoutMedia(declaredUnavailableCount + params.msg.media.length);
|
|
251
235
|
}
|
|
252
236
|
let remainingBytes = TWILIO_MMS_MAX_BYTES;
|
|
253
237
|
let unavailableCount = declaredUnavailableCount;
|
|
@@ -9,7 +9,6 @@ import { isIP } from "node:net";
|
|
|
9
9
|
import { fetchWithSsrFGuard, isBlockedHostnameOrIp } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
10
10
|
import { createHmac } from "node:crypto";
|
|
11
11
|
import * as querystring from "node:querystring";
|
|
12
|
-
import { captureEffectAuthority } from "openclaw/plugin-sdk/fetch-runtime";
|
|
13
12
|
import { redactToolPayloadText } from "openclaw/plugin-sdk/logging-core";
|
|
14
13
|
import { readResponseTextPrefix, readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
|
|
15
14
|
import { safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
|
|
@@ -234,14 +233,6 @@ function firstStringish(value) {
|
|
|
234
233
|
if (typeof first === "string") return first;
|
|
235
234
|
return typeof first === "number" ? String(first) : "";
|
|
236
235
|
}
|
|
237
|
-
function parseTwilioApiError(text) {
|
|
238
|
-
const record = asNullableObjectRecord(safeParseJson(text));
|
|
239
|
-
if (!record) return {};
|
|
240
|
-
return {
|
|
241
|
-
code: typeof record.code === "number" ? record.code : void 0,
|
|
242
|
-
message: typeof record.message === "string" ? record.message : void 0
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
236
|
function parseTwilioSuccessPayload(text) {
|
|
246
237
|
if (!text.trim()) return {};
|
|
247
238
|
let parsed;
|
|
@@ -259,49 +250,27 @@ function parseTwilioSuccessPayload(text) {
|
|
|
259
250
|
status: typeof record.status === "string" ? record.status : void 0
|
|
260
251
|
};
|
|
261
252
|
}
|
|
262
|
-
function requestSearch(req) {
|
|
263
|
-
return URL.parse(req.url ?? "/", "http://localhost")?.search ?? "";
|
|
264
|
-
}
|
|
265
|
-
function stripUrlFragment(url) {
|
|
266
|
-
const hashIndex = url.indexOf("#");
|
|
267
|
-
return hashIndex === -1 ? url : url.slice(0, hashIndex);
|
|
268
|
-
}
|
|
269
253
|
function resolveTwilioWebhookSignatureUrl(params) {
|
|
270
|
-
const
|
|
254
|
+
const hashIndex = params.publicWebhookUrl.indexOf("#");
|
|
255
|
+
const signatureBaseUrl = hashIndex === -1 ? params.publicWebhookUrl : params.publicWebhookUrl.slice(0, hashIndex);
|
|
271
256
|
if (signatureBaseUrl.includes("?")) return signatureBaseUrl;
|
|
272
|
-
const search =
|
|
257
|
+
const search = URL.parse(params.req.url ?? "/", "http://localhost")?.search ?? "";
|
|
273
258
|
if (!search) return signatureBaseUrl;
|
|
274
259
|
return `${signatureBaseUrl}${search}`;
|
|
275
260
|
}
|
|
276
261
|
var TwilioSmsApiError = class extends Error {
|
|
277
262
|
constructor(httpStatus, responseText, operation = "send") {
|
|
278
263
|
const redactedResponseText = redactToolPayloadText(responseText);
|
|
279
|
-
const
|
|
280
|
-
const detail =
|
|
264
|
+
const record = asNullableObjectRecord(safeParseJson(redactedResponseText));
|
|
265
|
+
const detail = typeof record?.message === "string" ? record.message : redactedResponseText || "unknown";
|
|
281
266
|
super(`Twilio SMS ${operation} failed (${httpStatus}): ${detail}`);
|
|
282
267
|
this.name = "TwilioSmsApiError";
|
|
283
|
-
this.httpStatus = httpStatus;
|
|
284
|
-
this.responseText = redactedResponseText;
|
|
285
|
-
this.twilioCode = parsed.code;
|
|
286
268
|
}
|
|
287
269
|
};
|
|
288
|
-
function parseTwilioFormBody(body) {
|
|
289
|
-
const parsed = querystring.parse(body);
|
|
290
|
-
const out = {};
|
|
291
|
-
for (const [key, value] of Object.entries(parsed)) out[key] = firstString(value);
|
|
292
|
-
return out;
|
|
293
|
-
}
|
|
294
|
-
function computeTwilioSignature(params) {
|
|
295
|
-
const data = params.url + Object.keys(params.form).toSorted().map((key) => `${key}${params.form[key] ?? ""}`).join("");
|
|
296
|
-
return createHmac("sha1", params.authToken).update(data).digest("base64");
|
|
297
|
-
}
|
|
298
270
|
function verifyTwilioSignature(params) {
|
|
299
271
|
if (!params.signature || !params.url || !params.authToken) return false;
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
authToken: params.authToken,
|
|
303
|
-
form: params.form
|
|
304
|
-
}));
|
|
272
|
+
const data = params.url + Object.keys(params.form).toSorted().map((key) => `${key}${params.form[key] ?? ""}`).join("");
|
|
273
|
+
return safeEqualSecret(params.signature, createHmac("sha1", params.authToken).update(data).digest("base64"));
|
|
305
274
|
}
|
|
306
275
|
function parseTwilioInboundFrom(raw) {
|
|
307
276
|
const trimmed = raw.trim();
|
|
@@ -355,11 +324,15 @@ function resolveTwilioMessageSid(form) {
|
|
|
355
324
|
return firstTrimmedString(form.MessageSid) || firstTrimmedString(form.SmsSid) || firstTrimmedString(form.SmsMessageSid);
|
|
356
325
|
}
|
|
357
326
|
async function readTwilioWebhookForm(req) {
|
|
358
|
-
|
|
327
|
+
const body = await readRequestBodyWithLimit(req, {
|
|
359
328
|
maxBytes: WEBHOOK_BODY_LIMIT_BYTES,
|
|
360
329
|
timeoutMs: WEBHOOK_BODY_TIMEOUT_MS,
|
|
361
330
|
destroyOnLimit: false
|
|
362
|
-
})
|
|
331
|
+
});
|
|
332
|
+
const parsed = querystring.parse(body);
|
|
333
|
+
const out = {};
|
|
334
|
+
for (const [key, value] of Object.entries(parsed)) out[key] = firstString(value);
|
|
335
|
+
return out;
|
|
363
336
|
}
|
|
364
337
|
const TWIML_CONTENT_TYPE = "text/xml; charset=utf-8";
|
|
365
338
|
function respondTwiml(res, statusCode, body = "") {
|
|
@@ -370,14 +343,11 @@ function respondTwiml(res, statusCode, body = "") {
|
|
|
370
343
|
function basicAuthHeader(account) {
|
|
371
344
|
return `Basic ${Buffer.from(`${account.accountSid}:${account.authToken}`).toString("base64")}`;
|
|
372
345
|
}
|
|
373
|
-
function appendTruncatedResponseSuffix(text) {
|
|
374
|
-
return `${text.trimEnd()}${TRUNCATED_RESPONSE_SUFFIX}`;
|
|
375
|
-
}
|
|
376
346
|
async function readTwilioApiResponseText(response) {
|
|
377
347
|
const maxBytes = response.ok ? TWILIO_API_SUCCESS_BODY_LIMIT_BYTES : TWILIO_API_ERROR_BODY_LIMIT_BYTES;
|
|
378
348
|
if (!response.ok) {
|
|
379
349
|
const prefix = await readResponseTextPrefix(response, maxBytes);
|
|
380
|
-
return prefix.truncated ?
|
|
350
|
+
return prefix.truncated ? `${prefix.text.trimEnd()}${TRUNCATED_RESPONSE_SUFFIX}` : prefix.text;
|
|
381
351
|
}
|
|
382
352
|
const body = await readResponseWithLimit(response, maxBytes, { onOverflow: ({ size, maxBytes: limit }) => /* @__PURE__ */ new Error(`Twilio SMS API response body too large: ${size} bytes (limit: ${limit} bytes)`) });
|
|
383
353
|
return new TextDecoder().decode(body);
|
|
@@ -400,32 +370,23 @@ async function requestTwilioApi(params) {
|
|
|
400
370
|
authorization: basicAuthHeader(params.account)
|
|
401
371
|
}
|
|
402
372
|
};
|
|
403
|
-
let
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
373
|
+
let requestDispatched = false;
|
|
374
|
+
const { response, release } = await fetchWithSsrFGuard({
|
|
375
|
+
url: url.toString(),
|
|
376
|
+
init,
|
|
377
|
+
beforeRequest: () => {
|
|
378
|
+
if (requestDispatched) {
|
|
379
|
+
assertSmsCredentialOwnerAvailable(params.account);
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
assertTwilioRequestCredentialsAvailable(params.account);
|
|
383
|
+
requestDispatched = true;
|
|
384
|
+
},
|
|
385
|
+
auditContext: "sms-twilio-api",
|
|
386
|
+
policy: { allowedHostnames: [params.api === "accounts" ? TWILIO_API_HOSTNAME : TWILIO_MESSAGING_HOSTNAME] },
|
|
387
|
+
requireHttps: true,
|
|
388
|
+
timeoutMs: params.timeoutMs ?? TWILIO_API_TIMEOUT_MS
|
|
409
389
|
});
|
|
410
|
-
else {
|
|
411
|
-
let requestDispatched = false;
|
|
412
|
-
({response, release} = await fetchWithSsrFGuard({
|
|
413
|
-
url: url.toString(),
|
|
414
|
-
init,
|
|
415
|
-
beforeRequest: () => {
|
|
416
|
-
if (requestDispatched) {
|
|
417
|
-
assertSmsCredentialOwnerAvailable(params.account);
|
|
418
|
-
return;
|
|
419
|
-
}
|
|
420
|
-
assertTwilioRequestCredentialsAvailable(params.account);
|
|
421
|
-
requestDispatched = true;
|
|
422
|
-
},
|
|
423
|
-
auditContext: "sms-twilio-api",
|
|
424
|
-
policy: { allowedHostnames: [params.api === "accounts" ? TWILIO_API_HOSTNAME : TWILIO_MESSAGING_HOSTNAME] },
|
|
425
|
-
requireHttps: true,
|
|
426
|
-
timeoutMs: params.timeoutMs ?? TWILIO_API_TIMEOUT_MS
|
|
427
|
-
}));
|
|
428
|
-
}
|
|
429
390
|
let ok;
|
|
430
391
|
let status;
|
|
431
392
|
let text;
|
|
@@ -433,14 +394,13 @@ async function requestTwilioApi(params) {
|
|
|
433
394
|
({ok, status} = response);
|
|
434
395
|
text = await readTwilioApiResponseText(response);
|
|
435
396
|
} finally {
|
|
436
|
-
|
|
397
|
+
await release();
|
|
437
398
|
}
|
|
438
399
|
if (!ok) throw new TwilioSmsApiError(status, text, params.operation);
|
|
439
400
|
return text;
|
|
440
401
|
}
|
|
441
402
|
function parseTwilioIncomingPhoneNumber(record) {
|
|
442
403
|
return {
|
|
443
|
-
sid: firstTrimmedString(record.sid),
|
|
444
404
|
phoneNumber: firstTrimmedString(record.phone_number ?? record.phoneNumber),
|
|
445
405
|
smsUrl: firstTrimmedString(record.sms_url ?? record.smsUrl),
|
|
446
406
|
smsMethod: firstTrimmedString(record.sms_method ?? record.smsMethod),
|
|
@@ -452,10 +412,7 @@ function parseTwilioMessageLogEntry(record) {
|
|
|
452
412
|
sid: firstTrimmedString(record.sid),
|
|
453
413
|
direction: firstTrimmedString(record.direction),
|
|
454
414
|
status: firstTrimmedString(record.status),
|
|
455
|
-
to: firstTrimmedString(record.to),
|
|
456
|
-
from: firstTrimmedString(record.from),
|
|
457
415
|
errorCode: firstStringish(record.error_code ?? record.errorCode).trim(),
|
|
458
|
-
body: firstString(record.body),
|
|
459
416
|
dateCreated: firstTrimmedString(record.date_created ?? record.dateCreated),
|
|
460
417
|
dateSent: firstTrimmedString(record.date_sent ?? record.dateSent)
|
|
461
418
|
};
|
|
@@ -474,15 +431,13 @@ function parseTwilioListPayload(text, key, parseEntry) {
|
|
|
474
431
|
return items.filter(isRecord).map(parseEntry);
|
|
475
432
|
}
|
|
476
433
|
async function listTwilioIncomingPhoneNumbers(params) {
|
|
477
|
-
const query = new URLSearchParams();
|
|
478
|
-
if (params.phoneNumber) query.set("PhoneNumber", params.phoneNumber);
|
|
434
|
+
const query = new URLSearchParams({ PhoneNumber: params.phoneNumber });
|
|
479
435
|
return parseTwilioListPayload(await requestTwilioApi({
|
|
480
436
|
account: params.account,
|
|
481
437
|
path: "/IncomingPhoneNumbers.json",
|
|
482
438
|
api: "accounts",
|
|
483
439
|
query,
|
|
484
440
|
operation: "phone-number lookup",
|
|
485
|
-
fetchImpl: params.fetchImpl,
|
|
486
441
|
timeoutMs: params.timeoutMs
|
|
487
442
|
}), "incoming_phone_numbers", parseTwilioIncomingPhoneNumber);
|
|
488
443
|
}
|
|
@@ -492,7 +447,6 @@ async function retrieveTwilioMessagingService(params) {
|
|
|
492
447
|
path: `/Services/${encodeURIComponent(params.serviceSid)}`,
|
|
493
448
|
api: "messaging",
|
|
494
449
|
operation: "messaging-service lookup",
|
|
495
|
-
fetchImpl: params.fetchImpl,
|
|
496
450
|
timeoutMs: params.timeoutMs
|
|
497
451
|
});
|
|
498
452
|
const parsed = safeParseJson(text);
|
|
@@ -500,17 +454,16 @@ async function retrieveTwilioMessagingService(params) {
|
|
|
500
454
|
return parseTwilioMessagingService(parsed);
|
|
501
455
|
}
|
|
502
456
|
async function listTwilioMessages(params) {
|
|
503
|
-
const query = new URLSearchParams(
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
457
|
+
const query = new URLSearchParams({
|
|
458
|
+
To: params.to,
|
|
459
|
+
PageSize: "3"
|
|
460
|
+
});
|
|
507
461
|
return parseTwilioListPayload(await requestTwilioApi({
|
|
508
462
|
account: params.account,
|
|
509
463
|
path: "/Messages.json",
|
|
510
464
|
api: "accounts",
|
|
511
465
|
query,
|
|
512
466
|
operation: "message lookup",
|
|
513
|
-
fetchImpl: params.fetchImpl,
|
|
514
467
|
timeoutMs: params.timeoutMs
|
|
515
468
|
}), "messages", parseTwilioMessageLogEntry);
|
|
516
469
|
}
|
|
@@ -538,8 +491,7 @@ async function sendSmsViaTwilio(params) {
|
|
|
538
491
|
account: params.account,
|
|
539
492
|
path: "/Messages.json",
|
|
540
493
|
api: "accounts",
|
|
541
|
-
init
|
|
542
|
-
fetchImpl: params.fetchImpl
|
|
494
|
+
init
|
|
543
495
|
}));
|
|
544
496
|
const sid = payload.sid?.trim();
|
|
545
497
|
if (!sid) throw new Error("Twilio SMS send response did not include a Message SID.");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"entries":[{"output":"api.js","source":"extensions/sms/api.ts"},{"output":"channel-plugin-api.js","source":"extensions/sms/channel-plugin-api.ts"},{"output":"configured-state.js","source":"extensions/sms/configured-state.ts"},{"output":"index.js","source":"extensions/sms/index.ts"},{"output":"secret-contract-api.js","source":"extensions/sms/secret-contract-api.ts"}],"chunks":[{"output":".setup/media-
|
|
1
|
+
{"version":3,"entries":[{"output":"api.js","source":"extensions/sms/api.ts"},{"output":"channel-plugin-api.js","source":"extensions/sms/channel-plugin-api.ts"},{"output":"configured-state.js","source":"extensions/sms/configured-state.ts"},{"output":"index.js","source":"extensions/sms/index.ts"},{"output":"secret-contract-api.js","source":"extensions/sms/secret-contract-api.ts"}],"chunks":[{"output":".setup/media-BF6-nsm2.mjs","sha256":"07c35be9a1b24339461d37b732b6f528382d20978d585347bb9c4ead05584f03","facadeSource":"extensions/sms/src/media.ts","sources":["extensions/sms/src/media.ts"]},{"output":".setup/runtime-A8rnEOmw.mjs","sha256":"c5421ac4c7b4a75bc7ecbc7c36ec291ca5fea32a88a3ee73d827805382709472","facadeSource":null,"sources":["extensions/sms/src/runtime.ts"]},{"output":".setup/secret-contract-BTxRnkG1.mjs","sha256":"41e6a81aa4b92fa9cc308365fd1b39f027966a6405817436e05ece5a86101289","facadeSource":null,"sources":["extensions/sms/src/secret-contract.ts"]},{"output":".setup/twilio-07yIWayE.mjs","sha256":"9273a6d10235c495f227ddc60d048943993b7caf377ce61f4544f9a29e826b3d","facadeSource":null,"sources":["extensions/sms/src/accounts.ts","extensions/sms/src/credential-availability.ts","extensions/sms/src/phone.ts","extensions/sms/src/public-webhook-url.ts","extensions/sms/src/twilio.ts"]},{"output":"api.js","sha256":"0af2cd7c6d77163e5a4b5db6d0a330cee812d376309fc5100549c96cfb418095","facadeSource":"extensions/sms/api.ts","sources":[]},{"output":"channel-plugin-api.js","sha256":"4611df19ace50e59be191fecfd82cd0ec2fcb5693b9b4871fa9b220f46cbb6d5","facadeSource":"extensions/sms/channel-plugin-api.ts","sources":["extensions/sms/src/channel.ts","extensions/sms/src/config-schema.ts","extensions/sms/src/delivery-observations.ts","extensions/sms/src/gateway.ts","extensions/sms/src/inbound.ts","extensions/sms/src/ingress-spool.ts","extensions/sms/src/send.ts","extensions/sms/src/status.ts","extensions/sms/src/webhook.ts"]},{"output":"configured-state.js","sha256":"e994ab7f874fa87b8fe6ebf177c463524d6eb38b18ce39c81782317ba58d0e33","facadeSource":"extensions/sms/configured-state.ts","sources":["extensions/sms/configured-state.ts"]},{"output":"index.js","sha256":"409b8e41876eb5f13f405dae29989f6208bc6dd05a3a3edca4c045694ed03f08","facadeSource":"extensions/sms/index.ts","sources":["extensions/sms/index.ts"]},{"output":"secret-contract-api.js","sha256":"52f719be12576c4abb7161253c960de8b5001fc164f5e69f7228e57c29a5aed2","facadeSource":"extensions/sms/secret-contract-api.ts","sources":[]}],"unrenderedSources":["extensions/sms/api.ts","extensions/sms/channel-plugin-api.ts","extensions/sms/secret-contract-api.ts"]}
|