@zilfu/sdk 0.2.20 → 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 CHANGED
@@ -1115,6 +1115,11 @@ var Media = class extends HeyApiClient {
1115
1115
  }
1116
1116
  /**
1117
1117
  * Remove a media asset from the space library
1118
+ *
1119
+ * Only library rows arrive here, and only the row is ever certain to go:
1120
+ * `Api\PostController::attachMedia` replicates a Media per post over the
1121
+ * same upload, so what the space sees as one asset is several rows deep by
1122
+ * the time it is deleted.
1118
1123
  */
1119
1124
  delete(options) {
1120
1125
  return (options.client ?? this.client).delete({
@@ -1514,7 +1519,9 @@ var Webhooks = class extends HeyApiClient {
1514
1519
  /**
1515
1520
  * Create a webhook
1516
1521
  *
1517
- * Returns an auto-generated signing secret on the response.
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.
1518
1525
  */
1519
1526
  create(options) {
1520
1527
  return (options.client ?? this.client).post({
@@ -1551,6 +1558,21 @@ var Webhooks = class extends HeyApiClient {
1551
1558
  }
1552
1559
  });
1553
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
+ }
1554
1576
  };
1555
1577
  var ZilfuApi = class _ZilfuApi extends HeyApiClient {
1556
1578
  static __registry = new HeyApiRegistry();