@hostwebhook/node 1.5.1 → 1.6.0

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 CHANGED
@@ -154,11 +154,18 @@ declare const FileEventType: {
154
154
  /** Union of all supported file event types. */
155
155
  type FileEventType = typeof FileEventType[keyof typeof FileEventType];
156
156
  /**
157
- * Payload for `sendWithFiles`. Enforces a valid `eventType` from `FileEventType`.
157
+ * Payload for `sendWithFiles`. The `FileEventType` constants (PDF_UPLOAD,
158
+ * CSV_UPLOAD, IMAGE_RESIZE, IMAGE_COMPRESS) are the canonical event types
159
+ * for built-in File Transform operations, but the ingress accepts any
160
+ * string so custom forms / pipelines with their own routing rules can
161
+ * upload files without squeezing into the enum. Use the constants when
162
+ * targeting a built-in File Transform node; use your own string for
163
+ * anything else (e.g. `'form_submission'`, `'contact_attachment'`).
158
164
  */
159
165
  interface FilePayload extends Record<string, unknown> {
160
- /** The file processing operation to perform. Must be a supported `FileEventType`. */
161
- eventType: FileEventType;
166
+ /** Event type for pipeline routing. Use `FileEventType.*` constants for
167
+ * built-in transforms, or any string for a custom event. */
168
+ eventType: FileEventType | string;
162
169
  /** Original file name (for logging and downstream nodes). */
163
170
  fileName?: string;
164
171
  /** File size in bytes (for logging). */
package/dist/index.d.ts CHANGED
@@ -154,11 +154,18 @@ declare const FileEventType: {
154
154
  /** Union of all supported file event types. */
155
155
  type FileEventType = typeof FileEventType[keyof typeof FileEventType];
156
156
  /**
157
- * Payload for `sendWithFiles`. Enforces a valid `eventType` from `FileEventType`.
157
+ * Payload for `sendWithFiles`. The `FileEventType` constants (PDF_UPLOAD,
158
+ * CSV_UPLOAD, IMAGE_RESIZE, IMAGE_COMPRESS) are the canonical event types
159
+ * for built-in File Transform operations, but the ingress accepts any
160
+ * string so custom forms / pipelines with their own routing rules can
161
+ * upload files without squeezing into the enum. Use the constants when
162
+ * targeting a built-in File Transform node; use your own string for
163
+ * anything else (e.g. `'form_submission'`, `'contact_attachment'`).
158
164
  */
159
165
  interface FilePayload extends Record<string, unknown> {
160
- /** The file processing operation to perform. Must be a supported `FileEventType`. */
161
- eventType: FileEventType;
166
+ /** Event type for pipeline routing. Use `FileEventType.*` constants for
167
+ * built-in transforms, or any string for a custom event. */
168
+ eventType: FileEventType | string;
162
169
  /** Original file name (for logging and downstream nodes). */
163
170
  fileName?: string;
164
171
  /** File size in bytes (for logging). */
package/dist/index.js CHANGED
@@ -410,7 +410,7 @@ doSend_fn = async function(token, payload, options) {
410
410
  }
411
411
  const headers = {
412
412
  "Content-Type": options?.contentType ?? "application/json",
413
- "User-Agent": `HostWebhook-SDK/${"1.5.0"}`,
413
+ "User-Agent": `HostWebhook-SDK/${"1.5.1"}`,
414
414
  "X-HostWebhook-Sent-At": (/* @__PURE__ */ new Date()).toISOString(),
415
415
  ...tz ? { "X-HostWebhook-Timezone": tz } : {},
416
416
  ...__privateGet(this, _defaultHeaders),
package/dist/index.mjs CHANGED
@@ -376,7 +376,7 @@ doSend_fn = async function(token, payload, options) {
376
376
  }
377
377
  const headers = {
378
378
  "Content-Type": options?.contentType ?? "application/json",
379
- "User-Agent": `HostWebhook-SDK/${"1.5.0"}`,
379
+ "User-Agent": `HostWebhook-SDK/${"1.5.1"}`,
380
380
  "X-HostWebhook-Sent-At": (/* @__PURE__ */ new Date()).toISOString(),
381
381
  ...tz ? { "X-HostWebhook-Timezone": tz } : {},
382
382
  ...__privateGet(this, _defaultHeaders),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostwebhook/node",
3
- "version": "1.5.1",
3
+ "version": "1.6.0",
4
4
  "description": "Official HostWebhook SDK — verify signatures, parse headers, and send webhooks",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",