parallel-web 0.3.2 → 0.4.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 +44 -0
- package/client.d.mts +40 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +40 -2
- package/client.d.ts.map +1 -1
- package/client.js +39 -0
- package/client.js.map +1 -1
- package/client.mjs +39 -0
- package/client.mjs.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/package.json +12 -1
- package/resources/beta/beta.d.mts +40 -61
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +40 -61
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +11 -2
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +11 -2
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/findall.d.mts +167 -8
- package/resources/beta/findall.d.mts.map +1 -1
- package/resources/beta/findall.d.ts +167 -8
- package/resources/beta/findall.d.ts.map +1 -1
- package/resources/beta/findall.js +108 -0
- package/resources/beta/findall.js.map +1 -1
- package/resources/beta/findall.mjs +108 -0
- package/resources/beta/findall.mjs.map +1 -1
- package/resources/beta/index.d.mts +2 -2
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +2 -2
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/task-group.d.mts +50 -5
- package/resources/beta/task-group.d.mts.map +1 -1
- package/resources/beta/task-group.d.ts +50 -5
- package/resources/beta/task-group.d.ts.map +1 -1
- package/resources/beta/task-group.js +45 -3
- package/resources/beta/task-group.js.map +1 -1
- package/resources/beta/task-group.mjs +45 -3
- package/resources/beta/task-group.mjs.map +1 -1
- package/resources/beta/task-run.d.mts +77 -270
- package/resources/beta/task-run.d.mts.map +1 -1
- package/resources/beta/task-run.d.ts +77 -270
- package/resources/beta/task-run.d.ts.map +1 -1
- package/resources/beta/task-run.js +17 -2
- package/resources/beta/task-run.js.map +1 -1
- package/resources/beta/task-run.mjs +17 -2
- package/resources/beta/task-run.mjs.map +1 -1
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/shared.d.mts +4 -2
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +4 -2
- package/resources/shared.d.ts.map +1 -1
- package/resources/task-run.d.mts +308 -30
- package/resources/task-run.d.mts.map +1 -1
- package/resources/task-run.d.ts +308 -30
- package/resources/task-run.d.ts.map +1 -1
- package/resources/task-run.js +67 -4
- package/resources/task-run.js.map +1 -1
- package/resources/task-run.mjs +67 -4
- package/resources/task-run.mjs.map +1 -1
- package/resources/top-level.d.mts +317 -0
- package/resources/top-level.d.mts.map +1 -0
- package/resources/top-level.d.ts +317 -0
- package/resources/top-level.d.ts.map +1 -0
- package/resources/top-level.js +4 -0
- package/resources/top-level.js.map +1 -0
- package/resources/top-level.mjs +3 -0
- package/resources/top-level.mjs.map +1 -0
- package/src/client.ts +86 -0
- package/src/internal/utils/env.ts +2 -2
- package/src/resources/beta/api.md +12 -9
- package/src/resources/beta/beta.ts +55 -73
- package/src/resources/beta/findall.ts +187 -7
- package/src/resources/beta/index.ts +7 -4
- package/src/resources/beta/task-group.ts +54 -7
- package/src/resources/beta/task-run.ts +94 -305
- package/src/resources/index.ts +20 -0
- package/src/resources/shared.ts +4 -2
- package/src/resources/task-run.ts +391 -32
- package/src/resources/top-level.ts +385 -0
- 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
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
|
-
import * as BetaTaskRunAPI from "./task-run.js";
|
|
3
2
|
import * as Shared from "../shared.js";
|
|
4
3
|
import * as TaskRunAPI from "../task-run.js";
|
|
5
4
|
import { APIPromise } from "../../core/api-promise.js";
|
|
@@ -8,6 +7,15 @@ import { RequestOptions } from "../../internal/request-options.js";
|
|
|
8
7
|
/**
|
|
9
8
|
* The Task API executes web research and extraction tasks. Clients submit a natural-language objective with an optional input schema; the service plans retrieval, fetches relevant URLs, and returns outputs that conform to a provided or inferred JSON schema. Supports deep research style queries and can return rich structured JSON outputs. Processors trade-off between cost, latency, and quality. Each processor supports calibrated confidences.
|
|
10
9
|
* - Output metadata: citations, excerpts, reasoning, and confidence per field
|
|
10
|
+
*
|
|
11
|
+
* Task Groups enable batch execution of many independent Task runs with group-level monitoring and failure handling.
|
|
12
|
+
* - Submit hundreds or thousands of Tasks as a single group
|
|
13
|
+
* - Observe group progress and receive results as they complete
|
|
14
|
+
* - Real-time updates via Server-Sent Events (SSE)
|
|
15
|
+
* - Add tasks to an existing group while it is running
|
|
16
|
+
* - Group-level retry and error aggregation
|
|
17
|
+
*
|
|
18
|
+
* @deprecated Use GA Task Run instead
|
|
11
19
|
*/
|
|
12
20
|
export declare class TaskRun extends APIResource {
|
|
13
21
|
/**
|
|
@@ -16,6 +24,8 @@ export declare class TaskRun extends APIResource {
|
|
|
16
24
|
* Returns immediately with a run object in status 'queued'.
|
|
17
25
|
*
|
|
18
26
|
* Beta features can be enabled by setting the 'parallel-beta' header.
|
|
27
|
+
*
|
|
28
|
+
* @deprecated Use GA Task Run instead
|
|
19
29
|
*/
|
|
20
30
|
create(params: TaskRunCreateParams, options?: RequestOptions): APIPromise<TaskRunAPI.TaskRun>;
|
|
21
31
|
/**
|
|
@@ -26,277 +36,25 @@ export declare class TaskRun extends APIResource {
|
|
|
26
36
|
*
|
|
27
37
|
* For task runs that did not have enable_events set to true during creation, the
|
|
28
38
|
* frequency of events will be reduced.
|
|
39
|
+
*
|
|
40
|
+
* @deprecated Use GA Task Run instead
|
|
29
41
|
*/
|
|
30
42
|
events(runID: string, options?: RequestOptions): APIPromise<Stream<TaskRunEventsResponse>>;
|
|
31
43
|
/**
|
|
32
44
|
* Retrieves a run result by run_id, blocking until the run is completed.
|
|
33
|
-
*/
|
|
34
|
-
result(runID: string, params?: TaskRunResultParams | null | undefined, options?: RequestOptions): APIPromise<BetaTaskRunResult>;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Task run input with additional beta fields.
|
|
38
|
-
*/
|
|
39
|
-
export interface BetaRunInput {
|
|
40
|
-
/**
|
|
41
|
-
* Input to the task, either text or a JSON object.
|
|
42
|
-
*/
|
|
43
|
-
input: string | {
|
|
44
|
-
[key: string]: unknown;
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Processor to use for the task.
|
|
48
|
-
*/
|
|
49
|
-
processor: string;
|
|
50
|
-
/**
|
|
51
|
-
* Controls tracking of task run execution progress. When set to true, progress
|
|
52
|
-
* events are recorded and can be accessed via the
|
|
53
|
-
* [Task Run events](https://platform.parallel.ai/api-reference) endpoint. When
|
|
54
|
-
* false, no progress events are tracked. Note that progress tracking cannot be
|
|
55
|
-
* enabled after a run has been created. The flag is set to true by default for
|
|
56
|
-
* premium processors (pro and above). To enable this feature in your requests,
|
|
57
|
-
* specify `events-sse-2025-07-24` as one of the values in `parallel-beta` header
|
|
58
|
-
* (for API calls) or `betas` param (for the SDKs).
|
|
59
|
-
*/
|
|
60
|
-
enable_events?: boolean | null;
|
|
61
|
-
/**
|
|
62
|
-
* Optional list of MCP servers to use for the run. To enable this feature in your
|
|
63
|
-
* requests, specify `mcp-server-2025-07-17` as one of the values in
|
|
64
|
-
* `parallel-beta` header (for API calls) or `betas` param (for the SDKs).
|
|
65
|
-
*/
|
|
66
|
-
mcp_servers?: Array<McpServer> | null;
|
|
67
|
-
/**
|
|
68
|
-
* User-provided metadata stored with the run. Keys and values must be strings with
|
|
69
|
-
* a maximum length of 16 and 512 characters respectively.
|
|
70
|
-
*/
|
|
71
|
-
metadata?: {
|
|
72
|
-
[key: string]: string | number | boolean;
|
|
73
|
-
} | null;
|
|
74
|
-
/**
|
|
75
|
-
* Interaction ID to use as context for this request.
|
|
76
|
-
*/
|
|
77
|
-
previous_interaction_id?: string | null;
|
|
78
|
-
/**
|
|
79
|
-
* Source policy for web search results.
|
|
80
|
-
*
|
|
81
|
-
* This policy governs which sources are allowed/disallowed in results.
|
|
82
|
-
*/
|
|
83
|
-
source_policy?: Shared.SourcePolicy | null;
|
|
84
|
-
/**
|
|
85
|
-
* Specification for a task.
|
|
86
|
-
*
|
|
87
|
-
* Auto output schemas can be specified by setting `output_schema={"type":"auto"}`.
|
|
88
|
-
* Not specifying a TaskSpec is the same as setting an auto output schema.
|
|
89
45
|
*
|
|
90
|
-
*
|
|
91
|
-
*/
|
|
92
|
-
task_spec?: TaskRunAPI.TaskSpec | null;
|
|
93
|
-
/**
|
|
94
|
-
* Webhooks for Task Runs.
|
|
95
|
-
*/
|
|
96
|
-
webhook?: Webhook | null;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Result of a beta task run. Available only if beta headers are specified.
|
|
100
|
-
*/
|
|
101
|
-
export interface BetaTaskRunResult {
|
|
102
|
-
/**
|
|
103
|
-
* Output from the task conforming to the output schema.
|
|
104
|
-
*/
|
|
105
|
-
output: BetaTaskRunResult.BetaTaskRunTextOutput | BetaTaskRunResult.BetaTaskRunJsonOutput;
|
|
106
|
-
/**
|
|
107
|
-
* Beta task run object with status 'completed'.
|
|
108
|
-
*/
|
|
109
|
-
run: TaskRunAPI.TaskRun;
|
|
110
|
-
}
|
|
111
|
-
export declare namespace BetaTaskRunResult {
|
|
112
|
-
/**
|
|
113
|
-
* Output from a task that returns text.
|
|
114
|
-
*/
|
|
115
|
-
interface BetaTaskRunTextOutput {
|
|
116
|
-
/**
|
|
117
|
-
* Basis for the output. To include per-list-element basis entries, send the
|
|
118
|
-
* `parallel-beta` header with the value `field-basis-2025-11-25` when creating the
|
|
119
|
-
* run.
|
|
120
|
-
*/
|
|
121
|
-
basis: Array<TaskRunAPI.FieldBasis>;
|
|
122
|
-
/**
|
|
123
|
-
* Text output from the task.
|
|
124
|
-
*/
|
|
125
|
-
content: string;
|
|
126
|
-
/**
|
|
127
|
-
* The type of output being returned, as determined by the output schema of the
|
|
128
|
-
* task spec.
|
|
129
|
-
*/
|
|
130
|
-
type: 'text';
|
|
131
|
-
/**
|
|
132
|
-
* Always None.
|
|
133
|
-
*/
|
|
134
|
-
beta_fields?: {
|
|
135
|
-
[key: string]: unknown;
|
|
136
|
-
} | null;
|
|
137
|
-
/**
|
|
138
|
-
* MCP tool calls made by the task.
|
|
139
|
-
*/
|
|
140
|
-
mcp_tool_calls?: Array<BetaTaskRunAPI.McpToolCall> | null;
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Output from a task that returns JSON.
|
|
144
|
-
*/
|
|
145
|
-
interface BetaTaskRunJsonOutput {
|
|
146
|
-
/**
|
|
147
|
-
* Basis for the output. To include per-list-element basis entries, send the
|
|
148
|
-
* `parallel-beta` header with the value `field-basis-2025-11-25` when creating the
|
|
149
|
-
* run.
|
|
150
|
-
*/
|
|
151
|
-
basis: Array<TaskRunAPI.FieldBasis>;
|
|
152
|
-
/**
|
|
153
|
-
* Output from the task as a native JSON object, as determined by the output schema
|
|
154
|
-
* of the task spec.
|
|
155
|
-
*/
|
|
156
|
-
content: {
|
|
157
|
-
[key: string]: unknown;
|
|
158
|
-
};
|
|
159
|
-
/**
|
|
160
|
-
* The type of output being returned, as determined by the output schema of the
|
|
161
|
-
* task spec.
|
|
162
|
-
*/
|
|
163
|
-
type: 'json';
|
|
164
|
-
/**
|
|
165
|
-
* Always None.
|
|
166
|
-
*/
|
|
167
|
-
beta_fields?: {
|
|
168
|
-
[key: string]: unknown;
|
|
169
|
-
} | null;
|
|
170
|
-
/**
|
|
171
|
-
* MCP tool calls made by the task.
|
|
172
|
-
*/
|
|
173
|
-
mcp_tool_calls?: Array<BetaTaskRunAPI.McpToolCall> | null;
|
|
174
|
-
/**
|
|
175
|
-
* Output schema for the Task Run. Populated only if the task was executed with an
|
|
176
|
-
* auto schema.
|
|
177
|
-
*/
|
|
178
|
-
output_schema?: {
|
|
179
|
-
[key: string]: unknown;
|
|
180
|
-
} | null;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Event indicating an error.
|
|
185
|
-
*/
|
|
186
|
-
export interface ErrorEvent {
|
|
187
|
-
/**
|
|
188
|
-
* Error.
|
|
46
|
+
* @deprecated Use GA Task Run instead
|
|
189
47
|
*/
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* Event type; always 'error'.
|
|
193
|
-
*/
|
|
194
|
-
type: 'error';
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* MCP server configuration.
|
|
198
|
-
*/
|
|
199
|
-
export interface McpServer {
|
|
200
|
-
/**
|
|
201
|
-
* Name of the MCP server.
|
|
202
|
-
*/
|
|
203
|
-
name: string;
|
|
204
|
-
/**
|
|
205
|
-
* URL of the MCP server.
|
|
206
|
-
*/
|
|
207
|
-
url: string;
|
|
208
|
-
/**
|
|
209
|
-
* List of allowed tools for the MCP server.
|
|
210
|
-
*/
|
|
211
|
-
allowed_tools?: Array<string> | null;
|
|
212
|
-
/**
|
|
213
|
-
* Headers for the MCP server.
|
|
214
|
-
*/
|
|
215
|
-
headers?: {
|
|
216
|
-
[key: string]: string;
|
|
217
|
-
} | null;
|
|
218
|
-
/**
|
|
219
|
-
* Type of MCP server being configured. Always `url`.
|
|
220
|
-
*/
|
|
221
|
-
type?: 'url';
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Result of an MCP tool call.
|
|
225
|
-
*/
|
|
226
|
-
export interface McpToolCall {
|
|
227
|
-
/**
|
|
228
|
-
* Arguments used to call the MCP tool.
|
|
229
|
-
*/
|
|
230
|
-
arguments: string;
|
|
231
|
-
/**
|
|
232
|
-
* Name of the MCP server.
|
|
233
|
-
*/
|
|
234
|
-
server_name: string;
|
|
235
|
-
/**
|
|
236
|
-
* Identifier for the tool call.
|
|
237
|
-
*/
|
|
238
|
-
tool_call_id: string;
|
|
239
|
-
/**
|
|
240
|
-
* Name of the tool being called.
|
|
241
|
-
*/
|
|
242
|
-
tool_name: string;
|
|
243
|
-
/**
|
|
244
|
-
* Output received from the tool call, if successful.
|
|
245
|
-
*/
|
|
246
|
-
content?: string | null;
|
|
247
|
-
/**
|
|
248
|
-
* Error message if the tool call failed.
|
|
249
|
-
*/
|
|
250
|
-
error?: string | null;
|
|
48
|
+
result(runID: string, params?: TaskRunResultParams | null | undefined, options?: RequestOptions): APIPromise<TaskRunAPI.TaskRunResult>;
|
|
251
49
|
}
|
|
252
50
|
/**
|
|
253
51
|
* Model for the parallel-beta header.
|
|
254
52
|
*/
|
|
255
53
|
export type ParallelBeta = 'mcp-server-2025-07-17' | 'events-sse-2025-07-24' | 'webhook-2025-08-12' | 'findall-2025-09-15' | 'search-extract-2025-10-10' | 'field-basis-2025-11-25' | (string & {});
|
|
256
|
-
/**
|
|
257
|
-
* Event when a task run transitions to a non-active status.
|
|
258
|
-
*
|
|
259
|
-
* May indicate completion, cancellation, or failure.
|
|
260
|
-
*/
|
|
261
|
-
export interface TaskRunEvent {
|
|
262
|
-
/**
|
|
263
|
-
* Cursor to resume the event stream. Always empty for non Task Group runs.
|
|
264
|
-
*/
|
|
265
|
-
event_id: string | null;
|
|
266
|
-
/**
|
|
267
|
-
* Task run object.
|
|
268
|
-
*/
|
|
269
|
-
run: TaskRunAPI.TaskRun;
|
|
270
|
-
/**
|
|
271
|
-
* Event type; always 'task_run.state'.
|
|
272
|
-
*/
|
|
273
|
-
type: 'task_run.state';
|
|
274
|
-
/**
|
|
275
|
-
* Task run input with additional beta fields.
|
|
276
|
-
*/
|
|
277
|
-
input?: BetaRunInput | null;
|
|
278
|
-
/**
|
|
279
|
-
* Output from the run; included only if requested and if status == `completed`.
|
|
280
|
-
*/
|
|
281
|
-
output?: TaskRunAPI.TaskRunTextOutput | TaskRunAPI.TaskRunJsonOutput | null;
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Webhooks for Task Runs.
|
|
285
|
-
*/
|
|
286
|
-
export interface Webhook {
|
|
287
|
-
/**
|
|
288
|
-
* URL for the webhook.
|
|
289
|
-
*/
|
|
290
|
-
url: string;
|
|
291
|
-
/**
|
|
292
|
-
* Event types to send the webhook notifications for.
|
|
293
|
-
*/
|
|
294
|
-
event_types?: Array<'task_run.status'>;
|
|
295
|
-
}
|
|
296
54
|
/**
|
|
297
55
|
* A progress update for a task run.
|
|
298
56
|
*/
|
|
299
|
-
export type TaskRunEventsResponse = TaskRunEventsResponse.TaskRunProgressStatsEvent | TaskRunEventsResponse.TaskRunProgressMessageEvent | TaskRunEvent | ErrorEvent;
|
|
57
|
+
export type TaskRunEventsResponse = TaskRunEventsResponse.TaskRunProgressStatsEvent | TaskRunEventsResponse.TaskRunProgressMessageEvent | TaskRunAPI.TaskRunEvent | TaskRunAPI.ErrorEvent;
|
|
300
58
|
export declare namespace TaskRunEventsResponse {
|
|
301
59
|
/**
|
|
302
60
|
* A progress update for a task run.
|
|
@@ -353,6 +111,44 @@ export declare namespace TaskRunEventsResponse {
|
|
|
353
111
|
type: 'task_run.progress_msg.plan' | 'task_run.progress_msg.search' | 'task_run.progress_msg.result' | 'task_run.progress_msg.tool_call' | 'task_run.progress_msg.exec_status';
|
|
354
112
|
}
|
|
355
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* @deprecated Use parallel.types.task_run.TaskRunInput instead
|
|
116
|
+
*/
|
|
117
|
+
export type BetaRunInput = TaskRunAPI.RunInput;
|
|
118
|
+
/**
|
|
119
|
+
* @deprecated Use parallel.types.task_run.TaskRunResult instead
|
|
120
|
+
*/
|
|
121
|
+
export type BetaTaskRunResult = TaskRunAPI.TaskRunResult;
|
|
122
|
+
/**
|
|
123
|
+
* Backwards-compatible namespace for `BetaTaskRunResult`.
|
|
124
|
+
* @deprecated Use `TaskRunJsonOutput` and `TaskRunTextOutput` from `task-run` instead.
|
|
125
|
+
*/
|
|
126
|
+
export declare namespace BetaTaskRunResult {
|
|
127
|
+
/** @deprecated Use `TaskRunAPI.TaskRunTextOutput` instead */
|
|
128
|
+
type BetaTaskRunTextOutput = TaskRunAPI.TaskRunTextOutput;
|
|
129
|
+
/** @deprecated Use `TaskRunAPI.TaskRunJsonOutput` instead */
|
|
130
|
+
type BetaTaskRunJsonOutput = TaskRunAPI.TaskRunJsonOutput;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* @deprecated Use parallel.types.task_run.Webhook instead
|
|
134
|
+
*/
|
|
135
|
+
export type Webhook = TaskRunAPI.Webhook;
|
|
136
|
+
/**
|
|
137
|
+
* @deprecated Use parallel.types.task_run.McpServer instead
|
|
138
|
+
*/
|
|
139
|
+
export type McpServer = TaskRunAPI.McpServer;
|
|
140
|
+
/**
|
|
141
|
+
* @deprecated Use parallel.types.task_run.McpToolCall instead
|
|
142
|
+
*/
|
|
143
|
+
export type McpToolCall = TaskRunAPI.McpToolCall;
|
|
144
|
+
/**
|
|
145
|
+
* @deprecated Use parallel.types.task_run.TaskRunEvent instead
|
|
146
|
+
*/
|
|
147
|
+
export type TaskRunEvent = TaskRunAPI.TaskRunEvent;
|
|
148
|
+
/**
|
|
149
|
+
* @deprecated Use parallel.types.task_run.ErrorEvent instead
|
|
150
|
+
*/
|
|
151
|
+
export type ErrorEvent = TaskRunAPI.ErrorEvent;
|
|
356
152
|
export interface TaskRunCreateParams {
|
|
357
153
|
/**
|
|
358
154
|
* Body param: Input to the task, either text or a JSON object.
|
|
@@ -364,23 +160,23 @@ export interface TaskRunCreateParams {
|
|
|
364
160
|
* Body param: Processor to use for the task.
|
|
365
161
|
*/
|
|
366
162
|
processor: string;
|
|
163
|
+
/**
|
|
164
|
+
* Body param: Advanced search configuration for a task run.
|
|
165
|
+
*/
|
|
166
|
+
advanced_settings?: TaskRunCreateParams.AdvancedSettings | null;
|
|
367
167
|
/**
|
|
368
168
|
* Body param: Controls tracking of task run execution progress. When set to true,
|
|
369
169
|
* progress events are recorded and can be accessed via the
|
|
370
|
-
* [Task Run events](https://
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
* specify `events-sse-2025-07-24` as one of the values in `parallel-beta` header
|
|
375
|
-
* (for API calls) or `betas` param (for the SDKs).
|
|
170
|
+
* [Task Run events](https://docs.parallel.ai/api-reference) endpoint. When false,
|
|
171
|
+
* no progress events are tracked. Note that progress tracking cannot be enabled
|
|
172
|
+
* after a run has been created. The flag is set to true by default for premium
|
|
173
|
+
* processors (pro and above).
|
|
376
174
|
*/
|
|
377
175
|
enable_events?: boolean | null;
|
|
378
176
|
/**
|
|
379
|
-
* Body param: Optional list of MCP servers to use for the run.
|
|
380
|
-
* feature in your requests, specify `mcp-server-2025-07-17` as one of the values
|
|
381
|
-
* in `parallel-beta` header (for API calls) or `betas` param (for the SDKs).
|
|
177
|
+
* Body param: Optional list of MCP servers to use for the run.
|
|
382
178
|
*/
|
|
383
|
-
mcp_servers?: Array<McpServer> | null;
|
|
179
|
+
mcp_servers?: Array<TaskRunAPI.McpServer> | null;
|
|
384
180
|
/**
|
|
385
181
|
* Body param: User-provided metadata stored with the run. Keys and values must be
|
|
386
182
|
* strings with a maximum length of 16 and 512 characters respectively.
|
|
@@ -410,12 +206,23 @@ export interface TaskRunCreateParams {
|
|
|
410
206
|
/**
|
|
411
207
|
* Body param: Webhooks for Task Runs.
|
|
412
208
|
*/
|
|
413
|
-
webhook?: Webhook | null;
|
|
209
|
+
webhook?: TaskRunAPI.Webhook | null;
|
|
414
210
|
/**
|
|
415
211
|
* Header param: Optional header to specify the beta version(s) to enable.
|
|
416
212
|
*/
|
|
417
213
|
betas?: Array<ParallelBeta>;
|
|
418
214
|
}
|
|
215
|
+
export declare namespace TaskRunCreateParams {
|
|
216
|
+
/**
|
|
217
|
+
* Advanced search configuration for a task run.
|
|
218
|
+
*/
|
|
219
|
+
interface AdvancedSettings {
|
|
220
|
+
/**
|
|
221
|
+
* ISO 3166-1 alpha-2 country code for geo-targeted search results.
|
|
222
|
+
*/
|
|
223
|
+
location?: string | null;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
419
226
|
export interface TaskRunResultParams {
|
|
420
227
|
/**
|
|
421
228
|
* Query param
|
|
@@ -427,6 +234,6 @@ export interface TaskRunResultParams {
|
|
|
427
234
|
betas?: Array<ParallelBeta>;
|
|
428
235
|
}
|
|
429
236
|
export declare namespace TaskRun {
|
|
430
|
-
export { type
|
|
237
|
+
export { type ParallelBeta as ParallelBeta, type TaskRunEventsResponse as TaskRunEventsResponse, type BetaRunInput as BetaRunInput, type BetaTaskRunResult as BetaTaskRunResult, type Webhook as Webhook, type McpServer as McpServer, type McpToolCall as McpToolCall, type TaskRunEvent as TaskRunEvent, type ErrorEvent as ErrorEvent, type TaskRunCreateParams as TaskRunCreateParams, type TaskRunResultParams as TaskRunResultParams, };
|
|
431
238
|
}
|
|
432
239
|
//# sourceMappingURL=task-run.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-run.d.ts","sourceRoot":"","sources":["../../src/resources/beta/task-run.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,
|
|
1
|
+
{"version":3,"file":"task-run.d.ts","sourceRoot":"","sources":["../../src/resources/beta/task-run.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,UAAU;OACf,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OAEV,EAAE,cAAc,EAAE;AAGzB;;;;;;;;;;;;GAYG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;OAQG;IACH,MAAM,CAAC,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC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
|
|
|
8
8
|
/**
|
|
9
9
|
* The Task API executes web research and extraction tasks. Clients submit a natural-language objective with an optional input schema; the service plans retrieval, fetches relevant URLs, and returns outputs that conform to a provided or inferred JSON schema. Supports deep research style queries and can return rich structured JSON outputs. Processors trade-off between cost, latency, and quality. Each processor supports calibrated confidences.
|
|
10
10
|
* - Output metadata: citations, excerpts, reasoning, and confidence per field
|
|
11
|
+
*
|
|
12
|
+
* Task Groups enable batch execution of many independent Task runs with group-level monitoring and failure handling.
|
|
13
|
+
* - Submit hundreds or thousands of Tasks as a single group
|
|
14
|
+
* - Observe group progress and receive results as they complete
|
|
15
|
+
* - Real-time updates via Server-Sent Events (SSE)
|
|
16
|
+
* - Add tasks to an existing group while it is running
|
|
17
|
+
* - Group-level retry and error aggregation
|
|
18
|
+
*
|
|
19
|
+
* @deprecated Use GA Task Run instead
|
|
11
20
|
*/
|
|
12
21
|
class TaskRun extends resource_1.APIResource {
|
|
13
22
|
/**
|
|
@@ -16,10 +25,12 @@ class TaskRun extends resource_1.APIResource {
|
|
|
16
25
|
* Returns immediately with a run object in status 'queued'.
|
|
17
26
|
*
|
|
18
27
|
* Beta features can be enabled by setting the 'parallel-beta' header.
|
|
28
|
+
*
|
|
29
|
+
* @deprecated Use GA Task Run instead
|
|
19
30
|
*/
|
|
20
31
|
create(params, options) {
|
|
21
32
|
const { betas, ...body } = params;
|
|
22
|
-
return this._client.post('/v1/tasks/runs
|
|
33
|
+
return this._client.post('/v1/tasks/runs', {
|
|
23
34
|
body,
|
|
24
35
|
...options,
|
|
25
36
|
headers: (0, headers_1.buildHeaders)([
|
|
@@ -36,6 +47,8 @@ class TaskRun extends resource_1.APIResource {
|
|
|
36
47
|
*
|
|
37
48
|
* For task runs that did not have enable_events set to true during creation, the
|
|
38
49
|
* frequency of events will be reduced.
|
|
50
|
+
*
|
|
51
|
+
* @deprecated Use GA Task Run instead
|
|
39
52
|
*/
|
|
40
53
|
events(runID, options) {
|
|
41
54
|
return this._client.get((0, path_1.path) `/v1beta/tasks/runs/${runID}/events`, {
|
|
@@ -49,10 +62,12 @@ class TaskRun extends resource_1.APIResource {
|
|
|
49
62
|
}
|
|
50
63
|
/**
|
|
51
64
|
* Retrieves a run result by run_id, blocking until the run is completed.
|
|
65
|
+
*
|
|
66
|
+
* @deprecated Use GA Task Run instead
|
|
52
67
|
*/
|
|
53
68
|
result(runID, params = {}, options) {
|
|
54
69
|
const { betas, ...query } = params ?? {};
|
|
55
|
-
return this._client.get((0, path_1.path) `/v1/tasks/runs/${runID}/result
|
|
70
|
+
return this._client.get((0, path_1.path) `/v1/tasks/runs/${runID}/result`, {
|
|
56
71
|
query,
|
|
57
72
|
...options,
|
|
58
73
|
headers: (0, headers_1.buildHeaders)([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-run.js","sourceRoot":"","sources":["../../src/resources/beta/task-run.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;
|
|
1
|
+
{"version":3,"file":"task-run.js","sourceRoot":"","sources":["../../src/resources/beta/task-run.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAKlD,uDAAsD;AAEtD,uDAAiD;AAEjD;;;;;;;;;;;;GAYG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;OAQG;IACH,MAAM,CAAC,MAA2B,EAAE,OAAwB;QAC1D,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE;YACzC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,eAAe,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,2BAA2B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAC/E,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,KAAa,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,sBAAsB,KAAK,SAAS,EAAE;YAChE,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,EAAE,mBAAmB,EAAE;gBAC7E,OAAO,EAAE,OAAO;aACjB,CAAC;YACF,MAAM,EAAE,IAAI;SACb,CAA8C,CAAC;IAClD,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,KAAa,EACb,SAAiD,EAAE,EACnD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,KAAK,SAAS,EAAE;YAC5D,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,eAAe,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,2BAA2B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAC/E,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAhED,0BAgEC"}
|
|
@@ -5,6 +5,15 @@ import { path } from "../../internal/utils/path.mjs";
|
|
|
5
5
|
/**
|
|
6
6
|
* The Task API executes web research and extraction tasks. Clients submit a natural-language objective with an optional input schema; the service plans retrieval, fetches relevant URLs, and returns outputs that conform to a provided or inferred JSON schema. Supports deep research style queries and can return rich structured JSON outputs. Processors trade-off between cost, latency, and quality. Each processor supports calibrated confidences.
|
|
7
7
|
* - Output metadata: citations, excerpts, reasoning, and confidence per field
|
|
8
|
+
*
|
|
9
|
+
* Task Groups enable batch execution of many independent Task runs with group-level monitoring and failure handling.
|
|
10
|
+
* - Submit hundreds or thousands of Tasks as a single group
|
|
11
|
+
* - Observe group progress and receive results as they complete
|
|
12
|
+
* - Real-time updates via Server-Sent Events (SSE)
|
|
13
|
+
* - Add tasks to an existing group while it is running
|
|
14
|
+
* - Group-level retry and error aggregation
|
|
15
|
+
*
|
|
16
|
+
* @deprecated Use GA Task Run instead
|
|
8
17
|
*/
|
|
9
18
|
export class TaskRun extends APIResource {
|
|
10
19
|
/**
|
|
@@ -13,10 +22,12 @@ export class TaskRun extends APIResource {
|
|
|
13
22
|
* Returns immediately with a run object in status 'queued'.
|
|
14
23
|
*
|
|
15
24
|
* Beta features can be enabled by setting the 'parallel-beta' header.
|
|
25
|
+
*
|
|
26
|
+
* @deprecated Use GA Task Run instead
|
|
16
27
|
*/
|
|
17
28
|
create(params, options) {
|
|
18
29
|
const { betas, ...body } = params;
|
|
19
|
-
return this._client.post('/v1/tasks/runs
|
|
30
|
+
return this._client.post('/v1/tasks/runs', {
|
|
20
31
|
body,
|
|
21
32
|
...options,
|
|
22
33
|
headers: buildHeaders([
|
|
@@ -33,6 +44,8 @@ export class TaskRun extends APIResource {
|
|
|
33
44
|
*
|
|
34
45
|
* For task runs that did not have enable_events set to true during creation, the
|
|
35
46
|
* frequency of events will be reduced.
|
|
47
|
+
*
|
|
48
|
+
* @deprecated Use GA Task Run instead
|
|
36
49
|
*/
|
|
37
50
|
events(runID, options) {
|
|
38
51
|
return this._client.get(path `/v1beta/tasks/runs/${runID}/events`, {
|
|
@@ -46,10 +59,12 @@ export class TaskRun extends APIResource {
|
|
|
46
59
|
}
|
|
47
60
|
/**
|
|
48
61
|
* Retrieves a run result by run_id, blocking until the run is completed.
|
|
62
|
+
*
|
|
63
|
+
* @deprecated Use GA Task Run instead
|
|
49
64
|
*/
|
|
50
65
|
result(runID, params = {}, options) {
|
|
51
66
|
const { betas, ...query } = params ?? {};
|
|
52
|
-
return this._client.get(path `/v1/tasks/runs/${runID}/result
|
|
67
|
+
return this._client.get(path `/v1/tasks/runs/${runID}/result`, {
|
|
53
68
|
query,
|
|
54
69
|
...options,
|
|
55
70
|
headers: buildHeaders([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-run.mjs","sourceRoot":"","sources":["../../src/resources/beta/task-run.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"task-run.mjs","sourceRoot":"","sources":["../../src/resources/beta/task-run.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAKf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;OAQG;IACH,MAAM,CAAC,MAA2B,EAAE,OAAwB;QAC1D,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE;YACzC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,eAAe,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,2BAA2B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAC/E,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,KAAa,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,sBAAsB,KAAK,SAAS,EAAE;YAChE,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,EAAE,mBAAmB,EAAE;gBAC7E,OAAO,EAAE,OAAO;aACjB,CAAC;YACF,MAAM,EAAE,IAAI;SACb,CAA8C,CAAC;IAClD,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,KAAa,EACb,SAAiD,EAAE,EACnD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,KAAK,SAAS,EAAE;YAC5D,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,eAAe,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,2BAA2B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAC/E,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/resources/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./shared.mjs";
|
|
2
2
|
export { Beta } from "./beta/beta.mjs";
|
|
3
|
-
export { TaskRun, type AutoSchema, type Citation, type FieldBasis, type JsonSchema, type RunInput, type TaskRunJsonOutput, type TaskRunResult, type TaskRunTextOutput, type TaskSpec, type TextSchema, type TaskRunCreateParams, type TaskRunResultParams, } from "./task-run.mjs";
|
|
3
|
+
export { TaskRun, type AutoSchema, type Citation, type ErrorEvent, type FieldBasis, type JsonSchema, type McpServer, type McpToolCall, type RunInput, type TaskRunEvent, type TaskRunJsonOutput, type TaskRunResult, type TaskRunTextOutput, type TaskSpec, type TextSchema, type Webhook, type TaskRunEventsResponse, type TaskRunCreateParams, type TaskRunResultParams, } from "./task-run.mjs";
|
|
4
|
+
export { type AdvancedExtractSettings, type AdvancedSearchSettings, type ExcerptSettings, type ExtractError, type ExtractResponse, type ExtractResult, type FetchPolicy, type SearchResult, type UsageItem, type WebSearchResult, type ExtractParams, type SearchParams, } from "./top-level.mjs";
|
|
4
5
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EAAE,IAAI,EAAE;OACR,EACL,OAAO,EACP,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EAAE,IAAI,EAAE;OACR,EACL,OAAO,EACP,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB;OACM,EACL,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB"}
|
package/resources/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./shared.js";
|
|
2
2
|
export { Beta } from "./beta/beta.js";
|
|
3
|
-
export { TaskRun, type AutoSchema, type Citation, type FieldBasis, type JsonSchema, type RunInput, type TaskRunJsonOutput, type TaskRunResult, type TaskRunTextOutput, type TaskSpec, type TextSchema, type TaskRunCreateParams, type TaskRunResultParams, } from "./task-run.js";
|
|
3
|
+
export { TaskRun, type AutoSchema, type Citation, type ErrorEvent, type FieldBasis, type JsonSchema, type McpServer, type McpToolCall, type RunInput, type TaskRunEvent, type TaskRunJsonOutput, type TaskRunResult, type TaskRunTextOutput, type TaskSpec, type TextSchema, type Webhook, type TaskRunEventsResponse, type TaskRunCreateParams, type TaskRunResultParams, } from "./task-run.js";
|
|
4
|
+
export { type AdvancedExtractSettings, type AdvancedSearchSettings, type ExcerptSettings, type ExtractError, type ExtractResponse, type ExtractResult, type FetchPolicy, type SearchResult, type UsageItem, type WebSearchResult, type ExtractParams, type SearchParams, } from "./top-level.js";
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
package/resources/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EAAE,IAAI,EAAE;OACR,EACL,OAAO,EACP,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EAAE,IAAI,EAAE;OACR,EACL,OAAO,EACP,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB;OACM,EACL,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB"}
|
package/resources/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,sDAAyB;AACzB,uCAAmC;AAA1B,4FAAA,IAAI,OAAA;AACb,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,sDAAyB;AACzB,uCAAmC;AAA1B,4FAAA,IAAI,OAAA;AACb,0CAoBoB;AAnBlB,mGAAA,OAAO,OAAA"}
|
package/resources/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EAAE,IAAI,EAAE;OACR,EACL,OAAO,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EAAE,IAAI,EAAE;OACR,EACL,OAAO,GAmBR"}
|
package/resources/shared.d.mts
CHANGED
|
@@ -46,14 +46,16 @@ export interface SourcePolicy {
|
|
|
46
46
|
* List of domains to exclude from results. If specified, sources from these
|
|
47
47
|
* domains will be excluded. Accepts plain domains (e.g., example.com,
|
|
48
48
|
* subdomain.example.gov) or bare domain extension starting with a period (e.g.,
|
|
49
|
-
* .gov, .edu, .co.uk).
|
|
49
|
+
* .gov, .edu, .co.uk). The combined number of domains in include_domains and
|
|
50
|
+
* exclude_domains cannot exceed 200.
|
|
50
51
|
*/
|
|
51
52
|
exclude_domains?: Array<string>;
|
|
52
53
|
/**
|
|
53
54
|
* List of domains to restrict the results to. If specified, only sources from
|
|
54
55
|
* these domains will be included. Accepts plain domains (e.g., example.com,
|
|
55
56
|
* subdomain.example.gov) or bare domain extension starting with a period (e.g.,
|
|
56
|
-
* .gov, .edu, .co.uk).
|
|
57
|
+
* .gov, .edu, .co.uk). The combined number of domains in include_domains and
|
|
58
|
+
* exclude_domains cannot exceed 200.
|
|
57
59
|
*/
|
|
58
60
|
include_domains?: Array<string>;
|
|
59
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.mts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;CAC5C;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,KAAK,EAAE,WAAW,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B
|
|
1
|
+
{"version":3,"file":"shared.d.mts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM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