svix 2.1.0 → 2.2.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.mts CHANGED
@@ -4197,7 +4197,7 @@ interface WebhookOptions {
4197
4197
  declare class Webhook {
4198
4198
  private readonly inner;
4199
4199
  constructor(secret: string | Uint8Array, options?: WebhookOptions);
4200
- verify(payload: string | Buffer, headers_: WebhookRequiredHeaders | WebhookUnbrandedRequiredHeaders | Record<string, string>): unknown;
4200
+ verify(payload: string | Buffer, headers_: WebhookRequiredHeaders | WebhookUnbrandedRequiredHeaders | Record<string, string>): undefined;
4201
4201
  sign(msgId: string, timestamp: Date, payload: string | Buffer): string;
4202
4202
  }
4203
4203
  //#endregion
package/dist/index.mjs CHANGED
@@ -101,7 +101,7 @@ var ApiException = class extends Error {
101
101
  };
102
102
  //#endregion
103
103
  //#region src/request.ts
104
- const LIB_VERSION = "2.1.0";
104
+ const LIB_VERSION = "2.2.0";
105
105
  function getUserAgent() {
106
106
  var fields = [`svix-libs/${LIB_VERSION}/javascript`];
107
107
  if (typeof process !== "undefined") {
@@ -6472,7 +6472,7 @@ var Webhook = class {
6472
6472
  headers["webhook-id"] = headers["svix-id"] ?? headers["webhook-id"] ?? "";
6473
6473
  headers["webhook-signature"] = headers["svix-signature"] ?? headers["webhook-signature"] ?? "";
6474
6474
  headers["webhook-timestamp"] = headers["svix-timestamp"] ?? headers["webhook-timestamp"] ?? "";
6475
- return this.inner.verify(payload, headers);
6475
+ this.inner.verify(payload, headers, { jsonParse: false });
6476
6476
  }
6477
6477
  sign(msgId, timestamp, payload) {
6478
6478
  return this.inner.sign(msgId, timestamp, payload);