@openserp/sdk 0.1.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/README.md +268 -0
- package/dist/generated/oss.cjs +19 -0
- package/dist/generated/oss.cjs.map +1 -0
- package/dist/generated/oss.d.cts +1587 -0
- package/dist/generated/oss.d.ts +1587 -0
- package/dist/generated/oss.js +1 -0
- package/dist/generated/oss.js.map +1 -0
- package/dist/index.cjs +453 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +202 -0
- package/dist/index.d.ts +202 -0
- package/dist/index.js +415 -0
- package/dist/index.js.map +1 -0
- package/package.json +77 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { components } from './generated/oss.cjs';
|
|
2
|
+
|
|
3
|
+
interface CreditInfo {
|
|
4
|
+
used?: number | undefined;
|
|
5
|
+
remaining?: number | undefined;
|
|
6
|
+
}
|
|
7
|
+
interface CloudAccount {
|
|
8
|
+
id?: string;
|
|
9
|
+
email?: string;
|
|
10
|
+
created_at?: string;
|
|
11
|
+
credits_remaining?: number;
|
|
12
|
+
plan?: string;
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
interface Price {
|
|
16
|
+
credits?: number;
|
|
17
|
+
price_usd?: number;
|
|
18
|
+
}
|
|
19
|
+
interface Pricing {
|
|
20
|
+
credit_price_usd?: number;
|
|
21
|
+
search?: Price;
|
|
22
|
+
mega_search?: Price;
|
|
23
|
+
image_search?: Price;
|
|
24
|
+
any_search?: Price;
|
|
25
|
+
fast_search?: Price;
|
|
26
|
+
any_image?: Price;
|
|
27
|
+
fast_image?: Price;
|
|
28
|
+
[key: string]: unknown;
|
|
29
|
+
}
|
|
30
|
+
type EngineStatusValue = "operational" | "loaded" | "down" | "unknown";
|
|
31
|
+
type OverallStatus = "operational" | "degraded" | "down" | "unknown";
|
|
32
|
+
interface EngineStatus {
|
|
33
|
+
status?: EngineStatusValue;
|
|
34
|
+
latency_ms?: number;
|
|
35
|
+
}
|
|
36
|
+
type EnginesStatus = {
|
|
37
|
+
overall: OverallStatus;
|
|
38
|
+
} | {
|
|
39
|
+
engines: Record<string, EngineStatus>;
|
|
40
|
+
};
|
|
41
|
+
interface EngineCapability {
|
|
42
|
+
web?: boolean;
|
|
43
|
+
image?: boolean;
|
|
44
|
+
fallback_web?: boolean;
|
|
45
|
+
fallback_image?: boolean;
|
|
46
|
+
}
|
|
47
|
+
interface ModeCapability {
|
|
48
|
+
web?: boolean;
|
|
49
|
+
image?: boolean;
|
|
50
|
+
}
|
|
51
|
+
interface EnginesCapabilities {
|
|
52
|
+
engines?: Record<string, EngineCapability>;
|
|
53
|
+
modes?: Record<string, ModeCapability>;
|
|
54
|
+
[key: string]: unknown;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
type Backend = "oss" | "cloud";
|
|
58
|
+
type Engine = "google" | "yandex" | "baidu" | "bing" | "duck" | "duckduckgo" | "ecosia";
|
|
59
|
+
type MegaMode = "balanced" | "any" | "fast";
|
|
60
|
+
type ResponseFormat = "json" | "markdown" | "text" | "ndjson";
|
|
61
|
+
type SearchEnvelope = components["schemas"]["SearchEnvelope"];
|
|
62
|
+
type MegaSearchEnvelope = components["schemas"]["MegaSearchEnvelope"];
|
|
63
|
+
type ImageEnvelope = components["schemas"]["ImageEnvelope"];
|
|
64
|
+
type ErrorResponse = components["schemas"]["ErrorResponse"];
|
|
65
|
+
type HealthStatus = components["schemas"]["HealthStatus"];
|
|
66
|
+
type ReadinessStatus = components["schemas"]["ReadinessStatus"];
|
|
67
|
+
type StatsResponse = components["schemas"]["StatsResponse"];
|
|
68
|
+
type CacheStats = components["schemas"]["CacheStats"];
|
|
69
|
+
type ProxyStats = components["schemas"]["ProxyStats"];
|
|
70
|
+
type CircuitBreakerStatsResponse = components["schemas"]["CircuitBreakerStatsResponse"];
|
|
71
|
+
type MegaEnginesResponse = components["schemas"]["MegaEnginesResponse"];
|
|
72
|
+
interface OpenSERPConfig {
|
|
73
|
+
apiKey?: string | undefined;
|
|
74
|
+
baseUrl?: string | undefined;
|
|
75
|
+
backend?: Backend | undefined;
|
|
76
|
+
timeoutMs?: number | undefined;
|
|
77
|
+
fetch?: typeof fetch | undefined;
|
|
78
|
+
headers?: HeadersInit | undefined;
|
|
79
|
+
retry?: ((err: unknown, attempt: number) => boolean | Promise<boolean>) | undefined;
|
|
80
|
+
}
|
|
81
|
+
interface LastResponse {
|
|
82
|
+
status: number;
|
|
83
|
+
requestId?: string | undefined;
|
|
84
|
+
credits?: CreditInfo | undefined;
|
|
85
|
+
engineUsed?: string | undefined;
|
|
86
|
+
fallbackEngine?: string | undefined;
|
|
87
|
+
cache?: string | undefined;
|
|
88
|
+
proxyMode?: string | undefined;
|
|
89
|
+
proxyTag?: string | undefined;
|
|
90
|
+
proxyUsed?: string | undefined;
|
|
91
|
+
networkBytes?: number | undefined;
|
|
92
|
+
browserProfileId?: string | undefined;
|
|
93
|
+
headers: Headers;
|
|
94
|
+
}
|
|
95
|
+
interface SearchParams {
|
|
96
|
+
engine: Engine;
|
|
97
|
+
text?: string;
|
|
98
|
+
lang?: string;
|
|
99
|
+
region?: string;
|
|
100
|
+
date?: string;
|
|
101
|
+
file?: string;
|
|
102
|
+
site?: string;
|
|
103
|
+
limit?: number;
|
|
104
|
+
start?: number;
|
|
105
|
+
filter?: boolean;
|
|
106
|
+
answers?: boolean;
|
|
107
|
+
format?: ResponseFormat;
|
|
108
|
+
useProxy?: string;
|
|
109
|
+
proxyUrl?: string;
|
|
110
|
+
proxyCountry?: string;
|
|
111
|
+
proxyClass?: string;
|
|
112
|
+
proxyProvider?: string;
|
|
113
|
+
proxySessionId?: string;
|
|
114
|
+
tenant?: string;
|
|
115
|
+
}
|
|
116
|
+
type ImageParams = SearchParams;
|
|
117
|
+
interface MegaSearchParams extends Omit<SearchParams, "engine"> {
|
|
118
|
+
engines?: Engine[];
|
|
119
|
+
mode?: MegaMode;
|
|
120
|
+
dedupe?: boolean;
|
|
121
|
+
merge?: boolean;
|
|
122
|
+
}
|
|
123
|
+
type MegaImageParams = MegaSearchParams;
|
|
124
|
+
interface ParseParams {
|
|
125
|
+
html: string;
|
|
126
|
+
format?: ResponseFormat;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
declare class OpenSERP {
|
|
130
|
+
readonly config: OpenSERPConfig;
|
|
131
|
+
lastResponse?: LastResponse;
|
|
132
|
+
constructor(config?: OpenSERPConfig);
|
|
133
|
+
get backend(): Backend;
|
|
134
|
+
get baseUrl(): string;
|
|
135
|
+
search(params: SearchParams): Promise<SearchEnvelope | string>;
|
|
136
|
+
image(params: ImageParams): Promise<ImageEnvelope | string>;
|
|
137
|
+
megaSearch(params: MegaSearchParams): Promise<MegaSearchEnvelope | string>;
|
|
138
|
+
fastSearch(params: Omit<MegaSearchParams, "mode">): Promise<MegaSearchEnvelope | string>;
|
|
139
|
+
anySearch(params: Omit<MegaSearchParams, "mode">): Promise<MegaSearchEnvelope | string>;
|
|
140
|
+
megaImage(params: MegaImageParams): Promise<ImageEnvelope | string>;
|
|
141
|
+
fastImage(params: Omit<MegaImageParams, "mode">): Promise<ImageEnvelope | string>;
|
|
142
|
+
anyImage(params: Omit<MegaImageParams, "mode">): Promise<ImageEnvelope | string>;
|
|
143
|
+
parseGoogle(params: ParseParams): Promise<SearchEnvelope | string>;
|
|
144
|
+
parseBing(params: ParseParams): Promise<SearchEnvelope | string>;
|
|
145
|
+
health(): Promise<HealthStatus>;
|
|
146
|
+
ready(): Promise<ReadinessStatus>;
|
|
147
|
+
stats(): Promise<StatsResponse>;
|
|
148
|
+
cacheStats(): Promise<CacheStats>;
|
|
149
|
+
proxyStats(): Promise<ProxyStats>;
|
|
150
|
+
circuitBreakerStats(): Promise<CircuitBreakerStatsResponse>;
|
|
151
|
+
engines(): Promise<MegaEnginesResponse>;
|
|
152
|
+
me(): Promise<CloudAccount>;
|
|
153
|
+
pricing(): Promise<Pricing>;
|
|
154
|
+
enginesStatus(): Promise<EnginesStatus>;
|
|
155
|
+
enginesCapabilities(): Promise<EnginesCapabilities>;
|
|
156
|
+
private parse;
|
|
157
|
+
private get;
|
|
158
|
+
private requestContext;
|
|
159
|
+
private assertCloud;
|
|
160
|
+
private assertOss;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
declare const OSS_BASE_URL = "http://localhost:7000";
|
|
164
|
+
declare const CLOUD_BASE_URL = "https://api.openserp.org/v1";
|
|
165
|
+
declare function normalizeBaseUrl(baseUrl: string): string;
|
|
166
|
+
declare function resolveBaseUrl(config: OpenSERPConfig): string;
|
|
167
|
+
declare function inferBackend(config: Pick<OpenSERPConfig, "apiKey" | "baseUrl" | "backend">): Backend;
|
|
168
|
+
|
|
169
|
+
declare class SERPError extends Error {
|
|
170
|
+
readonly status: number;
|
|
171
|
+
readonly code?: string | undefined;
|
|
172
|
+
readonly reason?: string | undefined;
|
|
173
|
+
readonly requestId?: string | undefined;
|
|
174
|
+
readonly meta?: Record<string, unknown> | undefined;
|
|
175
|
+
readonly response?: ErrorResponse | unknown | undefined;
|
|
176
|
+
constructor(message: string, options?: {
|
|
177
|
+
status?: number | undefined;
|
|
178
|
+
code?: string | undefined;
|
|
179
|
+
reason?: string | undefined;
|
|
180
|
+
requestId?: string | undefined;
|
|
181
|
+
meta?: Record<string, unknown> | undefined;
|
|
182
|
+
response?: ErrorResponse | unknown | undefined;
|
|
183
|
+
cause?: unknown | undefined;
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
declare class RateLimitError extends SERPError {
|
|
187
|
+
constructor(message: string, options?: ConstructorParameters<typeof SERPError>[1]);
|
|
188
|
+
}
|
|
189
|
+
declare class CaptchaError extends SERPError {
|
|
190
|
+
constructor(message: string, options?: ConstructorParameters<typeof SERPError>[1]);
|
|
191
|
+
}
|
|
192
|
+
declare class CloudOnlyError extends SERPError {
|
|
193
|
+
constructor(method: string);
|
|
194
|
+
}
|
|
195
|
+
declare class OssOnlyError extends SERPError {
|
|
196
|
+
constructor(method: string);
|
|
197
|
+
}
|
|
198
|
+
declare class TimeoutError extends SERPError {
|
|
199
|
+
constructor(timeoutMs: number, cause?: unknown);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export { type Backend, CLOUD_BASE_URL, type CacheStats, CaptchaError, type CircuitBreakerStatsResponse, type CloudAccount, CloudOnlyError, type CreditInfo, type Engine, type EngineCapability, type EngineStatus, type EnginesCapabilities, type EnginesStatus, type ErrorResponse, type HealthStatus, type ImageEnvelope, type ImageParams, type LastResponse, type MegaEnginesResponse, type MegaImageParams, type MegaMode, type MegaSearchEnvelope, type MegaSearchParams, type ModeCapability, OSS_BASE_URL, OpenSERP, type OpenSERPConfig, OssOnlyError, type OverallStatus, type ParseParams, type Price, type Pricing, type ProxyStats, RateLimitError, type ReadinessStatus, type ResponseFormat, SERPError, type SearchEnvelope, type SearchParams, type StatsResponse, TimeoutError, inferBackend, normalizeBaseUrl, resolveBaseUrl };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { components } from './generated/oss.js';
|
|
2
|
+
|
|
3
|
+
interface CreditInfo {
|
|
4
|
+
used?: number | undefined;
|
|
5
|
+
remaining?: number | undefined;
|
|
6
|
+
}
|
|
7
|
+
interface CloudAccount {
|
|
8
|
+
id?: string;
|
|
9
|
+
email?: string;
|
|
10
|
+
created_at?: string;
|
|
11
|
+
credits_remaining?: number;
|
|
12
|
+
plan?: string;
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
interface Price {
|
|
16
|
+
credits?: number;
|
|
17
|
+
price_usd?: number;
|
|
18
|
+
}
|
|
19
|
+
interface Pricing {
|
|
20
|
+
credit_price_usd?: number;
|
|
21
|
+
search?: Price;
|
|
22
|
+
mega_search?: Price;
|
|
23
|
+
image_search?: Price;
|
|
24
|
+
any_search?: Price;
|
|
25
|
+
fast_search?: Price;
|
|
26
|
+
any_image?: Price;
|
|
27
|
+
fast_image?: Price;
|
|
28
|
+
[key: string]: unknown;
|
|
29
|
+
}
|
|
30
|
+
type EngineStatusValue = "operational" | "loaded" | "down" | "unknown";
|
|
31
|
+
type OverallStatus = "operational" | "degraded" | "down" | "unknown";
|
|
32
|
+
interface EngineStatus {
|
|
33
|
+
status?: EngineStatusValue;
|
|
34
|
+
latency_ms?: number;
|
|
35
|
+
}
|
|
36
|
+
type EnginesStatus = {
|
|
37
|
+
overall: OverallStatus;
|
|
38
|
+
} | {
|
|
39
|
+
engines: Record<string, EngineStatus>;
|
|
40
|
+
};
|
|
41
|
+
interface EngineCapability {
|
|
42
|
+
web?: boolean;
|
|
43
|
+
image?: boolean;
|
|
44
|
+
fallback_web?: boolean;
|
|
45
|
+
fallback_image?: boolean;
|
|
46
|
+
}
|
|
47
|
+
interface ModeCapability {
|
|
48
|
+
web?: boolean;
|
|
49
|
+
image?: boolean;
|
|
50
|
+
}
|
|
51
|
+
interface EnginesCapabilities {
|
|
52
|
+
engines?: Record<string, EngineCapability>;
|
|
53
|
+
modes?: Record<string, ModeCapability>;
|
|
54
|
+
[key: string]: unknown;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
type Backend = "oss" | "cloud";
|
|
58
|
+
type Engine = "google" | "yandex" | "baidu" | "bing" | "duck" | "duckduckgo" | "ecosia";
|
|
59
|
+
type MegaMode = "balanced" | "any" | "fast";
|
|
60
|
+
type ResponseFormat = "json" | "markdown" | "text" | "ndjson";
|
|
61
|
+
type SearchEnvelope = components["schemas"]["SearchEnvelope"];
|
|
62
|
+
type MegaSearchEnvelope = components["schemas"]["MegaSearchEnvelope"];
|
|
63
|
+
type ImageEnvelope = components["schemas"]["ImageEnvelope"];
|
|
64
|
+
type ErrorResponse = components["schemas"]["ErrorResponse"];
|
|
65
|
+
type HealthStatus = components["schemas"]["HealthStatus"];
|
|
66
|
+
type ReadinessStatus = components["schemas"]["ReadinessStatus"];
|
|
67
|
+
type StatsResponse = components["schemas"]["StatsResponse"];
|
|
68
|
+
type CacheStats = components["schemas"]["CacheStats"];
|
|
69
|
+
type ProxyStats = components["schemas"]["ProxyStats"];
|
|
70
|
+
type CircuitBreakerStatsResponse = components["schemas"]["CircuitBreakerStatsResponse"];
|
|
71
|
+
type MegaEnginesResponse = components["schemas"]["MegaEnginesResponse"];
|
|
72
|
+
interface OpenSERPConfig {
|
|
73
|
+
apiKey?: string | undefined;
|
|
74
|
+
baseUrl?: string | undefined;
|
|
75
|
+
backend?: Backend | undefined;
|
|
76
|
+
timeoutMs?: number | undefined;
|
|
77
|
+
fetch?: typeof fetch | undefined;
|
|
78
|
+
headers?: HeadersInit | undefined;
|
|
79
|
+
retry?: ((err: unknown, attempt: number) => boolean | Promise<boolean>) | undefined;
|
|
80
|
+
}
|
|
81
|
+
interface LastResponse {
|
|
82
|
+
status: number;
|
|
83
|
+
requestId?: string | undefined;
|
|
84
|
+
credits?: CreditInfo | undefined;
|
|
85
|
+
engineUsed?: string | undefined;
|
|
86
|
+
fallbackEngine?: string | undefined;
|
|
87
|
+
cache?: string | undefined;
|
|
88
|
+
proxyMode?: string | undefined;
|
|
89
|
+
proxyTag?: string | undefined;
|
|
90
|
+
proxyUsed?: string | undefined;
|
|
91
|
+
networkBytes?: number | undefined;
|
|
92
|
+
browserProfileId?: string | undefined;
|
|
93
|
+
headers: Headers;
|
|
94
|
+
}
|
|
95
|
+
interface SearchParams {
|
|
96
|
+
engine: Engine;
|
|
97
|
+
text?: string;
|
|
98
|
+
lang?: string;
|
|
99
|
+
region?: string;
|
|
100
|
+
date?: string;
|
|
101
|
+
file?: string;
|
|
102
|
+
site?: string;
|
|
103
|
+
limit?: number;
|
|
104
|
+
start?: number;
|
|
105
|
+
filter?: boolean;
|
|
106
|
+
answers?: boolean;
|
|
107
|
+
format?: ResponseFormat;
|
|
108
|
+
useProxy?: string;
|
|
109
|
+
proxyUrl?: string;
|
|
110
|
+
proxyCountry?: string;
|
|
111
|
+
proxyClass?: string;
|
|
112
|
+
proxyProvider?: string;
|
|
113
|
+
proxySessionId?: string;
|
|
114
|
+
tenant?: string;
|
|
115
|
+
}
|
|
116
|
+
type ImageParams = SearchParams;
|
|
117
|
+
interface MegaSearchParams extends Omit<SearchParams, "engine"> {
|
|
118
|
+
engines?: Engine[];
|
|
119
|
+
mode?: MegaMode;
|
|
120
|
+
dedupe?: boolean;
|
|
121
|
+
merge?: boolean;
|
|
122
|
+
}
|
|
123
|
+
type MegaImageParams = MegaSearchParams;
|
|
124
|
+
interface ParseParams {
|
|
125
|
+
html: string;
|
|
126
|
+
format?: ResponseFormat;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
declare class OpenSERP {
|
|
130
|
+
readonly config: OpenSERPConfig;
|
|
131
|
+
lastResponse?: LastResponse;
|
|
132
|
+
constructor(config?: OpenSERPConfig);
|
|
133
|
+
get backend(): Backend;
|
|
134
|
+
get baseUrl(): string;
|
|
135
|
+
search(params: SearchParams): Promise<SearchEnvelope | string>;
|
|
136
|
+
image(params: ImageParams): Promise<ImageEnvelope | string>;
|
|
137
|
+
megaSearch(params: MegaSearchParams): Promise<MegaSearchEnvelope | string>;
|
|
138
|
+
fastSearch(params: Omit<MegaSearchParams, "mode">): Promise<MegaSearchEnvelope | string>;
|
|
139
|
+
anySearch(params: Omit<MegaSearchParams, "mode">): Promise<MegaSearchEnvelope | string>;
|
|
140
|
+
megaImage(params: MegaImageParams): Promise<ImageEnvelope | string>;
|
|
141
|
+
fastImage(params: Omit<MegaImageParams, "mode">): Promise<ImageEnvelope | string>;
|
|
142
|
+
anyImage(params: Omit<MegaImageParams, "mode">): Promise<ImageEnvelope | string>;
|
|
143
|
+
parseGoogle(params: ParseParams): Promise<SearchEnvelope | string>;
|
|
144
|
+
parseBing(params: ParseParams): Promise<SearchEnvelope | string>;
|
|
145
|
+
health(): Promise<HealthStatus>;
|
|
146
|
+
ready(): Promise<ReadinessStatus>;
|
|
147
|
+
stats(): Promise<StatsResponse>;
|
|
148
|
+
cacheStats(): Promise<CacheStats>;
|
|
149
|
+
proxyStats(): Promise<ProxyStats>;
|
|
150
|
+
circuitBreakerStats(): Promise<CircuitBreakerStatsResponse>;
|
|
151
|
+
engines(): Promise<MegaEnginesResponse>;
|
|
152
|
+
me(): Promise<CloudAccount>;
|
|
153
|
+
pricing(): Promise<Pricing>;
|
|
154
|
+
enginesStatus(): Promise<EnginesStatus>;
|
|
155
|
+
enginesCapabilities(): Promise<EnginesCapabilities>;
|
|
156
|
+
private parse;
|
|
157
|
+
private get;
|
|
158
|
+
private requestContext;
|
|
159
|
+
private assertCloud;
|
|
160
|
+
private assertOss;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
declare const OSS_BASE_URL = "http://localhost:7000";
|
|
164
|
+
declare const CLOUD_BASE_URL = "https://api.openserp.org/v1";
|
|
165
|
+
declare function normalizeBaseUrl(baseUrl: string): string;
|
|
166
|
+
declare function resolveBaseUrl(config: OpenSERPConfig): string;
|
|
167
|
+
declare function inferBackend(config: Pick<OpenSERPConfig, "apiKey" | "baseUrl" | "backend">): Backend;
|
|
168
|
+
|
|
169
|
+
declare class SERPError extends Error {
|
|
170
|
+
readonly status: number;
|
|
171
|
+
readonly code?: string | undefined;
|
|
172
|
+
readonly reason?: string | undefined;
|
|
173
|
+
readonly requestId?: string | undefined;
|
|
174
|
+
readonly meta?: Record<string, unknown> | undefined;
|
|
175
|
+
readonly response?: ErrorResponse | unknown | undefined;
|
|
176
|
+
constructor(message: string, options?: {
|
|
177
|
+
status?: number | undefined;
|
|
178
|
+
code?: string | undefined;
|
|
179
|
+
reason?: string | undefined;
|
|
180
|
+
requestId?: string | undefined;
|
|
181
|
+
meta?: Record<string, unknown> | undefined;
|
|
182
|
+
response?: ErrorResponse | unknown | undefined;
|
|
183
|
+
cause?: unknown | undefined;
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
declare class RateLimitError extends SERPError {
|
|
187
|
+
constructor(message: string, options?: ConstructorParameters<typeof SERPError>[1]);
|
|
188
|
+
}
|
|
189
|
+
declare class CaptchaError extends SERPError {
|
|
190
|
+
constructor(message: string, options?: ConstructorParameters<typeof SERPError>[1]);
|
|
191
|
+
}
|
|
192
|
+
declare class CloudOnlyError extends SERPError {
|
|
193
|
+
constructor(method: string);
|
|
194
|
+
}
|
|
195
|
+
declare class OssOnlyError extends SERPError {
|
|
196
|
+
constructor(method: string);
|
|
197
|
+
}
|
|
198
|
+
declare class TimeoutError extends SERPError {
|
|
199
|
+
constructor(timeoutMs: number, cause?: unknown);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export { type Backend, CLOUD_BASE_URL, type CacheStats, CaptchaError, type CircuitBreakerStatsResponse, type CloudAccount, CloudOnlyError, type CreditInfo, type Engine, type EngineCapability, type EngineStatus, type EnginesCapabilities, type EnginesStatus, type ErrorResponse, type HealthStatus, type ImageEnvelope, type ImageParams, type LastResponse, type MegaEnginesResponse, type MegaImageParams, type MegaMode, type MegaSearchEnvelope, type MegaSearchParams, type ModeCapability, OSS_BASE_URL, OpenSERP, type OpenSERPConfig, OssOnlyError, type OverallStatus, type ParseParams, type Price, type Pricing, type ProxyStats, RateLimitError, type ReadinessStatus, type ResponseFormat, SERPError, type SearchEnvelope, type SearchParams, type StatsResponse, TimeoutError, inferBackend, normalizeBaseUrl, resolveBaseUrl };
|