parallel-web 0.4.1 → 0.5.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.
Files changed (160) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/client.d.mts +29 -8
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +29 -8
  5. package/client.d.ts.map +1 -1
  6. package/client.js +34 -4
  7. package/client.js.map +1 -1
  8. package/client.mjs +34 -4
  9. package/client.mjs.map +1 -1
  10. package/internal/qs/formats.d.mts +7 -0
  11. package/internal/qs/formats.d.mts.map +1 -0
  12. package/internal/qs/formats.d.ts +7 -0
  13. package/internal/qs/formats.d.ts.map +1 -0
  14. package/internal/qs/formats.js +13 -0
  15. package/internal/qs/formats.js.map +1 -0
  16. package/internal/qs/formats.mjs +9 -0
  17. package/internal/qs/formats.mjs.map +1 -0
  18. package/internal/qs/index.d.mts +10 -0
  19. package/internal/qs/index.d.mts.map +1 -0
  20. package/internal/qs/index.d.ts +10 -0
  21. package/internal/qs/index.d.ts.map +1 -0
  22. package/internal/qs/index.js +14 -0
  23. package/internal/qs/index.js.map +1 -0
  24. package/internal/qs/index.mjs +10 -0
  25. package/internal/qs/index.mjs.map +1 -0
  26. package/internal/qs/stringify.d.mts +3 -0
  27. package/internal/qs/stringify.d.mts.map +1 -0
  28. package/internal/qs/stringify.d.ts +3 -0
  29. package/internal/qs/stringify.d.ts.map +1 -0
  30. package/internal/qs/stringify.js +277 -0
  31. package/internal/qs/stringify.js.map +1 -0
  32. package/internal/qs/stringify.mjs +274 -0
  33. package/internal/qs/stringify.mjs.map +1 -0
  34. package/internal/qs/types.d.mts +57 -0
  35. package/internal/qs/types.d.mts.map +1 -0
  36. package/internal/qs/types.d.ts +57 -0
  37. package/internal/qs/types.d.ts.map +1 -0
  38. package/internal/qs/types.js +3 -0
  39. package/internal/qs/types.js.map +1 -0
  40. package/internal/qs/types.mjs +2 -0
  41. package/internal/qs/types.mjs.map +1 -0
  42. package/internal/qs/utils.d.mts +15 -0
  43. package/internal/qs/utils.d.mts.map +1 -0
  44. package/internal/qs/utils.d.ts +15 -0
  45. package/internal/qs/utils.d.ts.map +1 -0
  46. package/internal/qs/utils.js +230 -0
  47. package/internal/qs/utils.js.map +1 -0
  48. package/internal/qs/utils.mjs +217 -0
  49. package/internal/qs/utils.mjs.map +1 -0
  50. package/internal/types.d.mts +6 -6
  51. package/internal/types.d.mts.map +1 -1
  52. package/internal/types.d.ts +6 -6
  53. package/internal/types.d.ts.map +1 -1
  54. package/internal/utils/query.d.mts +0 -3
  55. package/internal/utils/query.d.mts.map +1 -1
  56. package/internal/utils/query.d.ts +0 -3
  57. package/internal/utils/query.d.ts.map +1 -1
  58. package/internal/utils/query.js +3 -16
  59. package/internal/utils/query.js.map +1 -1
  60. package/internal/utils/query.mjs +2 -16
  61. package/internal/utils/query.mjs.map +1 -1
  62. package/package.json +1 -1
  63. package/resources/beta/beta.d.mts +11 -19
  64. package/resources/beta/beta.d.mts.map +1 -1
  65. package/resources/beta/beta.d.ts +11 -19
  66. package/resources/beta/beta.d.ts.map +1 -1
  67. package/resources/beta/beta.js +2 -0
  68. package/resources/beta/beta.js.map +1 -1
  69. package/resources/beta/beta.mjs +2 -0
  70. package/resources/beta/beta.mjs.map +1 -1
  71. package/resources/beta/findall.d.mts +127 -177
  72. package/resources/beta/findall.d.mts.map +1 -1
  73. package/resources/beta/findall.d.ts +127 -177
  74. package/resources/beta/findall.d.ts.map +1 -1
  75. package/resources/beta/findall.js +2 -4
  76. package/resources/beta/findall.js.map +1 -1
  77. package/resources/beta/findall.mjs +2 -4
  78. package/resources/beta/findall.mjs.map +1 -1
  79. package/resources/beta/index.d.mts +2 -2
  80. package/resources/beta/index.d.mts.map +1 -1
  81. package/resources/beta/index.d.ts +2 -2
  82. package/resources/beta/index.d.ts.map +1 -1
  83. package/resources/beta/index.js.map +1 -1
  84. package/resources/beta/index.mjs.map +1 -1
  85. package/resources/beta/task-group.d.mts +22 -143
  86. package/resources/beta/task-group.d.mts.map +1 -1
  87. package/resources/beta/task-group.d.ts +22 -143
  88. package/resources/beta/task-group.d.ts.map +1 -1
  89. package/resources/beta/task-group.js +7 -42
  90. package/resources/beta/task-group.js.map +1 -1
  91. package/resources/beta/task-group.mjs +7 -42
  92. package/resources/beta/task-group.mjs.map +1 -1
  93. package/resources/beta/task-run.d.mts +22 -70
  94. package/resources/beta/task-run.d.mts.map +1 -1
  95. package/resources/beta/task-run.d.ts +22 -70
  96. package/resources/beta/task-run.d.ts.map +1 -1
  97. package/resources/beta/task-run.js +1 -1
  98. package/resources/beta/task-run.mjs +1 -1
  99. package/resources/index.d.mts +4 -2
  100. package/resources/index.d.mts.map +1 -1
  101. package/resources/index.d.ts +4 -2
  102. package/resources/index.d.ts.map +1 -1
  103. package/resources/index.js +5 -1
  104. package/resources/index.js.map +1 -1
  105. package/resources/index.mjs +2 -0
  106. package/resources/index.mjs.map +1 -1
  107. package/resources/monitor.d.mts +625 -0
  108. package/resources/monitor.d.mts.map +1 -0
  109. package/resources/monitor.d.ts +625 -0
  110. package/resources/monitor.d.ts.map +1 -0
  111. package/resources/monitor.js +140 -0
  112. package/resources/monitor.js.map +1 -0
  113. package/resources/monitor.mjs +136 -0
  114. package/resources/monitor.mjs.map +1 -0
  115. package/resources/task-group.d.mts +213 -0
  116. package/resources/task-group.d.mts.map +1 -0
  117. package/resources/task-group.d.ts +213 -0
  118. package/resources/task-group.d.ts.map +1 -0
  119. package/resources/task-group.js +95 -0
  120. package/resources/task-group.js.map +1 -0
  121. package/resources/task-group.mjs +91 -0
  122. package/resources/task-group.mjs.map +1 -0
  123. package/resources/task-run.d.mts +97 -80
  124. package/resources/task-run.d.mts.map +1 -1
  125. package/resources/task-run.d.ts +97 -80
  126. package/resources/task-run.d.ts.map +1 -1
  127. package/resources/task-run.js +14 -1
  128. package/resources/task-run.js.map +1 -1
  129. package/resources/task-run.mjs +14 -1
  130. package/resources/task-run.mjs.map +1 -1
  131. package/resources/top-level.d.mts +19 -15
  132. package/resources/top-level.d.mts.map +1 -1
  133. package/resources/top-level.d.ts +19 -15
  134. package/resources/top-level.d.ts.map +1 -1
  135. package/src/client.ts +120 -4
  136. package/src/internal/qs/LICENSE.md +13 -0
  137. package/src/internal/qs/README.md +3 -0
  138. package/src/internal/qs/formats.ts +10 -0
  139. package/src/internal/qs/index.ts +13 -0
  140. package/src/internal/qs/stringify.ts +385 -0
  141. package/src/internal/qs/types.ts +71 -0
  142. package/src/internal/qs/utils.ts +265 -0
  143. package/src/internal/types.ts +6 -8
  144. package/src/internal/utils/query.ts +2 -18
  145. package/src/resources/beta/api.md +9 -5
  146. package/src/resources/beta/beta.ts +26 -20
  147. package/src/resources/beta/findall.ts +153 -202
  148. package/src/resources/beta/index.ts +7 -4
  149. package/src/resources/beta/task-group.ts +30 -157
  150. package/src/resources/beta/task-run.ts +26 -86
  151. package/src/resources/index.ts +42 -0
  152. package/src/resources/monitor.ts +752 -0
  153. package/src/resources/task-group.ts +315 -0
  154. package/src/resources/task-run.ts +122 -95
  155. package/src/resources/top-level.ts +23 -15
  156. package/src/version.ts +1 -1
  157. package/version.d.mts +1 -1
  158. package/version.d.ts +1 -1
  159. package/version.js +1 -1
  160. package/version.mjs +1 -1
@@ -1,71 +1,41 @@
1
1
  import { APIResource } from "../../core/resource.mjs";
2
- import * as TaskGroupAPI from "./task-group.mjs";
2
+ import * as TaskGroupAPI from "../task-group.mjs";
3
3
  import * as TaskRunAPI from "../task-run.mjs";
4
4
  import * as BetaTaskRunAPI from "./task-run.mjs";
5
5
  import { APIPromise } from "../../core/api-promise.mjs";
6
6
  import { Stream } from "../../core/streaming.mjs";
7
7
  import { RequestOptions } from "../../internal/request-options.mjs";
8
8
  /**
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
- * - Output metadata: citations, excerpts, reasoning, and confidence per field
9
+ * Tasks (Beta)
11
10
  *
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
11
+ * @deprecated Use GA Task Group instead
18
12
  */
19
13
  export declare class TaskGroup extends APIResource {
20
14
  /**
21
15
  * Initiates a TaskGroup to group and track multiple runs.
22
16
  *
23
- * @example
24
- * ```ts
25
- * const taskGroup = await client.beta.taskGroup.create();
26
- * ```
17
+ * @deprecated Use GA Task Group instead
27
18
  */
28
- create(body: TaskGroupCreateParams, options?: RequestOptions): APIPromise<TaskGroup>;
19
+ create(body: TaskGroupCreateParams, options?: RequestOptions): APIPromise<TaskGroupAPI.TaskGroup>;
29
20
  /**
30
21
  * Retrieves aggregated status across runs in a TaskGroup.
31
22
  *
32
- * @example
33
- * ```ts
34
- * const taskGroup = await client.beta.taskGroup.retrieve(
35
- * 'taskgroup_id',
36
- * );
37
- * ```
23
+ * @deprecated Use GA Task Group instead
38
24
  */
39
- retrieve(taskGroupID: string, options?: RequestOptions): APIPromise<TaskGroup>;
25
+ retrieve(taskGroupID: string, options?: RequestOptions): APIPromise<TaskGroupAPI.TaskGroup>;
40
26
  /**
41
27
  * Initiates multiple task runs within a TaskGroup.
42
28
  *
43
- * @example
44
- * ```ts
45
- * const taskGroupRunResponse =
46
- * await client.beta.taskGroup.addRuns('taskgroup_id', {
47
- * inputs: [
48
- * {
49
- * input: 'What was the GDP of France in 2023?',
50
- * processor: 'base',
51
- * },
52
- * ],
53
- * });
54
- * ```
29
+ * @deprecated Use GA Task Group instead
55
30
  */
56
- addRuns(taskGroupID: string, params: TaskGroupAddRunsParams, options?: RequestOptions): APIPromise<TaskGroupRunResponse>;
31
+ addRuns(taskGroupID: string, params: TaskGroupAddRunsParams, options?: RequestOptions): APIPromise<TaskGroupAPI.TaskGroupRunResponse>;
57
32
  /**
58
33
  * Streams events from a TaskGroup: status updates and run completions.
59
34
  *
60
35
  * The connection will remain open for up to an hour as long as at least one run in
61
36
  * the group is still active.
62
37
  *
63
- * @example
64
- * ```ts
65
- * const response = await client.beta.taskGroup.events(
66
- * 'taskgroup_id',
67
- * );
68
- * ```
38
+ * @deprecated Use GA Task Group instead
69
39
  */
70
40
  events(taskGroupID: string, query?: TaskGroupEventsParams | undefined, options?: RequestOptions): APIPromise<Stream<TaskGroupEventsResponse>>;
71
41
  /**
@@ -80,120 +50,23 @@ export declare class TaskGroup extends APIResource {
80
50
  * the stream. The stream will resume from the next event after the
81
51
  * `last_event_id`.
82
52
  *
83
- * @example
84
- * ```ts
85
- * const response = await client.beta.taskGroup.getRuns(
86
- * 'taskgroup_id',
87
- * );
88
- * ```
53
+ * @deprecated Use GA Task Group instead
89
54
  */
90
55
  getRuns(taskGroupID: string, query?: TaskGroupGetRunsParams | undefined, options?: RequestOptions): APIPromise<Stream<TaskGroupGetRunsResponse>>;
91
56
  }
92
- /**
93
- * Response object for a task group, including its status and metadata.
94
- */
95
- export interface TaskGroup {
96
- /**
97
- * Timestamp of the creation of the group, as an RFC 3339 string.
98
- */
99
- created_at: string | null;
100
- /**
101
- * Status of the group.
102
- */
103
- status: TaskGroupStatus;
104
- /**
105
- * ID of the group.
106
- */
107
- taskgroup_id: string;
108
- /**
109
- * User-provided metadata stored with the group.
110
- */
111
- metadata?: {
112
- [key: string]: string | number | boolean;
113
- } | null;
114
- }
115
- /**
116
- * Response from adding new task runs to a task group.
117
- */
118
- export interface TaskGroupRunResponse {
119
- /**
120
- * Cursor for these runs in the event stream at
121
- * taskgroup/events?last_event_id=<event_cursor>. Empty for the first runs in the
122
- * group.
123
- */
124
- event_cursor: string | null;
125
- /**
126
- * Cursor for these runs in the run stream at
127
- * taskgroup/runs?last_event_id=<run_cursor>. Empty for the first runs in the
128
- * group.
129
- */
130
- run_cursor: string | null;
131
- /**
132
- * IDs of the newly created runs.
133
- */
134
- run_ids: Array<string>;
135
- /**
136
- * Status of the group.
137
- */
138
- status: TaskGroupStatus;
139
- }
140
- /**
141
- * Status of a task group.
142
- */
143
- export interface TaskGroupStatus {
144
- /**
145
- * True if at least one run in the group is currently active, i.e. status is one of
146
- * {'cancelling', 'queued', 'running'}.
147
- */
148
- is_active: boolean;
149
- /**
150
- * Timestamp of the last status update to the group, as an RFC 3339 string.
151
- */
152
- modified_at: string | null;
153
- /**
154
- * Number of task runs in the group.
155
- */
156
- num_task_runs: number;
157
- /**
158
- * Human-readable status message for the group.
159
- */
160
- status_message: string | null;
161
- /**
162
- * Number of task runs with each status.
163
- */
164
- task_run_status_counts: {
165
- [key: string]: number;
166
- };
167
- }
168
57
  /**
169
58
  * Event indicating an update to group status.
170
59
  */
171
- export type TaskGroupEventsResponse = TaskGroupEventsResponse.TaskGroupStatusEvent | TaskRunAPI.TaskRunEvent | TaskRunAPI.ErrorEvent;
172
- export declare namespace TaskGroupEventsResponse {
173
- /**
174
- * Event indicating an update to group status.
175
- */
176
- interface TaskGroupStatusEvent {
177
- /**
178
- * Cursor to resume the event stream.
179
- */
180
- event_id: string;
181
- /**
182
- * Task group status object.
183
- */
184
- status: TaskGroupAPI.TaskGroupStatus;
185
- /**
186
- * Event type; always 'task_group_status'.
187
- */
188
- type: 'task_group_status';
189
- }
190
- }
60
+ export type TaskGroupEventsResponse = TaskGroupAPI.TaskGroupStatusEvent | TaskRunAPI.TaskRunEvent | TaskRunAPI.ErrorEvent;
191
61
  /**
192
62
  * Event when a task run transitions to a non-active status.
193
63
  *
194
64
  * May indicate completion, cancellation, or failure.
195
65
  */
196
66
  export type TaskGroupGetRunsResponse = TaskRunAPI.TaskRunEvent | TaskRunAPI.ErrorEvent;
67
+ export type TaskGroupStatus = TaskGroupAPI.TaskGroupStatus;
68
+ export type TaskGroupStatusEvent = TaskGroupAPI.TaskGroupStatusEvent;
69
+ export type TaskGroupRunResponse = TaskGroupAPI.TaskGroupRunResponse;
197
70
  export interface TaskGroupCreateParams {
198
71
  /**
199
72
  * User-provided metadata stored with the task group.
@@ -238,6 +111,12 @@ export interface TaskGroupGetRunsParams {
238
111
  status?: 'queued' | 'action_required' | 'running' | 'completed' | 'failed' | 'cancelling' | 'cancelled' | null;
239
112
  }
240
113
  export declare namespace TaskGroup {
241
- 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, };
114
+ export { type TaskGroupEventsResponse as TaskGroupEventsResponse, type TaskGroupGetRunsResponse as TaskGroupGetRunsResponse, type TaskGroupStatus as TaskGroupStatus, type TaskGroupStatusEvent as TaskGroupStatusEvent, type TaskGroupRunResponse as TaskGroupRunResponse, type TaskGroupCreateParams as TaskGroupCreateParams, type TaskGroupAddRunsParams as TaskGroupAddRunsParams, type TaskGroupEventsParams as TaskGroupEventsParams, type TaskGroupGetRunsParams as TaskGroupGetRunsParams, };
115
+ }
116
+ type _TaskGroupStatusEvent = TaskGroupStatusEvent;
117
+ export declare namespace TaskGroupEventsResponse {
118
+ /** @deprecated Use `Beta.TaskGroupStatusEvent` instead. */
119
+ type TaskGroupStatusEvent = _TaskGroupStatusEvent;
242
120
  }
121
+ export {};
243
122
  //# sourceMappingURL=task-group.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"task-group.d.mts","sourceRoot":"","sources":["../../src/resources/beta/task-group.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,KAAK,UAAU;OACf,KAAK,cAAc;OACnB,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OAEV,EAAE,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oBAAoB,CAAC;AAClD,yBAAiB,uBAAuB,CAAC;IACvC,2DAA2D;IAC3D,KAAY,oBAAoB,GAAG,qBAAqB,CAAC;CAC1D"}
@@ -1,71 +1,41 @@
1
1
  import { APIResource } from "../../core/resource.js";
2
- import * as TaskGroupAPI from "./task-group.js";
2
+ import * as TaskGroupAPI from "../task-group.js";
3
3
  import * as TaskRunAPI from "../task-run.js";
4
4
  import * as BetaTaskRunAPI from "./task-run.js";
5
5
  import { APIPromise } from "../../core/api-promise.js";
6
6
  import { Stream } from "../../core/streaming.js";
7
7
  import { RequestOptions } from "../../internal/request-options.js";
8
8
  /**
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
- * - Output metadata: citations, excerpts, reasoning, and confidence per field
9
+ * Tasks (Beta)
11
10
  *
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
11
+ * @deprecated Use GA Task Group instead
18
12
  */
19
13
  export declare class TaskGroup extends APIResource {
20
14
  /**
21
15
  * Initiates a TaskGroup to group and track multiple runs.
22
16
  *
23
- * @example
24
- * ```ts
25
- * const taskGroup = await client.beta.taskGroup.create();
26
- * ```
17
+ * @deprecated Use GA Task Group instead
27
18
  */
28
- create(body: TaskGroupCreateParams, options?: RequestOptions): APIPromise<TaskGroup>;
19
+ create(body: TaskGroupCreateParams, options?: RequestOptions): APIPromise<TaskGroupAPI.TaskGroup>;
29
20
  /**
30
21
  * Retrieves aggregated status across runs in a TaskGroup.
31
22
  *
32
- * @example
33
- * ```ts
34
- * const taskGroup = await client.beta.taskGroup.retrieve(
35
- * 'taskgroup_id',
36
- * );
37
- * ```
23
+ * @deprecated Use GA Task Group instead
38
24
  */
39
- retrieve(taskGroupID: string, options?: RequestOptions): APIPromise<TaskGroup>;
25
+ retrieve(taskGroupID: string, options?: RequestOptions): APIPromise<TaskGroupAPI.TaskGroup>;
40
26
  /**
41
27
  * Initiates multiple task runs within a TaskGroup.
42
28
  *
43
- * @example
44
- * ```ts
45
- * const taskGroupRunResponse =
46
- * await client.beta.taskGroup.addRuns('taskgroup_id', {
47
- * inputs: [
48
- * {
49
- * input: 'What was the GDP of France in 2023?',
50
- * processor: 'base',
51
- * },
52
- * ],
53
- * });
54
- * ```
29
+ * @deprecated Use GA Task Group instead
55
30
  */
56
- addRuns(taskGroupID: string, params: TaskGroupAddRunsParams, options?: RequestOptions): APIPromise<TaskGroupRunResponse>;
31
+ addRuns(taskGroupID: string, params: TaskGroupAddRunsParams, options?: RequestOptions): APIPromise<TaskGroupAPI.TaskGroupRunResponse>;
57
32
  /**
58
33
  * Streams events from a TaskGroup: status updates and run completions.
59
34
  *
60
35
  * The connection will remain open for up to an hour as long as at least one run in
61
36
  * the group is still active.
62
37
  *
63
- * @example
64
- * ```ts
65
- * const response = await client.beta.taskGroup.events(
66
- * 'taskgroup_id',
67
- * );
68
- * ```
38
+ * @deprecated Use GA Task Group instead
69
39
  */
70
40
  events(taskGroupID: string, query?: TaskGroupEventsParams | undefined, options?: RequestOptions): APIPromise<Stream<TaskGroupEventsResponse>>;
71
41
  /**
@@ -80,120 +50,23 @@ export declare class TaskGroup extends APIResource {
80
50
  * the stream. The stream will resume from the next event after the
81
51
  * `last_event_id`.
82
52
  *
83
- * @example
84
- * ```ts
85
- * const response = await client.beta.taskGroup.getRuns(
86
- * 'taskgroup_id',
87
- * );
88
- * ```
53
+ * @deprecated Use GA Task Group instead
89
54
  */
90
55
  getRuns(taskGroupID: string, query?: TaskGroupGetRunsParams | undefined, options?: RequestOptions): APIPromise<Stream<TaskGroupGetRunsResponse>>;
91
56
  }
92
- /**
93
- * Response object for a task group, including its status and metadata.
94
- */
95
- export interface TaskGroup {
96
- /**
97
- * Timestamp of the creation of the group, as an RFC 3339 string.
98
- */
99
- created_at: string | null;
100
- /**
101
- * Status of the group.
102
- */
103
- status: TaskGroupStatus;
104
- /**
105
- * ID of the group.
106
- */
107
- taskgroup_id: string;
108
- /**
109
- * User-provided metadata stored with the group.
110
- */
111
- metadata?: {
112
- [key: string]: string | number | boolean;
113
- } | null;
114
- }
115
- /**
116
- * Response from adding new task runs to a task group.
117
- */
118
- export interface TaskGroupRunResponse {
119
- /**
120
- * Cursor for these runs in the event stream at
121
- * taskgroup/events?last_event_id=<event_cursor>. Empty for the first runs in the
122
- * group.
123
- */
124
- event_cursor: string | null;
125
- /**
126
- * Cursor for these runs in the run stream at
127
- * taskgroup/runs?last_event_id=<run_cursor>. Empty for the first runs in the
128
- * group.
129
- */
130
- run_cursor: string | null;
131
- /**
132
- * IDs of the newly created runs.
133
- */
134
- run_ids: Array<string>;
135
- /**
136
- * Status of the group.
137
- */
138
- status: TaskGroupStatus;
139
- }
140
- /**
141
- * Status of a task group.
142
- */
143
- export interface TaskGroupStatus {
144
- /**
145
- * True if at least one run in the group is currently active, i.e. status is one of
146
- * {'cancelling', 'queued', 'running'}.
147
- */
148
- is_active: boolean;
149
- /**
150
- * Timestamp of the last status update to the group, as an RFC 3339 string.
151
- */
152
- modified_at: string | null;
153
- /**
154
- * Number of task runs in the group.
155
- */
156
- num_task_runs: number;
157
- /**
158
- * Human-readable status message for the group.
159
- */
160
- status_message: string | null;
161
- /**
162
- * Number of task runs with each status.
163
- */
164
- task_run_status_counts: {
165
- [key: string]: number;
166
- };
167
- }
168
57
  /**
169
58
  * Event indicating an update to group status.
170
59
  */
171
- export type TaskGroupEventsResponse = TaskGroupEventsResponse.TaskGroupStatusEvent | TaskRunAPI.TaskRunEvent | TaskRunAPI.ErrorEvent;
172
- export declare namespace TaskGroupEventsResponse {
173
- /**
174
- * Event indicating an update to group status.
175
- */
176
- interface TaskGroupStatusEvent {
177
- /**
178
- * Cursor to resume the event stream.
179
- */
180
- event_id: string;
181
- /**
182
- * Task group status object.
183
- */
184
- status: TaskGroupAPI.TaskGroupStatus;
185
- /**
186
- * Event type; always 'task_group_status'.
187
- */
188
- type: 'task_group_status';
189
- }
190
- }
60
+ export type TaskGroupEventsResponse = TaskGroupAPI.TaskGroupStatusEvent | TaskRunAPI.TaskRunEvent | TaskRunAPI.ErrorEvent;
191
61
  /**
192
62
  * Event when a task run transitions to a non-active status.
193
63
  *
194
64
  * May indicate completion, cancellation, or failure.
195
65
  */
196
66
  export type TaskGroupGetRunsResponse = TaskRunAPI.TaskRunEvent | TaskRunAPI.ErrorEvent;
67
+ export type TaskGroupStatus = TaskGroupAPI.TaskGroupStatus;
68
+ export type TaskGroupStatusEvent = TaskGroupAPI.TaskGroupStatusEvent;
69
+ export type TaskGroupRunResponse = TaskGroupAPI.TaskGroupRunResponse;
197
70
  export interface TaskGroupCreateParams {
198
71
  /**
199
72
  * User-provided metadata stored with the task group.
@@ -238,6 +111,12 @@ export interface TaskGroupGetRunsParams {
238
111
  status?: 'queued' | 'action_required' | 'running' | 'completed' | 'failed' | 'cancelling' | 'cancelled' | null;
239
112
  }
240
113
  export declare namespace TaskGroup {
241
- 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, };
114
+ export { type TaskGroupEventsResponse as TaskGroupEventsResponse, type TaskGroupGetRunsResponse as TaskGroupGetRunsResponse, type TaskGroupStatus as TaskGroupStatus, type TaskGroupStatusEvent as TaskGroupStatusEvent, type TaskGroupRunResponse as TaskGroupRunResponse, type TaskGroupCreateParams as TaskGroupCreateParams, type TaskGroupAddRunsParams as TaskGroupAddRunsParams, type TaskGroupEventsParams as TaskGroupEventsParams, type TaskGroupGetRunsParams as TaskGroupGetRunsParams, };
115
+ }
116
+ type _TaskGroupStatusEvent = TaskGroupStatusEvent;
117
+ export declare namespace TaskGroupEventsResponse {
118
+ /** @deprecated Use `Beta.TaskGroupStatusEvent` instead. */
119
+ type TaskGroupStatusEvent = _TaskGroupStatusEvent;
242
120
  }
121
+ export {};
243
122
  //# sourceMappingURL=task-group.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"task-group.d.ts","sourceRoot":"","sources":["../../src/resources/beta/task-group.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,KAAK,UAAU;OACf,KAAK,cAAc;OACnB,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OAEV,EAAE,cAAc,EAAE;AAGzB;;;;;;;;;;GAUG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;OAOG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAQpF;;;;;;;;;OASG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAO9E;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CACL,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oBAAoB,CAAC;IAanC;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,WAAW,EAAE,MAAM,EACnB,KAAK,GAAE,qBAAqB,GAAG,SAAc,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;IAY9C;;;;;;;;;;;;;;;;;;OAkBG;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C,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,MAAM,CAAC,EACH,QAAQ,GACR,iBAAiB,GACjB,SAAS,GACT,WAAW,GACX,QAAQ,GACR,YAAY,GACZ,WAAW,GACX,IAAI,CAAC;CACV;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH;AAKD,KAAK,qBAAqB,GAAG,oBAAoB,CAAC;AAClD,yBAAiB,uBAAuB,CAAC;IACvC,2DAA2D;IAC3D,KAAY,oBAAoB,GAAG,qBAAqB,CAAC;CAC1D"}
@@ -6,24 +6,15 @@ const resource_1 = require("../../core/resource.js");
6
6
  const headers_1 = require("../../internal/headers.js");
7
7
  const path_1 = require("../../internal/utils/path.js");
8
8
  /**
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
- * - Output metadata: citations, excerpts, reasoning, and confidence per field
9
+ * Tasks (Beta)
11
10
  *
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
11
+ * @deprecated Use GA Task Group instead
18
12
  */
19
13
  class TaskGroup extends resource_1.APIResource {
20
14
  /**
21
15
  * Initiates a TaskGroup to group and track multiple runs.
22
16
  *
23
- * @example
24
- * ```ts
25
- * const taskGroup = await client.beta.taskGroup.create();
26
- * ```
17
+ * @deprecated Use GA Task Group instead
27
18
  */
28
19
  create(body, options) {
29
20
  return this._client.post('/v1beta/tasks/groups', {
@@ -35,12 +26,7 @@ class TaskGroup extends resource_1.APIResource {
35
26
  /**
36
27
  * Retrieves aggregated status across runs in a TaskGroup.
37
28
  *
38
- * @example
39
- * ```ts
40
- * const taskGroup = await client.beta.taskGroup.retrieve(
41
- * 'taskgroup_id',
42
- * );
43
- * ```
29
+ * @deprecated Use GA Task Group instead
44
30
  */
45
31
  retrieve(taskGroupID, options) {
46
32
  return this._client.get((0, path_1.path) `/v1beta/tasks/groups/${taskGroupID}`, {
@@ -51,18 +37,7 @@ class TaskGroup extends resource_1.APIResource {
51
37
  /**
52
38
  * Initiates multiple task runs within a TaskGroup.
53
39
  *
54
- * @example
55
- * ```ts
56
- * const taskGroupRunResponse =
57
- * await client.beta.taskGroup.addRuns('taskgroup_id', {
58
- * inputs: [
59
- * {
60
- * input: 'What was the GDP of France in 2023?',
61
- * processor: 'base',
62
- * },
63
- * ],
64
- * });
65
- * ```
40
+ * @deprecated Use GA Task Group instead
66
41
  */
67
42
  addRuns(taskGroupID, params, options) {
68
43
  const { refresh_status, betas, ...body } = params;
@@ -82,12 +57,7 @@ class TaskGroup extends resource_1.APIResource {
82
57
  * The connection will remain open for up to an hour as long as at least one run in
83
58
  * the group is still active.
84
59
  *
85
- * @example
86
- * ```ts
87
- * const response = await client.beta.taskGroup.events(
88
- * 'taskgroup_id',
89
- * );
90
- * ```
60
+ * @deprecated Use GA Task Group instead
91
61
  */
92
62
  events(taskGroupID, query = {}, options) {
93
63
  return this._client.get((0, path_1.path) `/v1beta/tasks/groups/${taskGroupID}/events`, {
@@ -112,12 +82,7 @@ class TaskGroup extends resource_1.APIResource {
112
82
  * the stream. The stream will resume from the next event after the
113
83
  * `last_event_id`.
114
84
  *
115
- * @example
116
- * ```ts
117
- * const response = await client.beta.taskGroup.getRuns(
118
- * 'taskgroup_id',
119
- * );
120
- * ```
85
+ * @deprecated Use GA Task Group instead
121
86
  */
122
87
  getRuns(taskGroupID, query = {}, options) {
123
88
  return this._client.get((0, path_1.path) `/v1beta/tasks/groups/${taskGroupID}/runs`, {
@@ -1 +1 @@
1
- {"version":3,"file":"task-group.js","sourceRoot":"","sources":["../../src/resources/beta/task-group.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAMlD,uDAAsD;AAEtD,uDAAiD;AAEjD;;;;;;;;;;GAUG;AACH,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;OAOG;IACH,MAAM,CAAC,IAA2B,EAAE,OAAwB;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE;YAC/C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,eAAe,EAAE,2BAA2B,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC5F,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,WAAmB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,wBAAwB,WAAW,EAAE,EAAE;YACjE,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,eAAe,EAAE,2BAA2B,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC5F,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CACL,WAAmB,EACnB,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClD,OAAO,IAAI,CAAC,OAAO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;IAED;;;;;;;OAOG;IACH,MAAM,CACJ,WAAmB,EACnB,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,wBAAwB,WAAW,SAAS,EAAE;YACxE,KAAK;YACL,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,CAAgD,CAAC;IACpD,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,OAAO,CACL,WAAmB,EACnB,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,wBAAwB,WAAW,OAAO,EAAE;YACtE,KAAK;YACL,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,CAAiD,CAAC;IACrD,CAAC;CACF;AArGD,8BAqGC"}
@@ -3,24 +3,15 @@ import { APIResource } from "../../core/resource.mjs";
3
3
  import { buildHeaders } from "../../internal/headers.mjs";
4
4
  import { path } from "../../internal/utils/path.mjs";
5
5
  /**
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
- * - Output metadata: citations, excerpts, reasoning, and confidence per field
6
+ * Tasks (Beta)
8
7
  *
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
8
+ * @deprecated Use GA Task Group instead
15
9
  */
16
10
  export class TaskGroup extends APIResource {
17
11
  /**
18
12
  * Initiates a TaskGroup to group and track multiple runs.
19
13
  *
20
- * @example
21
- * ```ts
22
- * const taskGroup = await client.beta.taskGroup.create();
23
- * ```
14
+ * @deprecated Use GA Task Group instead
24
15
  */
25
16
  create(body, options) {
26
17
  return this._client.post('/v1beta/tasks/groups', {
@@ -32,12 +23,7 @@ export class TaskGroup extends APIResource {
32
23
  /**
33
24
  * Retrieves aggregated status across runs in a TaskGroup.
34
25
  *
35
- * @example
36
- * ```ts
37
- * const taskGroup = await client.beta.taskGroup.retrieve(
38
- * 'taskgroup_id',
39
- * );
40
- * ```
26
+ * @deprecated Use GA Task Group instead
41
27
  */
42
28
  retrieve(taskGroupID, options) {
43
29
  return this._client.get(path `/v1beta/tasks/groups/${taskGroupID}`, {
@@ -48,18 +34,7 @@ export class TaskGroup extends APIResource {
48
34
  /**
49
35
  * Initiates multiple task runs within a TaskGroup.
50
36
  *
51
- * @example
52
- * ```ts
53
- * const taskGroupRunResponse =
54
- * await client.beta.taskGroup.addRuns('taskgroup_id', {
55
- * inputs: [
56
- * {
57
- * input: 'What was the GDP of France in 2023?',
58
- * processor: 'base',
59
- * },
60
- * ],
61
- * });
62
- * ```
37
+ * @deprecated Use GA Task Group instead
63
38
  */
64
39
  addRuns(taskGroupID, params, options) {
65
40
  const { refresh_status, betas, ...body } = params;
@@ -79,12 +54,7 @@ export class TaskGroup extends APIResource {
79
54
  * The connection will remain open for up to an hour as long as at least one run in
80
55
  * the group is still active.
81
56
  *
82
- * @example
83
- * ```ts
84
- * const response = await client.beta.taskGroup.events(
85
- * 'taskgroup_id',
86
- * );
87
- * ```
57
+ * @deprecated Use GA Task Group instead
88
58
  */
89
59
  events(taskGroupID, query = {}, options) {
90
60
  return this._client.get(path `/v1beta/tasks/groups/${taskGroupID}/events`, {
@@ -109,12 +79,7 @@ export class TaskGroup extends APIResource {
109
79
  * the stream. The stream will resume from the next event after the
110
80
  * `last_event_id`.
111
81
  *
112
- * @example
113
- * ```ts
114
- * const response = await client.beta.taskGroup.getRuns(
115
- * 'taskgroup_id',
116
- * );
117
- * ```
82
+ * @deprecated Use GA Task Group instead
118
83
  */
119
84
  getRuns(taskGroupID, query = {}, options) {
120
85
  return this._client.get(path `/v1beta/tasks/groups/${taskGroupID}/runs`, {