@expandai/sdk 0.16.0 → 0.17.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 (360) hide show
  1. package/LICENSE +2 -1
  2. package/README.md +83 -307
  3. package/build/dts/Client.d.ts +61 -0
  4. package/build/dts/Client.d.ts.map +1 -0
  5. package/build/dts/Error.d.ts +90 -0
  6. package/build/dts/Error.d.ts.map +1 -0
  7. package/build/dts/FetchJson.d.ts +364 -0
  8. package/build/dts/FetchJson.d.ts.map +1 -0
  9. package/build/dts/Generated.d.ts +1863 -0
  10. package/build/dts/Generated.d.ts.map +1 -0
  11. package/build/dts/HttpClientHelpers.d.ts +5 -0
  12. package/build/dts/HttpClientHelpers.d.ts.map +1 -0
  13. package/build/dts/Internal.d.ts +49 -0
  14. package/build/dts/Internal.d.ts.map +1 -0
  15. package/build/dts/Playground.d.ts +24 -0
  16. package/build/dts/Playground.d.ts.map +1 -0
  17. package/build/dts/Service.d.ts +277 -0
  18. package/build/dts/Service.d.ts.map +1 -0
  19. package/build/dts/index.d.ts +6 -0
  20. package/build/dts/index.d.ts.map +1 -0
  21. package/build/esm/Client.js +87 -0
  22. package/build/esm/Client.js.map +1 -0
  23. package/build/esm/Error.js +91 -0
  24. package/build/esm/Error.js.map +1 -0
  25. package/build/esm/FetchJson.js +70 -0
  26. package/build/esm/FetchJson.js.map +1 -0
  27. package/build/esm/Generated.js +646 -0
  28. package/build/esm/Generated.js.map +1 -0
  29. package/build/esm/HttpClientHelpers.js +14 -0
  30. package/build/esm/HttpClientHelpers.js.map +1 -0
  31. package/build/esm/Internal.js +95 -0
  32. package/build/esm/Internal.js.map +1 -0
  33. package/build/esm/Playground.js +55 -0
  34. package/build/esm/Playground.js.map +1 -0
  35. package/build/esm/Service.js +174 -0
  36. package/build/esm/Service.js.map +1 -0
  37. package/build/esm/index.js +4 -0
  38. package/build/esm/index.js.map +1 -0
  39. package/package.json +53 -136
  40. package/src/Client.ts +128 -0
  41. package/src/Error.ts +105 -0
  42. package/src/FetchJson.ts +109 -0
  43. package/src/Generated.ts +949 -0
  44. package/src/HttpClientHelpers.ts +24 -0
  45. package/src/Internal.ts +246 -0
  46. package/src/Playground.ts +76 -0
  47. package/src/Service.ts +264 -0
  48. package/src/index.ts +27 -21
  49. package/CHANGELOG.md +0 -224
  50. package/api-promise.d.mts +0 -2
  51. package/api-promise.d.mts.map +0 -1
  52. package/api-promise.d.ts +0 -2
  53. package/api-promise.d.ts.map +0 -1
  54. package/api-promise.js +0 -6
  55. package/api-promise.js.map +0 -1
  56. package/api-promise.mjs +0 -2
  57. package/api-promise.mjs.map +0 -1
  58. package/client.d.mts +0 -184
  59. package/client.d.mts.map +0 -1
  60. package/client.d.ts +0 -184
  61. package/client.d.ts.map +0 -1
  62. package/client.js +0 -476
  63. package/client.js.map +0 -1
  64. package/client.mjs +0 -472
  65. package/client.mjs.map +0 -1
  66. package/core/api-promise.d.mts +0 -46
  67. package/core/api-promise.d.mts.map +0 -1
  68. package/core/api-promise.d.ts +0 -46
  69. package/core/api-promise.d.ts.map +0 -1
  70. package/core/api-promise.js +0 -74
  71. package/core/api-promise.js.map +0 -1
  72. package/core/api-promise.mjs +0 -70
  73. package/core/api-promise.mjs.map +0 -1
  74. package/core/error.d.mts +0 -46
  75. package/core/error.d.mts.map +0 -1
  76. package/core/error.d.ts +0 -46
  77. package/core/error.d.ts.map +0 -1
  78. package/core/error.js +0 -113
  79. package/core/error.js.map +0 -1
  80. package/core/error.mjs +0 -97
  81. package/core/error.mjs.map +0 -1
  82. package/core/resource.d.mts +0 -6
  83. package/core/resource.d.mts.map +0 -1
  84. package/core/resource.d.ts +0 -6
  85. package/core/resource.d.ts.map +0 -1
  86. package/core/resource.js +0 -11
  87. package/core/resource.js.map +0 -1
  88. package/core/resource.mjs +0 -7
  89. package/core/resource.mjs.map +0 -1
  90. package/core/uploads.d.mts +0 -3
  91. package/core/uploads.d.mts.map +0 -1
  92. package/core/uploads.d.ts +0 -3
  93. package/core/uploads.d.ts.map +0 -1
  94. package/core/uploads.js +0 -6
  95. package/core/uploads.js.map +0 -1
  96. package/core/uploads.mjs +0 -2
  97. package/core/uploads.mjs.map +0 -1
  98. package/error.d.mts +0 -2
  99. package/error.d.mts.map +0 -1
  100. package/error.d.ts +0 -2
  101. package/error.d.ts.map +0 -1
  102. package/error.js +0 -6
  103. package/error.js.map +0 -1
  104. package/error.mjs +0 -2
  105. package/error.mjs.map +0 -1
  106. package/index.d.mts +0 -6
  107. package/index.d.mts.map +0 -1
  108. package/index.d.ts +0 -6
  109. package/index.d.ts.map +0 -1
  110. package/index.js +0 -30
  111. package/index.js.map +0 -1
  112. package/index.mjs +0 -7
  113. package/index.mjs.map +0 -1
  114. package/internal/builtin-types.d.mts +0 -73
  115. package/internal/builtin-types.d.mts.map +0 -1
  116. package/internal/builtin-types.d.ts +0 -73
  117. package/internal/builtin-types.d.ts.map +0 -1
  118. package/internal/builtin-types.js +0 -4
  119. package/internal/builtin-types.js.map +0 -1
  120. package/internal/builtin-types.mjs +0 -3
  121. package/internal/builtin-types.mjs.map +0 -1
  122. package/internal/detect-platform.d.mts +0 -15
  123. package/internal/detect-platform.d.mts.map +0 -1
  124. package/internal/detect-platform.d.ts +0 -15
  125. package/internal/detect-platform.d.ts.map +0 -1
  126. package/internal/detect-platform.js +0 -162
  127. package/internal/detect-platform.js.map +0 -1
  128. package/internal/detect-platform.mjs +0 -157
  129. package/internal/detect-platform.mjs.map +0 -1
  130. package/internal/errors.d.mts +0 -3
  131. package/internal/errors.d.mts.map +0 -1
  132. package/internal/errors.d.ts +0 -3
  133. package/internal/errors.d.ts.map +0 -1
  134. package/internal/errors.js +0 -41
  135. package/internal/errors.js.map +0 -1
  136. package/internal/errors.mjs +0 -36
  137. package/internal/errors.mjs.map +0 -1
  138. package/internal/headers.d.mts +0 -20
  139. package/internal/headers.d.mts.map +0 -1
  140. package/internal/headers.d.ts +0 -20
  141. package/internal/headers.d.ts.map +0 -1
  142. package/internal/headers.js +0 -79
  143. package/internal/headers.js.map +0 -1
  144. package/internal/headers.mjs +0 -74
  145. package/internal/headers.mjs.map +0 -1
  146. package/internal/parse.d.mts +0 -12
  147. package/internal/parse.d.mts.map +0 -1
  148. package/internal/parse.d.ts +0 -12
  149. package/internal/parse.d.ts.map +0 -1
  150. package/internal/parse.js +0 -40
  151. package/internal/parse.js.map +0 -1
  152. package/internal/parse.mjs +0 -37
  153. package/internal/parse.mjs.map +0 -1
  154. package/internal/request-options.d.mts +0 -75
  155. package/internal/request-options.d.mts.map +0 -1
  156. package/internal/request-options.d.ts +0 -75
  157. package/internal/request-options.d.ts.map +0 -1
  158. package/internal/request-options.js +0 -14
  159. package/internal/request-options.js.map +0 -1
  160. package/internal/request-options.mjs +0 -10
  161. package/internal/request-options.mjs.map +0 -1
  162. package/internal/shim-types.d.mts +0 -17
  163. package/internal/shim-types.d.mts.map +0 -1
  164. package/internal/shim-types.d.ts +0 -17
  165. package/internal/shim-types.d.ts.map +0 -1
  166. package/internal/shim-types.js +0 -4
  167. package/internal/shim-types.js.map +0 -1
  168. package/internal/shim-types.mjs +0 -3
  169. package/internal/shim-types.mjs.map +0 -1
  170. package/internal/shims.d.mts +0 -20
  171. package/internal/shims.d.mts.map +0 -1
  172. package/internal/shims.d.ts +0 -20
  173. package/internal/shims.d.ts.map +0 -1
  174. package/internal/shims.js +0 -92
  175. package/internal/shims.js.map +0 -1
  176. package/internal/shims.mjs +0 -85
  177. package/internal/shims.mjs.map +0 -1
  178. package/internal/to-file.d.mts +0 -45
  179. package/internal/to-file.d.mts.map +0 -1
  180. package/internal/to-file.d.ts +0 -45
  181. package/internal/to-file.d.ts.map +0 -1
  182. package/internal/to-file.js +0 -91
  183. package/internal/to-file.js.map +0 -1
  184. package/internal/to-file.mjs +0 -88
  185. package/internal/to-file.mjs.map +0 -1
  186. package/internal/tslib.js +0 -81
  187. package/internal/tslib.mjs +0 -17
  188. package/internal/types.d.mts +0 -69
  189. package/internal/types.d.mts.map +0 -1
  190. package/internal/types.d.ts +0 -69
  191. package/internal/types.d.ts.map +0 -1
  192. package/internal/types.js +0 -4
  193. package/internal/types.js.map +0 -1
  194. package/internal/types.mjs +0 -3
  195. package/internal/types.mjs.map +0 -1
  196. package/internal/uploads.d.mts +0 -42
  197. package/internal/uploads.d.mts.map +0 -1
  198. package/internal/uploads.d.ts +0 -42
  199. package/internal/uploads.d.ts.map +0 -1
  200. package/internal/uploads.js +0 -141
  201. package/internal/uploads.js.map +0 -1
  202. package/internal/uploads.mjs +0 -131
  203. package/internal/uploads.mjs.map +0 -1
  204. package/internal/utils/base64.d.mts +0 -3
  205. package/internal/utils/base64.d.mts.map +0 -1
  206. package/internal/utils/base64.d.ts +0 -3
  207. package/internal/utils/base64.d.ts.map +0 -1
  208. package/internal/utils/base64.js +0 -38
  209. package/internal/utils/base64.js.map +0 -1
  210. package/internal/utils/base64.mjs +0 -33
  211. package/internal/utils/base64.mjs.map +0 -1
  212. package/internal/utils/bytes.d.mts +0 -4
  213. package/internal/utils/bytes.d.mts.map +0 -1
  214. package/internal/utils/bytes.d.ts +0 -4
  215. package/internal/utils/bytes.d.ts.map +0 -1
  216. package/internal/utils/bytes.js +0 -31
  217. package/internal/utils/bytes.js.map +0 -1
  218. package/internal/utils/bytes.mjs +0 -26
  219. package/internal/utils/bytes.mjs.map +0 -1
  220. package/internal/utils/env.d.mts +0 -9
  221. package/internal/utils/env.d.mts.map +0 -1
  222. package/internal/utils/env.d.ts +0 -9
  223. package/internal/utils/env.d.ts.map +0 -1
  224. package/internal/utils/env.js +0 -22
  225. package/internal/utils/env.js.map +0 -1
  226. package/internal/utils/env.mjs +0 -18
  227. package/internal/utils/env.mjs.map +0 -1
  228. package/internal/utils/log.d.mts +0 -37
  229. package/internal/utils/log.d.mts.map +0 -1
  230. package/internal/utils/log.d.ts +0 -37
  231. package/internal/utils/log.d.ts.map +0 -1
  232. package/internal/utils/log.js +0 -86
  233. package/internal/utils/log.js.map +0 -1
  234. package/internal/utils/log.mjs +0 -80
  235. package/internal/utils/log.mjs.map +0 -1
  236. package/internal/utils/path.d.mts +0 -15
  237. package/internal/utils/path.d.mts.map +0 -1
  238. package/internal/utils/path.d.ts +0 -15
  239. package/internal/utils/path.d.ts.map +0 -1
  240. package/internal/utils/path.js +0 -79
  241. package/internal/utils/path.js.map +0 -1
  242. package/internal/utils/path.mjs +0 -74
  243. package/internal/utils/path.mjs.map +0 -1
  244. package/internal/utils/sleep.d.mts +0 -2
  245. package/internal/utils/sleep.d.mts.map +0 -1
  246. package/internal/utils/sleep.d.ts +0 -2
  247. package/internal/utils/sleep.d.ts.map +0 -1
  248. package/internal/utils/sleep.js +0 -7
  249. package/internal/utils/sleep.js.map +0 -1
  250. package/internal/utils/sleep.mjs +0 -3
  251. package/internal/utils/sleep.mjs.map +0 -1
  252. package/internal/utils/uuid.d.mts +0 -5
  253. package/internal/utils/uuid.d.mts.map +0 -1
  254. package/internal/utils/uuid.d.ts +0 -5
  255. package/internal/utils/uuid.d.ts.map +0 -1
  256. package/internal/utils/uuid.js +0 -19
  257. package/internal/utils/uuid.js.map +0 -1
  258. package/internal/utils/uuid.mjs +0 -15
  259. package/internal/utils/uuid.mjs.map +0 -1
  260. package/internal/utils/values.d.mts +0 -18
  261. package/internal/utils/values.d.mts.map +0 -1
  262. package/internal/utils/values.d.ts +0 -18
  263. package/internal/utils/values.d.ts.map +0 -1
  264. package/internal/utils/values.js +0 -112
  265. package/internal/utils/values.js.map +0 -1
  266. package/internal/utils/values.mjs +0 -94
  267. package/internal/utils/values.mjs.map +0 -1
  268. package/internal/utils.d.mts +0 -7
  269. package/internal/utils.d.mts.map +0 -1
  270. package/internal/utils.d.ts +0 -7
  271. package/internal/utils.d.ts.map +0 -1
  272. package/internal/utils.js +0 -11
  273. package/internal/utils.js.map +0 -1
  274. package/internal/utils.mjs +0 -8
  275. package/internal/utils.mjs.map +0 -1
  276. package/resource.d.mts +0 -2
  277. package/resource.d.mts.map +0 -1
  278. package/resource.d.ts +0 -2
  279. package/resource.d.ts.map +0 -1
  280. package/resource.js +0 -6
  281. package/resource.js.map +0 -1
  282. package/resource.mjs +0 -2
  283. package/resource.mjs.map +0 -1
  284. package/resources/index.d.mts +0 -2
  285. package/resources/index.d.mts.map +0 -1
  286. package/resources/index.d.ts +0 -2
  287. package/resources/index.d.ts.map +0 -1
  288. package/resources/index.js +0 -4
  289. package/resources/index.js.map +0 -1
  290. package/resources/index.mjs +0 -3
  291. package/resources/index.mjs.map +0 -1
  292. package/resources/top-level.d.mts +0 -468
  293. package/resources/top-level.d.mts.map +0 -1
  294. package/resources/top-level.d.ts +0 -468
  295. package/resources/top-level.d.ts.map +0 -1
  296. package/resources/top-level.js +0 -4
  297. package/resources/top-level.js.map +0 -1
  298. package/resources/top-level.mjs +0 -3
  299. package/resources/top-level.mjs.map +0 -1
  300. package/resources.d.mts +0 -2
  301. package/resources.d.mts.map +0 -1
  302. package/resources.d.ts +0 -2
  303. package/resources.d.ts.map +0 -1
  304. package/resources.js +0 -5
  305. package/resources.js.map +0 -1
  306. package/resources.mjs +0 -2
  307. package/resources.mjs.map +0 -1
  308. package/src/api-promise.ts +0 -2
  309. package/src/client.ts +0 -744
  310. package/src/core/README.md +0 -3
  311. package/src/core/api-promise.ts +0 -92
  312. package/src/core/error.ts +0 -130
  313. package/src/core/resource.ts +0 -11
  314. package/src/core/uploads.ts +0 -2
  315. package/src/error.ts +0 -2
  316. package/src/internal/README.md +0 -3
  317. package/src/internal/builtin-types.ts +0 -93
  318. package/src/internal/detect-platform.ts +0 -196
  319. package/src/internal/errors.ts +0 -33
  320. package/src/internal/headers.ts +0 -97
  321. package/src/internal/parse.ts +0 -56
  322. package/src/internal/request-options.ts +0 -91
  323. package/src/internal/shim-types.ts +0 -26
  324. package/src/internal/shims.ts +0 -107
  325. package/src/internal/to-file.ts +0 -154
  326. package/src/internal/types.ts +0 -95
  327. package/src/internal/uploads.ts +0 -187
  328. package/src/internal/utils/base64.ts +0 -40
  329. package/src/internal/utils/bytes.ts +0 -32
  330. package/src/internal/utils/env.ts +0 -18
  331. package/src/internal/utils/log.ts +0 -127
  332. package/src/internal/utils/path.ts +0 -88
  333. package/src/internal/utils/sleep.ts +0 -3
  334. package/src/internal/utils/uuid.ts +0 -17
  335. package/src/internal/utils/values.ts +0 -105
  336. package/src/internal/utils.ts +0 -8
  337. package/src/lib/.keep +0 -4
  338. package/src/resource.ts +0 -2
  339. package/src/resources/index.ts +0 -3
  340. package/src/resources/top-level.ts +0 -551
  341. package/src/resources.ts +0 -1
  342. package/src/tsconfig.json +0 -11
  343. package/src/uploads.ts +0 -2
  344. package/src/version.ts +0 -1
  345. package/uploads.d.mts +0 -2
  346. package/uploads.d.mts.map +0 -1
  347. package/uploads.d.ts +0 -2
  348. package/uploads.d.ts.map +0 -1
  349. package/uploads.js +0 -6
  350. package/uploads.js.map +0 -1
  351. package/uploads.mjs +0 -2
  352. package/uploads.mjs.map +0 -1
  353. package/version.d.mts +0 -2
  354. package/version.d.mts.map +0 -1
  355. package/version.d.ts +0 -2
  356. package/version.d.ts.map +0 -1
  357. package/version.js +0 -5
  358. package/version.js.map +0 -1
  359. package/version.mjs +0 -2
  360. package/version.mjs.map +0 -1
package/CHANGELOG.md DELETED
@@ -1,224 +0,0 @@
1
- # Changelog
2
-
3
- ## 0.16.0 (2026-02-19)
4
-
5
- Full Changelog: [v0.15.0...v0.16.0](https://github.com/expandai/expandai-node/compare/v0.15.0...v0.16.0)
6
-
7
- ### Features
8
-
9
- * **api:** api update ([3ed3cb7](https://github.com/expandai/expandai-node/commit/3ed3cb7118c42bbba9b0d6b4afffba60e5b74c0a))
10
-
11
- ## 0.15.0 (2026-02-19)
12
-
13
- Full Changelog: [v0.14.0...v0.15.0](https://github.com/expandai/expandai-node/compare/v0.14.0...v0.15.0)
14
-
15
- ### Features
16
-
17
- * **api:** api update ([caec526](https://github.com/expandai/expandai-node/commit/caec526ac68b6b400126e3f1e38508fd2a5476a6))
18
-
19
- ## 0.14.0 (2026-02-18)
20
-
21
- Full Changelog: [v0.13.3...v0.14.0](https://github.com/expandai/expandai-node/compare/v0.13.3...v0.14.0)
22
-
23
- ### Features
24
-
25
- * **api:** api update ([1139b9f](https://github.com/expandai/expandai-node/commit/1139b9f93a1192bfb12233feb6258ac18401d425))
26
-
27
- ## 0.13.3 (2026-02-18)
28
-
29
- Full Changelog: [v0.13.2...v0.13.3](https://github.com/expandai/expandai-node/compare/v0.13.2...v0.13.3)
30
-
31
- ### Chores
32
-
33
- * **internal/client:** fix form-urlencoded requests ([32a230d](https://github.com/expandai/expandai-node/commit/32a230d1e9d3a7228bf38d4446e95661c69af321))
34
- * **internal:** avoid type checking errors with ts-reset ([305f914](https://github.com/expandai/expandai-node/commit/305f9146617c2be34cd90a9813b59372770c7c3f))
35
- * **internal:** upgrade pnpm ([f9754be](https://github.com/expandai/expandai-node/commit/f9754bed17c65615d0b9f53323cc420a01e502ae))
36
-
37
- ## 0.13.2 (2026-02-06)
38
-
39
- Full Changelog: [v0.13.1...v0.13.2](https://github.com/expandai/expandai-node/compare/v0.13.1...v0.13.2)
40
-
41
- ### Bug Fixes
42
-
43
- * **client:** avoid removing abort listener too early ([49eda05](https://github.com/expandai/expandai-node/commit/49eda0589979f60e275e23ef76a6292f8ee591c4))
44
-
45
-
46
- ### Chores
47
-
48
- * **client:** do not parse responses with empty content-length ([b092b4d](https://github.com/expandai/expandai-node/commit/b092b4d9f1a269ac884a909b467403bbf2a8e234))
49
- * **client:** restructure abort controller binding ([8b000cc](https://github.com/expandai/expandai-node/commit/8b000ccd94c6fd6215cf87605b9213762250a4e2))
50
-
51
- ## 0.13.1 (2026-02-03)
52
-
53
- Full Changelog: [v0.13.0...v0.13.1](https://github.com/expandai/expandai-node/compare/v0.13.0...v0.13.1)
54
-
55
- ### Bug Fixes
56
-
57
- * **client:** avoid memory leak with abort signals ([8ec62df](https://github.com/expandai/expandai-node/commit/8ec62dfbbf400a8a8fcb125ad980c2f0fd77ebd4))
58
-
59
-
60
- ### Chores
61
-
62
- * **ci:** upgrade `actions/github-script` ([82e1160](https://github.com/expandai/expandai-node/commit/82e1160456a1d246f5efaecd6c405252507cb495))
63
-
64
- ## 0.13.0 (2026-01-23)
65
-
66
- Full Changelog: [v0.12.0...v0.13.0](https://github.com/expandai/expandai-node/compare/v0.12.0...v0.13.0)
67
-
68
- ### Features
69
-
70
- * **api:** api update ([1c75cd9](https://github.com/expandai/expandai-node/commit/1c75cd99ca1a7483889495ec85269c50487c8d47))
71
-
72
- ## 0.12.0 (2026-01-19)
73
-
74
- Full Changelog: [v0.11.0...v0.12.0](https://github.com/expandai/expandai-node/compare/v0.11.0...v0.12.0)
75
-
76
- ### Features
77
-
78
- * **api:** api update ([241b7a0](https://github.com/expandai/expandai-node/commit/241b7a0672fbfdb2ccc8d12c2ba9501e454f6125))
79
-
80
- ## 0.11.0 (2026-01-19)
81
-
82
- Full Changelog: [v0.10.0...v0.11.0](https://github.com/expandai/expandai-node/compare/v0.10.0...v0.11.0)
83
-
84
- ### Features
85
-
86
- * **api:** api update ([ca15a27](https://github.com/expandai/expandai-node/commit/ca15a2763ded54ee12c87912df6c1ab0257ca16c))
87
-
88
-
89
- ### Chores
90
-
91
- * **internal:** update `actions/checkout` version ([eee280b](https://github.com/expandai/expandai-node/commit/eee280bd9a2c7e6ba0a590116bc5922ed8e0950b))
92
- * **internal:** update lock file ([6feee9f](https://github.com/expandai/expandai-node/commit/6feee9fcb4b9cdaacfa1e0ad5052088c64fb148e))
93
- * **internal:** upgrade babel, qs, js-yaml ([baf3990](https://github.com/expandai/expandai-node/commit/baf39903180fe7f93a4ec151ed3bba447272049c))
94
- * **internal:** upgrade brace-expansion and @babel/helpers ([6a8c4c9](https://github.com/expandai/expandai-node/commit/6a8c4c988e5c041f54353ea763cfb8a22231916c))
95
-
96
- ## 0.10.0 (2026-01-13)
97
-
98
- Full Changelog: [v0.9.0...v0.10.0](https://github.com/expandai/expandai-node/compare/v0.9.0...v0.10.0)
99
-
100
- ### Features
101
-
102
- * **api:** api update ([cf63bbe](https://github.com/expandai/expandai-node/commit/cf63bbe0fb5272e9b3426aa0154d7c5f17f343f0))
103
-
104
-
105
- ### Chores
106
-
107
- * break long lines in snippets into multiline ([eee7633](https://github.com/expandai/expandai-node/commit/eee7633377472bef50c17026254ddf6b110d7181))
108
- * **internal:** codegen related update ([9916b2b](https://github.com/expandai/expandai-node/commit/9916b2b0e37e4a471ac69a6a44a8a4cc6a41e638))
109
-
110
- ## 0.9.0 (2025-12-17)
111
-
112
- Full Changelog: [v0.8.0...v0.9.0](https://github.com/expandai/expandai-node/compare/v0.8.0...v0.9.0)
113
-
114
- ### Features
115
-
116
- * **api:** manual updates ([6e2f4ba](https://github.com/expandai/expandai-node/commit/6e2f4ba3104a18000bd5ce37da1020f66b9b1ba4))
117
-
118
- ## 0.8.0 (2025-12-17)
119
-
120
- Full Changelog: [v0.7.0...v0.8.0](https://github.com/expandai/expandai-node/compare/v0.7.0...v0.8.0)
121
-
122
- ### Features
123
-
124
- * **api:** manual updates ([d0c6951](https://github.com/expandai/expandai-node/commit/d0c6951f0ffc4f89bfc99518e4295a5c7097820a))
125
-
126
- ## 0.7.0 (2025-12-12)
127
-
128
- Full Changelog: [v0.6.0...v0.7.0](https://github.com/expandai/expandai-node/compare/v0.6.0...v0.7.0)
129
-
130
- ### Features
131
-
132
- * **api:** api update ([2387233](https://github.com/expandai/expandai-node/commit/23872334e6eed93e45a953dc6de8190562ada64a))
133
-
134
- ## 0.6.0 (2025-12-11)
135
-
136
- Full Changelog: [v0.5.1...v0.6.0](https://github.com/expandai/expandai-node/compare/v0.5.1...v0.6.0)
137
-
138
- ### Features
139
-
140
- * **api:** manual updates ([9502cd0](https://github.com/expandai/expandai-node/commit/9502cd0afd989496cb5813207f6714b9a204b444))
141
-
142
- ## 0.5.1 (2025-12-11)
143
-
144
- Full Changelog: [v0.5.0...v0.5.1](https://github.com/expandai/expandai-node/compare/v0.5.0...v0.5.1)
145
-
146
- ### Bug Fixes
147
-
148
- * restore original formatting in test file ([c2997c0](https://github.com/expandai/expandai-node/commit/c2997c04d16d2fb70ee86db168a72a054bbf2e0d))
149
-
150
- ## 0.5.0 (2025-12-10)
151
-
152
- Full Changelog: [v0.4.0...v0.5.0](https://github.com/expandai/expandai-node/compare/v0.4.0...v0.5.0)
153
-
154
- ### Features
155
-
156
- * **api:** manual updates ([49cb093](https://github.com/expandai/expandai-node/commit/49cb093f2629dab1b5cb60087a71931f36c98ca3))
157
-
158
-
159
- ### Chores
160
-
161
- * remove custom code ([10cb9b4](https://github.com/expandai/expandai-node/commit/10cb9b46a863c1aec25e2b907efb4ef294589d3b))
162
- * remove custom code ([fbd1487](https://github.com/expandai/expandai-node/commit/fbd148725dd929c7992a7c7c214d288e745d8e3f))
163
-
164
- ## 0.4.0 (2025-12-10)
165
-
166
- Full Changelog: [v0.3.0...v0.4.0](https://github.com/expandai/expandai-node/compare/v0.3.0...v0.4.0)
167
-
168
- ### Features
169
-
170
- * **api:** api update ([da14fd9](https://github.com/expandai/expandai-node/commit/da14fd9f751ed802099e73f95062853dc10d1d6b))
171
- * **api:** manual updates ([f591f67](https://github.com/expandai/expandai-node/commit/f591f6735dd5e30a0447c23f3aefb2e1dbc72690))
172
- * **api:** manual updates ([5b9fee1](https://github.com/expandai/expandai-node/commit/5b9fee13a5fa82c5dac0f541dbe6f80eab19af66))
173
- * **api:** manual updates ([2969350](https://github.com/expandai/expandai-node/commit/2969350ac162eef85fe937873434d84387df3f97))
174
-
175
-
176
- ### Bug Fixes
177
-
178
- * **mcp:** correct code tool API endpoint ([4815827](https://github.com/expandai/expandai-node/commit/4815827bc03865dac36d751e17b2c78d2439e03e))
179
- * **mcp:** return correct lines on typescript errors ([ef74a7f](https://github.com/expandai/expandai-node/commit/ef74a7f983e31bbbd7ea91f1b2c37dbf5518e13a))
180
-
181
-
182
- ### Chores
183
-
184
- * **client:** fix logger property type ([2be4bbe](https://github.com/expandai/expandai-node/commit/2be4bbe85079d66bbbd6e7f4c4d98b801a2d261b))
185
- * **internal:** codegen related update ([c89915a](https://github.com/expandai/expandai-node/commit/c89915aaaaeb1708cc7aa66341ebdad9f5a2b079))
186
- * **internal:** codegen related update ([a888567](https://github.com/expandai/expandai-node/commit/a888567bf19c8546f2ba6b11b5d22febb2ebee1f))
187
- * **internal:** configure pnpm minimumReleaseAge to 1 day ([b4dadd6](https://github.com/expandai/expandai-node/commit/b4dadd675f0a5bdcaadf5dc48faae83f62363528))
188
- * **internal:** upgrade eslint ([786bc01](https://github.com/expandai/expandai-node/commit/786bc01bfe441852fd517abb9f2e9395f7eaca6d))
189
- * update SDK settings ([466cd07](https://github.com/expandai/expandai-node/commit/466cd07e3e63792cfef4a8b3bbe28ae00385c5b8))
190
- * update SDK settings ([5cdf538](https://github.com/expandai/expandai-node/commit/5cdf5386218e1f4ec86a391d818f349c51648e78))
191
-
192
- ## 0.3.0 (2025-11-30)
193
-
194
- Full Changelog: [v0.2.0...v0.3.0](https://github.com/expandai/expand-typescript/compare/v0.2.0...v0.3.0)
195
-
196
- ### Features
197
-
198
- * **api:** api update ([9350502](https://github.com/expandai/expand-typescript/commit/935050201c9643fa79c88d0daec69c2885056b26))
199
-
200
- ## 0.2.0 (2025-11-29)
201
-
202
- Full Changelog: [v0.1.0...v0.2.0](https://github.com/expandai/expand-typescript/compare/v0.1.0...v0.2.0)
203
-
204
- ### Features
205
-
206
- * **api:** manual updates ([7d7b068](https://github.com/expandai/expand-typescript/commit/7d7b068c0c88d6ab51ab47e249f06a58c8667517))
207
-
208
- ## 0.1.0 (2025-11-29)
209
-
210
- Full Changelog: [v0.0.1...v0.1.0](https://github.com/expandai/expand-typescript/compare/v0.0.1...v0.1.0)
211
-
212
- ### Features
213
-
214
- * **api:** api update ([cb31681](https://github.com/expandai/expand-typescript/commit/cb3168104b3583eca6ef66c636f20cbd7e7a0d89))
215
- * **api:** api update ([33b79ed](https://github.com/expandai/expand-typescript/commit/33b79ed005526d69bd47b96e6ee8c8faca1d23c8))
216
- * **api:** api update ([3af47e7](https://github.com/expandai/expand-typescript/commit/3af47e7c9ff6cbeacad3a55041a36a71902a862c))
217
- * **api:** manual updates ([e5d53a5](https://github.com/expandai/expand-typescript/commit/e5d53a503f1daa04140e174cf98d7d9d786aa612))
218
- * **api:** manual updates ([e36ae22](https://github.com/expandai/expand-typescript/commit/e36ae22e2b2026f6d7dad163996617abdf98acdf))
219
- * **api:** manual updates ([ba0efe1](https://github.com/expandai/expand-typescript/commit/ba0efe1c8c6b69b9be6f41f623759404ffcf65f0))
220
- * **api:** manual updates ([ce482cc](https://github.com/expandai/expand-typescript/commit/ce482ccd3509202fe45e7d2a1d70210f40255c77))
221
- * **api:** manual updates ([218a60d](https://github.com/expandai/expand-typescript/commit/218a60dc48ad65076564807405422e14feebb195))
222
- * **api:** manual updates ([95a1c1d](https://github.com/expandai/expand-typescript/commit/95a1c1d25a02c797a91392d0baeb844b11880207))
223
- * **api:** manual updates ([a788d18](https://github.com/expandai/expand-typescript/commit/a788d18f6b56831420883b49fd54b5def04eefef))
224
- * **api:** manual updates ([9299218](https://github.com/expandai/expand-typescript/commit/9299218c5f69584cde8488de35cb8cffb5cf8fef))
package/api-promise.d.mts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./core/api-promise.mjs";
2
- //# sourceMappingURL=api-promise.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-promise.d.mts","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""}
package/api-promise.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./core/api-promise.js";
2
- //# sourceMappingURL=api-promise.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-promise.d.ts","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""}
package/api-promise.js DELETED
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("./internal/tslib.js");
4
- /** @deprecated Import from ./core/api-promise instead */
5
- tslib_1.__exportStar(require("./core/api-promise.js"), exports);
6
- //# sourceMappingURL=api-promise.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-promise.js","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AACzD,gEAAmC"}
package/api-promise.mjs DELETED
@@ -1,2 +0,0 @@
1
- export * from "./core/api-promise.mjs";
2
- //# sourceMappingURL=api-promise.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-promise.mjs","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""}
package/client.d.mts DELETED
@@ -1,184 +0,0 @@
1
- import type { RequestInit, RequestInfo } from "./internal/builtin-types.mjs";
2
- import type { PromiseOrValue, MergedRequestInit, FinalizedRequestInit } from "./internal/types.mjs";
3
- export type { Logger, LogLevel } from "./internal/utils/log.mjs";
4
- import * as Opts from "./internal/request-options.mjs";
5
- import * as Errors from "./core/error.mjs";
6
- import * as Uploads from "./core/uploads.mjs";
7
- import * as TopLevelAPI from "./resources/top-level.mjs";
8
- import { FetchParams, FetchResponse } from "./resources/top-level.mjs";
9
- import { APIPromise } from "./core/api-promise.mjs";
10
- import { type Fetch } from "./internal/builtin-types.mjs";
11
- import { HeadersLike, NullableHeaders } from "./internal/headers.mjs";
12
- import { FinalRequestOptions, RequestOptions } from "./internal/request-options.mjs";
13
- import { type LogLevel, type Logger } from "./internal/utils/log.mjs";
14
- export interface ClientOptions {
15
- /**
16
- * Defaults to process.env['EXPAND_API_KEY'].
17
- */
18
- apiKey?: string | undefined;
19
- /**
20
- * Override the default base URL for the API, e.g., "https://api.example.com/v2/"
21
- *
22
- * Defaults to process.env['EXPAND_BASE_URL'].
23
- */
24
- baseURL?: string | null | undefined;
25
- /**
26
- * The maximum amount of time (in milliseconds) that the client should wait for a response
27
- * from the server before timing out a single request.
28
- *
29
- * Note that request timeouts are retried by default, so in a worst-case scenario you may wait
30
- * much longer than this timeout before the promise succeeds or fails.
31
- *
32
- * @unit milliseconds
33
- */
34
- timeout?: number | undefined;
35
- /**
36
- * Additional `RequestInit` options to be passed to `fetch` calls.
37
- * Properties will be overridden by per-request `customFetchOptions`.
38
- */
39
- customFetchOptions?: MergedRequestInit | undefined;
40
- /**
41
- * Specify a custom `fetch` function implementation.
42
- *
43
- * If not provided, we expect that `fetch` is defined globally.
44
- */
45
- customFetch?: Fetch | undefined;
46
- /**
47
- * The maximum number of times that the client will retry a request in case of a
48
- * temporary failure, like a network error or a 5XX error from the server.
49
- *
50
- * @default 2
51
- */
52
- maxRetries?: number | undefined;
53
- /**
54
- * Default headers to include with every request to the API.
55
- *
56
- * These can be removed in individual requests by explicitly setting the
57
- * header to `null` in request options.
58
- */
59
- defaultHeaders?: HeadersLike | undefined;
60
- /**
61
- * Default query parameters to include with every request to the API.
62
- *
63
- * These can be removed in individual requests by explicitly setting the
64
- * param to `undefined` in request options.
65
- */
66
- defaultQuery?: Record<string, string | undefined> | undefined;
67
- /**
68
- * Set the log level.
69
- *
70
- * Defaults to process.env['EXPAND_LOG'] or 'warn' if it isn't set.
71
- */
72
- logLevel?: LogLevel | undefined;
73
- /**
74
- * Set the logger.
75
- *
76
- * Defaults to globalThis.console.
77
- */
78
- logger?: Logger | undefined;
79
- }
80
- /**
81
- * API Client for interfacing with the Expand API.
82
- */
83
- export declare class Expand {
84
- #private;
85
- apiKey: string;
86
- baseURL: string;
87
- maxRetries: number;
88
- timeout: number;
89
- logger: Logger;
90
- logLevel: LogLevel | undefined;
91
- customFetchOptions: MergedRequestInit | undefined;
92
- private _customFetch;
93
- protected idempotencyHeader?: string;
94
- private _options;
95
- /**
96
- * API Client for interfacing with the Expand API.
97
- *
98
- * @param {string | undefined} [opts.apiKey=process.env['EXPAND_API_KEY'] ?? undefined]
99
- * @param {string} [opts.baseURL=process.env['EXPAND_BASE_URL'] ?? https://api.expand.ai] - Override the default base URL for the API.
100
- * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
101
- * @param {MergedRequestInit} [opts.customFetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
102
- * @param {Fetch} [opts.customFetch] - Specify a custom `fetch` function implementation.
103
- * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
104
- * @param {HeadersLike} opts.defaultHeaders - Default headers to include with every request to the API.
105
- * @param {Record<string, string | undefined>} opts.defaultQuery - Default query parameters to include with every request to the API.
106
- */
107
- constructor({ baseURL, apiKey, ...opts }?: ClientOptions);
108
- /**
109
- * Create a new client instance re-using the same options given to the current client with optional overriding.
110
- */
111
- withOptions(options: Partial<ClientOptions>): this;
112
- /**
113
- * Fetch content from a URL using Hatchet-backed browser automation.
114
- */
115
- fetch(body: TopLevelAPI.FetchParams, options?: RequestOptions): APIPromise<TopLevelAPI.FetchResponse>;
116
- protected defaultQuery(): Record<string, string | undefined> | undefined;
117
- protected validateHeaders({ values, nulls }: NullableHeaders): void;
118
- protected authHeaders(opts: FinalRequestOptions): Promise<NullableHeaders | undefined>;
119
- /**
120
- * Basic re-implementation of `qs.stringify` for primitive types.
121
- */
122
- protected stringifyQuery(query: Record<string, unknown>): string;
123
- private getUserAgent;
124
- protected defaultIdempotencyKey(): string;
125
- protected makeStatusError(status: number, error: Object, message: string | undefined, headers: Headers): Errors.APIError;
126
- buildURL(path: string, query: Record<string, unknown> | null | undefined, defaultBaseURL?: string | undefined): string;
127
- /**
128
- * Used as a callback for mutating the given `FinalRequestOptions` object.
129
- */
130
- protected prepareOptions(options: FinalRequestOptions): Promise<void>;
131
- /**
132
- * Used as a callback for mutating the given `RequestInit` object.
133
- *
134
- * This is useful for cases where you want to add certain headers based off of
135
- * the request properties, e.g. `method` or `url`.
136
- */
137
- protected prepareRequest(request: RequestInit, { url, options }: {
138
- url: string;
139
- options: FinalRequestOptions;
140
- }): Promise<void>;
141
- get<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
142
- post<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
143
- patch<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
144
- put<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
145
- delete<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
146
- private methodRequest;
147
- request<Rsp>(options: PromiseOrValue<FinalRequestOptions>, remainingRetries?: number | null): APIPromise<Rsp>;
148
- private makeRequest;
149
- fetchWithTimeout(url: RequestInfo, init: RequestInit | undefined, ms: number, controller: AbortController): Promise<Response>;
150
- private shouldRetry;
151
- private retryRequest;
152
- private calculateDefaultRetryTimeoutMillis;
153
- buildRequest(inputOptions: FinalRequestOptions, { retryCount }?: {
154
- retryCount?: number;
155
- }): Promise<{
156
- req: FinalizedRequestInit;
157
- url: string;
158
- timeout: number;
159
- }>;
160
- private buildHeaders;
161
- private _makeAbort;
162
- private buildBody;
163
- static Expand: typeof Expand;
164
- static DEFAULT_TIMEOUT: number;
165
- static ExpandError: typeof Errors.ExpandError;
166
- static APIError: typeof Errors.APIError;
167
- static APIConnectionError: typeof Errors.APIConnectionError;
168
- static APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError;
169
- static APIUserAbortError: typeof Errors.APIUserAbortError;
170
- static NotFoundError: typeof Errors.NotFoundError;
171
- static ConflictError: typeof Errors.ConflictError;
172
- static RateLimitError: typeof Errors.RateLimitError;
173
- static BadRequestError: typeof Errors.BadRequestError;
174
- static AuthenticationError: typeof Errors.AuthenticationError;
175
- static InternalServerError: typeof Errors.InternalServerError;
176
- static PermissionDeniedError: typeof Errors.PermissionDeniedError;
177
- static UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
178
- static toFile: typeof Uploads.toFile;
179
- }
180
- export declare namespace Expand {
181
- export type RequestOptions = Opts.RequestOptions;
182
- export { type FetchResponse as FetchResponse, type FetchParams as FetchParams };
183
- }
184
- //# sourceMappingURL=client.d.mts.map
package/client.d.mts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.mts","source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Aa,EAAE,KAAK,WAAW,IAAI,WAAW,EAAE,CAAC;CACjF"}
package/client.d.ts DELETED
@@ -1,184 +0,0 @@
1
- import type { RequestInit, RequestInfo } from "./internal/builtin-types.js";
2
- import type { PromiseOrValue, MergedRequestInit, FinalizedRequestInit } from "./internal/types.js";
3
- export type { Logger, LogLevel } from "./internal/utils/log.js";
4
- import * as Opts from "./internal/request-options.js";
5
- import * as Errors from "./core/error.js";
6
- import * as Uploads from "./core/uploads.js";
7
- import * as TopLevelAPI from "./resources/top-level.js";
8
- import { FetchParams, FetchResponse } from "./resources/top-level.js";
9
- import { APIPromise } from "./core/api-promise.js";
10
- import { type Fetch } from "./internal/builtin-types.js";
11
- import { HeadersLike, NullableHeaders } from "./internal/headers.js";
12
- import { FinalRequestOptions, RequestOptions } from "./internal/request-options.js";
13
- import { type LogLevel, type Logger } from "./internal/utils/log.js";
14
- export interface ClientOptions {
15
- /**
16
- * Defaults to process.env['EXPAND_API_KEY'].
17
- */
18
- apiKey?: string | undefined;
19
- /**
20
- * Override the default base URL for the API, e.g., "https://api.example.com/v2/"
21
- *
22
- * Defaults to process.env['EXPAND_BASE_URL'].
23
- */
24
- baseURL?: string | null | undefined;
25
- /**
26
- * The maximum amount of time (in milliseconds) that the client should wait for a response
27
- * from the server before timing out a single request.
28
- *
29
- * Note that request timeouts are retried by default, so in a worst-case scenario you may wait
30
- * much longer than this timeout before the promise succeeds or fails.
31
- *
32
- * @unit milliseconds
33
- */
34
- timeout?: number | undefined;
35
- /**
36
- * Additional `RequestInit` options to be passed to `fetch` calls.
37
- * Properties will be overridden by per-request `customFetchOptions`.
38
- */
39
- customFetchOptions?: MergedRequestInit | undefined;
40
- /**
41
- * Specify a custom `fetch` function implementation.
42
- *
43
- * If not provided, we expect that `fetch` is defined globally.
44
- */
45
- customFetch?: Fetch | undefined;
46
- /**
47
- * The maximum number of times that the client will retry a request in case of a
48
- * temporary failure, like a network error or a 5XX error from the server.
49
- *
50
- * @default 2
51
- */
52
- maxRetries?: number | undefined;
53
- /**
54
- * Default headers to include with every request to the API.
55
- *
56
- * These can be removed in individual requests by explicitly setting the
57
- * header to `null` in request options.
58
- */
59
- defaultHeaders?: HeadersLike | undefined;
60
- /**
61
- * Default query parameters to include with every request to the API.
62
- *
63
- * These can be removed in individual requests by explicitly setting the
64
- * param to `undefined` in request options.
65
- */
66
- defaultQuery?: Record<string, string | undefined> | undefined;
67
- /**
68
- * Set the log level.
69
- *
70
- * Defaults to process.env['EXPAND_LOG'] or 'warn' if it isn't set.
71
- */
72
- logLevel?: LogLevel | undefined;
73
- /**
74
- * Set the logger.
75
- *
76
- * Defaults to globalThis.console.
77
- */
78
- logger?: Logger | undefined;
79
- }
80
- /**
81
- * API Client for interfacing with the Expand API.
82
- */
83
- export declare class Expand {
84
- #private;
85
- apiKey: string;
86
- baseURL: string;
87
- maxRetries: number;
88
- timeout: number;
89
- logger: Logger;
90
- logLevel: LogLevel | undefined;
91
- customFetchOptions: MergedRequestInit | undefined;
92
- private _customFetch;
93
- protected idempotencyHeader?: string;
94
- private _options;
95
- /**
96
- * API Client for interfacing with the Expand API.
97
- *
98
- * @param {string | undefined} [opts.apiKey=process.env['EXPAND_API_KEY'] ?? undefined]
99
- * @param {string} [opts.baseURL=process.env['EXPAND_BASE_URL'] ?? https://api.expand.ai] - Override the default base URL for the API.
100
- * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
101
- * @param {MergedRequestInit} [opts.customFetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
102
- * @param {Fetch} [opts.customFetch] - Specify a custom `fetch` function implementation.
103
- * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
104
- * @param {HeadersLike} opts.defaultHeaders - Default headers to include with every request to the API.
105
- * @param {Record<string, string | undefined>} opts.defaultQuery - Default query parameters to include with every request to the API.
106
- */
107
- constructor({ baseURL, apiKey, ...opts }?: ClientOptions);
108
- /**
109
- * Create a new client instance re-using the same options given to the current client with optional overriding.
110
- */
111
- withOptions(options: Partial<ClientOptions>): this;
112
- /**
113
- * Fetch content from a URL using Hatchet-backed browser automation.
114
- */
115
- fetch(body: TopLevelAPI.FetchParams, options?: RequestOptions): APIPromise<TopLevelAPI.FetchResponse>;
116
- protected defaultQuery(): Record<string, string | undefined> | undefined;
117
- protected validateHeaders({ values, nulls }: NullableHeaders): void;
118
- protected authHeaders(opts: FinalRequestOptions): Promise<NullableHeaders | undefined>;
119
- /**
120
- * Basic re-implementation of `qs.stringify` for primitive types.
121
- */
122
- protected stringifyQuery(query: Record<string, unknown>): string;
123
- private getUserAgent;
124
- protected defaultIdempotencyKey(): string;
125
- protected makeStatusError(status: number, error: Object, message: string | undefined, headers: Headers): Errors.APIError;
126
- buildURL(path: string, query: Record<string, unknown> | null | undefined, defaultBaseURL?: string | undefined): string;
127
- /**
128
- * Used as a callback for mutating the given `FinalRequestOptions` object.
129
- */
130
- protected prepareOptions(options: FinalRequestOptions): Promise<void>;
131
- /**
132
- * Used as a callback for mutating the given `RequestInit` object.
133
- *
134
- * This is useful for cases where you want to add certain headers based off of
135
- * the request properties, e.g. `method` or `url`.
136
- */
137
- protected prepareRequest(request: RequestInit, { url, options }: {
138
- url: string;
139
- options: FinalRequestOptions;
140
- }): Promise<void>;
141
- get<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
142
- post<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
143
- patch<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
144
- put<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
145
- delete<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
146
- private methodRequest;
147
- request<Rsp>(options: PromiseOrValue<FinalRequestOptions>, remainingRetries?: number | null): APIPromise<Rsp>;
148
- private makeRequest;
149
- fetchWithTimeout(url: RequestInfo, init: RequestInit | undefined, ms: number, controller: AbortController): Promise<Response>;
150
- private shouldRetry;
151
- private retryRequest;
152
- private calculateDefaultRetryTimeoutMillis;
153
- buildRequest(inputOptions: FinalRequestOptions, { retryCount }?: {
154
- retryCount?: number;
155
- }): Promise<{
156
- req: FinalizedRequestInit;
157
- url: string;
158
- timeout: number;
159
- }>;
160
- private buildHeaders;
161
- private _makeAbort;
162
- private buildBody;
163
- static Expand: typeof Expand;
164
- static DEFAULT_TIMEOUT: number;
165
- static ExpandError: typeof Errors.ExpandError;
166
- static APIError: typeof Errors.APIError;
167
- static APIConnectionError: typeof Errors.APIConnectionError;
168
- static APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError;
169
- static APIUserAbortError: typeof Errors.APIUserAbortError;
170
- static NotFoundError: typeof Errors.NotFoundError;
171
- static ConflictError: typeof Errors.ConflictError;
172
- static RateLimitError: typeof Errors.RateLimitError;
173
- static BadRequestError: typeof Errors.BadRequestError;
174
- static AuthenticationError: typeof Errors.AuthenticationError;
175
- static InternalServerError: typeof Errors.InternalServerError;
176
- static PermissionDeniedError: typeof Errors.PermissionDeniedError;
177
- static UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
178
- static toFile: typeof Uploads.toFile;
179
- }
180
- export declare namespace Expand {
181
- export type RequestOptions = Opts.RequestOptions;
182
- export { type FetchResponse as FetchResponse, type FetchParams as FetchParams };
183
- }
184
- //# sourceMappingURL=client.d.ts.map
package/client.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAET,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,EAAE,WAAW,EAAE,aAAa,EAAE;OAC9B,EAAE,UAAU,EA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