@athenaintel/sdk 4.3.309 → 4.3.310

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 (429) hide show
  1. package/README.md +117 -9
  2. package/dist/cjs/BaseClient.d.ts +14 -1
  3. package/dist/cjs/BaseClient.js +59 -0
  4. package/dist/cjs/Client.d.ts +24 -23
  5. package/dist/cjs/Client.js +10 -51
  6. package/dist/cjs/api/errors/BadRequestError.d.ts +1 -1
  7. package/dist/cjs/api/errors/ContentTooLargeError.d.ts +2 -2
  8. package/dist/cjs/api/errors/ForbiddenError.d.ts +1 -1
  9. package/dist/cjs/api/errors/InternalServerError.d.ts +1 -1
  10. package/dist/cjs/api/errors/NotFoundError.d.ts +1 -1
  11. package/dist/cjs/api/errors/NotImplementedError.d.ts +1 -1
  12. package/dist/cjs/api/errors/ServiceUnavailableError.d.ts +1 -1
  13. package/dist/cjs/api/errors/UnauthorizedError.d.ts +1 -1
  14. package/dist/cjs/api/errors/UnprocessableEntityError.d.ts +1 -1
  15. package/dist/cjs/api/errors/UnsupportedMediaTypeError.d.ts +2 -2
  16. package/dist/cjs/api/errors/index.d.ts +5 -5
  17. package/dist/cjs/api/errors/index.js +5 -5
  18. package/dist/cjs/api/index.d.ts +1 -1
  19. package/dist/cjs/api/index.js +1 -1
  20. package/dist/cjs/api/resources/agents/client/Client.d.ts +20 -20
  21. package/dist/cjs/api/resources/agents/client/Client.js +29 -26
  22. package/dist/cjs/api/resources/agents/client/index.d.ts +0 -1
  23. package/dist/cjs/api/resources/agents/client/requests/index.d.ts +1 -1
  24. package/dist/cjs/api/resources/agents/resources/drive/client/Client.d.ts +7 -7
  25. package/dist/cjs/api/resources/agents/resources/drive/client/Client.js +20 -17
  26. package/dist/cjs/api/resources/agents/resources/drive/client/index.d.ts +0 -1
  27. package/dist/cjs/api/resources/agents/resources/drive/client/requests/index.d.ts +1 -1
  28. package/dist/cjs/api/resources/agents/resources/general/client/Client.d.ts +11 -11
  29. package/dist/cjs/api/resources/agents/resources/general/client/Client.js +42 -23
  30. package/dist/cjs/api/resources/agents/resources/index.d.ts +3 -3
  31. package/dist/cjs/api/resources/agents/resources/index.js +6 -6
  32. package/dist/cjs/api/resources/agents/resources/research/client/Client.d.ts +7 -7
  33. package/dist/cjs/api/resources/agents/resources/research/client/Client.js +20 -17
  34. package/dist/cjs/api/resources/agents/resources/research/client/index.d.ts +0 -1
  35. package/dist/cjs/api/resources/agents/resources/research/client/requests/index.d.ts +1 -1
  36. package/dist/cjs/api/resources/agents/resources/sql/client/Client.d.ts +7 -7
  37. package/dist/cjs/api/resources/agents/resources/sql/client/Client.js +20 -17
  38. package/dist/cjs/api/resources/agents/resources/sql/client/index.d.ts +0 -1
  39. package/dist/cjs/api/resources/agents/resources/sql/client/requests/index.d.ts +1 -1
  40. package/dist/cjs/api/resources/aop/client/Client.d.ts +9 -9
  41. package/dist/cjs/api/resources/aop/client/Client.js +31 -20
  42. package/dist/cjs/api/resources/assets/client/Client.d.ts +14 -14
  43. package/dist/cjs/api/resources/assets/client/Client.js +62 -35
  44. package/dist/cjs/api/resources/assets/client/index.d.ts +0 -1
  45. package/dist/cjs/api/resources/assets/client/requests/CreateAssetRequestIn.d.ts +1 -1
  46. package/dist/cjs/api/resources/assets/client/requests/index.d.ts +3 -3
  47. package/dist/cjs/api/resources/databases/client/Client.d.ts +28 -28
  48. package/dist/cjs/api/resources/databases/client/Client.js +118 -75
  49. package/dist/cjs/api/resources/databases/client/index.d.ts +0 -1
  50. package/dist/cjs/api/resources/databases/client/requests/DatabasesDeleteRequest.d.ts +1 -1
  51. package/dist/cjs/api/resources/databases/client/requests/index.d.ts +4 -4
  52. package/dist/cjs/api/resources/index.d.ts +8 -8
  53. package/dist/cjs/api/resources/index.js +12 -12
  54. package/dist/cjs/api/resources/query/client/Client.d.ts +9 -9
  55. package/dist/cjs/api/resources/query/client/Client.js +34 -23
  56. package/dist/cjs/api/resources/query/client/index.d.ts +0 -1
  57. package/dist/cjs/api/resources/query/client/requests/QueryExecuteRequest.d.ts +1 -1
  58. package/dist/cjs/api/resources/query/client/requests/index.d.ts +2 -2
  59. package/dist/cjs/api/resources/query/index.d.ts +1 -1
  60. package/dist/cjs/api/resources/query/index.js +1 -1
  61. package/dist/cjs/api/resources/threads/client/Client.d.ts +8 -8
  62. package/dist/cjs/api/resources/threads/client/Client.js +25 -22
  63. package/dist/cjs/api/resources/tools/client/Client.d.ts +33 -33
  64. package/dist/cjs/api/resources/tools/client/Client.js +106 -55
  65. package/dist/cjs/api/resources/tools/client/index.d.ts +0 -1
  66. package/dist/cjs/api/resources/tools/client/requests/BodySaveAssetApiV0ToolsFileSavePost.d.ts +2 -2
  67. package/dist/cjs/api/resources/tools/client/requests/ToolsDataFrameRequest.d.ts +1 -1
  68. package/dist/cjs/api/resources/tools/client/requests/index.d.ts +7 -7
  69. package/dist/cjs/api/resources/tools/index.d.ts +1 -1
  70. package/dist/cjs/api/resources/tools/index.js +1 -1
  71. package/dist/cjs/api/resources/tools/resources/calendar/client/Client.d.ts +9 -9
  72. package/dist/cjs/api/resources/tools/resources/calendar/client/Client.js +30 -19
  73. package/dist/cjs/api/resources/tools/resources/email/client/Client.d.ts +11 -11
  74. package/dist/cjs/api/resources/tools/resources/email/client/Client.js +41 -22
  75. package/dist/cjs/api/resources/tools/resources/index.d.ts +3 -3
  76. package/dist/cjs/api/resources/tools/resources/index.js +3 -3
  77. package/dist/cjs/api/resources/tools/resources/sheets/client/Client.d.ts +39 -39
  78. package/dist/cjs/api/resources/tools/resources/sheets/client/Client.js +196 -65
  79. package/dist/cjs/api/resources/tools/resources/sheets/client/index.d.ts +0 -1
  80. package/dist/cjs/api/resources/tools/resources/sheets/client/requests/CreateNewSheetTabRequest.d.ts +1 -1
  81. package/dist/cjs/api/resources/tools/resources/sheets/client/requests/FormatSheetRangeRequest.d.ts +1 -1
  82. package/dist/cjs/api/resources/tools/resources/sheets/client/requests/InsertTableRowRequest.d.ts +1 -1
  83. package/dist/cjs/api/resources/tools/resources/sheets/client/requests/UpdateSheetRangeRequest.d.ts +1 -1
  84. package/dist/cjs/api/resources/tools/resources/sheets/client/requests/index.d.ts +17 -17
  85. package/dist/cjs/api/resources/tools/resources/structuredDataExtractor/client/Client.d.ts +7 -7
  86. package/dist/cjs/api/resources/tools/resources/structuredDataExtractor/client/Client.js +20 -17
  87. package/dist/cjs/api/resources/tools/resources/structuredDataExtractor/client/index.d.ts +0 -1
  88. package/dist/cjs/api/resources/tools/resources/structuredDataExtractor/client/requests/StructuredDataExtractorRequest.d.ts +1 -1
  89. package/dist/cjs/api/resources/tools/resources/structuredDataExtractor/client/requests/index.d.ts +1 -1
  90. package/dist/cjs/api/resources/tools/resources/tasks/client/Client.d.ts +7 -7
  91. package/dist/cjs/api/resources/tools/resources/tasks/client/Client.js +20 -17
  92. package/dist/cjs/api/resources/tools/resources/tasks/client/index.d.ts +0 -1
  93. package/dist/cjs/api/resources/tools/resources/tasks/client/requests/index.d.ts +1 -1
  94. package/dist/cjs/api/types/AopExecuteResponseOut.d.ts +1 -1
  95. package/dist/cjs/api/types/AssetNode.d.ts +1 -1
  96. package/dist/cjs/api/types/BorderModel.d.ts +1 -1
  97. package/dist/cjs/api/types/BordersModel.d.ts +1 -1
  98. package/dist/cjs/api/types/CellFormat.d.ts +1 -1
  99. package/dist/cjs/api/types/Chunk.d.ts +1 -1
  100. package/dist/cjs/api/types/ChunkContentItem.d.ts +1 -1
  101. package/dist/cjs/api/types/ConversationAssetInfo.d.ts +1 -1
  102. package/dist/cjs/api/types/ConversationMessage.d.ts +1 -1
  103. package/dist/cjs/api/types/ConversationResult.d.ts +1 -1
  104. package/dist/cjs/api/types/DatabaseTableSchemaResponse.d.ts +1 -1
  105. package/dist/cjs/api/types/DatabaseTablesResponse.d.ts +1 -1
  106. package/dist/cjs/api/types/FolderResponse.d.ts +1 -1
  107. package/dist/cjs/api/types/GeneralAgentRequest.d.ts +1 -1
  108. package/dist/cjs/api/types/GeneralAgentResponse.d.ts +1 -1
  109. package/dist/cjs/api/types/GeneralAgentResponseMessage.d.ts +1 -1
  110. package/dist/cjs/api/types/GeneralAgentResponseMessageKwargs.d.ts +1 -1
  111. package/dist/cjs/api/types/InputMessage.d.ts +1 -1
  112. package/dist/cjs/api/types/InputMessageContentItem.d.ts +1 -1
  113. package/dist/cjs/api/types/NumberFormatModel.d.ts +1 -1
  114. package/dist/cjs/api/types/PaginatedAssetsOut.d.ts +1 -1
  115. package/dist/cjs/api/types/Sheet.d.ts +1 -1
  116. package/dist/cjs/api/types/StructuredDataExtractorResponse.d.ts +1 -1
  117. package/dist/cjs/api/types/TextFormatModel.d.ts +1 -1
  118. package/dist/cjs/api/types/ThreadStatusResponseOut.d.ts +1 -1
  119. package/dist/cjs/api/types/index.d.ts +5 -5
  120. package/dist/cjs/api/types/index.js +5 -5
  121. package/dist/cjs/auth/HeaderAuthProvider.d.ts +14 -0
  122. package/dist/cjs/auth/HeaderAuthProvider.js +71 -0
  123. package/dist/cjs/auth/index.d.ts +1 -0
  124. package/dist/cjs/auth/index.js +5 -0
  125. package/dist/cjs/core/auth/AuthProvider.d.ts +7 -0
  126. package/dist/cjs/core/auth/AuthProvider.js +2 -0
  127. package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
  128. package/dist/cjs/core/auth/AuthRequest.js +2 -0
  129. package/dist/cjs/core/auth/BasicAuth.d.ts +8 -0
  130. package/dist/cjs/core/auth/BasicAuth.js +27 -0
  131. package/dist/cjs/core/auth/BearerToken.d.ts +7 -0
  132. package/dist/cjs/core/auth/BearerToken.js +16 -0
  133. package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
  134. package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
  135. package/dist/cjs/core/auth/index.d.ts +5 -0
  136. package/dist/cjs/core/auth/index.js +9 -0
  137. package/dist/cjs/core/base64.d.ts +2 -0
  138. package/dist/cjs/core/base64.js +26 -0
  139. package/dist/cjs/core/exports.d.ts +1 -0
  140. package/dist/cjs/core/exports.js +1 -0
  141. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +6 -7
  142. package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +1 -1
  143. package/dist/cjs/core/fetcher/Fetcher.d.ts +9 -2
  144. package/dist/cjs/core/fetcher/Fetcher.js +204 -9
  145. package/dist/cjs/core/fetcher/getErrorResponseBody.js +2 -1
  146. package/dist/cjs/core/fetcher/getRequestBody.d.ts +1 -1
  147. package/dist/cjs/core/fetcher/getRequestBody.js +4 -0
  148. package/dist/cjs/core/fetcher/getResponseBody.js +21 -7
  149. package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -1
  150. package/dist/cjs/core/fetcher/makeRequest.js +2 -4
  151. package/dist/cjs/core/fetcher/requestWithRetries.js +3 -12
  152. package/dist/cjs/core/fetcher/signals.d.ts +1 -7
  153. package/dist/cjs/core/fetcher/signals.js +0 -12
  154. package/dist/cjs/core/file/file.d.ts +5 -0
  155. package/dist/cjs/core/file/file.js +25 -7
  156. package/dist/cjs/core/form-data-utils/FormDataWrapper.d.ts +2 -3
  157. package/dist/cjs/core/form-data-utils/FormDataWrapper.js +62 -85
  158. package/dist/cjs/core/headers.js +6 -4
  159. package/dist/cjs/core/index.d.ts +5 -2
  160. package/dist/cjs/core/index.js +6 -3
  161. package/dist/cjs/core/logging/exports.d.ts +18 -0
  162. package/dist/cjs/core/logging/exports.js +45 -0
  163. package/dist/cjs/core/logging/index.d.ts +1 -0
  164. package/dist/cjs/core/logging/index.js +17 -0
  165. package/dist/cjs/core/logging/logger.d.ts +126 -0
  166. package/dist/cjs/core/logging/logger.js +144 -0
  167. package/dist/cjs/core/runtime/runtime.js +11 -10
  168. package/dist/cjs/core/url/encodePathParam.d.ts +1 -0
  169. package/dist/cjs/core/url/encodePathParam.js +21 -0
  170. package/dist/cjs/core/url/index.d.ts +1 -0
  171. package/dist/cjs/core/url/index.js +3 -1
  172. package/dist/cjs/core/url/join.js +3 -4
  173. package/dist/cjs/errors/AthenaIntelligenceError.d.ts +1 -1
  174. package/dist/cjs/errors/AthenaIntelligenceError.js +1 -1
  175. package/dist/cjs/index.d.ts +2 -2
  176. package/dist/cjs/index.js +4 -4
  177. package/dist/cjs/version.d.ts +1 -1
  178. package/dist/cjs/version.js +1 -1
  179. package/dist/esm/BaseClient.d.mts +14 -1
  180. package/dist/esm/BaseClient.mjs +23 -1
  181. package/dist/esm/Client.d.mts +24 -23
  182. package/dist/esm/Client.mjs +17 -26
  183. package/dist/esm/api/errors/BadRequestError.d.mts +1 -1
  184. package/dist/esm/api/errors/BadRequestError.mjs +0 -1
  185. package/dist/esm/api/errors/ContentTooLargeError.d.mts +2 -2
  186. package/dist/esm/api/errors/ContentTooLargeError.mjs +0 -2
  187. package/dist/esm/api/errors/ForbiddenError.d.mts +1 -1
  188. package/dist/esm/api/errors/ForbiddenError.mjs +0 -1
  189. package/dist/esm/api/errors/InternalServerError.d.mts +1 -1
  190. package/dist/esm/api/errors/InternalServerError.mjs +0 -1
  191. package/dist/esm/api/errors/NotFoundError.d.mts +1 -1
  192. package/dist/esm/api/errors/NotFoundError.mjs +0 -1
  193. package/dist/esm/api/errors/NotImplementedError.d.mts +1 -1
  194. package/dist/esm/api/errors/NotImplementedError.mjs +0 -1
  195. package/dist/esm/api/errors/ServiceUnavailableError.d.mts +1 -1
  196. package/dist/esm/api/errors/ServiceUnavailableError.mjs +0 -1
  197. package/dist/esm/api/errors/UnauthorizedError.d.mts +1 -1
  198. package/dist/esm/api/errors/UnauthorizedError.mjs +0 -1
  199. package/dist/esm/api/errors/UnprocessableEntityError.d.mts +1 -1
  200. package/dist/esm/api/errors/UnprocessableEntityError.mjs +0 -1
  201. package/dist/esm/api/errors/UnsupportedMediaTypeError.d.mts +2 -2
  202. package/dist/esm/api/errors/UnsupportedMediaTypeError.mjs +0 -2
  203. package/dist/esm/api/errors/index.d.mts +5 -5
  204. package/dist/esm/api/errors/index.mjs +5 -5
  205. package/dist/esm/api/index.d.mts +1 -1
  206. package/dist/esm/api/index.mjs +1 -1
  207. package/dist/esm/api/resources/agents/client/Client.d.mts +20 -20
  208. package/dist/esm/api/resources/agents/client/Client.mjs +31 -28
  209. package/dist/esm/api/resources/agents/client/index.d.mts +0 -1
  210. package/dist/esm/api/resources/agents/client/index.mjs +0 -1
  211. package/dist/esm/api/resources/agents/client/requests/index.d.mts +1 -1
  212. package/dist/esm/api/resources/agents/client/requests/index.mjs +1 -1
  213. package/dist/esm/api/resources/agents/resources/drive/client/Client.d.mts +7 -7
  214. package/dist/esm/api/resources/agents/resources/drive/client/Client.mjs +18 -15
  215. package/dist/esm/api/resources/agents/resources/drive/client/index.d.mts +0 -1
  216. package/dist/esm/api/resources/agents/resources/drive/client/index.mjs +0 -1
  217. package/dist/esm/api/resources/agents/resources/drive/client/requests/index.d.mts +1 -1
  218. package/dist/esm/api/resources/agents/resources/drive/client/requests/index.mjs +1 -1
  219. package/dist/esm/api/resources/agents/resources/general/client/Client.d.mts +11 -11
  220. package/dist/esm/api/resources/agents/resources/general/client/Client.mjs +40 -21
  221. package/dist/esm/api/resources/agents/resources/index.d.mts +3 -3
  222. package/dist/esm/api/resources/agents/resources/index.mjs +3 -3
  223. package/dist/esm/api/resources/agents/resources/research/client/Client.d.mts +7 -7
  224. package/dist/esm/api/resources/agents/resources/research/client/Client.mjs +18 -15
  225. package/dist/esm/api/resources/agents/resources/research/client/index.d.mts +0 -1
  226. package/dist/esm/api/resources/agents/resources/research/client/index.mjs +0 -1
  227. package/dist/esm/api/resources/agents/resources/research/client/requests/index.d.mts +1 -1
  228. package/dist/esm/api/resources/agents/resources/research/client/requests/index.mjs +1 -1
  229. package/dist/esm/api/resources/agents/resources/sql/client/Client.d.mts +7 -7
  230. package/dist/esm/api/resources/agents/resources/sql/client/Client.mjs +18 -15
  231. package/dist/esm/api/resources/agents/resources/sql/client/index.d.mts +0 -1
  232. package/dist/esm/api/resources/agents/resources/sql/client/index.mjs +0 -1
  233. package/dist/esm/api/resources/agents/resources/sql/client/requests/index.d.mts +1 -1
  234. package/dist/esm/api/resources/agents/resources/sql/client/requests/index.mjs +1 -1
  235. package/dist/esm/api/resources/aop/client/Client.d.mts +9 -9
  236. package/dist/esm/api/resources/aop/client/Client.mjs +29 -18
  237. package/dist/esm/api/resources/assets/client/Client.d.mts +14 -14
  238. package/dist/esm/api/resources/assets/client/Client.mjs +60 -33
  239. package/dist/esm/api/resources/assets/client/index.d.mts +0 -1
  240. package/dist/esm/api/resources/assets/client/index.mjs +0 -1
  241. package/dist/esm/api/resources/assets/client/requests/CreateAssetRequestIn.d.mts +1 -1
  242. package/dist/esm/api/resources/assets/client/requests/CreateAssetRequestIn.mjs +1 -1
  243. package/dist/esm/api/resources/assets/client/requests/index.d.mts +3 -3
  244. package/dist/esm/api/resources/assets/client/requests/index.mjs +1 -3
  245. package/dist/esm/api/resources/databases/client/Client.d.mts +28 -28
  246. package/dist/esm/api/resources/databases/client/Client.mjs +116 -73
  247. package/dist/esm/api/resources/databases/client/index.d.mts +0 -1
  248. package/dist/esm/api/resources/databases/client/index.mjs +0 -1
  249. package/dist/esm/api/resources/databases/client/requests/DatabasesDeleteRequest.d.mts +1 -1
  250. package/dist/esm/api/resources/databases/client/requests/DatabasesDeleteRequest.mjs +1 -1
  251. package/dist/esm/api/resources/databases/client/requests/index.d.mts +4 -4
  252. package/dist/esm/api/resources/databases/client/requests/index.mjs +1 -4
  253. package/dist/esm/api/resources/index.d.mts +8 -8
  254. package/dist/esm/api/resources/index.mjs +8 -8
  255. package/dist/esm/api/resources/query/client/Client.d.mts +9 -9
  256. package/dist/esm/api/resources/query/client/Client.mjs +32 -21
  257. package/dist/esm/api/resources/query/client/index.d.mts +0 -1
  258. package/dist/esm/api/resources/query/client/index.mjs +0 -1
  259. package/dist/esm/api/resources/query/client/requests/QueryExecuteRequest.d.mts +1 -1
  260. package/dist/esm/api/resources/query/client/requests/QueryExecuteRequest.mjs +1 -1
  261. package/dist/esm/api/resources/query/client/requests/index.d.mts +2 -2
  262. package/dist/esm/api/resources/query/client/requests/index.mjs +1 -2
  263. package/dist/esm/api/resources/query/index.d.mts +1 -1
  264. package/dist/esm/api/resources/query/index.mjs +1 -1
  265. package/dist/esm/api/resources/threads/client/Client.d.mts +8 -8
  266. package/dist/esm/api/resources/threads/client/Client.mjs +23 -20
  267. package/dist/esm/api/resources/tools/client/Client.d.mts +33 -33
  268. package/dist/esm/api/resources/tools/client/Client.mjs +109 -59
  269. package/dist/esm/api/resources/tools/client/index.d.mts +0 -1
  270. package/dist/esm/api/resources/tools/client/index.mjs +0 -1
  271. package/dist/esm/api/resources/tools/client/requests/BodySaveAssetApiV0ToolsFileSavePost.d.mts +2 -2
  272. package/dist/esm/api/resources/tools/client/requests/BodySaveAssetApiV0ToolsFileSavePost.mjs +1 -2
  273. package/dist/esm/api/resources/tools/client/requests/ToolsDataFrameRequest.d.mts +1 -1
  274. package/dist/esm/api/resources/tools/client/requests/ToolsDataFrameRequest.mjs +1 -1
  275. package/dist/esm/api/resources/tools/client/requests/index.d.mts +7 -7
  276. package/dist/esm/api/resources/tools/client/requests/index.mjs +1 -7
  277. package/dist/esm/api/resources/tools/index.d.mts +1 -1
  278. package/dist/esm/api/resources/tools/index.mjs +1 -1
  279. package/dist/esm/api/resources/tools/resources/calendar/client/Client.d.mts +9 -9
  280. package/dist/esm/api/resources/tools/resources/calendar/client/Client.mjs +28 -17
  281. package/dist/esm/api/resources/tools/resources/email/client/Client.d.mts +11 -11
  282. package/dist/esm/api/resources/tools/resources/email/client/Client.mjs +39 -20
  283. package/dist/esm/api/resources/tools/resources/index.d.mts +3 -3
  284. package/dist/esm/api/resources/tools/resources/index.mjs +3 -3
  285. package/dist/esm/api/resources/tools/resources/sheets/client/Client.d.mts +39 -39
  286. package/dist/esm/api/resources/tools/resources/sheets/client/Client.mjs +194 -63
  287. package/dist/esm/api/resources/tools/resources/sheets/client/index.d.mts +0 -1
  288. package/dist/esm/api/resources/tools/resources/sheets/client/index.mjs +0 -1
  289. package/dist/esm/api/resources/tools/resources/sheets/client/requests/CreateNewSheetTabRequest.d.mts +1 -1
  290. package/dist/esm/api/resources/tools/resources/sheets/client/requests/CreateNewSheetTabRequest.mjs +1 -1
  291. package/dist/esm/api/resources/tools/resources/sheets/client/requests/FormatSheetRangeRequest.d.mts +1 -1
  292. package/dist/esm/api/resources/tools/resources/sheets/client/requests/FormatSheetRangeRequest.mjs +1 -1
  293. package/dist/esm/api/resources/tools/resources/sheets/client/requests/InsertTableRowRequest.d.mts +1 -1
  294. package/dist/esm/api/resources/tools/resources/sheets/client/requests/InsertTableRowRequest.mjs +1 -1
  295. package/dist/esm/api/resources/tools/resources/sheets/client/requests/UpdateSheetRangeRequest.d.mts +1 -1
  296. package/dist/esm/api/resources/tools/resources/sheets/client/requests/UpdateSheetRangeRequest.mjs +1 -1
  297. package/dist/esm/api/resources/tools/resources/sheets/client/requests/index.d.mts +17 -17
  298. package/dist/esm/api/resources/tools/resources/sheets/client/requests/index.mjs +1 -17
  299. package/dist/esm/api/resources/tools/resources/structuredDataExtractor/client/Client.d.mts +7 -7
  300. package/dist/esm/api/resources/tools/resources/structuredDataExtractor/client/Client.mjs +18 -15
  301. package/dist/esm/api/resources/tools/resources/structuredDataExtractor/client/index.d.mts +0 -1
  302. package/dist/esm/api/resources/tools/resources/structuredDataExtractor/client/index.mjs +0 -1
  303. package/dist/esm/api/resources/tools/resources/structuredDataExtractor/client/requests/StructuredDataExtractorRequest.d.mts +1 -1
  304. package/dist/esm/api/resources/tools/resources/structuredDataExtractor/client/requests/StructuredDataExtractorRequest.mjs +1 -1
  305. package/dist/esm/api/resources/tools/resources/structuredDataExtractor/client/requests/index.d.mts +1 -1
  306. package/dist/esm/api/resources/tools/resources/structuredDataExtractor/client/requests/index.mjs +1 -1
  307. package/dist/esm/api/resources/tools/resources/tasks/client/Client.d.mts +7 -7
  308. package/dist/esm/api/resources/tools/resources/tasks/client/Client.mjs +18 -15
  309. package/dist/esm/api/resources/tools/resources/tasks/client/index.d.mts +0 -1
  310. package/dist/esm/api/resources/tools/resources/tasks/client/index.mjs +0 -1
  311. package/dist/esm/api/resources/tools/resources/tasks/client/requests/index.d.mts +1 -1
  312. package/dist/esm/api/resources/tools/resources/tasks/client/requests/index.mjs +1 -1
  313. package/dist/esm/api/types/AopExecuteResponseOut.d.mts +1 -1
  314. package/dist/esm/api/types/AopExecuteResponseOut.mjs +1 -1
  315. package/dist/esm/api/types/AssetNode.d.mts +1 -1
  316. package/dist/esm/api/types/AssetNode.mjs +1 -1
  317. package/dist/esm/api/types/BorderModel.d.mts +1 -1
  318. package/dist/esm/api/types/BorderModel.mjs +1 -1
  319. package/dist/esm/api/types/BordersModel.d.mts +1 -1
  320. package/dist/esm/api/types/BordersModel.mjs +1 -1
  321. package/dist/esm/api/types/CellFormat.d.mts +1 -1
  322. package/dist/esm/api/types/CellFormat.mjs +0 -1
  323. package/dist/esm/api/types/Chunk.d.mts +1 -1
  324. package/dist/esm/api/types/Chunk.mjs +1 -1
  325. package/dist/esm/api/types/ChunkContentItem.d.mts +1 -1
  326. package/dist/esm/api/types/ChunkContentItem.mjs +1 -1
  327. package/dist/esm/api/types/ConversationAssetInfo.d.mts +1 -1
  328. package/dist/esm/api/types/ConversationAssetInfo.mjs +1 -1
  329. package/dist/esm/api/types/ConversationMessage.d.mts +1 -1
  330. package/dist/esm/api/types/ConversationMessage.mjs +1 -1
  331. package/dist/esm/api/types/ConversationResult.d.mts +1 -1
  332. package/dist/esm/api/types/ConversationResult.mjs +1 -1
  333. package/dist/esm/api/types/DatabaseTableSchemaResponse.d.mts +1 -1
  334. package/dist/esm/api/types/DatabaseTableSchemaResponse.mjs +1 -1
  335. package/dist/esm/api/types/DatabaseTablesResponse.d.mts +1 -1
  336. package/dist/esm/api/types/DatabaseTablesResponse.mjs +1 -1
  337. package/dist/esm/api/types/FolderResponse.d.mts +1 -1
  338. package/dist/esm/api/types/FolderResponse.mjs +1 -1
  339. package/dist/esm/api/types/GeneralAgentRequest.d.mts +1 -1
  340. package/dist/esm/api/types/GeneralAgentRequest.mjs +1 -1
  341. package/dist/esm/api/types/GeneralAgentResponse.d.mts +1 -1
  342. package/dist/esm/api/types/GeneralAgentResponse.mjs +1 -1
  343. package/dist/esm/api/types/GeneralAgentResponseMessage.d.mts +1 -1
  344. package/dist/esm/api/types/GeneralAgentResponseMessage.mjs +1 -1
  345. package/dist/esm/api/types/GeneralAgentResponseMessageKwargs.d.mts +1 -1
  346. package/dist/esm/api/types/GeneralAgentResponseMessageKwargs.mjs +1 -1
  347. package/dist/esm/api/types/InputMessage.d.mts +1 -1
  348. package/dist/esm/api/types/InputMessage.mjs +1 -1
  349. package/dist/esm/api/types/InputMessageContentItem.d.mts +1 -1
  350. package/dist/esm/api/types/InputMessageContentItem.mjs +1 -1
  351. package/dist/esm/api/types/NumberFormatModel.d.mts +1 -1
  352. package/dist/esm/api/types/NumberFormatModel.mjs +1 -1
  353. package/dist/esm/api/types/PaginatedAssetsOut.d.mts +1 -1
  354. package/dist/esm/api/types/PaginatedAssetsOut.mjs +1 -1
  355. package/dist/esm/api/types/Sheet.d.mts +1 -1
  356. package/dist/esm/api/types/Sheet.mjs +1 -1
  357. package/dist/esm/api/types/StructuredDataExtractorResponse.d.mts +1 -1
  358. package/dist/esm/api/types/StructuredDataExtractorResponse.mjs +1 -1
  359. package/dist/esm/api/types/TextFormatModel.d.mts +1 -1
  360. package/dist/esm/api/types/TextFormatModel.mjs +1 -1
  361. package/dist/esm/api/types/ThreadStatusResponseOut.d.mts +1 -1
  362. package/dist/esm/api/types/ThreadStatusResponseOut.mjs +1 -1
  363. package/dist/esm/api/types/index.d.mts +5 -5
  364. package/dist/esm/api/types/index.mjs +5 -5
  365. package/dist/esm/auth/HeaderAuthProvider.d.mts +14 -0
  366. package/dist/esm/auth/HeaderAuthProvider.mjs +34 -0
  367. package/dist/esm/auth/index.d.mts +1 -0
  368. package/dist/esm/auth/index.mjs +1 -0
  369. package/dist/esm/core/auth/AuthProvider.d.mts +7 -0
  370. package/dist/esm/core/auth/AuthProvider.mjs +1 -0
  371. package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
  372. package/dist/esm/core/auth/AuthRequest.mjs +1 -0
  373. package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
  374. package/dist/esm/core/auth/BasicAuth.mjs +24 -0
  375. package/dist/esm/core/auth/BearerToken.d.mts +7 -0
  376. package/dist/esm/core/auth/BearerToken.mjs +13 -0
  377. package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
  378. package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
  379. package/dist/esm/core/auth/index.d.mts +5 -0
  380. package/dist/esm/core/auth/index.mjs +3 -0
  381. package/dist/esm/core/base64.d.mts +2 -0
  382. package/dist/esm/core/base64.mjs +22 -0
  383. package/dist/esm/core/exports.d.mts +1 -0
  384. package/dist/esm/core/exports.mjs +1 -0
  385. package/dist/esm/core/fetcher/BinaryResponse.d.mts +6 -7
  386. package/dist/esm/core/fetcher/EndpointSupplier.d.mts +1 -1
  387. package/dist/esm/core/fetcher/EndpointSupplier.mjs +0 -1
  388. package/dist/esm/core/fetcher/Fetcher.d.mts +9 -2
  389. package/dist/esm/core/fetcher/Fetcher.mjs +204 -9
  390. package/dist/esm/core/fetcher/getErrorResponseBody.mjs +2 -1
  391. package/dist/esm/core/fetcher/getRequestBody.d.mts +1 -1
  392. package/dist/esm/core/fetcher/getRequestBody.mjs +4 -0
  393. package/dist/esm/core/fetcher/getResponseBody.mjs +21 -7
  394. package/dist/esm/core/fetcher/makeRequest.d.mts +1 -1
  395. package/dist/esm/core/fetcher/makeRequest.mjs +2 -4
  396. package/dist/esm/core/fetcher/requestWithRetries.mjs +3 -12
  397. package/dist/esm/core/fetcher/signals.d.mts +1 -7
  398. package/dist/esm/core/fetcher/signals.mjs +0 -12
  399. package/dist/esm/core/file/file.d.mts +5 -0
  400. package/dist/esm/core/file/file.mjs +24 -7
  401. package/dist/esm/core/form-data-utils/FormDataWrapper.d.mts +2 -3
  402. package/dist/esm/core/form-data-utils/FormDataWrapper.mjs +59 -82
  403. package/dist/esm/core/headers.mjs +6 -4
  404. package/dist/esm/core/index.d.mts +5 -2
  405. package/dist/esm/core/index.mjs +5 -2
  406. package/dist/esm/core/logging/exports.d.mts +18 -0
  407. package/dist/esm/core/logging/exports.mjs +9 -0
  408. package/dist/esm/core/logging/index.d.mts +1 -0
  409. package/dist/esm/core/logging/index.mjs +1 -0
  410. package/dist/esm/core/logging/logger.d.mts +126 -0
  411. package/dist/esm/core/logging/logger.mjs +138 -0
  412. package/dist/esm/core/runtime/runtime.mjs +11 -10
  413. package/dist/esm/core/url/encodePathParam.d.mts +1 -0
  414. package/dist/esm/core/url/encodePathParam.mjs +18 -0
  415. package/dist/esm/core/url/index.d.mts +1 -0
  416. package/dist/esm/core/url/index.mjs +1 -0
  417. package/dist/esm/core/url/join.mjs +3 -4
  418. package/dist/esm/errors/AthenaIntelligenceError.d.mts +1 -1
  419. package/dist/esm/errors/AthenaIntelligenceError.mjs +1 -2
  420. package/dist/esm/index.d.mts +2 -2
  421. package/dist/esm/index.mjs +1 -2
  422. package/dist/esm/version.d.mts +1 -1
  423. package/dist/esm/version.mjs +1 -1
  424. package/package.json +11 -5
  425. package/reference.md +450 -490
  426. package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +0 -4
  427. package/dist/cjs/core/fetcher/ResponseWithBody.js +0 -6
  428. package/dist/esm/core/fetcher/ResponseWithBody.d.mts +0 -4
  429. package/dist/esm/core/fetcher/ResponseWithBody.mjs +0 -3
@@ -14,13 +14,45 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
14
14
  function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
15
15
  function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
16
16
  };
17
+ import { toMultipartDataPart } from "../../core/file/index.mjs";
17
18
  import { toJson } from "../../core/json.mjs";
18
19
  import { RUNTIME } from "../runtime/index.mjs";
19
- function isNamedValue(value) {
20
- return typeof value === "object" && value != null && "name" in value;
20
+ export function newFormData() {
21
+ return __awaiter(this, void 0, void 0, function* () {
22
+ return new FormDataWrapper();
23
+ });
21
24
  }
22
- function isPathedValue(value) {
23
- return typeof value === "object" && value != null && "path" in value;
25
+ export class FormDataWrapper {
26
+ constructor() {
27
+ this.fd = new FormData();
28
+ }
29
+ setup() {
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ // noop
32
+ });
33
+ }
34
+ append(key, value) {
35
+ this.fd.append(key, String(value));
36
+ }
37
+ appendFile(key, value) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ const { data, filename, contentType } = yield toMultipartDataPart(value);
40
+ const blob = yield convertToBlob(data, contentType);
41
+ if (filename) {
42
+ this.fd.append(key, blob, filename);
43
+ }
44
+ else {
45
+ this.fd.append(key, blob);
46
+ }
47
+ });
48
+ }
49
+ getRequest() {
50
+ return {
51
+ body: this.fd,
52
+ headers: {},
53
+ duplex: "half",
54
+ };
55
+ }
24
56
  }
25
57
  function isStreamLike(value) {
26
58
  return typeof value === "object" && value != null && ("read" in value || "pipe" in value);
@@ -34,12 +66,6 @@ function isBuffer(value) {
34
66
  function isArrayBufferView(value) {
35
67
  return ArrayBuffer.isView(value);
36
68
  }
37
- function getLastPathSegment(pathStr) {
38
- const lastForwardSlash = pathStr.lastIndexOf("/");
39
- const lastBackSlash = pathStr.lastIndexOf("\\");
40
- const lastSlashIndex = Math.max(lastForwardSlash, lastBackSlash);
41
- return lastSlashIndex >= 0 ? pathStr.substring(lastSlashIndex + 1) : pathStr;
42
- }
43
69
  function streamToBuffer(stream) {
44
70
  return __awaiter(this, void 0, void 0, function* () {
45
71
  var _a, stream_1, stream_1_1;
@@ -89,82 +115,33 @@ function streamToBuffer(stream) {
89
115
  }
90
116
  return Buffer.from(result);
91
117
  }
92
- throw new Error("Unsupported stream type: " + typeof stream + ". Expected Node.js Readable stream or Web ReadableStream.");
118
+ throw new Error(`Unsupported stream type: ${typeof stream}. Expected Node.js Readable stream or Web ReadableStream.`);
93
119
  });
94
120
  }
95
- export function newFormData() {
121
+ function convertToBlob(value, contentType) {
96
122
  return __awaiter(this, void 0, void 0, function* () {
97
- return new FormDataWrapper();
98
- });
99
- }
100
- export class FormDataWrapper {
101
- constructor() {
102
- this.fd = new FormData();
103
- }
104
- setup() {
105
- return __awaiter(this, void 0, void 0, function* () {
106
- // noop
107
- });
108
- }
109
- append(key, value) {
110
- this.fd.append(key, String(value));
111
- }
112
- getFileName(value, filename) {
113
- if (filename != null) {
114
- return filename;
123
+ if (isStreamLike(value) || isReadableStream(value)) {
124
+ const buffer = yield streamToBuffer(value);
125
+ return new Blob([buffer], { type: contentType });
115
126
  }
116
- if (isNamedValue(value)) {
117
- return value.name;
127
+ if (value instanceof Blob) {
128
+ return value;
118
129
  }
119
- if (isPathedValue(value) && value.path) {
120
- return getLastPathSegment(value.path.toString());
130
+ if (isBuffer(value)) {
131
+ return new Blob([value], { type: contentType });
121
132
  }
122
- return undefined;
123
- }
124
- convertToBlob(value) {
125
- return __awaiter(this, void 0, void 0, function* () {
126
- if (isStreamLike(value) || isReadableStream(value)) {
127
- const buffer = yield streamToBuffer(value);
128
- return new Blob([buffer]);
129
- }
130
- if (value instanceof Blob) {
131
- return value;
132
- }
133
- if (isBuffer(value)) {
134
- return new Blob([value]);
135
- }
136
- if (value instanceof ArrayBuffer) {
137
- return new Blob([value]);
138
- }
139
- if (isArrayBufferView(value)) {
140
- return new Blob([value]);
141
- }
142
- if (typeof value === "string") {
143
- return new Blob([value]);
144
- }
145
- if (typeof value === "object" && value !== null) {
146
- return new Blob([toJson(value)], { type: "application/json" });
147
- }
148
- return new Blob([String(value)]);
149
- });
150
- }
151
- appendFile(key, value, fileName) {
152
- return __awaiter(this, void 0, void 0, function* () {
153
- fileName = this.getFileName(value, fileName);
154
- const blob = yield this.convertToBlob(value);
155
- if (fileName) {
156
- this.fd.append(key, blob, fileName);
157
- }
158
- else {
159
- this.fd.append(key, blob);
160
- }
161
- });
162
- }
163
- getRequest() {
164
- return {
165
- body: this.fd,
166
- headers: {},
167
- duplex: "half",
168
- };
169
- }
133
+ if (value instanceof ArrayBuffer) {
134
+ return new Blob([value], { type: contentType });
135
+ }
136
+ if (isArrayBufferView(value)) {
137
+ return new Blob([value], { type: contentType });
138
+ }
139
+ if (typeof value === "string") {
140
+ return new Blob([value], { type: contentType });
141
+ }
142
+ if (typeof value === "object" && value !== null) {
143
+ return new Blob([toJson(value)], { type: contentType !== null && contentType !== void 0 ? contentType : "application/json" });
144
+ }
145
+ return new Blob([String(value)], { type: contentType });
146
+ });
170
147
  }
@@ -3,11 +3,12 @@ export function mergeHeaders(...headersArray) {
3
3
  for (const [key, value] of headersArray
4
4
  .filter((headers) => headers != null)
5
5
  .flatMap((headers) => Object.entries(headers))) {
6
+ const insensitiveKey = key.toLowerCase();
6
7
  if (value != null) {
7
- result[key] = value;
8
+ result[insensitiveKey] = value;
8
9
  }
9
- else if (key in result) {
10
- delete result[key];
10
+ else if (insensitiveKey in result) {
11
+ delete result[insensitiveKey];
11
12
  }
12
13
  }
13
14
  return result;
@@ -17,8 +18,9 @@ export function mergeOnlyDefinedHeaders(...headersArray) {
17
18
  for (const [key, value] of headersArray
18
19
  .filter((headers) => headers != null)
19
20
  .flatMap((headers) => Object.entries(headers))) {
21
+ const insensitiveKey = key.toLowerCase();
20
22
  if (value != null) {
21
- result[key] = value;
23
+ result[insensitiveKey] = value;
22
24
  }
23
25
  }
24
26
  return result;
@@ -1,5 +1,8 @@
1
+ export * from "./auth/index.mjs";
2
+ export * from "./base64.mjs";
1
3
  export * from "./fetcher/index.mjs";
4
+ export * as file from "./file/index.mjs";
5
+ export * from "./form-data-utils/index.mjs";
6
+ export * as logging from "./logging/index.mjs";
2
7
  export * from "./runtime/index.mjs";
3
8
  export * as url from "./url/index.mjs";
4
- export * from "./form-data-utils/index.mjs";
5
- export * as file from "./file/index.mjs";
@@ -1,5 +1,8 @@
1
+ export * from "./auth/index.mjs";
2
+ export * from "./base64.mjs";
1
3
  export * from "./fetcher/index.mjs";
4
+ export * as file from "./file/index.mjs";
5
+ export * from "./form-data-utils/index.mjs";
6
+ export * as logging from "./logging/index.mjs";
2
7
  export * from "./runtime/index.mjs";
3
8
  export * as url from "./url/index.mjs";
4
- export * from "./form-data-utils/index.mjs";
5
- export * as file from "./file/index.mjs";
@@ -0,0 +1,18 @@
1
+ import * as logger from "./logger.mjs";
2
+ export declare namespace logging {
3
+ /**
4
+ * Configuration for logger instances.
5
+ */
6
+ type LogConfig = logger.LogConfig;
7
+ type LogLevel = logger.LogLevel;
8
+ const LogLevel: typeof logger.LogLevel;
9
+ type ILogger = logger.ILogger;
10
+ /**
11
+ * Console logger implementation that outputs to the console.
12
+ */
13
+ type ConsoleLogger = logger.ConsoleLogger;
14
+ /**
15
+ * Console logger implementation that outputs to the console.
16
+ */
17
+ const ConsoleLogger: typeof logger.ConsoleLogger;
18
+ }
@@ -0,0 +1,9 @@
1
+ import * as logger from "./logger.mjs";
2
+ export var logging;
3
+ (function (logging) {
4
+ logging.LogLevel = logger.LogLevel;
5
+ /**
6
+ * Console logger implementation that outputs to the console.
7
+ */
8
+ logging.ConsoleLogger = logger.ConsoleLogger;
9
+ })(logging || (logging = {}));
@@ -0,0 +1 @@
1
+ export * from "./logger.mjs";
@@ -0,0 +1 @@
1
+ export * from "./logger.mjs";
@@ -0,0 +1,126 @@
1
+ export declare const LogLevel: {
2
+ readonly Debug: "debug";
3
+ readonly Info: "info";
4
+ readonly Warn: "warn";
5
+ readonly Error: "error";
6
+ };
7
+ export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
8
+ export interface ILogger {
9
+ /**
10
+ * Logs a debug message.
11
+ * @param message - The message to log
12
+ * @param args - Additional arguments to log
13
+ */
14
+ debug(message: string, ...args: unknown[]): void;
15
+ /**
16
+ * Logs an info message.
17
+ * @param message - The message to log
18
+ * @param args - Additional arguments to log
19
+ */
20
+ info(message: string, ...args: unknown[]): void;
21
+ /**
22
+ * Logs a warning message.
23
+ * @param message - The message to log
24
+ * @param args - Additional arguments to log
25
+ */
26
+ warn(message: string, ...args: unknown[]): void;
27
+ /**
28
+ * Logs an error message.
29
+ * @param message - The message to log
30
+ * @param args - Additional arguments to log
31
+ */
32
+ error(message: string, ...args: unknown[]): void;
33
+ }
34
+ /**
35
+ * Configuration for logger initialization.
36
+ */
37
+ export interface LogConfig {
38
+ /**
39
+ * Minimum log level to output.
40
+ * @default LogLevel.Info
41
+ */
42
+ level?: LogLevel;
43
+ /**
44
+ * Logger implementation to use.
45
+ * @default new ConsoleLogger()
46
+ */
47
+ logger?: ILogger;
48
+ /**
49
+ * Whether logging should be silenced.
50
+ * @default true
51
+ */
52
+ silent?: boolean;
53
+ }
54
+ /**
55
+ * Default console-based logger implementation.
56
+ */
57
+ export declare class ConsoleLogger implements ILogger {
58
+ debug(message: string, ...args: unknown[]): void;
59
+ info(message: string, ...args: unknown[]): void;
60
+ warn(message: string, ...args: unknown[]): void;
61
+ error(message: string, ...args: unknown[]): void;
62
+ }
63
+ /**
64
+ * Logger class that provides level-based logging functionality.
65
+ */
66
+ export declare class Logger {
67
+ private readonly level;
68
+ private readonly logger;
69
+ private readonly silent;
70
+ /**
71
+ * Creates a new logger instance.
72
+ * @param config - Logger configuration
73
+ */
74
+ constructor(config: Required<LogConfig>);
75
+ /**
76
+ * Checks if a log level should be output based on configuration.
77
+ * @param level - The log level to check
78
+ * @returns True if the level should be logged
79
+ */
80
+ shouldLog(level: LogLevel): boolean;
81
+ /**
82
+ * Checks if debug logging is enabled.
83
+ * @returns True if debug logs should be output
84
+ */
85
+ isDebug(): boolean;
86
+ /**
87
+ * Logs a debug message if debug logging is enabled.
88
+ * @param message - The message to log
89
+ * @param args - Additional arguments to log
90
+ */
91
+ debug(message: string, ...args: unknown[]): void;
92
+ /**
93
+ * Checks if info logging is enabled.
94
+ * @returns True if info logs should be output
95
+ */
96
+ isInfo(): boolean;
97
+ /**
98
+ * Logs an info message if info logging is enabled.
99
+ * @param message - The message to log
100
+ * @param args - Additional arguments to log
101
+ */
102
+ info(message: string, ...args: unknown[]): void;
103
+ /**
104
+ * Checks if warning logging is enabled.
105
+ * @returns True if warning logs should be output
106
+ */
107
+ isWarn(): boolean;
108
+ /**
109
+ * Logs a warning message if warning logging is enabled.
110
+ * @param message - The message to log
111
+ * @param args - Additional arguments to log
112
+ */
113
+ warn(message: string, ...args: unknown[]): void;
114
+ /**
115
+ * Checks if error logging is enabled.
116
+ * @returns True if error logs should be output
117
+ */
118
+ isError(): boolean;
119
+ /**
120
+ * Logs an error message if error logging is enabled.
121
+ * @param message - The message to log
122
+ * @param args - Additional arguments to log
123
+ */
124
+ error(message: string, ...args: unknown[]): void;
125
+ }
126
+ export declare function createLogger(config?: LogConfig | Logger): Logger;
@@ -0,0 +1,138 @@
1
+ export const LogLevel = {
2
+ Debug: "debug",
3
+ Info: "info",
4
+ Warn: "warn",
5
+ Error: "error",
6
+ };
7
+ const logLevelMap = {
8
+ [LogLevel.Debug]: 1,
9
+ [LogLevel.Info]: 2,
10
+ [LogLevel.Warn]: 3,
11
+ [LogLevel.Error]: 4,
12
+ };
13
+ /**
14
+ * Default console-based logger implementation.
15
+ */
16
+ export class ConsoleLogger {
17
+ debug(message, ...args) {
18
+ console.debug(message, ...args);
19
+ }
20
+ info(message, ...args) {
21
+ console.info(message, ...args);
22
+ }
23
+ warn(message, ...args) {
24
+ console.warn(message, ...args);
25
+ }
26
+ error(message, ...args) {
27
+ console.error(message, ...args);
28
+ }
29
+ }
30
+ /**
31
+ * Logger class that provides level-based logging functionality.
32
+ */
33
+ export class Logger {
34
+ /**
35
+ * Creates a new logger instance.
36
+ * @param config - Logger configuration
37
+ */
38
+ constructor(config) {
39
+ this.level = logLevelMap[config.level];
40
+ this.logger = config.logger;
41
+ this.silent = config.silent;
42
+ }
43
+ /**
44
+ * Checks if a log level should be output based on configuration.
45
+ * @param level - The log level to check
46
+ * @returns True if the level should be logged
47
+ */
48
+ shouldLog(level) {
49
+ return !this.silent && this.level <= logLevelMap[level];
50
+ }
51
+ /**
52
+ * Checks if debug logging is enabled.
53
+ * @returns True if debug logs should be output
54
+ */
55
+ isDebug() {
56
+ return this.shouldLog(LogLevel.Debug);
57
+ }
58
+ /**
59
+ * Logs a debug message if debug logging is enabled.
60
+ * @param message - The message to log
61
+ * @param args - Additional arguments to log
62
+ */
63
+ debug(message, ...args) {
64
+ if (this.isDebug()) {
65
+ this.logger.debug(message, ...args);
66
+ }
67
+ }
68
+ /**
69
+ * Checks if info logging is enabled.
70
+ * @returns True if info logs should be output
71
+ */
72
+ isInfo() {
73
+ return this.shouldLog(LogLevel.Info);
74
+ }
75
+ /**
76
+ * Logs an info message if info logging is enabled.
77
+ * @param message - The message to log
78
+ * @param args - Additional arguments to log
79
+ */
80
+ info(message, ...args) {
81
+ if (this.isInfo()) {
82
+ this.logger.info(message, ...args);
83
+ }
84
+ }
85
+ /**
86
+ * Checks if warning logging is enabled.
87
+ * @returns True if warning logs should be output
88
+ */
89
+ isWarn() {
90
+ return this.shouldLog(LogLevel.Warn);
91
+ }
92
+ /**
93
+ * Logs a warning message if warning logging is enabled.
94
+ * @param message - The message to log
95
+ * @param args - Additional arguments to log
96
+ */
97
+ warn(message, ...args) {
98
+ if (this.isWarn()) {
99
+ this.logger.warn(message, ...args);
100
+ }
101
+ }
102
+ /**
103
+ * Checks if error logging is enabled.
104
+ * @returns True if error logs should be output
105
+ */
106
+ isError() {
107
+ return this.shouldLog(LogLevel.Error);
108
+ }
109
+ /**
110
+ * Logs an error message if error logging is enabled.
111
+ * @param message - The message to log
112
+ * @param args - Additional arguments to log
113
+ */
114
+ error(message, ...args) {
115
+ if (this.isError()) {
116
+ this.logger.error(message, ...args);
117
+ }
118
+ }
119
+ }
120
+ export function createLogger(config) {
121
+ var _a, _b, _c;
122
+ if (config == null) {
123
+ return defaultLogger;
124
+ }
125
+ if (config instanceof Logger) {
126
+ return config;
127
+ }
128
+ config = config !== null && config !== void 0 ? config : {};
129
+ (_a = config.level) !== null && _a !== void 0 ? _a : (config.level = LogLevel.Info);
130
+ (_b = config.logger) !== null && _b !== void 0 ? _b : (config.logger = new ConsoleLogger());
131
+ (_c = config.silent) !== null && _c !== void 0 ? _c : (config.silent = true);
132
+ return new Logger(config);
133
+ }
134
+ const defaultLogger = new Logger({
135
+ level: LogLevel.Info,
136
+ logger: new ConsoleLogger(),
137
+ silent: true,
138
+ });
@@ -68,6 +68,17 @@ function evaluateRuntime() {
68
68
  version: Bun.version,
69
69
  };
70
70
  }
71
+ /**
72
+ * A constant that indicates whether the environment the code is running is in React-Native.
73
+ * This check should come before Node.js detection since React Native may have a process polyfill.
74
+ * https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js
75
+ */
76
+ const isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative";
77
+ if (isReactNative) {
78
+ return {
79
+ type: "react-native",
80
+ };
81
+ }
71
82
  /**
72
83
  * A constant that indicates whether the environment the code is running is Node.JS.
73
84
  */
@@ -83,16 +94,6 @@ function evaluateRuntime() {
83
94
  parsedVersion: Number(process.versions.node.split(".")[0]),
84
95
  };
85
96
  }
86
- /**
87
- * A constant that indicates whether the environment the code is running is in React-Native.
88
- * https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js
89
- */
90
- const isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative";
91
- if (isReactNative) {
92
- return {
93
- type: "react-native",
94
- };
95
- }
96
97
  return {
97
98
  type: "unknown",
98
99
  };
@@ -0,0 +1 @@
1
+ export declare function encodePathParam(param: unknown): string;
@@ -0,0 +1,18 @@
1
+ export function encodePathParam(param) {
2
+ if (param === null) {
3
+ return "null";
4
+ }
5
+ const typeofParam = typeof param;
6
+ switch (typeofParam) {
7
+ case "undefined":
8
+ return "undefined";
9
+ case "string":
10
+ case "number":
11
+ case "boolean":
12
+ break;
13
+ default:
14
+ param = String(param);
15
+ break;
16
+ }
17
+ return encodeURIComponent(param);
18
+ }
@@ -1,2 +1,3 @@
1
+ export { encodePathParam } from "./encodePathParam.mjs";
1
2
  export { join } from "./join.mjs";
2
3
  export { toQueryString } from "./qs.mjs";
@@ -1,2 +1,3 @@
1
+ export { encodePathParam } from "./encodePathParam.mjs";
1
2
  export { join } from "./join.mjs";
2
3
  export { toQueryString } from "./qs.mjs";
@@ -11,11 +11,10 @@ export function join(base, ...segments) {
11
11
  url = new URL(base);
12
12
  }
13
13
  catch (_a) {
14
- // Fallback to path joining if URL is malformed
15
14
  return joinPath(base, ...segments);
16
15
  }
17
16
  const lastSegment = segments[segments.length - 1];
18
- const shouldPreserveTrailingSlash = lastSegment && lastSegment.endsWith("/");
17
+ const shouldPreserveTrailingSlash = lastSegment === null || lastSegment === void 0 ? void 0 : lastSegment.endsWith("/");
19
18
  for (const segment of segments) {
20
19
  const cleanSegment = trimSlashes(segment);
21
20
  if (cleanSegment) {
@@ -35,7 +34,7 @@ function joinPath(base, ...segments) {
35
34
  }
36
35
  let result = base;
37
36
  const lastSegment = segments[segments.length - 1];
38
- const shouldPreserveTrailingSlash = lastSegment && lastSegment.endsWith("/");
37
+ const shouldPreserveTrailingSlash = lastSegment === null || lastSegment === void 0 ? void 0 : lastSegment.endsWith("/");
39
38
  for (const segment of segments) {
40
39
  const cleanSegment = trimSlashes(segment);
41
40
  if (cleanSegment) {
@@ -51,7 +50,7 @@ function joinPathSegments(left, right) {
51
50
  if (left.endsWith("/")) {
52
51
  return left + right;
53
52
  }
54
- return left + "/" + right;
53
+ return `${left}/${right}`;
55
54
  }
56
55
  function trimSlashes(str) {
57
56
  if (!str)
@@ -1,4 +1,4 @@
1
- import * as core from "../core/index.mjs";
1
+ import type * as core from "../core/index.mjs";
2
2
  export declare class AthenaIntelligenceError extends Error {
3
3
  readonly statusCode?: number;
4
4
  readonly body?: unknown;
@@ -1,5 +1,4 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- import * as core from "../core/index.mjs";
3
2
  import { toJson } from "../core/json.mjs";
4
3
  export class AthenaIntelligenceError extends Error {
5
4
  constructor({ message, statusCode, body, rawResponse, }) {
@@ -11,7 +10,7 @@ export class AthenaIntelligenceError extends Error {
11
10
  }
12
11
  }
13
12
  function buildMessage({ message, statusCode, body, }) {
14
- let lines = [];
13
+ const lines = [];
15
14
  if (message != null) {
16
15
  lines.push(message);
17
16
  }
@@ -1,6 +1,6 @@
1
1
  export * as AthenaIntelligence from "./api/index.mjs";
2
- export { AthenaIntelligenceError, AthenaIntelligenceTimeoutError } from "./errors/index.mjs";
3
- export { type BaseClientOptions, type BaseRequestOptions } from "./BaseClient.mjs";
2
+ export type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
4
3
  export { AthenaIntelligenceClient } from "./Client.mjs";
5
4
  export { AthenaIntelligenceEnvironment } from "./environments.mjs";
5
+ export { AthenaIntelligenceError, AthenaIntelligenceTimeoutError } from "./errors/index.mjs";
6
6
  export * from "./exports.mjs";
@@ -1,6 +1,5 @@
1
1
  export * as AthenaIntelligence from "./api/index.mjs";
2
- export { AthenaIntelligenceError, AthenaIntelligenceTimeoutError } from "./errors/index.mjs";
3
- export {} from "./BaseClient.mjs";
4
2
  export { AthenaIntelligenceClient } from "./Client.mjs";
5
3
  export { AthenaIntelligenceEnvironment } from "./environments.mjs";
4
+ export { AthenaIntelligenceError, AthenaIntelligenceTimeoutError } from "./errors/index.mjs";
6
5
  export * from "./exports.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "4.3.309";
1
+ export declare const SDK_VERSION = "4.3.310";
@@ -1 +1 @@
1
- export const SDK_VERSION = "4.3.309";
1
+ export const SDK_VERSION = "4.3.310";