@trigger.dev/core 3.0.0-beta.45 → 3.0.0-beta.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{catalog-mlNxCacM.d.ts → catalog-N-X0Te3W.d.mts} +5 -23
- package/dist/{catalog-QcLmPVsr.d.mts → catalog-NxVZnWZh.d.ts} +5 -23
- package/dist/{common-55Mqj8JP.d.mts → common-fIyU5pmz.d.mts} +13 -0
- package/dist/{common-55Mqj8JP.d.ts → common-fIyU5pmz.d.ts} +13 -0
- package/dist/{manager-6NRInm7C.d.ts → manager-2ZQ3_twq.d.ts} +1 -1
- package/dist/{manager-2AqSY67c.d.mts → manager-X_HrWQ7_.d.mts} +1 -1
- package/dist/{messages-EJX0bMsF.d.mts → messages-Sggr4tid.d.mts} +233 -70
- package/dist/{messages-EJX0bMsF.d.ts → messages-Sggr4tid.d.ts} +233 -70
- package/dist/{schemas-Sb0sJcEt.d.mts → schemas-Zy7mGFgD.d.mts} +22 -0
- package/dist/{schemas-Sb0sJcEt.d.ts → schemas-Zy7mGFgD.d.ts} +22 -0
- package/dist/tracer-N0p2Fuuv.d.mts +23 -0
- package/dist/tracer-N0p2Fuuv.d.ts +23 -0
- package/dist/v3/dev/index.d.mts +2 -2
- package/dist/v3/dev/index.d.ts +2 -2
- package/dist/v3/dev/index.js.map +1 -1
- package/dist/v3/dev/index.mjs.map +1 -1
- package/dist/v3/index.d.mts +50 -38
- package/dist/v3/index.d.ts +50 -38
- package/dist/v3/index.js +503 -343
- package/dist/v3/index.js.map +1 -1
- package/dist/v3/index.mjs +499 -344
- package/dist/v3/index.mjs.map +1 -1
- package/dist/v3/otel/index.js +15 -5
- package/dist/v3/otel/index.js.map +1 -1
- package/dist/v3/otel/index.mjs +15 -5
- package/dist/v3/otel/index.mjs.map +1 -1
- package/dist/v3/prod/index.d.mts +4 -4
- package/dist/v3/prod/index.d.ts +4 -4
- package/dist/v3/prod/index.js +7 -131
- package/dist/v3/prod/index.js.map +1 -1
- package/dist/v3/prod/index.mjs +7 -131
- package/dist/v3/prod/index.mjs.map +1 -1
- package/dist/v3/schemas/index.d.mts +16 -4
- package/dist/v3/schemas/index.d.ts +16 -4
- package/dist/v3/schemas/index.js +35 -40
- package/dist/v3/schemas/index.js.map +1 -1
- package/dist/v3/schemas/index.mjs +35 -41
- package/dist/v3/schemas/index.mjs.map +1 -1
- package/dist/v3/utils/timers.d.mts +6 -0
- package/dist/v3/utils/timers.d.ts +6 -0
- package/dist/v3/utils/timers.js +31 -0
- package/dist/v3/utils/timers.js.map +1 -0
- package/dist/v3/utils/timers.mjs +28 -0
- package/dist/v3/utils/timers.mjs.map +1 -0
- package/dist/v3/workers/index.d.mts +7 -6
- package/dist/v3/workers/index.d.ts +7 -6
- package/dist/v3/workers/index.js +251 -96
- package/dist/v3/workers/index.js.map +1 -1
- package/dist/v3/workers/index.mjs +251 -96
- package/dist/v3/workers/index.mjs.map +1 -1
- package/dist/v3/zodNamespace.js +41 -18
- package/dist/v3/zodNamespace.js.map +1 -1
- package/dist/v3/zodNamespace.mjs +42 -19
- package/dist/v3/zodNamespace.mjs.map +1 -1
- package/dist/v3/zodSocket.d.mts +8 -3
- package/dist/v3/zodSocket.d.ts +8 -3
- package/dist/v3/zodSocket.js +56 -25
- package/dist/v3/zodSocket.js.map +1 -1
- package/dist/v3/zodSocket.mjs +57 -26
- package/dist/v3/zodSocket.mjs.map +1 -1
- package/dist/v3/zodfetch.d.mts +15 -2
- package/dist/v3/zodfetch.d.ts +15 -2
- package/dist/v3/zodfetch.js +248 -28
- package/dist/v3/zodfetch.js.map +1 -1
- package/dist/v3/zodfetch.mjs +246 -29
- package/dist/v3/zodfetch.mjs.map +1 -1
- package/package.json +10 -2
package/dist/v3/index.d.mts
CHANGED
|
@@ -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.mjs';
|
|
4
|
-
export { APIHeaders, ApiConnectionError, ApiError, AuthenticationError, BadRequestError, ConflictError, CursorPage, CursorPageResponse, InternalServerError, NotFoundError, OffsetLimitPage, OffsetLimitPageParams, OffsetLimitPageResponse, Page, PageResponse, PermissionDeniedError, RateLimitError, UnprocessableEntityError } from './zodfetch.mjs';
|
|
3
|
+
import { CursorPageParams, ApiRequestOptions, ZodFetchOptions, ApiPromise, CursorPagePromise, OffsetLimitPagePromise } from './zodfetch.mjs';
|
|
4
|
+
export { APIHeaders, ApiConnectionError, ApiError, AuthenticationError, BadRequestError, ConflictError, CursorPage, CursorPageResponse, InternalServerError, NotFoundError, OffsetLimitPage, OffsetLimitPageParams, OffsetLimitPageResponse, Page, PageResponse, PermissionDeniedError, RateLimitError, UnprocessableEntityError, isRequestOptions } from './zodfetch.mjs';
|
|
5
5
|
import { RunStatus, TriggerTaskRequestBody, BatchTriggerTaskRequestBody, ListRunResponseItem, RescheduleRunRequestBody, CreateScheduleOptions, ListScheduleOptions, UpdateScheduleOptions, CreateEnvironmentVariableRequestBody, UpdateEnvironmentVariableRequestBody, Accessory } from './schemas/index.mjs';
|
|
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.mjs';
|
|
7
|
-
import { T as TaskRunExecutionResult, B as BatchTaskRunExecutionResult, c as TaskRunError, a as TaskRunContext } from '../common-
|
|
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-
|
|
9
|
-
import { C as Clock,
|
|
10
|
-
export {
|
|
7
|
+
import { T as TaskRunExecutionResult, B as BatchTaskRunExecutionResult, c as TaskRunError, a as TaskRunContext } from '../common-fIyU5pmz.mjs';
|
|
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.mjs';
|
|
9
|
+
import { C as Clock, a as ClockTime, e as TaskLogger, b as TaskCatalog, T as TaskMetadataWithFunctions } from '../catalog-N-X0Te3W.mjs';
|
|
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-N-X0Te3W.mjs';
|
|
11
11
|
import { Attributes, Span } from '@opentelemetry/api';
|
|
12
|
-
import { R as RuntimeManager } from '../manager-
|
|
13
|
-
import { B as BackgroundWorkerProperties } from '../messages-
|
|
14
|
-
export { c as BackgroundWorkerClientMessages, b as BackgroundWorkerServerMessages, i as ClientToSharedQueueMessages, 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-
|
|
15
|
-
import { T as TaskFileMetadata, a as TaskMetadataWithFilePath, R as RetryOptions } from '../schemas-
|
|
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-
|
|
12
|
+
import { R as RuntimeManager } from '../manager-X_HrWQ7_.mjs';
|
|
13
|
+
import { B as BackgroundWorkerProperties } from '../messages-Sggr4tid.mjs';
|
|
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.mjs';
|
|
15
|
+
import { T as TaskFileMetadata, a as TaskMetadataWithFilePath, R as RetryOptions } from '../schemas-Zy7mGFgD.mjs';
|
|
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.mjs';
|
|
17
17
|
export { formatDuration, formatDurationInDays, formatDurationMilliseconds, formatDurationNanoseconds, millisecondsToNanoseconds, nanosecondsToMilliseconds } from './utils/durations.mjs';
|
|
18
|
+
import { T as TriggerTracer } from '../tracer-N0p2Fuuv.mjs';
|
|
18
19
|
export { e as eventFilterMatches } from '../eventFilterMatches-2kHImluE.mjs';
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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 };
|
package/dist/v3/index.d.ts
CHANGED
|
@@ -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-
|
|
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-
|
|
9
|
-
import { C as Clock,
|
|
10
|
-
export {
|
|
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-
|
|
13
|
-
import { B as BackgroundWorkerProperties } from '../messages-
|
|
14
|
-
export { c as BackgroundWorkerClientMessages, b as BackgroundWorkerServerMessages, i as ClientToSharedQueueMessages, 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-
|
|
15
|
-
import { T as TaskFileMetadata, a as TaskMetadataWithFilePath, R as RetryOptions } from '../schemas-
|
|
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-
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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 };
|