@trigger.dev/core 0.0.0-v3-prerelease-20240717092755 → 0.0.0-v3-prerelease-20240730135037
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-U7_q4XsM.d.mts → catalog-H7yFiZ60.d.mts} +1 -1
- package/dist/{catalog-bSnBE19I.d.ts → catalog-h79CG5Wy.d.ts} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/{messages-CHPNqMXf.d.mts → messages-mhHZiNGN.d.mts} +202 -9
- package/dist/{messages-CHPNqMXf.d.ts → messages-mhHZiNGN.d.ts} +202 -9
- 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-WHkFakb3.d.mts → schemas-C9ssfehv.d.mts} +47 -1
- package/dist/{schemas-WHkFakb3.d.ts → schemas-C9ssfehv.d.ts} +47 -1
- package/dist/v3/index.d.mts +49 -29
- package/dist/v3/index.d.ts +49 -29
- package/dist/v3/index.js +65 -9
- package/dist/v3/index.js.map +1 -1
- package/dist/v3/index.mjs +62 -10
- 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 +1 -1
- package/dist/v3/prod/index.d.ts +1 -1
- package/dist/v3/schemas/index.d.mts +166 -4
- package/dist/v3/schemas/index.d.ts +166 -4
- package/dist/v3/schemas/index.js +52 -8
- package/dist/v3/schemas/index.js.map +1 -1
- package/dist/v3/schemas/index.mjs +49 -9
- package/dist/v3/schemas/index.mjs.map +1 -1
- package/dist/v3/utils/ioSerialization.js +48 -4
- package/dist/v3/utils/ioSerialization.js.map +1 -1
- package/dist/v3/utils/ioSerialization.mjs +48 -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 +4 -4
- package/dist/v3/workers/index.d.ts +4 -4
- package/dist/v3/workers/index.js +48 -4
- package/dist/v3/workers/index.js.map +1 -1
- package/dist/v3/workers/index.mjs +48 -4
- 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-a39zAY3E.d.mts → api-Pl9fxB8v.d.mts} +153 -153
- package/dist/{api--StDLb4h.d.ts → api-sNoooMbT.d.ts} +153 -153
|
@@ -342,13 +342,18 @@ var QueueOptions = z.object({
|
|
|
342
342
|
/** @deprecated This feature is coming soon */
|
|
343
343
|
rateLimit: RateLimitOptions.optional()
|
|
344
344
|
});
|
|
345
|
+
var ScheduleMetadata = z.object({
|
|
346
|
+
cron: z.string(),
|
|
347
|
+
timezone: z.string()
|
|
348
|
+
});
|
|
345
349
|
var TaskMetadata = z.object({
|
|
346
350
|
id: z.string(),
|
|
347
351
|
packageVersion: z.string(),
|
|
348
352
|
queue: QueueOptions.optional(),
|
|
349
353
|
retry: RetryOptions.optional(),
|
|
350
354
|
machine: MachineConfig.optional(),
|
|
351
|
-
triggerSource: z.string().optional()
|
|
355
|
+
triggerSource: z.string().optional(),
|
|
356
|
+
schedule: ScheduleMetadata.optional()
|
|
352
357
|
});
|
|
353
358
|
var TaskFileMetadata = z.object({
|
|
354
359
|
filePath: z.string(),
|
|
@@ -361,6 +366,7 @@ var TaskMetadataWithFilePath = z.object({
|
|
|
361
366
|
retry: RetryOptions.optional(),
|
|
362
367
|
machine: MachineConfig.optional(),
|
|
363
368
|
triggerSource: z.string().optional(),
|
|
369
|
+
schedule: ScheduleMetadata.optional(),
|
|
364
370
|
filePath: z.string(),
|
|
365
371
|
exportName: z.string()
|
|
366
372
|
});
|
|
@@ -422,7 +428,8 @@ var TaskResource = z.object({
|
|
|
422
428
|
queue: QueueOptions.optional(),
|
|
423
429
|
retry: RetryOptions.optional(),
|
|
424
430
|
machine: MachineConfig.optional(),
|
|
425
|
-
triggerSource: z.string().optional()
|
|
431
|
+
triggerSource: z.string().optional(),
|
|
432
|
+
schedule: ScheduleMetadata.optional()
|
|
426
433
|
});
|
|
427
434
|
var BackgroundWorkerMetadata = z.object({
|
|
428
435
|
packageVersion: z.string(),
|
|
@@ -475,6 +482,11 @@ var CreateBackgroundWorkerResponse = z.object({
|
|
|
475
482
|
version: z.string(),
|
|
476
483
|
contentHash: z.string()
|
|
477
484
|
});
|
|
485
|
+
var RunTag = z.string().max(64, "Tags must be less than 64 characters");
|
|
486
|
+
var RunTags = z.union([
|
|
487
|
+
RunTag,
|
|
488
|
+
RunTag.array().max(3, "You can only set a maximum of 3 tags on a run.")
|
|
489
|
+
]);
|
|
478
490
|
var TriggerTaskRequestBody = z.object({
|
|
479
491
|
payload: z.any(),
|
|
480
492
|
context: z.any(),
|
|
@@ -489,6 +501,7 @@ var TriggerTaskRequestBody = z.object({
|
|
|
489
501
|
payloadType: z.string().optional(),
|
|
490
502
|
delay: z.string().or(z.coerce.date()).optional(),
|
|
491
503
|
ttl: z.string().or(z.number().nonnegative().int()).optional(),
|
|
504
|
+
tags: RunTags.optional(),
|
|
492
505
|
maxAttempts: z.number().int().optional()
|
|
493
506
|
}).optional()
|
|
494
507
|
});
|
|
@@ -516,6 +529,9 @@ var GetBatchResponseBody = z.object({
|
|
|
516
529
|
])
|
|
517
530
|
}))
|
|
518
531
|
});
|
|
532
|
+
var AddTagsRequestBody = z.object({
|
|
533
|
+
tags: RunTags
|
|
534
|
+
});
|
|
519
535
|
var RescheduleRunRequestBody = z.object({
|
|
520
536
|
delay: z.string().or(z.coerce.date())
|
|
521
537
|
});
|
|
@@ -590,10 +606,21 @@ var ReplayRunResponse = z.object({
|
|
|
590
606
|
var CanceledRunResponse = z.object({
|
|
591
607
|
id: z.string()
|
|
592
608
|
});
|
|
609
|
+
var ScheduleType = z.union([
|
|
610
|
+
z.literal("DECLARATIVE"),
|
|
611
|
+
z.literal("IMPERATIVE")
|
|
612
|
+
]);
|
|
593
613
|
var ScheduledTaskPayload = z.object({
|
|
594
614
|
/** The schedule id associated with this run (you can have many schedules for the same task).
|
|
595
615
|
You can use this to remove the schedule, update it, etc */
|
|
596
616
|
scheduleId: z.string(),
|
|
617
|
+
/** The type of schedule – `"DECLARATIVE"` or `"IMPERATIVE"`.
|
|
618
|
+
*
|
|
619
|
+
* **DECLARATIVE** – defined inline on your `schedules.task` using the `cron` property. They can only be created, updated or deleted by modifying the `cron` property on your task.
|
|
620
|
+
*
|
|
621
|
+
* **IMPERATIVE** – created using the `schedules.create` functions or in the dashboard.
|
|
622
|
+
*/
|
|
623
|
+
type: ScheduleType,
|
|
597
624
|
/** When the task was scheduled to run.
|
|
598
625
|
* Note this will be slightly different from `new Date()` because it takes a few ms to run the task.
|
|
599
626
|
*
|
|
@@ -669,6 +696,7 @@ var ScheduleGenerator = z.object({
|
|
|
669
696
|
});
|
|
670
697
|
var ScheduleObject = z.object({
|
|
671
698
|
id: z.string(),
|
|
699
|
+
type: ScheduleType,
|
|
672
700
|
task: z.string(),
|
|
673
701
|
active: z.boolean(),
|
|
674
702
|
deduplicationKey: z.string().nullish(),
|
|
@@ -766,7 +794,11 @@ var CommonRunFields = {
|
|
|
766
794
|
finishedAt: z.coerce.date().optional(),
|
|
767
795
|
delayedUntil: z.coerce.date().optional(),
|
|
768
796
|
ttl: z.string().optional(),
|
|
769
|
-
expiredAt: z.coerce.date().optional()
|
|
797
|
+
expiredAt: z.coerce.date().optional(),
|
|
798
|
+
tags: z.string().array(),
|
|
799
|
+
costInCents: z.number(),
|
|
800
|
+
baseCostInCents: z.number(),
|
|
801
|
+
durationMs: z.number()
|
|
770
802
|
};
|
|
771
803
|
var RetrieveRunResponse = z.object({
|
|
772
804
|
...CommonRunFields,
|
|
@@ -1156,6 +1188,19 @@ var PlatformToProviderMessages = {
|
|
|
1156
1188
|
projectId: z.string(),
|
|
1157
1189
|
runId: z.string()
|
|
1158
1190
|
})
|
|
1191
|
+
},
|
|
1192
|
+
PRE_PULL_DEPLOYMENT: {
|
|
1193
|
+
message: z.object({
|
|
1194
|
+
version: z.literal("v1").default("v1"),
|
|
1195
|
+
imageRef: z.string(),
|
|
1196
|
+
shortCode: z.string(),
|
|
1197
|
+
// identifiers
|
|
1198
|
+
envId: z.string(),
|
|
1199
|
+
envType: EnvironmentType,
|
|
1200
|
+
orgId: z.string(),
|
|
1201
|
+
projectId: z.string(),
|
|
1202
|
+
deploymentId: z.string()
|
|
1203
|
+
})
|
|
1159
1204
|
}
|
|
1160
1205
|
};
|
|
1161
1206
|
var CreateWorkerMessage = z.object({
|
|
@@ -1404,11 +1449,6 @@ var ClientToSharedQueueMessages = {
|
|
|
1404
1449
|
backgroundWorkerId: z.string(),
|
|
1405
1450
|
data: BackgroundWorkerClientMessages
|
|
1406
1451
|
})
|
|
1407
|
-
},
|
|
1408
|
-
PING: {
|
|
1409
|
-
message: z.object({
|
|
1410
|
-
version: z.literal("v1").default("v1")
|
|
1411
|
-
})
|
|
1412
1452
|
}
|
|
1413
1453
|
};
|
|
1414
1454
|
var SharedQueueToClientMessages = {
|
|
@@ -1881,6 +1921,6 @@ var SpanMessagingEvent = z.object({
|
|
|
1881
1921
|
destination: z.string().optional()
|
|
1882
1922
|
});
|
|
1883
1923
|
|
|
1884
|
-
export { AttemptStatus, BackgroundWorkerClientMessages, BackgroundWorkerMetadata, BackgroundWorkerProperties, BackgroundWorkerServerMessages, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, BatchTriggerTaskResponse, CanceledRunResponse, CancellationSpanEvent, ClientToSharedQueueMessages, Config, CoordinatorSocketData, CoordinatorToPlatformMessages, CoordinatorToProdWorkerMessages, CreateAuthorizationCodeResponseSchema, CreateBackgroundWorkerRequestBody, CreateBackgroundWorkerResponse, CreateEnvironmentVariableRequestBody, CreateScheduleOptions, CreateUploadPayloadUrlResponseBody, DeletedScheduleObject, DeploymentErrorData, EnvironmentType, EnvironmentVariable, EnvironmentVariableResponseBody, EnvironmentVariableValue, EnvironmentVariables, EventFilter, ExceptionEventProperties, ExceptionSpanEvent, ExternalBuildData, FetchRetryBackoffStrategy, FetchRetryByStatusOptions, FetchRetryHeadersStrategy, FetchRetryOptions, FetchRetryStrategy, FetchTimeoutOptions, FixedWindowRateLimit, GetBatchResponseBody, GetDeploymentResponseBody, GetEnvironmentVariablesResponseBody, GetPersonalAccessTokenRequestSchema, GetPersonalAccessTokenResponseSchema, GetProjectEnvResponse, GetProjectResponseBody, GetProjectsResponseBody, ImageDetailsMetadata, ImportEnvironmentVariablesRequestBody, InitializeDeploymentRequestBody, InitializeDeploymentResponseBody, ListRunResponse, ListRunResponseItem, ListScheduleOptions, ListSchedulesResult, MachineConfig, MachineCpu, MachineMemory, MachinePreset, MachinePresetName, OtherSpanEvent, PRIMARY_VARIANT, PlatformToCoordinatorMessages, PlatformToProviderMessages, PostStartCauses, PreStopCauses, ProdChildToWorkerMessages, ProdTaskRunExecution, ProdTaskRunExecutionPayload, ProdWorkerSocketData, ProdWorkerToChildMessages, ProdWorkerToCoordinatorMessages, ProviderToPlatformMessages, QueueOptions, RateLimitOptions, ReplayRunResponse, RescheduleRunRequestBody, RetrieveRunResponse, RetryOptions, RunEnvironmentDetails, RunScheduleDetails, RunStatus, ScheduleGenerator, ScheduleObject, ScheduledTaskPayload, SharedQueueToClientMessages, SlidingWindowRateLimit, SpanEvent, SpanEvents, SpanMessagingEvent, StartDeploymentIndexingRequestBody, StartDeploymentIndexingResponseBody, TaskEventStyle, TaskFileMetadata, TaskMetadata, TaskMetadataFailedToParseData, TaskMetadataWithFilePath, TaskResource, TaskRun, TaskRunBuiltInError, TaskRunContext, TaskRunCustomErrorObject, TaskRunError, TaskRunErrorCodes, TaskRunExecution, TaskRunExecutionAttempt, TaskRunExecutionBatch, TaskRunExecutionEnvironment, TaskRunExecutionLazyAttemptPayload, TaskRunExecutionOrganization, TaskRunExecutionPayload, TaskRunExecutionProject, TaskRunExecutionQueue, TaskRunExecutionResult, TaskRunExecutionRetry, TaskRunExecutionTask, TaskRunExecutionUsage, TaskRunFailedExecutionResult, TaskRunInternalError, TaskRunStringError, TaskRunSuccessfulExecutionResult, TimezonesResult, TriggerTaskRequestBody, TriggerTaskResponse, UncaughtExceptionMessage, UpdateEnvironmentVariableRequestBody, UpdateScheduleOptions, WaitReason, WhoAmIResponseSchema, childToWorkerMessages, clientWebsocketMessages, isCancellationSpanEvent, isExceptionSpanEvent, serverWebsocketMessages, stringPatternMatchers, workerToChildMessages };
|
|
1924
|
+
export { AddTagsRequestBody, AttemptStatus, BackgroundWorkerClientMessages, BackgroundWorkerMetadata, BackgroundWorkerProperties, BackgroundWorkerServerMessages, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, BatchTriggerTaskResponse, CanceledRunResponse, CancellationSpanEvent, ClientToSharedQueueMessages, Config, CoordinatorSocketData, CoordinatorToPlatformMessages, CoordinatorToProdWorkerMessages, CreateAuthorizationCodeResponseSchema, CreateBackgroundWorkerRequestBody, CreateBackgroundWorkerResponse, CreateEnvironmentVariableRequestBody, CreateScheduleOptions, CreateUploadPayloadUrlResponseBody, DeletedScheduleObject, DeploymentErrorData, EnvironmentType, EnvironmentVariable, EnvironmentVariableResponseBody, EnvironmentVariableValue, EnvironmentVariables, EventFilter, ExceptionEventProperties, ExceptionSpanEvent, ExternalBuildData, FetchRetryBackoffStrategy, FetchRetryByStatusOptions, FetchRetryHeadersStrategy, FetchRetryOptions, FetchRetryStrategy, FetchTimeoutOptions, FixedWindowRateLimit, GetBatchResponseBody, GetDeploymentResponseBody, GetEnvironmentVariablesResponseBody, GetPersonalAccessTokenRequestSchema, GetPersonalAccessTokenResponseSchema, GetProjectEnvResponse, GetProjectResponseBody, GetProjectsResponseBody, ImageDetailsMetadata, ImportEnvironmentVariablesRequestBody, InitializeDeploymentRequestBody, InitializeDeploymentResponseBody, ListRunResponse, ListRunResponseItem, ListScheduleOptions, ListSchedulesResult, MachineConfig, MachineCpu, MachineMemory, MachinePreset, MachinePresetName, OtherSpanEvent, PRIMARY_VARIANT, PlatformToCoordinatorMessages, PlatformToProviderMessages, PostStartCauses, PreStopCauses, ProdChildToWorkerMessages, ProdTaskRunExecution, ProdTaskRunExecutionPayload, ProdWorkerSocketData, ProdWorkerToChildMessages, ProdWorkerToCoordinatorMessages, ProviderToPlatformMessages, QueueOptions, RateLimitOptions, ReplayRunResponse, RescheduleRunRequestBody, RetrieveRunResponse, RetryOptions, RunEnvironmentDetails, RunScheduleDetails, RunStatus, RunTags, ScheduleGenerator, ScheduleMetadata, ScheduleObject, ScheduleType, ScheduledTaskPayload, SharedQueueToClientMessages, SlidingWindowRateLimit, SpanEvent, SpanEvents, SpanMessagingEvent, StartDeploymentIndexingRequestBody, StartDeploymentIndexingResponseBody, TaskEventStyle, TaskFileMetadata, TaskMetadata, TaskMetadataFailedToParseData, TaskMetadataWithFilePath, TaskResource, TaskRun, TaskRunBuiltInError, TaskRunContext, TaskRunCustomErrorObject, TaskRunError, TaskRunErrorCodes, TaskRunExecution, TaskRunExecutionAttempt, TaskRunExecutionBatch, TaskRunExecutionEnvironment, TaskRunExecutionLazyAttemptPayload, TaskRunExecutionOrganization, TaskRunExecutionPayload, TaskRunExecutionProject, TaskRunExecutionQueue, TaskRunExecutionResult, TaskRunExecutionRetry, TaskRunExecutionTask, TaskRunExecutionUsage, TaskRunFailedExecutionResult, TaskRunInternalError, TaskRunStringError, TaskRunSuccessfulExecutionResult, TimezonesResult, TriggerTaskRequestBody, TriggerTaskResponse, UncaughtExceptionMessage, UpdateEnvironmentVariableRequestBody, UpdateScheduleOptions, WaitReason, WhoAmIResponseSchema, childToWorkerMessages, clientWebsocketMessages, isCancellationSpanEvent, isExceptionSpanEvent, serverWebsocketMessages, stringPatternMatchers, workerToChildMessages };
|
|
1885
1925
|
//# sourceMappingURL=out.js.map
|
|
1886
1926
|
//# sourceMappingURL=index.mjs.map
|