@nimble-way/nimble-js 0.17.0 → 0.18.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 +8 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent.d.mts +7 -3
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +7 -3
- package/resources/agent.d.ts.map +1 -1
- package/resources/batches.d.mts +6 -2
- package/resources/batches.d.mts.map +1 -1
- package/resources/batches.d.ts +6 -2
- package/resources/batches.d.ts.map +1 -1
- package/resources/crawl.d.mts +10 -1
- package/resources/crawl.d.mts.map +1 -1
- package/resources/crawl.d.ts +10 -1
- package/resources/crawl.d.ts.map +1 -1
- package/resources/fast-serp.d.mts +0 -305
- package/resources/fast-serp.d.mts.map +1 -1
- package/resources/fast-serp.d.ts +0 -305
- package/resources/fast-serp.d.ts.map +1 -1
- package/resources/fast-serp.js +0 -13
- package/resources/fast-serp.js.map +1 -1
- package/resources/fast-serp.mjs +0 -13
- package/resources/fast-serp.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/jobs/jobs.d.mts +429 -0
- package/resources/jobs/jobs.d.mts.map +1 -1
- package/resources/jobs/jobs.d.ts +429 -0
- package/resources/jobs/jobs.d.ts.map +1 -1
- package/resources/jobs/jobs.js.map +1 -1
- package/resources/jobs/jobs.mjs.map +1 -1
- package/resources/jobs/runs/artifacts.d.mts +61 -0
- package/resources/jobs/runs/artifacts.d.mts.map +1 -1
- package/resources/jobs/runs/artifacts.d.ts +61 -0
- package/resources/jobs/runs/artifacts.d.ts.map +1 -1
- package/resources/jobs/runs/runs.d.mts +139 -0
- package/resources/jobs/runs/runs.d.mts.map +1 -1
- package/resources/jobs/runs/runs.d.ts +139 -0
- package/resources/jobs/runs/runs.d.ts.map +1 -1
- package/resources/jobs/runs/runs.js.map +1 -1
- package/resources/jobs/runs/runs.mjs.map +1 -1
- package/resources/media.d.mts +6 -2
- package/resources/media.d.mts.map +1 -1
- package/resources/media.d.ts +6 -2
- package/resources/media.d.ts.map +1 -1
- package/resources/serp.d.mts +12 -4
- package/resources/serp.d.mts.map +1 -1
- package/resources/serp.d.ts +12 -4
- package/resources/serp.d.ts.map +1 -1
- package/resources/task-agent/runs.d.mts +62 -22
- package/resources/task-agent/runs.d.mts.map +1 -1
- package/resources/task-agent/runs.d.ts +62 -22
- package/resources/task-agent/runs.d.ts.map +1 -1
- package/resources/tasks.d.mts +12 -4
- package/resources/tasks.d.mts.map +1 -1
- package/resources/tasks.d.ts +12 -4
- package/resources/tasks.d.ts.map +1 -1
- package/resources/top-level.d.mts +63 -10
- package/resources/top-level.d.mts.map +1 -1
- package/resources/top-level.d.ts +63 -10
- package/resources/top-level.d.ts.map +1 -1
- package/src/client.ts +2 -6
- package/src/resources/agent.ts +9 -4
- package/src/resources/batches.ts +7 -2
- package/src/resources/crawl.ts +19 -1
- package/src/resources/fast-serp.ts +1 -461
- package/src/resources/index.ts +1 -1
- package/src/resources/jobs/jobs.ts +429 -0
- package/src/resources/jobs/runs/artifacts.ts +61 -0
- package/src/resources/jobs/runs/runs.ts +139 -0
- package/src/resources/media.ts +7 -2
- package/src/resources/serp.ts +14 -4
- package/src/resources/task-agent/runs.ts +90 -26
- package/src/resources/tasks.ts +14 -4
- package/src/resources/top-level.ts +100 -10
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -50,43 +50,104 @@ export class Artifacts extends APIResource {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
/**
|
|
54
|
+
* Artifacts produced by a run.
|
|
55
|
+
*/
|
|
53
56
|
export interface ArtifactListResponse {
|
|
57
|
+
/**
|
|
58
|
+
* Artifacts produced by the run.
|
|
59
|
+
*/
|
|
54
60
|
items: Array<ArtifactListResponse.Item>;
|
|
55
61
|
}
|
|
56
62
|
|
|
57
63
|
export namespace ArtifactListResponse {
|
|
64
|
+
/**
|
|
65
|
+
* A file produced by a run.
|
|
66
|
+
*
|
|
67
|
+
* Intentional subset of the bakery Artifact: `data_format` and `s3_path` are
|
|
68
|
+
* hidden from SDK consumers — internal storage details, not part of the public
|
|
69
|
+
* contract. Use the download-url endpoint to fetch the file. Bakery emits `id` as
|
|
70
|
+
* an int (crawlit native); the SDK contract is a string.
|
|
71
|
+
*/
|
|
58
72
|
export interface Item {
|
|
73
|
+
/**
|
|
74
|
+
* Artifact identifier.
|
|
75
|
+
*/
|
|
59
76
|
id: string;
|
|
60
77
|
|
|
78
|
+
/**
|
|
79
|
+
* When the artifact was created.
|
|
80
|
+
*/
|
|
61
81
|
created_at: string;
|
|
62
82
|
|
|
63
83
|
description: string;
|
|
64
84
|
|
|
85
|
+
/**
|
|
86
|
+
* Artifact type.
|
|
87
|
+
*/
|
|
65
88
|
type: string;
|
|
66
89
|
}
|
|
67
90
|
}
|
|
68
91
|
|
|
92
|
+
/**
|
|
93
|
+
* A pre-signed URL for downloading an artifact.
|
|
94
|
+
*/
|
|
69
95
|
export interface ArtifactDownloadURLResponse {
|
|
96
|
+
/**
|
|
97
|
+
* When the download URL expires.
|
|
98
|
+
*/
|
|
70
99
|
expires_at: string;
|
|
71
100
|
|
|
101
|
+
/**
|
|
102
|
+
* Pre-signed URL to download the artifact.
|
|
103
|
+
*/
|
|
72
104
|
url: string;
|
|
73
105
|
}
|
|
74
106
|
|
|
107
|
+
/**
|
|
108
|
+
* A file produced by a run.
|
|
109
|
+
*
|
|
110
|
+
* Intentional subset of the bakery Artifact: `data_format` and `s3_path` are
|
|
111
|
+
* hidden from SDK consumers — internal storage details, not part of the public
|
|
112
|
+
* contract. Use the download-url endpoint to fetch the file. Bakery emits `id` as
|
|
113
|
+
* an int (crawlit native); the SDK contract is a string.
|
|
114
|
+
*/
|
|
75
115
|
export interface ArtifactGetResponse {
|
|
116
|
+
/**
|
|
117
|
+
* Artifact identifier.
|
|
118
|
+
*/
|
|
76
119
|
id: string;
|
|
77
120
|
|
|
121
|
+
/**
|
|
122
|
+
* When the artifact was created.
|
|
123
|
+
*/
|
|
78
124
|
created_at: string;
|
|
79
125
|
|
|
80
126
|
description: string;
|
|
81
127
|
|
|
128
|
+
/**
|
|
129
|
+
* Artifact type.
|
|
130
|
+
*/
|
|
82
131
|
type: string;
|
|
83
132
|
}
|
|
84
133
|
|
|
134
|
+
/**
|
|
135
|
+
* A tabular preview of an artifact's contents.
|
|
136
|
+
*/
|
|
85
137
|
export interface ArtifactPreviewResponse {
|
|
138
|
+
/**
|
|
139
|
+
* Column names in the preview.
|
|
140
|
+
*/
|
|
86
141
|
columns: Array<string>;
|
|
87
142
|
|
|
143
|
+
/**
|
|
144
|
+
* Total number of rows in the artifact.
|
|
145
|
+
*/
|
|
88
146
|
row_count: number;
|
|
89
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Sample rows from the artifact.
|
|
150
|
+
*/
|
|
90
151
|
rows: Array<{ [key: string]: unknown }>;
|
|
91
152
|
}
|
|
92
153
|
|
|
@@ -45,100 +45,239 @@ export class Runs extends APIResource {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* A page of job runs.
|
|
50
|
+
*/
|
|
48
51
|
export interface RunListResponse {
|
|
52
|
+
/**
|
|
53
|
+
* Runs on this page.
|
|
54
|
+
*/
|
|
49
55
|
items: Array<RunListResponse.Item>;
|
|
50
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Current page number.
|
|
59
|
+
*/
|
|
51
60
|
page: number;
|
|
52
61
|
|
|
62
|
+
/**
|
|
63
|
+
* Number of items per page.
|
|
64
|
+
*/
|
|
53
65
|
per_page: number;
|
|
54
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Total number of runs matching the query.
|
|
69
|
+
*/
|
|
55
70
|
total: number;
|
|
56
71
|
}
|
|
57
72
|
|
|
58
73
|
export namespace RunListResponse {
|
|
74
|
+
/**
|
|
75
|
+
* A single execution of a job.
|
|
76
|
+
*/
|
|
59
77
|
export interface Item {
|
|
78
|
+
/**
|
|
79
|
+
* Unique run identifier (run\_<n>).
|
|
80
|
+
*/
|
|
60
81
|
id: string;
|
|
61
82
|
|
|
83
|
+
/**
|
|
84
|
+
* When the run was created.
|
|
85
|
+
*/
|
|
62
86
|
created_at: string;
|
|
63
87
|
|
|
88
|
+
/**
|
|
89
|
+
* Identifier of the job this run belongs to.
|
|
90
|
+
*/
|
|
64
91
|
job_id: string;
|
|
65
92
|
|
|
93
|
+
/**
|
|
94
|
+
* Current run status.
|
|
95
|
+
*/
|
|
66
96
|
status: 'PENDING' | 'RUNNING' | 'SUCCESS' | 'FAILED' | 'CANCELLED' | 'TIMEOUT' | 'WARNING';
|
|
67
97
|
|
|
98
|
+
/**
|
|
99
|
+
* What triggered the run: 'schedule' or 'manual'.
|
|
100
|
+
*/
|
|
68
101
|
triggered_by: 'schedule' | 'manual';
|
|
69
102
|
|
|
103
|
+
/**
|
|
104
|
+
* When the run finished.
|
|
105
|
+
*/
|
|
70
106
|
finished_at?: string | null;
|
|
71
107
|
|
|
108
|
+
/**
|
|
109
|
+
* Number of input records processed.
|
|
110
|
+
*/
|
|
72
111
|
input_count?: number | null;
|
|
73
112
|
|
|
113
|
+
/**
|
|
114
|
+
* Number of result records produced.
|
|
115
|
+
*/
|
|
74
116
|
result_count?: number | null;
|
|
75
117
|
|
|
118
|
+
/**
|
|
119
|
+
* When the run started executing.
|
|
120
|
+
*/
|
|
76
121
|
started_at?: string | null;
|
|
77
122
|
}
|
|
78
123
|
}
|
|
79
124
|
|
|
125
|
+
/**
|
|
126
|
+
* Result of cancelling a run.
|
|
127
|
+
*/
|
|
80
128
|
export interface RunCancelResponse {
|
|
129
|
+
/**
|
|
130
|
+
* Identifier of the cancelled run.
|
|
131
|
+
*/
|
|
81
132
|
id: string;
|
|
82
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Run status after cancellation.
|
|
136
|
+
*/
|
|
83
137
|
status: 'PENDING' | 'RUNNING' | 'SUCCESS' | 'FAILED' | 'CANCELLED' | 'TIMEOUT' | 'WARNING';
|
|
84
138
|
}
|
|
85
139
|
|
|
140
|
+
/**
|
|
141
|
+
* Full detail for a single run.
|
|
142
|
+
*/
|
|
86
143
|
export interface RunGetResponse {
|
|
144
|
+
/**
|
|
145
|
+
* Unique run identifier (run\_<n>).
|
|
146
|
+
*/
|
|
87
147
|
id: string;
|
|
88
148
|
|
|
149
|
+
/**
|
|
150
|
+
* When the run was created.
|
|
151
|
+
*/
|
|
89
152
|
created_at: string;
|
|
90
153
|
|
|
154
|
+
/**
|
|
155
|
+
* Context of the job this run belongs to.
|
|
156
|
+
*/
|
|
91
157
|
job: RunGetResponse.Job;
|
|
92
158
|
|
|
159
|
+
/**
|
|
160
|
+
* Current run status.
|
|
161
|
+
*/
|
|
93
162
|
status: 'PENDING' | 'RUNNING' | 'SUCCESS' | 'FAILED' | 'CANCELLED' | 'TIMEOUT' | 'WARNING';
|
|
94
163
|
|
|
164
|
+
/**
|
|
165
|
+
* What triggered the run: 'schedule' or 'manual'.
|
|
166
|
+
*/
|
|
95
167
|
triggered_by: 'schedule' | 'manual';
|
|
96
168
|
|
|
169
|
+
/**
|
|
170
|
+
* Error details for a failed run.
|
|
171
|
+
*/
|
|
97
172
|
error?: RunGetResponse.Error | null;
|
|
98
173
|
|
|
174
|
+
/**
|
|
175
|
+
* When the run finished.
|
|
176
|
+
*/
|
|
99
177
|
finished_at?: string | null;
|
|
100
178
|
|
|
179
|
+
/**
|
|
180
|
+
* Sample of the run's input records.
|
|
181
|
+
*/
|
|
101
182
|
inputs_sample?: Array<unknown> | null;
|
|
102
183
|
|
|
184
|
+
/**
|
|
185
|
+
* When the run started executing.
|
|
186
|
+
*/
|
|
103
187
|
started_at?: string | null;
|
|
104
188
|
|
|
189
|
+
/**
|
|
190
|
+
* Aggregate metrics for a run.
|
|
191
|
+
*/
|
|
105
192
|
summary?: RunGetResponse.Summary | null;
|
|
106
193
|
}
|
|
107
194
|
|
|
108
195
|
export namespace RunGetResponse {
|
|
196
|
+
/**
|
|
197
|
+
* Context of the job this run belongs to.
|
|
198
|
+
*/
|
|
109
199
|
export interface Job {
|
|
200
|
+
/**
|
|
201
|
+
* Unique job identifier (job\_<n>).
|
|
202
|
+
*/
|
|
110
203
|
id: string;
|
|
111
204
|
|
|
205
|
+
/**
|
|
206
|
+
* Internal job name.
|
|
207
|
+
*/
|
|
112
208
|
name: string;
|
|
113
209
|
|
|
210
|
+
/**
|
|
211
|
+
* Name of the agent this job runs.
|
|
212
|
+
*/
|
|
114
213
|
agent_name?: string | null;
|
|
115
214
|
|
|
215
|
+
/**
|
|
216
|
+
* Human-friendly job name shown in the UI.
|
|
217
|
+
*/
|
|
116
218
|
display_name?: string | null;
|
|
117
219
|
|
|
220
|
+
/**
|
|
221
|
+
* Cron-based schedule controlling when a job runs automatically.
|
|
222
|
+
*/
|
|
118
223
|
schedule?: Job.Schedule | null;
|
|
119
224
|
}
|
|
120
225
|
|
|
121
226
|
export namespace Job {
|
|
227
|
+
/**
|
|
228
|
+
* Cron-based schedule controlling when a job runs automatically.
|
|
229
|
+
*/
|
|
122
230
|
export interface Schedule {
|
|
231
|
+
/**
|
|
232
|
+
* Cron expression defining when the job runs.
|
|
233
|
+
*/
|
|
123
234
|
cron: string;
|
|
124
235
|
|
|
236
|
+
/**
|
|
237
|
+
* Whether the schedule is currently active.
|
|
238
|
+
*/
|
|
125
239
|
enabled: boolean;
|
|
126
240
|
}
|
|
127
241
|
}
|
|
128
242
|
|
|
243
|
+
/**
|
|
244
|
+
* Error details for a failed run.
|
|
245
|
+
*/
|
|
129
246
|
export interface Error {
|
|
247
|
+
/**
|
|
248
|
+
* Sample of individual error records from the run.
|
|
249
|
+
*/
|
|
130
250
|
errors_sample?: Array<{ [key: string]: unknown }> | null;
|
|
131
251
|
|
|
252
|
+
/**
|
|
253
|
+
* Human-readable error message.
|
|
254
|
+
*/
|
|
132
255
|
message?: string | null;
|
|
133
256
|
|
|
257
|
+
/**
|
|
258
|
+
* Pipeline step where the error occurred.
|
|
259
|
+
*/
|
|
134
260
|
step?: string | null;
|
|
135
261
|
}
|
|
136
262
|
|
|
263
|
+
/**
|
|
264
|
+
* Aggregate metrics for a run.
|
|
265
|
+
*/
|
|
137
266
|
export interface Summary {
|
|
267
|
+
/**
|
|
268
|
+
* Number of input records processed.
|
|
269
|
+
*/
|
|
138
270
|
input_count?: number | null;
|
|
139
271
|
|
|
272
|
+
/**
|
|
273
|
+
* Fraction of inputs that produced a result (result_count / input_count), from 0.0
|
|
274
|
+
* to 1.0.
|
|
275
|
+
*/
|
|
140
276
|
match_rate?: number | null;
|
|
141
277
|
|
|
278
|
+
/**
|
|
279
|
+
* Number of result records produced.
|
|
280
|
+
*/
|
|
142
281
|
result_count?: number | null;
|
|
143
282
|
}
|
|
144
283
|
}
|
package/src/resources/media.ts
CHANGED
|
@@ -440,7 +440,7 @@ export namespace MediaRunAsyncResponse {
|
|
|
440
440
|
/**
|
|
441
441
|
* Current state of the task.
|
|
442
442
|
*/
|
|
443
|
-
state: 'pending' | 'success' | 'error';
|
|
443
|
+
state: 'pending' | 'queued' | 'in_progress' | 'success' | 'error';
|
|
444
444
|
|
|
445
445
|
/**
|
|
446
446
|
* URL for checking the task status.
|
|
@@ -452,7 +452,7 @@ export namespace MediaRunAsyncResponse {
|
|
|
452
452
|
*/
|
|
453
453
|
account_name?: string;
|
|
454
454
|
|
|
455
|
-
api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract' | 'fast-serp';
|
|
455
|
+
api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract' | 'fast-serp' | 'labs';
|
|
456
456
|
|
|
457
457
|
/**
|
|
458
458
|
* Batch ID if this task is part of a batch.
|
|
@@ -484,6 +484,11 @@ export namespace MediaRunAsyncResponse {
|
|
|
484
484
|
*/
|
|
485
485
|
output_url?: string;
|
|
486
486
|
|
|
487
|
+
/**
|
|
488
|
+
* Queue name the task was submitted to.
|
|
489
|
+
*/
|
|
490
|
+
queue?: string;
|
|
491
|
+
|
|
487
492
|
/**
|
|
488
493
|
* HTTP status code from the task execution.
|
|
489
494
|
*/
|
package/src/resources/serp.ts
CHANGED
|
@@ -454,7 +454,7 @@ export namespace SerpRunAsyncResponse {
|
|
|
454
454
|
/**
|
|
455
455
|
* Current state of the task.
|
|
456
456
|
*/
|
|
457
|
-
state: 'pending' | 'success' | 'error';
|
|
457
|
+
state: 'pending' | 'queued' | 'in_progress' | 'success' | 'error';
|
|
458
458
|
|
|
459
459
|
/**
|
|
460
460
|
* URL for checking the task status.
|
|
@@ -466,7 +466,7 @@ export namespace SerpRunAsyncResponse {
|
|
|
466
466
|
*/
|
|
467
467
|
account_name?: string;
|
|
468
468
|
|
|
469
|
-
api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract' | 'fast-serp';
|
|
469
|
+
api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract' | 'fast-serp' | 'labs';
|
|
470
470
|
|
|
471
471
|
/**
|
|
472
472
|
* Batch ID if this task is part of a batch.
|
|
@@ -498,6 +498,11 @@ export namespace SerpRunAsyncResponse {
|
|
|
498
498
|
*/
|
|
499
499
|
output_url?: string;
|
|
500
500
|
|
|
501
|
+
/**
|
|
502
|
+
* Queue name the task was submitted to.
|
|
503
|
+
*/
|
|
504
|
+
queue?: string;
|
|
505
|
+
|
|
501
506
|
/**
|
|
502
507
|
* HTTP status code from the task execution.
|
|
503
508
|
*/
|
|
@@ -547,7 +552,7 @@ export namespace SerpRunBatchResponse {
|
|
|
547
552
|
/**
|
|
548
553
|
* Current state of the task.
|
|
549
554
|
*/
|
|
550
|
-
state: 'pending' | 'success' | 'error';
|
|
555
|
+
state: 'pending' | 'queued' | 'in_progress' | 'success' | 'error';
|
|
551
556
|
|
|
552
557
|
/**
|
|
553
558
|
* URL for checking the task status.
|
|
@@ -559,7 +564,7 @@ export namespace SerpRunBatchResponse {
|
|
|
559
564
|
*/
|
|
560
565
|
account_name?: string;
|
|
561
566
|
|
|
562
|
-
api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract' | 'fast-serp';
|
|
567
|
+
api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract' | 'fast-serp' | 'labs';
|
|
563
568
|
|
|
564
569
|
/**
|
|
565
570
|
* Batch ID if this task is part of a batch.
|
|
@@ -591,6 +596,11 @@ export namespace SerpRunBatchResponse {
|
|
|
591
596
|
*/
|
|
592
597
|
output_url?: string;
|
|
593
598
|
|
|
599
|
+
/**
|
|
600
|
+
* Queue name the task was submitted to.
|
|
601
|
+
*/
|
|
602
|
+
queue?: string;
|
|
603
|
+
|
|
594
604
|
/**
|
|
595
605
|
* HTTP status code from the task execution.
|
|
596
606
|
*/
|
|
@@ -186,33 +186,65 @@ export namespace RunGetResultResponse {
|
|
|
186
186
|
*/
|
|
187
187
|
content: string;
|
|
188
188
|
|
|
189
|
-
|
|
189
|
+
trust: AgentRunTextOutput.Trust;
|
|
190
190
|
|
|
191
191
|
type?: 'text';
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
export namespace AgentRunTextOutput {
|
|
195
|
-
export interface
|
|
196
|
-
|
|
195
|
+
export interface Trust {
|
|
196
|
+
claims: Array<Trust.Claim>;
|
|
197
197
|
|
|
198
|
-
|
|
198
|
+
confidence: 'high' | 'medium' | 'low';
|
|
199
199
|
|
|
200
|
-
|
|
200
|
+
reasoning: string;
|
|
201
201
|
|
|
202
|
-
|
|
202
|
+
sources: Array<Trust.Source>;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
export namespace
|
|
206
|
-
export interface
|
|
207
|
-
|
|
205
|
+
export namespace Trust {
|
|
206
|
+
export interface Claim {
|
|
207
|
+
callout: number;
|
|
208
208
|
|
|
209
|
-
|
|
209
|
+
citations: Array<Claim.Citation>;
|
|
210
210
|
|
|
211
|
-
|
|
211
|
+
confidence: 'high' | 'medium' | 'low';
|
|
212
212
|
|
|
213
|
-
|
|
213
|
+
reasoning: string;
|
|
214
|
+
|
|
215
|
+
source?: Claim.Source | null;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export namespace Claim {
|
|
219
|
+
export interface Citation {
|
|
220
|
+
url: string;
|
|
221
|
+
|
|
222
|
+
excerpts?: Array<string> | null;
|
|
223
|
+
|
|
224
|
+
extract_template_name?: string | null;
|
|
225
|
+
|
|
226
|
+
title?: string | null;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export interface Source {
|
|
230
|
+
type: 'primary' | 'secondary';
|
|
214
231
|
|
|
215
|
-
|
|
232
|
+
url: string;
|
|
233
|
+
|
|
234
|
+
extract_template_name?: string | null;
|
|
235
|
+
|
|
236
|
+
title?: string | null;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export interface Source {
|
|
241
|
+
type: 'primary' | 'secondary';
|
|
242
|
+
|
|
243
|
+
url: string;
|
|
244
|
+
|
|
245
|
+
extract_template_name?: string | null;
|
|
246
|
+
|
|
247
|
+
title?: string | null;
|
|
216
248
|
}
|
|
217
249
|
}
|
|
218
250
|
}
|
|
@@ -220,33 +252,65 @@ export namespace RunGetResultResponse {
|
|
|
220
252
|
export interface AgentRunJsonOutput {
|
|
221
253
|
content: { [key: string]: unknown } | Array<unknown>;
|
|
222
254
|
|
|
223
|
-
|
|
255
|
+
trust: AgentRunJsonOutput.Trust;
|
|
224
256
|
|
|
225
257
|
type?: 'json';
|
|
226
258
|
}
|
|
227
259
|
|
|
228
260
|
export namespace AgentRunJsonOutput {
|
|
229
|
-
export interface
|
|
230
|
-
|
|
261
|
+
export interface Trust {
|
|
262
|
+
claims: Array<Trust.Claim>;
|
|
231
263
|
|
|
232
|
-
|
|
264
|
+
confidence: 'high' | 'medium' | 'low';
|
|
233
265
|
|
|
234
|
-
|
|
266
|
+
reasoning: string;
|
|
235
267
|
|
|
236
|
-
|
|
268
|
+
sources: Array<Trust.Source>;
|
|
237
269
|
}
|
|
238
270
|
|
|
239
|
-
export namespace
|
|
240
|
-
export interface
|
|
241
|
-
|
|
271
|
+
export namespace Trust {
|
|
272
|
+
export interface Claim {
|
|
273
|
+
citations: Array<Claim.Citation>;
|
|
242
274
|
|
|
243
|
-
|
|
275
|
+
confidence: 'high' | 'medium' | 'low';
|
|
244
276
|
|
|
245
|
-
|
|
277
|
+
path: string;
|
|
246
278
|
|
|
247
|
-
|
|
279
|
+
reasoning: string;
|
|
280
|
+
|
|
281
|
+
source?: Claim.Source | null;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export namespace Claim {
|
|
285
|
+
export interface Citation {
|
|
286
|
+
url: string;
|
|
287
|
+
|
|
288
|
+
excerpts?: Array<string> | null;
|
|
289
|
+
|
|
290
|
+
extract_template_name?: string | null;
|
|
291
|
+
|
|
292
|
+
title?: string | null;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export interface Source {
|
|
296
|
+
type: 'primary' | 'secondary';
|
|
248
297
|
|
|
249
|
-
|
|
298
|
+
url: string;
|
|
299
|
+
|
|
300
|
+
extract_template_name?: string | null;
|
|
301
|
+
|
|
302
|
+
title?: string | null;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
export interface Source {
|
|
307
|
+
type: 'primary' | 'secondary';
|
|
308
|
+
|
|
309
|
+
url: string;
|
|
310
|
+
|
|
311
|
+
extract_template_name?: string | null;
|
|
312
|
+
|
|
313
|
+
title?: string | null;
|
|
250
314
|
}
|
|
251
315
|
}
|
|
252
316
|
}
|
package/src/resources/tasks.ts
CHANGED
|
@@ -65,7 +65,7 @@ export namespace TaskListResponse {
|
|
|
65
65
|
/**
|
|
66
66
|
* Current state of the task.
|
|
67
67
|
*/
|
|
68
|
-
state: 'pending' | 'success' | 'error';
|
|
68
|
+
state: 'pending' | 'queued' | 'in_progress' | 'success' | 'error';
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* URL for checking the task status.
|
|
@@ -77,7 +77,7 @@ export namespace TaskListResponse {
|
|
|
77
77
|
*/
|
|
78
78
|
account_name?: string;
|
|
79
79
|
|
|
80
|
-
api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract' | 'fast-serp';
|
|
80
|
+
api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract' | 'fast-serp' | 'labs';
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
83
|
* Batch ID if this task is part of a batch.
|
|
@@ -109,6 +109,11 @@ export namespace TaskListResponse {
|
|
|
109
109
|
*/
|
|
110
110
|
output_url?: string;
|
|
111
111
|
|
|
112
|
+
/**
|
|
113
|
+
* Queue name the task was submitted to.
|
|
114
|
+
*/
|
|
115
|
+
queue?: string;
|
|
116
|
+
|
|
112
117
|
/**
|
|
113
118
|
* HTTP status code from the task execution.
|
|
114
119
|
*/
|
|
@@ -162,7 +167,7 @@ export namespace TaskGetResponse {
|
|
|
162
167
|
/**
|
|
163
168
|
* Current state of the task.
|
|
164
169
|
*/
|
|
165
|
-
state: 'pending' | 'success' | 'error';
|
|
170
|
+
state: 'pending' | 'queued' | 'in_progress' | 'success' | 'error';
|
|
166
171
|
|
|
167
172
|
/**
|
|
168
173
|
* URL for checking the task status.
|
|
@@ -174,7 +179,7 @@ export namespace TaskGetResponse {
|
|
|
174
179
|
*/
|
|
175
180
|
account_name?: string;
|
|
176
181
|
|
|
177
|
-
api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract' | 'fast-serp';
|
|
182
|
+
api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract' | 'fast-serp' | 'labs';
|
|
178
183
|
|
|
179
184
|
/**
|
|
180
185
|
* Batch ID if this task is part of a batch.
|
|
@@ -206,6 +211,11 @@ export namespace TaskGetResponse {
|
|
|
206
211
|
*/
|
|
207
212
|
output_url?: string;
|
|
208
213
|
|
|
214
|
+
/**
|
|
215
|
+
* Queue name the task was submitted to.
|
|
216
|
+
*/
|
|
217
|
+
queue?: string;
|
|
218
|
+
|
|
209
219
|
/**
|
|
210
220
|
* HTTP status code from the task execution.
|
|
211
221
|
*/
|