@getanyapi/sdk 0.9.9 → 0.9.11

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/index.d.cts CHANGED
@@ -131,7 +131,11 @@ interface ClientOptions {
131
131
  fetch?: typeof fetch;
132
132
  /** Max retry attempts for retryable failures (429 + retry-safe network). Default 2. */
133
133
  maxRetries?: number;
134
- /** Per-request timeout in milliseconds. Default 60000. */
134
+ /**
135
+ * Per-request timeout in milliseconds. Default 300000, matching the gateway's own
136
+ * execution budget: the slowest lane declares a 240s per-attempt ceiling, so a
137
+ * smaller default can abort a run the server was still going to answer.
138
+ */
135
139
  timeoutMs?: number;
136
140
  /** Send Idempotency-Key on billed POSTs. Default "auto"; use "off" as a kill switch. */
137
141
  idempotency?: "auto" | "off";
@@ -20388,8 +20392,8 @@ interface UpworkJobsInput {
20388
20392
  */
20389
20393
  jobType?: "fixed" | "hourly";
20390
20394
  /**
20391
- * Maximum number of results to return (1-25, default 25). You are billed per result returned, so a lower limit costs less.
20392
- * Range: minimum 1, maximum 25.
20395
+ * Maximum number of results to return (10-25, default 25). You are billed per result returned, so a lower limit costs less. This search has a floor of 10 results per page.
20396
+ * Range: minimum 10, maximum 25.
20393
20397
  */
20394
20398
  limit?: number;
20395
20399
  /**
@@ -20718,7 +20722,7 @@ interface WebScrapeInput {
20718
20722
  */
20719
20723
  url: string;
20720
20724
  /**
20721
- * Milliseconds to wait for the page to finish rendering before capture. Use this for JavaScript-heavy pages or single-page apps whose content loads after the initial paint. Capped at 15000 to stay within the request timeout.
20725
+ * Milliseconds to wait for the page to finish rendering before capture. Use this for JavaScript-heavy pages or single-page apps whose content loads after the initial paint. Capped at 15000 to stay within the request timeout. This wait is time you asked us to spend, so your response takes this much longer, and it is excluded from the latency published for this endpoint.
20722
20726
  * Range: minimum 0, maximum 15000.
20723
20727
  */
20724
20728
  waitFor?: number;
@@ -20822,10 +20826,10 @@ declare class WebNamespace {
20822
20826
  *
20823
20827
  * Scrape any web page and get its content back as clean Markdown (or HTML, or raw HTML) plus title and metadata.
20824
20828
  *
20825
- * Price: $0.0009 per request.
20829
+ * Price: $0.0005 per request.
20826
20830
  *
20827
20831
  * @example
20828
- * const res = await client.web.scrape({ url: "https://example.com", formats: ["markdown", "html", "rawHtml"], onlyMainContent: true });
20832
+ * const res = await client.web.scrape({ url: "https://example.com", formats: ["markdown", "rawHtml"], onlyMainContent: false });
20829
20833
  */
20830
20834
  scrape(input: WebScrapeInput, options?: RequestOptions): Promise<RunResult<WebScrapeData>>;
20831
20835
  /**
package/dist/index.d.ts CHANGED
@@ -131,7 +131,11 @@ interface ClientOptions {
131
131
  fetch?: typeof fetch;
132
132
  /** Max retry attempts for retryable failures (429 + retry-safe network). Default 2. */
133
133
  maxRetries?: number;
134
- /** Per-request timeout in milliseconds. Default 60000. */
134
+ /**
135
+ * Per-request timeout in milliseconds. Default 300000, matching the gateway's own
136
+ * execution budget: the slowest lane declares a 240s per-attempt ceiling, so a
137
+ * smaller default can abort a run the server was still going to answer.
138
+ */
135
139
  timeoutMs?: number;
136
140
  /** Send Idempotency-Key on billed POSTs. Default "auto"; use "off" as a kill switch. */
137
141
  idempotency?: "auto" | "off";
@@ -20388,8 +20392,8 @@ interface UpworkJobsInput {
20388
20392
  */
20389
20393
  jobType?: "fixed" | "hourly";
20390
20394
  /**
20391
- * Maximum number of results to return (1-25, default 25). You are billed per result returned, so a lower limit costs less.
20392
- * Range: minimum 1, maximum 25.
20395
+ * Maximum number of results to return (10-25, default 25). You are billed per result returned, so a lower limit costs less. This search has a floor of 10 results per page.
20396
+ * Range: minimum 10, maximum 25.
20393
20397
  */
20394
20398
  limit?: number;
20395
20399
  /**
@@ -20718,7 +20722,7 @@ interface WebScrapeInput {
20718
20722
  */
20719
20723
  url: string;
20720
20724
  /**
20721
- * Milliseconds to wait for the page to finish rendering before capture. Use this for JavaScript-heavy pages or single-page apps whose content loads after the initial paint. Capped at 15000 to stay within the request timeout.
20725
+ * Milliseconds to wait for the page to finish rendering before capture. Use this for JavaScript-heavy pages or single-page apps whose content loads after the initial paint. Capped at 15000 to stay within the request timeout. This wait is time you asked us to spend, so your response takes this much longer, and it is excluded from the latency published for this endpoint.
20722
20726
  * Range: minimum 0, maximum 15000.
20723
20727
  */
20724
20728
  waitFor?: number;
@@ -20822,10 +20826,10 @@ declare class WebNamespace {
20822
20826
  *
20823
20827
  * Scrape any web page and get its content back as clean Markdown (or HTML, or raw HTML) plus title and metadata.
20824
20828
  *
20825
- * Price: $0.0009 per request.
20829
+ * Price: $0.0005 per request.
20826
20830
  *
20827
20831
  * @example
20828
- * const res = await client.web.scrape({ url: "https://example.com", formats: ["markdown", "html", "rawHtml"], onlyMainContent: true });
20832
+ * const res = await client.web.scrape({ url: "https://example.com", formats: ["markdown", "rawHtml"], onlyMainContent: false });
20829
20833
  */
20830
20834
  scrape(input: WebScrapeInput, options?: RequestOptions): Promise<RunResult<WebScrapeData>>;
20831
20835
  /**
package/dist/index.js CHANGED
@@ -394,7 +394,7 @@ async function agentSignup(options = {}) {
394
394
 
395
395
  // src/core/client.ts
396
396
  var DEFAULT_BASE_URL2 = "https://api.getanyapi.com";
397
- var DEFAULT_TIMEOUT_MS = 6e4;
397
+ var DEFAULT_TIMEOUT_MS = 3e5;
398
398
  var DEFAULT_MAX_RETRIES = 2;
399
399
  var RETRY_BASE_DELAY_MS = 500;
400
400
  var RETRY_MAX_DELAY_MS = 8e3;
@@ -5104,10 +5104,10 @@ var WebNamespace = class {
5104
5104
  *
5105
5105
  * Scrape any web page and get its content back as clean Markdown (or HTML, or raw HTML) plus title and metadata.
5106
5106
  *
5107
- * Price: $0.0009 per request.
5107
+ * Price: $0.0005 per request.
5108
5108
  *
5109
5109
  * @example
5110
- * const res = await client.web.scrape({ url: "https://example.com", formats: ["markdown", "html", "rawHtml"], onlyMainContent: true });
5110
+ * const res = await client.web.scrape({ url: "https://example.com", formats: ["markdown", "rawHtml"], onlyMainContent: false });
5111
5111
  */
5112
5112
  scrape(input, options) {
5113
5113
  return this._core.run("web.scrape", input, options);