@upstash/qstash 2.10.1 → 2.11.1
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/README.md +20 -0
- package/{chunk-Z37KJCW7.mjs → chunk-ATX5KA4T.mjs} +1 -1
- package/{chunk-PIBVA43B.mjs → chunk-KGYBZXTJ.mjs} +1 -1
- package/{chunk-35B33QW3.mjs → chunk-T3Z5YUS4.mjs} +492 -12
- package/{client-CsM1dTnz.d.ts → client-BHOXiX0H.d.mts} +52 -2
- package/{client-CsM1dTnz.d.mts → client-BHOXiX0H.d.ts} +52 -2
- package/cloudflare.d.mts +1 -1
- package/cloudflare.d.ts +1 -1
- package/cloudflare.js +490 -12
- package/cloudflare.mjs +1 -1
- package/h3.d.mts +1 -1
- package/h3.d.ts +1 -1
- package/h3.js +490 -12
- package/h3.mjs +3 -3
- package/hono.d.mts +1 -1
- package/hono.d.ts +1 -1
- package/hono.js +490 -12
- package/hono.mjs +1 -1
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/index.js +490 -12
- package/index.mjs +2 -2
- package/nextjs.d.mts +33 -2
- package/nextjs.d.ts +33 -2
- package/nextjs.js +511 -18
- package/nextjs.mjs +24 -8
- package/nuxt.js +70 -3
- 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 +490 -12
- package/solidjs.mjs +2 -2
- package/svelte.d.mts +1 -1
- package/svelte.d.ts +1 -1
- package/svelte.js +490 -12
- package/svelte.mjs +2 -2
- package/workflow.d.mts +1 -1
- package/workflow.d.ts +1 -1
- package/workflow.js +490 -12
- package/workflow.mjs +1 -1
|
@@ -18,6 +18,15 @@ type ReceiverConfig = {
|
|
|
18
18
|
* and UPSTASH_REGION header.
|
|
19
19
|
*/
|
|
20
20
|
nextSigningKey?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Controls the local dev server signing keys.
|
|
23
|
+
* - `true`: use dev server signing keys
|
|
24
|
+
* - `false`: never use dev server signing keys (ignores QSTASH_DEV env var)
|
|
25
|
+
* - `undefined`: check QSTASH_DEV env var
|
|
26
|
+
*
|
|
27
|
+
* @default undefined
|
|
28
|
+
*/
|
|
29
|
+
devMode?: boolean;
|
|
21
30
|
};
|
|
22
31
|
type VerifyRequest = {
|
|
23
32
|
/**
|
|
@@ -56,6 +65,7 @@ declare class SignatureError extends Error {
|
|
|
56
65
|
declare class Receiver {
|
|
57
66
|
private readonly currentSigningKey?;
|
|
58
67
|
private readonly nextSigningKey?;
|
|
68
|
+
private readonly devMode?;
|
|
59
69
|
constructor(config?: ReceiverConfig);
|
|
60
70
|
/**
|
|
61
71
|
* Verify the signature of a request.
|
|
@@ -91,7 +101,19 @@ type Log = {
|
|
|
91
101
|
endpointName?: string;
|
|
92
102
|
header?: Record<string, string>;
|
|
93
103
|
body?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Label of the message.
|
|
106
|
+
*
|
|
107
|
+
* @deprecated Use `labels` instead. When a message has multiple labels, this
|
|
108
|
+
* field only contains the first one.
|
|
109
|
+
*/
|
|
94
110
|
label?: string;
|
|
111
|
+
/**
|
|
112
|
+
* Labels attached to the message.
|
|
113
|
+
*
|
|
114
|
+
* A message can have multiple labels when published with `label: string[]`.
|
|
115
|
+
*/
|
|
116
|
+
labels?: string[];
|
|
95
117
|
};
|
|
96
118
|
/**
|
|
97
119
|
* Deprecated. Use the `Log` type instead.
|
|
@@ -518,7 +540,14 @@ type UniversalFilterFields = {
|
|
|
518
540
|
fromDate?: Date | number;
|
|
519
541
|
toDate?: Date | number;
|
|
520
542
|
callerIp?: string;
|
|
521
|
-
|
|
543
|
+
/**
|
|
544
|
+
* Filter by label.
|
|
545
|
+
*
|
|
546
|
+
* Pass an array to match runs that have any of the given labels (OR semantics).
|
|
547
|
+
* For example, with runs labelled `[label_1, label_2]` and `[label_2, label_3]`,
|
|
548
|
+
* filtering by `[label_1, label_2]` returns both.
|
|
549
|
+
*/
|
|
550
|
+
label?: string | string[];
|
|
522
551
|
flowControlKey?: string;
|
|
523
552
|
};
|
|
524
553
|
/** QStash-specific identity filters (DLQ + message endpoints). */
|
|
@@ -753,8 +782,17 @@ type Message = {
|
|
|
753
782
|
period?: number;
|
|
754
783
|
/**
|
|
755
784
|
* The label assigned to the message for filtering purposes.
|
|
785
|
+
*
|
|
786
|
+
* @deprecated Use `labels` instead. When a message has multiple labels, this
|
|
787
|
+
* field only contains the first one.
|
|
756
788
|
*/
|
|
757
789
|
label?: string;
|
|
790
|
+
/**
|
|
791
|
+
* The labels assigned to the message for filtering purposes.
|
|
792
|
+
*
|
|
793
|
+
* A message can have multiple labels when published with `label: string[]`.
|
|
794
|
+
*/
|
|
795
|
+
labels?: string[];
|
|
758
796
|
};
|
|
759
797
|
type MessagePayload = Omit<Message, "urlGroup"> & {
|
|
760
798
|
topicName: string;
|
|
@@ -2125,6 +2163,15 @@ type ClientConfig = {
|
|
|
2125
2163
|
* @default true
|
|
2126
2164
|
*/
|
|
2127
2165
|
enableTelemetry?: boolean;
|
|
2166
|
+
/**
|
|
2167
|
+
* Controls the local dev server.
|
|
2168
|
+
* - `true`: force dev mode on (downloads, starts, and manages the dev server automatically)
|
|
2169
|
+
* - `false`: force dev mode off (ignores QSTASH_DEV env var)
|
|
2170
|
+
* - `undefined`: check QSTASH_DEV env var
|
|
2171
|
+
*
|
|
2172
|
+
* @default undefined
|
|
2173
|
+
*/
|
|
2174
|
+
devMode?: boolean;
|
|
2128
2175
|
};
|
|
2129
2176
|
type PublishBatchRequest<TBody = BodyInit> = PublishRequest<TBody> & {
|
|
2130
2177
|
queueName?: string;
|
|
@@ -2266,9 +2313,12 @@ type PublishRequest<TBody = BodyInit> = {
|
|
|
2266
2313
|
/**
|
|
2267
2314
|
* Assign a label to the request to filter logs later.
|
|
2268
2315
|
*
|
|
2316
|
+
* Pass an array to attach multiple labels to a single message; they are
|
|
2317
|
+
* sent as a comma-separated value in the `Upstash-Label` header.
|
|
2318
|
+
*
|
|
2269
2319
|
* @default undefined
|
|
2270
2320
|
*/
|
|
2271
|
-
label?: string;
|
|
2321
|
+
label?: string | string[];
|
|
2272
2322
|
/**
|
|
2273
2323
|
* Configure which fields should be redacted in logs.
|
|
2274
2324
|
*
|
|
@@ -18,6 +18,15 @@ type ReceiverConfig = {
|
|
|
18
18
|
* and UPSTASH_REGION header.
|
|
19
19
|
*/
|
|
20
20
|
nextSigningKey?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Controls the local dev server signing keys.
|
|
23
|
+
* - `true`: use dev server signing keys
|
|
24
|
+
* - `false`: never use dev server signing keys (ignores QSTASH_DEV env var)
|
|
25
|
+
* - `undefined`: check QSTASH_DEV env var
|
|
26
|
+
*
|
|
27
|
+
* @default undefined
|
|
28
|
+
*/
|
|
29
|
+
devMode?: boolean;
|
|
21
30
|
};
|
|
22
31
|
type VerifyRequest = {
|
|
23
32
|
/**
|
|
@@ -56,6 +65,7 @@ declare class SignatureError extends Error {
|
|
|
56
65
|
declare class Receiver {
|
|
57
66
|
private readonly currentSigningKey?;
|
|
58
67
|
private readonly nextSigningKey?;
|
|
68
|
+
private readonly devMode?;
|
|
59
69
|
constructor(config?: ReceiverConfig);
|
|
60
70
|
/**
|
|
61
71
|
* Verify the signature of a request.
|
|
@@ -91,7 +101,19 @@ type Log = {
|
|
|
91
101
|
endpointName?: string;
|
|
92
102
|
header?: Record<string, string>;
|
|
93
103
|
body?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Label of the message.
|
|
106
|
+
*
|
|
107
|
+
* @deprecated Use `labels` instead. When a message has multiple labels, this
|
|
108
|
+
* field only contains the first one.
|
|
109
|
+
*/
|
|
94
110
|
label?: string;
|
|
111
|
+
/**
|
|
112
|
+
* Labels attached to the message.
|
|
113
|
+
*
|
|
114
|
+
* A message can have multiple labels when published with `label: string[]`.
|
|
115
|
+
*/
|
|
116
|
+
labels?: string[];
|
|
95
117
|
};
|
|
96
118
|
/**
|
|
97
119
|
* Deprecated. Use the `Log` type instead.
|
|
@@ -518,7 +540,14 @@ type UniversalFilterFields = {
|
|
|
518
540
|
fromDate?: Date | number;
|
|
519
541
|
toDate?: Date | number;
|
|
520
542
|
callerIp?: string;
|
|
521
|
-
|
|
543
|
+
/**
|
|
544
|
+
* Filter by label.
|
|
545
|
+
*
|
|
546
|
+
* Pass an array to match runs that have any of the given labels (OR semantics).
|
|
547
|
+
* For example, with runs labelled `[label_1, label_2]` and `[label_2, label_3]`,
|
|
548
|
+
* filtering by `[label_1, label_2]` returns both.
|
|
549
|
+
*/
|
|
550
|
+
label?: string | string[];
|
|
522
551
|
flowControlKey?: string;
|
|
523
552
|
};
|
|
524
553
|
/** QStash-specific identity filters (DLQ + message endpoints). */
|
|
@@ -753,8 +782,17 @@ type Message = {
|
|
|
753
782
|
period?: number;
|
|
754
783
|
/**
|
|
755
784
|
* The label assigned to the message for filtering purposes.
|
|
785
|
+
*
|
|
786
|
+
* @deprecated Use `labels` instead. When a message has multiple labels, this
|
|
787
|
+
* field only contains the first one.
|
|
756
788
|
*/
|
|
757
789
|
label?: string;
|
|
790
|
+
/**
|
|
791
|
+
* The labels assigned to the message for filtering purposes.
|
|
792
|
+
*
|
|
793
|
+
* A message can have multiple labels when published with `label: string[]`.
|
|
794
|
+
*/
|
|
795
|
+
labels?: string[];
|
|
758
796
|
};
|
|
759
797
|
type MessagePayload = Omit<Message, "urlGroup"> & {
|
|
760
798
|
topicName: string;
|
|
@@ -2125,6 +2163,15 @@ type ClientConfig = {
|
|
|
2125
2163
|
* @default true
|
|
2126
2164
|
*/
|
|
2127
2165
|
enableTelemetry?: boolean;
|
|
2166
|
+
/**
|
|
2167
|
+
* Controls the local dev server.
|
|
2168
|
+
* - `true`: force dev mode on (downloads, starts, and manages the dev server automatically)
|
|
2169
|
+
* - `false`: force dev mode off (ignores QSTASH_DEV env var)
|
|
2170
|
+
* - `undefined`: check QSTASH_DEV env var
|
|
2171
|
+
*
|
|
2172
|
+
* @default undefined
|
|
2173
|
+
*/
|
|
2174
|
+
devMode?: boolean;
|
|
2128
2175
|
};
|
|
2129
2176
|
type PublishBatchRequest<TBody = BodyInit> = PublishRequest<TBody> & {
|
|
2130
2177
|
queueName?: string;
|
|
@@ -2266,9 +2313,12 @@ type PublishRequest<TBody = BodyInit> = {
|
|
|
2266
2313
|
/**
|
|
2267
2314
|
* Assign a label to the request to filter logs later.
|
|
2268
2315
|
*
|
|
2316
|
+
* Pass an array to attach multiple labels to a single message; they are
|
|
2317
|
+
* sent as a comma-separated value in the `Upstash-Label` header.
|
|
2318
|
+
*
|
|
2269
2319
|
* @default undefined
|
|
2270
2320
|
*/
|
|
2271
|
-
label?: string;
|
|
2321
|
+
label?: string | string[];
|
|
2272
2322
|
/**
|
|
2273
2323
|
* Configure which fields should be redacted in logs.
|
|
2274
2324
|
*
|
package/cloudflare.d.mts
CHANGED
package/cloudflare.d.ts
CHANGED