apify-client 3.0.0-beta.1 → 3.0.0-beta.100
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/README.md +21 -5
- package/dist/apify_api_error.d.ts +64 -22
- package/dist/apify_api_error.js +100 -30
- package/dist/apify_client.d.ts +150 -35
- package/dist/apify_client.js +198 -118
- package/dist/apify_client_error.d.ts +10 -0
- package/dist/apify_client_error.js +10 -0
- package/dist/base/api_client.d.ts +9 -9
- package/dist/base/api_client.js +41 -45
- package/dist/base/resource_client.d.ts +24 -10
- package/dist/base/resource_client.js +78 -48
- package/dist/base/resource_collection_client.d.ts +15 -6
- package/dist/base/resource_collection_client.js +40 -21
- package/dist/body_parser.d.ts +3 -4
- package/dist/body_parser.js +20 -32
- package/dist/bundle.js +47 -52
- package/dist/bundle.js.map +1 -1
- package/dist/generated/api.d.ts +3363 -1185
- package/dist/generated/api.js +1 -2
- package/dist/generated/schemas.d.ts +8146 -0
- package/dist/generated/schemas.js +1866 -0
- package/dist/http_clients/axios.d.ts +61 -0
- package/dist/http_clients/axios.js +119 -0
- package/dist/http_clients/base.d.ts +391 -0
- package/dist/http_clients/base.js +650 -0
- package/dist/http_clients/index.d.ts +4 -0
- package/dist/http_clients/index.js +2 -0
- package/dist/http_compressors/base.d.ts +40 -0
- package/dist/http_compressors/base.js +9 -0
- package/dist/http_compressors/brotli.d.ts +33 -0
- package/dist/http_compressors/brotli.js +39 -0
- package/dist/http_compressors/gzip.d.ts +33 -0
- package/dist/http_compressors/gzip.js +39 -0
- package/dist/http_compressors/index.d.ts +8 -0
- package/dist/http_compressors/index.js +3 -0
- package/dist/http_compressors/resolve.d.ts +24 -0
- package/dist/http_compressors/resolve.js +30 -0
- package/dist/http_compressors/zstd.d.ts +34 -0
- package/dist/http_compressors/zstd.js +43 -0
- package/dist/index.d.ts +38 -32
- package/dist/index.js +36 -36
- package/dist/invalid_response_body_error.d.ts +14 -0
- package/dist/invalid_response_body_error.js +18 -0
- package/dist/lazy_schema.d.ts +8 -0
- package/dist/lazy_schema.js +11 -0
- package/dist/models.d.ts +196 -278
- package/dist/models.js +14 -15
- package/dist/resource_clients/actor.d.ts +115 -45
- package/dist/resource_clients/actor.js +187 -116
- package/dist/resource_clients/actor_collection.d.ts +21 -17
- package/dist/resource_clients/actor_collection.js +26 -21
- package/dist/resource_clients/actor_env_var.d.ts +13 -6
- package/dist/resource_clients/actor_env_var.js +21 -14
- package/dist/resource_clients/actor_env_var_collection.d.ts +18 -22
- package/dist/resource_clients/actor_env_var_collection.js +23 -20
- package/dist/resource_clients/actor_server.d.ts +149 -0
- package/dist/resource_clients/actor_server.js +199 -0
- package/dist/resource_clients/actor_version.d.ts +30 -10
- package/dist/resource_clients/actor_version.js +29 -23
- package/dist/resource_clients/actor_version_collection.d.ts +20 -21
- package/dist/resource_clients/actor_version_collection.js +25 -20
- package/dist/resource_clients/build.d.ts +24 -11
- package/dist/resource_clients/build.js +43 -26
- package/dist/resource_clients/build_collection.d.ts +10 -8
- package/dist/resource_clients/build_collection.js +13 -13
- package/dist/resource_clients/dataset.d.ts +87 -40
- package/dist/resource_clients/dataset.js +159 -175
- package/dist/resource_clients/dataset_collection.d.ts +13 -9
- package/dist/resource_clients/dataset_collection.js +29 -21
- package/dist/resource_clients/key_value_store.d.ts +110 -28
- package/dist/resource_clients/key_value_store.js +177 -99
- package/dist/resource_clients/key_value_store_collection.d.ts +13 -9
- package/dist/resource_clients/key_value_store_collection.js +29 -21
- package/dist/resource_clients/log.d.ts +42 -23
- package/dist/resource_clients/log.js +156 -85
- package/dist/resource_clients/request_queue.d.ts +77 -38
- package/dist/resource_clients/request_queue.js +251 -172
- package/dist/resource_clients/request_queue_collection.d.ts +12 -8
- package/dist/resource_clients/request_queue_collection.js +23 -20
- package/dist/resource_clients/run.d.ts +134 -34
- package/dist/resource_clients/run.js +225 -84
- package/dist/resource_clients/run_collection.d.ts +8 -6
- package/dist/resource_clients/run_collection.js +18 -18
- package/dist/resource_clients/schedule.d.ts +20 -11
- package/dist/resource_clients/schedule.js +36 -30
- package/dist/resource_clients/schedule_collection.d.ts +10 -6
- package/dist/resource_clients/schedule_collection.js +20 -17
- package/dist/resource_clients/store_collection.d.ts +9 -7
- package/dist/resource_clients/store_collection.js +18 -18
- package/dist/resource_clients/task.d.ts +44 -21
- package/dist/resource_clients/task.js +116 -86
- package/dist/resource_clients/task_collection.d.ts +13 -9
- package/dist/resource_clients/task_collection.js +19 -16
- package/dist/resource_clients/user.d.ts +22 -13
- package/dist/resource_clients/user.js +46 -47
- package/dist/resource_clients/webhook.d.ts +21 -12
- package/dist/resource_clients/webhook.js +35 -30
- package/dist/resource_clients/webhook_collection.d.ts +11 -7
- package/dist/resource_clients/webhook_collection.js +20 -17
- package/dist/resource_clients/webhook_dispatch.d.ts +9 -6
- package/dist/resource_clients/webhook_dispatch.js +11 -10
- package/dist/resource_clients/webhook_dispatch_collection.d.ts +7 -5
- package/dist/resource_clients/webhook_dispatch_collection.js +13 -13
- package/dist/response_validation_error.d.ts +27 -0
- package/dist/response_validation_error.js +38 -0
- package/dist/runtime/node.d.ts +6 -0
- package/dist/runtime/node.js +87 -0
- package/dist/runtime/types.d.ts +60 -0
- package/dist/runtime/types.js +1 -0
- package/dist/runtime/web.d.ts +5 -0
- package/dist/runtime/web.js +21 -0
- package/dist/schemas.d.ts +381 -0
- package/dist/schemas.js +37 -0
- package/dist/statistics.d.ts +1 -6
- package/dist/statistics.js +7 -11
- package/dist/timeouts.d.ts +84 -0
- package/dist/timeouts.js +37 -0
- package/dist/timezones.d.ts +1 -1
- package/dist/timezones.js +1 -2
- package/dist/utils.d.ts +99 -70
- package/dist/utils.js +251 -229
- package/dist/wait_for_resources.d.ts +8 -0
- package/dist/wait_for_resources.js +39 -0
- package/package.json +48 -47
- package/dist/argument_validation_error.d.ts +0 -17
- package/dist/argument_validation_error.js +0 -157
- package/dist/http_client.d.ts +0 -88
- package/dist/http_client.js +0 -260
- package/dist/index.mjs +0 -42
- package/dist/interceptors.d.ts +0 -19
- package/dist/interceptors.js +0 -110
package/dist/models.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Public models adapted from the generated OpenAPI types in `./generated/api`.
|
|
3
3
|
*
|
|
4
|
+
* Each model takes the name of the spec schema it is declared on, as the Python client does.
|
|
5
|
+
*
|
|
4
6
|
* The generated file is never re-exported directly. Every type here is declared on top of a generated
|
|
5
7
|
* schema so the compiler reports drift, and the spec is adopted as-is wherever it is trustworthy. What
|
|
6
8
|
* remains is deliberately small, and each deviation falls into exactly one of five kinds, one block per
|
|
@@ -24,14 +26,14 @@
|
|
|
24
26
|
* nullability and optionality are adopted rather than papered over.
|
|
25
27
|
*/
|
|
26
28
|
import type { ACTOR_JOB_STATUSES, ACTOR_PERMISSION_LEVEL, META_ORIGINS, RUN_GENERAL_ACCESS, STORAGE_GENERAL_ACCESS, ValueOf, WEBHOOK_EVENT_TYPES } from '@apify/consts';
|
|
27
|
-
import type { components } from './generated/api';
|
|
28
|
-
import type { Timezone } from './timezones';
|
|
29
|
-
import type { Dictionary } from './utils';
|
|
29
|
+
import type { components } from './generated/api.js';
|
|
30
|
+
import type { Timezone } from './timezones.js';
|
|
31
|
+
import type { Dictionary } from './utils.js';
|
|
30
32
|
type Schemas = components['schemas'];
|
|
31
33
|
/**
|
|
32
34
|
* Event types that can trigger webhooks.
|
|
33
35
|
*
|
|
34
|
-
* Declared here rather than in `./resource_clients/webhook` so that both `
|
|
36
|
+
* Declared here rather than in `./resource_clients/webhook` so that both `WebhookResource` and
|
|
35
37
|
* `WebhookDispatch` can reference it without closing an import cycle. It is re-exported from there, so
|
|
36
38
|
* the public name and import path are unchanged.
|
|
37
39
|
*/
|
|
@@ -48,20 +50,25 @@ export declare enum WebhookDispatchStatus {
|
|
|
48
50
|
Succeeded = "SUCCEEDED",
|
|
49
51
|
Failed = "FAILED"
|
|
50
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Machine-readable type of an error returned by the Apify API, carried by `ApifyApiError.type`.
|
|
55
|
+
*
|
|
56
|
+
* Declared here, next to the other spec-derived types, and re-exported from `./apify_api_error`.
|
|
57
|
+
*/
|
|
58
|
+
export type ErrorType = Schemas['ErrorType'];
|
|
51
59
|
/**
|
|
52
60
|
* Fields the API returns on a dataset that the OpenAPI spec does not describe yet.
|
|
53
61
|
*
|
|
54
62
|
* TODO: Remove once the spec covers them.
|
|
55
63
|
*/
|
|
56
|
-
export interface
|
|
57
|
-
title?: string;
|
|
64
|
+
export interface DatasetResourceSpecGaps {
|
|
58
65
|
username?: string;
|
|
59
66
|
}
|
|
60
|
-
export interface
|
|
67
|
+
export interface DatasetResourceRePointed {
|
|
61
68
|
stats?: DatasetStats;
|
|
62
|
-
}
|
|
63
|
-
export interface DatasetSpecNarrowings {
|
|
64
69
|
generalAccess?: STORAGE_GENERAL_ACCESS | null;
|
|
70
|
+
}
|
|
71
|
+
export interface DatasetResourceSpecNarrowings {
|
|
65
72
|
consoleUrl?: string;
|
|
66
73
|
}
|
|
67
74
|
/**
|
|
@@ -70,7 +77,7 @@ export interface DatasetSpecNarrowings {
|
|
|
70
77
|
* Datasets store structured data as a sequence of items (records). Each item is a JSON object.
|
|
71
78
|
* Datasets are useful for storing results from web scraping, crawling, or data processing tasks.
|
|
72
79
|
*/
|
|
73
|
-
export interface
|
|
80
|
+
export interface DatasetResource extends Omit<Schemas['DatasetResource'], keyof DatasetResourceRePointed | keyof DatasetResourceSpecNarrowings>, DatasetResourceRePointed, DatasetResourceSpecNarrowings, DatasetResourceSpecGaps {
|
|
74
81
|
}
|
|
75
82
|
/**
|
|
76
83
|
* Fields the API returns in dataset stats that the OpenAPI spec does not describe yet.
|
|
@@ -93,7 +100,7 @@ export interface DatasetStatisticsRePointed {
|
|
|
93
100
|
* Statistics such as `min`, `max`, `nullCount` and `emptyCount` for each field of the dataset's
|
|
94
101
|
* [fields schema](https://docs.apify.com/platform/actors/development/actor-definition/dataset-schema/validation).
|
|
95
102
|
*/
|
|
96
|
-
fieldStatistics?: Record<string,
|
|
103
|
+
fieldStatistics?: Record<string, DatasetFieldStatistics> | null;
|
|
97
104
|
}
|
|
98
105
|
/**
|
|
99
106
|
* Statistical information about dataset fields.
|
|
@@ -107,7 +114,7 @@ export interface DatasetStatistics extends Omit<Schemas['DatasetStatistics'], ke
|
|
|
107
114
|
* Statistics for a single field in a dataset.
|
|
108
115
|
* @since Added in 2.11.2
|
|
109
116
|
*/
|
|
110
|
-
export interface
|
|
117
|
+
export interface DatasetFieldStatistics extends GeneratedDatasetFieldStatistics {
|
|
111
118
|
}
|
|
112
119
|
export interface WebhookDispatchWebhookSummaryRePointed {
|
|
113
120
|
condition?: WebhookCondition;
|
|
@@ -135,18 +142,8 @@ export interface WebhookDispatchEventData extends GeneratedWebhookDispatchEventD
|
|
|
135
142
|
}
|
|
136
143
|
type GeneratedKeyValueStoreStats = Schemas['KeyValueStoreStats'];
|
|
137
144
|
type GeneratedKeyValueStoreKey = Schemas['KeyValueStoreKey'];
|
|
138
|
-
|
|
139
|
-
* Fields the API returns on a key-value store that the OpenAPI spec does not describe yet.
|
|
140
|
-
*
|
|
141
|
-
* TODO: Remove once the spec covers them.
|
|
142
|
-
*/
|
|
143
|
-
export interface KeyValueStoreSpecGaps {
|
|
144
|
-
title?: string;
|
|
145
|
-
}
|
|
146
|
-
export interface KeyValueStoreRePointed {
|
|
145
|
+
export interface KeyValueStoreResourceRePointed {
|
|
147
146
|
stats?: KeyValueStoreStats;
|
|
148
|
-
}
|
|
149
|
-
export interface KeyValueStoreSpecNarrowings {
|
|
150
147
|
generalAccess?: STORAGE_GENERAL_ACCESS | null;
|
|
151
148
|
}
|
|
152
149
|
/**
|
|
@@ -155,23 +152,23 @@ export interface KeyValueStoreSpecNarrowings {
|
|
|
155
152
|
* Key-value stores are used to store arbitrary data records or files. Each record is identified
|
|
156
153
|
* by a unique key and can contain any data - JSON objects, strings, binary files, etc.
|
|
157
154
|
*/
|
|
158
|
-
export interface
|
|
155
|
+
export interface KeyValueStoreResource extends Omit<Schemas['KeyValueStoreResource'], keyof KeyValueStoreResourceRePointed>, KeyValueStoreResourceRePointed {
|
|
159
156
|
}
|
|
160
157
|
/** Statistics about Key-Value Store usage and storage. */
|
|
161
158
|
export interface KeyValueStoreStats extends GeneratedKeyValueStoreStats {
|
|
162
159
|
}
|
|
163
160
|
/** Metadata about a single key in a Key-Value Store. */
|
|
164
|
-
export interface
|
|
161
|
+
export interface KeyValueStoreKey extends GeneratedKeyValueStoreKey {
|
|
165
162
|
}
|
|
166
|
-
export interface
|
|
167
|
-
items:
|
|
163
|
+
export interface ListOfKeysRePointed {
|
|
164
|
+
items: KeyValueStoreKey[];
|
|
168
165
|
}
|
|
169
166
|
/**
|
|
170
167
|
* Result of listing keys in a Key-Value Store.
|
|
171
168
|
*
|
|
172
169
|
* Contains paginated list of keys with metadata and pagination information.
|
|
173
170
|
*/
|
|
174
|
-
export interface
|
|
171
|
+
export interface ListOfKeys extends Omit<Schemas['ListOfKeys'], keyof ListOfKeysRePointed>, ListOfKeysRePointed {
|
|
175
172
|
}
|
|
176
173
|
type GeneratedVersion = Schemas['Version'];
|
|
177
174
|
type GeneratedSourceCodeFile = Schemas['SourceCodeFile'];
|
|
@@ -192,10 +189,10 @@ export declare enum ActorSourceType {
|
|
|
192
189
|
SourceCode = "SOURCE_CODE"
|
|
193
190
|
}
|
|
194
191
|
/** An environment variable of an Actor version. */
|
|
195
|
-
export interface
|
|
192
|
+
export interface EnvVar extends GeneratedEnvVar {
|
|
196
193
|
}
|
|
197
194
|
/** A single file of an Actor version's source code. */
|
|
198
|
-
export interface
|
|
195
|
+
export interface SourceCodeFile extends GeneratedSourceCodeFile {
|
|
199
196
|
}
|
|
200
197
|
/**
|
|
201
198
|
* A folder in an Actor version's source code tree.
|
|
@@ -203,19 +200,20 @@ export interface ActorVersionSourceFile extends GeneratedSourceCodeFile {
|
|
|
203
200
|
* `sourceFiles` is a flat list that mixes files and folders, told apart by this shape's `folder` flag
|
|
204
201
|
* rather than by nesting.
|
|
205
202
|
*/
|
|
206
|
-
export interface
|
|
203
|
+
export interface SourceCodeFolder extends GeneratedSourceCodeFolder {
|
|
207
204
|
}
|
|
208
205
|
/**
|
|
209
206
|
* The four fields that hold a version's source location, exactly one of which applies per source
|
|
210
207
|
* type. The spec marks all of them optional on a single flat schema; each union variant below
|
|
211
208
|
* reinstates the one that its `sourceType` implies, as required.
|
|
212
209
|
*/
|
|
213
|
-
export type
|
|
214
|
-
export interface
|
|
215
|
-
envVars?:
|
|
210
|
+
export type VersionSourceLocation = 'sourceFiles' | 'gitRepoUrl' | 'tarballUrl' | 'gitHubGistUrl';
|
|
211
|
+
export interface VersionRePointed {
|
|
212
|
+
envVars?: EnvVar[] | null;
|
|
216
213
|
}
|
|
217
|
-
export interface
|
|
218
|
-
sourceType: ActorSourceType
|
|
214
|
+
export interface VersionClientNarrowings {
|
|
215
|
+
sourceType: `${ActorSourceType}`;
|
|
216
|
+
actorPath?: GeneratedVersion['actorPath'];
|
|
219
217
|
}
|
|
220
218
|
/**
|
|
221
219
|
* Fields every Actor version carries, whatever its source type.
|
|
@@ -223,39 +221,52 @@ export interface ActorVersionClientNarrowings {
|
|
|
223
221
|
* The spec models a version as one flat object with all four source locations optional. This client
|
|
224
222
|
* keeps a union discriminated on `sourceType` instead, because that narrows the source location down
|
|
225
223
|
* to the single field which applies -- so the four are dropped here and reinstated per variant.
|
|
224
|
+
* `actorPath` is dropped as well, and only the `SOURCE_FILES` and `TARBALL` variants reinstate it.
|
|
226
225
|
*/
|
|
227
|
-
export interface
|
|
226
|
+
export interface BaseVersion<SourceType extends `${ActorSourceType}`> extends Omit<GeneratedVersion, keyof VersionClientNarrowings | keyof VersionRePointed | VersionSourceLocation>, VersionRePointed {
|
|
228
227
|
sourceType: SourceType;
|
|
229
228
|
}
|
|
230
229
|
/**
|
|
231
230
|
* An Actor version whose source code is stored on the Apify platform.
|
|
232
231
|
* @since Added in 2.6.1
|
|
233
232
|
*/
|
|
234
|
-
export interface
|
|
235
|
-
sourceFiles: (
|
|
233
|
+
export interface VersionSourceFiles extends BaseVersion<`${ActorSourceType.SourceFiles}`> {
|
|
234
|
+
sourceFiles: (SourceCodeFile | SourceCodeFolder)[];
|
|
235
|
+
/**
|
|
236
|
+
* The Actor's folder inside the uploaded source, as a POSIX path relative to the upload root, such as
|
|
237
|
+
* `actors/typescript-actor`. When absent or `null`, the upload root is the Actor's folder. It has 1 to 255
|
|
238
|
+
* characters, with no leading, trailing, or repeated `/` and no `.` or `..` segment.
|
|
239
|
+
*/
|
|
240
|
+
actorPath?: GeneratedVersion['actorPath'];
|
|
236
241
|
}
|
|
237
242
|
/** An Actor version built from a Git repository. */
|
|
238
|
-
export interface
|
|
243
|
+
export interface VersionGitRepo extends BaseVersion<`${ActorSourceType.GitRepo}`> {
|
|
239
244
|
gitRepoUrl: NonNullable<GeneratedVersion['gitRepoUrl']>;
|
|
240
245
|
}
|
|
241
246
|
/** An Actor version built from a downloadable tarball or ZIP archive. */
|
|
242
|
-
export interface
|
|
247
|
+
export interface VersionTarball extends BaseVersion<`${ActorSourceType.Tarball}`> {
|
|
243
248
|
tarballUrl: NonNullable<GeneratedVersion['tarballUrl']>;
|
|
249
|
+
/**
|
|
250
|
+
* The Actor's folder inside the archive, as a POSIX path relative to the archive root, such as
|
|
251
|
+
* `actors/typescript-actor`. When absent or `null`, the archive root is the Actor's folder. It has 1 to 255
|
|
252
|
+
* characters, with no leading, trailing, or repeated `/` and no `.` or `..` segment.
|
|
253
|
+
*/
|
|
254
|
+
actorPath?: GeneratedVersion['actorPath'];
|
|
244
255
|
}
|
|
245
256
|
/** An Actor version built from a GitHub Gist. */
|
|
246
|
-
export interface
|
|
257
|
+
export interface VersionGitHubGist extends BaseVersion<`${ActorSourceType.GitHubGist}`> {
|
|
247
258
|
gitHubGistUrl: NonNullable<GeneratedVersion['gitHubGistUrl']>;
|
|
248
259
|
}
|
|
249
260
|
/**
|
|
250
261
|
* An Actor version whose source is a single inline script.
|
|
251
262
|
*
|
|
252
|
-
* It carries no source location of its own, so it adds nothing to `
|
|
263
|
+
* It carries no source location of its own, so it adds nothing to `BaseVersion`; the variant
|
|
253
264
|
* exists so that `SOURCE_CODE`, which both the spec and `@apify/consts` list, is representable.
|
|
254
265
|
*/
|
|
255
|
-
export interface
|
|
266
|
+
export interface VersionSourceCode extends BaseVersion<`${ActorSourceType.SourceCode}`> {
|
|
256
267
|
}
|
|
257
268
|
/** A version of an Actor, discriminated on where its source code comes from. */
|
|
258
|
-
export type
|
|
269
|
+
export type Version = VersionSourceFiles | VersionGitRepo | VersionTarball | VersionGitHubGist | VersionSourceCode;
|
|
259
270
|
/**
|
|
260
271
|
* An Actor version as the API returns it, where the build tag is always set.
|
|
261
272
|
*
|
|
@@ -263,8 +274,8 @@ export type ActorVersion = ActorVersionSourceFiles | ActorVersionGitRepo | Actor
|
|
|
263
274
|
* `buildTag`, so a caller would still have to null-check a field this type promises is set. It is
|
|
264
275
|
* unwrapped with `NonNullable` instead.
|
|
265
276
|
*/
|
|
266
|
-
export type
|
|
267
|
-
buildTag: NonNullable<
|
|
277
|
+
export type FinalVersion = Version & {
|
|
278
|
+
buildTag: NonNullable<Version['buildTag']>;
|
|
268
279
|
};
|
|
269
280
|
type GeneratedActorStats = Schemas['ActorStats'];
|
|
270
281
|
type GeneratedActorStandby = Schemas['ActorStandby'];
|
|
@@ -284,37 +295,20 @@ export interface ActorStats extends GeneratedActorStats {
|
|
|
284
295
|
export interface ActorStandby extends GeneratedActorStandby {
|
|
285
296
|
}
|
|
286
297
|
/** Example input data to demonstrate Actor usage. */
|
|
287
|
-
export interface
|
|
298
|
+
export interface ExampleRunInput extends GeneratedExampleRunInput {
|
|
288
299
|
}
|
|
289
300
|
/** Information about a specific tagged build. */
|
|
290
|
-
export interface
|
|
301
|
+
export interface TaggedBuildInfo extends GeneratedTaggedBuildInfo {
|
|
291
302
|
}
|
|
292
303
|
/** Mapping of build tags (e.g. 'latest', 'beta') to their corresponding build information. */
|
|
293
|
-
export type
|
|
294
|
-
export interface
|
|
304
|
+
export type TaggedBuilds = Record<string, TaggedBuildInfo | null>;
|
|
305
|
+
export interface DefaultRunOptionsRePointed {
|
|
295
306
|
forcePermissionLevel?: ACTOR_PERMISSION_LEVEL | null;
|
|
296
307
|
}
|
|
297
308
|
/** Default configuration options for Actor runs. */
|
|
298
|
-
export interface
|
|
299
|
-
}
|
|
300
|
-
/**
|
|
301
|
-
* Fields of an Actor definition that the OpenAPI spec does not describe yet.
|
|
302
|
-
*
|
|
303
|
-
* TODO: Remove once the spec covers them.
|
|
304
|
-
*/
|
|
305
|
-
export interface ActorDefinitionSpecGaps {
|
|
306
|
-
/**
|
|
307
|
-
* Output schema for the Actor.
|
|
308
|
-
*
|
|
309
|
-
* @see https://docs.apify.com/platform/actors/development/actor-definition/output-schema
|
|
310
|
-
*/
|
|
311
|
-
output?: object | null;
|
|
312
|
-
}
|
|
313
|
-
export interface ActorDefinitionSpecNarrowings {
|
|
314
|
-
readme?: string | null;
|
|
315
|
-
input?: object | null;
|
|
316
|
-
changelog?: string | null;
|
|
309
|
+
export interface DefaultRunOptions extends Omit<Schemas['DefaultRunOptions'], keyof DefaultRunOptionsRePointed>, DefaultRunOptionsRePointed {
|
|
317
310
|
}
|
|
311
|
+
type GeneratedActorDefinition = Schemas['ActorDefinition'];
|
|
318
312
|
/**
|
|
319
313
|
* Actor definition from the `.actor/actor.json` file.
|
|
320
314
|
*
|
|
@@ -322,7 +316,7 @@ export interface ActorDefinitionSpecNarrowings {
|
|
|
322
316
|
* @see https://docs.apify.com/platform/actors/development/actor-definition/actor-json
|
|
323
317
|
* @since Added in 2.11.0
|
|
324
318
|
*/
|
|
325
|
-
export interface ActorDefinition extends
|
|
319
|
+
export interface ActorDefinition extends GeneratedActorDefinition {
|
|
326
320
|
}
|
|
327
321
|
export interface ActorChargeEventRePointed {
|
|
328
322
|
eventTieredPricingUsd?: TieredPricingPerEvent;
|
|
@@ -361,7 +355,7 @@ export interface PricePerDatasetItemActorPricingInfoRePointed {
|
|
|
361
355
|
*/
|
|
362
356
|
export interface PricePerDatasetItemActorPricingInfo extends Omit<Schemas['PricePerDatasetItemActorPricingInfo'], keyof PricePerDatasetItemActorPricingInfoRePointed>, PricePerDatasetItemActorPricingInfoRePointed {
|
|
363
357
|
}
|
|
364
|
-
export interface
|
|
358
|
+
export interface PayPerEventActorPricingInfoRePointed {
|
|
365
359
|
pricingPerEvent: {
|
|
366
360
|
actorChargeEvents?: ActorChargeEvents;
|
|
367
361
|
};
|
|
@@ -369,17 +363,16 @@ export interface PricePerEventActorPricingInfoRePointed {
|
|
|
369
363
|
/**
|
|
370
364
|
* Pricing information for pay-per-event Actors.
|
|
371
365
|
*
|
|
372
|
-
* These Actors charge based on specific events (e.g., emails sent, API calls made).
|
|
373
|
-
* this schema `PayPerEventActorPricingInfo`; the published name is kept as it is.
|
|
366
|
+
* These Actors charge based on specific events (e.g., emails sent, API calls made).
|
|
374
367
|
* @since Added in 2.11.1
|
|
375
368
|
*/
|
|
376
|
-
export interface
|
|
369
|
+
export interface PayPerEventActorPricingInfo extends Omit<Schemas['PayPerEventActorPricingInfo'], keyof PayPerEventActorPricingInfoRePointed>, PayPerEventActorPricingInfoRePointed {
|
|
377
370
|
}
|
|
378
371
|
/**
|
|
379
372
|
* Union type representing all possible Actor pricing models.
|
|
380
373
|
* @since Added in 2.11.1
|
|
381
374
|
*/
|
|
382
|
-
export type ActorRunPricingInfo =
|
|
375
|
+
export type ActorRunPricingInfo = PayPerEventActorPricingInfo | PricePerDatasetItemActorPricingInfo | FlatPricePerMonthActorPricingInfo | FreeActorPricingInfo;
|
|
383
376
|
/** One subscription tier's price per dataset item. */
|
|
384
377
|
export interface TieredPricingPerDatasetItemEntry extends GeneratedTieredPricingPerDatasetItemEntry {
|
|
385
378
|
}
|
|
@@ -404,17 +397,17 @@ export interface TieredPricingPerEvent {
|
|
|
404
397
|
*
|
|
405
398
|
* TODO: Remove once the spec covers them.
|
|
406
399
|
*/
|
|
407
|
-
export interface
|
|
400
|
+
export interface ActorResourceSpecGaps {
|
|
408
401
|
/** Whether the Actor can be run by anonymous users without authentication */
|
|
409
402
|
isAnonymouslyRunnable?: boolean;
|
|
410
403
|
}
|
|
411
|
-
export interface
|
|
404
|
+
export interface ActorResourceRePointed {
|
|
412
405
|
stats: ActorStats;
|
|
413
|
-
versions:
|
|
406
|
+
versions: Version[];
|
|
414
407
|
pricingInfos?: ActorRunPricingInfo[];
|
|
415
|
-
defaultRunOptions:
|
|
416
|
-
exampleRunInput?:
|
|
417
|
-
taggedBuilds?:
|
|
408
|
+
defaultRunOptions: DefaultRunOptions;
|
|
409
|
+
exampleRunInput?: ExampleRunInput | null;
|
|
410
|
+
taggedBuilds?: TaggedBuilds | null;
|
|
418
411
|
actorStandby?: ActorStandby | null;
|
|
419
412
|
actorPermissionLevel?: ACTOR_PERMISSION_LEVEL;
|
|
420
413
|
}
|
|
@@ -425,17 +418,18 @@ export interface ActorRePointed {
|
|
|
425
418
|
* data processing, automation, and more. Each Actor has versions, builds, and can be executed
|
|
426
419
|
* with different configurations.
|
|
427
420
|
*/
|
|
428
|
-
export interface
|
|
421
|
+
export interface ActorResource extends Omit<Schemas['ActorResource'], keyof ActorResourceRePointed>, ActorResourceRePointed, ActorResourceSpecGaps {
|
|
429
422
|
}
|
|
430
|
-
export interface
|
|
423
|
+
export interface ActorListItemRePointed {
|
|
431
424
|
stats?: ActorStats | null;
|
|
432
425
|
}
|
|
433
426
|
/** An Actor as it appears in a listing, which carries fewer fields than the full resource. */
|
|
434
|
-
export interface
|
|
427
|
+
export interface ActorListItem extends Omit<Schemas['ActorListItem'], keyof ActorListItemRePointed>, ActorListItemRePointed {
|
|
435
428
|
}
|
|
436
429
|
type GeneratedBuildUsage = Schemas['BuildUsage'];
|
|
437
430
|
type GeneratedBuildStats = Schemas['BuildStats'];
|
|
438
431
|
type GeneratedBuildOptions = Schemas['BuildOptions'];
|
|
432
|
+
type GeneratedBuildActVersion = NonNullable<Schemas['Build']['actVersion']>;
|
|
439
433
|
/**
|
|
440
434
|
* Resource usage for an Actor build.
|
|
441
435
|
* @since Added in 2.7.2
|
|
@@ -451,12 +445,8 @@ export interface BuildOptions extends GeneratedBuildOptions {
|
|
|
451
445
|
export interface BuildMetaRePointed {
|
|
452
446
|
origin: ValueOf<typeof META_ORIGINS>;
|
|
453
447
|
}
|
|
454
|
-
/**
|
|
455
|
-
|
|
456
|
-
*
|
|
457
|
-
* The spec names this schema `BuildsMeta`; the published name is kept as it is.
|
|
458
|
-
*/
|
|
459
|
-
export interface BuildMeta extends Omit<Schemas['BuildsMeta'], keyof BuildMetaRePointed>, BuildMetaRePointed {
|
|
448
|
+
/** Metadata about how a Build was initiated. */
|
|
449
|
+
export interface BuildMeta extends Omit<Schemas['BuildMeta'], keyof BuildMetaRePointed>, BuildMetaRePointed {
|
|
460
450
|
}
|
|
461
451
|
export interface BuildRePointed {
|
|
462
452
|
meta: BuildMeta;
|
|
@@ -466,6 +456,10 @@ export interface BuildRePointed {
|
|
|
466
456
|
usageUsd?: BuildUsage | null;
|
|
467
457
|
actorDefinition?: ActorDefinition | null;
|
|
468
458
|
status: ValueOf<typeof ACTOR_JOB_STATUSES>;
|
|
459
|
+
/** The API returns `buildTag` as `null` for some builds, which the specification types as a string. */
|
|
460
|
+
actVersion?: Omit<GeneratedBuildActVersion, 'buildTag'> & {
|
|
461
|
+
buildTag?: string | null;
|
|
462
|
+
};
|
|
469
463
|
}
|
|
470
464
|
/**
|
|
471
465
|
* Represents an Actor build.
|
|
@@ -475,37 +469,37 @@ export interface BuildRePointed {
|
|
|
475
469
|
*/
|
|
476
470
|
export interface Build extends Omit<Schemas['Build'], keyof BuildRePointed>, BuildRePointed {
|
|
477
471
|
}
|
|
478
|
-
export interface
|
|
472
|
+
export interface BuildListItemRePointed {
|
|
479
473
|
meta?: BuildMeta;
|
|
480
474
|
status: ValueOf<typeof ACTOR_JOB_STATUSES>;
|
|
481
475
|
}
|
|
482
476
|
/** A build as it appears in a listing, which carries fewer fields than the full resource. */
|
|
483
|
-
export interface
|
|
477
|
+
export interface BuildListItem extends Omit<Schemas['BuildListItem'], keyof BuildListItemRePointed>, BuildListItemRePointed {
|
|
484
478
|
}
|
|
485
479
|
type GeneratedRunUsage = Schemas['RunUsage'];
|
|
486
480
|
type GeneratedRunStats = Schemas['RunStats'];
|
|
487
481
|
type GeneratedRunOptions = Schemas['RunOptions'];
|
|
488
|
-
type
|
|
482
|
+
type GeneratedRunMetamorphEvent = Schemas['RunMetamorphEvent'];
|
|
489
483
|
type GeneratedRunStorageIds = NonNullable<Schemas['Run']['storageIds']>;
|
|
490
484
|
/**
|
|
491
485
|
* Resource usage metrics for an Actor run.
|
|
492
486
|
*
|
|
493
487
|
* All values represent the total consumption during the run's lifetime. The same shape doubles as the
|
|
494
|
-
* cost breakdown on `
|
|
495
|
-
*
|
|
488
|
+
* cost breakdown on `Run.usageUsd`, where the spec names it `RunUsageUsd`; the two are structurally
|
|
489
|
+
* identical, so the published type stays single.
|
|
496
490
|
* @since Added in 2.7.0
|
|
497
491
|
*/
|
|
498
|
-
export interface
|
|
492
|
+
export interface RunUsage extends GeneratedRunUsage {
|
|
499
493
|
}
|
|
500
494
|
/**
|
|
501
495
|
* Runtime statistics for an Actor run.
|
|
502
496
|
*
|
|
503
497
|
* Provides detailed metrics about resource consumption and performance during the run.
|
|
504
498
|
*/
|
|
505
|
-
export interface
|
|
499
|
+
export interface RunStats extends GeneratedRunStats {
|
|
506
500
|
}
|
|
507
501
|
/** A metamorph event that occurred during an Actor run. */
|
|
508
|
-
export interface
|
|
502
|
+
export interface RunMetamorphEvent extends GeneratedRunMetamorphEvent {
|
|
509
503
|
}
|
|
510
504
|
/**
|
|
511
505
|
* Aliased storage IDs associated with an Actor run, grouped by storage type.
|
|
@@ -516,49 +510,41 @@ export interface ActorRunMetamorph extends GeneratedMetamorph {
|
|
|
516
510
|
*/
|
|
517
511
|
export interface ActorRunStorageIds extends GeneratedRunStorageIds {
|
|
518
512
|
}
|
|
519
|
-
export interface
|
|
513
|
+
export interface RunMetaRePointed {
|
|
520
514
|
origin: ValueOf<typeof META_ORIGINS>;
|
|
521
515
|
}
|
|
522
516
|
/** Metadata about how an Actor run was initiated. */
|
|
523
|
-
export interface
|
|
524
|
-
}
|
|
525
|
-
/**
|
|
526
|
-
* Fields the API returns in an Actor run's options that the OpenAPI spec does not describe yet.
|
|
527
|
-
*
|
|
528
|
-
* TODO: Remove once the spec covers it.
|
|
529
|
-
*/
|
|
530
|
-
export interface ActorRunOptionsSpecGaps {
|
|
531
|
-
restartOnError?: boolean;
|
|
517
|
+
export interface RunMeta extends Omit<Schemas['RunMeta'], keyof RunMetaRePointed>, RunMetaRePointed {
|
|
532
518
|
}
|
|
533
519
|
/**
|
|
534
520
|
* Configuration options used for an Actor run.
|
|
535
521
|
*
|
|
536
522
|
* These are the actual options that were applied to the run (may differ from requested options).
|
|
537
523
|
*/
|
|
538
|
-
export interface
|
|
524
|
+
export interface RunOptions extends GeneratedRunOptions {
|
|
539
525
|
}
|
|
540
|
-
export interface
|
|
541
|
-
meta:
|
|
526
|
+
export interface RunListItemRePointed {
|
|
527
|
+
meta: RunMeta;
|
|
542
528
|
status: ValueOf<typeof ACTOR_JOB_STATUSES>;
|
|
543
529
|
}
|
|
544
530
|
/**
|
|
545
531
|
* An Actor run as it appears in a listing, which carries fewer fields than the full resource.
|
|
546
532
|
* @since Added in 2.7.0
|
|
547
533
|
*/
|
|
548
|
-
export interface
|
|
534
|
+
export interface RunListItem extends Omit<Schemas['RunListItem'], keyof RunListItemRePointed>, RunListItemRePointed {
|
|
549
535
|
}
|
|
550
|
-
export interface
|
|
551
|
-
meta:
|
|
552
|
-
stats:
|
|
553
|
-
options:
|
|
554
|
-
usage?:
|
|
555
|
-
usageUsd?:
|
|
536
|
+
export interface RunRePointed {
|
|
537
|
+
meta: RunMeta;
|
|
538
|
+
stats: RunStats;
|
|
539
|
+
options: RunOptions;
|
|
540
|
+
usage?: RunUsage | null;
|
|
541
|
+
usageUsd?: RunUsage | null;
|
|
556
542
|
storageIds?: ActorRunStorageIds;
|
|
557
|
-
metamorphs?:
|
|
543
|
+
metamorphs?: RunMetamorphEvent[] | null;
|
|
558
544
|
pricingInfo?: ActorRunPricingInfo;
|
|
559
545
|
status: ValueOf<typeof ACTOR_JOB_STATUSES>;
|
|
560
546
|
}
|
|
561
|
-
export interface
|
|
547
|
+
export interface RunClientNarrowings {
|
|
562
548
|
generalAccess?: RUN_GENERAL_ACCESS | null;
|
|
563
549
|
}
|
|
564
550
|
/**
|
|
@@ -567,10 +553,11 @@ export interface ActorRunClientNarrowings {
|
|
|
567
553
|
* Represents a single execution of an Actor with all its configuration, status,
|
|
568
554
|
* and resource usage information.
|
|
569
555
|
*/
|
|
570
|
-
export interface
|
|
556
|
+
export interface Run extends Omit<Schemas['Run'], keyof RunRePointed | keyof RunClientNarrowings>, RunRePointed, RunClientNarrowings {
|
|
571
557
|
}
|
|
572
558
|
type GeneratedTaskStats = Schemas['TaskStats'];
|
|
573
559
|
type GeneratedTaskOptions = Schemas['TaskOptions'];
|
|
560
|
+
type GeneratedTaskPublicConfig = Schemas['TaskPublicConfig'];
|
|
574
561
|
type GeneratedCurrentPricingInfo = Schemas['CurrentPricingInfo'];
|
|
575
562
|
/** Statistics about Actor task usage. */
|
|
576
563
|
export interface TaskStats extends GeneratedTaskStats {
|
|
@@ -586,39 +573,13 @@ export interface TaskOptions extends GeneratedTaskOptions {
|
|
|
586
573
|
* {@apilink TaskClient.unpublish} to change the publication state.
|
|
587
574
|
* @since Added in 2.25.0
|
|
588
575
|
*/
|
|
589
|
-
export interface TaskPublicConfig {
|
|
590
|
-
publishedAt: Date | null;
|
|
591
|
-
seoTitle?: string | null;
|
|
592
|
-
seoDescription?: string | null;
|
|
593
|
-
categorization?: string | null;
|
|
594
|
-
inputSchemaFields?: string[] | null;
|
|
595
|
-
datasetName?: string | null;
|
|
596
|
-
datasetView?: string | null;
|
|
597
|
-
}
|
|
598
|
-
/**
|
|
599
|
-
* Fields the API returns on a task that the OpenAPI spec does not describe yet.
|
|
600
|
-
*
|
|
601
|
-
* TODO: Remove once the spec covers it.
|
|
602
|
-
*/
|
|
603
|
-
export interface TaskSpecGaps {
|
|
604
|
-
description?: string;
|
|
605
|
-
/**
|
|
606
|
-
* Whether the task is published on its public landing page. Derived from
|
|
607
|
-
* `publicConfig.publishedAt` -- set it on update to publish or unpublish the task.
|
|
608
|
-
* @since Added in 2.25.0
|
|
609
|
-
*/
|
|
610
|
-
isPublic?: boolean;
|
|
611
|
-
/**
|
|
612
|
-
* @since Added in 2.25.0
|
|
613
|
-
*/
|
|
614
|
-
publicConfig?: TaskPublicConfig | null;
|
|
576
|
+
export interface TaskPublicConfig extends GeneratedTaskPublicConfig {
|
|
615
577
|
}
|
|
616
578
|
export interface TaskRePointed {
|
|
617
579
|
stats?: TaskStats | null;
|
|
618
580
|
options?: TaskOptions | null;
|
|
619
581
|
actorStandby?: ActorStandby | null;
|
|
620
|
-
|
|
621
|
-
export interface TaskSpecNarrowings {
|
|
582
|
+
publicConfig?: TaskPublicConfig | null;
|
|
622
583
|
input?: Dictionary | Dictionary[] | null;
|
|
623
584
|
}
|
|
624
585
|
/**
|
|
@@ -627,44 +588,32 @@ export interface TaskSpecNarrowings {
|
|
|
627
588
|
* Tasks are saved Actor configurations with input and settings that can be executed
|
|
628
589
|
* repeatedly without having to specify the full input each time.
|
|
629
590
|
*/
|
|
630
|
-
export interface Task extends Omit<Schemas['Task'], keyof TaskRePointed
|
|
591
|
+
export interface Task extends Omit<Schemas['Task'], keyof TaskRePointed>, TaskRePointed {
|
|
631
592
|
}
|
|
632
|
-
export interface
|
|
593
|
+
export interface TaskListItemRePointed {
|
|
633
594
|
stats?: TaskStats | null;
|
|
634
595
|
}
|
|
635
|
-
/**
|
|
636
|
-
* Fields the API returns on a listed task that the OpenAPI spec does not describe yet.
|
|
637
|
-
*
|
|
638
|
-
* `description` is deliberately not here, although `TaskSpecGaps` claims it on the full resource: the
|
|
639
|
-
* list endpoint publishes a smaller set of fields, and that is one of the fields it leaves out.
|
|
640
|
-
*
|
|
641
|
-
* TODO: Remove once the spec covers it.
|
|
642
|
-
*/
|
|
643
|
-
export interface TaskListSpecGaps {
|
|
644
|
-
title?: string | null;
|
|
645
|
-
}
|
|
646
596
|
/** A task as it appears in a listing, which carries fewer fields than the full resource. */
|
|
647
|
-
export interface
|
|
597
|
+
export interface TaskListItem extends Omit<Schemas['TaskListItem'], keyof TaskListItemRePointed>, TaskListItemRePointed {
|
|
648
598
|
}
|
|
649
|
-
export interface
|
|
599
|
+
export interface StoreActorRePointed {
|
|
650
600
|
stats: ActorStats;
|
|
651
|
-
currentPricingInfo?:
|
|
601
|
+
currentPricingInfo?: CurrentPricingInfo;
|
|
652
602
|
}
|
|
653
603
|
/**
|
|
654
604
|
* Pricing information as Apify Store reports it.
|
|
655
605
|
*
|
|
656
|
-
*
|
|
657
|
-
*
|
|
658
|
-
* and every price field is optional.
|
|
606
|
+
* It is a flat summary rather than one of the `ActorRunPricingInfo` variants, so `pricingModel` is a plain
|
|
607
|
+
* string and every price field is optional.
|
|
659
608
|
* @since Added in 2.7.2
|
|
660
609
|
*/
|
|
661
|
-
export interface
|
|
610
|
+
export interface CurrentPricingInfo extends GeneratedCurrentPricingInfo {
|
|
662
611
|
}
|
|
663
612
|
/**
|
|
664
613
|
* An Actor as it appears in Apify Store.
|
|
665
614
|
* @since Added in 2.7.2
|
|
666
615
|
*/
|
|
667
|
-
export interface
|
|
616
|
+
export interface StoreActor extends Omit<Schemas['StoreActor'], keyof StoreActorRePointed>, StoreActorRePointed {
|
|
668
617
|
}
|
|
669
618
|
type GeneratedWebhookStats = Schemas['WebhookStats'];
|
|
670
619
|
type GeneratedWebhookCondition = Schemas['WebhookCondition'];
|
|
@@ -701,25 +650,10 @@ export type WebhookCondition = WebhookAnyRunOfActorCondition | WebhookAnyRunOfAc
|
|
|
701
650
|
export interface WebhookLastDispatchRePointed {
|
|
702
651
|
status: WebhookDispatchStatus;
|
|
703
652
|
}
|
|
704
|
-
/**
|
|
705
|
-
|
|
706
|
-
*
|
|
707
|
-
* The spec names this schema `ExampleWebhookDispatch`.
|
|
708
|
-
*/
|
|
709
|
-
export interface WebhookLastDispatch extends Omit<Schemas['ExampleWebhookDispatch'], keyof WebhookLastDispatchRePointed>, WebhookLastDispatchRePointed {
|
|
710
|
-
}
|
|
711
|
-
/**
|
|
712
|
-
* Fields the API returns on a webhook that the OpenAPI spec does not describe yet.
|
|
713
|
-
*
|
|
714
|
-
* The spec does carry `isApifyIntegration` on `WebhookShort`, the listing shape, and simply omits it
|
|
715
|
-
* from the full `Webhook` schema.
|
|
716
|
-
*
|
|
717
|
-
* TODO: Remove once the spec covers it.
|
|
718
|
-
*/
|
|
719
|
-
export interface WebhookSpecGaps {
|
|
720
|
-
isApifyIntegration?: boolean;
|
|
653
|
+
/** The summary of a webhook's most recent dispatch that the webhook resource carries. */
|
|
654
|
+
export interface WebhookLastDispatch extends Omit<Schemas['WebhookLastDispatch'], keyof WebhookLastDispatchRePointed>, WebhookLastDispatchRePointed {
|
|
721
655
|
}
|
|
722
|
-
export interface
|
|
656
|
+
export interface WebhookResourceRePointed {
|
|
723
657
|
condition: WebhookCondition;
|
|
724
658
|
stats?: WebhookStats | null;
|
|
725
659
|
lastDispatch?: WebhookLastDispatch | null;
|
|
@@ -731,7 +665,7 @@ export interface WebhookRePointed {
|
|
|
731
665
|
* Webhooks send HTTP POST requests to specified URLs when certain events occur
|
|
732
666
|
* (e.g., Actor run succeeds, fails, or times out).
|
|
733
667
|
*/
|
|
734
|
-
export interface
|
|
668
|
+
export interface WebhookResource extends Omit<Schemas['WebhookResource'], keyof WebhookResourceRePointed>, WebhookResourceRePointed {
|
|
735
669
|
}
|
|
736
670
|
type GeneratedScheduleActionRunInput = Schemas['ScheduleActionRunInput'];
|
|
737
671
|
/**
|
|
@@ -746,58 +680,58 @@ export declare enum ScheduleActions {
|
|
|
746
680
|
RunActorTask = "RUN_ACTOR_TASK"
|
|
747
681
|
}
|
|
748
682
|
/** Input configuration for a scheduled Actor run. */
|
|
749
|
-
export interface
|
|
750
|
-
}
|
|
751
|
-
/**
|
|
752
|
-
* Run options for a scheduled Actor run.
|
|
753
|
-
*
|
|
754
|
-
* The spec reuses its `TaskOptions` schema here; the published name is kept as it is.
|
|
755
|
-
*/
|
|
756
|
-
export interface ScheduledActorRunOptions extends GeneratedTaskOptions {
|
|
683
|
+
export interface ScheduleActionRunInput extends GeneratedScheduleActionRunInput {
|
|
757
684
|
}
|
|
758
685
|
export interface ScheduleActionRunActorRePointed {
|
|
759
|
-
type: ScheduleActions.RunActor
|
|
760
|
-
runInput?:
|
|
761
|
-
runOptions?:
|
|
686
|
+
type: `${ScheduleActions.RunActor}`;
|
|
687
|
+
runInput?: ScheduleActionRunInput | null;
|
|
688
|
+
runOptions?: TaskOptions | null;
|
|
762
689
|
}
|
|
763
690
|
/** Scheduled action to run an Actor. */
|
|
764
691
|
export interface ScheduleActionRunActor extends Omit<Schemas['ScheduleActionRunActor'], keyof ScheduleActionRunActorRePointed>, ScheduleActionRunActorRePointed {
|
|
765
692
|
}
|
|
766
693
|
export interface ScheduleActionRunActorTaskRePointed {
|
|
767
|
-
type: ScheduleActions.RunActorTask
|
|
694
|
+
type: `${ScheduleActions.RunActorTask}`;
|
|
768
695
|
}
|
|
769
696
|
/** Scheduled action to run an Actor task. */
|
|
770
697
|
export interface ScheduleActionRunActorTask extends Omit<Schemas['ScheduleActionRunActorTask'], keyof ScheduleActionRunActorTaskRePointed>, ScheduleActionRunActorTaskRePointed {
|
|
771
698
|
}
|
|
772
699
|
/** Union type representing all possible scheduled actions. */
|
|
773
700
|
export type ScheduleAction = ScheduleActionRunActor | ScheduleActionRunActorTask;
|
|
701
|
+
type GeneratedScheduleLogEntry = Schemas['ScheduleLogEntry'];
|
|
702
|
+
/** One entry of a schedule's log: an invocation of the schedule and how it went. */
|
|
703
|
+
export interface ScheduleLogEntry extends GeneratedScheduleLogEntry {
|
|
704
|
+
}
|
|
774
705
|
export interface ScheduleRePointed {
|
|
775
706
|
actions: ScheduleAction[];
|
|
776
707
|
}
|
|
777
708
|
export interface ScheduleClientNarrowings {
|
|
778
709
|
timezone: Timezone;
|
|
779
710
|
}
|
|
711
|
+
export interface ScheduleSpecNarrowings {
|
|
712
|
+
uiState?: NonNullable<Schemas['Schedule']['uiState']> | null;
|
|
713
|
+
}
|
|
780
714
|
/**
|
|
781
715
|
* Represents a schedule for automated Actor or Task runs.
|
|
782
716
|
*
|
|
783
717
|
* Schedules use cron expressions to define when Actors or Tasks should run automatically.
|
|
784
718
|
*/
|
|
785
|
-
export interface Schedule extends Omit<Schemas['Schedule'], keyof ScheduleRePointed | keyof ScheduleClientNarrowings>, ScheduleRePointed, ScheduleClientNarrowings {
|
|
719
|
+
export interface Schedule extends Omit<Schemas['Schedule'], keyof ScheduleRePointed | keyof ScheduleClientNarrowings | keyof ScheduleSpecNarrowings>, ScheduleRePointed, ScheduleClientNarrowings, ScheduleSpecNarrowings {
|
|
786
720
|
}
|
|
787
|
-
type
|
|
721
|
+
type GeneratedUserProfile = Schemas['UserProfile'];
|
|
788
722
|
type GeneratedProxyGroup = Schemas['ProxyGroup'];
|
|
789
723
|
type GeneratedEffectivePlatformFeature = Schemas['EffectivePlatformFeature'];
|
|
790
724
|
type GeneratedUsageCycle = Schemas['UsageCycle'];
|
|
791
|
-
type
|
|
725
|
+
type GeneratedPriceTier = Schemas['PriceTier'];
|
|
792
726
|
type GeneratedLimits = Schemas['Limits'];
|
|
793
|
-
type
|
|
727
|
+
type GeneratedCurrentUsage = Schemas['CurrentUsage'];
|
|
794
728
|
/**
|
|
795
729
|
* Platform features a plan can enable.
|
|
796
730
|
*
|
|
797
|
-
* This enum is not the element type of `UserPlan.enabledPlatformFeatures`, which the spec types
|
|
798
|
-
*
|
|
799
|
-
*
|
|
800
|
-
*
|
|
731
|
+
* This enum is not the element type of `UserPlan.enabledPlatformFeatures`, which the spec types as a plain
|
|
732
|
+
* `string[]`: the platform has features this list never gained -- `PROXY_RESIDENTIAL`, `ACTORS_PUBLIC_ALL`
|
|
733
|
+
* and `ACTORS_PUBLIC_DEVELOPER` all appear as keys of `EffectivePlatformFeatures` -- so using it there
|
|
734
|
+
* promised a completeness that was not real. It stays published for comparisons.
|
|
801
735
|
*
|
|
802
736
|
* Declared here rather than in `./resource_clients/user` so the user types can live alongside it. It is
|
|
803
737
|
* re-exported from there, so the public name and import path are unchanged.
|
|
@@ -812,13 +746,13 @@ export declare enum PlatformFeature {
|
|
|
812
746
|
ProxyExternalAccess = "PROXY_EXTERNAL_ACCESS"
|
|
813
747
|
}
|
|
814
748
|
/** The public part of a user's profile. */
|
|
815
|
-
export interface UserProfile extends
|
|
749
|
+
export interface UserProfile extends GeneratedUserProfile {
|
|
816
750
|
}
|
|
817
|
-
export interface
|
|
751
|
+
export interface ProxyResourceRePointed {
|
|
818
752
|
groups: ProxyGroup[];
|
|
819
753
|
}
|
|
820
754
|
/** A user's proxy credentials and the groups they may use. */
|
|
821
|
-
export interface
|
|
755
|
+
export interface ProxyResource extends Omit<Schemas['ProxyResource'], keyof ProxyResourceRePointed>, ProxyResourceRePointed {
|
|
822
756
|
}
|
|
823
757
|
/** One proxy group available to a user. */
|
|
824
758
|
export interface ProxyGroup extends GeneratedProxyGroup {
|
|
@@ -845,16 +779,13 @@ export interface UserPlanRePointed {
|
|
|
845
779
|
availableProxyGroups: Record<string, number>;
|
|
846
780
|
}
|
|
847
781
|
/** The subscription plan a user is on, with the quotas it grants. */
|
|
848
|
-
export interface UserPlan extends Omit<Schemas['
|
|
782
|
+
export interface UserPlan extends Omit<Schemas['UserPlan'], keyof UserPlanRePointed>, UserPlanRePointed {
|
|
849
783
|
}
|
|
850
|
-
export interface
|
|
784
|
+
export interface UserPrivateInfoRePointed {
|
|
851
785
|
profile?: UserProfile;
|
|
852
|
-
proxy?:
|
|
853
|
-
}
|
|
854
|
-
export interface UserSpecNarrowings {
|
|
786
|
+
proxy?: ProxyResource;
|
|
855
787
|
plan?: UserPlan;
|
|
856
788
|
effectivePlatformFeatures?: EffectivePlatformFeatures;
|
|
857
|
-
isPaying?: boolean;
|
|
858
789
|
}
|
|
859
790
|
/**
|
|
860
791
|
* A user account.
|
|
@@ -862,7 +793,7 @@ export interface UserSpecNarrowings {
|
|
|
862
793
|
* The private fields are only populated for `GET /v2/users/me`, which needs a token; the public
|
|
863
794
|
* endpoint returns the username and profile alone.
|
|
864
795
|
*/
|
|
865
|
-
export interface
|
|
796
|
+
export interface UserPrivateInfo extends Omit<Schemas['UserPrivateInfo'], keyof UserPrivateInfoRePointed>, UserPrivateInfoRePointed {
|
|
866
797
|
}
|
|
867
798
|
/**
|
|
868
799
|
* The start and end of a billing cycle.
|
|
@@ -870,14 +801,8 @@ export interface User extends Omit<Schemas['UserPrivateInfo'], keyof UserRePoint
|
|
|
870
801
|
*/
|
|
871
802
|
export interface UsageCycle extends GeneratedUsageCycle {
|
|
872
803
|
}
|
|
873
|
-
/**
|
|
874
|
-
|
|
875
|
-
* @since Added in 2.9.2
|
|
876
|
-
*/
|
|
877
|
-
export interface MonthlyUsageCycle extends GeneratedUsageCycle {
|
|
878
|
-
}
|
|
879
|
-
/** One tier of a volume-discounted price. The spec names this schema `PriceTiers`. */
|
|
880
|
-
export interface PriceTier extends GeneratedPriceTiers {
|
|
804
|
+
/** One tier of a volume-discounted price. */
|
|
805
|
+
export interface PriceTier extends GeneratedPriceTier {
|
|
881
806
|
}
|
|
882
807
|
export interface UsageItemRePointed {
|
|
883
808
|
priceTiers?: PriceTier[];
|
|
@@ -897,11 +822,8 @@ export interface ServiceUsage {
|
|
|
897
822
|
export interface DailyServiceUsageRePointed {
|
|
898
823
|
serviceUsage: ServiceUsage;
|
|
899
824
|
}
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
}
|
|
903
|
-
/** A single day's usage within a monthly cycle. The spec names this schema `DailyServiceUsages`. */
|
|
904
|
-
export interface DailyServiceUsage extends Omit<Schemas['DailyServiceUsages'], keyof DailyServiceUsageRePointed | keyof DailyServiceUsageClientConversions>, DailyServiceUsageRePointed, DailyServiceUsageClientConversions {
|
|
825
|
+
/** A single day's usage within a monthly cycle. */
|
|
826
|
+
export interface DailyServiceUsage extends Omit<Schemas['DailyServiceUsage'], keyof DailyServiceUsageRePointed>, DailyServiceUsageRePointed {
|
|
905
827
|
}
|
|
906
828
|
export interface MonthlyUsageRePointed {
|
|
907
829
|
usageCycle: UsageCycle;
|
|
@@ -924,51 +846,49 @@ export interface Limits extends GeneratedLimits {
|
|
|
924
846
|
* How much of each quota a user has consumed in the current cycle.
|
|
925
847
|
* @since Added in 2.9.2
|
|
926
848
|
*/
|
|
927
|
-
export interface
|
|
849
|
+
export interface CurrentUsage extends GeneratedCurrentUsage {
|
|
928
850
|
}
|
|
929
|
-
export interface
|
|
930
|
-
monthlyUsageCycle:
|
|
851
|
+
export interface AccountLimitsRePointed {
|
|
852
|
+
monthlyUsageCycle: UsageCycle;
|
|
931
853
|
limits: Limits;
|
|
932
|
-
current:
|
|
854
|
+
current: CurrentUsage;
|
|
933
855
|
}
|
|
934
856
|
/**
|
|
935
857
|
* A user's quotas together with their current consumption.
|
|
936
858
|
* @since Added in 2.9.2
|
|
937
859
|
*/
|
|
938
|
-
export interface
|
|
860
|
+
export interface AccountLimits extends Omit<Schemas['AccountLimits'], keyof AccountLimitsRePointed>, AccountLimitsRePointed {
|
|
939
861
|
}
|
|
940
862
|
type GeneratedRequestQueueStats = Schemas['RequestQueueStats'];
|
|
941
|
-
type
|
|
942
|
-
type
|
|
863
|
+
type GeneratedRequestQueueHeadItem = Schemas['RequestQueueHeadItem'];
|
|
864
|
+
type GeneratedLockedRequestQueueHeadItem = Schemas['LockedRequestQueueHeadItem'];
|
|
943
865
|
type GeneratedRequestRegistration = Schemas['RequestRegistration'];
|
|
944
866
|
type GeneratedRequestLockInfo = Schemas['RequestLockInfo'];
|
|
945
867
|
type GeneratedUnlockRequestsResult = Schemas['UnlockRequestsResult'];
|
|
946
868
|
type GeneratedBatchAddResult = Schemas['BatchAddResult'];
|
|
947
869
|
type GeneratedBatchDeleteResult = Schemas['BatchDeleteResult'];
|
|
948
|
-
type
|
|
949
|
-
/** HTTP methods
|
|
950
|
-
export type
|
|
870
|
+
type GeneratedRequestResource = Schemas['RequestResource'];
|
|
871
|
+
/** HTTP methods the API specification lists: a request queue request's `method`, and what the HTTP client sends. */
|
|
872
|
+
export type HttpMethod = Schemas['HttpMethod'];
|
|
951
873
|
/** Statistics about Request Queue usage and storage. */
|
|
952
874
|
export interface RequestQueueStats extends GeneratedRequestQueueStats {
|
|
953
875
|
}
|
|
954
876
|
/**
|
|
955
877
|
* Fields the API returns on a request queue that the OpenAPI spec does not describe yet.
|
|
956
878
|
*
|
|
957
|
-
* The spec does carry `username`
|
|
958
|
-
*
|
|
879
|
+
* The spec does carry `username` on `RequestQueueListItem`, the listing shape, and simply omits it from the
|
|
880
|
+
* full `RequestQueueResource` schema.
|
|
959
881
|
*
|
|
960
|
-
* TODO: Remove once the spec covers
|
|
882
|
+
* TODO: Remove once the spec covers it.
|
|
961
883
|
*/
|
|
962
|
-
export interface
|
|
963
|
-
title?: string;
|
|
884
|
+
export interface RequestQueueResourceSpecGaps {
|
|
964
885
|
username?: string;
|
|
965
|
-
expireAt?: Date;
|
|
966
886
|
}
|
|
967
|
-
export interface
|
|
887
|
+
export interface RequestQueueResourceRePointed {
|
|
968
888
|
stats?: RequestQueueStats;
|
|
969
|
-
}
|
|
970
|
-
export interface RequestQueueSpecNarrowings {
|
|
971
889
|
generalAccess?: STORAGE_GENERAL_ACCESS | null;
|
|
890
|
+
}
|
|
891
|
+
export interface RequestQueueResourceSpecNarrowings {
|
|
972
892
|
consoleUrl?: string;
|
|
973
893
|
}
|
|
974
894
|
/**
|
|
@@ -977,80 +897,78 @@ export interface RequestQueueSpecNarrowings {
|
|
|
977
897
|
* Request queues store URLs (requests) to be processed by web crawlers. They provide
|
|
978
898
|
* automatic deduplication, request locking for parallel processing, and persistence.
|
|
979
899
|
*/
|
|
980
|
-
export interface
|
|
900
|
+
export interface RequestQueueResource extends Omit<Schemas['RequestQueueResource'], keyof RequestQueueResourceRePointed | keyof RequestQueueResourceSpecNarrowings>, RequestQueueResourceRePointed, RequestQueueResourceSpecNarrowings, RequestQueueResourceSpecGaps {
|
|
981
901
|
}
|
|
982
902
|
/** Simplified request information used in queue-head results. */
|
|
983
|
-
export interface
|
|
903
|
+
export interface RequestQueueHeadItem extends GeneratedRequestQueueHeadItem {
|
|
984
904
|
}
|
|
985
905
|
/** A queue-head request that has been locked for processing, so it also reports its lock expiry. */
|
|
986
|
-
export interface
|
|
906
|
+
export interface LockedRequestQueueHeadItem extends GeneratedLockedRequestQueueHeadItem {
|
|
987
907
|
}
|
|
988
|
-
export interface
|
|
989
|
-
items:
|
|
908
|
+
export interface RequestQueueHeadRePointed {
|
|
909
|
+
items: RequestQueueHeadItem[];
|
|
990
910
|
}
|
|
991
911
|
/** Result of listing requests from the queue head. */
|
|
992
|
-
export interface
|
|
912
|
+
export interface RequestQueueHead extends Omit<Schemas['RequestQueueHead'], keyof RequestQueueHeadRePointed>, RequestQueueHeadRePointed {
|
|
993
913
|
}
|
|
994
|
-
export interface
|
|
995
|
-
items:
|
|
914
|
+
export interface LockedRequestQueueHeadRePointed {
|
|
915
|
+
items: LockedRequestQueueHeadItem[];
|
|
996
916
|
}
|
|
997
917
|
/**
|
|
998
918
|
* Result of listing and locking requests from the queue head.
|
|
999
919
|
*
|
|
1000
|
-
* The spec describes this and {@link
|
|
1001
|
-
*
|
|
1002
|
-
* so both are derived independently.
|
|
920
|
+
* The spec describes this and {@link RequestQueueHead} as separate schemas that disagree about which fields
|
|
921
|
+
* are required, and the locked variant carries a different element type, so both are derived independently.
|
|
1003
922
|
* @since Added in 2.4.1
|
|
1004
923
|
*/
|
|
1005
|
-
export interface
|
|
924
|
+
export interface LockedRequestQueueHead extends Omit<Schemas['LockedRequestQueueHead'], keyof LockedRequestQueueHeadRePointed>, LockedRequestQueueHeadRePointed {
|
|
1006
925
|
}
|
|
1007
926
|
/**
|
|
1008
927
|
* Complete schema for a request in the queue.
|
|
1009
928
|
*
|
|
1010
929
|
* Represents a URL to be crawled along with its metadata, retry information, and custom data.
|
|
1011
930
|
*/
|
|
1012
|
-
export interface
|
|
931
|
+
export interface RequestResource extends GeneratedRequestResource {
|
|
1013
932
|
}
|
|
1014
933
|
/**
|
|
1015
934
|
* A request as the caller submits it to the queue.
|
|
1016
935
|
*
|
|
1017
936
|
* The API assigns the id, so it is dropped. The unique key and the URL the caller has to supply come
|
|
1018
|
-
* required from {@link
|
|
937
|
+
* required from {@link RequestResource}.
|
|
1019
938
|
*/
|
|
1020
|
-
export interface RequestQueueClientRequestToAdd extends Omit<
|
|
939
|
+
export interface RequestQueueClientRequestToAdd extends Omit<RequestResource, 'id'> {
|
|
1021
940
|
}
|
|
1022
941
|
/**
|
|
1023
942
|
* A request as the caller submits it to an update of a stored one.
|
|
1024
943
|
*
|
|
1025
944
|
* The update addresses that request by its id, which a stored request always carries, so the shape is
|
|
1026
|
-
* {@link
|
|
1027
|
-
* `updateRequest()`.
|
|
945
|
+
* {@link RequestResource} unchanged. The name stays published as the argument type of `updateRequest()`.
|
|
1028
946
|
*/
|
|
1029
|
-
export interface RequestQueueClientRequestToUpdate extends
|
|
947
|
+
export interface RequestQueueClientRequestToUpdate extends RequestResource {
|
|
1030
948
|
}
|
|
1031
|
-
export interface
|
|
1032
|
-
items:
|
|
949
|
+
export interface ListOfRequestsRePointed {
|
|
950
|
+
items: RequestResource[];
|
|
1033
951
|
}
|
|
1034
952
|
/**
|
|
1035
953
|
* Result of listing all requests in the queue.
|
|
1036
954
|
* @since Added in 2.5.1
|
|
1037
955
|
*/
|
|
1038
|
-
export interface
|
|
956
|
+
export interface ListOfRequests extends Omit<Schemas['ListOfRequests'], keyof ListOfRequestsRePointed>, ListOfRequestsRePointed {
|
|
1039
957
|
}
|
|
1040
958
|
/** Result of adding a request to the queue. */
|
|
1041
|
-
export interface
|
|
959
|
+
export interface RequestRegistration extends GeneratedRequestRegistration {
|
|
1042
960
|
}
|
|
1043
961
|
/**
|
|
1044
962
|
* Result of prolonging a request lock.
|
|
1045
963
|
* @since Added in 2.4.1
|
|
1046
964
|
*/
|
|
1047
|
-
export interface
|
|
965
|
+
export interface RequestLockInfo extends GeneratedRequestLockInfo {
|
|
1048
966
|
}
|
|
1049
967
|
/**
|
|
1050
968
|
* Result of unlocking requests in the queue.
|
|
1051
969
|
* @since Added in 2.12.5
|
|
1052
970
|
*/
|
|
1053
|
-
export interface
|
|
971
|
+
export interface UnlockRequestsResult extends GeneratedUnlockRequestsResult {
|
|
1054
972
|
}
|
|
1055
973
|
/**
|
|
1056
974
|
* Result of a batch add operation on requests.
|
|
@@ -1058,7 +976,7 @@ export interface RequestQueueClientUnlockRequestsResult extends GeneratedUnlockR
|
|
|
1058
976
|
* Contains lists of successfully processed and unprocessed requests.
|
|
1059
977
|
* @since Added in 2.3.0
|
|
1060
978
|
*/
|
|
1061
|
-
export interface
|
|
979
|
+
export interface BatchAddResult extends GeneratedBatchAddResult {
|
|
1062
980
|
}
|
|
1063
981
|
/**
|
|
1064
982
|
* Result of a batch delete operation on requests.
|
|
@@ -1067,6 +985,6 @@ export interface RequestQueueClientBatchRequestsOperationResult extends Generate
|
|
|
1067
985
|
* and `uniqueKey` rather than the `requestId`, `wasAlreadyPresent` and `wasAlreadyHandled` that a batch
|
|
1068
986
|
* add reports.
|
|
1069
987
|
*/
|
|
1070
|
-
export interface
|
|
988
|
+
export interface BatchDeleteResult extends GeneratedBatchDeleteResult {
|
|
1071
989
|
}
|
|
1072
990
|
export {};
|