@nimble-way/nimble-js 0.19.0 → 1.0.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 +20 -0
- package/README.md +10 -10
- package/client.d.mts +10 -39
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -39
- package/client.d.ts.map +1 -1
- package/client.js +8 -43
- package/client.js.map +1 -1
- package/client.mjs +8 -43
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +811 -0
- package/resources/agents/agents.d.mts.map +1 -0
- package/resources/agents/agents.d.ts +811 -0
- package/resources/agents/agents.d.ts.map +1 -0
- package/resources/agents/agents.js +67 -0
- package/resources/agents/agents.js.map +1 -0
- package/resources/agents/agents.mjs +62 -0
- package/resources/agents/agents.mjs.map +1 -0
- package/resources/agents/index.d.mts +4 -0
- package/resources/agents/index.d.mts.map +1 -0
- package/resources/agents/index.d.ts +4 -0
- package/resources/agents/index.d.ts.map +1 -0
- package/resources/{task-agent → agents}/index.js +3 -3
- package/resources/agents/index.js.map +1 -0
- package/resources/{task-agent → agents}/index.mjs +1 -1
- package/resources/agents/index.mjs.map +1 -0
- package/resources/{task-agent → agents}/runs.d.mts +413 -128
- package/resources/agents/runs.d.mts.map +1 -0
- package/resources/{task-agent → agents}/runs.d.ts +413 -128
- package/resources/agents/runs.d.ts.map +1 -0
- package/resources/agents/runs.js +63 -0
- package/resources/agents/runs.js.map +1 -0
- package/resources/agents/runs.mjs +59 -0
- package/resources/agents/runs.mjs.map +1 -0
- package/resources/agents/templates.d.mts +258 -0
- package/resources/agents/templates.d.mts.map +1 -0
- package/resources/agents/templates.d.ts +258 -0
- package/resources/agents/templates.d.ts.map +1 -0
- package/resources/{task-agent → agents}/templates.js +5 -4
- package/resources/agents/templates.js.map +1 -0
- package/resources/agents/templates.mjs +19 -0
- package/resources/agents/templates.mjs.map +1 -0
- package/resources/agents.d.mts +2 -0
- package/resources/agents.d.mts.map +1 -0
- package/resources/agents.d.ts +2 -0
- package/resources/agents.d.ts.map +1 -0
- package/resources/{task-agent.js → agents.js} +2 -2
- package/resources/agents.js.map +1 -0
- package/resources/{task-agent.mjs → agents.mjs} +2 -2
- package/resources/agents.mjs.map +1 -0
- package/resources/batches.js +3 -3
- package/resources/batches.mjs +3 -3
- package/resources/crawl.js +4 -4
- package/resources/crawl.mjs +4 -4
- package/resources/domain-knowledge.js +1 -1
- package/resources/domain-knowledge.mjs +1 -1
- package/resources/extract/extract.d.mts +1243 -0
- package/resources/extract/extract.d.mts.map +1 -0
- package/resources/extract/extract.d.ts +1243 -0
- package/resources/extract/extract.d.ts.map +1 -0
- package/resources/extract/extract.js +52 -0
- package/resources/extract/extract.js.map +1 -0
- package/resources/extract/extract.mjs +47 -0
- package/resources/extract/extract.mjs.map +1 -0
- package/resources/extract/index.d.mts +3 -0
- package/resources/extract/index.d.mts.map +1 -0
- package/resources/extract/index.d.ts +3 -0
- package/resources/extract/index.d.ts.map +1 -0
- package/resources/extract/index.js +9 -0
- package/resources/extract/index.js.map +1 -0
- package/resources/extract/index.mjs +4 -0
- package/resources/extract/index.mjs.map +1 -0
- package/resources/extract/templates/generations.d.mts +364 -0
- package/resources/extract/templates/generations.d.mts.map +1 -0
- package/resources/extract/templates/generations.d.ts +364 -0
- package/resources/extract/templates/generations.d.ts.map +1 -0
- package/resources/extract/templates/generations.js +39 -0
- package/resources/extract/templates/generations.js.map +1 -0
- package/resources/extract/templates/generations.mjs +35 -0
- package/resources/extract/templates/generations.mjs.map +1 -0
- package/resources/extract/templates/index.d.mts +4 -0
- package/resources/extract/templates/index.d.mts.map +1 -0
- package/resources/extract/templates/index.d.ts +4 -0
- package/resources/extract/templates/index.d.ts.map +1 -0
- package/resources/extract/templates/index.js +11 -0
- package/resources/extract/templates/index.js.map +1 -0
- package/resources/extract/templates/index.mjs +5 -0
- package/resources/extract/templates/index.mjs.map +1 -0
- package/resources/{agent.d.ts → extract/templates/templates.d.mts} +475 -263
- package/resources/extract/templates/templates.d.mts.map +1 -0
- package/resources/{agent.d.mts → extract/templates/templates.d.ts} +475 -263
- package/resources/extract/templates/templates.d.ts.map +1 -0
- package/resources/extract/templates/templates.js +120 -0
- package/resources/extract/templates/templates.js.map +1 -0
- package/resources/extract/templates/templates.mjs +115 -0
- package/resources/extract/templates/templates.mjs.map +1 -0
- package/resources/extract/templates/versions.d.mts +226 -0
- package/resources/extract/templates/versions.d.mts.map +1 -0
- package/resources/extract/templates/versions.d.ts +226 -0
- package/resources/extract/templates/versions.d.ts.map +1 -0
- package/resources/extract/templates/versions.js +42 -0
- package/resources/extract/templates/versions.js.map +1 -0
- package/resources/extract/templates/versions.mjs +38 -0
- package/resources/extract/templates/versions.mjs.map +1 -0
- package/resources/extract/templates.d.mts +2 -0
- package/resources/extract/templates.d.mts.map +1 -0
- package/resources/extract/templates.d.ts +2 -0
- package/resources/extract/templates.d.ts.map +1 -0
- package/resources/extract/templates.js +6 -0
- package/resources/extract/templates.js.map +1 -0
- package/resources/extract/templates.mjs +3 -0
- package/resources/extract/templates.mjs.map +1 -0
- package/resources/extract.d.mts +2 -0
- package/resources/extract.d.mts.map +1 -0
- package/resources/extract.d.ts +2 -0
- package/resources/extract.d.ts.map +1 -0
- package/resources/extract.js +6 -0
- package/resources/extract.js.map +1 -0
- package/resources/extract.mjs +3 -0
- package/resources/extract.mjs.map +1 -0
- package/resources/fast-serp.js +1 -1
- package/resources/fast-serp.mjs +1 -1
- package/resources/index.d.mts +4 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -2
- package/resources/index.mjs.map +1 -1
- package/resources/jobs/index.d.mts +2 -2
- package/resources/jobs/index.d.mts.map +1 -1
- package/resources/jobs/index.d.ts +2 -2
- package/resources/jobs/index.d.ts.map +1 -1
- package/resources/jobs/index.js.map +1 -1
- package/resources/jobs/index.mjs.map +1 -1
- package/resources/jobs/jobs.d.mts +34 -90
- package/resources/jobs/jobs.d.mts.map +1 -1
- package/resources/jobs/jobs.d.ts +34 -90
- package/resources/jobs/jobs.d.ts.map +1 -1
- package/resources/jobs/jobs.js +10 -16
- package/resources/jobs/jobs.js.map +1 -1
- package/resources/jobs/jobs.mjs +11 -17
- package/resources/jobs/jobs.mjs.map +1 -1
- package/resources/jobs/runs/artifacts.d.mts +7 -17
- package/resources/jobs/runs/artifacts.d.mts.map +1 -1
- package/resources/jobs/runs/artifacts.d.ts +7 -17
- package/resources/jobs/runs/artifacts.d.ts.map +1 -1
- package/resources/jobs/runs/artifacts.js +8 -8
- package/resources/jobs/runs/artifacts.mjs +8 -8
- package/resources/jobs/runs/index.d.mts +1 -1
- package/resources/jobs/runs/index.d.mts.map +1 -1
- package/resources/jobs/runs/index.d.ts +1 -1
- package/resources/jobs/runs/index.d.ts.map +1 -1
- package/resources/jobs/runs/index.js.map +1 -1
- package/resources/jobs/runs/index.mjs.map +1 -1
- package/resources/jobs/runs/runs.d.mts +59 -21
- package/resources/jobs/runs/runs.d.mts.map +1 -1
- package/resources/jobs/runs/runs.d.ts +59 -21
- package/resources/jobs/runs/runs.d.ts.map +1 -1
- package/resources/jobs/runs/runs.js +12 -6
- package/resources/jobs/runs/runs.js.map +1 -1
- package/resources/jobs/runs/runs.mjs +12 -6
- package/resources/jobs/runs/runs.mjs.map +1 -1
- package/resources/media.js +2 -2
- package/resources/media.mjs +2 -2
- package/resources/serp.js +3 -3
- package/resources/serp.mjs +3 -3
- package/resources/tasks.js +3 -3
- package/resources/tasks.mjs +3 -3
- package/resources/top-level.d.mts +1 -1208
- package/resources/top-level.d.mts.map +1 -1
- package/resources/top-level.d.ts +1 -1208
- package/resources/top-level.d.ts.map +1 -1
- package/src/client.ts +41 -123
- package/src/resources/agents/agents.ts +1039 -0
- package/src/resources/agents/index.ts +30 -0
- package/src/resources/{task-agent → agents}/runs.ts +450 -154
- package/src/resources/agents/templates.ts +324 -0
- package/src/resources/{task-agent.ts → agents.ts} +1 -1
- package/src/resources/batches.ts +3 -3
- package/src/resources/crawl.ts +4 -4
- package/src/resources/domain-knowledge.ts +1 -1
- package/src/resources/extract/extract.ts +5182 -0
- package/src/resources/extract/index.ts +25 -0
- package/src/resources/extract/templates/generations.ts +435 -0
- package/src/resources/extract/templates/index.ts +29 -0
- package/src/resources/extract/templates/templates.ts +1176 -0
- package/src/resources/extract/templates/versions.ts +284 -0
- package/src/resources/extract/templates.ts +3 -0
- package/src/resources/extract.ts +3 -0
- package/src/resources/fast-serp.ts +1 -1
- package/src/resources/index.ts +16 -36
- package/src/resources/jobs/index.ts +1 -1
- package/src/resources/jobs/jobs.ts +49 -112
- package/src/resources/jobs/runs/artifacts.ts +11 -21
- package/src/resources/jobs/runs/index.ts +1 -0
- package/src/resources/jobs/runs/runs.ts +74 -24
- package/src/resources/media.ts +2 -2
- package/src/resources/serp.ts +3 -3
- package/src/resources/tasks.ts +3 -3
- package/src/resources/top-level.ts +88 -5192
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/agent.d.mts.map +0 -1
- package/resources/agent.d.ts.map +0 -1
- package/resources/agent.js +0 -101
- package/resources/agent.js.map +0 -1
- package/resources/agent.mjs +0 -97
- package/resources/agent.mjs.map +0 -1
- package/resources/task-agent/index.d.mts +0 -4
- package/resources/task-agent/index.d.mts.map +0 -1
- package/resources/task-agent/index.d.ts +0 -4
- package/resources/task-agent/index.d.ts.map +0 -1
- package/resources/task-agent/index.js.map +0 -1
- package/resources/task-agent/index.mjs.map +0 -1
- package/resources/task-agent/runs.d.mts.map +0 -1
- package/resources/task-agent/runs.d.ts.map +0 -1
- package/resources/task-agent/runs.js +0 -65
- package/resources/task-agent/runs.js.map +0 -1
- package/resources/task-agent/runs.mjs +0 -61
- package/resources/task-agent/runs.mjs.map +0 -1
- package/resources/task-agent/task-agent.d.mts +0 -481
- package/resources/task-agent/task-agent.d.mts.map +0 -1
- package/resources/task-agent/task-agent.d.ts +0 -481
- package/resources/task-agent/task-agent.d.ts.map +0 -1
- package/resources/task-agent/task-agent.js +0 -68
- package/resources/task-agent/task-agent.js.map +0 -1
- package/resources/task-agent/task-agent.mjs +0 -63
- package/resources/task-agent/task-agent.mjs.map +0 -1
- package/resources/task-agent/templates.d.mts +0 -107
- package/resources/task-agent/templates.d.mts.map +0 -1
- package/resources/task-agent/templates.d.ts +0 -107
- package/resources/task-agent/templates.d.ts.map +0 -1
- package/resources/task-agent/templates.js.map +0 -1
- package/resources/task-agent/templates.mjs +0 -18
- package/resources/task-agent/templates.mjs.map +0 -1
- package/resources/task-agent.d.mts +0 -2
- package/resources/task-agent.d.mts.map +0 -1
- package/resources/task-agent.d.ts +0 -2
- package/resources/task-agent.d.ts.map +0 -1
- package/resources/task-agent.js.map +0 -1
- package/resources/task-agent.mjs.map +0 -1
- package/src/resources/agent.ts +0 -952
- package/src/resources/task-agent/index.ts +0 -32
- package/src/resources/task-agent/task-agent.ts +0 -746
- package/src/resources/task-agent/templates.ts +0 -172
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
6
|
+
import { path } from '../../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Versions extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* List Extract Template Versions Public V2
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const versions =
|
|
15
|
+
* await client.extract.templates.versions.list(
|
|
16
|
+
* 'extract_template_name',
|
|
17
|
+
* );
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
list(
|
|
21
|
+
extractTemplateName: string,
|
|
22
|
+
query: VersionListParams | null | undefined = {},
|
|
23
|
+
options?: RequestOptions,
|
|
24
|
+
): APIPromise<VersionListResponse> {
|
|
25
|
+
return this._client.get(path`/v2/extract/templates/${extractTemplateName}/versions`, {
|
|
26
|
+
query,
|
|
27
|
+
...options,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Get Extract Template Version Public V2
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const version = await client.extract.templates.versions.get(
|
|
37
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
38
|
+
* { extract_template_name: 'extract_template_name' },
|
|
39
|
+
* );
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
get(versionID: string, params: VersionGetParams, options?: RequestOptions): APIPromise<VersionGetResponse> {
|
|
43
|
+
const { extract_template_name } = params;
|
|
44
|
+
return this._client.get(
|
|
45
|
+
path`/v2/extract/templates/${extract_template_name}/versions/${versionID}`,
|
|
46
|
+
options,
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface VersionListResponse {
|
|
52
|
+
/**
|
|
53
|
+
* Items returned in this page.
|
|
54
|
+
*/
|
|
55
|
+
items: Array<VersionListResponse.Item>;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Maximum number of items returned.
|
|
59
|
+
*/
|
|
60
|
+
limit: number;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Number of items skipped before this page.
|
|
64
|
+
*/
|
|
65
|
+
offset: number;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Total number of items matching the query.
|
|
69
|
+
*/
|
|
70
|
+
total: number;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export namespace VersionListResponse {
|
|
74
|
+
export interface Item {
|
|
75
|
+
/**
|
|
76
|
+
* Unique extract template version identifier.
|
|
77
|
+
*/
|
|
78
|
+
id: string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* When the version was created.
|
|
82
|
+
*/
|
|
83
|
+
created_at: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* JSON schema describing accepted input parameters.
|
|
87
|
+
*/
|
|
88
|
+
input_schema: { [key: string]: unknown };
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Metadata associated with this version.
|
|
92
|
+
*/
|
|
93
|
+
metadata: Item.Metadata;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Extract template name this version belongs to.
|
|
97
|
+
*/
|
|
98
|
+
name: string;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* JSON schema describing extracted output.
|
|
102
|
+
*/
|
|
103
|
+
output_schema: { [key: string]: unknown };
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Monotonic version number for the extract template.
|
|
107
|
+
*/
|
|
108
|
+
version_number: number;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Sample input and output pairs for the version.
|
|
112
|
+
*/
|
|
113
|
+
samples?: Array<Item.Sample> | null;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export namespace Item {
|
|
117
|
+
/**
|
|
118
|
+
* Metadata associated with this version.
|
|
119
|
+
*/
|
|
120
|
+
export interface Metadata {
|
|
121
|
+
/**
|
|
122
|
+
* Data source associated with the version.
|
|
123
|
+
*/
|
|
124
|
+
data_source?: string | null;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Version description shown to users.
|
|
128
|
+
*/
|
|
129
|
+
description?: string | null;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Human-friendly version display name.
|
|
133
|
+
*/
|
|
134
|
+
display_name?: string | null;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Domain associated with the version.
|
|
138
|
+
*/
|
|
139
|
+
domain?: string | null;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Entity type produced by the version.
|
|
143
|
+
*/
|
|
144
|
+
entity_type?: string | null;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Tags associated with the version.
|
|
148
|
+
*/
|
|
149
|
+
tags?: Array<string>;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Business vertical associated with the version.
|
|
153
|
+
*/
|
|
154
|
+
vertical?: string | null;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export interface Sample {
|
|
158
|
+
/**
|
|
159
|
+
* Sample input parameters for the version.
|
|
160
|
+
*/
|
|
161
|
+
input?: unknown;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Sample output produced by the version.
|
|
165
|
+
*/
|
|
166
|
+
output?: unknown;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export interface VersionGetResponse {
|
|
172
|
+
/**
|
|
173
|
+
* Unique extract template version identifier.
|
|
174
|
+
*/
|
|
175
|
+
id: string;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* When the version was created.
|
|
179
|
+
*/
|
|
180
|
+
created_at: string;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* JSON schema describing accepted input parameters.
|
|
184
|
+
*/
|
|
185
|
+
input_schema: { [key: string]: unknown };
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Metadata associated with this version.
|
|
189
|
+
*/
|
|
190
|
+
metadata: VersionGetResponse.Metadata;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Extract template name this version belongs to.
|
|
194
|
+
*/
|
|
195
|
+
name: string;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* JSON schema describing extracted output.
|
|
199
|
+
*/
|
|
200
|
+
output_schema: { [key: string]: unknown };
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Monotonic version number for the extract template.
|
|
204
|
+
*/
|
|
205
|
+
version_number: number;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Sample input and output pairs for the version.
|
|
209
|
+
*/
|
|
210
|
+
samples?: Array<VersionGetResponse.Sample> | null;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export namespace VersionGetResponse {
|
|
214
|
+
/**
|
|
215
|
+
* Metadata associated with this version.
|
|
216
|
+
*/
|
|
217
|
+
export interface Metadata {
|
|
218
|
+
/**
|
|
219
|
+
* Data source associated with the version.
|
|
220
|
+
*/
|
|
221
|
+
data_source?: string | null;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Version description shown to users.
|
|
225
|
+
*/
|
|
226
|
+
description?: string | null;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Human-friendly version display name.
|
|
230
|
+
*/
|
|
231
|
+
display_name?: string | null;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Domain associated with the version.
|
|
235
|
+
*/
|
|
236
|
+
domain?: string | null;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Entity type produced by the version.
|
|
240
|
+
*/
|
|
241
|
+
entity_type?: string | null;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Tags associated with the version.
|
|
245
|
+
*/
|
|
246
|
+
tags?: Array<string>;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Business vertical associated with the version.
|
|
250
|
+
*/
|
|
251
|
+
vertical?: string | null;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export interface Sample {
|
|
255
|
+
/**
|
|
256
|
+
* Sample input parameters for the version.
|
|
257
|
+
*/
|
|
258
|
+
input?: unknown;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Sample output produced by the version.
|
|
262
|
+
*/
|
|
263
|
+
output?: unknown;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export interface VersionListParams {
|
|
268
|
+
limit?: number;
|
|
269
|
+
|
|
270
|
+
offset?: number;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export interface VersionGetParams {
|
|
274
|
+
extract_template_name: string;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export declare namespace Versions {
|
|
278
|
+
export {
|
|
279
|
+
type VersionListResponse as VersionListResponse,
|
|
280
|
+
type VersionGetResponse as VersionGetResponse,
|
|
281
|
+
type VersionListParams as VersionListParams,
|
|
282
|
+
type VersionGetParams as VersionGetParams,
|
|
283
|
+
};
|
|
284
|
+
}
|
|
@@ -16,7 +16,7 @@ export class FastSerp extends APIResource {
|
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
18
|
run(body: FastSerpRunParams, options?: RequestOptions): APIPromise<FastSerpRunResponse> {
|
|
19
|
-
return this._client.post('/
|
|
19
|
+
return this._client.post('/v2/fast-serp', { body, ...options });
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
package/src/resources/index.ts
CHANGED
|
@@ -2,20 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
export * from './shared';
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
Agents,
|
|
6
|
+
type AgentCreateResponse,
|
|
7
|
+
type AgentUpdateResponse,
|
|
6
8
|
type AgentListResponse,
|
|
7
|
-
type AgentGenerateResponse,
|
|
8
9
|
type AgentGetResponse,
|
|
9
|
-
type
|
|
10
|
-
type
|
|
11
|
-
type AgentRunAsyncResponse,
|
|
12
|
-
type AgentRunBatchResponse,
|
|
10
|
+
type AgentCreateParams,
|
|
11
|
+
type AgentUpdateParams,
|
|
13
12
|
type AgentListParams,
|
|
14
|
-
|
|
15
|
-
type AgentRunParams,
|
|
16
|
-
type AgentRunAsyncParams,
|
|
17
|
-
type AgentRunBatchParams,
|
|
18
|
-
} from './agent';
|
|
13
|
+
} from './agents/agents';
|
|
19
14
|
export { Batches, type BatchGetResponse, type BatchProgressResponse } from './batches';
|
|
20
15
|
export {
|
|
21
16
|
Crawl,
|
|
@@ -31,6 +26,15 @@ export {
|
|
|
31
26
|
type DomainKnowledgeGetDriverResponse,
|
|
32
27
|
type DomainKnowledgeGetDriverParams,
|
|
33
28
|
} from './domain-knowledge';
|
|
29
|
+
export {
|
|
30
|
+
Extract,
|
|
31
|
+
type ExtractAsyncResponse,
|
|
32
|
+
type ExtractBatchResponse,
|
|
33
|
+
type ExtractRunResponse,
|
|
34
|
+
type ExtractAsyncParams,
|
|
35
|
+
type ExtractBatchParams,
|
|
36
|
+
type ExtractRunParams,
|
|
37
|
+
} from './extract/extract';
|
|
34
38
|
export { FastSerp, type FastSerpRunResponse, type FastSerpRunParams } from './fast-serp';
|
|
35
39
|
export {
|
|
36
40
|
Jobs,
|
|
@@ -38,7 +42,6 @@ export {
|
|
|
38
42
|
type JobUpdateResponse,
|
|
39
43
|
type JobListResponse,
|
|
40
44
|
type JobGetResponse,
|
|
41
|
-
type JobRunResponse,
|
|
42
45
|
type JobCreateParams,
|
|
43
46
|
type JobUpdateParams,
|
|
44
47
|
type JobListParams,
|
|
@@ -59,18 +62,6 @@ export {
|
|
|
59
62
|
type SerpRunAsyncParams,
|
|
60
63
|
type SerpRunBatchParams,
|
|
61
64
|
} from './serp';
|
|
62
|
-
export {
|
|
63
|
-
TaskAgent,
|
|
64
|
-
type TaskAgentCreateResponse,
|
|
65
|
-
type TaskAgentUpdateResponse,
|
|
66
|
-
type TaskAgentListResponse,
|
|
67
|
-
type TaskAgentGetResponse,
|
|
68
|
-
type TaskAgentRunResponse,
|
|
69
|
-
type TaskAgentCreateParams,
|
|
70
|
-
type TaskAgentUpdateParams,
|
|
71
|
-
type TaskAgentListParams,
|
|
72
|
-
type TaskAgentRunParams,
|
|
73
|
-
} from './task-agent/task-agent';
|
|
74
65
|
export {
|
|
75
66
|
Tasks,
|
|
76
67
|
type TaskListResponse,
|
|
@@ -78,15 +69,4 @@ export {
|
|
|
78
69
|
type TaskResultsResponse,
|
|
79
70
|
type TaskListParams,
|
|
80
71
|
} from './tasks';
|
|
81
|
-
export {
|
|
82
|
-
type ExtractResponse,
|
|
83
|
-
type ExtractAsyncResponse,
|
|
84
|
-
type ExtractBatchResponse,
|
|
85
|
-
type MapResponse,
|
|
86
|
-
type SearchResponse,
|
|
87
|
-
type ExtractParams,
|
|
88
|
-
type ExtractAsyncParams,
|
|
89
|
-
type ExtractBatchParams,
|
|
90
|
-
type MapParams,
|
|
91
|
-
type SearchParams,
|
|
92
|
-
} from './top-level';
|
|
72
|
+
export { type MapResponse, type SearchResponse, type MapParams, type SearchParams } from './top-level';
|
|
@@ -6,13 +6,13 @@ export {
|
|
|
6
6
|
type JobUpdateResponse,
|
|
7
7
|
type JobListResponse,
|
|
8
8
|
type JobGetResponse,
|
|
9
|
-
type JobRunResponse,
|
|
10
9
|
type JobCreateParams,
|
|
11
10
|
type JobUpdateParams,
|
|
12
11
|
type JobListParams,
|
|
13
12
|
} from './jobs';
|
|
14
13
|
export {
|
|
15
14
|
Runs,
|
|
15
|
+
type RunCreateResponse,
|
|
16
16
|
type RunListResponse,
|
|
17
17
|
type RunCancelResponse,
|
|
18
18
|
type RunGetResponse,
|
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as RunsAPI from './runs/runs';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
RunCancelResponse,
|
|
7
|
+
RunCreateResponse,
|
|
8
|
+
RunGetResponse,
|
|
9
|
+
RunListParams,
|
|
10
|
+
RunListResponse,
|
|
11
|
+
Runs,
|
|
12
|
+
} from './runs/runs';
|
|
6
13
|
import { APIPromise } from '../../core/api-promise';
|
|
7
14
|
import { buildHeaders } from '../../internal/headers';
|
|
8
15
|
import { RequestOptions } from '../../internal/request-options';
|
|
@@ -12,48 +19,41 @@ export class Jobs extends APIResource {
|
|
|
12
19
|
runs: RunsAPI.Runs = new RunsAPI.Runs(this._client);
|
|
13
20
|
|
|
14
21
|
/**
|
|
15
|
-
* Create Job
|
|
22
|
+
* Create Job Public V2
|
|
16
23
|
*/
|
|
17
24
|
create(body: JobCreateParams, options?: RequestOptions): APIPromise<JobCreateResponse> {
|
|
18
|
-
return this._client.post('/
|
|
25
|
+
return this._client.post('/v2/jobs', { body, ...options });
|
|
19
26
|
}
|
|
20
27
|
|
|
21
28
|
/**
|
|
22
|
-
* Update Job
|
|
29
|
+
* Update Job Public V2
|
|
23
30
|
*/
|
|
24
31
|
update(jobID: string, body: JobUpdateParams, options?: RequestOptions): APIPromise<JobUpdateResponse> {
|
|
25
|
-
return this._client.patch(path`/
|
|
32
|
+
return this._client.patch(path`/v2/jobs/${jobID}`, { body, ...options });
|
|
26
33
|
}
|
|
27
34
|
|
|
28
35
|
/**
|
|
29
|
-
* List Jobs
|
|
36
|
+
* List Jobs Public V2
|
|
30
37
|
*/
|
|
31
38
|
list(query: JobListParams | null | undefined = {}, options?: RequestOptions): APIPromise<JobListResponse> {
|
|
32
|
-
return this._client.get('/
|
|
39
|
+
return this._client.get('/v2/jobs', { query, ...options });
|
|
33
40
|
}
|
|
34
41
|
|
|
35
42
|
/**
|
|
36
|
-
* Delete Job
|
|
43
|
+
* Delete Job Public V2
|
|
37
44
|
*/
|
|
38
45
|
delete(jobID: string, options?: RequestOptions): APIPromise<void> {
|
|
39
|
-
return this._client.delete(path`/
|
|
46
|
+
return this._client.delete(path`/v2/jobs/${jobID}`, {
|
|
40
47
|
...options,
|
|
41
48
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
42
49
|
});
|
|
43
50
|
}
|
|
44
51
|
|
|
45
52
|
/**
|
|
46
|
-
* Get Job
|
|
53
|
+
* Get Job Public V2
|
|
47
54
|
*/
|
|
48
55
|
get(jobID: string, options?: RequestOptions): APIPromise<JobGetResponse> {
|
|
49
|
-
return this._client.get(path`/
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Trigger Run
|
|
54
|
-
*/
|
|
55
|
-
run(jobID: string, options?: RequestOptions): APIPromise<JobRunResponse> {
|
|
56
|
-
return this._client.post(path`/v1/jobs/${jobID}/runs`, options);
|
|
56
|
+
return this._client.get(path`/v2/jobs/${jobID}`, options);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -71,11 +71,6 @@ export interface JobCreateResponse {
|
|
|
71
71
|
*/
|
|
72
72
|
name: string;
|
|
73
73
|
|
|
74
|
-
/**
|
|
75
|
-
* Name of the agent this job runs.
|
|
76
|
-
*/
|
|
77
|
-
agent_name?: string | null;
|
|
78
|
-
|
|
79
74
|
/**
|
|
80
75
|
* When the job was created.
|
|
81
76
|
*/
|
|
@@ -96,6 +91,11 @@ export interface JobCreateResponse {
|
|
|
96
91
|
*/
|
|
97
92
|
display_name?: string | null;
|
|
98
93
|
|
|
94
|
+
/**
|
|
95
|
+
* Name of the extract template this job runs.
|
|
96
|
+
*/
|
|
97
|
+
extract_template_name?: string | null;
|
|
98
|
+
|
|
99
99
|
/**
|
|
100
100
|
* Configuration for the input data a job processes.
|
|
101
101
|
*/
|
|
@@ -195,11 +195,6 @@ export interface JobUpdateResponse {
|
|
|
195
195
|
*/
|
|
196
196
|
name: string;
|
|
197
197
|
|
|
198
|
-
/**
|
|
199
|
-
* Name of the agent this job runs.
|
|
200
|
-
*/
|
|
201
|
-
agent_name?: string | null;
|
|
202
|
-
|
|
203
198
|
/**
|
|
204
199
|
* When the job was created.
|
|
205
200
|
*/
|
|
@@ -220,6 +215,11 @@ export interface JobUpdateResponse {
|
|
|
220
215
|
*/
|
|
221
216
|
display_name?: string | null;
|
|
222
217
|
|
|
218
|
+
/**
|
|
219
|
+
* Name of the extract template this job runs.
|
|
220
|
+
*/
|
|
221
|
+
extract_template_name?: string | null;
|
|
222
|
+
|
|
223
223
|
/**
|
|
224
224
|
* Configuration for the input data a job processes.
|
|
225
225
|
*/
|
|
@@ -305,27 +305,24 @@ export namespace JobUpdateResponse {
|
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
/**
|
|
309
|
-
* A page of jobs.
|
|
310
|
-
*/
|
|
311
308
|
export interface JobListResponse {
|
|
312
309
|
/**
|
|
313
|
-
*
|
|
310
|
+
* Items returned in this page.
|
|
314
311
|
*/
|
|
315
312
|
items: Array<JobListResponse.Item>;
|
|
316
313
|
|
|
317
314
|
/**
|
|
318
|
-
*
|
|
315
|
+
* Maximum number of items returned.
|
|
319
316
|
*/
|
|
320
|
-
|
|
317
|
+
limit: number;
|
|
321
318
|
|
|
322
319
|
/**
|
|
323
|
-
* Number of items
|
|
320
|
+
* Number of items skipped before this page.
|
|
324
321
|
*/
|
|
325
|
-
|
|
322
|
+
offset: number;
|
|
326
323
|
|
|
327
324
|
/**
|
|
328
|
-
* Total number of
|
|
325
|
+
* Total number of items matching the query.
|
|
329
326
|
*/
|
|
330
327
|
total: number;
|
|
331
328
|
}
|
|
@@ -345,11 +342,6 @@ export namespace JobListResponse {
|
|
|
345
342
|
*/
|
|
346
343
|
name: string;
|
|
347
344
|
|
|
348
|
-
/**
|
|
349
|
-
* Name of the agent this job runs.
|
|
350
|
-
*/
|
|
351
|
-
agent_name?: string | null;
|
|
352
|
-
|
|
353
345
|
/**
|
|
354
346
|
* When the job was created.
|
|
355
347
|
*/
|
|
@@ -370,6 +362,11 @@ export namespace JobListResponse {
|
|
|
370
362
|
*/
|
|
371
363
|
display_name?: string | null;
|
|
372
364
|
|
|
365
|
+
/**
|
|
366
|
+
* Name of the extract template this job runs.
|
|
367
|
+
*/
|
|
368
|
+
extract_template_name?: string | null;
|
|
369
|
+
|
|
373
370
|
/**
|
|
374
371
|
* Configuration for the input data a job processes.
|
|
375
372
|
*/
|
|
@@ -478,11 +475,6 @@ export interface JobGetResponse {
|
|
|
478
475
|
*/
|
|
479
476
|
name: string;
|
|
480
477
|
|
|
481
|
-
/**
|
|
482
|
-
* Name of the agent this job runs.
|
|
483
|
-
*/
|
|
484
|
-
agent_name?: string | null;
|
|
485
|
-
|
|
486
478
|
/**
|
|
487
479
|
* When the job was created.
|
|
488
480
|
*/
|
|
@@ -503,6 +495,11 @@ export interface JobGetResponse {
|
|
|
503
495
|
*/
|
|
504
496
|
display_name?: string | null;
|
|
505
497
|
|
|
498
|
+
/**
|
|
499
|
+
* Name of the extract template this job runs.
|
|
500
|
+
*/
|
|
501
|
+
extract_template_name?: string | null;
|
|
502
|
+
|
|
506
503
|
/**
|
|
507
504
|
* Configuration for the input data a job processes.
|
|
508
505
|
*/
|
|
@@ -588,61 +585,11 @@ export namespace JobGetResponse {
|
|
|
588
585
|
}
|
|
589
586
|
}
|
|
590
587
|
|
|
591
|
-
/**
|
|
592
|
-
* A single execution of a job.
|
|
593
|
-
*/
|
|
594
|
-
export interface JobRunResponse {
|
|
595
|
-
/**
|
|
596
|
-
* Unique run identifier (run\_<n>).
|
|
597
|
-
*/
|
|
598
|
-
id: string;
|
|
599
|
-
|
|
600
|
-
/**
|
|
601
|
-
* When the run was created.
|
|
602
|
-
*/
|
|
603
|
-
created_at: string;
|
|
604
|
-
|
|
605
|
-
/**
|
|
606
|
-
* Identifier of the job this run belongs to.
|
|
607
|
-
*/
|
|
608
|
-
job_id: string;
|
|
609
|
-
|
|
610
|
-
/**
|
|
611
|
-
* Current run status.
|
|
612
|
-
*/
|
|
613
|
-
status: 'PENDING' | 'RUNNING' | 'SUCCESS' | 'FAILED' | 'CANCELLED' | 'TIMEOUT' | 'WARNING';
|
|
614
|
-
|
|
615
|
-
/**
|
|
616
|
-
* What triggered the run: 'schedule' or 'manual'.
|
|
617
|
-
*/
|
|
618
|
-
triggered_by: 'schedule' | 'manual';
|
|
619
|
-
|
|
620
|
-
/**
|
|
621
|
-
* When the run finished.
|
|
622
|
-
*/
|
|
623
|
-
finished_at?: string | null;
|
|
624
|
-
|
|
625
|
-
/**
|
|
626
|
-
* Number of input records processed.
|
|
627
|
-
*/
|
|
628
|
-
input_count?: number | null;
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
* Number of result records produced.
|
|
632
|
-
*/
|
|
633
|
-
result_count?: number | null;
|
|
634
|
-
|
|
635
|
-
/**
|
|
636
|
-
* When the run started executing.
|
|
637
|
-
*/
|
|
638
|
-
started_at?: string | null;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
588
|
export interface JobCreateParams {
|
|
642
589
|
/**
|
|
643
|
-
* Name of the
|
|
590
|
+
* Name of the extract template to run.
|
|
644
591
|
*/
|
|
645
|
-
|
|
592
|
+
extract_template_name: string;
|
|
646
593
|
|
|
647
594
|
/**
|
|
648
595
|
* Job name.
|
|
@@ -821,19 +768,9 @@ export namespace JobUpdateParams {
|
|
|
821
768
|
}
|
|
822
769
|
|
|
823
770
|
export interface JobListParams {
|
|
824
|
-
|
|
825
|
-
* Filter by agent name
|
|
826
|
-
*/
|
|
827
|
-
agent_name?: string | null;
|
|
771
|
+
limit?: number;
|
|
828
772
|
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
per_page?: number;
|
|
832
|
-
|
|
833
|
-
/**
|
|
834
|
-
* Search by name or display name
|
|
835
|
-
*/
|
|
836
|
-
q?: string | null;
|
|
773
|
+
offset?: number;
|
|
837
774
|
}
|
|
838
775
|
|
|
839
776
|
Jobs.Runs = Runs;
|
|
@@ -844,7 +781,6 @@ export declare namespace Jobs {
|
|
|
844
781
|
type JobUpdateResponse as JobUpdateResponse,
|
|
845
782
|
type JobListResponse as JobListResponse,
|
|
846
783
|
type JobGetResponse as JobGetResponse,
|
|
847
|
-
type JobRunResponse as JobRunResponse,
|
|
848
784
|
type JobCreateParams as JobCreateParams,
|
|
849
785
|
type JobUpdateParams as JobUpdateParams,
|
|
850
786
|
type JobListParams as JobListParams,
|
|
@@ -852,6 +788,7 @@ export declare namespace Jobs {
|
|
|
852
788
|
|
|
853
789
|
export {
|
|
854
790
|
Runs as Runs,
|
|
791
|
+
type RunCreateResponse as RunCreateResponse,
|
|
855
792
|
type RunListResponse as RunListResponse,
|
|
856
793
|
type RunCancelResponse as RunCancelResponse,
|
|
857
794
|
type RunGetResponse as RunGetResponse,
|