@aerostack/sdk-web 0.2.0 → 0.3.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 (331) hide show
  1. package/FUNCTIONS.md +6 -6
  2. package/README.md +49 -30
  3. package/dist/commonjs/funcs/aiSearchConfigure.d.ts +14 -0
  4. package/dist/commonjs/funcs/aiSearchConfigure.d.ts.map +1 -0
  5. package/dist/commonjs/funcs/aiSearchConfigure.js +111 -0
  6. package/dist/commonjs/funcs/aiSearchConfigure.js.map +1 -0
  7. package/dist/commonjs/funcs/aiSearchDelete.d.ts +14 -0
  8. package/dist/commonjs/funcs/aiSearchDelete.d.ts.map +1 -0
  9. package/dist/commonjs/funcs/aiSearchDelete.js +111 -0
  10. package/dist/commonjs/funcs/aiSearchDelete.js.map +1 -0
  11. package/dist/commonjs/funcs/aiSearchDeleteByType.d.ts +14 -0
  12. package/dist/commonjs/funcs/aiSearchDeleteByType.d.ts.map +1 -0
  13. package/dist/commonjs/funcs/aiSearchDeleteByType.js +111 -0
  14. package/dist/commonjs/funcs/aiSearchDeleteByType.js.map +1 -0
  15. package/dist/commonjs/funcs/aiSearchIngest.d.ts +14 -0
  16. package/dist/commonjs/funcs/aiSearchIngest.d.ts.map +1 -0
  17. package/dist/commonjs/funcs/aiSearchIngest.js +111 -0
  18. package/dist/commonjs/funcs/aiSearchIngest.js.map +1 -0
  19. package/dist/commonjs/funcs/aiSearchListTypes.d.ts +14 -0
  20. package/dist/commonjs/funcs/aiSearchListTypes.d.ts.map +1 -0
  21. package/dist/commonjs/funcs/aiSearchListTypes.js +101 -0
  22. package/dist/commonjs/funcs/aiSearchListTypes.js.map +1 -0
  23. package/dist/commonjs/funcs/aiSearchQuery.d.ts +14 -0
  24. package/dist/commonjs/funcs/aiSearchQuery.d.ts.map +1 -0
  25. package/dist/commonjs/funcs/aiSearchQuery.js +111 -0
  26. package/dist/commonjs/funcs/aiSearchQuery.js.map +1 -0
  27. package/dist/commonjs/hooks/hooks.d.ts +3 -2
  28. package/dist/commonjs/hooks/hooks.d.ts.map +1 -1
  29. package/dist/commonjs/hooks/hooks.js.map +1 -1
  30. package/dist/commonjs/hooks/types.d.ts +2 -6
  31. package/dist/commonjs/hooks/types.d.ts.map +1 -1
  32. package/dist/commonjs/index.d.ts +1 -0
  33. package/dist/commonjs/index.d.ts.map +1 -1
  34. package/dist/commonjs/index.js +1 -0
  35. package/dist/commonjs/index.js.map +1 -1
  36. package/dist/commonjs/lib/config.d.ts +2 -2
  37. package/dist/commonjs/lib/config.js +2 -2
  38. package/dist/commonjs/lib/sdks.d.ts.map +1 -1
  39. package/dist/commonjs/lib/sdks.js +5 -6
  40. package/dist/commonjs/lib/sdks.js.map +1 -1
  41. package/dist/commonjs/sdk/ai.d.ts +3 -0
  42. package/dist/commonjs/sdk/ai.d.ts.map +1 -1
  43. package/dist/commonjs/sdk/ai.js +4 -0
  44. package/dist/commonjs/sdk/ai.js.map +1 -1
  45. package/dist/commonjs/sdk/authentication.d.ts +4 -4
  46. package/dist/commonjs/sdk/authentication.js +6 -6
  47. package/dist/commonjs/sdk/models/operations/aichat.d.ts +4 -4
  48. package/dist/commonjs/sdk/models/operations/aichat.d.ts.map +1 -1
  49. package/dist/commonjs/sdk/models/operations/aichat.js +2 -2
  50. package/dist/commonjs/sdk/models/operations/aichat.js.map +1 -1
  51. package/dist/commonjs/sdk/models/operations/authsignup.d.ts +4 -4
  52. package/dist/commonjs/sdk/models/operations/authsignup.d.ts.map +1 -1
  53. package/dist/commonjs/sdk/models/operations/authsignup.js +2 -2
  54. package/dist/commonjs/sdk/models/operations/authsignup.js.map +1 -1
  55. package/dist/commonjs/sdk/models/operations/cacheget.d.ts +1 -1
  56. package/dist/commonjs/sdk/models/operations/cacheget.d.ts.map +1 -1
  57. package/dist/commonjs/sdk/models/operations/cacheget.js +1 -1
  58. package/dist/commonjs/sdk/models/operations/cacheget.js.map +1 -1
  59. package/dist/commonjs/sdk/models/operations/cacheset.d.ts +2 -2
  60. package/dist/commonjs/sdk/models/operations/cacheset.d.ts.map +1 -1
  61. package/dist/commonjs/sdk/models/operations/cacheset.js +1 -1
  62. package/dist/commonjs/sdk/models/operations/cacheset.js.map +1 -1
  63. package/dist/commonjs/sdk/models/operations/configure.d.ts +31 -0
  64. package/dist/commonjs/sdk/models/operations/configure.d.ts.map +1 -0
  65. package/dist/commonjs/sdk/models/operations/configure.js +64 -0
  66. package/dist/commonjs/sdk/models/operations/configure.js.map +1 -0
  67. package/dist/commonjs/sdk/models/operations/dbquery.d.ts +5 -5
  68. package/dist/commonjs/sdk/models/operations/dbquery.d.ts.map +1 -1
  69. package/dist/commonjs/sdk/models/operations/dbquery.js +1 -1
  70. package/dist/commonjs/sdk/models/operations/dbquery.js.map +1 -1
  71. package/dist/commonjs/sdk/models/operations/delete.d.ts +23 -0
  72. package/dist/commonjs/sdk/models/operations/delete.d.ts.map +1 -0
  73. package/dist/commonjs/sdk/models/operations/delete.js +58 -0
  74. package/dist/commonjs/sdk/models/operations/delete.js.map +1 -0
  75. package/dist/commonjs/sdk/models/operations/deletebytype.d.ts +23 -0
  76. package/dist/commonjs/sdk/models/operations/deletebytype.d.ts.map +1 -0
  77. package/dist/commonjs/sdk/models/operations/deletebytype.js +58 -0
  78. package/dist/commonjs/sdk/models/operations/deletebytype.js.map +1 -0
  79. package/dist/commonjs/sdk/models/operations/index.d.ts +6 -0
  80. package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
  81. package/dist/commonjs/sdk/models/operations/index.js +6 -0
  82. package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
  83. package/dist/commonjs/sdk/models/operations/ingest.d.ts +42 -0
  84. package/dist/commonjs/sdk/models/operations/ingest.d.ts.map +1 -0
  85. package/dist/commonjs/sdk/models/operations/ingest.js +61 -0
  86. package/dist/commonjs/sdk/models/operations/ingest.js.map +1 -0
  87. package/dist/commonjs/sdk/models/operations/listtypes.d.ts +14 -0
  88. package/dist/commonjs/sdk/models/operations/listtypes.d.ts.map +1 -0
  89. package/dist/commonjs/sdk/models/operations/listtypes.js +51 -0
  90. package/dist/commonjs/sdk/models/operations/listtypes.js.map +1 -0
  91. package/dist/commonjs/sdk/models/operations/query.d.ts +34 -0
  92. package/dist/commonjs/sdk/models/operations/query.d.ts.map +1 -0
  93. package/dist/commonjs/sdk/models/operations/query.js +62 -0
  94. package/dist/commonjs/sdk/models/operations/query.js.map +1 -0
  95. package/dist/commonjs/sdk/models/operations/queueenqueue.d.ts +2 -2
  96. package/dist/commonjs/sdk/models/operations/queueenqueue.d.ts.map +1 -1
  97. package/dist/commonjs/sdk/models/operations/queueenqueue.js +1 -1
  98. package/dist/commonjs/sdk/models/operations/queueenqueue.js.map +1 -1
  99. package/dist/commonjs/sdk/models/operations/servicesinvoke.d.ts +3 -3
  100. package/dist/commonjs/sdk/models/operations/servicesinvoke.d.ts.map +1 -1
  101. package/dist/commonjs/sdk/models/operations/servicesinvoke.js +2 -2
  102. package/dist/commonjs/sdk/models/operations/servicesinvoke.js.map +1 -1
  103. package/dist/commonjs/sdk/models/operations/storageupload.d.ts +4 -4
  104. package/dist/commonjs/sdk/models/operations/storageupload.d.ts.map +1 -1
  105. package/dist/commonjs/sdk/models/operations/storageupload.js +2 -2
  106. package/dist/commonjs/sdk/models/operations/storageupload.js.map +1 -1
  107. package/dist/commonjs/sdk/models/shared/authresponse.d.ts +1 -1
  108. package/dist/commonjs/sdk/models/shared/authresponse.d.ts.map +1 -1
  109. package/dist/commonjs/sdk/models/shared/authresponse.js +2 -2
  110. package/dist/commonjs/sdk/models/shared/authresponse.js.map +1 -1
  111. package/dist/commonjs/sdk/models/shared/dbqueryresult.d.ts +1 -1
  112. package/dist/commonjs/sdk/models/shared/dbqueryresult.d.ts.map +1 -1
  113. package/dist/commonjs/sdk/models/shared/dbqueryresult.js +1 -1
  114. package/dist/commonjs/sdk/models/shared/dbqueryresult.js.map +1 -1
  115. package/dist/commonjs/sdk/models/shared/errorresponse.d.ts +4 -1
  116. package/dist/commonjs/sdk/models/shared/errorresponse.d.ts.map +1 -1
  117. package/dist/commonjs/sdk/models/shared/errorresponse.js +1 -1
  118. package/dist/commonjs/sdk/models/shared/errorresponse.js.map +1 -1
  119. package/dist/commonjs/sdk/models/shared/index.d.ts +2 -0
  120. package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
  121. package/dist/commonjs/sdk/models/shared/index.js +2 -0
  122. package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
  123. package/dist/commonjs/sdk/models/shared/searchresult.d.ts +16 -0
  124. package/dist/commonjs/sdk/models/shared/searchresult.d.ts.map +1 -0
  125. package/dist/commonjs/sdk/models/shared/searchresult.js +54 -0
  126. package/dist/commonjs/sdk/models/shared/searchresult.js.map +1 -0
  127. package/dist/commonjs/sdk/models/shared/typestats.d.ts +11 -0
  128. package/dist/commonjs/sdk/models/shared/typestats.d.ts.map +1 -0
  129. package/dist/commonjs/sdk/models/shared/typestats.js +51 -0
  130. package/dist/commonjs/sdk/models/shared/typestats.js.map +1 -0
  131. package/dist/commonjs/sdk/models/shared/user.d.ts +3 -3
  132. package/dist/commonjs/sdk/models/shared/user.d.ts.map +1 -1
  133. package/dist/commonjs/sdk/models/shared/user.js +3 -3
  134. package/dist/commonjs/sdk/models/shared/user.js.map +1 -1
  135. package/dist/commonjs/sdk/realtime.d.ts +55 -0
  136. package/dist/commonjs/sdk/realtime.d.ts.map +1 -0
  137. package/dist/commonjs/sdk/realtime.js +170 -0
  138. package/dist/commonjs/sdk/realtime.js.map +1 -0
  139. package/dist/commonjs/sdk/sdk.d.ts +6 -6
  140. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  141. package/dist/commonjs/sdk/sdk.js +8 -8
  142. package/dist/commonjs/sdk/sdk.js.map +1 -1
  143. package/dist/commonjs/sdk/search.d.ts +29 -0
  144. package/dist/commonjs/sdk/search.d.ts.map +1 -0
  145. package/dist/commonjs/sdk/search.js +54 -0
  146. package/dist/commonjs/sdk/search.js.map +1 -0
  147. package/dist/esm/funcs/aiSearchConfigure.d.ts +14 -0
  148. package/dist/esm/funcs/aiSearchConfigure.d.ts.map +1 -0
  149. package/dist/esm/funcs/aiSearchConfigure.js +75 -0
  150. package/dist/esm/funcs/aiSearchConfigure.js.map +1 -0
  151. package/dist/esm/funcs/aiSearchDelete.d.ts +14 -0
  152. package/dist/esm/funcs/aiSearchDelete.d.ts.map +1 -0
  153. package/dist/esm/funcs/aiSearchDelete.js +75 -0
  154. package/dist/esm/funcs/aiSearchDelete.js.map +1 -0
  155. package/dist/esm/funcs/aiSearchDeleteByType.d.ts +14 -0
  156. package/dist/esm/funcs/aiSearchDeleteByType.d.ts.map +1 -0
  157. package/dist/esm/funcs/aiSearchDeleteByType.js +75 -0
  158. package/dist/esm/funcs/aiSearchDeleteByType.js.map +1 -0
  159. package/dist/esm/funcs/aiSearchIngest.d.ts +14 -0
  160. package/dist/esm/funcs/aiSearchIngest.d.ts.map +1 -0
  161. package/dist/esm/funcs/aiSearchIngest.js +75 -0
  162. package/dist/esm/funcs/aiSearchIngest.js.map +1 -0
  163. package/dist/esm/funcs/aiSearchListTypes.d.ts +14 -0
  164. package/dist/esm/funcs/aiSearchListTypes.d.ts.map +1 -0
  165. package/dist/esm/funcs/aiSearchListTypes.js +65 -0
  166. package/dist/esm/funcs/aiSearchListTypes.js.map +1 -0
  167. package/dist/esm/funcs/aiSearchQuery.d.ts +14 -0
  168. package/dist/esm/funcs/aiSearchQuery.d.ts.map +1 -0
  169. package/dist/esm/funcs/aiSearchQuery.js +75 -0
  170. package/dist/esm/funcs/aiSearchQuery.js.map +1 -0
  171. package/dist/esm/hooks/hooks.d.ts +3 -2
  172. package/dist/esm/hooks/hooks.d.ts.map +1 -1
  173. package/dist/esm/hooks/hooks.js.map +1 -1
  174. package/dist/esm/hooks/types.d.ts +2 -6
  175. package/dist/esm/hooks/types.d.ts.map +1 -1
  176. package/dist/esm/index.d.ts +1 -0
  177. package/dist/esm/index.d.ts.map +1 -1
  178. package/dist/esm/index.js +1 -0
  179. package/dist/esm/index.js.map +1 -1
  180. package/dist/esm/lib/config.d.ts +2 -2
  181. package/dist/esm/lib/config.js +2 -2
  182. package/dist/esm/lib/sdks.d.ts.map +1 -1
  183. package/dist/esm/lib/sdks.js +5 -6
  184. package/dist/esm/lib/sdks.js.map +1 -1
  185. package/dist/esm/sdk/ai.d.ts +3 -0
  186. package/dist/esm/sdk/ai.d.ts.map +1 -1
  187. package/dist/esm/sdk/ai.js +4 -0
  188. package/dist/esm/sdk/ai.js.map +1 -1
  189. package/dist/esm/sdk/authentication.d.ts +4 -4
  190. package/dist/esm/sdk/authentication.js +6 -6
  191. package/dist/esm/sdk/models/operations/aichat.d.ts +4 -4
  192. package/dist/esm/sdk/models/operations/aichat.d.ts.map +1 -1
  193. package/dist/esm/sdk/models/operations/aichat.js +2 -2
  194. package/dist/esm/sdk/models/operations/aichat.js.map +1 -1
  195. package/dist/esm/sdk/models/operations/authsignup.d.ts +4 -4
  196. package/dist/esm/sdk/models/operations/authsignup.d.ts.map +1 -1
  197. package/dist/esm/sdk/models/operations/authsignup.js +2 -2
  198. package/dist/esm/sdk/models/operations/authsignup.js.map +1 -1
  199. package/dist/esm/sdk/models/operations/cacheget.d.ts +1 -1
  200. package/dist/esm/sdk/models/operations/cacheget.d.ts.map +1 -1
  201. package/dist/esm/sdk/models/operations/cacheget.js +1 -1
  202. package/dist/esm/sdk/models/operations/cacheget.js.map +1 -1
  203. package/dist/esm/sdk/models/operations/cacheset.d.ts +2 -2
  204. package/dist/esm/sdk/models/operations/cacheset.d.ts.map +1 -1
  205. package/dist/esm/sdk/models/operations/cacheset.js +1 -1
  206. package/dist/esm/sdk/models/operations/cacheset.js.map +1 -1
  207. package/dist/esm/sdk/models/operations/configure.d.ts +31 -0
  208. package/dist/esm/sdk/models/operations/configure.d.ts.map +1 -0
  209. package/dist/esm/sdk/models/operations/configure.js +26 -0
  210. package/dist/esm/sdk/models/operations/configure.js.map +1 -0
  211. package/dist/esm/sdk/models/operations/dbquery.d.ts +5 -5
  212. package/dist/esm/sdk/models/operations/dbquery.d.ts.map +1 -1
  213. package/dist/esm/sdk/models/operations/dbquery.js +1 -1
  214. package/dist/esm/sdk/models/operations/dbquery.js.map +1 -1
  215. package/dist/esm/sdk/models/operations/delete.d.ts +23 -0
  216. package/dist/esm/sdk/models/operations/delete.d.ts.map +1 -0
  217. package/dist/esm/sdk/models/operations/delete.js +20 -0
  218. package/dist/esm/sdk/models/operations/delete.js.map +1 -0
  219. package/dist/esm/sdk/models/operations/deletebytype.d.ts +23 -0
  220. package/dist/esm/sdk/models/operations/deletebytype.d.ts.map +1 -0
  221. package/dist/esm/sdk/models/operations/deletebytype.js +20 -0
  222. package/dist/esm/sdk/models/operations/deletebytype.js.map +1 -0
  223. package/dist/esm/sdk/models/operations/index.d.ts +6 -0
  224. package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
  225. package/dist/esm/sdk/models/operations/index.js +6 -0
  226. package/dist/esm/sdk/models/operations/index.js.map +1 -1
  227. package/dist/esm/sdk/models/operations/ingest.d.ts +42 -0
  228. package/dist/esm/sdk/models/operations/ingest.d.ts.map +1 -0
  229. package/dist/esm/sdk/models/operations/ingest.js +23 -0
  230. package/dist/esm/sdk/models/operations/ingest.js.map +1 -0
  231. package/dist/esm/sdk/models/operations/listtypes.d.ts +14 -0
  232. package/dist/esm/sdk/models/operations/listtypes.d.ts.map +1 -0
  233. package/dist/esm/sdk/models/operations/listtypes.js +14 -0
  234. package/dist/esm/sdk/models/operations/listtypes.js.map +1 -0
  235. package/dist/esm/sdk/models/operations/query.d.ts +34 -0
  236. package/dist/esm/sdk/models/operations/query.d.ts.map +1 -0
  237. package/dist/esm/sdk/models/operations/query.js +24 -0
  238. package/dist/esm/sdk/models/operations/query.js.map +1 -0
  239. package/dist/esm/sdk/models/operations/queueenqueue.d.ts +2 -2
  240. package/dist/esm/sdk/models/operations/queueenqueue.d.ts.map +1 -1
  241. package/dist/esm/sdk/models/operations/queueenqueue.js +1 -1
  242. package/dist/esm/sdk/models/operations/queueenqueue.js.map +1 -1
  243. package/dist/esm/sdk/models/operations/servicesinvoke.d.ts +3 -3
  244. package/dist/esm/sdk/models/operations/servicesinvoke.d.ts.map +1 -1
  245. package/dist/esm/sdk/models/operations/servicesinvoke.js +2 -2
  246. package/dist/esm/sdk/models/operations/servicesinvoke.js.map +1 -1
  247. package/dist/esm/sdk/models/operations/storageupload.d.ts +4 -4
  248. package/dist/esm/sdk/models/operations/storageupload.d.ts.map +1 -1
  249. package/dist/esm/sdk/models/operations/storageupload.js +2 -2
  250. package/dist/esm/sdk/models/operations/storageupload.js.map +1 -1
  251. package/dist/esm/sdk/models/shared/authresponse.d.ts +1 -1
  252. package/dist/esm/sdk/models/shared/authresponse.d.ts.map +1 -1
  253. package/dist/esm/sdk/models/shared/authresponse.js +2 -2
  254. package/dist/esm/sdk/models/shared/authresponse.js.map +1 -1
  255. package/dist/esm/sdk/models/shared/dbqueryresult.d.ts +1 -1
  256. package/dist/esm/sdk/models/shared/dbqueryresult.d.ts.map +1 -1
  257. package/dist/esm/sdk/models/shared/dbqueryresult.js +1 -1
  258. package/dist/esm/sdk/models/shared/dbqueryresult.js.map +1 -1
  259. package/dist/esm/sdk/models/shared/errorresponse.d.ts +4 -1
  260. package/dist/esm/sdk/models/shared/errorresponse.d.ts.map +1 -1
  261. package/dist/esm/sdk/models/shared/errorresponse.js +1 -1
  262. package/dist/esm/sdk/models/shared/errorresponse.js.map +1 -1
  263. package/dist/esm/sdk/models/shared/index.d.ts +2 -0
  264. package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
  265. package/dist/esm/sdk/models/shared/index.js +2 -0
  266. package/dist/esm/sdk/models/shared/index.js.map +1 -1
  267. package/dist/esm/sdk/models/shared/searchresult.d.ts +16 -0
  268. package/dist/esm/sdk/models/shared/searchresult.d.ts.map +1 -0
  269. package/dist/esm/sdk/models/shared/searchresult.js +17 -0
  270. package/dist/esm/sdk/models/shared/searchresult.js.map +1 -0
  271. package/dist/esm/sdk/models/shared/typestats.d.ts +11 -0
  272. package/dist/esm/sdk/models/shared/typestats.d.ts.map +1 -0
  273. package/dist/esm/sdk/models/shared/typestats.js +14 -0
  274. package/dist/esm/sdk/models/shared/typestats.js.map +1 -0
  275. package/dist/esm/sdk/models/shared/user.d.ts +3 -3
  276. package/dist/esm/sdk/models/shared/user.d.ts.map +1 -1
  277. package/dist/esm/sdk/models/shared/user.js +3 -3
  278. package/dist/esm/sdk/models/shared/user.js.map +1 -1
  279. package/dist/esm/sdk/realtime.d.ts +55 -0
  280. package/dist/esm/sdk/realtime.d.ts.map +1 -0
  281. package/dist/esm/sdk/realtime.js +165 -0
  282. package/dist/esm/sdk/realtime.js.map +1 -0
  283. package/dist/esm/sdk/sdk.d.ts +6 -6
  284. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  285. package/dist/esm/sdk/sdk.js +8 -8
  286. package/dist/esm/sdk/sdk.js.map +1 -1
  287. package/dist/esm/sdk/search.d.ts +29 -0
  288. package/dist/esm/sdk/search.d.ts.map +1 -0
  289. package/dist/esm/sdk/search.js +50 -0
  290. package/dist/esm/sdk/search.js.map +1 -0
  291. package/examples/databaseDbQuery.example.ts +31 -0
  292. package/jsr.json +1 -1
  293. package/package.json +10 -1
  294. package/src/funcs/aiSearchConfigure.ts +155 -0
  295. package/src/funcs/aiSearchDelete.ts +155 -0
  296. package/src/funcs/aiSearchDeleteByType.ts +155 -0
  297. package/src/funcs/aiSearchIngest.ts +155 -0
  298. package/src/funcs/aiSearchListTypes.ts +137 -0
  299. package/src/funcs/aiSearchQuery.ts +155 -0
  300. package/src/hooks/hooks.ts +2 -2
  301. package/src/hooks/types.ts +2 -7
  302. package/src/index.ts +1 -0
  303. package/src/lib/config.ts +2 -2
  304. package/src/lib/sdks.ts +6 -7
  305. package/src/sdk/ai.ts +6 -0
  306. package/src/sdk/authentication.ts +10 -10
  307. package/src/sdk/models/operations/aichat.ts +6 -6
  308. package/src/sdk/models/operations/authsignup.ts +6 -6
  309. package/src/sdk/models/operations/cacheget.ts +2 -2
  310. package/src/sdk/models/operations/cacheset.ts +3 -3
  311. package/src/sdk/models/operations/configure.ts +72 -0
  312. package/src/sdk/models/operations/dbquery.ts +6 -6
  313. package/src/sdk/models/operations/delete.ts +60 -0
  314. package/src/sdk/models/operations/deletebytype.ts +60 -0
  315. package/src/sdk/models/operations/index.ts +6 -0
  316. package/src/sdk/models/operations/ingest.ts +78 -0
  317. package/src/sdk/models/operations/listtypes.ts +35 -0
  318. package/src/sdk/models/operations/query.ts +70 -0
  319. package/src/sdk/models/operations/queueenqueue.ts +3 -3
  320. package/src/sdk/models/operations/servicesinvoke.ts +5 -5
  321. package/src/sdk/models/operations/storageupload.ts +6 -6
  322. package/src/sdk/models/shared/authresponse.ts +3 -3
  323. package/src/sdk/models/shared/dbqueryresult.ts +2 -2
  324. package/src/sdk/models/shared/errorresponse.ts +5 -2
  325. package/src/sdk/models/shared/index.ts +2 -0
  326. package/src/sdk/models/shared/searchresult.ts +39 -0
  327. package/src/sdk/models/shared/typestats.ts +33 -0
  328. package/src/sdk/models/shared/user.ts +6 -6
  329. package/src/sdk/realtime.ts +199 -0
  330. package/src/sdk/sdk.ts +13 -13
  331. package/src/sdk/search.ts +97 -0
@@ -0,0 +1,155 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SDKCore } from "../core.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../sdk/models/errors/httpclienterrors.js";
20
+ import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
21
+ import { SDKBaseError } from "../sdk/models/errors/sdkbaseerror.js";
22
+ import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
23
+ import * as operations from "../sdk/models/operations/index.js";
24
+ import { APICall, APIPromise } from "../sdk/types/async.js";
25
+ import { Result } from "../sdk/types/fp.js";
26
+
27
+ /**
28
+ * Search managed index
29
+ */
30
+ export function aiSearchQuery(
31
+ client: SDKCore,
32
+ request: operations.QueryRequestBody,
33
+ options?: RequestOptions,
34
+ ): APIPromise<
35
+ Result<
36
+ operations.QueryResponseBody,
37
+ | SDKBaseError
38
+ | ResponseValidationError
39
+ | ConnectionError
40
+ | RequestAbortedError
41
+ | RequestTimeoutError
42
+ | InvalidRequestError
43
+ | UnexpectedClientError
44
+ | SDKValidationError
45
+ >
46
+ > {
47
+ return new APIPromise($do(
48
+ client,
49
+ request,
50
+ options,
51
+ ));
52
+ }
53
+
54
+ async function $do(
55
+ client: SDKCore,
56
+ request: operations.QueryRequestBody,
57
+ options?: RequestOptions,
58
+ ): Promise<
59
+ [
60
+ Result<
61
+ operations.QueryResponseBody,
62
+ | SDKBaseError
63
+ | ResponseValidationError
64
+ | ConnectionError
65
+ | RequestAbortedError
66
+ | RequestTimeoutError
67
+ | InvalidRequestError
68
+ | UnexpectedClientError
69
+ | SDKValidationError
70
+ >,
71
+ APICall,
72
+ ]
73
+ > {
74
+ const parsed = safeParse(
75
+ request,
76
+ (value) => operations.QueryRequestBody$outboundSchema.parse(value),
77
+ "Input validation failed",
78
+ );
79
+ if (!parsed.ok) {
80
+ return [parsed, { status: "invalid" }];
81
+ }
82
+ const payload = parsed.value;
83
+ const body = encodeJSON("body", payload, { explode: true });
84
+
85
+ const path = pathToFunc("/ai/search/query")();
86
+
87
+ const headers = new Headers(compactMap({
88
+ "Content-Type": "application/json",
89
+ Accept: "application/json",
90
+ }));
91
+
92
+ const secConfig = await extractSecurity(client._options.apiKeyAuth);
93
+ const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
94
+ const requestSecurity = resolveGlobalSecurity(securityInput);
95
+
96
+ const context = {
97
+ options: client._options,
98
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
99
+ operationID: "query",
100
+ oAuth2Scopes: null,
101
+
102
+ resolvedSecurity: requestSecurity,
103
+
104
+ securitySource: client._options.apiKeyAuth,
105
+ retryConfig: options?.retries
106
+ || client._options.retryConfig
107
+ || { strategy: "none" },
108
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
109
+ };
110
+
111
+ const requestRes = client._createRequest(context, {
112
+ security: requestSecurity,
113
+ method: "POST",
114
+ baseURL: options?.serverURL,
115
+ path: path,
116
+ headers: headers,
117
+ body: body,
118
+ userAgent: client._options.userAgent,
119
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
120
+ }, options);
121
+ if (!requestRes.ok) {
122
+ return [requestRes, { status: "invalid" }];
123
+ }
124
+ const req = requestRes.value;
125
+
126
+ const doResult = await client._do(req, {
127
+ context,
128
+ errorCodes: [],
129
+ retryConfig: context.retryConfig,
130
+ retryCodes: context.retryCodes,
131
+ });
132
+ if (!doResult.ok) {
133
+ return [doResult, { status: "request-error", request: req }];
134
+ }
135
+ const response = doResult.value;
136
+
137
+ const [result] = await M.match<
138
+ operations.QueryResponseBody,
139
+ | SDKBaseError
140
+ | ResponseValidationError
141
+ | ConnectionError
142
+ | RequestAbortedError
143
+ | RequestTimeoutError
144
+ | InvalidRequestError
145
+ | UnexpectedClientError
146
+ | SDKValidationError
147
+ >(
148
+ M.json(200, operations.QueryResponseBody$inboundSchema),
149
+ )(response, req);
150
+ if (!result.ok) {
151
+ return [result, { status: "complete", request: req, response }];
152
+ }
153
+
154
+ return [result, { status: "complete", request: req, response }];
155
+ }
@@ -2,6 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import { SDKOptions } from "../lib/config.js";
5
6
  import { RequestInput } from "../lib/http.js";
6
7
  import {
7
8
  AfterErrorContext,
@@ -15,7 +16,6 @@ import {
15
16
  Hook,
16
17
  Hooks,
17
18
  SDKInitHook,
18
- SDKInitOptions,
19
19
  } from "./types.js";
20
20
 
21
21
  import { initHooks } from "./registration.js";
@@ -70,7 +70,7 @@ export class SDKHooks implements Hooks {
70
70
  this.afterErrorHooks.push(hook);
71
71
  }
72
72
 
73
- sdkInit(opts: SDKInitOptions): SDKInitOptions {
73
+ sdkInit(opts: SDKOptions): SDKOptions {
74
74
  return this.sdkInitHooks.reduce((opts, hook) => hook.sdkInit(opts), opts);
75
75
  }
76
76
 
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { SDKOptions } from "../lib/config.js";
6
- import { HTTPClient, RequestInput } from "../lib/http.js";
6
+ import { RequestInput } from "../lib/http.js";
7
7
  import { RetryConfig } from "../lib/retries.js";
8
8
  import { SecurityState } from "../lib/security.js";
9
9
 
@@ -19,11 +19,6 @@ export type HookContext = {
19
19
 
20
20
  export type Awaitable<T> = T | Promise<T>;
21
21
 
22
- export type SDKInitOptions = {
23
- baseURL: URL | null;
24
- client: HTTPClient;
25
- };
26
-
27
22
  export type BeforeCreateRequestContext = HookContext & {};
28
23
  export type BeforeRequestContext = HookContext & {};
29
24
  export type AfterSuccessContext = HookContext & {};
@@ -34,7 +29,7 @@ export type AfterErrorContext = HookContext & {};
34
29
  * hook can return a new baseURL and HTTP client to be used by the SDK.
35
30
  */
36
31
  export interface SDKInitHook {
37
- sdkInit: (opts: SDKInitOptions) => SDKInitOptions;
32
+ sdkInit: (opts: SDKOptions) => SDKOptions;
38
33
  }
39
34
 
40
35
  export interface BeforeCreateRequestHook {
package/src/index.ts CHANGED
@@ -7,3 +7,4 @@ export * as files from "./lib/files.js";
7
7
  export { HTTPClient } from "./lib/http.js";
8
8
  export type { Fetcher, HTTPClientOptions } from "./lib/http.js";
9
9
  export * from "./sdk/sdk.js";
10
+ export * from "./sdk/realtime.js";
package/src/lib/config.ts CHANGED
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
65
65
  export const SDK_METADATA = {
66
66
  language: "typescript",
67
67
  openapiDocVersion: "1.0.0",
68
- sdkVersion: "0.2.2",
68
+ sdkVersion: "0.3.1",
69
69
  genVersion: "2.823.4",
70
- userAgent: "speakeasy-sdk/typescript 0.2.2 2.823.4 1.0.0 @aerostack/sdk-web",
70
+ userAgent: "speakeasy-sdk/typescript 0.3.1 2.823.4 1.0.0 @aerostack/sdk-web",
71
71
  } as const;
package/src/lib/sdks.ts CHANGED
@@ -96,17 +96,16 @@ export class ClientSDK {
96
96
  } else {
97
97
  this.#hooks = new SDKHooks();
98
98
  }
99
+ const defaultHttpClient = new HTTPClient();
100
+ options.httpClient = options.httpClient || defaultHttpClient;
101
+ options = this.#hooks.sdkInit(options);
102
+
99
103
  const url = serverURLFromOptions(options);
100
104
  if (url) {
101
105
  url.pathname = url.pathname.replace(/\/+$/, "") + "/";
102
106
  }
103
-
104
- const { baseURL, client } = this.#hooks.sdkInit({
105
- baseURL: url,
106
- client: options.httpClient || new HTTPClient(),
107
- });
108
- this._baseURL = baseURL;
109
- this.#httpClient = client;
107
+ this._baseURL = url;
108
+ this.#httpClient = options.httpClient || defaultHttpClient;
110
109
 
111
110
  this._options = { ...options, hooks: this.#hooks };
112
111
 
package/src/sdk/ai.ts CHANGED
@@ -5,9 +5,15 @@
5
5
  import { aiAIChat } from "../funcs/aiAIChat.js";
6
6
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
7
7
  import * as operations from "./models/operations/index.js";
8
+ import { Search } from "./search.js";
8
9
  import { unwrapAsync } from "./types/fp.js";
9
10
 
10
11
  export class Ai extends ClientSDK {
12
+ private _search?: Search;
13
+ get search(): Search {
14
+ return (this._search ??= new Search(this._options));
15
+ }
16
+
11
17
  /**
12
18
  * Generate AI chat completion
13
19
  */
@@ -10,13 +10,13 @@ import { unwrapAsync } from "./types/fp.js";
10
10
 
11
11
  export class Authentication extends ClientSDK {
12
12
  /**
13
- * Sign in user
13
+ * Sign up new user
14
14
  */
15
- async authSignin(
16
- request: operations.AuthSigninRequestBody,
15
+ async authSignup(
16
+ request: operations.AuthSignupRequestBody,
17
17
  options?: RequestOptions,
18
- ): Promise<operations.AuthSigninResponse> {
19
- return unwrapAsync(authenticationAuthSignin(
18
+ ): Promise<operations.AuthSignupResponse> {
19
+ return unwrapAsync(authenticationAuthSignup(
20
20
  this,
21
21
  request,
22
22
  options,
@@ -24,13 +24,13 @@ export class Authentication extends ClientSDK {
24
24
  }
25
25
 
26
26
  /**
27
- * Sign up new user
27
+ * Sign in user
28
28
  */
29
- async authSignup(
30
- request: operations.AuthSignupRequestBody,
29
+ async authSignin(
30
+ request: operations.AuthSigninRequestBody,
31
31
  options?: RequestOptions,
32
- ): Promise<operations.AuthSignupResponse> {
33
- return unwrapAsync(authenticationAuthSignup(
32
+ ): Promise<operations.AuthSigninResponse> {
33
+ return unwrapAsync(authenticationAuthSignin(
34
34
  this,
35
35
  request,
36
36
  options,
@@ -16,13 +16,13 @@ export const Role = {
16
16
  export type Role = ClosedEnum<typeof Role>;
17
17
 
18
18
  export type Messages = {
19
- content?: string | undefined;
20
19
  role?: Role | undefined;
20
+ content?: string | undefined;
21
21
  };
22
22
 
23
23
  export type AiChatRequestBody = {
24
- messages: Array<Messages>;
25
24
  model?: string | undefined;
25
+ messages: Array<Messages>;
26
26
  };
27
27
 
28
28
  /**
@@ -39,8 +39,8 @@ export const Role$outboundSchema: z.ZodNativeEnum<typeof Role> = z.nativeEnum(
39
39
 
40
40
  /** @internal */
41
41
  export type Messages$Outbound = {
42
- content?: string | undefined;
43
42
  role?: string | undefined;
43
+ content?: string | undefined;
44
44
  };
45
45
 
46
46
  /** @internal */
@@ -49,8 +49,8 @@ export const Messages$outboundSchema: z.ZodType<
49
49
  z.ZodTypeDef,
50
50
  Messages
51
51
  > = z.object({
52
- content: z.string().optional(),
53
52
  role: Role$outboundSchema.optional(),
53
+ content: z.string().optional(),
54
54
  });
55
55
 
56
56
  export function messagesToJSON(messages: Messages): string {
@@ -59,8 +59,8 @@ export function messagesToJSON(messages: Messages): string {
59
59
 
60
60
  /** @internal */
61
61
  export type AiChatRequestBody$Outbound = {
62
- messages: Array<Messages$Outbound>;
63
62
  model?: string | undefined;
63
+ messages: Array<Messages$Outbound>;
64
64
  };
65
65
 
66
66
  /** @internal */
@@ -69,8 +69,8 @@ export const AiChatRequestBody$outboundSchema: z.ZodType<
69
69
  z.ZodTypeDef,
70
70
  AiChatRequestBody
71
71
  > = z.object({
72
- messages: z.array(z.lazy(() => Messages$outboundSchema)),
73
72
  model: z.string().optional(),
73
+ messages: z.array(z.lazy(() => Messages$outboundSchema)),
74
74
  });
75
75
 
76
76
  export function aiChatRequestBodyToJSON(
@@ -10,9 +10,9 @@ import * as shared from "../shared/index.js";
10
10
 
11
11
  export type AuthSignupRequestBody = {
12
12
  email: string;
13
- metadata?: { [k: string]: any } | undefined;
14
- name?: string | undefined;
15
13
  password: string;
14
+ name?: string | undefined;
15
+ metadata?: { [k: string]: any } | undefined;
16
16
  };
17
17
 
18
18
  export type AuthSignupResponse = shared.ErrorResponse | shared.AuthResponse;
@@ -20,9 +20,9 @@ export type AuthSignupResponse = shared.ErrorResponse | shared.AuthResponse;
20
20
  /** @internal */
21
21
  export type AuthSignupRequestBody$Outbound = {
22
22
  email: string;
23
- metadata?: { [k: string]: any } | undefined;
24
- name?: string | undefined;
25
23
  password: string;
24
+ name?: string | undefined;
25
+ metadata?: { [k: string]: any } | undefined;
26
26
  };
27
27
 
28
28
  /** @internal */
@@ -32,9 +32,9 @@ export const AuthSignupRequestBody$outboundSchema: z.ZodType<
32
32
  AuthSignupRequestBody
33
33
  > = z.object({
34
34
  email: z.string(),
35
- metadata: z.record(z.any()).optional(),
36
- name: z.string().optional(),
37
35
  password: z.string(),
36
+ name: z.string().optional(),
37
+ metadata: z.record(z.any()).optional(),
38
38
  });
39
39
 
40
40
  export function authSignupRequestBodyToJSON(
@@ -15,8 +15,8 @@ export type CacheGetRequestBody = {
15
15
  * Cache value retrieved
16
16
  */
17
17
  export type CacheGetResponseBody = {
18
- exists?: boolean | undefined;
19
18
  value?: any | null | undefined;
19
+ exists?: boolean | undefined;
20
20
  };
21
21
 
22
22
  /** @internal */
@@ -47,8 +47,8 @@ export const CacheGetResponseBody$inboundSchema: z.ZodType<
47
47
  z.ZodTypeDef,
48
48
  unknown
49
49
  > = z.object({
50
- exists: z.boolean().optional(),
51
50
  value: z.nullable(z.any()).optional(),
51
+ exists: z.boolean().optional(),
52
52
  });
53
53
 
54
54
  export function cacheGetResponseBodyFromJSON(
@@ -9,11 +9,11 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
9
 
10
10
  export type CacheSetRequestBody = {
11
11
  key: string;
12
+ value?: any | undefined;
12
13
  /**
13
14
  * Time to live in seconds
14
15
  */
15
16
  ttl?: number | undefined;
16
- value?: any | undefined;
17
17
  };
18
18
 
19
19
  /**
@@ -26,8 +26,8 @@ export type CacheSetResponseBody = {
26
26
  /** @internal */
27
27
  export type CacheSetRequestBody$Outbound = {
28
28
  key: string;
29
- ttl?: number | undefined;
30
29
  value?: any | undefined;
30
+ ttl?: number | undefined;
31
31
  };
32
32
 
33
33
  /** @internal */
@@ -37,8 +37,8 @@ export const CacheSetRequestBody$outboundSchema: z.ZodType<
37
37
  CacheSetRequestBody
38
38
  > = z.object({
39
39
  key: z.string(),
40
- ttl: z.number().int().optional(),
41
40
  value: z.any().optional(),
41
+ ttl: z.number().int().optional(),
42
42
  });
43
43
 
44
44
  export function cacheSetRequestBodyToJSON(
@@ -0,0 +1,72 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export const EmbeddingModel = {
12
+ English: "english",
13
+ Multilingual: "multilingual",
14
+ } as const;
15
+ export type EmbeddingModel = ClosedEnum<typeof EmbeddingModel>;
16
+
17
+ export type ConfigureRequestBody = {
18
+ embeddingModel: EmbeddingModel;
19
+ };
20
+
21
+ /**
22
+ * Configured
23
+ */
24
+ export type ConfigureResponseBody = {
25
+ success?: boolean | undefined;
26
+ };
27
+
28
+ /** @internal */
29
+ export const EmbeddingModel$outboundSchema: z.ZodNativeEnum<
30
+ typeof EmbeddingModel
31
+ > = z.nativeEnum(EmbeddingModel);
32
+
33
+ /** @internal */
34
+ export type ConfigureRequestBody$Outbound = {
35
+ embeddingModel: string;
36
+ };
37
+
38
+ /** @internal */
39
+ export const ConfigureRequestBody$outboundSchema: z.ZodType<
40
+ ConfigureRequestBody$Outbound,
41
+ z.ZodTypeDef,
42
+ ConfigureRequestBody
43
+ > = z.object({
44
+ embeddingModel: EmbeddingModel$outboundSchema,
45
+ });
46
+
47
+ export function configureRequestBodyToJSON(
48
+ configureRequestBody: ConfigureRequestBody,
49
+ ): string {
50
+ return JSON.stringify(
51
+ ConfigureRequestBody$outboundSchema.parse(configureRequestBody),
52
+ );
53
+ }
54
+
55
+ /** @internal */
56
+ export const ConfigureResponseBody$inboundSchema: z.ZodType<
57
+ ConfigureResponseBody,
58
+ z.ZodTypeDef,
59
+ unknown
60
+ > = z.object({
61
+ success: z.boolean().optional(),
62
+ });
63
+
64
+ export function configureResponseBodyFromJSON(
65
+ jsonString: string,
66
+ ): SafeParseResult<ConfigureResponseBody, SDKValidationError> {
67
+ return safeParse(
68
+ jsonString,
69
+ (x) => ConfigureResponseBody$inboundSchema.parse(JSON.parse(x)),
70
+ `Failed to parse 'ConfigureResponseBody' from JSON`,
71
+ );
72
+ }
@@ -9,22 +9,22 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
9
  import * as shared from "../shared/index.js";
10
10
 
11
11
  export type DbQueryRequestBody = {
12
- /**
13
- * Query parameters for prepared statements
14
- */
15
- params?: Array<any> | undefined;
16
12
  /**
17
13
  * SQL query to execute
18
14
  */
19
15
  sql: string;
16
+ /**
17
+ * Query parameters for prepared statements
18
+ */
19
+ params?: Array<any> | undefined;
20
20
  };
21
21
 
22
22
  export type DbQueryResponse = shared.ErrorResponse | shared.DbQueryResult;
23
23
 
24
24
  /** @internal */
25
25
  export type DbQueryRequestBody$Outbound = {
26
- params?: Array<any> | undefined;
27
26
  sql: string;
27
+ params?: Array<any> | undefined;
28
28
  };
29
29
 
30
30
  /** @internal */
@@ -33,8 +33,8 @@ export const DbQueryRequestBody$outboundSchema: z.ZodType<
33
33
  z.ZodTypeDef,
34
34
  DbQueryRequestBody
35
35
  > = z.object({
36
- params: z.array(z.any()).optional(),
37
36
  sql: z.string(),
37
+ params: z.array(z.any()).optional(),
38
38
  });
39
39
 
40
40
  export function dbQueryRequestBodyToJSON(
@@ -0,0 +1,60 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type DeleteRequestBody = {
11
+ id: string;
12
+ };
13
+
14
+ /**
15
+ * Deleted
16
+ */
17
+ export type DeleteResponseBody = {
18
+ success?: boolean | undefined;
19
+ };
20
+
21
+ /** @internal */
22
+ export type DeleteRequestBody$Outbound = {
23
+ id: string;
24
+ };
25
+
26
+ /** @internal */
27
+ export const DeleteRequestBody$outboundSchema: z.ZodType<
28
+ DeleteRequestBody$Outbound,
29
+ z.ZodTypeDef,
30
+ DeleteRequestBody
31
+ > = z.object({
32
+ id: z.string(),
33
+ });
34
+
35
+ export function deleteRequestBodyToJSON(
36
+ deleteRequestBody: DeleteRequestBody,
37
+ ): string {
38
+ return JSON.stringify(
39
+ DeleteRequestBody$outboundSchema.parse(deleteRequestBody),
40
+ );
41
+ }
42
+
43
+ /** @internal */
44
+ export const DeleteResponseBody$inboundSchema: z.ZodType<
45
+ DeleteResponseBody,
46
+ z.ZodTypeDef,
47
+ unknown
48
+ > = z.object({
49
+ success: z.boolean().optional(),
50
+ });
51
+
52
+ export function deleteResponseBodyFromJSON(
53
+ jsonString: string,
54
+ ): SafeParseResult<DeleteResponseBody, SDKValidationError> {
55
+ return safeParse(
56
+ jsonString,
57
+ (x) => DeleteResponseBody$inboundSchema.parse(JSON.parse(x)),
58
+ `Failed to parse 'DeleteResponseBody' from JSON`,
59
+ );
60
+ }
@@ -0,0 +1,60 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type DeleteByTypeRequestBody = {
11
+ type: string;
12
+ };
13
+
14
+ /**
15
+ * Deleted
16
+ */
17
+ export type DeleteByTypeResponseBody = {
18
+ success?: boolean | undefined;
19
+ };
20
+
21
+ /** @internal */
22
+ export type DeleteByTypeRequestBody$Outbound = {
23
+ type: string;
24
+ };
25
+
26
+ /** @internal */
27
+ export const DeleteByTypeRequestBody$outboundSchema: z.ZodType<
28
+ DeleteByTypeRequestBody$Outbound,
29
+ z.ZodTypeDef,
30
+ DeleteByTypeRequestBody
31
+ > = z.object({
32
+ type: z.string(),
33
+ });
34
+
35
+ export function deleteByTypeRequestBodyToJSON(
36
+ deleteByTypeRequestBody: DeleteByTypeRequestBody,
37
+ ): string {
38
+ return JSON.stringify(
39
+ DeleteByTypeRequestBody$outboundSchema.parse(deleteByTypeRequestBody),
40
+ );
41
+ }
42
+
43
+ /** @internal */
44
+ export const DeleteByTypeResponseBody$inboundSchema: z.ZodType<
45
+ DeleteByTypeResponseBody,
46
+ z.ZodTypeDef,
47
+ unknown
48
+ > = z.object({
49
+ success: z.boolean().optional(),
50
+ });
51
+
52
+ export function deleteByTypeResponseBodyFromJSON(
53
+ jsonString: string,
54
+ ): SafeParseResult<DeleteByTypeResponseBody, SDKValidationError> {
55
+ return safeParse(
56
+ jsonString,
57
+ (x) => DeleteByTypeResponseBody$inboundSchema.parse(JSON.parse(x)),
58
+ `Failed to parse 'DeleteByTypeResponseBody' from JSON`,
59
+ );
60
+ }