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