@nimble-way/nimble-js 0.16.0 → 0.17.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 +8 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/fast-serp.d.mts +309 -0
- package/resources/fast-serp.d.mts.map +1 -0
- package/resources/fast-serp.d.ts +309 -0
- package/resources/fast-serp.d.ts.map +1 -0
- package/resources/fast-serp.js +22 -0
- package/resources/fast-serp.js.map +1 -0
- package/resources/fast-serp.mjs +18 -0
- package/resources/fast-serp.mjs.map +1 -0
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- 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/src/client.ts +9 -0
- package/src/resources/fast-serp.ts +465 -0
- package/src/resources/index.ts +1 -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,309 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
export declare class FastSerp extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Fast SERP
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const response = await client.fastSerp.run({
|
|
11
|
+
* search_engine: 'google_search',
|
|
12
|
+
* });
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
run(body: FastSerpRunParams, options?: RequestOptions): APIPromise<FastSerpRunResponse>;
|
|
16
|
+
}
|
|
17
|
+
export interface FastSerpRunResponse {
|
|
18
|
+
data: FastSerpRunResponse.Data;
|
|
19
|
+
metadata: FastSerpRunResponse.Metadata;
|
|
20
|
+
/**
|
|
21
|
+
* The status of the task.
|
|
22
|
+
*/
|
|
23
|
+
status: 'success' | 'skipped' | 'fatal' | 'error' | 'postponed' | 'ignored' | 'rejected' | 'blocked';
|
|
24
|
+
/**
|
|
25
|
+
* Unique identifier for the task.
|
|
26
|
+
*/
|
|
27
|
+
task_id: string;
|
|
28
|
+
/**
|
|
29
|
+
* The final URL.
|
|
30
|
+
*/
|
|
31
|
+
url: string;
|
|
32
|
+
debug?: FastSerpRunResponse.Debug;
|
|
33
|
+
/**
|
|
34
|
+
* Pagination information if applicable.
|
|
35
|
+
*/
|
|
36
|
+
pagination?: FastSerpRunResponse.NextPageParams | Array<FastSerpRunResponse.UnionMember1>;
|
|
37
|
+
/**
|
|
38
|
+
* The HTTP status code of the task.
|
|
39
|
+
*/
|
|
40
|
+
status_code?: number;
|
|
41
|
+
/**
|
|
42
|
+
* List of warnings generated during the task.
|
|
43
|
+
*/
|
|
44
|
+
warnings?: Array<string>;
|
|
45
|
+
}
|
|
46
|
+
export declare namespace FastSerpRunResponse {
|
|
47
|
+
interface Data {
|
|
48
|
+
/**
|
|
49
|
+
* Browser actions execution results. Present only when browser_actions were
|
|
50
|
+
* specified in the request.
|
|
51
|
+
*/
|
|
52
|
+
browser_actions?: Data.BrowserActions;
|
|
53
|
+
/**
|
|
54
|
+
* The cookies collected from browser actions during the task.
|
|
55
|
+
*/
|
|
56
|
+
cookies?: Array<unknown>;
|
|
57
|
+
/**
|
|
58
|
+
* The evaluation results from browser actions during the task.
|
|
59
|
+
*/
|
|
60
|
+
eval?: Array<unknown>;
|
|
61
|
+
/**
|
|
62
|
+
* The http requests from browser actions made during the task.
|
|
63
|
+
*/
|
|
64
|
+
fetch?: Array<unknown>;
|
|
65
|
+
/**
|
|
66
|
+
* The headers received during the task.
|
|
67
|
+
*/
|
|
68
|
+
headers?: {
|
|
69
|
+
[key: string]: string;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* The HTML content of the page.
|
|
73
|
+
*/
|
|
74
|
+
html?: string;
|
|
75
|
+
/**
|
|
76
|
+
* List of all unique URLs found on the page.
|
|
77
|
+
*/
|
|
78
|
+
links?: Array<string>;
|
|
79
|
+
/**
|
|
80
|
+
* The Markdown version of the HTML content.
|
|
81
|
+
*/
|
|
82
|
+
markdown?: string;
|
|
83
|
+
/**
|
|
84
|
+
* The network capture data collected during the task.
|
|
85
|
+
*/
|
|
86
|
+
network_capture?: Array<Data.NetworkCapture>;
|
|
87
|
+
/**
|
|
88
|
+
* Individual HTML content of each pagination page, before merging.
|
|
89
|
+
*/
|
|
90
|
+
pages_html?: Array<string>;
|
|
91
|
+
/**
|
|
92
|
+
* The parsing results extracted from the HTML & network content.
|
|
93
|
+
*/
|
|
94
|
+
parsing?: Data.ParsingSuccessResult | Data.ParsingErrorResult | {
|
|
95
|
+
[key: string]: unknown;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* The list of redirects that occurred during the task.
|
|
99
|
+
*/
|
|
100
|
+
redirects?: Array<Data.Redirect>;
|
|
101
|
+
/**
|
|
102
|
+
* Screenshots taken during the task, from browser actions, or the screenshot
|
|
103
|
+
* format.
|
|
104
|
+
*/
|
|
105
|
+
screenshots?: Array<unknown>;
|
|
106
|
+
}
|
|
107
|
+
namespace Data {
|
|
108
|
+
/**
|
|
109
|
+
* Browser actions execution results. Present only when browser_actions were
|
|
110
|
+
* specified in the request.
|
|
111
|
+
*/
|
|
112
|
+
interface BrowserActions {
|
|
113
|
+
results: Array<BrowserActions.Result>;
|
|
114
|
+
success: boolean;
|
|
115
|
+
total_duration: number;
|
|
116
|
+
}
|
|
117
|
+
namespace BrowserActions {
|
|
118
|
+
interface Result {
|
|
119
|
+
duration: number;
|
|
120
|
+
name: 'goto' | 'wait' | 'wait_for_element' | 'wait_for_navigation' | 'click' | 'fill' | 'press' | 'scroll' | 'auto_scroll' | 'screenshot' | 'get_cookies' | 'eval' | 'fetch';
|
|
121
|
+
status: 'no-run' | 'in-progress' | 'done' | 'error' | 'skipped';
|
|
122
|
+
error?: string;
|
|
123
|
+
result?: unknown;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
interface NetworkCapture {
|
|
127
|
+
filter: NetworkCapture.Filter;
|
|
128
|
+
results: Array<NetworkCapture.Result>;
|
|
129
|
+
errorMessage?: string;
|
|
130
|
+
}
|
|
131
|
+
namespace NetworkCapture {
|
|
132
|
+
interface Filter {
|
|
133
|
+
validation: boolean;
|
|
134
|
+
wait_for_requests_count: number;
|
|
135
|
+
method?: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
|
|
136
|
+
/**
|
|
137
|
+
* Resource type for network capture filtering
|
|
138
|
+
*/
|
|
139
|
+
resource_type?: 'document' | 'stylesheet' | 'image' | 'media' | 'font' | 'script' | 'texttrack' | 'xhr' | 'fetch' | 'prefetch' | 'eventsource' | 'websocket' | 'manifest' | 'signedexchange' | 'ping' | 'cspviolationreport' | 'preflight' | 'other' | 'fedcm' | Array<'document' | 'stylesheet' | 'image' | 'media' | 'font' | 'script' | 'texttrack' | 'xhr' | 'fetch' | 'prefetch' | 'eventsource' | 'websocket' | 'manifest' | 'signedexchange' | 'ping' | 'cspviolationreport' | 'preflight' | 'other' | 'fedcm'>;
|
|
140
|
+
status_code?: number | Array<number>;
|
|
141
|
+
url?: Filter.URL;
|
|
142
|
+
wait_for_requests_count_timeout?: number;
|
|
143
|
+
}
|
|
144
|
+
namespace Filter {
|
|
145
|
+
interface URL {
|
|
146
|
+
type: 'exact' | 'contains';
|
|
147
|
+
value: string;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
interface Result {
|
|
151
|
+
request: Result.Request;
|
|
152
|
+
response: Result.Response;
|
|
153
|
+
}
|
|
154
|
+
namespace Result {
|
|
155
|
+
interface Request {
|
|
156
|
+
headers: {
|
|
157
|
+
[key: string]: string;
|
|
158
|
+
};
|
|
159
|
+
method: string;
|
|
160
|
+
/**
|
|
161
|
+
* Resource type for network capture filtering
|
|
162
|
+
*/
|
|
163
|
+
resource_type: 'document' | 'stylesheet' | 'image' | 'media' | 'font' | 'script' | 'texttrack' | 'xhr' | 'fetch' | 'prefetch' | 'eventsource' | 'websocket' | 'manifest' | 'signedexchange' | 'ping' | 'cspviolationreport' | 'preflight' | 'other' | 'fedcm';
|
|
164
|
+
url: string;
|
|
165
|
+
body?: string;
|
|
166
|
+
}
|
|
167
|
+
interface Response {
|
|
168
|
+
body: string;
|
|
169
|
+
headers: {
|
|
170
|
+
[key: string]: string;
|
|
171
|
+
};
|
|
172
|
+
serialization: 'none' | 'base64';
|
|
173
|
+
status: number;
|
|
174
|
+
status_text: string;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
interface ParsingSuccessResult {
|
|
179
|
+
entities: {
|
|
180
|
+
[key: string]: unknown;
|
|
181
|
+
};
|
|
182
|
+
status: 'success';
|
|
183
|
+
}
|
|
184
|
+
interface ParsingErrorResult {
|
|
185
|
+
error: string;
|
|
186
|
+
status: 'error';
|
|
187
|
+
}
|
|
188
|
+
interface Redirect {
|
|
189
|
+
status_code: number;
|
|
190
|
+
url: string;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
interface Metadata {
|
|
194
|
+
/**
|
|
195
|
+
* The name of the agent used for the query.
|
|
196
|
+
*/
|
|
197
|
+
agent?: string;
|
|
198
|
+
/**
|
|
199
|
+
* The driver used for the task.
|
|
200
|
+
*/
|
|
201
|
+
driver?: string;
|
|
202
|
+
/**
|
|
203
|
+
* The localization identifier for the query.
|
|
204
|
+
*/
|
|
205
|
+
localization_id?: string;
|
|
206
|
+
/**
|
|
207
|
+
* The duration in milliseconds of the query processing.
|
|
208
|
+
*/
|
|
209
|
+
query_duration?: number;
|
|
210
|
+
/**
|
|
211
|
+
* The time when the query was received.
|
|
212
|
+
*/
|
|
213
|
+
query_time?: string;
|
|
214
|
+
/**
|
|
215
|
+
* Additional response parameters.
|
|
216
|
+
*/
|
|
217
|
+
response_parameters?: unknown;
|
|
218
|
+
/**
|
|
219
|
+
* A tag associated with the query.
|
|
220
|
+
*/
|
|
221
|
+
tag?: string;
|
|
222
|
+
}
|
|
223
|
+
interface Debug {
|
|
224
|
+
/**
|
|
225
|
+
* Performance metrics collected during the task.
|
|
226
|
+
*/
|
|
227
|
+
performance_metrics?: {
|
|
228
|
+
[key: string]: number;
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* Total bytes used by the proxy during the task.
|
|
232
|
+
*/
|
|
233
|
+
proxy_total_bytes_usage?: number;
|
|
234
|
+
/**
|
|
235
|
+
* The transformed output after applying any transformations.
|
|
236
|
+
*/
|
|
237
|
+
transformed_output?: unknown;
|
|
238
|
+
/**
|
|
239
|
+
* The userbrowser instance using during the task.
|
|
240
|
+
*/
|
|
241
|
+
userbrowser?: unknown;
|
|
242
|
+
}
|
|
243
|
+
interface NextPageParams {
|
|
244
|
+
next_page_params: {
|
|
245
|
+
[key: string]: unknown;
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
interface UnionMember1 {
|
|
249
|
+
next_page_params: {
|
|
250
|
+
[key: string]: unknown;
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
export interface FastSerpRunParams {
|
|
255
|
+
/**
|
|
256
|
+
* The search engine to query.
|
|
257
|
+
*/
|
|
258
|
+
search_engine: 'google_search' | 'google_sge' | 'google_aio' | 'google_maps_search' | 'google_maps_reviews' | 'google_maps_place' | 'google_news' | 'google_images' | 'bing_search' | 'yandex_search';
|
|
259
|
+
/**
|
|
260
|
+
* ISO Alpha-2 country code used to access the target search engine (e.g. US, DE,
|
|
261
|
+
* GB).
|
|
262
|
+
*/
|
|
263
|
+
country?: string;
|
|
264
|
+
/**
|
|
265
|
+
* Device type used for the search request.
|
|
266
|
+
*/
|
|
267
|
+
device?: 'desktop' | 'mobile';
|
|
268
|
+
/**
|
|
269
|
+
* Top-level domain for the search engine (e.g. "com", "co.uk", "de").
|
|
270
|
+
*/
|
|
271
|
+
domain?: string;
|
|
272
|
+
/**
|
|
273
|
+
* Locale used for the search request.
|
|
274
|
+
*/
|
|
275
|
+
locale?: string;
|
|
276
|
+
/**
|
|
277
|
+
* Geo-location for the search (canonical Google location name).
|
|
278
|
+
*/
|
|
279
|
+
location?: string;
|
|
280
|
+
/**
|
|
281
|
+
* Number of results to return (1–100).
|
|
282
|
+
*/
|
|
283
|
+
num_results?: number;
|
|
284
|
+
/**
|
|
285
|
+
* The result page number for pagination.
|
|
286
|
+
*/
|
|
287
|
+
page?: number;
|
|
288
|
+
/**
|
|
289
|
+
* When true, the SERP response is parsed into structured JSON.
|
|
290
|
+
*/
|
|
291
|
+
parse?: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* The search keyword or phrase to query.
|
|
294
|
+
*/
|
|
295
|
+
query?: string;
|
|
296
|
+
/**
|
|
297
|
+
* Whether to render the page in a browser before extracting.
|
|
298
|
+
*/
|
|
299
|
+
render?: boolean;
|
|
300
|
+
/**
|
|
301
|
+
* When true, disables Google result filtering (filter=0) so omitted/duplicate and
|
|
302
|
+
* highly similar pages are also returned. Applies to Google search engines.
|
|
303
|
+
*/
|
|
304
|
+
show_hidden_results?: boolean;
|
|
305
|
+
}
|
|
306
|
+
export declare namespace FastSerp {
|
|
307
|
+
export { type FastSerpRunResponse as FastSerpRunResponse, type FastSerpRunParams as FastSerpRunParams };
|
|
308
|
+
}
|
|
309
|
+
//# sourceMappingURL=fast-serp.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fast-serp.d.mts","sourceRoot":"","sources":["../src/resources/fast-serp.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,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,CAAC;IAElB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACzG"}
|
|
@@ -0,0 +1,309 @@
|
|
|
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 FastSerp extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Fast SERP
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const response = await client.fastSerp.run({
|
|
11
|
+
* search_engine: 'google_search',
|
|
12
|
+
* });
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
run(body: FastSerpRunParams, options?: RequestOptions): APIPromise<FastSerpRunResponse>;
|
|
16
|
+
}
|
|
17
|
+
export interface FastSerpRunResponse {
|
|
18
|
+
data: FastSerpRunResponse.Data;
|
|
19
|
+
metadata: FastSerpRunResponse.Metadata;
|
|
20
|
+
/**
|
|
21
|
+
* The status of the task.
|
|
22
|
+
*/
|
|
23
|
+
status: 'success' | 'skipped' | 'fatal' | 'error' | 'postponed' | 'ignored' | 'rejected' | 'blocked';
|
|
24
|
+
/**
|
|
25
|
+
* Unique identifier for the task.
|
|
26
|
+
*/
|
|
27
|
+
task_id: string;
|
|
28
|
+
/**
|
|
29
|
+
* The final URL.
|
|
30
|
+
*/
|
|
31
|
+
url: string;
|
|
32
|
+
debug?: FastSerpRunResponse.Debug;
|
|
33
|
+
/**
|
|
34
|
+
* Pagination information if applicable.
|
|
35
|
+
*/
|
|
36
|
+
pagination?: FastSerpRunResponse.NextPageParams | Array<FastSerpRunResponse.UnionMember1>;
|
|
37
|
+
/**
|
|
38
|
+
* The HTTP status code of the task.
|
|
39
|
+
*/
|
|
40
|
+
status_code?: number;
|
|
41
|
+
/**
|
|
42
|
+
* List of warnings generated during the task.
|
|
43
|
+
*/
|
|
44
|
+
warnings?: Array<string>;
|
|
45
|
+
}
|
|
46
|
+
export declare namespace FastSerpRunResponse {
|
|
47
|
+
interface Data {
|
|
48
|
+
/**
|
|
49
|
+
* Browser actions execution results. Present only when browser_actions were
|
|
50
|
+
* specified in the request.
|
|
51
|
+
*/
|
|
52
|
+
browser_actions?: Data.BrowserActions;
|
|
53
|
+
/**
|
|
54
|
+
* The cookies collected from browser actions during the task.
|
|
55
|
+
*/
|
|
56
|
+
cookies?: Array<unknown>;
|
|
57
|
+
/**
|
|
58
|
+
* The evaluation results from browser actions during the task.
|
|
59
|
+
*/
|
|
60
|
+
eval?: Array<unknown>;
|
|
61
|
+
/**
|
|
62
|
+
* The http requests from browser actions made during the task.
|
|
63
|
+
*/
|
|
64
|
+
fetch?: Array<unknown>;
|
|
65
|
+
/**
|
|
66
|
+
* The headers received during the task.
|
|
67
|
+
*/
|
|
68
|
+
headers?: {
|
|
69
|
+
[key: string]: string;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* The HTML content of the page.
|
|
73
|
+
*/
|
|
74
|
+
html?: string;
|
|
75
|
+
/**
|
|
76
|
+
* List of all unique URLs found on the page.
|
|
77
|
+
*/
|
|
78
|
+
links?: Array<string>;
|
|
79
|
+
/**
|
|
80
|
+
* The Markdown version of the HTML content.
|
|
81
|
+
*/
|
|
82
|
+
markdown?: string;
|
|
83
|
+
/**
|
|
84
|
+
* The network capture data collected during the task.
|
|
85
|
+
*/
|
|
86
|
+
network_capture?: Array<Data.NetworkCapture>;
|
|
87
|
+
/**
|
|
88
|
+
* Individual HTML content of each pagination page, before merging.
|
|
89
|
+
*/
|
|
90
|
+
pages_html?: Array<string>;
|
|
91
|
+
/**
|
|
92
|
+
* The parsing results extracted from the HTML & network content.
|
|
93
|
+
*/
|
|
94
|
+
parsing?: Data.ParsingSuccessResult | Data.ParsingErrorResult | {
|
|
95
|
+
[key: string]: unknown;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* The list of redirects that occurred during the task.
|
|
99
|
+
*/
|
|
100
|
+
redirects?: Array<Data.Redirect>;
|
|
101
|
+
/**
|
|
102
|
+
* Screenshots taken during the task, from browser actions, or the screenshot
|
|
103
|
+
* format.
|
|
104
|
+
*/
|
|
105
|
+
screenshots?: Array<unknown>;
|
|
106
|
+
}
|
|
107
|
+
namespace Data {
|
|
108
|
+
/**
|
|
109
|
+
* Browser actions execution results. Present only when browser_actions were
|
|
110
|
+
* specified in the request.
|
|
111
|
+
*/
|
|
112
|
+
interface BrowserActions {
|
|
113
|
+
results: Array<BrowserActions.Result>;
|
|
114
|
+
success: boolean;
|
|
115
|
+
total_duration: number;
|
|
116
|
+
}
|
|
117
|
+
namespace BrowserActions {
|
|
118
|
+
interface Result {
|
|
119
|
+
duration: number;
|
|
120
|
+
name: 'goto' | 'wait' | 'wait_for_element' | 'wait_for_navigation' | 'click' | 'fill' | 'press' | 'scroll' | 'auto_scroll' | 'screenshot' | 'get_cookies' | 'eval' | 'fetch';
|
|
121
|
+
status: 'no-run' | 'in-progress' | 'done' | 'error' | 'skipped';
|
|
122
|
+
error?: string;
|
|
123
|
+
result?: unknown;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
interface NetworkCapture {
|
|
127
|
+
filter: NetworkCapture.Filter;
|
|
128
|
+
results: Array<NetworkCapture.Result>;
|
|
129
|
+
errorMessage?: string;
|
|
130
|
+
}
|
|
131
|
+
namespace NetworkCapture {
|
|
132
|
+
interface Filter {
|
|
133
|
+
validation: boolean;
|
|
134
|
+
wait_for_requests_count: number;
|
|
135
|
+
method?: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
|
|
136
|
+
/**
|
|
137
|
+
* Resource type for network capture filtering
|
|
138
|
+
*/
|
|
139
|
+
resource_type?: 'document' | 'stylesheet' | 'image' | 'media' | 'font' | 'script' | 'texttrack' | 'xhr' | 'fetch' | 'prefetch' | 'eventsource' | 'websocket' | 'manifest' | 'signedexchange' | 'ping' | 'cspviolationreport' | 'preflight' | 'other' | 'fedcm' | Array<'document' | 'stylesheet' | 'image' | 'media' | 'font' | 'script' | 'texttrack' | 'xhr' | 'fetch' | 'prefetch' | 'eventsource' | 'websocket' | 'manifest' | 'signedexchange' | 'ping' | 'cspviolationreport' | 'preflight' | 'other' | 'fedcm'>;
|
|
140
|
+
status_code?: number | Array<number>;
|
|
141
|
+
url?: Filter.URL;
|
|
142
|
+
wait_for_requests_count_timeout?: number;
|
|
143
|
+
}
|
|
144
|
+
namespace Filter {
|
|
145
|
+
interface URL {
|
|
146
|
+
type: 'exact' | 'contains';
|
|
147
|
+
value: string;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
interface Result {
|
|
151
|
+
request: Result.Request;
|
|
152
|
+
response: Result.Response;
|
|
153
|
+
}
|
|
154
|
+
namespace Result {
|
|
155
|
+
interface Request {
|
|
156
|
+
headers: {
|
|
157
|
+
[key: string]: string;
|
|
158
|
+
};
|
|
159
|
+
method: string;
|
|
160
|
+
/**
|
|
161
|
+
* Resource type for network capture filtering
|
|
162
|
+
*/
|
|
163
|
+
resource_type: 'document' | 'stylesheet' | 'image' | 'media' | 'font' | 'script' | 'texttrack' | 'xhr' | 'fetch' | 'prefetch' | 'eventsource' | 'websocket' | 'manifest' | 'signedexchange' | 'ping' | 'cspviolationreport' | 'preflight' | 'other' | 'fedcm';
|
|
164
|
+
url: string;
|
|
165
|
+
body?: string;
|
|
166
|
+
}
|
|
167
|
+
interface Response {
|
|
168
|
+
body: string;
|
|
169
|
+
headers: {
|
|
170
|
+
[key: string]: string;
|
|
171
|
+
};
|
|
172
|
+
serialization: 'none' | 'base64';
|
|
173
|
+
status: number;
|
|
174
|
+
status_text: string;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
interface ParsingSuccessResult {
|
|
179
|
+
entities: {
|
|
180
|
+
[key: string]: unknown;
|
|
181
|
+
};
|
|
182
|
+
status: 'success';
|
|
183
|
+
}
|
|
184
|
+
interface ParsingErrorResult {
|
|
185
|
+
error: string;
|
|
186
|
+
status: 'error';
|
|
187
|
+
}
|
|
188
|
+
interface Redirect {
|
|
189
|
+
status_code: number;
|
|
190
|
+
url: string;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
interface Metadata {
|
|
194
|
+
/**
|
|
195
|
+
* The name of the agent used for the query.
|
|
196
|
+
*/
|
|
197
|
+
agent?: string;
|
|
198
|
+
/**
|
|
199
|
+
* The driver used for the task.
|
|
200
|
+
*/
|
|
201
|
+
driver?: string;
|
|
202
|
+
/**
|
|
203
|
+
* The localization identifier for the query.
|
|
204
|
+
*/
|
|
205
|
+
localization_id?: string;
|
|
206
|
+
/**
|
|
207
|
+
* The duration in milliseconds of the query processing.
|
|
208
|
+
*/
|
|
209
|
+
query_duration?: number;
|
|
210
|
+
/**
|
|
211
|
+
* The time when the query was received.
|
|
212
|
+
*/
|
|
213
|
+
query_time?: string;
|
|
214
|
+
/**
|
|
215
|
+
* Additional response parameters.
|
|
216
|
+
*/
|
|
217
|
+
response_parameters?: unknown;
|
|
218
|
+
/**
|
|
219
|
+
* A tag associated with the query.
|
|
220
|
+
*/
|
|
221
|
+
tag?: string;
|
|
222
|
+
}
|
|
223
|
+
interface Debug {
|
|
224
|
+
/**
|
|
225
|
+
* Performance metrics collected during the task.
|
|
226
|
+
*/
|
|
227
|
+
performance_metrics?: {
|
|
228
|
+
[key: string]: number;
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* Total bytes used by the proxy during the task.
|
|
232
|
+
*/
|
|
233
|
+
proxy_total_bytes_usage?: number;
|
|
234
|
+
/**
|
|
235
|
+
* The transformed output after applying any transformations.
|
|
236
|
+
*/
|
|
237
|
+
transformed_output?: unknown;
|
|
238
|
+
/**
|
|
239
|
+
* The userbrowser instance using during the task.
|
|
240
|
+
*/
|
|
241
|
+
userbrowser?: unknown;
|
|
242
|
+
}
|
|
243
|
+
interface NextPageParams {
|
|
244
|
+
next_page_params: {
|
|
245
|
+
[key: string]: unknown;
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
interface UnionMember1 {
|
|
249
|
+
next_page_params: {
|
|
250
|
+
[key: string]: unknown;
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
export interface FastSerpRunParams {
|
|
255
|
+
/**
|
|
256
|
+
* The search engine to query.
|
|
257
|
+
*/
|
|
258
|
+
search_engine: 'google_search' | 'google_sge' | 'google_aio' | 'google_maps_search' | 'google_maps_reviews' | 'google_maps_place' | 'google_news' | 'google_images' | 'bing_search' | 'yandex_search';
|
|
259
|
+
/**
|
|
260
|
+
* ISO Alpha-2 country code used to access the target search engine (e.g. US, DE,
|
|
261
|
+
* GB).
|
|
262
|
+
*/
|
|
263
|
+
country?: string;
|
|
264
|
+
/**
|
|
265
|
+
* Device type used for the search request.
|
|
266
|
+
*/
|
|
267
|
+
device?: 'desktop' | 'mobile';
|
|
268
|
+
/**
|
|
269
|
+
* Top-level domain for the search engine (e.g. "com", "co.uk", "de").
|
|
270
|
+
*/
|
|
271
|
+
domain?: string;
|
|
272
|
+
/**
|
|
273
|
+
* Locale used for the search request.
|
|
274
|
+
*/
|
|
275
|
+
locale?: string;
|
|
276
|
+
/**
|
|
277
|
+
* Geo-location for the search (canonical Google location name).
|
|
278
|
+
*/
|
|
279
|
+
location?: string;
|
|
280
|
+
/**
|
|
281
|
+
* Number of results to return (1–100).
|
|
282
|
+
*/
|
|
283
|
+
num_results?: number;
|
|
284
|
+
/**
|
|
285
|
+
* The result page number for pagination.
|
|
286
|
+
*/
|
|
287
|
+
page?: number;
|
|
288
|
+
/**
|
|
289
|
+
* When true, the SERP response is parsed into structured JSON.
|
|
290
|
+
*/
|
|
291
|
+
parse?: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* The search keyword or phrase to query.
|
|
294
|
+
*/
|
|
295
|
+
query?: string;
|
|
296
|
+
/**
|
|
297
|
+
* Whether to render the page in a browser before extracting.
|
|
298
|
+
*/
|
|
299
|
+
render?: boolean;
|
|
300
|
+
/**
|
|
301
|
+
* When true, disables Google result filtering (filter=0) so omitted/duplicate and
|
|
302
|
+
* highly similar pages are also returned. Applies to Google search engines.
|
|
303
|
+
*/
|
|
304
|
+
show_hidden_results?: boolean;
|
|
305
|
+
}
|
|
306
|
+
export declare namespace FastSerp {
|
|
307
|
+
export { type FastSerpRunResponse as FastSerpRunResponse, type FastSerpRunParams as FastSerpRunParams };
|
|
308
|
+
}
|
|
309
|
+
//# sourceMappingURL=fast-serp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fast-serp.d.ts","sourceRoot":"","sources":["../src/resources/fast-serp.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;OASG;IACH,GAAG,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAGxF;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,mBAAmB,CAAC,IAAI,CAAC;IAE/B,QAAQ,EAAE,mBAAmB,CAAC,QAAQ,CAAC;IAEvC;;OAE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IAAI,mBAAmB,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACzG"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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.FastSerp = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
class FastSerp extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Fast SERP
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const response = await client.fastSerp.run({
|
|
13
|
+
* search_engine: 'google_search',
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
run(body, options) {
|
|
18
|
+
return this._client.post('/v1/fast-serp', { body, ...options });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.FastSerp = FastSerp;
|
|
22
|
+
//# sourceMappingURL=fast-serp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fast-serp.js","sourceRoot":"","sources":["../src/resources/fast-serp.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;OASG;IACH,GAAG,CAAC,IAAuB,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;CACF;AAdD,4BAcC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
export class FastSerp extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Fast SERP
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* const response = await client.fastSerp.run({
|
|
10
|
+
* search_engine: 'google_search',
|
|
11
|
+
* });
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
run(body, options) {
|
|
15
|
+
return this._client.post('/v1/fast-serp', { body, ...options });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=fast-serp.mjs.map
|