@nimble-way/nimble-js 0.7.0 → 0.9.0
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/CHANGELOG.md +33 -0
- package/client.d.mts +16 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +16 -2
- package/client.d.ts.map +1 -1
- package/client.js +16 -0
- package/client.js.map +1 -1
- package/client.mjs +16 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/batches.d.mts +140 -0
- package/resources/batches.d.mts.map +1 -0
- package/resources/batches.d.ts +140 -0
- package/resources/batches.d.ts.map +1 -0
- package/resources/batches.js +33 -0
- package/resources/batches.js.map +1 -0
- package/resources/batches.mjs +29 -0
- package/resources/batches.mjs.map +1 -0
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/top-level.d.mts +277 -1
- package/resources/top-level.d.mts.map +1 -1
- package/resources/top-level.d.ts +277 -1
- package/resources/top-level.d.ts.map +1 -1
- package/src/client.ts +30 -0
- package/src/resources/batches.ts +185 -0
- package/src/resources/index.ts +3 -0
- package/src/resources/top-level.ts +1218 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
export declare class Batches extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Retrieve a paginated list of batches for the authenticated account.
|
|
7
|
+
*/
|
|
8
|
+
list(options?: RequestOptions): APIPromise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Retrieve the details of a batch including all its tasks and completion status.
|
|
11
|
+
*/
|
|
12
|
+
get(batchID: string, options?: RequestOptions): APIPromise<BatchGetResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* Retrieve lightweight progress information for a batch without fetching all task
|
|
15
|
+
* details.
|
|
16
|
+
*/
|
|
17
|
+
progress(batchID: string, options?: RequestOptions): APIPromise<BatchProgressResponse>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Response containing batch details with all tasks.
|
|
21
|
+
*/
|
|
22
|
+
export interface BatchGetResponse {
|
|
23
|
+
/**
|
|
24
|
+
* Unique identifier for the batch.
|
|
25
|
+
*/
|
|
26
|
+
id: string;
|
|
27
|
+
/**
|
|
28
|
+
* Whether all tasks in the batch have finished.
|
|
29
|
+
*/
|
|
30
|
+
completed: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Number of tasks that have completed so far.
|
|
33
|
+
*/
|
|
34
|
+
completed_count: number;
|
|
35
|
+
/**
|
|
36
|
+
* ISO timestamp when the batch was created.
|
|
37
|
+
*/
|
|
38
|
+
created_at: string;
|
|
39
|
+
/**
|
|
40
|
+
* Completion ratio between 0 and 1.
|
|
41
|
+
*/
|
|
42
|
+
progress: number;
|
|
43
|
+
status: 'success';
|
|
44
|
+
/**
|
|
45
|
+
* List of tasks in the batch.
|
|
46
|
+
*/
|
|
47
|
+
tasks: Array<BatchGetResponse.Task | null>;
|
|
48
|
+
/**
|
|
49
|
+
* ISO timestamp when the batch completed.
|
|
50
|
+
*/
|
|
51
|
+
completed_at?: string;
|
|
52
|
+
}
|
|
53
|
+
export declare namespace BatchGetResponse {
|
|
54
|
+
interface Task {
|
|
55
|
+
/**
|
|
56
|
+
* Unique task identifier.
|
|
57
|
+
*/
|
|
58
|
+
id: string;
|
|
59
|
+
_query: unknown;
|
|
60
|
+
/**
|
|
61
|
+
* Timestamp when the task was created.
|
|
62
|
+
*/
|
|
63
|
+
created_at: string;
|
|
64
|
+
/**
|
|
65
|
+
* Original input data for the task.
|
|
66
|
+
*/
|
|
67
|
+
input: unknown;
|
|
68
|
+
/**
|
|
69
|
+
* Current state of the task.
|
|
70
|
+
*/
|
|
71
|
+
state: 'pending' | 'success' | 'error';
|
|
72
|
+
/**
|
|
73
|
+
* URL for checking the task status.
|
|
74
|
+
*/
|
|
75
|
+
status_url: string;
|
|
76
|
+
/**
|
|
77
|
+
* Account name that owns the task.
|
|
78
|
+
*/
|
|
79
|
+
account_name?: string;
|
|
80
|
+
api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract';
|
|
81
|
+
/**
|
|
82
|
+
* Batch ID if this task is part of a batch.
|
|
83
|
+
*/
|
|
84
|
+
batch_id?: string;
|
|
85
|
+
/**
|
|
86
|
+
* URL for downloading the task results.
|
|
87
|
+
*/
|
|
88
|
+
download_url?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Error message if the task failed.
|
|
91
|
+
*/
|
|
92
|
+
error?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Classification of the error type.
|
|
95
|
+
*/
|
|
96
|
+
error_type?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Timestamp when the task was last modified.
|
|
99
|
+
*/
|
|
100
|
+
modified_at?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Storage location of the output data.
|
|
103
|
+
*/
|
|
104
|
+
output_url?: string;
|
|
105
|
+
/**
|
|
106
|
+
* HTTP status code from the task execution.
|
|
107
|
+
*/
|
|
108
|
+
status_code?: number;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Lightweight batch progress without task details.
|
|
113
|
+
*/
|
|
114
|
+
export interface BatchProgressResponse {
|
|
115
|
+
/**
|
|
116
|
+
* Unique identifier for the batch.
|
|
117
|
+
*/
|
|
118
|
+
id: string;
|
|
119
|
+
/**
|
|
120
|
+
* Whether all tasks in the batch have finished.
|
|
121
|
+
*/
|
|
122
|
+
completed: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Number of tasks that have completed so far.
|
|
125
|
+
*/
|
|
126
|
+
completed_count: number;
|
|
127
|
+
/**
|
|
128
|
+
* Completion ratio between 0 and 1.
|
|
129
|
+
*/
|
|
130
|
+
progress: number;
|
|
131
|
+
status: 'success';
|
|
132
|
+
/**
|
|
133
|
+
* ISO timestamp when the batch completed.
|
|
134
|
+
*/
|
|
135
|
+
completed_at?: string;
|
|
136
|
+
}
|
|
137
|
+
export declare namespace Batches {
|
|
138
|
+
export { type BatchGetResponse as BatchGetResponse, type BatchProgressResponse as BatchProgressResponse };
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=batches.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batches.d.ts","sourceRoot":"","sources":["../src/resources/batches.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAOhD;;OAEG;IACH,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAI5E;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;CAGvF;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB,MAAM,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,gBAAgB,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IAE3C;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,yBAAiB,gBAAgB,CAAC;IAChC,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX,MAAM,EAAE,OAAO,CAAC;QAEhB;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,KAAK,EAAE,OAAO,CAAC;QAEf;;WAEG;QACH,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;QAEvC;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QAEtB,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;QAEnF;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QAEtB;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB;;WAEG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;CACF;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB,MAAM,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,CAAC;CAC3G"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Batches = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const headers_1 = require("../internal/headers.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
class Batches extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Retrieve a paginated list of batches for the authenticated account.
|
|
11
|
+
*/
|
|
12
|
+
list(options) {
|
|
13
|
+
return this._client.get('/v1/batches', {
|
|
14
|
+
...options,
|
|
15
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Retrieve the details of a batch including all its tasks and completion status.
|
|
20
|
+
*/
|
|
21
|
+
get(batchID, options) {
|
|
22
|
+
return this._client.get((0, path_1.path) `/v1/batches/${batchID}`, options);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Retrieve lightweight progress information for a batch without fetching all task
|
|
26
|
+
* details.
|
|
27
|
+
*/
|
|
28
|
+
progress(batchID, options) {
|
|
29
|
+
return this._client.get((0, path_1.path) `/v1/batches/${batchID}/progress`, options);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.Batches = Batches;
|
|
33
|
+
//# sourceMappingURL=batches.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batches.js","sourceRoot":"","sources":["../src/resources/batches.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAEnD,oDAA8C;AAE9C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE;YACrC,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,OAAe,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,eAAe,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;OAGG;IACH,QAAQ,CAAC,OAAe,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,eAAe,OAAO,WAAW,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;CACF;AAzBD,0BAyBC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
|
+
export class Batches extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Retrieve a paginated list of batches for the authenticated account.
|
|
8
|
+
*/
|
|
9
|
+
list(options) {
|
|
10
|
+
return this._client.get('/v1/batches', {
|
|
11
|
+
...options,
|
|
12
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Retrieve the details of a batch including all its tasks and completion status.
|
|
17
|
+
*/
|
|
18
|
+
get(batchID, options) {
|
|
19
|
+
return this._client.get(path `/v1/batches/${batchID}`, options);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Retrieve lightweight progress information for a batch without fetching all task
|
|
23
|
+
* details.
|
|
24
|
+
*/
|
|
25
|
+
progress(batchID, options) {
|
|
26
|
+
return this._client.get(path `/v1/batches/${batchID}/progress`, options);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=batches.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batches.mjs","sourceRoot":"","sources":["../src/resources/batches.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE;YACrC,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,OAAe,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;OAGG;IACH,QAAQ,CAAC,OAAe,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,OAAO,WAAW,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;CACF"}
|
package/resources/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./shared.mjs";
|
|
2
2
|
export { Agent, type AgentListResponse, type AgentGetResponse, type AgentRunResponse, type AgentRunAsyncResponse, type AgentListParams, type AgentRunParams, type AgentRunAsyncParams, } from "./agent.mjs";
|
|
3
|
+
export { Batches, type BatchGetResponse, type BatchProgressResponse } from "./batches.mjs";
|
|
3
4
|
export { Crawl, type CrawlListResponse, type CrawlRunResponse, type CrawlStatusResponse, type CrawlTerminateResponse, type CrawlListParams, type CrawlRunParams, } from "./crawl.mjs";
|
|
4
5
|
export { Tasks, type TaskListResponse, type TaskGetResponse, type TaskResultsResponse, type TaskListParams, } from "./tasks.mjs";
|
|
5
|
-
export { type ExtractResponse, type ExtractAsyncResponse, type MapResponse, type SearchResponse, type ExtractParams, type ExtractAsyncParams, type MapParams, type SearchParams, } from "./top-level.mjs";
|
|
6
|
+
export { type ExtractResponse, type ExtractAsyncResponse, type ExtractBatchResponse, type MapResponse, type SearchResponse, type ExtractParams, type ExtractAsyncParams, type ExtractBatchParams, type MapParams, type SearchParams, } from "./top-level.mjs";
|
|
6
7
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,KAAK,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB;OACM,EACL,KAAK,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB;OACM,EACL,KAAK,EACL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,cAAc,GACpB;OACM,EACL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACd,KAAK,YAAY,GAClB"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,KAAK,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB;OACM,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,qBAAqB,EAAE;OAC9D,EACL,KAAK,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB;OACM,EACL,KAAK,EACL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,cAAc,GACpB;OACM,EACL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACd,KAAK,YAAY,GAClB"}
|
package/resources/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./shared.js";
|
|
2
2
|
export { Agent, type AgentListResponse, type AgentGetResponse, type AgentRunResponse, type AgentRunAsyncResponse, type AgentListParams, type AgentRunParams, type AgentRunAsyncParams, } from "./agent.js";
|
|
3
|
+
export { Batches, type BatchGetResponse, type BatchProgressResponse } from "./batches.js";
|
|
3
4
|
export { Crawl, type CrawlListResponse, type CrawlRunResponse, type CrawlStatusResponse, type CrawlTerminateResponse, type CrawlListParams, type CrawlRunParams, } from "./crawl.js";
|
|
4
5
|
export { Tasks, type TaskListResponse, type TaskGetResponse, type TaskResultsResponse, type TaskListParams, } from "./tasks.js";
|
|
5
|
-
export { type ExtractResponse, type ExtractAsyncResponse, type MapResponse, type SearchResponse, type ExtractParams, type ExtractAsyncParams, type MapParams, type SearchParams, } from "./top-level.js";
|
|
6
|
+
export { type ExtractResponse, type ExtractAsyncResponse, type ExtractBatchResponse, type MapResponse, type SearchResponse, type ExtractParams, type ExtractAsyncParams, type ExtractBatchParams, type MapParams, type SearchParams, } from "./top-level.js";
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
package/resources/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,KAAK,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB;OACM,EACL,KAAK,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB;OACM,EACL,KAAK,EACL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,cAAc,GACpB;OACM,EACL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACd,KAAK,YAAY,GAClB"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,KAAK,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB;OACM,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,qBAAqB,EAAE;OAC9D,EACL,KAAK,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB;OACM,EACL,KAAK,EACL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,cAAc,GACpB;OACM,EACL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACd,KAAK,YAAY,GAClB"}
|
package/resources/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Tasks = exports.Crawl = exports.Agent = void 0;
|
|
4
|
+
exports.Tasks = exports.Crawl = exports.Batches = exports.Agent = void 0;
|
|
5
5
|
const tslib_1 = require("../internal/tslib.js");
|
|
6
6
|
tslib_1.__exportStar(require("./shared.js"), exports);
|
|
7
7
|
var agent_1 = require("./agent.js");
|
|
8
8
|
Object.defineProperty(exports, "Agent", { enumerable: true, get: function () { return agent_1.Agent; } });
|
|
9
|
+
var batches_1 = require("./batches.js");
|
|
10
|
+
Object.defineProperty(exports, "Batches", { enumerable: true, get: function () { return batches_1.Batches; } });
|
|
9
11
|
var crawl_1 = require("./crawl.js");
|
|
10
12
|
Object.defineProperty(exports, "Crawl", { enumerable: true, get: function () { return crawl_1.Crawl; } });
|
|
11
13
|
var tasks_1 = require("./tasks.js");
|
package/resources/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,sDAAyB;AACzB,oCASiB;AARf,8FAAA,KAAK,OAAA;AASP,oCAQiB;AAPf,8FAAA,KAAK,OAAA;AAQP,oCAMiB;AALf,8FAAA,KAAK,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,sDAAyB;AACzB,oCASiB;AARf,8FAAA,KAAK,OAAA;AASP,wCAAuF;AAA9E,kGAAA,OAAO,OAAA;AAChB,oCAQiB;AAPf,8FAAA,KAAK,OAAA;AAQP,oCAMiB;AALf,8FAAA,KAAK,OAAA"}
|
package/resources/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
export * from "./shared.mjs";
|
|
3
3
|
export { Agent, } from "./agent.mjs";
|
|
4
|
+
export { Batches } from "./batches.mjs";
|
|
4
5
|
export { Crawl, } from "./crawl.mjs";
|
|
5
6
|
export { Tasks, } from "./tasks.mjs";
|
|
6
7
|
//# sourceMappingURL=index.mjs.map
|
package/resources/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EACL,KAAK,GAQN;OACM,EACL,KAAK,GAON;OACM,EACL,KAAK,GAKN"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EACL,KAAK,GAQN;OACM,EAAE,OAAO,EAAqD;OAC9D,EACL,KAAK,GAON;OACM,EACL,KAAK,GAKN"}
|
|
@@ -302,6 +302,81 @@ export declare namespace ExtractAsyncResponse {
|
|
|
302
302
|
status_code?: number;
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
|
+
/**
|
|
306
|
+
* Response when a batch of extract tasks is created successfully.
|
|
307
|
+
*/
|
|
308
|
+
export interface ExtractBatchResponse {
|
|
309
|
+
/**
|
|
310
|
+
* Unique identifier for the batch.
|
|
311
|
+
*/
|
|
312
|
+
batch_id: string;
|
|
313
|
+
/**
|
|
314
|
+
* Number of tasks in the batch.
|
|
315
|
+
*/
|
|
316
|
+
batch_size: number;
|
|
317
|
+
/**
|
|
318
|
+
* List of created tasks.
|
|
319
|
+
*/
|
|
320
|
+
tasks: Array<ExtractBatchResponse.Task>;
|
|
321
|
+
}
|
|
322
|
+
export declare namespace ExtractBatchResponse {
|
|
323
|
+
interface Task {
|
|
324
|
+
/**
|
|
325
|
+
* Unique task identifier.
|
|
326
|
+
*/
|
|
327
|
+
id: string;
|
|
328
|
+
_query: unknown;
|
|
329
|
+
/**
|
|
330
|
+
* Timestamp when the task was created.
|
|
331
|
+
*/
|
|
332
|
+
created_at: string;
|
|
333
|
+
/**
|
|
334
|
+
* Original input data for the task.
|
|
335
|
+
*/
|
|
336
|
+
input: unknown;
|
|
337
|
+
/**
|
|
338
|
+
* Current state of the task.
|
|
339
|
+
*/
|
|
340
|
+
state: 'pending' | 'success' | 'error';
|
|
341
|
+
/**
|
|
342
|
+
* URL for checking the task status.
|
|
343
|
+
*/
|
|
344
|
+
status_url: string;
|
|
345
|
+
/**
|
|
346
|
+
* Account name that owns the task.
|
|
347
|
+
*/
|
|
348
|
+
account_name?: string;
|
|
349
|
+
api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract';
|
|
350
|
+
/**
|
|
351
|
+
* Batch ID if this task is part of a batch.
|
|
352
|
+
*/
|
|
353
|
+
batch_id?: string;
|
|
354
|
+
/**
|
|
355
|
+
* URL for downloading the task results.
|
|
356
|
+
*/
|
|
357
|
+
download_url?: string;
|
|
358
|
+
/**
|
|
359
|
+
* Error message if the task failed.
|
|
360
|
+
*/
|
|
361
|
+
error?: string;
|
|
362
|
+
/**
|
|
363
|
+
* Classification of the error type.
|
|
364
|
+
*/
|
|
365
|
+
error_type?: string;
|
|
366
|
+
/**
|
|
367
|
+
* Timestamp when the task was last modified.
|
|
368
|
+
*/
|
|
369
|
+
modified_at?: string;
|
|
370
|
+
/**
|
|
371
|
+
* Storage location of the output data.
|
|
372
|
+
*/
|
|
373
|
+
output_url?: string;
|
|
374
|
+
/**
|
|
375
|
+
* HTTP status code from the task execution.
|
|
376
|
+
*/
|
|
377
|
+
status_code?: number;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
305
380
|
/**
|
|
306
381
|
* Response schema for map requests.
|
|
307
382
|
*/
|
|
@@ -746,6 +821,207 @@ export declare namespace ExtractAsyncParams {
|
|
|
746
821
|
timeout?: number;
|
|
747
822
|
}
|
|
748
823
|
}
|
|
824
|
+
export interface ExtractBatchParams {
|
|
825
|
+
/**
|
|
826
|
+
* Array of extraction requests. Each object represents one extraction with its own
|
|
827
|
+
* parameters.
|
|
828
|
+
*/
|
|
829
|
+
params: Array<ExtractBatchParams.Param>;
|
|
830
|
+
/**
|
|
831
|
+
* Shared parameters applied to the entire batch, such as storage and callback
|
|
832
|
+
* configuration.
|
|
833
|
+
*/
|
|
834
|
+
shared_params?: ExtractBatchParams.SharedParams;
|
|
835
|
+
}
|
|
836
|
+
export declare namespace ExtractBatchParams {
|
|
837
|
+
interface Param {
|
|
838
|
+
/**
|
|
839
|
+
* Target URL to scrape
|
|
840
|
+
*/
|
|
841
|
+
url: string;
|
|
842
|
+
/**
|
|
843
|
+
* Browser type to emulate
|
|
844
|
+
*/
|
|
845
|
+
browser?: 'chrome' | 'firefox' | Param.UnionMember1;
|
|
846
|
+
/**
|
|
847
|
+
* Array of browser automation actions to execute sequentially
|
|
848
|
+
*/
|
|
849
|
+
browser_actions?: Array<Shared.AutoScrollAction | Shared.ClickAction | Shared.EvalAction | Shared.FetchAction | Shared.FillAction | Shared.GetCookiesAction | Shared.GotoAction | Shared.PressAction | Shared.ScreenshotAction | Shared.ScrollAction | Shared.WaitAction | Shared.WaitForElementAction | Shared.WaitForNavigationAction>;
|
|
850
|
+
/**
|
|
851
|
+
* City for geolocation
|
|
852
|
+
*/
|
|
853
|
+
city?: string;
|
|
854
|
+
/**
|
|
855
|
+
* Whether to automatically handle cookie consent headers
|
|
856
|
+
*/
|
|
857
|
+
consent_header?: boolean;
|
|
858
|
+
/**
|
|
859
|
+
* Browser cookies as array of cookie objects
|
|
860
|
+
*/
|
|
861
|
+
cookies?: Array<Param.UnionMember0> | string;
|
|
862
|
+
/**
|
|
863
|
+
* Country code for geolocation and proxy selection
|
|
864
|
+
*/
|
|
865
|
+
country?: 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AS' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CC' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FM' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IR' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KP' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MH' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MP' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PW' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SY' | 'SZ' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'XK' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW' | 'ALL';
|
|
866
|
+
/**
|
|
867
|
+
* Device type for browser emulation
|
|
868
|
+
*/
|
|
869
|
+
device?: 'desktop' | 'mobile' | 'tablet';
|
|
870
|
+
/**
|
|
871
|
+
* Browser driver to use
|
|
872
|
+
*/
|
|
873
|
+
driver?: 'vx6' | 'vx8' | 'vx8-pro' | 'vx10' | 'vx10-pro' | 'vx12' | 'vx12-pro';
|
|
874
|
+
/**
|
|
875
|
+
* Expected HTTP status codes for successful requests
|
|
876
|
+
*/
|
|
877
|
+
expected_status_codes?: Array<number>;
|
|
878
|
+
/**
|
|
879
|
+
* List of acceptable response formats in order of preference
|
|
880
|
+
*/
|
|
881
|
+
formats?: Array<'html' | 'markdown' | 'screenshot'>;
|
|
882
|
+
/**
|
|
883
|
+
* Custom HTTP headers to include in the request
|
|
884
|
+
*/
|
|
885
|
+
headers?: {
|
|
886
|
+
[key: string]: string | Array<string> | null;
|
|
887
|
+
};
|
|
888
|
+
/**
|
|
889
|
+
* Whether to use HTTP/2 protocol
|
|
890
|
+
*/
|
|
891
|
+
http2?: boolean;
|
|
892
|
+
/**
|
|
893
|
+
* Whether to emulate XMLHttpRequest behavior
|
|
894
|
+
*/
|
|
895
|
+
is_xhr?: boolean;
|
|
896
|
+
/**
|
|
897
|
+
* Locale for browser language and region settings
|
|
898
|
+
*/
|
|
899
|
+
locale?: 'aa-DJ' | 'aa-ER' | 'aa-ET' | 'af' | 'af-NA' | 'af-ZA' | 'ak' | 'ak-GH' | 'am' | 'am-ET' | 'an-ES' | 'ar' | 'ar-AE' | 'ar-BH' | 'ar-DZ' | 'ar-EG' | 'ar-IN' | 'ar-IQ' | 'ar-JO' | 'ar-KW' | 'ar-LB' | 'ar-LY' | 'ar-MA' | 'ar-OM' | 'ar-QA' | 'ar-SA' | 'ar-SD' | 'ar-SY' | 'ar-TN' | 'ar-YE' | 'as' | 'as-IN' | 'asa' | 'asa-TZ' | 'ast-ES' | 'az' | 'az-AZ' | 'az-Cyrl' | 'az-Cyrl-AZ' | 'az-Latn' | 'az-Latn-AZ' | 'be' | 'be-BY' | 'bem' | 'bem-ZM' | 'ber-DZ' | 'ber-MA' | 'bez' | 'bez-TZ' | 'bg' | 'bg-BG' | 'bho-IN' | 'bm' | 'bm-ML' | 'bn' | 'bn-BD' | 'bn-IN' | 'bo' | 'bo-CN' | 'bo-IN' | 'br-FR' | 'brx-IN' | 'bs' | 'bs-BA' | 'byn-ER' | 'ca' | 'ca-AD' | 'ca-ES' | 'ca-FR' | 'ca-IT' | 'cgg' | 'cgg-UG' | 'chr' | 'chr-US' | 'crh-UA' | 'cs' | 'cs-CZ' | 'csb-PL' | 'cv-RU' | 'cy' | 'cy-GB' | 'da' | 'da-DK' | 'dav' | 'dav-KE' | 'de' | 'de-AT' | 'de-BE' | 'de-CH' | 'de-DE' | 'de-LI' | 'de-LU' | 'dv-MV' | 'dz-BT' | 'ebu' | 'ebu-KE' | 'ee' | 'ee-GH' | 'ee-TG' | 'el' | 'el-CY' | 'el-GR' | 'en' | 'en-AG' | 'en-AS' | 'en-AU' | 'en-BE' | 'en-BW' | 'en-BZ' | 'en-CA' | 'en-DK' | 'en-GB' | 'en-GU' | 'en-HK' | 'en-IE' | 'en-IN' | 'en-JM' | 'en-MH' | 'en-MP' | 'en-MT' | 'en-MU' | 'en-NA' | 'en-NG' | 'en-NZ' | 'en-PH' | 'en-PK' | 'en-SG' | 'en-TT' | 'en-UM' | 'en-US' | 'en-VI' | 'en-ZA' | 'en-ZM' | 'en-ZW' | 'eo' | 'es' | 'es-419' | 'es-AR' | 'es-BO' | 'es-CL' | 'es-CO' | 'es-CR' | 'es-CU' | 'es-DO' | 'es-EC' | 'es-ES' | 'es-GQ' | 'es-GT' | 'es-HN' | 'es-MX' | 'es-NI' | 'es-PA' | 'es-PE' | 'es-PR' | 'es-PY' | 'es-SV' | 'es-US' | 'es-UY' | 'es-VE' | 'et' | 'et-EE' | 'eu' | 'eu-ES' | 'fa' | 'fa-AF' | 'fa-IR' | 'ff' | 'ff-SN' | 'fi' | 'fi-FI' | 'fil' | 'fil-PH' | 'fo' | 'fo-FO' | 'fr' | 'fr-BE' | 'fr-BF' | 'fr-BI' | 'fr-BJ' | 'fr-BL' | 'fr-CA' | 'fr-CD' | 'fr-CF' | 'fr-CG' | 'fr-CH' | 'fr-CI' | 'fr-CM' | 'fr-DJ' | 'fr-FR' | 'fr-GA' | 'fr-GN' | 'fr-GP' | 'fr-GQ' | 'fr-KM' | 'fr-LU' | 'fr-MC' | 'fr-MF' | 'fr-MG' | 'fr-ML' | 'fr-MQ' | 'fr-NE' | 'fr-RE' | 'fr-RW' | 'fr-SN' | 'fr-TD' | 'fr-TG' | 'fur-IT' | 'fy-DE' | 'fy-NL' | 'ga' | 'ga-IE' | 'gd-GB' | 'gez-ER' | 'gez-ET' | 'gl' | 'gl-ES' | 'gsw' | 'gsw-CH' | 'gu' | 'gu-IN' | 'guz' | 'guz-KE' | 'gv' | 'gv-GB' | 'ha' | 'ha-Latn' | 'ha-Latn-GH' | 'ha-Latn-NE' | 'ha-Latn-NG' | 'ha-NG' | 'haw' | 'haw-US' | 'he' | 'he-IL' | 'hi' | 'hi-IN' | 'hne-IN' | 'hr' | 'hr-HR' | 'hsb-DE' | 'ht-HT' | 'hu' | 'hu-HU' | 'hy' | 'hy-AM' | 'id' | 'id-ID' | 'ig' | 'ig-NG' | 'ii' | 'ii-CN' | 'ik-CA' | 'is' | 'is-IS' | 'it' | 'it-CH' | 'it-IT' | 'iu-CA' | 'iw-IL' | 'ja' | 'ja-JP' | 'jmc' | 'jmc-TZ' | 'ka' | 'ka-GE' | 'kab' | 'kab-DZ' | 'kam' | 'kam-KE' | 'kde' | 'kde-TZ' | 'kea' | 'kea-CV' | 'khq' | 'khq-ML' | 'ki' | 'ki-KE' | 'kk' | 'kk-Cyrl' | 'kk-Cyrl-KZ' | 'kk-KZ' | 'kl' | 'kl-GL' | 'kln' | 'kln-KE' | 'km' | 'km-KH' | 'kn' | 'kn-IN' | 'ko' | 'ko-KR' | 'kok' | 'kok-IN' | 'ks-IN' | 'ku-TR' | 'kw' | 'kw-GB' | 'ky-KG' | 'lag' | 'lag-TZ' | 'lb-LU' | 'lg' | 'lg-UG' | 'li-BE' | 'li-NL' | 'lij-IT' | 'lo-LA' | 'lt' | 'lt-LT' | 'luo' | 'luo-KE' | 'luy' | 'luy-KE' | 'lv' | 'lv-LV' | 'mag-IN' | 'mai-IN' | 'mas' | 'mas-KE' | 'mas-TZ' | 'mer' | 'mer-KE' | 'mfe' | 'mfe-MU' | 'mg' | 'mg-MG' | 'mhr-RU' | 'mi-NZ' | 'mk' | 'mk-MK' | 'ml' | 'ml-IN' | 'mn-MN' | 'mr' | 'mr-IN' | 'ms' | 'ms-BN' | 'ms-MY' | 'mt' | 'mt-MT' | 'my' | 'my-MM' | 'nan-TW' | 'naq' | 'naq-NA' | 'nb' | 'nb-NO' | 'nd' | 'nd-ZW' | 'nds-DE' | 'nds-NL' | 'ne' | 'ne-IN' | 'ne-NP' | 'nl' | 'nl-AW' | 'nl-BE' | 'nl-NL' | 'nn' | 'nn-NO' | 'nr-ZA' | 'nso-ZA' | 'nyn' | 'nyn-UG' | 'oc-FR' | 'om' | 'om-ET' | 'om-KE' | 'or' | 'or-IN' | 'os-RU' | 'pa' | 'pa-Arab' | 'pa-Arab-PK' | 'pa-Guru' | 'pa-Guru-IN' | 'pa-IN' | 'pa-PK' | 'pap-AN' | 'pl' | 'pl-PL' | 'ps' | 'ps-AF' | 'pt' | 'pt-BR' | 'pt-GW' | 'pt-MZ' | 'pt-PT' | 'rm' | 'rm-CH' | 'ro' | 'ro-MD' | 'ro-RO' | 'rof' | 'rof-TZ' | 'ru' | 'ru-MD' | 'ru-RU' | 'ru-UA' | 'rw' | 'rw-RW' | 'rwk' | 'rwk-TZ' | 'sa-IN' | 'saq' | 'saq-KE' | 'sc-IT' | 'sd-IN' | 'se-NO' | 'seh' | 'seh-MZ' | 'ses' | 'ses-ML' | 'sg' | 'sg-CF' | 'shi' | 'shi-Latn' | 'shi-Latn-MA' | 'shi-Tfng' | 'shi-Tfng-MA' | 'shs-CA' | 'si' | 'si-LK' | 'sid-ET' | 'sk' | 'sk-SK' | 'sl' | 'sl-SI' | 'sn' | 'sn-ZW' | 'so' | 'so-DJ' | 'so-ET' | 'so-KE' | 'so-SO' | 'sq' | 'sq-AL' | 'sq-MK' | 'sr' | 'sr-Cyrl' | 'sr-Cyrl-BA' | 'sr-Cyrl-ME' | 'sr-Cyrl-RS' | 'sr-Latn' | 'sr-Latn-BA' | 'sr-Latn-ME' | 'sr-Latn-RS' | 'sr-ME' | 'sr-RS' | 'ss-ZA' | 'st-ZA' | 'sv' | 'sv-FI' | 'sv-SE' | 'sw' | 'sw-KE' | 'sw-TZ' | 'ta' | 'ta-IN' | 'ta-LK' | 'te' | 'te-IN' | 'teo' | 'teo-KE' | 'teo-UG' | 'tg-TJ' | 'th' | 'th-TH' | 'ti' | 'ti-ER' | 'ti-ET' | 'tig-ER' | 'tk-TM' | 'tl-PH' | 'tn-ZA' | 'to' | 'to-TO' | 'tr' | 'tr-CY' | 'tr-TR' | 'ts-ZA' | 'tt-RU' | 'tzm' | 'tzm-Latn' | 'tzm-Latn-MA' | 'ug-CN' | 'uk' | 'uk-UA' | 'unm-US' | 'ur' | 'ur-IN' | 'ur-PK' | 'uz' | 'uz-Arab' | 'uz-Arab-AF' | 'uz-Cyrl' | 'uz-Cyrl-UZ' | 'uz-Latn' | 'uz-Latn-UZ' | 'uz-UZ' | 've-ZA' | 'vi' | 'vi-VN' | 'vun' | 'vun-TZ' | 'wa-BE' | 'wae-CH' | 'wal-ET' | 'wo-SN' | 'xh-ZA' | 'xog' | 'xog-UG' | 'yi-US' | 'yo' | 'yo-NG' | 'yue-HK' | 'zh' | 'zh-CN' | 'zh-HK' | 'zh-Hans' | 'zh-Hans-CN' | 'zh-Hans-HK' | 'zh-Hans-MO' | 'zh-Hans-SG' | 'zh-Hant' | 'zh-Hant-HK' | 'zh-Hant-MO' | 'zh-Hant-TW' | 'zh-SG' | 'zh-TW' | 'zu' | 'zu-ZA' | 'auto';
|
|
900
|
+
/**
|
|
901
|
+
* HTTP method for the request
|
|
902
|
+
*/
|
|
903
|
+
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
904
|
+
/**
|
|
905
|
+
* Filters for capturing network traffic
|
|
906
|
+
*/
|
|
907
|
+
network_capture?: Array<Param.NetworkCapture>;
|
|
908
|
+
/**
|
|
909
|
+
* Operating system to emulate
|
|
910
|
+
*/
|
|
911
|
+
os?: 'windows' | 'mac os' | 'linux' | 'android' | 'ios';
|
|
912
|
+
/**
|
|
913
|
+
* Whether to parse the response content
|
|
914
|
+
*/
|
|
915
|
+
parse?: boolean;
|
|
916
|
+
/**
|
|
917
|
+
* Custom parser configuration as a key-value map
|
|
918
|
+
*/
|
|
919
|
+
parser?: {
|
|
920
|
+
[key: string]: unknown;
|
|
921
|
+
} | string;
|
|
922
|
+
/**
|
|
923
|
+
* Referrer policy for the request
|
|
924
|
+
*/
|
|
925
|
+
referrer_type?: 'random' | 'no-referer' | 'same-origin' | 'google' | 'bing' | 'facebook' | 'twitter' | 'instagram';
|
|
926
|
+
/**
|
|
927
|
+
* Whether to render JavaScript content using a browser
|
|
928
|
+
*/
|
|
929
|
+
render?: boolean;
|
|
930
|
+
/**
|
|
931
|
+
* Request timeout in milliseconds
|
|
932
|
+
*/
|
|
933
|
+
request_timeout?: number;
|
|
934
|
+
session?: Param.Session;
|
|
935
|
+
/**
|
|
936
|
+
* Skills or capabilities required for the request
|
|
937
|
+
*/
|
|
938
|
+
skill?: string | Array<string>;
|
|
939
|
+
/**
|
|
940
|
+
* US state for geolocation (only valid when country is US)
|
|
941
|
+
*/
|
|
942
|
+
state?: 'AL' | 'AK' | 'AS' | 'AZ' | 'AR' | 'CA' | 'CO' | 'CT' | 'DE' | 'DC' | 'FL' | 'GA' | 'GU' | 'HI' | 'ID' | 'IL' | 'IN' | 'IA' | 'KS' | 'KY' | 'LA' | 'ME' | 'MD' | 'MA' | 'MI' | 'MN' | 'MS' | 'MO' | 'MT' | 'NE' | 'NV' | 'NH' | 'NJ' | 'NM' | 'NY' | 'NC' | 'ND' | 'MP' | 'OH' | 'OK' | 'OR' | 'PA' | 'PR' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VT' | 'VA' | 'VI' | 'WA' | 'WV' | 'WI' | 'WY';
|
|
943
|
+
/**
|
|
944
|
+
* User-defined tag for request identification
|
|
945
|
+
*/
|
|
946
|
+
tag?: string;
|
|
947
|
+
}
|
|
948
|
+
namespace Param {
|
|
949
|
+
interface UnionMember1 {
|
|
950
|
+
name: 'chrome' | 'firefox';
|
|
951
|
+
/**
|
|
952
|
+
* Specific browser version to emulate
|
|
953
|
+
*/
|
|
954
|
+
version?: string;
|
|
955
|
+
}
|
|
956
|
+
interface UnionMember0 {
|
|
957
|
+
creation?: string | null;
|
|
958
|
+
domain?: string | null;
|
|
959
|
+
expires?: string;
|
|
960
|
+
extensions?: Array<string> | null;
|
|
961
|
+
hostOnly?: boolean | null;
|
|
962
|
+
httpOnly?: boolean | null;
|
|
963
|
+
lastAccessed?: string | null;
|
|
964
|
+
maxAge?: 'Infinity' | '-Infinity' | number | null;
|
|
965
|
+
name?: string;
|
|
966
|
+
path?: string | null;
|
|
967
|
+
pathIsDefault?: boolean | null;
|
|
968
|
+
sameSite?: 'strict' | 'lax' | 'none';
|
|
969
|
+
secure?: boolean;
|
|
970
|
+
value?: string;
|
|
971
|
+
[k: string]: unknown;
|
|
972
|
+
}
|
|
973
|
+
interface NetworkCapture {
|
|
974
|
+
method?: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
|
|
975
|
+
/**
|
|
976
|
+
* Resource type for network capture filtering
|
|
977
|
+
*/
|
|
978
|
+
resource_type?: string | Array<string>;
|
|
979
|
+
status_code?: number | Array<number>;
|
|
980
|
+
url?: NetworkCapture.URL;
|
|
981
|
+
validation?: boolean;
|
|
982
|
+
wait_for_requests_count?: number;
|
|
983
|
+
wait_for_requests_count_timeout?: number;
|
|
984
|
+
}
|
|
985
|
+
namespace NetworkCapture {
|
|
986
|
+
interface URL {
|
|
987
|
+
value: string;
|
|
988
|
+
type?: 'exact' | 'contains';
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
interface Session {
|
|
992
|
+
id?: string;
|
|
993
|
+
prefetch_userbrowser?: boolean;
|
|
994
|
+
retry?: boolean;
|
|
995
|
+
timeout?: number;
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* Shared parameters applied to the entire batch, such as storage and callback
|
|
1000
|
+
* configuration.
|
|
1001
|
+
*/
|
|
1002
|
+
interface SharedParams {
|
|
1003
|
+
/**
|
|
1004
|
+
* URL to call back when async operation completes
|
|
1005
|
+
*/
|
|
1006
|
+
callback_url?: string;
|
|
1007
|
+
/**
|
|
1008
|
+
* Whether to compress stored data
|
|
1009
|
+
*/
|
|
1010
|
+
storage_compress?: boolean;
|
|
1011
|
+
/**
|
|
1012
|
+
* Custom name for the stored object
|
|
1013
|
+
*/
|
|
1014
|
+
storage_object_name?: string;
|
|
1015
|
+
/**
|
|
1016
|
+
* Type of storage to use for results
|
|
1017
|
+
*/
|
|
1018
|
+
storage_type?: string;
|
|
1019
|
+
/**
|
|
1020
|
+
* URL for storage location
|
|
1021
|
+
*/
|
|
1022
|
+
storage_url?: string;
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
749
1025
|
export interface MapParams {
|
|
750
1026
|
/**
|
|
751
1027
|
* Url to map.
|
|
@@ -849,6 +1125,6 @@ export interface SearchParams {
|
|
|
849
1125
|
time_range?: 'hour' | 'day' | 'week' | 'month' | 'year' | null;
|
|
850
1126
|
}
|
|
851
1127
|
export declare namespace TopLevel {
|
|
852
|
-
export { type ExtractResponse as ExtractResponse, type ExtractAsyncResponse as ExtractAsyncResponse, type MapResponse as MapResponse, type SearchResponse as SearchResponse, type ExtractParams as ExtractParams, type ExtractAsyncParams as ExtractAsyncParams, type MapParams as MapParams, type SearchParams as SearchParams, };
|
|
1128
|
+
export { type ExtractResponse as ExtractResponse, type ExtractAsyncResponse as ExtractAsyncResponse, type ExtractBatchResponse as ExtractBatchResponse, type MapResponse as MapResponse, type SearchResponse as SearchResponse, type ExtractParams as ExtractParams, type ExtractAsyncParams as ExtractAsyncParams, type ExtractBatchParams as ExtractBatchParams, type MapParams as MapParams, type SearchParams as SearchParams, };
|
|
853
1129
|
}
|
|
854
1130
|
//# sourceMappingURL=top-level.d.mts.map
|