@nimble-way/nimble-js 0.12.0 → 0.14.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 +59 -0
- package/client.d.mts +16 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +16 -1
- package/client.d.ts.map +1 -1
- package/client.js +26 -1
- package/client.js.map +1 -1
- package/client.mjs +26 -1
- package/client.mjs.map +1 -1
- package/internal/types.d.mts +6 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +6 -6
- package/internal/types.d.ts.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.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 +2 -0
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +2 -0
- package/internal/utils/log.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent.d.mts +121 -10
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +121 -10
- package/resources/agent.d.ts.map +1 -1
- package/resources/agent.js +51 -0
- package/resources/agent.js.map +1 -1
- package/resources/agent.mjs +51 -0
- package/resources/agent.mjs.map +1 -1
- package/resources/crawl.d.mts +32 -2
- package/resources/crawl.d.mts.map +1 -1
- package/resources/crawl.d.ts +32 -2
- package/resources/crawl.d.ts.map +1 -1
- package/resources/crawl.js +24 -0
- package/resources/crawl.js.map +1 -1
- package/resources/crawl.mjs +24 -0
- package/resources/crawl.mjs.map +1 -1
- package/resources/domain-knowledge.d.mts +50 -0
- package/resources/domain-knowledge.d.mts.map +1 -0
- package/resources/domain-knowledge.d.ts +50 -0
- package/resources/domain-knowledge.d.ts.map +1 -0
- package/resources/domain-knowledge.js +16 -0
- package/resources/domain-knowledge.js.map +1 -0
- package/resources/domain-knowledge.mjs +12 -0
- package/resources/domain-knowledge.mjs.map +1 -0
- package/resources/index.d.mts +3 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/media.d.mts +390 -0
- package/resources/media.d.mts.map +1 -0
- package/resources/media.d.ts +390 -0
- package/resources/media.d.ts.map +1 -0
- package/resources/media.js +35 -0
- package/resources/media.js.map +1 -0
- package/resources/media.mjs +31 -0
- package/resources/media.mjs.map +1 -0
- package/resources/serp.d.mts +694 -0
- package/resources/serp.d.mts.map +1 -0
- package/resources/serp.d.ts +694 -0
- package/resources/serp.d.ts.map +1 -0
- package/resources/serp.js +48 -0
- package/resources/serp.js.map +1 -0
- package/resources/serp.mjs +44 -0
- package/resources/serp.mjs.map +1 -0
- package/resources/top-level.d.mts +36 -8
- package/resources/top-level.d.mts.map +1 -1
- package/resources/top-level.d.ts +36 -8
- package/resources/top-level.d.ts.map +1 -1
- package/src/client.ts +75 -0
- package/src/internal/types.ts +6 -8
- package/src/internal/utils/env.ts +2 -2
- package/src/internal/utils/log.ts +2 -0
- package/src/resources/agent.ts +159 -11
- package/src/resources/crawl.ts +33 -2
- package/src/resources/domain-knowledge.ts +69 -0
- package/src/resources/index.ts +21 -0
- package/src/resources/media.ts +570 -0
- package/src/resources/serp.ts +977 -0
- package/src/resources/top-level.ts +41 -8
- 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
package/src/resources/agent.ts
CHANGED
|
@@ -8,6 +8,11 @@ import { path } from '../internal/utils/path';
|
|
|
8
8
|
export class Agent extends APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* List Agent Templates
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const agents = await client.agent.list();
|
|
15
|
+
* ```
|
|
11
16
|
*/
|
|
12
17
|
list(
|
|
13
18
|
query: AgentListParams | null | undefined = {},
|
|
@@ -18,6 +23,14 @@ export class Agent extends APIResource {
|
|
|
18
23
|
|
|
19
24
|
/**
|
|
20
25
|
* Create Agent Generation
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const response = await client.agent.generate({
|
|
30
|
+
* prompt: 'prompt',
|
|
31
|
+
* url: 'url',
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
21
34
|
*/
|
|
22
35
|
generate(body: AgentGenerateParams, options?: RequestOptions): APIPromise<AgentGenerateResponse> {
|
|
23
36
|
return this._client.post('/v1/agents/generations', { body, ...options });
|
|
@@ -25,6 +38,11 @@ export class Agent extends APIResource {
|
|
|
25
38
|
|
|
26
39
|
/**
|
|
27
40
|
* Get Agent Template
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const agent = await client.agent.get('template_name');
|
|
45
|
+
* ```
|
|
28
46
|
*/
|
|
29
47
|
get(templateName: string, options?: RequestOptions): APIPromise<AgentGetResponse> {
|
|
30
48
|
return this._client.get(path`/v1/agents/${templateName}`, options);
|
|
@@ -32,6 +50,13 @@ export class Agent extends APIResource {
|
|
|
32
50
|
|
|
33
51
|
/**
|
|
34
52
|
* Get Agent Generation
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const response = await client.agent.getGeneration(
|
|
57
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
58
|
+
* );
|
|
59
|
+
* ```
|
|
35
60
|
*/
|
|
36
61
|
getGeneration(generationID: string, options?: RequestOptions): APIPromise<AgentGetGenerationResponse> {
|
|
37
62
|
return this._client.get(path`/v1/agents/generations/${generationID}`, options);
|
|
@@ -39,6 +64,8 @@ export class Agent extends APIResource {
|
|
|
39
64
|
|
|
40
65
|
/**
|
|
41
66
|
* Publish Agent Version
|
|
67
|
+
*
|
|
68
|
+
* @deprecated
|
|
42
69
|
*/
|
|
43
70
|
publish(
|
|
44
71
|
agentName: string,
|
|
@@ -50,6 +77,14 @@ export class Agent extends APIResource {
|
|
|
50
77
|
|
|
51
78
|
/**
|
|
52
79
|
* Execute WSA Realtime Endpoint
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```ts
|
|
83
|
+
* const response = await client.agent.run({
|
|
84
|
+
* agent: 'agent',
|
|
85
|
+
* params: { foo: 'bar' },
|
|
86
|
+
* });
|
|
87
|
+
* ```
|
|
53
88
|
*/
|
|
54
89
|
run(body: AgentRunParams, options?: RequestOptions): APIPromise<AgentRunResponse> {
|
|
55
90
|
return this._client.post('/v1/agents/run', { body, ...options });
|
|
@@ -57,6 +92,14 @@ export class Agent extends APIResource {
|
|
|
57
92
|
|
|
58
93
|
/**
|
|
59
94
|
* Execute WSA Async Endpoint
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```ts
|
|
98
|
+
* const response = await client.agent.runAsync({
|
|
99
|
+
* agent: 'agent',
|
|
100
|
+
* params: { foo: 'bar' },
|
|
101
|
+
* });
|
|
102
|
+
* ```
|
|
60
103
|
*/
|
|
61
104
|
runAsync(body: AgentRunAsyncParams, options?: RequestOptions): APIPromise<AgentRunAsyncResponse> {
|
|
62
105
|
return this._client.post('/v1/agents/async', { body, ...options });
|
|
@@ -64,6 +107,14 @@ export class Agent extends APIResource {
|
|
|
64
107
|
|
|
65
108
|
/**
|
|
66
109
|
* Execute WSA Batch Endpoint
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```ts
|
|
113
|
+
* const response = await client.agent.runBatch({
|
|
114
|
+
* inputs: [{}],
|
|
115
|
+
* shared_inputs: { agent: 'agent' },
|
|
116
|
+
* });
|
|
117
|
+
* ```
|
|
67
118
|
*/
|
|
68
119
|
runBatch(body: AgentRunBatchParams, options?: RequestOptions): APIPromise<AgentRunBatchResponse> {
|
|
69
120
|
return this._client.post('/v1/agents/batch', { body, ...options });
|
|
@@ -105,7 +156,7 @@ export interface AgentGenerateResponse {
|
|
|
105
156
|
|
|
106
157
|
error?: string | null;
|
|
107
158
|
|
|
108
|
-
generated_version?:
|
|
159
|
+
generated_version?: AgentGenerateResponse.GeneratedVersion | null;
|
|
109
160
|
|
|
110
161
|
generated_version_id?: string | null;
|
|
111
162
|
|
|
@@ -116,6 +167,46 @@ export interface AgentGenerateResponse {
|
|
|
116
167
|
summary?: string | null;
|
|
117
168
|
}
|
|
118
169
|
|
|
170
|
+
export namespace AgentGenerateResponse {
|
|
171
|
+
export interface GeneratedVersion {
|
|
172
|
+
id: string;
|
|
173
|
+
|
|
174
|
+
agent_name: string;
|
|
175
|
+
|
|
176
|
+
created_at: string;
|
|
177
|
+
|
|
178
|
+
input_schema: unknown;
|
|
179
|
+
|
|
180
|
+
metadata: GeneratedVersion.Metadata;
|
|
181
|
+
|
|
182
|
+
output_schema: unknown;
|
|
183
|
+
|
|
184
|
+
steps: Array<unknown>;
|
|
185
|
+
|
|
186
|
+
version_number: number;
|
|
187
|
+
|
|
188
|
+
output_sample_data?: unknown;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export namespace GeneratedVersion {
|
|
192
|
+
export interface Metadata {
|
|
193
|
+
data_source?: string | null;
|
|
194
|
+
|
|
195
|
+
description?: string | null;
|
|
196
|
+
|
|
197
|
+
display_name?: string | null;
|
|
198
|
+
|
|
199
|
+
domain?: string | null;
|
|
200
|
+
|
|
201
|
+
entity_type?: string | null;
|
|
202
|
+
|
|
203
|
+
tags?: Array<string>;
|
|
204
|
+
|
|
205
|
+
vertical?: string | null;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
119
210
|
export interface AgentGetResponse {
|
|
120
211
|
display_name: string;
|
|
121
212
|
|
|
@@ -148,14 +239,16 @@ export namespace AgentGetResponse {
|
|
|
148
239
|
}
|
|
149
240
|
|
|
150
241
|
export interface InputProperty {
|
|
151
|
-
default?: string | null;
|
|
242
|
+
default?: string | boolean | number | null;
|
|
152
243
|
|
|
153
244
|
description?: string | null;
|
|
154
245
|
|
|
155
|
-
examples?: Array<
|
|
246
|
+
examples?: Array<unknown> | null;
|
|
156
247
|
|
|
157
248
|
is_localization_param?: boolean;
|
|
158
249
|
|
|
250
|
+
is_pagination_param?: boolean;
|
|
251
|
+
|
|
159
252
|
name?: string;
|
|
160
253
|
|
|
161
254
|
required?: boolean;
|
|
@@ -179,7 +272,7 @@ export interface AgentGetGenerationResponse {
|
|
|
179
272
|
|
|
180
273
|
error?: string | null;
|
|
181
274
|
|
|
182
|
-
generated_version?:
|
|
275
|
+
generated_version?: AgentGetGenerationResponse.GeneratedVersion | null;
|
|
183
276
|
|
|
184
277
|
generated_version_id?: string | null;
|
|
185
278
|
|
|
@@ -190,6 +283,46 @@ export interface AgentGetGenerationResponse {
|
|
|
190
283
|
summary?: string | null;
|
|
191
284
|
}
|
|
192
285
|
|
|
286
|
+
export namespace AgentGetGenerationResponse {
|
|
287
|
+
export interface GeneratedVersion {
|
|
288
|
+
id: string;
|
|
289
|
+
|
|
290
|
+
agent_name: string;
|
|
291
|
+
|
|
292
|
+
created_at: string;
|
|
293
|
+
|
|
294
|
+
input_schema: unknown;
|
|
295
|
+
|
|
296
|
+
metadata: GeneratedVersion.Metadata;
|
|
297
|
+
|
|
298
|
+
output_schema: unknown;
|
|
299
|
+
|
|
300
|
+
steps: Array<unknown>;
|
|
301
|
+
|
|
302
|
+
version_number: number;
|
|
303
|
+
|
|
304
|
+
output_sample_data?: unknown;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export namespace GeneratedVersion {
|
|
308
|
+
export interface Metadata {
|
|
309
|
+
data_source?: string | null;
|
|
310
|
+
|
|
311
|
+
description?: string | null;
|
|
312
|
+
|
|
313
|
+
display_name?: string | null;
|
|
314
|
+
|
|
315
|
+
domain?: string | null;
|
|
316
|
+
|
|
317
|
+
entity_type?: string | null;
|
|
318
|
+
|
|
319
|
+
tags?: Array<string>;
|
|
320
|
+
|
|
321
|
+
vertical?: string | null;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
193
326
|
export interface AgentPublishResponse {
|
|
194
327
|
agent_name: string;
|
|
195
328
|
|
|
@@ -267,6 +400,11 @@ export namespace AgentRunResponse {
|
|
|
267
400
|
*/
|
|
268
401
|
html?: string;
|
|
269
402
|
|
|
403
|
+
/**
|
|
404
|
+
* List of all unique URLs found on the page.
|
|
405
|
+
*/
|
|
406
|
+
links?: Array<string>;
|
|
407
|
+
|
|
270
408
|
/**
|
|
271
409
|
* The Markdown version of the HTML content.
|
|
272
410
|
*/
|
|
@@ -689,19 +827,29 @@ export type AgentGenerateParams =
|
|
|
689
827
|
|
|
690
828
|
export declare namespace AgentGenerateParams {
|
|
691
829
|
export interface CreateAgentGenerationRequest {
|
|
692
|
-
agent_name: string;
|
|
693
|
-
|
|
694
830
|
prompt: string;
|
|
695
831
|
|
|
696
832
|
url: string;
|
|
697
833
|
|
|
834
|
+
agent_name?: string | null;
|
|
835
|
+
|
|
698
836
|
input_schema?: unknown;
|
|
699
837
|
|
|
700
|
-
metadata?:
|
|
838
|
+
metadata?: CreateAgentGenerationRequest.Metadata | null;
|
|
701
839
|
|
|
702
840
|
output_schema?: unknown;
|
|
703
841
|
}
|
|
704
842
|
|
|
843
|
+
export namespace CreateAgentGenerationRequest {
|
|
844
|
+
export interface Metadata {
|
|
845
|
+
description?: string | null;
|
|
846
|
+
|
|
847
|
+
display_name?: string | null;
|
|
848
|
+
|
|
849
|
+
tags?: Array<string>;
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
|
|
705
853
|
export interface CreateAgentRefinementRequest {
|
|
706
854
|
from_agent: string;
|
|
707
855
|
|
|
@@ -721,7 +869,7 @@ export interface AgentRunParams {
|
|
|
721
869
|
/**
|
|
722
870
|
* Response formats to include. All disabled by default.
|
|
723
871
|
*/
|
|
724
|
-
formats?: Array<'html' | 'markdown' | 'screenshot' | 'headers'>;
|
|
872
|
+
formats?: Array<'html' | 'markdown' | 'screenshot' | 'headers' | 'links'>;
|
|
725
873
|
|
|
726
874
|
localization?: boolean;
|
|
727
875
|
}
|
|
@@ -739,7 +887,7 @@ export interface AgentRunAsyncParams {
|
|
|
739
887
|
/**
|
|
740
888
|
* Response formats to include. All disabled by default.
|
|
741
889
|
*/
|
|
742
|
-
formats?: Array<'html' | 'markdown' | 'screenshot' | 'headers'>;
|
|
890
|
+
formats?: Array<'html' | 'markdown' | 'screenshot' | 'headers' | 'links'>;
|
|
743
891
|
|
|
744
892
|
localization?: boolean;
|
|
745
893
|
|
|
@@ -775,7 +923,7 @@ export namespace AgentRunBatchParams {
|
|
|
775
923
|
/**
|
|
776
924
|
* Response formats to include. All disabled by default.
|
|
777
925
|
*/
|
|
778
|
-
formats?: Array<'html' | 'markdown' | 'screenshot' | 'headers'>;
|
|
926
|
+
formats?: Array<'html' | 'markdown' | 'screenshot' | 'headers' | 'links'>;
|
|
779
927
|
|
|
780
928
|
localization?: boolean;
|
|
781
929
|
|
|
@@ -788,7 +936,7 @@ export namespace AgentRunBatchParams {
|
|
|
788
936
|
/**
|
|
789
937
|
* Response formats to include. All disabled by default.
|
|
790
938
|
*/
|
|
791
|
-
formats?: Array<'html' | 'markdown' | 'screenshot' | 'headers'>;
|
|
939
|
+
formats?: Array<'html' | 'markdown' | 'screenshot' | 'headers' | 'links'>;
|
|
792
940
|
|
|
793
941
|
localization?: boolean;
|
|
794
942
|
|
package/src/resources/crawl.ts
CHANGED
|
@@ -9,6 +9,11 @@ import { path } from '../internal/utils/path';
|
|
|
9
9
|
export class Crawl extends APIResource {
|
|
10
10
|
/**
|
|
11
11
|
* Crawl by Filter
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const crawls = await client.crawl.list();
|
|
16
|
+
* ```
|
|
12
17
|
*/
|
|
13
18
|
list(
|
|
14
19
|
query: CrawlListParams | null | undefined = {},
|
|
@@ -19,6 +24,11 @@ export class Crawl extends APIResource {
|
|
|
19
24
|
|
|
20
25
|
/**
|
|
21
26
|
* Create crawl task
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const response = await client.crawl.run({ url: 'url' });
|
|
31
|
+
* ```
|
|
22
32
|
*/
|
|
23
33
|
run(body: CrawlRunParams, options?: RequestOptions): APIPromise<CrawlRunResponse> {
|
|
24
34
|
return this._client.post('/v1/crawl', { body, ...options });
|
|
@@ -26,6 +36,13 @@ export class Crawl extends APIResource {
|
|
|
26
36
|
|
|
27
37
|
/**
|
|
28
38
|
* Get crawl data
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const response = await client.crawl.status(
|
|
43
|
+
* '123e4567-e89b-12d3-a456-426614174000',
|
|
44
|
+
* );
|
|
45
|
+
* ```
|
|
29
46
|
*/
|
|
30
47
|
status(id: string, options?: RequestOptions): APIPromise<CrawlStatusResponse> {
|
|
31
48
|
return this._client.get(path`/v1/crawl/${id}`, options);
|
|
@@ -33,6 +50,13 @@ export class Crawl extends APIResource {
|
|
|
33
50
|
|
|
34
51
|
/**
|
|
35
52
|
* Cancel Crawl
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const response = await client.crawl.terminate(
|
|
57
|
+
* '123e4567-e89b-12d3-a456-426614174000',
|
|
58
|
+
* );
|
|
59
|
+
* ```
|
|
36
60
|
*/
|
|
37
61
|
terminate(id: string, options?: RequestOptions): APIPromise<CrawlTerminateResponse> {
|
|
38
62
|
return this._client.delete(path`/v1/crawl/${id}`, options);
|
|
@@ -708,7 +732,7 @@ export namespace CrawlRunParams {
|
|
|
708
732
|
/**
|
|
709
733
|
* Browser driver to use
|
|
710
734
|
*/
|
|
711
|
-
driver?: 'vx6' | 'vx8' | 'vx8-pro' | 'vx10' | 'vx10-pro' | 'vx12' | 'vx12-pro';
|
|
735
|
+
driver?: 'vx6' | 'vx8' | 'vx8-pro' | 'vx10' | 'vx10-pro' | 'vx12' | 'vx12-pro' | 'media-vx6';
|
|
712
736
|
|
|
713
737
|
/**
|
|
714
738
|
* Expected HTTP status codes for successful requests
|
|
@@ -718,7 +742,7 @@ export namespace CrawlRunParams {
|
|
|
718
742
|
/**
|
|
719
743
|
* List of acceptable response formats in order of preference
|
|
720
744
|
*/
|
|
721
|
-
formats?: Array<'html' | 'markdown' | 'screenshot' | 'headers'>;
|
|
745
|
+
formats?: Array<'html' | 'markdown' | 'screenshot' | 'headers' | 'links'>;
|
|
722
746
|
|
|
723
747
|
/**
|
|
724
748
|
* Custom HTTP headers to include in the request
|
|
@@ -1273,6 +1297,13 @@ export namespace CrawlRunParams {
|
|
|
1273
1297
|
| 'zu-ZA'
|
|
1274
1298
|
| 'auto';
|
|
1275
1299
|
|
|
1300
|
+
/**
|
|
1301
|
+
* Selects which markdown conversion strategy to use. "full_page" converts the
|
|
1302
|
+
* entire HTML page. "main_content" uses Mozilla Readability to extract the main
|
|
1303
|
+
* article content before converting.
|
|
1304
|
+
*/
|
|
1305
|
+
markdown_backend?: 'full_page' | 'main_content';
|
|
1306
|
+
|
|
1276
1307
|
/**
|
|
1277
1308
|
* HTTP method for the request
|
|
1278
1309
|
*/
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
|
|
7
|
+
export class DomainKnowledge extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Resolves the suggested driver for a given URL or agent name. Exactly one of
|
|
10
|
+
* `url` or `agent` must be provided.
|
|
11
|
+
*/
|
|
12
|
+
getDriver(
|
|
13
|
+
query: DomainKnowledgeGetDriverParams | null | undefined = {},
|
|
14
|
+
options?: RequestOptions,
|
|
15
|
+
): APIPromise<DomainKnowledgeGetDriverResponse> {
|
|
16
|
+
return this._client.get('/v1/domain-knowledge/driver', { query, ...options });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface DomainKnowledgeGetDriverResponse {
|
|
21
|
+
/**
|
|
22
|
+
* List of detected antibots for the domain
|
|
23
|
+
*/
|
|
24
|
+
antibots: Array<string>;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Description of the driver
|
|
28
|
+
*/
|
|
29
|
+
description: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Resolved driver name
|
|
33
|
+
*/
|
|
34
|
+
driver: string;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The input agent name (present when agent query param was used)
|
|
38
|
+
*/
|
|
39
|
+
agent?: string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Whether the page needs to be rendered to be properly resolved.
|
|
43
|
+
*/
|
|
44
|
+
need_to_render?: boolean;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The input URL (present when url query param was used)
|
|
48
|
+
*/
|
|
49
|
+
url?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface DomainKnowledgeGetDriverParams {
|
|
53
|
+
/**
|
|
54
|
+
* Agent name to resolve driver for (e.g. nimble-ecommerce).
|
|
55
|
+
*/
|
|
56
|
+
agent?: string;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Target domain to resolve driver for (e.g. amazon.com).
|
|
60
|
+
*/
|
|
61
|
+
url?: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export declare namespace DomainKnowledge {
|
|
65
|
+
export {
|
|
66
|
+
type DomainKnowledgeGetDriverResponse as DomainKnowledgeGetDriverResponse,
|
|
67
|
+
type DomainKnowledgeGetDriverParams as DomainKnowledgeGetDriverParams,
|
|
68
|
+
};
|
|
69
|
+
}
|
package/src/resources/index.ts
CHANGED
|
@@ -28,6 +28,27 @@ export {
|
|
|
28
28
|
type CrawlListParams,
|
|
29
29
|
type CrawlRunParams,
|
|
30
30
|
} from './crawl';
|
|
31
|
+
export {
|
|
32
|
+
DomainKnowledge,
|
|
33
|
+
type DomainKnowledgeGetDriverResponse,
|
|
34
|
+
type DomainKnowledgeGetDriverParams,
|
|
35
|
+
} from './domain-knowledge';
|
|
36
|
+
export {
|
|
37
|
+
Media,
|
|
38
|
+
type MediaRunResponse,
|
|
39
|
+
type MediaRunAsyncResponse,
|
|
40
|
+
type MediaRunParams,
|
|
41
|
+
type MediaRunAsyncParams,
|
|
42
|
+
} from './media';
|
|
43
|
+
export {
|
|
44
|
+
Serp,
|
|
45
|
+
type SerpRunResponse,
|
|
46
|
+
type SerpRunAsyncResponse,
|
|
47
|
+
type SerpRunBatchResponse,
|
|
48
|
+
type SerpRunParams,
|
|
49
|
+
type SerpRunAsyncParams,
|
|
50
|
+
type SerpRunBatchParams,
|
|
51
|
+
} from './serp';
|
|
31
52
|
export {
|
|
32
53
|
Tasks,
|
|
33
54
|
type TaskListResponse,
|