@trigger.dev/sdk 0.0.0-prerelease-20241119153006 → 0.0.0-prerelease-20241128131418
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/commonjs/triggers/invokeTrigger.d.ts +1 -1
- package/dist/commonjs/types.d.ts +6 -6
- package/dist/commonjs/v3/batch.d.ts +28 -0
- package/dist/commonjs/v3/batch.js +52 -0
- package/dist/commonjs/v3/batch.js.map +1 -0
- package/dist/commonjs/v3/index.d.ts +2 -1
- package/dist/commonjs/v3/index.js +1 -0
- package/dist/commonjs/v3/index.js.map +1 -1
- package/dist/commonjs/v3/runs.d.ts +150 -60
- package/dist/commonjs/v3/runs.js +93 -0
- package/dist/commonjs/v3/runs.js.map +1 -1
- package/dist/commonjs/v3/shared.d.ts +300 -8
- package/dist/commonjs/v3/shared.js +618 -100
- package/dist/commonjs/v3/shared.js.map +1 -1
- package/dist/commonjs/v3/tasks.d.ts +2 -2
- package/dist/commonjs/v3/tasks.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/esm/v3/batch.d.ts +28 -0
- package/dist/esm/v3/batch.js +49 -0
- package/dist/esm/v3/batch.js.map +1 -0
- package/dist/esm/v3/index.d.ts +2 -1
- package/dist/esm/v3/index.js +1 -0
- package/dist/esm/v3/index.js.map +1 -1
- package/dist/esm/v3/runs.d.ts +156 -66
- package/dist/esm/v3/runs.js +93 -0
- package/dist/esm/v3/runs.js.map +1 -1
- package/dist/esm/v3/shared.d.ts +300 -8
- package/dist/esm/v3/shared.js +615 -101
- package/dist/esm/v3/shared.js.map +1 -1
- package/dist/esm/v3/tasks.d.ts +2 -2
- package/dist/esm/v3/tasks.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +3 -3
package/dist/commonjs/types.d.ts
CHANGED
|
@@ -116,13 +116,13 @@ export declare const EventSpecificationExampleSchema: z.ZodObject<{
|
|
|
116
116
|
icon: z.ZodOptional<z.ZodString>;
|
|
117
117
|
payload: z.ZodAny;
|
|
118
118
|
}, "strip", z.ZodTypeAny, {
|
|
119
|
-
name: string;
|
|
120
119
|
id: string;
|
|
120
|
+
name: string;
|
|
121
121
|
icon?: string | undefined;
|
|
122
122
|
payload?: any;
|
|
123
123
|
}, {
|
|
124
|
-
name: string;
|
|
125
124
|
id: string;
|
|
125
|
+
name: string;
|
|
126
126
|
icon?: string | undefined;
|
|
127
127
|
payload?: any;
|
|
128
128
|
}>;
|
|
@@ -181,21 +181,21 @@ export declare function waitForEventSchema(schema: z.ZodTypeAny): z.ZodObject<{
|
|
|
181
181
|
context: z.ZodOptional<z.ZodAny>;
|
|
182
182
|
accountId: z.ZodOptional<z.ZodString>;
|
|
183
183
|
}, "strip", z.ZodTypeAny, {
|
|
184
|
+
id: string;
|
|
184
185
|
name: string;
|
|
185
186
|
source: string;
|
|
186
|
-
id: string;
|
|
187
187
|
timestamp: Date;
|
|
188
188
|
payload?: any;
|
|
189
|
-
accountId?: string | undefined;
|
|
190
189
|
context?: any;
|
|
190
|
+
accountId?: string | undefined;
|
|
191
191
|
}, {
|
|
192
|
+
id: string;
|
|
192
193
|
name: string;
|
|
193
194
|
source: string;
|
|
194
|
-
id: string;
|
|
195
195
|
timestamp: Date;
|
|
196
196
|
payload?: any;
|
|
197
|
-
accountId?: string | undefined;
|
|
198
197
|
context?: any;
|
|
198
|
+
accountId?: string | undefined;
|
|
199
199
|
}>;
|
|
200
200
|
export type NotificationEvents = {
|
|
201
201
|
runSucceeeded: (notification: SuccessfulRunNotification<any>) => void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ApiPromise, ApiRequestOptions, RetrieveBatchResponse } from "@trigger.dev/core/v3";
|
|
2
|
+
import { batchTriggerById, batchTriggerByIdAndWait, batchTriggerTasks, batchTriggerAndWaitTasks } from "./shared.js";
|
|
3
|
+
export declare const batch: {
|
|
4
|
+
trigger: typeof batchTriggerById;
|
|
5
|
+
triggerAndWait: typeof batchTriggerByIdAndWait;
|
|
6
|
+
triggerByTask: typeof batchTriggerTasks;
|
|
7
|
+
triggerByTaskAndWait: typeof batchTriggerAndWaitTasks;
|
|
8
|
+
retrieve: typeof retrieveBatch;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Retrieves details about a specific batch by its ID.
|
|
12
|
+
*
|
|
13
|
+
* @param {string} batchId - The unique identifier of the batch to retrieve
|
|
14
|
+
* @param {ApiRequestOptions} [requestOptions] - Optional API request configuration options
|
|
15
|
+
* @returns {ApiPromise<RetrieveBatchResponse>} A promise that resolves with the batch details
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* // First trigger a batch
|
|
19
|
+
* const response = await batch.trigger([
|
|
20
|
+
* { id: "simple-task", payload: { message: "Hello, World!" } }
|
|
21
|
+
* ]);
|
|
22
|
+
*
|
|
23
|
+
* // Then retrieve the batch details
|
|
24
|
+
* const batchDetails = await batch.retrieve(response.batchId);
|
|
25
|
+
* console.log("batch", batchDetails);
|
|
26
|
+
*/
|
|
27
|
+
declare function retrieveBatch(batchId: string, requestOptions?: ApiRequestOptions): ApiPromise<RetrieveBatchResponse>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.batch = void 0;
|
|
4
|
+
const v3_1 = require("@trigger.dev/core/v3");
|
|
5
|
+
const shared_js_1 = require("./shared.js");
|
|
6
|
+
const tracer_js_1 = require("./tracer.js");
|
|
7
|
+
exports.batch = {
|
|
8
|
+
trigger: shared_js_1.batchTriggerById,
|
|
9
|
+
triggerAndWait: shared_js_1.batchTriggerByIdAndWait,
|
|
10
|
+
triggerByTask: shared_js_1.batchTriggerTasks,
|
|
11
|
+
triggerByTaskAndWait: shared_js_1.batchTriggerAndWaitTasks,
|
|
12
|
+
retrieve: retrieveBatch,
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Retrieves details about a specific batch by its ID.
|
|
16
|
+
*
|
|
17
|
+
* @param {string} batchId - The unique identifier of the batch to retrieve
|
|
18
|
+
* @param {ApiRequestOptions} [requestOptions] - Optional API request configuration options
|
|
19
|
+
* @returns {ApiPromise<RetrieveBatchResponse>} A promise that resolves with the batch details
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* // First trigger a batch
|
|
23
|
+
* const response = await batch.trigger([
|
|
24
|
+
* { id: "simple-task", payload: { message: "Hello, World!" } }
|
|
25
|
+
* ]);
|
|
26
|
+
*
|
|
27
|
+
* // Then retrieve the batch details
|
|
28
|
+
* const batchDetails = await batch.retrieve(response.batchId);
|
|
29
|
+
* console.log("batch", batchDetails);
|
|
30
|
+
*/
|
|
31
|
+
function retrieveBatch(batchId, requestOptions) {
|
|
32
|
+
const apiClient = v3_1.apiClientManager.clientOrThrow();
|
|
33
|
+
const $requestOptions = (0, v3_1.mergeRequestOptions)({
|
|
34
|
+
tracer: tracer_js_1.tracer,
|
|
35
|
+
name: "batch.retrieve()",
|
|
36
|
+
icon: "batch",
|
|
37
|
+
attributes: {
|
|
38
|
+
batchId: batchId,
|
|
39
|
+
...(0, v3_1.accessoryAttributes)({
|
|
40
|
+
items: [
|
|
41
|
+
{
|
|
42
|
+
text: batchId,
|
|
43
|
+
variant: "normal",
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
style: "codepath",
|
|
47
|
+
}),
|
|
48
|
+
},
|
|
49
|
+
}, requestOptions);
|
|
50
|
+
return apiClient.retrieveBatch(batchId, $requestOptions);
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=batch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch.js","sourceRoot":"","sources":["../../../src/v3/batch.ts"],"names":[],"mappings":";;;AAAA,6CAO8B;AAC9B,2CAKqB;AACrB,2CAAqC;AAExB,QAAA,KAAK,GAAG;IACnB,OAAO,EAAE,4BAAgB;IACzB,cAAc,EAAE,mCAAuB;IACvC,aAAa,EAAE,6BAAiB;IAChC,oBAAoB,EAAE,oCAAwB;IAC9C,QAAQ,EAAE,aAAa;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,SAAS,aAAa,CACpB,OAAe,EACf,cAAkC;IAElC,MAAM,SAAS,GAAG,qBAAgB,CAAC,aAAa,EAAE,CAAC;IAEnD,MAAM,eAAe,GAAG,IAAA,wBAAmB,EACzC;QACE,MAAM,EAAN,kBAAM;QACN,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,OAAO;QACb,UAAU,EAAE;YACV,OAAO,EAAE,OAAO;YAChB,GAAG,IAAA,wBAAmB,EAAC;gBACrB,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,OAAO;wBACb,OAAO,EAAE,QAAQ;qBAClB;iBACF;gBACD,KAAK,EAAE,UAAU;aAClB,CAAC;SACH;KACF,EACD,cAAc,CACf,CAAC;IAEF,OAAO,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -3,6 +3,7 @@ export * from "./config.js";
|
|
|
3
3
|
export { retry, type RetryOptions } from "./retry.js";
|
|
4
4
|
export { queue } from "./shared.js";
|
|
5
5
|
export * from "./tasks.js";
|
|
6
|
+
export * from "./batch.js";
|
|
6
7
|
export * from "./wait.js";
|
|
7
8
|
export * from "./waitUntil.js";
|
|
8
9
|
export * from "./usage.js";
|
|
@@ -16,7 +17,7 @@ import type { Context } from "./shared.js";
|
|
|
16
17
|
import type { ApiClientConfiguration } from "@trigger.dev/core/v3";
|
|
17
18
|
export type { ApiClientConfiguration };
|
|
18
19
|
export { ApiError, AuthenticationError, BadRequestError, ConflictError, InternalServerError, NotFoundError, PermissionDeniedError, RateLimitError, UnprocessableEntityError, AbortTaskRunError, logger, type LogLevel, } from "@trigger.dev/core/v3";
|
|
19
|
-
export { runs, type RunShape, type AnyRunShape, type TaskRunShape, type RealtimeRun, type RetrieveRunResult, type AnyRetrieveRunResult, } from "./runs.js";
|
|
20
|
+
export { runs, type RunShape, type AnyRunShape, type TaskRunShape, type RealtimeRun, type AnyRealtimeRun, type RetrieveRunResult, type AnyRetrieveRunResult, } from "./runs.js";
|
|
20
21
|
export * as schedules from "./schedules/index.js";
|
|
21
22
|
export * as envvars from "./envvars.js";
|
|
22
23
|
export type { ImportEnvironmentVariablesParams } from "./envvars.js";
|
|
@@ -34,6 +34,7 @@ Object.defineProperty(exports, "retry", { enumerable: true, get: function () { r
|
|
|
34
34
|
var shared_js_1 = require("./shared.js");
|
|
35
35
|
Object.defineProperty(exports, "queue", { enumerable: true, get: function () { return shared_js_1.queue; } });
|
|
36
36
|
__exportStar(require("./tasks.js"), exports);
|
|
37
|
+
__exportStar(require("./batch.js"), exports);
|
|
37
38
|
__exportStar(require("./wait.js"), exports);
|
|
38
39
|
__exportStar(require("./waitUntil.js"), exports);
|
|
39
40
|
__exportStar(require("./usage.js"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v3/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,8CAA4B;AAC5B,uCAAsD;AAA7C,iGAAA,KAAK,OAAA;AACd,yCAAoC;AAA3B,kGAAA,KAAK,OAAA;AACd,6CAA2B;AAC3B,4CAA0B;AAC1B,iDAA+B;AAC/B,6CAA2B;AAC3B,uDAAqC;AACrC,4CAA0B;AAC1B,gDAA8B;AAC9B,+CAA6B;AAC7B,iDAA+B;AAS/B,2CAa8B;AAZ5B,8FAAA,QAAQ,OAAA;AACR,yGAAA,mBAAmB,OAAA;AACnB,qGAAA,eAAe,OAAA;AACf,mGAAA,aAAa,OAAA;AACb,yGAAA,mBAAmB,OAAA;AACnB,mGAAA,aAAa,OAAA;AACb,2GAAA,qBAAqB,OAAA;AACrB,oGAAA,cAAc,OAAA;AACd,8GAAA,wBAAwB,OAAA;AACxB,uGAAA,iBAAiB,OAAA;AACjB,4FAAA,MAAM,OAAA;AAIR,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v3/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,8CAA4B;AAC5B,uCAAsD;AAA7C,iGAAA,KAAK,OAAA;AACd,yCAAoC;AAA3B,kGAAA,KAAK,OAAA;AACd,6CAA2B;AAC3B,6CAA2B;AAC3B,4CAA0B;AAC1B,iDAA+B;AAC/B,6CAA2B;AAC3B,uDAAqC;AACrC,4CAA0B;AAC1B,gDAA8B;AAC9B,+CAA6B;AAC7B,iDAA+B;AAS/B,2CAa8B;AAZ5B,8FAAA,QAAQ,OAAA;AACR,yGAAA,mBAAmB,OAAA;AACnB,qGAAA,eAAe,OAAA;AACf,mGAAA,aAAa,OAAA;AACb,yGAAA,mBAAmB,OAAA;AACnB,mGAAA,aAAa,OAAA;AACb,2GAAA,qBAAqB,OAAA;AACrB,oGAAA,cAAc,OAAA;AACd,8GAAA,wBAAwB,OAAA;AACxB,uGAAA,iBAAiB,OAAA;AACjB,4FAAA,MAAM,OAAA;AAIR,qCASmB;AARjB,+FAAA,IAAI,OAAA;AASN,kEAAkD;AAClD,wDAAwC;AAGxC,qCAA4C;AAAnC,oGAAA,SAAS,OAAA;AAAE,+FAAA,IAAI,OAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { AnyRetrieveRunResult, AnyRunShape, ApiRequestOptions, InferRunTypes, ListProjectRunsQueryParams, ListRunsQueryParams, RescheduleRunRequestBody, RetrieveRunResult, RunShape, RealtimeRun, RunSubscription, TaskRunShape } from "@trigger.dev/core/v3";
|
|
1
|
+
import type { AnyRetrieveRunResult, AnyRunShape, ApiRequestOptions, InferRunTypes, ListProjectRunsQueryParams, ListRunsQueryParams, RescheduleRunRequestBody, RetrieveRunResult, RunShape, RealtimeRun, AnyRealtimeRun, RunSubscription, TaskRunShape, AnyBatchedRunHandle } from "@trigger.dev/core/v3";
|
|
2
2
|
import { ApiPromise, CanceledRunResponse, CursorPagePromise, ListRunResponseItem, ReplayRunResponse, RetrieveRunResponse } from "@trigger.dev/core/v3";
|
|
3
3
|
import { AnyRunHandle, AnyTask } from "./shared.js";
|
|
4
|
-
export type { AnyRetrieveRunResult, AnyRunShape, RetrieveRunResult, RunShape, TaskRunShape, RealtimeRun, };
|
|
4
|
+
export type { AnyRetrieveRunResult, AnyRunShape, RetrieveRunResult, RunShape, TaskRunShape, RealtimeRun, AnyRealtimeRun, };
|
|
5
5
|
export declare const runs: {
|
|
6
6
|
replay: typeof replayRun;
|
|
7
7
|
cancel: typeof cancelRun;
|
|
@@ -11,12 +11,13 @@ export declare const runs: {
|
|
|
11
11
|
poll: typeof poll;
|
|
12
12
|
subscribeToRun: typeof subscribeToRun;
|
|
13
13
|
subscribeToRunsWithTag: typeof subscribeToRunsWithTag;
|
|
14
|
+
subscribeToBatch: typeof subscribeToRunsInBatch;
|
|
14
15
|
};
|
|
15
16
|
export type ListRunsItem = ListRunResponseItem;
|
|
16
17
|
declare function listRuns(projectRef: string, params?: ListProjectRunsQueryParams, requestOptions?: ApiRequestOptions): CursorPagePromise<typeof ListRunResponseItem>;
|
|
17
18
|
declare function listRuns(params?: ListRunsQueryParams, requestOptions?: ApiRequestOptions): CursorPagePromise<typeof ListRunResponseItem>;
|
|
18
|
-
type RunId<TRunId> = TRunId extends AnyRunHandle ? TRunId : TRunId extends AnyTask ? string : TRunId extends string ? TRunId : never;
|
|
19
|
-
declare function retrieveRun<TRunId extends AnyRunHandle | AnyTask | string>(runId: RunId<TRunId>, requestOptions?: ApiRequestOptions): ApiPromise<RetrieveRunResult<TRunId>>;
|
|
19
|
+
type RunId<TRunId> = TRunId extends AnyRunHandle | AnyBatchedRunHandle ? TRunId : TRunId extends AnyTask ? string : TRunId extends string ? TRunId : never;
|
|
20
|
+
declare function retrieveRun<TRunId extends AnyRunHandle | AnyBatchedRunHandle | AnyTask | string>(runId: RunId<TRunId>, requestOptions?: ApiRequestOptions): ApiPromise<RetrieveRunResult<TRunId>>;
|
|
20
21
|
declare function replayRun(runId: string, requestOptions?: ApiRequestOptions): ApiPromise<ReplayRunResponse>;
|
|
21
22
|
declare function cancelRun(runId: string, requestOptions?: ApiRequestOptions): ApiPromise<CanceledRunResponse>;
|
|
22
23
|
declare function rescheduleRun(runId: string, body: RescheduleRunRequestBody, requestOptions?: ApiRequestOptions): ApiPromise<RetrieveRunResponse>;
|
|
@@ -26,81 +27,48 @@ export type PollOptions = {
|
|
|
26
27
|
declare function poll<TRunId extends AnyRunHandle | AnyTask | string>(runId: RunId<TRunId>, options?: {
|
|
27
28
|
pollIntervalMs?: number;
|
|
28
29
|
}, requestOptions?: ApiRequestOptions): Promise<{
|
|
29
|
-
status: "
|
|
30
|
+
status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
30
31
|
id: string;
|
|
31
|
-
|
|
32
|
-
message: string;
|
|
33
|
-
name?: string | undefined;
|
|
34
|
-
stackTrace?: string | undefined;
|
|
35
|
-
} | undefined;
|
|
36
|
-
idempotencyKey?: string | undefined;
|
|
37
|
-
startedAt?: Date | undefined;
|
|
38
|
-
updatedAt: Date;
|
|
32
|
+
tags: string[];
|
|
39
33
|
isTest: boolean;
|
|
40
|
-
version?: string | undefined;
|
|
41
|
-
metadata?: Record<string, any> | undefined;
|
|
42
34
|
createdAt: Date;
|
|
43
|
-
schedule?: {
|
|
44
|
-
id: string;
|
|
45
|
-
generator: {
|
|
46
|
-
type: "CRON";
|
|
47
|
-
description: string;
|
|
48
|
-
expression: string;
|
|
49
|
-
};
|
|
50
|
-
externalId?: string | undefined;
|
|
51
|
-
deduplicationKey?: string | undefined;
|
|
52
|
-
} | undefined;
|
|
53
|
-
tags: string[];
|
|
54
|
-
taskIdentifier: string;
|
|
55
|
-
attempts: ({
|
|
56
|
-
status: "PENDING" | "COMPLETED" | "CANCELED" | "EXECUTING" | "FAILED" | "PAUSED";
|
|
57
|
-
id: string;
|
|
58
|
-
updatedAt: Date;
|
|
59
|
-
createdAt: Date;
|
|
60
|
-
startedAt?: Date | undefined;
|
|
61
|
-
completedAt?: Date | undefined;
|
|
62
|
-
error?: {
|
|
63
|
-
message: string;
|
|
64
|
-
name?: string | undefined;
|
|
65
|
-
stackTrace?: string | undefined;
|
|
66
|
-
} | undefined;
|
|
67
|
-
} | undefined)[];
|
|
68
35
|
durationMs: number;
|
|
69
36
|
costInCents: number;
|
|
70
37
|
baseCostInCents: number;
|
|
71
|
-
|
|
38
|
+
taskIdentifier: string;
|
|
72
39
|
depth: number;
|
|
73
|
-
triggerFunction: "trigger" | "
|
|
40
|
+
triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
|
|
74
41
|
isQueued: boolean;
|
|
75
42
|
isExecuting: boolean;
|
|
76
43
|
isCompleted: boolean;
|
|
77
44
|
isSuccess: boolean;
|
|
78
45
|
isFailed: boolean;
|
|
79
46
|
isCancelled: boolean;
|
|
47
|
+
updatedAt: Date;
|
|
80
48
|
relatedRuns: {
|
|
81
49
|
root?: {
|
|
82
|
-
status: "
|
|
50
|
+
status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
83
51
|
id: string;
|
|
84
|
-
|
|
52
|
+
tags: string[];
|
|
85
53
|
isTest: boolean;
|
|
86
54
|
createdAt: Date;
|
|
87
|
-
tags: string[];
|
|
88
55
|
durationMs: number;
|
|
89
56
|
costInCents: number;
|
|
90
57
|
baseCostInCents: number;
|
|
91
58
|
taskIdentifier: string;
|
|
92
59
|
depth: number;
|
|
93
|
-
triggerFunction: "trigger" | "
|
|
60
|
+
triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
|
|
94
61
|
isQueued: boolean;
|
|
95
62
|
isExecuting: boolean;
|
|
96
63
|
isCompleted: boolean;
|
|
97
64
|
isSuccess: boolean;
|
|
98
65
|
isFailed: boolean;
|
|
99
66
|
isCancelled: boolean;
|
|
100
|
-
|
|
101
|
-
version?: string | undefined;
|
|
67
|
+
updatedAt: Date;
|
|
102
68
|
startedAt?: Date | undefined;
|
|
103
69
|
idempotencyKey?: string | undefined;
|
|
70
|
+
version?: string | undefined;
|
|
71
|
+
metadata?: Record<string, any> | undefined;
|
|
104
72
|
ttl?: string | undefined;
|
|
105
73
|
batchId?: string | undefined;
|
|
106
74
|
finishedAt?: Date | undefined;
|
|
@@ -108,28 +76,28 @@ declare function poll<TRunId extends AnyRunHandle | AnyTask | string>(runId: Run
|
|
|
108
76
|
expiredAt?: Date | undefined;
|
|
109
77
|
} | undefined;
|
|
110
78
|
parent?: {
|
|
111
|
-
status: "
|
|
79
|
+
status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
112
80
|
id: string;
|
|
113
|
-
|
|
81
|
+
tags: string[];
|
|
114
82
|
isTest: boolean;
|
|
115
83
|
createdAt: Date;
|
|
116
|
-
tags: string[];
|
|
117
84
|
durationMs: number;
|
|
118
85
|
costInCents: number;
|
|
119
86
|
baseCostInCents: number;
|
|
120
87
|
taskIdentifier: string;
|
|
121
88
|
depth: number;
|
|
122
|
-
triggerFunction: "trigger" | "
|
|
89
|
+
triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
|
|
123
90
|
isQueued: boolean;
|
|
124
91
|
isExecuting: boolean;
|
|
125
92
|
isCompleted: boolean;
|
|
126
93
|
isSuccess: boolean;
|
|
127
94
|
isFailed: boolean;
|
|
128
95
|
isCancelled: boolean;
|
|
129
|
-
|
|
130
|
-
version?: string | undefined;
|
|
96
|
+
updatedAt: Date;
|
|
131
97
|
startedAt?: Date | undefined;
|
|
132
98
|
idempotencyKey?: string | undefined;
|
|
99
|
+
version?: string | undefined;
|
|
100
|
+
metadata?: Record<string, any> | undefined;
|
|
133
101
|
ttl?: string | undefined;
|
|
134
102
|
batchId?: string | undefined;
|
|
135
103
|
finishedAt?: Date | undefined;
|
|
@@ -137,28 +105,28 @@ declare function poll<TRunId extends AnyRunHandle | AnyTask | string>(runId: Run
|
|
|
137
105
|
expiredAt?: Date | undefined;
|
|
138
106
|
} | undefined;
|
|
139
107
|
children?: {
|
|
140
|
-
status: "
|
|
108
|
+
status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
141
109
|
id: string;
|
|
142
|
-
|
|
110
|
+
tags: string[];
|
|
143
111
|
isTest: boolean;
|
|
144
112
|
createdAt: Date;
|
|
145
|
-
tags: string[];
|
|
146
113
|
durationMs: number;
|
|
147
114
|
costInCents: number;
|
|
148
115
|
baseCostInCents: number;
|
|
149
116
|
taskIdentifier: string;
|
|
150
117
|
depth: number;
|
|
151
|
-
triggerFunction: "trigger" | "
|
|
118
|
+
triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
|
|
152
119
|
isQueued: boolean;
|
|
153
120
|
isExecuting: boolean;
|
|
154
121
|
isCompleted: boolean;
|
|
155
122
|
isSuccess: boolean;
|
|
156
123
|
isFailed: boolean;
|
|
157
124
|
isCancelled: boolean;
|
|
158
|
-
|
|
159
|
-
version?: string | undefined;
|
|
125
|
+
updatedAt: Date;
|
|
160
126
|
startedAt?: Date | undefined;
|
|
161
127
|
idempotencyKey?: string | undefined;
|
|
128
|
+
version?: string | undefined;
|
|
129
|
+
metadata?: Record<string, any> | undefined;
|
|
162
130
|
ttl?: string | undefined;
|
|
163
131
|
batchId?: string | undefined;
|
|
164
132
|
finishedAt?: Date | undefined;
|
|
@@ -166,8 +134,41 @@ declare function poll<TRunId extends AnyRunHandle | AnyTask | string>(runId: Run
|
|
|
166
134
|
expiredAt?: Date | undefined;
|
|
167
135
|
}[] | undefined;
|
|
168
136
|
};
|
|
137
|
+
attempts: ({
|
|
138
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
139
|
+
id: string;
|
|
140
|
+
createdAt: Date;
|
|
141
|
+
updatedAt: Date;
|
|
142
|
+
startedAt?: Date | undefined;
|
|
143
|
+
error?: {
|
|
144
|
+
message: string;
|
|
145
|
+
name?: string | undefined;
|
|
146
|
+
stackTrace?: string | undefined;
|
|
147
|
+
} | undefined;
|
|
148
|
+
completedAt?: Date | undefined;
|
|
149
|
+
} | undefined)[];
|
|
150
|
+
attemptCount: number;
|
|
151
|
+
startedAt?: Date | undefined;
|
|
152
|
+
idempotencyKey?: string | undefined;
|
|
153
|
+
version?: string | undefined;
|
|
154
|
+
metadata?: Record<string, any> | undefined;
|
|
169
155
|
ttl?: string | undefined;
|
|
156
|
+
schedule?: {
|
|
157
|
+
id: string;
|
|
158
|
+
generator: {
|
|
159
|
+
type: "CRON";
|
|
160
|
+
description: string;
|
|
161
|
+
expression: string;
|
|
162
|
+
};
|
|
163
|
+
externalId?: string | undefined;
|
|
164
|
+
deduplicationKey?: string | undefined;
|
|
165
|
+
} | undefined;
|
|
170
166
|
batchId?: string | undefined;
|
|
167
|
+
error?: {
|
|
168
|
+
message: string;
|
|
169
|
+
name?: string | undefined;
|
|
170
|
+
stackTrace?: string | undefined;
|
|
171
|
+
} | undefined;
|
|
171
172
|
finishedAt?: Date | undefined;
|
|
172
173
|
delayedUntil?: Date | undefined;
|
|
173
174
|
expiredAt?: Date | undefined;
|
|
@@ -176,5 +177,94 @@ declare function poll<TRunId extends AnyRunHandle | AnyTask | string>(runId: Run
|
|
|
176
177
|
output?: InferRunTypes<TRunId>["output"] | undefined;
|
|
177
178
|
payload?: InferRunTypes<TRunId>["payload"] | undefined;
|
|
178
179
|
}>;
|
|
180
|
+
/**
|
|
181
|
+
* Subscribes to real-time updates for a specific run.
|
|
182
|
+
*
|
|
183
|
+
* This function allows you to receive real-time updates whenever a run changes, including:
|
|
184
|
+
* - Status changes in the run lifecycle
|
|
185
|
+
* - Tag additions or removals
|
|
186
|
+
* - Metadata updates
|
|
187
|
+
*
|
|
188
|
+
* @template TRunId - The type parameter extending AnyRunHandle, AnyTask, or string
|
|
189
|
+
* @param {RunId<TRunId>} runId - The ID of the run to subscribe to. Can be a string ID, RunHandle, or Task
|
|
190
|
+
* @returns {RunSubscription<InferRunTypes<TRunId>>} An async iterator that yields updated run objects
|
|
191
|
+
*
|
|
192
|
+
* @example
|
|
193
|
+
* ```ts
|
|
194
|
+
* // Subscribe using a run handle
|
|
195
|
+
* const handle = await tasks.trigger("my-task", { some: "data" });
|
|
196
|
+
* for await (const run of runs.subscribeToRun(handle.id)) {
|
|
197
|
+
* console.log("Run updated:", run);
|
|
198
|
+
* }
|
|
199
|
+
*
|
|
200
|
+
* // Subscribe with type safety
|
|
201
|
+
* for await (const run of runs.subscribeToRun<typeof myTask>(runId)) {
|
|
202
|
+
* console.log("Payload:", run.payload.some);
|
|
203
|
+
* if (run.output) {
|
|
204
|
+
* console.log("Output:", run.output);
|
|
205
|
+
* }
|
|
206
|
+
* }
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
179
209
|
declare function subscribeToRun<TRunId extends AnyRunHandle | AnyTask | string>(runId: RunId<TRunId>): RunSubscription<InferRunTypes<TRunId>>;
|
|
210
|
+
/**
|
|
211
|
+
* Subscribes to real-time updates for all runs that have specific tags.
|
|
212
|
+
*
|
|
213
|
+
* This function allows you to monitor multiple runs simultaneously by filtering on tags.
|
|
214
|
+
* You'll receive updates whenever any run with the specified tag(s) changes.
|
|
215
|
+
*
|
|
216
|
+
* @template TTasks - The type parameter extending AnyTask for type-safe payload and output
|
|
217
|
+
* @param {string | string[]} tag - A single tag or array of tags to filter runs
|
|
218
|
+
* @returns {RunSubscription<InferRunTypes<TTasks>>} An async iterator that yields updated run objects
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* ```ts
|
|
222
|
+
* // Subscribe to runs with a single tag
|
|
223
|
+
* for await (const run of runs.subscribeToRunsWithTag("user:1234")) {
|
|
224
|
+
* console.log("Run updated:", run);
|
|
225
|
+
* }
|
|
226
|
+
*
|
|
227
|
+
* // Subscribe with multiple tags and type safety
|
|
228
|
+
* for await (const run of runs.subscribeToRunsWithTag<typeof myTask | typeof otherTask>(["tag1", "tag2"])) {
|
|
229
|
+
* switch (run.taskIdentifier) {
|
|
230
|
+
* case "my-task":
|
|
231
|
+
* console.log("MyTask output:", run.output.foo);
|
|
232
|
+
* break;
|
|
233
|
+
* case "other-task":
|
|
234
|
+
* console.log("OtherTask output:", run.output.bar);
|
|
235
|
+
* break;
|
|
236
|
+
* }
|
|
237
|
+
* }
|
|
238
|
+
* ```
|
|
239
|
+
*/
|
|
180
240
|
declare function subscribeToRunsWithTag<TTasks extends AnyTask>(tag: string | string[]): RunSubscription<InferRunTypes<TTasks>>;
|
|
241
|
+
/**
|
|
242
|
+
* Subscribes to real-time updates for all runs within a specific batch.
|
|
243
|
+
*
|
|
244
|
+
* Use this function when you've triggered multiple runs using `batchTrigger` and want
|
|
245
|
+
* to monitor all runs in that batch. You'll receive updates whenever any run in the batch changes.
|
|
246
|
+
*
|
|
247
|
+
* @template TTasks - The type parameter extending AnyTask for type-safe payload and output
|
|
248
|
+
* @param {string} batchId - The ID of the batch to subscribe to
|
|
249
|
+
* @returns {RunSubscription<InferRunTypes<TTasks>>} An async iterator that yields updated run objects
|
|
250
|
+
*
|
|
251
|
+
* @example
|
|
252
|
+
* ```ts
|
|
253
|
+
* // Subscribe to all runs in a batch
|
|
254
|
+
* for await (const run of runs.subscribeToRunsInBatch("batch-123")) {
|
|
255
|
+
* console.log("Batch run updated:", run);
|
|
256
|
+
* }
|
|
257
|
+
*
|
|
258
|
+
* // Subscribe with type safety
|
|
259
|
+
* for await (const run of runs.subscribeToRunsInBatch<typeof myTask>("batch-123")) {
|
|
260
|
+
* console.log("Run payload:", run.payload);
|
|
261
|
+
* if (run.output) {
|
|
262
|
+
* console.log("Run output:", run.output);
|
|
263
|
+
* }
|
|
264
|
+
* }
|
|
265
|
+
* ```
|
|
266
|
+
*
|
|
267
|
+
* @note The run objects received will include standard fields like id, status, payload, output,
|
|
268
|
+
* createdAt, updatedAt, tags, and more. See the Run object documentation for full details.
|
|
269
|
+
*/
|
|
270
|
+
declare function subscribeToRunsInBatch<TTasks extends AnyTask>(batchId: string): RunSubscription<InferRunTypes<TTasks>>;
|
package/dist/commonjs/v3/runs.js
CHANGED
|
@@ -13,6 +13,7 @@ exports.runs = {
|
|
|
13
13
|
poll,
|
|
14
14
|
subscribeToRun,
|
|
15
15
|
subscribeToRunsWithTag,
|
|
16
|
+
subscribeToBatch: subscribeToRunsInBatch,
|
|
16
17
|
};
|
|
17
18
|
function listRuns(paramsOrProjectRef, paramsOrOptions, requestOptions) {
|
|
18
19
|
const apiClient = v3_1.apiClientManager.clientOrThrow();
|
|
@@ -195,13 +196,105 @@ async function poll(runId, options, requestOptions) {
|
|
|
195
196
|
}
|
|
196
197
|
throw new Error(`Run ${typeof runId === "string" ? runId : runId.id} did not complete after ${MAX_POLL_ATTEMPTS} attempts`);
|
|
197
198
|
}
|
|
199
|
+
/**
|
|
200
|
+
* Subscribes to real-time updates for a specific run.
|
|
201
|
+
*
|
|
202
|
+
* This function allows you to receive real-time updates whenever a run changes, including:
|
|
203
|
+
* - Status changes in the run lifecycle
|
|
204
|
+
* - Tag additions or removals
|
|
205
|
+
* - Metadata updates
|
|
206
|
+
*
|
|
207
|
+
* @template TRunId - The type parameter extending AnyRunHandle, AnyTask, or string
|
|
208
|
+
* @param {RunId<TRunId>} runId - The ID of the run to subscribe to. Can be a string ID, RunHandle, or Task
|
|
209
|
+
* @returns {RunSubscription<InferRunTypes<TRunId>>} An async iterator that yields updated run objects
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* ```ts
|
|
213
|
+
* // Subscribe using a run handle
|
|
214
|
+
* const handle = await tasks.trigger("my-task", { some: "data" });
|
|
215
|
+
* for await (const run of runs.subscribeToRun(handle.id)) {
|
|
216
|
+
* console.log("Run updated:", run);
|
|
217
|
+
* }
|
|
218
|
+
*
|
|
219
|
+
* // Subscribe with type safety
|
|
220
|
+
* for await (const run of runs.subscribeToRun<typeof myTask>(runId)) {
|
|
221
|
+
* console.log("Payload:", run.payload.some);
|
|
222
|
+
* if (run.output) {
|
|
223
|
+
* console.log("Output:", run.output);
|
|
224
|
+
* }
|
|
225
|
+
* }
|
|
226
|
+
* ```
|
|
227
|
+
*/
|
|
198
228
|
function subscribeToRun(runId) {
|
|
199
229
|
const $runId = typeof runId === "string" ? runId : runId.id;
|
|
200
230
|
const apiClient = v3_1.apiClientManager.clientOrThrow();
|
|
201
231
|
return apiClient.subscribeToRun($runId);
|
|
202
232
|
}
|
|
233
|
+
/**
|
|
234
|
+
* Subscribes to real-time updates for all runs that have specific tags.
|
|
235
|
+
*
|
|
236
|
+
* This function allows you to monitor multiple runs simultaneously by filtering on tags.
|
|
237
|
+
* You'll receive updates whenever any run with the specified tag(s) changes.
|
|
238
|
+
*
|
|
239
|
+
* @template TTasks - The type parameter extending AnyTask for type-safe payload and output
|
|
240
|
+
* @param {string | string[]} tag - A single tag or array of tags to filter runs
|
|
241
|
+
* @returns {RunSubscription<InferRunTypes<TTasks>>} An async iterator that yields updated run objects
|
|
242
|
+
*
|
|
243
|
+
* @example
|
|
244
|
+
* ```ts
|
|
245
|
+
* // Subscribe to runs with a single tag
|
|
246
|
+
* for await (const run of runs.subscribeToRunsWithTag("user:1234")) {
|
|
247
|
+
* console.log("Run updated:", run);
|
|
248
|
+
* }
|
|
249
|
+
*
|
|
250
|
+
* // Subscribe with multiple tags and type safety
|
|
251
|
+
* for await (const run of runs.subscribeToRunsWithTag<typeof myTask | typeof otherTask>(["tag1", "tag2"])) {
|
|
252
|
+
* switch (run.taskIdentifier) {
|
|
253
|
+
* case "my-task":
|
|
254
|
+
* console.log("MyTask output:", run.output.foo);
|
|
255
|
+
* break;
|
|
256
|
+
* case "other-task":
|
|
257
|
+
* console.log("OtherTask output:", run.output.bar);
|
|
258
|
+
* break;
|
|
259
|
+
* }
|
|
260
|
+
* }
|
|
261
|
+
* ```
|
|
262
|
+
*/
|
|
203
263
|
function subscribeToRunsWithTag(tag) {
|
|
204
264
|
const apiClient = v3_1.apiClientManager.clientOrThrow();
|
|
205
265
|
return apiClient.subscribeToRunsWithTag(tag);
|
|
206
266
|
}
|
|
267
|
+
/**
|
|
268
|
+
* Subscribes to real-time updates for all runs within a specific batch.
|
|
269
|
+
*
|
|
270
|
+
* Use this function when you've triggered multiple runs using `batchTrigger` and want
|
|
271
|
+
* to monitor all runs in that batch. You'll receive updates whenever any run in the batch changes.
|
|
272
|
+
*
|
|
273
|
+
* @template TTasks - The type parameter extending AnyTask for type-safe payload and output
|
|
274
|
+
* @param {string} batchId - The ID of the batch to subscribe to
|
|
275
|
+
* @returns {RunSubscription<InferRunTypes<TTasks>>} An async iterator that yields updated run objects
|
|
276
|
+
*
|
|
277
|
+
* @example
|
|
278
|
+
* ```ts
|
|
279
|
+
* // Subscribe to all runs in a batch
|
|
280
|
+
* for await (const run of runs.subscribeToRunsInBatch("batch-123")) {
|
|
281
|
+
* console.log("Batch run updated:", run);
|
|
282
|
+
* }
|
|
283
|
+
*
|
|
284
|
+
* // Subscribe with type safety
|
|
285
|
+
* for await (const run of runs.subscribeToRunsInBatch<typeof myTask>("batch-123")) {
|
|
286
|
+
* console.log("Run payload:", run.payload);
|
|
287
|
+
* if (run.output) {
|
|
288
|
+
* console.log("Run output:", run.output);
|
|
289
|
+
* }
|
|
290
|
+
* }
|
|
291
|
+
* ```
|
|
292
|
+
*
|
|
293
|
+
* @note The run objects received will include standard fields like id, status, payload, output,
|
|
294
|
+
* createdAt, updatedAt, tags, and more. See the Run object documentation for full details.
|
|
295
|
+
*/
|
|
296
|
+
function subscribeToRunsInBatch(batchId) {
|
|
297
|
+
const apiClient = v3_1.apiClientManager.clientOrThrow();
|
|
298
|
+
return apiClient.subscribeToBatch(batchId);
|
|
299
|
+
}
|
|
207
300
|
//# sourceMappingURL=runs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs.js","sourceRoot":"","sources":["../../../src/v3/runs.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"runs.js","sourceRoot":"","sources":["../../../src/v3/runs.ts"],"names":[],"mappings":";;;AAgBA,6CAY8B;AAC9B,gFAAuF;AAEvF,2CAAqC;AAYxB,QAAA,IAAI,GAAG;IAClB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,WAAW;IACrB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,aAAa;IACzB,IAAI;IACJ,cAAc;IACd,sBAAsB;IACtB,gBAAgB,EAAE,sBAAsB;CACzC,CAAC;AAaF,SAAS,QAAQ,CACf,kBAAiD,EACjD,eAAsF,EACtF,cAAkC;IAElC,MAAM,SAAS,GAAG,qBAAgB,CAAC,aAAa,EAAE,CAAC;IAEnD,MAAM,eAAe,GAAG,sBAAsB,CAC5C,kBAAkB,EAClB,eAAe,EACf,cAAc,CACf,CAAC;IAEF,IAAI,OAAO,kBAAkB,KAAK,QAAQ,EAAE,CAAC;QAC3C,IAAI,IAAA,qBAAgB,EAAC,eAAe,CAAC,EAAE,CAAC;YACtC,OAAO,SAAS,CAAC,eAAe,CAAC,kBAAkB,EAAE,EAAE,EAAE,eAAe,CAAC,CAAC;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