@trigger.dev/core 3.0.0-beta.26 → 3.0.0-beta.27
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-g2Qc0Ukb.d.mts → catalog-Bh7P1hZc.d.mts} +3 -3
- package/dist/{catalog-XNyNDUOF.d.ts → catalog-akmn1vqt.d.ts} +3 -3
- package/dist/v3/index.d.mts +88 -3
- package/dist/v3/index.d.ts +88 -3
- package/dist/v3/index.js +42 -0
- package/dist/v3/index.js.map +1 -1
- package/dist/v3/index.mjs +40 -1
- package/dist/v3/index.mjs.map +1 -1
- package/dist/v3/workers/index.d.mts +2 -2
- package/dist/v3/workers/index.d.ts +2 -2
- package/dist/v3/workers/index.js +41 -3
- package/dist/v3/workers/index.js.map +1 -1
- package/dist/v3/workers/index.mjs +41 -3
- package/dist/v3/workers/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -30,7 +30,7 @@ declare class TriggerTracer {
|
|
|
30
30
|
startSpan(name: string, options?: SpanOptions, ctx?: Context$1): Span;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
type LogLevel = "none" | "
|
|
33
|
+
type LogLevel = "none" | "error" | "warn" | "info" | "debug";
|
|
34
34
|
declare const logLevels: Array<LogLevel>;
|
|
35
35
|
type TaskLoggerConfig = {
|
|
36
36
|
logger: Logger;
|
|
@@ -88,11 +88,11 @@ interface ProjectConfig {
|
|
|
88
88
|
*/
|
|
89
89
|
instrumentations?: InstrumentationOption[];
|
|
90
90
|
/**
|
|
91
|
-
* Set the log level for the logger. Defaults to "
|
|
91
|
+
* Set the log level for the logger. Defaults to "info", so you will see "log", "info", "warn", and "error" messages, but not "debug" messages.
|
|
92
92
|
*
|
|
93
93
|
* We automatically set the logLevel to "debug" during test runs
|
|
94
94
|
*
|
|
95
|
-
* @default "
|
|
95
|
+
* @default "info"
|
|
96
96
|
*/
|
|
97
97
|
logLevel?: LogLevel;
|
|
98
98
|
/**
|
|
@@ -30,7 +30,7 @@ declare class TriggerTracer {
|
|
|
30
30
|
startSpan(name: string, options?: SpanOptions, ctx?: Context$1): Span;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
type LogLevel = "none" | "
|
|
33
|
+
type LogLevel = "none" | "error" | "warn" | "info" | "debug";
|
|
34
34
|
declare const logLevels: Array<LogLevel>;
|
|
35
35
|
type TaskLoggerConfig = {
|
|
36
36
|
logger: Logger;
|
|
@@ -88,11 +88,11 @@ interface ProjectConfig {
|
|
|
88
88
|
*/
|
|
89
89
|
instrumentations?: InstrumentationOption[];
|
|
90
90
|
/**
|
|
91
|
-
* Set the log level for the logger. Defaults to "
|
|
91
|
+
* Set the log level for the logger. Defaults to "info", so you will see "log", "info", "warn", and "error" messages, but not "debug" messages.
|
|
92
92
|
*
|
|
93
93
|
* We automatically set the logLevel to "debug" during test runs
|
|
94
94
|
*
|
|
95
|
-
* @default "
|
|
95
|
+
* @default "info"
|
|
96
96
|
*/
|
|
97
97
|
logLevel?: LogLevel;
|
|
98
98
|
/**
|
package/dist/v3/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { T as TaskRunExecutionResult, B as BatchTaskRunExecutionResult, a as TaskRunError, b as TaskRunContext, R as RuntimeManager } from '../manager-WNMVbgHf.mjs';
|
|
3
3
|
export { h as TaskRun, c as TaskRunBuiltInError, d as TaskRunCustomErrorObject, f as TaskRunErrorCodes, p as TaskRunExecution, j as TaskRunExecutionAttempt, o as TaskRunExecutionBatch, k as TaskRunExecutionEnvironment, l as TaskRunExecutionOrganization, m as TaskRunExecutionProject, n as TaskRunExecutionQueue, q as TaskRunExecutionRetry, i as TaskRunExecutionTask, r as TaskRunFailedExecutionResult, g as TaskRunInternalError, e as TaskRunStringError, s as TaskRunSuccessfulExecutionResult } from '../manager-WNMVbgHf.mjs';
|
|
4
|
-
import { P as Prettify, C as Clock, a as ClockTime, T as TaskLogger, b as TaskCatalog, c as TaskMetadataWithFunctions, d as TaskFileMetadata, e as TaskMetadataWithFilePath, R as RetryOptions, f as TriggerTracer } from '../catalog-
|
|
5
|
-
export { p as Config, v as Context, E as EnvironmentType, x as FailureFnParams, F as FixedWindowRateLimit, A as HandleErrorArgs, H as HandleErrorFnParams, B as HandleErrorFunction, y as HandleErrorModificationOptions, z as HandleErrorResult, t as InitFnParams, I as InitOutput, L as LogLevel, h as Machine, M as MachineCpu, g as MachineMemory, s as MiddlewareFnParams, n as PostStartCauses, o as PreStopCauses, j as ProdTaskRunExecution, k as ProdTaskRunExecutionPayload, G as ProjectConfig, Q as QueueOptions, l as RateLimitOptions, D as RequireKeys, q as ResolvedConfig, r as RunFnParams, S as SlidingWindowRateLimit, u as StartFnParams, w as SuccessFnParams, m as TaskMetadata, i as TaskRunExecutionPayload, W as WaitReason } from '../catalog-
|
|
4
|
+
import { P as Prettify, C as Clock, a as ClockTime, T as TaskLogger, b as TaskCatalog, c as TaskMetadataWithFunctions, d as TaskFileMetadata, e as TaskMetadataWithFilePath, R as RetryOptions, f as TriggerTracer } from '../catalog-Bh7P1hZc.mjs';
|
|
5
|
+
export { p as Config, v as Context, E as EnvironmentType, x as FailureFnParams, F as FixedWindowRateLimit, A as HandleErrorArgs, H as HandleErrorFnParams, B as HandleErrorFunction, y as HandleErrorModificationOptions, z as HandleErrorResult, t as InitFnParams, I as InitOutput, L as LogLevel, h as Machine, M as MachineCpu, g as MachineMemory, s as MiddlewareFnParams, n as PostStartCauses, o as PreStopCauses, j as ProdTaskRunExecution, k as ProdTaskRunExecutionPayload, G as ProjectConfig, Q as QueueOptions, l as RateLimitOptions, D as RequireKeys, q as ResolvedConfig, r as RunFnParams, S as SlidingWindowRateLimit, u as StartFnParams, w as SuccessFnParams, m as TaskMetadata, i as TaskRunExecutionPayload, W as WaitReason } from '../catalog-Bh7P1hZc.mjs';
|
|
6
6
|
import { Attributes, Span } from '@opentelemetry/api';
|
|
7
7
|
import { B as BackgroundWorkerProperties } from '../messages-vq7Bk4Ap.mjs';
|
|
8
8
|
export { b as BackgroundWorkerClientMessages, a as BackgroundWorkerServerMessages, i as ClientToSharedQueueMessages, C as CoordinatorToPlatformMessages, k as CoordinatorToProdWorkerMessages, h as PlatformToCoordinatorMessages, g as PlatformToProviderMessages, P as ProdChildToWorkerMessages, l as ProdWorkerSocketData, e as ProdWorkerToChildMessages, j as ProdWorkerToCoordinatorMessages, f as ProviderToPlatformMessages, S as SharedQueueToClientMessages, T as TaskMetadataFailedToParseData, U as UncaughtExceptionMessage, d as childToWorkerMessages, c as clientWebsocketMessages, s as serverWebsocketMessages, w as workerToChildMessages } from '../messages-vq7Bk4Ap.mjs';
|
|
@@ -2276,6 +2276,74 @@ declare const ListScheduleOptions: z.ZodObject<{
|
|
|
2276
2276
|
perPage?: number | undefined;
|
|
2277
2277
|
}>;
|
|
2278
2278
|
type ListScheduleOptions = z.infer<typeof ListScheduleOptions>;
|
|
2279
|
+
declare const RunStatus: z.ZodEnum<["PENDING", "EXECUTING", "PAUSED", "COMPLETED", "FAILED", "CANCELED"]>;
|
|
2280
|
+
type RunStatus = z.infer<typeof RunStatus>;
|
|
2281
|
+
declare const AttemptStatus: z.ZodEnum<["PENDING", "EXECUTING", "PAUSED", "COMPLETED", "FAILED", "CANCELED"]>;
|
|
2282
|
+
type AttemptStatus = z.infer<typeof AttemptStatus>;
|
|
2283
|
+
declare const RetrieveRunResponse: z.ZodObject<{
|
|
2284
|
+
id: z.ZodString;
|
|
2285
|
+
status: z.ZodEnum<["PENDING", "EXECUTING", "PAUSED", "COMPLETED", "FAILED", "CANCELED"]>;
|
|
2286
|
+
taskIdentifier: z.ZodString;
|
|
2287
|
+
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
2288
|
+
version: z.ZodOptional<z.ZodString>;
|
|
2289
|
+
createdAt: z.ZodDate;
|
|
2290
|
+
updatedAt: z.ZodDate;
|
|
2291
|
+
attempts: z.ZodArray<z.ZodOptional<z.ZodObject<{
|
|
2292
|
+
id: z.ZodString;
|
|
2293
|
+
status: z.ZodEnum<["PENDING", "EXECUTING", "PAUSED", "COMPLETED", "FAILED", "CANCELED"]>;
|
|
2294
|
+
createdAt: z.ZodDate;
|
|
2295
|
+
updatedAt: z.ZodDate;
|
|
2296
|
+
startedAt: z.ZodOptional<z.ZodDate>;
|
|
2297
|
+
completedAt: z.ZodOptional<z.ZodDate>;
|
|
2298
|
+
}, "strip", z.ZodTypeAny, {
|
|
2299
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
2300
|
+
id: string;
|
|
2301
|
+
createdAt: Date;
|
|
2302
|
+
updatedAt: Date;
|
|
2303
|
+
startedAt?: Date | undefined;
|
|
2304
|
+
completedAt?: Date | undefined;
|
|
2305
|
+
}, {
|
|
2306
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
2307
|
+
id: string;
|
|
2308
|
+
createdAt: Date;
|
|
2309
|
+
updatedAt: Date;
|
|
2310
|
+
startedAt?: Date | undefined;
|
|
2311
|
+
completedAt?: Date | undefined;
|
|
2312
|
+
}>>, "many">;
|
|
2313
|
+
}, "strip", z.ZodTypeAny, {
|
|
2314
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
2315
|
+
id: string;
|
|
2316
|
+
createdAt: Date;
|
|
2317
|
+
taskIdentifier: string;
|
|
2318
|
+
updatedAt: Date;
|
|
2319
|
+
attempts: ({
|
|
2320
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
2321
|
+
id: string;
|
|
2322
|
+
createdAt: Date;
|
|
2323
|
+
updatedAt: Date;
|
|
2324
|
+
startedAt?: Date | undefined;
|
|
2325
|
+
completedAt?: Date | undefined;
|
|
2326
|
+
} | undefined)[];
|
|
2327
|
+
idempotencyKey?: string | undefined;
|
|
2328
|
+
version?: string | undefined;
|
|
2329
|
+
}, {
|
|
2330
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
2331
|
+
id: string;
|
|
2332
|
+
createdAt: Date;
|
|
2333
|
+
taskIdentifier: string;
|
|
2334
|
+
updatedAt: Date;
|
|
2335
|
+
attempts: ({
|
|
2336
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
2337
|
+
id: string;
|
|
2338
|
+
createdAt: Date;
|
|
2339
|
+
updatedAt: Date;
|
|
2340
|
+
startedAt?: Date | undefined;
|
|
2341
|
+
completedAt?: Date | undefined;
|
|
2342
|
+
} | undefined)[];
|
|
2343
|
+
idempotencyKey?: string | undefined;
|
|
2344
|
+
version?: string | undefined;
|
|
2345
|
+
}>;
|
|
2346
|
+
type RetrieveRunResponse = z.infer<typeof RetrieveRunResponse>;
|
|
2279
2347
|
|
|
2280
2348
|
declare const TaskResource: z.ZodObject<{
|
|
2281
2349
|
id: z.ZodString;
|
|
@@ -3976,6 +4044,23 @@ declare class ApiClient {
|
|
|
3976
4044
|
getPayloadUrl(filename: string): Promise<{
|
|
3977
4045
|
presignedUrl: string;
|
|
3978
4046
|
}>;
|
|
4047
|
+
retrieveRun(runId: string): Promise<{
|
|
4048
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
4049
|
+
id: string;
|
|
4050
|
+
createdAt: Date;
|
|
4051
|
+
taskIdentifier: string;
|
|
4052
|
+
updatedAt: Date;
|
|
4053
|
+
attempts: ({
|
|
4054
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
4055
|
+
id: string;
|
|
4056
|
+
createdAt: Date;
|
|
4057
|
+
updatedAt: Date;
|
|
4058
|
+
startedAt?: Date | undefined;
|
|
4059
|
+
completedAt?: Date | undefined;
|
|
4060
|
+
} | undefined)[];
|
|
4061
|
+
idempotencyKey?: string | undefined;
|
|
4062
|
+
version?: string | undefined;
|
|
4063
|
+
}>;
|
|
3979
4064
|
replayRun(runId: string): Promise<{
|
|
3980
4065
|
id: string;
|
|
3981
4066
|
}>;
|
|
@@ -4407,4 +4492,4 @@ declare function createPacketAttributes(packet: IOPacket, dataKey: string, dataT
|
|
|
4407
4492
|
declare function createPacketAttributesAsJson(data: any, dataType: string): Promise<Attributes>;
|
|
4408
4493
|
declare function prettyPrintPacket(rawData: any, dataType?: string): Promise<string>;
|
|
4409
4494
|
|
|
4410
|
-
export { APIConnectionError, APIError, type APIHeaders, Accessory, ApiClient, ApiClientManager, AuthenticationError, BackgroundWorkerMetadata, BackgroundWorkerProperties, BadRequestError, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, BatchTriggerTaskResponse, CanceledRunResponse, CancellationSpanEvent, ConflictError, type CreateAuthorizationCodeResponse, CreateAuthorizationCodeResponseSchema, CreateBackgroundWorkerRequestBody, CreateBackgroundWorkerResponse, CreateScheduleOptions, CreateUploadPayloadUrlResponseBody, DeletedScheduleObject, DeploymentErrorData, EventFilter, ExceptionEventProperties, ExceptionSpanEvent, ExternalBuildData, FetchRetryBackoffStrategy, FetchRetryByStatusOptions, FetchRetryHeadersStrategy, FetchRetryOptions, FetchRetryStrategy, FetchTimeoutOptions, GetBatchResponseBody, GetDeploymentResponseBody, GetEnvironmentVariablesResponseBody, type GetPersonalAccessTokenRequest, GetPersonalAccessTokenRequestSchema, type GetPersonalAccessTokenResponse, GetPersonalAccessTokenResponseSchema, GetProjectEnvResponse, GetProjectResponseBody, GetProjectsResponseBody, type IOPacket, ImageDetailsMetadata, InitializeDeploymentRequestBody, InitializeDeploymentResponseBody, InternalServerError, ListScheduleOptions, ListSchedulesResult, NULL_SENTINEL, NotFoundError, 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, OtherSpanEvent, PRIMARY_VARIANT, PermissionDeniedError, Prettify, RateLimitError, ReplayRunResponse, RetryOptions, ScheduleObject, ScheduledTaskPayload, SemanticInternalAttributes, SpanEvent, SpanEvents, SpanMessagingEvent, StartDeploymentIndexingRequestBody, StartDeploymentIndexingResponseBody, TaskEventStyle, TaskFileMetadata, TaskMetadataWithFilePath, TaskMetadataWithFunctions, TaskResource, TaskRunContext, TaskRunError, TaskRunExecutionResult, type TriggerOptions, TriggerTaskRequestBody, TriggerTaskResponse, TriggerTracer, UnprocessableEntityError, UpdateScheduleOptions, Variant, type WhoAmIResponse, WhoAmIResponseSchema, accessoryAttributes, apiClientManager, calculateNextRetryDelay, calculateResetAt, clock, conditionallyExportPacket, conditionallyImportPacket, correctErrorStackTrace, createErrorTaskError, createPacketAttributes, createPacketAttributesAsJson, defaultFetchRetryOptions, defaultRetryOptions, detectDependencyVersion, flattenAttributes, formatDuration, formatDurationInDays, formatDurationMilliseconds, formatDurationNanoseconds, groupTaskMetadataIssuesByTask, imposeAttributeLimits, isCancellationSpanEvent, isExceptionSpanEvent, logger, millisecondsToNanoseconds, nanosecondsToMilliseconds, omit, packetRequiresOffloading, parseError, parsePacket, prettyPrintPacket, primitiveValueOrflattenedAttributes, runtime, stringPatternMatchers, stringifyIO, taskCatalog, taskContext, unflattenAttributes };
|
|
4495
|
+
export { APIConnectionError, APIError, type APIHeaders, Accessory, ApiClient, ApiClientManager, AttemptStatus, AuthenticationError, BackgroundWorkerMetadata, BackgroundWorkerProperties, BadRequestError, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, BatchTriggerTaskResponse, CanceledRunResponse, CancellationSpanEvent, ConflictError, type CreateAuthorizationCodeResponse, CreateAuthorizationCodeResponseSchema, CreateBackgroundWorkerRequestBody, CreateBackgroundWorkerResponse, CreateScheduleOptions, CreateUploadPayloadUrlResponseBody, DeletedScheduleObject, DeploymentErrorData, EventFilter, ExceptionEventProperties, ExceptionSpanEvent, ExternalBuildData, FetchRetryBackoffStrategy, FetchRetryByStatusOptions, FetchRetryHeadersStrategy, FetchRetryOptions, FetchRetryStrategy, FetchTimeoutOptions, GetBatchResponseBody, GetDeploymentResponseBody, GetEnvironmentVariablesResponseBody, type GetPersonalAccessTokenRequest, GetPersonalAccessTokenRequestSchema, type GetPersonalAccessTokenResponse, GetPersonalAccessTokenResponseSchema, GetProjectEnvResponse, GetProjectResponseBody, GetProjectsResponseBody, type IOPacket, ImageDetailsMetadata, InitializeDeploymentRequestBody, InitializeDeploymentResponseBody, InternalServerError, ListScheduleOptions, ListSchedulesResult, NULL_SENTINEL, NotFoundError, 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, OtherSpanEvent, PRIMARY_VARIANT, PermissionDeniedError, Prettify, RateLimitError, ReplayRunResponse, RetrieveRunResponse, RetryOptions, RunStatus, ScheduleObject, ScheduledTaskPayload, SemanticInternalAttributes, SpanEvent, SpanEvents, SpanMessagingEvent, StartDeploymentIndexingRequestBody, StartDeploymentIndexingResponseBody, TaskEventStyle, TaskFileMetadata, TaskMetadataWithFilePath, TaskMetadataWithFunctions, TaskResource, TaskRunContext, TaskRunError, TaskRunExecutionResult, type TriggerOptions, TriggerTaskRequestBody, TriggerTaskResponse, TriggerTracer, UnprocessableEntityError, UpdateScheduleOptions, Variant, type WhoAmIResponse, WhoAmIResponseSchema, accessoryAttributes, apiClientManager, calculateNextRetryDelay, calculateResetAt, clock, conditionallyExportPacket, conditionallyImportPacket, correctErrorStackTrace, createErrorTaskError, createPacketAttributes, createPacketAttributesAsJson, defaultFetchRetryOptions, defaultRetryOptions, detectDependencyVersion, flattenAttributes, formatDuration, formatDurationInDays, formatDurationMilliseconds, formatDurationNanoseconds, groupTaskMetadataIssuesByTask, imposeAttributeLimits, isCancellationSpanEvent, isExceptionSpanEvent, logger, millisecondsToNanoseconds, nanosecondsToMilliseconds, omit, packetRequiresOffloading, parseError, parsePacket, prettyPrintPacket, primitiveValueOrflattenedAttributes, runtime, stringPatternMatchers, stringifyIO, taskCatalog, taskContext, unflattenAttributes };
|
package/dist/v3/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { T as TaskRunExecutionResult, B as BatchTaskRunExecutionResult, a as TaskRunError, b as TaskRunContext, R as RuntimeManager } from '../manager-WNMVbgHf.js';
|
|
3
3
|
export { h as TaskRun, c as TaskRunBuiltInError, d as TaskRunCustomErrorObject, f as TaskRunErrorCodes, p as TaskRunExecution, j as TaskRunExecutionAttempt, o as TaskRunExecutionBatch, k as TaskRunExecutionEnvironment, l as TaskRunExecutionOrganization, m as TaskRunExecutionProject, n as TaskRunExecutionQueue, q as TaskRunExecutionRetry, i as TaskRunExecutionTask, r as TaskRunFailedExecutionResult, g as TaskRunInternalError, e as TaskRunStringError, s as TaskRunSuccessfulExecutionResult } from '../manager-WNMVbgHf.js';
|
|
4
|
-
import { P as Prettify, C as Clock, a as ClockTime, T as TaskLogger, b as TaskCatalog, c as TaskMetadataWithFunctions, d as TaskFileMetadata, e as TaskMetadataWithFilePath, R as RetryOptions, f as TriggerTracer } from '../catalog-
|
|
5
|
-
export { p as Config, v as Context, E as EnvironmentType, x as FailureFnParams, F as FixedWindowRateLimit, A as HandleErrorArgs, H as HandleErrorFnParams, B as HandleErrorFunction, y as HandleErrorModificationOptions, z as HandleErrorResult, t as InitFnParams, I as InitOutput, L as LogLevel, h as Machine, M as MachineCpu, g as MachineMemory, s as MiddlewareFnParams, n as PostStartCauses, o as PreStopCauses, j as ProdTaskRunExecution, k as ProdTaskRunExecutionPayload, G as ProjectConfig, Q as QueueOptions, l as RateLimitOptions, D as RequireKeys, q as ResolvedConfig, r as RunFnParams, S as SlidingWindowRateLimit, u as StartFnParams, w as SuccessFnParams, m as TaskMetadata, i as TaskRunExecutionPayload, W as WaitReason } from '../catalog-
|
|
4
|
+
import { P as Prettify, C as Clock, a as ClockTime, T as TaskLogger, b as TaskCatalog, c as TaskMetadataWithFunctions, d as TaskFileMetadata, e as TaskMetadataWithFilePath, R as RetryOptions, f as TriggerTracer } from '../catalog-akmn1vqt.js';
|
|
5
|
+
export { p as Config, v as Context, E as EnvironmentType, x as FailureFnParams, F as FixedWindowRateLimit, A as HandleErrorArgs, H as HandleErrorFnParams, B as HandleErrorFunction, y as HandleErrorModificationOptions, z as HandleErrorResult, t as InitFnParams, I as InitOutput, L as LogLevel, h as Machine, M as MachineCpu, g as MachineMemory, s as MiddlewareFnParams, n as PostStartCauses, o as PreStopCauses, j as ProdTaskRunExecution, k as ProdTaskRunExecutionPayload, G as ProjectConfig, Q as QueueOptions, l as RateLimitOptions, D as RequireKeys, q as ResolvedConfig, r as RunFnParams, S as SlidingWindowRateLimit, u as StartFnParams, w as SuccessFnParams, m as TaskMetadata, i as TaskRunExecutionPayload, W as WaitReason } from '../catalog-akmn1vqt.js';
|
|
6
6
|
import { Attributes, Span } from '@opentelemetry/api';
|
|
7
7
|
import { B as BackgroundWorkerProperties } from '../messages-vq7Bk4Ap.js';
|
|
8
8
|
export { b as BackgroundWorkerClientMessages, a as BackgroundWorkerServerMessages, i as ClientToSharedQueueMessages, C as CoordinatorToPlatformMessages, k as CoordinatorToProdWorkerMessages, h as PlatformToCoordinatorMessages, g as PlatformToProviderMessages, P as ProdChildToWorkerMessages, l as ProdWorkerSocketData, e as ProdWorkerToChildMessages, j as ProdWorkerToCoordinatorMessages, f as ProviderToPlatformMessages, S as SharedQueueToClientMessages, T as TaskMetadataFailedToParseData, U as UncaughtExceptionMessage, d as childToWorkerMessages, c as clientWebsocketMessages, s as serverWebsocketMessages, w as workerToChildMessages } from '../messages-vq7Bk4Ap.js';
|
|
@@ -2276,6 +2276,74 @@ declare const ListScheduleOptions: z.ZodObject<{
|
|
|
2276
2276
|
perPage?: number | undefined;
|
|
2277
2277
|
}>;
|
|
2278
2278
|
type ListScheduleOptions = z.infer<typeof ListScheduleOptions>;
|
|
2279
|
+
declare const RunStatus: z.ZodEnum<["PENDING", "EXECUTING", "PAUSED", "COMPLETED", "FAILED", "CANCELED"]>;
|
|
2280
|
+
type RunStatus = z.infer<typeof RunStatus>;
|
|
2281
|
+
declare const AttemptStatus: z.ZodEnum<["PENDING", "EXECUTING", "PAUSED", "COMPLETED", "FAILED", "CANCELED"]>;
|
|
2282
|
+
type AttemptStatus = z.infer<typeof AttemptStatus>;
|
|
2283
|
+
declare const RetrieveRunResponse: z.ZodObject<{
|
|
2284
|
+
id: z.ZodString;
|
|
2285
|
+
status: z.ZodEnum<["PENDING", "EXECUTING", "PAUSED", "COMPLETED", "FAILED", "CANCELED"]>;
|
|
2286
|
+
taskIdentifier: z.ZodString;
|
|
2287
|
+
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
2288
|
+
version: z.ZodOptional<z.ZodString>;
|
|
2289
|
+
createdAt: z.ZodDate;
|
|
2290
|
+
updatedAt: z.ZodDate;
|
|
2291
|
+
attempts: z.ZodArray<z.ZodOptional<z.ZodObject<{
|
|
2292
|
+
id: z.ZodString;
|
|
2293
|
+
status: z.ZodEnum<["PENDING", "EXECUTING", "PAUSED", "COMPLETED", "FAILED", "CANCELED"]>;
|
|
2294
|
+
createdAt: z.ZodDate;
|
|
2295
|
+
updatedAt: z.ZodDate;
|
|
2296
|
+
startedAt: z.ZodOptional<z.ZodDate>;
|
|
2297
|
+
completedAt: z.ZodOptional<z.ZodDate>;
|
|
2298
|
+
}, "strip", z.ZodTypeAny, {
|
|
2299
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
2300
|
+
id: string;
|
|
2301
|
+
createdAt: Date;
|
|
2302
|
+
updatedAt: Date;
|
|
2303
|
+
startedAt?: Date | undefined;
|
|
2304
|
+
completedAt?: Date | undefined;
|
|
2305
|
+
}, {
|
|
2306
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
2307
|
+
id: string;
|
|
2308
|
+
createdAt: Date;
|
|
2309
|
+
updatedAt: Date;
|
|
2310
|
+
startedAt?: Date | undefined;
|
|
2311
|
+
completedAt?: Date | undefined;
|
|
2312
|
+
}>>, "many">;
|
|
2313
|
+
}, "strip", z.ZodTypeAny, {
|
|
2314
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
2315
|
+
id: string;
|
|
2316
|
+
createdAt: Date;
|
|
2317
|
+
taskIdentifier: string;
|
|
2318
|
+
updatedAt: Date;
|
|
2319
|
+
attempts: ({
|
|
2320
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
2321
|
+
id: string;
|
|
2322
|
+
createdAt: Date;
|
|
2323
|
+
updatedAt: Date;
|
|
2324
|
+
startedAt?: Date | undefined;
|
|
2325
|
+
completedAt?: Date | undefined;
|
|
2326
|
+
} | undefined)[];
|
|
2327
|
+
idempotencyKey?: string | undefined;
|
|
2328
|
+
version?: string | undefined;
|
|
2329
|
+
}, {
|
|
2330
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
2331
|
+
id: string;
|
|
2332
|
+
createdAt: Date;
|
|
2333
|
+
taskIdentifier: string;
|
|
2334
|
+
updatedAt: Date;
|
|
2335
|
+
attempts: ({
|
|
2336
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
2337
|
+
id: string;
|
|
2338
|
+
createdAt: Date;
|
|
2339
|
+
updatedAt: Date;
|
|
2340
|
+
startedAt?: Date | undefined;
|
|
2341
|
+
completedAt?: Date | undefined;
|
|
2342
|
+
} | undefined)[];
|
|
2343
|
+
idempotencyKey?: string | undefined;
|
|
2344
|
+
version?: string | undefined;
|
|
2345
|
+
}>;
|
|
2346
|
+
type RetrieveRunResponse = z.infer<typeof RetrieveRunResponse>;
|
|
2279
2347
|
|
|
2280
2348
|
declare const TaskResource: z.ZodObject<{
|
|
2281
2349
|
id: z.ZodString;
|
|
@@ -3976,6 +4044,23 @@ declare class ApiClient {
|
|
|
3976
4044
|
getPayloadUrl(filename: string): Promise<{
|
|
3977
4045
|
presignedUrl: string;
|
|
3978
4046
|
}>;
|
|
4047
|
+
retrieveRun(runId: string): Promise<{
|
|
4048
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
4049
|
+
id: string;
|
|
4050
|
+
createdAt: Date;
|
|
4051
|
+
taskIdentifier: string;
|
|
4052
|
+
updatedAt: Date;
|
|
4053
|
+
attempts: ({
|
|
4054
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
4055
|
+
id: string;
|
|
4056
|
+
createdAt: Date;
|
|
4057
|
+
updatedAt: Date;
|
|
4058
|
+
startedAt?: Date | undefined;
|
|
4059
|
+
completedAt?: Date | undefined;
|
|
4060
|
+
} | undefined)[];
|
|
4061
|
+
idempotencyKey?: string | undefined;
|
|
4062
|
+
version?: string | undefined;
|
|
4063
|
+
}>;
|
|
3979
4064
|
replayRun(runId: string): Promise<{
|
|
3980
4065
|
id: string;
|
|
3981
4066
|
}>;
|
|
@@ -4407,4 +4492,4 @@ declare function createPacketAttributes(packet: IOPacket, dataKey: string, dataT
|
|
|
4407
4492
|
declare function createPacketAttributesAsJson(data: any, dataType: string): Promise<Attributes>;
|
|
4408
4493
|
declare function prettyPrintPacket(rawData: any, dataType?: string): Promise<string>;
|
|
4409
4494
|
|
|
4410
|
-
export { APIConnectionError, APIError, type APIHeaders, Accessory, ApiClient, ApiClientManager, AuthenticationError, BackgroundWorkerMetadata, BackgroundWorkerProperties, BadRequestError, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, BatchTriggerTaskResponse, CanceledRunResponse, CancellationSpanEvent, ConflictError, type CreateAuthorizationCodeResponse, CreateAuthorizationCodeResponseSchema, CreateBackgroundWorkerRequestBody, CreateBackgroundWorkerResponse, CreateScheduleOptions, CreateUploadPayloadUrlResponseBody, DeletedScheduleObject, DeploymentErrorData, EventFilter, ExceptionEventProperties, ExceptionSpanEvent, ExternalBuildData, FetchRetryBackoffStrategy, FetchRetryByStatusOptions, FetchRetryHeadersStrategy, FetchRetryOptions, FetchRetryStrategy, FetchTimeoutOptions, GetBatchResponseBody, GetDeploymentResponseBody, GetEnvironmentVariablesResponseBody, type GetPersonalAccessTokenRequest, GetPersonalAccessTokenRequestSchema, type GetPersonalAccessTokenResponse, GetPersonalAccessTokenResponseSchema, GetProjectEnvResponse, GetProjectResponseBody, GetProjectsResponseBody, type IOPacket, ImageDetailsMetadata, InitializeDeploymentRequestBody, InitializeDeploymentResponseBody, InternalServerError, ListScheduleOptions, ListSchedulesResult, NULL_SENTINEL, NotFoundError, 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, OtherSpanEvent, PRIMARY_VARIANT, PermissionDeniedError, Prettify, RateLimitError, ReplayRunResponse, RetryOptions, ScheduleObject, ScheduledTaskPayload, SemanticInternalAttributes, SpanEvent, SpanEvents, SpanMessagingEvent, StartDeploymentIndexingRequestBody, StartDeploymentIndexingResponseBody, TaskEventStyle, TaskFileMetadata, TaskMetadataWithFilePath, TaskMetadataWithFunctions, TaskResource, TaskRunContext, TaskRunError, TaskRunExecutionResult, type TriggerOptions, TriggerTaskRequestBody, TriggerTaskResponse, TriggerTracer, UnprocessableEntityError, UpdateScheduleOptions, Variant, type WhoAmIResponse, WhoAmIResponseSchema, accessoryAttributes, apiClientManager, calculateNextRetryDelay, calculateResetAt, clock, conditionallyExportPacket, conditionallyImportPacket, correctErrorStackTrace, createErrorTaskError, createPacketAttributes, createPacketAttributesAsJson, defaultFetchRetryOptions, defaultRetryOptions, detectDependencyVersion, flattenAttributes, formatDuration, formatDurationInDays, formatDurationMilliseconds, formatDurationNanoseconds, groupTaskMetadataIssuesByTask, imposeAttributeLimits, isCancellationSpanEvent, isExceptionSpanEvent, logger, millisecondsToNanoseconds, nanosecondsToMilliseconds, omit, packetRequiresOffloading, parseError, parsePacket, prettyPrintPacket, primitiveValueOrflattenedAttributes, runtime, stringPatternMatchers, stringifyIO, taskCatalog, taskContext, unflattenAttributes };
|
|
4495
|
+
export { APIConnectionError, APIError, type APIHeaders, Accessory, ApiClient, ApiClientManager, AttemptStatus, AuthenticationError, BackgroundWorkerMetadata, BackgroundWorkerProperties, BadRequestError, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, BatchTriggerTaskResponse, CanceledRunResponse, CancellationSpanEvent, ConflictError, type CreateAuthorizationCodeResponse, CreateAuthorizationCodeResponseSchema, CreateBackgroundWorkerRequestBody, CreateBackgroundWorkerResponse, CreateScheduleOptions, CreateUploadPayloadUrlResponseBody, DeletedScheduleObject, DeploymentErrorData, EventFilter, ExceptionEventProperties, ExceptionSpanEvent, ExternalBuildData, FetchRetryBackoffStrategy, FetchRetryByStatusOptions, FetchRetryHeadersStrategy, FetchRetryOptions, FetchRetryStrategy, FetchTimeoutOptions, GetBatchResponseBody, GetDeploymentResponseBody, GetEnvironmentVariablesResponseBody, type GetPersonalAccessTokenRequest, GetPersonalAccessTokenRequestSchema, type GetPersonalAccessTokenResponse, GetPersonalAccessTokenResponseSchema, GetProjectEnvResponse, GetProjectResponseBody, GetProjectsResponseBody, type IOPacket, ImageDetailsMetadata, InitializeDeploymentRequestBody, InitializeDeploymentResponseBody, InternalServerError, ListScheduleOptions, ListSchedulesResult, NULL_SENTINEL, NotFoundError, 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, OtherSpanEvent, PRIMARY_VARIANT, PermissionDeniedError, Prettify, RateLimitError, ReplayRunResponse, RetrieveRunResponse, RetryOptions, RunStatus, ScheduleObject, ScheduledTaskPayload, SemanticInternalAttributes, SpanEvent, SpanEvents, SpanMessagingEvent, StartDeploymentIndexingRequestBody, StartDeploymentIndexingResponseBody, TaskEventStyle, TaskFileMetadata, TaskMetadataWithFilePath, TaskMetadataWithFunctions, TaskResource, TaskRunContext, TaskRunError, TaskRunExecutionResult, type TriggerOptions, TriggerTaskRequestBody, TriggerTaskResponse, TriggerTracer, UnprocessableEntityError, UpdateScheduleOptions, Variant, type WhoAmIResponse, WhoAmIResponseSchema, accessoryAttributes, apiClientManager, calculateNextRetryDelay, calculateResetAt, clock, conditionallyExportPacket, conditionallyImportPacket, correctErrorStackTrace, createErrorTaskError, createPacketAttributes, createPacketAttributesAsJson, defaultFetchRetryOptions, defaultRetryOptions, detectDependencyVersion, flattenAttributes, formatDuration, formatDurationInDays, formatDurationMilliseconds, formatDurationNanoseconds, groupTaskMetadataIssuesByTask, imposeAttributeLimits, isCancellationSpanEvent, isExceptionSpanEvent, logger, millisecondsToNanoseconds, nanosecondsToMilliseconds, omit, packetRequiresOffloading, parseError, parsePacket, prettyPrintPacket, primitiveValueOrflattenedAttributes, runtime, stringPatternMatchers, stringifyIO, taskCatalog, taskContext, unflattenAttributes };
|
package/dist/v3/index.js
CHANGED
|
@@ -1011,6 +1011,39 @@ var ListScheduleOptions = zod.z.object({
|
|
|
1011
1011
|
page: zod.z.number().optional(),
|
|
1012
1012
|
perPage: zod.z.number().optional()
|
|
1013
1013
|
});
|
|
1014
|
+
var RunStatus = zod.z.enum([
|
|
1015
|
+
"PENDING",
|
|
1016
|
+
"EXECUTING",
|
|
1017
|
+
"PAUSED",
|
|
1018
|
+
"COMPLETED",
|
|
1019
|
+
"FAILED",
|
|
1020
|
+
"CANCELED"
|
|
1021
|
+
]);
|
|
1022
|
+
var AttemptStatus = zod.z.enum([
|
|
1023
|
+
"PENDING",
|
|
1024
|
+
"EXECUTING",
|
|
1025
|
+
"PAUSED",
|
|
1026
|
+
"COMPLETED",
|
|
1027
|
+
"FAILED",
|
|
1028
|
+
"CANCELED"
|
|
1029
|
+
]);
|
|
1030
|
+
var RetrieveRunResponse = zod.z.object({
|
|
1031
|
+
id: zod.z.string(),
|
|
1032
|
+
status: RunStatus,
|
|
1033
|
+
taskIdentifier: zod.z.string(),
|
|
1034
|
+
idempotencyKey: zod.z.string().optional(),
|
|
1035
|
+
version: zod.z.string().optional(),
|
|
1036
|
+
createdAt: zod.z.coerce.date(),
|
|
1037
|
+
updatedAt: zod.z.coerce.date(),
|
|
1038
|
+
attempts: zod.z.array(zod.z.object({
|
|
1039
|
+
id: zod.z.string(),
|
|
1040
|
+
status: AttemptStatus,
|
|
1041
|
+
createdAt: zod.z.coerce.date(),
|
|
1042
|
+
updatedAt: zod.z.coerce.date(),
|
|
1043
|
+
startedAt: zod.z.coerce.date().optional(),
|
|
1044
|
+
completedAt: zod.z.coerce.date().optional()
|
|
1045
|
+
}).optional())
|
|
1046
|
+
});
|
|
1014
1047
|
var BackgroundWorkerServerMessages = zod.z.discriminatedUnion("type", [
|
|
1015
1048
|
zod.z.object({
|
|
1016
1049
|
type: zod.z.literal("EXECUTE_RUNS"),
|
|
@@ -2158,6 +2191,12 @@ var _ApiClient = class _ApiClient {
|
|
|
2158
2191
|
headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false)
|
|
2159
2192
|
}, zodFetchOptions);
|
|
2160
2193
|
}
|
|
2194
|
+
retrieveRun(runId) {
|
|
2195
|
+
return zodfetch(RetrieveRunResponse, `${this.baseUrl}/api/v3/runs/${runId}`, {
|
|
2196
|
+
method: "GET",
|
|
2197
|
+
headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false)
|
|
2198
|
+
}, zodFetchOptions);
|
|
2199
|
+
}
|
|
2161
2200
|
replayRun(runId) {
|
|
2162
2201
|
return zodfetch(ReplayRunResponse, `${this.baseUrl}/api/v1/runs/${runId}/replay`, {
|
|
2163
2202
|
method: "POST",
|
|
@@ -3436,6 +3475,7 @@ exports.APIConnectionError = APIConnectionError;
|
|
|
3436
3475
|
exports.APIError = APIError;
|
|
3437
3476
|
exports.ApiClient = ApiClient;
|
|
3438
3477
|
exports.ApiClientManager = ApiClientManager;
|
|
3478
|
+
exports.AttemptStatus = AttemptStatus;
|
|
3439
3479
|
exports.AuthenticationError = AuthenticationError;
|
|
3440
3480
|
exports.BackgroundWorkerClientMessages = BackgroundWorkerClientMessages;
|
|
3441
3481
|
exports.BackgroundWorkerMetadata = BackgroundWorkerMetadata;
|
|
@@ -3517,7 +3557,9 @@ exports.QueueOptions = QueueOptions;
|
|
|
3517
3557
|
exports.RateLimitError = RateLimitError;
|
|
3518
3558
|
exports.RateLimitOptions = RateLimitOptions;
|
|
3519
3559
|
exports.ReplayRunResponse = ReplayRunResponse;
|
|
3560
|
+
exports.RetrieveRunResponse = RetrieveRunResponse;
|
|
3520
3561
|
exports.RetryOptions = RetryOptions;
|
|
3562
|
+
exports.RunStatus = RunStatus;
|
|
3521
3563
|
exports.ScheduleObject = ScheduleObject;
|
|
3522
3564
|
exports.ScheduledTaskPayload = ScheduledTaskPayload;
|
|
3523
3565
|
exports.SemanticInternalAttributes = SemanticInternalAttributes;
|