@aerostack/sdk-node 0.1.0

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 (649) hide show
  1. package/FUNCTIONS.md +92 -0
  2. package/README.md +542 -0
  3. package/RUNTIMES.md +48 -0
  4. package/dist/commonjs/core.d.ts +10 -0
  5. package/dist/commonjs/core.d.ts.map +1 -0
  6. package/dist/commonjs/core.js +17 -0
  7. package/dist/commonjs/core.js.map +1 -0
  8. package/dist/commonjs/funcs/aiAIChat.d.ts +14 -0
  9. package/dist/commonjs/funcs/aiAIChat.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/aiAIChat.js +111 -0
  11. package/dist/commonjs/funcs/aiAIChat.js.map +1 -0
  12. package/dist/commonjs/funcs/authenticationAuthSignin.d.ts +14 -0
  13. package/dist/commonjs/funcs/authenticationAuthSignin.d.ts.map +1 -0
  14. package/dist/commonjs/funcs/authenticationAuthSignin.js +111 -0
  15. package/dist/commonjs/funcs/authenticationAuthSignin.js.map +1 -0
  16. package/dist/commonjs/funcs/authenticationAuthSignup.d.ts +14 -0
  17. package/dist/commonjs/funcs/authenticationAuthSignup.d.ts.map +1 -0
  18. package/dist/commonjs/funcs/authenticationAuthSignup.js +111 -0
  19. package/dist/commonjs/funcs/authenticationAuthSignup.js.map +1 -0
  20. package/dist/commonjs/funcs/cacheCacheGet.d.ts +14 -0
  21. package/dist/commonjs/funcs/cacheCacheGet.d.ts.map +1 -0
  22. package/dist/commonjs/funcs/cacheCacheGet.js +111 -0
  23. package/dist/commonjs/funcs/cacheCacheGet.js.map +1 -0
  24. package/dist/commonjs/funcs/cacheCacheSet.d.ts +14 -0
  25. package/dist/commonjs/funcs/cacheCacheSet.d.ts.map +1 -0
  26. package/dist/commonjs/funcs/cacheCacheSet.js +111 -0
  27. package/dist/commonjs/funcs/cacheCacheSet.js.map +1 -0
  28. package/dist/commonjs/funcs/databaseDbQuery.d.ts +17 -0
  29. package/dist/commonjs/funcs/databaseDbQuery.d.ts.map +1 -0
  30. package/dist/commonjs/funcs/databaseDbQuery.js +114 -0
  31. package/dist/commonjs/funcs/databaseDbQuery.js.map +1 -0
  32. package/dist/commonjs/funcs/queueQueueEnqueue.d.ts +14 -0
  33. package/dist/commonjs/funcs/queueQueueEnqueue.d.ts.map +1 -0
  34. package/dist/commonjs/funcs/queueQueueEnqueue.js +111 -0
  35. package/dist/commonjs/funcs/queueQueueEnqueue.js.map +1 -0
  36. package/dist/commonjs/funcs/servicesServicesInvoke.d.ts +14 -0
  37. package/dist/commonjs/funcs/servicesServicesInvoke.d.ts.map +1 -0
  38. package/dist/commonjs/funcs/servicesServicesInvoke.js +111 -0
  39. package/dist/commonjs/funcs/servicesServicesInvoke.js.map +1 -0
  40. package/dist/commonjs/funcs/storageStorageUpload.d.ts +14 -0
  41. package/dist/commonjs/funcs/storageStorageUpload.d.ts.map +1 -0
  42. package/dist/commonjs/funcs/storageStorageUpload.js +132 -0
  43. package/dist/commonjs/funcs/storageStorageUpload.js.map +1 -0
  44. package/dist/commonjs/hooks/hooks.d.ts +24 -0
  45. package/dist/commonjs/hooks/hooks.d.ts.map +1 -0
  46. package/dist/commonjs/hooks/hooks.js +86 -0
  47. package/dist/commonjs/hooks/hooks.js.map +1 -0
  48. package/dist/commonjs/hooks/index.d.ts +3 -0
  49. package/dist/commonjs/hooks/index.d.ts.map +1 -0
  50. package/dist/commonjs/hooks/index.js +22 -0
  51. package/dist/commonjs/hooks/index.js.map +1 -0
  52. package/dist/commonjs/hooks/registration.d.ts +3 -0
  53. package/dist/commonjs/hooks/registration.d.ts.map +1 -0
  54. package/dist/commonjs/hooks/registration.js +15 -0
  55. package/dist/commonjs/hooks/registration.js.map +1 -0
  56. package/dist/commonjs/hooks/types.d.ts +80 -0
  57. package/dist/commonjs/hooks/types.d.ts.map +1 -0
  58. package/dist/commonjs/hooks/types.js +6 -0
  59. package/dist/commonjs/hooks/types.js.map +1 -0
  60. package/dist/commonjs/index.d.ts +6 -0
  61. package/dist/commonjs/index.d.ts.map +1 -0
  62. package/dist/commonjs/index.js +48 -0
  63. package/dist/commonjs/index.js.map +1 -0
  64. package/dist/commonjs/lib/base64.d.ts +10 -0
  65. package/dist/commonjs/lib/base64.d.ts.map +1 -0
  66. package/dist/commonjs/lib/base64.js +71 -0
  67. package/dist/commonjs/lib/base64.js.map +1 -0
  68. package/dist/commonjs/lib/config.d.ts +38 -0
  69. package/dist/commonjs/lib/config.d.ts.map +1 -0
  70. package/dist/commonjs/lib/config.js +42 -0
  71. package/dist/commonjs/lib/config.js.map +1 -0
  72. package/dist/commonjs/lib/dlv.d.ts +14 -0
  73. package/dist/commonjs/lib/dlv.d.ts.map +1 -0
  74. package/dist/commonjs/lib/dlv.js +49 -0
  75. package/dist/commonjs/lib/dlv.js.map +1 -0
  76. package/dist/commonjs/lib/encodings.d.ts +53 -0
  77. package/dist/commonjs/lib/encodings.d.ts.map +1 -0
  78. package/dist/commonjs/lib/encodings.js +379 -0
  79. package/dist/commonjs/lib/encodings.js.map +1 -0
  80. package/dist/commonjs/lib/files.d.ts +13 -0
  81. package/dist/commonjs/lib/files.d.ts.map +1 -0
  82. package/dist/commonjs/lib/files.js +77 -0
  83. package/dist/commonjs/lib/files.js.map +1 -0
  84. package/dist/commonjs/lib/http.d.ts +67 -0
  85. package/dist/commonjs/lib/http.d.ts.map +1 -0
  86. package/dist/commonjs/lib/http.js +217 -0
  87. package/dist/commonjs/lib/http.js.map +1 -0
  88. package/dist/commonjs/lib/is-plain-object.d.ts +2 -0
  89. package/dist/commonjs/lib/is-plain-object.d.ts.map +1 -0
  90. package/dist/commonjs/lib/is-plain-object.js +41 -0
  91. package/dist/commonjs/lib/is-plain-object.js.map +1 -0
  92. package/dist/commonjs/lib/logger.d.ts +6 -0
  93. package/dist/commonjs/lib/logger.d.ts.map +1 -0
  94. package/dist/commonjs/lib/logger.js +6 -0
  95. package/dist/commonjs/lib/logger.js.map +1 -0
  96. package/dist/commonjs/lib/matchers.d.ts +59 -0
  97. package/dist/commonjs/lib/matchers.d.ts.map +1 -0
  98. package/dist/commonjs/lib/matchers.js +218 -0
  99. package/dist/commonjs/lib/matchers.js.map +1 -0
  100. package/dist/commonjs/lib/primitives.d.ts +26 -0
  101. package/dist/commonjs/lib/primitives.d.ts.map +1 -0
  102. package/dist/commonjs/lib/primitives.js +111 -0
  103. package/dist/commonjs/lib/primitives.js.map +1 -0
  104. package/dist/commonjs/lib/retries.d.ts +38 -0
  105. package/dist/commonjs/lib/retries.d.ts.map +1 -0
  106. package/dist/commonjs/lib/retries.js +153 -0
  107. package/dist/commonjs/lib/retries.js.map +1 -0
  108. package/dist/commonjs/lib/schemas.d.ts +19 -0
  109. package/dist/commonjs/lib/schemas.d.ts.map +1 -0
  110. package/dist/commonjs/lib/schemas.js +62 -0
  111. package/dist/commonjs/lib/schemas.js.map +1 -0
  112. package/dist/commonjs/lib/sdks.d.ts +63 -0
  113. package/dist/commonjs/lib/sdks.d.ts.map +1 -0
  114. package/dist/commonjs/lib/sdks.js +270 -0
  115. package/dist/commonjs/lib/sdks.js.map +1 -0
  116. package/dist/commonjs/lib/security.d.ts +83 -0
  117. package/dist/commonjs/lib/security.d.ts.map +1 -0
  118. package/dist/commonjs/lib/security.js +143 -0
  119. package/dist/commonjs/lib/security.js.map +1 -0
  120. package/dist/commonjs/lib/url.d.ts +5 -0
  121. package/dist/commonjs/lib/url.d.ts.map +1 -0
  122. package/dist/commonjs/lib/url.js +25 -0
  123. package/dist/commonjs/lib/url.js.map +1 -0
  124. package/dist/commonjs/package.json +3 -0
  125. package/dist/commonjs/sdk/ai.d.ts +9 -0
  126. package/dist/commonjs/sdk/ai.d.ts.map +1 -0
  127. package/dist/commonjs/sdk/ai.js +19 -0
  128. package/dist/commonjs/sdk/ai.js.map +1 -0
  129. package/dist/commonjs/sdk/authentication.d.ts +13 -0
  130. package/dist/commonjs/sdk/authentication.d.ts.map +1 -0
  131. package/dist/commonjs/sdk/authentication.js +26 -0
  132. package/dist/commonjs/sdk/authentication.js.map +1 -0
  133. package/dist/commonjs/sdk/cache.d.ts +13 -0
  134. package/dist/commonjs/sdk/cache.d.ts.map +1 -0
  135. package/dist/commonjs/sdk/cache.js +26 -0
  136. package/dist/commonjs/sdk/cache.js.map +1 -0
  137. package/dist/commonjs/sdk/database.d.ts +12 -0
  138. package/dist/commonjs/sdk/database.d.ts.map +1 -0
  139. package/dist/commonjs/sdk/database.js +22 -0
  140. package/dist/commonjs/sdk/database.js.map +1 -0
  141. package/dist/commonjs/sdk/index.d.ts +2 -0
  142. package/dist/commonjs/sdk/index.d.ts.map +1 -0
  143. package/dist/commonjs/sdk/index.js +21 -0
  144. package/dist/commonjs/sdk/index.js.map +1 -0
  145. package/dist/commonjs/sdk/models/errors/httpclienterrors.d.ts +44 -0
  146. package/dist/commonjs/sdk/models/errors/httpclienterrors.d.ts.map +1 -0
  147. package/dist/commonjs/sdk/models/errors/httpclienterrors.js +78 -0
  148. package/dist/commonjs/sdk/models/errors/httpclienterrors.js.map +1 -0
  149. package/dist/commonjs/sdk/models/errors/index.d.ts +6 -0
  150. package/dist/commonjs/sdk/models/errors/index.d.ts.map +1 -0
  151. package/dist/commonjs/sdk/models/errors/index.js +25 -0
  152. package/dist/commonjs/sdk/models/errors/index.js.map +1 -0
  153. package/dist/commonjs/sdk/models/errors/responsevalidationerror.d.ts +26 -0
  154. package/dist/commonjs/sdk/models/errors/responsevalidationerror.d.ts.map +1 -0
  155. package/dist/commonjs/sdk/models/errors/responsevalidationerror.js +66 -0
  156. package/dist/commonjs/sdk/models/errors/responsevalidationerror.js.map +1 -0
  157. package/dist/commonjs/sdk/models/errors/sdkbaseerror.d.ts +19 -0
  158. package/dist/commonjs/sdk/models/errors/sdkbaseerror.d.ts.map +1 -0
  159. package/dist/commonjs/sdk/models/errors/sdkbaseerror.js +20 -0
  160. package/dist/commonjs/sdk/models/errors/sdkbaseerror.js.map +1 -0
  161. package/dist/commonjs/sdk/models/errors/sdkerror.d.ts +10 -0
  162. package/dist/commonjs/sdk/models/errors/sdkerror.d.ts.map +1 -0
  163. package/dist/commonjs/sdk/models/errors/sdkerror.js +34 -0
  164. package/dist/commonjs/sdk/models/errors/sdkerror.js.map +1 -0
  165. package/dist/commonjs/sdk/models/errors/sdkvalidationerror.d.ts +21 -0
  166. package/dist/commonjs/sdk/models/errors/sdkvalidationerror.d.ts.map +1 -0
  167. package/dist/commonjs/sdk/models/errors/sdkvalidationerror.js +129 -0
  168. package/dist/commonjs/sdk/models/errors/sdkvalidationerror.js.map +1 -0
  169. package/dist/commonjs/sdk/models/operations/aichat.d.ts +46 -0
  170. package/dist/commonjs/sdk/models/operations/aichat.d.ts.map +1 -0
  171. package/dist/commonjs/sdk/models/operations/aichat.js +75 -0
  172. package/dist/commonjs/sdk/models/operations/aichat.js.map +1 -0
  173. package/dist/commonjs/sdk/models/operations/authsignin.d.ts +21 -0
  174. package/dist/commonjs/sdk/models/operations/authsignin.d.ts.map +1 -0
  175. package/dist/commonjs/sdk/models/operations/authsignin.js +61 -0
  176. package/dist/commonjs/sdk/models/operations/authsignin.js.map +1 -0
  177. package/dist/commonjs/sdk/models/operations/authsignup.d.ts +29 -0
  178. package/dist/commonjs/sdk/models/operations/authsignup.d.ts.map +1 -0
  179. package/dist/commonjs/sdk/models/operations/authsignup.js +63 -0
  180. package/dist/commonjs/sdk/models/operations/authsignup.js.map +1 -0
  181. package/dist/commonjs/sdk/models/operations/cacheget.d.ts +24 -0
  182. package/dist/commonjs/sdk/models/operations/cacheget.d.ts.map +1 -0
  183. package/dist/commonjs/sdk/models/operations/cacheget.js +59 -0
  184. package/dist/commonjs/sdk/models/operations/cacheget.js.map +1 -0
  185. package/dist/commonjs/sdk/models/operations/cacheset.d.ts +30 -0
  186. package/dist/commonjs/sdk/models/operations/cacheset.d.ts.map +1 -0
  187. package/dist/commonjs/sdk/models/operations/cacheset.js +60 -0
  188. package/dist/commonjs/sdk/models/operations/cacheset.js.map +1 -0
  189. package/dist/commonjs/sdk/models/operations/dbquery.d.ts +27 -0
  190. package/dist/commonjs/sdk/models/operations/dbquery.d.ts.map +1 -0
  191. package/dist/commonjs/sdk/models/operations/dbquery.js +61 -0
  192. package/dist/commonjs/sdk/models/operations/dbquery.js.map +1 -0
  193. package/dist/commonjs/sdk/models/operations/index.d.ts +10 -0
  194. package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -0
  195. package/dist/commonjs/sdk/models/operations/index.js +29 -0
  196. package/dist/commonjs/sdk/models/operations/index.js.map +1 -0
  197. package/dist/commonjs/sdk/models/operations/queueenqueue.d.ts +35 -0
  198. package/dist/commonjs/sdk/models/operations/queueenqueue.d.ts.map +1 -0
  199. package/dist/commonjs/sdk/models/operations/queueenqueue.js +61 -0
  200. package/dist/commonjs/sdk/models/operations/queueenqueue.js.map +1 -0
  201. package/dist/commonjs/sdk/models/operations/servicesinvoke.d.ts +30 -0
  202. package/dist/commonjs/sdk/models/operations/servicesinvoke.d.ts.map +1 -0
  203. package/dist/commonjs/sdk/models/operations/servicesinvoke.js +60 -0
  204. package/dist/commonjs/sdk/models/operations/servicesinvoke.js.map +1 -0
  205. package/dist/commonjs/sdk/models/operations/storageupload.d.ts +42 -0
  206. package/dist/commonjs/sdk/models/operations/storageupload.d.ts.map +1 -0
  207. package/dist/commonjs/sdk/models/operations/storageupload.js +75 -0
  208. package/dist/commonjs/sdk/models/operations/storageupload.js.map +1 -0
  209. package/dist/commonjs/sdk/models/shared/authresponse.d.ts +16 -0
  210. package/dist/commonjs/sdk/models/shared/authresponse.d.ts.map +1 -0
  211. package/dist/commonjs/sdk/models/shared/authresponse.js +54 -0
  212. package/dist/commonjs/sdk/models/shared/authresponse.js.map +1 -0
  213. package/dist/commonjs/sdk/models/shared/dbqueryresult.d.ts +13 -0
  214. package/dist/commonjs/sdk/models/shared/dbqueryresult.d.ts.map +1 -0
  215. package/dist/commonjs/sdk/models/shared/dbqueryresult.js +51 -0
  216. package/dist/commonjs/sdk/models/shared/dbqueryresult.js.map +1 -0
  217. package/dist/commonjs/sdk/models/shared/errorresponse.d.ts +26 -0
  218. package/dist/commonjs/sdk/models/shared/errorresponse.d.ts.map +1 -0
  219. package/dist/commonjs/sdk/models/shared/errorresponse.js +62 -0
  220. package/dist/commonjs/sdk/models/shared/errorresponse.js.map +1 -0
  221. package/dist/commonjs/sdk/models/shared/index.d.ts +6 -0
  222. package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -0
  223. package/dist/commonjs/sdk/models/shared/index.js +25 -0
  224. package/dist/commonjs/sdk/models/shared/index.js.map +1 -0
  225. package/dist/commonjs/sdk/models/shared/security.d.ts +12 -0
  226. package/dist/commonjs/sdk/models/shared/security.d.ts.map +1 -0
  227. package/dist/commonjs/sdk/models/shared/security.js +54 -0
  228. package/dist/commonjs/sdk/models/shared/security.js.map +1 -0
  229. package/dist/commonjs/sdk/models/shared/user.d.ts +16 -0
  230. package/dist/commonjs/sdk/models/shared/user.d.ts.map +1 -0
  231. package/dist/commonjs/sdk/models/shared/user.js +56 -0
  232. package/dist/commonjs/sdk/models/shared/user.js.map +1 -0
  233. package/dist/commonjs/sdk/queue.d.ts +9 -0
  234. package/dist/commonjs/sdk/queue.d.ts.map +1 -0
  235. package/dist/commonjs/sdk/queue.js +19 -0
  236. package/dist/commonjs/sdk/queue.js.map +1 -0
  237. package/dist/commonjs/sdk/sdk.d.ts +25 -0
  238. package/dist/commonjs/sdk/sdk.d.ts.map +1 -0
  239. package/dist/commonjs/sdk/sdk.js +39 -0
  240. package/dist/commonjs/sdk/sdk.js.map +1 -0
  241. package/dist/commonjs/sdk/services.d.ts +9 -0
  242. package/dist/commonjs/sdk/services.d.ts.map +1 -0
  243. package/dist/commonjs/sdk/services.js +19 -0
  244. package/dist/commonjs/sdk/services.js.map +1 -0
  245. package/dist/commonjs/sdk/storage.d.ts +9 -0
  246. package/dist/commonjs/sdk/storage.d.ts.map +1 -0
  247. package/dist/commonjs/sdk/storage.js +19 -0
  248. package/dist/commonjs/sdk/storage.js.map +1 -0
  249. package/dist/commonjs/sdk/types/async.d.ts +23 -0
  250. package/dist/commonjs/sdk/types/async.d.ts.map +1 -0
  251. package/dist/commonjs/sdk/types/async.js +44 -0
  252. package/dist/commonjs/sdk/types/async.js.map +1 -0
  253. package/dist/commonjs/sdk/types/blobs.d.ts +4 -0
  254. package/dist/commonjs/sdk/types/blobs.d.ts.map +1 -0
  255. package/dist/commonjs/sdk/types/blobs.js +62 -0
  256. package/dist/commonjs/sdk/types/blobs.js.map +1 -0
  257. package/dist/commonjs/sdk/types/constdatetime.d.ts +3 -0
  258. package/dist/commonjs/sdk/types/constdatetime.d.ts.map +1 -0
  259. package/dist/commonjs/sdk/types/constdatetime.js +46 -0
  260. package/dist/commonjs/sdk/types/constdatetime.js.map +1 -0
  261. package/dist/commonjs/sdk/types/enums.d.ts +9 -0
  262. package/dist/commonjs/sdk/types/enums.d.ts.map +1 -0
  263. package/dist/commonjs/sdk/types/enums.js +66 -0
  264. package/dist/commonjs/sdk/types/enums.js.map +1 -0
  265. package/dist/commonjs/sdk/types/fp.d.ts +31 -0
  266. package/dist/commonjs/sdk/types/fp.d.ts.map +1 -0
  267. package/dist/commonjs/sdk/types/fp.js +37 -0
  268. package/dist/commonjs/sdk/types/fp.js.map +1 -0
  269. package/dist/commonjs/sdk/types/index.d.ts +8 -0
  270. package/dist/commonjs/sdk/types/index.d.ts.map +1 -0
  271. package/dist/commonjs/sdk/types/index.js +29 -0
  272. package/dist/commonjs/sdk/types/index.js.map +1 -0
  273. package/dist/commonjs/sdk/types/operations.d.ts +27 -0
  274. package/dist/commonjs/sdk/types/operations.d.ts.map +1 -0
  275. package/dist/commonjs/sdk/types/operations.js +83 -0
  276. package/dist/commonjs/sdk/types/operations.js.map +1 -0
  277. package/dist/commonjs/sdk/types/rfcdate.d.ts +21 -0
  278. package/dist/commonjs/sdk/types/rfcdate.d.ts.map +1 -0
  279. package/dist/commonjs/sdk/types/rfcdate.js +46 -0
  280. package/dist/commonjs/sdk/types/rfcdate.js.map +1 -0
  281. package/dist/commonjs/sdk/types/streams.d.ts +2 -0
  282. package/dist/commonjs/sdk/types/streams.d.ts.map +1 -0
  283. package/dist/commonjs/sdk/types/streams.js +18 -0
  284. package/dist/commonjs/sdk/types/streams.js.map +1 -0
  285. package/dist/commonjs/sdk/types/unrecognized.d.ts +16 -0
  286. package/dist/commonjs/sdk/types/unrecognized.d.ts.map +1 -0
  287. package/dist/commonjs/sdk/types/unrecognized.js +34 -0
  288. package/dist/commonjs/sdk/types/unrecognized.js.map +1 -0
  289. package/dist/esm/core.d.ts +10 -0
  290. package/dist/esm/core.d.ts.map +1 -0
  291. package/dist/esm/core.js +13 -0
  292. package/dist/esm/core.js.map +1 -0
  293. package/dist/esm/funcs/aiAIChat.d.ts +14 -0
  294. package/dist/esm/funcs/aiAIChat.d.ts.map +1 -0
  295. package/dist/esm/funcs/aiAIChat.js +75 -0
  296. package/dist/esm/funcs/aiAIChat.js.map +1 -0
  297. package/dist/esm/funcs/authenticationAuthSignin.d.ts +14 -0
  298. package/dist/esm/funcs/authenticationAuthSignin.d.ts.map +1 -0
  299. package/dist/esm/funcs/authenticationAuthSignin.js +75 -0
  300. package/dist/esm/funcs/authenticationAuthSignin.js.map +1 -0
  301. package/dist/esm/funcs/authenticationAuthSignup.d.ts +14 -0
  302. package/dist/esm/funcs/authenticationAuthSignup.d.ts.map +1 -0
  303. package/dist/esm/funcs/authenticationAuthSignup.js +75 -0
  304. package/dist/esm/funcs/authenticationAuthSignup.js.map +1 -0
  305. package/dist/esm/funcs/cacheCacheGet.d.ts +14 -0
  306. package/dist/esm/funcs/cacheCacheGet.d.ts.map +1 -0
  307. package/dist/esm/funcs/cacheCacheGet.js +75 -0
  308. package/dist/esm/funcs/cacheCacheGet.js.map +1 -0
  309. package/dist/esm/funcs/cacheCacheSet.d.ts +14 -0
  310. package/dist/esm/funcs/cacheCacheSet.d.ts.map +1 -0
  311. package/dist/esm/funcs/cacheCacheSet.js +75 -0
  312. package/dist/esm/funcs/cacheCacheSet.js.map +1 -0
  313. package/dist/esm/funcs/databaseDbQuery.d.ts +17 -0
  314. package/dist/esm/funcs/databaseDbQuery.d.ts.map +1 -0
  315. package/dist/esm/funcs/databaseDbQuery.js +78 -0
  316. package/dist/esm/funcs/databaseDbQuery.js.map +1 -0
  317. package/dist/esm/funcs/queueQueueEnqueue.d.ts +14 -0
  318. package/dist/esm/funcs/queueQueueEnqueue.d.ts.map +1 -0
  319. package/dist/esm/funcs/queueQueueEnqueue.js +75 -0
  320. package/dist/esm/funcs/queueQueueEnqueue.js.map +1 -0
  321. package/dist/esm/funcs/servicesServicesInvoke.d.ts +14 -0
  322. package/dist/esm/funcs/servicesServicesInvoke.d.ts.map +1 -0
  323. package/dist/esm/funcs/servicesServicesInvoke.js +75 -0
  324. package/dist/esm/funcs/servicesServicesInvoke.js.map +1 -0
  325. package/dist/esm/funcs/storageStorageUpload.d.ts +14 -0
  326. package/dist/esm/funcs/storageStorageUpload.d.ts.map +1 -0
  327. package/dist/esm/funcs/storageStorageUpload.js +96 -0
  328. package/dist/esm/funcs/storageStorageUpload.js.map +1 -0
  329. package/dist/esm/hooks/hooks.d.ts +24 -0
  330. package/dist/esm/hooks/hooks.d.ts.map +1 -0
  331. package/dist/esm/hooks/hooks.js +82 -0
  332. package/dist/esm/hooks/hooks.js.map +1 -0
  333. package/dist/esm/hooks/index.d.ts +3 -0
  334. package/dist/esm/hooks/index.d.ts.map +1 -0
  335. package/dist/esm/hooks/index.js +6 -0
  336. package/dist/esm/hooks/index.js.map +1 -0
  337. package/dist/esm/hooks/registration.d.ts +3 -0
  338. package/dist/esm/hooks/registration.d.ts.map +1 -0
  339. package/dist/esm/hooks/registration.js +12 -0
  340. package/dist/esm/hooks/registration.js.map +1 -0
  341. package/dist/esm/hooks/types.d.ts +80 -0
  342. package/dist/esm/hooks/types.d.ts.map +1 -0
  343. package/dist/esm/hooks/types.js +5 -0
  344. package/dist/esm/hooks/types.js.map +1 -0
  345. package/dist/esm/index.d.ts +6 -0
  346. package/dist/esm/index.d.ts.map +1 -0
  347. package/dist/esm/index.js +8 -0
  348. package/dist/esm/index.js.map +1 -0
  349. package/dist/esm/lib/base64.d.ts +10 -0
  350. package/dist/esm/lib/base64.d.ts.map +1 -0
  351. package/dist/esm/lib/base64.js +29 -0
  352. package/dist/esm/lib/base64.js.map +1 -0
  353. package/dist/esm/lib/config.d.ts +38 -0
  354. package/dist/esm/lib/config.d.ts.map +1 -0
  355. package/dist/esm/lib/config.js +38 -0
  356. package/dist/esm/lib/config.js.map +1 -0
  357. package/dist/esm/lib/dlv.d.ts +14 -0
  358. package/dist/esm/lib/dlv.d.ts.map +1 -0
  359. package/dist/esm/lib/dlv.js +46 -0
  360. package/dist/esm/lib/dlv.js.map +1 -0
  361. package/dist/esm/lib/encodings.d.ts +53 -0
  362. package/dist/esm/lib/encodings.d.ts.map +1 -0
  363. package/dist/esm/lib/encodings.js +365 -0
  364. package/dist/esm/lib/encodings.js.map +1 -0
  365. package/dist/esm/lib/files.d.ts +13 -0
  366. package/dist/esm/lib/files.d.ts.map +1 -0
  367. package/dist/esm/lib/files.js +73 -0
  368. package/dist/esm/lib/files.js.map +1 -0
  369. package/dist/esm/lib/http.d.ts +67 -0
  370. package/dist/esm/lib/http.d.ts.map +1 -0
  371. package/dist/esm/lib/http.js +207 -0
  372. package/dist/esm/lib/http.js.map +1 -0
  373. package/dist/esm/lib/is-plain-object.d.ts +2 -0
  374. package/dist/esm/lib/is-plain-object.d.ts.map +1 -0
  375. package/dist/esm/lib/is-plain-object.js +38 -0
  376. package/dist/esm/lib/is-plain-object.js.map +1 -0
  377. package/dist/esm/lib/logger.d.ts +6 -0
  378. package/dist/esm/lib/logger.d.ts.map +1 -0
  379. package/dist/esm/lib/logger.js +5 -0
  380. package/dist/esm/lib/logger.js.map +1 -0
  381. package/dist/esm/lib/matchers.d.ts +59 -0
  382. package/dist/esm/lib/matchers.d.ts.map +1 -0
  383. package/dist/esm/lib/matchers.js +199 -0
  384. package/dist/esm/lib/matchers.js.map +1 -0
  385. package/dist/esm/lib/primitives.d.ts +26 -0
  386. package/dist/esm/lib/primitives.d.ts.map +1 -0
  387. package/dist/esm/lib/primitives.js +103 -0
  388. package/dist/esm/lib/primitives.js.map +1 -0
  389. package/dist/esm/lib/retries.d.ts +38 -0
  390. package/dist/esm/lib/retries.d.ts.map +1 -0
  391. package/dist/esm/lib/retries.js +147 -0
  392. package/dist/esm/lib/retries.js.map +1 -0
  393. package/dist/esm/lib/schemas.d.ts +19 -0
  394. package/dist/esm/lib/schemas.d.ts.map +1 -0
  395. package/dist/esm/lib/schemas.js +57 -0
  396. package/dist/esm/lib/schemas.js.map +1 -0
  397. package/dist/esm/lib/sdks.d.ts +63 -0
  398. package/dist/esm/lib/sdks.d.ts.map +1 -0
  399. package/dist/esm/lib/sdks.js +266 -0
  400. package/dist/esm/lib/sdks.js.map +1 -0
  401. package/dist/esm/lib/security.d.ts +83 -0
  402. package/dist/esm/lib/security.d.ts.map +1 -0
  403. package/dist/esm/lib/security.js +136 -0
  404. package/dist/esm/lib/security.js.map +1 -0
  405. package/dist/esm/lib/url.d.ts +5 -0
  406. package/dist/esm/lib/url.d.ts.map +1 -0
  407. package/dist/esm/lib/url.js +22 -0
  408. package/dist/esm/lib/url.js.map +1 -0
  409. package/dist/esm/package.json +3 -0
  410. package/dist/esm/sdk/ai.d.ts +9 -0
  411. package/dist/esm/sdk/ai.d.ts.map +1 -0
  412. package/dist/esm/sdk/ai.js +15 -0
  413. package/dist/esm/sdk/ai.js.map +1 -0
  414. package/dist/esm/sdk/authentication.d.ts +13 -0
  415. package/dist/esm/sdk/authentication.d.ts.map +1 -0
  416. package/dist/esm/sdk/authentication.js +22 -0
  417. package/dist/esm/sdk/authentication.js.map +1 -0
  418. package/dist/esm/sdk/cache.d.ts +13 -0
  419. package/dist/esm/sdk/cache.d.ts.map +1 -0
  420. package/dist/esm/sdk/cache.js +22 -0
  421. package/dist/esm/sdk/cache.js.map +1 -0
  422. package/dist/esm/sdk/database.d.ts +12 -0
  423. package/dist/esm/sdk/database.d.ts.map +1 -0
  424. package/dist/esm/sdk/database.js +18 -0
  425. package/dist/esm/sdk/database.js.map +1 -0
  426. package/dist/esm/sdk/index.d.ts +2 -0
  427. package/dist/esm/sdk/index.d.ts.map +1 -0
  428. package/dist/esm/sdk/index.js +5 -0
  429. package/dist/esm/sdk/index.js.map +1 -0
  430. package/dist/esm/sdk/models/errors/httpclienterrors.d.ts +44 -0
  431. package/dist/esm/sdk/models/errors/httpclienterrors.d.ts.map +1 -0
  432. package/dist/esm/sdk/models/errors/httpclienterrors.js +69 -0
  433. package/dist/esm/sdk/models/errors/httpclienterrors.js.map +1 -0
  434. package/dist/esm/sdk/models/errors/index.d.ts +6 -0
  435. package/dist/esm/sdk/models/errors/index.d.ts.map +1 -0
  436. package/dist/esm/sdk/models/errors/index.js +9 -0
  437. package/dist/esm/sdk/models/errors/index.js.map +1 -0
  438. package/dist/esm/sdk/models/errors/responsevalidationerror.d.ts +26 -0
  439. package/dist/esm/sdk/models/errors/responsevalidationerror.d.ts.map +1 -0
  440. package/dist/esm/sdk/models/errors/responsevalidationerror.js +29 -0
  441. package/dist/esm/sdk/models/errors/responsevalidationerror.js.map +1 -0
  442. package/dist/esm/sdk/models/errors/sdkbaseerror.d.ts +19 -0
  443. package/dist/esm/sdk/models/errors/sdkbaseerror.d.ts.map +1 -0
  444. package/dist/esm/sdk/models/errors/sdkbaseerror.js +16 -0
  445. package/dist/esm/sdk/models/errors/sdkbaseerror.js.map +1 -0
  446. package/dist/esm/sdk/models/errors/sdkerror.d.ts +10 -0
  447. package/dist/esm/sdk/models/errors/sdkerror.d.ts.map +1 -0
  448. package/dist/esm/sdk/models/errors/sdkerror.js +30 -0
  449. package/dist/esm/sdk/models/errors/sdkerror.js.map +1 -0
  450. package/dist/esm/sdk/models/errors/sdkvalidationerror.d.ts +21 -0
  451. package/dist/esm/sdk/models/errors/sdkvalidationerror.d.ts.map +1 -0
  452. package/dist/esm/sdk/models/errors/sdkvalidationerror.js +91 -0
  453. package/dist/esm/sdk/models/errors/sdkvalidationerror.js.map +1 -0
  454. package/dist/esm/sdk/models/operations/aichat.d.ts +46 -0
  455. package/dist/esm/sdk/models/operations/aichat.d.ts.map +1 -0
  456. package/dist/esm/sdk/models/operations/aichat.js +36 -0
  457. package/dist/esm/sdk/models/operations/aichat.js.map +1 -0
  458. package/dist/esm/sdk/models/operations/authsignin.d.ts +21 -0
  459. package/dist/esm/sdk/models/operations/authsignin.d.ts.map +1 -0
  460. package/dist/esm/sdk/models/operations/authsignin.js +23 -0
  461. package/dist/esm/sdk/models/operations/authsignin.js.map +1 -0
  462. package/dist/esm/sdk/models/operations/authsignup.d.ts +29 -0
  463. package/dist/esm/sdk/models/operations/authsignup.d.ts.map +1 -0
  464. package/dist/esm/sdk/models/operations/authsignup.js +25 -0
  465. package/dist/esm/sdk/models/operations/authsignup.js.map +1 -0
  466. package/dist/esm/sdk/models/operations/cacheget.d.ts +24 -0
  467. package/dist/esm/sdk/models/operations/cacheget.d.ts.map +1 -0
  468. package/dist/esm/sdk/models/operations/cacheget.js +21 -0
  469. package/dist/esm/sdk/models/operations/cacheget.js.map +1 -0
  470. package/dist/esm/sdk/models/operations/cacheset.d.ts +30 -0
  471. package/dist/esm/sdk/models/operations/cacheset.d.ts.map +1 -0
  472. package/dist/esm/sdk/models/operations/cacheset.js +22 -0
  473. package/dist/esm/sdk/models/operations/cacheset.js.map +1 -0
  474. package/dist/esm/sdk/models/operations/dbquery.d.ts +27 -0
  475. package/dist/esm/sdk/models/operations/dbquery.d.ts.map +1 -0
  476. package/dist/esm/sdk/models/operations/dbquery.js +23 -0
  477. package/dist/esm/sdk/models/operations/dbquery.js.map +1 -0
  478. package/dist/esm/sdk/models/operations/index.d.ts +10 -0
  479. package/dist/esm/sdk/models/operations/index.d.ts.map +1 -0
  480. package/dist/esm/sdk/models/operations/index.js +13 -0
  481. package/dist/esm/sdk/models/operations/index.js.map +1 -0
  482. package/dist/esm/sdk/models/operations/queueenqueue.d.ts +35 -0
  483. package/dist/esm/sdk/models/operations/queueenqueue.d.ts.map +1 -0
  484. package/dist/esm/sdk/models/operations/queueenqueue.js +23 -0
  485. package/dist/esm/sdk/models/operations/queueenqueue.js.map +1 -0
  486. package/dist/esm/sdk/models/operations/servicesinvoke.d.ts +30 -0
  487. package/dist/esm/sdk/models/operations/servicesinvoke.d.ts.map +1 -0
  488. package/dist/esm/sdk/models/operations/servicesinvoke.js +22 -0
  489. package/dist/esm/sdk/models/operations/servicesinvoke.js.map +1 -0
  490. package/dist/esm/sdk/models/operations/storageupload.d.ts +42 -0
  491. package/dist/esm/sdk/models/operations/storageupload.d.ts.map +1 -0
  492. package/dist/esm/sdk/models/operations/storageupload.js +36 -0
  493. package/dist/esm/sdk/models/operations/storageupload.js.map +1 -0
  494. package/dist/esm/sdk/models/shared/authresponse.d.ts +16 -0
  495. package/dist/esm/sdk/models/shared/authresponse.d.ts.map +1 -0
  496. package/dist/esm/sdk/models/shared/authresponse.js +17 -0
  497. package/dist/esm/sdk/models/shared/authresponse.js.map +1 -0
  498. package/dist/esm/sdk/models/shared/dbqueryresult.d.ts +13 -0
  499. package/dist/esm/sdk/models/shared/dbqueryresult.d.ts.map +1 -0
  500. package/dist/esm/sdk/models/shared/dbqueryresult.js +14 -0
  501. package/dist/esm/sdk/models/shared/dbqueryresult.js.map +1 -0
  502. package/dist/esm/sdk/models/shared/errorresponse.d.ts +26 -0
  503. package/dist/esm/sdk/models/shared/errorresponse.d.ts.map +1 -0
  504. package/dist/esm/sdk/models/shared/errorresponse.js +25 -0
  505. package/dist/esm/sdk/models/shared/errorresponse.js.map +1 -0
  506. package/dist/esm/sdk/models/shared/index.d.ts +6 -0
  507. package/dist/esm/sdk/models/shared/index.d.ts.map +1 -0
  508. package/dist/esm/sdk/models/shared/index.js +9 -0
  509. package/dist/esm/sdk/models/shared/index.js.map +1 -0
  510. package/dist/esm/sdk/models/shared/security.d.ts +12 -0
  511. package/dist/esm/sdk/models/shared/security.d.ts.map +1 -0
  512. package/dist/esm/sdk/models/shared/security.js +17 -0
  513. package/dist/esm/sdk/models/shared/security.js.map +1 -0
  514. package/dist/esm/sdk/models/shared/user.d.ts +16 -0
  515. package/dist/esm/sdk/models/shared/user.d.ts.map +1 -0
  516. package/dist/esm/sdk/models/shared/user.js +19 -0
  517. package/dist/esm/sdk/models/shared/user.js.map +1 -0
  518. package/dist/esm/sdk/queue.d.ts +9 -0
  519. package/dist/esm/sdk/queue.d.ts.map +1 -0
  520. package/dist/esm/sdk/queue.js +15 -0
  521. package/dist/esm/sdk/queue.js.map +1 -0
  522. package/dist/esm/sdk/sdk.d.ts +25 -0
  523. package/dist/esm/sdk/sdk.d.ts.map +1 -0
  524. package/dist/esm/sdk/sdk.js +35 -0
  525. package/dist/esm/sdk/sdk.js.map +1 -0
  526. package/dist/esm/sdk/services.d.ts +9 -0
  527. package/dist/esm/sdk/services.d.ts.map +1 -0
  528. package/dist/esm/sdk/services.js +15 -0
  529. package/dist/esm/sdk/services.js.map +1 -0
  530. package/dist/esm/sdk/storage.d.ts +9 -0
  531. package/dist/esm/sdk/storage.d.ts.map +1 -0
  532. package/dist/esm/sdk/storage.js +15 -0
  533. package/dist/esm/sdk/storage.js.map +1 -0
  534. package/dist/esm/sdk/types/async.d.ts +23 -0
  535. package/dist/esm/sdk/types/async.d.ts.map +1 -0
  536. package/dist/esm/sdk/types/async.js +40 -0
  537. package/dist/esm/sdk/types/async.js.map +1 -0
  538. package/dist/esm/sdk/types/blobs.d.ts +4 -0
  539. package/dist/esm/sdk/types/blobs.d.ts.map +1 -0
  540. package/dist/esm/sdk/types/blobs.js +25 -0
  541. package/dist/esm/sdk/types/blobs.js.map +1 -0
  542. package/dist/esm/sdk/types/constdatetime.d.ts +3 -0
  543. package/dist/esm/sdk/types/constdatetime.d.ts.map +1 -0
  544. package/dist/esm/sdk/types/constdatetime.js +10 -0
  545. package/dist/esm/sdk/types/constdatetime.js.map +1 -0
  546. package/dist/esm/sdk/types/enums.d.ts +9 -0
  547. package/dist/esm/sdk/types/enums.d.ts.map +1 -0
  548. package/dist/esm/sdk/types/enums.js +27 -0
  549. package/dist/esm/sdk/types/enums.js.map +1 -0
  550. package/dist/esm/sdk/types/fp.d.ts +31 -0
  551. package/dist/esm/sdk/types/fp.d.ts.map +1 -0
  552. package/dist/esm/sdk/types/fp.js +31 -0
  553. package/dist/esm/sdk/types/fp.js.map +1 -0
  554. package/dist/esm/sdk/types/index.d.ts +8 -0
  555. package/dist/esm/sdk/types/index.d.ts.map +1 -0
  556. package/dist/esm/sdk/types/index.js +8 -0
  557. package/dist/esm/sdk/types/index.js.map +1 -0
  558. package/dist/esm/sdk/types/operations.d.ts +27 -0
  559. package/dist/esm/sdk/types/operations.d.ts.map +1 -0
  560. package/dist/esm/sdk/types/operations.js +77 -0
  561. package/dist/esm/sdk/types/operations.js.map +1 -0
  562. package/dist/esm/sdk/types/rfcdate.d.ts +21 -0
  563. package/dist/esm/sdk/types/rfcdate.d.ts.map +1 -0
  564. package/dist/esm/sdk/types/rfcdate.js +42 -0
  565. package/dist/esm/sdk/types/rfcdate.js.map +1 -0
  566. package/dist/esm/sdk/types/streams.d.ts +2 -0
  567. package/dist/esm/sdk/types/streams.d.ts.map +1 -0
  568. package/dist/esm/sdk/types/streams.js +15 -0
  569. package/dist/esm/sdk/types/streams.js.map +1 -0
  570. package/dist/esm/sdk/types/unrecognized.d.ts +16 -0
  571. package/dist/esm/sdk/types/unrecognized.d.ts.map +1 -0
  572. package/dist/esm/sdk/types/unrecognized.js +31 -0
  573. package/dist/esm/sdk/types/unrecognized.js.map +1 -0
  574. package/examples/aiAIChat.example.ts +31 -0
  575. package/examples/package.json +18 -0
  576. package/jsr.json +27 -0
  577. package/package.json +122 -0
  578. package/src/core.ts +13 -0
  579. package/src/funcs/aiAIChat.ts +155 -0
  580. package/src/funcs/authenticationAuthSignin.ts +156 -0
  581. package/src/funcs/authenticationAuthSignup.ts +156 -0
  582. package/src/funcs/cacheCacheGet.ts +155 -0
  583. package/src/funcs/cacheCacheSet.ts +155 -0
  584. package/src/funcs/databaseDbQuery.ts +160 -0
  585. package/src/funcs/queueQueueEnqueue.ts +155 -0
  586. package/src/funcs/servicesServicesInvoke.ts +155 -0
  587. package/src/funcs/storageStorageUpload.ts +183 -0
  588. package/src/hooks/hooks.ts +132 -0
  589. package/src/hooks/index.ts +6 -0
  590. package/src/hooks/registration.ts +14 -0
  591. package/src/hooks/types.ts +112 -0
  592. package/src/index.ts +9 -0
  593. package/src/lib/base64.ts +37 -0
  594. package/src/lib/config.ts +71 -0
  595. package/src/lib/dlv.ts +53 -0
  596. package/src/lib/encodings.ts +497 -0
  597. package/src/lib/files.ts +82 -0
  598. package/src/lib/http.ts +323 -0
  599. package/src/lib/is-plain-object.ts +43 -0
  600. package/src/lib/logger.ts +9 -0
  601. package/src/lib/matchers.ts +345 -0
  602. package/src/lib/primitives.ts +150 -0
  603. package/src/lib/retries.ts +218 -0
  604. package/src/lib/schemas.ts +91 -0
  605. package/src/lib/sdks.ts +403 -0
  606. package/src/lib/security.ts +263 -0
  607. package/src/lib/url.ts +33 -0
  608. package/src/sdk/ai.ts +24 -0
  609. package/src/sdk/authentication.ts +39 -0
  610. package/src/sdk/cache.ts +39 -0
  611. package/src/sdk/database.ts +27 -0
  612. package/src/sdk/index.ts +5 -0
  613. package/src/sdk/models/errors/httpclienterrors.ts +62 -0
  614. package/src/sdk/models/errors/index.ts +9 -0
  615. package/src/sdk/models/errors/responsevalidationerror.ts +50 -0
  616. package/src/sdk/models/errors/sdkbaseerror.ts +35 -0
  617. package/src/sdk/models/errors/sdkerror.ts +40 -0
  618. package/src/sdk/models/errors/sdkvalidationerror.ts +109 -0
  619. package/src/sdk/models/operations/aichat.ts +101 -0
  620. package/src/sdk/models/operations/authsignin.ts +60 -0
  621. package/src/sdk/models/operations/authsignup.ts +66 -0
  622. package/src/sdk/models/operations/cacheget.ts +62 -0
  623. package/src/sdk/models/operations/cacheset.ts +69 -0
  624. package/src/sdk/models/operations/dbquery.ts +66 -0
  625. package/src/sdk/models/operations/index.ts +13 -0
  626. package/src/sdk/models/operations/queueenqueue.ts +71 -0
  627. package/src/sdk/models/operations/servicesinvoke.ts +65 -0
  628. package/src/sdk/models/operations/storageupload.ts +100 -0
  629. package/src/sdk/models/shared/authresponse.ts +40 -0
  630. package/src/sdk/models/shared/dbqueryresult.ts +33 -0
  631. package/src/sdk/models/shared/errorresponse.ts +51 -0
  632. package/src/sdk/models/shared/index.ts +9 -0
  633. package/src/sdk/models/shared/security.ts +32 -0
  634. package/src/sdk/models/shared/user.ts +37 -0
  635. package/src/sdk/queue.ts +24 -0
  636. package/src/sdk/sdk.ts +49 -0
  637. package/src/sdk/services.ts +24 -0
  638. package/src/sdk/storage.ts +24 -0
  639. package/src/sdk/types/async.ts +68 -0
  640. package/src/sdk/types/blobs.ts +32 -0
  641. package/src/sdk/types/constdatetime.ts +15 -0
  642. package/src/sdk/types/enums.ts +45 -0
  643. package/src/sdk/types/fp.ts +50 -0
  644. package/src/sdk/types/index.ts +11 -0
  645. package/src/sdk/types/operations.ts +105 -0
  646. package/src/sdk/types/rfcdate.ts +54 -0
  647. package/src/sdk/types/streams.ts +21 -0
  648. package/src/sdk/types/unrecognized.ts +35 -0
  649. package/tsconfig.json +40 -0
package/FUNCTIONS.md ADDED
@@ -0,0 +1,92 @@
1
+ # Standalone Functions
2
+
3
+ > [!NOTE]
4
+ > This section is useful if you are using a bundler and targetting browsers and
5
+ > runtimes where the size of an application affects performance and load times.
6
+
7
+ Every method in this SDK is also available as a standalone function. This
8
+ alternative API is suitable when targetting the browser or serverless runtimes
9
+ and using a bundler to build your application since all unused functionality
10
+ will be tree-shaken away. This includes code for unused methods, Zod schemas,
11
+ encoding helpers and response handlers. The result is dramatically smaller
12
+ impact on the application's final bundle size which grows very slowly as you use
13
+ more and more functionality from this SDK.
14
+
15
+ Calling methods through the main SDK class remains a valid and generally more
16
+ more ergonomic option. Standalone functions represent an optimisation for a
17
+ specific category of applications.
18
+
19
+ ## Example
20
+
21
+ ```typescript
22
+ import { SDKCore } from "@aerostack/sdk-node/core.js";
23
+ import { aiAIChat } from "@aerostack/sdk-node/funcs/aiAIChat.js";
24
+
25
+ // Use `SDKCore` for best tree-shaking performance.
26
+ // You can create one instance of it to use across an application.
27
+ const sdk = new SDKCore({
28
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
29
+ });
30
+
31
+ async function run() {
32
+ const res = await aiAIChat(sdk, {
33
+ messages: [
34
+ {},
35
+ ],
36
+ model: "@cf/meta/llama-3-8b-instruct",
37
+ });
38
+ if (res.ok) {
39
+ const { value: result } = res;
40
+ console.log(result);
41
+ } else {
42
+ console.log("aiAIChat failed:", res.error);
43
+ }
44
+ }
45
+
46
+ run();
47
+ ```
48
+
49
+ ## Result types
50
+
51
+ Standalone functions differ from SDK methods in that they return a
52
+ `Result<Value, Error>` type to capture _known errors_ and document them using
53
+ the type system. By avoiding throwing errors, application code maintains clear
54
+ control flow and error-handling become part of the regular flow of application
55
+ code.
56
+
57
+ > We use the term "known errors" because standalone functions, and JavaScript
58
+ > code in general, can still throw unexpected errors such as `TypeError`s,
59
+ > `RangeError`s and `DOMException`s. Exhaustively catching all errors may be
60
+ > something this SDK addresses in the future. Nevertheless, there is still a lot
61
+ > of benefit from capturing most errors and turning them into values.
62
+
63
+ The second reason for this style of programming is because these functions will
64
+ typically be used in front-end applications where exception throwing is
65
+ sometimes discouraged or considered unidiomatic. React and similar ecosystems
66
+ and libraries tend to promote this style of programming so that components
67
+ render useful content under all states (loading, success, error and so on).
68
+
69
+ The general pattern when calling standalone functions looks like this:
70
+
71
+ ```typescript
72
+ import { Core } from "<sdk-package-name>";
73
+ import { fetchSomething } from "<sdk-package-name>/funcs/fetchSomething.js";
74
+
75
+ const client = new Core();
76
+
77
+ async function run() {
78
+ const result = await fetchSomething(client, { id: "123" });
79
+ if (!result.ok) {
80
+ // You can throw the error or handle it. It's your choice now.
81
+ throw result.error;
82
+ }
83
+
84
+ console.log(result.value);
85
+ }
86
+
87
+ run();
88
+ ```
89
+
90
+ Notably, `result.error` above will have an explicit type compared to a try-catch
91
+ variation where the error in the catch block can only be of type `unknown` (or
92
+ `any` depending on your TypeScript settings).
package/README.md ADDED
@@ -0,0 +1,542 @@
1
+ # @aerostack/sdk-node
2
+
3
+ Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@aerostack/sdk-node* API.
4
+
5
+ [![Built by Speakeasy](https://img.shields.io/badge/Built_by-SPEAKEASY-374151?style=for-the-badge&labelColor=f3f4f6)](https://www.speakeasy.com/?utm_source=@aerostack/sdk-node&utm_campaign=typescript)
6
+ [![License: MIT](https://img.shields.io/badge/LICENSE_//_MIT-3b5bdb?style=for-the-badge&labelColor=eff6ff)](https://opensource.org/licenses/MIT)
7
+
8
+
9
+ <br /><br />
10
+ > [!IMPORTANT]
11
+ > This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your [workspace](https://app.speakeasy.com/org/aerostack/aerostack). Delete this section before > publishing to a package manager.
12
+
13
+ <!-- Start Summary [summary] -->
14
+ ## Summary
15
+
16
+ Aerostack API: Aerostack Platform API - Unified access to database, authentication,
17
+ caching, queues, storage, and AI services.
18
+ <!-- End Summary [summary] -->
19
+
20
+ <!-- Start Table of Contents [toc] -->
21
+ ## Table of Contents
22
+ <!-- $toc-max-depth=2 -->
23
+ * [@aerostack/sdk-node](#aerostacksdk-node)
24
+ * [SDK Installation](#sdk-installation)
25
+ * [Requirements](#requirements)
26
+ * [SDK Example Usage](#sdk-example-usage)
27
+ * [Authentication](#authentication)
28
+ * [Available Resources and Operations](#available-resources-and-operations)
29
+ * [Standalone functions](#standalone-functions)
30
+ * [File uploads](#file-uploads)
31
+ * [Retries](#retries)
32
+ * [Error Handling](#error-handling)
33
+ * [Server Selection](#server-selection)
34
+ * [Custom HTTP Client](#custom-http-client)
35
+ * [Debugging](#debugging)
36
+ * [Development](#development)
37
+ * [Maturity](#maturity)
38
+ * [Contributions](#contributions)
39
+
40
+ <!-- End Table of Contents [toc] -->
41
+
42
+ <!-- Start SDK Installation [installation] -->
43
+ ## SDK Installation
44
+
45
+ > [!TIP]
46
+ > To finish publishing your SDK to npm and others you must [run your first generation action](https://www.speakeasy.com/docs/github-setup#step-by-step-guide).
47
+
48
+
49
+ The SDK can be installed with either [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/), [bun](https://bun.sh/) or [yarn](https://classic.yarnpkg.com/en/) package managers.
50
+
51
+ ### NPM
52
+
53
+ ```bash
54
+ npm add <UNSET>
55
+ ```
56
+
57
+ ### PNPM
58
+
59
+ ```bash
60
+ pnpm add <UNSET>
61
+ ```
62
+
63
+ ### Bun
64
+
65
+ ```bash
66
+ bun add <UNSET>
67
+ ```
68
+
69
+ ### Yarn
70
+
71
+ ```bash
72
+ yarn add <UNSET>
73
+ ```
74
+
75
+ > [!NOTE]
76
+ > This package is published with CommonJS and ES Modules (ESM) support.
77
+ <!-- End SDK Installation [installation] -->
78
+
79
+ <!-- Start Requirements [requirements] -->
80
+ ## Requirements
81
+
82
+ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
83
+ <!-- End Requirements [requirements] -->
84
+
85
+ <!-- Start SDK Example Usage [usage] -->
86
+ ## SDK Example Usage
87
+
88
+ ### Example
89
+
90
+ ```typescript
91
+ import { SDK } from "@aerostack/sdk-node";
92
+
93
+ const sdk = new SDK({
94
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
95
+ });
96
+
97
+ async function run() {
98
+ const result = await sdk.ai.aiChat({
99
+ messages: [
100
+ {},
101
+ ],
102
+ model: "@cf/meta/llama-3-8b-instruct",
103
+ });
104
+
105
+ console.log(result);
106
+ }
107
+
108
+ run();
109
+
110
+ ```
111
+ <!-- End SDK Example Usage [usage] -->
112
+
113
+ <!-- Start Authentication [security] -->
114
+ ## Authentication
115
+
116
+ ### Per-Client Security Schemes
117
+
118
+ This SDK supports the following security scheme globally:
119
+
120
+ | Name | Type | Scheme |
121
+ | ------------ | ------ | ------- |
122
+ | `apiKeyAuth` | apiKey | API key |
123
+
124
+ To authenticate with the API the `apiKeyAuth` parameter must be set when initializing the SDK client instance. For example:
125
+ ```typescript
126
+ import { SDK } from "@aerostack/sdk-node";
127
+
128
+ const sdk = new SDK({
129
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
130
+ });
131
+
132
+ async function run() {
133
+ const result = await sdk.ai.aiChat({
134
+ messages: [
135
+ {},
136
+ ],
137
+ model: "@cf/meta/llama-3-8b-instruct",
138
+ });
139
+
140
+ console.log(result);
141
+ }
142
+
143
+ run();
144
+
145
+ ```
146
+ <!-- End Authentication [security] -->
147
+
148
+ <!-- Start Available Resources and Operations [operations] -->
149
+ ## Available Resources and Operations
150
+
151
+ <details open>
152
+ <summary>Available methods</summary>
153
+
154
+ ### [Ai](docs/sdks/ai/README.md)
155
+
156
+ * [aiChat](docs/sdks/ai/README.md#aichat) - Generate AI chat completion
157
+
158
+ ### [Authentication](docs/sdks/authentication/README.md)
159
+
160
+ * [authSignin](docs/sdks/authentication/README.md#authsignin) - Sign in user
161
+ * [authSignup](docs/sdks/authentication/README.md#authsignup) - Sign up new user
162
+
163
+ ### [Cache](docs/sdks/cache/README.md)
164
+
165
+ * [cacheGet](docs/sdks/cache/README.md#cacheget) - Get cached value
166
+ * [cacheSet](docs/sdks/cache/README.md#cacheset) - Set cached value
167
+
168
+ ### [Database](docs/sdks/database/README.md)
169
+
170
+ * [dbQuery](docs/sdks/database/README.md#dbquery) - Execute SQL query
171
+
172
+ ### [Queue](docs/sdks/queue/README.md)
173
+
174
+ * [queueEnqueue](docs/sdks/queue/README.md#queueenqueue) - Add job to queue
175
+
176
+ ### [Services](docs/sdks/services/README.md)
177
+
178
+ * [servicesInvoke](docs/sdks/services/README.md#servicesinvoke) - Invoke another service
179
+
180
+ ### [Storage](docs/sdks/storage/README.md)
181
+
182
+ * [storageUpload](docs/sdks/storage/README.md#storageupload) - Upload file to storage
183
+
184
+ </details>
185
+ <!-- End Available Resources and Operations [operations] -->
186
+
187
+ <!-- Start Standalone functions [standalone-funcs] -->
188
+ ## Standalone functions
189
+
190
+ All the methods listed above are available as standalone functions. These
191
+ functions are ideal for use in applications running in the browser, serverless
192
+ runtimes or other environments where application bundle size is a primary
193
+ concern. When using a bundler to build your application, all unused
194
+ functionality will be either excluded from the final bundle or tree-shaken away.
195
+
196
+ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
197
+
198
+ <details>
199
+
200
+ <summary>Available standalone functions</summary>
201
+
202
+ - [`aiAIChat`](docs/sdks/ai/README.md#aichat) - Generate AI chat completion
203
+ - [`authenticationAuthSignin`](docs/sdks/authentication/README.md#authsignin) - Sign in user
204
+ - [`authenticationAuthSignup`](docs/sdks/authentication/README.md#authsignup) - Sign up new user
205
+ - [`cacheCacheGet`](docs/sdks/cache/README.md#cacheget) - Get cached value
206
+ - [`cacheCacheSet`](docs/sdks/cache/README.md#cacheset) - Set cached value
207
+ - [`databaseDbQuery`](docs/sdks/database/README.md#dbquery) - Execute SQL query
208
+ - [`queueQueueEnqueue`](docs/sdks/queue/README.md#queueenqueue) - Add job to queue
209
+ - [`servicesServicesInvoke`](docs/sdks/services/README.md#servicesinvoke) - Invoke another service
210
+ - [`storageStorageUpload`](docs/sdks/storage/README.md#storageupload) - Upload file to storage
211
+
212
+ </details>
213
+ <!-- End Standalone functions [standalone-funcs] -->
214
+
215
+ <!-- Start File uploads [file-upload] -->
216
+ ## File uploads
217
+
218
+ Certain SDK methods accept files as part of a multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.
219
+
220
+ > [!TIP]
221
+ >
222
+ > Depending on your JavaScript runtime, there are convenient utilities that return a handle to a file without reading the entire contents into memory:
223
+ >
224
+ > - **Node.js v20+:** Since v20, Node.js comes with a native `openAsBlob` function in [`node:fs`](https://nodejs.org/docs/latest-v20.x/api/fs.html#fsopenasblobpath-options).
225
+ > - **Bun:** The native [`Bun.file`](https://bun.sh/docs/api/file-io#reading-files-bun-file) function produces a file handle that can be used for streaming file uploads.
226
+ > - **Browsers:** All supported browsers return an instance to a [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) when reading the value from an `<input type="file">` element.
227
+ > - **Node.js v18:** A file stream can be created using the `fileFrom` helper from [`fetch-blob/from.js`](https://www.npmjs.com/package/fetch-blob).
228
+
229
+ ```typescript
230
+ import { SDK } from "@aerostack/sdk-node";
231
+ import { openAsBlob } from "node:fs";
232
+
233
+ const sdk = new SDK({
234
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
235
+ });
236
+
237
+ async function run() {
238
+ const result = await sdk.storage.storageUpload({
239
+ contentType: "image/jpeg",
240
+ file: await openAsBlob("example.file"),
241
+ key: "avatars/user-123.jpg",
242
+ });
243
+
244
+ console.log(result);
245
+ }
246
+
247
+ run();
248
+
249
+ ```
250
+ <!-- End File uploads [file-upload] -->
251
+
252
+ <!-- Start Retries [retries] -->
253
+ ## Retries
254
+
255
+ Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
256
+
257
+ To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
258
+ ```typescript
259
+ import { SDK } from "@aerostack/sdk-node";
260
+
261
+ const sdk = new SDK({
262
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
263
+ });
264
+
265
+ async function run() {
266
+ const result = await sdk.ai.aiChat({
267
+ messages: [
268
+ {},
269
+ ],
270
+ model: "@cf/meta/llama-3-8b-instruct",
271
+ }, {
272
+ retries: {
273
+ strategy: "backoff",
274
+ backoff: {
275
+ initialInterval: 1,
276
+ maxInterval: 50,
277
+ exponent: 1.1,
278
+ maxElapsedTime: 100,
279
+ },
280
+ retryConnectionErrors: false,
281
+ },
282
+ });
283
+
284
+ console.log(result);
285
+ }
286
+
287
+ run();
288
+
289
+ ```
290
+
291
+ If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
292
+ ```typescript
293
+ import { SDK } from "@aerostack/sdk-node";
294
+
295
+ const sdk = new SDK({
296
+ retryConfig: {
297
+ strategy: "backoff",
298
+ backoff: {
299
+ initialInterval: 1,
300
+ maxInterval: 50,
301
+ exponent: 1.1,
302
+ maxElapsedTime: 100,
303
+ },
304
+ retryConnectionErrors: false,
305
+ },
306
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
307
+ });
308
+
309
+ async function run() {
310
+ const result = await sdk.ai.aiChat({
311
+ messages: [
312
+ {},
313
+ ],
314
+ model: "@cf/meta/llama-3-8b-instruct",
315
+ });
316
+
317
+ console.log(result);
318
+ }
319
+
320
+ run();
321
+
322
+ ```
323
+ <!-- End Retries [retries] -->
324
+
325
+ <!-- Start Error Handling [errors] -->
326
+ ## Error Handling
327
+
328
+ [`SDKBaseError`](./src/sdk/models/errors/sdkbaseerror.ts) is the base class for all HTTP error responses. It has the following properties:
329
+
330
+ | Property | Type | Description |
331
+ | ------------------- | ---------- | ------------------------------------------------------ |
332
+ | `error.message` | `string` | Error message |
333
+ | `error.statusCode` | `number` | HTTP response status code eg `404` |
334
+ | `error.headers` | `Headers` | HTTP response headers |
335
+ | `error.body` | `string` | HTTP body. Can be empty string if no body is returned. |
336
+ | `error.rawResponse` | `Response` | Raw HTTP response |
337
+
338
+ ### Example
339
+ ```typescript
340
+ import { SDK } from "@aerostack/sdk-node";
341
+ import * as errors from "@aerostack/sdk-node/sdk/models/errors";
342
+
343
+ const sdk = new SDK({
344
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
345
+ });
346
+
347
+ async function run() {
348
+ try {
349
+ const result = await sdk.ai.aiChat({
350
+ messages: [
351
+ {},
352
+ ],
353
+ model: "@cf/meta/llama-3-8b-instruct",
354
+ });
355
+
356
+ console.log(result);
357
+ } catch (error) {
358
+ if (error instanceof errors.SDKBaseError) {
359
+ console.log(error.message);
360
+ console.log(error.statusCode);
361
+ console.log(error.body);
362
+ console.log(error.headers);
363
+ }
364
+ }
365
+ }
366
+
367
+ run();
368
+
369
+ ```
370
+
371
+ ### Error Classes
372
+ **Primary error:**
373
+ * [`SDKBaseError`](./src/sdk/models/errors/sdkbaseerror.ts): The base class for HTTP error responses.
374
+
375
+ <details><summary>Less common errors (6)</summary>
376
+
377
+ <br />
378
+
379
+ **Network errors:**
380
+ * [`ConnectionError`](./src/sdk/models/errors/httpclienterrors.ts): HTTP client was unable to make a request to a server.
381
+ * [`RequestTimeoutError`](./src/sdk/models/errors/httpclienterrors.ts): HTTP request timed out due to an AbortSignal signal.
382
+ * [`RequestAbortedError`](./src/sdk/models/errors/httpclienterrors.ts): HTTP request was aborted by the client.
383
+ * [`InvalidRequestError`](./src/sdk/models/errors/httpclienterrors.ts): Any input used to create a request is invalid.
384
+ * [`UnexpectedClientError`](./src/sdk/models/errors/httpclienterrors.ts): Unrecognised or unexpected error.
385
+
386
+
387
+ **Inherit from [`SDKBaseError`](./src/sdk/models/errors/sdkbaseerror.ts)**:
388
+ * [`ResponseValidationError`](./src/sdk/models/errors/responsevalidationerror.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.
389
+
390
+ </details>
391
+ <!-- End Error Handling [errors] -->
392
+
393
+ <!-- Start Server Selection [server] -->
394
+ ## Server Selection
395
+
396
+ ### Select Server by Index
397
+
398
+ You can override the default server globally by passing a server index to the `serverIdx: number` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
399
+
400
+ | # | Server | Description |
401
+ | --- | ----------------------------- | ----------------- |
402
+ | 0 | `https://api.aerostack.ai/v1` | Production |
403
+ | 1 | `http://localhost:8787/v1` | Local Development |
404
+
405
+ #### Example
406
+
407
+ ```typescript
408
+ import { SDK } from "@aerostack/sdk-node";
409
+
410
+ const sdk = new SDK({
411
+ serverIdx: 0,
412
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
413
+ });
414
+
415
+ async function run() {
416
+ const result = await sdk.ai.aiChat({
417
+ messages: [
418
+ {},
419
+ ],
420
+ model: "@cf/meta/llama-3-8b-instruct",
421
+ });
422
+
423
+ console.log(result);
424
+ }
425
+
426
+ run();
427
+
428
+ ```
429
+
430
+ ### Override Server URL Per-Client
431
+
432
+ The default server can also be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example:
433
+ ```typescript
434
+ import { SDK } from "@aerostack/sdk-node";
435
+
436
+ const sdk = new SDK({
437
+ serverURL: "http://localhost:8787/v1",
438
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
439
+ });
440
+
441
+ async function run() {
442
+ const result = await sdk.ai.aiChat({
443
+ messages: [
444
+ {},
445
+ ],
446
+ model: "@cf/meta/llama-3-8b-instruct",
447
+ });
448
+
449
+ console.log(result);
450
+ }
451
+
452
+ run();
453
+
454
+ ```
455
+ <!-- End Server Selection [server] -->
456
+
457
+ <!-- Start Custom HTTP Client [http-client] -->
458
+ ## Custom HTTP Client
459
+
460
+ The TypeScript SDK makes API calls using an `HTTPClient` that wraps the native
461
+ [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This
462
+ client is a thin wrapper around `fetch` and provides the ability to attach hooks
463
+ around the request lifecycle that can be used to modify the request or handle
464
+ errors and response.
465
+
466
+ The `HTTPClient` constructor takes an optional `fetcher` argument that can be
467
+ used to integrate a third-party HTTP client or when writing tests to mock out
468
+ the HTTP client and feed in fixtures.
469
+
470
+ The following example shows how to:
471
+ - route requests through a proxy server using [undici](https://www.npmjs.com/package/undici)'s ProxyAgent
472
+ - use the `"beforeRequest"` hook to add a custom header and a timeout to requests
473
+ - use the `"requestError"` hook to log errors
474
+
475
+ ```typescript
476
+ import { SDK } from "@aerostack/sdk-node";
477
+ import { ProxyAgent } from "undici";
478
+ import { HTTPClient } from "@aerostack/sdk-node/lib/http";
479
+
480
+ const dispatcher = new ProxyAgent("http://proxy.example.com:8080");
481
+
482
+ const httpClient = new HTTPClient({
483
+ // 'fetcher' takes a function that has the same signature as native 'fetch'.
484
+ fetcher: (input, init) =>
485
+ // 'dispatcher' is specific to undici and not part of the standard Fetch API.
486
+ fetch(input, { ...init, dispatcher } as RequestInit),
487
+ });
488
+
489
+ httpClient.addHook("beforeRequest", (request) => {
490
+ const nextRequest = new Request(request, {
491
+ signal: request.signal || AbortSignal.timeout(5000)
492
+ });
493
+
494
+ nextRequest.headers.set("x-custom-header", "custom value");
495
+
496
+ return nextRequest;
497
+ });
498
+
499
+ httpClient.addHook("requestError", (error, request) => {
500
+ console.group("Request Error");
501
+ console.log("Reason:", `${error}`);
502
+ console.log("Endpoint:", `${request.method} ${request.url}`);
503
+ console.groupEnd();
504
+ });
505
+
506
+ const sdk = new SDK({ httpClient: httpClient });
507
+ ```
508
+ <!-- End Custom HTTP Client [http-client] -->
509
+
510
+ <!-- Start Debugging [debug] -->
511
+ ## Debugging
512
+
513
+ You can setup your SDK to emit debug logs for SDK requests and responses.
514
+
515
+ You can pass a logger that matches `console`'s interface as an SDK option.
516
+
517
+ > [!WARNING]
518
+ > Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.
519
+
520
+ ```typescript
521
+ import { SDK } from "@aerostack/sdk-node";
522
+
523
+ const sdk = new SDK({ debugLogger: console });
524
+ ```
525
+ <!-- End Debugging [debug] -->
526
+
527
+ <!-- Placeholder for Future Speakeasy SDK Sections -->
528
+
529
+ # Development
530
+
531
+ ## Maturity
532
+
533
+ This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
534
+ to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
535
+ looking for the latest version.
536
+
537
+ ## Contributions
538
+
539
+ While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
540
+ We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
541
+
542
+ ### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=@aerostack/sdk-node&utm_campaign=typescript)
package/RUNTIMES.md ADDED
@@ -0,0 +1,48 @@
1
+ # Supported JavaScript runtimes
2
+
3
+ This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features:
4
+
5
+ - [Web Fetch API][web-fetch]
6
+ - [Web Streams API][web-streams] and in particular `ReadableStream`
7
+ - [Async iterables][async-iter] using `Symbol.asyncIterator`
8
+
9
+ [web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
10
+ [web-streams]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API
11
+ [async-iter]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols
12
+
13
+ Runtime environments that are explicitly supported are:
14
+
15
+ - Evergreen browsers which include: Chrome, Safari, Edge, Firefox
16
+ - Node.js active and maintenance LTS releases
17
+ - Currently, this is v18 and v20
18
+ - Bun v1 and above
19
+ - Deno v1.39
20
+ - Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming])
21
+
22
+ [deno-file-streaming]: https://github.com/denoland/deno/issues/11018
23
+
24
+ ## Recommended TypeScript compiler options
25
+
26
+ The following `tsconfig.json` options are recommended for projects using this
27
+ SDK in order to get static type support for features like async iterables,
28
+ streams and `fetch`-related APIs ([`for await...of`][for-await-of],
29
+ [`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and
30
+ so on):
31
+
32
+ [for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
33
+ [abort-signal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
34
+ [request]: https://developer.mozilla.org/en-US/docs/Web/API/Request
35
+ [response]: https://developer.mozilla.org/en-US/docs/Web/API/Response
36
+
37
+ ```jsonc
38
+ {
39
+ "compilerOptions": {
40
+ "target": "es2020", // or higher
41
+ "lib": ["es2020", "dom", "dom.iterable"]
42
+ }
43
+ }
44
+ ```
45
+
46
+ While `target` can be set to older ECMAScript versions, it may result in extra,
47
+ unnecessary compatibility code being generated if you are not targeting old
48
+ runtimes.
@@ -0,0 +1,10 @@
1
+ import { ClientSDK } from "./lib/sdks.js";
2
+ /**
3
+ * A minimal client to use when calling standalone SDK functions. Typically, an
4
+ * instance of this class would be instantiated once at the start of an
5
+ * application and passed around through some dependency injection mechanism to
6
+ * parts of an application that need to make SDK calls.
7
+ */
8
+ export declare class SDKCore extends ClientSDK {
9
+ }
10
+ //# sourceMappingURL=core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/core.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C;;;;;GAKG;AACH,qBAAa,OAAQ,SAAQ,SAAS;CAAG"}