@trigger.dev/core 3.0.0-beta.50 → 3.0.0-beta.52
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-h79CG5Wy.d.ts → catalog-gM5Cvgc3.d.ts} +2 -2
- package/dist/{catalog-H7yFiZ60.d.mts → catalog-nhfltZFA.d.mts} +2 -2
- package/dist/{common-CLW82lkt.d.mts → common-B45g-vNI.d.mts} +13 -0
- package/dist/{common-CLW82lkt.d.ts → common-B45g-vNI.d.ts} +13 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/{manager-KvCabW1a.d.mts → manager-q7bZZNwE.d.mts} +1 -1
- package/dist/{manager-OBA35PzR.d.ts → manager-zf0yn2lA.d.ts} +1 -1
- package/dist/{messages-JvHJ83wv.d.mts → messages-248C7Ut6.d.mts} +203 -11
- package/dist/{messages-JvHJ83wv.d.ts → messages-248C7Ut6.d.ts} +203 -11
- package/dist/retry.d.mts +1 -1
- package/dist/retry.d.ts +1 -1
- package/dist/schemas/index.d.mts +6 -6
- package/dist/schemas/index.d.ts +6 -6
- package/dist/{schemas-C9ssfehv.d.mts → schemas-38ilA21d.d.mts} +19 -0
- package/dist/{schemas-C9ssfehv.d.ts → schemas-38ilA21d.d.ts} +19 -0
- package/dist/v3/dev/index.d.mts +2 -2
- package/dist/v3/dev/index.d.ts +2 -2
- package/dist/v3/errors.d.mts +1 -1
- package/dist/v3/errors.d.ts +1 -1
- package/dist/v3/index.d.mts +45 -33
- package/dist/v3/index.d.ts +45 -33
- package/dist/v3/index.js +44 -3
- package/dist/v3/index.js.map +1 -1
- package/dist/v3/index.mjs +43 -4
- package/dist/v3/index.mjs.map +1 -1
- package/dist/v3/otel/index.js +1 -1
- package/dist/v3/otel/index.js.map +1 -1
- package/dist/v3/otel/index.mjs +1 -1
- package/dist/v3/otel/index.mjs.map +1 -1
- package/dist/v3/prod/index.d.mts +3 -3
- package/dist/v3/prod/index.d.ts +3 -3
- package/dist/v3/schemas/index.d.mts +71 -5
- package/dist/v3/schemas/index.d.ts +71 -5
- package/dist/v3/schemas/index.js +31 -2
- package/dist/v3/schemas/index.js.map +1 -1
- package/dist/v3/schemas/index.mjs +30 -3
- package/dist/v3/schemas/index.mjs.map +1 -1
- package/dist/v3/utils/ioSerialization.d.mts +2 -1
- package/dist/v3/utils/ioSerialization.d.ts +2 -1
- package/dist/v3/utils/ioSerialization.js +41 -3
- package/dist/v3/utils/ioSerialization.js.map +1 -1
- package/dist/v3/utils/ioSerialization.mjs +41 -4
- package/dist/v3/utils/ioSerialization.mjs.map +1 -1
- package/dist/v3/utils/retries.d.mts +1 -1
- package/dist/v3/utils/retries.d.ts +1 -1
- package/dist/v3/workers/index.d.mts +6 -6
- package/dist/v3/workers/index.d.ts +6 -6
- package/dist/v3/workers/index.js +29 -3
- package/dist/v3/workers/index.js.map +1 -1
- package/dist/v3/workers/index.mjs +29 -3
- package/dist/v3/workers/index.mjs.map +1 -1
- package/dist/v3/zodfetch.d.mts +1 -1
- package/dist/v3/zodfetch.d.ts +1 -1
- package/package.json +1 -1
- package/dist/{api-sNoooMbT.d.ts → api--StDLb4h.d.ts} +153 -153
- package/dist/{api-Pl9fxB8v.d.mts → api-a39zAY3E.d.mts} +153 -153
package/dist/v3/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import * as zod from 'zod';
|
|
2
1
|
import { CursorPageParams, ApiRequestOptions, ZodFetchOptions, ApiPromise, CursorPagePromise, OffsetLimitPagePromise } from './zodfetch.js';
|
|
3
2
|
export { APIHeaders, ApiConnectionError, ApiError, AuthenticationError, BadRequestError, ConflictError, CursorPage, CursorPageResponse, InternalServerError, NotFoundError, OffsetLimitPage, OffsetLimitPageParams, OffsetLimitPageResponse, Page, PageResponse, PermissionDeniedError, RateLimitError, UnprocessableEntityError, isRequestOptions } from './zodfetch.js';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { RunStatus, TriggerTaskRequestBody, BatchTriggerTaskRequestBody, ListRunResponseItem, RescheduleRunRequestBody, AddTagsRequestBody, CreateScheduleOptions, ListScheduleOptions, UpdateScheduleOptions, CreateEnvironmentVariableRequestBody, UpdateEnvironmentVariableRequestBody, Accessory } from './schemas/index.js';
|
|
5
|
+
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, RunTags, ScheduleGenerator, ScheduleObject, ScheduleType, ScheduledTaskPayload, SpanEvent, SpanEvents, SpanMessagingEvent, StartDeploymentIndexingRequestBody, StartDeploymentIndexingResponseBody, TaskEventStyle, TaskResource, TimezonesResult, TriggerTaskResponse, Variant, WhoAmIResponse, WhoAmIResponseSchema, isCancellationSpanEvent, isExceptionSpanEvent, stringPatternMatchers } from './schemas/index.js';
|
|
6
|
+
import { T as TaskRunExecutionResult, B as BatchTaskRunExecutionResult, a as TaskRunContext } from '../common-B45g-vNI.js';
|
|
7
|
+
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, b as TaskRunError, k as TaskRunErrorCodes, c 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-B45g-vNI.js';
|
|
8
|
+
import { C as Clock, a as ClockTime, b as TaskCatalog, T as TaskMetadataWithFunctions } from '../catalog-gM5Cvgc3.js';
|
|
9
|
+
export { f as Context, F as FailureFnParams, k as HandleErrorArgs, h as HandleErrorFnParams, H as HandleErrorFunction, i as HandleErrorModificationOptions, j as HandleErrorResult, e as InitFnParams, I as InitOutput, M as MiddlewareFnParams, P as ProjectConfig, n as ResolveEnvironmentVariablesFunction, m as ResolveEnvironmentVariablesParams, l as ResolveEnvironmentVariablesResult, R as RunFnParams, S as StartFnParams, g as SuccessFnParams, u as usage } from '../catalog-gM5Cvgc3.js';
|
|
10
10
|
export { AbortTaskRunError, SerializedError, correctErrorStackTrace, createErrorTaskError, createJsonErrorObject, groupTaskMetadataIssuesByTask, parseError, sanitizeError } from './errors.js';
|
|
11
11
|
import { Attributes } from '@opentelemetry/api';
|
|
12
12
|
export { logger } from './logger-api.js';
|
|
13
|
-
import { R as RuntimeManager } from '../manager-
|
|
14
|
-
import { B as BackgroundWorkerProperties } from '../messages-
|
|
15
|
-
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-
|
|
16
|
-
import { a as TaskFileMetadata, b as TaskMetadataWithFilePath } from '../schemas-
|
|
17
|
-
export { C as Config, E as EnvironmentType, F as FixedWindowRateLimit, h as PostStartCauses, i as PreStopCauses, P as Prettify, d as ProdTaskRunExecution, e as ProdTaskRunExecutionPayload, Q as QueueOptions, f as RateLimitOptions, l as RequireKeys, j as ResolvedConfig, R as RetryOptions, g as ScheduleMetadata, S as SlidingWindowRateLimit, T as TaskMetadata, k as TaskRunExecutionLazyAttemptPayload, c as TaskRunExecutionPayload, W as WaitReason } from '../schemas-
|
|
13
|
+
import { R as RuntimeManager } from '../manager-zf0yn2lA.js';
|
|
14
|
+
import { B as BackgroundWorkerProperties } from '../messages-248C7Ut6.js';
|
|
15
|
+
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-248C7Ut6.js';
|
|
16
|
+
import { a as TaskFileMetadata, b as TaskMetadataWithFilePath } from '../schemas-38ilA21d.js';
|
|
17
|
+
export { C as Config, E as EnvironmentType, F as FixedWindowRateLimit, h as PostStartCauses, i as PreStopCauses, P as Prettify, d as ProdTaskRunExecution, e as ProdTaskRunExecutionPayload, Q as QueueOptions, f as RateLimitOptions, l as RequireKeys, j as ResolvedConfig, R as RetryOptions, g as ScheduleMetadata, S as SlidingWindowRateLimit, T as TaskMetadata, k as TaskRunExecutionLazyAttemptPayload, c as TaskRunExecutionPayload, W as WaitReason } from '../schemas-38ilA21d.js';
|
|
18
18
|
export { SemanticInternalAttributes } from './semanticInternalAttributes.js';
|
|
19
19
|
export { formatDuration, formatDurationInDays, formatDurationMilliseconds, formatDurationNanoseconds, millisecondsToNanoseconds, nanosecondsToMilliseconds } from './utils/durations.js';
|
|
20
20
|
export { T as TriggerTracer } from '../tracer-N0p2Fuuv.js';
|
|
@@ -53,6 +53,7 @@ interface ListRunsQueryParams extends CursorPageParams {
|
|
|
53
53
|
to?: Date | number;
|
|
54
54
|
period?: string;
|
|
55
55
|
bulkAction?: string;
|
|
56
|
+
tag?: Array<string> | string;
|
|
56
57
|
schedule?: string;
|
|
57
58
|
isTest?: boolean;
|
|
58
59
|
}
|
|
@@ -91,8 +92,12 @@ declare class ApiClient {
|
|
|
91
92
|
retrieveRun(runId: string, requestOptions?: ZodFetchOptions): ApiPromise<{
|
|
92
93
|
status: "COMPLETED" | "CANCELED" | "QUEUED" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
93
94
|
id: string;
|
|
95
|
+
tags: string[];
|
|
94
96
|
isTest: boolean;
|
|
95
97
|
createdAt: Date;
|
|
98
|
+
durationMs: number;
|
|
99
|
+
costInCents: number;
|
|
100
|
+
baseCostInCents: number;
|
|
96
101
|
attempts: ({
|
|
97
102
|
status: "PENDING" | "COMPLETED" | "CANCELED" | "EXECUTING" | "FAILED" | "PAUSED";
|
|
98
103
|
id: string;
|
|
@@ -147,8 +152,12 @@ declare class ApiClient {
|
|
|
147
152
|
rescheduleRun(runId: string, body: RescheduleRunRequestBody, requestOptions?: ZodFetchOptions): ApiPromise<{
|
|
148
153
|
status: "COMPLETED" | "CANCELED" | "QUEUED" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
149
154
|
id: string;
|
|
155
|
+
tags: string[];
|
|
150
156
|
isTest: boolean;
|
|
151
157
|
createdAt: Date;
|
|
158
|
+
durationMs: number;
|
|
159
|
+
costInCents: number;
|
|
160
|
+
baseCostInCents: number;
|
|
152
161
|
attempts: ({
|
|
153
162
|
status: "PENDING" | "COMPLETED" | "CANCELED" | "EXECUTING" | "FAILED" | "PAUSED";
|
|
154
163
|
id: string;
|
|
@@ -192,6 +201,9 @@ declare class ApiClient {
|
|
|
192
201
|
ttl?: string | undefined;
|
|
193
202
|
expiredAt?: Date | undefined;
|
|
194
203
|
}>;
|
|
204
|
+
addTags(runId: string, body: AddTagsRequestBody, requestOptions?: ZodFetchOptions): ApiPromise<{
|
|
205
|
+
message: string;
|
|
206
|
+
}>;
|
|
195
207
|
createSchedule(options: CreateScheduleOptions, requestOptions?: ZodFetchOptions): ApiPromise<{
|
|
196
208
|
type: "DECLARATIVE" | "IMPERATIVE";
|
|
197
209
|
id: string;
|
|
@@ -212,18 +224,18 @@ declare class ApiClient {
|
|
|
212
224
|
externalId?: string | null | undefined;
|
|
213
225
|
nextRun?: Date | null | undefined;
|
|
214
226
|
}>;
|
|
215
|
-
listSchedules(options?: ListScheduleOptions, requestOptions?: ZodFetchOptions): OffsetLimitPagePromise<
|
|
216
|
-
id:
|
|
217
|
-
type:
|
|
218
|
-
task:
|
|
219
|
-
active:
|
|
220
|
-
deduplicationKey:
|
|
221
|
-
externalId:
|
|
222
|
-
generator:
|
|
223
|
-
type:
|
|
224
|
-
expression:
|
|
225
|
-
description:
|
|
226
|
-
}, "strip",
|
|
227
|
+
listSchedules(options?: ListScheduleOptions, requestOptions?: ZodFetchOptions): OffsetLimitPagePromise<z.ZodObject<{
|
|
228
|
+
id: z.ZodString;
|
|
229
|
+
type: z.ZodUnion<[z.ZodLiteral<"DECLARATIVE">, z.ZodLiteral<"IMPERATIVE">]>;
|
|
230
|
+
task: z.ZodString;
|
|
231
|
+
active: z.ZodBoolean;
|
|
232
|
+
deduplicationKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
233
|
+
externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
234
|
+
generator: z.ZodObject<{
|
|
235
|
+
type: z.ZodLiteral<"CRON">;
|
|
236
|
+
expression: z.ZodString;
|
|
237
|
+
description: z.ZodString;
|
|
238
|
+
}, "strip", z.ZodTypeAny, {
|
|
227
239
|
type: "CRON";
|
|
228
240
|
description: string;
|
|
229
241
|
expression: string;
|
|
@@ -232,13 +244,13 @@ declare class ApiClient {
|
|
|
232
244
|
description: string;
|
|
233
245
|
expression: string;
|
|
234
246
|
}>;
|
|
235
|
-
timezone:
|
|
236
|
-
nextRun:
|
|
237
|
-
environments:
|
|
238
|
-
id:
|
|
239
|
-
type:
|
|
240
|
-
userName:
|
|
241
|
-
}, "strip",
|
|
247
|
+
timezone: z.ZodString;
|
|
248
|
+
nextRun: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
249
|
+
environments: z.ZodArray<z.ZodObject<{
|
|
250
|
+
id: z.ZodString;
|
|
251
|
+
type: z.ZodString;
|
|
252
|
+
userName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
253
|
+
}, "strip", z.ZodTypeAny, {
|
|
242
254
|
type: string;
|
|
243
255
|
id: string;
|
|
244
256
|
userName?: string | null | undefined;
|
|
@@ -247,7 +259,7 @@ declare class ApiClient {
|
|
|
247
259
|
id: string;
|
|
248
260
|
userName?: string | null | undefined;
|
|
249
261
|
}>, "many">;
|
|
250
|
-
}, "strip",
|
|
262
|
+
}, "strip", z.ZodTypeAny, {
|
|
251
263
|
type: "DECLARATIVE" | "IMPERATIVE";
|
|
252
264
|
id: string;
|
|
253
265
|
task: string;
|
|
@@ -505,4 +517,4 @@ declare function accessoryAttributes(accessory: Accessory): Attributes;
|
|
|
505
517
|
|
|
506
518
|
declare function detectDependencyVersion(dependency: string): string | undefined;
|
|
507
519
|
|
|
508
|
-
export { Accessory, ApiClient, type ApiClientConfiguration, ApiPromise, ApiRequestOptions, BackgroundWorkerProperties, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, type CreateEnvironmentVariableParams, CreateEnvironmentVariableRequestBody, CreateScheduleOptions, CursorPageParams, CursorPagePromise, type ImportEnvironmentVariablesParams, type ListProjectRunsQueryParams, ListRunResponseItem, type ListRunsQueryParams, ListScheduleOptions, 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, RunStatus, TaskFileMetadata, TaskMetadataWithFilePath, TaskMetadataWithFunctions, TaskRunContext, TaskRunExecutionResult, type TriggerOptions, TriggerTaskRequestBody, type UpdateEnvironmentVariableParams, UpdateEnvironmentVariableRequestBody, UpdateScheduleOptions, accessoryAttributes, apiClientManager, clock, detectDependencyVersion, imposeAttributeLimits, mergeRequestOptions, runtime, taskCatalog, taskContext };
|
|
520
|
+
export { Accessory, AddTagsRequestBody, ApiClient, type ApiClientConfiguration, ApiPromise, ApiRequestOptions, BackgroundWorkerProperties, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, type CreateEnvironmentVariableParams, CreateEnvironmentVariableRequestBody, CreateScheduleOptions, CursorPageParams, CursorPagePromise, type ImportEnvironmentVariablesParams, type ListProjectRunsQueryParams, ListRunResponseItem, type ListRunsQueryParams, ListScheduleOptions, 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, RunStatus, TaskFileMetadata, TaskMetadataWithFilePath, TaskMetadataWithFunctions, TaskRunContext, TaskRunExecutionResult, type TriggerOptions, TriggerTaskRequestBody, type UpdateEnvironmentVariableParams, UpdateEnvironmentVariableRequestBody, UpdateScheduleOptions, accessoryAttributes, apiClientManager, clock, detectDependencyVersion, imposeAttributeLimits, mergeRequestOptions, runtime, taskCatalog, taskContext };
|
package/dist/v3/index.js
CHANGED
|
@@ -33,7 +33,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
// package.json
|
|
36
|
-
var version = "3.0.0-beta.
|
|
36
|
+
var version = "3.0.0-beta.52";
|
|
37
37
|
var dependencies = {
|
|
38
38
|
"@google-cloud/precise-date": "^4.0.0",
|
|
39
39
|
"@opentelemetry/api": "^1.8.0",
|
|
@@ -170,7 +170,8 @@ var TaskRun = zod.z.object({
|
|
|
170
170
|
maxAttempts: zod.z.number().optional(),
|
|
171
171
|
durationMs: zod.z.number().default(0),
|
|
172
172
|
costInCents: zod.z.number().default(0),
|
|
173
|
-
baseCostInCents: zod.z.number().default(0)
|
|
173
|
+
baseCostInCents: zod.z.number().default(0),
|
|
174
|
+
version: zod.z.string().optional()
|
|
174
175
|
});
|
|
175
176
|
var TaskRunExecutionTask = zod.z.object({
|
|
176
177
|
id: zod.z.string(),
|
|
@@ -717,6 +718,11 @@ var CreateBackgroundWorkerResponse = zod.z.object({
|
|
|
717
718
|
version: zod.z.string(),
|
|
718
719
|
contentHash: zod.z.string()
|
|
719
720
|
});
|
|
721
|
+
var RunTag = zod.z.string().max(64, "Tags must be less than 64 characters");
|
|
722
|
+
var RunTags = zod.z.union([
|
|
723
|
+
RunTag,
|
|
724
|
+
RunTag.array()
|
|
725
|
+
]);
|
|
720
726
|
var TriggerTaskRequestBody = zod.z.object({
|
|
721
727
|
payload: zod.z.any(),
|
|
722
728
|
context: zod.z.any(),
|
|
@@ -731,6 +737,7 @@ var TriggerTaskRequestBody = zod.z.object({
|
|
|
731
737
|
payloadType: zod.z.string().optional(),
|
|
732
738
|
delay: zod.z.string().or(zod.z.coerce.date()).optional(),
|
|
733
739
|
ttl: zod.z.string().or(zod.z.number().nonnegative().int()).optional(),
|
|
740
|
+
tags: RunTags.optional(),
|
|
734
741
|
maxAttempts: zod.z.number().int().optional()
|
|
735
742
|
}).optional()
|
|
736
743
|
});
|
|
@@ -758,6 +765,9 @@ var GetBatchResponseBody = zod.z.object({
|
|
|
758
765
|
])
|
|
759
766
|
}))
|
|
760
767
|
});
|
|
768
|
+
var AddTagsRequestBody = zod.z.object({
|
|
769
|
+
tags: RunTags
|
|
770
|
+
});
|
|
761
771
|
var RescheduleRunRequestBody = zod.z.object({
|
|
762
772
|
delay: zod.z.string().or(zod.z.coerce.date())
|
|
763
773
|
});
|
|
@@ -1020,7 +1030,11 @@ var CommonRunFields = {
|
|
|
1020
1030
|
finishedAt: zod.z.coerce.date().optional(),
|
|
1021
1031
|
delayedUntil: zod.z.coerce.date().optional(),
|
|
1022
1032
|
ttl: zod.z.string().optional(),
|
|
1023
|
-
expiredAt: zod.z.coerce.date().optional()
|
|
1033
|
+
expiredAt: zod.z.coerce.date().optional(),
|
|
1034
|
+
tags: zod.z.string().array(),
|
|
1035
|
+
costInCents: zod.z.number(),
|
|
1036
|
+
baseCostInCents: zod.z.number(),
|
|
1037
|
+
durationMs: zod.z.number()
|
|
1024
1038
|
};
|
|
1025
1039
|
var RetrieveRunResponse = zod.z.object({
|
|
1026
1040
|
...CommonRunFields,
|
|
@@ -1410,6 +1424,19 @@ var PlatformToProviderMessages = {
|
|
|
1410
1424
|
projectId: zod.z.string(),
|
|
1411
1425
|
runId: zod.z.string()
|
|
1412
1426
|
})
|
|
1427
|
+
},
|
|
1428
|
+
PRE_PULL_DEPLOYMENT: {
|
|
1429
|
+
message: zod.z.object({
|
|
1430
|
+
version: zod.z.literal("v1").default("v1"),
|
|
1431
|
+
imageRef: zod.z.string(),
|
|
1432
|
+
shortCode: zod.z.string(),
|
|
1433
|
+
// identifiers
|
|
1434
|
+
envId: zod.z.string(),
|
|
1435
|
+
envType: EnvironmentType,
|
|
1436
|
+
orgId: zod.z.string(),
|
|
1437
|
+
projectId: zod.z.string(),
|
|
1438
|
+
deploymentId: zod.z.string()
|
|
1439
|
+
})
|
|
1413
1440
|
}
|
|
1414
1441
|
};
|
|
1415
1442
|
var CreateWorkerMessage = zod.z.object({
|
|
@@ -3296,6 +3323,15 @@ var _ApiClient = class _ApiClient {
|
|
|
3296
3323
|
body: JSON.stringify(body)
|
|
3297
3324
|
}, mergeRequestOptions(this.defaultRequestOptions, requestOptions));
|
|
3298
3325
|
}
|
|
3326
|
+
addTags(runId, body, requestOptions) {
|
|
3327
|
+
return zodfetch(zod.z.object({
|
|
3328
|
+
message: zod.z.string()
|
|
3329
|
+
}), `${this.baseUrl}/api/v1/runs/${runId}/tags`, {
|
|
3330
|
+
method: "POST",
|
|
3331
|
+
headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false),
|
|
3332
|
+
body: JSON.stringify(body)
|
|
3333
|
+
}, mergeRequestOptions(this.defaultRequestOptions, requestOptions));
|
|
3334
|
+
}
|
|
3299
3335
|
createSchedule(options, requestOptions) {
|
|
3300
3336
|
return zodfetch(ScheduleObject, `${this.baseUrl}/api/v1/schedules`, {
|
|
3301
3337
|
method: "POST",
|
|
@@ -3423,6 +3459,9 @@ function createSearchQueryForListRuns(query) {
|
|
|
3423
3459
|
if (query.bulkAction) {
|
|
3424
3460
|
searchParams.append("filter[bulkAction]", query.bulkAction);
|
|
3425
3461
|
}
|
|
3462
|
+
if (query.tag) {
|
|
3463
|
+
searchParams.append("filter[tag]", Array.isArray(query.tag) ? query.tag.join(",") : query.tag);
|
|
3464
|
+
}
|
|
3426
3465
|
if (query.schedule) {
|
|
3427
3466
|
searchParams.append("filter[schedule]", query.schedule);
|
|
3428
3467
|
}
|
|
@@ -4489,6 +4528,7 @@ function safeJsonParse2(value) {
|
|
|
4489
4528
|
__name(safeJsonParse2, "safeJsonParse");
|
|
4490
4529
|
|
|
4491
4530
|
exports.AbortTaskRunError = AbortTaskRunError;
|
|
4531
|
+
exports.AddTagsRequestBody = AddTagsRequestBody;
|
|
4492
4532
|
exports.ApiClient = ApiClient;
|
|
4493
4533
|
exports.ApiConnectionError = ApiConnectionError;
|
|
4494
4534
|
exports.ApiError = ApiError;
|
|
@@ -4593,6 +4633,7 @@ exports.RetryOptions = RetryOptions;
|
|
|
4593
4633
|
exports.RunEnvironmentDetails = RunEnvironmentDetails;
|
|
4594
4634
|
exports.RunScheduleDetails = RunScheduleDetails;
|
|
4595
4635
|
exports.RunStatus = RunStatus;
|
|
4636
|
+
exports.RunTags = RunTags;
|
|
4596
4637
|
exports.ScheduleGenerator = ScheduleGenerator;
|
|
4597
4638
|
exports.ScheduleMetadata = ScheduleMetadata;
|
|
4598
4639
|
exports.ScheduleObject = ScheduleObject;
|