@spider-cloud/spider-client 0.1.82 → 0.1.84

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.
Files changed (2) hide show
  1. package/dist/config.d.ts +38 -1
  2. package/package.json +1 -1
package/dist/config.d.ts CHANGED
@@ -152,9 +152,41 @@ export type ClickAll = {
152
152
  };
153
153
  export type ClickAllClickable = {};
154
154
  export type ClickPoint = {
155
+ /** Rust: ClickPoint { x: f64, y: f64 } */
155
156
  x: number;
156
157
  y: number;
157
158
  };
159
+ /** Rust: ClickHold { selector: String, hold_for_ms: u64 } */
160
+ export type ClickHold = {
161
+ selector: string;
162
+ /** Duration to hold in milliseconds */
163
+ hold_for_ms: number;
164
+ };
165
+ /** Rust: ClickHoldPoint { x: f64, y: f64, hold_for_ms: u64 } */
166
+ export type ClickHoldPoint = {
167
+ x: number;
168
+ y: number;
169
+ /** Duration to hold in milliseconds */
170
+ hold_for_ms: number;
171
+ };
172
+ /** Rust: ClickDrag { from: String, to: String, modifier: Option<i64> } */
173
+ export type ClickDrag = {
174
+ /** CSS selector for the drag start element */
175
+ from: string;
176
+ /** CSS selector for the drag destination element */
177
+ to: string;
178
+ /** Optional keyboard modifier (e.g. Shift=8), maps to Option<i64> */
179
+ modifier?: number | null;
180
+ };
181
+ /** Rust: ClickDragPoint { from_x, from_y, to_x, to_y, modifier: Option<i64> } */
182
+ export type ClickDragPoint = {
183
+ from_x: number;
184
+ from_y: number;
185
+ to_x: number;
186
+ to_y: number;
187
+ /** Optional keyboard modifier (e.g. Shift=8), maps to Option<i64> */
188
+ modifier?: number | null;
189
+ };
158
190
  export type Wait = {
159
191
  /** Rust: u64 (milliseconds) */
160
192
  ms: number;
@@ -204,7 +236,7 @@ export type Screenshot = {
204
236
  output: string;
205
237
  };
206
238
  export type ValidateChain = {};
207
- export type WebAutomation = Evaluate | Click | ClickAll | ClickAllClickable | ClickPoint | Wait | WaitForNavigation | WaitForDom | WaitFor | WaitForWithTimeout | WaitForAndClick | ScrollX | ScrollY | Fill | Type | InfiniteScroll | Screenshot | ValidateChain;
239
+ export type WebAutomation = Evaluate | Click | ClickAll | ClickAllClickable | ClickPoint | ClickHold | ClickHoldPoint | ClickDrag | ClickDragPoint | Wait | WaitForNavigation | WaitForDom | WaitFor | WaitForWithTimeout | WaitForAndClick | ScrollX | ScrollY | Fill | Type | InfiniteScroll | Screenshot | ValidateChain;
208
240
  export type ReturnFormat = "markdown" | "commonmark" | "raw" | "screenshot" | "text" | "html2text" | "bytes" | "xml" | "empty";
209
241
  export type WebAutomationMap = Record<string, WebAutomation[]>;
210
242
  export type ExecutionScriptsMap = Record<string, string>;
@@ -420,6 +452,11 @@ export interface SpiderParams {
420
452
  * The wait for events on the page. You need to make your `request` `chrome` or `smart`.
421
453
  */
422
454
  wait_for?: WaitForConfiguration;
455
+ /**
456
+ * Disables service-provided hints that add request optimizations to improve crawl outcomes,
457
+ * such as network blacklists, request-type selection, geo handling, and more.
458
+ */
459
+ disable_hints?: boolean;
423
460
  /**
424
461
  * Disable request interception when running 'request' as 'chrome' or 'smart'. This can help when the page uses 3rd party or external scripts to load content.
425
462
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spider-cloud/spider-client",
3
- "version": "0.1.82",
3
+ "version": "0.1.84",
4
4
  "description": "Isomorphic Javascript SDK for Spider Cloud services",
5
5
  "scripts": {
6
6
  "test": "node --import tsx --test __tests__/*test.ts",