@expandai/sdk 0.17.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 -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
@@ -1,469 +0,0 @@
1
- /**
2
- * Complete response from a fetch operation
3
- */
4
- export interface FetchResponse {
5
- /**
6
- * Contains the extracted content in the formats specified by the select
7
- * configuration
8
- */
9
- data: FetchResponse.Data;
10
- }
11
- export declare namespace FetchResponse {
12
- /**
13
- * Contains the extracted content in the formats specified by the select
14
- * configuration
15
- */
16
- interface Data {
17
- /**
18
- * HTTP response information (URL, optionally origin status code and headers)
19
- */
20
- response: Data.Response;
21
- /**
22
- * Extracted links and sidebar content
23
- */
24
- appendix?: string;
25
- /**
26
- * Unique identifier for the browser session that performed this fetch
27
- */
28
- browserSessionId?: string;
29
- /**
30
- * The HTML content of the fetched page
31
- */
32
- html?: string;
33
- /**
34
- * Pruned JSON objects extracted from the page (from HTML and network responses).
35
- * This is recomputed on every fetch and is not persisted.
36
- */
37
- json?: Array<{
38
- [key: string]: string | number | boolean | unknown;
39
- }>;
40
- /**
41
- * Links extracted from the page
42
- */
43
- links?: Array<Data.Link>;
44
- /**
45
- * The markdown-formatted content extracted from the page
46
- */
47
- markdown?: string;
48
- /**
49
- * Comprehensive metadata extracted from the page HTML head section
50
- */
51
- meta?: Data.Meta;
52
- /**
53
- * Base64-encoded data URI of the screenshot image
54
- */
55
- screenshot?: string;
56
- /**
57
- * Relevant snippets extracted from the page based on the search query
58
- */
59
- snippets?: Array<Data.UnionMember0 | Data.UnionMember1>;
60
- /**
61
- * AI-generated summary of the page content
62
- */
63
- summary?: string;
64
- }
65
- namespace Data {
66
- /**
67
- * HTTP response information (URL, optionally origin status code and headers)
68
- */
69
- interface Response {
70
- /**
71
- * The URL that was fetched
72
- */
73
- url: string;
74
- /**
75
- * Response headers from the fetch operation (keys are lower-cased HTTP header
76
- * names)
77
- */
78
- headers?: {
79
- [key: string]: string;
80
- };
81
- /**
82
- * HTTP status code returned by the origin website. Absent when the fetch is still
83
- * pending or the origin response could not be determined.
84
- */
85
- originStatusCode?: number;
86
- }
87
- /**
88
- * A link extracted from the page
89
- */
90
- interface Link {
91
- /**
92
- * The URL of the link
93
- */
94
- url: string;
95
- /**
96
- * The anchor text of the link
97
- */
98
- text?: string;
99
- }
100
- /**
101
- * Comprehensive metadata extracted from the page HTML head section
102
- */
103
- interface Meta {
104
- /**
105
- * Canonical URL from <link rel="canonical">
106
- */
107
- canonicalUrl?: string;
108
- /**
109
- * Character encoding from <meta charset="...">
110
- */
111
- charset?: string;
112
- /**
113
- * Meta description from <meta name="description">
114
- */
115
- description?: string;
116
- /**
117
- * Primary favicon URL (first icon found)
118
- */
119
- favicon?: string;
120
- /**
121
- * All icon links (favicons, apple-touch-icons, etc.)
122
- */
123
- icons?: Array<Meta.Icon>;
124
- /**
125
- * Page language from <html lang="...">
126
- */
127
- language?: string;
128
- /**
129
- * Open Graph protocol metadata for rich link previews
130
- */
131
- openGraph?: Meta.OpenGraph;
132
- /**
133
- * Page title from <title> tag
134
- */
135
- title?: string;
136
- /**
137
- * Twitter Card metadata for social sharing previews
138
- */
139
- twitter?: Meta.Twitter;
140
- }
141
- namespace Meta {
142
- /**
143
- * Favicon or app icon metadata from <link> tags
144
- */
145
- interface Icon {
146
- /**
147
- * Icon URL or path
148
- */
149
- href: string;
150
- /**
151
- * Link relationship type
152
- */
153
- rel: string;
154
- /**
155
- * Icon dimensions
156
- */
157
- sizes?: string;
158
- /**
159
- * MIME type of the icon
160
- */
161
- type?: string;
162
- }
163
- /**
164
- * Open Graph protocol metadata for rich link previews
165
- */
166
- interface OpenGraph {
167
- /**
168
- * Open Graph description (og:description)
169
- */
170
- description?: string;
171
- /**
172
- * Open Graph images (og:image and related properties)
173
- */
174
- images?: Array<OpenGraph.Image>;
175
- /**
176
- * Locale in language_TERRITORY format (og:locale)
177
- */
178
- locale?: string;
179
- /**
180
- * Site name (og:site_name)
181
- */
182
- siteName?: string;
183
- /**
184
- * Open Graph title (og:title)
185
- */
186
- title?: string;
187
- /**
188
- * Open Graph type (og:type) - website, article, product, etc.
189
- */
190
- type?: string;
191
- /**
192
- * Canonical URL for the content (og:url)
193
- */
194
- url?: string;
195
- }
196
- namespace OpenGraph {
197
- /**
198
- * Open Graph image with optional dimensions and alt text
199
- */
200
- interface Image {
201
- /**
202
- * Image URL
203
- */
204
- url: string;
205
- /**
206
- * Image alt text for accessibility
207
- */
208
- alt?: string;
209
- /**
210
- * Image height in pixels
211
- */
212
- height?: number;
213
- /**
214
- * Image width in pixels
215
- */
216
- width?: number;
217
- }
218
- }
219
- /**
220
- * Twitter Card metadata for social sharing previews
221
- */
222
- interface Twitter {
223
- /**
224
- * Twitter card type (twitter:card)
225
- */
226
- card?: string;
227
- /**
228
- * Twitter @username of content creator (twitter:creator)
229
- */
230
- creator?: string;
231
- /**
232
- * Description for Twitter card (twitter:description)
233
- */
234
- description?: string;
235
- /**
236
- * Image URL for Twitter card (twitter:image)
237
- */
238
- image?: string;
239
- /**
240
- * Twitter @username of the website (twitter:site)
241
- */
242
- site?: string;
243
- /**
244
- * Title for Twitter card (twitter:title)
245
- */
246
- title?: string;
247
- }
248
- }
249
- interface UnionMember0 {
250
- _tag: 'MarkdownSnippet';
251
- /**
252
- * Original chunk index
253
- */
254
- index: number;
255
- /**
256
- * Relevance score from the reranker (0-1)
257
- */
258
- score: number;
259
- /**
260
- * The text content of the snippet
261
- */
262
- text: string;
263
- /**
264
- * Type identifier for TextPart compatibility
265
- */
266
- type?: 'text';
267
- }
268
- interface UnionMember1 {
269
- _tag: 'JsonSnippet';
270
- /**
271
- * Original chunk index
272
- */
273
- index: number;
274
- /**
275
- * The structured JSON subtree value
276
- */
277
- json: unknown;
278
- /**
279
- * Relevance score from the reranker (0-1)
280
- */
281
- score: number;
282
- /**
283
- * Pretty-printed JSON chunk text
284
- */
285
- text: string;
286
- /**
287
- * Type identifier for TextPart compatibility
288
- */
289
- type?: 'text';
290
- }
291
- }
292
- }
293
- export interface FetchParams {
294
- /**
295
- * a string to be decoded into a URL
296
- */
297
- url: string;
298
- /**
299
- * Configuration options for browser behavior during the fetch
300
- */
301
- browserConfig?: FetchParams.BrowserConfig;
302
- /**
303
- * Specifies which content formats to include in the response
304
- */
305
- select?: FetchParams.Select;
306
- }
307
- export declare namespace FetchParams {
308
- /**
309
- * Configuration options for browser behavior during the fetch
310
- */
311
- interface BrowserConfig {
312
- /**
313
- * Whether to scroll the entire page to capture lazy-loaded content
314
- */
315
- scrollFullPage?: boolean;
316
- }
317
- /**
318
- * Specifies which content formats to include in the response
319
- */
320
- interface Select {
321
- /**
322
- * Set to true to include extracted links and sidebar content
323
- */
324
- appendix?: boolean;
325
- /**
326
- * Set to true to include HTML
327
- */
328
- html?: boolean | unknown | Array<unknown>;
329
- /**
330
- * Include pruned JSON in the response (opt-in)
331
- */
332
- json?: boolean;
333
- /**
334
- * Set to true to extract links from the page
335
- */
336
- links?: boolean | Select.UnionMember1;
337
- /**
338
- * Include markdown-formatted content in the response
339
- */
340
- markdown?: boolean | unknown | Array<unknown>;
341
- /**
342
- * Include page metadata in the response
343
- */
344
- meta?: boolean;
345
- /**
346
- * Configure response info options (headers inclusion)
347
- */
348
- response?: Select.Response;
349
- /**
350
- * Set to true to include a screenshot
351
- */
352
- screenshot?: boolean | Select.SelectScreenshotConfig;
353
- /**
354
- * Options for extracting relevant snippets from page content using semantic search
355
- */
356
- snippets?: Select.Snippets;
357
- /**
358
- * Set to true to generate an AI summary
359
- */
360
- summary?: boolean | Select.Prompt;
361
- }
362
- namespace Select {
363
- /**
364
- * Options for customizing link extraction from the page
365
- */
366
- interface UnionMember1 {
367
- /**
368
- * Regex patterns - exclude links matching any pattern
369
- */
370
- excludePatterns?: Array<string>;
371
- /**
372
- * Regex patterns - only include links matching at least one pattern
373
- */
374
- includePatterns?: Array<string>;
375
- /**
376
- * Only include links from the same domain as the fetched URL
377
- */
378
- sameDomainOnly?: boolean;
379
- }
380
- /**
381
- * Configure response info options (headers inclusion)
382
- */
383
- interface Response {
384
- /**
385
- * Whether to include HTTP response headers
386
- */
387
- includeHeaders?: boolean;
388
- }
389
- /**
390
- * Options for customizing screenshot capture behavior
391
- */
392
- interface SelectScreenshotConfig {
393
- /**
394
- * Whether to capture the full page including content below the fold
395
- */
396
- fullPage?: boolean;
397
- }
398
- /**
399
- * Options for extracting relevant snippets from page content using semantic search
400
- */
401
- interface Snippets {
402
- /**
403
- * Query to find relevant content snippets from the page (required, non-empty)
404
- */
405
- query: string;
406
- /**
407
- * Maximum number of snippets to return (1-50)
408
- */
409
- maxSnippets?: number;
410
- /**
411
- * Minimum relevance score threshold (0-1). Snippets below this score are filtered
412
- * out.
413
- */
414
- minScore?: number;
415
- /**
416
- * Configure which content sources to search. Defaults to markdown only.
417
- */
418
- sources?: Snippets.Sources;
419
- }
420
- namespace Snippets {
421
- /**
422
- * Configure which content sources to search. Defaults to markdown only.
423
- */
424
- interface Sources {
425
- /**
426
- * Include JSON content in snippet search
427
- */
428
- json?: boolean | Sources.TargetChunkSize;
429
- /**
430
- * Search markdown content for snippets (default: enabled)
431
- */
432
- markdown?: boolean | Sources.TargetSize;
433
- }
434
- namespace Sources {
435
- /**
436
- * Configuration for JSON snippet source
437
- */
438
- interface TargetChunkSize {
439
- /**
440
- * Target JSON chunk size in characters when stringified (100-5000)
441
- */
442
- targetChunkSize?: number;
443
- }
444
- /**
445
- * Configuration for markdown snippet source
446
- */
447
- interface TargetSize {
448
- /**
449
- * Target snippet size in characters (100-2000)
450
- */
451
- targetSize?: number;
452
- }
453
- }
454
- }
455
- /**
456
- * Options for AI-powered page summarization
457
- */
458
- interface Prompt {
459
- /**
460
- * Custom prompt for AI summarization (max 5000 characters)
461
- */
462
- prompt?: string;
463
- }
464
- }
465
- }
466
- export declare namespace TopLevel {
467
- export { type FetchResponse as FetchResponse, type FetchParams as FetchParams };
468
- }
469
- //# sourceMappingURL=top-level.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"top-level.d.ts","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC;CAC1B;AAED,yBAAiB,aAAa,CAAC;IAC7B;;;OAGG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC;QAExB;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAE1B;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;;WAGG;QACH,IAAI,CAAC,EAAE,KAAK,CAAC;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAA;SAAE,CAAC,CAAC;QAErE;;WAEG;QACH,KAAK,CAAC,EAAE,KAAK,CAAC,IAAI,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AAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;aACzC;YAED,UAAiB,OAAO,CAAC;gBACvB;;mBAEG;gBACH,UAAiB,eAAe;oBAC9B;;uBAEG;oBACH,eAAe,CAAC,EAAE,MAAM,CAAC;iBAC1B;gBAED;;mBAEG;gBACH,UAAiB,UAAU;oBACzB;;uBAEG;oBACH,UAAU,CAAC,EAAE,MAAM,CAAC;iBACrB;aACF;SACF;QAED;;WAEG;QACH,UAAiB,MAAM;YACrB;;eAEG;YACH,MAAM,CAAC,EAAE,MAAM,CAAC;SACjB;KACF;CACF;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,aAAa,IAAI,aAAa,EAAE,KAAK,WAAW,IAAI,WAAW,EAAE,CAAC;CACjF"}
@@ -1,4 +0,0 @@
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=top-level.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"top-level.js","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":";AAAA,sFAAsF"}
@@ -1,3 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- export {};
3
- //# sourceMappingURL=top-level.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"top-level.mjs","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
package/resources.d.mts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./resources/index.mjs";
2
- //# sourceMappingURL=resources.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resources.d.mts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
package/resources.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./resources/index.js";
2
- //# sourceMappingURL=resources.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
package/resources.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("./internal/tslib.js");
4
- tslib_1.__exportStar(require("./resources/index.js"), exports);
5
- //# sourceMappingURL=resources.js.map
package/resources.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"resources.js","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":";;;AAAA,+DAAkC"}
package/resources.mjs DELETED
@@ -1,2 +0,0 @@
1
- export * from "./resources/index.mjs";
2
- //# sourceMappingURL=resources.mjs.map
package/resources.mjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"resources.mjs","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- /** @deprecated Import from ./core/api-promise instead */
2
- export * from './core/api-promise';