@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,452 @@
1
+ /**
2
+ * Continuously scroll to load dynamic content
3
+ */
4
+ export interface AutoScrollAction {
5
+ auto_scroll: boolean | number | string | AutoScrollAction.UnionMember3;
6
+ }
7
+ export declare namespace AutoScrollAction {
8
+ interface UnionMember3 {
9
+ /**
10
+ * CSS selector or array of alternative selectors. Use an array when you have
11
+ * multiple possible selectors for the same element.
12
+ */
13
+ click_selector?: string | Array<string>;
14
+ /**
15
+ * CSS selector or array of alternative selectors. Use an array when you have
16
+ * multiple possible selectors for the same element.
17
+ */
18
+ container?: string | Array<string>;
19
+ /**
20
+ * Duration value that accepts various formats. Supports: number (ms), string
21
+ * ("1000"), or string with unit ("2s", "500ms", "2m", "1h")
22
+ */
23
+ delay_after_scroll?: number | string;
24
+ /**
25
+ * Duration value that accepts various formats. Supports: number (ms), string
26
+ * ("1000"), or string with unit ("2s", "500ms", "2m", "1h")
27
+ */
28
+ idle_timeout?: number | string;
29
+ /**
30
+ * CSS selector or array of alternative selectors. Use an array when you have
31
+ * multiple possible selectors for the same element.
32
+ */
33
+ loading_selector?: string | Array<string>;
34
+ /**
35
+ * Duration value that accepts various formats. Supports: number (ms), string
36
+ * ("1000"), or string with unit ("2s", "500ms", "2m", "1h")
37
+ */
38
+ max_duration?: number | string;
39
+ /**
40
+ * CSS selector or array of alternative selectors. Use an array when you have
41
+ * multiple possible selectors for the same element.
42
+ */
43
+ pause_on_selector?: string | Array<string>;
44
+ /**
45
+ * Whether this action is required. If true, pipeline stops on failure. Accepts
46
+ * boolean or string "true"/"false". Default: true.
47
+ */
48
+ required?: 'true' | 'false' | boolean;
49
+ /**
50
+ * Whether to skip this action. Accepts boolean or string "true"/"false". Default:
51
+ * false.
52
+ */
53
+ skip?: 'true' | 'false' | boolean;
54
+ step_size?: number;
55
+ }
56
+ }
57
+ /**
58
+ * Click on an element by selector
59
+ */
60
+ export interface ClickAction {
61
+ click: string | Array<string> | ClickAction.UnionMember2;
62
+ }
63
+ export declare namespace ClickAction {
64
+ interface UnionMember2 {
65
+ /**
66
+ * CSS selector or array of alternative selectors. Use an array when you have
67
+ * multiple possible selectors for the same element.
68
+ */
69
+ selector: string | Array<string>;
70
+ count?: number;
71
+ /**
72
+ * Duration value that accepts various formats. Supports: number (ms), string
73
+ * ("1000"), or string with unit ("2s", "500ms", "2m", "1h")
74
+ */
75
+ delay?: number | string;
76
+ offset_x?: number;
77
+ offset_y?: number;
78
+ /**
79
+ * Whether this action is required. If true, pipeline stops on failure. Accepts
80
+ * boolean or string "true"/"false". Default: true.
81
+ */
82
+ required?: 'true' | 'false' | boolean;
83
+ scroll?: boolean;
84
+ /**
85
+ * Whether to skip this action. Accepts boolean or string "true"/"false". Default:
86
+ * false.
87
+ */
88
+ skip?: 'true' | 'false' | boolean;
89
+ steps?: number;
90
+ strategy?: 'linear' | 'ghost-cursor' | 'windmouse';
91
+ /**
92
+ * Timeout in milliseconds. Set to 0 for infinite timeout (no timeout). Default:
93
+ * 15000ms.
94
+ */
95
+ timeout?: number;
96
+ visible?: boolean;
97
+ }
98
+ }
99
+ /**
100
+ * Execute JavaScript code in page context
101
+ */
102
+ export interface EvalAction {
103
+ eval: string | EvalAction.UnionMember1;
104
+ }
105
+ export declare namespace EvalAction {
106
+ interface UnionMember1 {
107
+ code: string;
108
+ /**
109
+ * Whether this action is required. If true, pipeline stops on failure. Accepts
110
+ * boolean or string "true"/"false". Default: true.
111
+ */
112
+ required?: 'true' | 'false' | boolean;
113
+ /**
114
+ * Whether to skip this action. Accepts boolean or string "true"/"false". Default:
115
+ * false.
116
+ */
117
+ skip?: 'true' | 'false' | boolean;
118
+ /**
119
+ * Timeout in milliseconds. Set to 0 for infinite timeout (no timeout). Default:
120
+ * 15000ms.
121
+ */
122
+ timeout?: number;
123
+ }
124
+ }
125
+ /**
126
+ * Make an HTTP request in browser context
127
+ */
128
+ export interface FetchAction {
129
+ fetch: string | FetchAction.UnionMember1;
130
+ }
131
+ export declare namespace FetchAction {
132
+ interface UnionMember1 {
133
+ url: string;
134
+ body?: string;
135
+ headers?: {
136
+ [key: string]: string;
137
+ };
138
+ method?: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
139
+ /**
140
+ * Whether this action is required. If true, pipeline stops on failure. Accepts
141
+ * boolean or string "true"/"false". Default: true.
142
+ */
143
+ required?: 'true' | 'false' | boolean;
144
+ /**
145
+ * Whether to skip this action. Accepts boolean or string "true"/"false". Default:
146
+ * false.
147
+ */
148
+ skip?: 'true' | 'false' | boolean;
149
+ /**
150
+ * Timeout in milliseconds. Set to 0 for infinite timeout (no timeout). Default:
151
+ * 15000ms.
152
+ */
153
+ timeout?: number;
154
+ }
155
+ }
156
+ /**
157
+ * Fill text into an input field
158
+ */
159
+ export interface FillAction {
160
+ /**
161
+ * Fill options with mode-specific fields. Use "type" mode for behavioral typing
162
+ * simulation, or "paste" mode for instant paste.
163
+ */
164
+ fill: FillAction.Type | FillAction.Paste;
165
+ }
166
+ export declare namespace FillAction {
167
+ interface Type {
168
+ /**
169
+ * CSS selector or array of alternative selectors. Use an array when you have
170
+ * multiple possible selectors for the same element.
171
+ */
172
+ selector: string | Array<string>;
173
+ value: string;
174
+ click_on_element?: boolean;
175
+ /**
176
+ * Duration value that accepts various formats. Supports: number (ms), string
177
+ * ("1000"), or string with unit ("2s", "500ms", "2m", "1h")
178
+ */
179
+ delay?: number | string;
180
+ mode?: 'type';
181
+ mouse_movement_strategy?: 'linear' | 'ghost-cursor' | 'windmouse';
182
+ /**
183
+ * Whether this action is required. If true, pipeline stops on failure. Accepts
184
+ * boolean or string "true"/"false". Default: true.
185
+ */
186
+ required?: 'true' | 'false' | boolean;
187
+ scroll?: boolean;
188
+ /**
189
+ * Whether to skip this action. Accepts boolean or string "true"/"false". Default:
190
+ * false.
191
+ */
192
+ skip?: 'true' | 'false' | boolean;
193
+ /**
194
+ * Timeout in milliseconds. Set to 0 for infinite timeout (no timeout). Default:
195
+ * 15000ms.
196
+ */
197
+ timeout?: number;
198
+ /**
199
+ * Duration value that accepts various formats. Supports: number (ms), string
200
+ * ("1000"), or string with unit ("2s", "500ms", "2m", "1h")
201
+ */
202
+ typing_interval?: number | string;
203
+ typing_strategy?: 'simple' | 'distribution';
204
+ visible?: boolean;
205
+ }
206
+ interface Paste {
207
+ mode: 'paste';
208
+ /**
209
+ * CSS selector or array of alternative selectors. Use an array when you have
210
+ * multiple possible selectors for the same element.
211
+ */
212
+ selector: string | Array<string>;
213
+ value: string;
214
+ click_on_element?: boolean;
215
+ /**
216
+ * Duration value that accepts various formats. Supports: number (ms), string
217
+ * ("1000"), or string with unit ("2s", "500ms", "2m", "1h")
218
+ */
219
+ delay?: number | string;
220
+ /**
221
+ * Whether this action is required. If true, pipeline stops on failure. Accepts
222
+ * boolean or string "true"/"false". Default: true.
223
+ */
224
+ required?: 'true' | 'false' | boolean;
225
+ scroll?: boolean;
226
+ /**
227
+ * Whether to skip this action. Accepts boolean or string "true"/"false". Default:
228
+ * false.
229
+ */
230
+ skip?: 'true' | 'false' | boolean;
231
+ /**
232
+ * Timeout in milliseconds. Set to 0 for infinite timeout (no timeout). Default:
233
+ * 15000ms.
234
+ */
235
+ timeout?: number;
236
+ visible?: boolean;
237
+ }
238
+ }
239
+ /**
240
+ * Retrieve browser cookies
241
+ */
242
+ export interface GetCookiesAction {
243
+ get_cookies: boolean | GetCookiesAction.UnionMember1;
244
+ }
245
+ export declare namespace GetCookiesAction {
246
+ interface UnionMember1 {
247
+ /**
248
+ * Whether this action is required. If true, pipeline stops on failure. Accepts
249
+ * boolean or string "true"/"false". Default: true.
250
+ */
251
+ required?: 'true' | 'false' | boolean;
252
+ /**
253
+ * Whether to skip this action. Accepts boolean or string "true"/"false". Default:
254
+ * false.
255
+ */
256
+ skip?: 'true' | 'false' | boolean;
257
+ [k: string]: unknown;
258
+ }
259
+ }
260
+ /**
261
+ * Navigate to a URL
262
+ */
263
+ export interface GotoAction {
264
+ goto: string | GotoAction.UnionMember1;
265
+ }
266
+ export declare namespace GotoAction {
267
+ interface UnionMember1 {
268
+ url: string;
269
+ referer?: string;
270
+ /**
271
+ * Whether this action is required. If true, pipeline stops on failure. Accepts
272
+ * boolean or string "true"/"false". Default: true.
273
+ */
274
+ required?: 'true' | 'false' | boolean;
275
+ /**
276
+ * Whether to skip this action. Accepts boolean or string "true"/"false". Default:
277
+ * false.
278
+ */
279
+ skip?: 'true' | 'false' | boolean;
280
+ /**
281
+ * Timeout in milliseconds. Set to 0 for infinite timeout (no timeout). Default:
282
+ * 15000ms.
283
+ */
284
+ timeout?: number;
285
+ wait_until?: 'load' | 'domcontentloaded' | 'networkidle0' | 'networkidle2';
286
+ }
287
+ }
288
+ /**
289
+ * Press a keyboard key
290
+ */
291
+ export interface PressAction {
292
+ press: string | PressAction.UnionMember1;
293
+ }
294
+ export declare namespace PressAction {
295
+ interface UnionMember1 {
296
+ key: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'Power' | 'Eject' | 'Abort' | 'Help' | 'Backspace' | 'Tab' | 'Numpad5' | 'NumpadEnter' | 'Enter' | '\r' | '\n' | 'ShiftLeft' | 'ShiftRight' | 'ControlLeft' | 'ControlRight' | 'AltLeft' | 'AltRight' | 'Pause' | 'CapsLock' | 'Escape' | 'Convert' | 'NonConvert' | 'Space' | 'Numpad9' | 'PageUp' | 'Numpad3' | 'PageDown' | 'End' | 'Numpad1' | 'Home' | 'Numpad7' | 'ArrowLeft' | 'Numpad4' | 'Numpad8' | 'ArrowUp' | 'ArrowRight' | 'Numpad6' | 'Numpad2' | 'ArrowDown' | 'Select' | 'Open' | 'PrintScreen' | 'Insert' | 'Numpad0' | 'Delete' | 'NumpadDecimal' | 'Digit0' | 'Digit1' | 'Digit2' | 'Digit3' | 'Digit4' | 'Digit5' | 'Digit6' | 'Digit7' | 'Digit8' | 'Digit9' | 'KeyA' | 'KeyB' | 'KeyC' | 'KeyD' | 'KeyE' | 'KeyF' | 'KeyG' | 'KeyH' | 'KeyI' | 'KeyJ' | 'KeyK' | 'KeyL' | 'KeyM' | 'KeyN' | 'KeyO' | 'KeyP' | 'KeyQ' | 'KeyR' | 'KeyS' | 'KeyT' | 'KeyU' | 'KeyV' | 'KeyW' | 'KeyX' | 'KeyY' | 'KeyZ' | 'MetaLeft' | 'MetaRight' | 'ContextMenu' | 'NumpadMultiply' | 'NumpadAdd' | 'NumpadSubtract' | 'NumpadDivide' | 'F1' | 'F2' | 'F3' | 'F4' | 'F5' | 'F6' | 'F7' | 'F8' | 'F9' | 'F10' | 'F11' | 'F12' | 'F13' | 'F14' | 'F15' | 'F16' | 'F17' | 'F18' | 'F19' | 'F20' | 'F21' | 'F22' | 'F23' | 'F24' | 'NumLock' | 'ScrollLock' | 'AudioVolumeMute' | 'AudioVolumeDown' | 'AudioVolumeUp' | 'MediaTrackNext' | 'MediaTrackPrevious' | 'MediaStop' | 'MediaPlayPause' | 'Semicolon' | 'Equal' | 'NumpadEqual' | 'Comma' | 'Minus' | 'Period' | 'Slash' | 'Backquote' | 'BracketLeft' | 'Backslash' | 'BracketRight' | 'Quote' | 'AltGraph' | 'Props' | 'Cancel' | 'Clear' | 'Shift' | 'Control' | 'Alt' | 'Accept' | 'ModeChange' | ' ' | 'Print' | 'Execute' | '' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | 'Meta' | '*' | '+' | '-' | '/' | ';' | '=' | ',' | '.' | '`' | '[' | '\\' | ']' | "'" | 'Attn' | 'CrSel' | 'ExSel' | 'EraseEof' | 'Play' | 'ZoomOut' | ')' | '!' | '@' | '#' | '$' | '%' | '^' | '&' | '(' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | ':' | '<' | '_' | '>' | '?' | '~' | '{' | '|' | '}' | '"' | 'SoftLeft' | 'SoftRight' | 'Camera' | 'Call' | 'EndCall' | 'VolumeDown' | 'VolumeUp';
297
+ /**
298
+ * Duration value that accepts various formats. Supports: number (ms), string
299
+ * ("1000"), or string with unit ("2s", "500ms", "2m", "1h")
300
+ */
301
+ delay?: number | string;
302
+ /**
303
+ * Whether this action is required. If true, pipeline stops on failure. Accepts
304
+ * boolean or string "true"/"false". Default: true.
305
+ */
306
+ required?: 'true' | 'false' | boolean;
307
+ /**
308
+ * Whether to skip this action. Accepts boolean or string "true"/"false". Default:
309
+ * false.
310
+ */
311
+ skip?: 'true' | 'false' | boolean;
312
+ }
313
+ }
314
+ /**
315
+ * Capture a page screenshot
316
+ */
317
+ export interface ScreenshotAction {
318
+ screenshot: boolean | ScreenshotAction.UnionMember1;
319
+ }
320
+ export declare namespace ScreenshotAction {
321
+ interface UnionMember1 {
322
+ format?: 'png' | 'jpeg' | 'webp';
323
+ full_page?: boolean;
324
+ quality?: number;
325
+ /**
326
+ * Whether this action is required. If true, pipeline stops on failure. Accepts
327
+ * boolean or string "true"/"false". Default: true.
328
+ */
329
+ required?: 'true' | 'false' | boolean;
330
+ /**
331
+ * Whether to skip this action. Accepts boolean or string "true"/"false". Default:
332
+ * false.
333
+ */
334
+ skip?: 'true' | 'false' | boolean;
335
+ }
336
+ }
337
+ /**
338
+ * Scroll the page or an element
339
+ */
340
+ export interface ScrollAction {
341
+ scroll: number | string | ScrollAction.UnionMember2;
342
+ }
343
+ export declare namespace ScrollAction {
344
+ interface UnionMember2 {
345
+ /**
346
+ * CSS selector or array of alternative selectors. Use an array when you have
347
+ * multiple possible selectors for the same element.
348
+ */
349
+ container?: string | Array<string>;
350
+ /**
351
+ * Whether this action is required. If true, pipeline stops on failure. Accepts
352
+ * boolean or string "true"/"false". Default: true.
353
+ */
354
+ required?: 'true' | 'false' | boolean;
355
+ /**
356
+ * Whether to skip this action. Accepts boolean or string "true"/"false". Default:
357
+ * false.
358
+ */
359
+ skip?: 'true' | 'false' | boolean;
360
+ /**
361
+ * CSS selector or array of alternative selectors. Use an array when you have
362
+ * multiple possible selectors for the same element.
363
+ */
364
+ to?: string | Array<string>;
365
+ visible?: boolean;
366
+ x?: number;
367
+ y?: number;
368
+ }
369
+ }
370
+ /**
371
+ * Wait for a specified duration
372
+ */
373
+ export interface WaitAction {
374
+ wait: number | string | WaitAction.UnionMember2;
375
+ }
376
+ export declare namespace WaitAction {
377
+ interface UnionMember2 {
378
+ /**
379
+ * Duration value that accepts various formats. Supports: number (ms), string
380
+ * ("1000"), or string with unit ("2s", "500ms", "2m", "1h")
381
+ */
382
+ duration: number | string;
383
+ /**
384
+ * Whether this action is required. If true, pipeline stops on failure. Accepts
385
+ * boolean or string "true"/"false". Default: true.
386
+ */
387
+ required?: 'true' | 'false' | boolean;
388
+ /**
389
+ * Whether to skip this action. Accepts boolean or string "true"/"false". Default:
390
+ * false.
391
+ */
392
+ skip?: 'true' | 'false' | boolean;
393
+ }
394
+ }
395
+ /**
396
+ * Wait for an element to appear or reach a specific state
397
+ */
398
+ export interface WaitForElementAction {
399
+ wait_for_element: string | Array<string> | WaitForElementAction.UnionMember2;
400
+ }
401
+ export declare namespace WaitForElementAction {
402
+ interface UnionMember2 {
403
+ /**
404
+ * CSS selector or array of alternative selectors. Use an array when you have
405
+ * multiple possible selectors for the same element.
406
+ */
407
+ selector: string | Array<string>;
408
+ /**
409
+ * Whether this action is required. If true, pipeline stops on failure. Accepts
410
+ * boolean or string "true"/"false". Default: true.
411
+ */
412
+ required?: 'true' | 'false' | boolean;
413
+ /**
414
+ * Whether to skip this action. Accepts boolean or string "true"/"false". Default:
415
+ * false.
416
+ */
417
+ skip?: 'true' | 'false' | boolean;
418
+ /**
419
+ * Timeout in milliseconds. Set to 0 for infinite timeout (no timeout). Default:
420
+ * 15000ms.
421
+ */
422
+ timeout?: number;
423
+ visible?: boolean;
424
+ }
425
+ }
426
+ /**
427
+ * Wait for page navigation to complete
428
+ */
429
+ export interface WaitForNavigationAction {
430
+ wait_for_navigation: 'load' | 'domcontentloaded' | 'networkidle0' | 'networkidle2' | WaitForNavigationAction.UnionMember1;
431
+ }
432
+ export declare namespace WaitForNavigationAction {
433
+ interface UnionMember1 {
434
+ navigation: 'load' | 'domcontentloaded' | 'networkidle0' | 'networkidle2';
435
+ /**
436
+ * Whether this action is required. If true, pipeline stops on failure. Accepts
437
+ * boolean or string "true"/"false". Default: true.
438
+ */
439
+ required?: 'true' | 'false' | boolean;
440
+ /**
441
+ * Whether to skip this action. Accepts boolean or string "true"/"false". Default:
442
+ * false.
443
+ */
444
+ skip?: 'true' | 'false' | boolean;
445
+ /**
446
+ * Timeout in milliseconds. Set to 0 for infinite timeout (no timeout). Default:
447
+ * 15000ms.
448
+ */
449
+ timeout?: number;
450
+ }
451
+ }
452
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,gBAAgB,CA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AAM,GAAG,OAAO,GAAG,OAAO,CAAC;QAElC;;;WAGG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QAEjB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB;CACF;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,mBAAmB,EACf,MAAM,GACN,kBAAkB,GAClB,cAAc,GACd,cAAc,GACd,uBAAuB,CAAC,YAAY,CAAC;CAC1C;AAED,yBAAiB,uBAAuB,CAAC;IACvC,UAAiB,YAAY;QAC3B,UAAU,EAAE,MAAM,GAAG,kBAAkB,GAAG,cAAc,GAAG,cAAc,CAAC;QAE1E;;;WAGG;QACH,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;QAEtC;;;WAGG;QACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;QAElC;;;WAGG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;CACF"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":";AAAA,sFAAsF"}
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export {};
3
+ //# sourceMappingURL=shared.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.mjs","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
@@ -0,0 +1,183 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { APIPromise } from "../core/api-promise.mjs";
3
+ import { RequestOptions } from "../internal/request-options.mjs";
4
+ export declare class Tasks extends APIResource {
5
+ /**
6
+ * Retrieve a paginated list of tasks for the authenticated account.
7
+ */
8
+ list(query?: TaskListParams | null | undefined, options?: RequestOptions): APIPromise<TaskListResponse>;
9
+ /**
10
+ * Retrieve the details of a specific task by its ID.
11
+ */
12
+ get(taskID: string, options?: RequestOptions): APIPromise<TaskGetResponse>;
13
+ /**
14
+ * Retrieve the results of a completed task.
15
+ */
16
+ results(taskID: string, options?: RequestOptions): APIPromise<TaskResultsResponse>;
17
+ }
18
+ /**
19
+ * Paginated list of tasks response.
20
+ */
21
+ export interface TaskListResponse {
22
+ /**
23
+ * Array of task objects.
24
+ */
25
+ data: Array<TaskListResponse.Data>;
26
+ pagination: TaskListResponse.Pagination;
27
+ }
28
+ export declare namespace TaskListResponse {
29
+ interface Data {
30
+ /**
31
+ * Unique task identifier.
32
+ */
33
+ id: string;
34
+ _query: unknown;
35
+ /**
36
+ * Timestamp when the task was created.
37
+ */
38
+ created_at: string;
39
+ /**
40
+ * Original input data for the task.
41
+ */
42
+ input: unknown;
43
+ /**
44
+ * Current state of the task.
45
+ */
46
+ state: 'pending' | 'success' | 'error';
47
+ /**
48
+ * URL for checking the task status.
49
+ */
50
+ status_url: string;
51
+ /**
52
+ * Account name that owns the task.
53
+ */
54
+ account_name?: string;
55
+ api_type?: 'web' | 'serp' | 'ecommerce' | 'social';
56
+ /**
57
+ * Batch ID if this task is part of a batch.
58
+ */
59
+ batch_id?: string;
60
+ /**
61
+ * URL for downloading the task results.
62
+ */
63
+ download_url?: string;
64
+ /**
65
+ * Error message if the task failed.
66
+ */
67
+ error?: string;
68
+ /**
69
+ * Classification of the error type.
70
+ */
71
+ error_type?: string;
72
+ /**
73
+ * Timestamp when the task was last modified.
74
+ */
75
+ modified_at?: string;
76
+ /**
77
+ * Storage location of the output data.
78
+ */
79
+ output_url?: string;
80
+ /**
81
+ * HTTP status code from the task execution.
82
+ */
83
+ status_code?: number;
84
+ }
85
+ interface Pagination {
86
+ /**
87
+ * Whether there are more tasks available.
88
+ */
89
+ has_next: boolean;
90
+ /**
91
+ * Cursor to use for fetching the next page.
92
+ */
93
+ next_cursor: string | null;
94
+ /**
95
+ * Total number of tasks.
96
+ */
97
+ total: number;
98
+ }
99
+ }
100
+ /**
101
+ * Response containing task details.
102
+ */
103
+ export interface TaskGetResponse {
104
+ task: TaskGetResponse.Task;
105
+ }
106
+ export declare namespace TaskGetResponse {
107
+ interface Task {
108
+ /**
109
+ * Unique task identifier.
110
+ */
111
+ id: string;
112
+ _query: unknown;
113
+ /**
114
+ * Timestamp when the task was created.
115
+ */
116
+ created_at: string;
117
+ /**
118
+ * Original input data for the task.
119
+ */
120
+ input: unknown;
121
+ /**
122
+ * Current state of the task.
123
+ */
124
+ state: 'pending' | 'success' | 'error';
125
+ /**
126
+ * URL for checking the task status.
127
+ */
128
+ status_url: string;
129
+ /**
130
+ * Account name that owns the task.
131
+ */
132
+ account_name?: string;
133
+ api_type?: 'web' | 'serp' | 'ecommerce' | 'social';
134
+ /**
135
+ * Batch ID if this task is part of a batch.
136
+ */
137
+ batch_id?: string;
138
+ /**
139
+ * URL for downloading the task results.
140
+ */
141
+ download_url?: string;
142
+ /**
143
+ * Error message if the task failed.
144
+ */
145
+ error?: string;
146
+ /**
147
+ * Classification of the error type.
148
+ */
149
+ error_type?: string;
150
+ /**
151
+ * Timestamp when the task was last modified.
152
+ */
153
+ modified_at?: string;
154
+ /**
155
+ * Storage location of the output data.
156
+ */
157
+ output_url?: string;
158
+ /**
159
+ * HTTP status code from the task execution.
160
+ */
161
+ status_code?: number;
162
+ }
163
+ }
164
+ /**
165
+ * The results of the completed task.
166
+ */
167
+ export type TaskResultsResponse = {
168
+ [key: string]: unknown;
169
+ };
170
+ export interface TaskListParams {
171
+ /**
172
+ * Cursor for pagination. Use the next_cursor from the previous response.
173
+ */
174
+ cursor?: string;
175
+ /**
176
+ * Number of tasks to return per page.
177
+ */
178
+ limit?: number;
179
+ }
180
+ export declare namespace Tasks {
181
+ export { type TaskListResponse as TaskListResponse, type TaskGetResponse as TaskGetResponse, type TaskResultsResponse as TaskResultsResponse, type TaskListParams as TaskListParams, };
182
+ }
183
+ //# sourceMappingURL=tasks.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasks.d.mts","sourceRoot":"","sources":["../src/resources/tasks.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gBAAgB,CAAC;IAI/B;;OAEG;IACH,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,eAAe,CAAC;IAI1E;;OAEG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAGnF;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAEnC,UAAU,EAAE,gBAAgB,CAAC,UAAU,CAAC;CACzC;AAED,yBAAiB,gBAAgB,CAAC;IAChC,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX,MAAM,EAAE,OAAO,CAAC;QAEhB;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,KAAK,EAAE,OAAO,CAAC;QAEf;;WAEG;QACH,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;QAEvC;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QAEtB,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;QAEnD;;WAEG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