@spider-cloud/spider-client 0.0.66 → 0.0.68

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 +26 -21
  2. package/package.json +1 -1
package/dist/config.d.ts CHANGED
@@ -103,35 +103,28 @@ type CSSExtractionMap = {
103
103
  [path: string]: CSSSelector[];
104
104
  };
105
105
  export type WebAutomation = {
106
- type: "Evaluate";
107
- code: string;
106
+ Evaluate: string;
108
107
  } | {
109
- type: "Click";
110
- selector: string;
108
+ Click: string;
111
109
  } | {
112
- type: "Wait";
113
- duration: number;
110
+ Wait: number;
114
111
  } | {
115
- type: "WaitForNavigation";
112
+ WaitForNavigation: boolean;
116
113
  } | {
117
- type: "WaitFor";
118
- selector: string;
114
+ WaitFor: string;
119
115
  } | {
120
- type: "WaitForAndClick";
121
- selector: string;
116
+ WaitForAndClick: string;
122
117
  } | {
123
- type: "ScrollX";
124
- pixels: number;
118
+ ScrollX: number;
125
119
  } | {
126
- type: "ScrollY";
127
- pixels: number;
120
+ ScrollY: number;
128
121
  } | {
129
- type: "Fill";
130
- selector: string;
131
- value: string;
122
+ Fill: {
123
+ selector: string;
124
+ value?: string;
125
+ };
132
126
  } | {
133
- type: "InfiniteScroll";
134
- times: number;
127
+ InfiniteScroll: number;
135
128
  };
136
129
  export type WebAutomationMap = Record<string, WebAutomation[]>;
137
130
  export type ExecutionScriptsMap = Record<string, string>;
@@ -230,7 +223,7 @@ export interface SpiderParams {
230
223
  /**
231
224
  * Configuration settings for GPT (general purpose texture mappings).
232
225
  */
233
- gpt_config?: string[];
226
+ gpt_config?: Record<string, any>;
234
227
  /**
235
228
  * Specifies whether to use fingerprinting protection.
236
229
  */
@@ -267,10 +260,22 @@ export interface SpiderParams {
267
260
  * Get page insights to determine information like request duration, accessibility, and other web vitals. Requires the `metadata` parameter to be set to `true`.
268
261
  */
269
262
  page_insights?: boolean;
263
+ /**
264
+ * External domains to include the crawl.
265
+ */
266
+ external_domains?: string[];
270
267
  /**
271
268
  * Returns the OpenAI embeddings for the title and description. Other values, such as keywords, may also be included. Requires the `metadata` parameter to be set to `true`.
272
269
  */
273
270
  return_embeddings?: boolean;
271
+ /**
272
+ * Returns the HTTP response headers used.
273
+ */
274
+ return_headers?: boolean;
275
+ /**
276
+ * Returns the HTTP response cookies used.
277
+ */
278
+ return_cookies?: boolean;
274
279
  /**
275
280
  * The timeout for the request, in milliseconds.
276
281
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spider-cloud/spider-client",
3
- "version": "0.0.66",
3
+ "version": "0.0.68",
4
4
  "description": "Isomorphic Javascript SDK for Spider Cloud services",
5
5
  "scripts": {
6
6
  "test": "node --import tsx --test __tests__/*test.ts",