@upstash/qstash 0.0.17 → 0.0.18

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.
@@ -6,9 +6,9 @@ export class SignatureError extends Error {
6
6
  }
7
7
  }
8
8
  /**
9
- * Consumer offers a simlpe way to verify the signature of a request.
9
+ * Receiver offers a simlpe way to verify the signature of a request.
10
10
  */
11
- export class Consumer {
11
+ export class Receiver {
12
12
  constructor(config) {
13
13
  Object.defineProperty(this, "currentSigningKey", {
14
14
  enumerable: true,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "./script/entrypoints/nodejs.js",
4
4
  "types": "./types/entrypoints/nodejs.d.ts",
5
5
  "name": "@upstash/qstash",
6
- "version": "v0.0.17",
6
+ "version": "v0.0.18",
7
7
  "description": "Official Deno/Typescript client for qStash",
8
8
  "repository": {
9
9
  "type": "git",
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Consumer = exports.SignatureError = void 0;
3
+ exports.Receiver = exports.SignatureError = void 0;
4
4
  const deps_js_1 = require("../deps.js");
5
5
  class SignatureError extends Error {
6
6
  constructor(message) {
@@ -10,9 +10,9 @@ class SignatureError extends Error {
10
10
  }
11
11
  exports.SignatureError = SignatureError;
12
12
  /**
13
- * Consumer offers a simlpe way to verify the signature of a request.
13
+ * Receiver offers a simlpe way to verify the signature of a request.
14
14
  */
15
- class Consumer {
15
+ class Receiver {
16
16
  constructor(config) {
17
17
  Object.defineProperty(this, "currentSigningKey", {
18
18
  enumerable: true,
@@ -92,4 +92,4 @@ class Consumer {
92
92
  return true;
93
93
  }
94
94
  }
95
- exports.Consumer = Consumer;
95
+ exports.Receiver = Receiver;
@@ -3,7 +3,7 @@ export declare type SubtleCrypto = typeof crypto.subtle;
3
3
  /**
4
4
  * Necessary to verify the signature of a request.
5
5
  */
6
- export declare type ConsumerConfig = {
6
+ export declare type ReceiverConfig = {
7
7
  /**
8
8
  * The current signing key. Get it from `https://console.upstash.com/qstash
9
9
  */
@@ -25,6 +25,8 @@ export declare type VerifyRequest = {
25
25
  body: string | Uint8Array;
26
26
  /**
27
27
  * URL of the endpoint where the request was sent to.
28
+ *
29
+ * Omit empty to disable checking the url.
28
30
  */
29
31
  url?: string;
30
32
  };
@@ -32,13 +34,13 @@ export declare class SignatureError extends Error {
32
34
  constructor(message: string);
33
35
  }
34
36
  /**
35
- * Consumer offers a simlpe way to verify the signature of a request.
37
+ * Receiver offers a simlpe way to verify the signature of a request.
36
38
  */
37
- export declare class Consumer {
39
+ export declare class Receiver {
38
40
  private readonly currentSigningKey;
39
41
  private readonly nextSigningKey;
40
42
  private readonly subtleCrypto;
41
- constructor(config: ConsumerConfig);
43
+ constructor(config: ReceiverConfig);
42
44
  /**
43
45
  * Verify the signature of a request.
44
46
  *