@replayio-app-building/netlify-recorder 0.41.0 → 0.42.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.ts CHANGED
@@ -344,9 +344,8 @@ interface RecordingEndpointResponse {
344
344
  error?: string;
345
345
  }
346
346
  /**
347
- * Payload sent by the recorder service when a recording completes or fails.
348
- * Used for both the PUT callback to this endpoint and the downstream
349
- * notification to the user-configured `webhookUrl`.
347
+ * Payload the recorder service POSTs when a recording completes or fails.
348
+ * Also the shape forwarded to the user-configured `webhookUrl`.
350
349
  */
351
350
  interface RecordingWebhookPayload {
352
351
  requestId: string;
@@ -362,13 +361,15 @@ interface RecordingWebhookPayload {
362
361
  *
363
362
  * **GET** `?requestId=<uuid>` — returns the current recording status.
364
363
  *
365
- * **POST** `{ "requestId": "<uuid>" }` triggers recording creation if needed.
366
- * Idempotent: re-posting the same request ID will not re-queue.
364
+ * **POST** two contracts distinguished by body shape:
367
365
  *
368
- * **PUT** `RecordingWebhookPayload` — webhook callback from the recorder
369
- * service when a recording completes or fails. Body must include
370
- * `requestId`, `status` (`"recorded"` | `"failed"`), and either
371
- * `recordingId` or `error`.
366
+ * *Trigger:* `{ "requestId": "<uuid>" }` — triggers recording creation if
367
+ * needed. Idempotent: re-posting won't re-queue.
368
+ *
369
+ * *Callback:* `RecordingWebhookPayload` sent by the recorder service when
370
+ * a recording completes or fails. Body must include `requestId` and `status`
371
+ * (`"recorded"` | `"failed"`). The presence of `status` distinguishes a
372
+ * callback from a trigger.
372
373
  *
373
374
  * When `secret` is provided, every request must include an
374
375
  * `Authorization: Bearer <secret>` header or receive a 401 response.
package/dist/index.js CHANGED
@@ -1559,10 +1559,6 @@ function createRecordingEndpoint(options) {
1559
1559
  }
1560
1560
  return jsonResponse(formatStatus(request), 200);
1561
1561
  }
1562
- if (req.method === "PUT") {
1563
- const body = await req.json();
1564
- return handleCallback(body);
1565
- }
1566
1562
  if (req.method === "POST") {
1567
1563
  const body = await req.json();
1568
1564
  if (body.status) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@replayio-app-building/netlify-recorder",
3
- "version": "0.41.0",
3
+ "version": "0.42.0",
4
4
  "description": "Capture and replay Netlify function executions as Replay recordings",
5
5
  "type": "module",
6
6
  "exports": {