@nimble-way/nimble-js 0.20.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 +9 -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/{task-agent/task-agent.d.mts → agents/agents.d.mts} +51 -213
- package/resources/agents/agents.d.mts.map +1 -0
- package/resources/{task-agent/task-agent.d.ts → agents/agents.d.ts} +51 -213
- 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 +192 -43
- package/resources/agents/runs.d.mts.map +1 -0
- package/resources/{task-agent → agents}/runs.d.ts +192 -43
- 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/{task-agent → agents}/templates.d.mts +3 -6
- package/resources/agents/templates.d.mts.map +1 -0
- package/resources/{task-agent → agents}/templates.d.ts +3 -6
- package/resources/agents/templates.d.ts.map +1 -0
- package/resources/{task-agent → agents}/templates.js +5 -8
- 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/extract/templates/templates.d.mts +870 -0
- package/resources/extract/templates/templates.d.mts.map +1 -0
- package/resources/extract/templates/templates.d.ts +870 -0
- 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 +35 -103
- package/resources/jobs/jobs.d.mts.map +1 -1
- package/resources/jobs/jobs.d.ts +35 -103
- package/resources/jobs/jobs.d.ts.map +1 -1
- package/resources/jobs/jobs.js +10 -28
- package/resources/jobs/jobs.js.map +1 -1
- package/resources/jobs/jobs.mjs +11 -29
- package/resources/jobs/jobs.mjs.map +1 -1
- package/resources/jobs/runs/artifacts.d.mts +4 -12
- package/resources/jobs/runs/artifacts.d.mts.map +1 -1
- package/resources/jobs/runs/artifacts.d.ts +4 -12
- package/resources/jobs/runs/artifacts.d.ts.map +1 -1
- package/resources/jobs/runs/artifacts.js +8 -16
- package/resources/jobs/runs/artifacts.js.map +1 -1
- package/resources/jobs/runs/artifacts.mjs +8 -16
- package/resources/jobs/runs/artifacts.mjs.map +1 -1
- 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 +60 -28
- package/resources/jobs/runs/runs.d.mts.map +1 -1
- package/resources/jobs/runs/runs.d.ts +60 -28
- package/resources/jobs/runs/runs.d.ts.map +1 -1
- package/resources/jobs/runs/runs.js +12 -12
- package/resources/jobs/runs/runs.js.map +1 -1
- package/resources/jobs/runs/runs.mjs +12 -12
- 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 -1202
- package/resources/top-level.d.mts.map +1 -1
- package/resources/top-level.d.ts +1 -1202
- package/resources/top-level.d.ts.map +1 -1
- package/src/client.ts +41 -123
- package/src/resources/{task-agent/task-agent.ts → agents/agents.ts} +71 -258
- package/src/resources/{task-agent → agents}/index.ts +14 -14
- package/src/resources/{task-agent → agents}/runs.ts +228 -54
- package/src/resources/{task-agent → agents}/templates.ts +5 -8
- 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 +50 -125
- package/src/resources/jobs/runs/artifacts.ts +8 -16
- package/src/resources/jobs/runs/index.ts +1 -0
- package/src/resources/jobs/runs/runs.ts +75 -31
- 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 +72 -5171
- 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 +0 -641
- package/resources/agent.d.mts.map +0 -1
- package/resources/agent.d.ts +0 -641
- package/resources/agent.d.ts.map +0 -1
- package/resources/agent.js +0 -84
- package/resources/agent.js.map +0 -1
- package/resources/agent.mjs +0 -80
- 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 -63
- package/resources/task-agent/runs.js.map +0 -1
- package/resources/task-agent/runs.mjs +0 -59
- package/resources/task-agent/runs.mjs.map +0 -1
- package/resources/task-agent/task-agent.d.mts.map +0 -1
- package/resources/task-agent/task-agent.d.ts.map +0 -1
- package/resources/task-agent/task-agent.js +0 -80
- package/resources/task-agent/task-agent.js.map +0 -1
- package/resources/task-agent/task-agent.mjs +0 -75
- package/resources/task-agent/task-agent.mjs.map +0 -1
- package/resources/task-agent/templates.d.mts.map +0 -1
- 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 -22
- 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 -935
|
@@ -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,60 +19,41 @@ export class Jobs extends APIResource {
|
|
|
12
19
|
runs: RunsAPI.Runs = new RunsAPI.Runs(this._client);
|
|
13
20
|
|
|
14
21
|
/**
|
|
15
|
-
* Create Job
|
|
16
|
-
*
|
|
17
|
-
* @deprecated
|
|
22
|
+
* Create Job Public V2
|
|
18
23
|
*/
|
|
19
24
|
create(body: JobCreateParams, options?: RequestOptions): APIPromise<JobCreateResponse> {
|
|
20
|
-
return this._client.post('/
|
|
25
|
+
return this._client.post('/v2/jobs', { body, ...options });
|
|
21
26
|
}
|
|
22
27
|
|
|
23
28
|
/**
|
|
24
|
-
* Update Job
|
|
25
|
-
*
|
|
26
|
-
* @deprecated
|
|
29
|
+
* Update Job Public V2
|
|
27
30
|
*/
|
|
28
31
|
update(jobID: string, body: JobUpdateParams, options?: RequestOptions): APIPromise<JobUpdateResponse> {
|
|
29
|
-
return this._client.patch(path`/
|
|
32
|
+
return this._client.patch(path`/v2/jobs/${jobID}`, { body, ...options });
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
/**
|
|
33
|
-
* List Jobs
|
|
34
|
-
*
|
|
35
|
-
* @deprecated
|
|
36
|
+
* List Jobs Public V2
|
|
36
37
|
*/
|
|
37
38
|
list(query: JobListParams | null | undefined = {}, options?: RequestOptions): APIPromise<JobListResponse> {
|
|
38
|
-
return this._client.get('/
|
|
39
|
+
return this._client.get('/v2/jobs', { query, ...options });
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
/**
|
|
42
|
-
* Delete Job
|
|
43
|
-
*
|
|
44
|
-
* @deprecated
|
|
43
|
+
* Delete Job Public V2
|
|
45
44
|
*/
|
|
46
45
|
delete(jobID: string, options?: RequestOptions): APIPromise<void> {
|
|
47
|
-
return this._client.delete(path`/
|
|
46
|
+
return this._client.delete(path`/v2/jobs/${jobID}`, {
|
|
48
47
|
...options,
|
|
49
48
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
50
49
|
});
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
/**
|
|
54
|
-
* Get Job
|
|
55
|
-
*
|
|
56
|
-
* @deprecated
|
|
53
|
+
* Get Job Public V2
|
|
57
54
|
*/
|
|
58
55
|
get(jobID: string, options?: RequestOptions): APIPromise<JobGetResponse> {
|
|
59
|
-
return this._client.get(path`/
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Trigger Run
|
|
64
|
-
*
|
|
65
|
-
* @deprecated
|
|
66
|
-
*/
|
|
67
|
-
run(jobID: string, options?: RequestOptions): APIPromise<JobRunResponse> {
|
|
68
|
-
return this._client.post(path`/v1/jobs/${jobID}/runs`, options);
|
|
56
|
+
return this._client.get(path`/v2/jobs/${jobID}`, options);
|
|
69
57
|
}
|
|
70
58
|
}
|
|
71
59
|
|
|
@@ -83,11 +71,6 @@ export interface JobCreateResponse {
|
|
|
83
71
|
*/
|
|
84
72
|
name: string;
|
|
85
73
|
|
|
86
|
-
/**
|
|
87
|
-
* Name of the agent this job runs.
|
|
88
|
-
*/
|
|
89
|
-
agent_name?: string | null;
|
|
90
|
-
|
|
91
74
|
/**
|
|
92
75
|
* When the job was created.
|
|
93
76
|
*/
|
|
@@ -108,6 +91,11 @@ export interface JobCreateResponse {
|
|
|
108
91
|
*/
|
|
109
92
|
display_name?: string | null;
|
|
110
93
|
|
|
94
|
+
/**
|
|
95
|
+
* Name of the extract template this job runs.
|
|
96
|
+
*/
|
|
97
|
+
extract_template_name?: string | null;
|
|
98
|
+
|
|
111
99
|
/**
|
|
112
100
|
* Configuration for the input data a job processes.
|
|
113
101
|
*/
|
|
@@ -207,11 +195,6 @@ export interface JobUpdateResponse {
|
|
|
207
195
|
*/
|
|
208
196
|
name: string;
|
|
209
197
|
|
|
210
|
-
/**
|
|
211
|
-
* Name of the agent this job runs.
|
|
212
|
-
*/
|
|
213
|
-
agent_name?: string | null;
|
|
214
|
-
|
|
215
198
|
/**
|
|
216
199
|
* When the job was created.
|
|
217
200
|
*/
|
|
@@ -232,6 +215,11 @@ export interface JobUpdateResponse {
|
|
|
232
215
|
*/
|
|
233
216
|
display_name?: string | null;
|
|
234
217
|
|
|
218
|
+
/**
|
|
219
|
+
* Name of the extract template this job runs.
|
|
220
|
+
*/
|
|
221
|
+
extract_template_name?: string | null;
|
|
222
|
+
|
|
235
223
|
/**
|
|
236
224
|
* Configuration for the input data a job processes.
|
|
237
225
|
*/
|
|
@@ -317,29 +305,26 @@ export namespace JobUpdateResponse {
|
|
|
317
305
|
}
|
|
318
306
|
}
|
|
319
307
|
|
|
320
|
-
/**
|
|
321
|
-
* A page of jobs.
|
|
322
|
-
*/
|
|
323
308
|
export interface JobListResponse {
|
|
324
309
|
/**
|
|
325
|
-
*
|
|
310
|
+
* Items returned in this page.
|
|
326
311
|
*/
|
|
327
312
|
items: Array<JobListResponse.Item>;
|
|
328
313
|
|
|
329
314
|
/**
|
|
330
|
-
*
|
|
315
|
+
* Maximum number of items returned.
|
|
331
316
|
*/
|
|
332
|
-
|
|
317
|
+
limit: number;
|
|
333
318
|
|
|
334
319
|
/**
|
|
335
|
-
*
|
|
320
|
+
* Number of items skipped before this page.
|
|
336
321
|
*/
|
|
337
|
-
|
|
322
|
+
offset: number;
|
|
338
323
|
|
|
339
324
|
/**
|
|
340
|
-
*
|
|
325
|
+
* Total number of items matching the query.
|
|
341
326
|
*/
|
|
342
|
-
|
|
327
|
+
total: number;
|
|
343
328
|
}
|
|
344
329
|
|
|
345
330
|
export namespace JobListResponse {
|
|
@@ -357,11 +342,6 @@ export namespace JobListResponse {
|
|
|
357
342
|
*/
|
|
358
343
|
name: string;
|
|
359
344
|
|
|
360
|
-
/**
|
|
361
|
-
* Name of the agent this job runs.
|
|
362
|
-
*/
|
|
363
|
-
agent_name?: string | null;
|
|
364
|
-
|
|
365
345
|
/**
|
|
366
346
|
* When the job was created.
|
|
367
347
|
*/
|
|
@@ -382,6 +362,11 @@ export namespace JobListResponse {
|
|
|
382
362
|
*/
|
|
383
363
|
display_name?: string | null;
|
|
384
364
|
|
|
365
|
+
/**
|
|
366
|
+
* Name of the extract template this job runs.
|
|
367
|
+
*/
|
|
368
|
+
extract_template_name?: string | null;
|
|
369
|
+
|
|
385
370
|
/**
|
|
386
371
|
* Configuration for the input data a job processes.
|
|
387
372
|
*/
|
|
@@ -490,11 +475,6 @@ export interface JobGetResponse {
|
|
|
490
475
|
*/
|
|
491
476
|
name: string;
|
|
492
477
|
|
|
493
|
-
/**
|
|
494
|
-
* Name of the agent this job runs.
|
|
495
|
-
*/
|
|
496
|
-
agent_name?: string | null;
|
|
497
|
-
|
|
498
478
|
/**
|
|
499
479
|
* When the job was created.
|
|
500
480
|
*/
|
|
@@ -515,6 +495,11 @@ export interface JobGetResponse {
|
|
|
515
495
|
*/
|
|
516
496
|
display_name?: string | null;
|
|
517
497
|
|
|
498
|
+
/**
|
|
499
|
+
* Name of the extract template this job runs.
|
|
500
|
+
*/
|
|
501
|
+
extract_template_name?: string | null;
|
|
502
|
+
|
|
518
503
|
/**
|
|
519
504
|
* Configuration for the input data a job processes.
|
|
520
505
|
*/
|
|
@@ -600,61 +585,11 @@ export namespace JobGetResponse {
|
|
|
600
585
|
}
|
|
601
586
|
}
|
|
602
587
|
|
|
603
|
-
/**
|
|
604
|
-
* A single execution of a job.
|
|
605
|
-
*/
|
|
606
|
-
export interface JobRunResponse {
|
|
607
|
-
/**
|
|
608
|
-
* Unique run identifier (run\_<n>).
|
|
609
|
-
*/
|
|
610
|
-
id: string;
|
|
611
|
-
|
|
612
|
-
/**
|
|
613
|
-
* When the run was created.
|
|
614
|
-
*/
|
|
615
|
-
created_at: string;
|
|
616
|
-
|
|
617
|
-
/**
|
|
618
|
-
* Identifier of the job this run belongs to.
|
|
619
|
-
*/
|
|
620
|
-
job_id: string;
|
|
621
|
-
|
|
622
|
-
/**
|
|
623
|
-
* Current run status.
|
|
624
|
-
*/
|
|
625
|
-
status: 'PENDING' | 'RUNNING' | 'SUCCESS' | 'FAILED' | 'CANCELLED' | 'TIMEOUT' | 'WARNING';
|
|
626
|
-
|
|
627
|
-
/**
|
|
628
|
-
* What triggered the run: 'schedule' or 'manual'.
|
|
629
|
-
*/
|
|
630
|
-
triggered_by: 'schedule' | 'manual';
|
|
631
|
-
|
|
632
|
-
/**
|
|
633
|
-
* When the run finished.
|
|
634
|
-
*/
|
|
635
|
-
finished_at?: string | null;
|
|
636
|
-
|
|
637
|
-
/**
|
|
638
|
-
* Number of input records processed.
|
|
639
|
-
*/
|
|
640
|
-
input_count?: number | null;
|
|
641
|
-
|
|
642
|
-
/**
|
|
643
|
-
* Number of result records produced.
|
|
644
|
-
*/
|
|
645
|
-
result_count?: number | null;
|
|
646
|
-
|
|
647
|
-
/**
|
|
648
|
-
* When the run started executing.
|
|
649
|
-
*/
|
|
650
|
-
started_at?: string | null;
|
|
651
|
-
}
|
|
652
|
-
|
|
653
588
|
export interface JobCreateParams {
|
|
654
589
|
/**
|
|
655
|
-
* Name of the
|
|
590
|
+
* Name of the extract template to run.
|
|
656
591
|
*/
|
|
657
|
-
|
|
592
|
+
extract_template_name: string;
|
|
658
593
|
|
|
659
594
|
/**
|
|
660
595
|
* Job name.
|
|
@@ -833,19 +768,9 @@ export namespace JobUpdateParams {
|
|
|
833
768
|
}
|
|
834
769
|
|
|
835
770
|
export interface JobListParams {
|
|
836
|
-
|
|
837
|
-
* Filter by agent name
|
|
838
|
-
*/
|
|
839
|
-
agent_name?: string | null;
|
|
771
|
+
limit?: number;
|
|
840
772
|
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
per_page?: number;
|
|
844
|
-
|
|
845
|
-
/**
|
|
846
|
-
* Search by name or display name
|
|
847
|
-
*/
|
|
848
|
-
q?: string | null;
|
|
773
|
+
offset?: number;
|
|
849
774
|
}
|
|
850
775
|
|
|
851
776
|
Jobs.Runs = Runs;
|
|
@@ -856,7 +781,6 @@ export declare namespace Jobs {
|
|
|
856
781
|
type JobUpdateResponse as JobUpdateResponse,
|
|
857
782
|
type JobListResponse as JobListResponse,
|
|
858
783
|
type JobGetResponse as JobGetResponse,
|
|
859
|
-
type JobRunResponse as JobRunResponse,
|
|
860
784
|
type JobCreateParams as JobCreateParams,
|
|
861
785
|
type JobUpdateParams as JobUpdateParams,
|
|
862
786
|
type JobListParams as JobListParams,
|
|
@@ -864,6 +788,7 @@ export declare namespace Jobs {
|
|
|
864
788
|
|
|
865
789
|
export {
|
|
866
790
|
Runs as Runs,
|
|
791
|
+
type RunCreateResponse as RunCreateResponse,
|
|
867
792
|
type RunListResponse as RunListResponse,
|
|
868
793
|
type RunCancelResponse as RunCancelResponse,
|
|
869
794
|
type RunGetResponse as RunGetResponse,
|