@openclaw/sms 2026.11.3 → 2026.11.5-beta.2
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-BIjSnGTm.mjs → media-_9qy6Xis.mjs} +15 -31
- package/dist/.setup/{twilio-BvmfwtSb.mjs → twilio-BzT4FTeC.mjs} +37 -85
- package/dist/.source-module-urls/795a0e3f2ca7aa49f58abd6277a5075ff6437cd84711eea7629da8f4ff8f2b43.json +1 -0
- package/dist/api.js +1 -2
- package/dist/channel-plugin-api.js +284 -368
- package/dist/secret-contract-api.js +1 -2
- 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-BBlPgBIF.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-BzT4FTeC.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";
|
|
@@ -238,14 +237,6 @@ function firstStringish(value) {
|
|
|
238
237
|
if (typeof first === "string") return first;
|
|
239
238
|
return typeof first === "number" ? String(first) : "";
|
|
240
239
|
}
|
|
241
|
-
function parseTwilioApiError(text) {
|
|
242
|
-
const record = asNullableObjectRecord(safeParseJson(text));
|
|
243
|
-
if (!record) return {};
|
|
244
|
-
return {
|
|
245
|
-
code: typeof record.code === "number" ? record.code : void 0,
|
|
246
|
-
message: typeof record.message === "string" ? record.message : void 0
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
240
|
function parseTwilioSuccessPayload(text) {
|
|
250
241
|
if (!text.trim()) return {};
|
|
251
242
|
let parsed;
|
|
@@ -263,49 +254,27 @@ function parseTwilioSuccessPayload(text) {
|
|
|
263
254
|
status: typeof record.status === "string" ? record.status : void 0
|
|
264
255
|
};
|
|
265
256
|
}
|
|
266
|
-
function requestSearch(req) {
|
|
267
|
-
return URL.parse(req.url ?? "/", "http://localhost")?.search ?? "";
|
|
268
|
-
}
|
|
269
|
-
function stripUrlFragment(url) {
|
|
270
|
-
const hashIndex = url.indexOf("#");
|
|
271
|
-
return hashIndex === -1 ? url : url.slice(0, hashIndex);
|
|
272
|
-
}
|
|
273
257
|
function resolveTwilioWebhookSignatureUrl(params) {
|
|
274
|
-
const
|
|
258
|
+
const hashIndex = params.publicWebhookUrl.indexOf("#");
|
|
259
|
+
const signatureBaseUrl = hashIndex === -1 ? params.publicWebhookUrl : params.publicWebhookUrl.slice(0, hashIndex);
|
|
275
260
|
if (signatureBaseUrl.includes("?")) return signatureBaseUrl;
|
|
276
|
-
const search =
|
|
261
|
+
const search = URL.parse(params.req.url ?? "/", "http://localhost")?.search ?? "";
|
|
277
262
|
if (!search) return signatureBaseUrl;
|
|
278
263
|
return `${signatureBaseUrl}${search}`;
|
|
279
264
|
}
|
|
280
265
|
var TwilioSmsApiError = class extends Error {
|
|
281
266
|
constructor(httpStatus, responseText, operation = "send") {
|
|
282
267
|
const redactedResponseText = redactToolPayloadText(responseText);
|
|
283
|
-
const
|
|
284
|
-
const detail =
|
|
268
|
+
const record = asNullableObjectRecord(safeParseJson(redactedResponseText));
|
|
269
|
+
const detail = typeof record?.message === "string" ? record.message : redactedResponseText || "unknown";
|
|
285
270
|
super(`Twilio SMS ${operation} failed (${httpStatus}): ${detail}`);
|
|
286
271
|
this.name = "TwilioSmsApiError";
|
|
287
|
-
this.httpStatus = httpStatus;
|
|
288
|
-
this.responseText = redactedResponseText;
|
|
289
|
-
this.twilioCode = parsed.code;
|
|
290
272
|
}
|
|
291
273
|
};
|
|
292
|
-
function parseTwilioFormBody(body) {
|
|
293
|
-
const parsed = querystring.parse(body);
|
|
294
|
-
const out = {};
|
|
295
|
-
for (const [key, value] of Object.entries(parsed)) out[key] = firstString(value);
|
|
296
|
-
return out;
|
|
297
|
-
}
|
|
298
|
-
function computeTwilioSignature(params) {
|
|
299
|
-
const data = params.url + Object.keys(params.form).toSorted().map((key) => `${key}${params.form[key] ?? ""}`).join("");
|
|
300
|
-
return createHmac("sha1", params.authToken).update(data).digest("base64");
|
|
301
|
-
}
|
|
302
274
|
function verifyTwilioSignature(params) {
|
|
303
275
|
if (!params.signature || !params.url || !params.authToken) return false;
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
authToken: params.authToken,
|
|
307
|
-
form: params.form
|
|
308
|
-
}));
|
|
276
|
+
const data = params.url + Object.keys(params.form).toSorted().map((key) => `${key}${params.form[key] ?? ""}`).join("");
|
|
277
|
+
return safeEqualSecret(params.signature, createHmac("sha1", params.authToken).update(data).digest("base64"));
|
|
309
278
|
}
|
|
310
279
|
function parseTwilioInboundFrom(raw) {
|
|
311
280
|
const trimmed = raw.trim();
|
|
@@ -359,11 +328,15 @@ function resolveTwilioMessageSid(form) {
|
|
|
359
328
|
return firstTrimmedString(form.MessageSid) || firstTrimmedString(form.SmsSid) || firstTrimmedString(form.SmsMessageSid);
|
|
360
329
|
}
|
|
361
330
|
async function readTwilioWebhookForm(req) {
|
|
362
|
-
|
|
331
|
+
const body = await readRequestBodyWithLimit(req, {
|
|
363
332
|
maxBytes: WEBHOOK_BODY_LIMIT_BYTES,
|
|
364
333
|
timeoutMs: WEBHOOK_BODY_TIMEOUT_MS,
|
|
365
334
|
destroyOnLimit: false
|
|
366
|
-
})
|
|
335
|
+
});
|
|
336
|
+
const parsed = querystring.parse(body);
|
|
337
|
+
const out = {};
|
|
338
|
+
for (const [key, value] of Object.entries(parsed)) out[key] = firstString(value);
|
|
339
|
+
return out;
|
|
367
340
|
}
|
|
368
341
|
const TWIML_CONTENT_TYPE = "text/xml; charset=utf-8";
|
|
369
342
|
function respondTwiml(res, statusCode, body = "") {
|
|
@@ -374,14 +347,11 @@ function respondTwiml(res, statusCode, body = "") {
|
|
|
374
347
|
function basicAuthHeader(account) {
|
|
375
348
|
return `Basic ${Buffer.from(`${account.accountSid}:${account.authToken}`).toString("base64")}`;
|
|
376
349
|
}
|
|
377
|
-
function appendTruncatedResponseSuffix(text) {
|
|
378
|
-
return `${text.trimEnd()}${TRUNCATED_RESPONSE_SUFFIX}`;
|
|
379
|
-
}
|
|
380
350
|
async function readTwilioApiResponseText(response) {
|
|
381
351
|
const maxBytes = response.ok ? TWILIO_API_SUCCESS_BODY_LIMIT_BYTES : TWILIO_API_ERROR_BODY_LIMIT_BYTES;
|
|
382
352
|
if (!response.ok) {
|
|
383
353
|
const prefix = await readResponseTextPrefix(response, maxBytes);
|
|
384
|
-
return prefix.truncated ?
|
|
354
|
+
return prefix.truncated ? `${prefix.text.trimEnd()}${TRUNCATED_RESPONSE_SUFFIX}` : prefix.text;
|
|
385
355
|
}
|
|
386
356
|
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)`) });
|
|
387
357
|
return new TextDecoder().decode(body);
|
|
@@ -404,32 +374,23 @@ async function requestTwilioApi(params) {
|
|
|
404
374
|
authorization: basicAuthHeader(params.account)
|
|
405
375
|
}
|
|
406
376
|
};
|
|
407
|
-
let
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
377
|
+
let requestDispatched = false;
|
|
378
|
+
const { response, release } = await fetchWithSsrFGuard({
|
|
379
|
+
url: url.toString(),
|
|
380
|
+
init,
|
|
381
|
+
beforeRequest: () => {
|
|
382
|
+
if (requestDispatched) {
|
|
383
|
+
assertSmsCredentialOwnerAvailable(params.account);
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
assertTwilioRequestCredentialsAvailable(params.account);
|
|
387
|
+
requestDispatched = true;
|
|
388
|
+
},
|
|
389
|
+
auditContext: "sms-twilio-api",
|
|
390
|
+
policy: { allowedHostnames: [params.api === "accounts" ? TWILIO_API_HOSTNAME : TWILIO_MESSAGING_HOSTNAME] },
|
|
391
|
+
requireHttps: true,
|
|
392
|
+
timeoutMs: params.timeoutMs ?? TWILIO_API_TIMEOUT_MS
|
|
413
393
|
});
|
|
414
|
-
else {
|
|
415
|
-
let requestDispatched = false;
|
|
416
|
-
({response, release} = await fetchWithSsrFGuard({
|
|
417
|
-
url: url.toString(),
|
|
418
|
-
init,
|
|
419
|
-
beforeRequest: () => {
|
|
420
|
-
if (requestDispatched) {
|
|
421
|
-
assertSmsCredentialOwnerAvailable(params.account);
|
|
422
|
-
return;
|
|
423
|
-
}
|
|
424
|
-
assertTwilioRequestCredentialsAvailable(params.account);
|
|
425
|
-
requestDispatched = true;
|
|
426
|
-
},
|
|
427
|
-
auditContext: "sms-twilio-api",
|
|
428
|
-
policy: { allowedHostnames: [params.api === "accounts" ? TWILIO_API_HOSTNAME : TWILIO_MESSAGING_HOSTNAME] },
|
|
429
|
-
requireHttps: true,
|
|
430
|
-
timeoutMs: params.timeoutMs ?? TWILIO_API_TIMEOUT_MS
|
|
431
|
-
}));
|
|
432
|
-
}
|
|
433
394
|
let ok;
|
|
434
395
|
let status;
|
|
435
396
|
let text;
|
|
@@ -437,14 +398,13 @@ async function requestTwilioApi(params) {
|
|
|
437
398
|
({ok, status} = response);
|
|
438
399
|
text = await readTwilioApiResponseText(response);
|
|
439
400
|
} finally {
|
|
440
|
-
|
|
401
|
+
await release();
|
|
441
402
|
}
|
|
442
403
|
if (!ok) throw new TwilioSmsApiError(status, text, params.operation);
|
|
443
404
|
return text;
|
|
444
405
|
}
|
|
445
406
|
function parseTwilioIncomingPhoneNumber(record) {
|
|
446
407
|
return {
|
|
447
|
-
sid: firstTrimmedString(record.sid),
|
|
448
408
|
phoneNumber: firstTrimmedString(record.phone_number ?? record.phoneNumber),
|
|
449
409
|
smsUrl: firstTrimmedString(record.sms_url ?? record.smsUrl),
|
|
450
410
|
smsMethod: firstTrimmedString(record.sms_method ?? record.smsMethod),
|
|
@@ -456,10 +416,7 @@ function parseTwilioMessageLogEntry(record) {
|
|
|
456
416
|
sid: firstTrimmedString(record.sid),
|
|
457
417
|
direction: firstTrimmedString(record.direction),
|
|
458
418
|
status: firstTrimmedString(record.status),
|
|
459
|
-
to: firstTrimmedString(record.to),
|
|
460
|
-
from: firstTrimmedString(record.from),
|
|
461
419
|
errorCode: firstStringish(record.error_code ?? record.errorCode).trim(),
|
|
462
|
-
body: firstString(record.body),
|
|
463
420
|
dateCreated: firstTrimmedString(record.date_created ?? record.dateCreated),
|
|
464
421
|
dateSent: firstTrimmedString(record.date_sent ?? record.dateSent)
|
|
465
422
|
};
|
|
@@ -478,15 +435,13 @@ function parseTwilioListPayload(text, key, parseEntry) {
|
|
|
478
435
|
return items.filter(isRecord).map(parseEntry);
|
|
479
436
|
}
|
|
480
437
|
async function listTwilioIncomingPhoneNumbers(params) {
|
|
481
|
-
const query = new URLSearchParams();
|
|
482
|
-
if (params.phoneNumber) query.set("PhoneNumber", params.phoneNumber);
|
|
438
|
+
const query = new URLSearchParams({ PhoneNumber: params.phoneNumber });
|
|
483
439
|
return parseTwilioListPayload(await requestTwilioApi({
|
|
484
440
|
account: params.account,
|
|
485
441
|
path: "/IncomingPhoneNumbers.json",
|
|
486
442
|
api: "accounts",
|
|
487
443
|
query,
|
|
488
444
|
operation: "phone-number lookup",
|
|
489
|
-
fetchImpl: params.fetchImpl,
|
|
490
445
|
timeoutMs: params.timeoutMs
|
|
491
446
|
}), "incoming_phone_numbers", parseTwilioIncomingPhoneNumber);
|
|
492
447
|
}
|
|
@@ -496,7 +451,6 @@ async function retrieveTwilioMessagingService(params) {
|
|
|
496
451
|
path: `/Services/${encodeURIComponent(params.serviceSid)}`,
|
|
497
452
|
api: "messaging",
|
|
498
453
|
operation: "messaging-service lookup",
|
|
499
|
-
fetchImpl: params.fetchImpl,
|
|
500
454
|
timeoutMs: params.timeoutMs
|
|
501
455
|
});
|
|
502
456
|
const parsed = safeParseJson(text);
|
|
@@ -504,17 +458,16 @@ async function retrieveTwilioMessagingService(params) {
|
|
|
504
458
|
return parseTwilioMessagingService(parsed);
|
|
505
459
|
}
|
|
506
460
|
async function listTwilioMessages(params) {
|
|
507
|
-
const query = new URLSearchParams(
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
461
|
+
const query = new URLSearchParams({
|
|
462
|
+
To: params.to,
|
|
463
|
+
PageSize: "3"
|
|
464
|
+
});
|
|
511
465
|
return parseTwilioListPayload(await requestTwilioApi({
|
|
512
466
|
account: params.account,
|
|
513
467
|
path: "/Messages.json",
|
|
514
468
|
api: "accounts",
|
|
515
469
|
query,
|
|
516
470
|
operation: "message lookup",
|
|
517
|
-
fetchImpl: params.fetchImpl,
|
|
518
471
|
timeoutMs: params.timeoutMs
|
|
519
472
|
}), "messages", parseTwilioMessageLogEntry);
|
|
520
473
|
}
|
|
@@ -542,8 +495,7 @@ async function sendSmsViaTwilio(params) {
|
|
|
542
495
|
account: params.account,
|
|
543
496
|
path: "/Messages.json",
|
|
544
497
|
api: "accounts",
|
|
545
|
-
init
|
|
546
|
-
fetchImpl: params.fetchImpl
|
|
498
|
+
init
|
|
547
499
|
}));
|
|
548
500
|
const sid = payload.sid?.trim();
|
|
549
501
|
if (!sid) throw new Error("Twilio SMS send response did not include a Message SID.");
|
|
@@ -0,0 +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-_9qy6Xis.mjs","sha256":"e8a275e64d56b73b4e6d42dcf0a1fc146d8e5c148b0e9502a55406ab374833b7","facadeSource":"extensions/sms/src/media.ts","sources":["extensions/sms/src/media.ts"]},{"output":".setup/runtime-BBlPgBIF.mjs","sha256":"07f49993dc1bb200366e725e5a97652108d48562de77db5dfa8a74e75c382e09","facadeSource":null,"sources":["extensions/sms/src/runtime.ts"]},{"output":".setup/secret-contract-B2P_lFGm.mjs","sha256":"2ad2f33482115fcdfafdb522d29360532132d2606442e244bf60d89a9ec7f17f","facadeSource":null,"sources":["extensions/sms/src/secret-contract.ts"]},{"output":".setup/twilio-BzT4FTeC.mjs","sha256":"64aa6defb1e1a30842edf344bd7ef23624b32bacb54f1fce4f038dc835562fcb","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":"381e0b14a492462891f71068d5e667a8f20917a1c74a6bec1815179f36e2f70c","facadeSource":"extensions/sms/api.ts","sources":[]},{"output":"channel-plugin-api.js","sha256":"33cc297910979f25c937f9090a697c2eaa868c6d90cd755dada848046f202c90","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":"08aedff94a9f7708723af589f06d603f69378b48cc7d13668dea6fdd972db559","facadeSource":"extensions/sms/configured-state.ts","sources":["extensions/sms/configured-state.ts"]},{"output":"index.js","sha256":"924eda740b7644f8a2ba48b98dab9d089c40464f8c5b2751700411e8af013c95","facadeSource":"extensions/sms/index.ts","sources":["extensions/sms/index.ts"]},{"output":"secret-contract-api.js","sha256":"a076866845044317bc3264b1bae41301242376c91ee20a3521cafdc519fb8c9a","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"]}
|
package/dist/api.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { getSmsRuntime, setSmsRuntime };
|
|
1
|
+
export { t as getSmsRuntime, n as setSmsRuntime } from "./.setup/runtime-BBlPgBIF.mjs";
|