apify 3.7.3-beta.9 → 4.0.0-beta.13
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/actor.d.ts +19 -4
- package/dist/actor.js +207 -239
- package/dist/apify_storage_client.d.ts +54 -0
- package/dist/apify_storage_client.js +152 -0
- package/dist/charging.js +45 -122
- package/dist/configuration.d.ts +79 -141
- package/dist/configuration.js +117 -171
- package/dist/index.js +8 -22
- package/dist/input-schemas.js +12 -18
- package/dist/key_value_store.d.ts +8 -3
- package/dist/key_value_store.js +22 -21
- package/dist/platform_event_manager.d.ts +0 -5
- package/dist/platform_event_manager.js +18 -34
- package/dist/proxy_configuration.d.ts +26 -55
- package/dist/proxy_configuration.js +80 -174
- package/dist/storage.d.ts +6 -4
- package/dist/storage.js +17 -17
- package/dist/utils.d.ts +5 -0
- package/dist/utils.js +39 -23
- package/package.json +16 -15
- package/dist/index.mjs +0 -19
- package/dist/patched_apify_client.d.ts +0 -25
- package/dist/patched_apify_client.js +0 -70
package/dist/actor.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EventManager, EventTypeName, RecordOptions, UseStateOptions } from '@crawlee/core';
|
|
2
2
|
import { Dataset, RequestQueue } from '@crawlee/core';
|
|
3
3
|
import type { Awaitable, Dictionary, SetStatusMessageOptions, StorageClient } from '@crawlee/types';
|
|
4
|
-
import type { ActorCallOptions, ActorStartOptions,
|
|
5
|
-
import { ActorRun as ClientActorRun } from 'apify-client';
|
|
4
|
+
import type { ActorCallOptions, ActorStartOptions, ApifyClientOptions, RunAbortOptions, TaskCallOptions, Webhook, WebhookEventType } from 'apify-client';
|
|
5
|
+
import { ActorRun as ClientActorRun, ApifyClient } from 'apify-client';
|
|
6
6
|
import { type ACTOR_PERMISSION_LEVEL } from '@apify/consts';
|
|
7
7
|
import type { ChargeOptions, ChargeResult } from './charging.js';
|
|
8
8
|
import { ChargingManager } from './charging.js';
|
|
9
|
+
import type { ConfigurationOptions } from './configuration.js';
|
|
9
10
|
import { Configuration } from './configuration.js';
|
|
10
11
|
import { KeyValueStore } from './key_value_store.js';
|
|
11
12
|
import type { ProxyConfigurationOptions } from './proxy_configuration.js';
|
|
@@ -26,6 +27,20 @@ export interface InitOptions {
|
|
|
26
27
|
*/
|
|
27
28
|
gracefulShutdownDelayMillis?: number;
|
|
28
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Options accepted by the {@link Actor} constructor. Either pass field-level
|
|
32
|
+
* overrides (`token`, `inputKey`, …) — which the Actor turns into a fresh
|
|
33
|
+
* {@link Configuration} — or pass a pre-built `configuration` instance. When
|
|
34
|
+
* both are present, `configuration` wins and the field-level overrides are
|
|
35
|
+
* ignored.
|
|
36
|
+
*/
|
|
37
|
+
export type ActorOptions = ConfigurationOptions & {
|
|
38
|
+
/**
|
|
39
|
+
* Pre-built {@link Configuration} instance the Actor should use. Takes
|
|
40
|
+
* precedence over any field-level overrides also passed in `options`.
|
|
41
|
+
*/
|
|
42
|
+
configuration?: Configuration;
|
|
43
|
+
};
|
|
29
44
|
export interface ExitOptions {
|
|
30
45
|
/** Exit with given status message */
|
|
31
46
|
statusMessage?: string;
|
|
@@ -328,7 +343,7 @@ export declare class Actor<Data extends Dictionary = Dictionary> {
|
|
|
328
343
|
* @internal
|
|
329
344
|
*/
|
|
330
345
|
purgedStorageAliases: Set<string>;
|
|
331
|
-
constructor(options?:
|
|
346
|
+
constructor(options?: ActorOptions);
|
|
332
347
|
/**
|
|
333
348
|
* Runs the main user function that performs the job of the Actor
|
|
334
349
|
* and terminates the process when the user function finishes.
|