@upstash/qstash 2.6.4-workflow-alpha.3 → 2.6.4-workflow-alpha.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.
@@ -1400,6 +1400,7 @@ var WORKFLOW_FAILURE_HEADER = "Upstash-Workflow-Is-Failure";
1400
1400
  var WORKFLOW_PROTOCOL_VERSION = "1";
1401
1401
  var WORKFLOW_PROTOCOL_VERSION_HEADER = "Upstash-Workflow-Sdk-Version";
1402
1402
  var DEFAULT_CONTENT_TYPE = "application/json";
1403
+ var NO_CONCURRENCY = 1;
1403
1404
 
1404
1405
  // src/client/workflow/types.ts
1405
1406
  var StepTypes = ["Initial", "Run", "SleepFor", "SleepUntil", "Call"];
@@ -1698,7 +1699,7 @@ var AutoExecutor = (_class3 = class _AutoExecutor {
1698
1699
  })]);
1699
1700
  return step.out;
1700
1701
  }
1701
- const resultStep = await lazyStep.getResultStep(1, this.stepCount);
1702
+ const resultStep = await lazyStep.getResultStep(NO_CONCURRENCY, this.stepCount);
1702
1703
  await _optionalChain([this, 'access', _39 => _39.debug, 'optionalAccess', _40 => _40.log, 'call', _41 => _41("INFO", "RUN_SINGLE", {
1703
1704
  fromRequest: false,
1704
1705
  step: resultStep,
@@ -1831,7 +1832,7 @@ var AutoExecutor = (_class3 = class _AutoExecutor {
1831
1832
  singleStep,
1832
1833
  this.context.failureUrl
1833
1834
  );
1834
- const willWait = singleStep.concurrent === 1 || singleStep.stepId === 0;
1835
+ const willWait = singleStep.concurrent === NO_CONCURRENCY || singleStep.stepId === 0;
1835
1836
  return singleStep.callUrl ? (
1836
1837
  // if the step is a third party call, we call the third party
1837
1838
  // url (singleStep.callUrl) and pass information about the workflow
@@ -2090,7 +2091,7 @@ var WorkflowContext = class {
2090
2091
  headers,
2091
2092
  steps,
2092
2093
  url,
2093
- failureUrl = false,
2094
+ failureUrl,
2094
2095
  debug,
2095
2096
  initialPayload,
2096
2097
  rawInitialPayload
@@ -2315,7 +2316,7 @@ var parsePayload = (rawPayload) => {
2315
2316
  stepName: "init",
2316
2317
  stepType: "Initial",
2317
2318
  out: rawInitialPayload,
2318
- concurrent: 1
2319
+ concurrent: NO_CONCURRENCY
2319
2320
  };
2320
2321
  const stepsToDecode = encodedSteps.filter((step) => step.callType === "step");
2321
2322
  const otherSteps = stepsToDecode.map((rawStep) => {
@@ -2452,16 +2453,10 @@ var processOptions = (options) => {
2452
2453
  throw error;
2453
2454
  }
2454
2455
  },
2455
- url: "",
2456
- // will be overwritten with request.url
2457
- verbose: false,
2458
- // initialize a receiver if the env variables are set:
2459
- receiver: receiverEnvironmentVariablesSet && new Receiver({
2456
+ receiver: receiverEnvironmentVariablesSet ? new Receiver({
2460
2457
  currentSigningKey: process.env.QSTASH_CURRENT_SIGNING_KEY,
2461
2458
  nextSigningKey: process.env.QSTASH_NEXT_SIGNING_KEY
2462
- }),
2463
- failureUrl: false,
2464
- failureFunction: false,
2459
+ }) : void 0,
2465
2460
  ...options
2466
2461
  };
2467
2462
  };
@@ -2480,9 +2475,8 @@ var serve = ({
2480
2475
  failureFunction
2481
2476
  } = processOptions(options);
2482
2477
  const debug = WorkflowLogger.getLogger(verbose);
2483
- const verifier = receiver || void 0;
2484
2478
  return async (request) => {
2485
- const workflowUrl = url || request.url;
2479
+ const workflowUrl = _nullishCoalesce(url, () => ( request.url));
2486
2480
  const workflowFailureUrl = failureFunction ? workflowUrl : failureUrl;
2487
2481
  await _optionalChain([debug, 'optionalAccess', _58 => _58.log, 'call', _59 => _59("INFO", "ENDPOINT_START")]);
2488
2482
  const failureCheck = await handleFailure(request, failureFunction);
@@ -2495,7 +2489,7 @@ var serve = ({
2495
2489
  const { rawInitialPayload, steps, isLastDuplicate } = await parseRequest(
2496
2490
  request,
2497
2491
  isFirstInvocation,
2498
- verifier,
2492
+ receiver,
2499
2493
  debug
2500
2494
  );
2501
2495
  if (isLastDuplicate) {
@@ -1400,6 +1400,7 @@ var WORKFLOW_FAILURE_HEADER = "Upstash-Workflow-Is-Failure";
1400
1400
  var WORKFLOW_PROTOCOL_VERSION = "1";
1401
1401
  var WORKFLOW_PROTOCOL_VERSION_HEADER = "Upstash-Workflow-Sdk-Version";
1402
1402
  var DEFAULT_CONTENT_TYPE = "application/json";
1403
+ var NO_CONCURRENCY = 1;
1403
1404
 
1404
1405
  // src/client/workflow/types.ts
1405
1406
  var StepTypes = ["Initial", "Run", "SleepFor", "SleepUntil", "Call"];
@@ -1698,7 +1699,7 @@ var AutoExecutor = class _AutoExecutor {
1698
1699
  });
1699
1700
  return step.out;
1700
1701
  }
1701
- const resultStep = await lazyStep.getResultStep(1, this.stepCount);
1702
+ const resultStep = await lazyStep.getResultStep(NO_CONCURRENCY, this.stepCount);
1702
1703
  await this.debug?.log("INFO", "RUN_SINGLE", {
1703
1704
  fromRequest: false,
1704
1705
  step: resultStep,
@@ -1831,7 +1832,7 @@ var AutoExecutor = class _AutoExecutor {
1831
1832
  singleStep,
1832
1833
  this.context.failureUrl
1833
1834
  );
1834
- const willWait = singleStep.concurrent === 1 || singleStep.stepId === 0;
1835
+ const willWait = singleStep.concurrent === NO_CONCURRENCY || singleStep.stepId === 0;
1835
1836
  return singleStep.callUrl ? (
1836
1837
  // if the step is a third party call, we call the third party
1837
1838
  // url (singleStep.callUrl) and pass information about the workflow
@@ -2090,7 +2091,7 @@ var WorkflowContext = class {
2090
2091
  headers,
2091
2092
  steps,
2092
2093
  url,
2093
- failureUrl = false,
2094
+ failureUrl,
2094
2095
  debug,
2095
2096
  initialPayload,
2096
2097
  rawInitialPayload
@@ -2315,7 +2316,7 @@ var parsePayload = (rawPayload) => {
2315
2316
  stepName: "init",
2316
2317
  stepType: "Initial",
2317
2318
  out: rawInitialPayload,
2318
- concurrent: 1
2319
+ concurrent: NO_CONCURRENCY
2319
2320
  };
2320
2321
  const stepsToDecode = encodedSteps.filter((step) => step.callType === "step");
2321
2322
  const otherSteps = stepsToDecode.map((rawStep) => {
@@ -2452,16 +2453,10 @@ var processOptions = (options) => {
2452
2453
  throw error;
2453
2454
  }
2454
2455
  },
2455
- url: "",
2456
- // will be overwritten with request.url
2457
- verbose: false,
2458
- // initialize a receiver if the env variables are set:
2459
- receiver: receiverEnvironmentVariablesSet && new Receiver({
2456
+ receiver: receiverEnvironmentVariablesSet ? new Receiver({
2460
2457
  currentSigningKey: process.env.QSTASH_CURRENT_SIGNING_KEY,
2461
2458
  nextSigningKey: process.env.QSTASH_NEXT_SIGNING_KEY
2462
- }),
2463
- failureUrl: false,
2464
- failureFunction: false,
2459
+ }) : void 0,
2465
2460
  ...options
2466
2461
  };
2467
2462
  };
@@ -2480,9 +2475,8 @@ var serve = ({
2480
2475
  failureFunction
2481
2476
  } = processOptions(options);
2482
2477
  const debug = WorkflowLogger.getLogger(verbose);
2483
- const verifier = receiver || void 0;
2484
2478
  return async (request) => {
2485
- const workflowUrl = url || request.url;
2479
+ const workflowUrl = url ?? request.url;
2486
2480
  const workflowFailureUrl = failureFunction ? workflowUrl : failureUrl;
2487
2481
  await debug?.log("INFO", "ENDPOINT_START");
2488
2482
  const failureCheck = await handleFailure(request, failureFunction);
@@ -2495,7 +2489,7 @@ var serve = ({
2495
2489
  const { rawInitialPayload, steps, isLastDuplicate } = await parseRequest(
2496
2490
  request,
2497
2491
  isFirstInvocation,
2498
- verifier,
2492
+ receiver,
2499
2493
  debug
2500
2494
  );
2501
2495
  if (isLastDuplicate) {
@@ -831,7 +831,7 @@ declare class WorkflowLogger {
831
831
  log(level: LogLevel, eventType: ChatLogEntry["eventType"], details?: unknown): Promise<void>;
832
832
  private writeToConsole;
833
833
  private shouldLog;
834
- static getLogger(verbose: boolean | WorkflowLogger): WorkflowLogger | undefined;
834
+ static getLogger(verbose?: boolean | WorkflowLogger): WorkflowLogger | undefined;
835
835
  }
836
836
 
837
837
  declare class AutoExecutor {
@@ -947,7 +947,7 @@ declare class WorkflowContext<TInitialPayload = unknown> {
947
947
  readonly qstashClient: Client;
948
948
  readonly workflowRunId: string;
949
949
  readonly url: string;
950
- readonly failureUrl: string | false;
950
+ readonly failureUrl?: string;
951
951
  readonly requestPayload: TInitialPayload;
952
952
  readonly headers: Headers;
953
953
  readonly rawInitialPayload: string;
@@ -957,7 +957,7 @@ declare class WorkflowContext<TInitialPayload = unknown> {
957
957
  headers: Headers;
958
958
  steps: Step[];
959
959
  url: string;
960
- failureUrl?: string | false;
960
+ failureUrl?: string;
961
961
  debug?: WorkflowLogger;
962
962
  initialPayload: TInitialPayload;
963
963
  rawInitialPayload?: string;
@@ -1174,33 +1174,52 @@ type WorkflowServeOptions<TResponse extends Response = Response, TInitialPayload
1174
1174
  /**
1175
1175
  * Verbose mode
1176
1176
  *
1177
- * Disabled if set to false. If set to true, a logger is created automatically.
1177
+ * Disabled if not set. If set to true, a logger is created automatically.
1178
1178
  *
1179
1179
  * Alternatively, a WorkflowLogger can be passed.
1180
- *
1181
- * Disabled by default
1182
1180
  */
1183
- verbose?: WorkflowLogger | boolean;
1181
+ verbose?: WorkflowLogger | true;
1184
1182
  /**
1185
- * Receiver to verify requests coming from QStash
1186
- *
1187
- * All requests except the first invocation are verified.
1183
+ * Receiver to verify *all* requests by checking if they come from QStash
1188
1184
  *
1189
- * Enabled by default. A receiver is created from the env variables
1190
- * QSTASH_CURRENT_SIGNING_KEY and QSTASH_NEXT_SIGNING_KEY.
1185
+ * By default, a receiver is created from the env variables
1186
+ * QSTASH_CURRENT_SIGNING_KEY and QSTASH_NEXT_SIGNING_KEY if they are set.
1187
+ */
1188
+ receiver?: Receiver;
1189
+ /**
1190
+ * Url to call if QStash retries are exhausted while executing the workflow
1191
1191
  */
1192
- receiver?: Receiver | false;
1192
+ failureUrl?: string;
1193
1193
  /**
1194
+ * Failure function called when QStash retries are exhausted while executing
1195
+ * the workflow. Will overwrite `failureUrl` parameter with the workflow
1196
+ * endpoint if passed.
1194
1197
  *
1198
+ * @param status failure status
1199
+ * @param header headers of the request which failed
1200
+ * @param body body which contains the error message
1201
+ * @returns void
1195
1202
  */
1196
- failureUrl?: string | false;
1197
- failureFunction?: ((status: number, header: Record<string, string>, body: FailureFunctionPayload, worklfowRunId: string) => Promise<void>) | false;
1203
+ failureFunction?: (status: number, header: Record<string, string>, body: FailureFunctionPayload, workflowRunId: string) => Promise<void>;
1198
1204
  };
1205
+ /**
1206
+ * Payload passed as body in failureFunction
1207
+ */
1199
1208
  type FailureFunctionPayload = {
1209
+ /**
1210
+ * error name
1211
+ */
1200
1212
  error: string;
1213
+ /**
1214
+ * error message
1215
+ */
1201
1216
  message: string;
1202
1217
  stack?: string;
1203
1218
  };
1219
+ /**
1220
+ * Makes all fields except the ones selected required
1221
+ */
1222
+ type RequiredExceptFields<T, K extends keyof T> = Omit<Required<T>, K> & Partial<Pick<T, K>>;
1204
1223
 
1205
1224
  /**
1206
1225
  * Creates an async method that handles incoming requests and runs the provided
@@ -1547,4 +1566,4 @@ type PublishResponse<TRequest> = TRequest extends {
1547
1566
  urlGroup: string;
1548
1567
  } ? PublishToUrlGroupsResponse : PublishToApiResponse;
1549
1568
 
1550
- export { type WorkflowServeParameters as $, type AddEndpointsRequest as A, type BodyInit as B, type ChatRateLimit as C, type ChatCompletion as D, type EventsRequest as E, type FailureFunctionPayload as F, type GetEventsResponse as G, type HTTPMethods as H, type ChatCompletionChunk as I, type StreamEnabled as J, type StreamDisabled as K, type StreamParameter as L, type Message as M, type PromptChatRequest as N, type OpenAIChatModel as O, type PublishBatchRequest as P, type QueueRequest as Q, type RateLimit as R, type Step as S, type ChatRequest as T, type UrlGroup as U, type VerifyRequest as V, type WithCursor as W, custom as X, openai as Y, upstash as Z, type ProviderReturnType as _, type ReceiverConfig as a, type WorkflowServeParametersExtended as a0, Workflow as a1, serve as a2, WorkflowContext as a3, DisabledWorkflowContext as a4, StepTypes as a5, type StepType as a6, type RawStep as a7, type SyncStepFunction as a8, type AsyncStepFunction as a9, type StepFunction as aa, type ParallelCallState as ab, type RouteFunction as ac, type FinishCondition as ad, type WorkflowServeOptions as ae, type LogLevel as af, type WorkflowLoggerOptions as ag, WorkflowLogger as ah, SignatureError as b, Receiver as c, type PublishRequest as d, type PublishJsonRequest as e, Client as f, type PublishToApiResponse as g, type PublishToUrlResponse as h, type PublishToUrlGroupsResponse as i, type PublishResponse as j, type MessagePayload as k, Messages as l, type Schedule as m, type CreateScheduleRequest as n, Schedules as o, type Endpoint as p, type RemoveEndpointsRequest as q, UrlGroups as r, type State as s, type Event as t, type EventPayload as u, type GetEventsPayload as v, type HeadersInit as w, type RequestOptions as x, Chat as y, type ChatCompletionMessage as z };
1569
+ export { type WorkflowServeParameters as $, type AddEndpointsRequest as A, type BodyInit as B, type ChatRateLimit as C, type ChatCompletion as D, type EventsRequest as E, type FailureFunctionPayload as F, type GetEventsResponse as G, type HTTPMethods as H, type ChatCompletionChunk as I, type StreamEnabled as J, type StreamDisabled as K, type StreamParameter as L, type Message as M, type PromptChatRequest as N, type OpenAIChatModel as O, type PublishBatchRequest as P, type QueueRequest as Q, type RateLimit as R, type Step as S, type ChatRequest as T, type UrlGroup as U, type VerifyRequest as V, type WithCursor as W, custom as X, openai as Y, upstash as Z, type ProviderReturnType as _, type ReceiverConfig as a, type WorkflowServeParametersExtended as a0, Workflow as a1, serve as a2, WorkflowContext as a3, DisabledWorkflowContext as a4, StepTypes as a5, type StepType as a6, type RawStep as a7, type SyncStepFunction as a8, type AsyncStepFunction as a9, type StepFunction as aa, type ParallelCallState as ab, type RouteFunction as ac, type FinishCondition as ad, type WorkflowServeOptions as ae, type RequiredExceptFields as af, type LogLevel as ag, type WorkflowLoggerOptions as ah, WorkflowLogger as ai, SignatureError as b, Receiver as c, type PublishRequest as d, type PublishJsonRequest as e, Client as f, type PublishToApiResponse as g, type PublishToUrlResponse as h, type PublishToUrlGroupsResponse as i, type PublishResponse as j, type MessagePayload as k, Messages as l, type Schedule as m, type CreateScheduleRequest as n, Schedules as o, type Endpoint as p, type RemoveEndpointsRequest as q, UrlGroups as r, type State as s, type Event as t, type EventPayload as u, type GetEventsPayload as v, type HeadersInit as w, type RequestOptions as x, Chat as y, type ChatCompletionMessage as z };
@@ -831,7 +831,7 @@ declare class WorkflowLogger {
831
831
  log(level: LogLevel, eventType: ChatLogEntry["eventType"], details?: unknown): Promise<void>;
832
832
  private writeToConsole;
833
833
  private shouldLog;
834
- static getLogger(verbose: boolean | WorkflowLogger): WorkflowLogger | undefined;
834
+ static getLogger(verbose?: boolean | WorkflowLogger): WorkflowLogger | undefined;
835
835
  }
836
836
 
837
837
  declare class AutoExecutor {
@@ -947,7 +947,7 @@ declare class WorkflowContext<TInitialPayload = unknown> {
947
947
  readonly qstashClient: Client;
948
948
  readonly workflowRunId: string;
949
949
  readonly url: string;
950
- readonly failureUrl: string | false;
950
+ readonly failureUrl?: string;
951
951
  readonly requestPayload: TInitialPayload;
952
952
  readonly headers: Headers;
953
953
  readonly rawInitialPayload: string;
@@ -957,7 +957,7 @@ declare class WorkflowContext<TInitialPayload = unknown> {
957
957
  headers: Headers;
958
958
  steps: Step[];
959
959
  url: string;
960
- failureUrl?: string | false;
960
+ failureUrl?: string;
961
961
  debug?: WorkflowLogger;
962
962
  initialPayload: TInitialPayload;
963
963
  rawInitialPayload?: string;
@@ -1174,33 +1174,52 @@ type WorkflowServeOptions<TResponse extends Response = Response, TInitialPayload
1174
1174
  /**
1175
1175
  * Verbose mode
1176
1176
  *
1177
- * Disabled if set to false. If set to true, a logger is created automatically.
1177
+ * Disabled if not set. If set to true, a logger is created automatically.
1178
1178
  *
1179
1179
  * Alternatively, a WorkflowLogger can be passed.
1180
- *
1181
- * Disabled by default
1182
1180
  */
1183
- verbose?: WorkflowLogger | boolean;
1181
+ verbose?: WorkflowLogger | true;
1184
1182
  /**
1185
- * Receiver to verify requests coming from QStash
1186
- *
1187
- * All requests except the first invocation are verified.
1183
+ * Receiver to verify *all* requests by checking if they come from QStash
1188
1184
  *
1189
- * Enabled by default. A receiver is created from the env variables
1190
- * QSTASH_CURRENT_SIGNING_KEY and QSTASH_NEXT_SIGNING_KEY.
1185
+ * By default, a receiver is created from the env variables
1186
+ * QSTASH_CURRENT_SIGNING_KEY and QSTASH_NEXT_SIGNING_KEY if they are set.
1187
+ */
1188
+ receiver?: Receiver;
1189
+ /**
1190
+ * Url to call if QStash retries are exhausted while executing the workflow
1191
1191
  */
1192
- receiver?: Receiver | false;
1192
+ failureUrl?: string;
1193
1193
  /**
1194
+ * Failure function called when QStash retries are exhausted while executing
1195
+ * the workflow. Will overwrite `failureUrl` parameter with the workflow
1196
+ * endpoint if passed.
1194
1197
  *
1198
+ * @param status failure status
1199
+ * @param header headers of the request which failed
1200
+ * @param body body which contains the error message
1201
+ * @returns void
1195
1202
  */
1196
- failureUrl?: string | false;
1197
- failureFunction?: ((status: number, header: Record<string, string>, body: FailureFunctionPayload, worklfowRunId: string) => Promise<void>) | false;
1203
+ failureFunction?: (status: number, header: Record<string, string>, body: FailureFunctionPayload, workflowRunId: string) => Promise<void>;
1198
1204
  };
1205
+ /**
1206
+ * Payload passed as body in failureFunction
1207
+ */
1199
1208
  type FailureFunctionPayload = {
1209
+ /**
1210
+ * error name
1211
+ */
1200
1212
  error: string;
1213
+ /**
1214
+ * error message
1215
+ */
1201
1216
  message: string;
1202
1217
  stack?: string;
1203
1218
  };
1219
+ /**
1220
+ * Makes all fields except the ones selected required
1221
+ */
1222
+ type RequiredExceptFields<T, K extends keyof T> = Omit<Required<T>, K> & Partial<Pick<T, K>>;
1204
1223
 
1205
1224
  /**
1206
1225
  * Creates an async method that handles incoming requests and runs the provided
@@ -1547,4 +1566,4 @@ type PublishResponse<TRequest> = TRequest extends {
1547
1566
  urlGroup: string;
1548
1567
  } ? PublishToUrlGroupsResponse : PublishToApiResponse;
1549
1568
 
1550
- export { type WorkflowServeParameters as $, type AddEndpointsRequest as A, type BodyInit as B, type ChatRateLimit as C, type ChatCompletion as D, type EventsRequest as E, type FailureFunctionPayload as F, type GetEventsResponse as G, type HTTPMethods as H, type ChatCompletionChunk as I, type StreamEnabled as J, type StreamDisabled as K, type StreamParameter as L, type Message as M, type PromptChatRequest as N, type OpenAIChatModel as O, type PublishBatchRequest as P, type QueueRequest as Q, type RateLimit as R, type Step as S, type ChatRequest as T, type UrlGroup as U, type VerifyRequest as V, type WithCursor as W, custom as X, openai as Y, upstash as Z, type ProviderReturnType as _, type ReceiverConfig as a, type WorkflowServeParametersExtended as a0, Workflow as a1, serve as a2, WorkflowContext as a3, DisabledWorkflowContext as a4, StepTypes as a5, type StepType as a6, type RawStep as a7, type SyncStepFunction as a8, type AsyncStepFunction as a9, type StepFunction as aa, type ParallelCallState as ab, type RouteFunction as ac, type FinishCondition as ad, type WorkflowServeOptions as ae, type LogLevel as af, type WorkflowLoggerOptions as ag, WorkflowLogger as ah, SignatureError as b, Receiver as c, type PublishRequest as d, type PublishJsonRequest as e, Client as f, type PublishToApiResponse as g, type PublishToUrlResponse as h, type PublishToUrlGroupsResponse as i, type PublishResponse as j, type MessagePayload as k, Messages as l, type Schedule as m, type CreateScheduleRequest as n, Schedules as o, type Endpoint as p, type RemoveEndpointsRequest as q, UrlGroups as r, type State as s, type Event as t, type EventPayload as u, type GetEventsPayload as v, type HeadersInit as w, type RequestOptions as x, Chat as y, type ChatCompletionMessage as z };
1569
+ export { type WorkflowServeParameters as $, type AddEndpointsRequest as A, type BodyInit as B, type ChatRateLimit as C, type ChatCompletion as D, type EventsRequest as E, type FailureFunctionPayload as F, type GetEventsResponse as G, type HTTPMethods as H, type ChatCompletionChunk as I, type StreamEnabled as J, type StreamDisabled as K, type StreamParameter as L, type Message as M, type PromptChatRequest as N, type OpenAIChatModel as O, type PublishBatchRequest as P, type QueueRequest as Q, type RateLimit as R, type Step as S, type ChatRequest as T, type UrlGroup as U, type VerifyRequest as V, type WithCursor as W, custom as X, openai as Y, upstash as Z, type ProviderReturnType as _, type ReceiverConfig as a, type WorkflowServeParametersExtended as a0, Workflow as a1, serve as a2, WorkflowContext as a3, DisabledWorkflowContext as a4, StepTypes as a5, type StepType as a6, type RawStep as a7, type SyncStepFunction as a8, type AsyncStepFunction as a9, type StepFunction as aa, type ParallelCallState as ab, type RouteFunction as ac, type FinishCondition as ad, type WorkflowServeOptions as ae, type RequiredExceptFields as af, type LogLevel as ag, type WorkflowLoggerOptions as ah, WorkflowLogger as ai, SignatureError as b, Receiver as c, type PublishRequest as d, type PublishJsonRequest as e, Client as f, type PublishToApiResponse as g, type PublishToUrlResponse as h, type PublishToUrlGroupsResponse as i, type PublishResponse as j, type MessagePayload as k, Messages as l, type Schedule as m, type CreateScheduleRequest as n, Schedules as o, type Endpoint as p, type RemoveEndpointsRequest as q, UrlGroups as r, type State as s, type Event as t, type EventPayload as u, type GetEventsPayload as v, type HeadersInit as w, type RequestOptions as x, Chat as y, type ChatCompletionMessage as z };
package/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RateLimit, C as ChatRateLimit, S as Step, F as FailureFunctionPayload } from './client-Dg0U5U51.mjs';
2
- export { A as AddEndpointsRequest, B as BodyInit, y as Chat, D as ChatCompletion, I as ChatCompletionChunk, z as ChatCompletionMessage, T as ChatRequest, f as Client, n as CreateScheduleRequest, p as Endpoint, t as Event, u as EventPayload, E as EventsRequest, v as GetEventsPayload, G as GetEventsResponse, H as HTTPMethods, w as HeadersInit, M as Message, k as MessagePayload, l as Messages, O as OpenAIChatModel, N as PromptChatRequest, _ as ProviderReturnType, P as PublishBatchRequest, e as PublishJsonRequest, d as PublishRequest, j as PublishResponse, g as PublishToApiResponse, i as PublishToUrlGroupsResponse, h as PublishToUrlResponse, Q as QueueRequest, c as Receiver, a as ReceiverConfig, q as RemoveEndpointsRequest, x as RequestOptions, m as Schedule, o as Schedules, b as SignatureError, s as State, K as StreamDisabled, J as StreamEnabled, L as StreamParameter, U as UrlGroup, r as UrlGroups, V as VerifyRequest, W as WithCursor, X as custom, Y as openai, Z as upstash } from './client-Dg0U5U51.mjs';
1
+ import { R as RateLimit, C as ChatRateLimit, S as Step, F as FailureFunctionPayload } from './client-Dgh4hlfZ.mjs';
2
+ export { A as AddEndpointsRequest, B as BodyInit, y as Chat, D as ChatCompletion, I as ChatCompletionChunk, z as ChatCompletionMessage, T as ChatRequest, f as Client, n as CreateScheduleRequest, p as Endpoint, t as Event, u as EventPayload, E as EventsRequest, v as GetEventsPayload, G as GetEventsResponse, H as HTTPMethods, w as HeadersInit, M as Message, k as MessagePayload, l as Messages, O as OpenAIChatModel, N as PromptChatRequest, _ as ProviderReturnType, P as PublishBatchRequest, e as PublishJsonRequest, d as PublishRequest, j as PublishResponse, g as PublishToApiResponse, i as PublishToUrlGroupsResponse, h as PublishToUrlResponse, Q as QueueRequest, c as Receiver, a as ReceiverConfig, q as RemoveEndpointsRequest, x as RequestOptions, m as Schedule, o as Schedules, b as SignatureError, s as State, K as StreamDisabled, J as StreamEnabled, L as StreamParameter, U as UrlGroup, r as UrlGroups, V as VerifyRequest, W as WithCursor, X as custom, Y as openai, Z as upstash } from './client-Dgh4hlfZ.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 } from './client-Dg0U5U51.js';
2
- export { A as AddEndpointsRequest, B as BodyInit, y as Chat, D as ChatCompletion, I as ChatCompletionChunk, z as ChatCompletionMessage, T as ChatRequest, f as Client, n as CreateScheduleRequest, p as Endpoint, t as Event, u as EventPayload, E as EventsRequest, v as GetEventsPayload, G as GetEventsResponse, H as HTTPMethods, w as HeadersInit, M as Message, k as MessagePayload, l as Messages, O as OpenAIChatModel, N as PromptChatRequest, _ as ProviderReturnType, P as PublishBatchRequest, e as PublishJsonRequest, d as PublishRequest, j as PublishResponse, g as PublishToApiResponse, i as PublishToUrlGroupsResponse, h as PublishToUrlResponse, Q as QueueRequest, c as Receiver, a as ReceiverConfig, q as RemoveEndpointsRequest, x as RequestOptions, m as Schedule, o as Schedules, b as SignatureError, s as State, K as StreamDisabled, J as StreamEnabled, L as StreamParameter, U as UrlGroup, r as UrlGroups, V as VerifyRequest, W as WithCursor, X as custom, Y as openai, Z as upstash } from './client-Dg0U5U51.js';
1
+ import { R as RateLimit, C as ChatRateLimit, S as Step, F as FailureFunctionPayload } from './client-Dgh4hlfZ.js';
2
+ export { A as AddEndpointsRequest, B as BodyInit, y as Chat, D as ChatCompletion, I as ChatCompletionChunk, z as ChatCompletionMessage, T as ChatRequest, f as Client, n as CreateScheduleRequest, p as Endpoint, t as Event, u as EventPayload, E as EventsRequest, v as GetEventsPayload, G as GetEventsResponse, H as HTTPMethods, w as HeadersInit, M as Message, k as MessagePayload, l as Messages, O as OpenAIChatModel, N as PromptChatRequest, _ as ProviderReturnType, P as PublishBatchRequest, e as PublishJsonRequest, d as PublishRequest, j as PublishResponse, g as PublishToApiResponse, i as PublishToUrlGroupsResponse, h as PublishToUrlResponse, Q as QueueRequest, c as Receiver, a as ReceiverConfig, q as RemoveEndpointsRequest, x as RequestOptions, m as Schedule, o as Schedules, b as SignatureError, s as State, K as StreamDisabled, J as StreamEnabled, L as StreamParameter, U as UrlGroup, r as UrlGroups, V as VerifyRequest, W as WithCursor, X as custom, Y as openai, Z as upstash } from './client-Dgh4hlfZ.js';
3
3
  import 'neverthrow';
4
4
 
5
5
  /**
package/index.js CHANGED
@@ -18,7 +18,7 @@ var _chunkF6QRAN74js = require('./chunk-F6QRAN74.js');
18
18
 
19
19
 
20
20
 
21
- var _chunkR5GLUQZKjs = require('./chunk-R5GLUQZK.js');
21
+ var _chunk5DADTJQLjs = require('./chunk-5DADTJQL.js');
22
22
 
23
23
 
24
24
 
@@ -37,4 +37,4 @@ var _chunkR5GLUQZKjs = require('./chunk-R5GLUQZK.js');
37
37
 
38
38
 
39
39
 
40
- exports.Chat = _chunkR5GLUQZKjs.Chat; exports.Client = _chunkR5GLUQZKjs.Client; exports.Messages = _chunkR5GLUQZKjs.Messages; exports.QstashChatRatelimitError = _chunkR5GLUQZKjs.QstashChatRatelimitError; exports.QstashDailyRatelimitError = _chunkR5GLUQZKjs.QstashDailyRatelimitError; exports.QstashError = _chunkR5GLUQZKjs.QstashError; exports.QstashRatelimitError = _chunkR5GLUQZKjs.QstashRatelimitError; exports.QstashWorkflowAbort = _chunkR5GLUQZKjs.QstashWorkflowAbort; exports.QstashWorkflowError = _chunkR5GLUQZKjs.QstashWorkflowError; exports.Receiver = _chunkR5GLUQZKjs.Receiver; exports.Schedules = _chunkR5GLUQZKjs.Schedules; exports.SignatureError = _chunkR5GLUQZKjs.SignatureError; exports.UrlGroups = _chunkR5GLUQZKjs.UrlGroups; exports.custom = _chunkF6QRAN74js.custom; exports.formatWorkflowError = _chunkR5GLUQZKjs.formatWorkflowError; exports.openai = _chunkF6QRAN74js.openai; exports.upstash = _chunkF6QRAN74js.upstash;
40
+ exports.Chat = _chunk5DADTJQLjs.Chat; exports.Client = _chunk5DADTJQLjs.Client; exports.Messages = _chunk5DADTJQLjs.Messages; exports.QstashChatRatelimitError = _chunk5DADTJQLjs.QstashChatRatelimitError; exports.QstashDailyRatelimitError = _chunk5DADTJQLjs.QstashDailyRatelimitError; exports.QstashError = _chunk5DADTJQLjs.QstashError; exports.QstashRatelimitError = _chunk5DADTJQLjs.QstashRatelimitError; exports.QstashWorkflowAbort = _chunk5DADTJQLjs.QstashWorkflowAbort; exports.QstashWorkflowError = _chunk5DADTJQLjs.QstashWorkflowError; exports.Receiver = _chunk5DADTJQLjs.Receiver; exports.Schedules = _chunk5DADTJQLjs.Schedules; exports.SignatureError = _chunk5DADTJQLjs.SignatureError; exports.UrlGroups = _chunk5DADTJQLjs.UrlGroups; exports.custom = _chunkF6QRAN74js.custom; exports.formatWorkflowError = _chunk5DADTJQLjs.formatWorkflowError; exports.openai = _chunkF6QRAN74js.openai; exports.upstash = _chunkF6QRAN74js.upstash;
package/index.mjs CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  SignatureError,
19
19
  UrlGroups,
20
20
  formatWorkflowError
21
- } from "./chunk-JPKZF2I7.mjs";
21
+ } from "./chunk-YN3OQUF3.mjs";
22
22
  export {
23
23
  Chat,
24
24
  Client,
package/nextjs.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { NextApiHandler } from 'next';
2
2
  import { NextRequest, NextFetchEvent, NextResponse } from 'next/server';
3
- import { $ as WorkflowServeParameters } from './client-Dg0U5U51.mjs';
3
+ import { $ as WorkflowServeParameters } from './client-Dgh4hlfZ.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, NextResponse } from 'next/server';
3
- import { $ as WorkflowServeParameters } from './client-Dg0U5U51.js';
3
+ import { $ as WorkflowServeParameters } from './client-Dgh4hlfZ.js';
4
4
  import 'neverthrow';
5
5
 
6
6
  type VerifySignatureConfig = {
package/nextjs.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkR5GLUQZKjs = require('./chunk-R5GLUQZK.js');
5
+ var _chunk5DADTJQLjs = require('./chunk-5DADTJQL.js');
6
6
 
7
7
  // platforms/nextjs.ts
8
8
  var _server = require('next/server');
@@ -20,7 +20,7 @@ function verifySignature(handler, config) {
20
20
  "nextSigningKey is required, either in the config or as env variable QSTASH_NEXT_SIGNING_KEY"
21
21
  );
22
22
  }
23
- const receiver = new (0, _chunkR5GLUQZKjs.Receiver)({
23
+ const receiver = new (0, _chunk5DADTJQLjs.Receiver)({
24
24
  currentSigningKey,
25
25
  nextSigningKey
26
26
  });
@@ -72,7 +72,7 @@ function verifySignatureEdge(handler, config) {
72
72
  "nextSigningKey is required, either in the config or as env variable QSTASH_NEXT_SIGNING_KEY"
73
73
  );
74
74
  }
75
- const receiver = new (0, _chunkR5GLUQZKjs.Receiver)({
75
+ const receiver = new (0, _chunk5DADTJQLjs.Receiver)({
76
76
  currentSigningKey,
77
77
  nextSigningKey
78
78
  });
@@ -112,7 +112,7 @@ function verifySignatureAppRouter(handler, config) {
112
112
  "nextSigningKey is required, either in the config or as env variable QSTASH_NEXT_SIGNING_KEY"
113
113
  );
114
114
  }
115
- const receiver = new (0, _chunkR5GLUQZKjs.Receiver)({
115
+ const receiver = new (0, _chunk5DADTJQLjs.Receiver)({
116
116
  currentSigningKey,
117
117
  nextSigningKey
118
118
  });
@@ -143,7 +143,7 @@ var serve2 = ({
143
143
  routeFunction,
144
144
  options
145
145
  }) => {
146
- const handler = _chunkR5GLUQZKjs.serve.call(void 0, {
146
+ const handler = _chunk5DADTJQLjs.serve.call(void 0, {
147
147
  routeFunction,
148
148
  options: {
149
149
  onStepFinish: (workflowRunId) => new (0, _server.NextResponse)(JSON.stringify({ workflowRunId }), { status: 200 }),
@@ -154,7 +154,7 @@ var serve2 = ({
154
154
  try {
155
155
  return await handler(request);
156
156
  } catch (error) {
157
- return new (0, _server.NextResponse)(JSON.stringify(_chunkR5GLUQZKjs.formatWorkflowError.call(void 0, error)), {
157
+ return new (0, _server.NextResponse)(JSON.stringify(_chunk5DADTJQLjs.formatWorkflowError.call(void 0, error)), {
158
158
  status: 500
159
159
  });
160
160
  }
package/nextjs.mjs CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  Receiver,
3
3
  formatWorkflowError,
4
4
  serve
5
- } from "./chunk-JPKZF2I7.mjs";
5
+ } from "./chunk-YN3OQUF3.mjs";
6
6
 
7
7
  // platforms/nextjs.ts
8
8
  import { NextResponse } from "next/server";
package/nuxt.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as h3 from 'h3';
2
2
  import { H3Event } from 'h3';
3
- import { $ as WorkflowServeParameters } from './client-Dg0U5U51.mjs';
3
+ import { $ as WorkflowServeParameters } from './client-Dgh4hlfZ.mjs';
4
4
  import 'neverthrow';
5
5
 
6
6
  type VerifySignatureConfig = {
package/nuxt.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as h3 from 'h3';
2
2
  import { H3Event } from 'h3';
3
- import { $ as WorkflowServeParameters } from './client-Dg0U5U51.js';
3
+ import { $ as WorkflowServeParameters } from './client-Dgh4hlfZ.js';
4
4
  import 'neverthrow';
5
5
 
6
6
  type VerifySignatureConfig = {
package/nuxt.js CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkR5GLUQZKjs = require('./chunk-R5GLUQZK.js');
6
+ var _chunk5DADTJQLjs = require('./chunk-5DADTJQL.js');
7
7
 
8
8
  // platforms/nuxt.ts
9
9
  var _h3 = require('h3');
@@ -20,7 +20,7 @@ var verifySignatureNuxt = (handler, config) => {
20
20
  "nextSigningKey is required, either in the config or as env variable QSTASH_NEXT_SIGNING_KEY"
21
21
  );
22
22
  }
23
- const receiver = new (0, _chunkR5GLUQZKjs.Receiver)({
23
+ const receiver = new (0, _chunk5DADTJQLjs.Receiver)({
24
24
  currentSigningKey,
25
25
  nextSigningKey
26
26
  });
@@ -74,14 +74,14 @@ var serve2 = ({
74
74
  body: await _h3.readRawBody.call(void 0, event),
75
75
  method: "POST"
76
76
  });
77
- const serveHandler = _chunkR5GLUQZKjs.serve.call(void 0, {
77
+ const serveHandler = _chunk5DADTJQLjs.serve.call(void 0, {
78
78
  routeFunction,
79
79
  options
80
80
  });
81
81
  try {
82
82
  return await serveHandler(request);
83
83
  } catch (error) {
84
- return new Response(JSON.stringify(_chunkR5GLUQZKjs.formatWorkflowError.call(void 0, error)), { status: 500 });
84
+ return new Response(JSON.stringify(_chunk5DADTJQLjs.formatWorkflowError.call(void 0, error)), { status: 500 });
85
85
  }
86
86
  });
87
87
  return handler;
package/nuxt.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  Receiver,
4
4
  formatWorkflowError,
5
5
  serve
6
- } from "./chunk-JPKZF2I7.mjs";
6
+ } from "./chunk-YN3OQUF3.mjs";
7
7
 
8
8
  // platforms/nuxt.ts
9
9
  import { defineEventHandler, getHeader, readRawBody } from "h3";
package/package.json CHANGED
@@ -1 +1 @@
1
- {"version":"v2.6.4-workflow-alpha.3","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"},"./nextjs":{"types":"./nextjs.d.ts","import":"./nextjs.mjs","require":"./nextjs.js"},"./dist/nextjs":{"types":"./nextjs.d.ts","import":"./nextjs.mjs","require":"./nextjs.js"},"./nuxt":{"types":"./nuxt.d.ts","import":"./nuxt.mjs","require":"./nuxt.js"},"./svelte":{"types":"./svelte.d.ts","import":"./svelte.mjs","require":"./svelte.js"},"./solidjs":{"types":"./solidjs.d.ts","import":"./solidjs.mjs","require":"./solidjs.js"},"./workflow":{"types":"./workflow.d.ts","import":"./workflow.mjs","require":"./workflow.js"}},"typesVersions":{"*":{"nextjs":["./nextjs.d.ts"]}},"keywords":["qstash","queue","events","serverless","upstash"],"scripts":{"build":"tsup && cp README.md ./dist/ && cp package.json ./dist/ && cp LICENSE ./dist/","test":"bun test","fmt":"prettier --write .","lint":"tsc && eslint \"src/**/*.{js,ts,tsx}\" --quiet --fix"},"devDependencies":{"@commitlint/cli":"^19.2.2","@commitlint/config-conventional":"^19.2.2","@types/bun":"^1.1.1","@types/crypto-js":"^4.2.0","@typescript-eslint/eslint-plugin":"^7.0.1","@typescript-eslint/parser":"^7.0.1","ai":"^3.1.28","bun-types":"^1.1.7","eslint":"^8","eslint-plugin-unicorn":"^51.0.1","husky":"^9.0.10","neverthrow":"^7.0.0","next":"^14.0.2","prettier":"^3.2.5","tsup":"latest","typescript":"^5.4.5","undici-types":"^6.16.0","vitest":"latest"},"dependencies":{"@solidjs/start":"^1.0.6","@sveltejs/kit":"^2.5.18","crypto-js":">=4.2.0","h3":"^1.12.0","jose":"^ 5.2.3"}}
1
+ {"version":"v2.6.4-workflow-alpha.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"},"./nextjs":{"types":"./nextjs.d.ts","import":"./nextjs.mjs","require":"./nextjs.js"},"./dist/nextjs":{"types":"./nextjs.d.ts","import":"./nextjs.mjs","require":"./nextjs.js"},"./nuxt":{"types":"./nuxt.d.ts","import":"./nuxt.mjs","require":"./nuxt.js"},"./svelte":{"types":"./svelte.d.ts","import":"./svelte.mjs","require":"./svelte.js"},"./solidjs":{"types":"./solidjs.d.ts","import":"./solidjs.mjs","require":"./solidjs.js"},"./workflow":{"types":"./workflow.d.ts","import":"./workflow.mjs","require":"./workflow.js"}},"typesVersions":{"*":{"nextjs":["./nextjs.d.ts"]}},"keywords":["qstash","queue","events","serverless","upstash"],"scripts":{"build":"tsup && cp README.md ./dist/ && cp package.json ./dist/ && cp LICENSE ./dist/","test":"bun test","fmt":"prettier --write .","lint":"tsc && eslint \"src/**/*.{js,ts,tsx}\" --quiet --fix"},"devDependencies":{"@commitlint/cli":"^19.2.2","@commitlint/config-conventional":"^19.2.2","@types/bun":"^1.1.1","@types/crypto-js":"^4.2.0","@typescript-eslint/eslint-plugin":"^7.0.1","@typescript-eslint/parser":"^7.0.1","ai":"^3.1.28","bun-types":"^1.1.7","eslint":"^8","eslint-plugin-unicorn":"^51.0.1","husky":"^9.0.10","neverthrow":"^7.0.0","next":"^14.0.2","prettier":"^3.2.5","tsup":"latest","typescript":"^5.4.5","undici-types":"^6.16.0","vitest":"latest"},"dependencies":{"@solidjs/start":"^1.0.6","@sveltejs/kit":"^2.5.18","crypto-js":">=4.2.0","h3":"^1.12.0","jose":"^ 5.2.3"}}
package/solidjs.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { APIHandler, APIEvent } from '@solidjs/start/server';
2
- import { $ as WorkflowServeParameters } from './client-Dg0U5U51.mjs';
2
+ import { $ as WorkflowServeParameters } from './client-Dgh4hlfZ.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 { $ as WorkflowServeParameters } from './client-Dg0U5U51.js';
2
+ import { $ as WorkflowServeParameters } from './client-Dgh4hlfZ.js';
3
3
  import 'neverthrow';
4
4
 
5
5
  type VerifySignatureConfig = {
package/solidjs.js CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkR5GLUQZKjs = require('./chunk-R5GLUQZK.js');
6
+ var _chunk5DADTJQLjs = require('./chunk-5DADTJQL.js');
7
7
 
8
8
  // platforms/solidjs.ts
9
9
  var verifySignatureSolidjs = (handler, config) => {
@@ -15,7 +15,7 @@ var verifySignatureSolidjs = (handler, config) => {
15
15
  if (!nextSigningKey) {
16
16
  throw new Error("nextSigningKey is required, either in the config or from the env");
17
17
  }
18
- const receiver = new (0, _chunkR5GLUQZKjs.Receiver)({
18
+ const receiver = new (0, _chunk5DADTJQLjs.Receiver)({
19
19
  currentSigningKey,
20
20
  nextSigningKey
21
21
  });
@@ -49,7 +49,7 @@ var serve2 = ({
49
49
  if (method.toUpperCase() !== "POST") {
50
50
  return new Response("Only POST requests are allowed in worklfows", { status: 405 });
51
51
  }
52
- const serveHandler = _chunkR5GLUQZKjs.serve.call(void 0, {
52
+ const serveHandler = _chunk5DADTJQLjs.serve.call(void 0, {
53
53
  routeFunction,
54
54
  options
55
55
  });
@@ -57,7 +57,7 @@ var serve2 = ({
57
57
  const result = await serveHandler(event.request);
58
58
  return result;
59
59
  } catch (error) {
60
- return new Response(JSON.stringify(_chunkR5GLUQZKjs.formatWorkflowError.call(void 0, error)), { status: 500 });
60
+ return new Response(JSON.stringify(_chunk5DADTJQLjs.formatWorkflowError.call(void 0, error)), { status: 500 });
61
61
  }
62
62
  };
63
63
  return handler;
package/solidjs.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  Receiver,
4
4
  formatWorkflowError,
5
5
  serve
6
- } from "./chunk-JPKZF2I7.mjs";
6
+ } from "./chunk-YN3OQUF3.mjs";
7
7
 
8
8
  // platforms/solidjs.ts
9
9
  var verifySignatureSolidjs = (handler, config) => {
package/svelte.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { RequestHandler } from '@sveltejs/kit';
2
- import { a0 as WorkflowServeParametersExtended } from './client-Dg0U5U51.mjs';
2
+ import { a0 as WorkflowServeParametersExtended } from './client-Dgh4hlfZ.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 { a0 as WorkflowServeParametersExtended } from './client-Dg0U5U51.js';
2
+ import { a0 as WorkflowServeParametersExtended } from './client-Dgh4hlfZ.js';
3
3
  import 'neverthrow';
4
4
 
5
5
  type VerifySignatureConfig = {
package/svelte.js CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkR5GLUQZKjs = require('./chunk-R5GLUQZK.js');
6
+ var _chunk5DADTJQLjs = require('./chunk-5DADTJQL.js');
7
7
 
8
8
  // platforms/svelte.ts
9
9
  var verifySignatureSvelte = (handler, config) => {
@@ -15,7 +15,7 @@ var verifySignatureSvelte = (handler, config) => {
15
15
  if (!nextSigningKey) {
16
16
  throw new Error("nextSigningKey is required, either in the config or from the env");
17
17
  }
18
- const receiver = new (0, _chunkR5GLUQZKjs.Receiver)({
18
+ const receiver = new (0, _chunk5DADTJQLjs.Receiver)({
19
19
  currentSigningKey,
20
20
  nextSigningKey
21
21
  });
@@ -48,7 +48,7 @@ var serve2 = ({
48
48
  qstashClient
49
49
  }) => {
50
50
  const handler = async ({ request }) => {
51
- const serveMethod = _chunkR5GLUQZKjs.serve.call(void 0, {
51
+ const serveMethod = _chunk5DADTJQLjs.serve.call(void 0, {
52
52
  routeFunction,
53
53
  options: {
54
54
  qstashClient,
@@ -59,7 +59,7 @@ var serve2 = ({
59
59
  try {
60
60
  return await serveMethod(request);
61
61
  } catch (error) {
62
- return new Response(JSON.stringify(_chunkR5GLUQZKjs.formatWorkflowError.call(void 0, error)), { status: 500 });
62
+ return new Response(JSON.stringify(_chunk5DADTJQLjs.formatWorkflowError.call(void 0, error)), { status: 500 });
63
63
  }
64
64
  };
65
65
  return handler;
package/svelte.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  Receiver,
4
4
  formatWorkflowError,
5
5
  serve
6
- } from "./chunk-JPKZF2I7.mjs";
6
+ } from "./chunk-YN3OQUF3.mjs";
7
7
 
8
8
  // platforms/svelte.ts
9
9
  var verifySignatureSvelte = (handler, config) => {
package/workflow.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export { a9 as AsyncStepFunction, a4 as DisabledWorkflowContext, F as FailureFunctionPayload, ad as FinishCondition, af as LogLevel, ab as ParallelCallState, a7 as RawStep, ac as RouteFunction, S as Step, aa as StepFunction, a6 as StepType, a5 as StepTypes, a8 as SyncStepFunction, a1 as Workflow, a3 as WorkflowContext, ah as WorkflowLogger, ag as WorkflowLoggerOptions, ae as WorkflowServeOptions, $ as WorkflowServeParameters, a0 as WorkflowServeParametersExtended, a2 as serve } from './client-Dg0U5U51.mjs';
1
+ export { a9 as AsyncStepFunction, a4 as DisabledWorkflowContext, F as FailureFunctionPayload, ad as FinishCondition, ag as LogLevel, ab as ParallelCallState, a7 as RawStep, af as RequiredExceptFields, ac as RouteFunction, S as Step, aa as StepFunction, a6 as StepType, a5 as StepTypes, a8 as SyncStepFunction, a1 as Workflow, a3 as WorkflowContext, ai as WorkflowLogger, ah as WorkflowLoggerOptions, ae as WorkflowServeOptions, $ as WorkflowServeParameters, a0 as WorkflowServeParametersExtended, a2 as serve } from './client-Dgh4hlfZ.mjs';
2
2
  import 'neverthrow';
package/workflow.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { a9 as AsyncStepFunction, a4 as DisabledWorkflowContext, F as FailureFunctionPayload, ad as FinishCondition, af as LogLevel, ab as ParallelCallState, a7 as RawStep, ac as RouteFunction, S as Step, aa as StepFunction, a6 as StepType, a5 as StepTypes, a8 as SyncStepFunction, a1 as Workflow, a3 as WorkflowContext, ah as WorkflowLogger, ag as WorkflowLoggerOptions, ae as WorkflowServeOptions, $ as WorkflowServeParameters, a0 as WorkflowServeParametersExtended, a2 as serve } from './client-Dg0U5U51.js';
1
+ export { a9 as AsyncStepFunction, a4 as DisabledWorkflowContext, F as FailureFunctionPayload, ad as FinishCondition, ag as LogLevel, ab as ParallelCallState, a7 as RawStep, af as RequiredExceptFields, ac as RouteFunction, S as Step, aa as StepFunction, a6 as StepType, a5 as StepTypes, a8 as SyncStepFunction, a1 as Workflow, a3 as WorkflowContext, ai as WorkflowLogger, ah as WorkflowLoggerOptions, ae as WorkflowServeOptions, $ as WorkflowServeParameters, a0 as WorkflowServeParametersExtended, a2 as serve } from './client-Dgh4hlfZ.js';
2
2
  import 'neverthrow';
package/workflow.js CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var _chunkR5GLUQZKjs = require('./chunk-R5GLUQZK.js');
8
+ var _chunk5DADTJQLjs = require('./chunk-5DADTJQL.js');
9
9
 
10
10
 
11
11
 
@@ -13,4 +13,4 @@ var _chunkR5GLUQZKjs = require('./chunk-R5GLUQZK.js');
13
13
 
14
14
 
15
15
 
16
- exports.DisabledWorkflowContext = _chunkR5GLUQZKjs.DisabledWorkflowContext; exports.StepTypes = _chunkR5GLUQZKjs.StepTypes; exports.Workflow = _chunkR5GLUQZKjs.Workflow; exports.WorkflowContext = _chunkR5GLUQZKjs.WorkflowContext; exports.WorkflowLogger = _chunkR5GLUQZKjs.WorkflowLogger; exports.serve = _chunkR5GLUQZKjs.serve;
16
+ exports.DisabledWorkflowContext = _chunk5DADTJQLjs.DisabledWorkflowContext; exports.StepTypes = _chunk5DADTJQLjs.StepTypes; exports.Workflow = _chunk5DADTJQLjs.Workflow; exports.WorkflowContext = _chunk5DADTJQLjs.WorkflowContext; exports.WorkflowLogger = _chunk5DADTJQLjs.WorkflowLogger; exports.serve = _chunk5DADTJQLjs.serve;
package/workflow.mjs CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  WorkflowContext,
6
6
  WorkflowLogger,
7
7
  serve
8
- } from "./chunk-JPKZF2I7.mjs";
8
+ } from "./chunk-YN3OQUF3.mjs";
9
9
  export {
10
10
  DisabledWorkflowContext,
11
11
  StepTypes,