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