@expandai/sdk 0.17.0 → 0.17.2

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 +363 -0
  8. package/build/dts/FetchJson.d.ts.map +1 -0
  9. package/build/dts/Generated.d.ts +1896 -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 +283 -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 +651 -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 +72 -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 +960 -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 -238
  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 -469
  293. package/resources/top-level.d.mts.map +0 -1
  294. package/resources/top-level.d.ts +0 -469
  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 -552
  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/LICENSE CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  Apache License
2
3
  Version 2.0, January 2004
3
4
  http://www.apache.org/licenses/
@@ -186,7 +187,7 @@
186
187
  same "printed page" as the copyright notice for easier
187
188
  identification within third-party archives.
188
189
 
189
- Copyright 2026 Expand
190
+ Copyright [yyyy] [name of copyright owner]
190
191
 
191
192
  Licensed under the Apache License, Version 2.0 (the "License");
192
193
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -1,361 +1,137 @@
1
- # expand.ai TypeScript API Library
1
+ # @expandai/sdk
2
2
 
3
- [![NPM version](<https://img.shields.io/npm/v/@expandai/sdk.svg?label=npm%20(stable)>)](https://npmjs.org/package/@expandai/sdk) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@expandai/sdk)
3
+ Official TypeScript SDK for the [ExpandAI](https://expand.ai) API.
4
4
 
5
- This library provides convenient access to the expand.ai REST API from server-side TypeScript or JavaScript.
5
+ Built on [Effect](https://effect.website), with both a class-based client for promise-style usage and an `Effect.Service` for full Effect integration.
6
6
 
7
- The REST API documentation can be found on [expand.ai](https://expand.ai/docs). The full API of this library can be found in [api.md](api.md).
8
-
9
- It is generated with [Stainless](https://www.stainless.com/).
10
-
11
- ## Installation
7
+ ## Install
12
8
 
13
9
  ```sh
14
10
  npm install @expandai/sdk
11
+ # or
12
+ bun add @expandai/sdk
13
+ # or
14
+ pnpm add @expandai/sdk
15
15
  ```
16
16
 
17
- ## Usage
18
-
19
- The full API of this library can be found in [api.md](api.md).
20
-
21
- <!-- prettier-ignore -->
22
- ```js
23
- import Expand from '@expandai/sdk';
24
-
25
- const client = new Expand({
26
- apiKey: process.env['EXPAND_API_KEY'], // This is the default and can be omitted
27
- });
17
+ ## Authentication
28
18
 
29
- const response = await client.fetch({ url: 'https://news.ycombinator.com' });
19
+ Set `EXPAND_API_KEY` in your environment, or pass `apiKey` explicitly when constructing the client.
30
20
 
31
- console.log(response.data);
21
+ ```sh
22
+ export EXPAND_API_KEY=sk_...
32
23
  ```
33
24
 
34
- ### Request & Response types
25
+ ## Quick start
35
26
 
36
- This library includes TypeScript definitions for all request params and response fields. You may import and use them like so:
27
+ ### Promise API
37
28
 
38
- <!-- prettier-ignore -->
39
29
  ```ts
40
- import Expand from '@expandai/sdk';
41
-
42
- const client = new Expand({
43
- apiKey: process.env['EXPAND_API_KEY'], // This is the default and can be omitted
44
- });
45
-
46
- const params: Expand.FetchParams = { url: 'https://news.ycombinator.com' };
47
- const response: Expand.FetchResponse = await client.fetch(params);
48
- ```
49
-
50
- Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
30
+ import { ExpandClient } from '@expandai/sdk'
51
31
 
52
- ## Handling errors
32
+ const expand = new ExpandClient()
53
33
 
54
- When the library is unable to connect to the API,
55
- or if the API returns a non-success status code (i.e., 4xx or 5xx response),
56
- a subclass of `APIError` will be thrown:
57
-
58
- <!-- prettier-ignore -->
59
- ```ts
60
- const response = await client.fetch({ url: 'https://news.ycombinator.com' }).catch(async (err) => {
61
- if (err instanceof Expand.APIError) {
62
- console.log(err.status); // 400
63
- console.log(err.name); // BadRequestError
64
- console.log(err.headers); // {server: 'nginx', ...}
65
- } else {
66
- throw err;
67
- }
68
- });
34
+ const result = await expand.fetch({ url: 'https://example.com' })
35
+ console.log(result)
69
36
  ```
70
37
 
71
- Error codes are as follows:
72
-
73
- | Status Code | Error Type |
74
- | ----------- | -------------------------- |
75
- | 400 | `BadRequestError` |
76
- | 401 | `AuthenticationError` |
77
- | 403 | `PermissionDeniedError` |
78
- | 404 | `NotFoundError` |
79
- | 422 | `UnprocessableEntityError` |
80
- | 429 | `RateLimitError` |
81
- | >=500 | `InternalServerError` |
82
- | N/A | `APIConnectionError` |
83
-
84
- ### Retries
85
-
86
- Certain errors will be automatically retried 2 times by default, with a short exponential backoff.
87
- Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
88
- 429 Rate Limit, and >=500 Internal errors will all be retried by default.
89
-
90
- You can use the `maxRetries` option to configure or disable this:
91
-
92
- <!-- prettier-ignore -->
93
- ```js
94
- // Configure the default for all requests:
95
- const client = new Expand({
96
- maxRetries: 0, // default is 2
97
- });
98
-
99
- // Or, configure per-request:
100
- await client.fetch({ url: 'https://news.ycombinator.com' }, {
101
- maxRetries: 5,
102
- });
103
- ```
104
-
105
- ### Timeouts
106
-
107
- Requests time out after 1 minute by default. You can configure this with a `timeout` option:
38
+ Constructor options:
108
39
 
109
- <!-- prettier-ignore -->
110
40
  ```ts
111
- // Configure the default for all requests:
112
- const client = new Expand({
113
- timeout: 20 * 1000, // 20 seconds (default is 1 minute)
114
- });
115
-
116
- // Override per-request:
117
- await client.fetch({ url: 'https://news.ycombinator.com' }, {
118
- timeout: 5 * 1000,
119
- });
41
+ new ExpandClient({
42
+ apiKey: 'xpnd_...', // defaults to process.env.EXPAND_API_KEY
43
+ baseUrl: 'https://api...', // defaults to https://api.expand.ai
44
+ timeoutMs: 60_000, // total wall-clock budget incl. retries
45
+ maxRetries: 2, // retries on timeout / connection / 408,409,429,5xx
46
+ })
120
47
  ```
121
48
 
122
- On timeout, an `APIConnectionTimeoutError` is thrown.
49
+ Errors thrown:
123
50
 
124
- Note that requests which time out will be [retried twice by default](#retries).
51
+ - `ExpandClientError` invalid options (missing API key, empty `baseUrl`)
52
+ - `ExpandClientApiError` — non-2xx HTTP response
53
+ - `ExpandClientConnectionError` — network failure
54
+ - `ExpandClientTimeoutError` — request timed out
125
55
 
126
- ## Advanced Usage
56
+ ### Effect service
127
57
 
128
- ### Accessing raw Response data (e.g., headers)
129
-
130
- The "raw" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.
131
- This method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.
132
-
133
- You can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.
134
- Unlike `.asResponse()` this method consumes the body, returning once it is parsed.
135
-
136
- <!-- prettier-ignore -->
137
58
  ```ts
138
- const client = new Expand();
59
+ import { NodeRuntime } from '@effect/platform-node'
60
+ import { Effect } from 'effect'
61
+ import { ExpandService } from '@expandai/sdk'
139
62
 
140
- const response = await client.fetch({ url: 'https://news.ycombinator.com' }).asResponse();
141
- console.log(response.headers.get('X-My-Header'));
142
- console.log(response.statusText); // access the underlying Response object
63
+ const program = Effect.gen(function* () {
64
+ const expand = yield* ExpandService
65
+ const result = yield* expand.fetch({ url: 'https://example.com' })
66
+ yield* Effect.log(result)
67
+ })
143
68
 
144
- const { data: response, response: raw } = await client
145
- .fetch({ url: 'https://news.ycombinator.com' })
146
- .withResponse();
147
- console.log(raw.headers.get('X-My-Header'));
148
- console.log(response.data);
69
+ NodeRuntime.runMain(program.pipe(Effect.provide(ExpandService.layer({ apiKey: process.env.EXPAND_API_KEY }))))
149
70
  ```
150
71
 
151
- ### Logging
152
-
153
- > [!IMPORTANT]
154
- > All log messages are intended for debugging only. The format and content of log messages
155
- > may change between releases.
156
-
157
- #### Log levels
158
-
159
- The log level can be configured in two ways:
160
-
161
- 1. Via the `EXPAND_LOG` environment variable
162
- 2. Using the `logLevel` client option (overrides the environment variable if set)
72
+ Layer options (same shape as `ExpandClientOptions`):
163
73
 
164
74
  ```ts
165
- import Expand from '@expandai/sdk';
166
-
167
- const client = new Expand({
168
- logLevel: 'debug', // Show all log messages
169
- });
75
+ ExpandService.layer({
76
+ apiKey: 'xpnd_...', // defaults to process.env.EXPAND_API_KEY
77
+ baseUrl: 'https://api...', // defaults to https://api.expand.ai
78
+ timeoutMs: 60_000, // total wall-clock budget incl. retries
79
+ maxRetries: 2, // retries on timeout / connection / 408,409,429,5xx
80
+ })
170
81
  ```
171
82
 
172
- Available log levels, from most to least verbose:
83
+ Typed errors in the `Effect` channel:
173
84
 
174
- - `'debug'` - Show debug messages, info, warnings, and errors
175
- - `'info'` - Show info messages, warnings, and errors
176
- - `'warn'` - Show warnings and errors (default)
177
- - `'error'` - Show only errors
178
- - `'off'` - Disable all logging
85
+ - `ExpandSdkError` invalid options (missing API key, empty `baseUrl`)
86
+ - `ExpandApiError` — non-2xx HTTP response
87
+ - `ExpandConnectionError` network failure
88
+ - `ExpandTimeoutError` request timed out
179
89
 
180
- At the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.
181
- Some authentication-related headers are redacted, but sensitive data in request and response bodies
182
- may still be visible.
90
+ ## Batched fetches
183
91
 
184
- #### Custom logger
92
+ `batched` kicks off a job and returns immediately with an `id`. Poll `getBatched(id)` until `batchedStatus` is no longer `RUNNING` or `QUEUED`.
185
93
 
186
- By default, this library logs to `globalThis.console`. You can also provide a custom logger.
187
- Most logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.
188
-
189
- When providing a custom logger, the `logLevel` option still controls which messages are emitted, messages
190
- below the configured level will not be sent to your logger.
94
+ ### Promise API
191
95
 
192
96
  ```ts
193
- import Expand from '@expandai/sdk';
194
- import pino from 'pino';
195
-
196
- const logger = pino();
97
+ import { ExpandClient } from '@expandai/sdk'
197
98
 
198
- const client = new Expand({
199
- logger: logger.child({ name: 'Expand' }),
200
- logLevel: 'debug', // Send all messages to pino, allowing it to filter
201
- });
202
- ```
203
-
204
- ### Making custom/undocumented requests
205
-
206
- This library is typed for convenient access to the documented API. If you need to access undocumented
207
- endpoints, params, or response properties, the library can still be used.
99
+ const expand = new ExpandClient()
208
100
 
209
- #### Undocumented endpoints
101
+ const run = await expand.batched({ urls: ['https://example.com'] })
210
102
 
211
- To make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.
212
- Options on the client, such as retries, will be respected when making these requests.
103
+ let status = await expand.getBatched(run.id)
104
+ while (status.batchedStatus === 'RUNNING' || status.batchedStatus === 'QUEUED') {
105
+ await new Promise((resolve) => setTimeout(resolve, 1000))
106
+ status = await expand.getBatched(run.id)
107
+ }
213
108
 
214
- ```ts
215
- await client.post('/some/path', {
216
- body: { some_prop: 'foo' },
217
- query: { some_query_arg: 'bar' },
218
- });
109
+ console.log(status.results)
219
110
  ```
220
111
 
221
- #### Undocumented request params
222
-
223
- To make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented
224
- parameter. This library doesn't validate at runtime that the request matches the type, so any extra values you
225
- send will be sent as-is.
112
+ ### Effect service
226
113
 
227
114
  ```ts
228
- client.fetch({
229
- // ...
230
- // @ts-expect-error baz is not yet public
231
- baz: 'undocumented option',
232
- });
233
- ```
234
-
235
- For requests with the `GET` verb, any extra params will be in the query, all other requests will send the
236
- extra param in the body.
237
-
238
- If you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request
239
- options.
240
-
241
- #### Undocumented response properties
242
-
243
- To access undocumented response properties, you may access the response object with `// @ts-expect-error` on
244
- the response object, or cast the response object to the requisite type. Like the request params, we do not
245
- validate or strip extra properties from the response from the API.
115
+ import { NodeRuntime } from '@effect/platform-node'
116
+ import { Duration, Effect, Schedule } from 'effect'
117
+ import { ExpandService, type GetBatchedResponse } from '@expandai/sdk'
246
118
 
247
- ### Customizing the fetch client
248
-
249
- By default, this library expects a global `fetch` function is defined.
250
-
251
- If you want to use a different `fetch` function, you can either polyfill the global:
252
-
253
- ```ts
254
- import fetch from 'my-fetch';
119
+ const program = Effect.gen(function* () {
120
+ const expand = yield* ExpandService
121
+ const run = yield* expand.batched({ urls: ['https://example.com'] })
122
+ const final = yield* expand.getBatched(run.id).pipe(
123
+ Effect.repeat(
124
+ Schedule.recurUntil(
125
+ (status: GetBatchedResponse) => status.batchedStatus !== 'RUNNING' && status.batchedStatus !== 'QUEUED',
126
+ ).pipe(Schedule.addDelay(() => Duration.seconds(1))),
127
+ ),
128
+ )
129
+ yield* Effect.log(final.results)
130
+ })
255
131
 
256
- globalThis.fetch = fetch;
132
+ NodeRuntime.runMain(program.pipe(Effect.provide(ExpandService.layer({ apiKey: process.env.EXPAND_API_KEY }))))
257
133
  ```
258
134
 
259
- Or pass it to the client:
260
-
261
- ```ts
262
- import Expand from '@expandai/sdk';
263
- import fetch from 'my-fetch';
264
-
265
- const client = new Expand({ customFetch: fetch });
266
- ```
267
-
268
- ### Fetch options
269
-
270
- If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `customFetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)
271
-
272
- ```ts
273
- import Expand from '@expandai/sdk';
274
-
275
- const client = new Expand({
276
- customFetchOptions: {
277
- // `RequestInit` options
278
- },
279
- });
280
- ```
281
-
282
- #### Configuring proxies
283
-
284
- To modify proxy behavior, you can provide custom `customFetchOptions` that add runtime-specific proxy
285
- options to requests:
286
-
287
- <img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg" align="top" width="18" height="21"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>
288
-
289
- ```ts
290
- import Expand from '@expandai/sdk';
291
- import * as undici from 'undici';
292
-
293
- const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
294
- const client = new Expand({
295
- customFetchOptions: {
296
- dispatcher: proxyAgent,
297
- },
298
- });
299
- ```
300
-
301
- <img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg" align="top" width="18" height="21"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>
302
-
303
- ```ts
304
- import Expand from '@expandai/sdk';
305
-
306
- const client = new Expand({
307
- customFetchOptions: {
308
- proxy: 'http://localhost:8888',
309
- },
310
- });
311
- ```
312
-
313
- <img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg" align="top" width="18" height="21"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>
314
-
315
- ```ts
316
- import Expand from 'npm:@expandai/sdk';
317
-
318
- const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
319
- const client = new Expand({
320
- customFetchOptions: {
321
- client: httpClient,
322
- },
323
- });
324
- ```
325
-
326
- ## Frequently Asked Questions
327
-
328
- ## Semantic versioning
329
-
330
- This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
331
-
332
- 1. Changes that only affect static types, without breaking runtime behavior.
333
- 2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
334
- 3. Changes that we do not expect to impact the vast majority of users in practice.
335
-
336
- We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
337
-
338
- We are keen for your feedback; please open an [issue](https://www.github.com/expandai/expandai-node/issues) with questions, bugs, or suggestions.
339
-
340
- ## Requirements
341
-
342
- TypeScript >= 4.9 is supported.
343
-
344
- The following runtimes are supported:
345
-
346
- - Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)
347
- - Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
348
- - Deno v1.28.0 or higher.
349
- - Bun 1.0 or later.
350
- - Cloudflare Workers.
351
- - Vercel Edge Runtime.
352
- - Jest 28 or greater with the `"node"` environment (`"jsdom"` is not supported at this time).
353
- - Nitro v2.6 or greater.
354
-
355
- Note that React Native is not supported at this time.
356
-
357
- If you are interested in other runtime environments, please open or upvote an issue on GitHub.
358
-
359
- ## Contributing
135
+ ## License
360
136
 
361
- See [the contributing documentation](./CONTRIBUTING.md).
137
+ [Apache 2.0](./LICENSE)
@@ -0,0 +1,61 @@
1
+ import { type BatchedParams, type BatchedResponse, type ExpandServiceOptions, type FetchJsonParams, type FetchJsonRequestOptions, type FetchJsonResponse, type FetchParams, type FetchRequestOptions, type FetchResponse, type FetchSearchParams, type FetchSearchResponse, type GetBatchedParams, type GetBatchedResponse, type RequestOptions } from './Service.js';
2
+ export type { BatchedParams, BatchedResponse, FetchJsonParams, FetchJsonRequestOptions, FetchJsonResponse, FetchParams, FetchRequestOptions, FetchResponse, FetchSearchParams, FetchSearchResponse, GetBatchedParams, GetBatchedResponse, } from './Service.js';
3
+ /** Options for constructing an {@link ExpandClient}. Same shape as `ExpandServiceOptions`. */
4
+ export type ExpandClientOptions = ExpandServiceOptions;
5
+ /**
6
+ * Promise-based client for the Expand API. Holds an {@link InternalClient} layer and runs Effects
7
+ * against it, translating typed failures into the `ExpandClient*Error` hierarchy that async/await
8
+ * consumers expect.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const client = new ExpandClient({ apiKey: 'sk_...' })
13
+ * const result = await client.fetch({ url: 'https://example.com' })
14
+ * ```
15
+ */
16
+ export declare class ExpandClient {
17
+ private readonly layer;
18
+ constructor(options?: ExpandClientOptions);
19
+ /**
20
+ * Fetch a URL through the Expand API.
21
+ *
22
+ * @throws {ExpandClientApiError} on 4xx/5xx responses
23
+ * @throws {ExpandClientTimeoutError} when the request exceeds `timeoutMs`
24
+ * @throws {ExpandClientConnectionError} on network failures
25
+ * @throws {ExpandClientError} for any other failure
26
+ */
27
+ fetch(params: FetchParams, options?: FetchRequestOptions): Promise<FetchResponse>;
28
+ /**
29
+ * Fetch a URL through the object-mode endpoint.
30
+ *
31
+ * Returns `{ meta, markdown, json }`; use {@link fetch} for the raw markdown document.
32
+ */
33
+ fetchJson(params: FetchJsonParams, options?: FetchJsonRequestOptions): Promise<FetchJsonResponse>;
34
+ /**
35
+ * Search a previous Fetch response by `snapshotId` without starting a new capture.
36
+ */
37
+ fetchSearch(params: FetchSearchParams, options?: RequestOptions): Promise<FetchSearchResponse>;
38
+ /**
39
+ * Kick off an asynchronous batched fetch over one or more URLs. Returns a batched-run ID that can
40
+ * be polled via {@link getBatched}.
41
+ *
42
+ * Retries are disabled by default. Pass `{ maxRetries: N }` to opt in.
43
+ *
44
+ * @throws {ExpandClientApiError} on 4xx/5xx responses
45
+ * @throws {ExpandClientTimeoutError} when the request exceeds `timeoutMs`
46
+ * @throws {ExpandClientConnectionError} on network failures
47
+ * @throws {ExpandClientError} for any other failure
48
+ */
49
+ batched(params: BatchedParams, options?: RequestOptions): Promise<BatchedResponse>;
50
+ /**
51
+ * Fetch the status and accumulated results for a batched run previously started by {@link batched}.
52
+ *
53
+ * @throws {ExpandClientApiError} on 4xx/5xx responses
54
+ * @throws {ExpandClientTimeoutError} when the request exceeds `timeoutMs`
55
+ * @throws {ExpandClientConnectionError} on network failures
56
+ * @throws {ExpandClientError} for any other failure
57
+ */
58
+ getBatched(id: string, options?: GetBatchedParams & RequestOptions): Promise<GetBatchedResponse>;
59
+ private run;
60
+ }
61
+ //# sourceMappingURL=Client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../src/Client.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,eAAe,EAEpB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,MAAM,cAAc,CAAA;AAErB,YAAY,EACX,aAAa,EACb,eAAe,EACf,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,GAClB,MAAM,cAAc,CAAA;AAErB,8FAA8F;AAC9F,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,CAAA;AAEtD;;;;;;;;;;GAUG;AACH,qBAAa,YAAY;IACxB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA6B;gBAEvC,OAAO,GAAE,mBAAwB;IAa7C;;;;;;;OAOG;IACG,KAAK,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,aAAa,CAAC;IAI3F;;;;OAIG;IACG,SAAS,CAAC,MAAM,EAAE,eAAe,EAAE,OAAO,GAAE,uBAA4B,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAI3G;;OAEG;IACG,WAAW,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAIxG;;;;;;;;;;OAUG;IACG,OAAO,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,eAAe,CAAC;IAI5F;;;;;;;OAOG;IACG,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAgB,GAAG,cAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC;YAI5F,GAAG;CAOjB"}
@@ -0,0 +1,90 @@
1
+ import { Schema } from 'effect';
2
+ declare const ExpandSdkError_base: Schema.TaggedErrorClass<ExpandSdkError, "ExpandSdkError", {
3
+ readonly _tag: Schema.tag<"ExpandSdkError">;
4
+ } & {
5
+ message: typeof Schema.String;
6
+ cause: Schema.optional<typeof Schema.Defect>;
7
+ }>;
8
+ /**
9
+ * Effect-side base error. Schema.TaggedError; Effect consumers receive these in the error channel.
10
+ */
11
+ export declare class ExpandSdkError extends ExpandSdkError_base {
12
+ toPublicError(): ExpandClientError;
13
+ }
14
+ declare const ExpandApiError_base: Schema.TaggedErrorClass<ExpandApiError, "ExpandApiError", {
15
+ readonly _tag: Schema.tag<"ExpandApiError">;
16
+ } & {
17
+ message: typeof Schema.String;
18
+ status: typeof Schema.Number;
19
+ body: Schema.optional<typeof Schema.Unknown>;
20
+ cause: Schema.optional<typeof Schema.Defect>;
21
+ }>;
22
+ /**
23
+ * Effect-side error for non-2xx API responses. Inspect `status` and `body` for details.
24
+ */
25
+ export declare class ExpandApiError extends ExpandApiError_base {
26
+ toPublicError(): ExpandClientApiError;
27
+ }
28
+ declare const ExpandConnectionError_base: Schema.TaggedErrorClass<ExpandConnectionError, "ExpandConnectionError", {
29
+ readonly _tag: Schema.tag<"ExpandConnectionError">;
30
+ } & {
31
+ message: typeof Schema.String;
32
+ cause: Schema.optional<typeof Schema.Defect>;
33
+ }>;
34
+ /**
35
+ * Effect-side error when the SDK cannot reach the API (DNS, connection refused, socket reset, etc.).
36
+ */
37
+ export declare class ExpandConnectionError extends ExpandConnectionError_base {
38
+ toPublicError(): ExpandClientConnectionError;
39
+ }
40
+ declare const ExpandTimeoutError_base: Schema.TaggedErrorClass<ExpandTimeoutError, "ExpandTimeoutError", {
41
+ readonly _tag: Schema.tag<"ExpandTimeoutError">;
42
+ } & {
43
+ message: typeof Schema.String;
44
+ timeoutMs: typeof Schema.Number;
45
+ cause: Schema.optional<typeof Schema.Defect>;
46
+ }>;
47
+ /**
48
+ * Effect-side error when a request exceeds its configured `timeoutMs`.
49
+ */
50
+ export declare class ExpandTimeoutError extends ExpandTimeoutError_base {
51
+ toPublicError(): ExpandClientTimeoutError;
52
+ }
53
+ /**
54
+ * Union of every error the Effect-side `ExpandService` can fail with.
55
+ */
56
+ export type ExpandError = ExpandSdkError | ExpandApiError | ExpandConnectionError | ExpandTimeoutError;
57
+ /**
58
+ * Promise-side base class. Catch this to handle any failure thrown by `ExpandClient`.
59
+ */
60
+ export declare class ExpandClientError extends Error {
61
+ constructor(message: string, options?: ErrorOptions);
62
+ }
63
+ /**
64
+ * Promise-side error for non-2xx API responses. Inspect `status` and `body` for details.
65
+ */
66
+ export declare class ExpandClientApiError extends ExpandClientError {
67
+ readonly status: number;
68
+ readonly body: unknown;
69
+ constructor(message: string, options: ErrorOptions & {
70
+ readonly status: number;
71
+ readonly body?: unknown;
72
+ });
73
+ }
74
+ /**
75
+ * Promise-side error when the SDK cannot reach the API (DNS, connection refused, socket reset, etc.).
76
+ */
77
+ export declare class ExpandClientConnectionError extends ExpandClientError {
78
+ constructor(message: string, options?: ErrorOptions);
79
+ }
80
+ /**
81
+ * Promise-side error when a request exceeds its configured `timeoutMs`.
82
+ */
83
+ export declare class ExpandClientTimeoutError extends ExpandClientConnectionError {
84
+ readonly timeoutMs: number;
85
+ constructor(message: string, options: ErrorOptions & {
86
+ readonly timeoutMs: number;
87
+ });
88
+ }
89
+ export {};
90
+ //# sourceMappingURL=Error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Error.d.ts","sourceRoot":"","sources":["../../src/Error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;;;;;;;AAE/B;;GAEG;AACH,qBAAa,cAAe,SAAQ,mBAGlC;IACD,aAAa;CAGb;;;;;;;;;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,mBAKlC;IACD,aAAa;CAGb;;;;;;;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,0BAGzC;IACD,aAAa;CAGb;;;;;;;;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,uBAItC;IACD,aAAa;CAGb;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG,cAAc,GAAG,qBAAqB,GAAG,kBAAkB,CAAA;AAEtG;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;gBAC/B,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB;CAIvD;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,iBAAiB;IAC1D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;gBAEV,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG;QAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE;CAMzG;AAED;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,iBAAiB;gBACrD,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB;CAIvD;AAED;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,2BAA2B;IACxE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;gBAEd,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG;QAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;KAAE;CAKnF"}