@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
@@ -0,0 +1,364 @@
1
+ import { HttpClient } from '@effect/platform';
2
+ import * as Generated from '@expandai/sdk/Generated';
3
+ import { Effect, Schema as S } from 'effect';
4
+ /** Search snippet with the extracted `json` value preserved (statejson snippets only). */
5
+ export declare const FetchSearchSnippetWithJson: S.Struct<{
6
+ type: S.optionalWith<S.Literal<["text"]>, {
7
+ nullable: true;
8
+ default: () => "text";
9
+ }>;
10
+ source: S.Literal<["markdown", "appendix", "statejson"]>;
11
+ text: typeof S.String;
12
+ json: S.optionalWith<typeof S.Unknown, {
13
+ nullable: true;
14
+ }>;
15
+ score: S.filter<S.filter<typeof S.Number>>;
16
+ location: S.optionalWith<typeof Generated.FetchSearchSnippetLocation, {
17
+ nullable: true;
18
+ }>;
19
+ }>;
20
+ export declare const FetchSearchResultWithJson: S.Struct<{
21
+ query: typeof S.String;
22
+ snippets: S.Array$<S.Struct<{
23
+ type: S.optionalWith<S.Literal<["text"]>, {
24
+ nullable: true;
25
+ default: () => "text";
26
+ }>;
27
+ source: S.Literal<["markdown", "appendix", "statejson"]>;
28
+ text: typeof S.String;
29
+ json: S.optionalWith<typeof S.Unknown, {
30
+ nullable: true;
31
+ }>;
32
+ score: S.filter<S.filter<typeof S.Number>>;
33
+ location: S.optionalWith<typeof Generated.FetchSearchSnippetLocation, {
34
+ nullable: true;
35
+ }>;
36
+ }>>;
37
+ meta: S.optionalWith<typeof Generated.FetchSearchMeta, {
38
+ nullable: true;
39
+ }>;
40
+ }>;
41
+ declare const FetchObjectModeResultWithJson_base: S.Class<FetchObjectModeResultWithJson, {
42
+ meta: typeof Generated.FetchObjectModeMeta;
43
+ markdown: typeof S.String;
44
+ json: S.Array$<typeof Generated.FetchObjectModeEvidence>;
45
+ data: S.optionalWith<S.Struct<{
46
+ assets: S.optionalWith<S.Array$<typeof Generated.FetchAssetReference>, {
47
+ nullable: true;
48
+ }>;
49
+ captureTelemetry: S.optionalWith<typeof Generated.CaptureTelemetryInfo, {
50
+ nullable: true;
51
+ }>;
52
+ search: S.optionalWith<S.Struct<{
53
+ query: typeof S.String;
54
+ snippets: S.Array$<S.Struct<{
55
+ type: S.optionalWith<S.Literal<["text"]>, {
56
+ nullable: true;
57
+ default: () => "text";
58
+ }>;
59
+ source: S.Literal<["markdown", "appendix", "statejson"]>;
60
+ text: typeof S.String;
61
+ json: S.optionalWith<typeof S.Unknown, {
62
+ nullable: true;
63
+ }>;
64
+ score: S.filter<S.filter<typeof S.Number>>;
65
+ location: S.optionalWith<typeof Generated.FetchSearchSnippetLocation, {
66
+ nullable: true;
67
+ }>;
68
+ }>>;
69
+ meta: S.optionalWith<typeof Generated.FetchSearchMeta, {
70
+ nullable: true;
71
+ }>;
72
+ }>, {
73
+ nullable: true;
74
+ }>;
75
+ }>, {
76
+ nullable: true;
77
+ }>;
78
+ }, S.Struct.Encoded<{
79
+ meta: typeof Generated.FetchObjectModeMeta;
80
+ markdown: typeof S.String;
81
+ json: S.Array$<typeof Generated.FetchObjectModeEvidence>;
82
+ data: S.optionalWith<S.Struct<{
83
+ assets: S.optionalWith<S.Array$<typeof Generated.FetchAssetReference>, {
84
+ nullable: true;
85
+ }>;
86
+ captureTelemetry: S.optionalWith<typeof Generated.CaptureTelemetryInfo, {
87
+ nullable: true;
88
+ }>;
89
+ search: S.optionalWith<S.Struct<{
90
+ query: typeof S.String;
91
+ snippets: S.Array$<S.Struct<{
92
+ type: S.optionalWith<S.Literal<["text"]>, {
93
+ nullable: true;
94
+ default: () => "text";
95
+ }>;
96
+ source: S.Literal<["markdown", "appendix", "statejson"]>;
97
+ text: typeof S.String;
98
+ json: S.optionalWith<typeof S.Unknown, {
99
+ nullable: true;
100
+ }>;
101
+ score: S.filter<S.filter<typeof S.Number>>;
102
+ location: S.optionalWith<typeof Generated.FetchSearchSnippetLocation, {
103
+ nullable: true;
104
+ }>;
105
+ }>>;
106
+ meta: S.optionalWith<typeof Generated.FetchSearchMeta, {
107
+ nullable: true;
108
+ }>;
109
+ }>, {
110
+ nullable: true;
111
+ }>;
112
+ }>, {
113
+ nullable: true;
114
+ }>;
115
+ }>, never, {
116
+ readonly markdown: string;
117
+ } & {
118
+ readonly meta: {
119
+ readonly url: string;
120
+ readonly markdown?: {
121
+ readonly url: string;
122
+ readonly moreTokens: number;
123
+ } | undefined;
124
+ readonly appendix?: {
125
+ readonly url: string;
126
+ readonly links: {
127
+ readonly sameDomain: number;
128
+ readonly external: number;
129
+ };
130
+ } | undefined;
131
+ readonly description?: string | undefined;
132
+ readonly version: 1;
133
+ readonly capturedAt: string;
134
+ readonly snapshotId: string;
135
+ readonly lang: string;
136
+ readonly pageType: string;
137
+ readonly playground: string;
138
+ readonly title?: string | undefined;
139
+ readonly finalUrl?: string | undefined;
140
+ readonly canonical?: string | undefined;
141
+ readonly author?: string | undefined;
142
+ readonly createdAt?: string | undefined;
143
+ readonly updatedAt?: string | undefined;
144
+ readonly image?: string | undefined;
145
+ readonly paginationNext?: string | undefined;
146
+ readonly stateJson?: {
147
+ readonly moreTokens: number;
148
+ } | undefined;
149
+ readonly blocked?: string | undefined;
150
+ readonly loadingStatus?: string | undefined;
151
+ };
152
+ } & {
153
+ readonly json: readonly {
154
+ readonly keys?: readonly string[] | undefined;
155
+ readonly url?: string | undefined;
156
+ readonly moreTokens?: number | undefined;
157
+ readonly id: number;
158
+ readonly kind: "inline" | "network";
159
+ readonly role: "ld+json" | "next-data" | "nuxt" | "apollo-state" | "initial-state" | "application-json" | "script-tag" | "data-attribute" | "network-json" | "network-response" | "other";
160
+ readonly score: number;
161
+ readonly method?: string | undefined;
162
+ }[];
163
+ } & {
164
+ readonly data?: {
165
+ readonly search?: {
166
+ readonly meta?: {
167
+ readonly durationMs: number;
168
+ readonly sources: readonly {
169
+ readonly source: "markdown" | "appendix" | "statejson";
170
+ readonly chunkCount: number;
171
+ readonly batchCount: number;
172
+ readonly ranker: "zeroentropy" | "local_lexical";
173
+ readonly fallback: boolean;
174
+ readonly fallbackReason?: "timeout" | "error" | undefined;
175
+ readonly durationMs: number;
176
+ }[];
177
+ } | undefined;
178
+ readonly query: string;
179
+ readonly snippets: readonly {
180
+ readonly json?: unknown;
181
+ readonly score: number;
182
+ readonly source: "markdown" | "appendix" | "statejson";
183
+ readonly type: "text";
184
+ readonly text: string;
185
+ readonly location?: {
186
+ readonly markdownBlockId?: string | undefined;
187
+ readonly nodeIds?: readonly number[] | undefined;
188
+ readonly stateJsonSourceId?: number | undefined;
189
+ readonly jsonPath?: string | undefined;
190
+ } | undefined;
191
+ }[];
192
+ } | undefined;
193
+ readonly assets?: readonly {
194
+ readonly id: string;
195
+ readonly kind: "data-url";
196
+ readonly placeholder: string;
197
+ readonly archiveKey: string;
198
+ readonly mimeType: string;
199
+ readonly sha256: string;
200
+ readonly bytes: number;
201
+ }[] | undefined;
202
+ readonly captureTelemetry?: {
203
+ readonly requestedStyleMode?: "compat_full" | "native_default" | undefined;
204
+ readonly selected: "rust";
205
+ readonly actual: "rust";
206
+ readonly actualStyleMode?: "compat_full" | "native_default" | undefined;
207
+ readonly rolloutApplied: boolean;
208
+ readonly preparedSessionHit?: boolean | undefined;
209
+ readonly nativePoolHit?: boolean | undefined;
210
+ readonly preparedPageHit?: boolean | undefined;
211
+ readonly nativePoolCapacity?: number | undefined;
212
+ readonly nativePoolProfile?: string | undefined;
213
+ readonly poolHit?: boolean | undefined;
214
+ readonly connectMs?: number | undefined;
215
+ readonly warmConnectionAgeMs?: number | undefined;
216
+ readonly iconBackendDecision?: "cpu" | "remote_gpu" | undefined;
217
+ } | undefined;
218
+ } | undefined;
219
+ }, {}, {}>;
220
+ export declare class FetchObjectModeResultWithJson extends FetchObjectModeResultWithJson_base {
221
+ }
222
+ declare const FetchSnapshotSearchResultWithJson_base: S.Class<FetchSnapshotSearchResultWithJson, {
223
+ snapshotId: S.filter<typeof S.String>;
224
+ response: typeof Generated.ResponseInfo;
225
+ search: S.Struct<{
226
+ query: typeof S.String;
227
+ snippets: S.Array$<S.Struct<{
228
+ type: S.optionalWith<S.Literal<["text"]>, {
229
+ nullable: true;
230
+ default: () => "text";
231
+ }>;
232
+ source: S.Literal<["markdown", "appendix", "statejson"]>;
233
+ text: typeof S.String;
234
+ json: S.optionalWith<typeof S.Unknown, {
235
+ nullable: true;
236
+ }>;
237
+ score: S.filter<S.filter<typeof S.Number>>;
238
+ location: S.optionalWith<typeof Generated.FetchSearchSnippetLocation, {
239
+ nullable: true;
240
+ }>;
241
+ }>>;
242
+ meta: S.optionalWith<typeof Generated.FetchSearchMeta, {
243
+ nullable: true;
244
+ }>;
245
+ }>;
246
+ durationMs: S.filter<typeof S.Number>;
247
+ }, S.Struct.Encoded<{
248
+ snapshotId: S.filter<typeof S.String>;
249
+ response: typeof Generated.ResponseInfo;
250
+ search: S.Struct<{
251
+ query: typeof S.String;
252
+ snippets: S.Array$<S.Struct<{
253
+ type: S.optionalWith<S.Literal<["text"]>, {
254
+ nullable: true;
255
+ default: () => "text";
256
+ }>;
257
+ source: S.Literal<["markdown", "appendix", "statejson"]>;
258
+ text: typeof S.String;
259
+ json: S.optionalWith<typeof S.Unknown, {
260
+ nullable: true;
261
+ }>;
262
+ score: S.filter<S.filter<typeof S.Number>>;
263
+ location: S.optionalWith<typeof Generated.FetchSearchSnippetLocation, {
264
+ nullable: true;
265
+ }>;
266
+ }>>;
267
+ meta: S.optionalWith<typeof Generated.FetchSearchMeta, {
268
+ nullable: true;
269
+ }>;
270
+ }>;
271
+ durationMs: S.filter<typeof S.Number>;
272
+ }>, never, {
273
+ readonly search: {
274
+ readonly meta?: {
275
+ readonly durationMs: number;
276
+ readonly sources: readonly {
277
+ readonly source: "markdown" | "appendix" | "statejson";
278
+ readonly chunkCount: number;
279
+ readonly batchCount: number;
280
+ readonly ranker: "zeroentropy" | "local_lexical";
281
+ readonly fallback: boolean;
282
+ readonly fallbackReason?: "timeout" | "error" | undefined;
283
+ readonly durationMs: number;
284
+ }[];
285
+ } | undefined;
286
+ readonly query: string;
287
+ readonly snippets: readonly {
288
+ readonly json?: unknown;
289
+ readonly score: number;
290
+ readonly source: "markdown" | "appendix" | "statejson";
291
+ readonly type: "text";
292
+ readonly text: string;
293
+ readonly location?: {
294
+ readonly markdownBlockId?: string | undefined;
295
+ readonly nodeIds?: readonly number[] | undefined;
296
+ readonly stateJsonSourceId?: number | undefined;
297
+ readonly jsonPath?: string | undefined;
298
+ } | undefined;
299
+ }[];
300
+ };
301
+ } & {
302
+ readonly response: {
303
+ readonly url: string;
304
+ readonly requestedUrl?: string | undefined;
305
+ readonly originStatusCode?: number | undefined;
306
+ readonly redirectStatusCode?: number | undefined;
307
+ readonly headers?: {} | undefined;
308
+ };
309
+ } & {
310
+ readonly snapshotId: string;
311
+ } & {
312
+ readonly durationMs: number;
313
+ }, {}, {}>;
314
+ export declare class FetchSnapshotSearchResultWithJson extends FetchSnapshotSearchResultWithJson_base {
315
+ }
316
+ /** Mirrors `Generated.Client['fetchFetchJson']` but decodes the 200 body with `json` preserved. */
317
+ export declare const fetchObjectModeJson: (httpClient: HttpClient.HttpClient, options: {
318
+ readonly params: typeof Generated.FetchFetchJsonParams.Encoded;
319
+ readonly payload: typeof Generated.FetchFetchJsonRequest.Encoded;
320
+ }) => Effect.Effect<FetchObjectModeResultWithJson, {
321
+ readonly message: string;
322
+ readonly _tag: "HttpApiDecodeError";
323
+ readonly issues: readonly {
324
+ readonly message: string;
325
+ readonly _tag: "Type" | "Pointer" | "Unexpected" | "Missing" | "Composite" | "Refinement" | "Transformation" | "Forbidden";
326
+ readonly path: readonly (string | number | {
327
+ readonly _tag: "symbol";
328
+ readonly key: string;
329
+ })[];
330
+ }[];
331
+ } | {
332
+ readonly message: string;
333
+ readonly _tag: "BadRequest";
334
+ } | Generated.AuthFailed | {
335
+ readonly _tag: "FetchBlocked";
336
+ readonly url: string;
337
+ readonly blockedType?: string | undefined;
338
+ } | Generated.PayloadTooLarge | Generated.TooManyRequests | Generated.InternalError | Generated.ServiceUnavailable | {
339
+ readonly _tag: "AccessBlocked";
340
+ readonly organizationId: string;
341
+ readonly blockedUntil?: string | null | undefined;
342
+ } | import("@effect/platform/HttpClientError").HttpClientError | import("effect/ParseResult").ParseError, never>;
343
+ /** Mirrors `Generated.Client['fetchFetchSearch']` but decodes the 200 body with `json` preserved. */
344
+ export declare const fetchSnapshotSearch: (httpClient: HttpClient.HttpClient, options: typeof Generated.FetchFetchSearchRequest.Encoded) => Effect.Effect<FetchSnapshotSearchResultWithJson, {
345
+ readonly message: string;
346
+ readonly _tag: "HttpApiDecodeError";
347
+ readonly issues: readonly {
348
+ readonly message: string;
349
+ readonly _tag: "Type" | "Pointer" | "Unexpected" | "Missing" | "Composite" | "Refinement" | "Transformation" | "Forbidden";
350
+ readonly path: readonly (string | number | {
351
+ readonly _tag: "symbol";
352
+ readonly key: string;
353
+ })[];
354
+ }[];
355
+ } | {
356
+ readonly message: string;
357
+ readonly _tag: "BadRequest";
358
+ } | Generated.AuthFailed | Generated.PayloadTooLarge | Generated.TooManyRequests | Generated.InternalError | Generated.ServiceUnavailable | {
359
+ readonly _tag: "AccessBlocked";
360
+ readonly organizationId: string;
361
+ readonly blockedUntil?: string | null | undefined;
362
+ } | Generated.FetchSnapshotSearchNotFound | import("@effect/platform/HttpClientError").HttpClientError | import("effect/ParseResult").ParseError, never>;
363
+ export {};
364
+ //# sourceMappingURL=FetchJson.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FetchJson.d.ts","sourceRoot":"","sources":["../../src/FetchJson.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAyC,MAAM,kBAAkB,CAAA;AACpF,OAAO,KAAK,SAAS,MAAM,yBAAyB,CAAA;AAEpD,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE5C,0FAA0F;AAC1F,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;EAOrC,CAAA;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;EAIpC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,qBAAa,6BAA8B,SAAQ,kCAcjD;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEL,qBAAa,iCAAkC,SAAQ,sCAOrD;CAAG;AAEL,mGAAmG;AACnG,eAAO,MAAM,mBAAmB,GAC/B,YAAY,UAAU,CAAC,UAAU,EACjC,SAAS;IACR,QAAQ,CAAC,MAAM,EAAE,OAAO,SAAS,CAAC,oBAAoB,CAAC,OAAO,CAAA;IAC9D,QAAQ,CAAC,OAAO,EAAE,OAAO,SAAS,CAAC,qBAAqB,CAAC,OAAO,CAAA;CAChE;;;;;;;;;;;;;;;;;;;;;;gHAqBA,CAAA;AAEF,qGAAqG;AACrG,eAAO,MAAM,mBAAmB,GAC/B,YAAY,UAAU,CAAC,UAAU,EACjC,SAAS,OAAO,SAAS,CAAC,uBAAuB,CAAC,OAAO;;;;;;;;;;;;;;;;;;wJAqBxD,CAAA"}