n8n-nodes-sudomock 0.2.0 → 0.3.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/README.md CHANGED
@@ -17,7 +17,28 @@ n8n community node for the SudoMock API. Integrate mockup rendering into your n8
17
17
  - **Delete Mockup**: Delete a specific mockup template
18
18
 
19
19
  ### Rendering
20
- - **Render Mockup**: Generate mockups by combining templates with your designs
20
+ - **Render Mockup**: Generate mockups by combining templates with your designs. Optionally run asynchronously with the **Run Asynchronously** toggle, which returns a `job_id` to track with **Get Job**.
21
+ - **Render Video**: Turn a mockup (or an existing image URL) into a short product video (always asynchronous). Pick a duration valid for the model, optional audio/motion, an optional one-off webhook, and optionally **Wait for Completion** to return the finished clip.
22
+
23
+ ### Async Jobs
24
+ - **Get Job**: Get the status and result of an async render, upload, or video job by its `job_id`. Terminal statuses are `succeeded`, `failed`, and `cancelled` (pending jobs report `queued`). On success it surfaces `result_url` (render/video) or `mockup_uuid` (upload). Optionally **Wait for Completion** to poll until the job finishes.
25
+ - **List Jobs**: List your async render, upload, and video jobs (keyset paginated, with optional `kind` and Mockup UUID filters).
26
+
27
+ ### Webhooks
28
+ Manage webhook endpoints that receive a signed HTTPS request the moment a job finishes:
29
+ - **Webhook: List Endpoints**
30
+ - **Webhook: Get Endpoint**
31
+ - **Webhook: Create Endpoint** (set an optional description and choose any of the six canonical events, or leave empty for all)
32
+ - **Webhook: Update Endpoint**
33
+ - **Webhook: Delete Endpoint**
34
+ - **Webhook: Rotate Secret**
35
+ - **Webhook: Send Test**
36
+ - **Webhook: List Deliveries**
37
+ - **Webhook: Replay Delivery**
38
+ - **Webhook: Replay Failed Deliveries**
39
+ - **Webhook: Events Feed** (recent deliveries across all of your endpoints)
40
+
41
+ Canonical events: `render.succeeded`, `render.failed`, `upload.succeeded`, `video.succeeded`, `video.failed`, `webhook.test`. Deliveries are HMAC-signed; see https://sudomock.com/docs/api/webhooks for the current signature header and verification details.
21
42
 
22
43
  ## Installation
23
44
 
@@ -193,7 +214,7 @@ Generate a mockup by filling smart objects with your designs.
193
214
 
194
215
  - **Export Options** (optional):
195
216
  - Image Format: WebP (recommended), PNG, or JPEG
196
- - Image Size: Width in pixels (100-8000)
217
+ - Image Size: Width in pixels (100-10000, default 2048)
197
218
  - Quality: 1-100 for JPG/WebP
198
219
  - Export Label: Custom label for file naming
199
220
 
@@ -246,6 +267,72 @@ Deletion confirmation
246
267
 
247
268
  ---
248
269
 
270
+ ### Render Video
271
+
272
+ Turn a mockup (or an existing image URL) into a short product video. Always asynchronous: returns a `job_id` you can track with **Get Job**.
273
+
274
+ **Parameters:**
275
+ - **Input Mode**: `Render Mockup` (render a mockup with your designs first) or `Animate Image URL` (animate a public image directly)
276
+ - **Mockup UUID** (required in Render Mockup mode): UUID of the mockup to animate
277
+ - **Smart Objects** (required in Render Mockup mode): one or more smart objects with a Design URL and Fit Mode
278
+ - **Image URL** (required in Animate Image URL mode): public HTTPS image (`.png`, `.jpg`, `.jpeg`, `.webp`, `.gif`, `.avif`)
279
+ - **Webhook URL** (optional): one-off HTTPS URL notified when this job finishes
280
+ - **Video Options**:
281
+ - **Duration (Seconds)**: clip length (default 4; must be an allowed duration for the chosen model — the default model `veo-3.1-fast` allows 4, 6, or 8; max 15)
282
+ - **Audio**: include a generated audio track (default false; may cost extra credits depending on model)
283
+ - **Motion**: `ambient` (default) or `showcase`
284
+ - **Advanced Model**: optional override pinning a roster model (`veo-3.1-fast`, `kling-v3-pro`, `kling-2.6-pro`, `seedance-2.0`, `wan-2.5`); leave empty to auto-pick by plan tier
285
+ - **Wait for Completion**: poll the job and return the finished clip instead of the queued job
286
+ - **Poll Timeout (Seconds)**: max wait when Wait for Completion is on
287
+
288
+ **Output:**
289
+ The 202 acknowledgement (`job_id`, `kind`, `status`, `status_url`, `estimated_credits`, ...), or the finished job (with `result_url` / `resultUrl`) when Wait for Completion is on.
290
+
291
+ ---
292
+
293
+ ### Get Job
294
+
295
+ Track an asynchronous render, upload, or video job by its `job_id`.
296
+
297
+ **Parameters:**
298
+ - **Job ID** (required): the `job_id` from an async render, upload, or video request
299
+ - **Wait for Completion**: poll until a terminal status (`succeeded`, `failed`, `cancelled`)
300
+ - **Poll Timeout (Seconds)**: max wait when Wait for Completion is on
301
+
302
+ **Output:**
303
+ The job object. On success it surfaces `result_url` / `resultUrl` (render/video) or `mockup_uuid` / `resultMockupUuid` (upload), plus `credits_charged` and `payg` when applicable.
304
+
305
+ ---
306
+
307
+ ### List Jobs
308
+
309
+ List your async render, upload, and video jobs (newest first, keyset paginated).
310
+
311
+ **Parameters (all optional, under Filters):**
312
+ - **Kind**: `render`, `upload`, or `video`
313
+ - **Mockup UUID**: only jobs derived from this source mockup
314
+ - **Limit**: 1-50 (default 20)
315
+ - **Cursor**: opaque `next_cursor` from a previous response for pagination
316
+
317
+ **Output:**
318
+ `{ jobs: [...], next_cursor }`.
319
+
320
+ > **Note:** Bulk "delete all mockups" is intentionally not exposed — the BE gates `DELETE /mockups/all` to dashboard (Bearer/JWT) auth only, so it is not callable with an API key. Delete mockups individually with **Delete Mockup**, or use the SudoMock dashboard.
321
+
322
+ ---
323
+
324
+ ### Webhook Operations
325
+
326
+ Manage webhook endpoints and their deliveries. See the [Webhooks](#webhooks) feature list above for the full operation set and the canonical event types.
327
+
328
+ **Common parameters:**
329
+ - **Webhook Endpoint ID** (required for get/update/delete/rotate/test/deliveries/replay/replay-failed)
330
+ - **Endpoint URL** + **Description** (create) and **Events** (create/update): leave Events empty to subscribe to all
331
+ - **Delivery ID** (replay)
332
+ - **Webhook: Events Feed** takes no parameters (returns recent deliveries across all your endpoints)
333
+
334
+ ---
335
+
249
336
  ## Example Workflows
250
337
 
251
338
  Ready-to-use n8n workflows are available in the [`examples/`](./examples) folder:
@@ -253,7 +340,7 @@ Ready-to-use n8n workflows are available in the [`examples/`](./examples) folder
253
340
  ### 1. Complete API Test Workflow
254
341
  **File**: [`examples/complete-test-workflow.json`](./examples/complete-test-workflow.json)
255
342
 
256
- Tests all 7 operations in sequence:
343
+ Tests the core mockup operations in sequence:
257
344
  - Get Account Info → Upload PSD → Get Mockup → List Mockups
258
345
  - Render Mockup → Update Name → Verify Update → Delete Mockup
259
346