parallel-web 0.5.0 → 1.0.1
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 +36 -0
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts.map +1 -1
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/streaming.d.mts.map +1 -1
- package/core/streaming.d.ts.map +1 -1
- package/core/streaming.mjs.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/decoders/line.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts.map +1 -1
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/index.d.mts +2 -2
- package/internal/qs/index.d.mts.map +1 -1
- package/internal/qs/index.d.ts +2 -2
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/index.mjs.map +1 -1
- package/internal/qs/stringify.d.mts.map +1 -1
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/utils.d.mts.map +1 -1
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +4 -4
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +4 -4
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +3 -2
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +3 -2
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/package.json +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/beta/beta.d.mts +2 -262
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +2 -262
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +0 -41
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +0 -41
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/findall.d.mts +76 -155
- package/resources/beta/findall.d.mts.map +1 -1
- package/resources/beta/findall.d.ts +76 -155
- package/resources/beta/findall.d.ts.map +1 -1
- package/resources/beta/findall.js +27 -33
- package/resources/beta/findall.js.map +1 -1
- package/resources/beta/findall.mjs +26 -31
- package/resources/beta/findall.mjs.map +1 -1
- package/resources/beta/index.d.mts +1 -3
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +1 -3
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js +1 -6
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs +1 -3
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta.d.mts.map +1 -1
- package/resources/beta.d.ts.map +1 -1
- package/resources/beta.mjs.map +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/monitor.d.mts.map +1 -1
- package/resources/monitor.d.ts.map +1 -1
- package/resources/monitor.mjs.map +1 -1
- package/resources/task-group.d.mts +2 -2
- package/resources/task-group.d.mts.map +1 -1
- package/resources/task-group.d.ts +2 -2
- package/resources/task-group.d.ts.map +1 -1
- package/resources/task-group.mjs.map +1 -1
- package/resources/task-run.d.mts +3 -26
- package/resources/task-run.d.mts.map +1 -1
- package/resources/task-run.d.ts +3 -26
- package/resources/task-run.d.ts.map +1 -1
- package/resources/task-run.mjs.map +1 -1
- package/resources/top-level.d.mts +1 -7
- package/resources/top-level.d.mts.map +1 -1
- package/resources/top-level.d.ts +1 -7
- package/resources/top-level.d.ts.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/internal/utils/log.ts +2 -1
- package/src/resources/beta/api.md +4 -58
- package/src/resources/beta/beta.ts +8 -404
- package/src/resources/beta/findall.ts +102 -201
- package/src/resources/beta/index.ts +4 -50
- package/src/resources/task-group.ts +2 -2
- package/src/resources/task-run.ts +3 -30
- package/src/resources/top-level.ts +1 -10
- package/src/version.ts +1 -1
- package/streaming.d.mts +1 -0
- package/streaming.d.mts.map +1 -1
- package/streaming.d.ts +1 -0
- package/streaming.d.ts.map +1 -1
- package/streaming.mjs +1 -0
- package/streaming.mjs.map +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +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/resources/beta/task-group.d.mts +0 -122
- package/resources/beta/task-group.d.mts.map +0 -1
- package/resources/beta/task-group.d.ts +0 -122
- package/resources/beta/task-group.d.ts.map +0 -1
- package/resources/beta/task-group.js +0 -100
- package/resources/beta/task-group.js.map +0 -1
- package/resources/beta/task-group.mjs +0 -96
- package/resources/beta/task-group.mjs.map +0 -1
- package/resources/beta/task-run.d.mts +0 -191
- package/resources/beta/task-run.d.mts.map +0 -1
- package/resources/beta/task-run.d.ts +0 -191
- package/resources/beta/task-run.d.ts.map +0 -1
- package/resources/beta/task-run.js +0 -81
- package/resources/beta/task-run.js.map +0 -1
- package/resources/beta/task-run.mjs +0 -77
- package/resources/beta/task-run.mjs.map +0 -1
- package/src/resources/beta/task-group.ts +0 -223
- package/src/resources/beta/task-run.ts +0 -276
package/uploads.d.ts
CHANGED
package/uploads.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,kCAA+B"}
|
package/uploads.mjs
CHANGED
package/uploads.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,mCAA+B"}
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "1.0.1";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "1.0.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '1.0.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
-
import * as TaskGroupAPI from "../task-group.mjs";
|
|
3
|
-
import * as TaskRunAPI from "../task-run.mjs";
|
|
4
|
-
import * as BetaTaskRunAPI from "./task-run.mjs";
|
|
5
|
-
import { APIPromise } from "../../core/api-promise.mjs";
|
|
6
|
-
import { Stream } from "../../core/streaming.mjs";
|
|
7
|
-
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
8
|
-
/**
|
|
9
|
-
* Tasks (Beta)
|
|
10
|
-
*
|
|
11
|
-
* @deprecated Use GA Task Group instead
|
|
12
|
-
*/
|
|
13
|
-
export declare class TaskGroup extends APIResource {
|
|
14
|
-
/**
|
|
15
|
-
* Initiates a TaskGroup to group and track multiple runs.
|
|
16
|
-
*
|
|
17
|
-
* @deprecated Use GA Task Group instead
|
|
18
|
-
*/
|
|
19
|
-
create(body: TaskGroupCreateParams, options?: RequestOptions): APIPromise<TaskGroupAPI.TaskGroup>;
|
|
20
|
-
/**
|
|
21
|
-
* Retrieves aggregated status across runs in a TaskGroup.
|
|
22
|
-
*
|
|
23
|
-
* @deprecated Use GA Task Group instead
|
|
24
|
-
*/
|
|
25
|
-
retrieve(taskGroupID: string, options?: RequestOptions): APIPromise<TaskGroupAPI.TaskGroup>;
|
|
26
|
-
/**
|
|
27
|
-
* Initiates multiple task runs within a TaskGroup.
|
|
28
|
-
*
|
|
29
|
-
* @deprecated Use GA Task Group instead
|
|
30
|
-
*/
|
|
31
|
-
addRuns(taskGroupID: string, params: TaskGroupAddRunsParams, options?: RequestOptions): APIPromise<TaskGroupAPI.TaskGroupRunResponse>;
|
|
32
|
-
/**
|
|
33
|
-
* Streams events from a TaskGroup: status updates and run completions.
|
|
34
|
-
*
|
|
35
|
-
* The connection will remain open for up to an hour as long as at least one run in
|
|
36
|
-
* the group is still active.
|
|
37
|
-
*
|
|
38
|
-
* @deprecated Use GA Task Group instead
|
|
39
|
-
*/
|
|
40
|
-
events(taskGroupID: string, query?: TaskGroupEventsParams | undefined, options?: RequestOptions): APIPromise<Stream<TaskGroupEventsResponse>>;
|
|
41
|
-
/**
|
|
42
|
-
* Retrieves task runs in a TaskGroup and optionally their inputs and outputs.
|
|
43
|
-
*
|
|
44
|
-
* All runs within a TaskGroup are returned as a stream. To get the inputs and/or
|
|
45
|
-
* outputs back in the stream, set the corresponding `include_input` and
|
|
46
|
-
* `include_output` parameters to `true`.
|
|
47
|
-
*
|
|
48
|
-
* The stream is resumable using the `event_id` as the cursor. To resume a stream,
|
|
49
|
-
* specify the `last_event_id` parameter with the `event_id` of the last event in
|
|
50
|
-
* the stream. The stream will resume from the next event after the
|
|
51
|
-
* `last_event_id`.
|
|
52
|
-
*
|
|
53
|
-
* @deprecated Use GA Task Group instead
|
|
54
|
-
*/
|
|
55
|
-
getRuns(taskGroupID: string, query?: TaskGroupGetRunsParams | undefined, options?: RequestOptions): APIPromise<Stream<TaskGroupGetRunsResponse>>;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Event indicating an update to group status.
|
|
59
|
-
*/
|
|
60
|
-
export type TaskGroupEventsResponse = TaskGroupAPI.TaskGroupStatusEvent | TaskRunAPI.TaskRunEvent | TaskRunAPI.ErrorEvent;
|
|
61
|
-
/**
|
|
62
|
-
* Event when a task run transitions to a non-active status.
|
|
63
|
-
*
|
|
64
|
-
* May indicate completion, cancellation, or failure.
|
|
65
|
-
*/
|
|
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;
|
|
70
|
-
export interface TaskGroupCreateParams {
|
|
71
|
-
/**
|
|
72
|
-
* User-provided metadata stored with the task group.
|
|
73
|
-
*/
|
|
74
|
-
metadata?: {
|
|
75
|
-
[key: string]: string | number | boolean;
|
|
76
|
-
} | null;
|
|
77
|
-
}
|
|
78
|
-
export interface TaskGroupAddRunsParams {
|
|
79
|
-
/**
|
|
80
|
-
* Body param: List of task runs to execute. Up to 1,000 runs can be specified per
|
|
81
|
-
* request. If you'd like to add more runs, split them across multiple TaskGroup
|
|
82
|
-
* POST requests.
|
|
83
|
-
*/
|
|
84
|
-
inputs: Array<TaskRunAPI.RunInput>;
|
|
85
|
-
/**
|
|
86
|
-
* Query param
|
|
87
|
-
*/
|
|
88
|
-
refresh_status?: boolean;
|
|
89
|
-
/**
|
|
90
|
-
* Body param: Specification for a task.
|
|
91
|
-
*
|
|
92
|
-
* Auto output schemas can be specified by setting `output_schema={"type":"auto"}`.
|
|
93
|
-
* Not specifying a TaskSpec is the same as setting an auto output schema.
|
|
94
|
-
*
|
|
95
|
-
* For convenience bare strings are also accepted as input or output schemas.
|
|
96
|
-
*/
|
|
97
|
-
default_task_spec?: TaskRunAPI.TaskSpec | null;
|
|
98
|
-
/**
|
|
99
|
-
* Header param: Optional header to specify the beta version(s) to enable.
|
|
100
|
-
*/
|
|
101
|
-
betas?: Array<BetaTaskRunAPI.ParallelBeta>;
|
|
102
|
-
}
|
|
103
|
-
export interface TaskGroupEventsParams {
|
|
104
|
-
last_event_id?: string | null;
|
|
105
|
-
timeout?: number | null;
|
|
106
|
-
}
|
|
107
|
-
export interface TaskGroupGetRunsParams {
|
|
108
|
-
include_input?: boolean;
|
|
109
|
-
include_output?: boolean;
|
|
110
|
-
last_event_id?: string | null;
|
|
111
|
-
status?: 'queued' | 'action_required' | 'running' | 'completed' | 'failed' | 'cancelling' | 'cancelled' | null;
|
|
112
|
-
}
|
|
113
|
-
export declare namespace TaskGroup {
|
|
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;
|
|
120
|
-
}
|
|
121
|
-
export {};
|
|
122
|
-
//# sourceMappingURL=task-group.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,cAAc,EAAE;AAGzB;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,W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;AAClD,yBAAiB,uBAAuB,CAAC;IACvC,2DAA2D;IAC3D,KAAY,oBAAoB,GAAG,qBAAqB,CAAC;CAC1D"}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../core/resource.js";
|
|
2
|
-
import * as TaskGroupAPI from "../task-group.js";
|
|
3
|
-
import * as TaskRunAPI from "../task-run.js";
|
|
4
|
-
import * as BetaTaskRunAPI from "./task-run.js";
|
|
5
|
-
import { APIPromise } from "../../core/api-promise.js";
|
|
6
|
-
import { Stream } from "../../core/streaming.js";
|
|
7
|
-
import { RequestOptions } from "../../internal/request-options.js";
|
|
8
|
-
/**
|
|
9
|
-
* Tasks (Beta)
|
|
10
|
-
*
|
|
11
|
-
* @deprecated Use GA Task Group instead
|
|
12
|
-
*/
|
|
13
|
-
export declare class TaskGroup extends APIResource {
|
|
14
|
-
/**
|
|
15
|
-
* Initiates a TaskGroup to group and track multiple runs.
|
|
16
|
-
*
|
|
17
|
-
* @deprecated Use GA Task Group instead
|
|
18
|
-
*/
|
|
19
|
-
create(body: TaskGroupCreateParams, options?: RequestOptions): APIPromise<TaskGroupAPI.TaskGroup>;
|
|
20
|
-
/**
|
|
21
|
-
* Retrieves aggregated status across runs in a TaskGroup.
|
|
22
|
-
*
|
|
23
|
-
* @deprecated Use GA Task Group instead
|
|
24
|
-
*/
|
|
25
|
-
retrieve(taskGroupID: string, options?: RequestOptions): APIPromise<TaskGroupAPI.TaskGroup>;
|
|
26
|
-
/**
|
|
27
|
-
* Initiates multiple task runs within a TaskGroup.
|
|
28
|
-
*
|
|
29
|
-
* @deprecated Use GA Task Group instead
|
|
30
|
-
*/
|
|
31
|
-
addRuns(taskGroupID: string, params: TaskGroupAddRunsParams, options?: RequestOptions): APIPromise<TaskGroupAPI.TaskGroupRunResponse>;
|
|
32
|
-
/**
|
|
33
|
-
* Streams events from a TaskGroup: status updates and run completions.
|
|
34
|
-
*
|
|
35
|
-
* The connection will remain open for up to an hour as long as at least one run in
|
|
36
|
-
* the group is still active.
|
|
37
|
-
*
|
|
38
|
-
* @deprecated Use GA Task Group instead
|
|
39
|
-
*/
|
|
40
|
-
events(taskGroupID: string, query?: TaskGroupEventsParams | undefined, options?: RequestOptions): APIPromise<Stream<TaskGroupEventsResponse>>;
|
|
41
|
-
/**
|
|
42
|
-
* Retrieves task runs in a TaskGroup and optionally their inputs and outputs.
|
|
43
|
-
*
|
|
44
|
-
* All runs within a TaskGroup are returned as a stream. To get the inputs and/or
|
|
45
|
-
* outputs back in the stream, set the corresponding `include_input` and
|
|
46
|
-
* `include_output` parameters to `true`.
|
|
47
|
-
*
|
|
48
|
-
* The stream is resumable using the `event_id` as the cursor. To resume a stream,
|
|
49
|
-
* specify the `last_event_id` parameter with the `event_id` of the last event in
|
|
50
|
-
* the stream. The stream will resume from the next event after the
|
|
51
|
-
* `last_event_id`.
|
|
52
|
-
*
|
|
53
|
-
* @deprecated Use GA Task Group instead
|
|
54
|
-
*/
|
|
55
|
-
getRuns(taskGroupID: string, query?: TaskGroupGetRunsParams | undefined, options?: RequestOptions): APIPromise<Stream<TaskGroupGetRunsResponse>>;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Event indicating an update to group status.
|
|
59
|
-
*/
|
|
60
|
-
export type TaskGroupEventsResponse = TaskGroupAPI.TaskGroupStatusEvent | TaskRunAPI.TaskRunEvent | TaskRunAPI.ErrorEvent;
|
|
61
|
-
/**
|
|
62
|
-
* Event when a task run transitions to a non-active status.
|
|
63
|
-
*
|
|
64
|
-
* May indicate completion, cancellation, or failure.
|
|
65
|
-
*/
|
|
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;
|
|
70
|
-
export interface TaskGroupCreateParams {
|
|
71
|
-
/**
|
|
72
|
-
* User-provided metadata stored with the task group.
|
|
73
|
-
*/
|
|
74
|
-
metadata?: {
|
|
75
|
-
[key: string]: string | number | boolean;
|
|
76
|
-
} | null;
|
|
77
|
-
}
|
|
78
|
-
export interface TaskGroupAddRunsParams {
|
|
79
|
-
/**
|
|
80
|
-
* Body param: List of task runs to execute. Up to 1,000 runs can be specified per
|
|
81
|
-
* request. If you'd like to add more runs, split them across multiple TaskGroup
|
|
82
|
-
* POST requests.
|
|
83
|
-
*/
|
|
84
|
-
inputs: Array<TaskRunAPI.RunInput>;
|
|
85
|
-
/**
|
|
86
|
-
* Query param
|
|
87
|
-
*/
|
|
88
|
-
refresh_status?: boolean;
|
|
89
|
-
/**
|
|
90
|
-
* Body param: Specification for a task.
|
|
91
|
-
*
|
|
92
|
-
* Auto output schemas can be specified by setting `output_schema={"type":"auto"}`.
|
|
93
|
-
* Not specifying a TaskSpec is the same as setting an auto output schema.
|
|
94
|
-
*
|
|
95
|
-
* For convenience bare strings are also accepted as input or output schemas.
|
|
96
|
-
*/
|
|
97
|
-
default_task_spec?: TaskRunAPI.TaskSpec | null;
|
|
98
|
-
/**
|
|
99
|
-
* Header param: Optional header to specify the beta version(s) to enable.
|
|
100
|
-
*/
|
|
101
|
-
betas?: Array<BetaTaskRunAPI.ParallelBeta>;
|
|
102
|
-
}
|
|
103
|
-
export interface TaskGroupEventsParams {
|
|
104
|
-
last_event_id?: string | null;
|
|
105
|
-
timeout?: number | null;
|
|
106
|
-
}
|
|
107
|
-
export interface TaskGroupGetRunsParams {
|
|
108
|
-
include_input?: boolean;
|
|
109
|
-
include_output?: boolean;
|
|
110
|
-
last_event_id?: string | null;
|
|
111
|
-
status?: 'queued' | 'action_required' | 'running' | 'completed' | 'failed' | 'cancelling' | 'cancelled' | null;
|
|
112
|
-
}
|
|
113
|
-
export declare namespace TaskGroup {
|
|
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;
|
|
120
|
-
}
|
|
121
|
-
export {};
|
|
122
|
-
//# sourceMappingURL=task-group.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC,SAAS,CAAC;IAQjG;;;;OAIG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC,SAAS,CAAC;IAO3F;;;;OAIG;IACH,OAAO,CACL,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,YAAY,CAAC,oBAAoB,CAAC;I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AC5C;AAED,MAAM,WAAW,qBAAqB;IACpC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,sBAAsB;IACrC,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,aAAa,CAAC,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"}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.TaskGroup = void 0;
|
|
5
|
-
const resource_1 = require("../../core/resource.js");
|
|
6
|
-
const headers_1 = require("../../internal/headers.js");
|
|
7
|
-
const path_1 = require("../../internal/utils/path.js");
|
|
8
|
-
/**
|
|
9
|
-
* Tasks (Beta)
|
|
10
|
-
*
|
|
11
|
-
* @deprecated Use GA Task Group instead
|
|
12
|
-
*/
|
|
13
|
-
class TaskGroup extends resource_1.APIResource {
|
|
14
|
-
/**
|
|
15
|
-
* Initiates a TaskGroup to group and track multiple runs.
|
|
16
|
-
*
|
|
17
|
-
* @deprecated Use GA Task Group instead
|
|
18
|
-
*/
|
|
19
|
-
create(body, options) {
|
|
20
|
-
return this._client.post('/v1beta/tasks/groups', {
|
|
21
|
-
body,
|
|
22
|
-
...options,
|
|
23
|
-
headers: (0, headers_1.buildHeaders)([{ 'parallel-beta': 'search-extract-2025-10-10' }, options?.headers]),
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Retrieves aggregated status across runs in a TaskGroup.
|
|
28
|
-
*
|
|
29
|
-
* @deprecated Use GA Task Group instead
|
|
30
|
-
*/
|
|
31
|
-
retrieve(taskGroupID, options) {
|
|
32
|
-
return this._client.get((0, path_1.path) `/v1beta/tasks/groups/${taskGroupID}`, {
|
|
33
|
-
...options,
|
|
34
|
-
headers: (0, headers_1.buildHeaders)([{ 'parallel-beta': 'search-extract-2025-10-10' }, options?.headers]),
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Initiates multiple task runs within a TaskGroup.
|
|
39
|
-
*
|
|
40
|
-
* @deprecated Use GA Task Group instead
|
|
41
|
-
*/
|
|
42
|
-
addRuns(taskGroupID, params, options) {
|
|
43
|
-
const { refresh_status, betas, ...body } = params;
|
|
44
|
-
return this._client.post((0, path_1.path) `/v1beta/tasks/groups/${taskGroupID}/runs`, {
|
|
45
|
-
query: { refresh_status },
|
|
46
|
-
body,
|
|
47
|
-
...options,
|
|
48
|
-
headers: (0, headers_1.buildHeaders)([
|
|
49
|
-
{ 'parallel-beta': [...(betas ?? []), 'search-extract-2025-10-10'].toString() },
|
|
50
|
-
options?.headers,
|
|
51
|
-
]),
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Streams events from a TaskGroup: status updates and run completions.
|
|
56
|
-
*
|
|
57
|
-
* The connection will remain open for up to an hour as long as at least one run in
|
|
58
|
-
* the group is still active.
|
|
59
|
-
*
|
|
60
|
-
* @deprecated Use GA Task Group instead
|
|
61
|
-
*/
|
|
62
|
-
events(taskGroupID, query = {}, options) {
|
|
63
|
-
return this._client.get((0, path_1.path) `/v1beta/tasks/groups/${taskGroupID}/events`, {
|
|
64
|
-
query,
|
|
65
|
-
...options,
|
|
66
|
-
headers: (0, headers_1.buildHeaders)([
|
|
67
|
-
{ 'parallel-beta': 'search-extract-2025-10-10', Accept: 'text/event-stream' },
|
|
68
|
-
options?.headers,
|
|
69
|
-
]),
|
|
70
|
-
stream: true,
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Retrieves task runs in a TaskGroup and optionally their inputs and outputs.
|
|
75
|
-
*
|
|
76
|
-
* All runs within a TaskGroup are returned as a stream. To get the inputs and/or
|
|
77
|
-
* outputs back in the stream, set the corresponding `include_input` and
|
|
78
|
-
* `include_output` parameters to `true`.
|
|
79
|
-
*
|
|
80
|
-
* The stream is resumable using the `event_id` as the cursor. To resume a stream,
|
|
81
|
-
* specify the `last_event_id` parameter with the `event_id` of the last event in
|
|
82
|
-
* the stream. The stream will resume from the next event after the
|
|
83
|
-
* `last_event_id`.
|
|
84
|
-
*
|
|
85
|
-
* @deprecated Use GA Task Group instead
|
|
86
|
-
*/
|
|
87
|
-
getRuns(taskGroupID, query = {}, options) {
|
|
88
|
-
return this._client.get((0, path_1.path) `/v1beta/tasks/groups/${taskGroupID}/runs`, {
|
|
89
|
-
query,
|
|
90
|
-
...options,
|
|
91
|
-
headers: (0, headers_1.buildHeaders)([
|
|
92
|
-
{ 'parallel-beta': 'search-extract-2025-10-10', Accept: 'text/event-stream' },
|
|
93
|
-
options?.headers,
|
|
94
|
-
]),
|
|
95
|
-
stream: true,
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
exports.TaskGroup = TaskGroup;
|
|
100
|
-
//# sourceMappingURL=task-group.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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;;;;GAIG;AACH,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;OAIG;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;;;;OAIG;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;;;;OAIG;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,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,wBAAwB,WAAW,OAAO,EAAE;YACvE,KAAK,EAAE,EAAE,cAAc,EAAE;YACzB,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;;;;;;;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"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
-
import { buildHeaders } from "../../internal/headers.mjs";
|
|
4
|
-
import { path } from "../../internal/utils/path.mjs";
|
|
5
|
-
/**
|
|
6
|
-
* Tasks (Beta)
|
|
7
|
-
*
|
|
8
|
-
* @deprecated Use GA Task Group instead
|
|
9
|
-
*/
|
|
10
|
-
export class TaskGroup extends APIResource {
|
|
11
|
-
/**
|
|
12
|
-
* Initiates a TaskGroup to group and track multiple runs.
|
|
13
|
-
*
|
|
14
|
-
* @deprecated Use GA Task Group instead
|
|
15
|
-
*/
|
|
16
|
-
create(body, options) {
|
|
17
|
-
return this._client.post('/v1beta/tasks/groups', {
|
|
18
|
-
body,
|
|
19
|
-
...options,
|
|
20
|
-
headers: buildHeaders([{ 'parallel-beta': 'search-extract-2025-10-10' }, options?.headers]),
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Retrieves aggregated status across runs in a TaskGroup.
|
|
25
|
-
*
|
|
26
|
-
* @deprecated Use GA Task Group instead
|
|
27
|
-
*/
|
|
28
|
-
retrieve(taskGroupID, options) {
|
|
29
|
-
return this._client.get(path `/v1beta/tasks/groups/${taskGroupID}`, {
|
|
30
|
-
...options,
|
|
31
|
-
headers: buildHeaders([{ 'parallel-beta': 'search-extract-2025-10-10' }, options?.headers]),
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Initiates multiple task runs within a TaskGroup.
|
|
36
|
-
*
|
|
37
|
-
* @deprecated Use GA Task Group instead
|
|
38
|
-
*/
|
|
39
|
-
addRuns(taskGroupID, params, options) {
|
|
40
|
-
const { refresh_status, betas, ...body } = params;
|
|
41
|
-
return this._client.post(path `/v1beta/tasks/groups/${taskGroupID}/runs`, {
|
|
42
|
-
query: { refresh_status },
|
|
43
|
-
body,
|
|
44
|
-
...options,
|
|
45
|
-
headers: buildHeaders([
|
|
46
|
-
{ 'parallel-beta': [...(betas ?? []), 'search-extract-2025-10-10'].toString() },
|
|
47
|
-
options?.headers,
|
|
48
|
-
]),
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Streams events from a TaskGroup: status updates and run completions.
|
|
53
|
-
*
|
|
54
|
-
* The connection will remain open for up to an hour as long as at least one run in
|
|
55
|
-
* the group is still active.
|
|
56
|
-
*
|
|
57
|
-
* @deprecated Use GA Task Group instead
|
|
58
|
-
*/
|
|
59
|
-
events(taskGroupID, query = {}, options) {
|
|
60
|
-
return this._client.get(path `/v1beta/tasks/groups/${taskGroupID}/events`, {
|
|
61
|
-
query,
|
|
62
|
-
...options,
|
|
63
|
-
headers: buildHeaders([
|
|
64
|
-
{ 'parallel-beta': 'search-extract-2025-10-10', Accept: 'text/event-stream' },
|
|
65
|
-
options?.headers,
|
|
66
|
-
]),
|
|
67
|
-
stream: true,
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Retrieves task runs in a TaskGroup and optionally their inputs and outputs.
|
|
72
|
-
*
|
|
73
|
-
* All runs within a TaskGroup are returned as a stream. To get the inputs and/or
|
|
74
|
-
* outputs back in the stream, set the corresponding `include_input` and
|
|
75
|
-
* `include_output` parameters to `true`.
|
|
76
|
-
*
|
|
77
|
-
* The stream is resumable using the `event_id` as the cursor. To resume a stream,
|
|
78
|
-
* specify the `last_event_id` parameter with the `event_id` of the last event in
|
|
79
|
-
* the stream. The stream will resume from the next event after the
|
|
80
|
-
* `last_event_id`.
|
|
81
|
-
*
|
|
82
|
-
* @deprecated Use GA Task Group instead
|
|
83
|
-
*/
|
|
84
|
-
getRuns(taskGroupID, query = {}, options) {
|
|
85
|
-
return this._client.get(path `/v1beta/tasks/groups/${taskGroupID}/runs`, {
|
|
86
|
-
query,
|
|
87
|
-
...options,
|
|
88
|
-
headers: buildHeaders([
|
|
89
|
-
{ 'parallel-beta': 'search-extract-2025-10-10', Accept: 'text/event-stream' },
|
|
90
|
-
options?.headers,
|
|
91
|
-
]),
|
|
92
|
-
stream: true,
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
//# sourceMappingURL=task-group.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"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