mcpscraper-sdk 0.52.0 → 0.53.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/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { AccessNamespace, CaptureNamespace, ChannelsNamespace, FactsNamespace, FilesNamespace, GraphNamespace, LibraryNamespace, MemoryNamespace, RecallNamespace, ScheduleNamespace, StorageNamespace, TablesNamespace, TagsNamespace, VaultsNamespace, VideoNamespace as VideoNamespace$1, WebhooksNamespace, CallToolFn, McpToolsClient } from 'mcpscraper-memory-sdk';
2
- export { GeneratedMcpToolsClient, MCP_TOOL_BINDINGS, MCP_TOOL_COUNT, McpContentBlock, McpToolCallResult, McpToolDescriptor, McpToolError, McpToolErrorDetails, McpToolsClient, McpToolsClientOptions } from 'mcpscraper-memory-sdk';
1
+ import { ClientMetadataOptions, AccessNamespace, CaptureNamespace, ChannelsNamespace, FactsNamespace, FilesNamespace, GraphNamespace, LibraryNamespace, MemoryNamespace, RecallNamespace, ScheduleNamespace, StorageNamespace, TablesNamespace, TagsNamespace, VaultsNamespace, VideoNamespace as VideoNamespace$1, WebhooksNamespace, CallToolFn, McpToolsClient } from 'mcpscraper-memory-sdk';
2
+ export { ArtifactDelivery, ClientAttribution, ClientMetadataOptions, DeliveredNamespace, GeneratedMcpToolsClient, MCP_TOOL_BINDINGS, MCP_TOOL_COUNT, McpContentBlock, McpToolCallResult, McpToolDescriptor, McpToolError, McpToolErrorDetails, McpToolsClient, McpToolsClientOptions, ResponseMetadata } from 'mcpscraper-memory-sdk';
3
3
 
4
4
  /**
5
5
  * This file was auto-generated by openapi-typescript.
@@ -1877,115 +1877,396 @@ interface components {
1877
1877
  debug: boolean;
1878
1878
  };
1879
1879
  SerpIntelligenceOrganicResult: {
1880
- position?: number;
1881
- title?: string;
1882
- url?: string;
1883
- domain?: string;
1884
- cite?: string | null;
1885
- snippet?: string | null;
1886
- isRedditStyle?: boolean;
1887
- inlineRating?: {
1888
- value?: string;
1889
- count?: string;
1880
+ position: number;
1881
+ title: string;
1882
+ url: string;
1883
+ rawUrl?: string;
1884
+ resolvedUrl?: string | null;
1885
+ /** @enum {string} */
1886
+ linkType?: "plain" | "google_url_redirect" | "google_goto_redirect";
1887
+ /** @enum {string} */
1888
+ resolutionStatus?: "not_needed" | "resolved" | "unresolved" | "rejected";
1889
+ sourcePage?: 1 | 2;
1890
+ domain: string;
1891
+ cite: string | null;
1892
+ snippet: string | null;
1893
+ isRedditStyle: boolean;
1894
+ inlineRating: {
1895
+ value: string;
1896
+ count: string;
1890
1897
  } | null;
1891
1898
  };
1892
1899
  SerpIntelligenceHarvestResult: {
1893
- seed?: string;
1894
- location?: string | null;
1895
- extractedAt?: string;
1896
- totalQuestions?: number;
1900
+ seed: string;
1901
+ location: string | null;
1902
+ extractedAt: string;
1903
+ totalQuestions: number;
1897
1904
  /** @enum {string} */
1898
- surface?: "web" | "aim" | "unknown";
1899
- aiOverview?: {
1900
- detected?: boolean;
1901
- text?: string | null;
1902
- citations?: {
1903
- text?: string;
1904
- href?: string;
1905
+ surface: "web" | "aim" | "unknown";
1906
+ aiOverview: {
1907
+ detected: boolean;
1908
+ text: string | null;
1909
+ citations: {
1910
+ text: string;
1911
+ href: string;
1912
+ rawUrl?: string;
1913
+ resolvedUrl?: string | null;
1914
+ /** @enum {string} */
1915
+ linkType?: "plain" | "google_url_redirect" | "google_goto_redirect";
1916
+ /** @enum {string} */
1917
+ resolutionStatus?: "not_needed" | "resolved" | "unresolved" | "rejected";
1905
1918
  }[];
1906
- };
1907
- aiMode?: {
1908
- detected?: boolean;
1909
- text?: string | null;
1910
- citations?: {
1911
- text?: string;
1912
- href?: string;
1919
+ expanded?: boolean;
1920
+ fullyExpanded?: boolean;
1921
+ sections?: string[];
1922
+ shareUrl?: string | null;
1923
+ };
1924
+ aiMode: {
1925
+ detected: boolean;
1926
+ text: string | null;
1927
+ citations: {
1928
+ text: string;
1929
+ href: string;
1930
+ rawUrl?: string;
1931
+ resolvedUrl?: string | null;
1932
+ /** @enum {string} */
1933
+ linkType?: "plain" | "google_url_redirect" | "google_goto_redirect";
1934
+ /** @enum {string} */
1935
+ resolutionStatus?: "not_needed" | "resolved" | "unresolved" | "rejected";
1913
1936
  }[];
1914
1937
  };
1915
- tree?: unknown[];
1916
- flat?: unknown[];
1917
- videos?: unknown[];
1918
- forums?: unknown[];
1919
- organicResults?: components["schemas"]["SerpIntelligenceOrganicResult"][];
1920
- localPack?: unknown[];
1921
- entityIds?: {
1922
- entities?: {
1923
- name?: string;
1924
- kgId?: string | null;
1925
- cid?: string | null;
1926
- gcid?: string | null;
1938
+ tree: components["schemas"]["SerpIntelligencePaaNode"][];
1939
+ flat: {
1940
+ seed_query: string;
1941
+ question_id: string;
1942
+ google_link_id: string;
1943
+ google_evidence_id: string;
1944
+ question: string;
1945
+ answer: string;
1946
+ answerExpansionIncomplete?: boolean;
1947
+ source_title: string;
1948
+ source_site: string;
1949
+ source_cite: string;
1950
+ sources: {
1951
+ url: string;
1952
+ rawUrl?: string;
1953
+ resolvedUrl?: string | null;
1954
+ /** @enum {string} */
1955
+ linkType?: "plain" | "google_url_redirect" | "google_goto_redirect";
1956
+ /** @enum {string} */
1957
+ resolutionStatus?: "not_needed" | "resolved" | "unresolved" | "rejected";
1958
+ title: string | null;
1959
+ site: string | null;
1960
+ description?: string | null;
1927
1961
  }[];
1928
- kgIds?: string[];
1929
- cids?: string[];
1930
- gcids?: string[];
1931
- };
1932
- stats?: {
1933
- seed?: string;
1934
- totalQuestions?: number;
1935
- maxDepthReached?: number;
1936
- durationMs?: number;
1937
- errorCount?: number;
1962
+ depth: number;
1963
+ parent_question: string;
1964
+ extracted_at: string;
1965
+ }[];
1966
+ videos: {
1967
+ /** @enum {string} */
1968
+ type: "video" | "short_video";
1969
+ title: string;
1970
+ channel: string;
1971
+ platform: string;
1972
+ duration: string;
1973
+ url: string;
1974
+ }[];
1975
+ forums: {
1976
+ title: string;
1977
+ source: string;
1978
+ url: string;
1979
+ }[];
1980
+ organicResults: components["schemas"]["SerpIntelligenceOrganicResult"][];
1981
+ localPack: {
1982
+ position: number;
1983
+ name: string;
1984
+ cid?: string | null;
1985
+ rating?: string | null;
1986
+ reviewCount?: string | null;
1987
+ metadata?: string[];
1988
+ websiteUrl?: string | null;
1989
+ directionsUrl?: string | null;
1990
+ }[];
1991
+ entityIds: {
1992
+ entities: {
1993
+ name: string;
1994
+ kgId: string | null;
1995
+ cid: string | null;
1996
+ gcid: string | null;
1997
+ }[];
1998
+ kgIds: string[];
1999
+ cids: string[];
2000
+ gcids: string[];
2001
+ };
2002
+ stats: {
2003
+ seed: string;
2004
+ totalQuestions: number;
2005
+ maxDepthReached: number;
2006
+ durationMs: number;
2007
+ errorCount: number;
1938
2008
  };
1939
- diagnostics?: {
1940
- [key: string]: unknown;
2009
+ diagnostics: components["schemas"]["SerpIntelligenceHarvestDiagnostics"];
2010
+ whatPeopleSaying: {
2011
+ /** @enum {string} */
2012
+ type: "reddit" | "facebook" | "instagram" | "tiktok" | "youtube" | "news" | "unknown";
2013
+ title: string;
2014
+ url: string;
2015
+ source: string;
2016
+ platform: string;
2017
+ popularComment: string | null;
2018
+ engagement: string;
2019
+ date: string;
2020
+ duration: string | null;
2021
+ authorNote: string | null;
2022
+ }[];
2023
+ };
2024
+ SerpIntelligenceHarvestDiagnostics: {
2025
+ /** @enum {string} */
2026
+ completionStatus: "paa_found" | "no_paa" | "serp_only";
2027
+ /** @enum {string|null} */
2028
+ problem?: null;
2029
+ /** @enum {string} */
2030
+ resultQuality?: "complete" | "partial" | "degraded";
2031
+ degradedResult?: boolean;
2032
+ degradationReasons?: ("empty_primary_serp" | "page_two_missing")[];
2033
+ retryRecommended?: boolean;
2034
+ noPaaObserved?: boolean;
2035
+ phaseTimings?: {
2036
+ providerConnectMs?: number;
2037
+ navigationMs?: number;
2038
+ serpParseMs?: number;
2039
+ paaExpansionMs?: number;
2040
+ linkResolutionMs?: number;
2041
+ totalServerMs: number;
2042
+ };
2043
+ pagination?: {
2044
+ requestedPages: 1 | 2;
2045
+ capturedPages: 1 | 2;
2046
+ /** @enum {string} */
2047
+ page2Status: "not_requested" | "not_attempted" | "captured" | "unavailable" | "failed";
2048
+ page1OrganicCount: number;
2049
+ page2OrganicCount: number;
2050
+ /** @enum {string} */
2051
+ failureCode?: "missing_next" | "invalid_next" | "empty_page" | "captcha" | "timeout" | "navigation_error" | "unsupported_driver";
2052
+ };
2053
+ completeness?: {
2054
+ paaWithoutAnswer: number;
2055
+ paaWithoutSource: number;
2056
+ paaIncompleteAnswers?: number;
2057
+ paaAnswersRecovered: number;
2058
+ aioShareCaptured: boolean | null;
2059
+ paaRequested?: number;
2060
+ paaReturned?: number;
2061
+ paaUnique?: number;
2062
+ };
2063
+ interruption?: {
2064
+ /** @enum {string} */
2065
+ code: "browser_session_interrupted" | "request_aborted" | "timeout";
1941
2066
  };
1942
- whatPeopleSaying?: unknown[];
2067
+ warnings?: {
2068
+ /** @enum {string} */
2069
+ code: "short_videos_captcha_skipped" | "paa_partial";
2070
+ /** @enum {string} */
2071
+ surface: "short_videos" | "paa";
2072
+ retryable: boolean;
2073
+ }[];
2074
+ links?: {
2075
+ linkCandidatesObserved: number;
2076
+ plainLinksObserved: number;
2077
+ googleUrlRedirectsObserved: number;
2078
+ googleGotoRedirectsObserved: number;
2079
+ redirectsResolved: number;
2080
+ redirectsUnresolved: number;
2081
+ redirectsRejected: number;
2082
+ resolverNonGoogleRequestsObserved: number;
2083
+ paaSourcesPreserved: number;
2084
+ aiOverviewLabelValidated: boolean;
2085
+ };
2086
+ paaLifecycle?: {
2087
+ requestedQuestions: number;
2088
+ questionsFound: number;
2089
+ /** @enum {string} */
2090
+ targetStatus: "met" | "not_met";
2091
+ /** @enum {string} */
2092
+ discoveryStatus: "in_progress" | "target_reached" | "frontier_exhausted" | "no_paa_observed" | "interrupted" | "recovery_exhausted";
2093
+ /** @enum {string} */
2094
+ materialStatus: "complete" | "partial";
2095
+ automaticRetries: number;
2096
+ retryBreakdown: {
2097
+ controlRetries: number;
2098
+ browserRetries: number;
2099
+ providerFallbacks: number;
2100
+ runtimeRecoveries: number;
2101
+ idempotentReplays: number;
2102
+ };
2103
+ knownQuestions: number;
2104
+ processedQuestions: number;
2105
+ failedInteractions: number;
2106
+ noGrowthConfirmations: number;
2107
+ visibleControls?: number;
2108
+ eligibleControls?: number;
2109
+ dispatchedInteractions?: number;
2110
+ confirmedInteractions?: number;
2111
+ unconfirmedInteractions?: number;
2112
+ };
2113
+ };
2114
+ SerpIntelligenceLocationEvidence: {
2115
+ /** @enum {string} */
2116
+ status: "not_requested" | "matched" | "mismatch" | "unknown";
2117
+ expected: {
2118
+ city: string;
2119
+ regionCode: string | null;
2120
+ canonicalLocation: string;
2121
+ } | null;
2122
+ candidates: {
2123
+ city: string;
2124
+ regionCode: string;
2125
+ count: number;
2126
+ examples: string[];
2127
+ }[];
2128
+ };
2129
+ SerpIntelligenceCaptureAttempt: {
2130
+ attemptNumber: number;
2131
+ /** @enum {string} */
2132
+ outcome: "paa_found" | "paa_partial" | "no_paa" | "serp_only" | "degraded_result" | "captcha" | "request_aborted" | "timeout" | "location_mismatch" | "proxy_tunnel_failed" | "proxy_unavailable" | "browser_session_interrupted" | "mcp_unavailable" | "error" | "page_captured" | "page_failed";
2133
+ startedAt?: string;
2134
+ completedAt?: string;
2135
+ durationMs?: number;
2136
+ /** @enum {string} */
2137
+ problemCode?: "paa_found" | "paa_partial" | "no_paa" | "serp_only" | "degraded_result" | "captcha" | "request_aborted" | "timeout" | "location_mismatch" | "proxy_tunnel_failed" | "proxy_unavailable" | "browser_session_interrupted" | "mcp_unavailable" | "error" | "captcha_exhausted" | "harvest_timeout" | "service_unavailable" | "vendor_unavailable" | "extraction_failed" | "invalid_url" | "capture_failed";
2138
+ cleanupSucceeded?: boolean | null;
1943
2139
  };
1944
2140
  SerpPageSnapshotCapture: {
1945
- url?: string;
1946
- requestedUrl?: string;
1947
- finalUrl?: string | null;
2141
+ /** Format: uri */
2142
+ url: string;
2143
+ /** Format: uri */
2144
+ requestedUrl: string;
2145
+ /** Format: uri */
2146
+ finalUrl: string | null;
1948
2147
  /** @enum {string} */
1949
- sourceKind?: "organic" | "ai_citation" | "local_pack_website" | "configured_target" | "site_subject";
1950
- sourcePosition?: number | null;
2148
+ sourceKind: "organic" | "ai_citation" | "local_pack_website" | "configured_target" | "site_subject";
2149
+ sourcePosition: number | null;
1951
2150
  /** @enum {string} */
1952
- status?: "captured" | "skipped" | "failed";
2151
+ status: "captured" | "skipped" | "failed";
1953
2152
  /** @enum {string|null} */
1954
- fetchedVia?: "fetch" | "headless" | "browser" | "mcp" | null;
1955
- httpStatus?: number | null;
1956
- contentType?: string | null;
1957
- title?: string | null;
1958
- canonicalUrl?: string | null;
1959
- metaDescription?: string | null;
1960
- headings?: {
1961
- level?: number;
1962
- text?: string;
2153
+ fetchedVia: "fetch" | "headless" | "browser" | "mcp" | null;
2154
+ httpStatus: number | null;
2155
+ contentType: string | null;
2156
+ title: string | null;
2157
+ /** Format: uri */
2158
+ canonicalUrl: string | null;
2159
+ metaDescription: string | null;
2160
+ /** @default [] */
2161
+ headings: {
2162
+ level: number;
2163
+ text: string;
1963
2164
  }[];
1964
- artifact?: {
1965
- htmlBlobUrl?: string | null;
1966
- textBlobUrl?: string | null;
1967
- markdownBlobUrl?: string | null;
1968
- screenshotBlobUrl?: string | null;
1969
- contentSha256?: string | null;
1970
- capturedAt?: string | null;
1971
- };
1972
- error?: {
1973
- code?: string;
1974
- message?: string;
2165
+ artifact: {
2166
+ /** Format: uri */
2167
+ htmlBlobUrl: string | null;
2168
+ /** Format: uri */
2169
+ textBlobUrl: string | null;
2170
+ /** Format: uri */
2171
+ markdownBlobUrl: string | null;
2172
+ /** Format: uri */
2173
+ screenshotBlobUrl: string | null;
2174
+ contentSha256: string | null;
2175
+ capturedAt: string | null;
2176
+ };
2177
+ error: {
2178
+ /** @enum {string} */
2179
+ code: "invalid_url" | "timeout" | "capture_failed";
2180
+ message: string;
1975
2181
  } | null;
2182
+ schemaTypes?: string[];
2183
+ wordCount?: number;
2184
+ linkCounts?: {
2185
+ wordCount: number;
2186
+ internalLinkCount: number;
2187
+ externalLinkCount: number;
2188
+ totalLinkCount: number;
2189
+ };
2190
+ hashes?: {
2191
+ htmlSha256: string | null;
2192
+ markdownSha256: string | null;
2193
+ textSha256: string | null;
2194
+ };
2195
+ content?: {
2196
+ html: string | null;
2197
+ markdown: string | null;
2198
+ text: string | null;
2199
+ };
2200
+ diagnostics?: {
2201
+ requestedAt: string;
2202
+ completedAt: string;
2203
+ durationMs: number;
2204
+ urlValidation: {
2205
+ passed: boolean;
2206
+ };
2207
+ browserFallback: {
2208
+ configured: boolean;
2209
+ used: boolean;
2210
+ boundedByTimeoutMs: number;
2211
+ };
2212
+ content: {
2213
+ htmlIncluded: boolean;
2214
+ markdownIncluded: boolean;
2215
+ textIncluded: boolean;
2216
+ maxContentChars: number;
2217
+ truncated: boolean;
2218
+ };
2219
+ };
2220
+ };
2221
+ SerpIntelligencePageSnapshotDiagnostics: {
2222
+ requestedCount?: number;
2223
+ capturedCount?: number;
2224
+ failedCount?: number;
2225
+ maxConcurrency?: number;
2226
+ timeoutMs?: number;
1976
2227
  };
1977
2228
  SerpIntelligenceCaptureResponse: {
1978
- harvestResult?: components["schemas"]["SerpIntelligenceHarvestResult"];
1979
- locationEvidence?: {
1980
- [key: string]: unknown;
1981
- } | null;
1982
- pageSnapshotArtifacts?: components["schemas"]["SerpPageSnapshotCapture"][];
2229
+ harvestResult: components["schemas"]["SerpIntelligenceHarvestResult"];
2230
+ attempts: components["schemas"]["SerpIntelligenceCaptureAttempt"][];
2231
+ locationEvidence: components["schemas"]["SerpIntelligenceLocationEvidence"] | null;
2232
+ pageSnapshotArtifacts: components["schemas"]["SerpPageSnapshotCapture"][];
1983
2233
  billing: {
1984
2234
  creditsUsed: number;
2235
+ requestId?: string;
2236
+ jobId?: string;
1985
2237
  };
1986
2238
  };
1987
2239
  SerpIntelligencePageSnapshotsResponse: {
1988
- pageSnapshotArtifacts?: components["schemas"]["SerpPageSnapshotCapture"][];
2240
+ pageSnapshotArtifacts: components["schemas"]["SerpPageSnapshotCapture"][];
2241
+ /** @default [] */
2242
+ attempts: components["schemas"]["SerpIntelligenceCaptureAttempt"][];
2243
+ diagnostics?: components["schemas"]["SerpIntelligencePageSnapshotDiagnostics"];
2244
+ };
2245
+ SerpIntelligencePaaNode: {
2246
+ questionId: string;
2247
+ googleLinkId: string | null;
2248
+ googleEvidenceId: string | null;
2249
+ question: string;
2250
+ answer: string | null;
2251
+ answerExpansionIncomplete?: boolean;
2252
+ sourceTitle: string | null;
2253
+ sourceSite: string | null;
2254
+ sourceCite: string | null;
2255
+ sources: {
2256
+ url: string;
2257
+ rawUrl?: string;
2258
+ resolvedUrl?: string | null;
2259
+ /** @enum {string} */
2260
+ linkType?: "plain" | "google_url_redirect" | "google_goto_redirect";
2261
+ /** @enum {string} */
2262
+ resolutionStatus?: "not_needed" | "resolved" | "unresolved" | "rejected";
2263
+ title: string | null;
2264
+ site: string | null;
2265
+ description?: string | null;
2266
+ }[];
2267
+ depth: number;
2268
+ parentQuestion: string | null;
2269
+ children: components["schemas"]["SerpIntelligencePaaNode"][];
1989
2270
  };
1990
2271
  WorkflowRun: {
1991
2272
  id?: string;
@@ -4701,7 +4982,7 @@ type SuccessBodyOf<K extends OperationId> = operations[K]['responses'] extends {
4701
4982
  };
4702
4983
  };
4703
4984
  } ? B : unknown;
4704
- interface ScraperClientOptions {
4985
+ interface ScraperClientOptions extends ClientMetadataOptions {
4705
4986
  apiKey: string;
4706
4987
  baseUrl?: string;
4707
4988
  fetch?: typeof globalThis.fetch;
@@ -4740,13 +5021,17 @@ interface SerpIntelligenceCaptureOptions {
4740
5021
  interface SerpIntelligenceCaptureReceipt {
4741
5022
  data: SuccessBodyOf<'serpIntelligenceCapture'>;
4742
5023
  idempotencyKey: string | null;
5024
+ requestId?: string;
4743
5025
  }
4744
5026
  declare class Requester {
4745
5027
  private readonly apiKey;
4746
5028
  private readonly baseUrl;
4747
5029
  private readonly fetchImpl;
4748
5030
  private readonly timeoutMs;
4749
- constructor(apiKey: string, baseUrl: string, fetchImpl: typeof globalThis.fetch, timeoutMs: number);
5031
+ private readonly metadataOptions;
5032
+ constructor(apiKey: string, baseUrl: string, fetchImpl: typeof globalThis.fetch, timeoutMs: number, metadataOptions?: ClientMetadataOptions);
5033
+ private headers;
5034
+ private received;
4750
5035
  private request;
4751
5036
  call<K extends OperationId>(method: string, path: string, body?: RequestBodyOf<K>, extraHeaders?: Record<string, string>, options?: ScraperRequestOptions): Promise<SuccessBodyOf<K>>;
4752
5037
  callWithReceipt<K extends OperationId>(method: string, path: string, body?: RequestBodyOf<K>, extraHeaders?: Record<string, string>, options?: ScraperRequestOptions): Promise<{
@@ -4849,7 +5134,7 @@ declare class InstagramNamespace {
4849
5134
  declare class RedditNamespace {
4850
5135
  private readonly r;
4851
5136
  constructor(r: Requester);
4852
- thread(params: RequestBodyOf<'redditThread'>): Promise<{
5137
+ thread(params: RequestBodyOf<'redditThread'>, options?: ScraperRequestOptions & IdempotentRequestOptions): Promise<{
4853
5138
  title?: string;
4854
5139
  author?: string | null;
4855
5140
  score?: string | null;
@@ -5185,18 +5470,21 @@ declare class SerpIntelligenceNamespace {
5185
5470
  private readonly r;
5186
5471
  constructor(r: Requester);
5187
5472
  capture(params: SerpIntelligenceCaptureParams, options?: SerpIntelligenceCaptureOptions): Promise<{
5188
- harvestResult?: components["schemas"]["SerpIntelligenceHarvestResult"];
5189
- locationEvidence?: {
5190
- [key: string]: unknown;
5191
- } | null;
5192
- pageSnapshotArtifacts?: components["schemas"]["SerpPageSnapshotCapture"][];
5473
+ harvestResult: components["schemas"]["SerpIntelligenceHarvestResult"];
5474
+ attempts: components["schemas"]["SerpIntelligenceCaptureAttempt"][];
5475
+ locationEvidence: components["schemas"]["SerpIntelligenceLocationEvidence"] | null;
5476
+ pageSnapshotArtifacts: components["schemas"]["SerpPageSnapshotCapture"][];
5193
5477
  billing: {
5194
5478
  creditsUsed: number;
5479
+ requestId?: string;
5480
+ jobId?: string;
5195
5481
  };
5196
5482
  }>;
5197
5483
  captureWithReceipt(params: SerpIntelligenceCaptureParams, options?: SerpIntelligenceCaptureOptions): Promise<SerpIntelligenceCaptureReceipt>;
5198
5484
  pageSnapshots(params: RequestBodyOf<'serpIntelligencePageSnapshots'>): Promise<{
5199
- pageSnapshotArtifacts?: components["schemas"]["SerpPageSnapshotCapture"][];
5485
+ pageSnapshotArtifacts: components["schemas"]["SerpPageSnapshotCapture"][];
5486
+ attempts: components["schemas"]["SerpIntelligenceCaptureAttempt"][];
5487
+ diagnostics?: components["schemas"]["SerpIntelligencePageSnapshotDiagnostics"];
5200
5488
  }>;
5201
5489
  }
5202
5490
  declare class WorkflowsNamespace {
@@ -5708,11 +5996,15 @@ type StructuredErrorBody = components['schemas']['StructuredError'];
5708
5996
  type PublicErrorEnvelopeBody = components['schemas']['PublicErrorEnvelope'];
5709
5997
  type ConcurrencyPackBody = components['schemas']['ConcurrencyPack'];
5710
5998
  type ConcurrencyAccountViewBody = components['schemas']['ConcurrencyAccountView'];
5999
+ interface ScraperApiErrorDetails {
6000
+ requestId?: string;
6001
+ }
5711
6002
  declare class ScraperApiError extends Error {
5712
6003
  readonly status: number;
5713
6004
  readonly code?: string;
5714
6005
  readonly body: unknown;
5715
- constructor(status: number, body: unknown);
6006
+ readonly requestId?: string;
6007
+ constructor(status: number, body: unknown, details?: ScraperApiErrorDetails);
5716
6008
  isInsufficientBalance(): this is ScraperApiError & {
5717
6009
  body: InsufficientBalanceBody;
5718
6010
  };
@@ -5730,4 +6022,4 @@ declare class ScraperApiError extends Error {
5730
6022
  };
5731
6023
  }
5732
6024
 
5733
- export { type ArchiveReadParams, type ConcurrencyAccountViewBody, type ConcurrencyLimitBody, type ConcurrencyPackBody, type DirectoryRunParams, type ExtractSiteOptions, type GmailMutationOptions, type HarvestParams, type IdempotentRequestOptions, type InsufficientBalanceBody, type MapsSearchParams, type PublicErrorEnvelopeBody, ScraperApiError, ScraperClient, type ScraperClientOptions, type ScraperRequestOptions, type SearchSerpParams, type SerpIntelligenceCaptureOptions, type SerpIntelligenceCaptureParams, type SerpIntelligenceCaptureReceipt, type StructuredErrorBody, type components, type operations, type paths };
6025
+ export { type ArchiveReadParams, type ConcurrencyAccountViewBody, type ConcurrencyLimitBody, type ConcurrencyPackBody, type DirectoryRunParams, type ExtractSiteOptions, type GmailMutationOptions, type HarvestParams, type IdempotentRequestOptions, type InsufficientBalanceBody, type MapsSearchParams, type PublicErrorEnvelopeBody, ScraperApiError, type ScraperApiErrorDetails, ScraperClient, type ScraperClientOptions, type ScraperRequestOptions, type SearchSerpParams, type SerpIntelligenceCaptureOptions, type SerpIntelligenceCaptureParams, type SerpIntelligenceCaptureReceipt, type StructuredErrorBody, type components, type operations, type paths };