parallel-web 0.1.1 → 0.2.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/CHANGELOG.md +33 -0
- package/internal/to-file.d.mts +1 -1
- package/internal/to-file.d.ts +1 -1
- package/internal/to-file.js +1 -1
- package/internal/to-file.mjs +1 -1
- package/package.json +1 -1
- package/resources/beta/beta.d.mts +172 -16
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +172 -16
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +28 -2
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +28 -2
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/task-group.d.mts +11 -2
- package/resources/beta/task-group.d.mts.map +1 -1
- package/resources/beta/task-group.d.ts +11 -2
- package/resources/beta/task-group.d.ts.map +1 -1
- package/resources/beta/task-group.js +11 -2
- package/resources/beta/task-group.js.map +1 -1
- package/resources/beta/task-group.mjs +11 -2
- package/resources/beta/task-group.mjs.map +1 -1
- package/resources/beta/task-run.d.mts +17 -12
- package/resources/beta/task-run.d.mts.map +1 -1
- package/resources/beta/task-run.d.ts +17 -12
- package/resources/beta/task-run.d.ts.map +1 -1
- package/src/internal/to-file.ts +1 -1
- package/src/resources/beta/beta.ts +222 -16
- package/src/resources/beta/task-group.ts +11 -2
- package/src/resources/beta/task-run.ts +18 -12
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.0 (2025-10-21)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.2...v0.2.0](https://github.com/parallel-web/parallel-sdk-typescript/compare/v0.1.2...v0.2.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** Add /v1beta/extract ([a709400](https://github.com/parallel-web/parallel-sdk-typescript/commit/a7094002235d15e4a5f68422b9447127b9448b4b))
|
|
10
|
+
|
|
11
|
+
## 0.1.2 (2025-10-07)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.1.1...v0.1.2](https://github.com/parallel-web/parallel-sdk-typescript/compare/v0.1.1...v0.1.2)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** Add progress meter to Task Run events ([ad361b3](https://github.com/parallel-web/parallel-sdk-typescript/commit/ad361b31f97286eed338be1388ab9806415596fa))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Performance Improvements
|
|
21
|
+
|
|
22
|
+
* faster formatting ([173a244](https://github.com/parallel-web/parallel-sdk-typescript/commit/173a24423a23158782abe3f831bb0b8dc5eec5d9))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Chores
|
|
26
|
+
|
|
27
|
+
* do not install brew dependencies in ./scripts/bootstrap by default ([285367b](https://github.com/parallel-web/parallel-sdk-typescript/commit/285367bd65f7b796416e7cbe151e771da85a3be6))
|
|
28
|
+
* **internal:** codegen related update ([ab2b45e](https://github.com/parallel-web/parallel-sdk-typescript/commit/ab2b45e909e512425400eb88f811fb34fdb48d2a))
|
|
29
|
+
* **internal:** fix incremental formatting in some cases ([dbe176c](https://github.com/parallel-web/parallel-sdk-typescript/commit/dbe176c606c8914cb803b302c43a93faf795147d))
|
|
30
|
+
* **internal:** ignore .eslintcache ([7d0c511](https://github.com/parallel-web/parallel-sdk-typescript/commit/7d0c511c79edc77690bd87be97e09789b768f541))
|
|
31
|
+
* **internal:** remove .eslintcache ([6998e86](https://github.com/parallel-web/parallel-sdk-typescript/commit/6998e8695537208a66139c4b61f59caf4aaf4a66))
|
|
32
|
+
* **internal:** remove deprecated `compilerOptions.baseUrl` from tsconfig.json ([aa7ffe8](https://github.com/parallel-web/parallel-sdk-typescript/commit/aa7ffe8af4fd9128e0da20a1702ef2f9b791a915))
|
|
33
|
+
* **internal:** use npm pack for build uploads ([799079d](https://github.com/parallel-web/parallel-sdk-typescript/commit/799079d180e8f2f691b8f28f27080ea4f465ceda))
|
|
34
|
+
* **jsdoc:** fix [@link](https://github.com/link) annotations to refer only to parts of the package‘s public interface ([5ed9433](https://github.com/parallel-web/parallel-sdk-typescript/commit/5ed9433661eacf6cb55f0a854ba68915862f737e))
|
|
35
|
+
|
|
3
36
|
## 0.1.1 (2025-09-15)
|
|
4
37
|
|
|
5
38
|
Full Changelog: [v0.1.0...v0.1.1](https://github.com/parallel-web/parallel-sdk-typescript/compare/v0.1.0...v0.1.1)
|
package/internal/to-file.d.mts
CHANGED
|
@@ -33,7 +33,7 @@ export interface ResponseLike {
|
|
|
33
33
|
export type ToFileInput = FileLike | ResponseLike | Exclude<BlobLikePart, string> | AsyncIterable<BlobLikePart>;
|
|
34
34
|
/**
|
|
35
35
|
* Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
|
|
36
|
-
* @param value the raw content of the file.
|
|
36
|
+
* @param value the raw content of the file. Can be an {@link Uploadable}, BlobLikePart, or AsyncIterable of BlobLikeParts
|
|
37
37
|
* @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible
|
|
38
38
|
* @param {Object=} options additional properties
|
|
39
39
|
* @param {string=} options.type the MIME type of the content
|
package/internal/to-file.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export interface ResponseLike {
|
|
|
33
33
|
export type ToFileInput = FileLike | ResponseLike | Exclude<BlobLikePart, string> | AsyncIterable<BlobLikePart>;
|
|
34
34
|
/**
|
|
35
35
|
* Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
|
|
36
|
-
* @param value the raw content of the file.
|
|
36
|
+
* @param value the raw content of the file. Can be an {@link Uploadable}, BlobLikePart, or AsyncIterable of BlobLikeParts
|
|
37
37
|
* @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible
|
|
38
38
|
* @param {Object=} options additional properties
|
|
39
39
|
* @param {string=} options.type the MIME type of the content
|
package/internal/to-file.js
CHANGED
|
@@ -27,7 +27,7 @@ const isResponseLike = (value) => value != null &&
|
|
|
27
27
|
typeof value.blob === 'function';
|
|
28
28
|
/**
|
|
29
29
|
* Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
|
|
30
|
-
* @param value the raw content of the file.
|
|
30
|
+
* @param value the raw content of the file. Can be an {@link Uploadable}, BlobLikePart, or AsyncIterable of BlobLikeParts
|
|
31
31
|
* @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible
|
|
32
32
|
* @param {Object=} options additional properties
|
|
33
33
|
* @param {string=} options.type the MIME type of the content
|
package/internal/to-file.mjs
CHANGED
|
@@ -24,7 +24,7 @@ const isResponseLike = (value) => value != null &&
|
|
|
24
24
|
typeof value.blob === 'function';
|
|
25
25
|
/**
|
|
26
26
|
* Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
|
|
27
|
-
* @param value the raw content of the file.
|
|
27
|
+
* @param value the raw content of the file. Can be an {@link Uploadable}, BlobLikePart, or AsyncIterable of BlobLikeParts
|
|
28
28
|
* @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible
|
|
29
29
|
* @param {Object=} options additional properties
|
|
30
30
|
* @param {string=} options.type the MIME type of the content
|
package/package.json
CHANGED
|
@@ -9,10 +9,85 @@ import { RequestOptions } from "../../internal/request-options.mjs";
|
|
|
9
9
|
export declare class Beta extends APIResource {
|
|
10
10
|
taskRun: TaskRunAPI.TaskRun;
|
|
11
11
|
taskGroup: TaskGroupAPI.TaskGroup;
|
|
12
|
+
/**
|
|
13
|
+
* Extracts relevant content from specific web URLs.
|
|
14
|
+
*
|
|
15
|
+
* To access this endpoint, pass the `parallel-beta` header with the value
|
|
16
|
+
* `search-extract-2025-10-10`.
|
|
17
|
+
*/
|
|
18
|
+
extract(params: BetaExtractParams, options?: RequestOptions): APIPromise<ExtractResponse>;
|
|
12
19
|
/**
|
|
13
20
|
* Searches the web.
|
|
14
21
|
*/
|
|
15
|
-
search(
|
|
22
|
+
search(params: BetaSearchParams, options?: RequestOptions): APIPromise<SearchResult>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Optional settings for returning relevant excerpts.
|
|
26
|
+
*/
|
|
27
|
+
export interface ExcerptSettings {
|
|
28
|
+
/**
|
|
29
|
+
* Optional upper bound on the total number of characters to include across all
|
|
30
|
+
* excerpts for each url. Excerpts may contain fewer characters than this limit to
|
|
31
|
+
* maximize relevance and token efficiency.
|
|
32
|
+
*/
|
|
33
|
+
max_chars_per_result?: number | null;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Extract error details.
|
|
37
|
+
*/
|
|
38
|
+
export interface ExtractError {
|
|
39
|
+
/**
|
|
40
|
+
* Content returned for http client or server errors, if any.
|
|
41
|
+
*/
|
|
42
|
+
content: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* Error type.
|
|
45
|
+
*/
|
|
46
|
+
error_type: string;
|
|
47
|
+
/**
|
|
48
|
+
* HTTP status code, if available.
|
|
49
|
+
*/
|
|
50
|
+
http_status_code: number | null;
|
|
51
|
+
url: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Fetch result.
|
|
55
|
+
*/
|
|
56
|
+
export interface ExtractResponse {
|
|
57
|
+
/**
|
|
58
|
+
* Extract errors: requested URLs not in the results.
|
|
59
|
+
*/
|
|
60
|
+
errors: Array<ExtractError>;
|
|
61
|
+
/**
|
|
62
|
+
* Extract request ID, e.g. `extract_cad0a6d2dec046bd95ae900527d880e7`
|
|
63
|
+
*/
|
|
64
|
+
extract_id: string;
|
|
65
|
+
/**
|
|
66
|
+
* Successful extract results.
|
|
67
|
+
*/
|
|
68
|
+
results: Array<ExtractResult>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Extract result for a single URL.
|
|
72
|
+
*/
|
|
73
|
+
export interface ExtractResult {
|
|
74
|
+
/**
|
|
75
|
+
* Relevant excerpted content from the URL, formatted as markdown.
|
|
76
|
+
*/
|
|
77
|
+
excerpts: Array<string> | null;
|
|
78
|
+
/**
|
|
79
|
+
* Full content from the URL formatted as markdown, if requested.
|
|
80
|
+
*/
|
|
81
|
+
full_content: string | null;
|
|
82
|
+
/**
|
|
83
|
+
* Publish date of the webpage, if available.
|
|
84
|
+
*/
|
|
85
|
+
publish_date: string | null;
|
|
86
|
+
/**
|
|
87
|
+
* Title of the webpage, if available.
|
|
88
|
+
*/
|
|
89
|
+
title: string | null;
|
|
90
|
+
url: string;
|
|
16
91
|
}
|
|
17
92
|
/**
|
|
18
93
|
* Output for the Search API.
|
|
@@ -23,7 +98,7 @@ export interface SearchResult {
|
|
|
23
98
|
*/
|
|
24
99
|
results: Array<WebSearchResult>;
|
|
25
100
|
/**
|
|
26
|
-
* Search ID. Example: `
|
|
101
|
+
* Search ID. Example: `search_cad0a6d2dec046bd95ae900527d880e7`
|
|
27
102
|
*/
|
|
28
103
|
search_id: string;
|
|
29
104
|
}
|
|
@@ -44,42 +119,123 @@ export interface WebSearchResult {
|
|
|
44
119
|
*/
|
|
45
120
|
url: string;
|
|
46
121
|
}
|
|
122
|
+
export interface BetaExtractParams {
|
|
123
|
+
/**
|
|
124
|
+
* Body param:
|
|
125
|
+
*/
|
|
126
|
+
urls: Array<string>;
|
|
127
|
+
/**
|
|
128
|
+
* Body param: Include excerpts from each URL relevant to the search objective and
|
|
129
|
+
* queries. Note that if neither objective nor search_queries is provided, excerpts
|
|
130
|
+
* are redundant with full content.
|
|
131
|
+
*/
|
|
132
|
+
excerpts?: boolean | ExcerptSettings;
|
|
133
|
+
/**
|
|
134
|
+
* Body param: Fetch policy.
|
|
135
|
+
*
|
|
136
|
+
* Determines when to return content from the cache (faster) vs fetching live
|
|
137
|
+
* content (fresher).
|
|
138
|
+
*/
|
|
139
|
+
fetch_policy?: BetaExtractParams.FetchPolicy | null;
|
|
140
|
+
/**
|
|
141
|
+
* Body param: Include full content from each URL. Note that if neither objective
|
|
142
|
+
* nor search_queries is provided, excerpts are redundant with full content.
|
|
143
|
+
*/
|
|
144
|
+
full_content?: boolean | BetaExtractParams.FullContentSettings;
|
|
145
|
+
/**
|
|
146
|
+
* Body param: If provided, focuses extracted content on the specified search
|
|
147
|
+
* objective.
|
|
148
|
+
*/
|
|
149
|
+
objective?: string | null;
|
|
150
|
+
/**
|
|
151
|
+
* Body param: If provided, focuses extracted content on the specified keyword
|
|
152
|
+
* search queries.
|
|
153
|
+
*/
|
|
154
|
+
search_queries?: Array<string> | null;
|
|
155
|
+
/**
|
|
156
|
+
* Header param: Optional header to specify the beta version(s) to enable.
|
|
157
|
+
*/
|
|
158
|
+
betas?: Array<TaskRunAPI.ParallelBeta>;
|
|
159
|
+
}
|
|
160
|
+
export declare namespace BetaExtractParams {
|
|
161
|
+
/**
|
|
162
|
+
* Fetch policy.
|
|
163
|
+
*
|
|
164
|
+
* Determines when to return content from the cache (faster) vs fetching live
|
|
165
|
+
* content (fresher).
|
|
166
|
+
*/
|
|
167
|
+
interface FetchPolicy {
|
|
168
|
+
/**
|
|
169
|
+
* If false, fallback to cached content older than max-age if live fetch fails or
|
|
170
|
+
* times out. If true, returns an error instead.
|
|
171
|
+
*/
|
|
172
|
+
disable_cache_fallback?: boolean;
|
|
173
|
+
/**
|
|
174
|
+
* Maximum age of cached content in seconds to trigger a live fetch. Minimum value
|
|
175
|
+
* 600 seconds (10 minutes). If not provided, a dynamic age policy will be used
|
|
176
|
+
* based on the search objective and url.
|
|
177
|
+
*/
|
|
178
|
+
max_age_seconds?: number | null;
|
|
179
|
+
/**
|
|
180
|
+
* Timeout in seconds for fetching live content if unavailable in cache. If
|
|
181
|
+
* unspecified a dynamic timeout will be used based on the url, generally 15
|
|
182
|
+
* seconds for simple pages and up to 60 seconds for complex pages requiring
|
|
183
|
+
* javascript or PDF rendering.
|
|
184
|
+
*/
|
|
185
|
+
timeout_seconds?: number | null;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Optional settings for returning full content.
|
|
189
|
+
*/
|
|
190
|
+
interface FullContentSettings {
|
|
191
|
+
/**
|
|
192
|
+
* Optional limit on the number of characters to include in the full content for
|
|
193
|
+
* each url. Full content always starts at the beginning of the page and is
|
|
194
|
+
* truncated at the limit if necessary.
|
|
195
|
+
*/
|
|
196
|
+
max_chars_per_result?: number | null;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
47
199
|
export interface BetaSearchParams {
|
|
48
200
|
/**
|
|
49
|
-
* Upper bound on the number of characters to include in excerpts for
|
|
50
|
-
* result.
|
|
201
|
+
* Body param: Upper bound on the number of characters to include in excerpts for
|
|
202
|
+
* each search result.
|
|
51
203
|
*/
|
|
52
204
|
max_chars_per_result?: number | null;
|
|
53
205
|
/**
|
|
54
|
-
* Upper bound on the number of results to return. May be limited by
|
|
55
|
-
* Defaults to 10 if not provided.
|
|
206
|
+
* Body param: Upper bound on the number of results to return. May be limited by
|
|
207
|
+
* the processor. Defaults to 10 if not provided.
|
|
56
208
|
*/
|
|
57
209
|
max_results?: number | null;
|
|
58
210
|
/**
|
|
59
|
-
* Natural-language description of what the web search is trying to
|
|
60
|
-
* include guidance about preferred sources or freshness. At least one of
|
|
61
|
-
* or search_queries must be provided.
|
|
211
|
+
* Body param: Natural-language description of what the web search is trying to
|
|
212
|
+
* find. May include guidance about preferred sources or freshness. At least one of
|
|
213
|
+
* objective or search_queries must be provided.
|
|
62
214
|
*/
|
|
63
215
|
objective?: string | null;
|
|
64
216
|
/**
|
|
65
|
-
* Search processor.
|
|
217
|
+
* Body param: Search processor.
|
|
66
218
|
*/
|
|
67
|
-
processor?: 'base' | 'pro';
|
|
219
|
+
processor?: 'base' | 'pro' | null;
|
|
68
220
|
/**
|
|
69
|
-
* Optional list of traditional keyword search queries to guide the
|
|
70
|
-
* contain search operators. At least one of objective or
|
|
71
|
-
* provided.
|
|
221
|
+
* Body param: Optional list of traditional keyword search queries to guide the
|
|
222
|
+
* search. May contain search operators. At least one of objective or
|
|
223
|
+
* search_queries must be provided.
|
|
72
224
|
*/
|
|
73
225
|
search_queries?: Array<string> | null;
|
|
74
226
|
/**
|
|
75
|
-
* Source policy for web search results.
|
|
227
|
+
* Body param: Source policy for web search results.
|
|
76
228
|
*
|
|
77
229
|
* This policy governs which sources are allowed/disallowed in results.
|
|
78
230
|
*/
|
|
79
231
|
source_policy?: Shared.SourcePolicy | null;
|
|
232
|
+
/**
|
|
233
|
+
* Header param: Optional header to specify the beta version(s) to enable.
|
|
234
|
+
*/
|
|
235
|
+
betas?: Array<TaskRunAPI.ParallelBeta>;
|
|
80
236
|
}
|
|
81
237
|
export declare namespace Beta {
|
|
82
|
-
export { type SearchResult as SearchResult, type WebSearchResult as WebSearchResult, type BetaSearchParams as BetaSearchParams, };
|
|
238
|
+
export { type ExcerptSettings as ExcerptSettings, type ExtractError as ExtractError, type ExtractResponse as ExtractResponse, type ExtractResult as ExtractResult, type SearchResult as SearchResult, type WebSearchResult as WebSearchResult, type BetaExtractParams as BetaExtractParams, type BetaSearchParams as BetaSearchParams, };
|
|
83
239
|
export { TaskRun as TaskRun, type BetaRunInput as BetaRunInput, type BetaTaskRunResult as BetaTaskRunResult, type ErrorEvent as ErrorEvent, type McpServer as McpServer, type McpToolCall as McpToolCall, type ParallelBeta as ParallelBeta, type TaskRunEvent as TaskRunEvent, type Webhook as Webhook, type TaskRunEventsResponse as TaskRunEventsResponse, type TaskRunCreateParams as TaskRunCreateParams, type TaskRunResultParams as TaskRunResultParams, };
|
|
84
240
|
export { type TaskGroup as TaskGroup, type TaskGroupRunResponse as TaskGroupRunResponse, type TaskGroupStatus as TaskGroupStatus, type TaskGroupEventsResponse as TaskGroupEventsResponse, type TaskGroupGetRunsResponse as TaskGroupGetRunsResponse, type TaskGroupCreateParams as TaskGroupCreateParams, type TaskGroupAddRunsParams as TaskGroupAddRunsParams, type TaskGroupEventsParams as TaskGroupEventsParams, type TaskGroupGetRunsParams as TaskGroupGetRunsParams, };
|
|
85
241
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beta.d.mts","sourceRoot":"","sources":["../../src/resources/beta/beta.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,YAAY;OACjB,EACL,SAAS,EACT,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,EAChB;OACM,KAAK,UAAU;OACf,EACL,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,OAAO,EACP,mBAAmB,EACnB,YAAY,EACZ,qBAAqB,EACrB,mBAAmB,EACnB,OAAO,EACR;OACM,EAAE,UAAU,EAAE;
|
|
1
|
+
{"version":3,"file":"beta.d.mts","sourceRoot":"","sources":["../../src/resources/beta/beta.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,YAAY;OACjB,EACL,SAAS,EACT,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,EAChB;OACM,KAAK,UAAU;OACf,EACL,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,OAAO,EACP,mBAAmB,EACnB,YAAY,EACZ,qBAAqB,EACrB,mBAAmB,EACnB,OAAO,EACR;OACM,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAEzB,qBAAa,IAAK,SAAQ,WAAW;IACnC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IACnE,SAAS,EAAE,YAAY,CAAC,SAAS,CAA4C;IAE7E;;;;;OAKG;IACH,OAAO,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,eAAe,CAAC;IAYzF;;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AAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
package/resources/beta/beta.d.ts
CHANGED
|
@@ -9,10 +9,85 @@ import { RequestOptions } from "../../internal/request-options.js";
|
|
|
9
9
|
export declare class Beta extends APIResource {
|
|
10
10
|
taskRun: TaskRunAPI.TaskRun;
|
|
11
11
|
taskGroup: TaskGroupAPI.TaskGroup;
|
|
12
|
+
/**
|
|
13
|
+
* Extracts relevant content from specific web URLs.
|
|
14
|
+
*
|
|
15
|
+
* To access this endpoint, pass the `parallel-beta` header with the value
|
|
16
|
+
* `search-extract-2025-10-10`.
|
|
17
|
+
*/
|
|
18
|
+
extract(params: BetaExtractParams, options?: RequestOptions): APIPromise<ExtractResponse>;
|
|
12
19
|
/**
|
|
13
20
|
* Searches the web.
|
|
14
21
|
*/
|
|
15
|
-
search(
|
|
22
|
+
search(params: BetaSearchParams, options?: RequestOptions): APIPromise<SearchResult>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Optional settings for returning relevant excerpts.
|
|
26
|
+
*/
|
|
27
|
+
export interface ExcerptSettings {
|
|
28
|
+
/**
|
|
29
|
+
* Optional upper bound on the total number of characters to include across all
|
|
30
|
+
* excerpts for each url. Excerpts may contain fewer characters than this limit to
|
|
31
|
+
* maximize relevance and token efficiency.
|
|
32
|
+
*/
|
|
33
|
+
max_chars_per_result?: number | null;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Extract error details.
|
|
37
|
+
*/
|
|
38
|
+
export interface ExtractError {
|
|
39
|
+
/**
|
|
40
|
+
* Content returned for http client or server errors, if any.
|
|
41
|
+
*/
|
|
42
|
+
content: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* Error type.
|
|
45
|
+
*/
|
|
46
|
+
error_type: string;
|
|
47
|
+
/**
|
|
48
|
+
* HTTP status code, if available.
|
|
49
|
+
*/
|
|
50
|
+
http_status_code: number | null;
|
|
51
|
+
url: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Fetch result.
|
|
55
|
+
*/
|
|
56
|
+
export interface ExtractResponse {
|
|
57
|
+
/**
|
|
58
|
+
* Extract errors: requested URLs not in the results.
|
|
59
|
+
*/
|
|
60
|
+
errors: Array<ExtractError>;
|
|
61
|
+
/**
|
|
62
|
+
* Extract request ID, e.g. `extract_cad0a6d2dec046bd95ae900527d880e7`
|
|
63
|
+
*/
|
|
64
|
+
extract_id: string;
|
|
65
|
+
/**
|
|
66
|
+
* Successful extract results.
|
|
67
|
+
*/
|
|
68
|
+
results: Array<ExtractResult>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Extract result for a single URL.
|
|
72
|
+
*/
|
|
73
|
+
export interface ExtractResult {
|
|
74
|
+
/**
|
|
75
|
+
* Relevant excerpted content from the URL, formatted as markdown.
|
|
76
|
+
*/
|
|
77
|
+
excerpts: Array<string> | null;
|
|
78
|
+
/**
|
|
79
|
+
* Full content from the URL formatted as markdown, if requested.
|
|
80
|
+
*/
|
|
81
|
+
full_content: string | null;
|
|
82
|
+
/**
|
|
83
|
+
* Publish date of the webpage, if available.
|
|
84
|
+
*/
|
|
85
|
+
publish_date: string | null;
|
|
86
|
+
/**
|
|
87
|
+
* Title of the webpage, if available.
|
|
88
|
+
*/
|
|
89
|
+
title: string | null;
|
|
90
|
+
url: string;
|
|
16
91
|
}
|
|
17
92
|
/**
|
|
18
93
|
* Output for the Search API.
|
|
@@ -23,7 +98,7 @@ export interface SearchResult {
|
|
|
23
98
|
*/
|
|
24
99
|
results: Array<WebSearchResult>;
|
|
25
100
|
/**
|
|
26
|
-
* Search ID. Example: `
|
|
101
|
+
* Search ID. Example: `search_cad0a6d2dec046bd95ae900527d880e7`
|
|
27
102
|
*/
|
|
28
103
|
search_id: string;
|
|
29
104
|
}
|
|
@@ -44,42 +119,123 @@ export interface WebSearchResult {
|
|
|
44
119
|
*/
|
|
45
120
|
url: string;
|
|
46
121
|
}
|
|
122
|
+
export interface BetaExtractParams {
|
|
123
|
+
/**
|
|
124
|
+
* Body param:
|
|
125
|
+
*/
|
|
126
|
+
urls: Array<string>;
|
|
127
|
+
/**
|
|
128
|
+
* Body param: Include excerpts from each URL relevant to the search objective and
|
|
129
|
+
* queries. Note that if neither objective nor search_queries is provided, excerpts
|
|
130
|
+
* are redundant with full content.
|
|
131
|
+
*/
|
|
132
|
+
excerpts?: boolean | ExcerptSettings;
|
|
133
|
+
/**
|
|
134
|
+
* Body param: Fetch policy.
|
|
135
|
+
*
|
|
136
|
+
* Determines when to return content from the cache (faster) vs fetching live
|
|
137
|
+
* content (fresher).
|
|
138
|
+
*/
|
|
139
|
+
fetch_policy?: BetaExtractParams.FetchPolicy | null;
|
|
140
|
+
/**
|
|
141
|
+
* Body param: Include full content from each URL. Note that if neither objective
|
|
142
|
+
* nor search_queries is provided, excerpts are redundant with full content.
|
|
143
|
+
*/
|
|
144
|
+
full_content?: boolean | BetaExtractParams.FullContentSettings;
|
|
145
|
+
/**
|
|
146
|
+
* Body param: If provided, focuses extracted content on the specified search
|
|
147
|
+
* objective.
|
|
148
|
+
*/
|
|
149
|
+
objective?: string | null;
|
|
150
|
+
/**
|
|
151
|
+
* Body param: If provided, focuses extracted content on the specified keyword
|
|
152
|
+
* search queries.
|
|
153
|
+
*/
|
|
154
|
+
search_queries?: Array<string> | null;
|
|
155
|
+
/**
|
|
156
|
+
* Header param: Optional header to specify the beta version(s) to enable.
|
|
157
|
+
*/
|
|
158
|
+
betas?: Array<TaskRunAPI.ParallelBeta>;
|
|
159
|
+
}
|
|
160
|
+
export declare namespace BetaExtractParams {
|
|
161
|
+
/**
|
|
162
|
+
* Fetch policy.
|
|
163
|
+
*
|
|
164
|
+
* Determines when to return content from the cache (faster) vs fetching live
|
|
165
|
+
* content (fresher).
|
|
166
|
+
*/
|
|
167
|
+
interface FetchPolicy {
|
|
168
|
+
/**
|
|
169
|
+
* If false, fallback to cached content older than max-age if live fetch fails or
|
|
170
|
+
* times out. If true, returns an error instead.
|
|
171
|
+
*/
|
|
172
|
+
disable_cache_fallback?: boolean;
|
|
173
|
+
/**
|
|
174
|
+
* Maximum age of cached content in seconds to trigger a live fetch. Minimum value
|
|
175
|
+
* 600 seconds (10 minutes). If not provided, a dynamic age policy will be used
|
|
176
|
+
* based on the search objective and url.
|
|
177
|
+
*/
|
|
178
|
+
max_age_seconds?: number | null;
|
|
179
|
+
/**
|
|
180
|
+
* Timeout in seconds for fetching live content if unavailable in cache. If
|
|
181
|
+
* unspecified a dynamic timeout will be used based on the url, generally 15
|
|
182
|
+
* seconds for simple pages and up to 60 seconds for complex pages requiring
|
|
183
|
+
* javascript or PDF rendering.
|
|
184
|
+
*/
|
|
185
|
+
timeout_seconds?: number | null;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Optional settings for returning full content.
|
|
189
|
+
*/
|
|
190
|
+
interface FullContentSettings {
|
|
191
|
+
/**
|
|
192
|
+
* Optional limit on the number of characters to include in the full content for
|
|
193
|
+
* each url. Full content always starts at the beginning of the page and is
|
|
194
|
+
* truncated at the limit if necessary.
|
|
195
|
+
*/
|
|
196
|
+
max_chars_per_result?: number | null;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
47
199
|
export interface BetaSearchParams {
|
|
48
200
|
/**
|
|
49
|
-
* Upper bound on the number of characters to include in excerpts for
|
|
50
|
-
* result.
|
|
201
|
+
* Body param: Upper bound on the number of characters to include in excerpts for
|
|
202
|
+
* each search result.
|
|
51
203
|
*/
|
|
52
204
|
max_chars_per_result?: number | null;
|
|
53
205
|
/**
|
|
54
|
-
* Upper bound on the number of results to return. May be limited by
|
|
55
|
-
* Defaults to 10 if not provided.
|
|
206
|
+
* Body param: Upper bound on the number of results to return. May be limited by
|
|
207
|
+
* the processor. Defaults to 10 if not provided.
|
|
56
208
|
*/
|
|
57
209
|
max_results?: number | null;
|
|
58
210
|
/**
|
|
59
|
-
* Natural-language description of what the web search is trying to
|
|
60
|
-
* include guidance about preferred sources or freshness. At least one of
|
|
61
|
-
* or search_queries must be provided.
|
|
211
|
+
* Body param: Natural-language description of what the web search is trying to
|
|
212
|
+
* find. May include guidance about preferred sources or freshness. At least one of
|
|
213
|
+
* objective or search_queries must be provided.
|
|
62
214
|
*/
|
|
63
215
|
objective?: string | null;
|
|
64
216
|
/**
|
|
65
|
-
* Search processor.
|
|
217
|
+
* Body param: Search processor.
|
|
66
218
|
*/
|
|
67
|
-
processor?: 'base' | 'pro';
|
|
219
|
+
processor?: 'base' | 'pro' | null;
|
|
68
220
|
/**
|
|
69
|
-
* Optional list of traditional keyword search queries to guide the
|
|
70
|
-
* contain search operators. At least one of objective or
|
|
71
|
-
* provided.
|
|
221
|
+
* Body param: Optional list of traditional keyword search queries to guide the
|
|
222
|
+
* search. May contain search operators. At least one of objective or
|
|
223
|
+
* search_queries must be provided.
|
|
72
224
|
*/
|
|
73
225
|
search_queries?: Array<string> | null;
|
|
74
226
|
/**
|
|
75
|
-
* Source policy for web search results.
|
|
227
|
+
* Body param: Source policy for web search results.
|
|
76
228
|
*
|
|
77
229
|
* This policy governs which sources are allowed/disallowed in results.
|
|
78
230
|
*/
|
|
79
231
|
source_policy?: Shared.SourcePolicy | null;
|
|
232
|
+
/**
|
|
233
|
+
* Header param: Optional header to specify the beta version(s) to enable.
|
|
234
|
+
*/
|
|
235
|
+
betas?: Array<TaskRunAPI.ParallelBeta>;
|
|
80
236
|
}
|
|
81
237
|
export declare namespace Beta {
|
|
82
|
-
export { type SearchResult as SearchResult, type WebSearchResult as WebSearchResult, type BetaSearchParams as BetaSearchParams, };
|
|
238
|
+
export { type ExcerptSettings as ExcerptSettings, type ExtractError as ExtractError, type ExtractResponse as ExtractResponse, type ExtractResult as ExtractResult, type SearchResult as SearchResult, type WebSearchResult as WebSearchResult, type BetaExtractParams as BetaExtractParams, type BetaSearchParams as BetaSearchParams, };
|
|
83
239
|
export { TaskRun as TaskRun, type BetaRunInput as BetaRunInput, type BetaTaskRunResult as BetaTaskRunResult, type ErrorEvent as ErrorEvent, type McpServer as McpServer, type McpToolCall as McpToolCall, type ParallelBeta as ParallelBeta, type TaskRunEvent as TaskRunEvent, type Webhook as Webhook, type TaskRunEventsResponse as TaskRunEventsResponse, type TaskRunCreateParams as TaskRunCreateParams, type TaskRunResultParams as TaskRunResultParams, };
|
|
84
240
|
export { type TaskGroup as TaskGroup, type TaskGroupRunResponse as TaskGroupRunResponse, type TaskGroupStatus as TaskGroupStatus, type TaskGroupEventsResponse as TaskGroupEventsResponse, type TaskGroupGetRunsResponse as TaskGroupGetRunsResponse, type TaskGroupCreateParams as TaskGroupCreateParams, type TaskGroupAddRunsParams as TaskGroupAddRunsParams, type TaskGroupEventsParams as TaskGroupEventsParams, type TaskGroupGetRunsParams as TaskGroupGetRunsParams, };
|
|
85
241
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beta.d.ts","sourceRoot":"","sources":["../../src/resources/beta/beta.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,YAAY;OACjB,EACL,SAAS,EACT,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,EAChB;OACM,KAAK,UAAU;OACf,EACL,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,OAAO,EACP,mBAAmB,EACnB,YAAY,EACZ,qBAAqB,EACrB,mBAAmB,EACnB,OAAO,EACR;OACM,EAAE,UAAU,EAAE;
|
|
1
|
+
{"version":3,"file":"beta.d.ts","sourceRoot":"","sources":["../../src/resources/beta/beta.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,YAAY;OACjB,EACL,SAAS,EACT,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB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,IAAI,SAAS,EAC3B,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;IAEF,OAAO,EACL,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
package/resources/beta/beta.js
CHANGED
|
@@ -7,17 +7,43 @@ const resource_1 = require("../../core/resource.js");
|
|
|
7
7
|
const TaskGroupAPI = tslib_1.__importStar(require("./task-group.js"));
|
|
8
8
|
const TaskRunAPI = tslib_1.__importStar(require("./task-run.js"));
|
|
9
9
|
const task_run_1 = require("./task-run.js");
|
|
10
|
+
const headers_1 = require("../../internal/headers.js");
|
|
10
11
|
class Beta extends resource_1.APIResource {
|
|
11
12
|
constructor() {
|
|
12
13
|
super(...arguments);
|
|
13
14
|
this.taskRun = new TaskRunAPI.TaskRun(this._client);
|
|
14
15
|
this.taskGroup = new TaskGroupAPI.TaskGroup(this._client);
|
|
15
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Extracts relevant content from specific web URLs.
|
|
19
|
+
*
|
|
20
|
+
* To access this endpoint, pass the `parallel-beta` header with the value
|
|
21
|
+
* `search-extract-2025-10-10`.
|
|
22
|
+
*/
|
|
23
|
+
extract(params, options) {
|
|
24
|
+
const { betas, ...body } = params;
|
|
25
|
+
return this._client.post('/v1beta/extract', {
|
|
26
|
+
body,
|
|
27
|
+
...options,
|
|
28
|
+
headers: (0, headers_1.buildHeaders)([
|
|
29
|
+
{ ...(betas?.toString() != null ? { 'parallel-beta': betas?.toString() } : undefined) },
|
|
30
|
+
options?.headers,
|
|
31
|
+
]),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
16
34
|
/**
|
|
17
35
|
* Searches the web.
|
|
18
36
|
*/
|
|
19
|
-
search(
|
|
20
|
-
|
|
37
|
+
search(params, options) {
|
|
38
|
+
const { betas, ...body } = params;
|
|
39
|
+
return this._client.post('/v1beta/search', {
|
|
40
|
+
body,
|
|
41
|
+
...options,
|
|
42
|
+
headers: (0, headers_1.buildHeaders)([
|
|
43
|
+
{ ...(betas?.toString() != null ? { 'parallel-beta': betas?.toString() } : undefined) },
|
|
44
|
+
options?.headers,
|
|
45
|
+
]),
|
|
46
|
+
});
|
|
21
47
|
}
|
|
22
48
|
}
|
|
23
49
|
exports.Beta = Beta;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beta.js","sourceRoot":"","sources":["../../src/resources/beta/beta.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,sEAA6C;AAY7C,kEAAyC;AACzC,4CAaoB;
|
|
1
|
+
{"version":3,"file":"beta.js","sourceRoot":"","sources":["../../src/resources/beta/beta.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,sEAA6C;AAY7C,kEAAyC;AACzC,4CAaoB;AAEpB,uDAAsD;AAGtD,MAAa,IAAK,SAAQ,sBAAW;IAArC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAkC/E,CAAC;IAhCC;;;;;OAKG;IACH,OAAO,CAAC,MAAyB,EAAE,OA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