@hostwebhook/node 1.5.0 → 1.5.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/index.js +9 -2
- package/dist/index.mjs +9 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -339,7 +339,14 @@ var HostWebhook = class {
|
|
|
339
339
|
if (!confirmRes.ok) throw new SendError(`Failed to confirm upload for ${fieldName}`, confirmRes.status, await confirmRes.text());
|
|
340
340
|
const confirmed = await confirmRes.json();
|
|
341
341
|
enrichedPayload[fieldName] = {
|
|
342
|
-
_file: {
|
|
342
|
+
_file: {
|
|
343
|
+
id: confirmed.id,
|
|
344
|
+
key,
|
|
345
|
+
originalName: confirmed.originalName,
|
|
346
|
+
mimeType: confirmed.mimeType,
|
|
347
|
+
size: confirmed.size,
|
|
348
|
+
...confirmed.downloadUrl && { downloadUrl: confirmed.downloadUrl }
|
|
349
|
+
}
|
|
343
350
|
};
|
|
344
351
|
}
|
|
345
352
|
return __privateMethod(this, _HostWebhook_instances, doSend_fn).call(this, token, enrichedPayload, options);
|
|
@@ -403,7 +410,7 @@ doSend_fn = async function(token, payload, options) {
|
|
|
403
410
|
}
|
|
404
411
|
const headers = {
|
|
405
412
|
"Content-Type": options?.contentType ?? "application/json",
|
|
406
|
-
"User-Agent": `HostWebhook-SDK/${"1.
|
|
413
|
+
"User-Agent": `HostWebhook-SDK/${"1.5.0"}`,
|
|
407
414
|
"X-HostWebhook-Sent-At": (/* @__PURE__ */ new Date()).toISOString(),
|
|
408
415
|
...tz ? { "X-HostWebhook-Timezone": tz } : {},
|
|
409
416
|
...__privateGet(this, _defaultHeaders),
|
package/dist/index.mjs
CHANGED
|
@@ -305,7 +305,14 @@ var HostWebhook = class {
|
|
|
305
305
|
if (!confirmRes.ok) throw new SendError(`Failed to confirm upload for ${fieldName}`, confirmRes.status, await confirmRes.text());
|
|
306
306
|
const confirmed = await confirmRes.json();
|
|
307
307
|
enrichedPayload[fieldName] = {
|
|
308
|
-
_file: {
|
|
308
|
+
_file: {
|
|
309
|
+
id: confirmed.id,
|
|
310
|
+
key,
|
|
311
|
+
originalName: confirmed.originalName,
|
|
312
|
+
mimeType: confirmed.mimeType,
|
|
313
|
+
size: confirmed.size,
|
|
314
|
+
...confirmed.downloadUrl && { downloadUrl: confirmed.downloadUrl }
|
|
315
|
+
}
|
|
309
316
|
};
|
|
310
317
|
}
|
|
311
318
|
return __privateMethod(this, _HostWebhook_instances, doSend_fn).call(this, token, enrichedPayload, options);
|
|
@@ -369,7 +376,7 @@ doSend_fn = async function(token, payload, options) {
|
|
|
369
376
|
}
|
|
370
377
|
const headers = {
|
|
371
378
|
"Content-Type": options?.contentType ?? "application/json",
|
|
372
|
-
"User-Agent": `HostWebhook-SDK/${"1.
|
|
379
|
+
"User-Agent": `HostWebhook-SDK/${"1.5.0"}`,
|
|
373
380
|
"X-HostWebhook-Sent-At": (/* @__PURE__ */ new Date()).toISOString(),
|
|
374
381
|
...tz ? { "X-HostWebhook-Timezone": tz } : {},
|
|
375
382
|
...__privateGet(this, _defaultHeaders),
|