@upstash/qstash 2.8.2 → 2.8.4

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  BaseProvider
3
- } from "./chunk-H3E2J2K6.mjs";
3
+ } from "./chunk-RQPZUJXG.mjs";
4
4
 
5
5
  // src/client/api/email.ts
6
6
  var EmailProvider = class extends BaseProvider {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Receiver,
3
3
  serve
4
- } from "./chunk-H3E2J2K6.mjs";
4
+ } from "./chunk-RQPZUJXG.mjs";
5
5
 
6
6
  // node_modules/defu/dist/defu.mjs
7
7
  function isPlainObject(value) {
@@ -799,6 +799,9 @@ function processHeaders(request) {
799
799
  headers.set("Upstash-Flow-Control-Key", request.flowControl.key);
800
800
  headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
801
801
  }
802
+ if (request.label !== void 0) {
803
+ headers.set("Upstash-Label", request.label);
804
+ }
802
805
  return headers;
803
806
  }
804
807
  function getRequestPath(request) {
@@ -1045,6 +1048,9 @@ var Schedules = class {
1045
1048
  headers.set("Upstash-Flow-Control-Key", request.flowControl.key);
1046
1049
  headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
1047
1050
  }
1051
+ if (request.label !== void 0) {
1052
+ headers.set("Upstash-Label", request.label);
1053
+ }
1048
1054
  return await this.http.request({
1049
1055
  method: "POST",
1050
1056
  headers: wrapWithGlobalHeaders(headers, this.http.headers, this.http.telemetryHeaders),
@@ -1174,7 +1180,7 @@ var UrlGroups = class {
1174
1180
  };
1175
1181
 
1176
1182
  // version.ts
1177
- var VERSION = "v2.8.2";
1183
+ var VERSION = "v2.8.4";
1178
1184
 
1179
1185
  // src/client/client.ts
1180
1186
  var Client = class {
@@ -79,6 +79,7 @@ type Log = {
79
79
  endpointName?: string;
80
80
  header?: Record<string, string>;
81
81
  body?: string;
82
+ label?: string;
82
83
  };
83
84
  /**
84
85
  * Deprecated. Use the `Log` type instead.
@@ -598,6 +599,10 @@ type Message = {
598
599
  * In seconds.
599
600
  */
600
601
  period?: number;
602
+ /**
603
+ * The label assigned to the message for filtering purposes.
604
+ */
605
+ label?: string;
601
606
  };
602
607
  type MessagePayload = Omit<Message, "urlGroup"> & {
603
608
  topicName: string;
@@ -674,6 +679,10 @@ type DLQFilter = {
674
679
  * Filter DLQ entries by ending time, in milliseconds
675
680
  */
676
681
  toDate?: number;
682
+ /**
683
+ * Filter DLQ entries by label
684
+ */
685
+ label?: string;
677
686
  /**
678
687
  * Filter DLQ entries by HTTP status of the response
679
688
  */
@@ -850,6 +859,28 @@ type Schedule = {
850
859
  * if retry_delay was set when creating the schedule.
851
860
  */
852
861
  retryDelayExpression?: PublishRequest["retryDelay"];
862
+ /**
863
+ * The label assigned to the schedule for filtering purposes.
864
+ */
865
+ label?: string;
866
+ /**
867
+ * The timestamp of the last scheduled execution.
868
+ */
869
+ lastScheduleTime?: number;
870
+ /**
871
+ * The timestamp of the next scheduled execution.
872
+ */
873
+ nextScheduleTime?: number;
874
+ /**
875
+ * The states of the last scheduled messages.
876
+ *
877
+ * Maps message id to state
878
+ */
879
+ lastScheduleStates?: Record<string, "IN_PROGRESS" | "SUCCESS" | "FAIL">;
880
+ /**
881
+ * The IP address of the caller who created the schedule.
882
+ */
883
+ callerIP?: string;
853
884
  };
854
885
  type CreateScheduleRequest = {
855
886
  /**
@@ -943,6 +974,12 @@ type CreateScheduleRequest = {
943
974
  * and number of requests per second with the same key.
944
975
  */
945
976
  flowControl?: FlowControl;
977
+ /**
978
+ * Assign a label to the schedule to filter logs later.
979
+ *
980
+ * @default undefined
981
+ */
982
+ label?: string;
946
983
  } & Pick<PublishRequest, "retryDelay">;
947
984
  declare class Schedules {
948
985
  private readonly http;
@@ -1894,6 +1931,12 @@ type PublishRequest<TBody = BodyInit> = {
1894
1931
  * and number of requests per second with the same key.
1895
1932
  */
1896
1933
  flowControl?: FlowControl;
1934
+ /**
1935
+ * Assign a label to the request to filter logs later.
1936
+ *
1937
+ * @default undefined
1938
+ */
1939
+ label?: string;
1897
1940
  } & ({
1898
1941
  /**
1899
1942
  * The url where the message should be sent to.
@@ -1999,6 +2042,7 @@ type LogsRequestFilter = {
1999
2042
  fromDate?: number;
2000
2043
  toDate?: number;
2001
2044
  count?: number;
2045
+ label?: string;
2002
2046
  };
2003
2047
  type GetLogsResponse = {
2004
2048
  cursor?: string;
@@ -79,6 +79,7 @@ type Log = {
79
79
  endpointName?: string;
80
80
  header?: Record<string, string>;
81
81
  body?: string;
82
+ label?: string;
82
83
  };
83
84
  /**
84
85
  * Deprecated. Use the `Log` type instead.
@@ -598,6 +599,10 @@ type Message = {
598
599
  * In seconds.
599
600
  */
600
601
  period?: number;
602
+ /**
603
+ * The label assigned to the message for filtering purposes.
604
+ */
605
+ label?: string;
601
606
  };
602
607
  type MessagePayload = Omit<Message, "urlGroup"> & {
603
608
  topicName: string;
@@ -674,6 +679,10 @@ type DLQFilter = {
674
679
  * Filter DLQ entries by ending time, in milliseconds
675
680
  */
676
681
  toDate?: number;
682
+ /**
683
+ * Filter DLQ entries by label
684
+ */
685
+ label?: string;
677
686
  /**
678
687
  * Filter DLQ entries by HTTP status of the response
679
688
  */
@@ -850,6 +859,28 @@ type Schedule = {
850
859
  * if retry_delay was set when creating the schedule.
851
860
  */
852
861
  retryDelayExpression?: PublishRequest["retryDelay"];
862
+ /**
863
+ * The label assigned to the schedule for filtering purposes.
864
+ */
865
+ label?: string;
866
+ /**
867
+ * The timestamp of the last scheduled execution.
868
+ */
869
+ lastScheduleTime?: number;
870
+ /**
871
+ * The timestamp of the next scheduled execution.
872
+ */
873
+ nextScheduleTime?: number;
874
+ /**
875
+ * The states of the last scheduled messages.
876
+ *
877
+ * Maps message id to state
878
+ */
879
+ lastScheduleStates?: Record<string, "IN_PROGRESS" | "SUCCESS" | "FAIL">;
880
+ /**
881
+ * The IP address of the caller who created the schedule.
882
+ */
883
+ callerIP?: string;
853
884
  };
854
885
  type CreateScheduleRequest = {
855
886
  /**
@@ -943,6 +974,12 @@ type CreateScheduleRequest = {
943
974
  * and number of requests per second with the same key.
944
975
  */
945
976
  flowControl?: FlowControl;
977
+ /**
978
+ * Assign a label to the schedule to filter logs later.
979
+ *
980
+ * @default undefined
981
+ */
982
+ label?: string;
946
983
  } & Pick<PublishRequest, "retryDelay">;
947
984
  declare class Schedules {
948
985
  private readonly http;
@@ -1894,6 +1931,12 @@ type PublishRequest<TBody = BodyInit> = {
1894
1931
  * and number of requests per second with the same key.
1895
1932
  */
1896
1933
  flowControl?: FlowControl;
1934
+ /**
1935
+ * Assign a label to the request to filter logs later.
1936
+ *
1937
+ * @default undefined
1938
+ */
1939
+ label?: string;
1897
1940
  } & ({
1898
1941
  /**
1899
1942
  * The url where the message should be sent to.
@@ -1999,6 +2042,7 @@ type LogsRequestFilter = {
1999
2042
  fromDate?: number;
2000
2043
  toDate?: number;
2001
2044
  count?: number;
2045
+ label?: string;
2002
2046
  };
2003
2047
  type GetLogsResponse = {
2004
2048
  cursor?: string;
package/cloudflare.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-C3waRcAY.mjs';
1
+ import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-DKNfczbM.mjs';
2
2
  import 'neverthrow';
3
3
 
4
4
  type WorkflowBindings = {
package/cloudflare.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-C3waRcAY.js';
1
+ import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-DKNfczbM.js';
2
2
  import 'neverthrow';
3
3
 
4
4
  type WorkflowBindings = {
package/cloudflare.js CHANGED
@@ -819,6 +819,9 @@ function processHeaders(request) {
819
819
  headers.set("Upstash-Flow-Control-Key", request.flowControl.key);
820
820
  headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
821
821
  }
822
+ if (request.label !== void 0) {
823
+ headers.set("Upstash-Label", request.label);
824
+ }
822
825
  return headers;
823
826
  }
824
827
  function getRequestPath(request) {
@@ -1065,6 +1068,9 @@ var Schedules = class {
1065
1068
  headers.set("Upstash-Flow-Control-Key", request.flowControl.key);
1066
1069
  headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
1067
1070
  }
1071
+ if (request.label !== void 0) {
1072
+ headers.set("Upstash-Label", request.label);
1073
+ }
1068
1074
  return await this.http.request({
1069
1075
  method: "POST",
1070
1076
  headers: wrapWithGlobalHeaders(headers, this.http.headers, this.http.telemetryHeaders),
@@ -1194,7 +1200,7 @@ var UrlGroups = class {
1194
1200
  };
1195
1201
 
1196
1202
  // version.ts
1197
- var VERSION = "v2.8.2";
1203
+ var VERSION = "v2.8.4";
1198
1204
 
1199
1205
  // src/client/client.ts
1200
1206
  var Client = class {
package/cloudflare.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  serve
3
- } from "./chunk-H3E2J2K6.mjs";
3
+ } from "./chunk-RQPZUJXG.mjs";
4
4
 
5
5
  // platforms/cloudflare.ts
6
6
  var getArgs = (args) => {
package/h3.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as h3 from 'h3';
2
2
  import { H3Event } from 'h3';
3
- import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-C3waRcAY.mjs';
3
+ import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-DKNfczbM.mjs';
4
4
  import 'neverthrow';
5
5
 
6
6
  type VerifySignatureConfig = {
package/h3.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as h3 from 'h3';
2
2
  import { H3Event } from 'h3';
3
- import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-C3waRcAY.js';
3
+ import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-DKNfczbM.js';
4
4
  import 'neverthrow';
5
5
 
6
6
  type VerifySignatureConfig = {
package/h3.js CHANGED
@@ -1143,6 +1143,9 @@ function processHeaders(request) {
1143
1143
  headers.set("Upstash-Flow-Control-Key", request.flowControl.key);
1144
1144
  headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
1145
1145
  }
1146
+ if (request.label !== void 0) {
1147
+ headers.set("Upstash-Label", request.label);
1148
+ }
1146
1149
  return headers;
1147
1150
  }
1148
1151
  function getRequestPath(request) {
@@ -1389,6 +1392,9 @@ var Schedules = class {
1389
1392
  headers.set("Upstash-Flow-Control-Key", request.flowControl.key);
1390
1393
  headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
1391
1394
  }
1395
+ if (request.label !== void 0) {
1396
+ headers.set("Upstash-Label", request.label);
1397
+ }
1392
1398
  return await this.http.request({
1393
1399
  method: "POST",
1394
1400
  headers: wrapWithGlobalHeaders(headers, this.http.headers, this.http.telemetryHeaders),
@@ -2904,7 +2910,7 @@ var Workflow = class {
2904
2910
  };
2905
2911
 
2906
2912
  // version.ts
2907
- var VERSION = "v2.8.2";
2913
+ var VERSION = "v2.8.4";
2908
2914
 
2909
2915
  // src/client/client.ts
2910
2916
  var Client = class {
package/h3.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  serve,
3
3
  verifySignatureH3
4
- } from "./chunk-RW3CBR2S.mjs";
5
- import "./chunk-4XJ4NO33.mjs";
6
- import "./chunk-H3E2J2K6.mjs";
4
+ } from "./chunk-EZZS7N6P.mjs";
5
+ import "./chunk-5PQP3YLP.mjs";
6
+ import "./chunk-RQPZUJXG.mjs";
7
7
  export {
8
8
  serve,
9
9
  verifySignatureH3
package/hono.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Context } from 'hono';
2
- import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-C3waRcAY.mjs';
2
+ import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-DKNfczbM.mjs';
3
3
  import 'neverthrow';
4
4
 
5
5
  type WorkflowBindings = {
package/hono.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Context } from 'hono';
2
- import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-C3waRcAY.js';
2
+ import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-DKNfczbM.js';
3
3
  import 'neverthrow';
4
4
 
5
5
  type WorkflowBindings = {
package/hono.js CHANGED
@@ -819,6 +819,9 @@ function processHeaders(request) {
819
819
  headers.set("Upstash-Flow-Control-Key", request.flowControl.key);
820
820
  headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
821
821
  }
822
+ if (request.label !== void 0) {
823
+ headers.set("Upstash-Label", request.label);
824
+ }
822
825
  return headers;
823
826
  }
824
827
  function getRequestPath(request) {
@@ -1065,6 +1068,9 @@ var Schedules = class {
1065
1068
  headers.set("Upstash-Flow-Control-Key", request.flowControl.key);
1066
1069
  headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
1067
1070
  }
1071
+ if (request.label !== void 0) {
1072
+ headers.set("Upstash-Label", request.label);
1073
+ }
1068
1074
  return await this.http.request({
1069
1075
  method: "POST",
1070
1076
  headers: wrapWithGlobalHeaders(headers, this.http.headers, this.http.telemetryHeaders),
@@ -1194,7 +1200,7 @@ var UrlGroups = class {
1194
1200
  };
1195
1201
 
1196
1202
  // version.ts
1197
- var VERSION = "v2.8.2";
1203
+ var VERSION = "v2.8.4";
1198
1204
 
1199
1205
  // src/client/client.ts
1200
1206
  var Client = class {
package/hono.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  serve
3
- } from "./chunk-H3E2J2K6.mjs";
3
+ } from "./chunk-RQPZUJXG.mjs";
4
4
 
5
5
  // platforms/hono.ts
6
6
  var serve2 = (routeFunction, options) => {
package/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RateLimit, C as ChatRateLimit, S as Step, F as FailureFunctionPayload, L as LLMOwner, B as BaseProvider, E as EmailOwner, P as ProviderInfo } from './client-C3waRcAY.mjs';
2
- export { A as AddEndpointsRequest, K as BodyInit, X as Chat, Z as ChatCompletion, _ as ChatCompletionChunk, Y as ChatCompletionMessage, a4 as ChatRequest, j as Client, r as CreateScheduleRequest, t as Endpoint, y as Event, D as EventPayload, h as EventsRequest, T as FlowControl, J as GetEventsPayload, i as GetEventsResponse, I as GetLogsPayload, G as GetLogsResponse, H as HTTPMethods, N as HeadersInit, x as Log, z as LogPayload, g as LogsRequest, M as Message, o as MessagePayload, p as Messages, a2 as OpenAIChatModel, a3 as PromptChatRequest, d as PublishBatchRequest, f as PublishJsonRequest, e as PublishRequest, n as PublishResponse, k as PublishToApiResponse, m as PublishToUrlGroupsResponse, l as PublishToUrlResponse, Q as QueueRequest, c as Receiver, a as ReceiverConfig, u as RemoveEndpointsRequest, O as RequestOptions, q as Schedule, s as Schedules, b as SignatureError, w as State, a0 as StreamDisabled, $ as StreamEnabled, a1 as StreamParameter, U as UrlGroup, v as UrlGroups, V as VerifyRequest, W as WithCursor, a7 as anthropic, a8 as custom, a6 as openai, a5 as upstash } from './client-C3waRcAY.mjs';
1
+ import { R as RateLimit, C as ChatRateLimit, S as Step, F as FailureFunctionPayload, L as LLMOwner, B as BaseProvider, E as EmailOwner, P as ProviderInfo } from './client-DKNfczbM.mjs';
2
+ export { A as AddEndpointsRequest, K as BodyInit, X as Chat, Z as ChatCompletion, _ as ChatCompletionChunk, Y as ChatCompletionMessage, a4 as ChatRequest, j as Client, r as CreateScheduleRequest, t as Endpoint, y as Event, D as EventPayload, h as EventsRequest, T as FlowControl, J as GetEventsPayload, i as GetEventsResponse, I as GetLogsPayload, G as GetLogsResponse, H as HTTPMethods, N as HeadersInit, x as Log, z as LogPayload, g as LogsRequest, M as Message, o as MessagePayload, p as Messages, a2 as OpenAIChatModel, a3 as PromptChatRequest, d as PublishBatchRequest, f as PublishJsonRequest, e as PublishRequest, n as PublishResponse, k as PublishToApiResponse, m as PublishToUrlGroupsResponse, l as PublishToUrlResponse, Q as QueueRequest, c as Receiver, a as ReceiverConfig, u as RemoveEndpointsRequest, O as RequestOptions, q as Schedule, s as Schedules, b as SignatureError, w as State, a0 as StreamDisabled, $ as StreamEnabled, a1 as StreamParameter, U as UrlGroup, v as UrlGroups, V as VerifyRequest, W as WithCursor, a7 as anthropic, a8 as custom, a6 as openai, a5 as upstash } from './client-DKNfczbM.mjs';
3
3
  import 'neverthrow';
4
4
 
5
5
  /**
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RateLimit, C as ChatRateLimit, S as Step, F as FailureFunctionPayload, L as LLMOwner, B as BaseProvider, E as EmailOwner, P as ProviderInfo } from './client-C3waRcAY.js';
2
- export { A as AddEndpointsRequest, K as BodyInit, X as Chat, Z as ChatCompletion, _ as ChatCompletionChunk, Y as ChatCompletionMessage, a4 as ChatRequest, j as Client, r as CreateScheduleRequest, t as Endpoint, y as Event, D as EventPayload, h as EventsRequest, T as FlowControl, J as GetEventsPayload, i as GetEventsResponse, I as GetLogsPayload, G as GetLogsResponse, H as HTTPMethods, N as HeadersInit, x as Log, z as LogPayload, g as LogsRequest, M as Message, o as MessagePayload, p as Messages, a2 as OpenAIChatModel, a3 as PromptChatRequest, d as PublishBatchRequest, f as PublishJsonRequest, e as PublishRequest, n as PublishResponse, k as PublishToApiResponse, m as PublishToUrlGroupsResponse, l as PublishToUrlResponse, Q as QueueRequest, c as Receiver, a as ReceiverConfig, u as RemoveEndpointsRequest, O as RequestOptions, q as Schedule, s as Schedules, b as SignatureError, w as State, a0 as StreamDisabled, $ as StreamEnabled, a1 as StreamParameter, U as UrlGroup, v as UrlGroups, V as VerifyRequest, W as WithCursor, a7 as anthropic, a8 as custom, a6 as openai, a5 as upstash } from './client-C3waRcAY.js';
1
+ import { R as RateLimit, C as ChatRateLimit, S as Step, F as FailureFunctionPayload, L as LLMOwner, B as BaseProvider, E as EmailOwner, P as ProviderInfo } from './client-DKNfczbM.js';
2
+ export { A as AddEndpointsRequest, K as BodyInit, X as Chat, Z as ChatCompletion, _ as ChatCompletionChunk, Y as ChatCompletionMessage, a4 as ChatRequest, j as Client, r as CreateScheduleRequest, t as Endpoint, y as Event, D as EventPayload, h as EventsRequest, T as FlowControl, J as GetEventsPayload, i as GetEventsResponse, I as GetLogsPayload, G as GetLogsResponse, H as HTTPMethods, N as HeadersInit, x as Log, z as LogPayload, g as LogsRequest, M as Message, o as MessagePayload, p as Messages, a2 as OpenAIChatModel, a3 as PromptChatRequest, d as PublishBatchRequest, f as PublishJsonRequest, e as PublishRequest, n as PublishResponse, k as PublishToApiResponse, m as PublishToUrlGroupsResponse, l as PublishToUrlResponse, Q as QueueRequest, c as Receiver, a as ReceiverConfig, u as RemoveEndpointsRequest, O as RequestOptions, q as Schedule, s as Schedules, b as SignatureError, w as State, a0 as StreamDisabled, $ as StreamEnabled, a1 as StreamParameter, U as UrlGroup, v as UrlGroups, V as VerifyRequest, W as WithCursor, a7 as anthropic, a8 as custom, a6 as openai, a5 as upstash } from './client-DKNfczbM.js';
3
3
  import 'neverthrow';
4
4
 
5
5
  /**
package/index.js CHANGED
@@ -855,6 +855,9 @@ function processHeaders(request) {
855
855
  headers.set("Upstash-Flow-Control-Key", request.flowControl.key);
856
856
  headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
857
857
  }
858
+ if (request.label !== void 0) {
859
+ headers.set("Upstash-Label", request.label);
860
+ }
858
861
  return headers;
859
862
  }
860
863
  function getRequestPath(request) {
@@ -1096,6 +1099,9 @@ var Schedules = class {
1096
1099
  headers.set("Upstash-Flow-Control-Key", request.flowControl.key);
1097
1100
  headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
1098
1101
  }
1102
+ if (request.label !== void 0) {
1103
+ headers.set("Upstash-Label", request.label);
1104
+ }
1099
1105
  return await this.http.request({
1100
1106
  method: "POST",
1101
1107
  headers: wrapWithGlobalHeaders(headers, this.http.headers, this.http.telemetryHeaders),
@@ -1256,7 +1262,7 @@ var Workflow = class {
1256
1262
  };
1257
1263
 
1258
1264
  // version.ts
1259
- var VERSION = "v2.8.2";
1265
+ var VERSION = "v2.8.4";
1260
1266
 
1261
1267
  // src/client/client.ts
1262
1268
  var Client = class {
package/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resend
3
- } from "./chunk-4XJ4NO33.mjs";
3
+ } from "./chunk-5PQP3YLP.mjs";
4
4
  import {
5
5
  Chat,
6
6
  Client,
@@ -22,7 +22,7 @@ import {
22
22
  openai,
23
23
  setupAnalytics,
24
24
  upstash
25
- } from "./chunk-H3E2J2K6.mjs";
25
+ } from "./chunk-RQPZUJXG.mjs";
26
26
  export {
27
27
  Chat,
28
28
  Client,
package/nextjs.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { NextApiHandler } from 'next';
2
2
  import { NextRequest, NextFetchEvent } from 'next/server';
3
- import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-C3waRcAY.mjs';
3
+ import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-DKNfczbM.mjs';
4
4
  import 'neverthrow';
5
5
 
6
6
  type VerifySignatureConfig = {
package/nextjs.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { NextApiHandler } from 'next';
2
2
  import { NextRequest, NextFetchEvent } from 'next/server';
3
- import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-C3waRcAY.js';
3
+ import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-DKNfczbM.js';
4
4
  import 'neverthrow';
5
5
 
6
6
  type VerifySignatureConfig = {
package/nextjs.js CHANGED
@@ -823,6 +823,9 @@ function processHeaders(request) {
823
823
  headers.set("Upstash-Flow-Control-Key", request.flowControl.key);
824
824
  headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
825
825
  }
826
+ if (request.label !== void 0) {
827
+ headers.set("Upstash-Label", request.label);
828
+ }
826
829
  return headers;
827
830
  }
828
831
  function getRequestPath(request) {
@@ -1069,6 +1072,9 @@ var Schedules = class {
1069
1072
  headers.set("Upstash-Flow-Control-Key", request.flowControl.key);
1070
1073
  headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
1071
1074
  }
1075
+ if (request.label !== void 0) {
1076
+ headers.set("Upstash-Label", request.label);
1077
+ }
1072
1078
  return await this.http.request({
1073
1079
  method: "POST",
1074
1080
  headers: wrapWithGlobalHeaders(headers, this.http.headers, this.http.telemetryHeaders),
@@ -1198,7 +1204,7 @@ var UrlGroups = class {
1198
1204
  };
1199
1205
 
1200
1206
  // version.ts
1201
- var VERSION = "v2.8.2";
1207
+ var VERSION = "v2.8.4";
1202
1208
 
1203
1209
  // src/client/client.ts
1204
1210
  var Client = class {
package/nextjs.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Receiver,
3
3
  serve
4
- } from "./chunk-H3E2J2K6.mjs";
4
+ } from "./chunk-RQPZUJXG.mjs";
5
5
 
6
6
  // platforms/nextjs.ts
7
7
  var BAD_REQUEST = 400;
package/nuxt.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  verifySignatureH3
3
- } from "./chunk-RW3CBR2S.mjs";
4
- import "./chunk-4XJ4NO33.mjs";
5
- import "./chunk-H3E2J2K6.mjs";
3
+ } from "./chunk-EZZS7N6P.mjs";
4
+ import "./chunk-5PQP3YLP.mjs";
5
+ import "./chunk-RQPZUJXG.mjs";
6
6
 
7
7
  // platforms/nuxt.ts
8
8
  var verifySignatureNuxt = verifySignatureH3;
package/package.json CHANGED
@@ -1 +1 @@
1
- {"version":"v2.8.2","name":"@upstash/qstash","description":"Official Typescript client for QStash","author":"Andreas Thomas <dev@chronark.com>","license":"MIT","homepage":"https://github.com/upstash/sdk-qstash-ts#readme","repository":{"type":"git","url":"git+https://github.com/upstash/sdk-qstash-ts.git"},"bugs":{"url":"https://github.com/upstash/sdk-qstash-ts/issues"},"main":"./index.js","module":"./index.mjs","types":"./index.d.ts","files":["./*"],"exports":{".":{"import":"./index.mjs","require":"./index.js"},"./dist/nextjs":{"import":"./nextjs.mjs","require":"./nextjs.js"},"./nextjs":{"import":"./nextjs.mjs","require":"./nextjs.js"},"./h3":{"import":"./h3.mjs","require":"./h3.js"},"./nuxt":{"import":"./nuxt.mjs","require":"./nuxt.js"},"./svelte":{"import":"./svelte.mjs","require":"./svelte.js"},"./solidjs":{"import":"./solidjs.mjs","require":"./solidjs.js"},"./workflow":{"import":"./workflow.mjs","require":"./workflow.js"},"./hono":{"import":"./hono.mjs","require":"./hono.js"},"./cloudflare":{"import":"./cloudflare.mjs","require":"./cloudflare.js"}},"keywords":["qstash","queue","events","serverless","upstash"],"scripts":{"build":"tsup && cp README.md ./dist/ && cp package.json ./dist/ && cp LICENSE ./dist/","test":"bun test src","fmt":"prettier --write .","lint":"tsc && eslint \"{src,platforms}/**/*.{js,ts,tsx}\" --quiet --fix","check-exports":"bun run build && cd dist && attw -P"},"devDependencies":{"@commitlint/cli":"^19.2.2","@commitlint/config-conventional":"^19.2.2","@eslint/eslintrc":"^3.1.0","@eslint/js":"^9.10.0","@solidjs/start":"^1.0.6","@sveltejs/kit":"^2.5.18","@types/bun":"^1.1.1","@types/crypto-js":"^4.2.0","@typescript-eslint/eslint-plugin":"^8.4.0","@typescript-eslint/parser":"^8.4.0","ai":"^3.1.28","bun-types":"^1.1.7","eslint":"^9.10.0","eslint-plugin-unicorn":"^51.0.1","h3":"^1.12.0","hono":"^4.5.8","husky":"^9.0.10","next":"^14.0.2","prettier":"^3.2.5","tsup":"latest","typescript":"^5.4.5","undici-types":"^6.16.0","vitest":"latest"},"dependencies":{"crypto-js":">=4.2.0","jose":"^5.2.3","neverthrow":"^7.0.1"}}
1
+ {"version":"v2.8.4","name":"@upstash/qstash","description":"Official Typescript client for QStash","author":"Andreas Thomas <dev@chronark.com>","license":"MIT","homepage":"https://github.com/upstash/sdk-qstash-ts#readme","repository":{"type":"git","url":"git+https://github.com/upstash/sdk-qstash-ts.git"},"bugs":{"url":"https://github.com/upstash/sdk-qstash-ts/issues"},"main":"./index.js","module":"./index.mjs","types":"./index.d.ts","files":["./*"],"exports":{".":{"import":"./index.mjs","require":"./index.js"},"./dist/nextjs":{"import":"./nextjs.mjs","require":"./nextjs.js"},"./nextjs":{"import":"./nextjs.mjs","require":"./nextjs.js"},"./h3":{"import":"./h3.mjs","require":"./h3.js"},"./nuxt":{"import":"./nuxt.mjs","require":"./nuxt.js"},"./svelte":{"import":"./svelte.mjs","require":"./svelte.js"},"./solidjs":{"import":"./solidjs.mjs","require":"./solidjs.js"},"./workflow":{"import":"./workflow.mjs","require":"./workflow.js"},"./hono":{"import":"./hono.mjs","require":"./hono.js"},"./cloudflare":{"import":"./cloudflare.mjs","require":"./cloudflare.js"}},"keywords":["qstash","queue","events","serverless","upstash"],"scripts":{"build":"tsup && cp README.md ./dist/ && cp package.json ./dist/ && cp LICENSE ./dist/","test":"bun test src","fmt":"prettier --write .","lint":"tsc && eslint \"{src,platforms}/**/*.{js,ts,tsx}\" --quiet --fix","check-exports":"bun run build && cd dist && attw -P"},"devDependencies":{"@commitlint/cli":"^19.2.2","@commitlint/config-conventional":"^19.2.2","@eslint/eslintrc":"^3.1.0","@eslint/js":"^9.10.0","@solidjs/start":"^1.0.6","@sveltejs/kit":"^2.5.18","@types/bun":"^1.1.1","@types/crypto-js":"^4.2.0","@typescript-eslint/eslint-plugin":"^8.4.0","@typescript-eslint/parser":"^8.4.0","ai":"^3.1.28","bun-types":"^1.1.7","eslint":"^9.10.0","eslint-plugin-unicorn":"^51.0.1","h3":"^1.12.0","hono":"^4.5.8","husky":"^9.0.10","next":"^14.0.2","prettier":"^3.2.5","tsup":"latest","typescript":"^5.4.5","undici-types":"^6.16.0","vitest":"latest"},"dependencies":{"crypto-js":">=4.2.0","jose":"^5.2.3","neverthrow":"^7.0.1"}}
package/solidjs.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { APIHandler, APIEvent } from '@solidjs/start/server';
2
- import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-C3waRcAY.mjs';
2
+ import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-DKNfczbM.mjs';
3
3
  import 'neverthrow';
4
4
 
5
5
  type VerifySignatureConfig = {
package/solidjs.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { APIHandler, APIEvent } from '@solidjs/start/server';
2
- import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-C3waRcAY.js';
2
+ import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-DKNfczbM.js';
3
3
  import 'neverthrow';
4
4
 
5
5
  type VerifySignatureConfig = {
package/solidjs.js CHANGED
@@ -820,6 +820,9 @@ function processHeaders(request) {
820
820
  headers.set("Upstash-Flow-Control-Key", request.flowControl.key);
821
821
  headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
822
822
  }
823
+ if (request.label !== void 0) {
824
+ headers.set("Upstash-Label", request.label);
825
+ }
823
826
  return headers;
824
827
  }
825
828
  function getRequestPath(request) {
@@ -1066,6 +1069,9 @@ var Schedules = class {
1066
1069
  headers.set("Upstash-Flow-Control-Key", request.flowControl.key);
1067
1070
  headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
1068
1071
  }
1072
+ if (request.label !== void 0) {
1073
+ headers.set("Upstash-Label", request.label);
1074
+ }
1069
1075
  return await this.http.request({
1070
1076
  method: "POST",
1071
1077
  headers: wrapWithGlobalHeaders(headers, this.http.headers, this.http.telemetryHeaders),
@@ -2581,7 +2587,7 @@ var Workflow = class {
2581
2587
  };
2582
2588
 
2583
2589
  // version.ts
2584
- var VERSION = "v2.8.2";
2590
+ var VERSION = "v2.8.4";
2585
2591
 
2586
2592
  // src/client/client.ts
2587
2593
  var Client = class {
package/solidjs.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import "./chunk-4XJ4NO33.mjs";
1
+ import "./chunk-5PQP3YLP.mjs";
2
2
  import {
3
3
  Receiver,
4
4
  serve
5
- } from "./chunk-H3E2J2K6.mjs";
5
+ } from "./chunk-RQPZUJXG.mjs";
6
6
 
7
7
  // platforms/solidjs.ts
8
8
  var verifySignatureSolidjs = (handler, config) => {
package/svelte.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { RequestHandler } from '@sveltejs/kit';
2
- import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-C3waRcAY.mjs';
2
+ import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-DKNfczbM.mjs';
3
3
  import 'neverthrow';
4
4
 
5
5
  type VerifySignatureConfig = {
package/svelte.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { RequestHandler } from '@sveltejs/kit';
2
- import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-C3waRcAY.js';
2
+ import { a9 as RouteFunction, aa as WorkflowServeOptions } from './client-DKNfczbM.js';
3
3
  import 'neverthrow';
4
4
 
5
5
  type VerifySignatureConfig = {
package/svelte.js CHANGED
@@ -820,6 +820,9 @@ function processHeaders(request) {
820
820
  headers.set("Upstash-Flow-Control-Key", request.flowControl.key);
821
821
  headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
822
822
  }
823
+ if (request.label !== void 0) {
824
+ headers.set("Upstash-Label", request.label);
825
+ }
823
826
  return headers;
824
827
  }
825
828
  function getRequestPath(request) {
@@ -1066,6 +1069,9 @@ var Schedules = class {
1066
1069
  headers.set("Upstash-Flow-Control-Key", request.flowControl.key);
1067
1070
  headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
1068
1071
  }
1072
+ if (request.label !== void 0) {
1073
+ headers.set("Upstash-Label", request.label);
1074
+ }
1069
1075
  return await this.http.request({
1070
1076
  method: "POST",
1071
1077
  headers: wrapWithGlobalHeaders(headers, this.http.headers, this.http.telemetryHeaders),
@@ -2581,7 +2587,7 @@ var Workflow = class {
2581
2587
  };
2582
2588
 
2583
2589
  // version.ts
2584
- var VERSION = "v2.8.2";
2590
+ var VERSION = "v2.8.4";
2585
2591
 
2586
2592
  // src/client/client.ts
2587
2593
  var Client = class {
package/svelte.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import "./chunk-4XJ4NO33.mjs";
1
+ import "./chunk-5PQP3YLP.mjs";
2
2
  import {
3
3
  Receiver,
4
4
  serve
5
- } from "./chunk-H3E2J2K6.mjs";
5
+ } from "./chunk-RQPZUJXG.mjs";
6
6
 
7
7
  // platforms/svelte.ts
8
8
  var verifySignatureSvelte = (handler, config) => {
package/workflow.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export { am as AsyncStepFunction, af as DisabledWorkflowContext, F as FailureFunctionPayload, ap as FinishCondition, ar as LogLevel, ao as ParallelCallState, ak as RawStep, aq as RequiredExceptFields, a9 as RouteFunction, S as Step, an as StepFunction, aj as StepType, ai as StepTypes, al as SyncStepFunction, ab as Workflow, ag as WorkflowClient, ae as WorkflowContext, at as WorkflowLogger, as as WorkflowLoggerOptions, ah as WorkflowReceiver, aa as WorkflowServeOptions, ac as processOptions, ad as serve } from './client-C3waRcAY.mjs';
1
+ export { am as AsyncStepFunction, af as DisabledWorkflowContext, F as FailureFunctionPayload, ap as FinishCondition, ar as LogLevel, ao as ParallelCallState, ak as RawStep, aq as RequiredExceptFields, a9 as RouteFunction, S as Step, an as StepFunction, aj as StepType, ai as StepTypes, al as SyncStepFunction, ab as Workflow, ag as WorkflowClient, ae as WorkflowContext, at as WorkflowLogger, as as WorkflowLoggerOptions, ah as WorkflowReceiver, aa as WorkflowServeOptions, ac as processOptions, ad as serve } from './client-DKNfczbM.mjs';
2
2
  import 'neverthrow';
package/workflow.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { am as AsyncStepFunction, af as DisabledWorkflowContext, F as FailureFunctionPayload, ap as FinishCondition, ar as LogLevel, ao as ParallelCallState, ak as RawStep, aq as RequiredExceptFields, a9 as RouteFunction, S as Step, an as StepFunction, aj as StepType, ai as StepTypes, al as SyncStepFunction, ab as Workflow, ag as WorkflowClient, ae as WorkflowContext, at as WorkflowLogger, as as WorkflowLoggerOptions, ah as WorkflowReceiver, aa as WorkflowServeOptions, ac as processOptions, ad as serve } from './client-C3waRcAY.js';
1
+ export { am as AsyncStepFunction, af as DisabledWorkflowContext, F as FailureFunctionPayload, ap as FinishCondition, ar as LogLevel, ao as ParallelCallState, ak as RawStep, aq as RequiredExceptFields, a9 as RouteFunction, S as Step, an as StepFunction, aj as StepType, ai as StepTypes, al as SyncStepFunction, ab as Workflow, ag as WorkflowClient, ae as WorkflowContext, at as WorkflowLogger, as as WorkflowLoggerOptions, ah as WorkflowReceiver, aa as WorkflowServeOptions, ac as processOptions, ad as serve } from './client-DKNfczbM.js';
2
2
  import 'neverthrow';
package/workflow.js CHANGED
@@ -825,6 +825,9 @@ function processHeaders(request) {
825
825
  headers.set("Upstash-Flow-Control-Key", request.flowControl.key);
826
826
  headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
827
827
  }
828
+ if (request.label !== void 0) {
829
+ headers.set("Upstash-Label", request.label);
830
+ }
828
831
  return headers;
829
832
  }
830
833
  function getRequestPath(request) {
@@ -1071,6 +1074,9 @@ var Schedules = class {
1071
1074
  headers.set("Upstash-Flow-Control-Key", request.flowControl.key);
1072
1075
  headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
1073
1076
  }
1077
+ if (request.label !== void 0) {
1078
+ headers.set("Upstash-Label", request.label);
1079
+ }
1074
1080
  return await this.http.request({
1075
1081
  method: "POST",
1076
1082
  headers: wrapWithGlobalHeaders(headers, this.http.headers, this.http.telemetryHeaders),
@@ -1200,7 +1206,7 @@ var UrlGroups = class {
1200
1206
  };
1201
1207
 
1202
1208
  // version.ts
1203
- var VERSION = "v2.8.2";
1209
+ var VERSION = "v2.8.4";
1204
1210
 
1205
1211
  // src/client/client.ts
1206
1212
  var Client = class {
package/workflow.mjs CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  WorkflowLogger,
7
7
  processOptions,
8
8
  serve
9
- } from "./chunk-H3E2J2K6.mjs";
9
+ } from "./chunk-RQPZUJXG.mjs";
10
10
  export {
11
11
  DisabledWorkflowContext,
12
12
  StepTypes,