@hostwebhook/node 1.0.6 → 1.0.7
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.d.mts +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -200,6 +200,22 @@ interface SendOptions {
|
|
|
200
200
|
interface SendResult {
|
|
201
201
|
/** The event ID assigned by HostWebhook. */
|
|
202
202
|
eventId: string;
|
|
203
|
+
/** Sync mode: pipeline result status (200=delivered, 422=validation failed, 502=delivery failed, 408=timeout) */
|
|
204
|
+
syncStatus?: number;
|
|
205
|
+
/** Sync mode: delivery status ('delivered') */
|
|
206
|
+
deliveryStatus?: string;
|
|
207
|
+
/** Sync mode: HTTP status code from the target URL */
|
|
208
|
+
statusCode?: number;
|
|
209
|
+
/** Sync mode: response body from the target URL (truncated to 4KB) */
|
|
210
|
+
response?: string;
|
|
211
|
+
/** Sync mode: delivery latency in ms */
|
|
212
|
+
latencyMs?: number;
|
|
213
|
+
/** Sync mode: error message if pipeline/delivery failed */
|
|
214
|
+
error?: string;
|
|
215
|
+
/** Sync mode: validation error messages (schema validator) */
|
|
216
|
+
message?: string[];
|
|
217
|
+
/** Any additional fields from the sync response */
|
|
218
|
+
[key: string]: unknown;
|
|
203
219
|
}
|
|
204
220
|
/** Thrown when the HostWebhook API returns a non-2xx response. */
|
|
205
221
|
declare class SendError extends Error {
|
package/dist/index.d.ts
CHANGED
|
@@ -200,6 +200,22 @@ interface SendOptions {
|
|
|
200
200
|
interface SendResult {
|
|
201
201
|
/** The event ID assigned by HostWebhook. */
|
|
202
202
|
eventId: string;
|
|
203
|
+
/** Sync mode: pipeline result status (200=delivered, 422=validation failed, 502=delivery failed, 408=timeout) */
|
|
204
|
+
syncStatus?: number;
|
|
205
|
+
/** Sync mode: delivery status ('delivered') */
|
|
206
|
+
deliveryStatus?: string;
|
|
207
|
+
/** Sync mode: HTTP status code from the target URL */
|
|
208
|
+
statusCode?: number;
|
|
209
|
+
/** Sync mode: response body from the target URL (truncated to 4KB) */
|
|
210
|
+
response?: string;
|
|
211
|
+
/** Sync mode: delivery latency in ms */
|
|
212
|
+
latencyMs?: number;
|
|
213
|
+
/** Sync mode: error message if pipeline/delivery failed */
|
|
214
|
+
error?: string;
|
|
215
|
+
/** Sync mode: validation error messages (schema validator) */
|
|
216
|
+
message?: string[];
|
|
217
|
+
/** Any additional fields from the sync response */
|
|
218
|
+
[key: string]: unknown;
|
|
203
219
|
}
|
|
204
220
|
/** Thrown when the HostWebhook API returns a non-2xx response. */
|
|
205
221
|
declare class SendError extends Error {
|
package/dist/index.js
CHANGED
|
@@ -251,7 +251,7 @@ var HostWebhook = class {
|
|
|
251
251
|
}
|
|
252
252
|
const headers = {
|
|
253
253
|
"Content-Type": options?.contentType ?? "application/json",
|
|
254
|
-
"User-Agent": `HostWebhook-SDK/${"1.0.
|
|
254
|
+
"User-Agent": `HostWebhook-SDK/${"1.0.6"}`,
|
|
255
255
|
"X-HostWebhook-Sent-At": (/* @__PURE__ */ new Date()).toISOString(),
|
|
256
256
|
...tz ? { "X-HostWebhook-Timezone": tz } : {},
|
|
257
257
|
...__privateGet(this, _defaultHeaders),
|
package/dist/index.mjs
CHANGED
|
@@ -218,7 +218,7 @@ var HostWebhook = class {
|
|
|
218
218
|
}
|
|
219
219
|
const headers = {
|
|
220
220
|
"Content-Type": options?.contentType ?? "application/json",
|
|
221
|
-
"User-Agent": `HostWebhook-SDK/${"1.0.
|
|
221
|
+
"User-Agent": `HostWebhook-SDK/${"1.0.6"}`,
|
|
222
222
|
"X-HostWebhook-Sent-At": (/* @__PURE__ */ new Date()).toISOString(),
|
|
223
223
|
...tz ? { "X-HostWebhook-Timezone": tz } : {},
|
|
224
224
|
...__privateGet(this, _defaultHeaders),
|