apify-client 3.0.0-beta.40 → 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.
@@ -4,6 +4,7 @@ import type { ApiClientSubResourceOptions } from '../base/api_client.js';
4
4
  import { ResourceClient } from '../base/resource_client.js';
5
5
  import type { Actor, ActorRun } from '../models.js';
6
6
  import type { TimeoutOptions } from '../timeouts.js';
7
+ import type { Dictionary } from '../utils.js';
7
8
  import { ActorVersionClient } from './actor_version.js';
8
9
  import { ActorVersionCollectionClient } from './actor_version_collection.js';
9
10
  import type { Build, BuildClientGetOptions } from './build.js';
@@ -74,7 +75,8 @@ export declare class ActorClient extends ResourceClient {
74
75
  * asynchronously and this method returns immediately without waiting for completion.
75
76
  * Use the {@link call} method if you want to wait for the Actor to finish.
76
77
  *
77
- * @param input - Input for the Actor, serialized to JSON. Omit it to run the Actor without input.
78
+ * @param input - Input for the Actor: an object or array serialized to JSON, or raw bytes sent as they are.
79
+ * Omit it to run the Actor without input.
78
80
  * @param options - Run configuration options
79
81
  * @param options.build - Tag or number of the build to run (e.g., `'beta'` or `'1.2.345'`). If not provided, uses the default build.
80
82
  * @param options.memory - Memory in megabytes allocated for the run. If not provided, uses the Actor's default memory setting.
@@ -109,7 +111,8 @@ export declare class ActorClient extends ResourceClient {
109
111
  * by polling the run status. It optionally streams logs to the console or a custom Log instance.
110
112
  * By default, it waits indefinitely unless the `waitSecs` option is provided.
111
113
  *
112
- * @param input - Input for the Actor, serialized to JSON. Omit it to run the Actor without input.
114
+ * @param input - Input for the Actor: an object or array serialized to JSON, or raw bytes sent as they are.
115
+ * Omit it to run the Actor without input.
113
116
  * @param options - Run configuration options (extends all options from {@link start})
114
117
  * @param options.waitSecs - Maximum time to wait for the run to finish, in seconds. If omitted, waits indefinitely.
115
118
  * @param options.log - Log instance for streaming run logs. Use `'default'` for console output, `null` to disable logging, or provide a custom Log instance.
@@ -148,7 +151,8 @@ export declare class ActorClient extends ResourceClient {
148
151
  * invalid, the API responds with an error that is thrown as an `ApifyApiError` describing the
149
152
  * validation problem.
150
153
  *
151
- * @param input - Input to validate against the Actor's input schema, serialized to JSON.
154
+ * @param input - Input to validate against the Actor's input schema: an object or array serialized to JSON, or
155
+ * raw bytes sent as they are.
152
156
  * @param options - Validation options
153
157
  * @param options.build - Tag or number of the build whose input schema the input is validated against
154
158
  * (e.g., `'latest'` or `'1.2.345'`). If not provided, uses the default build.
@@ -293,10 +297,12 @@ export type ActorUpdateOptions = Partial<Pick<Actor, 'name' | 'description' | 'i
293
297
  * Input for an Actor run, as taken by {@link ActorClient.start}, {@link ActorClient.call},
294
298
  * {@link ActorClient.validateInput} and {@link RunClient.metamorph}.
295
299
  *
296
- * An object or an array. Declared as `object` rather than an index-signature type such as
297
- * `Dictionary`, which would reject a caller's own `interface`.
300
+ * A plain object or an array of plain objects, serialized into the request body, or raw bytes
301
+ * (a `Uint8Array` such as a `Buffer`, or an `ArrayBuffer`) sent as they are, typically with a
302
+ * `contentType`. An input typed as an `interface` or a class needs a spread (`{ ...input }`), or for
303
+ * an interface a `type` alias, to compile.
298
304
  */
299
- export type ActorInput = object;
305
+ export type ActorInput = Dictionary | readonly Dictionary[] | Uint8Array | ArrayBuffer;
300
306
  export interface ActorStartOptions extends TimeoutOptions {
301
307
  /**
302
308
  * Tag or number of the Actor build to run (e.g. `beta` or `1.2.345`).
@@ -131,7 +131,8 @@ export class ActorClient extends ResourceClient {
131
131
  * asynchronously and this method returns immediately without waiting for completion.
132
132
  * Use the {@link call} method if you want to wait for the Actor to finish.
133
133
  *
134
- * @param input - Input for the Actor, serialized to JSON. Omit it to run the Actor without input.
134
+ * @param input - Input for the Actor: an object or array serialized to JSON, or raw bytes sent as they are.
135
+ * Omit it to run the Actor without input.
135
136
  * @param options - Run configuration options
136
137
  * @param options.build - Tag or number of the build to run (e.g., `'beta'` or `'1.2.345'`). If not provided, uses the default build.
137
138
  * @param options.memory - Memory in megabytes allocated for the run. If not provided, uses the Actor's default memory setting.
@@ -198,7 +199,8 @@ export class ActorClient extends ResourceClient {
198
199
  * by polling the run status. It optionally streams logs to the console or a custom Log instance.
199
200
  * By default, it waits indefinitely unless the `waitSecs` option is provided.
200
201
  *
201
- * @param input - Input for the Actor, serialized to JSON. Omit it to run the Actor without input.
202
+ * @param input - Input for the Actor: an object or array serialized to JSON, or raw bytes sent as they are.
203
+ * Omit it to run the Actor without input.
202
204
  * @param options - Run configuration options (extends all options from {@link start})
203
205
  * @param options.waitSecs - Maximum time to wait for the run to finish, in seconds. If omitted, waits indefinitely.
204
206
  * @param options.log - Log instance for streaming run logs. Use `'default'` for console output, `null` to disable logging, or provide a custom Log instance.
@@ -253,7 +255,8 @@ export class ActorClient extends ResourceClient {
253
255
  * invalid, the API responds with an error that is thrown as an `ApifyApiError` describing the
254
256
  * validation problem.
255
257
  *
256
- * @param input - Input to validate against the Actor's input schema, serialized to JSON.
258
+ * @param input - Input to validate against the Actor's input schema: an object or array serialized to JSON, or
259
+ * raw bytes sent as they are.
257
260
  * @param options - Validation options
258
261
  * @param options.build - Tag or number of the build whose input schema the input is validated against
259
262
  * (e.g., `'latest'` or `'1.2.345'`). If not provided, uses the default build.
@@ -94,7 +94,8 @@ export declare class RunClient extends ResourceClient {
94
94
  * This is useful for chaining Actor executions or implementing complex workflows.
95
95
  *
96
96
  * @param targetActorId - ID or username/name of the target Actor
97
- * @param input - Input for the target Actor, serialized to JSON. Omit it to metamorph without input.
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.
98
99
  * @param options - Metamorph options
99
100
  * @param options.build - Tag or number of the target Actor's build to run. Default is the target Actor's default build.
100
101
  * @param options.timeoutSecs - Timeout for the API request. Default is `'medium'`.
@@ -140,7 +140,8 @@ export class RunClient extends ResourceClient {
140
140
  * This is useful for chaining Actor executions or implementing complex workflows.
141
141
  *
142
142
  * @param targetActorId - ID or username/name of the target Actor
143
- * @param input - Input for the target Actor, serialized to JSON. Omit it to metamorph without input.
143
+ * @param input - Input for the target Actor: an object or array serialized to JSON, or raw bytes sent as they
144
+ * are. Omit it to metamorph without input.
144
145
  * @param options - Metamorph options
145
146
  * @param options.build - Tag or number of the target Actor's build to run. Default is the target Actor's default build.
146
147
  * @param options.timeoutSecs - Timeout for the API request. Default is `'medium'`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apify-client",
3
- "version": "3.0.0-beta.40",
3
+ "version": "3.0.0-beta.41",
4
4
  "description": "Apify API client for JavaScript",
5
5
  "engines": {
6
6
  "node": ">=22.0.0"