@nimble-way/nimble-js 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (352) hide show
  1. package/CHANGELOG.md +164 -0
  2. package/LICENSE +201 -0
  3. package/README.md +370 -0
  4. package/api-promise.d.mts +2 -0
  5. package/api-promise.d.mts.map +1 -0
  6. package/api-promise.d.ts +2 -0
  7. package/api-promise.d.ts.map +1 -0
  8. package/api-promise.js +6 -0
  9. package/api-promise.js.map +1 -0
  10. package/api-promise.mjs +2 -0
  11. package/api-promise.mjs.map +1 -0
  12. package/client.d.mts +239 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +239 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +530 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +526 -0
  19. package/client.mjs.map +1 -0
  20. package/core/api-promise.d.mts +46 -0
  21. package/core/api-promise.d.mts.map +1 -0
  22. package/core/api-promise.d.ts +46 -0
  23. package/core/api-promise.d.ts.map +1 -0
  24. package/core/api-promise.js +74 -0
  25. package/core/api-promise.js.map +1 -0
  26. package/core/api-promise.mjs +70 -0
  27. package/core/api-promise.mjs.map +1 -0
  28. package/core/error.d.mts +46 -0
  29. package/core/error.d.mts.map +1 -0
  30. package/core/error.d.ts +46 -0
  31. package/core/error.d.ts.map +1 -0
  32. package/core/error.js +113 -0
  33. package/core/error.js.map +1 -0
  34. package/core/error.mjs +97 -0
  35. package/core/error.mjs.map +1 -0
  36. package/core/resource.d.mts +6 -0
  37. package/core/resource.d.mts.map +1 -0
  38. package/core/resource.d.ts +6 -0
  39. package/core/resource.d.ts.map +1 -0
  40. package/core/resource.js +11 -0
  41. package/core/resource.js.map +1 -0
  42. package/core/resource.mjs +7 -0
  43. package/core/resource.mjs.map +1 -0
  44. package/core/uploads.d.mts +3 -0
  45. package/core/uploads.d.mts.map +1 -0
  46. package/core/uploads.d.ts +3 -0
  47. package/core/uploads.d.ts.map +1 -0
  48. package/core/uploads.js +6 -0
  49. package/core/uploads.js.map +1 -0
  50. package/core/uploads.mjs +2 -0
  51. package/core/uploads.mjs.map +1 -0
  52. package/error.d.mts +2 -0
  53. package/error.d.mts.map +1 -0
  54. package/error.d.ts +2 -0
  55. package/error.d.ts.map +1 -0
  56. package/error.js +6 -0
  57. package/error.js.map +1 -0
  58. package/error.mjs +2 -0
  59. package/error.mjs.map +1 -0
  60. package/index.d.mts +6 -0
  61. package/index.d.mts.map +1 -0
  62. package/index.d.ts +6 -0
  63. package/index.d.ts.map +1 -0
  64. package/index.js +30 -0
  65. package/index.js.map +1 -0
  66. package/index.mjs +7 -0
  67. package/index.mjs.map +1 -0
  68. package/internal/builtin-types.d.mts +73 -0
  69. package/internal/builtin-types.d.mts.map +1 -0
  70. package/internal/builtin-types.d.ts +73 -0
  71. package/internal/builtin-types.d.ts.map +1 -0
  72. package/internal/builtin-types.js +4 -0
  73. package/internal/builtin-types.js.map +1 -0
  74. package/internal/builtin-types.mjs +3 -0
  75. package/internal/builtin-types.mjs.map +1 -0
  76. package/internal/detect-platform.d.mts +15 -0
  77. package/internal/detect-platform.d.mts.map +1 -0
  78. package/internal/detect-platform.d.ts +15 -0
  79. package/internal/detect-platform.d.ts.map +1 -0
  80. package/internal/detect-platform.js +162 -0
  81. package/internal/detect-platform.js.map +1 -0
  82. package/internal/detect-platform.mjs +157 -0
  83. package/internal/detect-platform.mjs.map +1 -0
  84. package/internal/errors.d.mts +3 -0
  85. package/internal/errors.d.mts.map +1 -0
  86. package/internal/errors.d.ts +3 -0
  87. package/internal/errors.d.ts.map +1 -0
  88. package/internal/errors.js +41 -0
  89. package/internal/errors.js.map +1 -0
  90. package/internal/errors.mjs +36 -0
  91. package/internal/errors.mjs.map +1 -0
  92. package/internal/headers.d.mts +20 -0
  93. package/internal/headers.d.mts.map +1 -0
  94. package/internal/headers.d.ts +20 -0
  95. package/internal/headers.d.ts.map +1 -0
  96. package/internal/headers.js +79 -0
  97. package/internal/headers.js.map +1 -0
  98. package/internal/headers.mjs +74 -0
  99. package/internal/headers.mjs.map +1 -0
  100. package/internal/parse.d.mts +12 -0
  101. package/internal/parse.d.mts.map +1 -0
  102. package/internal/parse.d.ts +12 -0
  103. package/internal/parse.d.ts.map +1 -0
  104. package/internal/parse.js +40 -0
  105. package/internal/parse.js.map +1 -0
  106. package/internal/parse.mjs +37 -0
  107. package/internal/parse.mjs.map +1 -0
  108. package/internal/request-options.d.mts +75 -0
  109. package/internal/request-options.d.mts.map +1 -0
  110. package/internal/request-options.d.ts +75 -0
  111. package/internal/request-options.d.ts.map +1 -0
  112. package/internal/request-options.js +14 -0
  113. package/internal/request-options.js.map +1 -0
  114. package/internal/request-options.mjs +10 -0
  115. package/internal/request-options.mjs.map +1 -0
  116. package/internal/shim-types.d.mts +17 -0
  117. package/internal/shim-types.d.mts.map +1 -0
  118. package/internal/shim-types.d.ts +17 -0
  119. package/internal/shim-types.d.ts.map +1 -0
  120. package/internal/shim-types.js +4 -0
  121. package/internal/shim-types.js.map +1 -0
  122. package/internal/shim-types.mjs +3 -0
  123. package/internal/shim-types.mjs.map +1 -0
  124. package/internal/shims.d.mts +20 -0
  125. package/internal/shims.d.mts.map +1 -0
  126. package/internal/shims.d.ts +20 -0
  127. package/internal/shims.d.ts.map +1 -0
  128. package/internal/shims.js +92 -0
  129. package/internal/shims.js.map +1 -0
  130. package/internal/shims.mjs +85 -0
  131. package/internal/shims.mjs.map +1 -0
  132. package/internal/to-file.d.mts +45 -0
  133. package/internal/to-file.d.mts.map +1 -0
  134. package/internal/to-file.d.ts +45 -0
  135. package/internal/to-file.d.ts.map +1 -0
  136. package/internal/to-file.js +91 -0
  137. package/internal/to-file.js.map +1 -0
  138. package/internal/to-file.mjs +88 -0
  139. package/internal/to-file.mjs.map +1 -0
  140. package/internal/tslib.js +81 -0
  141. package/internal/tslib.mjs +17 -0
  142. package/internal/types.d.mts +69 -0
  143. package/internal/types.d.mts.map +1 -0
  144. package/internal/types.d.ts +69 -0
  145. package/internal/types.d.ts.map +1 -0
  146. package/internal/types.js +4 -0
  147. package/internal/types.js.map +1 -0
  148. package/internal/types.mjs +3 -0
  149. package/internal/types.mjs.map +1 -0
  150. package/internal/uploads.d.mts +42 -0
  151. package/internal/uploads.d.mts.map +1 -0
  152. package/internal/uploads.d.ts +42 -0
  153. package/internal/uploads.d.ts.map +1 -0
  154. package/internal/uploads.js +141 -0
  155. package/internal/uploads.js.map +1 -0
  156. package/internal/uploads.mjs +131 -0
  157. package/internal/uploads.mjs.map +1 -0
  158. package/internal/utils/base64.d.mts +3 -0
  159. package/internal/utils/base64.d.mts.map +1 -0
  160. package/internal/utils/base64.d.ts +3 -0
  161. package/internal/utils/base64.d.ts.map +1 -0
  162. package/internal/utils/base64.js +38 -0
  163. package/internal/utils/base64.js.map +1 -0
  164. package/internal/utils/base64.mjs +33 -0
  165. package/internal/utils/base64.mjs.map +1 -0
  166. package/internal/utils/bytes.d.mts +4 -0
  167. package/internal/utils/bytes.d.mts.map +1 -0
  168. package/internal/utils/bytes.d.ts +4 -0
  169. package/internal/utils/bytes.d.ts.map +1 -0
  170. package/internal/utils/bytes.js +31 -0
  171. package/internal/utils/bytes.js.map +1 -0
  172. package/internal/utils/bytes.mjs +26 -0
  173. package/internal/utils/bytes.mjs.map +1 -0
  174. package/internal/utils/env.d.mts +9 -0
  175. package/internal/utils/env.d.mts.map +1 -0
  176. package/internal/utils/env.d.ts +9 -0
  177. package/internal/utils/env.d.ts.map +1 -0
  178. package/internal/utils/env.js +22 -0
  179. package/internal/utils/env.js.map +1 -0
  180. package/internal/utils/env.mjs +18 -0
  181. package/internal/utils/env.mjs.map +1 -0
  182. package/internal/utils/log.d.mts +37 -0
  183. package/internal/utils/log.d.mts.map +1 -0
  184. package/internal/utils/log.d.ts +37 -0
  185. package/internal/utils/log.d.ts.map +1 -0
  186. package/internal/utils/log.js +85 -0
  187. package/internal/utils/log.js.map +1 -0
  188. package/internal/utils/log.mjs +79 -0
  189. package/internal/utils/log.mjs.map +1 -0
  190. package/internal/utils/path.d.mts +15 -0
  191. package/internal/utils/path.d.mts.map +1 -0
  192. package/internal/utils/path.d.ts +15 -0
  193. package/internal/utils/path.d.ts.map +1 -0
  194. package/internal/utils/path.js +79 -0
  195. package/internal/utils/path.js.map +1 -0
  196. package/internal/utils/path.mjs +74 -0
  197. package/internal/utils/path.mjs.map +1 -0
  198. package/internal/utils/sleep.d.mts +2 -0
  199. package/internal/utils/sleep.d.mts.map +1 -0
  200. package/internal/utils/sleep.d.ts +2 -0
  201. package/internal/utils/sleep.d.ts.map +1 -0
  202. package/internal/utils/sleep.js +7 -0
  203. package/internal/utils/sleep.js.map +1 -0
  204. package/internal/utils/sleep.mjs +3 -0
  205. package/internal/utils/sleep.mjs.map +1 -0
  206. package/internal/utils/uuid.d.mts +5 -0
  207. package/internal/utils/uuid.d.mts.map +1 -0
  208. package/internal/utils/uuid.d.ts +5 -0
  209. package/internal/utils/uuid.d.ts.map +1 -0
  210. package/internal/utils/uuid.js +19 -0
  211. package/internal/utils/uuid.js.map +1 -0
  212. package/internal/utils/uuid.mjs +15 -0
  213. package/internal/utils/uuid.mjs.map +1 -0
  214. package/internal/utils/values.d.mts +18 -0
  215. package/internal/utils/values.d.mts.map +1 -0
  216. package/internal/utils/values.d.ts +18 -0
  217. package/internal/utils/values.d.ts.map +1 -0
  218. package/internal/utils/values.js +112 -0
  219. package/internal/utils/values.js.map +1 -0
  220. package/internal/utils/values.mjs +94 -0
  221. package/internal/utils/values.mjs.map +1 -0
  222. package/internal/utils.d.mts +7 -0
  223. package/internal/utils.d.mts.map +1 -0
  224. package/internal/utils.d.ts +7 -0
  225. package/internal/utils.d.ts.map +1 -0
  226. package/internal/utils.js +11 -0
  227. package/internal/utils.js.map +1 -0
  228. package/internal/utils.mjs +8 -0
  229. package/internal/utils.mjs.map +1 -0
  230. package/package.json +137 -0
  231. package/resource.d.mts +2 -0
  232. package/resource.d.mts.map +1 -0
  233. package/resource.d.ts +2 -0
  234. package/resource.d.ts.map +1 -0
  235. package/resource.js +6 -0
  236. package/resource.js.map +1 -0
  237. package/resource.mjs +2 -0
  238. package/resource.mjs.map +1 -0
  239. package/resources/agent.d.mts +356 -0
  240. package/resources/agent.d.mts.map +1 -0
  241. package/resources/agent.d.ts +356 -0
  242. package/resources/agent.d.ts.map +1 -0
  243. package/resources/agent.js +34 -0
  244. package/resources/agent.js.map +1 -0
  245. package/resources/agent.mjs +30 -0
  246. package/resources/agent.mjs.map +1 -0
  247. package/resources/crawl.d.mts +465 -0
  248. package/resources/crawl.d.mts.map +1 -0
  249. package/resources/crawl.d.ts +465 -0
  250. package/resources/crawl.d.ts.map +1 -0
  251. package/resources/crawl.js +34 -0
  252. package/resources/crawl.js.map +1 -0
  253. package/resources/crawl.mjs +30 -0
  254. package/resources/crawl.mjs.map +1 -0
  255. package/resources/index.d.mts +6 -0
  256. package/resources/index.d.mts.map +1 -0
  257. package/resources/index.d.ts +6 -0
  258. package/resources/index.d.ts.map +1 -0
  259. package/resources/index.js +13 -0
  260. package/resources/index.js.map +1 -0
  261. package/resources/index.mjs +6 -0
  262. package/resources/index.mjs.map +1 -0
  263. package/resources/shared.d.mts +452 -0
  264. package/resources/shared.d.mts.map +1 -0
  265. package/resources/shared.d.ts +452 -0
  266. package/resources/shared.d.ts.map +1 -0
  267. package/resources/shared.js +4 -0
  268. package/resources/shared.js.map +1 -0
  269. package/resources/shared.mjs +3 -0
  270. package/resources/shared.mjs.map +1 -0
  271. package/resources/tasks.d.mts +183 -0
  272. package/resources/tasks.d.mts.map +1 -0
  273. package/resources/tasks.d.ts +183 -0
  274. package/resources/tasks.d.ts.map +1 -0
  275. package/resources/tasks.js +28 -0
  276. package/resources/tasks.js.map +1 -0
  277. package/resources/tasks.mjs +24 -0
  278. package/resources/tasks.mjs.map +1 -0
  279. package/resources/top-level.d.mts +847 -0
  280. package/resources/top-level.d.mts.map +1 -0
  281. package/resources/top-level.d.ts +847 -0
  282. package/resources/top-level.d.ts.map +1 -0
  283. package/resources/top-level.js +4 -0
  284. package/resources/top-level.js.map +1 -0
  285. package/resources/top-level.mjs +3 -0
  286. package/resources/top-level.mjs.map +1 -0
  287. package/resources.d.mts +2 -0
  288. package/resources.d.mts.map +1 -0
  289. package/resources.d.ts +2 -0
  290. package/resources.d.ts.map +1 -0
  291. package/resources.js +5 -0
  292. package/resources.js.map +1 -0
  293. package/resources.mjs +2 -0
  294. package/resources.mjs.map +1 -0
  295. package/src/api-promise.ts +2 -0
  296. package/src/client.ts +893 -0
  297. package/src/core/README.md +3 -0
  298. package/src/core/api-promise.ts +92 -0
  299. package/src/core/error.ts +130 -0
  300. package/src/core/resource.ts +11 -0
  301. package/src/core/uploads.ts +2 -0
  302. package/src/error.ts +2 -0
  303. package/src/index.ts +22 -0
  304. package/src/internal/README.md +3 -0
  305. package/src/internal/builtin-types.ts +93 -0
  306. package/src/internal/detect-platform.ts +196 -0
  307. package/src/internal/errors.ts +33 -0
  308. package/src/internal/headers.ts +97 -0
  309. package/src/internal/parse.ts +56 -0
  310. package/src/internal/request-options.ts +91 -0
  311. package/src/internal/shim-types.ts +26 -0
  312. package/src/internal/shims.ts +107 -0
  313. package/src/internal/to-file.ts +154 -0
  314. package/src/internal/types.ts +95 -0
  315. package/src/internal/uploads.ts +187 -0
  316. package/src/internal/utils/base64.ts +40 -0
  317. package/src/internal/utils/bytes.ts +32 -0
  318. package/src/internal/utils/env.ts +18 -0
  319. package/src/internal/utils/log.ts +126 -0
  320. package/src/internal/utils/path.ts +88 -0
  321. package/src/internal/utils/sleep.ts +3 -0
  322. package/src/internal/utils/uuid.ts +17 -0
  323. package/src/internal/utils/values.ts +105 -0
  324. package/src/internal/utils.ts +8 -0
  325. package/src/lib/.keep +4 -0
  326. package/src/resource.ts +2 -0
  327. package/src/resources/agent.ts +548 -0
  328. package/src/resources/crawl.ts +1493 -0
  329. package/src/resources/index.ts +39 -0
  330. package/src/resources/shared.ts +816 -0
  331. package/src/resources/tasks.ts +240 -0
  332. package/src/resources/top-level.ts +3665 -0
  333. package/src/resources.ts +1 -0
  334. package/src/tsconfig.json +11 -0
  335. package/src/uploads.ts +2 -0
  336. package/src/version.ts +1 -0
  337. package/uploads.d.mts +2 -0
  338. package/uploads.d.mts.map +1 -0
  339. package/uploads.d.ts +2 -0
  340. package/uploads.d.ts.map +1 -0
  341. package/uploads.js +6 -0
  342. package/uploads.js.map +1 -0
  343. package/uploads.mjs +2 -0
  344. package/uploads.mjs.map +1 -0
  345. package/version.d.mts +2 -0
  346. package/version.d.mts.map +1 -0
  347. package/version.d.ts +2 -0
  348. package/version.d.ts.map +1 -0
  349. package/version.js +5 -0
  350. package/version.js.map +1 -0
  351. package/version.mjs +2 -0
  352. package/version.mjs.map +1 -0
@@ -0,0 +1,548 @@
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 Agent extends APIResource {
9
+ /**
10
+ * List Templates
11
+ */
12
+ list(
13
+ query: AgentListParams | null | undefined = {},
14
+ options?: RequestOptions,
15
+ ): APIPromise<AgentListResponse> {
16
+ return this._client.get('/v1/agents', { query, ...options });
17
+ }
18
+
19
+ /**
20
+ * Get Template
21
+ */
22
+ get(templateName: string, options?: RequestOptions): APIPromise<AgentGetResponse> {
23
+ return this._client.get(path`/v1/agents/${templateName}`, options);
24
+ }
25
+
26
+ /**
27
+ * Execute WSA Realtime Endpoint
28
+ */
29
+ run(body: AgentRunParams, options?: RequestOptions): APIPromise<AgentRunResponse> {
30
+ return this._client.post('/v1/agents/run', { body, ...options });
31
+ }
32
+
33
+ /**
34
+ * Execute WSA Async Endpoint
35
+ */
36
+ runAsync(body: AgentRunAsyncParams, options?: RequestOptions): APIPromise<AgentRunAsyncResponse> {
37
+ return this._client.post('/v1/agents/async', { body, ...options });
38
+ }
39
+ }
40
+
41
+ export type AgentListResponse = Array<AgentListResponse.AgentListResponseItem>;
42
+
43
+ export namespace AgentListResponse {
44
+ export interface AgentListResponseItem {
45
+ display_name: string;
46
+
47
+ is_public: boolean;
48
+
49
+ name: string;
50
+
51
+ description?: string | null;
52
+
53
+ domain?: string | null;
54
+
55
+ entity_type?: string | null;
56
+
57
+ managed_by?: string | null;
58
+
59
+ vertical?: string | null;
60
+ }
61
+ }
62
+
63
+ export interface AgentGetResponse {
64
+ display_name: string;
65
+
66
+ is_public: boolean;
67
+
68
+ name: string;
69
+
70
+ description?: string | null;
71
+
72
+ domain?: string | null;
73
+
74
+ entity_type?: string | null;
75
+
76
+ feature_flags?: AgentGetResponse.FeatureFlags;
77
+
78
+ input_properties?: Array<AgentGetResponse.InputProperty> | null;
79
+
80
+ managed_by?: string | null;
81
+
82
+ output_schema?: { [key: string]: unknown } | null;
83
+
84
+ vertical?: string | null;
85
+ }
86
+
87
+ export namespace AgentGetResponse {
88
+ export interface FeatureFlags {
89
+ is_localization_supported?: boolean;
90
+
91
+ is_pagination_supported?: boolean;
92
+ }
93
+
94
+ export interface InputProperty {
95
+ default?: string | null;
96
+
97
+ description?: string | null;
98
+
99
+ examples?: Array<string> | null;
100
+
101
+ is_localization_param?: boolean;
102
+
103
+ name?: string;
104
+
105
+ required?: boolean;
106
+
107
+ rules?: Array<string> | null;
108
+
109
+ type?: string;
110
+ }
111
+ }
112
+
113
+ export interface AgentRunResponse {
114
+ data: AgentRunResponse.Data;
115
+
116
+ metadata: AgentRunResponse.Metadata;
117
+
118
+ /**
119
+ * The status of the task.
120
+ */
121
+ status: 'success' | 'skipped' | 'fatal' | 'error' | 'postponed' | 'ignored' | 'rejected' | 'blocked';
122
+
123
+ /**
124
+ * Unique identifier for the task.
125
+ */
126
+ task_id: string;
127
+
128
+ /**
129
+ * The final URL.
130
+ */
131
+ url: string;
132
+
133
+ debug?: AgentRunResponse.Debug;
134
+
135
+ /**
136
+ * Pagination information if applicable.
137
+ */
138
+ pagination?: AgentRunResponse.NextPageParams | Array<AgentRunResponse.UnionMember1>;
139
+
140
+ /**
141
+ * The HTTP status code of the task.
142
+ */
143
+ status_code?: number;
144
+
145
+ /**
146
+ * List of warnings generated during the task.
147
+ */
148
+ warnings?: Array<string>;
149
+ }
150
+
151
+ export namespace AgentRunResponse {
152
+ export interface Data {
153
+ /**
154
+ * Browser actions execution results. Present only when browser_actions were
155
+ * specified in the request.
156
+ */
157
+ browser_actions?: Data.BrowserActions;
158
+
159
+ /**
160
+ * The cookies collected from browser actions during the task.
161
+ */
162
+ cookies?: Array<unknown>;
163
+
164
+ /**
165
+ * The evaluation results from browser actions during the task.
166
+ */
167
+ eval?: Array<unknown>;
168
+
169
+ /**
170
+ * The http requests from browser actions made during the task.
171
+ */
172
+ fetch?: Array<unknown>;
173
+
174
+ /**
175
+ * The headers received during the task.
176
+ */
177
+ headers?: { [key: string]: string };
178
+
179
+ /**
180
+ * The HTML content of the page.
181
+ */
182
+ html?: string;
183
+
184
+ /**
185
+ * The Markdown version of the HTML content.
186
+ */
187
+ markdown?: string;
188
+
189
+ /**
190
+ * The network capture data collected during the task.
191
+ */
192
+ network_capture?: Array<Data.NetworkCapture>;
193
+
194
+ /**
195
+ * The parsing results extracted from the HTML & network content.
196
+ */
197
+ parsing?: Data.ParsingSuccessResult | Data.ParsingErrorResult | { [key: string]: unknown };
198
+
199
+ /**
200
+ * The list of redirects that occurred during the task.
201
+ */
202
+ redirects?: Array<Data.Redirect>;
203
+
204
+ /**
205
+ * Screenshots taken during the task, from browser actions, or the screenshot
206
+ * format.
207
+ */
208
+ screenshots?: Array<unknown>;
209
+ }
210
+
211
+ export namespace Data {
212
+ /**
213
+ * Browser actions execution results. Present only when browser_actions were
214
+ * specified in the request.
215
+ */
216
+ export interface BrowserActions {
217
+ results: Array<BrowserActions.Result>;
218
+
219
+ success: boolean;
220
+
221
+ total_duration: number;
222
+ }
223
+
224
+ export namespace BrowserActions {
225
+ export interface Result {
226
+ duration: number;
227
+
228
+ name:
229
+ | 'goto'
230
+ | 'wait'
231
+ | 'wait_for_element'
232
+ | 'wait_for_navigation'
233
+ | 'click'
234
+ | 'fill'
235
+ | 'press'
236
+ | 'scroll'
237
+ | 'auto_scroll'
238
+ | 'screenshot'
239
+ | 'get_cookies'
240
+ | 'eval'
241
+ | 'fetch';
242
+
243
+ status: 'no-run' | 'in-progress' | 'done' | 'error' | 'skipped';
244
+
245
+ error?: string;
246
+
247
+ result?: unknown;
248
+ }
249
+ }
250
+
251
+ export interface NetworkCapture {
252
+ filter: NetworkCapture.Filter;
253
+
254
+ results: Array<NetworkCapture.Result>;
255
+
256
+ errorMessage?: string;
257
+ }
258
+
259
+ export namespace NetworkCapture {
260
+ export interface Filter {
261
+ validation: boolean;
262
+
263
+ wait_for_requests_count: number;
264
+
265
+ method?: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
266
+
267
+ /**
268
+ * Resource type for network capture filtering
269
+ */
270
+ resource_type?:
271
+ | 'document'
272
+ | 'stylesheet'
273
+ | 'image'
274
+ | 'media'
275
+ | 'font'
276
+ | 'script'
277
+ | 'texttrack'
278
+ | 'xhr'
279
+ | 'fetch'
280
+ | 'prefetch'
281
+ | 'eventsource'
282
+ | 'websocket'
283
+ | 'manifest'
284
+ | 'signedexchange'
285
+ | 'ping'
286
+ | 'cspviolationreport'
287
+ | 'preflight'
288
+ | 'other'
289
+ | 'fedcm'
290
+ | Array<
291
+ | 'document'
292
+ | 'stylesheet'
293
+ | 'image'
294
+ | 'media'
295
+ | 'font'
296
+ | 'script'
297
+ | 'texttrack'
298
+ | 'xhr'
299
+ | 'fetch'
300
+ | 'prefetch'
301
+ | 'eventsource'
302
+ | 'websocket'
303
+ | 'manifest'
304
+ | 'signedexchange'
305
+ | 'ping'
306
+ | 'cspviolationreport'
307
+ | 'preflight'
308
+ | 'other'
309
+ | 'fedcm'
310
+ >;
311
+
312
+ status_code?: number | Array<number>;
313
+
314
+ url?: Filter.URL;
315
+
316
+ wait_for_requests_count_timeout?: number;
317
+ }
318
+
319
+ export namespace Filter {
320
+ export interface URL {
321
+ type: 'exact' | 'contains';
322
+
323
+ value: string;
324
+ }
325
+ }
326
+
327
+ export interface Result {
328
+ request: Result.Request;
329
+
330
+ response: Result.Response;
331
+ }
332
+
333
+ export namespace Result {
334
+ export interface Request {
335
+ headers: { [key: string]: string };
336
+
337
+ method: string;
338
+
339
+ /**
340
+ * Resource type for network capture filtering
341
+ */
342
+ resource_type:
343
+ | 'document'
344
+ | 'stylesheet'
345
+ | 'image'
346
+ | 'media'
347
+ | 'font'
348
+ | 'script'
349
+ | 'texttrack'
350
+ | 'xhr'
351
+ | 'fetch'
352
+ | 'prefetch'
353
+ | 'eventsource'
354
+ | 'websocket'
355
+ | 'manifest'
356
+ | 'signedexchange'
357
+ | 'ping'
358
+ | 'cspviolationreport'
359
+ | 'preflight'
360
+ | 'other'
361
+ | 'fedcm';
362
+
363
+ url: string;
364
+
365
+ body?: string;
366
+ }
367
+
368
+ export interface Response {
369
+ body: string;
370
+
371
+ headers: { [key: string]: string };
372
+
373
+ serialization: 'none' | 'base64';
374
+
375
+ status: number;
376
+
377
+ status_text: string;
378
+ }
379
+ }
380
+ }
381
+
382
+ export interface ParsingSuccessResult {
383
+ entities: { [key: string]: unknown };
384
+
385
+ status: 'success';
386
+ }
387
+
388
+ export interface ParsingErrorResult {
389
+ error: string;
390
+
391
+ status: 'error';
392
+ }
393
+
394
+ export interface Redirect {
395
+ status_code: number;
396
+
397
+ url: string;
398
+ }
399
+ }
400
+
401
+ export interface Metadata {
402
+ /**
403
+ * The name of the agent used for the query.
404
+ */
405
+ agent?: string;
406
+
407
+ /**
408
+ * The driver used for the task.
409
+ */
410
+ driver?: string;
411
+
412
+ /**
413
+ * The localization identifier for the query.
414
+ */
415
+ localization_id?: string;
416
+
417
+ /**
418
+ * The duration in milliseconds of the query processing.
419
+ */
420
+ query_duration?: number;
421
+
422
+ /**
423
+ * The time when the query was received.
424
+ */
425
+ query_time?: string;
426
+
427
+ /**
428
+ * Additional response parameters.
429
+ */
430
+ response_parameters?: unknown;
431
+
432
+ /**
433
+ * A tag associated with the query.
434
+ */
435
+ tag?: string;
436
+ }
437
+
438
+ export interface Debug {
439
+ /**
440
+ * Performance metrics collected during the task.
441
+ */
442
+ performance_metrics?: { [key: string]: number };
443
+
444
+ /**
445
+ * Total bytes used by the proxy during the task.
446
+ */
447
+ proxy_total_bytes_usage?: number;
448
+
449
+ /**
450
+ * The transformed output after applying any transformations.
451
+ */
452
+ transformed_output?: unknown;
453
+
454
+ /**
455
+ * The userbrowser instance using during the task.
456
+ */
457
+ userbrowser?: unknown;
458
+ }
459
+
460
+ export interface NextPageParams {
461
+ next_page_params: { [key: string]: unknown };
462
+ }
463
+
464
+ export interface UnionMember1 {
465
+ next_page_params: { [key: string]: unknown };
466
+ }
467
+ }
468
+
469
+ export interface AgentRunAsyncResponse {
470
+ status: 'success';
471
+
472
+ task: { [key: string]: unknown };
473
+ }
474
+
475
+ export interface AgentListParams {
476
+ /**
477
+ * Number of results per page
478
+ */
479
+ limit?: number;
480
+
481
+ /**
482
+ * Filter public templates by attribution
483
+ */
484
+ managed_by?: 'nimble' | 'community' | null;
485
+
486
+ /**
487
+ * Pagination offset
488
+ */
489
+ offset?: number;
490
+
491
+ /**
492
+ * Filter by privacy level
493
+ */
494
+ privacy?: 'public' | 'private' | 'all';
495
+ }
496
+
497
+ export interface AgentRunParams {
498
+ agent: string;
499
+
500
+ params: { [key: string]: unknown };
501
+
502
+ localization?: boolean;
503
+ }
504
+
505
+ export interface AgentRunAsyncParams {
506
+ agent: string;
507
+
508
+ params: { [key: string]: unknown };
509
+
510
+ /**
511
+ * URL to call back when async operation completes
512
+ */
513
+ callback_url?: string;
514
+
515
+ localization?: boolean;
516
+
517
+ /**
518
+ * Whether to compress stored data
519
+ */
520
+ storage_compress?: boolean;
521
+
522
+ /**
523
+ * Custom name for the stored object
524
+ */
525
+ storage_object_name?: string;
526
+
527
+ /**
528
+ * Type of storage to use for results
529
+ */
530
+ storage_type?: string;
531
+
532
+ /**
533
+ * URL for storage location
534
+ */
535
+ storage_url?: string;
536
+ }
537
+
538
+ export declare namespace Agent {
539
+ export {
540
+ type AgentListResponse as AgentListResponse,
541
+ type AgentGetResponse as AgentGetResponse,
542
+ type AgentRunResponse as AgentRunResponse,
543
+ type AgentRunAsyncResponse as AgentRunAsyncResponse,
544
+ type AgentListParams as AgentListParams,
545
+ type AgentRunParams as AgentRunParams,
546
+ type AgentRunAsyncParams as AgentRunAsyncParams,
547
+ };
548
+ }