@zilfu/sdk 0.2.21 → 0.2.22
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.cjs +18 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +71 -3
- package/dist/index.d.ts +71 -3
- package/dist/index.js +18 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1519,7 +1519,9 @@ var Webhooks = class extends HeyApiClient {
|
|
|
1519
1519
|
/**
|
|
1520
1520
|
* Create a webhook
|
|
1521
1521
|
*
|
|
1522
|
-
*
|
|
1522
|
+
* The response carries the generated signing secret alongside the webhook,
|
|
1523
|
+
* as a sibling of `data`. It is shown once and never returned by any other
|
|
1524
|
+
* endpoint — store it, or use the rotate endpoint to mint a replacement.
|
|
1523
1525
|
*/
|
|
1524
1526
|
create(options) {
|
|
1525
1527
|
return (options.client ?? this.client).post({
|
|
@@ -1556,6 +1558,21 @@ var Webhooks = class extends HeyApiClient {
|
|
|
1556
1558
|
}
|
|
1557
1559
|
});
|
|
1558
1560
|
}
|
|
1561
|
+
/**
|
|
1562
|
+
* Rotate a webhook's signing secret
|
|
1563
|
+
*
|
|
1564
|
+
* The only way back from a lost secret, since it is revealed once at
|
|
1565
|
+
* creation. Deliveries are signed with the new secret from the next event
|
|
1566
|
+
* onward, so a subscriber that verifies signatures should be updated first
|
|
1567
|
+
* — there is no grace period where both secrets are accepted.
|
|
1568
|
+
*/
|
|
1569
|
+
rotate(options) {
|
|
1570
|
+
return (options.client ?? this.client).post({
|
|
1571
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1572
|
+
url: "/spaces/{space}/webhooks/{webhook}/rotate",
|
|
1573
|
+
...options
|
|
1574
|
+
});
|
|
1575
|
+
}
|
|
1559
1576
|
};
|
|
1560
1577
|
var ZilfuApi = class _ZilfuApi extends HeyApiClient {
|
|
1561
1578
|
static __registry = new HeyApiRegistry();
|