@trigger.dev/sdk 0.0.0-prerelease-20241119153006 → 0.0.0-prerelease-20241128175530

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.
@@ -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,qCAQmB;AAPjB,+FAAA,IAAI,OAAA;AAQN,kEAAkD;AAClD,wDAAwC;AAGxC,qCAA4C;AAAnC,oGAAA,SAAS,OAAA;AAAE,+FAAA,IAAI,OAAA"}
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,155 +27,244 @@ 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: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
30
- id: string;
30
+ taskIdentifier: string;
31
+ idempotencyKey?: string | undefined;
32
+ ttl?: string | undefined;
33
+ tags: string[];
34
+ metadata?: Record<string, any> | undefined;
31
35
  error?: {
32
36
  message: string;
33
37
  name?: string | undefined;
34
38
  stackTrace?: string | undefined;
35
39
  } | undefined;
36
- idempotencyKey?: string | undefined;
37
- startedAt?: Date | undefined;
38
- updatedAt: Date;
39
- isTest: boolean;
40
- version?: string | undefined;
41
- metadata?: Record<string, any> | undefined;
42
- 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
- durationMs: number;
69
- costInCents: number;
70
- baseCostInCents: number;
71
- attemptCount: number;
72
- depth: number;
73
- triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
74
- isQueued: boolean;
75
- isExecuting: boolean;
76
- isCompleted: boolean;
77
- isSuccess: boolean;
78
- isFailed: boolean;
79
- isCancelled: boolean;
40
+ id: string;
41
+ status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
80
42
  relatedRuns: {
81
43
  root?: {
82
- status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
83
44
  id: string;
84
- updatedAt: Date;
85
- isTest: boolean;
86
- createdAt: Date;
45
+ status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
87
46
  tags: string[];
88
- durationMs: number;
89
- costInCents: number;
90
- baseCostInCents: number;
91
47
  taskIdentifier: string;
92
48
  depth: number;
93
- triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
49
+ triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
94
50
  isQueued: boolean;
95
51
  isExecuting: boolean;
96
52
  isCompleted: boolean;
97
53
  isSuccess: boolean;
98
54
  isFailed: boolean;
99
55
  isCancelled: boolean;
100
- metadata?: Record<string, any> | undefined;
101
- version?: string | undefined;
102
- startedAt?: Date | undefined;
56
+ isTest: boolean;
57
+ createdAt: Date;
58
+ updatedAt: Date;
59
+ costInCents: number;
60
+ baseCostInCents: number;
61
+ durationMs: number;
103
62
  idempotencyKey?: string | undefined;
104
63
  ttl?: string | undefined;
64
+ metadata?: Record<string, any> | undefined;
105
65
  batchId?: string | undefined;
66
+ version?: string | undefined;
67
+ startedAt?: Date | undefined;
106
68
  finishedAt?: Date | undefined;
107
69
  delayedUntil?: Date | undefined;
108
70
  expiredAt?: Date | undefined;
109
71
  } | undefined;
110
72
  parent?: {
111
- status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
112
73
  id: string;
113
- updatedAt: Date;
114
- isTest: boolean;
115
- createdAt: Date;
74
+ status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
116
75
  tags: string[];
117
- durationMs: number;
118
- costInCents: number;
119
- baseCostInCents: number;
120
76
  taskIdentifier: string;
121
77
  depth: number;
122
- triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
78
+ triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
123
79
  isQueued: boolean;
124
80
  isExecuting: boolean;
125
81
  isCompleted: boolean;
126
82
  isSuccess: boolean;
127
83
  isFailed: boolean;
128
84
  isCancelled: boolean;
129
- metadata?: Record<string, any> | undefined;
130
- version?: string | undefined;
131
- startedAt?: Date | undefined;
85
+ isTest: boolean;
86
+ createdAt: Date;
87
+ updatedAt: Date;
88
+ costInCents: number;
89
+ baseCostInCents: number;
90
+ durationMs: number;
132
91
  idempotencyKey?: string | undefined;
133
92
  ttl?: string | undefined;
93
+ metadata?: Record<string, any> | undefined;
134
94
  batchId?: string | undefined;
95
+ version?: string | undefined;
96
+ startedAt?: Date | undefined;
135
97
  finishedAt?: Date | undefined;
136
98
  delayedUntil?: Date | undefined;
137
99
  expiredAt?: Date | undefined;
138
100
  } | undefined;
139
101
  children?: {
140
- status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
141
102
  id: string;
142
- updatedAt: Date;
143
- isTest: boolean;
144
- createdAt: Date;
103
+ status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
145
104
  tags: string[];
146
- durationMs: number;
147
- costInCents: number;
148
- baseCostInCents: number;
149
105
  taskIdentifier: string;
150
106
  depth: number;
151
- triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
107
+ triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
152
108
  isQueued: boolean;
153
109
  isExecuting: boolean;
154
110
  isCompleted: boolean;
155
111
  isSuccess: boolean;
156
112
  isFailed: boolean;
157
113
  isCancelled: boolean;
158
- metadata?: Record<string, any> | undefined;
159
- version?: string | undefined;
160
- startedAt?: Date | undefined;
114
+ isTest: boolean;
115
+ createdAt: Date;
116
+ updatedAt: Date;
117
+ costInCents: number;
118
+ baseCostInCents: number;
119
+ durationMs: number;
161
120
  idempotencyKey?: string | undefined;
162
121
  ttl?: string | undefined;
122
+ metadata?: Record<string, any> | undefined;
163
123
  batchId?: string | undefined;
124
+ version?: string | undefined;
125
+ startedAt?: Date | undefined;
164
126
  finishedAt?: Date | undefined;
165
127
  delayedUntil?: Date | undefined;
166
128
  expiredAt?: Date | undefined;
167
129
  }[] | undefined;
168
130
  };
169
- ttl?: string | undefined;
131
+ depth: number;
132
+ triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
133
+ isQueued: boolean;
134
+ isExecuting: boolean;
135
+ isCompleted: boolean;
136
+ isSuccess: boolean;
137
+ isFailed: boolean;
138
+ isCancelled: boolean;
139
+ isTest: boolean;
140
+ createdAt: Date;
141
+ updatedAt: Date;
142
+ costInCents: number;
143
+ baseCostInCents: number;
144
+ durationMs: number;
145
+ attempts: ({
146
+ id: string;
147
+ status: "EXECUTING" | "COMPLETED" | "CANCELED" | "FAILED" | "PENDING" | "PAUSED";
148
+ createdAt: Date;
149
+ updatedAt: Date;
150
+ error?: {
151
+ message: string;
152
+ name?: string | undefined;
153
+ stackTrace?: string | undefined;
154
+ } | undefined;
155
+ startedAt?: Date | undefined;
156
+ completedAt?: Date | undefined;
157
+ } | undefined)[];
158
+ attemptCount: number;
159
+ payloadPresignedUrl?: string | undefined;
160
+ outputPresignedUrl?: string | undefined;
161
+ schedule?: {
162
+ id: string;
163
+ generator: {
164
+ type: "CRON";
165
+ expression: string;
166
+ description: string;
167
+ };
168
+ externalId?: string | undefined;
169
+ deduplicationKey?: string | undefined;
170
+ } | undefined;
170
171
  batchId?: string | undefined;
172
+ version?: string | undefined;
173
+ startedAt?: Date | undefined;
171
174
  finishedAt?: Date | undefined;
172
175
  delayedUntil?: Date | undefined;
173
176
  expiredAt?: Date | undefined;
174
- payloadPresignedUrl?: string | undefined;
175
- outputPresignedUrl?: string | undefined;
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>>;
@@ -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":";;;AAcA,6CAY8B;AAC9B,gFAAuF;AAEvF,2CAAqC;AAWxB,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;CACvB,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,I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