@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
@@ -8,20 +8,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- import * as environments from "../../../../../../environments.mjs";
11
+ import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
12
+ import { mergeHeaders } from "../../../../../../core/headers.mjs";
12
13
  import * as core from "../../../../../../core/index.mjs";
13
- import * as AthenaIntelligence from "../../../../../index.mjs";
14
- import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
14
+ import * as environments from "../../../../../../environments.mjs";
15
15
  import * as errors from "../../../../../../errors/index.mjs";
16
- export class Sheets {
17
- constructor(_options) {
18
- this._options = _options;
16
+ import * as AthenaIntelligence from "../../../../../index.mjs";
17
+ export class SheetsClient {
18
+ constructor(options) {
19
+ this._options = normalizeClientOptionsWithAuth(options);
19
20
  }
20
21
  /**
21
22
  * Update a single cell in an Athena spreadsheet.
22
23
  *
23
24
  * @param {AthenaIntelligence.tools.UpdateSheetCellRequest} request
24
- * @param {Sheets.RequestOptions} requestOptions - Request-specific configuration.
25
+ * @param {SheetsClient.RequestOptions} requestOptions - Request-specific configuration.
25
26
  *
26
27
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
27
28
  *
@@ -38,8 +39,9 @@ export class Sheets {
38
39
  }
39
40
  __updateCell(request, requestOptions) {
40
41
  return __awaiter(this, void 0, void 0, function* () {
41
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
42
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
42
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
43
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
44
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
43
45
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
44
46
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/sheets/cell/update"),
45
47
  method: "POST",
@@ -51,6 +53,8 @@ export class Sheets {
51
53
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
52
54
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
53
55
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
56
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
57
+ logging: this._options.logging,
54
58
  });
55
59
  if (_response.ok) {
56
60
  return {
@@ -77,6 +81,11 @@ export class Sheets {
77
81
  body: _response.error.rawBody,
78
82
  rawResponse: _response.rawResponse,
79
83
  });
84
+ case "body-is-null":
85
+ throw new errors.AthenaIntelligenceError({
86
+ statusCode: _response.error.statusCode,
87
+ rawResponse: _response.rawResponse,
88
+ });
80
89
  case "timeout":
81
90
  throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/tools/sheets/cell/update.");
82
91
  case "unknown":
@@ -91,7 +100,7 @@ export class Sheets {
91
100
  * Delete cells from an Athena spreadsheet.
92
101
  *
93
102
  * @param {AthenaIntelligence.tools.DeleteCellsRequest} request
94
- * @param {Sheets.RequestOptions} requestOptions - Request-specific configuration.
103
+ * @param {SheetsClient.RequestOptions} requestOptions - Request-specific configuration.
95
104
  *
96
105
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
97
106
  *
@@ -109,8 +118,9 @@ export class Sheets {
109
118
  }
110
119
  __deleteCells(request, requestOptions) {
111
120
  return __awaiter(this, void 0, void 0, function* () {
112
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
113
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
121
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
122
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
123
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
114
124
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
115
125
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/sheets/cells/delete"),
116
126
  method: "POST",
@@ -122,6 +132,8 @@ export class Sheets {
122
132
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
123
133
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
124
134
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
135
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
136
+ logging: this._options.logging,
125
137
  });
126
138
  if (_response.ok) {
127
139
  return {
@@ -148,6 +160,11 @@ export class Sheets {
148
160
  body: _response.error.rawBody,
149
161
  rawResponse: _response.rawResponse,
150
162
  });
163
+ case "body-is-null":
164
+ throw new errors.AthenaIntelligenceError({
165
+ statusCode: _response.error.statusCode,
166
+ rawResponse: _response.rawResponse,
167
+ });
151
168
  case "timeout":
152
169
  throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/tools/sheets/cells/delete.");
153
170
  case "unknown":
@@ -162,7 +179,7 @@ export class Sheets {
162
179
  * Delete columns from an Athena spreadsheet.
163
180
  *
164
181
  * @param {AthenaIntelligence.tools.DeleteColumnRequest} request
165
- * @param {Sheets.RequestOptions} requestOptions - Request-specific configuration.
182
+ * @param {SheetsClient.RequestOptions} requestOptions - Request-specific configuration.
166
183
  *
167
184
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
168
185
  *
@@ -177,8 +194,9 @@ export class Sheets {
177
194
  }
178
195
  __deleteColumn(request, requestOptions) {
179
196
  return __awaiter(this, void 0, void 0, function* () {
180
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
181
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
197
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
198
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
199
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
182
200
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
183
201
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/sheets/column/delete"),
184
202
  method: "POST",
@@ -190,6 +208,8 @@ export class Sheets {
190
208
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
191
209
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
192
210
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
211
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
212
+ logging: this._options.logging,
193
213
  });
194
214
  if (_response.ok) {
195
215
  return {
@@ -216,6 +236,11 @@ export class Sheets {
216
236
  body: _response.error.rawBody,
217
237
  rawResponse: _response.rawResponse,
218
238
  });
239
+ case "body-is-null":
240
+ throw new errors.AthenaIntelligenceError({
241
+ statusCode: _response.error.statusCode,
242
+ rawResponse: _response.rawResponse,
243
+ });
219
244
  case "timeout":
220
245
  throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/tools/sheets/column/delete.");
221
246
  case "unknown":
@@ -230,7 +255,7 @@ export class Sheets {
230
255
  * Insert a column in an Athena spreadsheet.
231
256
  *
232
257
  * @param {AthenaIntelligence.tools.InsertColumnRequest} request
233
- * @param {Sheets.RequestOptions} requestOptions - Request-specific configuration.
258
+ * @param {SheetsClient.RequestOptions} requestOptions - Request-specific configuration.
234
259
  *
235
260
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
236
261
  *
@@ -245,8 +270,9 @@ export class Sheets {
245
270
  }
246
271
  __insertColumn(request, requestOptions) {
247
272
  return __awaiter(this, void 0, void 0, function* () {
248
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
249
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
273
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
274
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
275
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
250
276
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
251
277
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/sheets/column/insert"),
252
278
  method: "POST",
@@ -258,6 +284,8 @@ export class Sheets {
258
284
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
259
285
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
260
286
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
287
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
288
+ logging: this._options.logging,
261
289
  });
262
290
  if (_response.ok) {
263
291
  return {
@@ -284,6 +312,11 @@ export class Sheets {
284
312
  body: _response.error.rawBody,
285
313
  rawResponse: _response.rawResponse,
286
314
  });
315
+ case "body-is-null":
316
+ throw new errors.AthenaIntelligenceError({
317
+ statusCode: _response.error.statusCode,
318
+ rawResponse: _response.rawResponse,
319
+ });
287
320
  case "timeout":
288
321
  throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/tools/sheets/column/insert.");
289
322
  case "unknown":
@@ -298,7 +331,7 @@ export class Sheets {
298
331
  * Clear formatting from cells in an Athena spreadsheet.
299
332
  *
300
333
  * @param {AthenaIntelligence.tools.ClearFormattingRequest} request
301
- * @param {Sheets.RequestOptions} requestOptions - Request-specific configuration.
334
+ * @param {SheetsClient.RequestOptions} requestOptions - Request-specific configuration.
302
335
  *
303
336
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
304
337
  *
@@ -316,8 +349,9 @@ export class Sheets {
316
349
  }
317
350
  __clearFormatting(request, requestOptions) {
318
351
  return __awaiter(this, void 0, void 0, function* () {
319
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
320
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
352
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
353
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
354
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
321
355
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
322
356
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/sheets/formatting/clear"),
323
357
  method: "POST",
@@ -329,6 +363,8 @@ export class Sheets {
329
363
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
330
364
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
331
365
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
366
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
367
+ logging: this._options.logging,
332
368
  });
333
369
  if (_response.ok) {
334
370
  return {
@@ -355,6 +391,11 @@ export class Sheets {
355
391
  body: _response.error.rawBody,
356
392
  rawResponse: _response.rawResponse,
357
393
  });
394
+ case "body-is-null":
395
+ throw new errors.AthenaIntelligenceError({
396
+ statusCode: _response.error.statusCode,
397
+ rawResponse: _response.rawResponse,
398
+ });
358
399
  case "timeout":
359
400
  throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/tools/sheets/formatting/clear.");
360
401
  case "unknown":
@@ -369,7 +410,7 @@ export class Sheets {
369
410
  * Clear a range of cells in an Athena spreadsheet.
370
411
  *
371
412
  * @param {AthenaIntelligence.tools.ClearSheetRangeRequest} request
372
- * @param {Sheets.RequestOptions} requestOptions - Request-specific configuration.
413
+ * @param {SheetsClient.RequestOptions} requestOptions - Request-specific configuration.
373
414
  *
374
415
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
375
416
  *
@@ -387,8 +428,9 @@ export class Sheets {
387
428
  }
388
429
  __clearRange(request, requestOptions) {
389
430
  return __awaiter(this, void 0, void 0, function* () {
390
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
391
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
431
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
432
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
433
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
392
434
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
393
435
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/sheets/range/clear"),
394
436
  method: "POST",
@@ -400,6 +442,8 @@ export class Sheets {
400
442
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
401
443
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
402
444
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
445
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
446
+ logging: this._options.logging,
403
447
  });
404
448
  if (_response.ok) {
405
449
  return {
@@ -426,6 +470,11 @@ export class Sheets {
426
470
  body: _response.error.rawBody,
427
471
  rawResponse: _response.rawResponse,
428
472
  });
473
+ case "body-is-null":
474
+ throw new errors.AthenaIntelligenceError({
475
+ statusCode: _response.error.statusCode,
476
+ rawResponse: _response.rawResponse,
477
+ });
429
478
  case "timeout":
430
479
  throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/tools/sheets/range/clear.");
431
480
  case "unknown":
@@ -440,7 +489,7 @@ export class Sheets {
440
489
  * Apply formatting to a range of cells in an Athena spreadsheet.
441
490
  *
442
491
  * @param {AthenaIntelligence.tools.FormatSheetRangeRequest} request
443
- * @param {Sheets.RequestOptions} requestOptions - Request-specific configuration.
492
+ * @param {SheetsClient.RequestOptions} requestOptions - Request-specific configuration.
444
493
  *
445
494
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
446
495
  *
@@ -459,8 +508,9 @@ export class Sheets {
459
508
  }
460
509
  __formatRange(request, requestOptions) {
461
510
  return __awaiter(this, void 0, void 0, function* () {
462
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
463
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
511
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
512
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
513
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
464
514
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
465
515
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/sheets/range/format"),
466
516
  method: "POST",
@@ -472,6 +522,8 @@ export class Sheets {
472
522
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
473
523
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
474
524
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
525
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
526
+ logging: this._options.logging,
475
527
  });
476
528
  if (_response.ok) {
477
529
  return {
@@ -498,6 +550,11 @@ export class Sheets {
498
550
  body: _response.error.rawBody,
499
551
  rawResponse: _response.rawResponse,
500
552
  });
553
+ case "body-is-null":
554
+ throw new errors.AthenaIntelligenceError({
555
+ statusCode: _response.error.statusCode,
556
+ rawResponse: _response.rawResponse,
557
+ });
501
558
  case "timeout":
502
559
  throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/tools/sheets/range/format.");
503
560
  case "unknown":
@@ -512,7 +569,7 @@ export class Sheets {
512
569
  * Update a range of cells in an Athena spreadsheet.
513
570
  *
514
571
  * @param {AthenaIntelligence.tools.UpdateSheetRangeRequest} request
515
- * @param {Sheets.RequestOptions} requestOptions - Request-specific configuration.
572
+ * @param {SheetsClient.RequestOptions} requestOptions - Request-specific configuration.
516
573
  *
517
574
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
518
575
  *
@@ -529,8 +586,9 @@ export class Sheets {
529
586
  }
530
587
  __updateRange(request, requestOptions) {
531
588
  return __awaiter(this, void 0, void 0, function* () {
532
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
533
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
589
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
590
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
591
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
534
592
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
535
593
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/sheets/range/update"),
536
594
  method: "POST",
@@ -542,6 +600,8 @@ export class Sheets {
542
600
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
543
601
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
544
602
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
603
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
604
+ logging: this._options.logging,
545
605
  });
546
606
  if (_response.ok) {
547
607
  return {
@@ -568,6 +628,11 @@ export class Sheets {
568
628
  body: _response.error.rawBody,
569
629
  rawResponse: _response.rawResponse,
570
630
  });
631
+ case "body-is-null":
632
+ throw new errors.AthenaIntelligenceError({
633
+ statusCode: _response.error.statusCode,
634
+ rawResponse: _response.rawResponse,
635
+ });
571
636
  case "timeout":
572
637
  throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/tools/sheets/range/update.");
573
638
  case "unknown":
@@ -582,7 +647,7 @@ export class Sheets {
582
647
  * Insert a row in an Athena spreadsheet.
583
648
  *
584
649
  * @param {AthenaIntelligence.tools.InsertRowRequest} request
585
- * @param {Sheets.RequestOptions} requestOptions - Request-specific configuration.
650
+ * @param {SheetsClient.RequestOptions} requestOptions - Request-specific configuration.
586
651
  *
587
652
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
588
653
  *
@@ -597,8 +662,9 @@ export class Sheets {
597
662
  }
598
663
  __insertRow(request, requestOptions) {
599
664
  return __awaiter(this, void 0, void 0, function* () {
600
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
601
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
665
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
666
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
667
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
602
668
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
603
669
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/sheets/row/insert"),
604
670
  method: "POST",
@@ -610,6 +676,8 @@ export class Sheets {
610
676
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
611
677
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
612
678
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
679
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
680
+ logging: this._options.logging,
613
681
  });
614
682
  if (_response.ok) {
615
683
  return {
@@ -636,6 +704,11 @@ export class Sheets {
636
704
  body: _response.error.rawBody,
637
705
  rawResponse: _response.rawResponse,
638
706
  });
707
+ case "body-is-null":
708
+ throw new errors.AthenaIntelligenceError({
709
+ statusCode: _response.error.statusCode,
710
+ rawResponse: _response.rawResponse,
711
+ });
639
712
  case "timeout":
640
713
  throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/tools/sheets/row/insert.");
641
714
  case "unknown":
@@ -650,7 +723,7 @@ export class Sheets {
650
723
  * Duplicate an existing sheet in an Athena spreadsheet.
651
724
  *
652
725
  * @param {AthenaIntelligence.tools.DuplicateSheetRequest} request
653
- * @param {Sheets.RequestOptions} requestOptions - Request-specific configuration.
726
+ * @param {SheetsClient.RequestOptions} requestOptions - Request-specific configuration.
654
727
  *
655
728
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
656
729
  *
@@ -664,8 +737,9 @@ export class Sheets {
664
737
  }
665
738
  __duplicateSheet(request, requestOptions) {
666
739
  return __awaiter(this, void 0, void 0, function* () {
667
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
668
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
740
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
741
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
742
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
669
743
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
670
744
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/sheets/sheet/duplicate"),
671
745
  method: "POST",
@@ -677,6 +751,8 @@ export class Sheets {
677
751
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
678
752
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
679
753
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
754
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
755
+ logging: this._options.logging,
680
756
  });
681
757
  if (_response.ok) {
682
758
  return {
@@ -703,6 +779,11 @@ export class Sheets {
703
779
  body: _response.error.rawBody,
704
780
  rawResponse: _response.rawResponse,
705
781
  });
782
+ case "body-is-null":
783
+ throw new errors.AthenaIntelligenceError({
784
+ statusCode: _response.error.statusCode,
785
+ rawResponse: _response.rawResponse,
786
+ });
706
787
  case "timeout":
707
788
  throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/tools/sheets/sheet/duplicate.");
708
789
  case "unknown":
@@ -717,7 +798,7 @@ export class Sheets {
717
798
  * Create a new tab in an Athena spreadsheet.
718
799
  *
719
800
  * @param {AthenaIntelligence.tools.CreateNewSheetTabRequest} request
720
- * @param {Sheets.RequestOptions} requestOptions - Request-specific configuration.
801
+ * @param {SheetsClient.RequestOptions} requestOptions - Request-specific configuration.
721
802
  *
722
803
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
723
804
  *
@@ -738,8 +819,9 @@ export class Sheets {
738
819
  }
739
820
  __createTab(request, requestOptions) {
740
821
  return __awaiter(this, void 0, void 0, function* () {
741
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
742
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
822
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
823
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
824
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
743
825
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
744
826
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/sheets/tab/create"),
745
827
  method: "POST",
@@ -751,6 +833,8 @@ export class Sheets {
751
833
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
752
834
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
753
835
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
836
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
837
+ logging: this._options.logging,
754
838
  });
755
839
  if (_response.ok) {
756
840
  return {
@@ -777,6 +861,11 @@ export class Sheets {
777
861
  body: _response.error.rawBody,
778
862
  rawResponse: _response.rawResponse,
779
863
  });
864
+ case "body-is-null":
865
+ throw new errors.AthenaIntelligenceError({
866
+ statusCode: _response.error.statusCode,
867
+ rawResponse: _response.rawResponse,
868
+ });
780
869
  case "timeout":
781
870
  throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/tools/sheets/tab/create.");
782
871
  case "unknown":
@@ -791,7 +880,7 @@ export class Sheets {
791
880
  * Delete a column from a table within an Athena spreadsheet.
792
881
  *
793
882
  * @param {AthenaIntelligence.tools.DeleteTableColumnRequest} request
794
- * @param {Sheets.RequestOptions} requestOptions - Request-specific configuration.
883
+ * @param {SheetsClient.RequestOptions} requestOptions - Request-specific configuration.
795
884
  *
796
885
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
797
886
  *
@@ -807,8 +896,9 @@ export class Sheets {
807
896
  }
808
897
  __deleteTableColumn(request, requestOptions) {
809
898
  return __awaiter(this, void 0, void 0, function* () {
810
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
811
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
899
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
900
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
901
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
812
902
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
813
903
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/sheets/table/column/delete"),
814
904
  method: "POST",
@@ -820,6 +910,8 @@ export class Sheets {
820
910
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
821
911
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
822
912
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
913
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
914
+ logging: this._options.logging,
823
915
  });
824
916
  if (_response.ok) {
825
917
  return {
@@ -846,6 +938,11 @@ export class Sheets {
846
938
  body: _response.error.rawBody,
847
939
  rawResponse: _response.rawResponse,
848
940
  });
941
+ case "body-is-null":
942
+ throw new errors.AthenaIntelligenceError({
943
+ statusCode: _response.error.statusCode,
944
+ rawResponse: _response.rawResponse,
945
+ });
849
946
  case "timeout":
850
947
  throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/tools/sheets/table/column/delete.");
851
948
  case "unknown":
@@ -860,7 +957,7 @@ export class Sheets {
860
957
  * Insert a column in a table within an Athena spreadsheet.
861
958
  *
862
959
  * @param {AthenaIntelligence.tools.InsertTableColumnRequest} request
863
- * @param {Sheets.RequestOptions} requestOptions - Request-specific configuration.
960
+ * @param {SheetsClient.RequestOptions} requestOptions - Request-specific configuration.
864
961
  *
865
962
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
866
963
  *
@@ -877,8 +974,9 @@ export class Sheets {
877
974
  }
878
975
  __insertTableColumn(request, requestOptions) {
879
976
  return __awaiter(this, void 0, void 0, function* () {
880
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
881
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
977
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
978
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
979
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
882
980
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
883
981
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/sheets/table/column/insert"),
884
982
  method: "POST",
@@ -890,6 +988,8 @@ export class Sheets {
890
988
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
891
989
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
892
990
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
991
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
992
+ logging: this._options.logging,
893
993
  });
894
994
  if (_response.ok) {
895
995
  return {
@@ -916,6 +1016,11 @@ export class Sheets {
916
1016
  body: _response.error.rawBody,
917
1017
  rawResponse: _response.rawResponse,
918
1018
  });
1019
+ case "body-is-null":
1020
+ throw new errors.AthenaIntelligenceError({
1021
+ statusCode: _response.error.statusCode,
1022
+ rawResponse: _response.rawResponse,
1023
+ });
919
1024
  case "timeout":
920
1025
  throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/tools/sheets/table/column/insert.");
921
1026
  case "unknown":
@@ -930,7 +1035,7 @@ export class Sheets {
930
1035
  * Create a table in an Athena spreadsheet.
931
1036
  *
932
1037
  * @param {AthenaIntelligence.tools.CreateTableRequest} request
933
- * @param {Sheets.RequestOptions} requestOptions - Request-specific configuration.
1038
+ * @param {SheetsClient.RequestOptions} requestOptions - Request-specific configuration.
934
1039
  *
935
1040
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
936
1041
  *
@@ -950,8 +1055,9 @@ export class Sheets {
950
1055
  }
951
1056
  __createTable(request, requestOptions) {
952
1057
  return __awaiter(this, void 0, void 0, function* () {
953
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
954
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1058
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1059
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1060
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
955
1061
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
956
1062
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/sheets/table/create"),
957
1063
  method: "POST",
@@ -963,6 +1069,8 @@ export class Sheets {
963
1069
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
964
1070
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
965
1071
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1072
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1073
+ logging: this._options.logging,
966
1074
  });
967
1075
  if (_response.ok) {
968
1076
  return {
@@ -989,6 +1097,11 @@ export class Sheets {
989
1097
  body: _response.error.rawBody,
990
1098
  rawResponse: _response.rawResponse,
991
1099
  });
1100
+ case "body-is-null":
1101
+ throw new errors.AthenaIntelligenceError({
1102
+ statusCode: _response.error.statusCode,
1103
+ rawResponse: _response.rawResponse,
1104
+ });
992
1105
  case "timeout":
993
1106
  throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/tools/sheets/table/create.");
994
1107
  case "unknown":
@@ -1003,7 +1116,7 @@ export class Sheets {
1003
1116
  * Retrieve table data from an Athena spreadsheet.
1004
1117
  *
1005
1118
  * @param {AthenaIntelligence.tools.GetTableRequest} request
1006
- * @param {Sheets.RequestOptions} requestOptions - Request-specific configuration.
1119
+ * @param {SheetsClient.RequestOptions} requestOptions - Request-specific configuration.
1007
1120
  *
1008
1121
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
1009
1122
  *
@@ -1018,8 +1131,9 @@ export class Sheets {
1018
1131
  }
1019
1132
  __getTable(request, requestOptions) {
1020
1133
  return __awaiter(this, void 0, void 0, function* () {
1021
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1022
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1134
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1135
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1136
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1023
1137
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1024
1138
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/sheets/table/get"),
1025
1139
  method: "POST",
@@ -1031,6 +1145,8 @@ export class Sheets {
1031
1145
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
1032
1146
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
1033
1147
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1148
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1149
+ logging: this._options.logging,
1034
1150
  });
1035
1151
  if (_response.ok) {
1036
1152
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -1054,6 +1170,11 @@ export class Sheets {
1054
1170
  body: _response.error.rawBody,
1055
1171
  rawResponse: _response.rawResponse,
1056
1172
  });
1173
+ case "body-is-null":
1174
+ throw new errors.AthenaIntelligenceError({
1175
+ statusCode: _response.error.statusCode,
1176
+ rawResponse: _response.rawResponse,
1177
+ });
1057
1178
  case "timeout":
1058
1179
  throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/tools/sheets/table/get.");
1059
1180
  case "unknown":
@@ -1068,7 +1189,7 @@ export class Sheets {
1068
1189
  * Insert rows into a table in an Athena spreadsheet.
1069
1190
  *
1070
1191
  * @param {AthenaIntelligence.tools.InsertTableRowRequest} request
1071
- * @param {Sheets.RequestOptions} requestOptions - Request-specific configuration.
1192
+ * @param {SheetsClient.RequestOptions} requestOptions - Request-specific configuration.
1072
1193
  *
1073
1194
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
1074
1195
  *
@@ -1086,8 +1207,9 @@ export class Sheets {
1086
1207
  }
1087
1208
  __insertTableRow(request, requestOptions) {
1088
1209
  return __awaiter(this, void 0, void 0, function* () {
1089
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1090
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1210
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1211
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1212
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1091
1213
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1092
1214
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/sheets/table/insert-row"),
1093
1215
  method: "POST",
@@ -1099,6 +1221,8 @@ export class Sheets {
1099
1221
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
1100
1222
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
1101
1223
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1224
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1225
+ logging: this._options.logging,
1102
1226
  });
1103
1227
  if (_response.ok) {
1104
1228
  return {
@@ -1125,6 +1249,11 @@ export class Sheets {
1125
1249
  body: _response.error.rawBody,
1126
1250
  rawResponse: _response.rawResponse,
1127
1251
  });
1252
+ case "body-is-null":
1253
+ throw new errors.AthenaIntelligenceError({
1254
+ statusCode: _response.error.statusCode,
1255
+ rawResponse: _response.rawResponse,
1256
+ });
1128
1257
  case "timeout":
1129
1258
  throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/tools/sheets/table/insert-row.");
1130
1259
  case "unknown":
@@ -1139,7 +1268,7 @@ export class Sheets {
1139
1268
  * Update an existing table in an Athena spreadsheet.
1140
1269
  *
1141
1270
  * @param {AthenaIntelligence.tools.UpdateTableRequest} request
1142
- * @param {Sheets.RequestOptions} requestOptions - Request-specific configuration.
1271
+ * @param {SheetsClient.RequestOptions} requestOptions - Request-specific configuration.
1143
1272
  *
1144
1273
  * @throws {@link AthenaIntelligence.UnprocessableEntityError}
1145
1274
  *
@@ -1159,8 +1288,9 @@ export class Sheets {
1159
1288
  }
1160
1289
  __updateTable(request, requestOptions) {
1161
1290
  return __awaiter(this, void 0, void 0, function* () {
1162
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1163
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1291
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1292
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1293
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1164
1294
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1165
1295
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/sheets/table/update"),
1166
1296
  method: "POST",
@@ -1172,6 +1302,8 @@ export class Sheets {
1172
1302
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
1173
1303
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
1174
1304
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1305
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1306
+ logging: this._options.logging,
1175
1307
  });
1176
1308
  if (_response.ok) {
1177
1309
  return {
@@ -1198,6 +1330,11 @@ export class Sheets {
1198
1330
  body: _response.error.rawBody,
1199
1331
  rawResponse: _response.rawResponse,
1200
1332
  });
1333
+ case "body-is-null":
1334
+ throw new errors.AthenaIntelligenceError({
1335
+ statusCode: _response.error.statusCode,
1336
+ rawResponse: _response.rawResponse,
1337
+ });
1201
1338
  case "timeout":
1202
1339
  throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling POST /api/v0/tools/sheets/table/update.");
1203
1340
  case "unknown":
@@ -1208,10 +1345,4 @@ export class Sheets {
1208
1345
  }
1209
1346
  });
1210
1347
  }
1211
- _getCustomAuthorizationHeaders() {
1212
- return __awaiter(this, void 0, void 0, function* () {
1213
- const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
1214
- return { "X-API-KEY": apiKeyValue };
1215
- });
1216
- }
1217
1348
  }