@trigger.dev/sdk 3.0.0-beta.2 → 3.0.0-beta.21
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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/v3/index.d.mts +184 -34
- package/dist/v3/index.d.ts +184 -34
- package/dist/v3/index.js +272 -85
- package/dist/v3/index.js.map +1 -1
- package/dist/v3/index.mjs +237 -89
- package/dist/v3/index.mjs.map +1 -1
- package/package.json +7 -14
package/dist/v3/index.js
CHANGED
|
@@ -8,51 +8,59 @@ var node_async_hooks = require('node:async_hooks');
|
|
|
8
8
|
var __defProp = Object.defineProperty;
|
|
9
9
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
10
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
11
|
+
var __export = (target, all) => {
|
|
12
|
+
for (var name in all)
|
|
13
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
14
|
+
};
|
|
11
15
|
var __publicField = (obj, key, value) => {
|
|
12
16
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
13
17
|
return value;
|
|
14
18
|
};
|
|
15
19
|
|
|
16
20
|
// package.json
|
|
17
|
-
var version = "3.0.0-beta.
|
|
21
|
+
var version = "3.0.0-beta.21";
|
|
18
22
|
var tracer = new v3.TriggerTracer({
|
|
19
23
|
name: "@trigger.dev/sdk",
|
|
20
24
|
version
|
|
21
25
|
});
|
|
22
26
|
|
|
23
27
|
// src/v3/shared.ts
|
|
28
|
+
function queue(options) {
|
|
29
|
+
return options;
|
|
30
|
+
}
|
|
31
|
+
__name(queue, "queue");
|
|
24
32
|
function createTask(params) {
|
|
25
|
-
const
|
|
26
|
-
|
|
33
|
+
const task3 = {
|
|
34
|
+
id: params.id,
|
|
35
|
+
trigger: async (payload, options) => {
|
|
27
36
|
const apiClient = v3.apiClientManager.client;
|
|
28
37
|
if (!apiClient) {
|
|
29
38
|
throw apiClientMissingError();
|
|
30
39
|
}
|
|
31
|
-
const taskMetadata = v3.
|
|
40
|
+
const taskMetadata = v3.taskCatalog.getTaskMetadata(params.id);
|
|
41
|
+
const payloadPacket = await v3.stringifyIO(payload);
|
|
32
42
|
const handle = await tracer.startActiveSpan(taskMetadata ? "Trigger" : `${params.id} trigger()`, async (span) => {
|
|
33
43
|
const response = await apiClient.triggerTask(params.id, {
|
|
34
|
-
payload,
|
|
44
|
+
payload: payloadPacket.data,
|
|
35
45
|
options: {
|
|
36
46
|
queue: params.queue,
|
|
37
47
|
concurrencyKey: options?.concurrencyKey,
|
|
38
|
-
test: v3.
|
|
48
|
+
test: v3.taskContext.ctx?.run.isTest,
|
|
49
|
+
payloadType: payloadPacket.dataType,
|
|
50
|
+
idempotencyKey: options?.idempotencyKey
|
|
39
51
|
}
|
|
40
52
|
}, {
|
|
41
53
|
spanParentAsLink: true
|
|
42
54
|
});
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
span.setAttribute("messaging.message.id", response.data.id);
|
|
47
|
-
return response.data;
|
|
55
|
+
span.setAttribute("messaging.message.id", response.id);
|
|
56
|
+
return response;
|
|
48
57
|
}, {
|
|
49
58
|
kind: api.SpanKind.PRODUCER,
|
|
50
59
|
attributes: {
|
|
51
60
|
[semanticConventions.SEMATTRS_MESSAGING_OPERATION]: "publish",
|
|
52
61
|
[v3.SemanticInternalAttributes.STYLE_ICON]: "trigger",
|
|
53
|
-
["messaging.client_id"]: v3.
|
|
62
|
+
["messaging.client_id"]: v3.taskContext.worker?.id,
|
|
54
63
|
[semanticConventions.SEMATTRS_MESSAGING_DESTINATION]: params.queue?.name ?? params.id,
|
|
55
|
-
["messaging.message.body.size"]: JSON.stringify(payload).length,
|
|
56
64
|
[semanticConventions.SEMATTRS_MESSAGING_SYSTEM]: "trigger.dev",
|
|
57
65
|
...taskMetadata ? v3.accessoryAttributes({
|
|
58
66
|
items: [
|
|
@@ -67,38 +75,39 @@ function createTask(params) {
|
|
|
67
75
|
});
|
|
68
76
|
return handle;
|
|
69
77
|
},
|
|
70
|
-
batchTrigger: async (
|
|
78
|
+
batchTrigger: async (items) => {
|
|
71
79
|
const apiClient = v3.apiClientManager.client;
|
|
72
80
|
if (!apiClient) {
|
|
73
81
|
throw apiClientMissingError();
|
|
74
82
|
}
|
|
75
|
-
const taskMetadata = v3.
|
|
83
|
+
const taskMetadata = v3.taskCatalog.getTaskMetadata(params.id);
|
|
76
84
|
const response = await tracer.startActiveSpan(taskMetadata ? "Batch trigger" : `${params.id} batchTrigger()`, async (span) => {
|
|
77
85
|
const response2 = await apiClient.batchTriggerTask(params.id, {
|
|
78
|
-
items: items.map((item) =>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
86
|
+
items: await Promise.all(items.map(async (item) => {
|
|
87
|
+
const payloadPacket = await v3.stringifyIO(item.payload);
|
|
88
|
+
return {
|
|
89
|
+
payload: payloadPacket.data,
|
|
90
|
+
options: {
|
|
91
|
+
queue: item.options?.queue ?? params.queue,
|
|
92
|
+
concurrencyKey: item.options?.concurrencyKey,
|
|
93
|
+
test: v3.taskContext.ctx?.run.isTest,
|
|
94
|
+
payloadType: payloadPacket.dataType,
|
|
95
|
+
idempotencyKey: item.options?.idempotencyKey
|
|
96
|
+
}
|
|
97
|
+
};
|
|
85
98
|
}))
|
|
86
99
|
}, {
|
|
87
100
|
spanParentAsLink: true
|
|
88
101
|
});
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
span.setAttribute("messaging.message.id", response2.data.batchId);
|
|
93
|
-
return response2.data;
|
|
102
|
+
span.setAttribute("messaging.message.id", response2.batchId);
|
|
103
|
+
return response2;
|
|
94
104
|
}, {
|
|
95
105
|
kind: api.SpanKind.PRODUCER,
|
|
96
106
|
attributes: {
|
|
97
107
|
[semanticConventions.SEMATTRS_MESSAGING_OPERATION]: "publish",
|
|
98
108
|
["messaging.batch.message_count"]: items.length,
|
|
99
|
-
["messaging.client_id"]: v3.
|
|
109
|
+
["messaging.client_id"]: v3.taskContext.worker?.id,
|
|
100
110
|
[semanticConventions.SEMATTRS_MESSAGING_DESTINATION]: params.queue?.name ?? params.id,
|
|
101
|
-
["messaging.message.body.size"]: items.map((item) => JSON.stringify(item.payload)).join("").length,
|
|
102
111
|
[semanticConventions.SEMATTRS_MESSAGING_SYSTEM]: "trigger.dev",
|
|
103
112
|
[v3.SemanticInternalAttributes.STYLE_ICON]: "trigger",
|
|
104
113
|
...taskMetadata ? v3.accessoryAttributes({
|
|
@@ -114,8 +123,8 @@ function createTask(params) {
|
|
|
114
123
|
});
|
|
115
124
|
return response;
|
|
116
125
|
},
|
|
117
|
-
triggerAndWait: async (
|
|
118
|
-
const ctx = v3.
|
|
126
|
+
triggerAndWait: async (payload, options) => {
|
|
127
|
+
const ctx = v3.taskContext.ctx;
|
|
119
128
|
if (!ctx) {
|
|
120
129
|
throw new Error("triggerAndWait can only be used from inside a task.run()");
|
|
121
130
|
}
|
|
@@ -123,37 +132,43 @@ function createTask(params) {
|
|
|
123
132
|
if (!apiClient) {
|
|
124
133
|
throw apiClientMissingError();
|
|
125
134
|
}
|
|
126
|
-
const taskMetadata = v3.
|
|
135
|
+
const taskMetadata = v3.taskCatalog.getTaskMetadata(params.id);
|
|
136
|
+
const payloadPacket = await v3.stringifyIO(payload);
|
|
127
137
|
return await tracer.startActiveSpan(taskMetadata ? "Trigger" : `${params.id} triggerAndWait()`, async (span) => {
|
|
128
138
|
const response = await apiClient.triggerTask(params.id, {
|
|
129
|
-
payload,
|
|
139
|
+
payload: payloadPacket.data,
|
|
130
140
|
options: {
|
|
131
141
|
dependentAttempt: ctx.attempt.id,
|
|
132
|
-
lockToVersion: v3.
|
|
142
|
+
lockToVersion: v3.taskContext.worker?.version,
|
|
133
143
|
queue: params.queue,
|
|
134
144
|
concurrencyKey: options?.concurrencyKey,
|
|
135
|
-
test: v3.
|
|
145
|
+
test: v3.taskContext.ctx?.run.isTest,
|
|
146
|
+
payloadType: payloadPacket.dataType,
|
|
147
|
+
idempotencyKey: options?.idempotencyKey
|
|
136
148
|
}
|
|
137
149
|
});
|
|
138
|
-
|
|
139
|
-
|
|
150
|
+
span.setAttribute("messaging.message.id", response.id);
|
|
151
|
+
if (options?.idempotencyKey) {
|
|
152
|
+
const result2 = await apiClient.getRunResult(response.id);
|
|
153
|
+
if (result2) {
|
|
154
|
+
v3.logger.log(`Result reused from previous task run with idempotency key '${options.idempotencyKey}'.`, {
|
|
155
|
+
runId: response.id,
|
|
156
|
+
idempotencyKey: options.idempotencyKey
|
|
157
|
+
});
|
|
158
|
+
return await handleTaskRunExecutionResult(result2);
|
|
159
|
+
}
|
|
140
160
|
}
|
|
141
|
-
span.setAttribute("messaging.message.id", response.data.id);
|
|
142
161
|
const result = await v3.runtime.waitForTask({
|
|
143
|
-
id: response.
|
|
162
|
+
id: response.id,
|
|
144
163
|
ctx
|
|
145
164
|
});
|
|
146
|
-
|
|
147
|
-
if (!runResult.ok) {
|
|
148
|
-
throw runResult.error;
|
|
149
|
-
}
|
|
150
|
-
return runResult.output;
|
|
165
|
+
return await handleTaskRunExecutionResult(result);
|
|
151
166
|
}, {
|
|
152
167
|
kind: api.SpanKind.PRODUCER,
|
|
153
168
|
attributes: {
|
|
154
169
|
[v3.SemanticInternalAttributes.STYLE_ICON]: "trigger",
|
|
155
170
|
[semanticConventions.SEMATTRS_MESSAGING_OPERATION]: "publish",
|
|
156
|
-
["messaging.client_id"]: v3.
|
|
171
|
+
["messaging.client_id"]: v3.taskContext.worker?.id,
|
|
157
172
|
[semanticConventions.SEMATTRS_MESSAGING_DESTINATION]: params.queue?.name ?? params.id,
|
|
158
173
|
[semanticConventions.SEMATTRS_MESSAGING_SYSTEM]: "trigger.dev",
|
|
159
174
|
...taskMetadata ? v3.accessoryAttributes({
|
|
@@ -168,8 +183,8 @@ function createTask(params) {
|
|
|
168
183
|
}
|
|
169
184
|
});
|
|
170
185
|
},
|
|
171
|
-
batchTriggerAndWait: async (
|
|
172
|
-
const ctx = v3.
|
|
186
|
+
batchTriggerAndWait: async (items) => {
|
|
187
|
+
const ctx = v3.taskContext.ctx;
|
|
173
188
|
if (!ctx) {
|
|
174
189
|
throw new Error("batchTriggerAndWait can only be used from inside a task.run()");
|
|
175
190
|
}
|
|
@@ -177,42 +192,78 @@ function createTask(params) {
|
|
|
177
192
|
if (!apiClient) {
|
|
178
193
|
throw apiClientMissingError();
|
|
179
194
|
}
|
|
180
|
-
const taskMetadata = v3.
|
|
195
|
+
const taskMetadata = v3.taskCatalog.getTaskMetadata(params.id);
|
|
181
196
|
return await tracer.startActiveSpan(taskMetadata ? "Batch trigger" : `${params.id} batchTriggerAndWait()`, async (span) => {
|
|
182
197
|
const response = await apiClient.batchTriggerTask(params.id, {
|
|
183
|
-
items: items.map((item) =>
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
198
|
+
items: await Promise.all(items.map(async (item) => {
|
|
199
|
+
const payloadPacket = await v3.stringifyIO(item.payload);
|
|
200
|
+
return {
|
|
201
|
+
payload: payloadPacket.data,
|
|
202
|
+
options: {
|
|
203
|
+
lockToVersion: v3.taskContext.worker?.version,
|
|
204
|
+
queue: item.options?.queue ?? params.queue,
|
|
205
|
+
concurrencyKey: item.options?.concurrencyKey,
|
|
206
|
+
test: v3.taskContext.ctx?.run.isTest,
|
|
207
|
+
payloadType: payloadPacket.dataType,
|
|
208
|
+
idempotencyKey: item.options?.idempotencyKey
|
|
209
|
+
}
|
|
210
|
+
};
|
|
191
211
|
})),
|
|
192
212
|
dependentAttempt: ctx.attempt.id
|
|
193
213
|
});
|
|
194
|
-
|
|
195
|
-
|
|
214
|
+
span.setAttribute("messaging.message.id", response.batchId);
|
|
215
|
+
const getBatchResults = /* @__PURE__ */ __name(async () => {
|
|
216
|
+
const hasIdempotencyKey = items.some((item) => item.options?.idempotencyKey);
|
|
217
|
+
if (hasIdempotencyKey) {
|
|
218
|
+
const results = await apiClient.getBatchResults(response.batchId);
|
|
219
|
+
if (results) {
|
|
220
|
+
return results;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return {
|
|
224
|
+
id: response.batchId,
|
|
225
|
+
items: []
|
|
226
|
+
};
|
|
227
|
+
}, "getBatchResults");
|
|
228
|
+
const existingResults = await getBatchResults();
|
|
229
|
+
const incompleteRuns = response.runs.filter((runId) => !existingResults.items.some((item) => item.id === runId));
|
|
230
|
+
if (incompleteRuns.length === 0) {
|
|
231
|
+
v3.logger.log(`Results reused from previous task runs because of the provided idempotency keys.`);
|
|
232
|
+
const runs3 = await handleBatchTaskRunExecutionResult(existingResults.items);
|
|
233
|
+
return {
|
|
234
|
+
id: existingResults.id,
|
|
235
|
+
runs: runs3
|
|
236
|
+
};
|
|
196
237
|
}
|
|
197
|
-
span.setAttribute("messaging.message.id", response.data.batchId);
|
|
198
238
|
const result = await v3.runtime.waitForBatch({
|
|
199
|
-
id: response.
|
|
200
|
-
runs:
|
|
239
|
+
id: response.batchId,
|
|
240
|
+
runs: incompleteRuns,
|
|
201
241
|
ctx
|
|
202
242
|
});
|
|
203
|
-
const
|
|
243
|
+
const combinedItems = [];
|
|
244
|
+
for (const runId of response.runs) {
|
|
245
|
+
const existingItem = existingResults.items.find((item) => item.id === runId);
|
|
246
|
+
if (existingItem) {
|
|
247
|
+
combinedItems.push(existingItem);
|
|
248
|
+
} else {
|
|
249
|
+
const newItem = result.items.find((item) => item.id === runId);
|
|
250
|
+
if (newItem) {
|
|
251
|
+
combinedItems.push(newItem);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
const runs2 = await handleBatchTaskRunExecutionResult(combinedItems);
|
|
204
256
|
return {
|
|
205
257
|
id: result.id,
|
|
206
|
-
runs
|
|
258
|
+
runs: runs2
|
|
207
259
|
};
|
|
208
260
|
}, {
|
|
209
261
|
kind: api.SpanKind.PRODUCER,
|
|
210
262
|
attributes: {
|
|
211
263
|
[semanticConventions.SEMATTRS_MESSAGING_OPERATION]: "publish",
|
|
212
264
|
["messaging.batch.message_count"]: items.length,
|
|
213
|
-
["messaging.client_id"]: v3.
|
|
265
|
+
["messaging.client_id"]: v3.taskContext.worker?.id,
|
|
214
266
|
[semanticConventions.SEMATTRS_MESSAGING_DESTINATION]: params.queue?.name ?? params.id,
|
|
215
|
-
["messaging.message.body.size"]: items.map((item) => JSON.stringify(item.payload)).join("").length,
|
|
216
267
|
[semanticConventions.SEMATTRS_MESSAGING_SYSTEM]: "trigger.dev",
|
|
217
268
|
[v3.SemanticInternalAttributes.STYLE_ICON]: "trigger",
|
|
218
269
|
...taskMetadata ? v3.accessoryAttributes({
|
|
@@ -228,27 +279,27 @@ function createTask(params) {
|
|
|
228
279
|
});
|
|
229
280
|
}
|
|
230
281
|
};
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
282
|
+
v3.taskCatalog.registerTaskMetadata({
|
|
283
|
+
id: params.id,
|
|
284
|
+
packageVersion: version,
|
|
285
|
+
queue: params.queue,
|
|
286
|
+
retry: params.retry ? {
|
|
287
|
+
...v3.defaultRetryOptions,
|
|
288
|
+
...params.retry
|
|
289
|
+
} : void 0,
|
|
290
|
+
machine: params.machine,
|
|
291
|
+
fns: {
|
|
292
|
+
run: params.run,
|
|
293
|
+
init: params.init,
|
|
294
|
+
cleanup: params.cleanup,
|
|
295
|
+
middleware: params.middleware,
|
|
296
|
+
handleError: params.handleError,
|
|
297
|
+
onSuccess: params.onSuccess,
|
|
298
|
+
onFailure: params.onFailure,
|
|
299
|
+
onStart: params.onStart
|
|
300
|
+
}
|
|
250
301
|
});
|
|
251
|
-
return
|
|
302
|
+
return task3;
|
|
252
303
|
}
|
|
253
304
|
__name(createTask, "createTask");
|
|
254
305
|
async function handleBatchTaskRunExecutionResult(items) {
|
|
@@ -878,14 +929,150 @@ var retry = {
|
|
|
878
929
|
fetch: retryFetch,
|
|
879
930
|
interceptFetch
|
|
880
931
|
};
|
|
932
|
+
var runs = {
|
|
933
|
+
replay: replayRun,
|
|
934
|
+
cancel: cancelRun
|
|
935
|
+
};
|
|
936
|
+
async function replayRun(runId) {
|
|
937
|
+
const apiClient = v3.apiClientManager.client;
|
|
938
|
+
if (!apiClient) {
|
|
939
|
+
throw apiClientMissingError();
|
|
940
|
+
}
|
|
941
|
+
return await apiClient.replayRun(runId);
|
|
942
|
+
}
|
|
943
|
+
__name(replayRun, "replayRun");
|
|
944
|
+
async function cancelRun(runId) {
|
|
945
|
+
const apiClient = v3.apiClientManager.client;
|
|
946
|
+
if (!apiClient) {
|
|
947
|
+
throw apiClientMissingError();
|
|
948
|
+
}
|
|
949
|
+
return await apiClient.cancelRun(runId);
|
|
950
|
+
}
|
|
951
|
+
__name(cancelRun, "cancelRun");
|
|
881
952
|
|
|
953
|
+
// src/v3/schedules/index.ts
|
|
954
|
+
var schedules_exports = {};
|
|
955
|
+
__export(schedules_exports, {
|
|
956
|
+
activate: () => activate,
|
|
957
|
+
create: () => create,
|
|
958
|
+
deactivate: () => deactivate,
|
|
959
|
+
del: () => del,
|
|
960
|
+
list: () => list,
|
|
961
|
+
retrieve: () => retrieve,
|
|
962
|
+
task: () => task2,
|
|
963
|
+
update: () => update
|
|
964
|
+
});
|
|
965
|
+
function task2(params) {
|
|
966
|
+
const task3 = createTask(params);
|
|
967
|
+
v3.taskCatalog.updateTaskMetadata(task3.id, {
|
|
968
|
+
triggerSource: "schedule"
|
|
969
|
+
});
|
|
970
|
+
return task3;
|
|
971
|
+
}
|
|
972
|
+
__name(task2, "task");
|
|
973
|
+
async function create(options) {
|
|
974
|
+
const apiClient = v3.apiClientManager.client;
|
|
975
|
+
if (!apiClient) {
|
|
976
|
+
throw apiClientMissingError();
|
|
977
|
+
}
|
|
978
|
+
return apiClient.createSchedule(options);
|
|
979
|
+
}
|
|
980
|
+
__name(create, "create");
|
|
981
|
+
async function retrieve(scheduleId) {
|
|
982
|
+
const apiClient = v3.apiClientManager.client;
|
|
983
|
+
if (!apiClient) {
|
|
984
|
+
throw apiClientMissingError();
|
|
985
|
+
}
|
|
986
|
+
return apiClient.retrieveSchedule(scheduleId);
|
|
987
|
+
}
|
|
988
|
+
__name(retrieve, "retrieve");
|
|
989
|
+
async function update(scheduleId, options) {
|
|
990
|
+
const apiClient = v3.apiClientManager.client;
|
|
991
|
+
if (!apiClient) {
|
|
992
|
+
throw apiClientMissingError();
|
|
993
|
+
}
|
|
994
|
+
return apiClient.updateSchedule(scheduleId, options);
|
|
995
|
+
}
|
|
996
|
+
__name(update, "update");
|
|
997
|
+
async function del(scheduleId) {
|
|
998
|
+
const apiClient = v3.apiClientManager.client;
|
|
999
|
+
if (!apiClient) {
|
|
1000
|
+
throw apiClientMissingError();
|
|
1001
|
+
}
|
|
1002
|
+
return apiClient.deleteSchedule(scheduleId);
|
|
1003
|
+
}
|
|
1004
|
+
__name(del, "del");
|
|
1005
|
+
async function deactivate(scheduleId) {
|
|
1006
|
+
const apiClient = v3.apiClientManager.client;
|
|
1007
|
+
if (!apiClient) {
|
|
1008
|
+
throw apiClientMissingError();
|
|
1009
|
+
}
|
|
1010
|
+
return apiClient.deactivateSchedule(scheduleId);
|
|
1011
|
+
}
|
|
1012
|
+
__name(deactivate, "deactivate");
|
|
1013
|
+
async function activate(scheduleId) {
|
|
1014
|
+
const apiClient = v3.apiClientManager.client;
|
|
1015
|
+
if (!apiClient) {
|
|
1016
|
+
throw apiClientMissingError();
|
|
1017
|
+
}
|
|
1018
|
+
return apiClient.activateSchedule(scheduleId);
|
|
1019
|
+
}
|
|
1020
|
+
__name(activate, "activate");
|
|
1021
|
+
async function list(options) {
|
|
1022
|
+
const apiClient = v3.apiClientManager.client;
|
|
1023
|
+
if (!apiClient) {
|
|
1024
|
+
throw apiClientMissingError();
|
|
1025
|
+
}
|
|
1026
|
+
return apiClient.listSchedules(options);
|
|
1027
|
+
}
|
|
1028
|
+
__name(list, "list");
|
|
1029
|
+
|
|
1030
|
+
Object.defineProperty(exports, 'APIError', {
|
|
1031
|
+
enumerable: true,
|
|
1032
|
+
get: function () { return v3.APIError; }
|
|
1033
|
+
});
|
|
1034
|
+
Object.defineProperty(exports, 'AuthenticationError', {
|
|
1035
|
+
enumerable: true,
|
|
1036
|
+
get: function () { return v3.AuthenticationError; }
|
|
1037
|
+
});
|
|
1038
|
+
Object.defineProperty(exports, 'BadRequestError', {
|
|
1039
|
+
enumerable: true,
|
|
1040
|
+
get: function () { return v3.BadRequestError; }
|
|
1041
|
+
});
|
|
1042
|
+
Object.defineProperty(exports, 'ConflictError', {
|
|
1043
|
+
enumerable: true,
|
|
1044
|
+
get: function () { return v3.ConflictError; }
|
|
1045
|
+
});
|
|
1046
|
+
Object.defineProperty(exports, 'InternalServerError', {
|
|
1047
|
+
enumerable: true,
|
|
1048
|
+
get: function () { return v3.InternalServerError; }
|
|
1049
|
+
});
|
|
1050
|
+
Object.defineProperty(exports, 'NotFoundError', {
|
|
1051
|
+
enumerable: true,
|
|
1052
|
+
get: function () { return v3.NotFoundError; }
|
|
1053
|
+
});
|
|
1054
|
+
Object.defineProperty(exports, 'PermissionDeniedError', {
|
|
1055
|
+
enumerable: true,
|
|
1056
|
+
get: function () { return v3.PermissionDeniedError; }
|
|
1057
|
+
});
|
|
1058
|
+
Object.defineProperty(exports, 'RateLimitError', {
|
|
1059
|
+
enumerable: true,
|
|
1060
|
+
get: function () { return v3.RateLimitError; }
|
|
1061
|
+
});
|
|
1062
|
+
Object.defineProperty(exports, 'UnprocessableEntityError', {
|
|
1063
|
+
enumerable: true,
|
|
1064
|
+
get: function () { return v3.UnprocessableEntityError; }
|
|
1065
|
+
});
|
|
882
1066
|
Object.defineProperty(exports, 'logger', {
|
|
883
1067
|
enumerable: true,
|
|
884
1068
|
get: function () { return v3.logger; }
|
|
885
1069
|
});
|
|
886
1070
|
exports.InMemoryCache = InMemoryCache;
|
|
887
1071
|
exports.createCache = createCache;
|
|
1072
|
+
exports.queue = queue;
|
|
888
1073
|
exports.retry = retry;
|
|
1074
|
+
exports.runs = runs;
|
|
1075
|
+
exports.schedules = schedules_exports;
|
|
889
1076
|
exports.task = task;
|
|
890
1077
|
exports.wait = wait;
|
|
891
1078
|
//# sourceMappingURL=out.js.map
|