apify-client 3.0.0-beta.4 → 3.0.0-beta.41

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.
Files changed (117) hide show
  1. package/README.md +13 -3
  2. package/dist/apify_api_error.d.ts +62 -21
  3. package/dist/apify_api_error.js +96 -23
  4. package/dist/apify_client.d.ts +125 -10
  5. package/dist/apify_client.js +133 -48
  6. package/dist/base/api_client.d.ts +7 -7
  7. package/dist/base/api_client.js +24 -16
  8. package/dist/base/resource_client.d.ts +23 -9
  9. package/dist/base/resource_client.js +57 -29
  10. package/dist/base/resource_collection_client.d.ts +8 -4
  11. package/dist/base/resource_collection_client.js +26 -15
  12. package/dist/body_parser.d.ts +3 -4
  13. package/dist/body_parser.js +19 -26
  14. package/dist/bundle.js +29 -22
  15. package/dist/bundle.js.map +1 -1
  16. package/dist/generated/api.d.ts +887 -322
  17. package/dist/generated/schemas.d.ts +6717 -0
  18. package/dist/generated/schemas.js +1527 -0
  19. package/dist/http_clients/axios.d.ts +60 -0
  20. package/dist/http_clients/axios.js +117 -0
  21. package/dist/http_clients/base.d.ts +333 -0
  22. package/dist/http_clients/base.js +563 -0
  23. package/dist/http_clients/index.d.ts +4 -0
  24. package/dist/http_clients/index.js +2 -0
  25. package/dist/http_compressors/base.d.ts +40 -0
  26. package/dist/http_compressors/base.js +9 -0
  27. package/dist/http_compressors/brotli.d.ts +33 -0
  28. package/dist/http_compressors/brotli.js +39 -0
  29. package/dist/http_compressors/gzip.d.ts +33 -0
  30. package/dist/http_compressors/gzip.js +39 -0
  31. package/dist/http_compressors/index.d.ts +6 -0
  32. package/dist/http_compressors/index.js +2 -0
  33. package/dist/http_compressors/resolve.d.ts +23 -0
  34. package/dist/http_compressors/resolve.js +27 -0
  35. package/dist/index.d.ts +5 -1
  36. package/dist/index.js +4 -1
  37. package/dist/invalid_response_body_error.d.ts +13 -0
  38. package/dist/invalid_response_body_error.js +17 -0
  39. package/dist/lazy_schema.d.ts +8 -0
  40. package/dist/lazy_schema.js +11 -0
  41. package/dist/models.d.ts +33 -61
  42. package/dist/resource_clients/actor.d.ts +52 -31
  43. package/dist/resource_clients/actor.js +81 -58
  44. package/dist/resource_clients/actor_collection.d.ts +9 -5
  45. package/dist/resource_clients/actor_collection.js +12 -3
  46. package/dist/resource_clients/actor_env_var.d.ts +10 -3
  47. package/dist/resource_clients/actor_env_var.js +17 -6
  48. package/dist/resource_clients/actor_env_var_collection.d.ts +14 -18
  49. package/dist/resource_clients/actor_env_var_collection.js +18 -11
  50. package/dist/resource_clients/actor_version.d.ts +18 -3
  51. package/dist/resource_clients/actor_version.js +20 -9
  52. package/dist/resource_clients/actor_version_collection.d.ts +16 -17
  53. package/dist/resource_clients/actor_version_collection.js +20 -11
  54. package/dist/resource_clients/build.d.ts +18 -6
  55. package/dist/resource_clients/build.js +37 -17
  56. package/dist/resource_clients/build_collection.d.ts +3 -1
  57. package/dist/resource_clients/build_collection.js +5 -1
  58. package/dist/resource_clients/dataset.d.ts +49 -31
  59. package/dist/resource_clients/dataset.js +102 -76
  60. package/dist/resource_clients/dataset_collection.d.ts +6 -2
  61. package/dist/resource_clients/dataset_collection.js +14 -2
  62. package/dist/resource_clients/key_value_store.d.ts +58 -16
  63. package/dist/resource_clients/key_value_store.js +80 -41
  64. package/dist/resource_clients/key_value_store_collection.d.ts +6 -2
  65. package/dist/resource_clients/key_value_store_collection.js +14 -2
  66. package/dist/resource_clients/log.d.ts +11 -19
  67. package/dist/resource_clients/log.js +64 -46
  68. package/dist/resource_clients/request_queue.d.ts +56 -26
  69. package/dist/resource_clients/request_queue.js +197 -116
  70. package/dist/resource_clients/request_queue_collection.d.ts +6 -2
  71. package/dist/resource_clients/request_queue_collection.js +10 -3
  72. package/dist/resource_clients/run.d.ts +53 -18
  73. package/dist/resource_clients/run.js +94 -47
  74. package/dist/resource_clients/run_collection.d.ts +3 -1
  75. package/dist/resource_clients/run_collection.js +5 -1
  76. package/dist/resource_clients/schedule.d.ts +16 -7
  77. package/dist/resource_clients/schedule.js +32 -21
  78. package/dist/resource_clients/schedule_collection.d.ts +6 -2
  79. package/dist/resource_clients/schedule_collection.js +10 -3
  80. package/dist/resource_clients/store_collection.d.ts +3 -1
  81. package/dist/resource_clients/store_collection.js +5 -1
  82. package/dist/resource_clients/task.d.ts +28 -10
  83. package/dist/resource_clients/task.js +71 -46
  84. package/dist/resource_clients/task_collection.d.ts +6 -2
  85. package/dist/resource_clients/task_collection.js +10 -3
  86. package/dist/resource_clients/user.d.ts +17 -8
  87. package/dist/resource_clients/user.js +43 -39
  88. package/dist/resource_clients/webhook.d.ts +14 -5
  89. package/dist/resource_clients/webhook.js +31 -22
  90. package/dist/resource_clients/webhook_collection.d.ts +6 -2
  91. package/dist/resource_clients/webhook_collection.js +10 -3
  92. package/dist/resource_clients/webhook_dispatch.d.ts +4 -1
  93. package/dist/resource_clients/webhook_dispatch.js +8 -2
  94. package/dist/resource_clients/webhook_dispatch_collection.d.ts +3 -1
  95. package/dist/resource_clients/webhook_dispatch_collection.js +5 -1
  96. package/dist/response_validation_error.d.ts +26 -0
  97. package/dist/response_validation_error.js +37 -0
  98. package/dist/runtime/node.d.ts +6 -0
  99. package/dist/runtime/node.js +49 -0
  100. package/dist/runtime/types.d.ts +52 -0
  101. package/dist/runtime/types.js +1 -0
  102. package/dist/runtime/web.d.ts +5 -0
  103. package/dist/runtime/web.js +18 -0
  104. package/dist/schemas.d.ts +15 -0
  105. package/dist/schemas.js +15 -0
  106. package/dist/statistics.d.ts +1 -6
  107. package/dist/statistics.js +2 -2
  108. package/dist/timeouts.d.ts +84 -0
  109. package/dist/timeouts.js +37 -0
  110. package/dist/timezones.d.ts +1 -1
  111. package/dist/utils.d.ts +86 -46
  112. package/dist/utils.js +218 -164
  113. package/package.json +32 -29
  114. package/dist/http_client.d.ts +0 -88
  115. package/dist/http_client.js +0 -255
  116. package/dist/interceptors.d.ts +0 -19
  117. package/dist/interceptors.js +0 -105
@@ -1,6 +1,7 @@
1
1
  import { STORAGE_OWNERSHIP_FILTER } from '@apify/consts';
2
2
  import type { ApiClientSubResourceOptions } from '../base/api_client.js';
3
3
  import { ResourceCollectionClient } from '../base/resource_collection_client.js';
4
+ import type { TimeoutOptions } from '../timeouts.js';
4
5
  import type { PaginatedList, PaginationOptions } from '../utils.js';
5
6
  import type { RequestQueue } from './request_queue.js';
6
7
  /**
@@ -45,6 +46,7 @@ export declare class RequestQueueCollectionClient extends ResourceCollectionClie
45
46
  * ```
46
47
  *
47
48
  * @param options - Pagination options.
49
+ * @param options.timeoutSecs - Timeout for each API request. Default is `'medium'`.
48
50
  * @returns A paginated iterator of Request queues.
49
51
  * @see https://docs.apify.com/api/v2/request-queues-get
50
52
  */
@@ -53,12 +55,14 @@ export declare class RequestQueueCollectionClient extends ResourceCollectionClie
53
55
  * Gets or creates a Request queue with the specified name.
54
56
  *
55
57
  * @param name - Name of the Request queue. If not provided, a default queue is used.
58
+ * @param options - Request options
59
+ * @param options.timeoutSecs - Timeout for the API request. Default is `'short'`.
56
60
  * @returns The Request queue object.
57
61
  * @see https://docs.apify.com/api/v2/request-queues-post
58
62
  */
59
- getOrCreate(name?: string): Promise<RequestQueue>;
63
+ getOrCreate(name?: string, options?: TimeoutOptions): Promise<RequestQueue>;
60
64
  }
61
- export interface RequestQueueCollectionListOptions extends PaginationOptions {
65
+ export interface RequestQueueCollectionListOptions extends PaginationOptions, TimeoutOptions {
62
66
  unnamed?: boolean;
63
67
  desc?: boolean;
64
68
  /**
@@ -1,12 +1,15 @@
1
1
  import { z } from 'zod';
2
2
  import { STORAGE_OWNERSHIP_FILTER } from '@apify/consts';
3
3
  import { ResourceCollectionClient } from '../base/resource_collection_client.js';
4
+ import * as schemas from '../schemas.js';
5
+ import { timeoutOptionsSchema, timeoutOptionsShape } from '../timeouts.js';
4
6
  import { paginationOptionsShape, parseArgument } from '../utils.js';
5
7
  const listOptionsSchema = z.strictObject({
6
8
  unnamed: z.boolean().optional(),
7
9
  ...paginationOptionsShape,
8
10
  desc: z.boolean().optional(),
9
11
  ownership: z.enum(STORAGE_OWNERSHIP_FILTER).optional(),
12
+ ...timeoutOptionsShape,
10
13
  });
11
14
  const nameSchema = z.string().optional();
12
15
  /**
@@ -56,22 +59,26 @@ export class RequestQueueCollectionClient extends ResourceCollectionClient {
56
59
  * ```
57
60
  *
58
61
  * @param options - Pagination options.
62
+ * @param options.timeoutSecs - Timeout for each API request. Default is `'medium'`.
59
63
  * @returns A paginated iterator of Request queues.
60
64
  * @see https://docs.apify.com/api/v2/request-queues-get
61
65
  */
62
66
  list(options = {}) {
63
67
  const parsed = parseArgument(options, listOptionsSchema, 'RequestQueueCollectionListOptions');
64
- return this._listPaginated(parsed);
68
+ return this.listResourcesPaginated(schemas.ListOfRequestQueues(), parsed, 'medium');
65
69
  }
66
70
  /**
67
71
  * Gets or creates a Request queue with the specified name.
68
72
  *
69
73
  * @param name - Name of the Request queue. If not provided, a default queue is used.
74
+ * @param options - Request options
75
+ * @param options.timeoutSecs - Timeout for the API request. Default is `'short'`.
70
76
  * @returns The Request queue object.
71
77
  * @see https://docs.apify.com/api/v2/request-queues-post
72
78
  */
73
- async getOrCreate(name) {
79
+ async getOrCreate(name, options = {}) {
74
80
  parseArgument(name, nameSchema);
75
- return this._getOrCreate(name);
81
+ const { timeoutSecs = 'short', signal } = parseArgument(options, timeoutOptionsSchema, 'TimeoutOptions');
82
+ return this.getOrCreateResource(schemas.RequestQueue(), name, undefined, timeoutSecs, signal);
76
83
  }
77
84
  }
@@ -2,8 +2,9 @@ import type { RUN_GENERAL_ACCESS } from '@apify/consts';
2
2
  import { Log } from '@apify/log';
3
3
  import type { ApiClientOptionsWithOptionalResourcePath } from '../base/api_client.js';
4
4
  import { ResourceClient } from '../base/resource_client.js';
5
- import type { ApifyResponse } from '../http_client.js';
6
- import type { ActorRun } from './actor.js';
5
+ import type { ApifyResponse } from '../http_clients/index.js';
6
+ import type { TimeoutOptions } from '../timeouts.js';
7
+ import type { ActorInput, ActorRun } from './actor.js';
7
8
  import { DatasetClient } from './dataset.js';
8
9
  import { KeyValueStoreClient } from './key_value_store.js';
9
10
  import { LogClient, StreamedLog } from './log.js';
@@ -41,6 +42,8 @@ export declare class RunClient extends ResourceClient {
41
42
  *
42
43
  * @param options - Get options
43
44
  * @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).
45
+ * @param options.timeoutSecs - Timeout for the API request. Default is `'short'`, extended to cover `waitForFinish`
46
+ * when the API is asked to hold the response.
44
47
  * @returns The ActorRun object, or `undefined` if it does not exist
45
48
  * @see https://docs.apify.com/api/v2/actor-run-get
46
49
  *
@@ -60,6 +63,7 @@ export declare class RunClient extends ResourceClient {
60
63
  *
61
64
  * @param options - Abort options
62
65
  * @param options.gracefully - If `true`, the Actor run will abort gracefully - it can send status messages and perform cleanup. Default is `false` (immediate abort).
66
+ * @param options.timeoutSecs - Timeout for the API request. Default is `'medium'`.
63
67
  * @returns The updated ActorRun object with `ABORTING` or `ABORTED` status
64
68
  * @see https://docs.apify.com/api/v2/actor-run-abort-post
65
69
  *
@@ -76,10 +80,12 @@ export declare class RunClient extends ResourceClient {
76
80
  /**
77
81
  * Deletes the Actor run.
78
82
  *
83
+ * @param options - Request options
84
+ * @param options.timeoutSecs - Timeout for the API request. Default is `'short'`.
79
85
  * @see https://docs.apify.com/api/v2/actor-run-delete
80
86
  * @since Added in 2.8.1
81
87
  */
82
- delete(): Promise<void>;
88
+ delete(options?: TimeoutOptions): Promise<void>;
83
89
  /**
84
90
  * Transforms the Actor run into a run of another Actor (metamorph).
85
91
  *
@@ -88,10 +94,11 @@ export declare class RunClient extends ResourceClient {
88
94
  * This is useful for chaining Actor executions or implementing complex workflows.
89
95
  *
90
96
  * @param targetActorId - ID or username/name of the target Actor
91
- * @param input - Input for the target Actor. Can be any JSON-serializable value.
97
+ * @param input - Input for the target Actor: an object or array serialized to JSON, or raw bytes sent as they
98
+ * are. Omit it to metamorph without input.
92
99
  * @param options - Metamorph options
93
100
  * @param options.build - Tag or number of the target Actor's build to run. Default is the target Actor's default build.
94
- * @param options.contentType - Content type of the input. If specified, input must be a string or Buffer.
101
+ * @param options.timeoutSecs - Timeout for the API request. Default is `'medium'`.
95
102
  * @returns The metamorphed ActorRun object (same ID, but now running the target Actor)
96
103
  * @see https://docs.apify.com/api/v2/actor-run-metamorph-post
97
104
  *
@@ -105,7 +112,7 @@ export declare class RunClient extends ResourceClient {
105
112
  * console.log(`Run ${metamorphedRun.id} is now running ${metamorphedRun.actId}`);
106
113
  * ```
107
114
  */
108
- metamorph(targetActorId: string, input: unknown, options?: RunMetamorphOptions): Promise<ActorRun>;
115
+ metamorph(targetActorId: string, input?: ActorInput, options?: RunMetamorphOptions): Promise<ActorRun>;
109
116
  /**
110
117
  * Reboots the Actor run.
111
118
  *
@@ -113,6 +120,8 @@ export declare class RunClient extends ResourceClient {
113
120
  * This can be useful to recover from certain errors or to force the Actor to restart
114
121
  * with a fresh environment.
115
122
  *
123
+ * @param options - Request options
124
+ * @param options.timeoutSecs - Timeout for the API request. Default is `'medium'`.
116
125
  * @returns The updated ActorRun object
117
126
  * @see https://docs.apify.com/api/v2/actor-run-reboot-post
118
127
  *
@@ -122,7 +131,7 @@ export declare class RunClient extends ResourceClient {
122
131
  * ```
123
132
  * @since Added in 2.8.0
124
133
  */
125
- reboot(): Promise<ActorRun>;
134
+ reboot(options?: TimeoutOptions): Promise<ActorRun>;
126
135
  /**
127
136
  * Updates the Actor run with specified fields.
128
137
  *
@@ -130,6 +139,8 @@ export declare class RunClient extends ResourceClient {
130
139
  * @param newFields.statusMessage - Custom status message to display (e.g., "Processing page 10/100")
131
140
  * @param newFields.isStatusMessageTerminal - If `true`, the status message is final and won't be overwritten. Default is `false`.
132
141
  * @param newFields.generalAccess - General resource access level ('FOLLOW_USER_SETTING', 'ANYONE_WITH_ID_CAN_READ' or 'RESTRICTED')
142
+ * @param options - Request options
143
+ * @param options.timeoutSecs - Timeout for the API request. Default is `'short'`.
133
144
  * @returns The updated ActorRun object
134
145
  *
135
146
  * @example
@@ -141,7 +152,7 @@ export declare class RunClient extends ResourceClient {
141
152
  * ```
142
153
  * @since Added in 2.6.0
143
154
  */
144
- update(newFields: RunUpdateOptions): Promise<ActorRun>;
155
+ update(newFields: RunUpdateOptions, options?: TimeoutOptions): Promise<ActorRun>;
145
156
  /**
146
157
  * Resurrects a finished Actor run, starting it again with the same settings.
147
158
  *
@@ -151,10 +162,11 @@ export declare class RunClient extends ResourceClient {
151
162
  * @param options - Resurrection options (override original run settings)
152
163
  * @param options.build - Tag or number of the build to use. If not provided, uses the original run's build.
153
164
  * @param options.memory - Memory in megabytes. If not provided, uses the original run's memory.
154
- * @param options.timeout - Timeout in seconds. If not provided, uses the original run's timeout.
165
+ * @param options.runTimeoutSecs - Timeout for the resurrected run in seconds. If not provided, uses the original run's timeout.
155
166
  * @param options.maxItems - Maximum number of dataset items (pay-per-result Actors).
156
167
  * @param options.maxTotalChargeUsd - Maximum cost in USD (pay-per-event Actors).
157
168
  * @param options.restartOnError - Whether to restart on error.
169
+ * @param options.timeoutSecs - Timeout for the API request. Default is `'medium'`.
158
170
  * @returns The new (resurrected) ActorRun object
159
171
  * @see https://docs.apify.com/api/v2/post-resurrect-run
160
172
  *
@@ -173,6 +185,7 @@ export declare class RunClient extends ResourceClient {
173
185
  * @param options.eventName - **Required.** Name of the event to charge for.
174
186
  * @param options.count - Number of times to charge the event. Default is 1.
175
187
  * @param options.idempotencyKey - Optional key to ensure the charge is not duplicated. If not provided, one is auto-generated.
188
+ * @param options.timeoutSecs - Timeout for the API request. Default is `'short'`.
176
189
  * @returns Empty response object.
177
190
  * @see https://docs.apify.com/api/v2/post-charge-run
178
191
  * @since Added in 2.11.0
@@ -191,7 +204,8 @@ export declare class RunClient extends ResourceClient {
191
204
  *
192
205
  * @param options - Wait options
193
206
  * @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.
194
- * @returns The ActorRun object (finished or still running if timeout was reached)
207
+ * @param options.timeoutSecs - Timeout for each polling API request. Default is `'noTimeout'`.
208
+ * @returns The ActorRun object (finished or still running if the timeout was reached)
195
209
  *
196
210
  * @example
197
211
  * ```javascript
@@ -210,6 +224,8 @@ export declare class RunClient extends ResourceClient {
210
224
  /**
211
225
  * Returns a client for the default dataset of this Actor run.
212
226
  *
227
+ * A 404 from this client throws an `ApifyApiError`, since the run itself may be what is missing.
228
+ *
213
229
  * @returns A client for accessing the run's default dataset
214
230
  * @see https://docs.apify.com/api/v2/actor-run-get
215
231
  *
@@ -223,6 +239,9 @@ export declare class RunClient extends ResourceClient {
223
239
  /**
224
240
  * Returns a client for the default key-value store of this Actor run.
225
241
  *
242
+ * `get()` and `delete()` throw an `ApifyApiError` on a 404, since the run itself may be what is missing. Record
243
+ * lookups such as `getRecord()` read a 404 as a missing record.
244
+ *
226
245
  * @returns A client for accessing the run's default key-value store
227
246
  * @see https://docs.apify.com/api/v2/actor-run-get
228
247
  *
@@ -236,6 +255,9 @@ export declare class RunClient extends ResourceClient {
236
255
  /**
237
256
  * Returns a client for the default Request queue of this Actor run.
238
257
  *
258
+ * `get()` and `delete()` throw an `ApifyApiError` on a 404, since the run itself may be what is missing.
259
+ * `getRequest()` reads a 404 as a missing request.
260
+ *
239
261
  * @returns A client for accessing the run's default Request queue
240
262
  * @see https://docs.apify.com/api/v2/actor-run-get
241
263
  *
@@ -249,6 +271,8 @@ export declare class RunClient extends ResourceClient {
249
271
  /**
250
272
  * Returns a client for accessing the log of this Actor run.
251
273
  *
274
+ * A 404 from this client throws an `ApifyApiError`, since the run itself may be what is missing.
275
+ *
252
276
  * @returns A client for accessing the run's log
253
277
  * @see https://docs.apify.com/api/v2/actor-run-get
254
278
  *
@@ -262,6 +286,11 @@ export declare class RunClient extends ResourceClient {
262
286
  log(): LogClient;
263
287
  /**
264
288
  * Get StreamedLog for convenient streaming of the run log and their redirection.
289
+ *
290
+ * @param options - Streaming options
291
+ * @param options.toLog - Log instance to redirect the run log to. Use `'default'` for a preconfigured one, or `null` to disable the redirection.
292
+ * @param options.fromStart - If `true`, the log is streamed from its beginning. Default is `true`.
293
+ * @param options.timeoutSecs - Timeout for the API requests that fetch the run and its Actor. Default is `'long'`.
265
294
  * @since Added in 2.20.0
266
295
  */
267
296
  getStreamedLog(options?: GetStreamedLogOptions): Promise<StreamedLog | undefined>;
@@ -270,26 +299,31 @@ export declare class RunClient extends ResourceClient {
270
299
  * Options for getting a streamed log.
271
300
  * @since Added in 2.20.0
272
301
  */
273
- export interface GetStreamedLogOptions {
302
+ export interface GetStreamedLogOptions extends TimeoutOptions {
274
303
  toLog?: Log | null | 'default';
275
304
  fromStart?: boolean;
276
305
  }
277
306
  /**
278
307
  * Options for getting a Run.
279
308
  */
280
- export interface RunGetOptions {
309
+ export interface RunGetOptions extends TimeoutOptions {
281
310
  waitForFinish?: number;
282
311
  }
283
312
  /**
284
313
  * Options for aborting a Run.
285
314
  */
286
- export interface RunAbortOptions {
315
+ export interface RunAbortOptions extends TimeoutOptions {
287
316
  gracefully?: boolean;
288
317
  }
289
318
  /**
290
319
  * Options for metamorphing a Run into another Actor.
291
320
  */
292
- export interface RunMetamorphOptions {
321
+ export interface RunMetamorphOptions extends TimeoutOptions {
322
+ /**
323
+ * Content type of the request body, which becomes the content type of the run's `INPUT` record.
324
+ * Without it, an input is serialized to JSON and sent as `application/json`. Pairing an object
325
+ * with `application/x-www-form-urlencoded` form-encodes it instead.
326
+ */
293
327
  contentType?: string;
294
328
  build?: string;
295
329
  }
@@ -311,10 +345,11 @@ export interface RunUpdateOptions {
311
345
  /**
312
346
  * Options for resurrecting a finished Run.
313
347
  */
314
- export interface RunResurrectOptions {
348
+ export interface RunResurrectOptions extends TimeoutOptions {
315
349
  build?: string;
316
350
  memory?: number;
317
- timeout?: number;
351
+ /** Timeout for the resurrected run in seconds. If not provided, the run keeps its original timeout. */
352
+ runTimeoutSecs?: number;
318
353
  /**
319
354
  * @since Added in 2.12.1
320
355
  */
@@ -332,7 +367,7 @@ export interface RunResurrectOptions {
332
367
  * Options for charging events in a pay-per-event Actor run.
333
368
  * @since Added in 2.11.0
334
369
  */
335
- export interface RunChargeOptions {
370
+ export interface RunChargeOptions extends TimeoutOptions {
336
371
  /** Name of the event to charge. Must be defined in the Actor's pricing info else the API will throw. */
337
372
  eventName: string;
338
373
  /** Defaults to 1 */
@@ -343,7 +378,7 @@ export interface RunChargeOptions {
343
378
  /**
344
379
  * Options for waiting for a Run to finish.
345
380
  */
346
- export interface RunWaitForFinishOptions {
381
+ export interface RunWaitForFinishOptions extends TimeoutOptions {
347
382
  /**
348
383
  * Maximum time to wait for the run to finish, in seconds.
349
384
  * If the limit is reached, the returned promise is resolved to a run object that will have