@upstash/qstash 2.8.4 → 2.9.0-rc
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/{chunk-5PQP3YLP.mjs → chunk-NU64UBMT.mjs} +1 -1
- package/{chunk-EZZS7N6P.mjs → chunk-PB5UCB6Z.mjs} +6 -9
- package/{chunk-RQPZUJXG.mjs → chunk-WOMVRJIB.mjs} +640 -495
- package/{client-DKNfczbM.d.ts → client-BVG9vt90.d.mts} +17 -5
- package/{client-DKNfczbM.d.mts → client-BVG9vt90.d.ts} +17 -5
- package/cloudflare.d.mts +1 -1
- package/cloudflare.d.ts +1 -1
- package/cloudflare.js +812 -667
- package/cloudflare.mjs +1 -1
- package/h3.d.mts +1 -1
- package/h3.d.ts +1 -1
- package/h3.js +825 -683
- package/h3.mjs +3 -3
- package/hono.d.mts +1 -1
- package/hono.d.ts +1 -1
- package/hono.js +812 -667
- package/hono.mjs +1 -1
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/index.js +637 -492
- package/index.mjs +2 -2
- package/nextjs.d.mts +1 -1
- package/nextjs.d.ts +1 -1
- package/nextjs.js +647 -511
- package/nextjs.mjs +16 -25
- package/nuxt.js +110 -12
- package/nuxt.mjs +3 -3
- package/package.json +1 -1
- package/solidjs.d.mts +1 -1
- package/solidjs.d.ts +1 -1
- package/solidjs.js +828 -682
- package/solidjs.mjs +9 -8
- package/svelte.d.mts +4 -4
- package/svelte.d.ts +4 -4
- package/svelte.js +830 -684
- package/svelte.mjs +11 -10
- package/workflow.d.mts +1 -1
- package/workflow.d.ts +1 -1
- package/workflow.js +812 -667
- package/workflow.mjs +1 -1
|
@@ -6,12 +6,18 @@ import { Ok, Err } from 'neverthrow';
|
|
|
6
6
|
type ReceiverConfig = {
|
|
7
7
|
/**
|
|
8
8
|
* The current signing key. Get it from `https://console.upstash.com/qstash
|
|
9
|
+
*
|
|
10
|
+
* If not provided, value will be inferred from environment variables based on QSTASH_REGION
|
|
11
|
+
* and UPSTASH_REGION header.
|
|
9
12
|
*/
|
|
10
|
-
currentSigningKey
|
|
13
|
+
currentSigningKey?: string;
|
|
11
14
|
/**
|
|
12
15
|
* The next signing key. Get it from `https://console.upstash.com/qstash
|
|
16
|
+
*
|
|
17
|
+
* If not provided, value will be inferred from environment variables based on QSTASH_REGION
|
|
18
|
+
* and UPSTASH_REGION header.
|
|
13
19
|
*/
|
|
14
|
-
nextSigningKey
|
|
20
|
+
nextSigningKey?: string;
|
|
15
21
|
};
|
|
16
22
|
type VerifyRequest = {
|
|
17
23
|
/**
|
|
@@ -34,6 +40,12 @@ type VerifyRequest = {
|
|
|
34
40
|
* @default 0
|
|
35
41
|
*/
|
|
36
42
|
clockTolerance?: number;
|
|
43
|
+
/**
|
|
44
|
+
* The region from the `upstash-region` header.
|
|
45
|
+
*
|
|
46
|
+
* Used to infer which signing keys to use for verification in multi-region setups.
|
|
47
|
+
*/
|
|
48
|
+
upstashRegion?: string;
|
|
37
49
|
};
|
|
38
50
|
declare class SignatureError extends Error {
|
|
39
51
|
constructor(message: string);
|
|
@@ -42,9 +54,9 @@ declare class SignatureError extends Error {
|
|
|
42
54
|
* Receiver offers a simple way to verify the signature of a request.
|
|
43
55
|
*/
|
|
44
56
|
declare class Receiver {
|
|
45
|
-
private readonly currentSigningKey
|
|
46
|
-
private readonly nextSigningKey
|
|
47
|
-
constructor(config
|
|
57
|
+
private readonly currentSigningKey?;
|
|
58
|
+
private readonly nextSigningKey?;
|
|
59
|
+
constructor(config?: ReceiverConfig);
|
|
48
60
|
/**
|
|
49
61
|
* Verify the signature of a request.
|
|
50
62
|
*
|
|
@@ -6,12 +6,18 @@ import { Ok, Err } from 'neverthrow';
|
|
|
6
6
|
type ReceiverConfig = {
|
|
7
7
|
/**
|
|
8
8
|
* The current signing key. Get it from `https://console.upstash.com/qstash
|
|
9
|
+
*
|
|
10
|
+
* If not provided, value will be inferred from environment variables based on QSTASH_REGION
|
|
11
|
+
* and UPSTASH_REGION header.
|
|
9
12
|
*/
|
|
10
|
-
currentSigningKey
|
|
13
|
+
currentSigningKey?: string;
|
|
11
14
|
/**
|
|
12
15
|
* The next signing key. Get it from `https://console.upstash.com/qstash
|
|
16
|
+
*
|
|
17
|
+
* If not provided, value will be inferred from environment variables based on QSTASH_REGION
|
|
18
|
+
* and UPSTASH_REGION header.
|
|
13
19
|
*/
|
|
14
|
-
nextSigningKey
|
|
20
|
+
nextSigningKey?: string;
|
|
15
21
|
};
|
|
16
22
|
type VerifyRequest = {
|
|
17
23
|
/**
|
|
@@ -34,6 +40,12 @@ type VerifyRequest = {
|
|
|
34
40
|
* @default 0
|
|
35
41
|
*/
|
|
36
42
|
clockTolerance?: number;
|
|
43
|
+
/**
|
|
44
|
+
* The region from the `upstash-region` header.
|
|
45
|
+
*
|
|
46
|
+
* Used to infer which signing keys to use for verification in multi-region setups.
|
|
47
|
+
*/
|
|
48
|
+
upstashRegion?: string;
|
|
37
49
|
};
|
|
38
50
|
declare class SignatureError extends Error {
|
|
39
51
|
constructor(message: string);
|
|
@@ -42,9 +54,9 @@ declare class SignatureError extends Error {
|
|
|
42
54
|
* Receiver offers a simple way to verify the signature of a request.
|
|
43
55
|
*/
|
|
44
56
|
declare class Receiver {
|
|
45
|
-
private readonly currentSigningKey
|
|
46
|
-
private readonly nextSigningKey
|
|
47
|
-
constructor(config
|
|
57
|
+
private readonly currentSigningKey?;
|
|
58
|
+
private readonly nextSigningKey?;
|
|
59
|
+
constructor(config?: ReceiverConfig);
|
|
48
60
|
/**
|
|
49
61
|
* Verify the signature of a request.
|
|
50
62
|
*
|
package/cloudflare.d.mts
CHANGED
package/cloudflare.d.ts
CHANGED