@trigger.dev/core 3.0.0-beta.50 → 3.0.0-beta.51

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.
@@ -1,8 +1,8 @@
1
- import * as zod from 'zod';
2
1
  import { CursorPageParams, ApiRequestOptions, ZodFetchOptions, ApiPromise, CursorPagePromise, OffsetLimitPagePromise } from './zodfetch.mjs';
3
2
  export { APIHeaders, ApiConnectionError, ApiError, AuthenticationError, BadRequestError, ConflictError, CursorPage, CursorPageResponse, InternalServerError, NotFoundError, OffsetLimitPage, OffsetLimitPageParams, OffsetLimitPageResponse, Page, PageResponse, PermissionDeniedError, RateLimitError, UnprocessableEntityError, isRequestOptions } from './zodfetch.mjs';
4
- import { RunStatus, TriggerTaskRequestBody, BatchTriggerTaskRequestBody, ListRunResponseItem, RescheduleRunRequestBody, CreateScheduleOptions, ListScheduleOptions, UpdateScheduleOptions, CreateEnvironmentVariableRequestBody, UpdateEnvironmentVariableRequestBody, Accessory } from './schemas/index.mjs';
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, ScheduleGenerator, ScheduleObject, ScheduleType, ScheduledTaskPayload, SpanEvent, SpanEvents, SpanMessagingEvent, StartDeploymentIndexingRequestBody, StartDeploymentIndexingResponseBody, TaskEventStyle, TaskResource, TimezonesResult, TriggerTaskResponse, Variant, WhoAmIResponse, WhoAmIResponseSchema, isCancellationSpanEvent, isExceptionSpanEvent, stringPatternMatchers } from './schemas/index.mjs';
3
+ import { z } from 'zod';
4
+ import { RunStatus, TriggerTaskRequestBody, BatchTriggerTaskRequestBody, ListRunResponseItem, RescheduleRunRequestBody, AddTagsRequestBody, CreateScheduleOptions, ListScheduleOptions, UpdateScheduleOptions, CreateEnvironmentVariableRequestBody, UpdateEnvironmentVariableRequestBody, Accessory } from './schemas/index.mjs';
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.mjs';
6
6
  import { T as TaskRunExecutionResult, B as BatchTaskRunExecutionResult, a as TaskRunContext } from '../common-CLW82lkt.mjs';
7
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-CLW82lkt.mjs';
8
8
  import { C as Clock, a as ClockTime, b as TaskCatalog, T as TaskMetadataWithFunctions } from '../catalog-H7yFiZ60.mjs';
@@ -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<zod.ZodObject<{
216
- id: zod.ZodString;
217
- type: zod.ZodUnion<[zod.ZodLiteral<"DECLARATIVE">, zod.ZodLiteral<"IMPERATIVE">]>;
218
- task: zod.ZodString;
219
- active: zod.ZodBoolean;
220
- deduplicationKey: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
221
- externalId: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
222
- generator: zod.ZodObject<{
223
- type: zod.ZodLiteral<"CRON">;
224
- expression: zod.ZodString;
225
- description: zod.ZodString;
226
- }, "strip", zod.ZodTypeAny, {
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: zod.ZodString;
236
- nextRun: zod.ZodOptional<zod.ZodNullable<zod.ZodDate>>;
237
- environments: zod.ZodArray<zod.ZodObject<{
238
- id: zod.ZodString;
239
- type: zod.ZodString;
240
- userName: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
241
- }, "strip", zod.ZodTypeAny, {
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", zod.ZodTypeAny, {
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 };
@@ -1,8 +1,8 @@
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 { RunStatus, TriggerTaskRequestBody, BatchTriggerTaskRequestBody, ListRunResponseItem, RescheduleRunRequestBody, 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, ScheduleGenerator, ScheduleObject, ScheduleType, ScheduledTaskPayload, SpanEvent, SpanEvents, SpanMessagingEvent, StartDeploymentIndexingRequestBody, StartDeploymentIndexingResponseBody, TaskEventStyle, TaskResource, TimezonesResult, TriggerTaskResponse, Variant, WhoAmIResponse, WhoAmIResponseSchema, isCancellationSpanEvent, isExceptionSpanEvent, stringPatternMatchers } from './schemas/index.js';
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
6
  import { T as TaskRunExecutionResult, B as BatchTaskRunExecutionResult, a as TaskRunContext } from '../common-CLW82lkt.js';
7
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-CLW82lkt.js';
8
8
  import { C as Clock, a as ClockTime, b as TaskCatalog, T as TaskMetadataWithFunctions } from '../catalog-h79CG5Wy.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<zod.ZodObject<{
216
- id: zod.ZodString;
217
- type: zod.ZodUnion<[zod.ZodLiteral<"DECLARATIVE">, zod.ZodLiteral<"IMPERATIVE">]>;
218
- task: zod.ZodString;
219
- active: zod.ZodBoolean;
220
- deduplicationKey: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
221
- externalId: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
222
- generator: zod.ZodObject<{
223
- type: zod.ZodLiteral<"CRON">;
224
- expression: zod.ZodString;
225
- description: zod.ZodString;
226
- }, "strip", zod.ZodTypeAny, {
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: zod.ZodString;
236
- nextRun: zod.ZodOptional<zod.ZodNullable<zod.ZodDate>>;
237
- environments: zod.ZodArray<zod.ZodObject<{
238
- id: zod.ZodString;
239
- type: zod.ZodString;
240
- userName: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
241
- }, "strip", zod.ZodTypeAny, {
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", zod.ZodTypeAny, {
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.50";
36
+ var version = "3.0.0-beta.51";
37
37
  var dependencies = {
38
38
  "@google-cloud/precise-date": "^4.0.0",
39
39
  "@opentelemetry/api": "^1.8.0",
@@ -717,6 +717,11 @@ var CreateBackgroundWorkerResponse = zod.z.object({
717
717
  version: zod.z.string(),
718
718
  contentHash: zod.z.string()
719
719
  });
720
+ var RunTag = zod.z.string().max(64, "Tags must be less than 64 characters");
721
+ var RunTags = zod.z.union([
722
+ RunTag,
723
+ RunTag.array().max(3, "You can only set a maximum of 3 tags on a run.")
724
+ ]);
720
725
  var TriggerTaskRequestBody = zod.z.object({
721
726
  payload: zod.z.any(),
722
727
  context: zod.z.any(),
@@ -731,6 +736,7 @@ var TriggerTaskRequestBody = zod.z.object({
731
736
  payloadType: zod.z.string().optional(),
732
737
  delay: zod.z.string().or(zod.z.coerce.date()).optional(),
733
738
  ttl: zod.z.string().or(zod.z.number().nonnegative().int()).optional(),
739
+ tags: RunTags.optional(),
734
740
  maxAttempts: zod.z.number().int().optional()
735
741
  }).optional()
736
742
  });
@@ -758,6 +764,9 @@ var GetBatchResponseBody = zod.z.object({
758
764
  ])
759
765
  }))
760
766
  });
767
+ var AddTagsRequestBody = zod.z.object({
768
+ tags: RunTags
769
+ });
761
770
  var RescheduleRunRequestBody = zod.z.object({
762
771
  delay: zod.z.string().or(zod.z.coerce.date())
763
772
  });
@@ -1020,7 +1029,11 @@ var CommonRunFields = {
1020
1029
  finishedAt: zod.z.coerce.date().optional(),
1021
1030
  delayedUntil: zod.z.coerce.date().optional(),
1022
1031
  ttl: zod.z.string().optional(),
1023
- expiredAt: zod.z.coerce.date().optional()
1032
+ expiredAt: zod.z.coerce.date().optional(),
1033
+ tags: zod.z.string().array(),
1034
+ costInCents: zod.z.number(),
1035
+ baseCostInCents: zod.z.number(),
1036
+ durationMs: zod.z.number()
1024
1037
  };
1025
1038
  var RetrieveRunResponse = zod.z.object({
1026
1039
  ...CommonRunFields,
@@ -3296,6 +3309,15 @@ var _ApiClient = class _ApiClient {
3296
3309
  body: JSON.stringify(body)
3297
3310
  }, mergeRequestOptions(this.defaultRequestOptions, requestOptions));
3298
3311
  }
3312
+ addTags(runId, body, requestOptions) {
3313
+ return zodfetch(zod.z.object({
3314
+ message: zod.z.string()
3315
+ }), `${this.baseUrl}/api/v1/runs/${runId}/tags`, {
3316
+ method: "POST",
3317
+ headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false),
3318
+ body: JSON.stringify(body)
3319
+ }, mergeRequestOptions(this.defaultRequestOptions, requestOptions));
3320
+ }
3299
3321
  createSchedule(options, requestOptions) {
3300
3322
  return zodfetch(ScheduleObject, `${this.baseUrl}/api/v1/schedules`, {
3301
3323
  method: "POST",
@@ -3423,6 +3445,9 @@ function createSearchQueryForListRuns(query) {
3423
3445
  if (query.bulkAction) {
3424
3446
  searchParams.append("filter[bulkAction]", query.bulkAction);
3425
3447
  }
3448
+ if (query.tag) {
3449
+ searchParams.append("filter[tag]", Array.isArray(query.tag) ? query.tag.join(",") : query.tag);
3450
+ }
3426
3451
  if (query.schedule) {
3427
3452
  searchParams.append("filter[schedule]", query.schedule);
3428
3453
  }
@@ -4489,6 +4514,7 @@ function safeJsonParse2(value) {
4489
4514
  __name(safeJsonParse2, "safeJsonParse");
4490
4515
 
4491
4516
  exports.AbortTaskRunError = AbortTaskRunError;
4517
+ exports.AddTagsRequestBody = AddTagsRequestBody;
4492
4518
  exports.ApiClient = ApiClient;
4493
4519
  exports.ApiConnectionError = ApiConnectionError;
4494
4520
  exports.ApiError = ApiError;
@@ -4593,6 +4619,7 @@ exports.RetryOptions = RetryOptions;
4593
4619
  exports.RunEnvironmentDetails = RunEnvironmentDetails;
4594
4620
  exports.RunScheduleDetails = RunScheduleDetails;
4595
4621
  exports.RunStatus = RunStatus;
4622
+ exports.RunTags = RunTags;
4596
4623
  exports.ScheduleGenerator = ScheduleGenerator;
4597
4624
  exports.ScheduleMetadata = ScheduleMetadata;
4598
4625
  exports.ScheduleObject = ScheduleObject;