apify-client 3.0.0-beta.37 → 3.0.0-beta.39
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/bundle.js +9 -9
- package/dist/bundle.js.map +1 -1
- package/dist/generated/api.d.ts +6 -0
- package/dist/generated/schemas.d.ts +2 -0
- package/dist/generated/schemas.js +1 -0
- package/dist/resource_clients/dataset.d.ts +19 -13
- package/dist/resource_clients/dataset.js +16 -16
- package/package.json +2 -2
package/dist/generated/api.d.ts
CHANGED
|
@@ -5710,6 +5710,7 @@ export interface components {
|
|
|
5710
5710
|
* "inputSchema": "{\\n \"title\": \"Schema for ...\"}",
|
|
5711
5711
|
* "readme": "# Magic Actor\\nThis Actor is magic.",
|
|
5712
5712
|
* "buildNumber": "0.1.1",
|
|
5713
|
+
* "imageDigest": "1b2f1e8c0d5a4c7f9e3b6a2d8c4e0f7a5b9d3c1e6f8a2b4d0c7e9f1a3b5d7c9e",
|
|
5713
5714
|
* "actorDefinition": {
|
|
5714
5715
|
* "actorSpecification": 1,
|
|
5715
5716
|
* "name": "example-actor",
|
|
@@ -5801,6 +5802,11 @@ export interface components {
|
|
|
5801
5802
|
readme?: string | null;
|
|
5802
5803
|
/** @example 0.1.1 */
|
|
5803
5804
|
buildNumber: string;
|
|
5805
|
+
/**
|
|
5806
|
+
* @description Digest of the built Docker image manifest, without the `sha256:` prefix. Compare digests of two builds to find out whether their image contents differ. `null` if the digest is not available.
|
|
5807
|
+
* @example 1b2f1e8c0d5a4c7f9e3b6a2d8c4e0f7a5b9d3c1e6f8a2b4d0c7e9f1a3b5d7c9e
|
|
5808
|
+
*/
|
|
5809
|
+
imageDigest?: string | null;
|
|
5804
5810
|
/**
|
|
5805
5811
|
* BuildActVersion
|
|
5806
5812
|
* @description Snapshot of the Actor version that this build was created from.
|
|
@@ -2801,6 +2801,7 @@ export declare const Build: () => z.ZodObject<{
|
|
|
2801
2801
|
inputSchema: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2802
2802
|
readme: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2803
2803
|
buildNumber: z.ZodString;
|
|
2804
|
+
imageDigest: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2804
2805
|
actVersion: z.ZodOptional<z.ZodObject<{
|
|
2805
2806
|
sourceType: z.ZodOptional<z.ZodUnion<[z.ZodEnum<{
|
|
2806
2807
|
GITHUB_GIST: "GITHUB_GIST";
|
|
@@ -2898,6 +2899,7 @@ export declare const BuildResponse: () => z.ZodObject<{
|
|
|
2898
2899
|
inputSchema: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2899
2900
|
readme: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2900
2901
|
buildNumber: z.ZodString;
|
|
2902
|
+
imageDigest: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2901
2903
|
actVersion: z.ZodOptional<z.ZodObject<{
|
|
2902
2904
|
sourceType: z.ZodOptional<z.ZodUnion<[z.ZodEnum<{
|
|
2903
2905
|
GITHUB_GIST: "GITHUB_GIST";
|
|
@@ -412,6 +412,7 @@ export const Build = lazySchema(() => z.looseObject({
|
|
|
412
412
|
inputSchema: z.string().nullable().optional(),
|
|
413
413
|
readme: z.string().nullable().optional(),
|
|
414
414
|
buildNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/),
|
|
415
|
+
imageDigest: z.string().nullable().optional(),
|
|
415
416
|
actVersion: z.looseObject({
|
|
416
417
|
sourceType: VersionSourceType().optional(),
|
|
417
418
|
buildTag: z.string().optional(),
|
|
@@ -4,6 +4,18 @@ import { ResourceClient } from '../base/resource_client.js';
|
|
|
4
4
|
import type { Dataset, DatasetStatistics } from '../models.js';
|
|
5
5
|
import type { TimeoutOptions } from '../timeouts.js';
|
|
6
6
|
import type { PaginatedIterator, PaginationOptions } from '../utils.js';
|
|
7
|
+
/**
|
|
8
|
+
* Supported formats for downloading dataset items.
|
|
9
|
+
*/
|
|
10
|
+
export declare enum DownloadItemsFormat {
|
|
11
|
+
JSON = "json",
|
|
12
|
+
JSONL = "jsonl",
|
|
13
|
+
XML = "xml",
|
|
14
|
+
HTML = "html",
|
|
15
|
+
CSV = "csv",
|
|
16
|
+
XLSX = "xlsx",
|
|
17
|
+
RSS = "rss"
|
|
18
|
+
}
|
|
7
19
|
export type { Dataset, DatasetStatistics, DatasetStats, FieldStatistics } from '../models.js';
|
|
8
20
|
/**
|
|
9
21
|
* Client for managing a specific Dataset.
|
|
@@ -211,6 +223,7 @@ export declare class DatasetClient<Data extends Record<string | number, any> = R
|
|
|
211
223
|
* @param options - URL generation options (extends all options from {@link listItems})
|
|
212
224
|
* @param options.expiresInSecs - Number of seconds until the signed URL expires. If omitted, the URL never expires.
|
|
213
225
|
* @param options.fields - Array of field names to include in the response.
|
|
226
|
+
* @param options.format - Format of the items served by the URL. Defaults to `json`.
|
|
214
227
|
* @param options.limit - Maximum number of items to return.
|
|
215
228
|
* @param options.offset - Number of items to skip.
|
|
216
229
|
* @param options.timeoutSecs - Timeout for the API request that fetches the dataset. Default is `'long'`.
|
|
@@ -280,25 +293,18 @@ export interface DatasetClientListItemOptions extends PaginationOptions, Timeout
|
|
|
280
293
|
/**
|
|
281
294
|
* Options for creating a public URL to access dataset items.
|
|
282
295
|
*
|
|
283
|
-
* Extends {@link DatasetClientListItemOptions} with URL expiration control, minus `chunkSize` (it only
|
|
296
|
+
* Extends {@link DatasetClientListItemOptions} with output format and URL expiration control, minus `chunkSize` (it only
|
|
284
297
|
* sizes a client-side iteration) and `signature` (this method produces one).
|
|
285
298
|
* @since Added in 2.16.0
|
|
286
299
|
*/
|
|
287
300
|
export interface DatasetClientCreateItemsUrlOptions extends Omit<DatasetClientListItemOptions, 'chunkSize' | 'signature'> {
|
|
301
|
+
/**
|
|
302
|
+
* Format of the items served by the URL. Defaults to `json`.
|
|
303
|
+
* @since Added in 2.26.0
|
|
304
|
+
*/
|
|
305
|
+
format?: `${DownloadItemsFormat}`;
|
|
288
306
|
expiresInSecs?: number;
|
|
289
307
|
}
|
|
290
|
-
/**
|
|
291
|
-
* Supported formats for downloading dataset items.
|
|
292
|
-
*/
|
|
293
|
-
export declare enum DownloadItemsFormat {
|
|
294
|
-
JSON = "json",
|
|
295
|
-
JSONL = "jsonl",
|
|
296
|
-
XML = "xml",
|
|
297
|
-
HTML = "html",
|
|
298
|
-
CSV = "csv",
|
|
299
|
-
XLSX = "xlsx",
|
|
300
|
-
RSS = "rss"
|
|
301
|
-
}
|
|
302
308
|
/**
|
|
303
309
|
* Options for downloading dataset items in a specific format.
|
|
304
310
|
*
|
|
@@ -4,6 +4,20 @@ import { ResourceClient } from '../base/resource_client.js';
|
|
|
4
4
|
import * as schemas from '../schemas.js';
|
|
5
5
|
import { timeoutOptionsSchema, timeoutOptionsShape } from '../timeouts.js';
|
|
6
6
|
import { anyObjectSchema, applyQueryParamsToUrl, cast, isNonArrayObject, paginationOptionsShape, parseArgument, parseResponse, SCANNED_COUNT, } from '../utils.js';
|
|
7
|
+
/**
|
|
8
|
+
* Supported formats for downloading dataset items.
|
|
9
|
+
*/
|
|
10
|
+
export var DownloadItemsFormat;
|
|
11
|
+
(function (DownloadItemsFormat) {
|
|
12
|
+
DownloadItemsFormat["JSON"] = "json";
|
|
13
|
+
DownloadItemsFormat["JSONL"] = "jsonl";
|
|
14
|
+
DownloadItemsFormat["XML"] = "xml";
|
|
15
|
+
DownloadItemsFormat["HTML"] = "html";
|
|
16
|
+
DownloadItemsFormat["CSV"] = "csv";
|
|
17
|
+
DownloadItemsFormat["XLSX"] = "xlsx";
|
|
18
|
+
DownloadItemsFormat["RSS"] = "rss";
|
|
19
|
+
})(DownloadItemsFormat || (DownloadItemsFormat = {}));
|
|
20
|
+
const itemFormatSchema = z.enum(DownloadItemsFormat);
|
|
7
21
|
// A predicate, not a `z.object()` arm, which would walk and copy every key of every pushed item.
|
|
8
22
|
const itemSchema = z.custom(isNonArrayObject, 'Expected an object');
|
|
9
23
|
const listItemsOptionsSchema = z.strictObject({
|
|
@@ -52,6 +66,7 @@ const createItemsPublicUrlOptionsSchema = z.strictObject({
|
|
|
52
66
|
desc: z.boolean().optional(),
|
|
53
67
|
flatten: z.array(z.string()).optional(),
|
|
54
68
|
fields: z.array(z.string()).optional(),
|
|
69
|
+
format: itemFormatSchema.optional(),
|
|
55
70
|
omit: z.array(z.string()).optional(),
|
|
56
71
|
limit: z.number().min(0).optional(),
|
|
57
72
|
offset: z.number().min(0).optional(),
|
|
@@ -335,6 +350,7 @@ export class DatasetClient extends ResourceClient {
|
|
|
335
350
|
* @param options - URL generation options (extends all options from {@link listItems})
|
|
336
351
|
* @param options.expiresInSecs - Number of seconds until the signed URL expires. If omitted, the URL never expires.
|
|
337
352
|
* @param options.fields - Array of field names to include in the response.
|
|
353
|
+
* @param options.format - Format of the items served by the URL. Defaults to `json`.
|
|
338
354
|
* @param options.limit - Maximum number of items to return.
|
|
339
355
|
* @param options.offset - Number of items to skip.
|
|
340
356
|
* @param options.timeoutSecs - Timeout for the API request that fetches the dataset. Default is `'long'`.
|
|
@@ -392,19 +408,3 @@ export class DatasetClient extends ResourceClient {
|
|
|
392
408
|
});
|
|
393
409
|
}
|
|
394
410
|
}
|
|
395
|
-
/**
|
|
396
|
-
* Supported formats for downloading dataset items.
|
|
397
|
-
*/
|
|
398
|
-
export var DownloadItemsFormat;
|
|
399
|
-
(function (DownloadItemsFormat) {
|
|
400
|
-
DownloadItemsFormat["JSON"] = "json";
|
|
401
|
-
DownloadItemsFormat["JSONL"] = "jsonl";
|
|
402
|
-
DownloadItemsFormat["XML"] = "xml";
|
|
403
|
-
DownloadItemsFormat["HTML"] = "html";
|
|
404
|
-
DownloadItemsFormat["CSV"] = "csv";
|
|
405
|
-
DownloadItemsFormat["XLSX"] = "xlsx";
|
|
406
|
-
DownloadItemsFormat["RSS"] = "rss";
|
|
407
|
-
})(DownloadItemsFormat || (DownloadItemsFormat = {}));
|
|
408
|
-
const validItemFormats = [...new Set(Object.values(DownloadItemsFormat).map((item) => item.toLowerCase()))];
|
|
409
|
-
// Declared below `validItemFormats` because it references it at module load time.
|
|
410
|
-
const itemFormatSchema = z.enum(validItemFormats);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apify-client",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.39",
|
|
4
4
|
"description": "Apify API client for JavaScript",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.0.0"
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
],
|
|
60
60
|
"apify": {
|
|
61
61
|
"openapiSpec": {
|
|
62
|
-
"version": "v2-2026-
|
|
62
|
+
"version": "v2-2026-10-01T153946Z"
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|