apify-client 2.20.1-beta.6 → 2.20.1-beta.8
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/apify_client.d.ts +237 -25
- package/dist/apify_client.d.ts.map +1 -1
- package/dist/apify_client.js +234 -25
- package/dist/apify_client.js.map +1 -1
- package/dist/bundle.js +2042 -253
- package/dist/bundle.js.map +1 -1
- package/dist/resource_clients/actor.d.ts +322 -31
- package/dist/resource_clients/actor.d.ts.map +1 -1
- package/dist/resource_clients/actor.js +167 -19
- package/dist/resource_clients/actor.js.map +1 -1
- package/dist/resource_clients/actor_collection.d.ts +34 -3
- package/dist/resource_clients/actor_collection.d.ts.map +1 -1
- package/dist/resource_clients/actor_collection.js +34 -3
- package/dist/resource_clients/actor_collection.js.map +1 -1
- package/dist/resource_clients/actor_env_var.d.ts +34 -3
- package/dist/resource_clients/actor_env_var.d.ts.map +1 -1
- package/dist/resource_clients/actor_env_var.js +34 -3
- package/dist/resource_clients/actor_env_var.js.map +1 -1
- package/dist/resource_clients/actor_env_var_collection.d.ts +37 -3
- package/dist/resource_clients/actor_env_var_collection.d.ts.map +1 -1
- package/dist/resource_clients/actor_env_var_collection.js +37 -3
- package/dist/resource_clients/actor_env_var_collection.js.map +1 -1
- package/dist/resource_clients/actor_version.d.ts +42 -6
- package/dist/resource_clients/actor_version.d.ts.map +1 -1
- package/dist/resource_clients/actor_version.js +42 -6
- package/dist/resource_clients/actor_version.js.map +1 -1
- package/dist/resource_clients/actor_version_collection.d.ts +35 -3
- package/dist/resource_clients/actor_version_collection.d.ts.map +1 -1
- package/dist/resource_clients/actor_version_collection.js +35 -3
- package/dist/resource_clients/actor_version_collection.js.map +1 -1
- package/dist/resource_clients/build.d.ts +123 -11
- package/dist/resource_clients/build.d.ts.map +1 -1
- package/dist/resource_clients/build.js +93 -11
- package/dist/resource_clients/build.js.map +1 -1
- package/dist/resource_clients/build_collection.d.ts +27 -2
- package/dist/resource_clients/build_collection.d.ts.map +1 -1
- package/dist/resource_clients/build_collection.js +27 -2
- package/dist/resource_clients/build_collection.js.map +1 -1
- package/dist/resource_clients/dataset.d.ts +221 -15
- package/dist/resource_clients/dataset.d.ts.map +1 -1
- package/dist/resource_clients/dataset.js +185 -15
- package/dist/resource_clients/dataset.js.map +1 -1
- package/dist/resource_clients/dataset_collection.d.ts +32 -3
- package/dist/resource_clients/dataset_collection.d.ts.map +1 -1
- package/dist/resource_clients/dataset_collection.js +32 -3
- package/dist/resource_clients/dataset_collection.js.map +1 -1
- package/dist/resource_clients/key_value_store.d.ts +219 -26
- package/dist/resource_clients/key_value_store.d.ts.map +1 -1
- package/dist/resource_clients/key_value_store.js +172 -25
- package/dist/resource_clients/key_value_store.js.map +1 -1
- package/dist/resource_clients/key_value_store_collection.d.ts +32 -3
- package/dist/resource_clients/key_value_store_collection.d.ts.map +1 -1
- package/dist/resource_clients/key_value_store_collection.js +32 -3
- package/dist/resource_clients/key_value_store_collection.js.map +1 -1
- package/dist/resource_clients/log.d.ts +34 -3
- package/dist/resource_clients/log.d.ts.map +1 -1
- package/dist/resource_clients/log.js +34 -3
- package/dist/resource_clients/log.js.map +1 -1
- package/dist/resource_clients/request_queue.d.ts +290 -19
- package/dist/resource_clients/request_queue.d.ts.map +1 -1
- package/dist/resource_clients/request_queue.js +233 -19
- package/dist/resource_clients/request_queue.js.map +1 -1
- package/dist/resource_clients/request_queue_collection.d.ts +31 -3
- package/dist/resource_clients/request_queue_collection.d.ts.map +1 -1
- package/dist/resource_clients/request_queue_collection.js +31 -3
- package/dist/resource_clients/request_queue_collection.js.map +1 -1
- package/dist/resource_clients/run.d.ts +224 -27
- package/dist/resource_clients/run.d.ts.map +1 -1
- package/dist/resource_clients/run.js +200 -27
- package/dist/resource_clients/run.js.map +1 -1
- package/dist/resource_clients/run_collection.d.ts +27 -2
- package/dist/resource_clients/run_collection.d.ts.map +1 -1
- package/dist/resource_clients/run_collection.js +27 -2
- package/dist/resource_clients/run_collection.js.map +1 -1
- package/dist/resource_clients/schedule.d.ts +65 -4
- package/dist/resource_clients/schedule.d.ts.map +1 -1
- package/dist/resource_clients/schedule.js +42 -4
- package/dist/resource_clients/schedule.js.map +1 -1
- package/dist/resource_clients/schedule_collection.d.ts +35 -3
- package/dist/resource_clients/schedule_collection.d.ts.map +1 -1
- package/dist/resource_clients/schedule_collection.js +35 -3
- package/dist/resource_clients/schedule_collection.js.map +1 -1
- package/dist/resource_clients/store_collection.d.ts +26 -2
- package/dist/resource_clients/store_collection.d.ts.map +1 -1
- package/dist/resource_clients/store_collection.js +26 -2
- package/dist/resource_clients/store_collection.js.map +1 -1
- package/dist/resource_clients/task.d.ts +110 -11
- package/dist/resource_clients/task.d.ts.map +1 -1
- package/dist/resource_clients/task.js +83 -11
- package/dist/resource_clients/task.js.map +1 -1
- package/dist/resource_clients/task_collection.d.ts +35 -8
- package/dist/resource_clients/task_collection.d.ts.map +1 -1
- package/dist/resource_clients/task_collection.js +35 -8
- package/dist/resource_clients/task_collection.js.map +1 -1
- package/dist/resource_clients/user.d.ts +41 -4
- package/dist/resource_clients/user.d.ts.map +1 -1
- package/dist/resource_clients/user.js +41 -4
- package/dist/resource_clients/user.js.map +1 -1
- package/dist/resource_clients/webhook.d.ts +66 -5
- package/dist/resource_clients/webhook.d.ts.map +1 -1
- package/dist/resource_clients/webhook.js +48 -5
- package/dist/resource_clients/webhook.js.map +1 -1
- package/dist/resource_clients/webhook_collection.d.ts +34 -3
- package/dist/resource_clients/webhook_collection.d.ts.map +1 -1
- package/dist/resource_clients/webhook_collection.js +34 -3
- package/dist/resource_clients/webhook_collection.js.map +1 -1
- package/dist/resource_clients/webhook_dispatch.d.ts +22 -1
- package/dist/resource_clients/webhook_dispatch.d.ts.map +1 -1
- package/dist/resource_clients/webhook_dispatch.js +22 -1
- package/dist/resource_clients/webhook_dispatch.js.map +1 -1
- package/dist/resource_clients/webhook_dispatch_collection.d.ts +24 -2
- package/dist/resource_clients/webhook_dispatch_collection.d.ts.map +1 -1
- package/dist/resource_clients/webhook_dispatch_collection.js +24 -2
- package/dist/resource_clients/webhook_dispatch_collection.js.map +1 -1
- package/dist/utils.d.ts +42 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,79 +8,252 @@ import { DatasetClient } from './dataset';
|
|
|
8
8
|
import { KeyValueStoreClient } from './key_value_store';
|
|
9
9
|
import { LogClient, StreamedLog } from './log';
|
|
10
10
|
import { RequestQueueClient } from './request_queue';
|
|
11
|
+
/**
|
|
12
|
+
* Client for managing a specific Actor run.
|
|
13
|
+
*
|
|
14
|
+
* Provides methods to get run details, abort, metamorph, resurrect, wait for completion,
|
|
15
|
+
* and access the run's dataset, key-value store, request queue, and logs.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```javascript
|
|
19
|
+
* const client = new ApifyClient({ token: 'my-token' });
|
|
20
|
+
* const runClient = client.run('my-run-id');
|
|
21
|
+
*
|
|
22
|
+
* // Get run details
|
|
23
|
+
* const run = await runClient.get();
|
|
24
|
+
*
|
|
25
|
+
* // Wait for the run to finish
|
|
26
|
+
* const finishedRun = await runClient.waitForFinish();
|
|
27
|
+
*
|
|
28
|
+
* // Access the run's dataset
|
|
29
|
+
* const { items } = await runClient.dataset().listItems();
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @see https://docs.apify.com/platform/actors/running/runs-and-builds
|
|
33
|
+
*/
|
|
11
34
|
export declare class RunClient extends ResourceClient {
|
|
12
35
|
/**
|
|
13
36
|
* @hidden
|
|
14
37
|
*/
|
|
15
38
|
constructor(options: ApiClientOptionsWithOptionalResourcePath);
|
|
16
39
|
/**
|
|
17
|
-
*
|
|
40
|
+
* Gets the Actor run object from the Apify API.
|
|
41
|
+
*
|
|
42
|
+
* @param options - Get options
|
|
43
|
+
* @param options.waitForFinish - Maximum time to wait (in seconds, max 60s) for the run to finish on the API side before returning. Default is 0 (returns immediately).
|
|
44
|
+
* @returns The ActorRun object, or `undefined` if it does not exist
|
|
45
|
+
* @see https://docs.apify.com/api/v2/actor-run-get
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```javascript
|
|
49
|
+
* // Get run status immediately
|
|
50
|
+
* const run = await client.run('run-id').get();
|
|
51
|
+
* console.log(`Status: ${run.status}`);
|
|
52
|
+
*
|
|
53
|
+
* // Wait up to 60 seconds for run to finish
|
|
54
|
+
* const run = await client.run('run-id').get({ waitForFinish: 60 });
|
|
55
|
+
* ```
|
|
18
56
|
*/
|
|
19
57
|
get(options?: RunGetOptions): Promise<ActorRun | undefined>;
|
|
20
58
|
/**
|
|
21
|
-
*
|
|
59
|
+
* Aborts the Actor run.
|
|
60
|
+
*
|
|
61
|
+
* @param options - Abort options
|
|
62
|
+
* @param options.gracefully - If `true`, the Actor run will abort gracefully - it can send status messages and perform cleanup. Default is `false` (immediate abort).
|
|
63
|
+
* @returns The updated ActorRun object with `ABORTING` or `ABORTED` status
|
|
64
|
+
* @see https://docs.apify.com/api/v2/actor-run-abort-post
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```javascript
|
|
68
|
+
* // Abort immediately
|
|
69
|
+
* await client.run('run-id').abort();
|
|
70
|
+
*
|
|
71
|
+
* // Abort gracefully (allows cleanup)
|
|
72
|
+
* await client.run('run-id').abort({ gracefully: true });
|
|
73
|
+
* ```
|
|
22
74
|
*/
|
|
23
75
|
abort(options?: RunAbortOptions): Promise<ActorRun>;
|
|
24
76
|
/**
|
|
25
|
-
*
|
|
77
|
+
* Deletes the Actor run.
|
|
78
|
+
*
|
|
79
|
+
* @see https://docs.apify.com/api/v2/actor-run-delete
|
|
26
80
|
*/
|
|
27
81
|
delete(): Promise<void>;
|
|
28
82
|
/**
|
|
29
|
-
*
|
|
83
|
+
* Transforms the Actor run into a run of another Actor (metamorph).
|
|
84
|
+
*
|
|
85
|
+
* This operation preserves the run ID, storages (dataset, key-value store, request queue),
|
|
86
|
+
* and resource allocation. The run effectively becomes a run of the target Actor with new input.
|
|
87
|
+
* This is useful for chaining Actor executions or implementing complex workflows.
|
|
88
|
+
*
|
|
89
|
+
* @param targetActorId - ID or username/name of the target Actor
|
|
90
|
+
* @param input - Input for the target Actor. Can be any JSON-serializable value.
|
|
91
|
+
* @param options - Metamorph options
|
|
92
|
+
* @param options.build - Tag or number of the target Actor's build to run. Default is the target Actor's default build.
|
|
93
|
+
* @param options.contentType - Content type of the input. If specified, input must be a string or Buffer.
|
|
94
|
+
* @returns The metamorphed ActorRun object (same ID, but now running the target Actor)
|
|
95
|
+
* @see https://docs.apify.com/api/v2/actor-run-metamorph-post
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```javascript
|
|
99
|
+
* // Transform current run into another Actor
|
|
100
|
+
* const metamorphedRun = await client.run('original-run-id').metamorph(
|
|
101
|
+
* 'target-actor-id',
|
|
102
|
+
* { url: 'https://example.com' }
|
|
103
|
+
* );
|
|
104
|
+
* console.log(`Run ${metamorphedRun.id} is now running ${metamorphedRun.actId}`);
|
|
105
|
+
* ```
|
|
30
106
|
*/
|
|
31
107
|
metamorph(targetActorId: string, input: unknown, options?: RunMetamorphOptions): Promise<ActorRun>;
|
|
32
108
|
/**
|
|
33
|
-
*
|
|
109
|
+
* Reboots the Actor run.
|
|
110
|
+
*
|
|
111
|
+
* Rebooting restarts the Actor's Docker container while preserving the run ID and storages.
|
|
112
|
+
* This can be useful to recover from certain errors or to force the Actor to restart
|
|
113
|
+
* with a fresh environment.
|
|
114
|
+
*
|
|
115
|
+
* @returns The updated ActorRun object
|
|
116
|
+
* @see https://docs.apify.com/api/v2/actor-run-reboot-post
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```javascript
|
|
120
|
+
* const run = await client.run('run-id').reboot();
|
|
121
|
+
* ```
|
|
34
122
|
*/
|
|
35
123
|
reboot(): Promise<ActorRun>;
|
|
124
|
+
/**
|
|
125
|
+
* Updates the Actor run with specified fields.
|
|
126
|
+
*
|
|
127
|
+
* @param newFields - Fields to update
|
|
128
|
+
* @param newFields.statusMessage - Custom status message to display (e.g., "Processing page 10/100")
|
|
129
|
+
* @param newFields.isStatusMessageTerminal - If `true`, the status message is final and won't be overwritten. Default is `false`.
|
|
130
|
+
* @param newFields.generalAccess - General resource access level ('FOLLOW_USER_SETTING', 'ANYONE_WITH_ID_CAN_READ' or 'RESTRICTED')
|
|
131
|
+
* @returns The updated ActorRun object
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* ```javascript
|
|
135
|
+
* // Set a status message
|
|
136
|
+
* await client.run('run-id').update({
|
|
137
|
+
* statusMessage: 'Processing items: 50/100'
|
|
138
|
+
* });
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
36
141
|
update(newFields: RunUpdateOptions): Promise<ActorRun>;
|
|
37
142
|
/**
|
|
38
|
-
*
|
|
143
|
+
* Resurrects a finished Actor run, starting it again with the same settings.
|
|
144
|
+
*
|
|
145
|
+
* This creates a new run with the same configuration as the original run. The original
|
|
146
|
+
* run's storages (dataset, key-value store, request queue) are preserved and reused.
|
|
147
|
+
*
|
|
148
|
+
* @param options - Resurrection options (override original run settings)
|
|
149
|
+
* @param options.build - Tag or number of the build to use. If not provided, uses the original run's build.
|
|
150
|
+
* @param options.memory - Memory in megabytes. If not provided, uses the original run's memory.
|
|
151
|
+
* @param options.timeout - Timeout in seconds. If not provided, uses the original run's timeout.
|
|
152
|
+
* @param options.maxItems - Maximum number of dataset items (pay-per-result Actors).
|
|
153
|
+
* @param options.maxTotalChargeUsd - Maximum cost in USD (pay-per-event Actors).
|
|
154
|
+
* @param options.restartOnError - Whether to restart on error.
|
|
155
|
+
* @returns The new (resurrected) ActorRun object
|
|
156
|
+
* @see https://docs.apify.com/api/v2/post-resurrect-run
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```javascript
|
|
160
|
+
* // Resurrect a failed run with more memory
|
|
161
|
+
* const newRun = await client.run('failed-run-id').resurrect({ memory: 2048 });
|
|
162
|
+
* console.log(`New run started: ${newRun.id}`);
|
|
163
|
+
* ```
|
|
39
164
|
*/
|
|
40
165
|
resurrect(options?: RunResurrectOptions): Promise<ActorRun>;
|
|
41
166
|
/**
|
|
42
|
-
*
|
|
167
|
+
* Charges the Actor run for a specific event.
|
|
168
|
+
*
|
|
169
|
+
* @param options - Charge options including event name and count.
|
|
170
|
+
* @param options.eventName - **Required.** Name of the event to charge for.
|
|
171
|
+
* @param options.count - Number of times to charge the event. Default is 1.
|
|
172
|
+
* @param options.idempotencyKey - Optional key to ensure the charge is not duplicated. If not provided, one is auto-generated.
|
|
173
|
+
* @returns Empty response object.
|
|
174
|
+
* @see https://docs.apify.com/api/v2/post-charge-run
|
|
43
175
|
*/
|
|
44
176
|
charge(options: RunChargeOptions): Promise<ApifyResponse<Record<string, never>>>;
|
|
45
177
|
/**
|
|
46
|
-
*
|
|
47
|
-
* or with the unfinished Run object when the `waitSecs` timeout lapses. The promise is NOT rejected
|
|
48
|
-
* based on run status. You can inspect the `status` property of the Run object to find out its status.
|
|
178
|
+
* Waits for the Actor run to finish and returns the finished Run object.
|
|
49
179
|
*
|
|
50
|
-
* The
|
|
51
|
-
*
|
|
52
|
-
* `
|
|
180
|
+
* The promise resolves when the run reaches a terminal state (`SUCCEEDED`, `FAILED`, `ABORTED`, or `TIMED-OUT`).
|
|
181
|
+
* If `waitSecs` is provided and the timeout is reached, the promise resolves with the unfinished
|
|
182
|
+
* Run object (status will be `RUNNING` or `READY`). The promise is NOT rejected based on run status.
|
|
53
183
|
*
|
|
54
|
-
*
|
|
55
|
-
* by
|
|
184
|
+
* Unlike the `waitForFinish` parameter in {@link get}, this method can wait indefinitely
|
|
185
|
+
* by polling the run status. It uses the `waitForFinish` parameter internally (max 60s per call)
|
|
186
|
+
* and continuously polls until the run finishes or the timeout is reached.
|
|
187
|
+
*
|
|
188
|
+
* @param options - Wait options
|
|
189
|
+
* @param options.waitSecs - Maximum time to wait for the run to finish, in seconds. If the limit is reached, the returned promise resolves to a run object that will have status `READY` or `RUNNING`. If omitted, waits indefinitely.
|
|
190
|
+
* @returns The ActorRun object (finished or still running if timeout was reached)
|
|
191
|
+
*
|
|
192
|
+
* @example
|
|
193
|
+
* ```javascript
|
|
194
|
+
* // Wait indefinitely for run to finish
|
|
195
|
+
* const run = await client.run('run-id').waitForFinish();
|
|
196
|
+
* console.log(`Run finished with status: ${run.status}`);
|
|
197
|
+
*
|
|
198
|
+
* // Wait up to 5 minutes
|
|
199
|
+
* const run = await client.run('run-id').waitForFinish({ waitSecs: 300 });
|
|
200
|
+
* if (run.status === 'SUCCEEDED') {
|
|
201
|
+
* console.log('Run succeeded!');
|
|
202
|
+
* }
|
|
203
|
+
* ```
|
|
56
204
|
*/
|
|
57
205
|
waitForFinish(options?: RunWaitForFinishOptions): Promise<ActorRun>;
|
|
58
206
|
/**
|
|
59
|
-
*
|
|
207
|
+
* Returns a client for the default dataset of this Actor run.
|
|
208
|
+
*
|
|
209
|
+
* @returns A client for accessing the run's default dataset
|
|
210
|
+
* @see https://docs.apify.com/api/v2/actor-run-get
|
|
60
211
|
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```javascript
|
|
214
|
+
* // Access run's dataset
|
|
215
|
+
* const { items } = await client.run('run-id').dataset().listItems();
|
|
216
|
+
* ```
|
|
63
217
|
*/
|
|
64
218
|
dataset(): DatasetClient;
|
|
65
219
|
/**
|
|
66
|
-
*
|
|
220
|
+
* Returns a client for the default key-value store of this Actor run.
|
|
67
221
|
*
|
|
68
|
-
*
|
|
69
|
-
* https://docs.apify.com/api/v2
|
|
222
|
+
* @returns A client for accessing the run's default key-value store
|
|
223
|
+
* @see https://docs.apify.com/api/v2/actor-run-get
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
* ```javascript
|
|
227
|
+
* // Access run's key-value store
|
|
228
|
+
* const output = await client.run('run-id').keyValueStore().getRecord('OUTPUT');
|
|
229
|
+
* ```
|
|
70
230
|
*/
|
|
71
231
|
keyValueStore(): KeyValueStoreClient;
|
|
72
232
|
/**
|
|
73
|
-
*
|
|
233
|
+
* Returns a client for the default Request queue of this Actor run.
|
|
234
|
+
*
|
|
235
|
+
* @returns A client for accessing the run's default Request queue
|
|
236
|
+
* @see https://docs.apify.com/api/v2/actor-run-get
|
|
74
237
|
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
238
|
+
* @example
|
|
239
|
+
* ```javascript
|
|
240
|
+
* // Access run's Request queue
|
|
241
|
+
* const { items } = await client.run('run-id').requestQueue().listHead();
|
|
242
|
+
* ```
|
|
77
243
|
*/
|
|
78
244
|
requestQueue(): RequestQueueClient;
|
|
79
245
|
/**
|
|
80
|
-
*
|
|
246
|
+
* Returns a client for accessing the log of this Actor run.
|
|
247
|
+
*
|
|
248
|
+
* @returns A client for accessing the run's log
|
|
249
|
+
* @see https://docs.apify.com/api/v2/actor-run-get
|
|
81
250
|
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
251
|
+
* @example
|
|
252
|
+
* ```javascript
|
|
253
|
+
* // Get run log
|
|
254
|
+
* const log = await client.run('run-id').log().get();
|
|
255
|
+
* console.log(log);
|
|
256
|
+
* ```
|
|
84
257
|
*/
|
|
85
258
|
log(): LogClient;
|
|
86
259
|
/**
|
|
@@ -88,25 +261,43 @@ export declare class RunClient extends ResourceClient {
|
|
|
88
261
|
*/
|
|
89
262
|
getStreamedLog(options?: GetStreamedLogOptions): Promise<StreamedLog | undefined>;
|
|
90
263
|
}
|
|
264
|
+
/**
|
|
265
|
+
* Options for getting a streamed log.
|
|
266
|
+
*/
|
|
91
267
|
export interface GetStreamedLogOptions {
|
|
92
268
|
toLog?: Log | null | 'default';
|
|
93
269
|
fromStart?: boolean;
|
|
94
270
|
}
|
|
271
|
+
/**
|
|
272
|
+
* Options for getting a Run.
|
|
273
|
+
*/
|
|
95
274
|
export interface RunGetOptions {
|
|
96
275
|
waitForFinish?: number;
|
|
97
276
|
}
|
|
277
|
+
/**
|
|
278
|
+
* Options for aborting a Run.
|
|
279
|
+
*/
|
|
98
280
|
export interface RunAbortOptions {
|
|
99
281
|
gracefully?: boolean;
|
|
100
282
|
}
|
|
283
|
+
/**
|
|
284
|
+
* Options for metamorphing a Run into another Actor.
|
|
285
|
+
*/
|
|
101
286
|
export interface RunMetamorphOptions {
|
|
102
287
|
contentType?: string;
|
|
103
288
|
build?: string;
|
|
104
289
|
}
|
|
290
|
+
/**
|
|
291
|
+
* Options for updating a Run.
|
|
292
|
+
*/
|
|
105
293
|
export interface RunUpdateOptions {
|
|
106
294
|
statusMessage?: string;
|
|
107
295
|
isStatusMessageTerminal?: boolean;
|
|
108
296
|
generalAccess?: RUN_GENERAL_ACCESS | null;
|
|
109
297
|
}
|
|
298
|
+
/**
|
|
299
|
+
* Options for resurrecting a finished Run.
|
|
300
|
+
*/
|
|
110
301
|
export interface RunResurrectOptions {
|
|
111
302
|
build?: string;
|
|
112
303
|
memory?: number;
|
|
@@ -115,6 +306,9 @@ export interface RunResurrectOptions {
|
|
|
115
306
|
maxTotalChargeUsd?: number;
|
|
116
307
|
restartOnError?: boolean;
|
|
117
308
|
}
|
|
309
|
+
/**
|
|
310
|
+
* Options for charging events in a pay-per-event Actor run.
|
|
311
|
+
*/
|
|
118
312
|
export interface RunChargeOptions {
|
|
119
313
|
/** Name of the event to charge. Must be defined in the Actor's pricing info else the API will throw. */
|
|
120
314
|
eventName: string;
|
|
@@ -123,6 +317,9 @@ export interface RunChargeOptions {
|
|
|
123
317
|
/** Defaults to runId-eventName-timestamp */
|
|
124
318
|
idempotencyKey?: string;
|
|
125
319
|
}
|
|
320
|
+
/**
|
|
321
|
+
* Options for waiting for a Run to finish.
|
|
322
|
+
*/
|
|
126
323
|
export interface RunWaitForFinishOptions {
|
|
127
324
|
/**
|
|
128
325
|
* Maximum time to wait for the run to finish, in seconds.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../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