@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 +10 -9
- package/dist/index.js +0 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -344,9 +344,8 @@ interface RecordingEndpointResponse {
|
|
|
344
344
|
error?: string;
|
|
345
345
|
}
|
|
346
346
|
/**
|
|
347
|
-
* Payload
|
|
348
|
-
*
|
|
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**
|
|
366
|
-
* Idempotent: re-posting the same request ID will not re-queue.
|
|
364
|
+
* **POST** — two contracts distinguished by body shape:
|
|
367
365
|
*
|
|
368
|
-
*
|
|
369
|
-
*
|
|
370
|
-
*
|
|
371
|
-
* `
|
|
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) {
|