@trigger.dev/core 3.0.0-beta.46 → 3.0.0-beta.48

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.
Files changed (45) hide show
  1. package/dist/{catalog-9G8AqnI9.d.ts → catalog-N-X0Te3W.d.mts} +5 -23
  2. package/dist/{catalog-Y0mRLMtJ.d.mts → catalog-NxVZnWZh.d.ts} +5 -23
  3. package/dist/{common-55Mqj8JP.d.mts → common-fIyU5pmz.d.mts} +13 -0
  4. package/dist/{common-55Mqj8JP.d.ts → common-fIyU5pmz.d.ts} +13 -0
  5. package/dist/{manager-6NRInm7C.d.ts → manager-2ZQ3_twq.d.ts} +1 -1
  6. package/dist/{manager-2AqSY67c.d.mts → manager-X_HrWQ7_.d.mts} +1 -1
  7. package/dist/{messages-nXkzt5CT.d.mts → messages-Sggr4tid.d.mts} +162 -0
  8. package/dist/{messages-nXkzt5CT.d.ts → messages-Sggr4tid.d.ts} +162 -0
  9. package/dist/{schemas-CeAee_C2.d.mts → schemas-Zy7mGFgD.d.mts} +19 -0
  10. package/dist/{schemas-CeAee_C2.d.ts → schemas-Zy7mGFgD.d.ts} +19 -0
  11. package/dist/tracer-N0p2Fuuv.d.mts +23 -0
  12. package/dist/tracer-N0p2Fuuv.d.ts +23 -0
  13. package/dist/v3/dev/index.d.mts +2 -2
  14. package/dist/v3/dev/index.d.ts +2 -2
  15. package/dist/v3/index.d.mts +50 -38
  16. package/dist/v3/index.d.ts +50 -38
  17. package/dist/v3/index.js +470 -303
  18. package/dist/v3/index.js.map +1 -1
  19. package/dist/v3/index.mjs +467 -304
  20. package/dist/v3/index.mjs.map +1 -1
  21. package/dist/v3/otel/index.js +15 -5
  22. package/dist/v3/otel/index.js.map +1 -1
  23. package/dist/v3/otel/index.mjs +15 -5
  24. package/dist/v3/otel/index.mjs.map +1 -1
  25. package/dist/v3/prod/index.d.mts +3 -3
  26. package/dist/v3/prod/index.d.ts +3 -3
  27. package/dist/v3/schemas/index.d.mts +16 -4
  28. package/dist/v3/schemas/index.d.ts +16 -4
  29. package/dist/v3/schemas/index.js +3 -1
  30. package/dist/v3/schemas/index.js.map +1 -1
  31. package/dist/v3/schemas/index.mjs +3 -1
  32. package/dist/v3/schemas/index.mjs.map +1 -1
  33. package/dist/v3/workers/index.d.mts +7 -6
  34. package/dist/v3/workers/index.d.ts +7 -6
  35. package/dist/v3/workers/index.js +250 -96
  36. package/dist/v3/workers/index.js.map +1 -1
  37. package/dist/v3/workers/index.mjs +250 -96
  38. package/dist/v3/workers/index.mjs.map +1 -1
  39. package/dist/v3/zodfetch.d.mts +15 -2
  40. package/dist/v3/zodfetch.d.ts +15 -2
  41. package/dist/v3/zodfetch.js +248 -28
  42. package/dist/v3/zodfetch.js.map +1 -1
  43. package/dist/v3/zodfetch.mjs +246 -29
  44. package/dist/v3/zodfetch.mjs.map +1 -1
  45. package/package.json +1 -1
@@ -1,20 +1,21 @@
1
1
  import * as zod from 'zod';
2
2
  import { z } from 'zod';
3
- import { CursorPageParams, ApiPromise, CursorPagePromise, OffsetLimitPagePromise } from './zodfetch.js';
4
- export { APIHeaders, ApiConnectionError, ApiError, AuthenticationError, BadRequestError, ConflictError, CursorPage, CursorPageResponse, InternalServerError, NotFoundError, OffsetLimitPage, OffsetLimitPageParams, OffsetLimitPageResponse, Page, PageResponse, PermissionDeniedError, RateLimitError, UnprocessableEntityError } from './zodfetch.js';
3
+ import { CursorPageParams, ApiRequestOptions, ZodFetchOptions, ApiPromise, CursorPagePromise, OffsetLimitPagePromise } from './zodfetch.js';
4
+ export { APIHeaders, ApiConnectionError, ApiError, AuthenticationError, BadRequestError, ConflictError, CursorPage, CursorPageResponse, InternalServerError, NotFoundError, OffsetLimitPage, OffsetLimitPageParams, OffsetLimitPageResponse, Page, PageResponse, PermissionDeniedError, RateLimitError, UnprocessableEntityError, isRequestOptions } from './zodfetch.js';
5
5
  import { RunStatus, TriggerTaskRequestBody, BatchTriggerTaskRequestBody, ListRunResponseItem, RescheduleRunRequestBody, CreateScheduleOptions, ListScheduleOptions, UpdateScheduleOptions, CreateEnvironmentVariableRequestBody, UpdateEnvironmentVariableRequestBody, Accessory } from './schemas/index.js';
6
6
  export { AttemptStatus, BackgroundWorkerMetadata, BatchTriggerTaskResponse, CanceledRunResponse, CancellationSpanEvent, CreateAuthorizationCodeResponse, CreateAuthorizationCodeResponseSchema, CreateBackgroundWorkerRequestBody, CreateBackgroundWorkerResponse, CreateUploadPayloadUrlResponseBody, DeletedScheduleObject, DeploymentErrorData, EnvironmentVariable, EnvironmentVariableResponseBody, EnvironmentVariableValue, EnvironmentVariables, EventFilter, ExceptionEventProperties, ExceptionSpanEvent, ExternalBuildData, FetchRetryBackoffStrategy, FetchRetryByStatusOptions, FetchRetryHeadersStrategy, FetchRetryOptions, FetchRetryStrategy, FetchTimeoutOptions, GetBatchResponseBody, GetDeploymentResponseBody, GetEnvironmentVariablesResponseBody, GetPersonalAccessTokenRequest, GetPersonalAccessTokenRequestSchema, GetPersonalAccessTokenResponse, GetPersonalAccessTokenResponseSchema, GetProjectEnvResponse, GetProjectResponseBody, GetProjectsResponseBody, ImageDetailsMetadata, ImportEnvironmentVariablesRequestBody, InitializeDeploymentRequestBody, InitializeDeploymentResponseBody, ListRunResponse, ListSchedulesResult, OtherSpanEvent, PRIMARY_VARIANT, ReplayRunResponse, RetrieveRunResponse, RunEnvironmentDetails, RunScheduleDetails, ScheduleGenerator, ScheduleObject, ScheduledTaskPayload, SpanEvent, SpanEvents, SpanMessagingEvent, StartDeploymentIndexingRequestBody, StartDeploymentIndexingResponseBody, TaskEventStyle, TaskResource, TimezonesResult, TriggerTaskResponse, Variant, WhoAmIResponse, WhoAmIResponseSchema, isCancellationSpanEvent, isExceptionSpanEvent, stringPatternMatchers } from './schemas/index.js';
7
- import { T as TaskRunExecutionResult, B as BatchTaskRunExecutionResult, c as TaskRunError, a as TaskRunContext } from '../common-55Mqj8JP.js';
8
- export { f as MachineConfig, d as MachineCpu, e as MachineMemory, g as MachinePreset, M as MachinePresetName, m as TaskRun, h as TaskRunBuiltInError, i as TaskRunCustomErrorObject, k as TaskRunErrorCodes, b as TaskRunExecution, o as TaskRunExecutionAttempt, t as TaskRunExecutionBatch, p as TaskRunExecutionEnvironment, q as TaskRunExecutionOrganization, r as TaskRunExecutionProject, s as TaskRunExecutionQueue, u as TaskRunExecutionRetry, n as TaskRunExecutionTask, v as TaskRunExecutionUsage, w as TaskRunFailedExecutionResult, l as TaskRunInternalError, j as TaskRunStringError, x as TaskRunSuccessfulExecutionResult } from '../common-55Mqj8JP.js';
9
- import { C as Clock, b as ClockTime, f as TaskLogger, c as TaskCatalog, a as TaskMetadataWithFunctions, T as TriggerTracer } from '../catalog-9G8AqnI9.js';
10
- export { h as Context, F as FailureFnParams, n as HandleErrorArgs, j as HandleErrorFnParams, H as HandleErrorFunction, k as HandleErrorModificationOptions, m as HandleErrorResult, g as InitFnParams, I as InitOutput, L as LogLevel, M as MiddlewareFnParams, P as ProjectConfig, q as ResolveEnvironmentVariablesFunction, p as ResolveEnvironmentVariablesParams, o as ResolveEnvironmentVariablesResult, R as RunFnParams, S as StartFnParams, i as SuccessFnParams, u as usage } from '../catalog-9G8AqnI9.js';
7
+ import { T as TaskRunExecutionResult, B as BatchTaskRunExecutionResult, c as TaskRunError, a as TaskRunContext } from '../common-fIyU5pmz.js';
8
+ export { f as MachineConfig, d as MachineCpu, e as MachineMemory, g as MachinePreset, M as MachinePresetName, m as TaskRun, h as TaskRunBuiltInError, i as TaskRunCustomErrorObject, k as TaskRunErrorCodes, b as TaskRunExecution, o as TaskRunExecutionAttempt, t as TaskRunExecutionBatch, p as TaskRunExecutionEnvironment, q as TaskRunExecutionOrganization, r as TaskRunExecutionProject, s as TaskRunExecutionQueue, u as TaskRunExecutionRetry, n as TaskRunExecutionTask, v as TaskRunExecutionUsage, w as TaskRunFailedExecutionResult, l as TaskRunInternalError, j as TaskRunStringError, x as TaskRunSuccessfulExecutionResult } from '../common-fIyU5pmz.js';
9
+ import { C as Clock, a as ClockTime, e as TaskLogger, b as TaskCatalog, T as TaskMetadataWithFunctions } from '../catalog-NxVZnWZh.js';
10
+ export { g as Context, F as FailureFnParams, m as HandleErrorArgs, i as HandleErrorFnParams, H as HandleErrorFunction, j as HandleErrorModificationOptions, k as HandleErrorResult, f as InitFnParams, I as InitOutput, L as LogLevel, M as MiddlewareFnParams, P as ProjectConfig, p as ResolveEnvironmentVariablesFunction, o as ResolveEnvironmentVariablesParams, n as ResolveEnvironmentVariablesResult, R as RunFnParams, S as StartFnParams, h as SuccessFnParams, u as usage } from '../catalog-NxVZnWZh.js';
11
11
  import { Attributes, Span } from '@opentelemetry/api';
12
- import { R as RuntimeManager } from '../manager-6NRInm7C.js';
13
- import { B as BackgroundWorkerProperties } from '../messages-nXkzt5CT.js';
14
- export { c as BackgroundWorkerClientMessages, b as BackgroundWorkerServerMessages, i as ClientToSharedQueueMessages, m as CoordinatorSocketData, C as CoordinatorToPlatformMessages, k as CoordinatorToProdWorkerMessages, h as PlatformToCoordinatorMessages, g as PlatformToProviderMessages, a as ProdChildToWorkerMessages, l as ProdWorkerSocketData, P as ProdWorkerToChildMessages, j as ProdWorkerToCoordinatorMessages, f as ProviderToPlatformMessages, S as SharedQueueToClientMessages, T as TaskMetadataFailedToParseData, U as UncaughtExceptionMessage, e as childToWorkerMessages, d as clientWebsocketMessages, s as serverWebsocketMessages, w as workerToChildMessages } from '../messages-nXkzt5CT.js';
15
- import { T as TaskFileMetadata, a as TaskMetadataWithFilePath, R as RetryOptions } from '../schemas-CeAee_C2.js';
16
- export { C as Config, E as EnvironmentType, F as FixedWindowRateLimit, g as PostStartCauses, h as PreStopCauses, P as Prettify, d as ProdTaskRunExecution, e as ProdTaskRunExecutionPayload, Q as QueueOptions, f as RateLimitOptions, k as RequireKeys, i as ResolvedConfig, S as SlidingWindowRateLimit, b as TaskMetadata, j as TaskRunExecutionLazyAttemptPayload, c as TaskRunExecutionPayload, W as WaitReason } from '../schemas-CeAee_C2.js';
12
+ import { R as RuntimeManager } from '../manager-2ZQ3_twq.js';
13
+ import { B as BackgroundWorkerProperties } from '../messages-Sggr4tid.js';
14
+ export { c as BackgroundWorkerClientMessages, b as BackgroundWorkerServerMessages, i as ClientToSharedQueueMessages, m as CoordinatorSocketData, C as CoordinatorToPlatformMessages, k as CoordinatorToProdWorkerMessages, h as PlatformToCoordinatorMessages, g as PlatformToProviderMessages, a as ProdChildToWorkerMessages, l as ProdWorkerSocketData, P as ProdWorkerToChildMessages, j as ProdWorkerToCoordinatorMessages, f as ProviderToPlatformMessages, S as SharedQueueToClientMessages, T as TaskMetadataFailedToParseData, U as UncaughtExceptionMessage, e as childToWorkerMessages, d as clientWebsocketMessages, s as serverWebsocketMessages, w as workerToChildMessages } from '../messages-Sggr4tid.js';
15
+ import { T as TaskFileMetadata, a as TaskMetadataWithFilePath, R as RetryOptions } from '../schemas-Zy7mGFgD.js';
16
+ export { C as Config, E as EnvironmentType, F as FixedWindowRateLimit, g as PostStartCauses, h as PreStopCauses, P as Prettify, d as ProdTaskRunExecution, e as ProdTaskRunExecutionPayload, Q as QueueOptions, f as RateLimitOptions, k as RequireKeys, i as ResolvedConfig, S as SlidingWindowRateLimit, b as TaskMetadata, j as TaskRunExecutionLazyAttemptPayload, c as TaskRunExecutionPayload, W as WaitReason } from '../schemas-Zy7mGFgD.js';
17
17
  export { formatDuration, formatDurationInDays, formatDurationMilliseconds, formatDurationNanoseconds, millisecondsToNanoseconds, nanosecondsToMilliseconds } from './utils/durations.js';
18
+ import { T as TriggerTracer } from '../tracer-N0p2Fuuv.js';
18
19
  export { e as eventFilterMatches } from '../eventFilterMatches-2kHImluE.js';
19
20
  import '@opentelemetry/api-logs';
20
21
  import '@opentelemetry/instrumentation';
@@ -54,6 +55,7 @@ interface ListProjectRunsQueryParams extends CursorPageParams, ListRunsQueryPara
54
55
  type TriggerOptions = {
55
56
  spanParentAsLink?: boolean;
56
57
  };
58
+
57
59
  /**
58
60
  * Trigger.dev v3 API client
59
61
  */
@@ -61,23 +63,24 @@ declare class ApiClient {
61
63
  #private;
62
64
  private readonly accessToken;
63
65
  private readonly baseUrl;
64
- constructor(baseUrl: string, accessToken: string);
65
- getRunResult(runId: string): Promise<TaskRunExecutionResult | undefined>;
66
- getBatchResults(batchId: string): Promise<BatchTaskRunExecutionResult | undefined>;
67
- triggerTask(taskId: string, body: TriggerTaskRequestBody, options?: TriggerOptions): ApiPromise<{
66
+ private readonly defaultRequestOptions;
67
+ constructor(baseUrl: string, accessToken: string, requestOptions?: ApiRequestOptions);
68
+ getRunResult(runId: string, requestOptions?: ZodFetchOptions): Promise<TaskRunExecutionResult | undefined>;
69
+ getBatchResults(batchId: string, requestOptions?: ZodFetchOptions): Promise<BatchTaskRunExecutionResult | undefined>;
70
+ triggerTask(taskId: string, body: TriggerTaskRequestBody, options?: TriggerOptions, requestOptions?: ZodFetchOptions): ApiPromise<{
68
71
  id: string;
69
72
  }>;
70
- batchTriggerTask(taskId: string, body: BatchTriggerTaskRequestBody, options?: TriggerOptions): ApiPromise<{
73
+ batchTriggerTask(taskId: string, body: BatchTriggerTaskRequestBody, options?: TriggerOptions, requestOptions?: ZodFetchOptions): ApiPromise<{
71
74
  batchId: string;
72
75
  runs: string[];
73
76
  }>;
74
- createUploadPayloadUrl(filename: string): ApiPromise<{
77
+ createUploadPayloadUrl(filename: string, requestOptions?: ZodFetchOptions): ApiPromise<{
75
78
  presignedUrl: string;
76
79
  }>;
77
- getPayloadUrl(filename: string): ApiPromise<{
80
+ getPayloadUrl(filename: string, requestOptions?: ZodFetchOptions): ApiPromise<{
78
81
  presignedUrl: string;
79
82
  }>;
80
- retrieveRun(runId: string): ApiPromise<{
83
+ retrieveRun(runId: string, requestOptions?: ZodFetchOptions): ApiPromise<{
81
84
  status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
82
85
  id: string;
83
86
  isTest: boolean;
@@ -125,15 +128,15 @@ declare class ApiClient {
125
128
  ttl?: string | undefined;
126
129
  expiredAt?: Date | undefined;
127
130
  }>;
128
- listRuns(query?: ListRunsQueryParams): CursorPagePromise<typeof ListRunResponseItem>;
129
- listProjectRuns(projectRef: string, query?: ListProjectRunsQueryParams): CursorPagePromise<typeof ListRunResponseItem>;
130
- replayRun(runId: string): ApiPromise<{
131
+ listRuns(query?: ListRunsQueryParams, requestOptions?: ZodFetchOptions): CursorPagePromise<typeof ListRunResponseItem>;
132
+ listProjectRuns(projectRef: string, query?: ListProjectRunsQueryParams, requestOptions?: ZodFetchOptions): CursorPagePromise<typeof ListRunResponseItem>;
133
+ replayRun(runId: string, requestOptions?: ZodFetchOptions): ApiPromise<{
131
134
  id: string;
132
135
  }>;
133
- cancelRun(runId: string): ApiPromise<{
136
+ cancelRun(runId: string, requestOptions?: ZodFetchOptions): ApiPromise<{
134
137
  id: string;
135
138
  }>;
136
- rescheduleRun(runId: string, body: RescheduleRunRequestBody): ApiPromise<{
139
+ rescheduleRun(runId: string, body: RescheduleRunRequestBody, requestOptions?: ZodFetchOptions): ApiPromise<{
137
140
  status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
138
141
  id: string;
139
142
  isTest: boolean;
@@ -181,7 +184,7 @@ declare class ApiClient {
181
184
  ttl?: string | undefined;
182
185
  expiredAt?: Date | undefined;
183
186
  }>;
184
- createSchedule(options: CreateScheduleOptions): ApiPromise<{
187
+ createSchedule(options: CreateScheduleOptions, requestOptions?: ZodFetchOptions): ApiPromise<{
185
188
  id: string;
186
189
  task: string;
187
190
  timezone: string;
@@ -200,7 +203,7 @@ declare class ApiClient {
200
203
  externalId?: string | null | undefined;
201
204
  nextRun?: Date | null | undefined;
202
205
  }>;
203
- listSchedules(options?: ListScheduleOptions): OffsetLimitPagePromise<zod.ZodObject<{
206
+ listSchedules(options?: ListScheduleOptions, requestOptions?: ZodFetchOptions): OffsetLimitPagePromise<zod.ZodObject<{
204
207
  id: zod.ZodString;
205
208
  task: zod.ZodString;
206
209
  active: zod.ZodBoolean;
@@ -271,7 +274,7 @@ declare class ApiClient {
271
274
  externalId?: string | null | undefined;
272
275
  nextRun?: Date | null | undefined;
273
276
  }>>;
274
- retrieveSchedule(scheduleId: string): ApiPromise<{
277
+ retrieveSchedule(scheduleId: string, requestOptions?: ZodFetchOptions): ApiPromise<{
275
278
  id: string;
276
279
  task: string;
277
280
  timezone: string;
@@ -290,7 +293,7 @@ declare class ApiClient {
290
293
  externalId?: string | null | undefined;
291
294
  nextRun?: Date | null | undefined;
292
295
  }>;
293
- updateSchedule(scheduleId: string, options: UpdateScheduleOptions): ApiPromise<{
296
+ updateSchedule(scheduleId: string, options: UpdateScheduleOptions, requestOptions?: ZodFetchOptions): ApiPromise<{
294
297
  id: string;
295
298
  task: string;
296
299
  timezone: string;
@@ -309,7 +312,7 @@ declare class ApiClient {
309
312
  externalId?: string | null | undefined;
310
313
  nextRun?: Date | null | undefined;
311
314
  }>;
312
- deactivateSchedule(scheduleId: string): ApiPromise<{
315
+ deactivateSchedule(scheduleId: string, requestOptions?: ZodFetchOptions): ApiPromise<{
313
316
  id: string;
314
317
  task: string;
315
318
  timezone: string;
@@ -328,7 +331,7 @@ declare class ApiClient {
328
331
  externalId?: string | null | undefined;
329
332
  nextRun?: Date | null | undefined;
330
333
  }>;
331
- activateSchedule(scheduleId: string): ApiPromise<{
334
+ activateSchedule(scheduleId: string, requestOptions?: ZodFetchOptions): ApiPromise<{
332
335
  id: string;
333
336
  task: string;
334
337
  timezone: string;
@@ -347,29 +350,30 @@ declare class ApiClient {
347
350
  externalId?: string | null | undefined;
348
351
  nextRun?: Date | null | undefined;
349
352
  }>;
350
- deleteSchedule(scheduleId: string): ApiPromise<{
353
+ deleteSchedule(scheduleId: string, requestOptions?: ZodFetchOptions): ApiPromise<{
351
354
  id: string;
352
355
  }>;
353
- listEnvVars(projectRef: string, slug: string): ApiPromise<{
356
+ listEnvVars(projectRef: string, slug: string, requestOptions?: ZodFetchOptions): ApiPromise<{
354
357
  value: string;
355
358
  name: string;
356
359
  }[]>;
357
- importEnvVars(projectRef: string, slug: string, body: ImportEnvironmentVariablesParams): ApiPromise<{
360
+ importEnvVars(projectRef: string, slug: string, body: ImportEnvironmentVariablesParams, requestOptions?: ZodFetchOptions): ApiPromise<{
358
361
  success: boolean;
359
362
  }>;
360
- retrieveEnvVar(projectRef: string, slug: string, key: string): ApiPromise<{
363
+ retrieveEnvVar(projectRef: string, slug: string, key: string, requestOptions?: ZodFetchOptions): ApiPromise<{
361
364
  value: string;
362
365
  }>;
363
- createEnvVar(projectRef: string, slug: string, body: CreateEnvironmentVariableRequestBody): ApiPromise<{
366
+ createEnvVar(projectRef: string, slug: string, body: CreateEnvironmentVariableRequestBody, requestOptions?: ZodFetchOptions): ApiPromise<{
364
367
  success: boolean;
365
368
  }>;
366
- updateEnvVar(projectRef: string, slug: string, key: string, body: UpdateEnvironmentVariableRequestBody): ApiPromise<{
369
+ updateEnvVar(projectRef: string, slug: string, key: string, body: UpdateEnvironmentVariableRequestBody, requestOptions?: ZodFetchOptions): ApiPromise<{
367
370
  success: boolean;
368
371
  }>;
369
- deleteEnvVar(projectRef: string, slug: string, key: string): ApiPromise<{
372
+ deleteEnvVar(projectRef: string, slug: string, key: string, requestOptions?: ZodFetchOptions): ApiPromise<{
370
373
  success: boolean;
371
374
  }>;
372
375
  }
376
+ declare function mergeRequestOptions(defaultOptions: ZodFetchOptions, options?: ApiRequestOptions): ZodFetchOptions;
373
377
 
374
378
  declare class ClockAPI {
375
379
  #private;
@@ -384,6 +388,9 @@ declare class ClockAPI {
384
388
  /** Entrypoint for clock API */
385
389
  declare const clock: ClockAPI;
386
390
 
391
+ declare class AbortTaskRunError extends Error {
392
+ constructor(message: string);
393
+ }
387
394
  declare function parseError(error: unknown): TaskRunError;
388
395
  declare function createErrorTaskError(error: TaskRunError): any;
389
396
  declare const SerializedError: z.ZodObject<{
@@ -401,6 +408,7 @@ declare const SerializedError: z.ZodObject<{
401
408
  }>;
402
409
  type SerializedError = z.infer<typeof SerializedError>;
403
410
  declare function createJsonErrorObject(error: TaskRunError): SerializedError;
411
+ declare function sanitizeError(error: TaskRunError): TaskRunError;
404
412
  declare function correctErrorStackTrace(stackTrace: string, projectDir?: string, options?: {
405
413
  removeFirstLine?: boolean;
406
414
  isDev?: boolean;
@@ -493,6 +501,7 @@ declare const taskContext: TaskContextAPI;
493
501
  type ApiClientConfiguration = {
494
502
  baseURL?: string;
495
503
  secretKey?: string;
504
+ requestOptions?: ApiRequestOptions;
496
505
  };
497
506
 
498
507
  declare class APIClientManagerAPI {
@@ -560,6 +569,9 @@ declare const SemanticInternalAttributes: {
560
569
  IDEMPOTENCY_KEY: string;
561
570
  USAGE_DURATION_MS: string;
562
571
  USAGE_COST_IN_CENTS: string;
572
+ RATE_LIMIT_LIMIT: string;
573
+ RATE_LIMIT_REMAINING: string;
574
+ RATE_LIMIT_RESET: string;
563
575
  };
564
576
 
565
577
  declare class TaskCatalogAPI {
@@ -650,4 +662,4 @@ declare function createPacketAttributes(packet: IOPacket, dataKey: string, dataT
650
662
  declare function createPacketAttributesAsJson(data: any, dataType: string): Promise<Attributes>;
651
663
  declare function prettyPrintPacket(rawData: any, dataType?: string): Promise<string>;
652
664
 
653
- export { Accessory, ApiClient, type ApiClientConfiguration, ApiPromise, BackgroundWorkerProperties, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, type CreateEnvironmentVariableParams, CreateEnvironmentVariableRequestBody, CreateScheduleOptions, CursorPageParams, CursorPagePromise, type IOPacket, type ImportEnvironmentVariablesParams, type ListProjectRunsQueryParams, ListRunResponseItem, type ListRunsQueryParams, ListScheduleOptions, NULL_SENTINEL, OFFLOAD_IO_PACKET_LENGTH_LIMIT, OTEL_ATTRIBUTE_PER_EVENT_COUNT_LIMIT, OTEL_ATTRIBUTE_PER_LINK_COUNT_LIMIT, OTEL_LINK_COUNT_LIMIT, OTEL_LOG_ATTRIBUTE_COUNT_LIMIT, OTEL_LOG_ATTRIBUTE_VALUE_LENGTH_LIMIT, OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT, OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT, OTEL_SPAN_EVENT_COUNT_LIMIT, OffsetLimitPagePromise, RescheduleRunRequestBody, RetryOptions, RunStatus, SemanticInternalAttributes, SerializedError, TaskFileMetadata, TaskMetadataWithFilePath, TaskMetadataWithFunctions, TaskRunContext, TaskRunError, TaskRunExecutionResult, type TriggerOptions, TriggerTaskRequestBody, TriggerTracer, type UpdateEnvironmentVariableParams, UpdateEnvironmentVariableRequestBody, UpdateScheduleOptions, accessoryAttributes, apiClientManager, calculateNextRetryDelay, calculateResetAt, clock, conditionallyExportPacket, conditionallyImportPacket, correctErrorStackTrace, createErrorTaskError, createJsonErrorObject, createPacketAttributes, createPacketAttributesAsJson, defaultFetchRetryOptions, defaultRetryOptions, detectDependencyVersion, flattenAttributes, groupTaskMetadataIssuesByTask, imposeAttributeLimits, logger, omit, packetRequiresOffloading, parseError, parsePacket, prettyPrintPacket, primitiveValueOrflattenedAttributes, runtime, stringifyIO, taskCatalog, taskContext, unflattenAttributes };
665
+ export { AbortTaskRunError, Accessory, ApiClient, type ApiClientConfiguration, ApiPromise, ApiRequestOptions, BackgroundWorkerProperties, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, type CreateEnvironmentVariableParams, CreateEnvironmentVariableRequestBody, CreateScheduleOptions, CursorPageParams, CursorPagePromise, type IOPacket, type ImportEnvironmentVariablesParams, type ListProjectRunsQueryParams, ListRunResponseItem, type ListRunsQueryParams, ListScheduleOptions, NULL_SENTINEL, OFFLOAD_IO_PACKET_LENGTH_LIMIT, OTEL_ATTRIBUTE_PER_EVENT_COUNT_LIMIT, OTEL_ATTRIBUTE_PER_LINK_COUNT_LIMIT, OTEL_LINK_COUNT_LIMIT, OTEL_LOG_ATTRIBUTE_COUNT_LIMIT, OTEL_LOG_ATTRIBUTE_VALUE_LENGTH_LIMIT, OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT, OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT, OTEL_SPAN_EVENT_COUNT_LIMIT, OffsetLimitPagePromise, RescheduleRunRequestBody, RetryOptions, RunStatus, SemanticInternalAttributes, SerializedError, TaskFileMetadata, TaskMetadataWithFilePath, TaskMetadataWithFunctions, TaskRunContext, TaskRunError, TaskRunExecutionResult, type TriggerOptions, TriggerTaskRequestBody, TriggerTracer, type UpdateEnvironmentVariableParams, UpdateEnvironmentVariableRequestBody, UpdateScheduleOptions, accessoryAttributes, apiClientManager, calculateNextRetryDelay, calculateResetAt, clock, conditionallyExportPacket, conditionallyImportPacket, correctErrorStackTrace, createErrorTaskError, createJsonErrorObject, createPacketAttributes, createPacketAttributesAsJson, defaultFetchRetryOptions, defaultRetryOptions, detectDependencyVersion, flattenAttributes, groupTaskMetadataIssuesByTask, imposeAttributeLimits, logger, mergeRequestOptions, omit, packetRequiresOffloading, parseError, parsePacket, prettyPrintPacket, primitiveValueOrflattenedAttributes, runtime, sanitizeError, stringifyIO, taskCatalog, taskContext, unflattenAttributes };